/* CASTL Prompter — app styles (2026-11-08)
   CASTL Studio's architect's-drawing language: ivory, onyx and aged brass; Gloock for display,
   Bricolage Grotesque for reading, Space Mono for numbers only. Hairline rules, square corners,
   no shadows. Buttons wear the shield's pointed base, and the record button is the shield itself. */

@font-face { font-family: "Gloock"; src: url("fonts/gloock-latin-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/space-mono-latin-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --onyx: #0E0E0E;
  --charcoal: #1E1D1A;
  --ivory: #F6F0E8;
  --sand: #D8C9B4;
  --warm-grey: #B9AA98;
  --brass: #C8A45D;
  --brass-deep: #B58B3B;
  --slate: #6F7372;
  --brick: #B9472F;
  --ivory-text: rgba(246, 240, 232, .76);
  --ivory-rule: rgba(216, 201, 180, .2);
  --ink-text: rgba(30, 29, 26, .78);
  --ink-rule: rgba(30, 29, 26, .16);
  --grid: linear-gradient(rgba(30, 29, 26, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 29, 26, .055) 1px, transparent 1px);
  --font-display: "Gloock", Georgia, serif;
  --font-body: "Bricolage Grotesque", -apple-system, system-ui, sans-serif;
  --font-num: "Space Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-draw: cubic-bezier(.65, 0, .25, 1);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  /* prompter settings, set from JS */
  --fs: 34px;
  --lh: 1.38;
  --pw-h: 36;
  --pw-alpha: .62;
  --pw-width: 92;
  --read-at: .3;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--onyx); color: var(--ivory); font-family: var(--font-body); font-size: 16px; line-height: 1.45; overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
[hidden] { display: none !important; }
svg { display: block; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 1.5px solid var(--brass); outline-offset: 2px; }

/* ---------- buttons ---------- */
.button { --btn-fill: var(--brass); --btn-ink: var(--onyx); --btn-surface: var(--charcoal);
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 26px 9px; color: var(--btn-ink); font-weight: 600; font-size: .9375rem; letter-spacing: .01em; transition: transform .2s var(--ease), color .16s; }
.button::before, .button::after { content: ""; position: absolute; z-index: -1; clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); }
.button::before { inset: 0; background: var(--btn-fill); transition: background-color .16s; }
.button:active { transform: translateY(1px) scale(.98); }
.button-primary { --btn-fill: var(--brass); --btn-ink: var(--onyx); }
.button-primary:active::before { background: var(--brass-deep); }
.button-dark { --btn-fill: var(--charcoal); --btn-ink: var(--ivory); }
.button-ghost { --btn-fill: rgba(246, 240, 232, .5); --btn-ink: var(--ivory); }
.button-ghost::after { inset: 1.5px 1.5px 2.5px; background: var(--btn-surface); }
.button.small { min-height: 46px; padding: 0 18px 8px; font-size: .875rem; }
.textlink { min-height: 44px; padding: 0 4px; color: inherit; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--brass); }
.textlink.strong { color: var(--brass); font-weight: 650; text-decoration: none; font-size: 1.0625rem; }
.ib { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ivory); }
.ib svg, .dock-btn svg, .new-script svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: calc(var(--st) + 24px) 24px calc(var(--sb) + 24px); background: var(--ivory); background-image: var(--grid); background-size: 28px 28px; color: var(--charcoal); overflow-y: auto; }
.intro-inner { width: min(100%, 420px); text-align: left; }
.intro-shield { width: 92px; height: auto; margin-bottom: 28px; overflow: visible; }
.intro-shield .guide { fill: none; stroke: rgba(181, 139, 59, .35); stroke-width: 3; stroke-dasharray: 8 10; opacity: 0; animation: guides 1.6s var(--ease) .1s forwards; }
.intro-shield .draw { fill: transparent; stroke: var(--brass-deep); stroke-width: 9; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s var(--ease-draw) .3s forwards, fill .5s var(--ease) 1.35s forwards; }
@keyframes guides { 30% { opacity: 1; } 100% { opacity: .45; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill { to { fill: var(--brass); stroke-width: 0; } }
.intro-kicker { margin: 0 0 6px; font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-deep); }
.intro h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(3.4rem, 17vw, 5rem); line-height: .95; letter-spacing: -.01em; }
.intro-lede { margin: 18px 0 30px; max-width: 30ch; font-size: 1.1875rem; line-height: 1.4; color: var(--ink-text); }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.intro-note { margin: 34px 0 0; padding-top: 14px; border-top: 1px solid var(--ink-rule); font-size: .875rem; color: rgba(30, 29, 26, .62); }
.intro-note.warn { color: var(--brick); }

