:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #051722; color: #e9f9ff; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow: hidden; }
#stage, #view { position: fixed; inset: 0; }
#view canvas { display: block; width: 100%; height: 100%; }
.cover { position: absolute; inset: 0; display: grid; align-items: center; padding: clamp(24px, 8vw, 130px); background: linear-gradient(90deg, #051723ec, #05172326 70%); }
.cover > div { max-width: 480px; }
h1 { font-size: clamp(64px, 10vw, 155px); font-weight: 850; line-height: .85; letter-spacing: -.08em; margin: 0 0 24px; }
.cover p { line-height: 1.55; max-width: 35ch; }
.help { font-size: 13px; color: #a9c9d4; }
button { font: inherit; font-weight: 730; color: #eeffff; border: 1px solid #84c5d780; border-radius: 8px; background: #073247dd; cursor: pointer; touch-action: none; }
button:focus-visible { outline: 2px solid #e8fcff; outline-offset: 3px; }
button[data-held="true"] { background: #1f6581; }
#start, .scan { background: #a6edf2; color: #07212b; border: 0; padding: 12px 19px; }
#start { margin: 10px 0 4px; }
#hud { position: absolute; inset: 14px 14px auto; display: flex; width: min(650px, calc(100% - 28px)); margin: auto; gap: 7px; align-items: stretch; }
.readout { display: grid; min-width: 0; flex: 1; gap: 2px 6px; padding: 8px 11px; background: #041b29df; border: 1px solid #5caac15c; border-radius: 8px; }
.readout small { grid-column: 1 / -1; color: #a5d1de; font-size: 11px; }
.readout b { white-space: nowrap; }
.oxygen { flex: 1.55; grid-template-columns: minmax(0, 1fr) auto; }
meter { width: 100%; align-self: center; }
#restart { padding: 0 10px; font-size: 12px; }
#objective { position: absolute; margin: 0; top: 81px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 22px); width: max-content; padding: 7px 12px; border-radius: 5px; background: #051621db; color: #d3edf5; font-size: 13px; text-align: center; }
#controls { position: absolute; inset: auto 16px max(13px, env(safe-area-inset-bottom)); display: flex; align-items: end; justify-content: space-between; pointer-events: none; }
#controls button { min-width: 47px; min-height: 44px; pointer-events: auto; }
.direction { display: grid; grid-template: repeat(2, 44px) / repeat(3, 47px); gap: 4px; }
.direction [data-control="up"] { grid-column: 2; }
.direction [data-control="left"] { grid-column: 1; grid-row: 2; }
.direction [data-control="down"] { grid-column: 2; grid-row: 2; }
.direction [data-control="right"] { grid-column: 3; grid-row: 2; }
@media (pointer: fine) { #controls { opacity: .64; } }
@media (max-width: 390px) { .readout { padding-inline: 7px; font-size: 14px; } .readout small { font-size: 10px; } }
