/* Each desktop game keeps its active scene and controls in the same viewport. */
.stone-instruction,.reading-rule,.kana-instruction small{display:none}.coach-talk{display:none}.kana-instruction{margin:0 0 8px}.gym-feedback:empty{display:none}.gym-feedback{font-size:15px;margin:10px 0 0}
.technique-face .card-name{overflow:hidden;text-overflow:ellipsis}.loot-heading>.kicker,.medal-collection-heading .kicker{display:none}
@media(max-width:650px){.technique-face .card-name{font-size:9px}.tech-slot .card-stars{font-size:10px}}
.quest-particles{position:absolute;inset:0;pointer-events:none;overflow:hidden}.quest-particles i{display:none}.quest-scene.success .quest-particles i{display:block;position:absolute;left:calc(10% + var(--spark)*8%);top:65%;width:9px;height:17px;background:#fff19f;box-shadow:0 0 8px #ffde85;border-radius:3px;animation:quest-spark .85s calc(var(--spark)*.035s) both}
.quest-station.just-completed{animation:bridge-build .65s cubic-bezier(.2,.8,.2,1) both}.forest .quest-station.just-completed{animation:book-awaken .8s both}.quest-scene.success .quest-companion{animation:quest-cheer .8s ease-in-out}.quest-scene.forest.success{box-shadow:inset 0 0 70px #ddffaa70}.quest-scene.ruins.success{box-shadow:inset 0 -60px 80px #ffed9a60}
.gym-coach .sprite{animation:coach-breathe 3.2s ease-in-out infinite}.gym-stage.success:after{content:'';position:absolute;inset:0;background:radial-gradient(circle at 60% 40%,#fff5baaa,transparent 65%);pointer-events:none;animation:impact-light .5s both}.word-stone.broken .stone-shards i{box-shadow:0 0 12px #fff8;animation-duration:.9s}.gym-stage.choosing .word-stone{animation:stone-arrive .3s ease-out}.reading-room .gym-coach.punching{animation:gorilla-punch .65s ease-in}
.snow-hero.happy{animation:sweet-celebrate .75s ease-in-out}.pancake-arena.success:after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse,#fff2c680,transparent 65%);pointer-events:none;animation:impact-light .7s both}.rounded-treat{animation:treat-reveal .65s cubic-bezier(.16,.8,.26,1.2) both}.sugar-shot{box-shadow:0 0 8px white,0 0 22px currentColor}.number-pancake.targeted{transition:filter .15s}.duel-actor.enemy-attacking{animation:enemy-dash .4s both}.duel-actor.player-actor.hit{animation:player-hit .65s both}.healing:after{animation:heal-bloom .9s both}.heal-number{animation:heal-rise 1.2s both}.poison-arena:after{content:'';position:absolute;inset:0;box-shadow:inset 0 -35px 50px #9349bc33;pointer-events:none}.ability-events p{animation:effect-announce .25s ease-out}
@keyframes quest-spark{0%{opacity:0;transform:translateY(30px) rotate(0)}20%{opacity:1}100%{opacity:0;transform:translateY(-150px) rotate(220deg)}}
@keyframes bridge-build{0%{opacity:0;transform:translateY(65px) rotate(-12deg)}70%{transform:translateY(-8px) rotate(2deg)}100%{opacity:1;transform:none}}
@keyframes book-awaken{0%{transform:rotateY(90deg) scale(.6);filter:brightness(2)}70%{transform:rotateY(-15deg) scale(1.2)}100%{transform:none;filter:brightness(1)}}
@keyframes quest-cheer{30%{transform:translateY(-27px) rotate(-5deg)}60%{transform:translateY(-4px) rotate(5deg)}100%{transform:none}}
@keyframes coach-breathe{50%{transform:translateY(-4px) scale(1.015)}}
@keyframes impact-light{0%{opacity:0}18%{opacity:1}100%{opacity:0}}
@keyframes stone-arrive{from{opacity:.5;transform:translateY(-15px)}to{opacity:1;transform:none}}
@keyframes sweet-celebrate{35%{transform:translateY(-22px) rotate(-7deg)}65%{transform:translateY(-5px) rotate(5deg)}}
@keyframes treat-reveal{from{opacity:0;transform:translateY(24px) scale(.5) rotate(-8deg)}to{opacity:1;transform:none}}
@keyframes enemy-dash{50%{transform:translateX(-42px) rotate(-8deg)}}
@keyframes player-hit{25%{transform:translateX(-20px) rotate(-9deg)}55%{transform:translateX(8px)}}
@keyframes heal-bloom{from{opacity:0;transform:scale(.55)}35%{opacity:1}to{opacity:0;transform:scale(1.3)}}
@keyframes heal-rise{0%{opacity:0;transform:translateY(15px)}20%{opacity:1}100%{opacity:0;transform:translateY(-45px)}}
@keyframes effect-announce{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(min-width:900px){
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]){padding:0;--play-height:calc(100dvh - 149px)}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .game-shell{max-width:1440px;border-width:0 2px;border-radius:0}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .topbar{min-height:46px;height:46px;padding:5px 18px}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .brand{font-size:25px;letter-spacing:-1px}.brand small{line-height:1.1}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .brand small,body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .save-status{display:none}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .sound-toggle{font-size:12px;min-height:32px;padding:4px 12px}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .main-nav{padding:4px 12px 0;gap:8px;height:43px}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .main-nav a{min-height:36px;padding:4px 12px;font-size:13px;border-width:2px;gap:8px}.main-nav a span{line-height:1}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .main-nav a span{font-size:18px}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) main{padding:8px 14px 12px;min-height:0}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .screen-heading{height:39px;min-height:0;margin:0 0 6px}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .screen-title{font-size:25px;line-height:1.2;-webkit-text-stroke-width:4px}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) .screen-subtitle{display:none}
 body:is([data-screen="lesson"],[data-screen="reading"],[data-screen="pancake"],[data-screen="fight"],[data-screen="reward"]) footer{display:none}
 .reading-room{max-width:none;height:var(--play-height);min-height:440px;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(345px,1fr);grid-template-rows:44px minmax(0,1fr);gap:0 12px}
 .gym-hud{grid-column:1/-1;border:2px solid #5f5150;border-radius:12px 12px 0 0;padding:6px 15px}.gym-hud b{font-size:20px}.gym-lives{font-size:20px}
 .gym-stage{grid-row:2;min-height:0;border:2px solid #5f5150;border-radius:0 0 16px 16px}.gym-console{grid-row:2;grid-column:2;border:2px solid #726360;border-radius:0 0 16px 16px;padding:12px 16px;display:flex;flex-direction:column;justify-content:center;min-height:0}
 .word-stone{margin:20px 18px 175px;padding:17px 19px;min-height:190px;border-width:7px}.comic-sentence{font-size:clamp(20px,1.9vw,27px);line-height:1.8;margin:8px 0}.stone-number{display:none}.gym-coach{width:185px;left:calc(50% - 92px);bottom:13px}.gym-coach>b{font-size:12px}.gym-rack{top:auto;bottom:35px}.gym-stage.ready{padding:35px 0 180px}.gym-stage.ready .gym-coach{width:190px}.gym-ready{margin:25px auto 0;padding:18px}.gym-ready h3{font-size:25px}
 .reading-answer{min-height:54px;width:100%;font-size:27px;letter-spacing:3px;padding:5px}.answer-edit{margin:6px auto 10px}.answer-edit button{min-height:44px;padding:6px 14px}.kana-bank{width:100%;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:10px;margin:0 auto 14px;flex-shrink:0}.kana-bank button{min-height:64px;font-size:32px;padding:8px 0;border-width:2px;border-radius:12px;touch-action:manipulation}.launch-word{min-width:0;width:100%;min-height:46px;font-size:22px}.gym-feedback{font-size:14px;line-height:1.4}.gym-failed{padding:12px}.gym-failed p{font-size:15px}.stone-cleared{font-size:24px}.stone-cleared small{font-size:15px}
 .sweets-layout{max-width:none;height:var(--play-height);min-height:440px;grid-template-columns:minmax(0,1fr) 310px;grid-template-rows:44px minmax(0,1fr);gap:8px 14px}.sweets-hud{margin:0;padding:5px 15px}.sweets-layout .pancake-arena{height:100%;min-height:0}.sweets-layout .pancake-controls{height:100%;padding:12px}.sweets-layout .pancake-overlay{top:24%;max-height:70%}.sweets-layout .order-sign{font-size:22px}.sweets-layout .order-sign small{font-size:13px}.sweets-layout .snow-hero{width:160px}
 .lesson-board{max-width:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(420px,1.1fr);gap:16px;height:var(--play-height);min-height:440px}.lesson-board>.quest-scene{height:100%;min-height:0;margin:0}.lesson-board>.quiz-panel{min-height:0;display:flex;flex-direction:column;justify-content:center;padding:14px}.lesson-board>.button-row{grid-column:1/-1;margin:0}.quiz-progress{margin-bottom:8px;gap:7px}.quiz-question{font-size:19px;margin-bottom:8px}.quiz-panel .protractor{height:clamp(150px,32dvh,285px);width:auto;max-width:100%;object-fit:contain}.quiz-panel .kanji-display{font-size:90px;line-height:1.5;margin:8px auto}.quiz-panel .answers{width:100%;margin:10px 0;gap:9px}.quiz-panel .answer-button{padding:8px;font-size:22px;min-height:44px}.quiz-panel .feedback{min-height:0;padding:6px 10px;font-size:14px;margin:4px 0}.quiz-panel .button-row{margin:10px 0 0}.quiz-panel .button-row .game-button{font-size:17px;padding:8px 15px;min-height:42px}.challenge-rule{font-size:12px;padding:3px;margin:0 0 6px}
 .quest-scene .quest-companion{width:230px;bottom:14%;left:calc(50% - 115px)!important;transition:left .4s}.quest-scene .quest-companion .sprite{width:230px;height:230px}.quest-scene .quest-stations{top:25%;left:5%;right:5%;gap:6px}.quest-scene .quest-station{min-width:0}.quest-scene .quest-bubble{bottom:7%;font-size:17px;padding:12px;left:16px;right:16px}.quest-scene .quest-goal{right:25px;top:12%;font-size:45px}
 .simple-duel{position:relative;height:var(--play-height);min-height:440px;max-width:none;display:grid;grid-template-columns:minmax(0,1fr) 350px;grid-template-rows:34px 79px 47px minmax(0,1fr);gap:0;overflow:hidden}
 .duel-top{grid-column:1/-1;padding:3px 15px}.duel-hud{grid-column:1;grid-row:2;padding:8px 16px;gap:14px}.duel-hud b{font-size:18px}.duel-hud small{font-size:12px}.hand-stock-row{grid-column:1;grid-row:3;padding:4px 16px}.hand-stock-row .stock-hand{width:28px;height:28px}.hand-stock-row .hand-icon{width:25px;height:25px}.duel-arena{grid-column:1;grid-row:4;height:auto;min-height:0}.duel-console{grid-column:2;grid-row:2/5;display:flex;flex-direction:column;justify-content:center;padding:18px 14px;border-top:0;border-left:3px solid #537a80;min-height:0}
 .duel-actor{bottom:30px;width:210px;height:215px}.duel-actor .sprite{width:210px;height:210px}.duel-actor .enemy-sprite{width:215px;height:191px}.duel-actor.player-actor{left:3%}.duel-actor.enemy-actor{right:3%}.enemy-intent{top:12px}.enemy-intent b{font-size:19px}.enemy-intent span{font-size:13px}.duel-hands{font-size:12px;bottom:8px}.duel-round-result{font-size:20px;top:40%}.duel-round-result small{font-size:14px}
 .duel-hand-options{gap:7px}.duel-hand-options button{padding:10px 3px;min-width:0}.duel-hand-options .hand-icon{width:56px;height:56px}.duel-hand-options b{font-size:18px}.duel-hand-options em{font-size:15px}.duel-hand-options .hand-tech-name{font-size:11px}.simple-duel .duel-math{display:grid;grid-template-columns:62px 1fr;gap:10px}.duel-equation{font-size:25px;display:flex;align-items:center;justify-content:center;gap:6px}.duel-equation output{font-size:28px;width:66px;min-height:44px;margin:0}.duel-time b{font-size:24px}.duel-keypad{grid-column:1/-1}.simple-duel .duel-keypad button{min-height:47px}.duel-learning-note{margin:0 0 14px}.duel-next .game-button{font-size:16px;min-height:48px;width:100%;padding:8px}.ability-events p{font-size:13px;padding:7px}.math-feedback{font-size:15px;margin:8px 0}.math-feedback span{font-size:24px}
 .simple-duel:has(.duel-finish) .duel-console{position:absolute;inset:0;z-index:35;background:#fff9df;border:0;border-radius:18px}.duel-finish{padding:8px}.duel-finish>span{font-size:32px}.duel-finish h2{font-size:22px}.duel-finish p{margin:6px 0 12px}.duel-finish .medal-reward{padding:14px;margin:12px auto;gap:18px}.duel-finish .medal-coin{width:125px}.duel-finish .game-button{font-size:15px;padding:9px 18px;min-height:44px}.duel-finish .medal-reward p{font-size:13px!important}
}
@media(min-width:900px){.gym-console .reading-answer{margin:0 auto;flex-shrink:0}.gym-coach{width:220px;left:calc(50% - 110px)}.gym-console .launch-word{flex-shrink:0}.lesson-board{grid-template-rows:minmax(0,1fr)}.lesson-board>.button-row{display:none}.quest-scene .quest-bubble{top:auto;bottom:5%;max-width:none;width:auto;height:auto}.quest-scene .quest-stations{top:22%;bottom:auto}.quest-scene .quest-companion{top:auto}}
@media(min-width:900px){.simple-duel{grid-template-rows:34px 94px 47px minmax(0,1fr)}.simple-duel .duel-hud small .hand-icon{width:20px;height:20px}.simple-duel .duel-hud small{line-height:22px}}
@media(max-width:899px){.word-stone{margin-top:18px}.gym-stage{min-height:390px}.gym-stage.ready{min-height:400px;padding-top:20px}.gym-console{padding:14px}.kana-instruction{font-size:17px}.kana-bank{grid-template-columns:repeat(auto-fit,minmax(56px,1fr));gap:10px}.kana-bank button{min-height:60px;font-size:30px;touch-action:manipulation}.answer-edit button{min-height:44px}}
@media(prefers-reduced-motion:reduce){.quest-particles{display:none}.quest-station.just-completed,.quest-scene.success .quest-companion,.gym-coach .sprite,.gym-stage.success:after,.word-stone.broken .stone-shards i,.gym-stage.choosing .word-stone,.snow-hero.happy,.pancake-arena.success:after,.rounded-treat,.duel-actor.enemy-attacking,.duel-actor.player-actor.hit,.healing:after,.heal-number,.ability-events p{animation:none}.sugar-shot{animation-duration:.01s}}

/* Large, uncropped measuring tools and roomy kana keys. */
.kanji-lesson:has(.radical-feedback) .answers{display:none}
.kanji-lesson:has(.radical-feedback) [data-action="lesson-next"]{min-height:52px;min-width:200px;font-size:21px}
.kanji-lesson .quiz-panel .radical-feedback{display:flex;align-items:center;justify-content:center;gap:20px;width:100%;padding:17px 20px;margin:12px 0;border:3px solid #87b88b;border-radius:20px;background:linear-gradient(130deg,#e1f9c5,#fffedc);color:#275850;text-align:left;box-shadow:0 5px #91a66c30;animation:radical-reveal .35s ease-out}
.radical-glyph{display:grid;place-items:center;flex:none;width:88px;height:88px;border:2px solid #95b778;border-radius:18px;background:#fffef4;color:#247863;font:900 65px/1 "Yu Gothic",sans-serif}
.radical-feedback>div>span{display:block;font-size:17px;font-weight:800;margin-bottom:5px}.radical-feedback strong{display:block;font-size:clamp(27px,3.5vw,42px);font-weight:900;line-height:1.35;color:#235c52}
@keyframes radical-reveal{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:none}}
@media(max-width:650px){.kanji-lesson .quiz-panel .radical-feedback{gap:12px;padding:14px 10px}.radical-glyph{width:65px;height:72px;font-size:51px;border-radius:13px}.radical-feedback>div>span{font-size:14px}.radical-feedback strong{font-size:28px}}
@media(prefers-reduced-motion:reduce){.kanji-lesson .quiz-panel .radical-feedback{animation:none}}
.quiz-panel .protractor{width:100%;max-width:600px;height:auto}
@media(min-width:900px){
 .angle-lesson{grid-template-columns:minmax(0,.75fr) minmax(460px,1.25fr)}
 .angle-lesson .quiz-panel{padding:10px 14px}
 .angle-lesson .protractor{height:clamp(260px,56dvh,560px);width:100%;max-width:none;min-height:0;flex:0 1 auto;object-fit:contain}
 .angle-lesson .quiz-question,.angle-lesson .quiz-progress,.angle-lesson .answers,.angle-lesson .feedback,.angle-lesson .button-row{flex-shrink:0}
}
@media(min-width:900px) and (max-width:1099px){.kana-bank{grid-template-columns:repeat(auto-fit,minmax(52px,1fr));gap:8px}.kana-bank button{min-height:56px;font-size:30px}}
