:root {
  color-scheme: dark;
  --night: #241320;
  --stage: #341b30;
  --plum: #4c2840;
  --line: #705364;
  --ivory: #fff3de;
  --muted: #d6c2ce;
  --gold: #ffcc9c;
  --pink: #ffb7c9;
  --ink: #331b2b;
  --display: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--night); color: var(--ivory); font: 1rem/1.55 var(--sans); }
button, select, input { color: inherit; font: inherit; }
button, select, summary, a { touch-action: manipulation; }
button, select, summary { cursor: pointer; }
a { color: inherit; text-underline-offset: .24em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, h3[tabindex]:focus-visible { outline: 3px solid #ffd980; outline-offset: 3px; }
button:disabled { opacity: .50; cursor: default; }
button:not(:disabled):active, .btn:active { filter: brightness(.9); }
button, select, input { min-height: 44px; background: var(--stage); border: 1px solid #9f8193; border-radius: .35rem; padding: .48rem .83rem; }
button:not(:disabled):hover, select:hover, summary:hover { border-color: var(--gold); color: var(--gold); }
button, .btn, a { transition: color .14s, border-color .14s, background .14s; }
[hidden] { display: none !important; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 10; inset: 1rem auto auto 1rem; background: var(--ink); padding: .75rem; }
header { border-bottom: 1px solid #503648; }
.bar, main, footer { width: min(1184px, 90%); margin: auto; }
.bar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.45rem/1.2 var(--display); letter-spacing: -.045em; text-decoration: none; }
.brand img { flex: none; }
.nav, .langs { display: flex; align-items: center; }
.nav { gap: 1.6rem; flex-wrap: wrap; }
.nav a { font-size: .89rem; text-decoration: none; display: inline-grid; align-items: center; min-height: 44px; }
.nav-item { color: var(--muted); }
.langs { border: 1px solid var(--line); border-radius: 6px; padding: 1px; }
.langs a { text-align: center; min-width: 44px; font-family: var(--mono); }
.langs a[aria-current] { background: var(--plum); color: var(--gold); border-radius: 4px; }
.nav a:hover, .under:hover { color: var(--gold); }
.hero { display: grid; grid-template-columns: 1.12fr 1fr; align-items: center; gap: clamp(2.5rem, 5vw, 5rem); padding: clamp(2.8rem, 5vw, 5rem) 0; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -.055em; line-height: 1.04; }
.hero h1 { font-size: clamp(3.8rem, 6.3vw, 6.8rem); margin: 1.55rem 0; }
h1 em { display: block; font-weight: 400; color: var(--pink); }
.cue, .micro, .poster small, .act-tag, .lineup li small, .signal, .card-meta, .ticket-time { font: 650 .76rem/1.5 var(--mono); letter-spacing: .075em; text-transform: uppercase; }
.cue { color: var(--gold); display: flex; align-items: center; gap: .75rem; }
.cue::before { content: ''; width: 1.65rem; height: 2px; background: currentColor; }
.lead, .intro > p:last-child, .lineup > p:not(.cue), .kit > div > p:not(.cue), .guide p { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.lead { max-width: 42ch; font-size: 1.18rem; }
.hero-links, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.3rem; }
.hero-links { margin: 1.9rem 0 1.5rem; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: .65rem; min-height: 48px; padding: .7rem 1.18rem; border: 1px solid transparent; border-radius: .38rem; text-decoration: none; font-weight: 700; }
.btn.solid { background: var(--gold); color: var(--ink); }
.btn.solid:not(:disabled):hover { background: #ffdfb7; color: var(--ink); }
.btn.light { border-color: var(--line); background: transparent; color: var(--ivory); }
.play { width: 0; height: 0; border-top: .35rem solid transparent; border-bottom: .35rem solid transparent; border-left: .57rem solid var(--ink); }
.under { display: inline-flex; min-height: 44px; gap: .5rem; align-items: center; font-weight: 610; }
.facts { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .85rem; list-style: none; padding: 0; }
.facts li + li::before { content: '·'; margin-right: .6rem; color: var(--gold); }
.poster { position: relative; border: 1px solid #a67c78; background: #4f2539; padding: 6px; box-shadow: 7px 7px 0 #381e31; transform: rotate(1deg); }
.poster img { display: block; width: 100%; height: clamp(310px, 32vw, 446px); object-fit: cover; object-position: 50% 56%; }
.poster figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--ink); background: #f2c8a6; padding: .65rem 1.1rem; }
.poster small, .poster b { display: block; }
.poster b { font: italic 500 clamp(1.4rem,2.1vw,2rem)/1.25 var(--display); letter-spacing: -.035em; }
.ticket-time { padding: .25rem 0 .25rem 1rem; border-left: 1px dashed #956652; }
.game-wrap, .lineup, .kit, .guide { border-top: 1px solid #654358; padding: clamp(2.5rem,5vw,4rem) 0; scroll-margin: 1rem; }
.intro h1, .intro h2, .lineup h2, .kit h2, .guide h2 { margin: .75rem 0 1rem; font-size: clamp(2.3rem,4.1vw,4.3rem); }
.game-wrap { padding-bottom: 1rem; }
.console { margin-top: 1.7rem; background: var(--stage); border: 1px solid var(--line); border-radius: .75rem; box-shadow: 0 10px 36px #130a1226; overflow: hidden; }
.console-top, .setup, .actions, .score-head, .score-hint, #teams, #timer-status { padding-inline: clamp(1rem,3vw,2rem); }
.console-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; background: #412239; border-bottom: 1px solid var(--line); }
.signal { display: inline-flex; align-items: center; gap: .55rem; color: var(--pink); }
.signal::before { content: ''; height: .53rem; width: .53rem; background: var(--pink); border-radius: 50%; }
#stage { font-size: .88rem; }
.setup { display: flex; gap: 1.1rem; align-items: center; padding-block: 1rem; border-bottom: 1px solid #67465a; }
.setup label { display: grid; gap: .3rem; flex: 0 1 auto; color: var(--muted); font-size: .86rem; }
.setup select { color: var(--ivory); max-width: 100%; }
.setup p, .score-hint, .save-hint { color: var(--muted); font-size: .93rem; }
.setup p { max-width: 62ch; }
.play-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(145px, 20%); margin: clamp(1rem,3vw,2rem); border: 1px solid #ab7c88; border-radius: .4rem; overflow: hidden; }
.card-area { background: #f7e8d4; padding: clamp(1.15rem,3vw,2.3rem); color: var(--ink); }
.card-meta { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: space-between; color: #6b354f; }
#question { margin: 1.1rem 0 .2rem; font: 500 clamp(1.45rem,2.55vw,2.6rem)/1.22 var(--display); text-wrap: pretty; white-space: pre-line; }
#question:focus-visible { outline-color: #743d62; }
.answer { font-weight: 680; margin-top: 1rem; border-top: 1px solid #b696a0; padding-top: .85rem; }
.timer-box { display: grid; gap: .45rem; align-content: center; text-align: center; padding: .9rem; background: #47243c; }
.micro { color: var(--pink); }
#clock { font: 600 clamp(1.6rem,2.8vw,2.9rem)/1.15 var(--mono); color: var(--gold); font-variant-numeric: tabular-nums; }
.timer-box button { font-size: .87rem; }
#timer-status { color: var(--gold); font-weight: 700; }
#timer-status:not(:empty) { margin-bottom: .7rem; }
.actions { gap: .6rem; margin-bottom: 1.5rem; }
.score-head { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding-block: 1rem .25rem; gap: .6rem; }
.score-head h3 { font: 600 1.5rem var(--display); }
.score-hint { margin: .35rem 0 .8rem; }
#teams { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); gap: .8rem; padding-bottom: 1.4rem; }
.team-row { display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(2ch,auto) 44px; align-items: center; gap: .4rem; padding: .65rem; border: 1px solid var(--line); border-radius: .4rem; }
.team-row input { min-width: 0; width: 100%; background: #2a1828; padding-inline: .45rem; }
.team-row button { padding: 0; }
.team-row output { font: 650 1.25rem var(--mono); color: var(--gold); text-align: center; }
.save-hint { margin-top: .75rem; }
.notes { border: 1px solid var(--line); border-radius: .4rem; margin-bottom: 2.5rem; }
.notes summary { padding: .9rem 1.1rem; font-weight: 650; }
.notes-body { border-top: 1px solid var(--line); padding: 1rem 1.2rem; }
.notes-body h2 { font-size: 2rem; }
.notes-body h3, .notes-body h4 { margin: 1.1rem 0 .4rem; }
.notes-body p { max-width: 74ch; }
#print { margin-top: .55rem; }
.answers { padding-left: 1.5rem; }
.answers li { padding: .35rem; }
.lineup ol { margin: 2rem 0 0; list-style: none; padding: 0; }
.lineup li { display: grid; grid-template-columns: minmax(2rem, .12fr) 1fr auto; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: 1.15rem .25rem; }
.lineup li:last-child { border-bottom: 1px solid var(--line); }
.act-no { color: var(--pink); font: italic 500 1.75rem var(--display); }
.lineup li h3 { font: 500 clamp(1.5rem, 2.4vw, 2.3rem) var(--display); letter-spacing: -.035em; }
.lineup li p { color: var(--muted); }
.lineup li small, .act-tag { color: var(--gold); }
.act-tag { border: 1px solid #816345; padding: .25rem .55rem; text-align: center; }
.kit { display: grid; grid-template-columns: 1.3fr .8fr; gap: 2rem; }
.purchase { display: grid; gap: .5rem; align-content: start; justify-items: start; padding: 1.45rem; border: 1px solid #97767e; background: var(--stage); border-radius: .5rem; }
.purchase strong { font: 500 2.4rem var(--display); }
.purchase small, .purchase p { color: var(--muted); }
.purchase a { display: inline-flex; align-items: center; min-height: 44px; }
.purchase [role=status]:empty { display: none; }
.guide h2 { font-size: 2rem; }
footer { border-top: 1px solid var(--line); padding: 1.4rem 0; display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; justify-content: space-between; color: var(--muted); font-size: .87rem; }
body.projecting > header, body.projecting footer, body.projecting .hide-stage, body.projecting main > :not(.game-wrap), body.projecting .skip, body.projecting .score-hint { display: none; }
body.projecting main { width: min(1600px, 98%); }
body.projecting .game-wrap { border: 0; padding: .4rem 0; }
body.projecting .console { margin: 0; }
body.projecting #question { font-size: clamp(1.7rem,3.9vw,4.7rem); }
body.projecting .answer { font-size: clamp(1.25rem,2.4vw,2.7rem); }
body.projecting #clock { font-size: clamp(2rem,3.5vw,4.4rem); }
@media (max-width: 830px) {
  .bar, main, footer { width: 92%; }
  .nav { gap: .6rem; }
  .hero { gap: 1.6rem; }
  .hero h1 { font-size: clamp(3.2rem,7vw,4rem); }
  .setup { flex-wrap: wrap; }
}
@media (max-width: 660px) {
  .bar { min-height: 67px; gap: .35rem; }
  .nav-item { display: none !important; }
  .brand { font-size: 1.22rem; gap: .4rem; }
  .brand img { width: 27px; height: 27px; }
  .langs a { font-size: .76rem; }
  .hero { grid-template-columns: 1fr; padding: 2rem 0 2.4rem; }
  .hero h1 { font-size: clamp(3rem,12vw,4.5rem); margin: .9rem 0; }
  .hero-links { margin: 1.15rem 0 .7rem; }
  .hero .facts { margin: .4rem 0 0; }
  .poster { max-width: 100%; margin: .2rem .35rem; }
  .poster img { height: clamp(180px,49vw,290px); object-position: center 48%; }
  .play-panel, .kit { grid-template-columns: 1fr; }
  .timer-box { grid-template-columns: auto auto 1fr 1fr; align-items: center; text-align: left; gap: .45rem; }
  .timer-box .micro { display: none; }
  .timer-box { grid-template-columns: auto 1fr 1fr; }
  .timer-box button { font-size: .78rem; padding-inline: .3rem; }
  .act-tag { font-size: .64rem; }
  .lineup li { gap: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  :root { color-scheme: light; }
  body { background: white; color: #201420; font: 10.5pt/1.35 Georgia, serif; }
  header, footer, .skip, main > :not(.notes), .notes summary, .notes button { display: none !important; }
  main, .notes, .notes-body { width: 100%; margin: 0; padding: 0; border: none; }
  .notes .notes-body { display: block; }
  .notes-body h3, .notes-body h4 { break-after: avoid; }
  .answers li { break-inside: avoid; }
}
.team-row input::placeholder { color: var(--muted); opacity: 1; }
.sheet { margin-top: 1.5rem; }
.sheet table { border-collapse: collapse; width: min(100%,42rem); table-layout: fixed; margin: .75rem 0; }
.sheet th, .sheet td { border: 1px solid currentColor; padding: .45rem; overflow-wrap: anywhere; }
.sheet th:first-child { width: 25%; text-align: start; }
@media print { .sheet { break-inside: avoid; } }
.team-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.team-tools button { font-size: .88rem; }
.team-tools button:disabled { display: none; }
.assign { margin: 0 clamp(1rem,3vw,2rem) 1rem; border-top: 1px solid var(--line); }
.assign summary { min-height: 44px; padding: .7rem 0; }
.assign > p { color: var(--muted); }
.assign form { margin-top: .6rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.assign input { width: 5rem; }
#assign-error { color: var(--gold); }
#groups { padding-left: 1.3rem; overflow-wrap: anywhere; }
#groups:empty { display: none; }
.projecting .team-tools { display: none; }
@page { margin: 14mm; }
