:root {
  color-scheme: dark;
  --bg: #080e15;
  --panel: #101a24;
  --line: #283640;
  --muted: #9facb5;
  --mint: #e87500;
  --ink: #edf4f5;
  --amber: #ffc17b;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(ellipse at 50% 0, #172634 0, #080e15 65%); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
main { max-width: 1480px; margin: 0 auto; padding: 28px 36px 20px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { padding: 11px 17px; border: 1px solid var(--line); border-radius: 6px; background: #17222e; color: var(--ink); cursor: pointer; font: 600 14px inherit; touch-action: manipulation; }
button:hover { border-color: #698590; background: #223440; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
button:disabled { opacity: .5; cursor: wait; }
header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.brand { color: var(--ink); font-size: 30px; font-weight: 800; letter-spacing: -1.4px; text-decoration: none; white-space: nowrap; }
.brand > span, #lives, .eyebrow, .mission-bar > span:first-child { color: var(--mint); }
.brand small { display: inline-block; margin-left: 22px; padding-left: 22px; border-left: 1px solid #3a4854; font-size: 12px; font-weight: 500; letter-spacing: 2px; vertical-align: middle; }
.header-right { display: flex; align-items: center; gap: 10px; }
.edition { margin-right: 14px; color: var(--muted); font: 12px monospace; letter-spacing: 1.5px; }
.console { overflow: hidden; border: 1px solid #344653; border-radius: 10px; box-shadow: 0 32px 90px #0008; }
.hud { display: flex; min-height: 74px; gap: clamp(18px, 5vw, 78px); padding: 16px 24px; background: linear-gradient(100deg, #192733, #111b24); }
.hud > div { display: flex; flex-direction: column; gap: 6px; }
.label { color: var(--muted); font: 11px monospace; letter-spacing: 1.7px; }
.hud strong { font: 600 20px monospace; white-space: nowrap; }
#lives { letter-spacing: 5px; }
.hud .score { margin-left: auto; }
.stage { position: relative; isolation: isolate; width: 100%; aspect-ratio: 2 / 1; overflow: hidden; background: #0e1b28; }
canvas { display: block; width: 100%; height: 100%; outline: none !important; touch-action: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px #0007; }
.overlay { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; background: linear-gradient(90deg, #07111bef 0%, #081521d9 38%, #07111b25 100%); }
.overlay[hidden] { display: none; }
.brief { max-width: 660px; padding: 40px 6vw; }
.eyebrow { font: 12px monospace; letter-spacing: 2.5px; }
h1 { margin: 22px 0; font-size: clamp(28px, 4vw, 58px); font-weight: 750; letter-spacing: -2px; line-height: 1.07; }
h1 em { color: var(--mint); font-style: normal; }
.brief p { max-width: 440px; margin: 0 0 18px; color: #b5c4ce; font-size: 16px; line-height: 1.65; }
.mission-details { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 24px; color: #d0dce2; font-size: 12px; line-height: 1.6; }
.mission-details span::before { color: var(--mint); content: '· '; }
.primary { padding: 15px 27px; border-color: var(--mint); background: var(--mint); color: #251300; box-shadow: 0 0 36px #e8750019; font-size: 16px; }
.primary:hover { border-color: #ffad4d; background: #ffad4d; color: #251300; }
.brief small { display: block; margin-top: 14px; color: #9bacb8; font-size: 12px; line-height: 1.5; }
.toast { position: absolute; top: 22px; left: 50%; width: max-content; max-width: 90%; padding: 10px 18px; transform: translateX(-50%); border: 1px solid #4e6875; border-radius: 5px; background: #0a141eef; color: #fff0de; font-size: 14px; opacity: 0; pointer-events: none; text-align: center; transition: opacity .2s; }
.toast.visible { opacity: 1; }
.mission-bar { display: flex; align-items: center; gap: 20px; padding: 15px 24px; background: #111c25; color: #a4b4c0; font: 12px monospace; letter-spacing: .7px; }
.progress-track { flex: 1; max-width: 180px; height: 3px; margin-left: auto; background: #30404b; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--mint); }
footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; color: var(--muted); font-size: 13px; }
.keys { display: flex; flex-wrap: wrap; gap: 18px; }
.keys > span { display: flex; align-items: center; gap: 5px; }
kbd { padding: 4px 6px; border: 1px solid #344552; border-bottom-width: 2px; border-radius: 4px; background: #131f29; color: #d6e1e7; font: 11px monospace; }
.footer-note { font-size: 12px; white-space: nowrap; }
.touch-controls { display: none; justify-content: space-between; gap: 12px; margin-top: 14px; user-select: none; -webkit-user-select: none; }
.touch-controls > div { display: flex; gap: 8px; }
.touch-controls button { min-width: 60px; min-height: 54px; touch-action: none; }
.touch-controls button.active { border-color: var(--mint); background: #653300; }
.touch-controls .jump { min-width: 67px; background: #653300; color: #fff0de; }
.mobile-hint { display: none; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
@media (pointer: coarse) { .touch-controls { display: flex; } .mobile-hint { display: block; } .keys { display: none; } }
@media (max-width: 850px) { main { padding: 16px; } .brand small, .edition { display: none; } .hud { gap: 22px; padding: 14px 16px; } .hud strong { font-size: 17px; } .label { font-size: 10px; letter-spacing: 1px; } #lives { letter-spacing: 2px; } .brief { padding: 24px 5vw; } .brief p { font-size: 14px; line-height: 1.45; } .mission-details { display: none; } h1 { margin: 12px 0; letter-spacing: -1px; } .mission-bar { gap: 12px; padding: 12px 14px; font-size: 11px; } .progress-track, .footer-note { display: none; } .keys { gap: 12px; } header { margin-bottom: 15px; } .stage { aspect-ratio: 1.6 / 1; } }
@media (max-width: 540px) { main { padding: 12px 10px; } .stage { aspect-ratio: 1 / 1.05; } .hud { justify-content: space-between; gap: 10px; padding: 12px 10px; } .hud .score { margin-left: 0; } .hud strong { font-size: 16px; } .label { font-size: 9px; letter-spacing: .4px; } .brand { font-size: 26px; } .header-right { gap: 6px; } .header-right button { padding: 9px 11px; font-size: 12px; } .brief { padding: 28px 22px; } .brief p { max-width: 290px; font-size: 15px; } h1 { font-size: 37px; } .eyebrow { font-size: 10px; } .brief small { max-width: 260px; } .mission-bar { flex-direction: column; align-items: flex-start; gap: 7px; } .touch-controls { display: flex; gap: 6px; } .touch-controls button { min-width: 45px; min-height: 55px; padding: 10px; font-size: 11px; } .touch-controls > div { gap: 5px; } footer { padding: 15px 0 0; } .keys { display: none; } .mobile-hint { display: block; } }
@media (max-height: 540px) and (orientation: landscape) { main { padding: 8px 16px; } header { margin-bottom: 7px; } .brand { font-size: 22px; } .hud { min-height: 50px; padding: 8px 16px; } .hud > div { gap: 3px; } .stage { height: 60dvh; aspect-ratio: auto; } .brief { max-width: 600px; padding: 15px 4vw; } h1 { margin: 8px 0; font-size: 28px; } .brief p { margin-bottom: 10px; font-size: 13px; } .brief small, .mission-details, footer, .mobile-hint { display: none; } .primary { padding: 10px 20px; } .mission-bar { padding: 7px 14px; } .touch-controls { position: fixed; right: 24px; bottom: 8px; left: 24px; z-index: 4; margin: 0; pointer-events: none; } .touch-controls button { min-height: 46px; opacity: .85; pointer-events: auto; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
