/* Orangelight — night and one light. Warm ink-black, paper-white type, cream buttons; firefly yellow-green is light, not paint:
   it marks what is live, selected or lit, and nothing else. */
:root {
  --bg: #0b0a09;
  --bg-2: #080706;
  --surface: #151311;
  --surface-2: #1d1a17;
  --surface-3: #27231f;
  --line: rgba(255, 244, 225, .07);
  --line-strong: rgba(255, 244, 225, .15);
  --text: #f4efe6;
  --muted: #a8a093;
  --faint: #716a5f;
  --accent: #ff9f43;
  --accent-2: #f2862a;
  --accent-soft: rgba(255, 159, 67, .1);
  --accent-rgb: 255 159 67;   /* the accent as "r g b" for translucent uses; set per visitor by olApplyTheme */
  --fill-rgb: 255 255 255;    /* light tints on dark surfaces; dark tints in the light theme */
  --accent-ink: #12110e;
  --cream: #f4efe6;
  --ok: #7ddc9d;
  --bad: #ff7b7b;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px -24px rgba(0, 0, 0, .85);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { font: 15px/1.55 var(--font); background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.04em; line-height: 1.02; margin: 0; }
h3, h4 { font-family: var(--font); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.view { flex: 1; outline: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- logo: Bricolage 800 "orangelıght"; the light is the dot of the i, with the faint trail of where it drifts ----------
   The dot sits in the dotless ı (.i), centred on its stem; sizes in em, measured from the glyphs. */
.logo { --dot: .19em; position: relative; display: inline-block; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -.045em; line-height: 1; color: var(--text); padding-top: .26em; font-optical-sizing: auto; }
.logo .i, .logo .dot { font-style: normal; }
.logo .i { position: relative; }
/* the o is an orange: the letter in orange with a leaf on top */
.logo .o { position: relative; font-style: normal; color: var(--accent); }
.logo .o .leaf { position: absolute; width: .3em; height: .18em; left: .27em; top: .37em; transform: rotate(-14deg); transform-origin: 0 100%; }
.logo .dot { position: absolute; left: calc(50% - var(--dot) / 2); top: .17em; width: var(--dot); height: var(--dot); border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff1df 0 22%, var(--accent) 60%);
  box-shadow: 0 0 .2em .04em rgb(var(--accent-rgb) / .8), 0 0 .7em .2em rgb(var(--accent-rgb) / .22);
  animation: logo-glow 3.4s ease-in-out infinite; }
/* the trail: two specks rising up and to the right, the way the firefly leaves */
.logo .dot::before, .logo .dot::after { content: ''; position: absolute; border-radius: 50%; background: var(--accent); box-shadow: 0 0 .12em rgb(var(--accent-rgb) / .7); }
.logo .dot::before { width: .075em; height: .075em; left: .25em; top: -.11em; opacity: .5; }
.logo .dot::after { width: .05em; height: .05em; left: .4em; top: -.25em; opacity: .25; }
.logo.small { font-size: 23px; }
@keyframes logo-glow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
/* the moment the hero firefly is born: the dot flares, gives up its light, then slowly glows back */
.logo .dot.gives-birth { animation: dot-birth 2.6s ease-out 1 both; }
.logo .dot.gives-birth::before, .logo .dot.gives-birth::after { animation: trail-hide 2.6s ease-out 1 both; }
@keyframes dot-birth { 0% { scale: 1; filter: none; } 10% { scale: 1.7; filter: brightness(1.4); } 24% { scale: .55; opacity: .2; } 60% { scale: .7; opacity: .35; } 100% { scale: 1; opacity: .9; } }
@keyframes trail-hide { 0%, 8% { opacity: 0; } 70% { opacity: 0; } }

/* ---------- top bar ---------- */
.banner { background: var(--surface); color: var(--muted); font-size: 13px; text-align: center; padding: 7px 16px; border-bottom: 1px solid var(--line); }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(11, 10, 9, .82); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.nav { display: flex; gap: 2px; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 13px; border-radius: 10px; font-weight: 500; font-size: 14.5px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: rgb(var(--fill-rgb) / .06); }
.nav a.active { color: var(--text); background: rgb(var(--fill-rgb) / .09); }
.account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 7px 12px 7px 10px; border-radius: 999px; background: rgb(var(--fill-rgb) / .06); border: 1px solid var(--line); font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color .15s; }
.balance-chip:hover { border-color: var(--line-strong); }
.coin { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px 1px rgb(var(--accent-rgb) / .5); flex: none; }
.menu { position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-2); font-weight: 600; }
.menu-list { position: absolute; right: 0; top: 46px; min-width: 210px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
.menu-list .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-decoration: none; }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: rgb(var(--fill-rgb) / .08); color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .08s ease, background .15s ease, border-color .15s ease, opacity .15s; }
.btn:hover { background: rgb(var(--fill-rgb) / .14); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--cream); color: var(--accent-ink); }
.btn-primary:hover { background: #ffffff; }
:root[data-theme="light"] .btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgb(var(--fill-rgb) / .06); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

label.field, .field { display: block; margin-bottom: 18px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.field-label .hint { font-family: var(--font); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; color: var(--faint); }
.input, textarea.input { width: 100%; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 140px; line-height: 1.55; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 0 auto; min-width: 56px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-weight: 600; font-size: 13.5px; transition: color .15s, border-color .15s, background .15s; }
.seg button:hover { color: var(--text); border-color: var(--line-strong); }
.seg button[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
input[type=range] { width: 100%; accent-color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; background: rgb(var(--fill-rgb) / .1); color: var(--text); border: 1px solid transparent; white-space: nowrap; }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-offer { background: var(--accent); color: var(--accent-ink); letter-spacing: .04em; }
.pill-dir { background: var(--accent-soft); color: var(--accent); }
s.was { color: var(--faint); font-weight: 500; font-size: .72em; margin-left: 4px; text-decoration-thickness: 1.5px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.kicker::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px 2px rgb(var(--accent-rgb) / .5); }

.offer-flag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 5px 14px 5px 5px; border-radius: 999px; font-size: 13px; color: var(--text); text-decoration: none; background: rgb(var(--fill-rgb) / .08); border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.offer-flag:hover { background: rgb(var(--fill-rgb) / .14); border-color: var(--line-strong); }
.offer-flag b { padding: 3px 10px; border-radius: 999px; font-size: 12px; background: var(--accent); color: var(--accent-ink); }

/* ---------- sections ---------- */
.section { padding: 88px 0; border-bottom: 1px solid var(--line); }
.section.tight { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(32px, 3.8vw, 52px); }
.section-head p { margin: 12px 0 0; color: var(--muted); max-width: 560px; font-size: 16px; }

/* showcase: vertical clips in one grid, widescreen in another */

/* proof: same character, every shot */

/* director demo */
.caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -.15em; margin-left: 3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
form.director-demo { margin: 0; }

/* effect demos: the same still, different camera moves */

/* presets strip */

/* models */
a.model-card { text-decoration: none; color: inherit; cursor: pointer; outline: none; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }


.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 400; background: var(--bg-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data .sub { display: block; color: var(--faint); font-size: 12px; }
.dash { color: var(--faint); }

.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pack { padding: 22px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.pack.popular { border-color: rgb(var(--accent-rgb) / .4); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%); }
.pack .pill { position: absolute; top: 16px; right: 16px; }
.pack h3 { font-size: 14px; color: var(--muted); font-weight: 600; }
.pack .price { font-family: var(--display); font-size: 36px; font-weight: 700; letter-spacing: -.03em; }
.pack .gets { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.pack .gets b { color: var(--text); }
.pack .btn { margin-top: auto; }
/* Unlimited plan */
.plan-row { margin: 14px 0 28px; }
.plan-card { border-color: rgb(var(--accent-rgb) / .4); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); max-width: 640px; }
.plan-card .price .small { font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.plan-list { margin: 6px 0 12px; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
.plan-list b { color: var(--text); }
.plan-hint { margin: 8px 0 0; text-align: center; }
.plan-routes { margin: 12px 0 10px; }
.route-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.route { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,.12)); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.route b { font-size: 13px; }
.route span { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.route i { width: 7px; height: 7px; border-radius: 50%; background: #5bd17a; flex: none; }
.route.slow i { background: #f0c04a; }
.route.down i, .route.na i { background: #e5675e; }
.route.on { border-color: var(--accent); background: var(--accent-soft); }
.route:disabled { opacity: .5; cursor: not-allowed; }
#go-plan + .plan-hint + #go, #go-plan:not([hidden]) ~ #go { margin-top: 8px; }

/* ---------- auth ---------- */
.auth { display: grid; place-items: center; padding: 40px 16px 72px; position: relative; }
.auth-card { width: 100%; max-width: 430px; padding: 34px; position: relative; }
.auth-card h1 { font-size: 30px; margin-bottom: 22px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.form-error { color: var(--bad); font-size: 14px; min-height: 20px; margin: -4px 0 12px; }
.agree { font-size: 12.5px; color: var(--faint); text-align: center; margin: 14px 0 0; }
.agree a { color: var(--muted); }

/* ---------- studio ---------- */
.page { padding: 36px 0 80px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 36px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.studio { display: grid; grid-template-columns: 460px minmax(0, 1fr); gap: 24px; align-items: start; }
.studio > * { min-width: 0; }
.composer { padding: 22px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; scrollbar-width: thin; }

.model-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; margin: 0 -4px; padding-left: 4px; padding-right: 4px; }
.model-strip::-webkit-scrollbar { display: none; }
.model-opt { position: relative; flex: none; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); min-width: 128px; transition: border-color .15s, background .15s; }
.model-opt:hover { border-color: var(--line-strong); }
.model-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.model-opt b { display: block; font-size: 13.5px; }
.model-opt span { font-size: 11.5px; color: var(--faint); }
.opt-offer { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--accent); }
.model-blurb { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

.prompt-wrap { position: relative; }
.prompt-wrap textarea.input { min-height: 150px; }
.prompt-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.btn-director { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; background: var(--accent-soft); border: 1px solid rgb(var(--accent-rgb) / .35); color: var(--accent); font-weight: 600; }
.btn-director:hover { background: rgb(var(--accent-rgb) / .2); border-color: var(--accent); }
.btn-director.busy { opacity: .7; pointer-events: none; }
.prompt-tools .restore { margin-left: auto; font-size: 12.5px; color: var(--muted); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.prompt-count { font-size: 12px; color: var(--faint); }

.preset-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: border-color .15s, color .15s, background .15s; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.preset-blurb { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; }
.preset-blurb:empty { display: none; }

/* camera & effects */
.fx-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-group { flex-basis: 100%; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 4px 0 0; }
.fx-grid .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.fx-preview { position: fixed; z-index: 70; width: 180px; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line-strong); box-shadow: var(--shadow); pointer-events: none; }
.fx-preview video { display: block; width: 100%; }
.explore-by { color: var(--faint); }

/* references */
.refs { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.refs-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; cursor: pointer; user-select: none; }
.refs-head b { font-size: 13px; }
.refs-head .count { font-size: 12px; color: var(--muted); }
.refs-head .chev { transition: transform .2s; color: var(--muted); }
.refs.open .refs-head .chev { transform: rotate(180deg); }
.refs-body { display: none; padding: 0 12px 12px; }
.refs.open .refs-body { display: block; }
.refs-note { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.refs-note:empty { display: none; }
.slot { margin-bottom: 12px; }
.slot-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; gap: 10px; }
.slot-label .lim { font-weight: 500; color: var(--faint); }
.slot-label .req { color: var(--accent); font-weight: 600; }
.slot.off { opacity: .45; pointer-events: none; }
.drop { display: flex; flex-wrap: wrap; gap: 8px; }
.drop .add { width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); display: grid; place-items: center; font-size: 22px; line-height: 1; transition: border-color .15s, color .15s, background .15s; }
.drop .add:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.drop .add small { display: block; font-size: 10.5px; margin-top: 2px; }
.drop .add.lib { font-size: 16px; }
.drop.dragover .add { border-color: var(--accent); background: var(--accent-soft); }
.ref { position: relative; width: 72px; }
.ref .thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 20px; }
.ref .thumb img, .ref .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref .x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-3); color: var(--text); font-size: 12px; line-height: 1; display: grid; place-items: center; padding: 0; }
.ref .st { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; text-align: center; background: rgba(0, 0, 0, .65); padding: 2px 0; border-radius: 0 0 10px 10px; }
.ref .st.err { color: #ffaaaa; }
.ref .note { margin-top: 5px; width: 72px; font-size: 11px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.ref .note::placeholder { color: var(--faint); }
.ref .ord { position: absolute; top: -6px; left: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; z-index: 1; }
.ref-uploading .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgb(var(--fill-rgb) / .12) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }

.duration-row { display: flex; align-items: center; gap: 14px; }
.duration-row output { min-width: 44px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cost-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin: 6px 0 14px; }
.cost-bar .label { font-family: var(--mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.cost-bar .amount { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.cost-bar .inr { font-size: 13px; color: var(--muted); text-align: right; }
.cost-bar.short { border-color: rgba(255, 123, 123, .5); }
.cost-bar.short .inr { color: var(--bad); }
.offer-note { color: var(--accent); text-transform: none; letter-spacing: 0; font-family: var(--font); }
#frames-btn { margin-top: 8px; }
.go-cost { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding-left: 10px; border-left: 1px solid rgba(26, 26, 26, .25); font-variant-numeric: tabular-nums; }
.go-cost .coin { width: 8px; height: 8px; background: var(--accent-ink); box-shadow: none; opacity: .7; }
.go-cost s { opacity: .55; font-weight: 500; }
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); vertical-align: middle; margin-left: 8px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: live-pulse 1.8s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
textarea.input:read-only { color: var(--muted); }
.kbd { font-size: 11px; color: var(--faint); text-align: center; margin-top: 8px; }
.kbd kbd { font-family: var(--mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; }

/* results feed: masonry columns so every card keeps its own aspect ratio */
.feed { columns: 250px; column-gap: 12px; }
.feed .gen { display: inline-block; width: 100%; margin: 0 0 12px; break-inside: avoid; }
/* JS masonry (layoutFeed in app.js): 4 px rows, each card spans its own height plus the 12 px gap, in reading order */
.feed.masonry { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: 4px; column-gap: 12px; align-items: start; }
.feed.masonry > .gen { display: block; margin: 0; }
.gen { overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: border-color .15s, transform .15s; }
.gen:hover, .gen:focus-visible { border-color: var(--line-strong); transform: translateY(-2px); outline: none; }
.gen-media { position: relative; background: #000; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.gen-media video, .gen-media img { width: 100%; height: 100%; min-width: 0; max-width: 100%; object-fit: cover; display: block; background: #000; }
.gen-media .play { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; display: grid; place-items: center; pointer-events: none; transition: opacity .2s; }
.gen:hover .gen-media .play { opacity: 0; }
.gen-media.failed.compact { aspect-ratio: auto; min-height: 0; padding: 14px 0; }
.gen-failed { cursor: default; opacity: .85; }
.gen-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; font-size: 13px; color: rgb(var(--fill-rgb) / .8); }
.gen-media .placeholder span { position: relative; background: rgba(0, 0, 0, .55); padding: 6px 10px; border-radius: 8px; }
.gen-media.processing { background: linear-gradient(110deg, var(--surface) 30%, var(--surface-3) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.gen-media .status { position: relative; text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px; }
.progress { width: 160px; height: 4px; border-radius: 4px; background: rgb(var(--fill-rgb) / .1); margin: 10px auto 0; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .95s linear; }
.gen-media .status .pct { display: block; }
.gen-media .status .eta { display: block; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 4px; }
.gen-media.failed { background: #1f1416; }
.gen-media.failed .status { color: #ffaaaa; }
.gen-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.gen-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gen-prompt { font-size: 14px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gen-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--faint); }
.gen-foot .acts { display: flex; gap: 10px; align-items: center; }
.gen-foot a, .gen-foot button { color: var(--accent); text-decoration: none; font-weight: 600; background: none; border: 0; padding: 0; font-size: 12.5px; }
.gen-foot .act.x { color: var(--faint); font-weight: 500; }
.gen-foot .act.x:hover { color: var(--bad); }
.failed-note { color: var(--faint); font-size: 13px; margin: 14px 0 0; }
.failed-note button { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 0; font-size: 13px; }

.empty { padding: 44px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 18px; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

/* ---------- wallet ---------- */
.wallet-top { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 12px; margin-bottom: 40px; }
/* beside the balance card the packs get ~600px at laptop widths: two by two, four across only when there is room */
.wallet-top .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1200px) { .wallet-top .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.balance-card { padding: 26px; background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.balance-card .big { font-family: var(--display); font-size: 52px; font-weight: 700; letter-spacing: -.03em; display: flex; align-items: center; gap: 14px; font-variant-numeric: tabular-nums; margin: 6px 0; }
.balance-card .big .coin { width: 16px; height: 16px; }
.kind { font-weight: 600; text-transform: capitalize; }
.plus { color: var(--ok); }
.minus { color: var(--text); }
h2.sub-h { font-size: 26px; margin: 0 0 14px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); z-index: 50; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(255, 123, 123, .6); }

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-note { color: var(--faint); font-size: 13px; } /* the wordmark lives in the top bar only: one logo per page */
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text); }

/* ---------- policy pages ---------- */
.legal { max-width: 760px; padding-top: 48px; padding-bottom: 72px; }
.legal h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 6px; }
.legal h2 { font-size: 22px; margin: 34px 0 10px; }
.legal p, .legal li { color: #c9ced8; line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent); }
mark.todo { background: var(--accent-soft); color: var(--accent); border: 1px dashed rgb(var(--accent-rgb) / .5); border-radius: 5px; padding: 0 5px; font-size: .9em; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 8px; }
.contact-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.contact-grid b { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 400; }
.contact-grid span { font-size: 13px; color: var(--muted); }

/* ---------- studio app layout: composer rail + canvas ---------- */
.app { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; padding: 16px 16px 48px; max-width: 1640px; margin: 0 auto; }
.rail { position: sticky; top: 78px; align-self: start; max-height: calc(100vh - 94px); overflow: auto; scrollbar-width: thin; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.rail .field { margin-bottom: 14px; }
.rail-modes { width: 100%; margin-bottom: 12px; }
.rail-modes button { flex: 1; }
.preset-card { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; padding: 0; text-align: left; margin-bottom: 14px; cursor: pointer; transition: border-color .15s; }
.preset-card:hover { border-color: var(--line-strong); }
.preset-card img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .8; }
.preset-card .pc-text { position: absolute; left: 14px; bottom: 12px; right: 14px; display: flex; flex-direction: column; gap: 2px; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.preset-card .pc-text b { font-family: var(--display); font-size: 20px; letter-spacing: -.02em; color: var(--accent); text-transform: uppercase; line-height: 1.1; }
.preset-card .pc-text span { font-size: 12px; color: #e5e7eb; }
.preset-card .pc-change { position: absolute; top: 10px; right: 10px; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.prompt-box textarea.input { min-height: 130px; border-radius: 14px; }
.prompt-box .prompt-tools { flex-wrap: wrap; }
.chip.tiny { height: 30px; font-size: 12.5px; padding: 0 10px; }
#preset-row, #preset-blurb, #fx-field { display: none !important; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.opt { position: relative; }
.opt summary { list-style: none; cursor: pointer; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.opt summary::-webkit-details-marker { display: none; }
.opt summary::after { content: '▾'; color: var(--faint); font-size: 11px; }
.opt[open] summary { border-color: var(--accent); }
.opt-pop { position: absolute; z-index: 6; left: 0; top: 42px; min-width: 250px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.opt-pop.wide { min-width: 290px; }
.opt-pop .field-label { margin-bottom: 8px; }
.canvas { min-width: 0; }
.canvas-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ctab { height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; white-space: nowrap; }
.ctab[aria-selected="true"] { background: rgb(var(--fill-rgb) / .09); color: var(--text); }
.ctab .live { margin-left: 8px; }
.canvas-link { margin-left: auto; }
.gal-head { display: flex; align-items: baseline; gap: 12px; margin: 24px 0 10px; }
.gal-head:first-child { margin-top: 2px; }
.gal-head h3 { font-size: 18px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface-2), var(--bg-2)); aspect-ratio: 4 / 5; padding: 0; text-align: left; cursor: pointer; color: var(--text); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .tile-emoji { position: absolute; left: 12px; top: 12px; font-size: 28px; }
.tile .tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .86)); display: flex; flex-direction: column; gap: 2px; }
.tile .tile-cap b { font-size: 14px; }
.tile .tile-cap span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tile .on-mark { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: none; place-items: center; font-size: 13px; font-weight: 700; }
.tile.on .on-mark { display: grid; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.how-step { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.how-step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.how-step figcaption { padding: 14px 16px 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.how-step figcaption b { display: block; color: var(--text); margin-bottom: 4px; }
@media (max-width: 1040px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .app { padding: 10px 10px 40px; gap: 12px; }
  .rail { padding: 12px; border-radius: 14px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .how-steps { grid-template-columns: 1fr; }
  .canvas-tabs { overflow-x: auto; scrollbar-width: none; }
  .canvas-link { display: none; }
}

/* ---------- studio modes, library filters, picker ---------- */
.mode-toggle { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); gap: 4px; }
.mode-toggle button { height: 36px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.mode-toggle button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.mode-toggle button:disabled { opacity: .4; cursor: not-allowed; }
.lib-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.picker { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow); z-index: 60; }
.picker-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.picker-head .x { background: none; border: 0; color: var(--muted); font-size: 18px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 12px; }
.picker-grid button { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 1; }
.picker-grid button:hover { border-color: var(--accent); }
.picker-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick { display: flex; flex-direction: column; gap: 4px; }
.pick > button:first-child { width: 100%; }
.pick-name { height: 26px; border-radius: 8px; border: 1px dashed var(--line-strong); background: transparent; color: var(--faint); font-size: 12px; font-weight: 600; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-name.named { border-style: solid; border-color: rgb(var(--accent-rgb) / .4); color: var(--accent); background: var(--accent-soft); }
.prompt-box { position: relative; }
.mention-pop { position: absolute; left: 0; right: 0; top: calc(100% - 44px); z-index: 7; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.mention { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-weight: 600; font-size: 13.5px; text-align: left; }
.mention img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.mention.on, .mention:hover { background: rgb(var(--fill-rgb) / .08); color: var(--accent); }
.mention-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* ---------- lightbox ---------- */
body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(8, 9, 10, .9); backdrop-filter: blur(6px); }
.lb-close, .lb-nav { position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(28, 30, 32, .92); color: var(--text); font-size: 20px; display: grid; place-items: center; }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 30px; }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
.lb-close:hover, .lb-nav:hover { border-color: var(--accent); }
.lb-body { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0; width: min(1240px, calc(100vw - 100px)); height: min(860px, calc(100vh - 60px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.lb-media { position: relative; background: #000; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; min-height: 0; }
.lb-media video, .lb-media img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; display: block; }
.lb-media:fullscreen { background: #000; }
.lb-media:fullscreen video, .lb-media:fullscreen img { width: 100vw; height: 100vh; }
.lb-fs { position: absolute; top: 12px; left: 12px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgb(var(--fill-rgb) / .2); background: rgba(0, 0, 0, .55); color: #fff; font-size: 16px; }
.lb-fs:hover { border-color: var(--accent); }
.lb-side { padding: 20px; display: flex; flex-direction: column; gap: 12px; overflow: auto; border-left: 1px solid var(--line); }
.lb-head { display: flex; justify-content: space-between; align-items: baseline; }
.lb-head h3 { font-size: 20px; }
.lb-label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }
.lb-prompt { margin: 0; color: #d9dde3; font-size: 14px; line-height: 1.6; user-select: text; }
.lb-side details { font-size: 13px; color: var(--muted); }
.lb-side details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }

/* ---------- responsive ---------- */
.mobile-nav { display: none; }
@media (max-width: 1040px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .composer { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 980px) {
  .wallet-top { grid-template-columns: minmax(0, 1fr); }
  .packs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  /* stacked: the media row gets a definite height (so the video fits inside it instead of overflowing), the side panel scrolls in the rest */
  .lb-body { grid-template-columns: 1fr; grid-template-rows: 60vh minmax(0, 1fr); width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 14px; }
  .lb-side { border-left: 0; border-top: 1px solid var(--line); }
  .lb-nav { display: none; }
  .feed { columns: 2 160px; }
  .feed.masonry { grid-template-columns: repeat(auto-fill, minmax(max(160px, calc(50% - 6px)), 1fr)); }
}
/* the full nav plus "Log in" and "Get started" need ~760px; below that the links move to their own row */
@media (max-width: 760px) {
  .nav { display: none; }
  .mobile-nav { display: flex; gap: 4px; padding: 8px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .mobile-nav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
  .mobile-nav a.active { color: var(--text); background: rgb(var(--fill-rgb) / .09); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { gap: 12px; height: 58px; }
  .logo { font-size: 24px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 22px; }
  .account .btn-ghost { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .packs { grid-template-columns: 1fr; }
  .composer { padding: 16px; }
  .page { padding: 22px 0 60px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head h1 { font-size: 30px; }
  .mode-toggle { width: 100%; }
  .mode-toggle button { flex: 1; }
  .lb-close { top: 10px; right: 10px; width: 40px; height: 40px; }
  .lb-side { padding: 14px; gap: 10px; }
  .lb-actions .btn { flex: 1 1 calc(50% - 4px); height: 42px; }
  .lb-body { grid-template-rows: 44vh minmax(0, 1fr); }
  .lb-actions { order: -1; margin-top: 0; padding-top: 0; }
  .lb-prompt { font-size: 13.5px; }
  .gen-foot { flex-wrap: wrap; gap: 6px; }
  .gen-prompt { -webkit-line-clamp: 3; }
  .btn-lg { height: 48px; }
  .seg button { min-width: 48px; height: 38px; }
  .chip { height: 34px; }
  .cost-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cost-bar .inr { text-align: left; }
  .wallet-top .packs { grid-template-columns: 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
  table.data th, table.data td { padding: 11px 7px; white-space: normal; font-size: 13.5px; }
  table.data th:first-child, table.data td:first-child { padding-left: 12px; }
  table.data th:last-child, table.data td:last-child { padding-right: 12px; }
  table.data th { font-size: 10px; letter-spacing: .03em; }
  table.data .sub { font-size: 11px; }
}
@media (hover: none) {
  .gen-media .play { opacity: 1 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ================= home: night & one light ================= */
.night { --fx: 68%; --fy: 32%; position: relative; overflow: hidden; min-height: min(92vh, 900px); display: flex; align-items: center; background: var(--bg); isolation: isolate; }
.night-wall { position: absolute; inset: -4% -2%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; pointer-events: none; z-index: -2; }
.nc { display: flex; flex-direction: column; gap: 10px; animation: nc-up var(--t, 80s) linear infinite; will-change: transform; }
.nc.down { animation-name: nc-down; }
@keyframes nc-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes nc-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.nt { border-radius: 10px; overflow: hidden; background: #000; flex: none; aspect-ratio: 9 / 16; }
.nt.wide { aspect-ratio: 16 / 10; }
.nt img, .nt video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* the night: a dark layer over the wall with a soft hole where the firefly is */
.night-dark { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: rgba(11, 10, 9, .9);
  -webkit-mask-image: radial-gradient(circle 240px at var(--fx) var(--fy), transparent 0, rgba(0, 0, 0, .35) 45%, #000 100%);
          mask-image: radial-gradient(circle 240px at var(--fx) var(--fy), transparent 0, rgba(0, 0, 0, .35) 45%, #000 100%); }
.night::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle 300px at var(--fx) var(--fy), rgb(var(--accent-rgb) / .09), transparent 70%),
              linear-gradient(180deg, rgba(11, 10, 9, .55), transparent 22%, transparent 70%, var(--bg)); }
/* fixed, so it can be born on the logo in the top bar; under the top bar once it is flying in the hero */
.firefly { position: fixed; left: 0; top: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: #fbffd6; pointer-events: none; z-index: 15;
  translate: var(--vx, -100px) var(--vy, -100px); scale: var(--grow, 1);
  box-shadow: 0 0 0 1px rgba(255, 255, 240, .6), 0 0 12px 5px rgb(var(--accent-rgb) / .95), 0 0 46px 18px rgb(var(--accent-rgb) / .38), 0 0 120px 44px rgb(var(--accent-rgb) / .12);
  animation: glow-big 3.6s ease-in-out infinite; }
@keyframes glow-big { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
.firefly.being-born { z-index: 30; animation: none; opacity: 1; }
.night-copy { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 96px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.night-h1 { font-family: var(--display); font-weight: 800; font-size: clamp(52px, 9vw, 132px); line-height: .9; letter-spacing: -.045em; font-variation-settings: 'opsz' 96;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .6); margin: 0; }
.idea-bar { margin-top: 40px; width: min(680px, 100%); display: flex; align-items: flex-end; gap: 10px; padding: 10px 10px 10px 20px; border-radius: 20px;
  background: rgba(21, 19, 17, .78); border: 1px solid var(--line-strong); backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); text-align: left; }
.idea-bar:focus-within { border-color: rgb(var(--accent-rgb) / .45); }
.idea-bar textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; resize: none; color: var(--text); font-size: 17px; line-height: 1.45; padding: 8px 0; }
.idea-bar textarea::placeholder { color: var(--faint); }
.idea-bar .btn { height: 46px; border-radius: 14px; flex: none; }
.idea-out { width: min(680px, 100%); margin-top: 12px; padding: 18px 20px; border-radius: 18px; background: rgba(21, 19, 17, .86); border: 1px solid var(--line); backdrop-filter: blur(18px); text-align: left; }
.idea-meta { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.idea-meta #demo-meta { margin-left: auto; color: var(--accent); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px 2px rgb(var(--accent-rgb) / .6); font-style: normal; }
.idea-out p { margin: 0 0 14px; color: #e6e0d4; font-size: 15px; line-height: 1.65; max-height: 13em; overflow: auto; }
.idea-out p.streaming::after { content: '▍'; color: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; }
.night-note { margin: 26px 0 0; color: var(--muted); font-size: 14px; }
.night .offer-flag { margin-bottom: 28px; background: rgba(21, 19, 17, .7); backdrop-filter: blur(10px); }
.night .offer-flag b { background: var(--cream); color: var(--accent-ink); }

/* bands */
.band { padding: 104px 0 0; }
.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.band-head h2, .split-copy h2 { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 5.4vw, 76px); line-height: .95; letter-spacing: -.04em; font-variation-settings: 'opsz' 96; }
.text-link { color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.text-link:hover { color: var(--text); }

/* reel: big clips in one row you can swipe, all the same height */
.reel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 max(24px, calc((100vw - 1240px) / 2 + 24px)) 8px; }
.reel::-webkit-scrollbar { display: none; }
.reel-item { position: relative; flex: none; height: min(66vh, 600px); aspect-ratio: 9 / 16; margin: 0; border-radius: 18px; overflow: hidden; background: #000; scroll-snap-align: center; cursor: pointer; }
.reel-item.wide { aspect-ratio: 16 / 9; }
.reel-item video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.reel-item:hover video { transform: scale(1.03); }
.reel-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); display: flex; flex-direction: column; gap: 2px; }
.reel-item figcaption b { font-size: 16px; font-weight: 600; }
.reel-item figcaption span { font-size: 12.5px; color: var(--muted); }
.reel-item .recreate { position: absolute; top: 14px; right: 14px; opacity: 0; transition: opacity .2s; }
.reel-item:hover .recreate { opacity: 1; }
@media (hover: none) { .reel-item .recreate { opacity: 1; } }

/* chain: sheet → pose → shot, joined by the firefly's thread */
.link { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: #000; }
.link img, .link video { width: 100%; height: 100%; object-fit: cover; display: block; }
.link figcaption { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(11, 10, 9, .72); backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; }
.link figcaption i { font-style: normal; font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--cream); color: var(--accent-ink); }
/* columns in proportion to each image (16:9, 9:16, 9:16), so all three share one height with no letterboxing */
.chain { position: relative; display: grid; grid-template-columns: 1.7778fr .5625fr .5625fr; gap: 14px; }
.chain .link { aspect-ratio: 9 / 16; }
.chain .link.sheet { aspect-ratio: 16 / 9; }
.thread { position: absolute; left: 4%; top: 50%; width: 92%; height: 40px; translate: 0 -50%; overflow: visible; pointer-events: none; }
.thread path { fill: none; stroke: rgb(var(--accent-rgb) / .7); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgb(var(--accent-rgb) / .8)); animation: thread 2.4s linear infinite; }
@keyframes thread { to { stroke-dashoffset: -48; } }

/* motion control */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.split-copy p { color: var(--muted); font-size: 18px; margin: 18px 0 28px; max-width: 380px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair .link { aspect-ratio: 9 / 16; }
.pair .link:first-child { translate: 0 28px; }

/* camera moves */
.moves { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.moves .link { aspect-ratio: 9 / 16; cursor: pointer; }
.moves .link figcaption { font-size: 14px; padding: 7px 14px; }

/* models: a list, not cards */
.m-list { border-top: 1px solid var(--line); }
.m-row { display: grid; grid-template-columns: 1.3fr .8fr 2fr auto; gap: 20px; align-items: baseline; padding: 24px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s, padding .2s; }
.m-row:hover { background: linear-gradient(90deg, rgb(var(--accent-rgb) / .05), transparent 60%); padding-left: 14px; }
.m-name { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -.03em; }
.m-name em { font-style: normal; font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; padding: 3px 8px; border-radius: 999px; border: 1px solid rgb(var(--accent-rgb) / .4); color: var(--accent); margin-left: 8px; }
.m-maker { color: var(--faint); font-size: 14px; }
.m-what { color: var(--muted); font-size: 14px; }
.m-go { color: var(--muted); font-weight: 600; font-size: 14px; opacity: 0; transition: opacity .2s; }
.m-row:hover .m-go { opacity: 1; color: var(--text); }

/* finale: one big firefly (the logo's dot, grown up) instead of a second wordmark on the page */
.finale { padding: 140px 0 120px; text-align: center; }
.finale-fly { display: block; width: 22px; height: 22px; margin: 0 auto 44px; border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff1df 0 22%, var(--accent) 60%);
  box-shadow: 0 0 18px 6px rgb(var(--accent-rgb) / .85), 0 0 70px 26px rgb(var(--accent-rgb) / .3), 0 0 180px 70px rgb(var(--accent-rgb) / .1);
  animation: glow-big 3.6s ease-in-out infinite; }
.finale h2 { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 5.4vw, 76px); line-height: .95; letter-spacing: -.04em; font-variation-settings: 'opsz' 96; margin: 0; }
.finale p { color: var(--muted); font-size: 17px; margin: 18px 0 30px; }

@media (max-width: 980px) {
  .night-wall { grid-template-columns: repeat(4, 1fr); }
  .night-wall .nc:nth-child(n+5) { display: none; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .moves { grid-template-columns: repeat(2, 1fr); }
  .m-row { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .m-what { grid-column: 1 / -1; }
  .m-go { opacity: 1; }
}
@media (max-width: 640px) {
  .night { min-height: 0; }
  .night-wall { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .night-wall .nc { gap: 6px; }
  .night-wall .nc:nth-child(n+4) { display: none; }
  .night-copy { padding-top: 72px; padding-bottom: 64px; }
  .night-h1 { font-size: clamp(46px, 14vw, 72px); }
  .idea-bar { flex-direction: column; align-items: stretch; padding: 12px; margin-top: 28px; }
  .idea-bar textarea { padding: 4px 6px; font-size: 16px; }
  .band { padding-top: 80px; }
  .band-head { margin-bottom: 22px; }
  .reel { padding: 0 16px 8px; gap: 10px; }
  .reel-item { height: 62vh; }
  .reel-item.wide { height: auto; width: calc(100vw - 48px); }
  .chain { grid-template-columns: 1fr 1fr; gap: 8px; }
  .chain .link.sheet { grid-column: 1 / -1; }
  .thread { display: none; }
  .pair, .moves { gap: 8px; }
  .pair .link:first-child { translate: none; }
  .finale { padding: 96px 0 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .nc, .thread path, .firefly, .finale-fly { animation: none; }
}

/* ---------- Action Director shot cards ---------- */
.shots { margin-top: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 10px; }
.shots-head { display: flex; align-items: center; gap: 10px; }
.shots-head b { font-size: 13px; }
.grow { flex: 1; }
.shots-list { display: grid; gap: 8px; }
.shot-card { display: grid; gap: 6px; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.shot-card .shot-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.shot-card .input { padding: 8px 10px; font-size: 13px; border-radius: 9px; }
.shot-card .x, .voice-card .x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.shot-card .x:hover, .voice-card .x:hover { color: var(--text); }
.shots-note { margin: 0; font-size: 12px; color: var(--faint); }
#shots-btn.busy { opacity: .7; }

/* ---------- Speak mode ---------- */
.speak-fields { display: grid; gap: 8px; margin-top: 8px; }
.speak-fields .input { padding: 10px 12px; font-size: 13.5px; }
.speak-voice-row { display: grid; gap: 4px; }
.speak-voice-row .hint { font-size: 12px; color: var(--faint); }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: var(--surface); color: var(--text); }

/* ---------- Voices tab ---------- */
.voice-form { display: grid; gap: 10px; margin-bottom: 16px; }
.voice-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.voices-list { display: grid; gap: 10px; }
.voice-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.voice-card audio { width: 100%; height: 36px; }
.voice-meta { display: grid; gap: 2px; min-width: 0; }
.voice-meta b, .voice-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-actions { display: flex; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  .voice-row { grid-template-columns: 1fr; }
  .voice-card { grid-template-columns: 1fr; }
}

/* Library video tools: transcript panel and caption form in the lightbox */
.lb-tool:empty { display: none; }
.lb-tool { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid #2a2a2a; }
.lb-tool .lb-actions { margin-top: 0; }
.cap-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cap-form label { display: flex; flex-direction: column; gap: 4px; }
.cap-form select { width: 100%; min-height: 36px; border-radius: 8px; background: #151515; color: inherit; border: 1px solid #333; padding: 0 8px; font: inherit; text-transform: none; letter-spacing: 0; }
.cap-form .btn { grid-column: 1 / -1; }
#lb-transcript { max-height: 180px; overflow: auto; white-space: pre-wrap; }

/* Admin-only supplier alert (under the site banner) */
.admin-alert { background: #3a1414; color: #ffd9d9; border-bottom: 1px solid #6a2020; padding: 8px 16px; font-size: 13px; text-align: center; }
.admin-alert b { margin-right: 6px; }
.admin-alert a { color: #fff; margin-left: 8px; text-decoration: underline; }

/* Ad remake */
.ad-new { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.ad-new label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ad-new input:not([type="checkbox"]):not([type="file"]), .ad-new select, .ad-new textarea, .ad-shot textarea, .ad-shot input:not([type="number"]) {
  width: 100%; min-height: 40px; border-radius: 10px; background: #111; color: inherit; border: 1px solid #333; padding: 8px 10px; font: inherit; }
.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ad-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.ad-drop { cursor: pointer; }
.ad-pick { display: flex; align-items: center; min-height: 64px; padding: 10px 14px; border: 1px dashed #444; border-radius: 12px; color: #c9cdd3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-drop:hover .ad-pick { border-color: #777; }
.ad-check { flex-direction: row !important; align-items: center; gap: 8px; min-height: 40px; }
.ad-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; margin-bottom: 12px; }
.ad-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ad-shots { display: flex; flex-direction: column; gap: 10px; }
.ad-presenter { display: flex; flex-direction: column; gap: 6px; }
.ad-presenter textarea { width: 100%; min-height: 40px; border-radius: 10px; background: #111; color: inherit; border: 1px solid #333; padding: 8px 10px; font: inherit; }
.ad-shot { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #2a2a2a; border-radius: 12px; }
.ad-shot-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-shot-head label { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ad-shot input[type="number"] { width: 64px; min-height: 32px; border-radius: 8px; background: #111; color: inherit; border: 1px solid #333; padding: 4px 6px; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-final { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
@media (max-width: 760px) {
  .ad-grid, .ad-opts { grid-template-columns: 1fr; }
}

/* trends: template cards — what went in (chips on top), the result playing underneath, one tap into the studio */
.trend-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 max(24px, calc((100vw - 1240px) / 2 + 24px)) 8px; }
.trend-row::-webkit-scrollbar { display: none; }
.trend-row .trend { flex: none; width: min(300px, 74vw); scroll-snap-align: center; }
.trend { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.trend-media { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000; }
.trend-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.trend-ins { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tin-k { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgb(var(--fill-rgb) / .85); background: rgba(11, 10, 9, .55); backdrop-filter: blur(10px); padding: 4px 8px; border-radius: 999px; }
.tin { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: rgba(11, 10, 9, .62); backdrop-filter: blur(10px); border: 1px solid rgb(var(--fill-rgb) / .16); color: #fff; font: inherit; font-size: 12px; cursor: default; }
.tin[data-clip], .tin[data-audio] { cursor: pointer; }
.tin[data-clip]:hover, .tin[data-audio]:hover { border-color: rgb(var(--fill-rgb) / .4); }
.tin img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; }
.tin b { font-weight: 600; }
.tin-play { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .4); font-size: 9px; }
.tin-ico { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 9px; }
.tin.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.trend-tag { position: absolute; left: 12px; bottom: 12px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.trend figcaption { display: flex; flex-direction: column; gap: 2px; }
.trend figcaption b { font-size: 16px; font-weight: 600; }
.trend figcaption span { font-size: 13px; color: var(--muted); }
.trend-go { align-self: flex-start; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 16px; }
.trends-head { margin-bottom: 30px; }
.trends-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 5.4vw, 76px); line-height: .95; letter-spacing: -.04em; margin: 0 0 12px; }
.trends-head p { max-width: 640px; margin: 0; }
.tpl-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); border: 1px solid rgb(var(--accent-rgb) / .25); font-size: 13px; line-height: 1.4; }
.tpl-x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tpl-x:hover { color: var(--text); }
@media (max-width: 640px) {
  .trend-row { padding: 0 16px 8px; gap: 12px; }
  .trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; }
  .trend-grid .tin b { display: none; }
  .trend-grid .tin { padding: 3px; }
}

/* sign up / log in: stories (trend clips) beside the form; a page and a pop-up */
body.no-scroll { overflow: hidden; }
.auth-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(5, 4, 3, .72); backdrop-filter: blur(8px); animation: fade-in .18s ease; }
@keyframes fade-in { from { opacity: 0; } }
.auth-split { width: min(980px, 100%); min-height: min(640px, calc(100vh - 48px)); display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.auth-split.solo { grid-template-columns: 1fr; width: min(460px, 100%); }
.auth-modal .auth-split { max-height: calc(100vh - 48px); }
.auth-stories { position: relative; overflow: hidden; background: #000; min-height: 420px; }
.auth-stories video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 22%, transparent 48%, rgba(0, 0, 0, .86) 100%); }
.st-copy { position: absolute; left: 26px; right: 26px; bottom: 74px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.st-chip { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(11, 10, 9, .6); backdrop-filter: blur(10px); border: 1px solid rgb(var(--fill-rgb) / .16); color: #fff; }
.st-copy h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.6vw, 46px); line-height: .95; letter-spacing: -.035em; color: #fff; }
.st-copy p { margin: 0; color: rgb(var(--fill-rgb) / .78); font-size: 14px; max-width: 360px; }
.st-tabs { position: absolute; left: 18px; right: 18px; bottom: 18px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.st-tabs button { background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 7px; text-align: left; color: rgb(var(--fill-rgb) / .5); font: inherit; font-size: 11px; font-weight: 600; min-width: 0; }
.st-tabs button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tabs button.on { color: #fff; }
.st-tabs i { display: block; height: 3px; border-radius: 3px; background: rgb(var(--fill-rgb) / .22); overflow: hidden; }
.st-tabs b { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; }
.auth-form { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 44px 40px; overflow-y: auto; }
.auth-form h1 { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -.03em; margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 24px; font-size: 14.5px; }
.auth-fly { display: block; width: 14px; height: 14px; margin-bottom: 22px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #fff1df 0 22%, var(--accent) 60%); box-shadow: 0 0 12px 4px rgb(var(--accent-rgb) / .7), 0 0 44px 14px rgb(var(--accent-rgb) / .22); }
.auth-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.auth-x:hover { color: var(--text); }
.g-btn { min-height: 44px; display: flex; justify-content: center; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
@media (max-width: 760px) {
  .auth-modal { padding: 0; place-items: stretch; }
  .auth-split, .auth-modal .auth-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 0; max-height: none; border-radius: 0; border: 0; }
  .auth-modal .auth-split { height: 100%; overflow-y: auto; }
  .auth { padding: 0 0 40px; }
  .auth .auth-split { border-radius: 0; border-left: 0; border-right: 0; }
  .auth-stories { min-height: 0; height: 38vh; }
  .st-copy { left: 16px; right: 16px; bottom: 52px; }
  .st-copy h2 { font-size: 28px; }
  .st-copy p { display: none; }
  .st-tabs { left: 12px; right: 12px; bottom: 12px; }
  .st-tabs button span { display: none; }
  .auth-form { padding: 26px 20px 32px; justify-content: flex-start; }
  .auth-fly { display: none; }
  .auth-x { position: fixed; top: 12px; right: 12px; z-index: 2; background: rgba(11, 10, 9, .6); backdrop-filter: blur(8px); }
}

/* home: ad banners (promo loops) across the top, then the pay-as-you-go offer beside the feature tiles */
.hb { padding: 22px 0 0; }
.hb-row { --pad: max(24px, calc((100vw - 1240px) / 2 + 24px)); display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none; padding: 0 var(--pad) 4px; }
.hb-row::-webkit-scrollbar { display: none; }
.hb-card { flex: none; width: calc((min(100vw, 1240px) - 48px - 36px) / 3); display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; scroll-snap-align: start; }
.hb-media { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); margin-bottom: 10px; }
.hb-media video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.hb-card:hover .hb-media video { transform: scale(1.03); }
.hb-card b { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.01em; text-transform: uppercase; }
.hb-card span { color: var(--muted); font-size: 14px; }
.hp-offer { padding: 40px 0 0; }
.hp-offer-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.offer-card { position: relative; min-height: 340px; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid var(--line-strong); display: flex; }
.offer-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oc-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 10, 9, .94) 0%, rgba(11, 10, 9, .66) 48%, rgba(11, 10, 9, .08) 100%); }
.oc-copy { position: relative; padding: 34px 36px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; }
.oc-flag { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); border: 1px solid rgb(var(--accent-rgb) / .4); padding: 5px 11px; border-radius: 999px; }
.oc-flag b { color: var(--accent-ink); background: var(--accent); padding: 1px 6px; border-radius: 6px; margin-right: 4px; }
.offer-card h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(40px, 5vw, 70px); line-height: .92; letter-spacing: -.04em; }
.offer-card h1 em { font-style: normal; color: var(--accent); }
.offer-card p { margin: 0; max-width: 380px; color: rgba(244, 239, 230, .82); }
.hp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hp-tile { display: flex; flex-direction: column; gap: 5px; min-height: 150px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.hp-tile:hover { border-color: var(--line-strong); background: var(--surface-2); }
.hp-ico { color: var(--accent); margin-bottom: auto; }
.hp-name { font-weight: 700; font-size: 15.5px; }
.hp-tag { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); margin-left: 4px; vertical-align: 2px; }
.hp-line { color: var(--muted); font-size: 13px; line-height: 1.35; }
@media (max-width: 980px) { .hp-offer-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .hb-row { --pad: 16px; gap: 12px; }
  .hb-card { width: 84vw; }
  .hp-offer { padding-top: 28px; }
  .offer-card { min-height: 300px; }
  .oc-copy { padding: 26px 22px; }
  .hp-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hp-tile { min-height: 124px; padding: 14px; }
}
/* the Director band now sits mid-page, below the trends */
#night { margin-top: 104px; min-height: min(80vh, 760px); }
#night .night-copy { padding-top: 96px; }

/* crawlable intro in index.html, visible only until the app renders */
.seo-intro { max-width: 760px; margin: 0 auto; padding: 72px 20px; }
.seo-intro h1 { font-size: 34px; margin-bottom: 14px; }
.seo-intro p { color: var(--muted); font-size: 17px; margin: 0 0 10px; }

/* studio: style pill (replaces the big preset photo) */
.opt-btn { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.opt-btn::before { content: '✦ '; color: var(--faint); }
.opt-btn.on { border-color: var(--accent); color: var(--accent); }
.opt-btn.on::before { color: var(--accent); }
/* references under the prompt: one "+ Add" button, a small menu, and only the kinds in use */
#refs { border: 0; background: none; margin-top: 8px; }
#refs .refs-body { display: block; padding: 0; }
.attach { position: relative; }
.attach-btn { width: 100%; height: 40px; border-radius: 10px; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.attach-btn:hover { color: var(--text); border-color: var(--accent); }
.attach-menu { margin-top: 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); padding: 6px; display: grid; gap: 2px; }
.attach-menu[hidden] { display: none; }
.attach-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 9px 10px; border-radius: 8px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.attach-menu button:hover:not(:disabled) { background: var(--bg-2); }
.attach-menu button b { font-size: 13.5px; }
.attach-menu button span { font-size: 12px; color: var(--muted); }
.attach-menu button.lib b { font-weight: 500; }
.attach-menu button:disabled { opacity: .45; cursor: not-allowed; }
/* admin bar: one line, tap to open */
.admin-alert { padding: 0; text-align: left; }
.admin-alert .aa-sum { display: block; width: 100%; padding: 7px 16px; background: none; border: 0; color: inherit; font: inherit; font-size: 13px; text-align: center; cursor: pointer; }
.admin-alert .aa-list { display: none; padding: 0 16px 10px; font-size: 12.5px; max-width: 900px; margin: 0 auto; }
.admin-alert.open .aa-list { display: block; }
.admin-alert .aa-list p { margin: 4px 0; }

/* phones: option pop-ups span the composer instead of running off the right edge; nothing may scroll the page sideways */
html, body { overflow-x: clip; }
@media (max-width: 700px) {
  .opts { position: relative; }
  .opts .opt { position: static; }
  .opt-pop, .opt-pop.wide { left: 0; right: 0; min-width: 0; }
}

.speak-tip { font-size: 12px; color: var(--faint); align-self: center; }

/* Remix panel under the prompt */
.remix-panel { margin-top: 8px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); padding: 10px; display: grid; gap: 8px; }
.remix-panel[hidden] { display: none; }
.remix-head { display: flex; align-items: baseline; gap: 8px; }
.remix-head b { font-size: 13px; color: var(--accent); }
.remix-head .muted { flex: 1; line-height: 1.4; }
.remix-head .x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.remix-row { display: flex; gap: 6px; }
.remix-row .input { flex: 1; min-width: 0; height: 38px; }
.remix-row .btn { height: 38px; white-space: nowrap; }
#remix-motion { justify-self: start; }

/* duration: tap-able lengths that wrap */
.dur-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.dur-seg button { flex: 0 0 auto; min-width: 52px; }

/* ---------- light theme (chosen in the theme panel by login) ---------- */
:root[data-theme="light"] {
  --bg: #faf6f0;
  --bg-2: #f3ede4;
  --surface: #ffffff;
  --surface-2: #f6f1ea;
  --surface-3: #ece4d8;
  --line: rgba(40, 28, 16, .09);
  --line-strong: rgba(40, 28, 16, .18);
  --text: #1c1814;
  --muted: #6a6157;
  --faint: #9a9084;
  --accent-ink: #ffffff;
  --cream: #1c1814;          /* primary buttons: ink with white text */
  --fill-rgb: 40 28 16;
  --shadow: 0 24px 60px -28px rgba(60, 40, 20, .35);
  color-scheme: light;
}
:root[data-theme="light"] .admin-alert { background: #fde8e4; color: #7a1d12; border-color: #f2b8ad; }
:root[data-theme="light"] .admin-alert a { color: #7a1d12; }

/* ---------- theme button and panel (top bar, next to login / account) ---------- */
.theme-wrap { position: relative; }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-2); display: grid; place-items: center; padding: 0; cursor: pointer; }
.theme-btn i { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6 0 20%, transparent 22%), var(--accent); box-shadow: 0 0 10px rgb(var(--accent-rgb) / .6); }
.theme-pop { position: absolute; right: 0; top: 46px; z-index: 40; width: 260px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.theme-pop[hidden] { display: none; }
.theme-pop h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; font-family: var(--mono); font-weight: 500; }
.theme-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.theme-modes button { height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 600; font-size: 13px; }
.theme-modes button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.theme-shade { width: 100%; -webkit-appearance: none; appearance: none; height: 10px; border-radius: 99px; outline: none; margin: 4px 0 10px;
  background: linear-gradient(90deg, hsl(8 100% 60%), hsl(18 100% 60%), hsl(28 100% 60%), hsl(38 100% 58%), hsl(48 100% 55%)); }
.theme-shade::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 1px 6px rgba(0, 0, 0, .35); cursor: pointer; }
.theme-shade::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); cursor: pointer; }
.theme-swatches { display: flex; justify-content: space-between; }
.theme-swatches button { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: var(--muted); font-size: 10.5px; cursor: pointer; }
.theme-swatches button i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; }
.theme-swatches button[aria-pressed="true"] i { border-color: var(--text); }

/* light theme: frosted light top bar; anything drawn over video or photos keeps light text (dark-theme tokens) */
:root[data-theme="light"] .topbar { background: rgba(250, 246, 240, .86); }
:root[data-theme="light"] :is(.night, .offer-card, .reel-item, .auth-stories, .lb, .link, .gen-media, .hb-media, .nt) {
  --text: #f4efe6; --muted: #cfc6b8; --faint: #a39a8e; --cream: #f4efe6; --accent-ink: #12110e;
  --fill-rgb: 255 255 255; --line: rgba(255, 244, 225, .1); --line-strong: rgba(255, 244, 225, .2);
  color: var(--text);
}
