/* Fonts are served from Vocial itself (SIL Open Font License): no visitor's details go to a font service. */
@font-face { font-family: "Instrument Sans"; src: url("../webfonts/InstrumentSans.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../webfonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../webfonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../webfonts/IBMPlexMono-SemiBold.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }

/* Vocial — warm paper, ink, one vermilion accent. Phone first; desktop just centres the same column. */

:root {
  --paper: #F4F1EA;
  --paper-2: #EBE6DB;
  --card: #FBFAF6;
  --ink: #15130F;
  --ink-2: #3F3C35;
  --ink-3: #6E6A5F;
  --rule: #D8D2C4;
  --accent: #E8492B;
  --accent-deep: #C23A1E;
  --accent-wash: #FBE6DF;
  --forest: #1F3A2E;
  --err: #A32419;
  --err-wash: #FBE9E5;
  --focus: #1F3A2E;

  --r-sm: 6px;
  --r-md: 10px;
  --gutter: 16px;
  --tabbar-h: 68px;

  --font-body: "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  /* Vocial is designed for daylight use on a phone. Keep it light everywhere. */
  :root { color-scheme: light; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Keep the page from ever panning sideways on a phone. */
img, video, svg { max-width: 100%; }

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper);
  padding: 8px 12px; border-radius: var(--r-sm); z-index: 10;
}
.skip:focus { top: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ frame */

.app {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  min-width: 0;
}

@media (min-width: 560px) {
  .app { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); min-height: 100vh; }
}

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 10px;
  min-width: 0;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: flex-start; gap: 2px;
  flex: none;
}
.wordmark .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 4px; }

.topbar-brand {
  font-size: 14px; color: var(--ink-3); text-decoration: none;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.main { padding: 4px var(--gutter) 28px; min-width: 0; }

.flash-stack { padding: 0 var(--gutter); }
.flash {
  margin: 0 0 8px; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--forest); color: var(--paper); font-size: 15px;
}
.flash.error { background: var(--err-wash); color: var(--err); }

/* ------------------------------------------------------------ type */

.intro { margin: 10px 0 22px; }
.eyebrow { margin: 0 0 6px; font-size: 14px; color: var(--ink-3); }
.eyebrow a { color: inherit; }
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}
h1 em, h2 em { font-style: italic; color: var(--accent-deep); }
.h-title { font-size: 30px; line-height: 1.1; }
.lede { margin: 12px 0 0; color: var(--ink-2); font-size: 16px; max-width: 36ch; }
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  margin: 0;
}
.hint { margin: 6px 0 0; font-size: 14px; color: var(--ink-3); }
.hint code, .block code { font-size: 13px; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.count { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.count-live { color: var(--ink); font-weight: 600; }
.link { font-size: 15px; font-weight: 600; color: var(--ink); text-underline-offset: 3px; }

/* ------------------------------------------------------------ blocks & rows */

.block { margin: 30px 0 0; }
.block > summary, details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.block-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 6px 0; margin: 0 0 4px;
}
details.block > summary.block-head::after {
  content: ""; width: 9px; height: 9px; flex: none; margin-left: 4px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
details.block[open] > summary.block-head::after { transform: rotate(225deg) translateY(-3px); }
details.block > summary.block-head .count { margin-left: auto; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rows > li { border-bottom: 1px solid var(--rule); }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 60px; padding: 12px 0; text-decoration: none; min-width: 0;
}
.row:hover .row-title { text-decoration: underline; text-underline-offset: 3px; }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.row-title { font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.row-meta { font-size: 14px; color: var(--ink-3); line-height: 1.4; }
.chev { color: var(--accent-deep); font-size: 18px; flex: none; }
.empty { padding: 14px 0; color: var(--ink-3); font-size: 15px; }
.empty a { color: var(--ink); }
.rows-tight > li { border-bottom: 0; }
.rows-tight { border-top: 0; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.kv-k { color: var(--ink-3); font-size: 14px; flex: none; }
.kv-v { text-align: right; font-size: 15px; overflow-wrap: anywhere; }

.status {
  font-size: 13px; font-weight: 600; white-space: nowrap; flex: none;
  padding: 3px 8px; border-radius: 4px; background: var(--paper-2); color: var(--ink-2);
}
.status-done { background: #DDE7E1; color: var(--forest); }
.status-rendering { background: var(--accent-wash); color: var(--accent-deep); }
.status-failed { background: var(--err-wash); color: var(--err); }
.status-queued { background: var(--paper-2); color: var(--ink-3); }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1px solid transparent; font-size: 16px; font-weight: 600;
  text-decoration: none; cursor: pointer; background: none; color: var(--ink);
  transition: background-color .15s ease, transform .05s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-quiet { border-color: var(--ink); background: transparent; }
.btn-quiet:hover { background: var(--paper-2); }
.btn-danger { color: var(--err); border-color: var(--rule); background: var(--card); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-record { border-color: var(--accent); color: var(--accent-deep); background: var(--card); min-width: 104px; }
.btn-record[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.actions-row { flex-direction: row; flex-wrap: wrap; margin-top: 14px; }
.actions-row .btn { flex: 1 1 auto; }
.actions form { margin: 0; }
.sched-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sched-actions form { margin: 0; }

/* ------------------------------------------------------------ prompt */

.prompt {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-md);
  padding: 14px; margin: 0;
}
.prompt textarea {
  width: 100%; min-height: 96px; resize: vertical; border: 0; outline: none; background: transparent;
  font-size: 17px; line-height: 1.45; padding: 2px 0; color: var(--ink);
}
.prompt textarea::placeholder, .prompt input::placeholder { color: var(--ink-3); }
.prompt:focus-within { border-color: var(--ink); }
.prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prompt-foot .hint { margin: 0; flex: 1 1 180px; }
.prompt-foot .btn { flex: none; }
.prompt-row { flex-direction: row; align-items: center; gap: 10px; padding: 8px; }
.prompt-row input {
  flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; outline: none;
  font-size: 17px; padding: 0 6px;
}
.prompt-row .btn { flex: none; }

/* ------------------------------------------------------------ forms */

.stack { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-set legend { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.req { color: var(--accent-deep); }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], input[type="tel"], input[type="search"], input[type="file"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--rule); background: var(--card); font-size: 16px; color: var(--ink);
  -webkit-appearance: none; appearance: none; min-width: 0;
}
input[type="file"] { padding: 9px 10px; font-size: 15px; }
input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 6px 10px; border: 1px solid var(--ink); border-radius: 4px;
  background: transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
select:focus, input:focus-visible, textarea:focus-visible { border-color: var(--ink); outline: 2px solid var(--focus); outline-offset: 2px; }
textarea { min-height: 96px; }
.field.has-error input[type="text"], .field.has-error input[type="email"], .field.has-error input[type="password"], .field.has-error input[type="tel"], .field.has-error input[type="url"], .field.has-error input[type="file"], .field.has-error select { border-color: var(--err); }
[aria-invalid="true"] { border-color: var(--err) !important; }
.error { margin: 0; font-size: 14px; color: var(--err); }
.notice { padding: 12px 14px; border-radius: var(--r-sm); margin: 14px 0 0; font-size: 15px; }
.notice p { margin: 0; }
.notice-error { background: var(--err-wash); color: var(--err); }
.notice-error strong { font-weight: 700; }
.field-set { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.field-set legend { padding: 0; margin-bottom: 8px; }
.field-set .field { margin-top: 12px; }

.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.swatch-field input[type="color"] {
  width: 100%; height: 52px; padding: 4px; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--card); cursor: pointer;
}
.swatch-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 3px; }

.photo-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 8px; }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pick-body {
  display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 6px;
  border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--card);
  font-size: 13px; color: var(--ink-2); min-height: 44px;
}
.pick-body img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--paper-2); }
.pick-none { width: 100%; aspect-ratio: 1; border-radius: 6px; border: 1px dashed var(--ink-3); }
.pick input:checked + .pick-body { border: 2px solid var(--ink); padding: 5px; }
.pick input:focus-visible + .pick-body { outline: 2px solid var(--focus); outline-offset: 2px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg-opt span, .seg-opt small { display: block; }
.seg-opt span { font-size: 15px; font-weight: 600; }
.seg-opt small { font-size: 13px; color: var(--ink-3); }
.seg-opt {
  padding: 12px 10px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--card); min-height: 64px;
}
.seg-opt:has(input:checked) { border: 2px solid var(--ink); padding: 11px 9px; }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg-opt:has(input:checked) small { color: var(--ink-2); }

/* ------------------------------------------------------------ player & progress */

.player { margin: 16px 0 0; background: var(--ink); border-radius: var(--r-md); overflow: hidden; }
.player video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--ink); }
.player-tall { aspect-ratio: 9 / 16; max-height: 72vh; width: min(100%, calc(72vh * 9 / 16)); margin-left: auto; margin-right: auto; }
.player-portrait { aspect-ratio: 4 / 5; max-height: 72vh; width: min(100%, calc(72vh * 4 / 5)); margin-left: auto; margin-right: auto; }
.player-square { aspect-ratio: 1; width: 100%; }

