:root {
  --bg: #0b1220;
  --panel: #111827;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --btn: #1f2937;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 12px 10px 24px; }
#app { width: 100%; max-width: 520px; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.title { font-weight: 700; font-size: 1.1em; }
.title small { font-weight: 400; color: var(--muted); font-size: 0.7em; }
.spacer { flex: 1; }
.hud { display: flex; gap: 8px; font-size: 0.9em; color: var(--muted); }
.hud b { color: var(--text); }
#status { min-height: 20px; color: var(--muted); font-size: 0.9em; margin: 6px 0; text-align: center; }
#stage { width: 100%; height: auto; border-radius: 10px; background: #0b1220; touch-action: none; display: block; }
#statusbar { margin-top: 10px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.btn { padding: 10px 16px; border: 1px solid #334155; background: var(--btn); color: var(--text); border-radius: 8px; font-size: 0.95em; cursor: pointer; }
.btn.primary { background: var(--accent); color: #0b1220; border-color: var(--accent); font-weight: 700; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 8px 14px; border-radius: 8px; opacity: 0; transition: opacity 0.2s; pointer-events: none; font-size: 0.9em; }
#toast.show { opacity: 1; }
#touchpad { display: none; margin-top: 10px; gap: 8px; justify-content: center; }
.touch #touchpad { display: flex; }
.tbtn { width: 72px; height: 56px; border-radius: 10px; background: #1f2937; color: #fff; border: 1px solid #334155; font-size: 0.85em; font-weight: 700; user-select: none; -webkit-user-select: none; touch-action: none; }
