* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #092b30; color: #e7fff1; font: 14px system-ui, sans-serif; }
#stage { position: relative; height: 100dvh; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; }
header { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 18px; right: 18px; pointer-events: none; }
small { color: #91cebb; font-size: 10px; letter-spacing: 2px; }
h1 { font-size: 22px; margin: 6px 0; }
#clock { float: right; font-size: 22px; } #bells { font-size: 24px; color: #ffda8c; }
#message { position: absolute; top: 120px; left: 5%; width: 90%; text-align: center; color: #ffda8c; pointer-events: none; }
footer { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); width: 100%; text-align: center; pointer-events: none; }
#help { font-size: 11px; line-height: 1.7; }
nav { display: flex; justify-content: center; gap: 12px; }
button { min-width: 96px; min-height: 48px; border: 1px solid #83ccb0; border-radius: 24px; background: #153f40; color: inherit; font: inherit; pointer-events: auto; }
:focus-visible { outline: 3px solid #ffda8c; outline-offset: -3px; }
#error { position: absolute; top: 40%; padding: 24px; background: #60342d; } [hidden] { display: none !important; }
@media (max-height: 500px) {
  header { top: 8px; width: 29%; } h1 { font-size: 17px; } #clock { float: none; margin-right: 20px; }
  #message { top: 6px; left: 65%; width: 33%; font-size: 12px; }
  footer { right: 8px; width: 29%; bottom: 8px; } #help { font-size: 9px; } button { min-width: 80px; }
}
body[data-production] nav { flex-wrap: wrap; gap: 6px; padding: 0 8px; }
body[data-production] button { min-width: 88px; padding: 0 10px; }
#storage, #reward-status { margin: 3px 12px; font-size: 10px; color: #b4d8c9; }
#loading { position: absolute; top: 40%; width: 100%; text-align: center; }
#completion { position: absolute; top: 21%; left: 8%; width: 84%; padding: 12px; border-radius: 16px; background: #153f40ee; text-align: center; pointer-events: none; }
#completion p { margin: 7px; color: #91a59f; } #completion [data-rung="true"] { color: #ffda8c; }
dialog { max-width: min(310px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: #153f40; color: #e7fff1; border: 1px solid #83ccb0; border-radius: 20px; padding: 18px; text-align: center; }
dialog button { margin: 4px; } dialog::backdrop { background: #092b30cc; }
@media (max-height: 500px) {
  body[data-production] footer { width: 30%; } body[data-production] #help { display: none; }
  body[data-production] nav { gap: 4px; } body[data-production] button { min-width: 80px; font-size: 11px; }
  #completion { left: 2%; width: 29%; top: 34%; font-size: 12px; }
}