.progress-card { margin-top: 18px; padding: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-md); }
.progress-card h2 { margin-bottom: 12px; }
.bar { height: 8px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); transition: width .4s ease; }

.grid { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.tile { min-width: 0; }
.tile-link { display: block; text-decoration: none; }
.thumb { display: block; position: relative; border-radius: var(--r-sm); overflow: hidden; background: var(--ink); }
.thumb-tall { aspect-ratio: 9 / 16; }
.thumb-portrait { aspect-ratio: 4 / 5; }
.thumb-square { aspect-ratio: 1; }
.thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-state { position: absolute; inset: auto 8px 8px 8px; color: var(--paper); font-size: 13px; }
.tile-title { display: block; margin-top: 8px; font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.tile-meta { display: block; font-size: 13px; color: var(--ink-3); }

.empty-card { margin-top: 18px; padding: 24px 18px; border: 1px dashed var(--ink-3); border-radius: var(--r-md); text-align: center; color: var(--ink-2); }
.empty-card .btn { margin-top: 12px; }

.skip-line { text-align: center; margin: 22px 0 0; font-size: 15px; }
.skip-line a { color: var(--ink-2); }

/* ------------------------------------------------------------ schedule */

.sched { padding: 14px 0; }
.sched-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sched.is-paused .row-title { color: var(--ink-3); }
.sched > p { margin: 6px 0 0; }

/* ------------------------------------------------------------ you */

.clone-card { margin-top: 26px; padding: 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-md); }
.clone-card.is-ready { border-color: var(--forest); }
.clone-card .block-head { margin-bottom: 8px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.check { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid var(--ink-3); flex: none; position: relative; }
.checks li.is-done .check, .extra.is-done .check { background: var(--forest); border-color: var(--forest); }
.checks li.is-done .check::after, .extra.is-done .check::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
.checks .row-meta { font-weight: 400; }

.shots { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.shot { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.shot-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin: 0; }
.shot-form input[type="hidden"] { display: none; }
.shot-form input[type="file"] { grid-column: 1 / -1; }
.shot-form .btn { grid-column: 1 / -1; }
.shot-label { font-weight: 600; font-size: 15px; }
.shot-label .check-mark { color: var(--forest); font-weight: 700; }
.shot.is-done .shot-label { color: var(--ink); }

.kv-list { margin: 10px 0 0; }
.kv-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.kv-list dt { color: var(--ink-3); font-size: 14px; }
.kv-list dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.chip { display: inline-block; margin: 2px 6px 2px 0; padding: 3px 8px; border: 1px solid var(--rule); border-radius: 4px; font-size: 13px; }
.swatch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatch-row code { font-size: 13px; margin-right: 8px; }
.swatch-chip { width: 22px; height: 22px; border-radius: 5px; background: var(--c); border: 1px solid var(--rule); display: inline-block; }

/* ------------------------------------------------------------ onboarding */

.steps ol { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.steps .step-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { .steps li:not(.is-current) .step-name { visibility: hidden; } }
.steps li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; color: var(--ink-3); font-size: 12px; }
.steps li::before { content: ""; height: 3px; width: 100%; background: var(--rule); border-radius: 2px; order: -1; }
.steps li.is-done::before { background: var(--forest); }
.steps li.is-current::before { background: var(--accent); }
.step-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.steps li.is-current, .steps li.is-done { color: var(--ink); }
.step-name { overflow-wrap: anywhere; }

.takes { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--rule); counter-reset: take; }
.take { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.take-text { grid-column: 1 / -1; margin: 0; font-family: var(--font-display); font-size: 22px; line-height: 1.22; }
.take-state { grid-column: 1 / -1; font-size: 14px; color: var(--ink-3); min-height: 1.2em; }
.take-state.is-ok { color: var(--forest); font-weight: 600; }
.take-state.is-err { color: var(--err); }

/* ------------------------------------------------------------ tab bar */

.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--paper); border-top: 1px solid var(--rule);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 60px; padding: 8px 2px; text-decoration: none; color: var(--ink-3);
  font-size: 12px; font-weight: 500; position: relative; min-width: 0;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab span { white-space: nowrap; }
.tab.is-current { color: var(--ink); font-weight: 600; }
.tab.is-current::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 2px; background: var(--accent); border-radius: 2px;
}

/* ------------------------------------------------------------ small screens */

@media (max-width: 359px) {
  h1 { font-size: 32px; }
  .tab span { font-size: 11px; }
  .swatches { grid-template-columns: 1fr; }
  .seg { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ accounts & plan */

.topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.signout { margin: 0; }
.link-button {
  background: none; border: 0; padding: 8px 0; min-height: 40px; cursor: pointer;
  font-size: 14px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover { color: var(--ink); }

.allowance {
  margin: 0 0 18px; padding: 12px 14px; background: var(--card);
  border: 1px solid var(--rule); border-radius: var(--r-md);
}
.allowance p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.allowance strong { color: var(--ink); }
.bar-thin { height: 6px; }

.caps { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--rule); }
.cap { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.cap-state { font-size: 12px; font-weight: 600; color: var(--ink-3); padding-top: 2px; }
.cap.is-live .cap-state { color: var(--forest); }
.cap-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cap-label { font-weight: 600; font-size: 15px; }

.consent-card { margin-top: 18px; padding: 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-md); }
.consent-points { margin: 0; padding-left: 18px; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--forest); }

.ai-card { margin: 0 0 18px; padding: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-md); }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-head h2 { font-size: 20px; }
.ai-card .hint { margin: 6px 0 10px; }
.ai-card form { margin: 0; }
.ai-card .btn[disabled] { opacity: .55; cursor: not-allowed; }
.status-failed { background: var(--err-wash); color: var(--err); }

.look-stage { display: grid; place-items: center; background: var(--paper-2); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1; margin-top: 12px; }
.look-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.looks .look-photos { margin-top: 14px; }
.look-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip-btn { min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--rule); background: var(--card); font-size: 15px; font-weight: 600; cursor: pointer; }
.chip-btn[aria-pressed="true"] { border: 2px solid var(--ink); padding: 0 13px; }
.saved-looks form { margin: 0; }

