:root { --bg:#0b1220; --panel:#111a2e; --ink:#e7ecf5; --muted:#9aa6bf; --accent:#ff5a5f; --accent2:#ffd166; }
* { box-sizing: border-box; }
html, body { margin:0; padding:0; height:100%; background:var(--bg); color:var(--ink); font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
#app { max-width:520px; margin:0 auto; padding:10px; display:flex; flex-direction:column; gap:8px; height:100%; }
.topbar { display:flex; align-items:center; gap:8px; }
.title { font-weight:700; } .title small { color:var(--muted); font-weight:400; font-size:12px; margin-left:6px; }
.spacer { flex:1; }
.hud { font-size:14px; } .hud b { color:var(--accent2); } .sep { color:var(--muted); margin:0 4px; } .opt { color:var(--muted); font-size:12px; }
#status { font-size:13px; color:var(--muted); min-height:16px; }
canvas { width:100%; aspect-ratio:16/9; background:#0b1220; border-radius:10px; display:block; touch-action:none; }
#statusbar { display:flex; justify-content:center; }
.btn { background:var(--panel); color:var(--ink); border:1px solid #2a3550; padding:8px 14px; border-radius:8px; font-size:14px; cursor:pointer; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
#touchpad { display:flex; gap:10px; justify-content:center; }
.tbtn { flex:1; max-width:160px; padding:12px; font-size:14px; font-weight:700; border-radius:10px; background:var(--panel); color:var(--ink); border:1px solid #2a3550; cursor:pointer; }
#toast { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); background:#111a2e; color:#e7ecf5; padding:8px 14px; border-radius:8px; opacity:0; transition:opacity .2s; pointer-events:none; }
#toast.show { opacity:1; }
@media (min-width:600px){ #touchpad { display:none; } }