*{box-sizing:border-box}body{margin:0;background:#080e1b;color:#fff;font-family:system-ui,-apple-system,'Noto Sans JP',sans-serif}main{max-width:440px;margin:auto;padding:4px 6px max(6px,env(safe-area-inset-bottom))}.arena{position:relative;min-height:580px;height:calc(100svh - var(--nav-height,105px) - 12px);display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid #45516a;border-radius:10px;background:radial-gradient(ellipse at 50% 38%,#24364d,#080e1b 75%)}button{font:inherit;touch-action:manipulation;min-height:48px;border:1px solid #65728a;border-radius:8px;background:#19283c;color:#fff;font-size:14px}button:disabled{color:#aeb7c5;background:#172130;border-color:#45516a}button:focus-visible{outline:2px solid #ffe0a0;outline-offset:2px}[hidden]{display:none!important}.hud{display:flex;align-items:center;gap:12px;font-size:14px}.hud strong{flex:1}.hud button{width:48px}.track{display:flex;gap:5px}.track span{height:5px;flex:1;border-radius:3px;background:#45516a}.track .current{background:#ffe0a0}.track .correct{background:#91d5b0}.track .wrong{background:#e9a9a9}.coach{display:flex;align-items:center;gap:12px;min-height:112px}.coach img{width:108px;height:108px;object-fit:cover;border:2px solid #dfad68;border-radius:50%}.coach strong{font-size:12px;color:#ffe0a0}.coach p{font-size:13px;line-height:1.6;margin:6px 0 0}.stage{flex:1;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #526079;border-radius:12px;background:#080e1b70}#level{font-size:12px;color:#d0d8e4}#flash{font-size:clamp(68px,13svh,104px);font-weight:800;line-height:1.4;font-variant-numeric:tabular-nums;color:#ffe0a0}#position{font-size:12px;color:#d0d8e4;min-height:20px}#notice{font-size:13px;text-align:center;min-height:22px;margin:0;line-height:1.6}#answers{display:grid;grid-template-columns:1fr 1fr;gap:8px}#answers button{min-height:64px;font-size:28px;font-weight:700;font-variant-numeric:tabular-nums}#answers button.correct{border:2px solid #91d5b0;color:#b5f3d0;background:#1e4038}#answers button.wrong{border:2px solid #e9a9a9;color:#ffd0d0;background:#4b2932}#equation{min-height:22px;text-align:center;font-size:14px;color:#d0d8e4}#next{min-height:50px;border-color:#dfad68;color:#ffe0a0;background:#51412b;font-weight:700}#overlay{position:absolute;inset:0;display:grid;place-items:center;background:#080e1bd9;padding:12px;border-radius:10px;overflow:auto}.panel{width:100%;max-width:340px;background:#fff;color:#2a2328;border-radius:12px;padding:20px 16px;text-align:center}.portrait{display:block;margin:auto;object-fit:cover;border:2px solid #dfad68;border-radius:50%;width:112px;height:112px}.cast-name{display:block;margin-top:6px;font-size:12px;color:#6e626a}.panel h2{font-size:21px;margin:12px 0}.panel p{font-size:14px;line-height:1.6;margin:10px 0}.panel button{width:100%;background:#eef0f3;color:#2a2328;border:0;font-weight:700;margin-top:8px}.panel small{display:block;color:#6e626a;font-size:12px;margin-top:8px}#results{font-size:12px;text-align:left}#results .result-row{display:flex;gap:8px;padding:4px 0;border-bottom:1px solid #eef0f3}#results .result-row span:last-child{margin-left:auto;white-space:nowrap}#overlay[data-mode=result] .portrait{width:72px;height:72px}#overlay[data-mode=result] .panel{padding:12px 16px}#overlay[data-mode=result] .panel h2{margin:8px 0}#overlay[data-mode=result] #panel-talk{font-size:13px;margin:6px 0}#overlay[data-mode=result] #summary{font-size:18px;font-weight:700;margin:8px 0}@media(max-height:700px){.arena{min-height:530px;gap:6px;padding:8px}.coach{min-height:84px}.coach img{width:80px;height:80px}.stage{min-height:145px}#answers button{min-height:56px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

/* Design review 1: keep the number centered during the blank interval. */
#flash{min-height:1.4em;min-width:3ch;text-align:center}

/* Design review 2: feedback adds a next action, so compact its upper area. */
.arena[data-phase=feedback]{gap:7px}.arena[data-phase=feedback] .coach{min-height:76px}.arena[data-phase=feedback] .coach img{width:72px;height:72px}.arena[data-phase=feedback] .stage{min-height:138px}.arena[data-phase=feedback] #flash{font-size:60px}

/* Design review 3: long results scroll from their top even on short phones. */
#overlay{display:flex;flex-direction:column;align-items:center}.panel{flex-shrink:0;margin:auto 0}
