:root { --bg: #0b1118; --fg: #eef3f9; --muted: #aab8c8; --accent: #ffb454; --on: #2e7d62; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; overflow: hidden; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
.loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 1.2rem; background: var(--bg); z-index: 5; }

#overlay { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#overlay > * { pointer-events: auto; }
.card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  background: rgba(8, 12, 18, 0.86); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 18px; padding: 22px 24px; backdrop-filter: blur(6px); }
.card h1 { margin: 0 0 8px; font-size: 1.7rem; letter-spacing: 0.01em; }
.card h1 span { font-weight: 400; color: var(--accent); font-size: 1.05rem; margin-left: 6px; }
.lead { margin: 0 0 12px; line-height: 1.45; }
.note { margin: 0 0 14px; color: var(--muted); line-height: 1.45; }
.small { margin: 12px 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.small a { color: var(--fg); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
button { font: inherit; color: var(--fg); background: rgba(34, 40, 52, 0.92); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 12px; padding: 10px 16px; cursor: pointer; min-height: 44px; }
button:hover { background: rgba(60, 72, 94, 0.95); }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button.on { background: var(--on); border-color: #8ff0c4; }
button.primary { background: #b5541b; border-color: #ffcf9a; font-weight: 700; }
button.primary:hover { background: #cf6322; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); }
.group { display: flex; gap: 6px; flex-wrap: wrap; }
.debug { position: fixed; left: 8px; top: 8px; z-index: 6; font: 12px/1.3 ui-monospace, Consolas, monospace; background: rgba(0, 0, 0, 0.6); color: #9f9; padding: 4px 8px; border-radius: 6px; max-width: calc(100vw - 16px); }
@media (max-width: 640px) { button { padding: 8px 12px; } .card { padding: 16px; } }
.shotimg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; }
