:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:#f8fafc;background:#080a1c}*{box-sizing:border-box}body{margin:0;min-height:100dvh}.app{min-height:100dvh;background:#0b1029 center/cover fixed;display:flex;align-items:center;justify-content:center;padding:16px 12px}.app.kids{background-image:linear-gradient(#0710259c,#071025ad),url('assets/images/bg_kids_adventure.png')}.app.adult{background-image:linear-gradient(#050817ab,#050817d9),url('assets/images/bg_adult_speed.png')}.panel{width:min(100%,490px);background:#0d1629ee;border:2px solid #334155;border-radius:22px;padding:24px;box-shadow:0 25px 65px #0009;text-align:center}.brand{display:flex;align-items:center;justify-content:center;gap:9px;color:#d6c5ff;font-weight:900;text-transform:uppercase;letter-spacing:.15em;font-size:11px}.brand img{width:38px;height:38px;object-fit:contain}.hero-logo{display:block;width:116px;height:116px;object-fit:contain;margin:0 auto 10px;filter:drop-shadow(0 0 18px #825bff66)}h1{font-size:clamp(29px,6vw,42px);line-height:1.08;letter-spacing:-.04em;color:#fde047;margin:9px 0}h2{margin:8px 0 12px;color:#fde047;font-size:24px}.subtitle{color:#cbd5e1;font-size:14px;line-height:1.5;margin:8px 0 17px}.mode-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.btn,.number,.choice{cursor:pointer;touch-action:manipulation;border-radius:13px;min-height:47px;border:1px solid #475569;background:#19263d;color:white;font-size:15px;font-weight:800;padding:11px;transition:background .15s,transform .1s}.btn:hover,.number:hover,.choice:hover{background:#2b3f5f}.btn:active,.number:active,.choice:active{transform:scale(.97)}.btn.primary{background:linear-gradient(110deg,#fde047,#f59e0b);border:0;color:#101827;font-size:19px;width:100%;margin-top:12px}.btn.secondary{background:#243353}.btn.selected,.choice.selected{background:#0284c7;border-color:#7dd3fc}.adult .btn.selected,.adult .choice.selected{background:#0891b2}.btn:focus-visible,.number:focus-visible,.choice:focus-visible{outline:3px solid #fde047;outline-offset:2px}.section-title{color:#94a3b8;text-align:left;font-weight:800;font-size:12px;margin:17px 0 8px}.choices{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.choices.stage{grid-template-columns:repeat(4,1fr)}.choice{padding:6px;min-height:40px;font-size:13px}.settings{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#e2e8f0;font-size:13px;text-align:left;padding:12px 0}.settings input{width:21px;height:21px;accent-color:#0ea5e9}.hud{display:flex;justify-content:space-between;align-items:center;gap:7px;font-size:13px;margin:0 0 14px}.hud .score{font-weight:900;color:#fde047;font-size:18px}.pill{background:#24334e;border-radius:20px;padding:5px 11px;color:#cbd5e1}.bar{background:#334155;border:1px solid #64748b;height:15px;border-radius:12px;overflow:hidden;margin:15px 0 7px}.bar-inner{height:100%;width:100%;background:linear-gradient(90deg,#06b6d4,#facc15);transition:width .08s linear}.equation{border:2px solid #38bdf8;border-radius:18px;background:#080f20ed;padding:22px 9px;margin:11px 0 14px}.adult .equation{border-color:#06b6d4;box-shadow:0 0 24px #06b6d433}.equation .label{color:#94a3b8;text-transform:uppercase;letter-spacing:.09em;font-size:11px;font-weight:900}.formula{font-size:clamp(33px,8vw,51px);font-weight:1000;letter-spacing:-.04em;display:flex;justify-content:center;align-items:center;gap:9px;margin:10px auto}.formula .operator{color:#facc15}.answer{color:#fde047;min-width:60px;border-bottom:4px solid #facc15;padding:0 5px;overflow:hidden}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.number{font-size:25px;min-height:53px;background:#1e293b}.number.action{font-size:19px;color:#fcd34d}.controls{display:flex;gap:8px;justify-content:center;margin-top:13px}.controls .btn{flex:1}.small{color:#cbd5e1;font-size:12px}.feedback{font-size:17px;font-weight:900;border-radius:12px;padding:10px;background:#064e3b;color:#a7f3d0;margin:10px 0}.feedback.bad{background:#4c1525;color:#fecdd3}.countdown{font-size:clamp(54px,13vw,100px);font-weight:1000;color:#fde047;margin:30px 0}.summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.stat{background:#1e293b;border-radius:12px;padding:12px}.stat strong{display:block;color:#fde047;font-size:25px}.stat small{color:#cbd5e1}.row{display:flex;justify-content:space-between;gap:12px;align-items:center}.footer{font-size:11px;color:#94a3b8;margin-top:16px}.notice{background:#1d2a43;padding:10px;border-radius:10px;color:#fcd34d;font-size:12px}.hidden{display:none!important}@media(max-width:440px){.panel{padding:16px 13px}.choice{min-height:36px}.equation{padding:15px 5px}.number{min-height:48px}.hud{font-size:11px}.formula{gap:7px}}@media(max-height:720px){.app{align-items:flex-start}.panel{padding-top:12px}.hero-logo{width:75px;height:75px}.number{min-height:44px}.equation{margin:6px 0}.controls{margin-top:7px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
