:root { color-scheme: dark; --ink: #e8fff6; --dim: #8fb8a8; --accent: #3fd7a5; --gold: #ffd166; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05070d; color: var(--ink); font: 14px/1.3 ui-sans-serif, system-ui, -apple-system, sans-serif; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 10px 8px; background: linear-gradient(#05070dcc, #05070d00); }
.stat { display: flex; flex-direction: column; min-width: 52px; padding: 4px 10px; border: 1px solid #3fd7a533; border-radius: 10px; background: #0b1512cc; }
.stat span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.stat strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.hud select, .hud button { min-height: 44px; border-radius: 22px; border: 1px solid #3fd7a566; background: #0b1512; color: var(--ink); padding: 0 14px; font: inherit; }
.hud button { font-weight: 600; }
.hint, .toast { position: fixed; left: 50%; transform: translateX(-50%); max-width: calc(100% - 140px); margin: 0; padding: 8px 14px; border-radius: 14px; text-align: center; background: #0b1512e6; border: 1px solid #3fd7a544; }
.hint { bottom: calc(env(safe-area-inset-bottom) + 16px); color: var(--dim); font-size: 12px; }
.toast { top: calc(env(safe-area-inset-top) + 76px); color: var(--gold); font-weight: 600; }
.pad { position: fixed; right: 14px; bottom: calc(env(safe-area-inset-bottom) + 16px); width: 64px; height: min(196px, calc(100vh - 96px)); min-height: 120px; touch-action: none; }
.track { position: absolute; left: 26px; top: 0; bottom: 0; width: 12px; border-radius: 6px; background: #0b1512; border: 1px solid #3fd7a544; overflow: hidden; }
.meter { position: absolute; left: 0; right: 0; top: 0; height: 0; background: linear-gradient(var(--accent), var(--gold), #ff5d5d); }
.knob { position: absolute; left: 0; top: 0; width: 64px; height: 44px; display: grid; place-items: center; border-radius: 22px; background: #f8f8f2; color: #05070d; font-weight: 700; box-shadow: 0 4px 16px #0008; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Short frames (the Sidekick's iPad split): no hint, toast tucked under the HUD. */
@media (max-height: 460px) {
  .hint { display: none; }
  .toast { top: calc(env(safe-area-inset-top) + 64px); padding: 4px 10px; font-size: 12px; }
}
@media (max-width: 480px) {
  .stat { min-width: 44px; padding: 3px 8px; }
  .stat strong { font-size: 16px; }
  .hud select { max-width: 104px; padding: 0 8px; }
  .hud button { padding: 0 10px; }
}
