/* Viewport screens. The white/blue palette and original character artwork stay intact. */
.gba-game{height:100vh;height:100dvh;display:flex;flex-direction:column;font-size:16px;line-height:1.5}
.gba-game .header{width:100%;max-width:none;min-height:64px;height:64px;padding:8px 24px;gap:18px;flex-wrap:nowrap;flex-shrink:0;position:relative;z-index:30}
.gba-game .brand img{width:154px;height:auto}.gba-game .brand span{display:none}
.gba-game .header .level{margin-left:auto;border:0;padding:0 8px;gap:0;flex-direction:column;min-width:100px}
.game-menu summary{cursor:pointer;min-height:44px;display:flex;align-items:center;padding:8px 12px;border:1px solid #cbd6e9;border-radius:4px;list-style:none}
.game-menu summary::-webkit-details-marker{display:none}
.gba-game .header nav{position:absolute;right:20px;top:60px;width:260px;max-height:calc(100dvh - 80px);overflow:auto;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:12px;margin:0;background:#fff;border:1px solid #b8cbee;box-shadow:5px 5px #e7edfa;z-index:40}
.gba-game .header nav button,.gba-game .header nav a{display:block;min-height:44px;padding:10px;text-align:left;font-size:14px}
.gba-game #main{width:100%;max-width:1320px;min-height:0;flex:1;margin:0 auto;padding:16px 24px;display:flex;flex-direction:column}
.gba-game .eyebrow{margin-bottom:8px;font-size:11px}.gba-game h1{font-size:36px}.gba-game h2{font-size:26px}.gba-game h3{font-size:21px}
.gba-game button{min-height:44px}.gba-game select{font:inherit;color:inherit;background:#fff;border:1px solid #b8cbee;border-radius:4px;padding:8px 12px;min-height:44px;max-width:100%}
.screen{height:100%;min-height:0;display:flex;flex-direction:column;gap:16px}.screen-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.screen-head p{color:var(--muted);margin-top:6px}.screen-head .eyebrow{color:var(--blue);margin-top:0}
.start-screen{max-width:1000px;width:100%;margin:auto;justify-content:center;gap:24px}.start-screen h1 span{color:var(--blue)}.start-status{color:#52647a;font-size:14px;display:flex;flex-wrap:wrap;gap:8px 20px}
.mode-choices{display:grid;grid-template-columns:1fr 1fr;gap:24px}.mode-choice{position:relative;padding:28px;text-align:left;display:grid;grid-template-columns:1fr 100px;align-items:center;gap:14px;border:2px solid #c9d8f5;box-shadow:5px 5px #edf2fc;background:#f7f9ff;min-height:220px;border-radius:8px}
.mode-choice:hover{border-color:#2458f5;background:#eff4ff;transform:translateY(-2px)}.mode-choice strong{display:block;font-size:32px;letter-spacing:-.05em;color:#1749d5;margin:6px 0 12px}.mode-choice small{display:block;font-size:15px;line-height:1.6;color:#52647a}.mode-choice .mode-no{font-size:12px;color:#2458f5;letter-spacing:.15em}.mode-choice .portrait{width:100px;height:142px;margin:0}.mode-choice.battle-choice{background:#2458f5;border-color:#2458f5}.battle-choice strong,.battle-choice .mode-no,.battle-choice small{color:#fff}.battle-choice .monster-sprite{height:120px}.start-links{display:flex;gap:12px;flex-wrap:wrap}.start-links button{font-size:14px;padding:8px 14px}
.learn-launch{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#edf3ff;padding:16px 20px;border:1px solid #cbdaf7}.learn-launch p{font-size:14px;color:var(--muted)}.topic-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;flex:1;min-height:0}.topic-card{padding:18px;display:flex;flex-direction:column;gap:8px;text-align:left;background:#fff;box-shadow:3px 3px #e7edfa;justify-content:center}.topic-card small{color:#2458f5}.topic-card strong{font-size:24px}.topic-card span{font-size:14px;color:#52647a}.screen-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px}.screen-foot button{font-size:14px;padding:8px 12px}
.battle-selector{max-width:920px;width:100%;margin:auto}.selector-tabs{display:flex;gap:8px}.selector-tabs button{flex:1;padding:8px}.selector-tabs button[aria-pressed=true]{color:white;background:#2458f5;border-color:#2458f5}.challenge-select{width:100%}.challenge-card{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1.3fr;gap:28px;align-items:center;border:1px solid #c5d5f0;box-shadow:5px 5px #edf2fc;padding:24px;background:#f7f9ff}.challenge-card .monster-sprite{height:160px}.challenge-card h2{font-size:34px;margin:8px 0}.challenge-card p{font-size:17px;margin:10px 0}.challenge-card small{color:#52647a}.challenge-actions{display:flex;gap:12px}.challenge-actions button{flex:1}.partner-picker{display:flex;align-items:center;gap:16px;font-size:14px}.partner-picker select{flex:1;min-width:0}.selector-pager{display:flex;align-items:center;gap:12px}.selector-pager select{flex:1;min-width:0}.selector-pager button{padding:8px 14px}
.gba-game .battle-shell{padding:0;margin:0 auto;width:100%;max-width:1160px;flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}
.gba-game .battle-heading{margin:0;min-height:44px}.gba-game .battle-heading h1{font-size:27px}.gba-game .battle-heading .eyebrow{margin-bottom:4px}.gba-game .turn strong{font-size:24px}
.gba-game .arena{padding:16px 22px;gap:40px;grid-template-columns:1fr 1fr;border-radius:6px;background:#edf3ff;background-image:radial-gradient(#cad9f4 1px,transparent 1px);background-size:10px 10px;color:#172b4d;border:1px solid #c2d2ed}
.gba-game .fighter-top{color:#4d6385;margin-bottom:8px}.gba-game .fighter-body{grid-template-columns:66px minmax(0,1fr);gap:12px}.gba-game .fighter-body p{color:#52647a;margin:2px 0 8px}.gba-game .fighter h2{font-size:20px}.gba-game .battle-portrait{width:66px;height:86px;margin:0}.gba-game .monster-sprite{height:84px}.gba-game .versus{color:#486b9f}.gba-game .meter-copy{font-size:12px;margin-bottom:5px}.gba-game .meter-copy strong{font-size:17px}.gba-game .meter-copy small{color:#667b99}
.gba-game progress{background:#d1ddef}.gba-game progress::-webkit-progress-bar{background:#d1ddef}.gba-game progress::-webkit-progress-value{background:#2458f5}.gba-game .enemy progress::-webkit-progress-value{background:#7d64c6}
.gba-game .battle-stats{padding:0;font-size:12px;gap:8px 18px;min-height:24px;align-items:center}.gba-game .battle-stats strong{margin-left:5px}
.gba-game .play-panel{margin:0;padding:18px 22px;min-height:0;flex:1;display:flex;flex-direction:column;justify-content:center;gap:10px;border:1px solid #cbd8ed;border-radius:6px;overflow:auto}
.gba-game .play-panel h2{font-size:23px;line-height:1.4}.gba-game .play-panel .eyebrow{margin:0}.gba-game .panel-intro{margin:0;font-size:14px}.gba-game .tactics{margin:8px 0 0;gap:14px}.gba-game .tactic{min-height:150px;padding:20px}.gba-game .tactic-top{margin-bottom:12px}.gba-game .tactic strong{font-size:23px}.gba-game .tactic p{margin:8px 0;font-size:14px}.gba-game .tactic small{font-size:11px}
.gba-game .answers{margin:0;gap:10px}.gba-game .answers button{min-height:62px;padding:12px;font-size:16px;line-height:1.5;gap:10px}.gba-game .selected-tactic{padding:6px 10px;margin:0;font-size:13px;min-height:28px}.gba-game .selected-tactic>span{font-size:17px}.gba-game .selected-tactic small{font-size:12px}
.gba-game .hint-row{margin:0;gap:10px}.gba-game .hint-row>.pixel{width:30px;height:32px}.gba-game .hint-row small{font-size:11px}.gba-game #hint-text{margin:0;padding:10px;font-size:15px}.gba-game .coach{margin:12px 0;gap:12px}.gba-game .coach .explanation{font-size:18px;line-height:1.65}.gba-game .battle-log{margin:12px 0;font-size:14px}.gba-game .feedback-actions{margin:12px 0 0;gap:16px}.gba-game .feedback-actions .primary{min-width:160px}
.gba-game .briefing,.gba-game .training{padding:0;margin:0;width:100%;height:100%;min-height:0;display:flex;flex-direction:column;gap:12px}.gba-game .training-head h1{font-size:27px}.gba-game .training-head p:not(.eyebrow){margin-top:4px;font-size:14px}.gba-game .training-head{gap:10px}.gba-game .simulation-label{font-size:11px;padding:6px 10px}.lesson-select{max-width:420px;flex:1;min-width:0}.lesson-topline{display:flex;align-items:center;gap:16px}.lesson-topline h1{font-size:26px;white-space:nowrap}.lesson-bookmark{font-size:13px;color:#52647a}.lesson-deck,.lab-pages{flex:1;min-height:0;display:flex;flex-direction:column;gap:12px}
.screen-pages{flex:1;min-height:0;display:flex;flex-direction:column}.screen-page{height:100%;min-height:0;flex:1;border:1px solid #c9d6ed;border-radius:6px;background:#fff;padding:24px;overflow:auto;display:flex;flex-direction:column;outline:none}.page-content{margin:auto 0;flex-shrink:0;max-width:100%}.screen-page:has(.concept-figure) .page-content{height:100%;min-height:0;margin:0;display:flex;flex-direction:column}.screen-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}.screen-pager button{min-width:100px;font-size:14px;padding:8px 16px}.page-position{font-size:13px;font-variant-numeric:tabular-nums;color:#52647a}
.gba-game .screen-page h2{font-size:30px;line-height:1.3}.gba-game .screen-page p{font-size:17px;line-height:1.65}.gba-game .lesson-lead{margin:20px 0 0}.gba-game .screen-page .concept-flow,.gba-game .screen-page .concept-three,.gba-game .screen-page .concept-comparison{margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}.gba-game .screen-page .concept-flow p,.gba-game .screen-page .concept-three p{font-size:16px}.gba-game .screen-page .lesson-takeaway,.gba-game .screen-page .example-note,.gba-game .screen-page .try-it{margin:0}.gba-game .screen-page .lesson-code{margin:0}.gba-game .screen-page .tutorial-exercise{margin:0}.gba-game .tutorial-exercise .answers{margin-top:16px}.gba-game .tutorial-exercise #demo-feedback:not(:empty){font-size:17px;margin-top:14px;padding:14px}
.gba-game .screen-page .concept-figure{display:flex;flex-direction:column;align-items:center;margin:0;min-height:0;height:100%;max-width:none;gap:8px}.gba-game .screen-page .concept-open{min-height:0;height:calc(100% - 62px);flex:1;aspect-ratio:4/3;width:auto;max-width:100%;padding:0;display:flex;flex-direction:column;align-items:center}.gba-game .screen-page .concept-board{width:auto;max-width:100%;height:calc(100% - 26px);aspect-ratio:4/3;min-height:0}.gba-game .screen-page .concept-image{width:100%;height:100%;object-fit:contain}.gba-game .screen-page .concept-zoom{font-size:12px;min-height:24px;padding:2px 0}.gba-game .screen-page figcaption{width:100%;text-align:center;flex-shrink:0}.gba-game .screen-page figcaption strong{font-size:16px}.gba-game .screen-page figcaption span{font-size:14px}.gba-game .screen-page .concept-logos img{max-height:24px;width:auto;max-width:120px}
.gba-game .lab-instruction{margin:0 0 16px}.gba-game .lab-instruction h2{font-size:26px}.gba-game .practice-notice{margin:16px 0 0;padding:12px;font-size:13px}.gba-game .screen-page .lab-field{display:flex;flex-direction:column;gap:8px;margin:0 0 16px}.gba-game .screen-page textarea{min-height:100px;height:110px;resize:none}.gba-game .screen-page textarea[readonly]{height:150px;min-height:100px}.gba-game .lab-submit{display:flex;flex-direction:column;gap:16px}.gba-game .lab-submit .lab-result{margin:0}.gba-game .lab-preview,.gba-game .raw-sources,.gba-game .agent-console,.gba-game .vault-sidebar,.gba-game .note-editor,.gba-game .note-preview{padding:0;border:0;margin:0}.gba-game .lab-preview .lab-small{font-size:13px;margin:8px 0}.gba-game .lab-preview h3{font-size:23px;margin-bottom:12px}.gba-game .lab-preview button{margin:8px 0}.gba-game .vault-create{display:flex;flex-direction:column;align-items:stretch;margin:0;gap:12px}.gba-game .vault-create input{width:100%}.gba-game .vault-sidebar{background:none}.gba-game #file-tree{max-height:145px;overflow:auto;grid-template-columns:1fr 1fr}.gba-game .note-editor #note-text{height:185px;min-height:120px}.gba-game #markdown-preview{max-height:280px;overflow:auto}.gba-game .note-preview h1{font-size:25px}.gba-game .agent-console{background:#fff;color:#172b4d}.gba-game .agent-console .eyebrow{color:#2458f5}.gba-game .agent-console li{margin:10px 0;font-size:15px}.gba-game .agent-console button{color:#2458f5}.gba-game .raw-sources pre{font-size:15px;line-height:1.65;padding:12px;margin:0 0 12px}.gba-game .practice-completion{margin:0;padding:18px}.gba-game .back-lesson{margin:0;min-height:44px;font-size:13px;padding:6px 10px;align-self:flex-start}
.gba-game .result{padding:0;max-width:none;width:100%;height:100%;display:flex;flex-direction:column;gap:12px}.result-tabs{display:flex;gap:8px}.result-tabs button{flex:1;font-size:14px;padding:8px}.result-tabs button[aria-selected=true]{background:#2458f5;color:#fff}.result-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:12px}.result-summary{height:100%;display:flex;flex-direction:column;justify-content:center;gap:16px}.gba-game .result-seal{height:76px;width:62px;margin:0 auto}.gba-game .result h1{font-size:30px}.gba-game .result-metrics{padding:12px 0;margin:0}.gba-game .result-metrics strong{font-size:27px}.gba-game .mission{margin:0;padding:14px;text-align:left}.gba-game .mission h2{font-size:20px}.gba-game .mission p:last-child{font-size:15px;margin-top:6px}.gba-game .result .actions button{font-size:14px;padding:8px 12px}.gba-game .ai-review{height:100%;min-height:0;display:flex;flex-direction:column;gap:12px;margin:0;padding:16px;text-align:left;box-shadow:none}.gba-game .ai-review h2{font-size:24px}.gba-game .ai-review p{margin:0;font-size:14px}.gba-game .ai-review pre{flex:1;min-height:80px;max-height:none;margin:0;font-size:14px;padding:12px}.gba-game .ai-review .lab-small{font-size:12px}.gba-game .review{padding:0;max-width:none;width:100%;height:100%;display:flex;flex-direction:column;gap:12px}.gba-game .review h1{font-size:28px}.gba-game .review .intro{margin:0;font-size:15px}.review-deck{display:flex;flex-direction:column;gap:12px;flex:1;min-height:0}.gba-game .review-list{border:0}.gba-game .review-list button{padding:16px 0}.gba-game .review-list strong{font-size:17px}.gba-game .review-list small{margin-bottom:4px}.gba-game .review .empty{margin:0;padding:24px}.gba-game .review #review-question{flex:1}.gba-game .notice{top:70px;bottom:auto;pointer-events:none;font-size:13px;padding:10px 16px;box-shadow:0 4px 15px #15294d22}
/* Long user-authored code, card forms, help and zoom views keep an accessible inner scroll. */
.gba-game .namecard-page{height:100%;min-height:0;overflow:auto;padding:12px 0}.gba-game .namecard-page h1{font-size:30px}.gba-game .namecard-page .intro{font-size:16px;margin:12px 0}.gba-game dialog{background:#fff}.gba-game dialog .dialog-head{position:sticky;top:-1px;background:#fff;z-index:2}
@media(max-width:760px){
 .gba-game .header{height:60px;min-height:60px;padding:8px 12px;gap:8px}.gba-game .brand img{width:118px}.gba-game .header .level{padding:0 4px;min-width:90px}.gba-game .level strong{font-size:12px}.gba-game .header nav{top:56px;right:12px}.game-menu summary{padding:8px 10px;font-size:14px}.gba-game #main{padding:10px 12px}.screen{gap:12px}.gba-game h1{font-size:28px}.screen-head p{font-size:14px}.screen-head .eyebrow{font-size:10px}.start-screen{gap:18px}.start-screen h1{font-size:30px}.start-status{font-size:12px;gap:6px 12px}.mode-choices{grid-template-columns:1fr;gap:14px}.mode-choice{min-height:125px;padding:16px 18px;grid-template-columns:1fr 70px;gap:8px}.mode-choice strong{font-size:26px;margin:3px 0 6px}.mode-choice small{font-size:14px;line-height:1.45}.mode-choice .mode-no{font-size:10px}.mode-choice .portrait{width:60px;height:85px}.mode-choice .monster-sprite{height:75px}.start-links{gap:8px}.start-links button{flex:1;padding:6px;font-size:13px}.learn-launch{padding:12px;gap:8px}.learn-launch h2{font-size:19px}.learn-launch p{font-size:12px}.learn-launch button{padding:8px 10px;font-size:14px;white-space:nowrap}.topic-grid{grid-template-columns:1fr 1fr;gap:10px}.topic-card{padding:12px;gap:4px}.topic-card strong{font-size:20px}.topic-card small{font-size:10px}.topic-card span{font-size:12px}.screen-foot{font-size:12px}.screen-foot button{font-size:12px}.challenge-card{padding:16px;gap:10px;grid-template-columns:85px minmax(0,1fr)}.challenge-card .monster-sprite{height:85px}.challenge-card h2{font-size:27px}.challenge-card p{font-size:15px;margin:6px 0}.challenge-card small{font-size:12px}.selector-pager{gap:8px}.selector-pager button{padding:6px 10px}.selector-pager select{font-size:15px}.partner-picker{gap:10px;font-size:12px}.partner-picker select{font-size:14px}.challenge-actions{gap:8px}.challenge-actions button{padding:8px;font-size:14px}
 .gba-game .battle-shell{gap:6px}.gba-game .battle-heading{min-height:36px;gap:8px}.gba-game .battle-heading h1{font-size:22px}.gba-game .battle-heading .eyebrow{font-size:9px;margin-bottom:2px}.gba-game .turn strong{font-size:20px}.gba-game .arena{padding:10px;gap:20px;grid-template-columns:1fr 1fr}.gba-game .fighter-body{grid-template-columns:38px minmax(0,1fr);gap:6px}.gba-game .fighter h2{font-size:13px;line-height:1.35;letter-spacing:-.03em}.gba-game .fighter-top{display:none}.gba-game .fighter-body p{display:none}.gba-game .battle-portrait{height:56px;width:38px}.gba-game .fighter .monster-sprite{height:44px}.gba-game .meter-copy{font-size:9px;margin:3px 0;flex-wrap:wrap;gap:3px}.gba-game .meter-copy strong{font-size:13px}.gba-game .meter-copy small{font-size:9px}.gba-game progress{height:5px}.gba-game .versus{font-size:9px}.gba-game .battle-stats{font-size:11px;gap:2px 10px;min-height:20px}.gba-game .battle-stats>span:last-child{display:none}.gba-game .battle-stats strong{margin-left:3px}
 .gba-game .play-panel{padding:12px;gap:8px}.gba-game .play-panel h2{font-size:18px;line-height:1.4}.gba-game .play-panel .eyebrow{font-size:9px;letter-spacing:.04em}.gba-game .q-kind{font-size:10px;padding:2px 4px;margin-left:4px}.gba-game .selected-tactic{padding:4px 8px;font-size:12px;gap:8px;min-height:26px}.gba-game .selected-tactic small{display:none}.gba-game .answers{grid-template-columns:1fr;gap:6px}.gba-game .answers button{min-height:44px;padding:9px 10px;font-size:14px;line-height:1.45;gap:9px}.gba-game .answer-no{width:22px;height:22px;font-size:11px}.gba-game .hint-row{gap:6px}.gba-game .hint-row .pixel{display:none}.gba-game .hint-row small{font-size:10px}.gba-game .hint-row button{font-size:13px}.gba-game .panel-intro{font-size:13px}.gba-game .tactics{gap:7px;margin-top:6px;grid-template-columns:repeat(3,minmax(0,1fr))}.gba-game .tactic{padding:12px 8px;min-height:164px}.gba-game .tactic strong{font-size:17px;display:block;line-height:1.35}.gba-game .tactic p{font-size:12px;line-height:1.5}.gba-game .tactic small{font-size:10px}.gba-game .tactic-top{display:block;font-size:10px;margin-bottom:10px}.gba-game .tactic-top>span:first-child{font-size:22px;display:block;margin-bottom:6px}.gba-game .coach{margin:10px 0;gap:10px}.gba-game .coach>div{width:32px;height:37px}.gba-game .coach .explanation{font-size:16px;line-height:1.6}.gba-game .battle-log{font-size:12px;margin:10px 0}.gba-game .feedback-actions{margin:10px 0 0;gap:10px}.gba-game .feedback-actions a{font-size:11px}.gba-game .feedback-actions .primary{min-width:0;font-size:14px;padding:10px 14px}
 .lesson-topline{gap:10px;flex-wrap:wrap}.lesson-topline h1{font-size:22px}.lesson-select{font-size:14px}.lesson-bookmark{font-size:12px}.gba-game .briefing,.gba-game .training{gap:10px}.gba-game .training-head{flex-direction:row;align-items:center}.gba-game .training-head h1{font-size:23px}.gba-game .training-head p:not(.eyebrow){font-size:12px}.gba-game .simulation-label{font-size:9px;max-width:74px;white-space:normal;text-align:center}.screen-page{padding:18px}.screen-pager button{padding:8px 10px;min-width:84px;font-size:13px}.gba-game .screen-page h2{font-size:25px}.gba-game .screen-page p{font-size:16px}.gba-game .screen-page .concept-flow,.gba-game .screen-page .concept-three,.gba-game .screen-page .concept-comparison{grid-template-columns:1fr;gap:12px}.gba-game .screen-page .concept-flow>div,.gba-game .screen-page .concept-three>div,.gba-game .screen-page .concept-comparison>div{padding:16px}.gba-game .screen-page .concept-comparison p{font-size:16px;margin:8px 0}.gba-game .screen-page .concept-figure figcaption strong{font-size:15px}.gba-game .screen-page .concept-figure figcaption span{font-size:13px}.gba-game .tutorial-exercise h3{font-size:18px;line-height:1.5}.gba-game .screen-page .tutorial-exercise #demo-feedback{font-size:15px}.gba-game .training input,.gba-game .training select,.gba-game .training textarea{padding:9px 11px;min-height:44px;font-size:16px}.gba-game .training label{font-size:14px}.gba-game .screen-page .lab-field{gap:6px;margin-bottom:12px}.gba-game .screen-page textarea{height:90px;min-height:90px}.gba-game .lab-instruction h2{font-size:24px}.gba-game .lab-instruction ol,.gba-game .lab-instruction>p{font-size:15px;margin-top:12px;padding-left:20px}.gba-game .screen-page .practice-notice{font-size:12px}.gba-game .raw-sources pre{font-size:14px}.gba-game .agent-console li{font-size:14px}.gba-game .lab-submit h2{font-size:24px}.gba-game .lab-submit p{font-size:15px}.gba-game .lab-submit .lab-result{font-size:14px}.gba-game .practice-completion strong{font-size:20px}.gba-game .practice-completion p{font-size:15px}.gba-game .practice-completion button{font-size:14px}
 .gba-game .result h1{font-size:25px}.result-summary{gap:12px}.gba-game .result-metrics strong{font-size:24px}.gba-game .result-metrics span{font-size:11px}.gba-game .result .actions{gap:8px}.gba-game .result .actions button{font-size:12px;flex:1}.gba-game .mission p:last-child{font-size:14px}.gba-game .ai-review{padding:12px;gap:10px}.gba-game .ai-review h2{font-size:22px}.gba-game .ai-review p{font-size:13px}.gba-game .ai-review .lab-small{font-size:11px}.gba-game .review h1{font-size:26px}.gba-game .review-list strong{font-size:15px}.gba-game .review-list button{gap:10px}.gba-game .review-list button>span:last-child{font-size:11px;white-space:normal}.gba-game .notice{top:64px;font-size:12px;max-width:90vw}
}
@media(max-height:660px){.start-screen{gap:12px}.mode-choice{min-height:118px}.screen{gap:10px}.screen-head p{margin-top:4px}.gba-game .screen-page{padding:16px}.gba-game .battle-shell{gap:5px}.gba-game .play-panel{gap:6px}.gba-game .battle-heading{min-height:30px}.gba-game .battle-heading h1{font-size:20px}.gba-game .selected-tactic{display:none}.gba-game .screen-page .concept-comparison>div{padding:12px}.gba-game .result-seal{height:58px;width:46px}}
@media(max-height:500px) and (min-width:761px){.gba-game .arena{padding:8px 14px}.gba-game .fighter-top,.gba-game .fighter-body p{display:none}.gba-game .battle-portrait{height:48px}.gba-game .fighter .monster-sprite{height:48px}.gba-game .tactic{min-height:0;padding:8px 16px}.gba-game .tactic-top{margin-bottom:4px}.gba-game .tactic p{margin:4px 0}.gba-game .answers button{min-height:44px;padding:6px 12px}.gba-game .selected-tactic{display:none}}
@media(prefers-reduced-motion:reduce){.mode-choice:hover{transform:none}}

/* Compact controls stay outside the content pages. */
.screen-head>button,.lesson-topline>button{flex-shrink:0;white-space:nowrap;padding:8px 12px;font-size:14px}
.gba-game .screen-page .concept-flow,.gba-game .screen-page .concept-three,.gba-game .screen-page .concept-comparison{grid-template-columns:1fr;max-width:760px;margin:auto}
.gba-game .screen-page article>p{margin-top:14px}.gba-game .screen-page article>button{margin-top:18px}
.download-links{display:flex;flex-direction:column;gap:8px;margin-top:16px}.download-links a{display:flex;align-items:center;min-height:44px;font-size:16px}
.result-tabs button[aria-pressed=true]{background:#2458f5;color:white}.gba-game .result-actions{display:flex;flex-wrap:nowrap;margin:0;gap:10px}.gba-game .result-actions button{flex:1;width:auto;min-width:0}
.gba-game .play-panel{justify-content:safe center}.gba-game .play-panel>*{flex-shrink:0}.gba-game .challenge-card .monster-sprite{height:140px}.gba-game .mode-choice .monster-sprite{height:100px}
.review-back{align-self:flex-start;padding:8px 12px;font-size:14px}.review-answer{color:#1749d5;font-weight:700}.gba-game .review-list button{padding:10px 18px;margin-top:24px}
.gba-game #hint-dialog{max-width:520px}.gba-game #dialog-hint{margin:20px 0 6px;line-height:1.8}
@media(max-width:760px){.screen-head h1{font-size:24px}.screen-head{gap:8px}.screen-head>button{font-size:12px;padding:8px}.gba-game .challenge-card .monster-sprite{height:80px}.gba-game .mode-choice .monster-sprite{height:70px}.gba-game .screen-page article>p{margin-top:12px}.gba-game .result-actions button{font-size:13px}.gba-game .training-head{flex-wrap:wrap}.gba-game .training-head>div{flex:1}.gba-game .training-head .simulation-label{display:none}.gba-game .back-lesson{align-self:center;white-space:nowrap}.gba-game .screen-page .lesson-lead{margin:16px 0 0}}
