/* ShortMojo — the review desk. Lato Black echoes the burned-in captions; the one accent is the caption highlight yellow. */
@font-face { font-family: "Lato"; src: url("/fonts/Lato-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/fonts/Lato-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/fonts/Lato-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("/fonts/NotoSansDevanagari-Bold.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #e9edf2;
  --surface: #f8fafc;
  --ink: #18202e;
  --muted: #5a6474;
  --line: #cdd5e0;
  --accent: #ffd400;
  --accent-ink: #18202e;
  --go: #1e7f55;
  --stop: #b93a33;
  --warn: #9a6400;
  --bezel: #0e131b;
  --focus: #2f6fdb;
  --radius-s: 6px;
  --radius-l: 14px;
  color-scheme: light;
}
/* Dark: follows the system unless the theme cookie forces light; data-theme="dark" forces it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12171f; --surface: #1a212c; --ink: #e4e9f0; --muted: #8d97a8; --line: #2a3342;
    --go: #4cc38a; --stop: #f07068; --warn: #e7b04a; --bezel: #05080c; --focus: #7aa7ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12171f; --surface: #1a212c; --ink: #e4e9f0; --muted: #8d97a8; --line: #2a3342;
  --go: #4cc38a; --stop: #f07068; --warn: #e7b04a; --bezel: #05080c; --focus: #7aa7ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-weight: 900; font-size: 1.95rem; letter-spacing: -0.01em; }
h2 { font-weight: 900; font-size: 1.25rem; margin-bottom: .75rem; }
h3 { font-weight: 700; font-size: 1rem; margin: 1.25rem 0 .25rem; }
p { margin: .25rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* layout */
.shell { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px;
  padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; text-decoration: none; margin: 0 8px 22px; }
.brand-mark { width: 26px; height: 26px; flex: none; border-radius: 6px; background: url(/static/icons/favicon-64.png) center / cover no-repeat; }
.login-logo { display: block; width: 64px; height: 64px; margin-bottom: 12px; }
.nav-link { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--radius-s); text-decoration: none; color: var(--muted); font-weight: 700; }
.nav-link:hover { color: var(--ink); background: var(--bg); text-decoration: none; }
.nav-link.is-active { color: var(--ink); background: var(--bg); box-shadow: inset 3px 0 0 var(--accent); }
.nav-count { min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: .8rem; text-align: center; }
.rail-foot { margin-top: auto; padding: 0 10px; display: grid; gap: 14px; justify-items: start; }

/* theme switch: light / dark / system, saved in a cookie */
.theme-switch { display: inline-flex; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.theme-switch label { position: relative; display: grid; place-items: center; width: 30px; height: 26px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.theme-switch label:hover { color: var(--ink); }
.theme-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.theme-switch label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), inset 0 -2px 0 var(--accent); }
.theme-switch label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.theme-switch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-theme { position: fixed; top: 16px; right: 16px; z-index: 2; }
.main { padding: 28px clamp(16px, 4vw, 48px) 64px; min-width: 0; max-width: 1400px; }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.block { margin-bottom: 32px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* controls */
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px;
}
textarea { resize: vertical; }
input[type="checkbox"] { width: auto; accent-color: var(--ink); }
input[type="range"] { padding: 0; accent-color: var(--ink); border: 0; background: none; }
input[type="file"] { padding: 6px; }
label { display: block; font-weight: 700; font-size: .9rem; }
label > input, label > select, label > textarea { margin-top: 4px; font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
output { font-weight: 400; color: var(--muted); margin-left: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 .95rem/1 "Lato", system-ui, sans-serif; padding: 10px 16px; min-height: 40px;
  border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent-ink); }
.btn-wide { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.danger { color: var(--stop); }

.stack { display: grid; gap: 14px; }
.stack.narrow { max-width: 420px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.row-end { display: flex; justify-content: flex-end; }
.inline { display: inline; margin-left: 10px; }
.upload-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.upload-row input { flex: 1; }

/* notices & pills */
.notice { padding: 10px 14px; border-radius: var(--radius-s); margin-bottom: 14px; border: 1px solid; font-size: .95rem; }
.notice-ok { border-color: color-mix(in srgb, var(--go) 45%, transparent); background: color-mix(in srgb, var(--go) 10%, var(--surface)); }
.notice-error { border-color: color-mix(in srgb, var(--stop) 45%, transparent); background: color-mix(in srgb, var(--stop) 10%, var(--surface)); }
.notice-warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }

.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill-pending_review { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill-approved, .pill-uploaded { color: var(--go); border-color: color-mix(in srgb, var(--go) 40%, transparent); }
.pill-failed, .pill-rejected { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 40%, transparent); }
.pill-generating, .pill-uploading { color: var(--ink); border-style: dashed; }

/* make form */
.make-form { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; max-width: 720px; }
.make-form input:not([type="checkbox"]) { flex: 1 1 100%; }
.voice-pick { display: inline-flex; gap: 6px; min-width: 0; }
.voice-pick select { width: auto; min-width: 0; max-width: 200px; }
.voice-pick .btn { white-space: nowrap; }
.redo-voice { display: grid; gap: 6px; }
.redo-voice-label { font-weight: 700; font-size: .9rem; }
.redo-voice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.redo-voice-row > select { width: auto; }
.tiktok-box { margin: 0 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); display: grid; gap: 10px; justify-items: start; }
.tiktok-box h2 { margin: 0; }
.tiktok-box .ok { color: var(--go); }
.tiktok-box .bad { color: var(--stop); }
.tiktok-box .redo { margin: 0; width: 100%; }
.copy-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: .9rem; }
.copy-list dt { font-weight: 700; }
.copy-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.copy-list code { font-size: .85rem; background: var(--bg); padding: 2px 6px; border-radius: 4px; user-select: all; }
.tt-account { display: flex; align-items: center; gap: 8px; }
.tt-account img { border-radius: 50%; }
.btn-stop { color: var(--stop); }
.btn-stop:hover { border-color: var(--stop); }
.pill-cancelled { color: var(--muted); }
.make-form select { width: auto; }

.voice-ne { display: flex; align-items: end; }
.pill-lang { color: var(--ink); }

