:root {
  color-scheme: dark;
  --night: #08080a;
  --coal: #121215;
  --rule: #2a2a2f;
  --smoke: #8f8b83;
  --bone: #d8d1c0;
  --paper: #efe8d8;
  --red: #e3321f;
  font-family: "Special Elite", "Courier New", monospace;
  color: var(--bone);
  background: var(--night);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--night); }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sheet { width: min(1280px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 72px; }

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.wordmark { font-family: Oswald, sans-serif; font-weight: 600; letter-spacing: .22em; font-size: 15px; text-decoration: none; }
.wordmark span { color: var(--smoke); font-weight: 400; letter-spacing: .14em; font-size: 11px; }
.masthead nav { display: flex; gap: 22px; font-size: 13px; }
.masthead nav a { text-decoration: none; color: var(--smoke); }
.masthead nav a:hover { color: var(--paper); }

.stage-wrap { margin-top: 20px; }
.stage { position: relative; aspect-ratio: 16 / 9; width: 100%; max-height: calc(100svh - 190px); margin: 0 auto; background: #000; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
@supports (aspect-ratio: 1) { .stage { max-width: calc((100svh - 190px) * 16 / 9); } }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.caption { position: absolute; left: 3.2%; bottom: 5%; max-width: min(52%, 640px); pointer-events: none; font-size: clamp(11px, 1.45vw, 19px); line-height: 1.38; color: #16150f; }
.caption .box { background: var(--paper); padding: .7em .95em .75em; box-shadow: .35em .35em 0 rgba(0,0,0,.85); border: 1px solid #16150f; transform: rotate(-.4deg); }
.caption .box::after { content: '▌'; animation: blink .9s steps(1) infinite; color: #16150f; margin-left: 1px; }
.caption .box.done::after { content: ''; }
.caption.speech { left: 50%; transform: translateX(-50%); max-width: 70%; text-align: center; color: var(--paper); font-size: clamp(13px, 1.9vw, 26px); }
.caption.speech .box { background: none; border: 0; box-shadow: none; text-shadow: 0 2px 10px #000, 0 0 2px #000; transform: none; }
.caption.speech .who { display: block; font-family: Oswald, sans-serif; letter-spacing: .3em; font-size: .5em; color: var(--smoke); margin-bottom: .3em; }
@keyframes blink { 50% { opacity: 0; } }

.curtain { position: absolute; inset: 0; border: 0; background: radial-gradient(ellipse at 50% 45%, rgba(8,8,10,.25), rgba(8,8,10,.86) 70%); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, 1.4vw, 16px); text-align: center; }
.curtain[hidden] { display: none; }
.curtain-kicker { font-family: Oswald, sans-serif; letter-spacing: .5em; font-size: clamp(9px, 1vw, 13px); color: var(--smoke); }
.curtain-title { font-family: Limelight, serif; font-size: clamp(34px, 7vw, 96px); color: var(--paper); letter-spacing: .04em; line-height: 1; }
.curtain-play { margin-top: .6em; font-family: Oswald, sans-serif; letter-spacing: .3em; text-transform: uppercase; font-size: clamp(11px, 1.2vw, 15px); padding: .8em 1.6em; border: 1px solid var(--bone); color: var(--paper); }
.curtain:hover .curtain-play { background: var(--paper); color: var(--night); }
.curtain-play span { color: var(--red); margin-right: .5em; }
.curtain:hover .curtain-play span { color: var(--red); }
.curtain-note { font-size: 12px; color: var(--smoke); }
.stage-error { position: absolute; inset: auto 16px 16px; margin: 0; padding: 12px; background: var(--paper); color: #16150f; }

.controls { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.ctl { background: none; border: 1px solid var(--rule); width: 38px; height: 38px; cursor: pointer; font-size: 14px; flex: none; }
.ctl.text { width: auto; padding: 0 12px; font-family: Oswald, sans-serif; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.ctl:hover { border-color: var(--bone); }
.clock { font-family: Oswald, sans-serif; font-size: 13px; color: var(--smoke); letter-spacing: .08em; min-width: 86px; flex: none; }
.scrub { position: relative; flex: 1; height: 38px; display: flex; align-items: center; min-width: 80px; }
.scrub input { width: 100%; margin: 0; appearance: none; background: transparent; height: 38px; cursor: pointer; position: relative; z-index: 1; }
.scrub input::-webkit-slider-runnable-track { height: 2px; background: var(--rule); }
.scrub input::-moz-range-track { height: 2px; background: var(--rule); }
.scrub input::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--red); margin-top: -5px; }
.scrub input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--red); }
.ticks { position: absolute; inset: 0; pointer-events: none; }
.ticks i { position: absolute; top: 13px; width: 1px; height: 12px; background: var(--smoke); opacity: .5; }

.reels { display: grid; grid-template-columns: repeat(9, 1fr); border-bottom: 1px solid var(--rule); }
.reel { background: none; border: 0; border-left: 1px solid var(--rule); padding: 10px 8px 12px; text-align: left; cursor: pointer; color: var(--smoke); }
.reel:first-child { border-left: 0; padding-left: 0; }
.reel b { display: block; font-family: Oswald, sans-serif; font-weight: 400; font-size: 10px; letter-spacing: .16em; margin-bottom: 4px; }
.reel span { font-size: 12px; line-height: 1.25; }
.reel:hover, .reel[aria-current] { color: var(--paper); }
.reel[aria-current] b { color: var(--red); }

.notes { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; padding-top: 44px; }
.kicker { font-family: Oswald, sans-serif; letter-spacing: .4em; font-size: 11px; color: var(--red); margin: 0 0 12px; }
h1 { font-family: Limelight, serif; font-weight: 400; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; margin: 0 0 18px; color: var(--paper); }
h1 em { font-style: normal; color: var(--smoke); }
.notes-lede p:last-child { font-size: 15px; line-height: 1.65; color: var(--bone); margin: 0; }
.transcript summary { display: flex; justify-content: space-between; cursor: pointer; font-family: Oswald, sans-serif; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); list-style: none; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript[open] summary span:last-child { transform: rotate(45deg); }
.transcript ol { margin: 0; padding: 8px 0 0; list-style: none; counter-reset: reel; }
.transcript li { padding: 16px 0; border-bottom: 1px solid var(--rule); counter-increment: reel; }
.transcript h3 { margin: 0 0 8px; font-family: Oswald, sans-serif; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--paper); }
.transcript h3::before { content: counter(reel, decimal-leading-zero) '  '; color: var(--red); }
.transcript p { margin: 0 0 6px; font-size: 14px; line-height: 1.55; }
.transcript q { color: var(--paper); }
.fine { font-size: 12px; line-height: 1.6; color: var(--smoke); margin-top: 18px; }

@media (max-width: 860px) {
  .reels { grid-template-columns: repeat(3, 1fr); }
  .reel:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .notes { grid-template-columns: 1fr; gap: 28px; }
  .caption { max-width: 70%; }
}
@media (max-width: 520px) {
  .masthead nav { gap: 14px; font-size: 12px; }
  .clock { display: none; }
  .caption { max-width: 86%; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .caption .box::after { animation: none; }
}

/* Export mode: just the stage, at 1080p, with captions sized for video. */
.rendering { overflow: hidden; }
.rendering .masthead, .rendering .controls, .rendering .reels, .rendering .notes { display: none; }
.rendering .sheet { width: auto; padding: 0; }
.rendering .stage-wrap { margin: 0; }
.rendering .stage { position: fixed; inset: 0; width: 1920px; height: 1080px; max-width: none; max-height: none; box-shadow: none; }
.rendering .caption { font-size: 27px; max-width: 900px; }
.rendering .caption.speech { font-size: 38px; max-width: 1300px; }
.rendering .caption .box::after { animation: none; }
