* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #100f29; color: #fff1c6; font: 14px system-ui, sans-serif; }
#stage { position: relative; width: 100%; height: 100dvh; overflow: hidden; }
canvas, #field { position: absolute; inset: 0; width: 100%; height: 100%; }
#field { z-index: 1; touch-action: none; user-select: none; }
header { position: absolute; z-index: 2; top: max(18px, env(safe-area-inset-top)); left: 20px; right: 20px; pointer-events: none; }
small { font-size: 9px; letter-spacing: 2px; color: #a5b8ef; }
h1 { font-size: 25px; margin: 5px 0; font-weight: 600; }
#clock { position: absolute; right: 0; top: 24px; font-size: 24px; font-variant-numeric: tabular-nums; }
#message { position: absolute; top: 88px; width: 90%; left: 5%; text-align: center; z-index: 2; pointer-events: none; color: #ffd681; }
footer { position: absolute; z-index: 2; bottom: max(16px, env(safe-area-inset-bottom)); width: 100%; text-align: center; pointer-events: none; }
#help { font-size: 12px; line-height: 1.7; text-shadow: 0 2px 6px #100f29; }
nav { display: flex; justify-content: center; gap: 12px; }
button { pointer-events: auto; min-width: 100px; min-height: 44px; border: 1px solid #8794c1; border-radius: 24px; background: #25233f; color: #fff1c6; font: inherit; }
:focus-visible { outline: 2px solid #ffd681; outline-offset: -4px; }
#completion { position: absolute; z-index: 2; top: 24%; width: 100%; text-align: center; pointer-events: none; }
#completion strong { font-size: 24px; } #completion p { font-size: 12px; }
#error { position: absolute; z-index: 4; top: 35%; padding: 24px; background: #25233f; }
[hidden] { display: none !important; }
@media (max-height: 500px) { header { top: 8px; } #message { top: 65px; } footer { bottom: 8px; } #help { font-size: 10px; line-height: 1.3; } #completion { top: 30%; } }
nav { flex-wrap: wrap; gap: 6px; padding: 0 8px; }
button { min-width: 44px; padding: 7px 12px; font-size: 12px; }
#storage, #reward-status { font-size: 10px; margin: 4px 8px; min-height: 12px; }
#loading, #error { position: absolute; z-index: 6; inset: 28% 8% auto; border: 1px solid #8b9bc7; border-radius: 24px; padding: 20px; text-align: center; background: #201c3c; }
.retry { display: block; margin: 12px auto 0; }
dialog { max-width: calc(100vw - 24px); border: 1px solid #a1b4df; border-radius: 24px; background: #201c3c; color: #fff1c6; padding: 20px; }
dialog::backdrop { background: #100f29c9; } dialog h2 { font-size: 21px; }
.back { display: grid; place-items: center; width: 44px; height: 44px; position: absolute; top: 0; left: -8px; pointer-events: auto; text-decoration: none; color: #fff1c6; }
body[data-production] header { padding-left: 40px; } body[data-production] h1 { font-size: 21px; }
body[data-production] header small { font-size: 8px; letter-spacing: 1px; }
@media (max-width: 350px) { h1, body[data-production] h1 { font-size: 18px; } header { left: 12px; right: 12px; } #clock { font-size: 20px; } header small { letter-spacing: .3px !important; } #help { font-size: 11px; } }
@media (max-height: 450px) { header { width: 55%; } #message { width: 50%; left: 2%; top: 78px; } footer { width: 48%; right: 0; bottom: 8px; } #completion { width: 52%; top: 44%; } #completion strong { font-size: 20px; } }