.shot-row { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start; }
.shot-thumb { width: 72px; height: 72px; border-radius: var(--r-sm); overflow: hidden; background: var(--paper-2); border: 1px solid var(--rule); display: block; }
.shot-thumb img, .shot-preview { width: 72px; height: 72px; object-fit: cover; display: block; border-radius: var(--r-sm); }
.shot-empty { display: block; width: 100%; height: 100%; border: 1px dashed var(--ink-3); border-radius: var(--r-sm); box-sizing: border-box; }
.shot-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shot-preview { margin-top: 6px; border: 1px solid var(--rule); }
.shot-main .hint { margin: 0; }

[hidden] { display: none !important; }

.media-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.media-grid .thumb img, .media-grid .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-grid form { margin-top: 6px; }

.voice-style { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.voice-style audio { width: 100%; margin-top: 8px; }

.video-tips li { font-weight: 400; font-size: 15px; }
.clone-video-preview { width: 100%; max-height: 60vh; border-radius: var(--r-md); background: var(--ink); margin: 10px 0; }

.style-pick { display: grid; gap: 8px; margin-top: 8px; }
.style-opt { display: grid; grid-template-columns: 24px 1fr; gap: 2px 10px; align-items: start; padding: 12px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--card); cursor: pointer; }
.style-opt input { grid-row: span 2; margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--ink); }
.style-opt:has(input:checked) { border: 2px solid var(--ink); padding: 11px; }
.style-name { font-weight: 700; font-size: 15px; }
.music-row { margin-top: 12px; }

.still-preview { width: 100%; height: auto; border-radius: var(--r-md); display: block; margin-top: 8px; }

/* ------------------------------------------------------------ composer (one box, chips, send) */

.intro-tight { margin: 6px 0 16px; }
.mono { font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; letter-spacing: .02em; }

.composer {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 16px;
  padding: 12px 12px 10px; margin: 0 0 18px;
  box-shadow: 0 1px 0 rgba(21,19,15,.04), 0 10px 28px -14px rgba(21,19,15,.18);
}
.composer:focus-within { border-color: var(--ink-3); }
.composer.has-error { border-color: var(--err); }
.composer textarea {
  width: 100%; min-height: 84px; max-height: 320px; resize: none; border: 0; outline: none; background: transparent;
  padding: 4px 4px 0; font-size: 17px; line-height: 1.45; color: var(--ink); border-radius: 0;
}
.composer textarea:focus-visible { outline: none; }
.composer textarea::placeholder { color: var(--ink-3); }
.composer-err { padding: 0 4px; }
.composer-alert { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--err-wash); color: var(--err); font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cchip { position: static; }
.cchip > summary, .chip-add {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--rule); border-radius: 20px; background: var(--paper);
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.cchip > summary svg, .chip-add svg, .send svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.cchip > summary:hover, .chip-add:hover { border-color: var(--ink-3); color: var(--ink); }
.cchip > summary.is-set { background: var(--accent-wash); border-color: #F2B8A8; color: var(--accent-deep); }
.cchip[open] > summary { border-color: var(--ink); color: var(--ink); }
.chip-face { padding-left: 4px !important; }
.chip-face img, .avatar-empty { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-2); }
.avatar-empty { border: 1px dashed var(--ink-3); }
.chip-add { width: 40px; padding: 0; justify-content: center; position: relative; color: var(--ink); }
.chip-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; font-size: 0; }
.chip-add:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.send {
  margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; flex: none;
  display: inline-grid; place-items: center; background: var(--accent); color: #fff; cursor: pointer;
  transition: background-color .15s ease, transform .05s ease;
}
.send svg { width: 20px; height: 20px; stroke-width: 2.2; }
.send:hover { background: var(--accent-deep); }
.send:active { transform: scale(.96); }
.send:disabled { opacity: .55; cursor: progress; }
.send.is-busy svg { animation: nudge .8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }

