:root {
  color-scheme: dark;
  --ground: #171310;
  --panel: #211b17;
  --board: #151714;
  --cream: #f8eddf;
  --muted: #c7b7a8;
  --line: #625044;
  --amber: #f8b97f;
  --good: #a9e1c0;
  --red: #ffa291;
  --display: Georgia, 'Times New Roman', serif;
  --body: system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--cream); font: 1rem/1.58 var(--body); }
a { color: inherit; text-underline-offset: .2em; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .47; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
h1,h2,h3,h4,p,ol { margin: 0; }
.wrap { width: min(1190px, calc(100% - 88px)); margin-inline: auto; }
.mast,.foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mast { min-height: 72px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: .62rem; align-items: center; text-decoration: none; font: 700 1.45rem/1 var(--display); white-space: nowrap; letter-spacing: -.045em; }
.brand span { width: .63rem; height: .63rem; background: var(--amber); display: block; border-radius: 50%; box-shadow: 0 0 .5rem #ffab707d; }
.mast nav { display: flex; gap: clamp(.9rem,4vw,2.45rem); font-size: .85rem; }
.mast nav a { text-decoration: none; color: var(--muted); }
.mast nav a:hover { color: var(--cream); text-decoration: underline; }
.intro { display: grid; grid-template-columns: .86fr 1.21fr; border: 1px solid var(--line); margin-block: 32px 56px; }
.intro-copy { padding: clamp(1.25rem,4.4vw,3.9rem); background: #291a17; align-content: end; }
.eyebrow { font: 650 .71rem/1.3 var(--mono); color: var(--amber); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.intro h1,.guide h1 { font: 400 clamp(3.65rem,7.9vw,7.4rem)/.83 var(--display); letter-spacing: -.088em; }
.intro .lede { max-width: 32ch; color: var(--muted); font-size: clamp(.95rem,1.45vw,1.1rem); margin-block: 1.22rem; }
.intro img { width: 100%; height: 100%; object-fit: cover; object-position: 67% 54%; min-height: 400px; }
.action { display: inline-flex; gap: .65rem; align-items: center; justify-content: center; min-height: 43px; padding: .53rem .78rem; text-decoration: none; border: 1px solid var(--line); border-radius: .24rem; font-size: .84rem; font-weight: 740; line-height: 1.25; }
.primary { background: var(--amber); color: #211510; border-color: var(--amber); }
.primary:hover { background: #ffd9b6; }
.secondary { background: transparent; color: var(--cream); }
.secondary:hover { background: #2f2621; }
.desk-head { display: flex; justify-content: space-between; align-items: end; gap: 1.2rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.desk-head h2,.guide h2 { font: 400 clamp(2.1rem,5.1vw,3.7rem)/1 var(--display); letter-spacing: -.057em; }
.desk-head p,.hint { color: var(--muted); font-size: .84rem; margin-top: .4rem; }
#desk { scroll-margin-top: 1rem; }
.desk-grid { display: grid; grid-template-columns: 1.12fr .9fr; gap: clamp(1rem, 3.5vw, 3rem); margin-block: .95rem 4rem; align-items: start; }
.live { background: var(--board); border: 1px solid #646758; border-top: 4px solid #a49c72; padding: clamp(1rem,3vw,2rem); }
.live-head,.rundown-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem 1rem; }
.live h3,.rundown h3 { font: 400 clamp(1.55rem,3vw,2.2rem)/1 var(--display); }
.status { font: 650 .78rem/1.45 var(--mono); color: var(--muted); }
.text-status { margin-top: .55rem; color: #e6ba99; }
.text-status:empty { display: none; }
.live h4 { font-size: clamp(1.05rem,2.5vw,1.5rem); margin-top: .9rem; overflow-wrap: anywhere; }
#clock { display: block; font: 700 clamp(3.35rem,8.8vw,7rem)/1.03 var(--mono); color: #f2e9cb; letter-spacing: -.09em; margin-block: .2rem; }
.live[data-phase=running] #clock,.stage[data-phase=running] #stage-clock { color: var(--good); }
.live[data-low] #clock,.stage[data-low] #stage-clock { color: var(--amber); }
.live[data-phase=done] #clock,.stage[data-phase=done] #stage-clock { color: var(--red); }
.crew { padding: .5rem .7rem; border-left: 2px solid var(--amber); background: #262821; color: var(--muted); font-size: .89rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-block: .75rem; }
#next-text { font-size: .88rem; color: var(--muted); margin-block: .9rem .35rem; }
#next-text:empty { display: none; }
.screen-control { margin-top: 1.15rem; border-top: 1px solid #545647; padding-top: .75rem; }
.screen-control select { width: auto; justify-self: start; min-width: 11rem; }
label { display: grid; gap: .27rem; font-size: .85rem; font-weight: 720; }
input,select,textarea { color: var(--cream); background: #211b17; border: 1px solid #837163; border-radius: .2rem; padding: .48rem .57rem; min-height: 40px; width: 100%; min-width: 0; }
input::placeholder,textarea::placeholder { color: #b3a496; }
textarea { resize: vertical; }
.text-button { border: 0; background: none; color: var(--amber); text-decoration: underline; text-underline-offset: .21em; font-weight: 630; font-size: .85rem; padding: .22rem 0; }
#cues { padding-left: 1.55rem; margin-top: .65rem; }
#cues li { border-bottom: 1px solid var(--line); padding: .5rem 0 .65rem .35rem; }
#cues li::marker { color: var(--muted); font: 500 .76rem var(--mono); }
#cues li[data-current] { background: #2a241b; padding-inline-end: .35rem; }
.cue-label { display: flex; justify-content: space-between; gap: 1rem; }
.cue-label strong,.cue-note { overflow-wrap: anywhere; }
.cue-label time { color: var(--amber); font: 500 .86rem/1.6 var(--mono); white-space: nowrap; }
.cue-note { color: var(--muted); font-size: .79rem; white-space: pre-wrap; margin-top: .22rem; }
.row-actions { display: flex; align-items: baseline; gap: .72rem; flex-wrap: wrap; }
#cue-form { border: 1px solid var(--line); background: var(--panel); padding: .95rem; margin-top: .95rem; }
#cue-form h4 { font-size: 1.03rem; margin-bottom: .65rem; }
.form-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(80px,.42fr); gap: .6rem; }
#cue-form > label { margin-top: .62rem; }
.foot { border-top: 1px solid var(--line); padding-block: 1.05rem 2.2rem; }
.foot > a:last-child { font-size: .83rem; color: var(--muted); }
.guide { max-width: 760px; padding-block: 3.55rem 4rem; }
.guide h1 { font-size: clamp(3.1rem,8vw,6.6rem); }
.guide .lede { margin-block: 1.35rem; font-size: 1.12rem; color: var(--muted); }
.guide section { border-top: 1px solid var(--line); padding-top: 1.15rem; margin-top: 1.65rem; }
.guide h2 { font-size: clamp(1.85rem,4.5vw,2.9rem); margin-bottom: .65rem; }
.guide li + li { margin-top: .5rem; }
.stage { min-height: 100svh; display: grid; place-items: center; background: #111411; text-align: center; }
.stage[data-mode=blackout] { background: #000; }
.stage-content { padding: clamp(1rem,7vw,5rem); width: 100%; }
#stage-title { font: 400 clamp(2.45rem,8vw,8rem)/1.03 var(--display); letter-spacing: -.045em; overflow-wrap: anywhere; }
#stage-status { color: #c9c9ab; font: 650 clamp(.86rem,2.5vw,2rem)/1.35 var(--mono); margin-bottom: .6rem; }
#stage-status:empty { display: none; }
#stage-clock { display: block; font: 700 clamp(4.5rem,22vw,21rem)/1.04 var(--mono); letter-spacing: -.095em; color: #fbf3d4; }
#stage-hint { color: #bbb9af; font-size: .9rem; margin-top: 1rem; }
#fullscreen { position: fixed; right: 1rem; bottom: 1rem; }
.stage[data-mode=blackout] #fullscreen { display: none; }
.sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
@media(max-width: 800px) { .wrap { width: calc(100% - 45px); } }
@media(max-width: 640px) {
  .wrap { width: calc(100% - 30px); }
  .mast { min-height: 59px; }
  .brand { font-size: 1.23rem; }
  .mast nav { font-size: .76rem; }
  .intro { grid-template-columns: 1fr; margin-block: 18px 35px; }
  .intro h1 { font-size: clamp(3.4rem,13vw,5.3rem); }
  .intro img { min-height: 0; height: auto; aspect-ratio: 1.8; }
  .desk-head { align-items: start; flex-direction: column; gap: .75rem; }
  .desk-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  #stage-clock { font-size: clamp(4.2rem,20vw,11rem); }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }
