:root { color-scheme: dark; font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 50% 0%, #16658c 0, #073452 46%, #031c31 100%); color: #ecfbff; }
.game-shell { width: min(100%, 500px); padding: 24px 16px 18px; }
header { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 0 6px 16px; }
.eyebrow { margin: 0 0 2px; font-size: .68rem; font-weight: 800; letter-spacing: .18em; color: #8ee7ee; }
h1 { margin: 0; font-size: clamp(1.7rem, 6vw, 2.25rem); letter-spacing: .04em; }
.score-card { text-align: right; min-width: 82px; padding: 6px 10px; border-radius: 12px; background: #06283e; border: 1px solid #4aa9bd; }
.score-card span { display: block; color: #8ee7ee; font-size: .62rem; font-weight: 800; letter-spacing: .12em; }
.score-card strong { font-size: 1.45rem; line-height: 1; }
.how-to { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #c9eff6; font-size: .78rem; }
button { border: 0; border-radius: 999px; padding: 8px 12px; color: #06324d; background: #a4f2ef; font-weight: 800; cursor: pointer; transition: transform .15s, background .15s; white-space: nowrap; }
button:hover { transform: translateY(-1px); background: #fff4c5; }
.canvas-wrap { position: relative; width: 100%; aspect-ratio: 390 / 620; overflow: hidden; border-radius: 20px; box-shadow: 0 18px 45px #00162599, inset 0 0 0 2px #8ee7ee80; background: #075476; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.gameover { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 12px; background: #00263ccc; backdrop-filter: blur(3px); }
.gameover[hidden] { display: none; }
.gameover p { margin: 0; font-weight: 900; font-size: 2rem; letter-spacing: .13em; color: #fff1a5; }
.gameover strong { font-size: 3rem; }
.gameover button { font-size: 1rem; padding: 11px 22px; }
.hint, footer { text-align: center; color: #b8e5ee; font-size: .75rem; line-height: 1.5; }
.hint { margin: 12px 0 18px; } footer { opacity: .8; }
@media (max-width: 390px) { .game-shell { padding: 14px 8px; } .how-to { font-size: .7rem; } }

