/* Reference-locked presentation. Explicit selectors beat the legacy red theme. */
body.game-world{--bg:#030b24;--panel:#091b3b;--line:#285b96;--ink:#eff7ff;--gold:#ffdb62;background:#030b24;color:#eff7ff;overflow-x:visible}
body.game-world:before{background-image:url('assets/space-world.webp');background-position:center top;background-size:max(1500px,100vw) auto;background-repeat:no-repeat;opacity:.23;position:fixed;z-index:-1;inset:0}
.game-world .app{max-width:1440px;padding:0 30px;min-width:0}
.game-world .app>header{height:78px;gap:20px;background:#06112acc;border-bottom:1px solid #3167a9;position:relative;z-index:3}
.game-world .brand{font-family:Arial,Tahoma,sans-serif;font-size:24px;letter-spacing:-.7px;line-height:1.1;text-shadow:2px 2px #183c66;flex-shrink:0}
.game-world .brandmark{font-family:'Microsoft YaHei',sans-serif;width:43px;height:45px;box-shadow:3px 3px 0 #041020;border:2px solid #83ddff;color:#ffe077;background:#102c55;border-radius:0}
.game-world .brand small{letter-spacing:1.6px;font-size:10px;line-height:1.4}
.world-nav{display:flex;align-items:center;gap:24px;margin-left:auto}
.world-nav a{font-size:14px;color:#dce9ff;text-decoration:none;padding:12px 0;border-bottom:2px solid transparent}
.world-nav a:hover{color:#ffe27c;border-color:#ffe27c}
.game-world .header-right{gap:10px}.game-world .header-right .tag{display:none}
.game-world .language-picker select{background:#06152b;border:1px solid #447cae;border-radius:0;font-size:14px;padding:7px;max-width:132px}
.game-world .topline{display:none}
/* An actual image layer cannot be silently replaced by an old background rule. */
body.game-world #launch.launch{display:block;isolation:isolate;min-height:0;height:auto;padding:24px 36px 30px;margin:0 -10px 0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden;position:relative}
body.game-world #launch.launch:before{content:'';position:absolute;inset:0;z-index:0;background:linear-gradient(90deg,#030a22a6 0%,#030a2238 40%,transparent 65%),linear-gradient(0deg,#030b24 0%,transparent 16%);pointer-events:none}
.game-world #launch .hero-scene{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 52%;z-index:-1;pointer-events:none}
.game-world #launch .launch-copy{position:relative;max-width:47%;z-index:2}
.game-world #launch .launch-copy>.eyebrow{display:none;font-size:12px;color:#a9eaff;letter-spacing:2px}
.game-world #launch .game-title{font-family:Impact,'Arial Black',Arial,sans-serif;font-weight:1000;font-size:clamp(64px,6.5vw,92px);line-height:.91;letter-spacing:-3px;margin:12px 0 10px;color:#f4faff;filter:drop-shadow(0 4px 0 #071329);text-shadow:3px 0 #03091a,-3px 0 #03091a,0 -3px #03091a,0 3px #03091a,5px 6px #1a649b}
.game-world .game-title>span,.game-world .game-title>em{display:block}
.game-world #launch .game-title em{font-style:normal;color:#ffda58;text-shadow:3px 0 #100e21,-3px 0 #100e21,0 -3px #100e21,0 3px #100e21,5px 6px #986231}
.game-world #launch .hero-tagline{font-size:21px;font-weight:bold;color:#9eeaff;line-height:1.4;margin:14px 0 6px}
.game-world #launch .hero-description{font-size:16px;color:#e5eeff;line-height:1.55;margin:0 0 20px;max-width:370px}
.game-world #launch #open-bubbles{min-width:280px;max-width:100%;min-height:58px;padding:10px 24px;font-size:21px;border:3px solid #fff0a8;border-radius:0;background:linear-gradient(#ffed9f,#ffce3b);color:#131329;box-shadow:3px 3px 0 #805128,-3px -3px 0 #9c863b,0 0 0 6px #09142c,0 0 26px #ffcb4330;justify-content:center;letter-spacing:.1px}
.game-world #launch #open-bubbles:hover{filter:brightness(1.1);box-shadow:3px 3px 0 #805128,-3px -3px 0 #e8d074,0 0 0 6px #09142c,0 0 28px #ffcb4370}
.game-world #launch .launch-meta{color:#bfddf8;font-size:14px;margin-top:14px;line-height:1.5}
.game-world #launch .launch-art{position:absolute;inset:0 0 0 45%;height:auto;min-height:0;pointer-events:none;z-index:1;display:block}
.game-world .floating-hanzi{width:66px;height:76px;border-radius:3px;background:#d7faffed;color:#082650;border:3px solid #efffff;box-shadow:0 0 0 3px #49b7fa,0 0 28px #7af4ff8c;font-size:47px;animation:float-card 5s ease-in-out infinite}
.game-world .hanzi-one{left:40%;top:10%;transform:rotate(14deg)}
.game-world .hanzi-two{left:3%;right:auto;bottom:22%;width:49px;height:59px;font-size:34px;border-color:#ffe9f6;background:#ffe5ef;box-shadow:0 0 0 3px #ff9ab2,0 0 24px #fc70ce77;color:#542148;animation-delay:-2s}
.game-world .hanzi-three{right:7%;bottom:17%;width:44px;height:51px;font-size:30px;animation-delay:-3s;background:#eee2ff;box-shadow:0 0 0 3px #ad89ff,0 0 24px #ad89ff88;color:#311e5c}
/* Game selection + genuine learning progress, rather than an empty arena dashboard. */
.home-deck{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:20px;align-items:start;margin-top:0;position:relative}
.game-world #mode-lobby{margin:0;padding:18px;background:linear-gradient(140deg,#062040df,#07142ae8);border:2px solid #245f9c;border-radius:0;box-shadow:inset 0 0 0 4px #03122a,0 0 20px #0d3d7722;min-width:0}
.game-world .lobby-heading{margin-bottom:16px;gap:10px}.game-world .lobby-heading h2{font-size:22px;line-height:1.5}.game-world .lobby-heading h2>span{color:#9be4ff;margin-right:6px}
.game-world .lobby-heading .text-button{font-size:13px;white-space:normal;max-width:160px;line-height:1.5;border:0;color:#9acceb;padding:4px}
.game-world .mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.game-world .mode-tile,.game-world .mode-tile.tile-feature{--accent:#ff799f;display:flex;flex-direction:column;gap:0;min-height:0;padding:0;overflow:hidden;isolation:isolate;border:2px solid var(--accent);border-radius:0;background:#071831;box-shadow:3px 4px 0 #010615;position:relative;color:#f7faff;text-align:left;transition:transform .15s,box-shadow .15s}
.game-world .mode-tile[data-world-mode="adventure"],.game-world .mode-tile[data-world-mode="timed"]{--accent:#ffda61}
.game-world .mode-tile[data-world-mode="bubbles"],.game-world .mode-tile[data-world-mode="listening"]{--accent:#68efca}
.game-world .mode-tile[data-world-mode="ufo-meteor"]{--accent:#75dcff}
.game-world .mode-tile[data-featured="true"]{--accent:#b397ff}
.game-world #mode-lobby #open-combat[hidden]{display:none}
.game-world .mode-tile:hover{transform:translateY(-4px);border-color:#e3fcff;box-shadow:3px 5px 0 #010615,0 0 17px color-mix(in srgb,var(--accent),transparent 65%)}
.game-world .mode-tile:active{transform:translateY(1px) scale(.985)}
.game-world .mode-copy{display:flex;flex-direction:column;gap:6px;width:100%;padding:13px 14px 12px;background:var(--accent);color:#081a32;position:relative;z-index:1;flex:1}
.game-world .mode-copy strong,.game-world .mode-copy h3{font-size:20px;font-weight:900;line-height:1.3;margin:0;color:#081a32;letter-spacing:-.4px}
.game-world .mode-copy .tile-kicker,.game-world .mode-copy .eyebrow{display:none}
.game-world .mode-copy>span:not(.tile-kicker):not(.eyebrow),.game-world .mode-copy>p{color:#123352;font-size:14px;line-height:1.45;margin:0;display:block}
.game-world .mode-copy>b,.game-world .mode-copy>span:last-child:not([id]){margin-top:7px;color:#071b32;font-weight:bold;font-size:14px}
.game-world .mode-art{display:block;width:100%;height:132px;flex:none;background:#0c2147 url('assets/mode-worlds.webp') var(--scene-position) 55%/300% auto no-repeat;position:relative;overflow:hidden;border-top:2px solid #06132b}
.game-world .mode-art:after{content:'';position:absolute;inset:0;box-shadow:inset 0 -20px 20px -14px #030b25;pointer-events:none}
.game-world .mode-emblem{position:absolute;right:9px;bottom:9px;z-index:1;display:grid;place-items:center;width:38px;height:38px;font-size:25px;line-height:1;color:#fff4bd;background:#04152ccf;border:2px solid var(--accent);box-shadow:2px 2px #041026;transition:transform .15s}
.game-world .mode-tile:hover .mode-emblem{transform:translateY(-3px)}
.more-modes{margin-top:17px;border-top:1px solid #315b89;padding-top:8px}.more-modes>summary{cursor:pointer;color:#beeaff;font-weight:bold;min-height:44px;padding:10px 4px;font-size:15px}
.more-mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding-top:8px}.more-mode-grid .mode-art{height:84px}.more-mode-grid .mode-copy strong{font-size:18px}
.game-world .home-deck>.learning{display:flex;flex-direction:column;align-items:stretch;gap:16px;padding:0 17px 20px;margin:0;min-width:0;border:2px solid #2d67a6;border-radius:0;background:#06182eed;box-shadow:inset 0 0 0 4px #04112b;position:sticky;top:18px}
.game-world .learning .progress-heading{display:flex;flex-direction:row;align-items:center;gap:9px;border-bottom:1px solid #2e5c8c;padding:14px 0 12px;color:#91dafa}
.progress-heading h2{font-size:16px;line-height:1.4;margin:0}.progress-heading>span{font-size:26px}
.game-world .learning>div{align-items:stretch;flex:none}.game-world .learning>div:last-of-type{align-items:stretch}
.game-world .learning strong{font-size:26px;line-height:1.4;color:#fff0b2}.game-world .learning .eyebrow{font-size:13px;line-height:1.5;letter-spacing:.5px;color:#bbd8f6}
.game-world .learning progress{height:12px;margin:10px 0;border:1px solid #497f9e;border-radius:2px;background:#0b2b40}
.game-world .learning progress::-webkit-progress-value{background:#66edbd}.game-world .learning progress::-moz-progress-bar{background:#66edbd}
.game-world .learning small{font-size:13px;line-height:1.65;color:#a9c9e8}.game-world #weak-count{font-size:15px;line-height:1.7;color:#ffdf92}
.game-world .learning button{white-space:normal;line-height:1.5;font-size:14px;min-height:46px;border:1px solid #76b6d5;border-radius:0;padding:10px;background:#133452;color:#e9f7ff}
.game-world .learning .progress-settings{border-color:#aa92dd;background:#29234a}
.game-world:not(.playing):not(.setup-open) .workspace,.game-world:not(.playing):not(.setup-open) #journey{display:none}
.game-world .workspace{margin-top:26px}.game-world:not(.playing) .workspace{grid-template-columns:minmax(0,1fr) minmax(270px,.8fr)}
.game-world:not(.playing) .workspace .hud,.game-world:not(.playing) .workspace .question,.game-world:not(.playing) .workspace .timer,.game-world:not(.playing) .workspace .bottom,.game-world:not(.playing) .workspace .arena-foot{display:none}
.game-world:not(.playing) .workspace .mission{display:none}.game-world #journey{margin-top:24px;border-radius:0;background:#08203cbd}
.game-world #leaderboard{margin-top:24px;border-radius:0;background:#06162fba;box-shadow:none;border-color:#284f7c}
.game-world footer{color:#a4c8e9;border-top:1px solid #1f4675;margin-top:26px;font-size:14px;padding:18px 0}
/* Shared combat console. Learning surfaces remain opaque and readable. */
body.game-world.playing .home-deck{display:none}.game-world.playing .world-nav{display:none}
.game-world.playing .workspace{max-width:1020px;margin:22px auto;display:block}
.game-world .arena{border:2px solid #4279b4;border-radius:0;background:#071831;box-shadow:0 0 0 5px #030d24,0 0 30px #256dc32b;isolation:isolate}
.game-world .hud{background:linear-gradient(90deg,#10274c,#132348);border-bottom:2px solid #3766a0;padding:13px 24px}
.game-world .hud strong{font-family:ui-monospace,monospace;color:#ffe48e}.game-world .hud small{font-size:14px;color:#c8e3ff}
.game-world .question{border:0;background:linear-gradient(110deg,#061b37f2,#173060f5,#061b37f2);padding:20px;min-height:140px}
.game-world .question h1{font-size:clamp(28px,4vw,40px);color:#fff3bd;margin:6px 0;line-height:1.4;overflow-wrap:anywhere}
.game-world .question .target-caption{color:#96eaff;font-size:13px;letter-spacing:2px}.game-world .question #question-label{color:#d9eaff;font-size:14px;letter-spacing:.5px}
.game-world .timer{margin:0;height:4px;background:#223351}.game-world .field{background:linear-gradient(#06142cc7,#06142ce6),url('assets/mode-worlds.webp') 50% 55%/300% auto no-repeat;min-height:320px}
.game-world .targets{padding:24px 30px;gap:20px}.game-world .target:not(.word-bubble){max-width:none;min-height:110px;border:2px solid #8acbf4;border-radius:0;background:linear-gradient(135deg,#1d3d65f5,#102344fa);box-shadow:4px 5px 0 #020b1c,inset 0 0 0 4px #0a1b32;animation:none;cursor:pointer}
.game-world .target:not(.word-bubble):hover:not(:disabled){border-color:#ffe797;background:#21496e;box-shadow:4px 5px 0 #020b1c,0 0 17px #5dd5ff3d}
.game-world .target:not(.word-bubble) .hanzi{color:#f4faff;font-size:32px}.game-world .target:not(.word-bubble) .pinyin{font-size:17px;color:#bbeaff;line-height:1.5}
.game-world .target:not(.word-bubble) .key{background:#061932;color:#b6e7ff;border:1px solid #5892b7;border-radius:0;top:6px;left:7px}
.game-world .target.correct:not(.word-bubble){background:#125541;border-color:#9bffcf;box-shadow:0 0 0 3px #66e6b033,0 0 25px #68ffb336}
.game-world .target.wrong:not(.word-bubble){background:#582840;border-color:#ffa8c4;box-shadow:0 0 0 3px #d755752c}
.game-world .match-card{border-radius:0;border:2px solid #609ec4;background:#102c4e}.game-world .match-card.matched{background:#17513f;border-color:#98f3c7}
.game-world .bottom,.game-world .arena-foot{background:#081a35;border-color:#37618b}.game-world #feedback{font-size:16px;line-height:1.6;color:#deedff}
.game-world .arena-foot{flex-wrap:wrap;gap:12px}.game-world .arena-foot #exit{margin-left:auto}
.signal-display{display:none}.game-world .arena[data-world-mode="listening"] .signal-display{display:flex;justify-content:center;align-items:center;gap:6px;height:37px;margin-bottom:8px}
.signal-display i{display:block;width:5px;height:10px;background:#81ebff;box-shadow:0 0 10px #70c9ff77;transform-origin:center}
.signal-display i:nth-child(2n){height:24px}.signal-display i:nth-child(3n){height:34px}
.question[data-audio="listening"] .signal-display i{animation:signal-beat .5s ease-in-out infinite alternate}.signal-display i:nth-child(2n){animation-delay:-.2s!important}.signal-display i:nth-child(3n){animation-delay:-.35s!important}
.game-world .arena[data-world-mode="listening"] .question{background:linear-gradient(120deg,#092b41,#1c2750,#092b41)}
.game-world .arena[data-world-mode="listening"] #listen{background:#18485b;border:2px solid #99f3ed;color:#edffff;border-radius:0;min-height:48px;font-size:16px;padding:10px 22px;margin-top:12px}
.game-world .arena[data-world-mode="listening"] .target .meaning{color:#f6fbff;font-size:23px;line-height:1.5}
/* Boss stage: attacks are presentation of real hit/armor/attack state. */
.game-world #combat{padding:18px;width:min(1180px,calc(100% - 24px));border:2px solid #638bc8;border-radius:0;background:linear-gradient(#061127f2,#07182bf5),url('assets/mode-worlds.webp') 50% 50%/300% auto;box-shadow:0 0 0 5px #071020,0 0 40px #477dce44}
.game-world #combat .combat-head{background:transparent;border-bottom:1px solid #376899;padding:0 0 12px;gap:12px;height:auto}
.game-world #combat .combat-head .eyebrow{font-size:12px}.game-world #combat .combat-head strong{font-size:23px;color:#ffdf80}
.game-world #combat .phase-guide{background:#173957;color:#e5f6ff;border:1px solid #5e9abd;border-radius:0;padding:9px 14px;font-size:15px;margin:12px 0 18px}
.game-world #combat .encounter-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start;position:relative}
.game-world #combat .combat-main{grid-column:1;grid-row:1;min-width:0;display:flex;flex-direction:column;background:#06182bbc;padding:10px 14px 14px}
.game-world #combat .combat-main>.combat-hud{order:2;margin-top:18px}.game-world #combat .combat-main>h1{font-size:clamp(28px,3.5vw,42px);line-height:1.4;margin:8px 0;color:#fff0b6}
.game-world #combat .combat-main>.target-caption{font-size:13px;color:#a8eeff;letter-spacing:1.5px}.game-world #combat .combat-main>h2{font-size:20px;margin:6px 0 10px;color:#d6ebff}
.game-world #combat .combat-answers{gap:14px}.game-world #combat .combat-answers>button{min-height:100px;padding:15px 12px;border:2px solid #79c8f3;background:linear-gradient(135deg,#214a73,#142b4d);border-radius:0;box-shadow:3px 4px 0 #020b1a,inset 0 0 0 3px #0a1b34;font-size:25px;color:#f4fbff}
.game-world #combat .combat-answers>button:hover{border-color:#ffe392;background:#25537b}.game-world #combat .combat-pinyin{font-size:17px!important;color:#bfeaff!important;line-height:1.5}
.game-world #combat .combat-hud{background:#0d263f;border:1px solid #486b99;border-radius:0;display:flex;flex-wrap:wrap;gap:10px 16px;padding:12px}.game-world #combat .combat-hud span{font-size:14px}
.game-world #combat .boss-scene{grid-column:2;grid-row:1;align-self:start;position:sticky;top:12px;min-height:320px;height:auto;max-height:none;margin:0;padding:30px 8px 12px;overflow:visible;border:0;border-bottom:2px solid #7795d1;background:radial-gradient(ellipse at 50% 45%,#285c8577,transparent 67%);display:flex;flex-direction:column;align-items:center;isolation:isolate}
.game-world #combat .boss-scene .guardian{width:270px;max-width:100%;height:auto;max-height:285px;object-fit:contain;filter:drop-shadow(0 10px 13px #0009) drop-shadow(0 0 15px #57d6e94d);animation:guardian-idle 3.8s ease-in-out infinite;transform-origin:center}
.game-world #combat .boss-scene:before{content:'';position:absolute;left:10%;right:10%;top:48%;height:100px;border:2px solid #60c4ec5c;border-radius:50%;transform:rotateX(65deg);box-shadow:0 0 25px #418bb533;z-index:-1}
.game-world #combat .boss-armor{display:flex;gap:8px;justify-content:center;margin:12px 0 5px}.game-world #combat .boss-armor span{width:35px;height:14px;font-size:0;background:#9d8bed;border:2px solid #d7c9ff;box-shadow:0 0 7px #a49bee55;border-radius:0;transform:skewX(-15deg)}
.game-world #combat .boss-armor .broken{background:#1b2946;border-color:#3d5077;box-shadow:none;opacity:.6}
.game-world #combat .boss-caption{font-size:16px;color:#ffe499;text-align:center;margin:8px 0 0;line-height:1.5}
.game-world #combat .boss-scene.charging .guardian{animation:guardian-charge .42s ease-in-out infinite alternate;filter:drop-shadow(0 0 22px #ca8dff) brightness(1.12)}
.game-world #combat .boss-scene.hurt .guardian{animation:guardian-impact .65s ease-out both;filter:drop-shadow(0 0 20px #d0fff2)}
.game-world #combat .boss-scene.attack .guardian{animation:guardian-strike .48s ease-out both}
.game-world #combat .boss-scene.guard .guardian{animation:guardian-guard .4s ease-out both}
.game-world #combat .boss-scene.armor-break .guardian{animation:guardian-impact .7s ease-out;filter:drop-shadow(0 0 25px #ffe098)}
.game-world #combat .boss-scene.low-armor:not(.defeated):not(.hurt):not(.charging) .guardian{filter:drop-shadow(0 0 21px #ff9776)}
.game-world #combat .boss-scene.defeated .guardian{animation:guardian-defeat .85s ease-out both}
.boss-impact-label{position:absolute;top:24px;left:0;right:0;text-align:center;z-index:3;color:#c8ffed;font-size:24px;font-weight:bold;text-shadow:2px 2px #071228;animation:impact-label .85s ease-out both;pointer-events:none}
.boss-energy{display:none;position:absolute;pointer-events:none;z-index:2;right:40%;top:40%;width:100px;height:9px;background:#e2fff1;box-shadow:0 0 12px #83ffcb,0 0 22px #68dffc;border-radius:50%}
.boss-scene.hurt .boss-energy{display:block;animation:energy-hit .5s ease-out both}
.boss-scene.attack .boss-energy{display:block;background:#eee0ff;box-shadow:0 0 18px #a785ff;animation:energy-out .5s ease-out both}
.game-world #combat .combat-lane{border-radius:0;min-height:110px;background:#132e50;border:2px solid #577ead}.game-world #combat .combat-lane.danger{background:#642c51;border-color:#ff9bd0}.game-world #combat .combat-lane.occupied{border-color:#a1f5ed}
.game-world #combat .combat-pause{background:#061327f5}.game-world #combat .combat-option,.game-world #combat .combat-perks>button{border-radius:0}.game-world #combat .combat-perks>button{min-width:0}
.game-world .boss-panel{position:relative;background:linear-gradient(90deg,#101e45,#31204f);border-color:#8169ad}.game-world .boss-panel.hit:after{content:'−1';position:absolute;left:95px;top:20px;color:#adffe5;font-size:30px;font-weight:bold;animation:impact-label .6s ease-out both}
.game-world .boss-panel.hit img{animation:guardian-impact .5s ease-out}.game-world .boss-panel.attack img{animation:guardian-strike .5s ease-out}
.game-world #sentence-dialog{background:linear-gradient(#0c1d3cf5,#08172ff7),url('assets/mode-worlds.webp') 0% 50%/300% auto;border-radius:0;border:2px solid #ba9df2}
.game-world #sentence-dialog .sentence-options button{border-radius:0;box-shadow:3px 4px #030d23;border-color:#8ebceb;background:#183758}.game-world #sentence-dialog .sentence-context{border-radius:0}
@keyframes guardian-idle{50%{transform:translateY(-9px) rotate(1deg)}}
@keyframes guardian-charge{to{transform:translateY(-7px) scale(1.035)}}
@keyframes guardian-impact{0%{transform:translateX(0)}20%{transform:translateX(18px) rotate(6deg);filter:brightness(1.7)}48%{transform:translateX(-5px) rotate(-2deg)}100%{transform:translateX(0)}}
@keyframes guardian-strike{35%{transform:translateX(-22px) scale(1.07)}100%{transform:translateX(0)}}
@keyframes guardian-guard{40%{transform:rotate(-4deg)}100%{transform:rotate(0)}}
@keyframes guardian-defeat{35%{transform:translateY(-10px);filter:brightness(1.8)}100%{transform:translateY(22px) scale(.88);opacity:.2}}
@keyframes energy-hit{0%{transform:translateX(-130px) scaleX(.5);opacity:0}25%{opacity:1}80%{opacity:1}100%{transform:translateX(35px) scaleX(.15);opacity:0}}
@keyframes energy-out{0%{transform:translateX(35px);opacity:1}100%{transform:translateX(-130px);opacity:0}}
@keyframes impact-label{0%{transform:translateY(15px);opacity:0}20%,70%{opacity:1}100%{transform:translateY(-20px);opacity:0}}
@keyframes signal-beat{to{transform:scaleY(.35)}}
@media(min-width:1450px){body.game-world #launch.launch{padding-top:28px;padding-bottom:32px}.game-world #launch .hero-scene{object-position:center 52%}}
@media(max-width:1100px){.game-world .app{padding:0 22px}.world-nav{gap:14px}.game-world .brand{font-size:21px}.home-deck{grid-template-columns:minmax(0,1fr) 220px;gap:14px}.game-world #mode-lobby{padding:14px}.game-world .mode-grid{gap:10px}.game-world .mode-copy{padding:11px}.game-world .mode-copy strong,.game-world .mode-copy h3{font-size:18px}.game-world .mode-art{height:118px}.game-world #launch .game-title{font-size:82px}.game-world #launch .hero-tagline{font-size:20px}.game-world #launch .hero-description{font-size:15px}.game-world #launch .launch-copy{max-width:48%}.game-world #launch #open-bubbles{font-size:18px;min-width:240px}.game-world #combat .encounter-layout{grid-template-columns:minmax(0,1fr) 250px;gap:14px}.game-world #combat .boss-scene .guardian{width:230px}.game-world #combat .boss-scene{min-height:285px}.game-world .lobby-heading h2{font-size:19px}}
@media(max-width:900px){.world-nav{display:none}.home-deck{grid-template-columns:1fr}.game-world .home-deck>.learning{position:static;display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;padding:0 20px 18px}.game-world .learning .progress-heading{grid-column:1/-1}.game-world .learning .progress-settings{grid-column:2}.game-world .mode-grid{gap:14px}.game-world .mode-art{height:148px}.game-world .mode-copy strong,.game-world .mode-copy h3{font-size:20px}.game-world .lobby-heading h2{font-size:23px}body.game-world #launch.launch{padding:30px 26px}.game-world #launch .game-title{font-size:76px}.game-world #launch .hero-description{max-width:300px}.game-world #launch .launch-copy{max-width:49%}.game-world #launch #open-bubbles{min-width:0;width:100%;font-size:17px}.game-world #launch .hero-tagline{font-size:18px}.game-world:not(.playing) .workspace{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.game-world .app{padding:0 12px}.game-world .app>header{height:72px;gap:8px}.game-world .brand{font-size:18px;gap:7px}.game-world .brand small{font-size:8px;letter-spacing:.6px}.game-world .brandmark{width:34px;height:36px;font-size:23px}.game-world .header-right{gap:5px}.game-world .header-right .icon{padding:6px;min-height:44px;font-size:12px}.game-world .language-picker select{max-width:98px;font-size:13px;min-height:44px}body.game-world #launch.launch{padding:25px 14px 28px;margin:0 -12px;min-height:0}.game-world #launch .hero-scene{object-position:64% top;object-fit:cover;height:305px}.game-world #launch:before{background:linear-gradient(90deg,#030b2420,transparent),linear-gradient(0deg,#030b24 5%,#030b24ed 23%,transparent 75%)!important}.game-world #launch .launch-copy{max-width:none;display:flex;flex-direction:column;align-items:flex-start}.game-world #launch .launch-copy>.eyebrow{font-size:10px;letter-spacing:1px;max-width:45%}.game-world #launch .game-title{font-size:clamp(49px,10.4vw,68px);letter-spacing:-1.5px;margin:20px 0 24px;max-width:51%;line-height:.94}.game-world #launch .hero-tagline{font-size:19px;margin-top:30px;margin-bottom:4px;max-width:90%;text-shadow:0 2px 5px #030b24}.game-world #launch .hero-description{font-size:15px;max-width:100%;margin-bottom:18px}.game-world #launch #open-bubbles{width:auto;min-width:255px;max-width:100%;min-height:54px;font-size:18px;align-self:center}.game-world #launch .launch-meta{text-align:center;align-self:center;font-size:13px;margin-top:14px}.game-world #launch .launch-art{inset:0 0 auto 48%;height:255px}.game-world .floating-hanzi{width:42px;height:48px;font-size:29px;animation:none}.game-world .hanzi-one{top:12%;left:36%}.game-world .hanzi-two{bottom:13%;left:0;width:34px;height:40px;font-size:25px}.game-world .hanzi-three{display:none}.game-world #mode-lobby{padding:12px}.game-world .lobby-heading h2{font-size:20px}.game-world .lobby-heading .text-button{font-size:12px;max-width:108px}.game-world .mode-grid,.more-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.game-world .mode-copy{padding:11px 10px}.game-world .mode-copy strong,.game-world .mode-copy h3{font-size:18px}.game-world .mode-copy>span:not(.tile-kicker):not(.eyebrow),.game-world .mode-copy>p{font-size:14px}.game-world .mode-art{height:120px}.game-world .mode-copy>b,.game-world .mode-copy>span:last-child:not([id]){font-size:13px}.game-world .home-deck>.learning{display:flex;gap:12px;padding:0 18px 18px}.game-world .learning .progress-heading{width:100%}.game-world .home-deck{gap:16px}.game-world:not(.playing) .workspace{display:flex;flex-direction:column}.game-world .workspace>aside{width:100%;margin-top:0}.game-world .workspace>.arena{width:100%}.game-world .targets{padding:17px 13px;gap:15px}.game-world .target:not(.word-bubble){min-height:105px;padding:15px 11px}.game-world .target:not(.word-bubble) .hanzi{font-size:28px}.game-world .target:not(.word-bubble) .pinyin{font-size:16px}.game-world .question{padding:16px 13px}.game-world .question h1{font-size:28px}.game-world .hud{padding:12px 15px}.game-world .hud strong{font-size:22px}.game-world .hud small{font-size:13px}.game-world #feedback{font-size:15px}.game-world .arena-foot{padding:12px}.game-world .arena-foot #exit{margin-left:0}.game-world .arena[data-world-mode="listening"] .target .meaning{font-size:20px}.game-world #combat{padding:12px;width:calc(100% - 16px);max-height:calc(100dvh - 20px)}.game-world #combat .combat-head strong{font-size:18px}.game-world #combat .combat-head{flex-wrap:wrap}.game-world #combat .combat-head>div:last-child{display:flex;gap:7px}.game-world #combat .combat-head button{padding:7px 10px;font-size:14px}.game-world #combat .encounter-layout{display:flex;flex-direction:column;gap:12px}.game-world #combat .combat-main{order:0;padding:8px 4px;width:100%}.game-world #combat .combat-main>h1{font-size:30px}.game-world #combat .combat-main>h2{font-size:19px}.game-world #combat .combat-answers{gap:12px}.game-world #combat .combat-answers>button{font-size:23px;min-height:100px}.game-world #combat .boss-scene{position:relative;top:auto;order:1;min-height:0;width:100%;height:180px;padding:0 10px 8px;display:grid;grid-template-columns:150px minmax(0,1fr);grid-template-rows:1fr 1fr;align-items:center;background:radial-gradient(ellipse at 25% 50%,#285c8588,transparent 60%);border-bottom:0;border-top:1px solid #526eae}.game-world #combat .boss-scene .guardian{width:150px;height:168px;max-height:168px;grid-column:1;grid-row:1/3;animation:guardian-idle 5s ease-in-out infinite}.game-world #combat .boss-scene .boss-armor{grid-column:2;grid-row:1;align-self:end;gap:5px}.game-world #combat .boss-armor span{width:24px;height:13px}.game-world #combat .boss-scene .boss-caption{grid-column:2;grid-row:2;align-self:start;font-size:15px}.game-world #combat .boss-scene:before{display:none}.game-world #combat .boss-energy{left:18%;right:auto;top:42%}.game-world #combat .boss-impact-label{font-size:21px;left:0;right:auto;top:12px}.game-world #combat .phase-guide{font-size:14px;margin-bottom:8px}.game-world #combat .combat-hud{gap:7px 12px}.game-world #combat .combat-lane{min-height:100px}.game-world #combat .combat-hud span{font-size:14px}.game-world #leaderboard{padding:16px}.game-world footer{font-size:13px;gap:12px}}
@media(max-width:370px){.game-world .brandmark{display:none}.game-world .brand{font-size:17px}.game-world .app{padding:0 10px}.game-world .lobby-heading{align-items:flex-start}.game-world .lobby-heading h2{font-size:18px}.game-world .mode-copy strong,.game-world .mode-copy h3{font-size:16px}.game-world .mode-art{height:100px}.game-world .mode-grid{gap:9px}.game-world #launch #open-bubbles{min-width:240px}.game-world #combat .combat-answers{grid-template-columns:1fr}.game-world #combat .combat-answers>button{min-height:90px}}
@media(max-width:450px){.game-world .brand{font-size:16px}.game-world .brandmark{width:30px;height:34px}.game-world #launch .game-title{font-size:clamp(42px,11vw,52px)}}
@media(prefers-reduced-motion:reduce){.game-world *,.game-world *:before,.game-world *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.game-world .boss-energy{display:none!important}.game-world .boss-impact-label{opacity:1;transform:none}.game-world #combat .boss-scene.defeated .guardian{opacity:.35}.game-world .mode-tile:hover{transform:none}}

/* Bubble sizing/positions remain owned by BubbleField; only its surface changes. */
.game-world .bubble-mode .target.word-bubble{background:radial-gradient(circle at 30% 20%,#6cbfe755,transparent 48%),#173950;border-color:#92e3ed;box-shadow:inset 0 0 15px #64c6e42b,0 4px 10px #0005;color:#f4ffff}
.game-world .bubble-mode .target.word-bubble.bubble-1{background:radial-gradient(circle at 30% 20%,#c6a4f755,transparent 48%),#302452;border-color:#c0acff}
.game-world .bubble-mode .target.word-bubble.bubble-2{background:radial-gradient(circle at 30% 20%,#8eefd155,transparent 48%),#124340;border-color:#8bf3cf}
.game-world .bubble-mode .target.word-bubble.bubble-3{background:radial-gradient(circle at 30% 20%,#ffd37a44,transparent 48%),#423649;border-color:#f5d08c}
.game-world .bubble-mode .target.word-bubble.correct{background:#155340;border-color:#aeffdc;box-shadow:0 0 20px #83ffd955}
.game-world .bubble-mode .target.word-bubble.wrong{background:#652740;border-color:#ffa8c5}

/* Recovery pass: every existing mode stays in one open, keyboard-accessible hub. */
body.game-world #launch.launch{padding-top:16px;padding-bottom:20px}
.game-world #launch .game-title{font-size:clamp(48px,5.3vw,74px)}
.game-world #launch .hero-description{margin-bottom:14px}
.game-world .mode-art{order:0;height:142px}
.game-world .mode-copy{order:1}
.game-world .mode-tile:focus-visible{outline:3px solid #fff4ac;outline-offset:4px}
.game-world .mode-guardian{position:absolute;height:140px;width:140px;object-fit:contain;left:calc(50% - 70px);bottom:-10px;filter:drop-shadow(0 0 14px #a78cff)}
.game-world #open-combat .mode-art{background-position:50% 50%}
/* The shot owns its own local stage; it cannot fly outside the phone viewport. */
.game-world #combat .boss-scene{padding:0 0 14px;overflow:hidden}
.game-world #combat .boss-target{position:relative;width:100%;height:290px;display:grid;place-items:center;overflow:hidden}
.game-world #combat .boss-target .guardian{width:260px;max-width:92%;height:270px;max-height:100%;object-fit:contain}
.game-world #combat .boss-status{width:100%;padding:0 10px}
.game-world #combat .boss-core{position:absolute;left:50%;top:51%;width:18px;height:18px;border-radius:50%;background:#b7ffff;box-shadow:0 0 20px 6px #68e9ff;opacity:0;transform:translate(-50%,-50%)}
.game-world #combat .armor-break .boss-core{opacity:1;animation:core-breathe 1.4s ease-in-out infinite alternate}
.game-world #combat .armor-break .guardian{filter:saturate(.3) brightness(.65);animation:none;transform:translateY(8px)}
.core-status{display:block;text-align:center;color:#96f8ff;letter-spacing:2px;font-size:14px;margin-top:8px}
.boss-power-label{display:block;text-align:center;color:#ffe783;font-size:16px;letter-spacing:1px;text-shadow:0 0 15px #ffc848}
.game-world #combat[data-powered="true"]{border-color:#f8d866;box-shadow:0 0 0 4px #3c285a,0 0 35px #ca77ff55}
.game-world #combat .powered .boss-target{background:radial-gradient(ellipse,#ad6dff35,transparent 70%)}
.game-world #combat .strike-fx{position:absolute;inset:0;pointer-events:none;--shot:#b9fff7;--glow:#58eed3}
.game-world #combat .power-shot .strike-fx{--shot:#fff3b8;--glow:#dba5ff}
.strike-fx>i{position:absolute;display:block;opacity:0}
.strike-fx .shot-beam{left:6%;top:51%;width:44%;height:10px;transform-origin:right center;background:var(--shot);border-radius:50%;box-shadow:0 0 12px 5px var(--glow)}
.shooting .shot-beam{animation:boss-projectile .42s ease-in both}
.shooting.power-shot .shot-beam{height:19px;box-shadow:0 0 18px 8px var(--glow)}
.shooting.power-shot .shot-beam.echo{animation:boss-projectile-echo .42s ease-in both}
.strike-fx .impact-ring{left:50%;top:51%;width:100px;height:100px;border:5px solid var(--shot);border-radius:50%;box-shadow:0 0 22px var(--glow);transform:translate(-50%,-50%)}
.strike-fx .impact-flare{inset:15%;background:radial-gradient(circle,var(--shot),transparent 64%)}
.shooting .impact-ring{animation:boss-shockwave .6s .42s ease-out both}
.shooting .impact-flare{animation:boss-flare .35s .42s ease-out both}
.strike-fx .armor-shard{left:50%;top:51%;width:13px;height:22px;border:2px solid #e1ceff;background:#927bdd;--angle:calc(var(--shard)*60deg)}
.shooting .armor-shard{animation:boss-shatter .85s .42s ease-out both}
.game-world #combat .boss-scene.shooting .guardian{animation:boss-recoil .72s .42s ease-out both}
.game-world #combat .boss-scene.shooting.power-shot .guardian{animation:boss-power-recoil .85s .42s ease-out both}
.game-world #combat .boss-impact-label{top:15%;font-size:21px;animation:boss-hit-label 1.5s .42s ease-out both;color:#ddfff8}
.game-world #combat .power-shot .boss-impact-label{color:#ffe884;text-shadow:0 0 16px #b879ff,2px 2px #071228}
.game-world #combat .boss-armor .newly-broken{animation:plate-break .55s ease-out both}
.game-world #combat .boss-scene.defeated .guardian{animation:boss-final-collapse 1.8s ease-out both}
.game-world #combat .defeated .shot-beam{height:28px;animation:boss-projectile .55s ease-in both}
.game-world #combat .defeated .impact-flare{animation:boss-flare .6s .55s ease-out both;background:radial-gradient(circle,#fff9c8,#b7ffff88,transparent 70%)}
.game-world #combat .defeated .impact-ring{animation:boss-shockwave .9s .55s ease-out both;border-color:#ffe9a7}
.game-world #combat .defeated .armor-shard{animation:boss-shatter 1.2s .55s ease-out both}
.game-world #combat .defeated .boss-core{opacity:1;background:#fff0a5;animation:core-extinguish 1.8s both}
.game-world #combat .defeated .boss-caption{color:#ffe783;font-weight:bold}
.game-world #combat[data-phase="victory"] .combat-main{border:2px solid #ffdf7d;background:radial-gradient(ellipse at top,#71571d55,#07182b 70%)}
.game-world #combat[data-paused="true"] *, .game-world #combat[data-paused="true"] *:before{animation-play-state:paused!important}
@keyframes boss-projectile{0%{opacity:0;transform:translate(-35px,28px) rotate(-38deg) scaleX(.15)}20%{opacity:1}100%{opacity:0;transform:translate(0,0) rotate(-38deg) scaleX(1)}}
@keyframes boss-projectile-echo{0%{opacity:0;transform:translate(120px,28px) rotate(-142deg) scaleX(.15)}20%{opacity:1}100%{opacity:0;transform:translate(0,0) rotate(-142deg) scaleX(1)}}
@keyframes boss-shockwave{0%{opacity:1;transform:translate(-50%,-50%) scale(.12)}100%{opacity:0;transform:translate(-50%,-50%) scale(2.7)}}
@keyframes boss-flare{0%{opacity:.9;transform:scale(.5)}100%{opacity:0;transform:scale(1.5)}}
@keyframes boss-shatter{0%{opacity:1;transform:rotate(var(--angle)) translateY(0) rotate(0)}100%{opacity:0;transform:rotate(var(--angle)) translateY(-125px) rotate(180deg)}}
@keyframes boss-recoil{0%{transform:none;filter:brightness(2)}16%{transform:translate(22px,-8px) rotate(8deg);filter:brightness(1.6)}40%{transform:translate(-9px,3px) rotate(-3deg)}100%{transform:none}}
@keyframes boss-power-recoil{0%{filter:brightness(2.3)}18%{transform:translate(28px,-14px) rotate(12deg) scale(.94)}45%{transform:translate(-12px,4px) rotate(-5deg)}100%{transform:none}}
@keyframes boss-hit-label{0%{opacity:0;transform:translateY(12px) scale(.85)}15%,80%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-18px)}}
@keyframes plate-break{0%{background:#fff3bb;transform:skewX(-15deg) scale(1.5);opacity:1}100%{transform:skewX(-15deg);opacity:.35}}
@keyframes core-breathe{to{box-shadow:0 0 35px 12px #7cfaff;transform:translate(-50%,-50%) scale(1.3)}}
@keyframes core-extinguish{0%,30%{opacity:1;box-shadow:0 0 45px 20px #fff1a2}65%,100%{opacity:0;transform:translate(-50%,-50%) scale(3)}}
@keyframes boss-final-collapse{0%,29%{transform:none;filter:brightness(1)}34%{transform:scale(1.08);filter:brightness(2.5)}55%{transform:translateY(-15px) rotate(-8deg);filter:brightness(1.3)}100%{transform:translateY(75px) rotate(18deg) scale(.8);filter:grayscale(1);opacity:.12}}
@media(max-width:650px){
 body.game-world #launch.launch{padding:12px 16px 18px}
 .game-world #launch .launch-copy{max-width:none}
 .game-world #launch .game-title{font-size:42px;margin:6px 0 10px}
 .game-world #launch .hero-tagline{margin:0 0 8px;font-size:17px}
 .game-world #launch .hero-description{display:none}
 .game-world #launch .launch-art{height:150px}
 .game-world #launch #open-bubbles{min-height:48px;font-size:16px}
 .game-world #launch .launch-meta{font-size:13px;margin-top:9px}
 .game-world .mode-art{height:110px}
 .game-world .mode-guardian{height:115px;width:115px;left:calc(50% - 57px)}
 .game-world #combat .boss-scene{order:-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto;height:auto;min-height:155px;width:100%;padding:0;border-top:0;border-bottom:1px solid #52709f;position:sticky;top:-12px;background:#07182bf5;z-index:4}
 .game-world #combat .boss-target{height:155px;grid-column:1;grid-row:1}
 .game-world #combat .boss-target .guardian{width:150px;height:155px}
 .game-world #combat .boss-status{grid-column:2;grid-row:1;padding:4px}
 .game-world #combat .boss-scene .boss-armor{margin:8px 0;gap:5px}
 .game-world #combat .boss-scene .boss-caption{font-size:14px;line-height:1.45;margin:4px 0}
 .game-world #combat .boss-power-label{font-size:14px}
 .game-world #combat .boss-impact-label{font-size:14px;left:0;right:0;top:10px}
 .game-world #combat .combat-main>h1{font-size:26px;margin:5px 0}
 .game-world #combat .combat-answers>button{min-height:80px;font-size:22px;padding:10px}
 .game-world #combat .combat-hud{margin-top:12px}
}
@media(max-width:370px){.game-world #combat .combat-answers{grid-template-columns:repeat(2,minmax(0,1fr))}.game-world #combat .combat-answers>button{font-size:19px;overflow-wrap:anywhere}.game-world #combat .boss-armor span{width:20px}}
@media(prefers-reduced-motion:reduce){
 .game-world #combat .strike-fx{display:none}
 .game-world #combat .boss-scene.shooting .guardian{filter:brightness(1.2)}
 .game-world #combat .boss-impact-label{opacity:1;transform:none}
 .game-world #combat .defeated .guardian{opacity:.18;filter:grayscale(1)}
 .game-world #combat .defeated .boss-core{opacity:0}
}

/* Shared final interface: navy consoles, jade interaction, gold achievement. */
.game-world{--control:#143754;--focus:#fff0a0;--muted:#b4cbe0}
.game-world button,.game-world select,.game-world input{touch-action:manipulation}
.game-world button:focus-visible,.game-world select:focus-visible,.game-world input:focus-visible,.game-world summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.game-world .home-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap;background:#0c223c;border:1px solid #31577a;padding:14px 18px;margin:0 0 18px}
.home-controls>div{display:flex;align-items:center;gap:10px}.home-controls label{font-size:14px;color:#e4f4ff}.home-controls select{min-height:44px;background:#061a30;color:#f2fbff;border:1px solid #6188a8;padding:8px;max-width:250px}
.home-pinyin{display:flex;align-items:center;gap:9px}.home-pinyin input{width:22px;height:22px;accent-color:#79efd1}
.home-controls button{min-height:44px;font-size:14px}.home-controls>p{margin:0;font-size:13px;color:#a9c5da;flex:1;text-align:right}
.game-world.playing .home-controls{display:none}
.game-world .mode-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
.game-world .mode-group-heading{grid-column:1/-1;color:#bfd8e8;font-size:15px;font-weight:600;letter-spacing:.5px;margin:12px 0 0;padding:6px 0;border-bottom:1px solid #315678}
.game-world .mode-group-heading:first-child{margin-top:0}
.game-world .mode-tile{grid-column:span 2;border:1px solid #3d6388;box-shadow:0 4px 0 #020c1c;min-width:0}
.game-world .mode-tile[data-world-mode="listening"],.game-world .mode-tile[data-world-mode="sentences"]{grid-column:span 3}
.game-world .mode-copy{background:linear-gradient(#122e4b,#0d2038);color:#eefaff;padding:14px;gap:7px;border-top:2px solid var(--accent)}
.game-world .mode-copy strong,.game-world .mode-copy h3{color:#f1faff;font-size:20px;letter-spacing:0}
.game-world .mode-copy>span:not(.tile-kicker):not(.eyebrow),.game-world .mode-copy>p{color:#bcd0e2;font-size:14px}
.game-world .mode-copy>b,.game-world .mode-copy>span:last-child:not([id]){color:var(--accent);font-size:14px;margin-top:auto;padding-top:8px}
.game-world .mode-art{height:126px;background-image:url('assets/mode-atlas-v2.webp');background-size:300% var(--art-height);background-position:var(--art-x) var(--art-y);border:0}
.game-world .mode-tile[data-featured="true"] .mode-art,.game-world .mode-tile[data-world-mode="adventure"] .mode-art,.game-world .mode-tile[data-world-mode="bubbles"] .mode-art{height:170px}
.game-world .mode-emblem{width:32px;height:32px;font-size:20px;right:7px;bottom:7px}
.game-world #open-combat .mode-art{background-position:var(--art-x) var(--art-y)}
.game-world #launch .hero-scene{object-position:center 45%;opacity:.8}
.game-world #launch .launch-art,.game-world #launch .hero-description{display:none}
.game-world #launch .launch-copy{max-width:65%;display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px 25px}
.game-world #launch .game-title{grid-column:1;grid-row:1/3;font-size:clamp(44px,5vw,68px);margin:0}
.game-world #launch .hero-tagline{grid-column:2;margin:0;font-size:16px}
.game-world #launch #open-bubbles{grid-column:2;font-size:17px;min-height:48px;min-width:230px}
.game-world #launch .launch-meta{grid-column:1/-1;font-size:13px;margin-top:12px}
.game-world #combat .sprite-guardian{display:block;background:url('assets/guardian-poses-v2.webp') 0 0/200% 200% no-repeat;aspect-ratio:1}
.game-world #combat .boss-scene.attack .sprite-guardian{background-position:100% 0}
.game-world #combat .boss-scene.landed .sprite-guardian,.game-world #combat .boss-scene.armor-break .sprite-guardian{background-position:0 100%}
.game-world #combat .boss-scene.defeated .sprite-guardian{background-position:100% 100%}
.game-world #combat .combat-main>.target-caption,.game-world .question>.target-caption{display:none}
.game-world #combat .combat-head .eyebrow{display:none}
.game-world #combat .combat-main>h2{font-size:17px}
.game-world #combat .combat-hud{box-shadow:none;border-color:#294563}
.game-world #combat .combat-hud span{font-size:14px}.game-world #combat .combat-pinyin{font-size:18px!important}
.game-world #combat .combat-answers button{position:relative}.game-world #combat .combat-answers small{position:absolute;left:8px;top:6px;font-size:12px;opacity:.65}
.game-world .target.correct:after{content:'✓';position:absolute;right:8px;top:6px;font-size:22px;color:#c7ffe4}
.game-world .target.wrong:after{content:'×';position:absolute;right:8px;top:6px;font-size:22px;color:#ffd0d8}
.game-world .match-card.selected{outline:3px solid #ffe181;background:#335367}.game-world .match-card.matched{opacity:.65}
.game-world .arena-foot{position:relative;gap:8px}.game-world .arena-foot button{min-height:44px;font-size:14px}.game-world .arena-foot #mode-text{font-size:13px;flex:1}
.game-world #howto-dialog,.game-world #exit-dialog,.game-world #player-name-dialog{border:2px solid #608aa5;border-radius:8px;background:#0b2038;color:#eef8ff;padding:24px;max-width:min(520px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto}
.game-world #howto-dialog button,.game-world #exit-dialog button,.game-world #player-name-dialog button{min-height:44px}
.tutorial-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tutorial-options button{font-size:26px;min-height:85px}.tutorial-options .pinyin{display:block;font-size:15px}.tutorial-bubbles button{border-radius:50%;aspect-ratio:1}.tutorial-close{float:right}
.game-world .answer-history,.game-world .board-options{border:1px solid #325170;padding:12px;margin:18px 0;background:#091c32}
.game-world summary{cursor:pointer;min-height:44px;align-content:center;font-size:15px}
.game-world .results{background:#0b213a;border:1px solid #447294;border-radius:6px}.game-world .results:focus{outline:2px solid #87dcd4}
.game-world .result-stats{gap:12px}.game-world .result-stats>div{background:#102e49;border:1px solid #36556f;border-radius:4px}
.game-world .learning-report{margin-top:20px;padding:18px;border:1px solid #315475;background:#0a1e32}.game-world .learning-word-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.game-world .learning-word{background:#14354d;padding:12px;border:1px solid #39657a;border-radius:4px}.game-world .learning-word b{font-size:24px}.game-world .learning-word span{display:block;font-size:15px;line-height:1.6}.game-world .learning-report>button{min-height:44px;margin:8px 10px 0 0}
.game-world .board-options[open] .board-filters{margin-top:12px}.game-world #leaderboard .board-heading h2{font-size:23px}
.game-world .setting-field select,.game-world .setting-field input{min-height:44px;font-size:16px}
.game-world #sentence-dialog .sentence-options button{min-height:84px}.game-world #sentence-dialog .sentence-option-py{display:block;font-size:16px;line-height:1.5;margin-top:5px}
@media(max-width:1100px){.game-world #launch .launch-copy{max-width:85%}.game-world .mode-copy{padding:11px}.game-world .mode-copy strong,.game-world .mode-copy h3{font-size:18px}}
@media(max-width:650px){
 .game-world .home-controls{gap:12px;padding:12px;margin-bottom:12px}.home-controls>div{width:100%;justify-content:space-between}.home-controls select{max-width:75%;flex:1}.home-controls>p{flex-basis:100%;text-align:left}.home-controls button{margin-left:auto}
 .game-world #launch .launch-copy{max-width:none;grid-template-columns:1fr 1fr;gap:10px 14px}
 .game-world #launch .game-title{font-size:40px;grid-row:1}.game-world #launch .hero-tagline{font-size:15px}.game-world #launch #open-bubbles{grid-column:1/-1;min-width:0;width:100%;margin:4px 0 0}.game-world #launch .launch-meta{margin-top:3px;text-align:left;align-self:start}
 .game-world .mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .game-world .mode-tile,.game-world .mode-tile[data-world-mode="listening"],.game-world .mode-tile[data-world-mode="sentences"]{grid-column:span 1}
 .game-world .mode-tile[data-featured="true"]{grid-column:1/-1;display:grid;grid-template-columns:43% 57%;min-height:160px}
 .game-world .mode-tile[data-featured="true"] .mode-art{height:100%;min-height:160px}.game-world .mode-tile[data-featured="true"] .mode-copy{border-top:0;border-left:2px solid var(--accent);justify-content:center}
 .game-world .mode-tile[data-world-mode="adventure"] .mode-art,.game-world .mode-tile[data-world-mode="bubbles"] .mode-art{height:135px}
 .game-world .mode-art{height:105px}.game-world .mode-copy strong,.game-world .mode-copy h3{font-size:18px}.game-world .mode-copy{padding:12px 10px;gap:6px}
 .game-world .learning-word-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-world .learning-report{padding:12px}.game-world .result-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .game-world #combat .boss-target .sprite-guardian{width:150px;height:150px;max-width:100%}
 .game-world .arena-foot #mode-text{flex-basis:100%;order:5}.game-world .arena-foot #combo{margin-left:auto}
}
@media(max-height:500px) and (orientation:landscape){
 .game-world #combat .encounter-layout{display:grid;grid-template-columns:185px minmax(0,1fr);gap:12px}.game-world #combat .boss-scene{grid-column:1;grid-row:1;display:flex;position:sticky;top:0;min-height:0}.game-world #combat .boss-target{height:170px}.game-world #combat .boss-target .sprite-guardian{width:170px;height:170px}.game-world #combat .combat-main{grid-column:2;grid-row:1}.game-world #combat .phase-guide{position:relative;top:0;margin:4px 0}.game-world #combat .combat-answers>button{min-height:70px}.game-world #combat .combat-head{position:relative}
}

/* Gameplay presentation: keep the opponent, challenge and controls in one visual rhythm. */
.game-world #combat .phase-guide{border:0;border-left:3px solid #76dcd5;background:#10304b;padding:7px 12px;margin:8px 0 10px;font-size:14px}
.game-world #combat .combat-main{background:transparent;padding:8px 10px 14px}
.game-world #combat .combat-hud{border:0;border-top:1px solid #355574;background:transparent;padding:8px 2px;margin-top:9px;gap:4px 14px}
.game-world #combat .combat-main>.combat-hud{order:0}
.game-world #combat .combat-main>h1{line-height:1.23;margin:8px 0;color:#fff0b6}
.game-world #combat .combat-main>h2{margin:2px 0 4px}
.game-world #combat .combat-answers{margin-top:8px;gap:10px}
.game-world #combat .combat-answers>button{box-shadow:2px 3px 0 #020b1a;min-height:78px}
.game-world #combat .combat-main>p:not(.shot-status),.game-world #combat .combat-extra{color:#bbd2e5}
.game-world #combat .combat-extra{font-size:14px;margin-top:8px}
.game-world #combat .combat-extra summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.game-world #combat[data-phase="answer-boss"] .phase-guide,.game-world #combat[data-phase="answer-learn"] .phase-guide{display:none}
.game-world #combat[data-phase="answer-boss"] .combat-main>h1,.game-world #combat[data-phase="answer-learn"] .combat-main>h1{font-size:25px}
.game-world #combat[data-phase="answer-boss"] .combat-main>.combat-actions,.game-world #combat[data-phase="answer-learn"] .combat-main>.combat-actions{margin-top:4px}
.game-world #combat .boss-scene{border-bottom:0}
.game-world.playing .result-stats>div{border:0;border-top:2px solid #4886a6}

@media(max-width:650px){
 .game-world #combat{padding:8px;width:calc(100% - 12px);max-height:calc(100dvh - 12px)}
 .game-world #combat .combat-head{padding:2px 3px 6px;gap:4px}
 .game-world #combat .combat-head strong{font-size:16px}
 .game-world #combat .combat-head>div:last-child{gap:4px}
 .game-world #combat .combat-head button{font-size:12px;padding:6px;min-height:44px;min-width:44px}
 .game-world #combat .phase-guide{margin:5px 0;padding:4px 8px;font-size:13px}
 .game-world #combat .encounter-layout{gap:4px}
 .game-world #combat .boss-scene{min-height:124px;top:0;background:#07182bf5}
 .game-world #combat .boss-target{height:124px}
 .game-world #combat .boss-target .sprite-guardian{width:124px;height:124px}
 .game-world #combat .boss-status{padding:2px}
 .game-world #combat .boss-scene .boss-caption{font-size:13px;margin:2px 0}
 .game-world #combat .combat-main{padding:4px 3px 10px}
 .game-world #combat .combat-main>.combat-hud{margin:2px 0 5px}
 .game-world #combat .combat-main>h1{font-size:clamp(23px,6.2vw,30px);margin:4px 0}
 .game-world #combat .combat-main>h2{font-size:15px}
 .game-world #combat .combat-answers>button{min-height:72px;padding:7px 5px;font-size:21px;overflow-wrap:anywhere}
 .game-world #combat .combat-answers .combat-pinyin{font-size:14px!important}
 .game-world #combat .combat-hud{padding:5px 0;margin-top:5px;gap:2px 12px}
 .game-world #combat .combat-hud span{font-size:13px}
 .game-world #combat .combat-actions{margin-top:8px}
 .game-world.playing .question{padding:10px 12px}
 .game-world.playing .hud{padding:7px 12px}
 .game-world.playing .app>header{gap:4px;min-height:56px;height:56px}
 .game-world.playing .brand{font-size:14px;white-space:nowrap;gap:4px}
 .game-world.playing .brandmark{width:29px;height:30px;font-size:20px}
 .game-world.playing .brand small{font-size:7px;letter-spacing:0}
 .game-world.playing .header-right{gap:3px;min-width:0}
 .game-world.playing .language-picker select{max-width:85px;font-size:12px;padding:4px 2px}
 .game-world.playing .header-right .icon{min-width:44px;max-width:54px;font-size:10px;line-height:1.05;padding:4px}
 .game-world.playing .overdrive-panel{padding:7px 12px}
 .game-world.playing .question h1{font-size:clamp(22px,6vw,27px);line-height:1.2;margin:3px 0}
 .game-world.playing .arena-foot{padding:8px 10px}
 .game-world.playing .results{padding:16px 12px}
 .game-world.playing .learning-report{padding:10px}
 .game-world.playing .matching{gap:12px;padding:8px 6px;min-height:0}
 .game-world.playing .match-col{gap:7px}
 .game-world.playing .match-card{min-height:64px;padding:5px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:clamp(14px,3.7vw,16px);line-height:1.25;overflow-wrap:anywhere}
 .game-world.playing .match-card .hanzi{font-size:clamp(23px,6vw,28px);line-height:1.15}
 .game-world.playing .match-card .pinyin{font-size:13px;line-height:1.25}
 .game-world.playing .match-card .key{position:absolute;top:2px;left:4px;font-size:11px;opacity:.6}
}
@media(max-height:500px) and (orientation:landscape){
 .game-world #combat .boss-scene{border:0}
 .game-world #combat .combat-head{position:relative}
 .game-world.playing .matching{gap:16px;padding:4px 8px}
 .game-world.playing .match-col{gap:5px}
 .game-world.playing .match-card{min-height:54px;padding:3px 5px}
}
