/* Small additions on top of the v3.9 pages: menus, notices, results, the limit form. Same dark look as the pages. */
:root { --pbx-bg: #141414; --pbx-line: rgba(248, 248, 239, .14); --pbx-fg: #F8F8EF; --pbx-mute: rgba(248, 248, 239, .6); --pbx-acc: #FF5B1F; --pbx-lime: #EFFE17; }
html.pbx-free-used .pb-gen::after { content: "Charged when done · refunded if it fails · private" !important; }

.pbx-menu { position: fixed; z-index: 10000; min-width: 220px; max-width: 320px; padding: 6px; border: 1px solid var(--pbx-line); border-radius: 12px;
  background: var(--pbx-bg); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); font: 500 14px/1.3 Inter, Arial, sans-serif; color: var(--pbx-fg); }
.pbx-menu button, .pbx-menu a { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.pbx-menu button:hover, .pbx-menu a:hover, .pbx-menu .pbx-on { background: rgba(248, 248, 239, .07); }
.pbx-menu .pbx-on span::after { content: " ✓"; color: var(--pbx-lime); }
.pbx-menu small { color: var(--pbx-mute); font-weight: 400; font-size: 12px; }
.pbx-menu .pbx-who { margin: 4px 10px 8px; color: var(--pbx-mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

.pbx-toasts { position: fixed; z-index: 10001; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100vw - 32px)); }
.pbx-toast { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--pbx-line); border-radius: 12px;
  background: var(--pbx-bg); color: var(--pbx-fg); font: 500 14px/1.35 Inter, Arial, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.pbx-toast.pbx-bad { border-color: rgba(255, 91, 31, .55); }
.pbx-toast a { flex: none; color: var(--pbx-lime); font-weight: 600; text-decoration: none; }

.pbx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 6px; }
.pbx-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 6px 3px 3px; border: 1px solid var(--pbx-line); border-radius: 8px;
  background: rgba(248, 248, 239, .05); color: var(--pbx-fg); font: 500 12px/1.2 Inter, Arial, sans-serif; position: relative; z-index: 2; }
