*{box-sizing:border-box}body{margin:0;background:#fff;color:#2a2328;font-family:system-ui,sans-serif}button{font:inherit;min-height:48px;border:1px solid #ccd0d7;border-radius:8px;background:#f3f4f6;color:#2a2328;font-weight:700;touch-action:manipulation}button:disabled{opacity:.6}[hidden]{display:none!important}main{max-width:480px;margin:auto;padding:4px 8px}.arena{background:#172639;color:#fff5dd;border:2px solid #a68a4c;border-radius:12px;padding:12px;min-height:450px}.hud{display:flex;align-items:center;justify-content:space-between;font-size:13px;gap:8px}.hud button{padding:0 12px}.hint,.order{text-align:center;font-size:13px;color:#dfd6c3}.problem{padding:28px 0}#equation{font-size:clamp(19px,6.2vw,29px);font-weight:800;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:-1px}.choices{display:flex;gap:12px}.choices button{flex:1;font-size:32px;min-height:76px;border:2px solid #b8bec8}.choices button[aria-pressed=true]{background:#f1d38b;border-color:#ffdf88}.choices button.correct{border-color:#8cddba;background:#d8f2e6}#feedback{min-height:58px;text-align:center;font-size:15px;padding:16px 0}#next{width:100%;background:#efdbab}#panel{text-align:center;display:grid;justify-items:center;gap:12px;padding:16px 8px}#panel h2,#panel p{margin:0}#panel h2{font-size:21px}#panel p{font-size:13px;line-height:1.6}#panel button{width:100%;background:#efdbab}#panel #fresh{background:#f3f4f6}#best{color:#dfd6c3}.portrait{object-fit:contain;border-radius:12px}aside{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:13px}aside strong{font-size:12px}aside p{margin:4px 0;line-height:1.5}aside img{object-fit:contain;flex-shrink:0}@media(max-width:350px){#equation{font-size:20px}.arena{padding:10px}.choices{gap:8px}}@media(prefers-reduced-motion:no-preference){.choices button.correct{animation:shine .3s ease-out}@keyframes shine{50%{box-shadow:0 0 18px #f4dc8d99}}}

#feedback{line-height:1.6;overflow-wrap:anywhere}.choices button:disabled{opacity:1}.choices button:disabled:not([aria-pressed=true]):not(.correct){opacity:.55}

@media(max-height:700px){.arena{min-height:390px}.portrait{width:120px;height:120px}#panel{gap:9px;padding:10px 4px}.problem{padding:16px 0}}
.problem{display:grid;grid-template-columns:1fr 20px 1fr;align-items:center;text-align:center;padding:26px 0 18px;gap:4px}.problem p{font-size:30px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;margin:16px 0 8px;letter-spacing:-1px}.side{font-size:12px;color:#dfd6c3}.value{display:block;height:28px;font-size:19px;color:#b8ebd2}.versus{font-size:23px;color:#efd597}.choices{gap:8px}.choices button{min-width:0;min-height:88px;padding:8px 2px;font-size:14px}.choices b{display:block;font-size:30px;line-height:1.3}.choices span{display:block;font-size:12px}.choices button:disabled{opacity:1}.choices button.wrong{border-color:#f3a9a9;background:#f9dddd}.meter{height:4px;background:#384658;margin-top:12px;border-radius:4px;overflow:hidden}.meter span{display:block;height:100%;background:#efd597;width:0}#feedback{font-size:13px;min-height:62px;line-height:1.5}.arena{min-height:458px}#next{min-height:52px}#best{font-variant-numeric:tabular-nums}@media(max-width:350px){.problem p{font-size:26px}.choices{gap:6px}.arena{padding:10px}}

.choices button[aria-pressed=true]{outline:2px solid #efd597;outline-offset:2px}.choices button.correct{border-color:#8cddba;background:#d8f2e6}.choices button.wrong{border-style:dashed}
@media(max-height:700px){.portrait{width:120px;height:120px}#panel{gap:10px;padding:12px 4px}.arena{min-height:414px}.problem{padding:18px 0 10px}aside img{width:52px;height:52px}} 