/* ---------- stage ---------- */
.stage { position: fixed; inset: 0; background: var(--onyx); }
.viewport { position: absolute; inset: 0; overflow: hidden; background: var(--onyx); }
#cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--onyx); }
.stage[data-fit="cover"] #cam { object-fit: cover; }
.stage[data-mirror-preview="true"] #cam { transform: scaleX(-1); }
.frame { position: absolute; pointer-events: none; }
.grid, .safezone { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.grid { background:
  linear-gradient(90deg, transparent calc(33.333% - .5px), rgba(246, 240, 232, .32) calc(33.333% - .5px) calc(33.333% + .5px), transparent calc(33.333% + .5px) calc(66.666% - .5px), rgba(246, 240, 232, .32) calc(66.666% - .5px) calc(66.666% + .5px), transparent calc(66.666% + .5px)),
  linear-gradient(transparent calc(33.333% - .5px), rgba(246, 240, 232, .32) calc(33.333% - .5px) calc(33.333% + .5px), transparent calc(33.333% + .5px) calc(66.666% - .5px), rgba(246, 240, 232, .32) calc(66.666% - .5px) calc(66.666% + .5px), transparent calc(66.666% + .5px)); }
.stage[data-grid="true"] .grid, .stage[data-safezone="true"] .safezone { opacity: 1; }
.safezone > div { position: absolute; display: flex; padding: 6px; border: 1px dashed rgba(200, 164, 93, .7); background: rgba(14, 14, 14, .28); }
.safezone span { font-size: .6875rem; color: var(--sand); }
.sz-right { right: 0; top: 34%; width: 15%; bottom: 20%; align-items: flex-end; }
.sz-right span { writing-mode: vertical-rl; }
.sz-bottom { left: 0; right: 0; bottom: 0; height: 20%; align-items: flex-end; }
.sz-top { left: 20%; right: 20%; top: 0; height: 8%; justify-content: center; align-items: flex-end; }
.nocam { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 0 32px; text-align: center; background: var(--charcoal); background-image: linear-gradient(rgba(216, 201, 180, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(216, 201, 180, .05) 1px, transparent 1px); background-size: 28px 28px; }
.nocam svg { width: 54px; height: auto; fill: rgba(200, 164, 93, .5); margin-top: 26vh; }
.nocam p { margin: 0; max-width: 30ch; color: var(--ivory-text); }

/* ---------- HUD ---------- */
.hud { position: absolute; z-index: 6; top: var(--st); left: 0; right: 0; height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-family: var(--font-num); font-size: .8125rem; color: var(--ivory); pointer-events: none; }
.hud-left, .hud-right { display: flex; align-items: center; gap: 10px; }
.rec-dot { width: 9px; height: 9px; background: var(--slate); clip-path: polygon(50% 0, 100% 22%, 100% 62%, 50% 100%, 0 62%, 0 22%); }
.stage.is-recording .rec-dot { background: var(--brick); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.rec-time { letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.target { position: relative; width: 64px; height: 3px; background: rgba(246, 240, 232, .22); }
.target-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brass); }
.target.over .target-fill { background: var(--brick); }
.left-time { color: var(--sand); }
.meter { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.meter i { width: 3px; height: 100%; background: rgba(246, 240, 232, .22); }
.meter i:nth-child(1) { height: 30%; } .meter i:nth-child(2) { height: 48%; } .meter i:nth-child(3) { height: 66%; } .meter i:nth-child(4) { height: 84%; }
.meter i.on { background: var(--brass); }
.meter i.on.hot { background: var(--brick); }

/* ---------- prompter ---------- */
.prompter { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--st) + 34px); height: calc(var(--pw-h) * 1vh); background: rgba(14, 14, 14, var(--pw-alpha)); border-bottom: 1px solid rgba(200, 164, 93, .55); touch-action: none; user-select: none; -webkit-user-select: none; }
.stage[data-position="middle"] .prompter { top: calc(50% - var(--pw-h) * .5vh); border-top: 1px solid rgba(200, 164, 93, .55); }
.prompter-window { position: absolute; inset: 0; overflow: hidden; }
.stage[data-fade="true"] .prompter-window { -webkit-mask-image: linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.28) calc(var(--read-at) * 100% - 1.3em), #000 calc(var(--read-at) * 100% - .2em)); mask-image: linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.28) calc(var(--read-at) * 100% - 1.3em), #000 calc(var(--read-at) * 100% - .2em)); }
.script { position: absolute; left: 0; right: 0; top: 0; padding: 0 calc((100% - var(--pw-width) * 1%) / 2) 60vh; font-size: var(--fs); line-height: var(--lh); font-weight: 520; letter-spacing: .002em; color: var(--ivory); will-change: transform; overflow-wrap: break-word; }
.stage[data-align="center"] .script { text-align: center; }
.script p { margin: 0 0 .55em; }
.script h3 { margin: .3em 0 .25em; font-family: var(--font-display); font-weight: 400; font-size: .62em; line-height: 1.2; color: var(--brass); letter-spacing: .01em; }
.script h3::before { content: ""; display: inline-block; width: .5em; height: .62em; margin-right: .35em; background: var(--brass); clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); vertical-align: -.02em; }
.script .em { color: var(--brass); }
.script .note { font-size: .5em; line-height: 1.35; font-weight: 450; font-style: italic; color: var(--warm-grey); margin: .2em 0 .6em; }
.script .note::before { content: "Note  "; font-style: normal; font-weight: 650; color: var(--sand); }
.script .pz { display: inline-block; width: .9em; height: .62em; margin: 0 .1em; vertical-align: .05em; border-left: 3px solid var(--brass); border-right: 3px solid var(--brass); }
.script .w.heard { color: var(--sand); }
.script .gap { height: .45em; }
.script .end { margin-top: .8em; font-family: var(--font-display); font-size: .6em; color: var(--brass); }
.reading-line { position: absolute; left: 0; right: 0; top: calc(var(--read-at) * 100%); height: 0; pointer-events: none; }
.reading-line span { position: absolute; left: 0; top: -9px; width: 14px; height: 18px; background: var(--brass); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.reading-line::after { content: ""; position: absolute; left: 16px; right: 0; top: 0; border-top: 1px solid rgba(200, 164, 93, .35); }
.stage[data-readline="false"] .reading-line { display: none; }
.stage[data-flip-text="true"] .reading-line { top: calc((1 - var(--read-at)) * 100%); }
.stage[data-mirror-text="true"] .prompter-window { transform: scaleX(-1); }
.stage[data-flip-text="true"] .prompter-window { transform: scaleY(-1); }
.stage[data-mirror-text="true"][data-flip-text="true"] .prompter-window { transform: scale(-1, -1); }
.hold, .voice-state { position: absolute; right: 12px; bottom: 8px; margin: 0; padding: 3px 8px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: var(--onyx); background: var(--brass); }
.voice-state { left: 12px; right: auto; color: var(--ivory); background: rgba(14, 14, 14, .7); border: 1px solid var(--ivory-rule); font-weight: 500; }

/* ---------- countdown and toast ---------- */
.countdown { position: absolute; z-index: 8; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 9rem; line-height: 1; color: var(--ivory); pointer-events: none; }
.countdown:empty { display: none; }
.countdown b { font-weight: 400; animation: tick 1s var(--ease) both; text-shadow: none; }
.countdown b::after { content: ""; display: block; width: 40px; height: 4px; margin: 12px auto 0; background: var(--brass); }
@keyframes tick { from { opacity: 0; transform: scale(1.25); } 25% { opacity: 1; transform: scale(1); } 85% { opacity: 1; } to { opacity: 0; } }
.toast { position: absolute; z-index: 30; left: 50%; bottom: calc(var(--sb) + 190px); max-width: calc(100% - 40px); margin: 0; padding: 10px 14px; transform: translate(-50%, 8px); background: var(--ivory); color: var(--charcoal); font-size: .9rem; font-weight: 550; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- controls ---------- */
.controls { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; padding-bottom: var(--sb); background: rgba(14, 14, 14, .72); border-top: 1px solid var(--ivory-rule); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.speedbar { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 52px; padding: 0 8px; border-bottom: 1px solid var(--ivory-rule); }
.speed { display: flex; align-items: baseline; gap: 6px; min-width: 104px; justify-content: center; min-height: 44px; padding-top: 10px; }
.speed b { font-family: var(--font-num); font-weight: 400; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.speed span { font-size: .75rem; color: var(--sand); }
.mode { min-height: 44px; padding: 0 10px; border-left: 1px solid var(--ivory-rule); font-size: .8125rem; font-weight: 600; color: var(--brass); }
.dock { display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr; align-items: center; height: 92px; padding: 0 6px; }
.dock-btn { display: grid; justify-items: center; gap: 5px; min-height: 56px; padding-top: 4px; font-size: .6875rem; font-weight: 550; color: var(--ivory-text); }
.dock-btn svg { width: 24px; height: 24px; color: var(--ivory); }
.dock-btn:active { color: var(--brass); }
#btn-play svg { fill: currentColor; stroke: none; width: 20px; height: 24px; }
.dock-btn[aria-pressed="true"] { color: var(--brass); }
.dock-btn[aria-pressed="true"] svg { color: var(--brass); }
.dock-btn:disabled { opacity: .35; }
.rec { width: 76px; height: 80px; margin: 0 8px; }
.rec svg { width: 100%; height: 100%; overflow: visible; }
.rec-outline { fill: none; stroke: var(--ivory); stroke-width: 3; }
.rec-core { fill: var(--brick); transition: transform .25s var(--ease), opacity .2s; transform-origin: 50% 50%; }
.rec-stop { fill: var(--brick); opacity: 0; transform: scale(.4); transform-origin: 50px 52px; transition: transform .25s var(--ease), opacity .2s; }
.rec:active .rec-core { transform: scale(.92); }
.stage.is-recording .rec-core, .stage.is-counting .rec-core { opacity: 0; transform: scale(.5); }
.stage.is-recording .rec-stop, .stage.is-counting .rec-stop { opacity: 1; transform: scale(1); }
.stage.is-recording .rec-outline { stroke: var(--brick); }
.stage.is-recording .speedbar .mode, .stage.is-recording #btn-flip { opacity: .35; pointer-events: none; }
.stage.is-recording #btn-scripts, .stage.is-recording #btn-settings { opacity: .35; pointer-events: none; }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(14, 14, 14, .5); }
.sheet { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-height: 78vh; display: flex; flex-direction: column; background: var(--charcoal); color: var(--ivory); border-top: 1px solid var(--brass); padding-bottom: var(--sb); animation: sheet-in .28s var(--ease) both; }
.sheet::before { content: ""; position: absolute; top: -1px; left: 50%; width: 96px; height: 12px; transform: translateX(-50%); background: var(--brass); clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%); }
.sheet-full { top: calc(var(--st) + 10px); max-height: none; }
@keyframes sheet-in { from { transform: translateY(24px); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 14px 12px 6px 20px; border-bottom: 1px solid var(--ivory-rule); }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.1; }
.tabs { display: flex; gap: 22px; }
.tabs button { padding: 6px 0 8px; border-bottom: 2px solid transparent; color: var(--warm-grey); }
.tabs button[aria-selected="true"] { color: var(--ivory); border-color: var(--brass); }
.tabs h2 span { font-family: var(--font-num); font-size: .9rem; color: var(--brass); }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 8px 20px 24px; }
.hint { margin: 10px 0 6px; font-size: .875rem; color: var(--warm-grey); }
.new-script { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; border-bottom: 1px solid var(--ivory-rule); color: var(--brass); font-weight: 600; }
.script-list, .take-list { list-style: none; margin: 0; padding: 0; }
.script-list li, .take-list li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--ivory-rule); }
.script-list .open { flex: 1; display: grid; gap: 2px; min-height: 68px; padding: 10px 0; text-align: left; }
.script-list .open b { font-weight: 600; font-size: 1.0625rem; }
.script-list .open small, .take-list small { font-size: .8125rem; color: var(--warm-grey); }
.script-list li.current .open b::before { content: ""; display: inline-block; width: 9px; height: 11px; margin-right: 8px; background: var(--brass); clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); }
.row-btn { min-height: 44px; padding: 0 10px; font-size: .875rem; font-weight: 550; color: var(--sand); }
.row-btn.danger { color: #E08A74; }
.take-list li { padding: 10px 0; }
.take-list video { width: 54px; height: 96px; object-fit: cover; background: var(--onyx); flex: none; }
.take-list .info { flex: 1; display: grid; gap: 2px; padding-left: 8px; }
.empty { padding: 28px 0; color: var(--warm-grey); }

/* editor */
.editor { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .8125rem; font-weight: 600; color: var(--sand); }
.field input, .field textarea { width: 100%; border: 1px solid var(--ivory-rule); border-radius: 0; background: var(--onyx); padding: 12px 14px; font-size: 17px; color: var(--ivory); -webkit-appearance: none; appearance: none; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brass); }
.field.grow { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 36vh; }
.field textarea { flex: 1; min-height: 0; resize: none; line-height: 1.5; }
.ed-stats { margin: 0; font-family: var(--font-num); font-size: .8125rem; color: var(--sand); }
.ed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.format-help { padding: 12px 14px; border: 1px solid var(--ivory-rule); font-size: .9rem; color: var(--ivory-text); }
.format-help p { margin: 4px 0; }
.format-help code { font-family: var(--font-num); font-size: .85em; color: var(--brass); }