.pbx-chip img, .pbx-chip video { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; flex: none; }
.pbx-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbx-chip button { flex: none; border: 0; background: none; color: var(--pbx-mute); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.pbx-chip-big { margin-top: 8px; }

.pbx-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; align-content: start; align-items: start; padding: 16px; }
.pbx-jobs[hidden] { display: none; }
.pbx-jobs-img { padding: 16px 16px 24px; }
.pbx-jobs-lib { padding: 8px 0 32px; }
.pbx-empty { grid-column: 1 / -1; margin: 24px 0; color: var(--pbx-mute); font: 400 14px/1.4 Inter, Arial, sans-serif; text-align: center; }
.pbx-job { margin: 0; border: 1px solid var(--pbx-line); border-radius: 14px; overflow: hidden; background: rgba(248, 248, 239, .03); font: 400 13px/1.35 Inter, Arial, sans-serif; color: var(--pbx-fg); }
.pbx-media { display: grid; background: #000; }
.pbx-media.pbx-multi { grid-template-columns: 1fr 1fr; gap: 2px; }
.pbx-media video, .pbx-media img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.pbx-wait { display: grid; place-items: center; aspect-ratio: 9 / 12; padding: 16px; color: var(--pbx-mute); text-align: center;
  background: linear-gradient(110deg, rgba(248, 248, 239, .03) 30%, rgba(248, 248, 239, .09) 50%, rgba(248, 248, 239, .03) 70%); background-size: 200% 100%; animation: pbx-sheen 1.6s linear infinite; }
.pbx-wait { align-content: center; gap: 8px; }
.pbx-wait small { max-width: 26ch; font-size: 12px; line-height: 1.4; }
.pbx-wait.pbx-failed { animation: none; background: rgba(255, 91, 31, .06); color: var(--pbx-fg); }
@keyframes pbx-sheen { to { background-position: -200% 0; } }
.pbx-job figcaption { padding: 10px 12px 12px; }
.pbx-what { display: flex; justify-content: space-between; gap: 8px; margin: 0; }
.pbx-what span { color: var(--pbx-mute); text-align: right; }
.pbx-prompt { margin: 6px 0 0; color: var(--pbx-mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pbx-dl { display: flex; gap: 12px; margin: 8px 0 0; }
.pbx-dl a { color: var(--pbx-lime); font-weight: 600; text-decoration: none; }

.pbx-balance { margin: 6px 0 14px; color: var(--pbx-mute); font: 400 15px/1.4 Inter, Arial, sans-serif; text-align: center; }
.pbx-balance b { color: var(--pbx-fg); font-weight: 600; }
.pbx-legal { margin: 10px auto 0; max-width: 640px; font: 400 13px/1.45 Inter, Arial, sans-serif; text-align: center; }
.pbx-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pbx-balance a, .pbx-auth-note a { color: var(--pbx-lime); text-decoration: none; }
.pbx-auth-note { min-height: 1.4em; margin: 10px 0 0; color: var(--pbx-mute); font: 400 13px/1.45 Inter, Arial, sans-serif; }
.pbx-auth-note small { display: block; margin-top: 4px; opacity: .7; }
.pbx-history { max-width: 958px; margin: 28px auto 0; font: 400 14px/1.4 Inter, Arial, sans-serif; color: var(--pbx-fg); }
.pbx-history h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.pbx-history table { width: 100%; border-collapse: collapse; }
.pbx-history td { padding: 9px 6px; border-top: 1px solid var(--pbx-line); }
.pbx-history td:nth-child(3), .pbx-history td:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pbx-pos { color: var(--pbx-lime); }
.pbx-muted { color: var(--pbx-mute); }

.pbx-limit { margin-top: 16px; padding: 18px 20px; border: 1px solid var(--pbx-line); border-radius: 16px; background: rgba(248, 248, 239, .03);
  font: 400 14px/1.4 Inter, Arial, sans-serif; color: var(--pbx-fg); }
.pbx-limit .pbx-label { margin: 0 0 4px; font-weight: 600; }
.pbx-limit .pbx-muted { margin: 0 0 12px; }
.pbx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pbx-row .pbx-muted { margin: 0; }
.pbx-row input { width: 120px; height: 38px; padding: 0 12px; border: 1px solid var(--pbx-line); border-radius: 10px; background: #0c0c0c; color: var(--pbx-fg); font: inherit; }
.pbx-row button { height: 38px; padding: 0 18px; border: 1px solid rgba(248, 248, 239, .35); border-radius: 999px; background: transparent; color: var(--pbx-fg); font: 600 14px/1 Inter, Arial, sans-serif; cursor: pointer; }
.pbx-row button:hover { background: rgba(248, 248, 239, .07); }
@media (max-width: 760px) { .pbx-jobs { grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; } }

/* Layout fixes for the captured pages */
/* community galleries: the captured masonry froze at its desktop positions (4 columns of 275 px, absolutely placed),
   so phones scrolled sideways; columns now follow the screen (2 on a phone, up to 4 on a desktop) */
[role="grid"][style*="position: relative"][style*="height"] { height: auto !important; max-height: none !important; columns: 4 160px; column-gap: 8px; }
[role="grid"] > [role="gridcell"][style*="position: absolute"] { position: static !important; width: auto !important; break-inside: avoid; margin-bottom: 8px; }
/* landing-style pages: the page grid had no column size, so one wide slider stretched every section past the screen */
main.grid.grid-flow-row-dense { grid-template-columns: minmax(0, 1fr); }
div.w-full.grid.gap-10.justify-items-center { grid-template-columns: minmax(0, 1fr); }
/* phones: never let one wide strip zoom the whole page out; anything past the screen edge is clipped instead */
@media (max-width: 767px) { html, body { overflow-x: clip; } }
