:root {
  --ink: #f5f1e8;
  --muted: #9c9b94;
  --void: #050507;
  --acid: #dfff00;
  --hot: #ff385c;
  --cyan: #53e8ff;
  --line: rgba(245, 241, 232, .18);
  --mono: "Courier New", "Noto Sans Mono", monospace;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--void); color: var(--ink); }
body { overflow-x: hidden; font-family: Arial, "Microsoft YaHei", sans-serif; cursor: crosshair; }
button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--acid); outline-offset: 4px; }

#cosmos { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.noise, .scanlines { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.noise { opacity: .09; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.93' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.scanlines { opacity: .13; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.08) 4px); }
#app { position: relative; z-index: 3; min-height: 100vh; }

.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8vh 24px; text-align: center; }
.boot__eyebrow, .finale__eyebrow { font: 700 11px/1 var(--mono); letter-spacing: .25em; color: var(--acid); text-transform: uppercase; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 18px var(--hot); animation: blink 1s steps(2) infinite; }
.boot__stamp { position: absolute; right: 3vw; top: 3vh; margin: 0; padding: 9px 12px; border: 1px solid var(--hot); color: var(--hot); font: 700 10px var(--mono); letter-spacing: .12em; transform: rotate(3deg); }
.boot h1 { position: relative; max-width: 1100px; margin: .16em 0 .12em; font: 900 clamp(66px, 12vw, 174px)/.82 var(--display); letter-spacing: -.045em; text-transform: uppercase; text-wrap: balance; filter: drop-shadow(6px 5px 0 rgba(255,56,92,.75)); }
.boot h1::before, .boot h1::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.boot h1::before { color: var(--cyan); transform: translateX(-6px); clip-path: inset(18% 0 56%); animation: glitch 4.2s infinite; }
.boot h1::after { color: var(--hot); transform: translateX(7px); clip-path: inset(68% 0 12%); animation: glitch 3.1s .4s infinite reverse; }
.boot__lede { max-width: 590px; margin: 18px auto 28px; color: #c5c2ba; font-size: clamp(15px, 2vw, 20px); line-height: 1.65; }
.boot__lede em { color: var(--acid); font-style: normal; border-bottom: 1px solid; }
.boot__contract { width: min(430px, 90vw); display: grid; grid-template-columns: 1fr auto; gap: 8px; text-align: left; font: 11px var(--mono); color: var(--muted); }
.boot__contract strong { color: var(--hot); }
.meter { grid-column: 1 / -1; height: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.meter i { display: block; width: 3%; height: 100%; background: var(--hot); box-shadow: 0 0 13px var(--hot); animation: nervous 1.7s infinite alternate; }

.primary-btn, .ghost-btn, .choice { border: 0; cursor: pointer; }
.primary-btn { position: relative; min-width: 290px; display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; margin-top: 30px; padding: 17px 18px 17px 22px; color: #090a05; background: var(--acid); box-shadow: 7px 7px 0 var(--hot); font-weight: 900; text-transform: uppercase; transition: transform .16s, box-shadow .16s; }
.primary-btn:hover { transform: translate(-3px,-3px); box-shadow: 11px 11px 0 var(--hot); }
kbd { padding: 4px 7px; border: 1px solid currentColor; border-radius: 2px; background: transparent; font: 10px var(--mono); box-shadow: none; }
.microcopy { margin-top: 21px; color: #777771; font: 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; }

.console { min-height: 100vh; padding: 0 3vw; }
.topbar { height: 82px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.brand { justify-self: start; color: inherit; text-decoration: none; font: 900 15px/.8 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.brand span, .brand b { display: block; }
.brand b { color: var(--acid); font-weight: inherit; }
.phase-readout { font: 9px var(--mono); text-transform: uppercase; text-align: center; letter-spacing: .14em; color: var(--muted); }
.phase-readout span, .phase-readout strong { display: block; }
.phase-readout strong { margin-top: 5px; color: var(--ink); font-size: 12px; }
.icon-btn { justify-self: end; display: flex; gap: 11px; align-items: center; border: 0; background: transparent; font: 9px var(--mono); letter-spacing: .1em; cursor: pointer; }
.sound-bars { display: flex; gap: 2px; align-items: center; height: 14px; }
.sound-bars i { width: 2px; height: 6px; background: var(--acid); animation: equalize .8s infinite alternate; }
.sound-bars i:nth-child(2) { height: 12px; animation-delay: -.3s; }
.sound-bars i:nth-child(3) { height: 9px; animation-delay: -.6s; }
.icon-btn[aria-pressed="false"] .sound-bars i { animation: none; height: 2px; background: var(--muted); }

.hud { min-height: calc(100vh - 132px); display: grid; grid-template-columns: minmax(130px, 1fr) minmax(520px, 4fr) minmax(130px, 1fr); align-items: center; gap: 3vw; }
.telemetry { color: var(--muted); font: 10px var(--mono); }
.label { color: var(--ink); letter-spacing: .16em; }
.big-stat { margin: 14px 0 -4px; color: var(--acid); font-size: clamp(46px, 5vw, 74px); letter-spacing: -.08em; }
.big-stat small { font-size: 12px; }
.mini-chart { height: 70px; display: flex; align-items: end; gap: 4px; margin-top: 18px; }
.mini-chart i { flex: 1; min-width: 3px; background: var(--hot); opacity: .7; transition: height .4s; }
.telemetry--right { text-align: right; }
.telemetry dl { margin-top: 24px; }
.telemetry dl div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.telemetry dd { margin: 0; color: var(--ink); }
.orbital { position: relative; width: 92px; height: 92px; margin: 18px 0 10px auto; border: 1px solid var(--line); border-radius: 50%; animation: rotate 12s linear infinite; }
.orbital::before, .orbital::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbital::before { inset: 15px; }
.orbital::after { inset: 31px; background: var(--acid); box-shadow: 0 0 25px rgba(223,255,0,.5); }
.orbital i, .orbital b, .orbital span { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--hot); }
.orbital i { left: 8px; top: 20px; }.orbital b { right: 5px; bottom: 23px; background: var(--cyan); }.orbital span { left: 41px; top: -3px; background: var(--ink); }

.mission { text-align: center; padding: 6vh 0; }
.mission__index { display: inline-block; padding: 7px 10px; border: 1px solid var(--line); color: var(--acid); font: 9px var(--mono); letter-spacing: .17em; text-transform: uppercase; }
.mission__kicker { margin: 24px 0 8px; color: var(--hot); font: 700 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.mission h2 { max-width: 830px; margin: 0 auto; font: 900 clamp(34px, 5.2vw, 78px)/.98 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.mission__body { max-width: 580px; min-height: 45px; margin: 19px auto 28px; color: #aaa8a0; font-size: 14px; line-height: 1.7; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 820px; margin: 0 auto; text-align: left; }
.choice { min-height: 112px; position: relative; padding: 18px 17px; border: 1px solid var(--line); background: rgba(5,5,7,.55); backdrop-filter: blur(10px); color: var(--ink); overflow: hidden; transition: border-color .2s, transform .2s, background .2s; }
.choice::after { content: ""; position: absolute; inset: auto 0 0; height: 0; background: var(--acid); mix-blend-mode: difference; transition: height .22s; }
.choice:hover { border-color: var(--acid); transform: translateY(-6px); background: rgba(20,20,16,.7); }
.choice:hover::after { height: 5px; }
.choice__num { display: block; margin-bottom: 12px; color: var(--acid); font: 9px var(--mono); }
.choice strong { display: block; position: relative; z-index: 1; font-size: 14px; line-height: 1.3; }
.choice small { display: block; position: relative; z-index: 1; margin-top: 8px; color: var(--muted); font: 9px/1.4 var(--mono); }
.keyhint { margin-top: 17px; color: #66665f; font: 9px var(--mono); }
.footerline { height: 50px; display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 20px; border-top: 1px solid var(--line); color: #777771; font: 8px var(--mono); letter-spacing: .12em; }
.footerline > :last-child { text-align: right; }
.ticker { overflow: hidden; white-space: nowrap; color: var(--hot); text-align: center; }
.ticker span { display: inline-block; animation: ticker 12s linear infinite; }

.finale { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 7vh 24px; text-align: center; }
.sigil { position: relative; width: 86px; height: 86px; margin: 22px 0; }
.sigil i { position: absolute; inset: 0; border: 1px solid var(--acid); animation: sigil 8s linear infinite; }
.sigil i:nth-child(2) { border-color: var(--hot); animation-duration: 6s; animation-direction: reverse; transform: rotate(45deg) scale(.68); }
.sigil i:nth-child(3) { inset: 28px; border-radius: 50%; background: var(--ink); border: 0; box-shadow: 0 0 40px var(--cyan); animation-duration: 3s; }
.finale__pre { margin: 4px 0 10px; color: var(--muted); font: 10px var(--mono); letter-spacing: .15em; }
.finale h2 { margin: 0; font: 900 clamp(58px, 9.5vw, 132px)/.82 var(--display); letter-spacing: -.04em; text-transform: uppercase; }
.finale h2 em { color: var(--acid); font-style: normal; text-shadow: 5px 5px 0 var(--hot); }
.finale > p:not(.finale__eyebrow):not(.finale__pre):not(.microcopy) { max-width: 590px; margin: 25px auto; color: #bdbab2; line-height: 1.7; }
.scorecard { width: min(620px, 94vw); display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.scorecard div { padding: 16px; border-right: 1px solid var(--line); }
.scorecard div:last-child { border: 0; }
.scorecard span, .scorecard strong { display: block; }
.scorecard span { color: var(--muted); font: 8px var(--mono); letter-spacing: .12em; }
.scorecard strong { margin-top: 5px; color: var(--acid); font: 28px var(--mono); }
.finale__actions { display: flex; align-items: center; gap: 24px; }
.finale__actions .primary-btn { margin-top: 28px; }
.ghost-btn { margin-top: 28px; padding: 15px; border-bottom: 1px solid var(--ink); background: transparent; font: 10px var(--mono); text-transform: uppercase; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; transform: translate(-50%, 30px); padding: 11px 15px; background: var(--ink); color: var(--void); font: 10px var(--mono); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.shock { animation: shock .45s both; }
.breach { animation: hue 1.2s linear; }
[hidden] { display: none !important; }

@keyframes blink { 50% { opacity: .25; } }
@keyframes glitch { 0%,91%,100% { opacity: 0; } 92%,95% { opacity: .8; transform: translateX(-10px); } 93%,96% { opacity: .5; transform: translateX(8px); } }
@keyframes nervous { to { width: 11%; } }
@keyframes equalize { to { height: 14px; } }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes ticker { from { transform: translateX(80%); } to { transform: translateX(-100%); } }
@keyframes sigil { to { transform: rotate(360deg); } }
@keyframes shock { 0%,100% { transform: translate(0); } 20% { transform: translate(-10px,4px); } 40% { transform: translate(8px,-5px); } 60% { transform: translate(-4px,7px); } 80% { transform: translate(5px,-2px); } }
@keyframes hue { 50% { filter: hue-rotate(170deg) invert(.1); } }

@media (max-width: 900px) {
  .hud { grid-template-columns: 1fr; align-items: start; }
  .telemetry { display: none; }
  .mission { padding: 8vh 0 4vh; }
  .console { padding: 0 18px; }
  .choices { grid-template-columns: 1fr; }
  .choice { min-height: auto; }
  .keyhint { display: none; }
  .footerline { grid-template-columns: 1fr auto; }
  .footerline > :first-child { display: none; }
}
@media (max-width: 560px) {
  .boot h1 { font-size: 64px; }
  .boot__stamp { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .phase-readout { display: none; }
  .mission h2 { font-size: 39px; }
  .mission__body { font-size: 13px; }
  .finale__actions { flex-direction: column; gap: 0; }
  .scorecard span { min-height: 20px; }
  .scorecard div { padding: 12px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
