/* Hallmark · shape: app screen · genre: atmospheric · theme: Bloom (deal 1/3, seed tool-beginners-makes-faceless-f674·f99c9f8d·2026-11-25·r0) · redesign: full
 * nav: top bar, four tabs and one action (kept) · signature: the job page, a meter that fills while the video is made, then the video itself · states: loading (queued, making), empty (no series, no videos), error (failed video, form errors), full
 * axes: light/grotesk-sans/warm · posture: committed · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4 · weakest: S, the tables are plain; the setup form carries the real style pictures and voice samples so every choice is seen or heard first */
/* Hallmark · waive 49b · video titles in the library table wrap on phones · titles are the owner's content and the table restacks each row under 40rem */
@import url("./tokens.css");
@import url("./base.css");

:root {
  /* The landing page's dealt palette (taste skill: plum-black-pink) and type (Funnel), so the app and the site are one product */
  --color-paper: #0d060b; --color-paper-2: #1b0e17; --color-paper-3: #27141f; --color-sheet: #1b0e17;
  --color-ink: #ffffff; --color-ink-2: #ece4e9; --color-muted: #b3a8b0; --color-rule: rgb(255 255 255 / 0.12);
  --color-accent: #ff488b; --color-accent-2: #ff6fa3; --color-accent-ink: #0d060b; --color-accent-soft: rgb(255 72 139 / 0.16);
  --color-focus: #ff6fa3; --color-error-ink: #ffb199; --color-success-ink: #7fe0b4; --color-cap-red: #c8281f;
  --rubber: #ff488b; --rubber-hi: #ff7aa9; --rubber-lo: #e8327a; --umber: #070306;
  --shade-1: rgb(255 255 255 / 0.10); --shade-2: rgb(0 0 0 / 0.30); --shade-3: rgb(0 0 0 / 0.45); --hi: rgb(255 255 255 / 0.06);
  --shadow-card: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 18px 40px -24px rgb(0 0 0 / 0.6);
  --font-display: "Funnel Display", system-ui, sans-serif; --font-body: "Funnel Sans", system-ui, sans-serif;
  --display-weight: 500; --tracking-display: -0.03em;
  --radius-card: 18px; --radius-inner: 14px; --radius-clip: 6px; --radius-pill: 999px;
  color-scheme: dark;
}
@font-face { font-family: "Funnel Display"; src: url("/static/fonts/funnel-display.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Funnel Sans"; src: url("/static/fonts/funnel-sans.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
body { font-size: 1.0625rem; line-height: 1.6; }

h1 { font-size: var(--text-3xl); font-weight: var(--display-weight); line-height: 1.1; color: var(--color-ink); }
h2 { font-size: var(--text-xl); font-weight: var(--display-weight); line-height: 1.2; color: var(--color-ink); }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); background: var(--color-ink); color: var(--color-paper); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-clip); }
.skip:focus-visible { top: var(--space-md); }
.shell { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--space-xl); }
.meta, .help { color: var(--color-muted); font-size: var(--text-sm); }
.help { display: block; min-height: 1lh; margin-top: var(--space-xs); }
.num { font-variant-numeric: tabular-nums; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: var(--rule-hair) solid transparent; background: none; border-radius: var(--radius-pill); white-space: nowrap; padding: var(--space-xs) var(--space-md); font-weight: 500; color: var(--color-ink); text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.btn--sm { min-height: 32px; padding: var(--space-2xs) var(--space-sm); font-size: var(--text-sm); }
.btn--primary { background: var(--rubber); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--rubber-lo); }
.btn--primary:active { background: var(--rubber-lo); transform: translateY(1px); }
.btn--secondary { background: var(--color-sheet); box-shadow: 0 0 0 1px var(--shade-1), inset 0 1px 0 var(--hi); }
.btn--secondary:hover { background: var(--color-paper-2); }
.btn--secondary:active { background: var(--color-paper-3); }
.btn--danger { border-color: var(--color-error-ink); color: var(--color-error-ink); }
.btn--danger:hover { background: var(--color-paper-3); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
a:hover { text-decoration-color: var(--color-accent); }

/* top bar */
.bar { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-sheet); border-bottom: var(--rule-hair) solid var(--color-rule); }
.bar__row { display: flex; align-items: center; gap: var(--space-xl); min-height: 60px; }
.wordmark { font-weight: 700; font-size: var(--text-lg); color: var(--color-ink); text-decoration: none; letter-spacing: var(--tracking-display); }
.tabs { display: flex; gap: var(--space-2xs); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 40px; padding-inline: var(--space-md); border-radius: var(--radius-pill); color: var(--color-ink-2); text-decoration: none; font-weight: 500; transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.tabs a:hover { color: var(--color-ink); background: var(--color-paper-3); }
.tabs a[aria-current="page"] { color: var(--color-ink); background: var(--color-paper-2); box-shadow: inset 0 0 0 1px var(--shade-1); }
.tabs a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.count { min-width: 20px; padding-inline: var(--space-2xs); border-radius: var(--radius-clip); background: var(--color-accent-soft); color: var(--color-ink); font-size: var(--text-xs); text-align: center; }
.bar__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-md); }