/* Chip menus open as a sheet from the bottom of the column: thumb-reachable, never clipped. */
.menu {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 41;
  width: min(480px, 100%); max-height: min(72dvh, 560px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 16px 16px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(21,19,15,.22);
  animation: sheet-up .18s ease-out;
}
.menu::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--rule); margin: 2px auto 10px; }
@keyframes sheet-up { from { transform: translate(-50%, 24px); opacity: 0; } }
.cchip[open] > summary::before {
  content: ""; position: fixed; inset: 0; z-index: 40; background: rgba(21,19,15,.34); cursor: default;
}
.menu-title { margin: 0 0 6px; font-family: var(--font-display); font-size: 24px; line-height: 1.1; color: var(--ink); }
.menu-note { margin: 0 0 10px; font-size: 14px; color: var(--ink-3); }
.menu-link { display: inline-block; margin-top: 10px; font-size: 15px; font-weight: 600; color: var(--ink); text-underline-offset: 3px; min-height: 44px; line-height: 44px; }

.opt {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px; margin: 0 -12px;
  border-radius: 10px; cursor: pointer;
}
.opt:hover { background: var(--paper); }
.opt input[type=radio] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); order: 9; margin-left: auto; }
.opt:has(input:checked) { background: var(--paper); }
.opt.is-off { cursor: not-allowed; }
.opt.is-off strong { color: var(--ink-3); }
.opt-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.opt-text strong { font-size: 16px; font-weight: 600; }
.opt-text small { font-size: 14px; color: var(--ink-3); line-height: 1.35; }
.opt-face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.opt-logo { border-radius: 8px; object-fit: contain; background: var(--paper); }
.opt-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); flex: none; }
.opt-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; }
.ratio { flex: none; border: 1.8px solid var(--ink-2); border-radius: 3px; width: 18px; }
.ratio-1 { height: 30px; margin: 0 6px; } .ratio-2 { height: 22px; width: 18px; margin: 0 6px; } .ratio-3 { height: 18px; margin: 0 6px; }

