:root {
  color-scheme: dark;
  --ink: #eff4eb;
  --muted: #b3c7c4;
  --low: #9bb2af;
  --background: #0d1b1e;
  --surface: #14272b;
  --surface-deep: #0f2125;
  --line: #335051;
  --teal: #bbebd9;
  --amber: #ffbb6a;
  --sand: #f1e9d6;
  --dark-ink: #182b2e;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --display: Impact, 'Arial Narrow', 'Franklin Gothic Heavy', sans-serif;
  --body: 'Trebuchet MS', 'Segoe UI', sans-serif;
  font-family: var(--body);
  background: var(--background);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
button, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, summary:focus-visible, h1:focus-visible { outline: 3px solid #68eed5; outline-offset: 4px; }
button:disabled { cursor: default; }
p,h1,h2 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.topbar, .footer { padding: 0 max(24px, calc((100% - 1280px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.topbar { min-height: 59px; border-bottom: 1px solid var(--line); background: #0c191b; }
.mast { display: flex; align-items: center; gap: 12px; font: 700 12px var(--mono); letter-spacing: .095em; }
.brand-year { color: var(--low); }
.brand-mark { font: 900 23px/26px var(--body); width: 28px; text-align: center; background: var(--amber); color: var(--background); }
.top-status { display: flex; align-items: center; gap: 8px; color: var(--teal); text-transform: uppercase; font: 700 11px var(--mono); letter-spacing: .07em; }
.status-dot, .signal { display: inline-block; width: 8px; height: 8px; background: currentColor; border-radius: 50%; }
.footer { border-top: 1px solid var(--line); min-height: 61px; color: var(--low); font: 11px var(--mono); }
.app { min-height: calc(100vh - 120px); }
.hero { position: relative; isolation: isolate; min-height: 414px; display: grid; align-items: center; border-bottom: 1px solid #775834; background: #13272a; overflow: hidden; }
.hero-image { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; object-position: 60% 55%; z-index: -2; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0b1b1deb 1%, #0c1d20b8 36%, transparent 72%),linear-gradient(0deg,#0c1c1fcf,transparent 34%); }
.hero-content { padding: 36px 24px 36px max(24px,calc((100% - 1280px)/2)); }
.eyebrow { color: var(--amber); font: 700 .74rem/1.45 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; }
.hero h1 { font: 400 clamp(4.2rem,9.5vw,8.65rem)/.84 var(--display); letter-spacing: -.01em; text-transform: uppercase; margin: .14em 0 .17em; text-shadow: 0 3px 26px #0006; }
.hero h1 em { color: var(--amber); font-style: normal; }
.hero-premise { color: #f8f4ed; font-size: 1.1rem; line-height: 1.46; max-width: 30rem; }
.mission-facts { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 22px; }
.mission-facts span { border: 1px solid #72908a; background: #112427d9; padding: 5px 8px; color: var(--teal); font: 700 .68rem var(--mono); letter-spacing: .055em; }
.hero-location { position: absolute; right: max(24px,calc((100% - 1280px)/2)); bottom: 22px; color: #fbf0db; letter-spacing: .1em; font: 700 .68rem var(--mono); background: #0a181bca; padding: 8px 10px; }
.hero-location span { color: var(--amber); }
.setup,.match,.ending { max-width: 1328px; margin-inline: auto; padding: 32px 24px 46px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 17px; margin-bottom: 19px; }
.section-heading h2 { font-size: clamp(1.7rem,4vw,2.65rem); letter-spacing: -.045em; line-height: 1.12; margin: 4px 0 5px; }
.section-heading p:not(.eyebrow),.launch-row p { color: var(--muted); line-height: 1.45; }
.party-size, .look-picker { display: flex; align-items: center; gap: 5px; }
.party-size span { padding-right: 7px; color: var(--muted); font: 700 .7rem var(--mono); text-transform: uppercase; }
.party-size button,.look-picker button { border: 1px solid var(--line); background: var(--surface-deep); color: var(--ink); font-weight: 700; }
.party-size button { width: 40px; height: 40px; }
.party-size button[aria-pressed=true],.look-picker button[aria-pressed=true] { border-color: var(--teal); background: var(--teal); color: var(--dark-ink); }
.party-size button:hover,.look-picker button:hover { border-color: var(--teal); }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,188px),1fr)); gap: 12px; }
.crew-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); }
.crew-photo { position: relative; aspect-ratio: 1.66; max-height: 176px; overflow: hidden; background: #163337; }
.crew-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.crew-photo::after { content:''; position: absolute; inset: 0; background: linear-gradient(0deg,#102427cc,transparent 40%); pointer-events: none; }
.crew-number { position: absolute; z-index: 1; bottom: 8px; left: 10px; color: var(--teal); font: 700 .68rem var(--mono); letter-spacing: .09em; }
.crew-fields { display: grid; gap: 8px; padding: 13px; }
.crew-fields label { display: grid; gap: 3px; color: var(--low); font: 700 .68rem var(--mono); text-transform: uppercase; }
.crew-fields select { min-width: 0; min-height: 35px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 0; background: var(--surface-deep); color: var(--ink); font: 700 .88rem var(--body); }
.role-help { color: var(--muted); font-size: .78rem; line-height: 1.35; min-height: 2.15em; }
.look-picker button { flex: 1; min-height: 34px; font-size: .77rem; }
.launch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 17px; flex-wrap: wrap; }
.launch-row p { font-size: .89rem; }
.primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 47px; padding: 11px 15px; font: 800 .92rem var(--body); border: 1px solid var(--amber); color: var(--dark-ink); background: var(--amber); }
.primary:hover:not(:disabled) { background: #ffd4a2; border-color: #ffd4a2; }
.primary:disabled { background: #e0d3b9; border-color: #baa88a; color: #615746; }
.primary span { font-size: 1.12rem; }
.rules { max-width: 54rem; margin-top: 20px; color: var(--muted); font-size: .89rem; line-height: 1.5; }
.rules summary { cursor: pointer; color: var(--teal); font-weight: 700; }
.rules p { margin: 8px 0 0; }
.match { max-width: 1220px; }
.match-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.route-line { display: flex; padding: 0; list-style: none; margin: 0; }
.route-line li { display: flex; align-items: center; }
.route-line li:not(:first-child)::before { content: ''; width: clamp(9px,3vw,43px); height: 1px; background: var(--line); }
.route-line li > span:first-child { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font: 700 .7rem var(--mono); color: var(--low); }
.route-line li.done > span:first-child { border-color: var(--teal); color: var(--teal); }
.route-line li.current > span:first-child { background: var(--amber); border-color: var(--amber); color: var(--dark-ink); }
.match-grid { display: grid; grid-template-columns: minmax(0,1fr) 238px; gap: 17px; align-items: start; }
.encounter { overflow: hidden; background: var(--sand); color: var(--dark-ink); }
.scene-visual { position: relative; height: clamp(100px,19vw,220px); overflow: hidden; background: #234144; }
.scene-visual img,.ending-view img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.scene-visual span { position: absolute; bottom: 0; left: 0; padding: 8px 14px; background: var(--surface-deep); color: var(--teal); font: 700 .73rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.encounter-body { padding: clamp(16px,3vw,36px); }
.encounter h1,.ending h1 { font-size: clamp(2rem,5vw,4rem); letter-spacing: -.06em; line-height: 1.02; }
.scene-copy { max-width: 70ch; margin-top: 13px; font: 1.08rem/1.63 Georgia,serif; }
.decision h2 { font-size: 1.07rem; line-height: 1.35; margin: 21px 0 10px; }
.choices { display: grid; gap: 7px; }
.choice { display: grid; width: 100%; grid-template-columns: 35px minmax(0,1fr) auto; gap: 13px; align-items: center; text-align: left; color: var(--dark-ink); background: #faf3e4; border: 1px solid #a9ada1; padding: 11px; }
.choice-letter { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #a1b6aa; background: #e0eee0; color: #1b5351; font: 700 .84rem var(--mono); }
.choice-body { display: grid; gap: 4px; }
.choice-body strong { font-size: .97rem; }
.choice-body > span { font-size: .83rem; line-height: 1.36; color: #394c49; }
.choice-body .expert { color: #1f6152; font: 700 .67rem var(--mono); text-transform: uppercase; letter-spacing: .065em; }
.choice-arrow { font-size: 1.03rem; color: #407368; }
.choice:disabled .choice-arrow { opacity: .4; }
.choice:hover:not(:disabled),.choice[aria-pressed=true] { border-color: #0e6660; background: #d8eadb; }
.choice[aria-pressed=true] .choice-letter { background: #1c5550; color: #fff; }
.choice:focus-visible,.encounter .primary:focus-visible,.encounter h1:focus-visible { outline-color: #166b64; }
.commit { margin-top: 11px; }
.status-panel { position: sticky; top: 12px; display: grid; gap: 10px; }
.clock,.status-block { background: var(--surface); border: 1px solid var(--line); padding: 13px; }
.clock { border-top: 3px solid var(--amber); }
.clock-value { color: var(--amber); font: 700 clamp(2rem,4.2vw,3.7rem)/1.12 var(--mono); letter-spacing: -.07em; margin: 4px 0 2px; }
.clock progress { width: 100%; display: block; height: 5px; accent-color: var(--amber); }
.clock p:last-child { font-size: .81rem; line-height: 1.32; color: var(--muted); min-height: 2.5em; margin-top: 8px; }
.clock.ready { border-top-color: var(--teal); }
.clock.ready .clock-value { color: var(--teal); }
.status-block h2 { font-size: .9rem; color: var(--teal); }
.metrics { margin: 8px 0 0; }
.metrics div { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.metrics dt { color: var(--muted); font-size: .8rem; }
.metrics dd { font: 700 .81rem var(--mono); color: var(--ink); margin: 0; }
.roster ul { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 8px; }
.roster li { display: flex; align-items: center; gap: 8px; }
.roster img { width: 33px; height: 33px; object-fit: cover; border: 1px solid var(--line); }
.roster li div { display: grid; gap: 2px; }
.roster li strong { font-size: .82rem; }
.roster li div span { color: var(--muted); font-size: .69rem; }
.roster li.sidelined img { filter: grayscale(1); opacity: .67; }
.sidelined-note { color: var(--amber); font-size: .74rem; line-height: 1.3; margin-top: 9px; }
.dispatch { border-left: 3px solid #439584; background: #dce6d8; color: #1e3c39; margin-bottom: 18px; padding: 7px 11px 10px; }
.dispatch .eyebrow { color: #1d6556; font-size: .63rem; letter-spacing: .07em; }
.dispatch p { font-size: .84rem; line-height: 1.45; margin-top: 3px; }
.dispatch .assist { font-weight: 700; }
.dispatch .loss { color: #7a3426; }
.ending { max-width: 1080px; }
.ending-view { height: clamp(145px,27vw,315px); border: 1px solid var(--line); }
.ending-copy { padding: 23px clamp(16px,4vw,38px) 29px; background: var(--sand); color: var(--dark-ink); }
.ending-copy .eyebrow { display: flex; align-items: center; gap: 9px; color: #24664a; margin-bottom: 9px; }
.ending-copy .eyebrow.failure { color: #913c2d; }
.ending-copy > p:not(.eyebrow) { margin: 12px 0; font: 1.08rem/1.55 Georgia,serif; max-width: 70ch; }
.end-actions { display: flex; gap: 12px; }
.recap { background: var(--surface); border: 1px solid var(--line); padding: 15px 20px; }
.recap h2 { color: var(--teal); font-size: 1.05rem; }
.recap ol { margin: 10px 0 0 21px; padding: 0; }
.recap li { padding: 6px 5px; }
.recap li span { display: inline-block; margin-left: 8px; color: var(--muted); font-size: .9rem; }
.noscript { text-align: center; padding: 15px; }
@media (max-width: 760px) {
  .hero { min-height: 350px; }
  .hero h1 { font-size: clamp(3.6rem,12.7vw,6.6rem); }
  .hero-image { object-position: 68% center; }
  .hero::before { background: linear-gradient(90deg,#0b1b1df2,#0b1b1d8c 65%,#0b1b1d36); }
  .hero-location { display: none; }
  .setup,.match,.ending { padding-inline: 13px; }
  .match-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .match-header { margin-bottom: 11px; }
  .status-panel { display: contents; }
  .clock { grid-row: 1; position: sticky; top: 0; z-index: 3; padding: 6px 10px; display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; column-gap: 10px; box-shadow: 0 2px 8px #0d1b1e99; }
  .clock .clock-value { grid-row: 1 / span 3; grid-column: 1; font-size: 1.67rem; }
  .clock .eyebrow,.clock progress,.clock p:last-child { grid-column: 2; }
  .clock .eyebrow { font-size: .64rem; }
  .clock p:last-child { margin-top: 3px; min-height: 0; font-size: .71rem; }
  .roster ul { grid-template-columns: repeat(auto-fit,minmax(108px,1fr)); }
}
@media (max-width: 420px) {
  .brand-year,.wide-only { display: none; }
  .topbar,.footer { padding-inline: 11px; }
  .footer { font-size: 9px; }
  .crew-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .crew-fields { padding: 8px; }
  .hero-premise { max-width: 16rem; }
  .match-header .eyebrow { font-size: .59rem; }
  .route-line li > span:first-child { width: 24px; height: 24px; }
  .recap li span { display: block; margin: 2px 0 0; }
}
