* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #211b30; color: #fff0ce; 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(12px, env(safe-area-inset-top)); left: 18px; right: 18px; pointer-events: none; }
small { color: #a4cbbb; font-size: 9px; letter-spacing: 1.5px; }
h1 { margin: 5px 0; font-size: 25px; font-weight: 600; }
#clock { position: absolute; right: 0; top: 23px; font-size: 24px; font-variant-numeric: tabular-nums; }
#message { position: absolute; z-index: 2; top: 74px; width: 92%; left: 4%; text-align: center; color: #ffd480; pointer-events: none; font-size: 12px; }
footer { position: absolute; z-index: 2; bottom: max(12px, env(safe-area-inset-bottom)); width: 100%; text-align: center; pointer-events: none; }
#help { line-height: 1.5; font-size: 11px; text-shadow: 0 1px 4px #211b30; }
nav { display: flex; gap: 10px; justify-content: center; }
button { min-width: 90px; min-height: 44px; border: 1px solid #9bbbad; border-radius: 24px; background: #30283f; color: #fff0ce; font: inherit; pointer-events: auto; }
:focus-visible { outline: 2px solid #ffd480; outline-offset: -3px; }
#completion { position: absolute; z-index: 2; top: 22%; width: 100%; text-align: center; pointer-events: none; }
#completion strong { font-size: 23px; } #completion p { font-size: 12px; }
#error { position: absolute; z-index: 3; top: 40%; padding: 24px; background: #30283f; }
[hidden] { display: none !important; }
@media (max-width: 350px) { h1 { font-size: 21px; } small { font-size: 8px; letter-spacing: .5px; } header { left: 12px; right: 12px; } }
@media (max-height: 500px) { header { top: 6px; width: 43%; } h1 { font-size: 20px; } small { font-size: 8px; letter-spacing: 0; } #clock { top: 45px; left: 0; font-size: 18px; } #message { top: 5px; left: 49%; width: 49%; } footer { width: 45%; right: 0; bottom: 6px; } #help { font-size: 10px; } #completion { width: 45%; top: 38%; } #completion strong { font-size: 18px; } }
body[data-production="true"] header { padding-left: 50px; }
.back { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #9bbbad; border-radius: 50%; color: #fff0ce; text-decoration: none; pointer-events: auto; }
body[data-production="true"] footer { padding-inline: 8px; }
body[data-production="true"] nav { margin: auto; max-width: 500px; display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 6px; }
body[data-production="true"] button { min-width: 44px; padding: 4px 6px; font-size: 12px; }
#storage, #reward-status { min-height: 14px; margin: 3px 0 0; font-size: 10px; }
#loading, #error { position: absolute; z-index: 5; inset: 38% 8% auto; padding: 18px; border: 1px solid #9bbbad; border-radius: 18px; background: #30283f; text-align: center; }
#loading button, #error button { margin-left: 8px; }
dialog { color: #fff0ce; background: #30283f; border: 1px solid #9bbbad; border-radius: 20px; text-align: center; max-width: min(88vw, 360px); }
dialog::backdrop { background: #161526cc; }
dialog button { margin: 5px; }
@media (max-height: 500px) { body[data-production="true"] header { width: 47%; padding-left: 48px; } body[data-production="true"] footer { width: 51%; } body[data-production="true"] #help { margin: 0 0 3px; line-height: 1.2; } body[data-production="true"] nav { grid-template-columns: repeat(3, minmax(44px, 1fr)); } body[data-production="true"] #storage, body[data-production="true"] #reward-status { display: none; } }
