* { box-sizing:border-box; }
html,body { margin:0; height:100%; overflow:hidden; background:#122c32; color:#ecedd5; font:14px system-ui; overscroll-behavior:none; }
main { height:100dvh; max-width:780px; margin:auto; padding:10px; display:grid; grid-template-rows:auto minmax(44px,1fr) auto; gap:8px; }
header { position:relative; padding-right:48px; }
h1 { font-size:23px; margin:4px 0; } small { font-size:10px; letter-spacing:1px; color:#9ed7c6; }
p { margin:6px 0; font-size:12px; } #message { min-height:30px; } #clock { position:absolute; right:0; top:25px; font-size:23px; }
section { position:relative; min-height:44px; overflow:hidden; border:1px solid #668a85; border-radius:18px; background:linear-gradient(#365c67,#193f41); }
canvas { display:block; width:100%; height:100%; touch-action:none; }
#labels { position:absolute; inset:0; pointer-events:none; } .tag { position:absolute; transform:translate(-50%,-50%); font-size:11px; color:#ffe3a0; white-space:nowrap; }
footer>div { display:flex; gap:8px; } button { min-height:44px; min-width:44px; flex:1; border:0; border-radius:10px; font:700 14px system-ui; background:#afd7bd; color:#153f3c; touch-action:manipulation; }
:focus-visible { outline:3px solid #ffe3a0; outline-offset:-3px; } #count { color:#ffe3a0; }
@media (orientation:landscape) { main { max-width:none; grid-template-columns:155px minmax(44px,1fr) 155px; grid-template-rows:minmax(44px,1fr); } header,footer { align-self:center; } header { padding:0; } #clock { position:static; } h1 { font-size:21px; } }
@media (max-width:350px) { main { padding:6px; gap:4px; } h1 { font-size:20px; } }
.catalog { display:inline-flex; align-items:center; min-width:44px; min-height:44px; color:#ffe3a0; }
header small { display:block; } footer>div { flex-wrap:wrap; gap:4px; } footer button { flex:1 1 28%; font-size:12px; }
#storage { font-size:11px; } dialog { max-width:min(360px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; border:1px solid #dfc581; border-radius:18px; background:#183f40; color:#ecedd5; }
dialog::backdrop { background:#071d27bb; } dialog button { display:block; width:100%; margin:8px 0; }
#fallback:not([hidden]) { position:fixed; inset:10%; z-index:10; background:#183f40; padding:20px; border:1px solid #dfc581; border-radius:18px; } #fallback button { display:block; width:100%; margin-top:12px; }
@media (max-height:600px) and (orientation:portrait) { header .catalog { float:left; margin-right:8px; } header small { display:none; } #help { font-size:10px; } }