/* trending topic ideas */
.ideas { scroll-margin-top: 110px; }
.ideas-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.ideas-head h2 { margin-bottom: .25rem; }
.ideas-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; flex: 1 1 560px; max-width: 820px; }
.idea-search { display: flex; gap: 8px; flex: 1 1 320px; }
.idea-search input { flex: 1 1 220px; min-width: 160px; }
.idea-search select, .ideas-actions > select { width: auto; flex: 0 0 auto; }
.idea-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.idea { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.idea strong { line-height: 1.3; }
.idea-trend { align-self: flex-start; max-width: 100%; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .78rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: inset 2px 0 0 var(--accent); }
.idea-actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.idea-actions .btn, .idea-actions .link-btn { white-space: nowrap; }
.idea-actions .btn { min-height: 34px; padding: 8px 12px; }

/* posters: tall 9:16 frames, the shape of the product */
.shelf { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.shelf .poster { flex: 0 0 200px; scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 18px; }
.poster { display: grid; gap: 6px; text-decoration: none; }
.poster:hover { text-decoration: none; }
.poster-frame {
  position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--radius-l); overflow: hidden;
  background: var(--bezel); border: 4px solid var(--bezel);
}
.poster:hover .poster-frame, .poster:focus-visible .poster-frame { border-color: var(--accent); }
.poster-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #8d97a8; font-weight: 700; font-size: .9rem; padding: 12px; text-align: center; }
.poster-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: .75rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.poster-title { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.empty { border: 2px dashed var(--line); border-radius: var(--radius-l); padding: 40px 24px; text-align: center; color: var(--muted); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* production progress: a real sequence, so it's ordered */
.progress-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.progress-list > li { display: grid; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.progress-list > li > a { font-weight: 700; }
.stages { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.stages li { flex: 1; font-size: .78rem; color: var(--muted); padding-top: 8px; border-top: 4px solid var(--line); }
.stages li.done { border-top-color: var(--ink); color: var(--ink); }
.stages li.now { border-top-color: var(--accent); color: var(--ink); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .stages li.now { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 50% { border-top-color: color-mix(in srgb, var(--accent) 35%, var(--line)); } }
}

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .9rem; font-weight: 700; color: var(--muted); }
.tabs a span { font-weight: 400; margin-left: 4px; }
.tabs a.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* review page: the screen is the hero */
.review { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.screen {
  position: sticky; top: 24px; aspect-ratio: 9 / 16; max-height: calc(100vh - 48px);
  background: var(--bezel); border-radius: 22px; padding: 10px; box-shadow: 0 24px 48px -24px rgba(8, 12, 20, .55);
}
.screen video { width: 100%; height: 100%; border-radius: 13px; background: #000; display: block; object-fit: contain; }
.screen-wait { height: 100%; display: grid; place-content: center; text-align: center; color: #c9d1dd; }
.screen-stage {
  font-weight: 900; font-size: 1.6rem; text-transform: uppercase; color: #fff;
  -webkit-text-stroke: 6px #000; paint-order: stroke fill;
}
.dossier { min-width: 0; max-width: 760px; }
.dossier-head { display: grid; gap: 6px; margin-bottom: 18px; justify-items: start; }
.decide { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0; margin-bottom: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.redo { display: grid; gap: 10px; padding: 16px; margin: -6px 0 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }

.scenes { margin: 0; padding: 0; list-style: none; counter-reset: scene; display: grid; gap: 14px; }
.scenes li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; counter-increment: scene; }
.scene-thumb-empty { display: block; width: 54px; aspect-ratio: 9/16; border-radius: 6px; background: var(--line); }
.scenes li > div { min-width: 0; }
.scene-thumb img { width: 54px; aspect-ratio: 9/16; object-fit: cover; border-radius: 6px; display: block; background: var(--bezel); }
.scene-line { font-size: 1.05rem; }
.scene-line::before { content: counter(scene) "  "; font-weight: 900; color: var(--muted); }
.scene-prompt { font-size: .85rem; color: var(--muted); }
.sources { margin: 0; padding-left: 18px; overflow-wrap: anywhere; }
.log summary { cursor: pointer; font-weight: 700; }
.log pre { white-space: pre-wrap; font-size: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; max-height: 340px; overflow: auto; }
.danger-zone { margin-top: 28px; }

/* settings */
.settings { display: grid; grid-template-columns: 170px minmax(0, 820px); gap: 32px; align-items: start; }
.settings-nav { position: sticky; top: 24px; display: grid; gap: 2px; }
.settings-nav a { padding: 6px 10px; text-decoration: none; color: var(--muted); font-weight: 700; border-radius: var(--radius-s); }
.settings-nav a:hover { color: var(--ink); background: var(--surface); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; margin-bottom: 24px; scroll-margin-top: 24px; }
.panel > p.muted { margin: -6px 0 16px; }
.steps { margin: 0 0 22px; padding-left: 22px; display: grid; gap: 12px; }
.steps > li h3 { margin-top: 0; }
.steps > li.done h3::after { content: " — done"; color: var(--go); font-weight: 700; }
.key-row { display: grid; gap: 4px; }
.tests { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.tests [data-test-result] { flex-basis: 100%; }
.tests .ok { color: var(--go); }
.tests .bad { color: var(--stop); }

/* login: a single caption on a phone-shaped screen */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login { display: grid; grid-template-columns: 240px 320px; gap: 48px; align-items: center; }
.login-frame {
  aspect-ratio: 9 / 16; border-radius: 22px; border: 10px solid var(--bezel);
  background: linear-gradient(160deg, #1d3557, #0b1220 70%); display: grid; place-items: center; padding: 14px;
}
.login-cap {
  font-weight: 900; font-size: 1.7rem; line-height: 1.15; text-align: center; color: #fff;
  -webkit-text-stroke: 7px #000; paint-order: stroke fill;
}
.login-cap em { font-style: normal; color: var(--accent); }
.login-form { display: grid; gap: 14px; }
.login-form h1 { margin-bottom: -8px; }

/* small screens */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; align-content: start; }
  .rail { position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0 10px 0 0; }
  .brand span:last-child { display: none; }
  .rail-foot { margin: 0 0 0 auto; padding: 0; display: flex; align-items: center; gap: 12px; }
  .main { padding: 20px 16px 48px; }
  .review { grid-template-columns: 1fr; }
  .screen { position: relative; max-width: 360px; width: 100%; margin: 0 auto; }
  .split, .cols, .cols-3 { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; flex-wrap: wrap; }
  .make-form { flex-wrap: wrap; max-width: none; }
  .make-form input:not([type="checkbox"]) { flex-basis: 100%; }
  .login { grid-template-columns: 1fr; }
  .login-frame { display: none; }
}

/* visual source choice */
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice legend { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.choice-opt { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.choice-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.choice-opt input { width: auto; margin-top: 4px; accent-color: var(--ink); }
.choice-opt > span { display: grid; }
.scene-thumb video { width: 54px; aspect-ratio: 9/16; object-fit: cover; border-radius: 6px; display: block; background: var(--bezel); }
.progress-list .inline, .screen-wait .inline { margin: 0; justify-self: start; }
.screen-wait .inline { margin-top: 12px; align-self: center; justify-self: center; }

/* public legal pages */
.legal { max-width: 720px; margin: 0 auto; padding: 40px 16px 64px; }
.legal .brand { margin: 0 0 28px; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 1.1rem; margin: 28px 0 6px; }
.legal li { margin: 4px 0; }

/* public home page */
.landing-body { min-height: 100vh; display: flex; flex-direction: column; }
.land-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px clamp(16px, 4vw, 48px); max-width: 1200px; width: 100%; margin: 0 auto; }
.land-top .brand { margin: 0; }
.land-nav { display: flex; align-items: center; gap: 12px; }
.land-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 5vw, 72px); align-items: center; max-width: 1200px; width: 100%; margin: 0 auto; padding: clamp(24px, 6vw, 72px) clamp(16px, 4vw, 48px); }
.land-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; }
.hl { background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%); color: var(--ink); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.land-lede { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin: 20px 0 26px; }
.land-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.btn-lg { min-height: 48px; padding: 14px 22px; font-size: 1.02rem; text-decoration: none; }
a.btn:hover { text-decoration: none; }
.land-phone { margin: 0; display: grid; gap: 10px; justify-items: center; }
.land-phone-screen {
  position: relative; width: min(300px, 100%); aspect-ratio: 9 / 16; border-radius: 26px; border: 11px solid var(--bezel);
  background: radial-gradient(120% 70% at 30% 20%, #3b6ea5 0%, #1d3557 45%, #0b1220 100%);
  display: grid; place-items: center; padding: 18px; box-shadow: 0 24px 60px -24px rgba(8, 15, 30, .55);
}
.land-phone-screen .login-cap { font-size: 1.85rem; }
.land-phone-chip { position: absolute; top: 12px; right: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; font-weight: 700; }
.land-phone-bar { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.land-phone-bar span { display: block; width: 38%; height: 100%; background: var(--accent); }
.land-section { max-width: 1200px; width: 100%; margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 48px); }
.land-section > h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 22px; }
.land-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.land-steps li { counter-increment: step; display: grid; gap: 6px; align-content: start; padding: 18px; border-top: 4px solid var(--accent); background: var(--surface); border-radius: 0 0 var(--radius-l) var(--radius-l); }
.land-steps li::before { content: counter(step); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.land-steps span { color: var(--muted); }
.land-plans { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.land-plan { position: relative; display: grid; gap: 8px; align-content: start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.land-plan.is-popular { border: 2px solid var(--accent); }
.land-plan h3 { margin: 0; }
.land-plan-price { font-size: 2rem; font-weight: 900; margin: 0; }
.land-plan-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.land-plan-videos { margin: 0; font-weight: 700; }
.land-plan ul { margin: 0 0 8px; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.land-plan .btn { justify-self: start; }
.land-plan-tag { position: absolute; top: -12px; left: 16px; background: var(--accent); color: #111; font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.land-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.land-grid li { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.land-grid h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 900; }
.land-grid p { color: var(--muted); margin: 0; }
.land-band { max-width: 1104px; width: calc(100% - 2 * clamp(16px, 4vw, 48px)); margin: clamp(20px, 4vw, 40px) auto clamp(36px, 6vw, 64px); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-l); background: var(--bezel); color: #f1f4f8; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.land-band h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 6px; }
.land-band p { color: #b4bfcc; margin: 0; }
.land-band-cta { display: grid; gap: 8px; justify-items: start; }
.land-mail { color: #f1f4f8; font-size: .9rem; }
.land-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px max(clamp(16px, 4vw, 48px), calc((100% - 1104px) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.land-foot nav { display: flex; gap: 18px; }
.login-alt { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
@media (max-width: 900px) {
  .land-hero { grid-template-columns: 1fr; }
  .land-phone-screen { width: min(240px, 70vw); }
  .land-steps, .land-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .land-steps, .land-grid, .land-plans { grid-template-columns: 1fr; }
  .land-cta .btn { flex: 1 1 100%; }
}

/* Gemini clip projects */
.clip-howto { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.style-sheet { margin: 10px 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.style-sheet summary { cursor: pointer; font-weight: 700; }
.clip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.clip-card { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); scroll-margin-top: 90px; }
.clip-card.has-clip { box-shadow: inset 3px 0 0 var(--go); }
.clip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.clip-head .pill { margin-left: auto; }
.clip-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.clip-text { display: grid; gap: 10px; min-width: 0; }
.prompt-box { display: grid; gap: 8px; justify-items: start; }
.prompt-box pre { margin: 0; width: 100%; max-height: 180px; overflow: auto; white-space: pre-wrap; font: 400 .85rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-s); }
.clip-preview { width: 120px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--bezel); }
.merge-box { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); display: grid; gap: 12px; }
.merge-box h3 { margin: 0; }
.merge-box .row-end { align-items: center; gap: 12px; }
@media (max-width: 560px) {
  .clip-body { grid-template-columns: 1fr; }
  .clip-preview { width: 140px; }
}
.gemini-panel { display: grid; gap: 14px; max-width: 900px; margin: -8px 0 28px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: inset 0 3px 0 var(--accent); }
.gemini-panel h2 { margin-bottom: 4px; }

/* video editor */
.main-wide { max-width: none; }
.editor { display: grid; grid-template-columns: 270px minmax(0, 1fr) 320px; grid-template-areas: "top top top" "bin preview insp" "tl tl tl"; gap: 14px; }
.ed-top { grid-area: top; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ed-title { font-size: 1.3rem; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.ed-top-actions { margin-left: auto; display: flex; gap: 8px; }
.ed-bin, .ed-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px; min-width: 0; max-height: 600px; overflow: auto; }
.ed-side { grid-area: insp; }
.ed-side [data-sidepanel] { display: grid; gap: 12px; align-content: start; }
.ed-side [data-sidepanel][hidden] { display: none; }
.ed-side h3 { margin: 6px 0 0; font-size: .95rem; }
.ed-side label.small { display: grid; gap: 4px; font-weight: 700; }
.ed-side label.small output { margin: 0; }
.ed-side label.check { display: flex; font-weight: 400; }
.ed-stack { display: grid; gap: 12px; }
.ed-group { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ed-group:last-child { border-bottom: 0; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ed-row > input { flex: 1; min-width: 0; }
.ed-transcript { max-height: 220px; overflow: auto; line-height: 1.9; padding: 8px; background: var(--bg); border-radius: var(--radius-s); }
.ed-word { border: 0; background: none; padding: 1px 2px; border-radius: 3px; font: inherit; color: var(--ink); cursor: pointer; }
.ed-word:hover { background: var(--line); }
.ed-word.is-now { box-shadow: inset 0 -2px 0 var(--accent); }
.ed-word.is-sel { background: var(--stop); color: #fff; text-decoration: line-through; }
.ed-bin { grid-area: bin; }

.ed-insp-title { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
.ed-insp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.ed-tabs button { background: none; border: 0; padding: 6px 10px; font: 700 .9rem "Lato", system-ui, sans-serif; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.ed-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.ed-upload { width: 100%; margin-bottom: 6px; }
.ed-assets, .ed-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ed-asset { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.ed-thumb { grid-row: span 2; width: 34px; height: 60px; border-radius: 4px; background: var(--bezel) center / auto 100% no-repeat; display: grid; place-items: center; color: var(--accent); font-size: 1.2rem; }
.ed-asset-text { display: grid; min-width: 0; }
.ed-asset-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.ed-asset-actions { display: flex; gap: 6px; }
.ed-asset-actions .btn, .ed-list .btn { min-height: 30px; padding: 5px 10px; font-size: .85rem; }
.ed-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; }
.ed-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-preview { grid-area: preview; display: grid; justify-items: center; align-content: start; gap: 10px; min-width: 0; }
.ed-stage { position: relative; height: min(520px, 56vh); aspect-ratio: 9 / 16; background: #000; border-radius: 14px; border: 6px solid var(--bezel); overflow: hidden; }
.ed-slot { position: absolute; inset: 0; overflow: hidden; visibility: hidden; }
.ed-slot.is-on { visibility: visible; }
.ed-slot video, .ed-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-slot [hidden] { display: none; }
.ed-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ed-ov { position: absolute; transform: translate(-50%, -50%); height: auto; }
.ed-text { position: absolute; white-space: pre-wrap; text-align: center; font-weight: 900; line-height: 1.15; paint-order: stroke fill; max-width: 92%; }
.ed-text.is-box { padding: .1em .35em; border-radius: .15em; }
.ed-caption { position: absolute; left: 6%; right: 6%; z-index: 4; transform: translateY(-50%); text-align: center; font-weight: 900; line-height: 1.15; paint-order: stroke fill; pointer-events: none; }
.ed-caption .is-box { background: rgba(0, 0, 0, .75); padding: .08em .3em; border-radius: .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ed-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #b4bfcc; margin: 0; }
.ed-transport { display: flex; align-items: center; gap: 8px; }
.ed-play { min-width: 90px; }
.ed-time { font: 700 .95rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; min-width: 15ch; text-align: center; }
.ed-note { margin: 0; }
.ed-timeline { grid-area: tl; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 10px 12px; min-width: 0; }
.ed-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.ed-tools .btn { min-height: 34px; padding: 6px 12px; }
.ed-zoom { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.ed-zoom input { width: 140px; }
.ed-scroll { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); }
.ed-canvas { position: relative; min-width: 100%; padding-bottom: 6px; user-select: none; }
.ed-ruler { position: relative; height: 26px; border-bottom: 1px solid var(--line); cursor: text; }
.ed-ruler span { position: absolute; top: 0; height: 100%; padding-left: 4px; border-left: 1px solid var(--line); font-size: .72rem; color: var(--muted); line-height: 26px; }
.ed-track { position: relative; height: 52px; border-bottom: 1px dashed var(--line); }
.ed-track-video { height: 70px; }
.ed-track-text, .ed-track-captions, .ed-track-overlay { height: 40px; }
.ed-clip-text { background: #4b4f7a; }
.ed-clip-captions { background: #6a5714; color: #fff6cc; }
.ed-clip-overlay { background: #2f5574; }
.ed-track-label { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; z-index: 3; pointer-events: none; }
.ed-track-name { position: sticky; left: 0; display: inline-block; padding: 0 6px; border-radius: 0 4px 0 0; background: var(--surface); color: var(--muted); font-size: .66rem; font-weight: 700; line-height: 14px; }

.ed-clip { position: absolute; top: 5px; bottom: 5px; border-radius: 6px; overflow: hidden; cursor: grab; background: #33415a; color: #f1f4f8; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); touch-action: none; }
.ed-clip-audio { background: #1f5d63; color: #bfe9ec; }
.ed-clip.is-selected { box-shadow: 0 0 0 2px var(--accent), inset 0 0 0 1px rgba(0, 0, 0, .3); z-index: 2; }
.ed-clip.is-muted { opacity: .55; }
.ed-strip { position: absolute; inset: 0; display: flex; overflow: hidden; pointer-events: none; }
.ed-strip span { flex: 0 0 32px; height: 100%; background-repeat: no-repeat; opacity: .85; }
.ed-wave { position: absolute; left: 0; right: 0; top: 18px; bottom: 2px; width: 100%; height: calc(100% - 20px); color: #7fd6dd; pointer-events: none; }
.ed-wave-small { top: auto; height: 16px; bottom: 0; color: rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .35); }
.ed-clip-label { position: absolute; left: 10px; top: 3px; right: 10px; font-size: .72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); pointer-events: none; }
.ed-handle { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 2; }
.ed-handle-l { left: 0; }
.ed-handle-r { right: 0; }
.ed-clip.is-selected .ed-handle { background: var(--accent); }
.ed-fade { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.ed-fade-in { left: 0; background: linear-gradient(to top right, rgba(0, 0, 0, .45) 50%, transparent 50%); }
.ed-fade-out { right: 0; background: linear-gradient(to top left, rgba(0, 0, 0, .45) 50%, transparent 50%); }
.ed-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--stop); z-index: 5; cursor: ew-resize; touch-action: none; }
.ed-playhead span { position: absolute; top: 0; left: -6px; width: 14px; height: 14px; background: var(--stop); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.ed-keys { margin: 8px 0 0; }
@media (max-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "preview" "tl" "insp" "bin"; }
  .ed-bin, .ed-side { max-height: none; }
  .ed-stage { height: min(440px, 60vh); }
  .ed-zoom { margin-left: 0; }
}

/* Audio Studio */
.lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "in look" "lib look"; gap: 18px; align-items: start; }
.lab .panel { margin: 0; }
.lab-in { grid-area: in; }
.lab-look { grid-area: look; display: grid; gap: 12px; }
.lab-library { grid-area: lib; }
.lab-meter { height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.lab-meter span { display: block; height: 100%; width: 0; background: var(--go); transition: width 60ms linear; }
.lab-meter span.is-hot { background: var(--stop); }
.lab-rec { display: flex; align-items: center; gap: 14px; }
.lab-rec .is-rec { background: var(--stop); border-color: var(--stop); color: #fff; }
.lab-timer { font: 700 1.3rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.lab-save { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lab-save input { flex: 1 1 200px; }
.lab-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.lab-chip { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.lab-chip span { color: var(--muted); font-size: .8rem; }
.lab-chip:hover { border-color: var(--ink); }
.lab-chip.is-on { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.lab-advanced summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }
.lab-sliders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.lab-sliders label { display: grid; gap: 2px; font-weight: 700; }
.lab-sliders output { margin: 0; }
.lab-apply { align-items: center; gap: 12px; }
.lab-items { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.lab-item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.lab-item.is-selected { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.lab-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lab-name { flex: 1 1 180px; font-weight: 700; }
.lab-player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lab-player audio { flex: 1 1 220px; min-width: 0; height: 36px; }
.lab-ab { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lab-ab button { border: 0; background: var(--surface); color: var(--muted); padding: 6px 12px; font: 700 .85rem "Lato", system-ui, sans-serif; cursor: pointer; }
.lab-ab button.is-on { background: var(--ink); color: var(--surface); }
.lab-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lab-item-actions .btn { min-height: 32px; padding: 6px 12px; font-size: .85rem; text-decoration: none; }
@media (max-width: 1000px) {
  .lab { grid-template-columns: minmax(0, 1fr); grid-template-areas: "in" "look" "lib"; }
}
.rail-install { min-height: 32px; padding: 6px 12px; font-size: .85rem; }
.lab-test { display: grid; gap: 8px; padding: 12px; border-radius: var(--radius-s); background: var(--bg); }
.lab-test-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.lab-ab button:disabled { opacity: .45; cursor: not-allowed; }
.ed-hear { display: grid; gap: 6px; padding: 10px; border-radius: var(--radius-s); background: var(--bg); }
.ed-hear audio { width: 100%; height: 34px; }

/* small sticky players for phones */
.lab-dock { position: sticky; bottom: 0; z-index: 6; display: grid; gap: 8px; margin: 0 -8px -8px; padding: 8px; border-radius: var(--radius-s); background: var(--surface); box-shadow: 0 -10px 24px -18px rgba(8, 15, 30, .55); }
.lab-dock .lab-test { padding: 8px 10px; }
.lab-dock .lab-player audio { height: 32px; }
.lab-dock .lab-apply { margin: 0; flex-wrap: wrap; }
.ed-stage-wrap { display: grid; justify-items: center; width: 100%; }
.ed-mini-bar { display: none; }
.ed-stage.is-mini { position: fixed; right: 12px; bottom: 12px; height: min(180px, 28vh); touch-action: none; cursor: grab; z-index: 40; border-width: 3px; border-radius: 10px; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .6); }
.ed-stage.is-mini .ed-mini-bar { display: flex; position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; align-items: center; justify-content: space-between; gap: 4px; padding: 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ed-mini-bar button { border: 0; background: rgba(255, 255, 255, .18); color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: .8rem; cursor: pointer; }
.ed-stage.is-mini .ed-empty { display: none; }
.ed-stage.is-mini.is-left { right: auto; left: 12px; }
@media (max-width: 1100px) {
  .lab-dock { margin: 0 -14px -14px; }
}
@media (max-width: 700px) {
  .lab-dock { gap: 6px; padding: 6px 8px; }
  .lab-dock .lab-test { padding: 0; background: none; gap: 6px; }
  .lab-dock .lab-test-head strong, .lab-dock [data-test-note] { display: none; }
  .lab-dock .lab-player { flex-wrap: wrap; }
  .lab-dock .lab-ab button { padding: 6px 12px; }
  .lab-dock .lab-player audio { flex: 1 1 100%; width: 100%; min-width: 0; }
  .lab-dock .lab-apply { justify-content: stretch; }
  .lab-dock .lab-apply .btn { flex: 1; min-height: 36px; padding: 6px 10px; }
  .lab-dock [data-look-status] { flex-basis: 100%; }
  .lab-dock [data-look-status]:empty { display: none; }
}

/* analytics */
.an-channel { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.an-channel img { border-radius: 50%; }
.an-channel div { display: grid; }
.an-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.an-stats div { display: grid; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.an-stats span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.an-stats strong { font-size: 1.6rem; font-weight: 900; }
.an-times form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.an-time-list .pill { font-size: .95rem; color: var(--ink); }
.an-slots { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.an-slots li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.an-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.an-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.an-table th, .an-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.an-table th { color: var(--muted); font-size: .8rem; }
.an-table td:first-child { min-width: 220px; }
.an-table td:first-child span { display: block; }
.an-table td:nth-child(2) { position: relative; min-width: 110px; }
.an-bar { display: block; height: 6px; width: var(--w); min-width: 2px; margin-bottom: 4px; border-radius: 3px; background: var(--accent); }
.an-table tr:last-child td { border-bottom: 0; }

/* title / thumbnail pick and fact check */
.thumb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 460px; }
.thumb-opt { position: relative; cursor: pointer; }
.thumb-opt input { position: absolute; opacity: 0; inset: 0; }
.thumb-opt img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; border: 3px solid transparent; }
.thumb-opt:has(input:checked) img { border-color: var(--accent); }
.thumb-dl { position: relative; z-index: 1; display: block; text-align: center; margin-top: 4px; }  /* above the radio */
.thumb-opt:has(input:focus-visible) img { outline: 3px solid var(--focus); outline-offset: 2px; }
.pick .upload-row { margin-top: 12px; }
.fc-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.fc-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.fc-list strong { font-weight: 700; }
.factcheck form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ideas-all { margin: -4px 0 12px; }
#idea-market { width: auto; }
.brand-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.brand-sample { margin: 0; display: grid; gap: 8px; position: sticky; top: 16px; }
.brand-stage { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden;
  background: var(--bezel); border: 6px solid var(--bezel); box-sizing: content-box; }
.brand-stage > img[data-brand-preview] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .2s; }
.brand-stage > img.is-loading { opacity: .6; }
.brand-logo-drag { position: absolute; cursor: grab; touch-action: none; user-select: none;
  outline: 1px dashed rgba(255, 255, 255, .7); outline-offset: 2px; }
.brand-logo-drag:hover, .brand-logo-drag:focus-visible { outline: 2px solid var(--accent); }
.brand-logo-drag.is-dragging { cursor: grabbing; outline: 2px solid var(--accent); }
@media (max-width: 900px) {
  .brand-layout { grid-template-columns: 1fr; }
  .brand-sample { position: sticky; top: 100px; z-index: 3; justify-items: center; padding: 8px 0;
    background: var(--surface); border-bottom: 1px solid var(--line); }
  .brand-stage { width: 150px; border-width: 4px; border-radius: 10px; }
  .brand-sample figcaption { display: none; }
}
.brand-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.brand-file { display: grid; gap: 8px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.brand-preview { max-width: 100%; max-height: 140px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(var(--line) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }

/* waitlist form (public) and interest page */
.land-interest { align-items: flex-start; }
.land-interest-intro { flex: 1 1 280px; }
.land-mail-line { margin-top: 12px !important; font-size: .9rem; }
.land-form { flex: 1 1 420px; display: grid; gap: 12px; background: #f8fafc; color: #18202e; padding: 20px; border-radius: var(--radius-l); }
.land-form label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.land-form label span { font-weight: 400; color: #5a6474; }
.land-form input:not([type=checkbox]), .land-form select, .land-form textarea { background: #fff; color: #18202e; border-color: #cdd5e0; }
.land-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.land-form legend { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.land-form .land-check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.land-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.land-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.land-error { background: #fde8e7; color: #8f2620; padding: 10px 12px; border-radius: 6px; margin: 0 !important; }
.land-fine { font-size: .8rem; color: #5a6474 !important; margin: 0 !important; }
.land-fine a { color: inherit; }
.land-thanks { flex: 1 1 320px; background: #f8fafc; color: #18202e; padding: 24px; border-radius: var(--radius-l); }
.land-thanks p { color: #5a6474 !important; }
@media (max-width: 560px) { .land-row { grid-template-columns: 1fr; } }
.int-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 20px; }
.int-summary .panel { margin: 0; padding: 16px; }
.int-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.int-bars li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .88rem; }
.int-bar { height: 8px; width: var(--w); min-width: 2px; border-radius: 4px; background: var(--accent); }
.an-table td span.small { display: block; }
.an-tabs { margin-bottom: 18px; }
.an-quota { display: grid; gap: 10px; padding: 18px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.an-quota-main { display: grid; gap: 2px; }
.an-quota-main > span:first-child { color: var(--muted); font-weight: 700; font-size: .85rem; }
.an-quota-main strong { font-size: 2.4rem; font-weight: 900; line-height: 1.1; }
.an-meter { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.an-meter span { display: block; height: 100%; width: var(--w); background: var(--accent); }
.an-quota .inline-form { display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; }
.an-quota .inline-form input { width: 110px; padding: 4px 8px; }
.an-refresh { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

/* comments */
.cm-all { margin: 0 0 14px; }
.cm-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; max-width: 860px; }
.cm-card { display: grid; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-comment { margin: 0; }
.cm-reply { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 6px 6px 0; }
.cm-form { display: grid; gap: 8px; }
.cm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cm-settings { margin-top: 10px; }

/* script first */
.make-first, .make-subs { flex-basis: 100%; order: 10; }
.make-approve { display: flex; align-items: center; gap: 8px; font-weight: 400; flex-wrap: wrap; }
.make-approve select { flex: 1 1 200px; width: auto; }

/* step-by-step approval */
.stepper { display: flex; gap: 6px; list-style: none; padding: 0; margin: 12px 0 4px; flex-wrap: wrap; counter-reset: step; }
.stepper li { counter-increment: step; display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted);
  padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; }
.stepper li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--line); color: var(--ink); font-size: .8rem; font-weight: 700; }
.stepper li.is-done::before { content: "✓"; background: var(--ink); color: var(--bg); }
.stepper li.is-current { color: var(--ink); border-color: var(--accent); font-weight: 700; }
.stepper li.is-current::before { background: var(--accent); color: #111; }
.visual-scenes { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 14px; counter-reset: scene; }
.visual-scenes li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; counter-increment: scene;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.visual-thumb { aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: var(--bezel); }
.visual-thumb video, .visual-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visual-body { display: grid; gap: 6px; min-width: 0; }
.visual-body .scene-line { margin: 0; }
.visual-body p.small { margin: 0; overflow-wrap: anywhere; }
.visual-upload { margin: 0; }
.step-approve { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.voice-audio { width: 100%; margin: 6px 0 10px; }
.screen-wait audio { width: min(100%, 300px); margin: 10px auto; }
.footage-note { flex-basis: 100%; margin: -2px 0 2px; display: none; }
#footage:not(:placeholder-shown) + .footage-note { display: block; }
.script-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.script-list li { display: grid; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: inset 3px 0 0 var(--accent); }
.script-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.script-meta .btn { margin-left: auto; min-height: 34px; padding: 6px 12px; text-decoration: none; }
.script-scenes { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.script-scenes li::marker { font-weight: 900; color: var(--muted); }
.script-scenes textarea { font-size: 1rem; }
.script-query { display: flex !important; align-items: center; gap: 8px; color: var(--muted); }
.script-query input { flex: 1; padding: 4px 8px; font-size: .85rem; }
.script-approve { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.script-rewrite { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 10px; }
.script-rewrite summary { cursor: pointer; font-weight: 700; }
.script-rewrite[open] { display: grid; gap: 10px; }


/* ---------- phones ---------- */
.tabbar, .brand-section { display: none; }
label.check { justify-content: flex-start; text-align: left; }
label.check > input[type="checkbox"], label.check > input[type="radio"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; }
.more-sheet { border: 0; padding: 0; }

@media (max-width: 900px) {
  :root { --tabbar-h: 62px; }
  body { -webkit-tap-highlight-color: transparent; }
  /* slim top bar: logo + where you are */
  .rail { flex-wrap: nowrap; gap: 10px; padding: 10px 16px; min-height: 52px; padding-top: max(10px, env(safe-area-inset-top)); }
  .rail .nav-link, .rail-foot { display: none; }
  .brand { margin: 0; gap: 10px; }
  .brand span.brand-name { display: none; }
  .rail .brand .brand-section { display: inline; font-size: 1.05rem; }
  .main { padding: 16px 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }

  /* bottom tab bar */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px -14px rgba(8, 15, 30, .4); }
  .tabbar a, .tabbar button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; height: var(--tabbar-h);
    border: 0; background: none; color: var(--muted); font: 700 .7rem/1 "Lato", system-ui, sans-serif; text-decoration: none; cursor: pointer; }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .is-active { color: var(--ink); }
  .tabbar .is-active svg { stroke-width: 2.3; }
  .tabbar .is-active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tabbar b { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--accent); color: var(--accent-ink); font-size: .68rem; line-height: 18px; text-align: center; }
  .tabbar b.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 12px; left: calc(50% + 9px); }

  /* "More" sheet */
  .more-sheet[open] { display: grid; gap: 4px; position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; margin: 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--surface); color: var(--ink); }
  .more-sheet::backdrop { background: rgba(8, 12, 20, .45); }
  .more-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); justify-self: center; margin-bottom: 8px; }
  .more-sheet > a { display: flex; justify-content: space-between; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line);
    font-weight: 700; text-decoration: none; color: var(--ink); }
  .more-sheet > a.is-active { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
  .more-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 6px; }
  .more-sheet .btn { min-height: 44px; }

  /* type, spacing and touch targets */
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.12rem; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 18px; }
  .page-head > form, .page-head > a.btn { width: 100%; }
  .page-head > form > .btn, .page-head > a.btn { width: 100%; }
  .panel { padding: 16px; border-radius: 12px; }
  .btn { min-height: 44px; }
  input, select, textarea { font-size: 16px; }  /* stops iOS zooming into fields */
  .tabs, .settings-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-left: -16px; margin-right: -16px; padding: 2px 16px; }
  .tabs::-webkit-scrollbar, .settings-nav::-webkit-scrollbar { display: none; }
  .tabs a, .settings-nav a { flex: 0 0 auto; white-space: nowrap; }
  .settings-nav { position: sticky; top: 52px; z-index: 4; gap: 6px; background: var(--bg); padding-top: 8px; padding-bottom: 8px; }
  .settings-nav a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .88rem; }
  .settings section[id] { scroll-margin-top: 112px; }

  /* make form: a tidy grid */
  .make-form { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "topic topic" "foot foot" "note note" "len len" "lang count" "voice voice" "subs subs" "first first" "make make" "gem batch"; gap: 8px; }
  .make-form #topic { grid-area: topic; }
  .make-form #footage { grid-area: foot; }
  .make-form .footage-note { grid-area: note; margin: 0; }
  .make-form #language { grid-area: lang; width: 100%; }
  .make-form #count { grid-area: count; width: 100%; }
  .make-form > .voice-pick { grid-area: voice; }
  .make-form > .voice-pick select { flex: 1; max-width: none; }
  .make-form > .make-first { grid-area: first; }
  .make-form > .btn-primary { grid-area: make; }
  .make-form > [aria-controls="gemini-panel"] { grid-area: gem; }
  .make-form > [aria-controls="batch-panel"] { grid-area: batch; }
  .make-form > .make-subs { grid-area: subs; }
  .ideas-actions { flex-wrap: wrap; max-width: none; }
  #idea-market { flex: 1 1 0; min-width: 0; width: auto; }
  .idea-search { order: 3; flex-basis: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  .idea-search input { min-width: 0; }
  .gemini-panel { padding: 16px; }

  /* video page: player sized to the screen, decisions pinned above the tab bar */
  .screen { max-width: min(330px, calc(58vh * 9 / 16)); }
  .decide { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 6; flex-wrap: wrap;
    margin: 0 -16px 16px; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 18px -16px rgba(8, 15, 30, .5); }
  .decide form { flex: 1 1 auto; }
  .decide .btn { width: 100%; }
  .decide > .btn, .decide > a.btn { flex: 1 1 auto; }
  .thumb-grid { max-width: none; }

  /* tables become cards */
  .an-table-wrap { overflow: visible; border: 0; background: none; }
  .an-table, .an-table tbody { display: block; }
  .an-table thead { display: none; }
  .an-table tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; margin-bottom: 10px; padding: 12px 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .an-table td { border: 0; padding: 0; min-width: 0 !important; }
  .an-table td:first-child { grid-column: 1 / -1; }
  .an-table td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 700; color: var(--muted); }
  .an-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .an-stats div { padding: 12px; }
  .an-stats strong { font-size: 1.3rem; }
  .int-summary { grid-template-columns: 1fr; }

  /* comments, audio, editor */
  .cm-actions .btn { flex: 1 1 auto; }
  .lab { gap: 14px; }
  .lab-presets { grid-template-columns: 1fr 1fr; }
  .lab-sliders { grid-template-columns: 1fr; }
  .lab-item-actions .btn { flex: 1 1 auto; }
  .ed-tools { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .ed-tools > * { flex: 0 0 auto; }
  .ed-stage.is-mini { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
  .lab-dock { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) {
  .make-form > .make-approve { flex-wrap: nowrap; }
  .make-form > .make-approve select { flex: 1 1 0; min-width: 0; width: auto; }
}
input[type="color"] { height: 44px; padding: 4px; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 6px; }

/* live production view on the video page */
.live-stages { margin: 14px 0 6px; }
[data-focus] { transition: outline-color .4s, box-shadow .4s; outline: 3px solid transparent; outline-offset: 4px; border-radius: var(--radius-s, 8px); }
[data-focus].is-focus { outline-color: var(--accent); }
.screen[data-focus].is-focus { outline-offset: 6px; border-radius: 28px; }
.skeleton { display: grid; gap: 8px; margin-top: 10px; }
.skeleton span { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--line) 25%, var(--surface) 50%, var(--line) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton span:nth-child(2) { width: 85%; } .skeleton span:nth-child(3) { width: 92%; } .skeleton span:nth-child(4) { width: 60%; }
.is-filling .scene-thumb-empty { background: linear-gradient(180deg, var(--line) 25%, var(--surface) 50%, var(--line) 75%);
  background-size: 100% 200%; animation: shimmer-v 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes shimmer-v { from { background-position: 0 200%; } to { background-position: 0 -200%; } }
@media (prefers-reduced-motion: reduce) { .skeleton span, .is-filling .scene-thumb-empty { animation: none; } }

/* publish to several places */
.publish-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 2px; }
.publish-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.publish-list label.is-off { opacity: .55; }
.publish-list .ok { color: var(--ok, #2f8f4e); font-weight: 700; }
.publish-list .bad { color: var(--danger, #c0392b); }

/* files removed / free up space */
.screen-removed { gap: 6px; padding: 18px; }
.removed-thumb { width: 46%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; margin: 0 auto 6px; opacity: .55; }
.posted-links { list-style: none; padding: 0; margin: 4px 0 0; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.posted-links a { color: var(--accent); font-weight: 700; }
.space-panel { display: grid; gap: 8px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-s, 8px); background: var(--surface); }
.space-panel p { margin: 0; }
.space-meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.space-meter span { display: block; height: 100%; background: var(--ink); }
.space-panel .ed-row { align-items: center; flex-wrap: wrap; }

/* notifications */
.bell { display: none; position: relative; margin-left: auto; width: 40px; height: 40px; place-items: center;
  border-radius: 50%; color: var(--ink); }
.bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.bell b { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #111; font-size: .7rem; line-height: 18px; text-align: center; }
.bell.is-active { background: var(--line); }
@media (max-width: 900px) { .rail .bell { display: grid; } }
.notify-day { font-size: 1rem; color: var(--muted); }
.notify-list { list-style: none; margin: 0; padding: 0; }
.notify-list li a { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 12px 6px;
  border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; border-radius: 6px; }
.notify-list li a:hover { background: var(--line); }
.notify-text { display: grid; gap: 2px; min-width: 0; }
.notify-text .small { overflow-wrap: anywhere; }
.notify-list li:not(.is-unread) .notify-text strong { font-weight: 400; }
.notify-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem;
  font-weight: 900; background: var(--line); color: var(--muted); }
.notify-list li.is-unread .notify-icon { background: var(--accent); color: #111; }
.notify-list li.ev-failed.is-unread .notify-icon { background: var(--danger, #c0392b); color: #fff; }

/* brainstorm */
.bs-hint { margin: -6px 0 18px; }
.bs-new { display: grid; gap: 12px; margin-bottom: 22px; }
.bs-new-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bs-new-row .btn-primary { margin-left: auto; }
.bs-sessions { list-style: none; margin: 0; padding: 0; }
.bs-sessions a { display: grid; gap: 2px; padding: 12px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; border-radius: 6px; }
.bs-sessions a:hover { background: var(--line); }
.bs { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.bs-chat { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.bs-head h1 { font-size: 1.5rem; margin: 4px 0 10px; }
.bs-msgs { list-style: none; margin: 0; padding: 0 0 12px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bs-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.bs-text { white-space: pre-wrap; }
.bs-user { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.bs-user a { color: inherit; }
.bs-assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bs-error { border-color: var(--danger, #c0392b); }
.bs-tool { align-self: stretch; padding: 4px 6px; border-left: 3px solid var(--accent); }
.bs-tool p { margin: 0 0 6px; }
.bs-cards { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.bs-card { margin: 0; flex: 0 0 96px; }
.bs-card img { width: 96px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; display: block; background: var(--bezel); }
.bs-card figcaption { font-size: .75rem; margin-top: 3px; line-height: 1.25; }
.bs-pics { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.bs-pics figure { margin: 0; position: relative; }
.bs-pics img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; display: block; }
.bs-pics figcaption { position: absolute; left: 6px; top: 6px; background: var(--accent); color: #111; font-size: .7rem; font-weight: 900; padding: 1px 6px; border-radius: 6px; }
.bs-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.bs-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.bs-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bsdot 1.2s infinite ease-in-out; }
.bs-dots i:nth-child(2) { animation-delay: .15s; } .bs-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bsdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.bs-compose { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 14px; border-top: 1px solid var(--line); }
.bs-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.bs-compose textarea { flex: 1; resize: none; min-height: 44px; max-height: 180px; }
.bs-attach-btn { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.bs-attach-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.bs-picked { margin-bottom: 6px; }
.bs-brief { position: sticky; top: 16px; display: grid; gap: 14px; }
.bs-brief-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s, 8px); padding: 12px 16px; }
.bs-brief-box summary { list-style: none; cursor: pointer; }
.bs-brief-box summary::-webkit-details-marker { display: none; }
.bs-brief-box h2 { font-size: 1.1rem; margin: 0; display: flex; gap: 8px; align-items: center; }
.bs-title { font-weight: 900; font-size: 1.05rem; margin: 10px 0 6px; }
.bs-brief-box p { margin: 6px 0; }
.bs-beats { padding-left: 20px; margin: 10px 0; display: grid; gap: 8px; }
.bs-beats li > span { display: block; }
.bs-visual { display: flex !important; align-items: center; gap: 6px; margin-top: 3px; }
.bs-chip-img { width: 22px; height: 30px; object-fit: cover; border-radius: 4px; }
.bs-make .ed-row { flex-wrap: wrap; }
.bs-made ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 900px) {
  .bs { grid-template-columns: 1fr; gap: 12px; }
  .bs-brief { position: static; order: -1; }
  .bs-brief-box:not([open]) { padding: 10px 14px; }
  .bs-chat { min-height: 0; }
  .bs-msg { max-width: 92%; }
  .bs-compose { bottom: calc(var(--tabbar-h, 62px) + env(safe-area-inset-bottom, 0px)); padding-bottom: 8px; }
  .bs-new-row .btn-primary { margin-left: 0; width: 100%; }
}
.bs-md { white-space: normal; }
.bs-md p { margin: 0 0 6px; } .bs-md p:last-child { margin-bottom: 0; }
.bs-md ul { margin: 4px 0 8px; padding-left: 20px; } .bs-md li { margin: 2px 0; }
.bs > *, .bs-chat, .bs-msgs, .bs-compose-row, .bs-brief { min-width: 0; }
.bs-compose-row textarea { min-width: 0; width: 100%; }
.bs-brief-box summary h2::after { content: ""; }
@media (max-width: 900px) {
  .bs { width: 100%; }
  .bs-brief-box summary h2::after { content: "Show"; margin-left: auto; font-size: .8rem; font-weight: 400; color: var(--muted); }
  .bs-brief-box[open] summary h2::after { content: "Hide"; }
  .bs-compose .btn-primary { padding-left: 14px; padding-right: 14px; }
}

/* library: select and delete */
.bulk-bar-top { display: flex; justify-content: flex-end; margin: -6px 0 10px; }
.pick-wrap { position: relative; }
.pick { display: none; position: absolute; top: 8px; left: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 8px;
  background: rgba(0, 0, 0, .55); place-items: center; cursor: pointer; }
.pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.is-selecting .pick { display: grid; }
.is-selecting .poster { cursor: pointer; }
.is-selecting .pick-wrap:has(input:checked) .poster-frame { outline: 3px solid var(--accent); outline-offset: 2px; }
.is-selecting .pick-wrap:has(input:disabled) { opacity: .45; }
.bulk-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-top: 16px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.bulk-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.btn-danger { background: var(--danger, #c0392b); border-color: var(--danger, #c0392b); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) {
  .bulk-bar { bottom: calc(var(--tabbar-h, 62px) + env(safe-area-inset-bottom, 0px) + 8px); }
  .bulk-actions { margin-left: 0; width: 100%; }
  .bulk-actions .btn { flex: 1; }
}
.bs-audio { display: grid; gap: 6px; margin-bottom: 6px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.bs-audio audio { width: 100%; min-width: 220px; height: 36px; }
.bs-audio details p { margin: 4px 0 0; white-space: pre-wrap; }
.bs-roles { display: flex; gap: 6px; flex-wrap: wrap; }
.bs-roles .chip { font-size: .8rem; padding: 4px 10px; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 700; }
.bs-mic.is-recording { background: var(--danger, #c0392b); border-color: var(--danger, #c0392b); }
.bs-mic.is-recording svg { stroke: #fff; }
.bs-mic:disabled { opacity: .5; }
/* drag and drop */
.is-drop { outline: 3px dashed var(--accent) !important; outline-offset: 4px; border-radius: 12px; background-color: color-mix(in srgb, var(--accent) 8%, transparent); }

/* video-only brainstorm */
.bs-mode { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.bs-chars { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.bs-chars li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; }
.bs-chars img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.bs-shots { padding-left: 22px; margin: 10px 0; display: grid; gap: 10px; }
.bs-shots p { margin: 2px 0; }
.bs-shot-head { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.bs-time { font-variant-numeric: tabular-nums; font-size: .8rem; font-weight: 700; color: var(--muted); }
.bs-lyric { font-style: italic; }
.chip-sm { font-size: .72rem; padding: 1px 8px; }
.bs-prompt { white-space: pre-wrap; font-size: .78rem; background: var(--bg); padding: 8px; border-radius: 6px; margin: 4px 0; }
.clip-chars { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.clip-chars img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 2px solid var(--accent); }
.bs-char-initial { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-weight: 900;
  background: var(--line); color: var(--muted); }
.bs-char-text { min-width: 0; overflow-wrap: anywhere; }
.bs-chars li > * { min-width: 0; }
.an-life strong { font-size: 1.6rem; }
.an-since { margin: -6px 0 18px; }
.an-period { margin-bottom: 18px; }
.an-period .tabs button { font: inherit; cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: none; font-size: .9rem; font-weight: 700; color: var(--muted); flex: 0 0 auto; white-space: nowrap; }
.an-period .tabs button.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: .9rem; font-weight: 700; color: var(--muted); }
.tabs button.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* channel coach */
.bs-modes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.bs-modes .bs-mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
.bs-modes .bs-mode:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.bs-modes input { margin-top: 3px; accent-color: var(--accent); }
.bs-list, .bs-steps { margin: 4px 0 10px; padding-left: 18px; }
.bs-steps li { margin: 3px 0; }
.bs-ideas { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 10px; }
.bs-ideas li { display: grid; gap: 3px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.bs-ideas .ed-row { gap: 10px; align-items: center; }
.bs-ideas form { margin: 0; }
.btn-sm { min-height: 32px !important; padding: 4px 12px; font-size: .85rem; }

/* long videos (16:9) */
.review-wide { grid-template-columns: minmax(0, 1fr); }
.review-wide .screen { position: relative; aspect-ratio: 16 / 9; max-height: none; width: 100%; max-width: 980px; border-radius: 16px; padding: 8px; }
.review-wide .screen video { border-radius: 10px; }
.review-wide .scene-thumb img, .review-wide .scene-thumb video, .review-wide .scene-thumb-empty { width: 96px; aspect-ratio: 16 / 9; }
.review-wide .scenes li { grid-template-columns: 96px 1fr; }
.review-wide .visual-scenes li { grid-template-columns: 160px 1fr; }
.review-wide .visual-thumb { aspect-ratio: 16 / 9; }
.chapter-head { list-style: none; margin: 10px 0 0; display: block !important; }
.chapter-head h3 { margin: 0; font-size: 1rem; padding-top: 10px; border-top: 2px solid var(--accent); }
.poster-long { position: absolute; left: 8px; bottom: 8px; background: var(--accent); color: #111; font-size: .72rem; font-weight: 900; padding: 1px 7px; border-radius: 6px; }
@media (max-width: 900px) {
  .review-wide .screen { border-radius: 12px; }
  .make-form #length { grid-area: len; width: 100%; }
}
.chapter-head { counter-increment: none !important; }
.review-wide .thumb-grid { max-width: 760px; }
.review-wide .thumb-opt img { aspect-ratio: 16 / 9; }

/* Narration step: scene visuals behind the player, and the music picker */
.screen-preview { position: relative; overflow: hidden; }
.screen-preview .preview-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen-preview .preview-bg[hidden] { display: none; }
.screen-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,20,.25), rgba(10,14,20,.7)); }
.screen-preview .preview-fg { position: relative; z-index: 1; padding: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.8); color: #e8edf3; }
.music-now p { margin: 4px 0; }
.music-search input[type=search] { flex: 1 1 220px; min-width: 0; }
.music-results { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.music-results li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 10px; }
.music-results .music-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.music-results form { margin: 0; }
.mix-form { display: grid; gap: 10px; max-width: 420px; }
.mix-form label { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.mix-form input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: #ffd400; }
.mix-form button { justify-self: start; }

.ed-stage.is-wide { height: auto; width: min(100%, 880px); }

/* analytics: what's working */
.an-insights { margin-bottom: 18px; }
.an-ins-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.an-ins-head h2 { margin: 0; }
.an-ins-summary { font-size: 1.05rem; margin: 6px 0 12px; }
.an-ins-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.an-insights h3 { font-size: .95rem; margin: 12px 0 4px; }
.an-insights ul { margin: 4px 0; padding-left: 18px; }
.an-insights li { margin: 3px 0; }
.an-next { padding-left: 0 !important; }

.pub-thumb { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.pub-thumb h3 { font-size: 1rem; margin: 0 0 8px; }
.pub-thumb .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); max-width: 520px; }
.review-wide .pub-thumb .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); max-width: 760px; }
.pub-thumb .ed-row { align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.pub-thumb form { margin: 0; }
.continue-box { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.thumb-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 0; }
.thumb-upload input[name=text] { flex: 1 1 220px; min-width: 0; }
.pub-thumb .thumb-opt img { object-fit: contain; background: var(--bezel); }

.hd-toggle { position: absolute; top: 18px; right: 18px; z-index: 2; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.55);
  color: #fff; font: inherit; font-size: .75rem; font-weight: 900; padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.hd-toggle.is-on { background: var(--accent); color: #111; border-color: var(--accent); }
.an-ins-jump { display: block; margin: 0 0 14px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--surface); }
.an-insights { margin-top: 22px; }

/* per-video stats */
.an-stats-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin: 0 0 10px; }
@media (min-width: 901px) { .perf-table td, .perf-table th { white-space: nowrap; } }
.poster-views { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .72rem;
  font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.ap-log { margin: 6px 0 0; padding-left: 16px; max-height: 260px; overflow: auto; }
.ap-banner { margin: 0 0 12px; }

/* share to other apps */
.share-actions { flex-wrap: wrap; gap: 8px; }
.share-caption { white-space: pre-wrap; font-family: inherit; font-size: .88rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; max-height: 160px; overflow: auto; margin: 8px 0; }
.share-links { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.share-links li { overflow-wrap: anywhere; }
.tt-switch { margin: 10px 0; }
.tt-switch ol { padding-left: 18px; margin: 6px 0; }
.tt-switch li { margin: 4px 0; }
.ap-queued { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ap-queue { padding-left: 20px; display: grid; gap: 4px; }
.ap-queue form { display: inline; }
.poster-queued { position: absolute; left: 8px; top: 8px; background: var(--accent); color: #111; font-size: .72rem; font-weight: 900; padding: 1px 7px; border-radius: 6px; }
.cm-trans { margin: 4px 0 0; padding: 6px 10px; background: var(--bg); border-radius: 6px; }
/* Monetization page */
.mon-intro { margin: 0 0 12px; }
.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.mon-card { display: grid; gap: 8px; align-content: start; margin: 0; }
.mon-card.is-off { opacity: .6; }
.mon-card.is-met { border-color: var(--accent); }
.mon-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mon-head h2 { margin: 0; font-size: 1.05rem; }
.mon-card p { margin: 0; }
.mon-total { display: flex; gap: 10px; align-items: center; }
.mon-total .mon-bar { flex: 1; }
.mon-bar { height: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.mon-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; min-width: 2px; }
.mon-bar-s { height: 6px; }
.mon-reqs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mon-goal { display: grid; gap: 3px; }
.mon-goal-top { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.mon-goal.is-met .mon-goal-top span:first-child { font-weight: 700; }
.mon-or { display: block; margin: 2px 0; }
.mon-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; }
.mon-foot form { margin: 0; }
.mon-foot select { margin-left: 6px; }
.mon-country { display: grid; gap: 4px; margin: 8px 0 12px; max-width: 420px; }
.mon-country .ed-row { gap: 8px; }
.mon-actions { padding-left: 20px; }
.mon-actions li { margin: 6px 0; }
.mon-cowork pre { max-height: 360px; overflow: auto; }
.mon-coach { margin-top: 12px; }
/* Library filters */
.lib-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -10px 0 14px; }
.lib-filters label { margin: 0; }
.lib-filters select, .lib-filters input { font: inherit; font-size: .9rem; }
.lib-search { flex: 1 1 220px; }
.lib-search input { width: 100%; }
.lib-count { margin: -6px 0 12px; }
@media (max-width: 900px) {
  .lib-filters label:not(.lib-search) { flex: 1 1 calc(50% - 8px); }
  .lib-filters select { width: 100%; }
}
/* Content calendar */
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-nav h2 { margin: 0; min-width: 9em; text-align: center; }
.cal { display: grid; gap: 4px; margin-bottom: 6px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head span { font-size: .8rem; color: var(--muted); text-align: center; font-weight: 700; }
.cal-cell { display: flex; flex-direction: column; gap: 2px; min-height: 92px; padding: 6px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: inherit; text-decoration: none; overflow: hidden; font-size: .78rem; }
.cal-cell:hover { border-color: var(--ink); }
.cal-cell.is-out { opacity: .45; }
.cal-cell.is-today .cal-day { background: var(--accent); color: #111; border-radius: 99px; padding: 0 6px; }
.cal-cell.is-picked { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-cell.is-planned { border-left: 4px solid var(--accent); }
.cal-cell.is-pause { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 6px, var(--bg) 6px, var(--bg) 12px); }
.cal-day { font-weight: 700; align-self: flex-start; font-size: .9rem; }
.cal-note { font-weight: 700; }
.cal-subj { color: var(--muted); }
.cal-tag, .cal-made { font-size: .72rem; border-radius: 99px; padding: 0 6px; align-self: flex-start; border: 1px solid var(--line); }
.cal-made { background: var(--bg); }
.cal-editor { margin-top: 14px; }
.cal-editor h2 { margin-top: 0; }
.cal-ideas { margin: 0; padding-left: 18px; }
.cal-ideas .is-made { color: var(--muted); }
.cal-actions { gap: 12px; align-items: center; flex-wrap: wrap; }
.cal-done { padding-left: 18px; }
.cal-tz { margin-top: 12px; }
@media (max-width: 900px) {
  .cal-cell { min-height: 54px; padding: 4px; font-size: .68rem; }
  .cal-subj, .cal-note { display: none; }
  .cal-tag, .cal-made { padding: 0 3px; font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .cal-made { display: none; }
}
/* Record it myself */
.own-voice .prompter { font-size: 1.15rem; line-height: 1.5; padding-left: 1.4em; margin: 10px 0 14px; }
.own-voice .prompter li { margin: 6px 0; }
.own-voice .is-recording { background: #c62828; border-color: #c62828; color: #fff; }
.own-voice audio { width: 100%; margin: 8px 0; }
.own-upload { margin-top: 12px; }
.voice-look .vl-grid label { display: grid; gap: 2px; font-size: .9rem; }
.voice-look audio { width: 100%; margin-top: 8px; }
.legal-nav { margin: -6px 0 18px; } .legal-nav a { margin: 0 2px; }
/* Autopilot countdown (Review, Library) */
.ap-timer { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: stretch; margin: 0 0 14px; }
.ap-slot { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--surface); min-width: 220px; flex: 1 1 260px; }
.ap-slot.is-off { border-left-color: var(--line); opacity: .75; }
.ap-slot.is-soon { border-color: var(--accent); }
.ap-kind { font-size: .8rem; color: var(--muted); font-weight: 700; }
.ap-count { font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ap-what { color: var(--ink); }
.ap-timer > a { align-self: center; }
.routes-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.routes-table th, .routes-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.routes-table th:first-child, .routes-table td:first-child { text-align: left; }
.visual-thumb { position: relative; }
.visual-thumb .drop-hint { position: absolute; inset: auto 6px 6px 6px; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: .72rem; text-align: center; opacity: 0; transition: opacity .15s; pointer-events: none; }
.visual-scenes li:hover .drop-hint, .visual-scenes li.is-drop .drop-hint { opacity: 1; }
.visual-scenes li.is-drop .drop-hint { background: var(--accent); color: #111; font-weight: 700; }
@media (hover: none) { .visual-thumb .drop-hint { display: none; } }

/* video page: change pictures or narration of a finished video */
.cv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 12px 0; }
.cv-scene { display: grid; gap: 6px; align-content: start; }
.cv-scene img, .cv-scene video, .cv-empty { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: var(--bezel); }
.review-wide .cv-scene img, .review-wide .cv-scene video, .review-wide .cv-empty { aspect-ratio: 16 / 9; }
.cv-empty { display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.cv-line { margin: 0; color: var(--muted); }
.cv-voice { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Make a scene's picture with AI (Gemini prompt / Pollinations) */
.scene-ai textarea.bs-prompt { width: 100%; box-sizing: border-box; resize: vertical; font-family: inherit; line-height: 1.4; border: 1px solid var(--line); color: inherit; }
.scene-ai-actions { flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.picture-style { flex-wrap: wrap; gap: 8px; align-items: end; margin: 6px 0 12px; }
.picture-style select { min-width: 180px; }

/* autopilot queue page */
.queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.queue-row { display: grid; grid-template-columns: 2.2rem 56px 1fr auto; gap: 12px; align-items: center; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.queue-n { font-weight: 900; font-size: 1.3rem; text-align: center; }
.queue-thumb img { display: block; width: 56px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; background: var(--bezel); }
.queue-thumb.is-wide img { aspect-ratio: 16 / 9; }
.queue-info { display: grid; gap: 2px; min-width: 0; }
.queue-info strong { overflow-wrap: anywhere; }
.queue-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .queue-row { grid-template-columns: 2rem 48px 1fr; } .queue-actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* make form: AI models for this video */
.make-ai { flex-basis: 100%; width: 100%; }
.make-ai summary { cursor: pointer; font-weight: 700; }
.make-ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.make-ai-grid label { display: grid; gap: 4px; }
.make-ai-grid select { width: 100%; }

/* scene pictures: Wikimedia Commons picker */
.scene-wiki summary { cursor: pointer; }
.wiki-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.wiki-pic { display: grid; gap: 2px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; text-align: center; }
.wiki-pic:hover, .wiki-pic:focus-visible { border-color: var(--accent); }
.wiki-pic img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--bezel); }
.wiki-pic span { font-size: .7rem; color: var(--muted); }

/* credits studios: balance pill and Credits section */
.credits-pill { display: inline-block; margin: 6px 0; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #111; font-weight: 700; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.credits-pill.is-low { background: #ff6b6b; color: #fff; }
.credits-big { font-size: 1.6rem; margin: 0 0 6px; }

.land-costs { width: 100%; max-width: 640px; border-collapse: collapse; margin: 8px 0 12px; }
.land-costs th, .land-costs td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }

/* How to page */
.help-toc { margin: 0 0 12px; }
.help-steps { display: grid; gap: 8px; padding-left: 20px; }
.help-list { display: grid; gap: 8px; padding-left: 18px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.help-card { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 12px 14px; background: var(--surface); }
.help-card h3 { margin: 0 0 6px; font-size: 1rem; }
.help-card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* searchable dropdowns (select[data-search]) */
.ss { position: relative; width: 100%; }
.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.ss-input { width: 100%; }
.ss-list { position: absolute; z-index: 40; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px 0; list-style: none; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.ss-opt { padding: 6px 12px; cursor: pointer; font-size: .9rem; }
.ss-opt:hover, .ss-opt.is-active { background: var(--accent); color: #111; }
.ss-opt.is-selected { font-weight: 700; }
.ss-group { padding: 6px 12px 2px; font-size: .75rem; color: var(--muted); font-weight: 700; }
.idea-market-wrap { min-width: 220px; flex: 0 1 260px; }

/* usage page */
.usage-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.usage-total { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.usage-total strong { font-size: 1.3rem; }
.usage-log td { font-size: .88rem; }
.credits-box { display: inline-flex; align-items: center; gap: 4px; }
.credits-refresh { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 4px; color: var(--muted); border-radius: 6px; }
.credits-refresh:hover { color: var(--ink); }
.credits-refresh.is-spinning { animation: credits-spin .8s linear infinite; }
@keyframes credits-spin { to { transform: rotate(360deg); } }
