/* ── film.css — the stage, beat layers, HUD, drawer ──────────────────── */

#film { position: relative; }

#track {
  position: relative;
  width: 100%;
  height: 100px; /* set by the engine */
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  background: var(--ash-0);
}

body.is-loading #stage,
body.is-loading .hud,
body.is-loading .chapters { opacity: 0; }

.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: var(--ash-0);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.boot span {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

body:not(.is-loading) .boot { opacity: 0; visibility: hidden; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── beat layer ──────────────────────────────────────────────────────── */

.beat {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
  backface-visibility: hidden;
}

.beat-bg {
  position: absolute;
  inset: 0;
  background: var(--ash-0);
}

.beat-bg.ash {
  background:
    radial-gradient(60% 50% at 50% 42%, #191f27 0%, #0d1116 55%, #060709 100%);
}

.beat-bg.steel {
  background:
    radial-gradient(70% 60% at 50% 32%, #16334f 0%, #0b1a29 48%, #05080c 100%);
}

.beat-bg.deep {
  background:
    radial-gradient(80% 70% at 50% 100%, #0f2740 0%, #070d15 60%, #04060a 100%);
}

.beat-bg.gold {
  background:
    radial-gradient(65% 55% at 50% 46%, #2c2110 0%, #17110a 48%, #07060a 100%);
}

.beat-bg.dawn {
  background:
    linear-gradient(180deg, #2a1c07 0%, #4a2f0b 26%, #6b4510 46%, #2b1a06 72%, #0a0705 100%);
}

.beat-bg.black { background: #000; }

/* the artwork plate — carries the film's slow push-in.
   Shape and line rasterise smoothly under scale, so this gives the frame life
   without the pixel-snapping that a scroll-linked translate puts on glyphs. */
.art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: scale(calc(1 + var(--p, 0) * 0.05));
  transform-origin: 50% 50%;
}

/* ── water light ──────────────────────────────────────────────────────
   Caustics: moving light through water, painted over the artwork and under
   the type. The tile is generated noise, so it never repeats visibly
   ("random"), and it is animated by transform only — the browser moves a
   finished texture instead of re-rendering a filter each frame, which is
   why this costs almost nothing and cannot judder. */

.caustics {
  position: absolute;
  inset: -25%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.16;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='520' height='520'><filter id='c' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.01 0.015' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncR type='table' tableValues='0 0.95 0 0.7 0'/><feFuncG type='table' tableValues='0 0.95 0 0.7 0'/><feFuncB type='table' tableValues='0 0.95 0 0.7 0'/></feComponentTransfer></filter><rect width='520' height='520' filter='url(%23c)'/></svg>");
  background-size: 520px 520px;
  animation: caustic-a 28s linear infinite;
}

/* a second, coarser pass travelling the other way makes the movement
   read as water rather than as a sliding texture */
.caustics::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='700' height='700'><filter id='d' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.006 0.009' numOctaves='2' seed='21' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncR type='table' tableValues='0 0 0.85 0 0'/><feFuncG type='table' tableValues='0 0 0.85 0 0'/><feFuncB type='table' tableValues='0 0 0.85 0 0'/></feComponentTransfer></filter><rect width='700' height='700' filter='url(%23d)'/></svg>");
  background-size: 700px 700px;
  opacity: 0.55;
  animation: caustic-b 41s linear infinite;
}

@keyframes caustic-a {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-520px, 260px, 0); }
}

@keyframes caustic-b {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(700px, -350px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .caustics, .caustics::after { animation: none; }
}

/* only the beat on screen pays for the animation */
.caustics, .caustics::after { animation-play-state: paused; }
.beat.is-live .caustics,
.beat.is-live .caustics::after { animation-play-state: running; }
/* legibility veil: above the artwork, below the type, on every typed beat —
   so a prop can never win a fight with a sentence */
.veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(58% 46% at 50% 50%,
    rgba(3, 5, 8, 0.72),
    rgba(3, 5, 8, 0.44) 54%,
    rgba(3, 5, 8, 0.1) 76%,
    rgba(3, 5, 8, 0) 90%);
}

.content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 26px);
  padding: clamp(72px, 11vh, 140px) var(--pad) clamp(96px, 14vh, 160px);
  text-align: center;
  /* deliberately no transform here: a slow scroll-linked drift makes glyphs
     snap between pixel positions (visible as hopping). Words stay still and
     dissolve; the artwork carries the movement. */
}

.content > * { max-width: 30ch; }
.content.wide > * { max-width: 46ch; }

/* ── light passing through the line ───────────────────────────────────
   Each word is its own span (app.js splits them at build time) and the
   bright phase is staggered by word index, so a band of light travels
   across the sentence one word at a time. Colour is preserved: every word
   settles to its own --rest, so emphasised words stay gold. */

.line { --rest: #ccd5e0; }
.key { --rest: #f2f5f9; }
.line em, .key em { --rest: var(--gold-ink); }

/* the sweep is driven from app.js: two or three words hold .is-lit at a
   time, so only those repaint instead of every word animating at once */
.line .w,
.key .w {
  color: var(--rest);
  transition: color 460ms linear, text-shadow 460ms linear;
}

.line .w.is-lit,
.key .w.is-lit {
  color: #fff8ec;
  text-shadow:
    0 0 12px rgba(255, 246, 224, 1),
    0 0 34px rgba(255, 224, 154, 0.75),
    0 0 70px rgba(231, 189, 114, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .line .w, .key .w { transition: none; }
}

/* kind-specific framing.
   NB: `ch` measures the *element's own* font size. Wrappers like .quote and
   .statchip inherit 16px while their text runs at 40px+, so the cap goes on
   the paragraph inside, not on the wrapper. */
.k-quote .content > *,
.k-verse .content > *,
.k-stat .content > * { max-width: none; }

.quote p { max-width: 22ch; }
.verse p { max-width: 24ch; }
.statchip .statline { max-width: 30ch; }

/* ── type treatments per kind ────────────────────────────────────────── */

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 8.4vw, 128px);
  line-height: 0.94;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #fff;
}

.wordmark span {
  display: block;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 0.14em;
  font-size: 0.72em;
  margin-top: 0.18em;
}

.wordmark.end { font-size: clamp(34px, 7vw, 104px); }

.sub {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(11px, 1.05vw, 14px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}

/* epigraph under the wordmark — the thesis, in the leader's own source */
.content > .epigraph {
  max-width: 44ch;
  margin: clamp(16px, 2.4vh, 30px) 0 0;
  text-wrap: balance;
}

.epigraph p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(16px, 1.72vw, 26px);
  line-height: 1.5;
  color: var(--ink);
}

.epigraph p em {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #fff;
}

.epigraph cite {
  display: block;
  margin-top: 0.9em;
  font-family: var(--sans);
  font-style: normal;
  font-size: clamp(8.5px, 0.7vw, 10px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.tagline {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(19px, 2.15vw, 31px);
  letter-spacing: 0.01em;
  color: var(--gold-ink);
}

/* stat chip */
.statchip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
  padding: clamp(20px, 2.6vw, 34px) clamp(22px, 3vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.008));
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 90px -40px rgba(0, 0, 0, 0.9);
}

.statchip .statline {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 2.35vw, 34px);
  line-height: 1.24;
  color: #fff;
  text-wrap: balance;
}

.statchip .statline b {
  font-weight: 600;
  color: var(--accent);
}

.statchip .statfoot {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(9px, 0.68vw, 10.5px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* scene title cards — chapter openers */
.slate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.slate .num {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(9px, 0.7vw, 11px);
  letter-spacing: 0.5em;
  color: var(--accent);
}

.slate .name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 4vw, 62px);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

/* pause marker */
.pause-mark {
  position: absolute;
  top: clamp(78px, 12vh, 130px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: clamp(9px, 0.68vw, 10.5px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}

.pause-mark::before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  animation: pulse-ring 3.4s var(--ease) infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ── HUD ─────────────────────────────────────────────────────────────── */

.hud {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  transition: opacity 0.5s var(--ease);
}

.hud-top {
  top: 0;
  height: var(--hud-h);
  padding: 0 var(--pad);
  justify-content: space-between;
  pointer-events: none;
}

.hud-top::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 120px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent);
  pointer-events: none;
  z-index: -1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  text-decoration: none;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.brand:hover { color: #fff; }

.brand-mark {
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.hud-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hud-tc {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  min-width: 4.2em;
  text-align: right;
}

.hud-sep { color: var(--ink-4); }

.hud-bottom {
  bottom: 0;
  gap: clamp(12px, 2vw, 30px);
  padding: 0 var(--pad) calc(16px + env(safe-area-inset-bottom));
  height: 74px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.transport,
.tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  border-radius: 2px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.btn svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.btn-play { color: #fff; border-color: rgba(231, 189, 114, 0.4); }
.btn-play .icon-pause { display: none; }
body.is-playing .btn-play .icon-play { display: none; }
body.is-playing .btn-play .icon-pause { display: block; }

.btn-text {
  width: auto;
  min-width: 34px;
  padding: 0 10px;
  height: 30px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.btn-text.is-on {
  color: #05070a;
  background: var(--gold);
  border-color: var(--gold);
}

/* ── viewing modes ────────────────────────────────────────────────────
   Present = the audience view (default). Studio = the production view.
   Everything below is what separates the two.                          */

.modeswitch {
  display: flex;
  align-items: stretch;
  height: 30px;
  margin-right: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.modeswitch button {
  padding: 0 9px;
  border: 0;
  background: none;
  color: var(--ink-4);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}

.modeswitch button:hover { color: var(--ink-2); }

.modeswitch button.is-on {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* presentation: no slate, no timecode, no pauses named, no director's notes */
.is-presenting .hud-top,
.is-presenting .chapters,
.is-presenting .pause-mark,
.is-presenting .note,
.is-presenting .statfoot,
.is-presenting .leader .rec,
.is-presenting .content > .kicker { display: none; }

/* presentation: the drawer is a scene index, not the script */
.is-presenting .sheet-beat { display: none; }
.is-presenting .sheet-scene { padding: 20px 24px 18px; }

/* presentation: only what a viewer needs — play, step, position, fullscreen */
.is-presenting #btn-type { display: none; }

/* ...and the transport sleeps until the viewer moves */
.is-presenting .hud-bottom {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}

.is-presenting.is-awake .hud-bottom,
.is-presenting .hud-bottom:focus-within { opacity: 1; pointer-events: auto; }

/* the mode switch is an author tool: invisible unless the bar is hovered */
.is-presenting .modeswitch { opacity: 0; transition: opacity 0.25s; }
.is-presenting .hud-bottom:hover .modeswitch,
.is-presenting .modeswitch:focus-within { opacity: 1; }

/* rail */
.rail {
  position: relative;
  flex: 1 1 auto;
  height: 30px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  min-width: 80px;
}

.rail-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.rail-fill {
  position: absolute;
  left: 0;
  height: 1px;
  width: 0%;
  background: linear-gradient(90deg, var(--steel), var(--gold));
}

.rail-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rail-ticks i {
  position: absolute;
  top: 50%;
  width: 1px;
  height: 7px;
  margin-top: -3px;
  background: rgba(255, 255, 255, 0.32);
}

.rail-ticks i.pause {
  height: 11px;
  margin-top: -5px;
  background: rgba(231, 189, 114, 0.75);
}

.rail-head {
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

/* chapters nav */
.chapters {
  position: fixed;
  right: calc(var(--pad) * 0.42);
  top: 50%;
  transform: translateY(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}

.chapters button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border: 0;
  background: none;
  color: var(--ink-4);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.chapters button .tick {
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease), background 0.35s;
}

.chapters button .lbl {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.35s, transform 0.35s;
  white-space: nowrap;
}

.chapters button:hover,
.chapters button:focus-visible { color: var(--ink-2); }

.chapters button:hover .lbl,
.chapters button:focus-visible .lbl { opacity: 1; transform: translateX(0); }

.chapters button:hover .tick { width: 22px; }

.chapters button.is-active { color: var(--gold); }
.chapters button.is-active .tick { width: 26px; background: var(--gold); }
.chapters button.is-active .lbl { opacity: 1; transform: translateX(0); }

/* shot note overlay */
.note {
  position: fixed;
  left: var(--pad);
  bottom: 92px;
  z-index: 68;
  width: min(300px, 34vw);
  padding: 12px 14px;
  border-left: 1px solid var(--gold);
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

body.show-notes .note { opacity: 1; transform: translateY(0); }

.note-kicker {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.note-body {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* type toggle */
body.hide-type .content .line,
body.hide-type .content .key,
body.hide-type .content .q,
body.hide-type .content .quote,
body.hide-type .content .verse,
body.hide-type .content .statchip,
body.hide-type .content .kicker { opacity: 0; transition: opacity 0.35s; }

/* fade chrome away while playing so the recording is clean */
body.is-playing .hud-top,
body.is-playing .chapters { opacity: 0.25; }
body.is-playing .hud-top:hover,
body.is-playing .chapters:hover { opacity: 1; }

/* ── script drawer ───────────────────────────────────────────────────── */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  width: min(460px, 92vw);
  display: flex;
  flex-direction: column;
  background: #0a0c10;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  transform: translateX(102%);
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.drawer.is-open { transform: translateX(0); }

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-head h2 {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.drawer-meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.btn-close { flex: none; }
.btn-close svg { width: 12px; height: 12px; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 60px;
  scrollbar-width: thin;
  scrollbar-color: #262e38 transparent;
}

.sheet-scene {
  display: block;
  width: 100%;
  padding: 18px 24px 10px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.015);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.sheet-scene:hover { background: rgba(255, 255, 255, 0.05); }

.sheet-scene.is-current {
  background: rgba(231, 189, 114, 0.09);
  box-shadow: inset 2px 0 0 var(--gold);
}

.sheet-scene .tag {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

.sheet-scene h3 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.sheet-scene .time {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.sheet-beat {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 24px 12px;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.sheet-beat:hover { background: rgba(255, 255, 255, 0.04); }

.sheet-beat.is-current {
  border-left-color: var(--gold);
  background: rgba(231, 189, 114, 0.07);
}

.sheet-beat .row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 4px;
}

.sheet-beat .td {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  flex: none;
  min-width: 40px;
}

.sheet-beat .vb {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.sheet-beat .txt {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.42;
  color: var(--ink-2);
}

.sheet-beat .shot {
  margin: 5px 0 0;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-4);
}

.sheet-beat.is-question .txt { color: #fff; font-size: 16px; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.scrim[hidden] { display: none; }

/* first-run scroll cue */
.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 104px;
  z-index: 69;
  margin: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: opacity 0.8s var(--ease);
  pointer-events: none;
}

.scroll-hint::after {
  content: "";
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, var(--ink-3), transparent);
  animation: hint-drop 2.4s var(--ease) infinite;
}

@keyframes hint-drop {
  0%, 100% { opacity: 0.25; transform: translateY(-4px); }
  50% { opacity: 0.9; transform: translateY(2px); }
}

body.has-scrolled .scroll-hint,
body.is-playing .scroll-hint,
body.is-loading .scroll-hint { opacity: 0; }

/* ── responsive ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .chapters { display: none; }
  .note { display: none; }
  .hud-bottom { height: 66px; gap: 10px; }
  .content { padding: 78px 22px 110px; }
  .content > * { max-width: 24ch; }
}

@media (max-width: 620px) {
  #btn-speed { display: none; }
  .hud-meta { font-size: 9px; letter-spacing: 0.2em; }
  .brand-name { display: none; }
}