/* page */
.page { padding-block: var(--space-2xl) var(--space-3xl); }
.page__head { display: grid; gap: var(--space-xs); margin-bottom: var(--space-xl); }
.page__head .meta { max-width: 70ch; }
.section-title { margin: var(--space-2xl) 0 var(--space-md); }
.crumb { margin-bottom: var(--space-xs); font-size: var(--text-sm); }
.crumb a { color: var(--color-muted); }
.well { background: var(--color-sheet); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.empty { display: grid; gap: var(--space-md); justify-items: start; padding: var(--space-2xl); }
.empty p { color: var(--color-ink-2); max-width: 60ch; }
.alert { margin-bottom: var(--space-lg); padding: var(--space-md) var(--space-lg); border: var(--rule-hair) solid var(--color-error-ink); border-radius: var(--radius-inner); background: var(--color-sheet); color: var(--color-ink); }
.note { margin-top: var(--space-md); padding: var(--space-md) var(--space-lg); border-radius: var(--radius-inner); background: var(--color-paper-2); color: var(--color-ink-2); max-width: 70ch; }

/* tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: var(--space-sm) var(--space-md) var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); vertical-align: middle; }
.table thead th { color: var(--color-muted); font-weight: 500; font-size: var(--text-sm); white-space: nowrap; }
.table tbody th { font-weight: 500; }
.table tbody th a { color: var(--color-ink); text-decoration: none; }
.table tbody th a:hover { text-decoration: underline; text-decoration-color: var(--color-accent); }
.table td { color: var(--color-ink-2); }
.table .end { text-align: right; padding-right: 0; }
.table tbody tr:hover { background: var(--color-sheet); }
.status { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }
.status--done { color: var(--color-success-ink); }
.status--failed { color: var(--color-error-ink); }

/* forms */
.field { display: grid; gap: var(--space-xs); margin-bottom: var(--space-xl); }
.field--narrow { max-width: 28rem; }
.label { font-weight: 500; }
input[type="text"], textarea, select { width: 100%; min-height: 40px; padding: var(--space-xs) var(--space-sm); background: var(--color-sheet); color: var(--color-ink); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-inner); font-size: var(--text-md); }
textarea { resize: vertical; line-height: 1.5; }
input[type="text"]:focus-visible, textarea:focus-visible, select:focus-visible, input[type="file"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
input::placeholder, textarea::placeholder { color: var(--color-muted); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--color-accent); width: 18px; height: 18px; }
input[type="radio"]:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
input[type="file"] { color: var(--color-ink-2); }
input:disabled + span, input:disabled { opacity: 0.55; cursor: not-allowed; }

