/* Release presentation: carry the same crisp arcade framing into play and results. */
.game-world .session-hsk{display:inline-block;color:#b9f3ee;background:#113b4d;border:1px solid #568a99;border-radius:3px;padding:2px 6px;font-size:13px;font-weight:700;line-height:1.3;white-space:nowrap;letter-spacing:0}
.game-world .session-identity{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;max-width:40%}
.game-world .session-mode{font-size:14px;font-weight:700;line-height:1.3;color:#ffe8a0;letter-spacing:0}
.game-world .hud>.session-identity{align-self:center}
.game-world .sentence-levels>.session-mode{flex-basis:100%}
.game-world #sentence-dialog .sentence-hud{position:sticky;top:0;z-index:2;background:#102441;box-shadow:0 5px 0 #102441}
.game-world #combat .combat-head>div:first-child{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
.game-world #writing-lab .writing-head .session-hsk{font-size:12px}
.game-world #sentence-dialog .sentence-levels{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
@media(max-width:450px){.game-world.playing .hud{gap:6px}.game-world.playing .hud strong{font-size:20px}.game-world.playing .hud small{font-size:11px}.game-world.playing .session-identity{max-width:112px;gap:3px}.game-world.playing .session-identity .session-hsk{white-space:normal;font-size:12px}}
.game-world .mode-tile[data-world-mode="writing"]{border-color:#77c6c8}
.game-world .mode-tile[data-world-mode="writing"] .mode-copy{border-color:#83e4d1}
.game-world .mode-tile[data-world-mode="boss"]{border-color:#d4b47a}
.game-world .mode-tile[data-world-mode="boss"] .mode-copy{border-color:#f5c97f}
.game-world .mode-tile[data-world-mode="adventure"] .mode-copy{border-color:#a6baff}
.game-world .mode-group-heading{border:0;border-left:3px solid #7de6d1;padding:4px 0 4px 10px;background:linear-gradient(90deg,#163751 0,transparent 70%);color:#e2f8ff}
.game-world.playing .arena{border-radius:0}
.game-world.playing .question{border-inline:0;background:linear-gradient(125deg,#173c63,#122949);min-height:0}
.game-world.playing .question .eyebrow{color:#bfe7e9}
.game-world.playing .overdrive-panel{border-bottom:1px solid #495176}
.game-world.playing .arena:not(.bubble-mode) .targets{gap:12px;padding:14px 12px}
.game-world.playing .target:not(.word-bubble){border-radius:4px;box-shadow:inset 0 2px 0 #8fb9d6,2px 3px 0 #030b1c;min-height:88px}
.game-world.playing .target.correct:not(.word-bubble){box-shadow:inset 0 2px 0 #bafee5,0 0 16px #6fedbb55}
.game-world.playing .target.wrong:not(.word-bubble){box-shadow:inset 0 2px 0 #ffd1da,0 0 14px #ff889755}
.game-world.playing .bottom{min-height:60px}
.game-world.playing .arena-foot #exit:not([hidden]){position:static;top:auto;right:auto;z-index:auto;margin-left:auto;min-height:44px;padding:7px 10px;border-radius:0}
.game-world #results:not([hidden]){border-radius:0;border-color:#567f9a;box-shadow:3px 4px 0 #040b1a}
.game-world #results:not([hidden]) h2{line-height:1.2;color:#fff0b8}
.game-world #results:not([hidden]) .result-stats>div{border-radius:0;border-top:2px solid #83d8c9}
.game-world #results:not([hidden]) .review-item{border-radius:0;border-left:2px solid #446987}
.game-world #howto-dialog,.game-world #exit-dialog,.game-world #player-name-dialog{border-radius:0;box-shadow:5px 6px 0 #030b19}
.game-world #howto-dialog::backdrop,.game-world #exit-dialog::backdrop,.game-world #player-name-dialog::backdrop{background:#030d24b8}
.game-world #howto-dialog h2,.game-world #exit-dialog h2,.game-world #player-name-dialog h2{color:#ffe7a5}
.game-world .setting-field select,.game-world .setting-field input,.game-world #player{border-radius:0}
@media(max-width:650px){
 .game-world .mode-grid{gap:9px}
 .game-world .mode-group-heading{margin-top:10px;font-size:14px}
 .game-world .mode-tile{box-shadow:0 3px 0 #020c1c}
 .game-world .mode-tile:not([data-world-mode="boss"]) .mode-art{height:88px}
 .game-world .mode-tile[data-world-mode="adventure"] .mode-art,.game-world .mode-tile[data-world-mode="writing"] .mode-art{height:118px}
 .game-world .mode-copy{padding:10px 9px;gap:5px}
 .game-world .mode-copy>span:not(.tile-kicker):not(.eyebrow),.game-world .mode-copy>p{line-height:1.35}
 .game-world.playing .question{padding:8px 10px;min-height:0}
 .game-world.playing .question h1{margin:4px 0;line-height:1.23}
 .game-world.playing .question .prompt-pinyin{margin:3px 0 6px}
 .game-world.playing .hud{padding:6px 10px}
 .game-world.playing .overdrive-panel{padding:5px 10px}
 .game-world.playing .overdrive-panel>div{align-items:center;gap:3px 8px}
 .game-world.playing .overdrive-panel span{font-size:12px}
 .game-world.playing .overdrive-panel progress{margin-top:4px}
 .game-world.playing .field{min-height:250px}
 .game-world.playing .arena:not(.bubble-mode) .targets{padding:10px 9px;gap:9px}
 .game-world.playing .target:not(.word-bubble){min-height:82px;padding:7px}
 .game-world.playing .bottom{padding:8px 10px;min-height:56px}
 .game-world.playing .arena-foot{padding:6px 9px}
 .game-world #results:not([hidden]) h2{font-size:25px}
 .game-world #results:not([hidden]) .result-stats{gap:8px;margin:14px 0}
 .game-world #results:not([hidden]) .result-stats>div{padding:8px}
 .game-world #howto-dialog,.game-world #exit-dialog,.game-world #player-name-dialog{padding:17px;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px)}
}
@media(max-height:500px) and (orientation:landscape){
 .game-world.playing .app>header{min-height:48px;height:48px}
 .game-world.playing .workspace{margin:5px auto}
 .game-world.playing .field{min-height:170px}
 .game-world.playing .question{min-height:0}
 .game-world.playing .target:not(.word-bubble){min-height:62px}
}

/* Visible result state follows finish(), which removes body.playing first. */
.game-world #results:not([hidden]){max-width:920px;margin:20px auto;padding:22px;background:#0b213a}
.game-world #results:not([hidden]) .result-actions{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}
.game-world #results:not([hidden]) .result-actions button,.game-world #results:not([hidden]) #results-home{min-height:48px;padding:9px 15px;border-radius:0;border:2px solid #77a8c1;background:#173855;color:#f2fbff;box-shadow:2px 3px 0 #030e1d;font-size:15px}
.game-world #results:not([hidden]) #again{background:linear-gradient(#ffebae,#ecc353);border-color:#fff1c0;color:#182c3b;font-weight:800}
.game-world #results:not([hidden]) #result-title{margin:4px 0 12px}
@media(max-width:650px){.game-world #results:not([hidden]){padding:14px 11px}.game-world #results:not([hidden]) .result-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.game-world #results:not([hidden]) .result-actions button{flex:1 1 140px}}
@media(max-height:500px) and (min-width:700px) and (orientation:landscape){
 /* Keep the new identity and the four answer targets together in short views. */
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .hud{padding:3px 10px;min-height:0}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .hud strong{font-size:18px}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .overdrive-panel{padding:3px 10px}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .overdrive-panel progress{margin-top:2px;height:5px}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .question{padding:3px 10px;min-height:0}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .question h1{font-size:24px;margin:1px 0}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .prompt-pinyin{margin:0;font-size:14px}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .targets{padding:5px 10px;gap:6px}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .target{min-height:54px;padding:3px 7px;font-size:15px}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .target .hanzi{font-size:23px}
 .game-world.playing .arena:not(.bubble-mode):not([data-world-mode="match"]):not([data-world-mode="campaign"]) .target .pinyin{font-size:13px;margin-top:0}
 .game-world.playing .app>header{height:40px;min-height:40px}
 .game-world.playing .brand{font-size:16px}.game-world.playing .brand small{display:none}
 .game-world.playing .workspace{margin:0 auto}
 .game-world.playing .arena[data-world-mode="match"] .hud{min-height:0;padding:2px 8px;gap:5px}
 .game-world.playing .arena[data-world-mode="match"] .hud>div{display:flex;align-items:center;gap:4px;font-size:12px}
 .game-world.playing .arena[data-world-mode="match"] .hud small{font-size:11px}
 .game-world.playing .arena[data-world-mode="match"] .hud strong{font-size:15px}
 .game-world.playing .arena[data-world-mode="match"] .question{display:flex;align-items:center;justify-content:center;gap:7px;min-height:0;padding:2px 8px}
 .game-world.playing .arena[data-world-mode="match"] .question h1{font-size:16px;margin:0;line-height:1.15}
 .game-world.playing .arena[data-world-mode="match"] .overdrive-panel{padding:2px 8px}
 .game-world.playing .arena[data-world-mode="match"] .overdrive-panel progress{margin-top:1px}
 .game-world.playing .arena[data-world-mode="match"] .matching{gap:14px;padding:2px 8px;min-height:0}
 .game-world.playing .arena[data-world-mode="match"] .match-col{gap:3px}
 .game-world.playing .arena[data-world-mode="match"] .match-card{min-height:46px;padding:2px 4px;font-size:14px;line-height:1.1}
 .game-world.playing .arena[data-world-mode="match"] .match-card .hanzi{font-size:22px}
 .game-world.playing .arena[data-world-mode="match"] .match-card .pinyin{font-size:11px;line-height:1.1}
 .game-world #combat[data-phase="learn"] .phase-guide,.game-world #combat[data-phase="question"] .phase-guide{display:none}
 .game-world #combat .combat-head{padding:0 3px 2px}
 .game-world #combat[data-phase="question"] .combat-main>.combat-hud{margin-top:0}
 .game-world #combat[data-phase="question"] .combat-main>h2{display:none}
 .game-world #combat .encounter-layout{grid-template-columns:145px minmax(0,1fr);gap:8px}
 .game-world #combat .boss-target{height:143px}.game-world #combat .boss-target .sprite-guardian{height:143px;width:143px}
 .game-world #combat .combat-main{padding:2px 3px 6px}
 .game-world #combat .combat-main>h1{font-size:23px;line-height:1.12;margin:2px 0}
 .game-world #combat .combat-main>h2{margin:0 0 2px;font-size:14px}
 .game-world #combat .combat-answers{margin-top:3px;gap:5px}
 .game-world #combat .combat-answers>button{min-height:64px;padding:2px 5px;font-size:21px}
 .game-world #combat .combat-answers .combat-pinyin{font-size:13px!important;line-height:1.1}
}
/* Timed shots stay inside the field; overlays never intercept input. */
.shot-tracer,.muzzle-flash{position:absolute;pointer-events:none;z-index:5}
.shot-tracer{height:6px;background:linear-gradient(90deg,#73e2e300 0%,#73e2e3 38%,#fff 90%,#fff9c2);box-shadow:0 0 6px #fff9c2,0 0 14px #73e2e3;transform-origin:left center;animation:tracer-travel 190ms linear both}
.muzzle-flash{width:34px;height:34px;border-radius:50%;background:radial-gradient(circle,#fffbd8 0 16%,#ffd369 22%,#73e2e350 55%,transparent 72%);transform:translate(-50%,-50%);animation:muzzle-pop 90ms ease-out both}
.field.shot-kick{animation:shot-micro-kick 180ms ease-out}
.blast.shot-impact{z-index:6;width:46px;height:46px;border:4px solid currentColor;color:var(--lime);box-shadow:0 0 18px currentColor,inset 0 0 12px currentColor;animation:shot-impact 320ms ease-out both}
.blast.impact-wrong{color:#ff919e;border-radius:20%}
.blast.shot-impact::before,.blast.shot-impact::after{content:'';position:absolute;inset:-18px;border:2px dashed currentColor;border-radius:50%;rotate:25deg;opacity:.7}
.blast.shot-impact::after{inset:-9px;rotate:65deg;opacity:.4}
.target.shot-hit{animation:target-impact 240ms ease-out!important;opacity:1}
.shot-tracer.shot-landed{transform:scaleX(1);animation:tracer-tail 80ms ease-out both}
.weapon.timed-recoil #gun{animation:timed-recoil 170ms ease-out}
@keyframes timed-recoil{25%{translate:-3px 5px;rotate:5deg}to{translate:0 0;rotate:0deg}}
@keyframes tracer-tail{from{opacity:1}to{opacity:0}}
@keyframes tracer-travel{from{transform:scaleX(.02);opacity:.7}to{transform:scaleX(1);opacity:1}}
@keyframes muzzle-pop{from{scale:.6;opacity:1}to{scale:1.25;opacity:0}}
@keyframes shot-micro-kick{20%{translate:1px 2px}45%{translate:-1px -1px}70%{translate:1px 0}to{translate:0 0}}
@keyframes shot-impact{0%{opacity:1;scale:.85}16%{opacity:1;scale:.85}to{opacity:0;scale:1.8}}
@keyframes target-impact{0%,21%{scale:.96;translate:0 3px}65%{scale:1.015}to{scale:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){.field.shot-kick,.target.shot-hit,.weapon.timed-recoil #gun{animation:none!important}.shot-tracer{animation:none!important;opacity:.8}.shot-tracer.shot-landed{opacity:0}.muzzle-flash{animation:none!important;opacity:1}.blast.shot-impact{animation:none!important;opacity:1}}
