:root{--bg:#121316;--panel:#1a1c22;--gold:#F5B301;--ivory:#F7F7F7;--muted:#a5acb8;--line:#2e323d}
*{box-sizing:border-box;margin:0;padding:0;user-select:none;-webkit-user-select:none}
html,body{width:100%;height:100%;background:var(--bg);color:var(--ivory);font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;overflow:hidden;touch-action:none}
body{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:8px}
.hud{display:flex;gap:14px;align-items:center;font-size:14px;color:var(--muted)}
.hud b{color:var(--gold);font-size:18px}
h1{font-size:15px;letter-spacing:.12em;color:var(--gold)}
.stage{position:relative;width:min(94vw,calc(100vh - 90px),460px);aspect-ratio:1}
canvas{width:100%;height:100%;display:block;background:var(--panel);border:1px solid var(--line);border-radius:10px}
.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:18px;background:rgba(18,19,22,.88);border-radius:10px}
.overlay.hidden{display:none}
.overlay p{color:var(--muted);font-size:14px;max-width:30ch}
button{font:inherit;font-weight:700;background:var(--gold);color:#121316;border:0;border-radius:8px;padding:10px 20px;cursor:pointer;touch-action:manipulation}
button:focus-visible{outline:2px solid var(--ivory);outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.stage{aspect-ratio:auto;min-height:320px;display:flex;flex-direction:column;gap:12px;padding:16px;background:var(--panel);border:1px solid var(--line);border-radius:10px}
#q{font-size:17px;line-height:1.35;min-height:3.4em}
.opts{display:grid;gap:8px}
.opts button{background:#23262f;color:var(--ivory);text-align:left;border:1px solid var(--line);font-weight:500}
.opts button.ok{background:#1f6b3a;border-color:#2fa356}.opts button.ko{background:#7a2230;border-color:#b3394c}
#exp{color:var(--muted);font-size:13px;min-height:2.6em}
.bar{height:4px;background:var(--line);border-radius:2px}.bar i{display:block;height:100%;background:var(--gold);border-radius:2px;width:0}