/* wizard */
.choices { display: grid; gap: var(--space-sm); }
.choices--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choices--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 60rem) { .choices--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice { position: relative; display: grid; gap: var(--space-2xs); padding: var(--space-lg); border-radius: var(--radius-inner); background: var(--color-sheet); box-shadow: 0 0 0 1px var(--shade-1); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.choice:hover { background: var(--color-paper-2); }
.choice input { position: absolute; top: var(--space-md); right: var(--space-md); }
.choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--color-accent); background: var(--color-sheet); }
.choice__title { font-weight: 500; padding-right: var(--space-xl); }
.choice__line { color: var(--color-muted); font-size: var(--text-sm); }
.choice--cap { justify-items: center; padding-block: var(--space-xl); }
.cap { display: inline-block; font-weight: 700; font-size: var(--text-2xl); line-height: 1.1; color: var(--color-paper); margin-bottom: var(--space-xs); }
.choice--cap { background: var(--umber); }
.choice--cap:hover { background: var(--color-ink-2); }
.choice--cap:has(input:checked) { background: var(--umber); box-shadow: inset 0 0 0 3px var(--color-accent-2); }
.choice--cap .choice__title { color: var(--color-paper); padding-right: 0; }
.cap--bold { -webkit-text-stroke: 1.5px var(--color-ink); paint-order: stroke fill; text-shadow: 0 2px 0 var(--color-ink); }
.cap--red { background: var(--color-cap-red); padding: var(--space-xs) var(--space-md); line-height: 1.2; border-radius: var(--radius-clip); }
.cap--sleek { font-weight: 400; }
.voices { list-style: none; margin: 0; padding: 0; border-top: var(--rule-hair) solid var(--color-rule); }
.voice { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding-block: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-rule); }
.voice label { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; cursor: pointer; }
.voice audio { height: 36px; max-width: 280px; }
.voice:has(input:checked) label { color: var(--color-ink); font-weight: 500; }
.styles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-sm); }
.style { position: relative; display: grid; gap: var(--space-xs); cursor: pointer; }
.style img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-inner); transition: opacity var(--dur-short) var(--ease-out); }
.style:hover img { opacity: 0.85; }
.style input { position: absolute; top: var(--space-xs); left: var(--space-xs); z-index: var(--z-raised); }
.style span { font-size: var(--text-sm); color: var(--color-ink-2); }
.style:has(input:checked) img { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.style:has(input:checked) span { color: var(--color-ink); font-weight: 500; }
.style__box { display: grid; align-content: start; gap: var(--space-xs); aspect-ratio: 2 / 3; padding: var(--space-xl) var(--space-sm) var(--space-sm);
  border: 1px dashed var(--color-ink-2); border-radius: var(--radius-inner); }
.style .style__title { color: var(--color-ink); font-weight: 500; }
.style__box textarea { width: 100%; min-height: 0; resize: none; font: inherit; font-size: var(--text-sm); }
.style__upload { position: relative; display: grid; gap: 2px; }
.style__upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.style__pick { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 10px; border: 1px solid var(--color-ink-2);
  border-radius: var(--radius-inner); font-size: 13px; color: var(--color-ink); cursor: pointer; }
.style__pick:hover { border-color: var(--color-accent); }
.style__upload input[type=file]:focus-visible + .style__pick { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.style__file, .style__ref { font-size: 12px; color: var(--color-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style__ref { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.style__remove input { position: static; width: 14px; height: 14px; margin: 0; }
.style__remove { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.style--own:has(input[type=radio]:checked) .style__box { border: 3px solid var(--color-accent); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.checks label { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: 44px; cursor: pointer; }
.checks--row { grid-auto-flow: column; justify-content: start; gap: var(--space-lg); }

/* new series: one page per step */
.setup { max-width: 64rem; }
.setup__head { display: grid; gap: var(--space-sm); margin-bottom: var(--space-xl); }
.setup__head h1 { margin-top: var(--space-xs); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2xs); }
.steps__item { padding-top: var(--space-xs); border-top: 3px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }
.steps__item.is-done { border-top-color: var(--color-accent); }
.steps__item.is-done a { color: var(--color-ink-2); text-decoration: none; }
.steps__item.is-done a:hover { color: var(--color-accent); text-decoration: underline; }
.steps__item.is-current { border-top-color: var(--color-accent); color: var(--color-ink); font-weight: 500; }
.steps__count { color: var(--color-muted); font-size: var(--text-sm); }
.setup__form { display: grid; }
.setup__form > fieldset { border: 0; padding: 0; margin: 0 0 var(--space-xl); min-width: 0; }
.setup__form legend.label { padding: 0; margin-bottom: var(--space-sm); }
.setup__nav { display: flex; justify-content: space-between; gap: var(--space-sm); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.current { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-inner); background: var(--color-paper-2); }
.check { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: 44px; cursor: pointer; }
@media (max-width: 40rem) { .steps__item { font-size: 0; padding-top: 0; } .steps__item a, .steps__item span { font-size: 0; } }

/* series page */
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: start; }
.make { padding: var(--space-xl); display: grid; gap: var(--space-lg); justify-items: start; }
.make .field { width: 100%; margin-bottom: 0; }
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: var(--space-md); padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
.facts dt { color: var(--color-muted); font-weight: 500; font-size: var(--text-sm); }
.facts dd { margin: 0; color: var(--color-ink-2); }
.danger { margin-top: var(--space-3xl); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.danger summary { cursor: pointer; color: var(--color-muted); font-size: var(--text-sm); }
.danger summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.danger form { display: grid; gap: var(--space-md); justify-items: start; margin-top: var(--space-md); }

/* video page */
.progress { padding: var(--space-2xl); display: grid; gap: var(--space-md); max-width: 48rem; }
.progress__msg { font-size: var(--text-xl); font-weight: var(--display-weight); color: var(--color-ink); }
.meter { height: 8px; border-radius: var(--radius-clip); background: var(--color-paper-3); overflow: hidden; }
.meter__fill { display: block; height: 100%; border-radius: var(--radius-clip); background: var(--rubber); transform-origin: left; transform: scaleX(0.01); }
.result { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: start; }
.result__video { width: 100%; max-width: 420px; aspect-ratio: 9 / 16; border-radius: var(--radius-inner); background: var(--color-paper-3); box-shadow: var(--shadow-card); }
.result__side { display: grid; gap: var(--space-xl); }
.result__side .field { margin-bottom: 0; justify-items: start; }
.retry { margin-bottom: var(--space-lg); }

/* billing */
.figures { margin: 0 0 var(--space-2xl); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figures > div { padding: var(--space-md) var(--space-lg); border-left: var(--rule-hair) solid var(--color-rule); }
.figures > div:first-child { padding-left: 0; border-left: 0; }
.figures dt { color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; }
.figures dd { font-variant-numeric: tabular-nums; margin: var(--space-xs) 0 0; font-size: var(--text-2xl); font-weight: var(--display-weight); color: var(--color-ink); }

@media (max-width: 60rem) {
  .shell { padding-inline: var(--space-md); }
  .bar__row { flex-wrap: wrap; gap: var(--space-sm); padding-block: var(--space-xs); }
  .bar__end .meta { display: none; }
  .tabs { order: 3; width: 100%; }
  .split, .result { grid-template-columns: minmax(0, 1fr); }
  .styles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md) 0; }
  .figures > div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 40rem) {
  .choices--2, .choices--3, .choices--4 { grid-template-columns: minmax(0, 1fr); }
  .styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice { flex-direction: column; align-items: flex-start; }
  .checks--row { grid-auto-flow: row; }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding-block: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-rule); }
  .table th, .table td { border: 0; padding: var(--space-2xs) 0; }
}
.meter__fill--5 { transform: scaleX(0.05); }
.meter__fill--10 { transform: scaleX(0.1); }
.meter__fill--15 { transform: scaleX(0.15); }
.meter__fill--20 { transform: scaleX(0.2); }
.meter__fill--25 { transform: scaleX(0.25); }
.meter__fill--30 { transform: scaleX(0.3); }
.meter__fill--35 { transform: scaleX(0.35); }
.meter__fill--40 { transform: scaleX(0.4); }
.meter__fill--45 { transform: scaleX(0.45); }
.meter__fill--50 { transform: scaleX(0.5); }
.meter__fill--55 { transform: scaleX(0.55); }
.meter__fill--60 { transform: scaleX(0.6); }
.meter__fill--65 { transform: scaleX(0.65); }
.meter__fill--70 { transform: scaleX(0.7); }
.meter__fill--75 { transform: scaleX(0.75); }
.meter__fill--80 { transform: scaleX(0.8); }
.meter__fill--85 { transform: scaleX(0.85); }
.meter__fill--90 { transform: scaleX(0.9); }
.meter__fill--95 { transform: scaleX(0.95); }
.meter__fill--100 { transform: scaleX(1.0); }

/* step 1: Presets / Custom switch, then the presets as a text list (no pictures) */
.niche-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 0; border-radius: 999px; background: var(--color-surface-2, rgb(255 255 255 / .06)); width: max-content; }
.niche-tab { position: relative; cursor: pointer; }
.niche-tab input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.niche-tab span { display: grid; place-items: center; min-height: 44px; padding: 0 var(--space-lg); border-radius: 999px; color: var(--color-ink-2); font-weight: 500; }
.niche-tab:has(input:checked) span { background: var(--color-ink); color: var(--color-bg, #0d060b); }
.niche-tab:has(input:focus-visible) span { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.setup__form:has(input[name="mode"][value="custom"]:checked) .niche-panel--presets,
.setup__form:has(input[name="mode"][value="presets"]:checked) .niche-panel--custom { display: none; }
.niche-group { margin: var(--space-xl, 40px) 0 var(--space-sm); font-size: 22px; font-weight: 600; color: var(--color-ink); }
.niche-group:first-of-type { margin-top: 0; }
.niche-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 60rem) { .niche-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .choices.niche-list { grid-template-columns: minmax(0, 1fr); } }

/* caption step: the previews sit on a dark "video" card, so the words are always white (or yellow) with a black edge */
.choice--cap { background: #050304; }
.choice--cap:hover { background: #140b11; }
.choice--cap:has(input:checked) { background: #050304; }
.cap { color: #fff; }
.cap--bold { -webkit-text-stroke: 1.5px #000; text-shadow: 0 2px 0 #000; }
.cap--town { color: #ffd84d; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 2px 0 #000; }
.choice--cap .choice__title { color: var(--color-ink-2); }

/* New series: every step fits one laptop screen without scrolling (like FacelessReels' setup) */
.page:has(> .setup) { padding-block: var(--space-lg) 0; }
.setup__head { gap: 6px; margin-bottom: var(--space-md); }
.setup__head h1 { margin: 2px 0 0; font-size: 30px; line-height: 1.15; }
.steps__item { padding-top: 6px; font-size: 13px; }
.steps__count { font-size: 13px; }
.setup__lead { color: var(--color-ink-2); margin-bottom: var(--space-sm); }
.setup__form > fieldset, .setup__form > .field { margin: 0 0 var(--space-md); }
.setup__form .choice { padding: 14px 16px; }
.setup__form .choice input { top: 14px; right: 14px; }
.setup__form .help { margin-top: 6px; display: block; }
.niche-tabs { margin-bottom: var(--space-sm); }
.setup__nav { position: sticky; bottom: 0; z-index: 5; margin-top: auto; padding: 14px 0 18px; background: var(--color-paper); }
.field--inline { display: flex; align-items: center; gap: var(--space-md); }
.field--inline .label { margin: 0; }
.field--inline select { width: auto; min-width: 180px; }
/* voices: 4 x 2 cards with a play button */
.voice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.voice-card { padding-bottom: 52px !important; }
.voice-play { position: absolute; left: 16px; bottom: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--color-accent); color: var(--color-accent-ink); cursor: pointer; }
.voice-play svg { width: 12px; height: 12px; }
.voice-play[aria-pressed="true"] { background: var(--color-ink); }
/* art styles: 5 pictures across, square; your own style on a full-width row below */
.setup .styles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.setup .styles .style--own { grid-column: 1 / -1; }
.setup .styles .style--own .style__box { aspect-ratio: auto; min-height: 0; }
.setup .style img, .setup .style__box { aspect-ratio: 1 / 1; }
.setup .style__box { padding-top: var(--space-lg); }
.setup .style span { font-size: 13px; }
.setup .choice--cap { padding-block: 18px; }
@media (max-width: 60rem) { .voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .setup .styles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 60rem) { .setup .style--own .style__box { min-height: 8rem; } }

/* App frame: left sidebar like FacelessReels (logo, Series, Videos, Settings, Billing; account at the bottom) */
.frame { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; background: var(--color-sheet); border-right: var(--rule-hair) solid var(--color-rule); }
.side__logo .logo__mark { width: 28px; height: 28px; flex: none; }
.side__logo { display: flex; align-items: center; gap: 8px; padding: 4px 12px 18px; font-weight: 700; font-size: 19px; color: var(--color-ink); text-decoration: none; letter-spacing: var(--tracking-display); }
.side__nav { display: grid; gap: 4px; }
.side__link { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--color-ink-2); text-decoration: none; font-weight: 500; }
.side__link:hover { background: var(--color-paper-3); color: var(--color-ink); }
.side__link[aria-current="page"], .side__link.is-on { background: var(--color-accent-soft); color: var(--color-ink); box-shadow: inset 3px 0 0 var(--color-accent); }
.side__foot { margin-top: auto; display: grid; gap: 8px; padding: 12px; border-top: var(--rule-hair) solid var(--color-rule); }
.side__who { font-size: 13px; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__out { padding: 0; border: 0; background: none; color: var(--color-ink-2); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; justify-self: start; min-height: 32px; }
.side__out:hover { color: var(--color-accent); }
.topbar { display: flex; justify-content: flex-end; padding: 14px var(--space-xl) 0; }
.frame__main .page:has(> .setup) { padding-top: 0; }
@media (max-width: 52rem) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-right: 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
  .side__logo { padding: 4px 8px; }
  .side__nav { display: flex; overflow-x: auto; }
  .side__foot { display: none; }
}

/* Sign up / sign in: a box over the blurred app (like FacelessReels) */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; overflow: hidden; }
.auth__behind { position: fixed; inset: 0; display: grid; grid-template-columns: 232px 1fr; filter: blur(6px); opacity: .55; pointer-events: none; }
.auth__behind .side { height: 100vh; }
.auth__fake { padding: 64px 48px; display: grid; gap: 20px; align-content: start; }
.auth__fake-bar { height: 10px; width: 70%; border-radius: 6px; background: var(--color-accent-soft); }
.auth__fake-title { height: 28px; width: 40%; border-radius: 8px; background: var(--color-paper-3); }
.auth__fake-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.auth__fake-grid span { height: 92px; border-radius: 14px; background: var(--color-paper-2); box-shadow: 0 0 0 1px var(--shade-1); }
.auth__box { position: relative; z-index: 1; width: min(420px, 100%); padding: 28px; border-radius: 16px; background: var(--color-sheet); box-shadow: 0 0 0 1px var(--shade-1), 0 30px 80px -20px rgb(0 0 0 / .7); }
.auth__box h1 { font-size: 26px; line-height: 1.2; }
.auth__sub { margin-top: 6px; color: var(--color-muted); }
.auth__box .alert { margin-top: 16px; }
.auth__form { display: grid; gap: 12px; margin-top: 22px; }
.auth__form input { width: 100%; min-height: 46px; }
.auth__fine { font-size: 13px; color: var(--color-muted); text-align: center; }
.auth__go { width: 100%; justify-content: center; min-height: 46px; margin-top: 4px; }
.auth__switch { display: block; margin-top: 18px; text-align: center; color: var(--color-ink-2); font-size: 14px; }
@media (max-width: 52rem) { .auth__behind { grid-template-columns: 1fr; } .auth__behind .side { display: none; } }
.auth__form input { padding: 0 14px; border-radius: 10px; border: 1px solid var(--color-rule); background: var(--color-paper); color: var(--color-ink); font: inherit; }
.auth__form input::placeholder { color: var(--color-muted); }
.auth__form input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; border-color: transparent; }

/* Opening-hook step: the custom box spans the grid and reveals its field + yes/no when picked. */
.choice--wide { grid-column: 1 / -1; }
.hook-custom { grid-column: 1 / -1; display: grid; gap: var(--space-sm); }
.hook-custom__box { display: none; gap: var(--space-sm); grid-template-columns: minmax(0, 1fr); }
.hook-custom:has(input[value="custom"]:checked) .hook-custom__box { display: grid; }
.hook-custom__box input[type="text"] { width: 100%; padding: 12px 14px; border-radius: var(--radius-inner); border: 0; background: var(--color-paper); box-shadow: 0 0 0 1px var(--shade-1); font: inherit; color: inherit; }
.hook-same { display: grid; gap: var(--space-2xs); }
.hook-same .label { margin: 0; font-size: var(--text-sm); }
.hook-same .check { min-height: 34px; font-size: var(--text-sm); }

/* Post to TikTok */
.tt-preview .result__video { margin-top: var(--space-xs); }
.tt-creator { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.tt-creator__img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.tt-creator p { margin: 0; }
.tt-connect { padding: var(--space-lg); }
.tt-form fieldset { border: 0; margin: 0 0 var(--space-xl); padding: 0; min-width: 0; }
.tt-disclose__opts { display: grid; gap: var(--space-2xs); margin-top: var(--space-sm); padding-left: var(--space-lg); }
.tt-disclose__opts .check { align-items: flex-start; }
.tt-disclose__opts .check input { margin-top: 3px; }
.tt-label-note:empty { display: none; }
.tt-label-note { margin: var(--space-xs) 0 0; font-size: var(--text-sm); }
.tt-consent { margin: var(--space-lg) 0 var(--space-md); }
.tt-consent a { color: inherit; }
.tt-submit { display: inline-block; }
.tt-posts { margin-top: var(--space-lg); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
