*{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{position:relative;width:100%;aspect-ratio:1;max-height:320px;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}#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}#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. */


/* 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] 

/* 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}

#level{text-align:center}#marks{position:absolute;inset:0}.mark{position:absolute;width:9%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:#ffe0a0;box-shadow:0 0 10px #dfad6833}.mark.star{border-radius:0;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 94%,50% 72%,21% 94%,32% 57%,2% 35%,39% 35%)}#prompt{font-size:36px;font-weight:800;color:#ffe0a0}#answers{min-height:136px}#next[hidden]{display:block!important;visibility:hidden}#next{flex-shrink:0}.arena{gap:8px}.coach{min-height:88px}.coach img{width:84px;height:84px}.panel #results{line-height:1.8;text-align:center}

/* 縦画面の盤面とタッチ領域を優先 */
@media(max-height:760px){.arena{height:auto;min-height:calc(100svh - var(--nav-height,105px) - 12px);gap:6px;padding:8px}.coach{min-height:64px}.coach img{width:64px;height:64px}.stage{flex:none;height:180px;aspect-ratio:auto}#answers{min-height:120px}#answers button{min-height:56px}.portrait{width:88px;height:88px}.panel{padding:12px}}

.panel #results{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}.result-item{font-size:12px;border-bottom:1px solid #eef0f3;padding:2px 0}

#stage[data-verdict=correct]{border-color:#91d5b0}#stage[data-verdict=wrong]{border-color:#e9a9a9}#stage[data-verdict=wrong] #prompt{color:#ffd0d0}#stage[data-verdict=correct] #prompt{color:#b5f3d0}
