* { box-sizing: border-box; }
:root { color-scheme: dark; font: 100%/1.45 system-ui, sans-serif; color: #f8f7f1; background: #080b1b; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 20% 0, #362144, transparent 49%), radial-gradient(ellipse at 90% 50%, #12384a, transparent 60%); }
main { width: min(100%, 34rem); margin: auto; padding: max(.65rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
header { display: flex; align-items: center; gap: .9rem; margin: 0 0 .65rem; }
header img, .overlay img { border-radius: 23%; }
h1,h2,p { margin: 0; }
header p { color: #83eff5; font-size: .75rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
h1 { color: #ffe485; font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.12; }
.hud,.controls { display: grid; grid-template-columns: repeat(4,1fr); gap: .35rem; }
.hud { margin: .35rem 0; text-transform: uppercase; color: #a8c6d3; font-size: .65rem; letter-spacing: .07em; }
.hud b { display: block; color: white; font: 700 1.1rem ui-monospace, monospace; }
.screen { width: min(100%, max(11rem,calc((100vh - 15rem)*.65455))); width: min(100%, max(11rem,calc((100svh - 15rem)*.65455))); position: relative; margin: auto; border: 1px solid #50a4b9; border-radius: .7rem; overflow: hidden; background: #070a15; box-shadow: 0 0 18px #29c7eb25; }
canvas { display: block; width: 100%; height: auto; }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: .75rem; text-align: center; background: #080c20eb; }
.overlay h2 { color: #ffde79; line-height: 1.05; }
.overlay p { max-width: 28ch; font-size: clamp(.83rem,2.8vw,1rem); }
.overlay[hidden] { display: none; }
button { min-height: 44px; background: #1a2b46; color: #e5fbff; border: 1px solid #6daabd; border-radius: .65rem; font: 750 1rem/1.05 system-ui; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
button:active { background: #355771; }
.overlay button,[data-game-fire] { color: #221225; background: #ffe282; border-color: #ffeeb6; }
:focus-visible { outline: 3px solid #fb69db; outline-offset: 2px; }
.controls { margin-top: .6rem; }
[data-game-status],footer { font-size: .84rem; margin-top: .4rem; }
footer { color: #b6c7d4; }
a { color: #80edf4; }
@media (max-height: 550px) and (orientation: landscape) {
 .screen { width: min(100%, 16rem); }
 .overlay img { display: none; }
}