/* Style picker: each option is a tiny poster of the look it makes. */
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-look { position: relative; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.opt-look input { position: absolute; opacity: 0; pointer-events: none; }
.opt-look .mini { aspect-ratio: 4 / 3; }
.opt-look .mini-video { aspect-ratio: 9 / 16; background: #111; }
.mini-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.opt-look:has(input:checked) .mini { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.opt-look:has(input:focus-visible) .mini { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.opt-look .opt-text strong { font-size: 15px; }
.opt-look .opt-text small { font-size: 13px; }

/* ---- mini posters: drawn in CSS from the same rules the renderer uses */
.mini { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; background: #111; color: #fff; }
.mini-cinematic { background: #000; justify-content: space-between; }
.mini-cinematic .m-band { height: 14%; background: #000; flex: none; }
.mini-cinematic .m-scene {
  flex: 1; display: grid; place-items: end start; padding: 8px 10px;
  background: var(--photo, linear-gradient(160deg, #6b6458, #23211d)) center 30% / cover no-repeat; filter: grayscale(.35) contrast(1.05);
}
.m-serif { font-family: var(--font-display); font-size: 20px; line-height: 1; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.mini-kinetic { background: #F1EDE4; color: var(--ink); justify-content: center; align-items: center; gap: 4px; }
.m-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(21,19,15,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(21,19,15,.08) 1px, transparent 1px); background-size: 12px 12px; }
.m-k1 { position: relative; font-size: 22px; text-shadow: none; }
.m-box { position: relative; background: var(--accent); color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .02em; padding: 2px 8px; }
.mini-diagram { background: #0F0F0E; align-items: center; justify-content: center; }
.m-svg { width: 46%; height: auto; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255,255,255,.35)); }
.m-mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 9px; letter-spacing: .08em; color: #d8d4cc; margin-top: 2px; }
.mini-classic { background: var(--photo, linear-gradient(160deg, #8a7f6c, #3c372f)) center 30% / cover no-repeat; justify-content: flex-end; }
.m-card { margin: 0 10% 10%; padding: 8px; background: var(--card); border-radius: 4px; display: grid; gap: 4px; }
.m-card span { height: 5px; border-radius: 2px; background: var(--ink); }
.m-card span + span { width: 60%; background: var(--accent); }
.mini-auto { background: var(--paper-2); align-items: center; justify-content: center; }
.m-auto { stroke: var(--ink-2); filter: none; width: 40%; }

/* ---- kit: the person, logo and product this video is built from; tap to change */
.kit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kit-item {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 7px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); color: var(--ink); cursor: pointer;
  font-family: inherit; text-align: center; -webkit-tap-highlight-color: transparent;
}
.kit-item:hover { border-color: var(--ink-3); }
.kit-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.kit-thumb { position: relative; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; flex: none; background: var(--paper-2); display: grid; place-items: center; }
.kit-thumb img, .kit-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kit-logo { background: #fff; }
.kit-logo img { object-fit: contain; padding: 4px; }
.kit-badge { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: rgba(21,19,15,.72); display: grid; place-items: center; }
.kit-badge svg { width: 8px; height: 8px; fill: #fff; }
.kit-plus { font-size: 20px; line-height: 1; color: var(--ink-3); }
.kit-text { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.kit-text strong { font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kit-text small { font-size: 12px; color: var(--ink-3); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kit-item.is-empty { border-style: dashed; background: transparent; }
.kit-item.is-empty .kit-thumb { border: 1px dashed var(--ink-3); background: transparent; }
.kit-item.is-off .kit-thumb { opacity: .4; }

/* ---- add menu, logo chip, drop target */
.chip-addmenu > summary.chip-add { width: 40px; padding: 0; justify-content: center; }
.opt-file { position: relative; }
.opt-file input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.opt-file:focus-within { outline: 2px solid var(--focus); outline-offset: -2px; }
.chip-logo { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; flex: none; }
.menu-btn { display: block; border: 0; background: none; padding: 0; cursor: pointer; text-decoration: underline; font-family: inherit; }
.composer-ok { margin: 0; padding: 0 4px; font-size: 14px; color: var(--ink-2); }
.drop-overlay {
  position: absolute; inset: 0; z-index: 5; border-radius: inherit; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: color-mix(in srgb, var(--accent-wash) 92%, transparent); border: 2px dashed var(--accent);
  color: var(--accent-deep); font-size: 16px; font-weight: 600; pointer-events: none;
}
.drop-overlay svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer.is-dropping .drop-overlay { display: flex; }
.composer.is-dropping { min-height: 180px; }

/* ---- tray: what's attached to this video */
.tray { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 2px; margin: -2px -2px 0; scrollbar-width: none; }
.tray::-webkit-scrollbar { display: none; }
.tray-item { position: relative; flex: none; width: 64px; height: 80px; border-radius: 8px; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; }
.tray-item img, .tray-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray-remove {
  position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(21,19,15,.72); color: #fff; font-size: 16px; line-height: 24px; cursor: pointer;
}
.tray-remove::after { content: ""; position: absolute; inset: -10px; }
.tray-role {
  position: absolute; left: 3px; right: 3px; bottom: 3px; min-height: 22px; border: 0; border-radius: 6px; padding: 0 4px;
  background: rgba(21,19,15,.72); color: #fff; font-family: inherit; font-size: 11px; font-weight: 600; line-height: 22px; text-align: center; cursor: pointer;
}
.tray-role.is-static { cursor: default; background: rgba(21,19,15,.5); }
.tray-role:disabled { opacity: .6; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.lib { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lib-item { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--paper-2); cursor: pointer; }
.lib-item img, .lib-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-item input { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; margin: 0; z-index: 1; accent-color: var(--accent); }
.lib-item:has(input:checked) { outline: 3px solid var(--accent); outline-offset: -3px; }
.lib-kind { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(21,19,15,.7); padding: 1px 6px; border-radius: 3px; }
.lib-empty { grid-column: 1 / -1; font-size: 15px; color: var(--ink-2); padding: 8px 0; }

/* ---- starter cards and recent renders: a sideways shelf of posters */
.cards {
  list-style: none; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 6px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: none;
}
.cards::-webkit-scrollbar { display: none; }
.cards > li { flex: none; width: 138px; scroll-snap-align: start; }
.card { display: flex; flex-direction: column; gap: 3px; text-decoration: none; }
.poster { aspect-ratio: 9 / 16; width: 100%; border-radius: 10px; margin-bottom: 6px; }
.card:hover .poster, .card:focus-visible .poster { outline: 2px solid var(--ink); outline-offset: 2px; }
.card .m-serif { font-size: 24px; }
.card .m-box { font-size: 17px; }
.poster-video { position: relative; overflow: hidden; background: var(--ink); display: grid; place-items: center; }
.poster-video img, .poster-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-title { font-weight: 600; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.card-meta { font-size: 13px; color: var(--ink-3); line-height: 1.3; }

.idea-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.idea {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px;
  background: var(--card); text-decoration: none; min-height: 44px;
}
.idea:hover { border-color: var(--ink-3); }
.idea-kind { font-size: 12px; font-weight: 700; color: var(--accent-deep); }
.idea-text { font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }

/* ------------------------------------------------------------ read-aloud voice recorder */

.prompter {
  margin-top: 6px; padding: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: 16px;
  box-shadow: 0 10px 28px -14px rgba(21,19,15,.18);
}
.prompter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 8px; color: var(--ink-3); }
.rec-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px;
  background: var(--paper-2); color: var(--ink-2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.rec-pill.is-live { background: var(--err-wash); color: var(--err); }
.rec-pill.is-live .rec-dot { background: var(--err); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

.lines { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 2px; }
.line {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; min-height: 48px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink-3);
  transition: background-color .2s ease, color .2s ease;
}
.line-text { font-size: 19px; line-height: 1.35; font-weight: 500; }
.line.is-current { background: var(--accent-wash); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.line.is-done:not(.is-current) .line-text { color: var(--ink-2); }
.line-state { font-size: 13px; font-weight: 600; min-height: 0; }
.line-state:empty { display: none; }
.line.is-done .line-state, .line-state.is-ok { color: var(--forest); }
.line-state.is-err { color: var(--err); font-weight: 500; }

.prompter-bar { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--paper); }
.mic {
  width: 56px; height: 56px; border-radius: 50%; border: 0; flex: none; cursor: pointer;
  display: grid; place-items: center; background: var(--err); color: #fff;
  box-shadow: 0 4px 12px -4px rgba(163,36,25,.6);
}
.mic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mic[aria-pressed="true"] { background: var(--ink); box-shadow: 0 0 0 6px rgba(163,36,25,.18); }
.mic[aria-pressed="true"] svg { display: none; }
.mic[aria-pressed="true"]::after { content: ""; width: 18px; height: 18px; border-radius: 3px; background: #fff; }
.wave { flex: 1; min-width: 0; height: 56px; display: block; }
.prompter-status { margin: 12px 4px 0; font-size: 15px; color: var(--ink-2); }
.prompter .count-live { margin: 6px 4px 0; font-size: 14px; }
.menu-sub { margin-top: 22px; }
.lib-group { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.lib-toggle { margin: 16px 0 0; font-size: 14px; }
.mini-story { background: var(--photo, linear-gradient(170deg, #b9925a, #3b2a1c)) center 30% / cover no-repeat; justify-content: flex-end; padding: 0 10% 18%; }
.m-story { position: relative; font-family: "Archivo", var(--font-body); font-weight: 900; font-size: 15px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.m-story i { font-family: var(--font-display); font-weight: 400; font-size: 1.25em; color: #F2E14C; }
.card .m-story { font-size: 20px; }

/* ------------------------------------------------------------ scenes of you */
.scene-source { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.scene-source img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.scene-source .hint { margin: 0; }
.scene-products { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; }
.scene-products .pick { flex: none; width: 84px; }
.scene-presets { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scene-btn {
  width: 100%; min-height: 56px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); cursor: pointer; text-align: left;
}
.scene-btn:hover { border-color: var(--ink-3); }
.scene-btn:disabled { opacity: .55; cursor: progress; }
.scene-btn.is-busy .scene-cost::after { content: " · making…"; }
.scene-label { font-weight: 600; font-size: 15px; }
.scene-cost { font-size: 12px; color: var(--ink-3); }
.scene-grid { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scene-grid-kept { grid-template-columns: repeat(3, 1fr); }
.scene-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.scene-card img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--paper-2); display: block; }
.scene-card.is-pending { aspect-ratio: 9 / 16; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; }
.scene-actions { display: flex; gap: 6px; }
.scene-actions form { flex: 1; margin: 0; }
.scene-actions .btn { width: 100%; }
.ai-label-note { background: #FFF6D6; color: var(--ink); border: 1px solid #EAD68A; }

/* ------------------------------------------------------------ post it */
.postkit { margin-top: 26px; }
.postkit textarea, .postkit input[type=text] { font-size: 15px; line-height: 1.45; background: var(--card); }
.post-tabs { display: flex; gap: 6px; margin: 14px 0 10px; overflow-x: auto; padding: 2px; }
.post-tab { flex: none; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--rule); background: var(--paper); font-weight: 600; font-size: 14px; cursor: pointer; }
.post-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.post-panel { display: flex; flex-direction: column; gap: 8px; }
.post-panel .btn { align-self: flex-start; }
.webhook-box { margin-top: 16px; }
.ok-text { color: var(--forest); font-weight: 600; }
.secret { word-break: break-all; }

/* ------------------------------------------------------------ how to shoot */
.howto { margin: 12px 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.howto > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px; font-weight: 600; font-size: 15px; cursor: pointer; }
.howto > summary::after { content: "+"; font-size: 20px; color: var(--ink-3); }
.howto[open] > summary::after { content: "−"; }
.howto-sub { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--ink-3); }
.howto-list { margin: 0; padding: 0 16px 14px 34px; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.howto-list strong { color: var(--ink); }

/* ------------------------------------------------------------ setup: one photo + business photos */
.hero-shot { margin-top: 4px; }
.hero-drop {
  position: relative; display: grid; place-items: center; gap: 10px; aspect-ratio: 4 / 5; width: min(100%, 300px); margin: 0 auto;
  border: 2px dashed var(--ink-3); border-radius: 16px; background: var(--card); cursor: pointer; overflow: hidden; text-align: center;
}
.hero-drop:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.hero-shot.is-done .hero-drop { border: 2px solid var(--forest); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-empty svg { width: 64px; height: 64px; fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.hero-label { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 10px; border-radius: 10px; background: rgba(21,19,15,.78); color: #fff; font-weight: 600; font-size: 15px; }
.more-shots { border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.more-shots > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; font-weight: 600; font-size: 15px; cursor: pointer; }
.more-shots .shots { margin: 0 14px 6px; }
.biz-drop {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; margin-top: 8px;
  border: 2px dashed var(--rule); border-radius: 12px; background: var(--card); cursor: pointer; font-weight: 600;
}
.biz-drop:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.biz-drop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.biz-drop.has-files { border-style: solid; border-color: var(--forest); color: var(--forest); }
.sorted-grid { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sorted-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sorted-item img, .sorted-item video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: var(--paper-2); display: block; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; }
.role-btn { min-height: 36px; padding: 0 2px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font-size: 13px; font-weight: 600; cursor: pointer; }
.role-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.coverage { margin-top: 24px; }
.coverage .checks { margin-bottom: 16px; }
.mini-explainer { background: #EEEDE9; }
.m-split-top { flex: 1; display: grid; place-items: center; }
.m-step { background: #151514; color: #BEF24A; font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 600; padding: 6px 8px; border-radius: 6px; }
.m-split-bottom { flex: 1; background: var(--photo, linear-gradient(170deg, #8d8170, #3a332b)) center 30% / cover no-repeat; }
.card .m-step { font-size: 12px; }
.scene-card.is-pending { gap: 10px; padding: 14px; text-align: center; }
.scene-wait { font-size: 13px; color: var(--ink-2); }
.scene-failed { padding: 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }

/* ------------------------------------------------------------ talking video: record with guide rails, or upload */
.cv { display: grid; gap: 12px; }
.cv-done { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.cv-done video { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: #111; }
.cv-done p { margin: 0; font-size: 15px; color: var(--ink-2); }
.cv-choose { display: grid; gap: 8px; }
.cv-option {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 64px; width: 100%;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer;
  font-family: inherit; text-align: left;
}
.cv-option:hover { border-color: var(--ink-3); }
.cv-option:focus-visible, .cv-option:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.cv-option:disabled { cursor: not-allowed; opacity: .7; }
.cv-option input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cv-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); flex: none; }
.cv-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-deep); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.cv-studio { display: grid; gap: 12px; }
.cv-stage { position: relative; width: min(100%, 420px, calc(50dvh * 3 / 4)); margin: 0 auto; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #111; }
.cv-live, .cv-review { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cv-live { transform: scaleX(-1); }
.cv-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cv-count {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display);
  font-size: 96px; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.cv-timer {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 14px; background: rgba(21,19,15,.7); color: #fff; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cv-hint {
  position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; padding: 8px 10px; border-radius: 10px;
  background: rgba(21,19,15,.72); color: #fff; font-size: 14px; line-height: 1.35; text-align: center;
}
.cv-script { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cv-script li { font-size: 18px; line-height: 1.35; color: var(--ink-3); padding: 4px 8px; border-radius: 8px; transition: color .2s, background-color .2s; }
.cv-script li.is-now { color: var(--ink); background: var(--accent-wash); font-weight: 600; }
.cv-script li.is-said { color: var(--ink-2); }
.cv-note { margin: 0; font-size: 14px; color: var(--ink-3); }
.cv-bar { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cv-bar .btn { min-height: 44px; }
.cv-bar .btn[disabled] { opacity: .6; cursor: default; }
.cv-progress { display: grid; gap: 6px; }
.cv-progress p { margin: 0; font-size: 14px; color: var(--ink-2); }
.cv-meter { height: 8px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.cv-meter span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
.cv-meter.is-working span { width: 100% !important; background: linear-gradient(90deg, var(--accent) 0 40%, var(--accent-wash) 40% 60%, var(--accent) 60%) 0 0 / 200% 100%; animation: cv-busy 1.2s linear infinite; }
@keyframes cv-busy { to { background-position: -200% 0; } }
.cv-ok { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); color: var(--ink); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .cv-meter.is-working span { animation: none; } }
.cv-timer .rec-dot { background: var(--err); animation: blink 1.2s ease-in-out infinite; }
.cv-guide[hidden], .cv-studio [hidden] { display: none !important; }
.cv-line {
  position: absolute; left: 10px; right: 10px; top: 44px; margin: 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(21,19,15,.78); color: #fff; font-size: 19px; font-weight: 600; line-height: 1.3; text-align: center;
}
.cv-script li { font-size: 16px; }

/* ------------------------------------------------------------ quick start: optional extras */
details.more { border-top: 1px solid var(--rule); padding-top: 4px; }
details.more > summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 15px; color: var(--ink-2); cursor: pointer; }
details.more[open] > summary { margin-bottom: 8px; }
.extras > summary { cursor: pointer; }
.extras-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.extra { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 4px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.extra:hover { background: var(--paper); }
.extra .row-main { flex: 1; min-width: 0; }
.extra.is-done .row-title { color: var(--ink-2); }

/* ------------------------------------------------------------ template gallery */
.tgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
@media (min-width: 700px) { .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tgrid-row { grid-auto-flow: column; grid-auto-columns: minmax(150px, 42%); grid-template-columns: none; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 6px; margin: -2px -2px 0; }
.tgrid-row::-webkit-scrollbar { display: none; }
.tgrid-row > li { scroll-snap-align: start; }
.tcard-item[hidden] { display: none; }
.tcard { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; min-width: 0; }
.tcard:focus-visible { outline: none; }
.tcard:focus-visible .tcard-media { outline: 2px solid var(--focus); outline-offset: 2px; }
.tcard-media { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #111; }
.tcard-media video, .tcard-media .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard-style { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 10px; background: rgba(21,19,15,.72);
  color: #fff; font-size: 12px; font-weight: 600; }
.tcard:hover .tcard-media { box-shadow: 0 10px 26px -12px rgba(21,19,15,.5); }
.tcard .card-title { font-size: 15px; font-weight: 600; line-height: 1.25; }
.tcard .card-meta { font-size: 13px; color: var(--ink-3); line-height: 1.3; }
.filter-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; margin: 0 -2px 10px; }
.filter-row::-webkit-scrollbar { display: none; }
.filter { flex: none; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--rule); background: var(--paper);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.filter .count { color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.filter.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter.is-on .count { color: inherit; opacity: .7; }
.tpl-pill { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 6px 6px 6px 12px;
  border-radius: 10px; background: var(--accent-wash); color: var(--accent-deep); font-size: 14px; }
.tpl-pill[hidden] { display: none; }
.tpl-pill-x { border: 0; background: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; color: inherit; cursor: pointer; }
.tpl-pill-x:hover { background: rgba(0,0,0,.06); }

/* ---- delete your own media; the hidden chip behind the Product tile */
.lib li { position: relative; display: flex; flex-direction: column; gap: 4px; }
.lib-static { cursor: default; }
.lib-del { min-height: 32px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lib-del:hover { border-color: var(--err); color: var(--err); }
.lib-del.is-armed { background: var(--err); border-color: var(--err); color: #fff; }
.chip-ghost { position: absolute; width: 0; height: 0; overflow: visible; }
.chip-ghost-summary { list-style: none; width: 0; height: 0; padding: 0 !important; border: 0 !important; min-height: 0 !important; }
.chip-ghost-summary::-webkit-details-marker { display: none; }

/* ---- voice picker with samples */
.voice-opt { gap: 8px; }
.voice-pick { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.voice-pick input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); }
.play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: var(--card);
  display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.play svg { width: 18px; height: 18px; fill: currentColor; }
.play.is-playing { background: var(--accent); border-color: var(--accent); color: #fff; }
.play.is-loading { opacity: .6; }
.voice-make { flex: none; font-size: 13px; font-weight: 600; color: var(--ink-2); }

.group-h { margin: 28px 0 8px; font-family: var(--font-display); font-size: 26px; font-weight: 400; color: var(--ink); }
.h-note { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; margin-left: 6px; }

/* fallbacks for the newer looks until their previews are built */
.mini-pop { background: #E8492B; align-items: center; justify-content: center; }
.mini-minimal { background: #F7F5F0; }
.mini-neon { background: #0b0718; box-shadow: inset 0 0 0 2px #ff3caa; }
.mini-retro { background: linear-gradient(160deg, #6b4a32, #2c1d14); }
.mini-polaroid { background: #E8785A; }
.mini-luxe { background: #0a0a0a; box-shadow: inset 0 0 0 1px #c9a96a; }

/* ---- one tap: any photo to an ad */
.photo-ad { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap;
  margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); }
.photo-ad h2 { margin: 0 0 2px; font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.photo-ad p { margin: 0; font-size: 14px; color: var(--ink-3); }
.photo-ad-text { flex: 1 1 200px; min-width: 0; }
.photo-ad-btn { position: relative; flex: none; }
.photo-ad-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-ad-btn:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- clone on/off switch */
.clone-switch { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 0 -12px 6px; border-radius: 10px;
  background: var(--paper); cursor: pointer; }
.clone-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--rule); transition: background-color .15s; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.clone-switch input:checked + .switch-track { background: var(--accent); }
.clone-switch input:checked + .switch-track .switch-knob { transform: translateX(18px); }
.clone-switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.opt.is-muted { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-knob { transition: none; } }

/* ------------------------------------------------------------ video editor */
.editor { display: grid; gap: 14px; padding-bottom: 96px; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.editor-grid .field span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.editor-grid select { width: 100%; min-height: 44px; }
.scene-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.scene-edit { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.scene-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scene-edit-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.hold { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.hold-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); font-size: 20px; cursor: pointer; }
.hold output { min-width: 46px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.shot-strip { list-style: none; margin: 0; padding: 2px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.shot-strip::-webkit-scrollbar { display: none; }
.shot-slot { position: relative; flex: none; width: 76px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; border: 0; padding: 0;
  background: #111; cursor: pointer; }
.shot-slot img, .shot-slot video { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-slot.is-changed { outline: 3px solid var(--accent); outline-offset: -3px; }
.shot-swap { position: absolute; left: 4px; right: 4px; bottom: 4px; border-radius: 6px; background: rgba(21,19,15,.72); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 22px; text-align: center; }
.scene-edit .field span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.scene-edit input[type=text], .scene-edit textarea { width: 100%; }
.editor-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--rule); display: grid; gap: 6px; max-width: 560px; margin: 0 auto; }
.picker { position: fixed; inset: 0; z-index: 50; background: rgba(21,19,15,.4); display: flex; align-items: flex-end; justify-content: center; }
.picker[hidden] { display: none; }
.picker-sheet { width: min(560px, 100%); max-height: 78dvh; overflow-y: auto; background: var(--card); border-radius: 16px 16px 0 0;
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
.picker-head { display: flex; align-items: center; justify-content: space-between; }
.picker-head h2 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 400; }
.pick-shot { width: 100%; border: 0; padding: 0; }

/* ---- templates inside the style menu; saving your own */
.style-tpls { grid-auto-columns: minmax(120px, 34%); margin-top: 4px; }
.style-tpls > li[hidden] { display: none; }
.tcard-del { margin-top: 6px; }
.save-template { margin: 8px 0 14px; }
.save-template > summary { list-style: none; display: inline-flex; cursor: pointer; }
.save-template > summary::-webkit-details-marker { display: none; }
.save-template[open] > summary { margin-bottom: 10px; }
.save-template .field span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }

/* ---- speak instead of typing */
.chip-mic { width: auto; min-width: 40px; padding: 0 10px; gap: 6px; }
.chip-mic.is-recording { background: var(--err); border-color: var(--err); color: #fff; animation: mic-pulse 1.2s ease-in-out infinite; }
.chip-mic.is-busy { opacity: .6; cursor: progress; }
.mic-time { font-size: 13px; font-variant-numeric: tabular-nums; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px rgba(200, 40, 40, .18); } }
@media (prefers-reduced-motion: reduce) { .chip-mic.is-recording { animation: none; } }

/* template previews: a lazy poster image, the clip on top once it plays */
.tcard-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard-media video, .mini-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard-media video:not([src]), .mini-video video:not([src]) { visibility: hidden; }
.mini-video { position: relative; }

/* ---- font sets */
.font-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.font-opt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--rule);
  border-radius: 10px; background: var(--paper); cursor: pointer; min-width: 0; }
.font-opt input { position: absolute; opacity: 0; pointer-events: none; }
.font-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.font-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.font-sample { font-size: 30px; line-height: 1.1; color: var(--ink); }
.font-opt .opt-text strong { font-size: 14px; }
.font-opt .opt-text small { font-size: 12px; }

/* ---- still posts */
.slide-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
.slide-list li { flex: 0 0 78%; max-width: 360px; scroll-snap-align: start; display: grid; gap: 6px; }
.slide-list img { width: 100%; border-radius: 10px; display: block; background: var(--paper-2); }

/* ---- plan list */
.plan-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.plan-row { padding: 12px; border: 1px solid var(--rule); border-radius: 10px; }
.plan-row.is-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.plan-row .hint { margin: 4px 0 0; }
/* ---- staff key banner */
.key-alert { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fff3e0; color: #5a3200; border: 1px solid #f0b46a; font-size: 14px; }
.key-alert a { color: inherit; font-weight: 600; }

/* ---- legal pages */
.legal { max-width: 680px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p, .legal li { font-size: 16px; line-height: 1.55; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.legal-list a { display: block; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.legal-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--rule); }
.legal-rule { border: 0; border-top: 1px solid var(--rule); margin: 32px 0 12px; }
.site-foot { margin: 40px 0 24px; text-align: center; font-size: 13px; color: var(--muted, #666); }
.site-foot a { color: inherit; margin: 0 6px; }

/* ---- staff admin: a working page, same paper-and-ink look as the rest of Vocial */
.adm-ok { display: flex; align-items: center; gap: 10px; }
.adm-problems ul { margin: 6px 0 0; padding-left: 18px; }
.adm-tabs { display: flex; gap: 4px; margin: 22px 0 6px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); padding: 2px 2px 0; }
.adm-tab { flex: 0 0 auto; padding: 10px 14px; text-decoration: none; color: var(--ink-3); font-weight: 600; font-size: 15px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 44px; display: inline-flex; align-items: center; }
.adm-tab.is-current { color: var(--ink); border-bottom-color: var(--accent); }
.adm-tab:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
.adm-intro { margin-top: 16px; }

.adm-facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adm-facts li { padding: 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); display: grid; gap: 2px; min-width: 0; }
.adm-fact-n { font-family: var(--font-display); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.adm-fact-l { font-weight: 600; font-size: 15px; }
@media (min-width: 720px) { .adm-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.adm-checks { list-style: none; padding: 0; margin: 10px 0 0; }
.adm-checks li { display: grid; grid-template-columns: 14px auto 1fr; align-items: center; column-gap: 10px; row-gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.adm-checks li .row-meta { grid-column: 2 / -1; }
.adm-state { font-size: 14px; color: var(--ink-3); justify-self: end; }
.adm-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--ink-3); flex: 0 0 auto; }
.adm-dot.is-ok { background: #2E7D4F; }
.adm-dot.is-bad { background: var(--err); }

.adm-keys, .adm-accounts, .adm-videos { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.adm-key { padding: 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); display: grid; gap: 8px; min-width: 0; }
.adm-key-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.adm-key-head > div { min-width: 0; }
.adm-key-head .row-meta { margin: 2px 0 0; }
.adm-key > .row-meta { margin: 0; overflow-wrap: anywhere; }
.adm-key-form { display: flex; gap: 8px; }
.adm-key-form input { flex: 1 1 auto; min-width: 0; }
.adm-key-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-badge { flex: 0 0 auto; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.adm-badge.is-ok { color: #2E7D4F; }
.adm-badge.is-credits, .adm-badge.is-error { color: #9A5B00; }
.adm-badge.is-invalid { color: var(--err); }
.adm-badge.is-unknown, .adm-badge.is-off { color: var(--ink-3); }

.adm-search { display: flex; gap: 8px; margin-top: 16px; }
.adm-search input { flex: 1 1 auto; min-width: 0; }
.adm-account { border: 1px solid var(--rule); border-radius: 10px; background: var(--card); min-width: 0; }
.adm-account summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; min-height: 44px; }
.adm-acc-main, .adm-acc-plan { display: grid; gap: 2px; min-width: 0; }
.adm-acc-main .row-meta { overflow-wrap: anywhere; }
.adm-acc-plan { text-align: right; font-weight: 600; flex: 0 0 auto; }
.adm-acc-body { padding: 0 14px 14px; display: grid; gap: 10px; }
.adm-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-inline select { width: auto; }

.adm-video { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.adm-video-main { display: grid; gap: 2px; min-width: 0; }
.adm-error { color: var(--err); overflow-wrap: anywhere; }