/* settings */
.settings { padding-top: 0; }
.set-group { padding: 18px 0 8px; border-bottom: 1px solid var(--ivory-rule); }
.set-group h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; color: var(--brass); }
.set-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; min-height: 52px; padding: 6px 0; }
.set-row > label, .set-row > .lbl { font-size: .9375rem; font-weight: 500; }
.set-row .help { grid-column: 1 / -1; margin: -2px 0 2px; font-size: .8125rem; color: var(--warm-grey); }
.set-row output { font-family: var(--font-num); font-size: .8125rem; color: var(--sand); }
.set-row input[type="range"] { grid-column: 1 / -1; width: 100%; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: rgba(246, 240, 232, .25); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 26px; margin-top: -12px; background: var(--brass); border: 0; border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); }
input[type="range"]::-moz-range-track { height: 2px; background: rgba(246, 240, 232, .25); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 26px; background: var(--brass); border: 0; border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); }
.seg { grid-column: 1 / -1; display: flex; border: 1px solid rgba(246, 240, 232, .3); }
.seg button { flex: 1; min-height: 42px; padding: 0 6px; font-size: .875rem; font-weight: 550; color: var(--ivory-text); }
.seg button + button { border-left: 1px solid rgba(246, 240, 232, .3); }
.seg button[aria-pressed="true"] { background: var(--ivory); color: var(--charcoal); }
.switch { position: relative; width: 50px; height: 28px; border: 1px solid rgba(246, 240, 232, .4); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--warm-grey); transition: transform .2s var(--ease), background-color .2s; }
.switch[aria-checked="true"] { border-color: var(--brass); }
.switch[aria-checked="true"]::after { transform: translateX(22px); background: var(--brass); }
.keys { margin: 4px 0 8px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .875rem; color: var(--ivory-text); }
.keys kbd { font-family: var(--font-num); font-size: .8rem; color: var(--brass); }
.set-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 0; }
.about { margin: 20px 0 8px; display: flex; align-items: center; gap: 10px; font-size: .8125rem; color: var(--warm-grey); }
.about svg { width: 18px; height: auto; fill: var(--brass); }

/* ---------- review ---------- */
.review { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; padding: calc(var(--st) + 14px) 18px calc(var(--sb) + 16px); background: var(--onyx); }
.review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ivory-rule); }
.review-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; }
.review-head p { margin: 0; font-family: var(--font-num); font-size: .8125rem; color: var(--sand); }
#review-video { flex: 1; min-height: 0; width: 100%; margin: 14px 0; background: var(--charcoal); object-fit: contain; }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.review-actions .button { flex: 1 1 140px; }
.review-actions .textlink { flex-basis: 100%; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .intro-shield .guide { animation: none; opacity: .45; }
  .intro-shield .draw { animation: none; stroke-dashoffset: 0; fill: var(--brass); stroke-width: 0; }
  .sheet, .countdown b { animation: none; }
  .stage.is-recording .rec-dot { animation: none; }
  * { transition-duration: .01ms !important; }
}
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; width: 560px; transform: translateX(-50%); animation: none; }
}
