:root { --ink:#2e3456; --navy:#22356e; --sky:#25a6f2; --cream:#fffaf0; --paper:#fffef9; --gold:#ffd559; --wood:#8a4c2a; --mint:#e7ffe0; --shadow:0 17px 40px rgba(43,66,104,.19); --round:26px; }
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:ui-rounded,"Trebuchet MS","Arial Rounded MT Bold",system-ui,sans-serif;color:var(--ink)}
body{background:#65caff}
button,input,select,textarea{font:inherit}
button{cursor:pointer;-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:4px solid #ffbe35;outline-offset:3px}
button[disabled]{cursor:not-allowed;opacity:.55}
a{color:#225aa9}
#app{min-height:100vh}
.loading-scene{display:grid;place-items:center;min-height:100vh;color:white;font-size:32px;background:linear-gradient(120deg,#3bb9ff,#49ddae)}
/* Preserve the ORIGINAL, user-approved 1672x941 image pixel-for-pixel. */
.map-shell{position:relative;min-height:100vh;background:#3eacee}
.map-scroller{width:100%;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#69b0fa transparent;overscroll-behavior-x:contain}
.map-stage{position:relative;width:max(1180px,100vw);aspect-ratio:1672/941;min-height:640px;isolation:isolate}
.map-art{width:100%;height:100%;display:block;pointer-events:none;user-select:none;-webkit-user-drag:none}
.map-hit{position:absolute;z-index:2;border:0;background:transparent;border-radius:30%;color:transparent;transition:filter .16s,box-shadow .16s;cursor:pointer}
.map-hit:hover,.map-hit:focus-visible{background:rgba(255,255,255,.09);box-shadow:0 0 0 4px rgba(255,247,129,.92),0 0 25px 8px rgba(255,211,53,.58);outline:none}
.map-hit:active{transform:scale(.98)}
.map-hit[data-tip]:hover::after,.map-hit[data-tip]:focus-visible::after{content:attr(data-tip);position:absolute;bottom:100%;left:50%;transform:translate(-50%,-10px);white-space:nowrap;box-shadow:0 5px 22px rgba(0,0,0,.25);border:2px solid white;border-radius:16px;background:#fff6ca;color:#573512;font-size:clamp(13px,1.2vw,19px);font-weight:900;padding:7px 12px;pointer-events:none}
.map-hit.cta{border-radius:60px}
.map-hit.audio{z-index:4;border-radius:100px}
.map-hit.bottom-hit{border-radius:22px}
.timer-map{position:absolute;left:44.55%;top:5.05%;width:20.9%;height:8.9%;z-index:7;display:flex;align-items:center;justify-content:center;gap:7px;padding:5px 10px;border:4px solid #fffdf4;border-radius:70px;background:linear-gradient(165deg,#fff2ab 0%,#ffe3a7 45%,#ffecbf 100%);box-shadow:0 6px 13px #51340c3b;white-space:nowrap}
.timer-map .timer-art{font-size:clamp(25px,2.2vw,43px);flex:0 0 auto}
.timer-map .timer-info{display:flex;flex-direction:column;gap:3px;align-items:center;min-width:0}
.timer-map .timer-label{font-size:clamp(10px,.96vw,16px);color:#164792;font-weight:1000}
.timer-map .timer-clock{background:linear-gradient(160deg,#2454a4,#183568);color:white;border-radius:12px;padding:1px 11px;font-size:clamp(20px,1.9vw,32px);font-weight:1000;letter-spacing:2px;box-shadow:inset 0 2px 5px #12264d}
.timer-map .round-btn{height:clamp(33px,2.8vw,48px);width:clamp(33px,2.8vw,48px);border:2px solid #e0fbff;border-radius:50%;background:linear-gradient(160deg,#45c9ff,#1573e5);font-size:clamp(15px,1.4vw,24px);color:white;box-shadow:none;display:grid;place-items:center;flex:0 0 auto}
.timer-map .round-btn:active{transform:translateY(2px)}
.dynamic-stars{position:absolute;z-index:5;left:73.7%;top:6.1%;width:6.3%;height:4.6%;background:#fff8ed;border-radius:20px;display:flex;gap:7px;align-items:center;justify-content:center;color:#432b0b;font-weight:1000;font-size:clamp(15px,1.4vw,24px)}
.dynamic-stars .star-icon{font-size:1.25em}
.mission-count{position:absolute;z-index:4;left:47.2%;top:74.6%;height:4%;width:9.5%;background:#fff8e8;border-radius:30px;text-align:center;font-weight:900;color:#694a36;display:grid;place-items:center;font-size:clamp(9px,.85vw,15px)}
.mobile-ribbon{display:none}
.mobile-hint{position:absolute;z-index:6;left:20px;top:108px;background:#fffce9e9;border:2px solid white;border-radius:16px;padding:10px;font-size:14px;box-shadow:var(--shadow)}
/* Generic pages: screenshot art remains as a dimmed map behind each game. */
.world-page{min-height:100vh;position:relative;overflow:hidden;background:linear-gradient(170deg,#92e8ff,#d9faff)}
.world-page::before{content:"";position:fixed;inset:0;z-index:0;background:url('./world-map-original.png') center/cover no-repeat;filter:blur(11px) saturate(.9);transform:scale(1.06);opacity:.30;pointer-events:none}
.world-page::after{content:"";position:fixed;inset:0;z-index:0;background:linear-gradient(125deg,#c6f1ffce,#fff6e7b8,#ecf5ffd5);pointer-events:none}
.world-inner{position:relative;z-index:1;max-width:1220px;margin:0 auto;padding:24px 22px 70px}
.game-header{position:sticky;top:7px;z-index:15;background:#ecfaffdf;backdrop-filter:blur(12px);border-radius:24px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:22px}
.back-button{background:#fff;border:3px solid #d3e9fa;color:#22538b;border-radius:24px;padding:13px 20px;font-weight:1000;box-shadow:none;display:flex;gap:8px;align-items:center}
.game-header .title-block{flex:1;text-align:center;min-width:205px}
.game-header h1{margin:0;font-size:clamp(27px,4vw,44px);color:#20396b;text-shadow:2px 2px 0 white}
.game-header p{margin:4px 0;color:#4a6488;font-size:16px;font-weight:700}
.top-timer{background:white;border:3px solid #fed26b;box-shadow:none;padding:9px 14px;border-radius:22px;display:flex;align-items:center;gap:10px;font-weight:1000;color:#1d5389;white-space:nowrap}
.top-timer strong{font-size:25px;letter-spacing:1px}
.top-timer .timer-small-edit{border:0;background:#e9f4ff;border-radius:14px;padding:7px 10px;color:#1b4b81}
.card{background:#fffdfaee;border:3px solid white;border-radius:var(--round);box-shadow:var(--shadow);padding:24px}
.panel{border:3px solid #e9effd;background:linear-gradient(165deg,#fffefc,#f8fdff);border-radius:25px;padding:20px}
.hero-strip{background:linear-gradient(100deg,#2c8ce3,#48cae7,#36c9ab);border:3px solid white;border-radius:28px;box-shadow:var(--shadow);padding:18px 24px;color:white;display:flex;align-items:center;gap:18px;margin-bottom:20px}
.hero-strip .hero-emoji{font-size:55px;filter:drop-shadow(0 5px 3px #1e76a888)}
.hero-strip h2{font-size:clamp(22px,3vw,34px);margin:0 0 3px}
.hero-strip p{margin:0;font-weight:700;opacity:.95}
.learning-layout{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(235px,1fr);gap:18px}
.sidebar{display:flex;flex-direction:column;gap:18px}
.section-title{font-weight:1000;margin:0 0 10px;color:#273e69;font-size:22px}
.pill-row{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:16px}
.pill{border:2px solid #d3e3f9;background:white;color:#235586;font-weight:900;padding:10px 15px;border-radius:40px}
.pill.active{background:#2a8ef0;border-color:#2870c5;color:white}
.pill.active:hover{background:#1f78cf}
.btn{border:0;border-radius:19px;padding:13px 22px;background:#e9f2ff;color:#254985;font-weight:1000;box-shadow:none;display:inline-flex;align-items:center;justify-content:center;gap:9px;text-decoration:none}
.btn:active{transform:translateY(3px);box-shadow:none}
.btn.green{background:linear-gradient(#47d87c,#10b558);color:#fff;box-shadow:none;text-shadow:0 1px 1px #147638}
.btn.gold{background:linear-gradient(#ffe17d,#ffb731);color:#5e390e;box-shadow:none}
.btn.blue{background:linear-gradient(#50bfff,#2080ed);color:#fff;box-shadow:none}
.btn.rose{background:linear-gradient(#ffa5c7,#ff70a7);color:#702b53;box-shadow:none}
.btn.white{background:white;border:2px solid #e0eaff;box-shadow:none}
.btn.small{padding:9px 12px;font-size:14px;border-radius:13px;box-shadow:none}
.btn.icon-only{padding:12px;border-radius:50%;width:45px;height:45px}
.btn.block{width:100%}
.btn-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px}
.quiet{color:#65748f;font-size:14px;line-height:1.55}
.muted{color:#687d97}
.accent-text{color:#1d85d7;font-weight:1000}
.math-question{font-size:clamp(23px,3.1vw,34px);font-weight:1000;line-height:1.24;margin:13px 0 18px;color:#253b69}
.progress-line{display:flex;justify-content:space-between;align-items:center;color:#5b6e84;font-weight:900;margin-bottom:10px;gap:15px}
.progress-track{height:12px;border-radius:40px;background:#e7ecf3;overflow:hidden;margin-bottom:12px}
.progress-fill{height:100%;border-radius:40px;background:linear-gradient(90deg,#71d86b,#23b5d5);transition:width .3s}
.answer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}
.answer-choice{min-height:116px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;position:relative;border:4px solid #deebff;background:linear-gradient(#ffffff,#f0f8ff);border-radius:23px;padding:12px;color:#25396c;font-weight:1000;font-size:clamp(20px,2.1vw,28px);transition:transform .15s,border-color .15s;overflow:hidden}
.answer-choice:hover{transform:translateY(-2px);border-color:#67afff}
.answer-choice.selected-correct{background:#e8ffe9;border-color:#3ec976;color:#176a43}
.answer-choice.selected-wrong{background:#fff1ee;border-color:#ff9e92;color:#b45245}
.answer-choice .opt-emoji{font-size:clamp(32px,4vw,59px);line-height:1.12}
.answer-choice .opt-text{display:block;text-align:center;line-height:1.2}
.scene{min-height:158px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;background:linear-gradient(145deg,#e8faff,#f8fff0);border:2px dashed #bee1f7;border-radius:22px;padding:17px;margin:14px 0;font-size:34px}
.scene .math-emojis{font-size:37px;letter-spacing:4px;line-height:1.55;text-align:center}
.scene .num-big{font-size:52px;color:#3360b1;font-weight:1000}
.scene .scene-pos{position:relative;width:200px;height:150px}
.scene .scene-pos .tree{position:absolute;left:70px;top:44px;font-size:64px}
.scene .scene-pos .object{position:absolute;font-size:45px}
.scene .scene-pos .object.above{left:81px;top:0}
.scene .scene-pos .object.below{left:81px;top:104px}
.scene .scene-pos .object.left{left:0;top:57px}
.scene .scene-pos .object.right{right:0;top:57px}
.scene .scene-group{padding:8px;background:white;border-radius:16px;border:2px solid #d0e7ec;text-align:center;font-size:20px}
.scene .scene-group .objects{font-size:29px;max-width:310px;line-height:1.2}
.measure-visual{display:block;background:#ff84a2;height:20px;border:2px solid #cc4d74;border-radius:5px;min-width:15px}
.tower-visual{display:block;width:43px;background:repeating-linear-gradient(0deg,#73c3ff 0 13px,#327dd4 13px 16px);border:3px solid #296b9d;border-radius:5px}
.cup-visual{height:66px;width:56px;border:5px solid #86b9e3;border-radius:4px 4px 15px 15px;display:flex;align-items:flex-end;overflow:hidden;background:#ffffffcc}
.cup-visual span{width:100%;background:linear-gradient(#60d6fe,#257eea)}
.answer-choice .measure-preview{width:150px;max-width:90%;height:76px;display:grid;place-items:center}
.math-svg{width:120px;height:100px}
.math-svg polygon,.math-svg rect,.math-svg circle{fill:#94d7ff;stroke:#3263bf;stroke-width:5}
.feedback{padding:15px 18px;margin-top:16px;border-radius:18px;border:2px solid #a7cbe8;background:#f3fbff;line-height:1.5}
.feedback.success{background:#e8ffed;border-color:#7adc8d;color:#19663d}
.feedback.retry{background:#fff8df;border-color:#ffe08c;color:#76521b}
.feedback strong{display:block;font-size:20px;margin-bottom:4px}
.center{text-align:center}
.reward-hero{font-size:78px;line-height:1.25}
.stat-list{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.stat{background:#eef7ff;border-radius:15px;padding:13px;text-align:center}
.stat strong{font-size:23px;color:#285da3;display:block}
.stat small{font-weight:700;color:#67809e}
.island-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.island-tile{min-height:175px;border-radius:23px;border:3px solid white;box-shadow:var(--shadow);text-align:center;padding:23px 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#34416b;font-weight:1000;transition:transform .15s}
.island-tile:hover{transform:translateY(-4px)}
.island-tile span:first-child{font-size:56px}
.island-tile small{color:#5b7291;font-size:14px}
.words-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.word-card{min-height:145px;background:#fff;border:4px solid #d3e6ff;border-radius:22px;display:flex;flex-direction:column;gap:4px;justify-content:center;align-items:center;padding:14px;color:#284d8e;font-weight:1000;font-size:20px}
.word-card .word-emoji{font-size:66px}
.word-card:hover{border-color:#69b5f9}
.word-card.correct{border-color:#4dc47f;background:#e9ffed}
.word-card.wrong{border-color:#ff9f95;background:#fff4f2}
.story-illustration{font-size:120px;text-align:center;line-height:1.55;filter:drop-shadow(0 10px 15px rgba(52,91,138,.2))}
.story-sentence{font-size:clamp(27px,3vw,40px);text-align:center;line-height:1.5;font-weight:1000;color:#2c4773;max-width:550px;margin:0 auto 18px}
.story-words button{background:transparent;border:0;color:inherit;font-size:inherit;font-weight:inherit;border-bottom:2px dashed #92bfed;padding:2px}
.story-words button:hover{color:#147edb;background:#edf7ff}
.keypad{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:7px}
.key{min-height:53px;background:#fff;border:3px solid #d2deed;border-radius:11px;color:#38527c;font-size:23px;font-weight:1000;box-shadow:0 4px #a7bedb}
.key:hover,.key.target{background:#fff1aa;border-color:#f5c333;box-shadow:0 4px #ca8d2a}
.key.hit{background:#bfffc4;border-color:#40b46e}
.parent-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(310px,1fr);gap:18px}
.parent-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.field{display:flex;flex-direction:column;gap:7px;margin-bottom:12px;min-width:0}
.field label{font-weight:1000;color:#38527d}
.field input,.field select,.field textarea{background:white;border:2px solid #d7e5f8;border-radius:13px;padding:12px 14px;color:#344869;min-width:0;width:100%}
.field textarea{min-height:84px;resize:vertical}
.full{grid-column:1/-1}
.lesson-entry{background:white;border:2px solid #deebf8;border-radius:15px;margin:10px 0;padding:15px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.lesson-entry strong{font-size:18px}
.lesson-entry small{color:#6f8095}
.parent-note{background:#fff7da;border:2px solid #ffe3a6;border-radius:15px;padding:12px 15px;color:#7e6234;line-height:1.45}
.rule{height:1px;border:0;background:#e4eaf4;margin:20px 0}
.notice{background:#fff9eb;border:2px solid #ffe6a0;border-radius:17px;padding:14px;font-weight:700;line-height:1.5}
.scrim{position:fixed;inset:0;z-index:50;background:#112044aa;display:grid;place-items:center;padding:16px;backdrop-filter:blur(8px)}
.dialog{width:min(100%,550px);max-height:92vh;overflow:auto;background:#fffdf5;border:6px solid white;box-shadow:0 25px 80px #0a1d4077;border-radius:30px;padding:25px}
.dialog h2{margin:0 0 8px;color:#204b8d}
.dialog .dialog-close{float:right;border:0;background:#edf3ff;border-radius:50%;width:43px;height:43px;font-size:22px}
.badge{display:inline-flex;border-radius:20px;background:#e8f3ff;color:#3471b4;font-weight:900;padding:5px 10px;font-size:12px}
.stickers-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;text-align:center}
.sticker{background:#fff7e4;border:2px solid #ffe9b2;border-radius:17px;font-size:36px;padding:10px}
.sticker.locked{filter:grayscale(1);opacity:.3}
.toast{position:fixed;z-index:120;left:50%;bottom:22px;transform:translateX(-50%);border:3px solid white;border-radius:50px;background:#224985;color:#fff;box-shadow:0 10px 30px #0a265e66;padding:13px 23px;font-weight:900;max-width:90%;text-align:center;animation:toastin .25s ease}
@keyframes toastin{from{transform:translate(-50%,20px);opacity:0}}
@media (max-width:980px){.learning-layout,.parent-grid{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:1fr 1fr}.map-stage{width:max(1180px,100vw)}.hero-strip h2{font-size:27px}}
@media (max-width:760px){
 .map-shell{background:#0d8aca}.map-stage{width:1180px}.mobile-ribbon{display:flex;position:sticky;top:0;z-index:20;align-items:center;justify-content:space-between;gap:9px;padding:10px 12px;background:#e8f9ffed;border-bottom:3px solid #bce4fb;box-shadow:0 5px 15px #0d3c6d44}
 .mobile-ribbon button{background:white;border:2px solid #cde7ff;border-radius:14px;padding:9px 11px;font-weight:1000;color:#2252a0}
 .mobile-ribbon .mobile-clock{font-weight:1000;color:#254e9a}
 .timer-map{display:none}.dynamic-stars{display:none}.mission-count{font-size:14px}
 .world-inner{padding:14px 12px 60px}.game-header{gap:7px}.game-header .title-block{order:3;flex:1 0 100%;text-align:left}.game-header h1{font-size:29px}.top-timer{margin-left:auto}.hero-strip{padding:14px}.hero-strip .hero-emoji{font-size:38px}
 .card{padding:17px;border-radius:22px}.sidebar{display:flex}.answer-choice{min-height:108px}.answer-grid{gap:9px}.island-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:1fr}
 .keypad{gap:3px}.key{min-height:36px;font-size:15px;padding:2px}.words-options{gap:10px}.word-card .word-emoji{font-size:49px}.word-card{min-height:123px}
}
@media (max-width:420px){.game-header .top-timer strong{font-size:20px}.story-illustration{font-size:95px}.stat-list{grid-template-columns:1fr 1fr}.island-tile{min-height:143px;padding:14px 5px}.island-tile span:first-child{font-size:42px}.hero-strip p{font-size:13px}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* Illustrated manipulatives for extended question bank */
.ten-frame{display:grid;grid-template-columns:repeat(5,minmax(37px,1fr));gap:5px;width:min(100%,455px);background:#d7eaff;padding:8px;border:4px solid #70a5dd;border-radius:18px}
.frame-cell{background:#fff;aspect-ratio:1;border:2px solid #a4c9e9;border-radius:12px;display:grid;place-items:center;font-size:clamp(21px,3.7vw,35px);min-width:0}
.frame-cell.full{background:#fff8d9;border-color:#efc963}
.counting-line{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:9px;width:100%}
.count-node{background:#fff;border:3px solid #b7d6ff;box-shadow:none;border-radius:14px;min-width:53px;height:63px;display:grid;place-items:center;color:#336ab7;font-size:clamp(22px,3vw,35px);font-weight:1000}
.count-node.mystery{background:#fff1b6;border-color:#f3c354;color:#ad6a21;animation:pulse-question 1.8s ease-in-out infinite}
@keyframes pulse-question{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
.number-versus{gap:20px}.vs-number{min-width:120px;padding:15px 25px;background:#fff;border:4px solid #acd7ff;border-radius:22px;font-size:61px;font-weight:1000;color:#1c70bf;box-shadow:0 6px #a9d2f5;text-align:center}
.vs-number small{display:block;font-size:17px;color:#536d88;line-height:1.3}.vs-label{font-size:18px;font-weight:1000;color:#6d79a0}
.part-whole{max-width:100%;text-align:center}.part-title{font-size:24px;font-weight:900;color:#335a8e;margin-bottom:10px}.color-counters{display:flex;gap:5px;flex-wrap:wrap;justify-content:center}
.counter{font-size:36px;width:49px;height:49px;display:grid;place-items:center;border-radius:50%;color:#fefefe;text-shadow:0 1px 2px #417eb7}.counter.blue{background:#3988e4}.counter.gold{background:#ffca4b;color:#a96317}
.part-detail{display:flex;justify-content:center;gap:24px;margin-top:12px;font-weight:900;font-size:18px;color:#335a8e}
.groups-scene{gap:18px}.group-picture{flex:1 1 220px;max-width:390px;text-align:center;border:3px solid #d0e5f6;background:#fff;border-radius:20px;padding:16px}
.group-picture strong{display:block;color:#336394;font-size:24px;margin-bottom:9px}.group-picture div{font-size:clamp(30px,3.7vw,42px);line-height:1.45;overflow-wrap:anywhere}
/* Child-friendly tactile response and map emphasis without altering approved original artwork */
.answer-choice:focus-visible,.word-card:focus-visible,.key:focus-visible{outline:5px solid #ffd351;outline-offset:3px}
.answer-choice:not(:disabled):active,.word-card:not(:disabled):active{transform:scale(.975)}
.map-hit.island:hover,.map-hit.island:focus-visible{animation:hotspot-glow 1.8s ease-in-out infinite}
@keyframes hotspot-glow{0%,100%{box-shadow:0 0 0 4px #fff2ad,0 0 26px 7px #ffe390a0}50%{box-shadow:0 0 0 7px #fff2ad,0 0 45px 14px #ffe390ab}}
@media (max-width:760px){.ten-frame{gap:3px;padding:5px}.frame-cell{font-size:20px;border-radius:7px}.count-node{min-width:43px;height:52px}.vs-number{min-width:105px;font-size:46px;padding:12px}.group-picture{flex-basis:135px;padding:10px}.group-picture div{font-size:27px}.part-detail{flex-wrap:wrap;gap:10px}.counter{width:34px;height:34px;font-size:24px}}
@media (prefers-reduced-motion:reduce){.map-hit.island:hover,.map-hit.island:focus-visible,.count-node.mystery{animation:none}}
/* Picture Pairs: generous touch targets for preschoolers */
.memory-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-top:17px}
.memory-card{aspect-ratio:.9;min-height:116px;border:4px solid #d1ddff;background:linear-gradient(155deg,#c0aaff,#718ded);color:#fff;border-radius:23px;display:grid;place-items:center;font-weight:1000;box-shadow:0 6px #667fce;padding:7px;transition:transform .15s,background .15s}
.memory-card.flipped{background:linear-gradient(140deg,#ffffff,#fff4dc);border-color:#ffd16c;box-shadow:0 6px #e4bb5f;color:#335582}
.memory-card.matched{background:#ecffe4;border-color:#6cd18a;box-shadow:0 6px #4dba6d;opacity:1;cursor:default}
.memory-emoji{font-size:clamp(35px,5vw,57px);line-height:1}.memory-back{font-size:clamp(34px,5vw,52px)}.memory-text{font-size:clamp(15px,1.65vw,20px);overflow-wrap:anywhere}
@media (max-width:760px){.memory-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.memory-card{min-height:89px;border-width:3px;border-radius:14px}.memory-text{font-size:14px}.memory-emoji,.memory-back{font-size:34px}}
@media (max-width:390px){.memory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.cloud-panel{margin-top:19px}
/* Make the adventure map feel intentional on taller tablet/desktop viewports. */
.map-shell{display:flex;flex-direction:column;min-height:100vh;background:linear-gradient(180deg,#31a7e9,#58c6ed)}
.map-footer{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:14px 30px;min-height:88px;flex:1;padding:12px 24px;border-top:3px solid #e4fafb;background:linear-gradient(180deg,#84dcee,#a7eff1);color:#185482;font-size:17px;font-weight:1000}
.map-footer button{border:3px solid white;background:linear-gradient(#fff9c8,#ffe093);color:#805223;border-radius:22px;padding:12px 19px;font-weight:1000;box-shadow:0 4px #dab766}
.mobile-island-bar{display:none}
@media (max-width:760px){
 .mobile-island-bar{display:flex;gap:8px;overflow:auto;scrollbar-width:none;padding:8px 11px;background:#fff9dceb;white-space:nowrap;border-bottom:2px solid #e8bd6f;z-index:12}
 .mobile-island-bar::-webkit-scrollbar{display:none}
 .mobile-island-bar button{flex:0 0 auto;background:white;color:#34689b;border:2px solid #c9e0f6;border-radius:16px;padding:8px 11px;font-size:13px;font-weight:1000}
 .map-footer{min-height:88px;padding:12px 15px;text-align:center;gap:7px;font-size:13px}.map-footer button{padding:9px 16px;font-size:13px}
}
/* Portrait tablets also get a direct route to each island without hunting on the wide art. */
@media (min-width:761px) and (max-width:980px){
 .mobile-island-bar{display:flex;gap:8px;overflow:auto;scrollbar-width:none;padding:9px 14px;background:#fff9dceb;white-space:nowrap;border-bottom:2px solid #e8bd6f;z-index:12}
 .mobile-island-bar button{flex:0 0 auto;background:white;color:#34689b;border:2px solid #c9e0f6;border-radius:16px;padding:10px 14px;font-size:14px;font-weight:1000}
}

/* v3: adult-managed private profile and ephemeral guest preview. */
.welcome-world{min-height:100svh;display:grid;place-items:center;padding:28px 16px;position:relative;overflow:hidden;background:#47b9e5}
.welcome-world::before{content:'';position:absolute;inset:0;background:url('./world-map-original.png') center/cover no-repeat;filter:saturate(.95) blur(3px);transform:scale(1.035)}
.welcome-world::after{content:'';position:absolute;inset:0;background:linear-gradient(115deg,#1376ad70,#0b477b88);pointer-events:none}
.welcome-card{z-index:2;position:relative;width:min(100%,820px);text-align:center;padding:clamp(22px,4.5vw,42px);border:6px solid #fff7d5;border-radius:38px;background:linear-gradient(155deg,#fffef8f5,#f5fafff4);box-shadow:0 20px 65px #1137659c;outline:7px solid #8553283b}
.welcome-eyebrow{color:#95601d;font-weight:900;letter-spacing:.3px}
.welcome-mascot{font-size:65px;line-height:1.6;filter:drop-shadow(0 5px 2px #b3cef5)}
.welcome-card h1{font-size:clamp(30px,5vw,54px);line-height:1.08;margin:6px 0 12px;color:#224c8c;text-shadow:2px 3px #d5e9ff}
.welcome-card>p{font-size:17px;color:#496584;font-weight:750}
.welcome-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;margin-top:25px}
.welcome-choice{border:4px solid #fff;border-radius:29px;min-height:184px;box-shadow:0 15px 24px #213d5b22;padding:19px;background:linear-gradient(#e0ffe8,#b4f4c1);color:#275c41;display:flex;flex-direction:column;align-items:center;gap:9px}
.welcome-choice.learner-choice{background:linear-gradient(#fff5d9,#ffe1a3);color:#7c501d;box-shadow:0 15px 24px #213d5b22}
.welcome-choice>span{font-size:49px;line-height:1}.welcome-choice strong{font-size:clamp(19px,2.3vw,25px)}.welcome-choice small{font-size:14px;line-height:1.4;max-width:250px;font-weight:750}
.welcome-choice:focus-visible{outline:5px solid #396cbd;outline-offset:4px}.welcome-choice:hover{transform:translateY(-3px)}
.welcome-extras{display:flex;justify-content:center;align-items:center;gap:18px;flex-wrap:wrap;margin-top:28px}
.guest-guarantee{font-size:13px;font-weight:800;color:#527b7f}.welcome-notice{border:2px solid #ffd27f;background:#fff5d6;padding:11px 17px;border-radius:18px;font-size:14px!important}
.login-illustration{text-align:center;font-size:63px}.dialog label{font-weight:900;color:#365987;display:block;margin:12px 0 7px}.dialog input[type=password]{width:100%;border-radius:17px;border:3px solid #cde0ff;padding:14px;margin-bottom:15px;font-size:19px}
.profile-map-bar{position:absolute;left:61%;top:4.6%;width:37.2%;min-height:7.8%;display:flex;justify-content:space-evenly;align-items:center;gap:8px;z-index:15;box-sizing:border-box;border:4px solid #fff5d6;background:linear-gradient(155deg,#a96d33,#714021);border-radius:48px;box-shadow:0 5px #59381c,0 9px 18px #1638587d;padding:4px 10px;color:#fffdf2;font-size:clamp(12px,1.17vw,18px);font-weight:1000;white-space:nowrap}
.profile-map-bar .profile-mode{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis}.profile-map-bar .live-star-count{background:#fff6d9;border-radius:22px;color:#744d12;padding:6px 9px;font-weight:1000}
.profile-map-bar button{border:2px solid #f4e1ab;border-radius:22px;background:#c6f1ff;color:#135387;font-weight:1000;font-size:clamp(11px,.96vw,16px);padding:8px 10px}
.profile-map-bar button:last-child{background:#fff5e7}
.timer-map{left:43.1%;width:17.4%;padding:4px 7px;gap:5px}.timer-map .timer-art{display:none}
.mission-count{left:29.2%;top:73.3%;width:8%;height:4.6%;z-index:8;border:3px solid #fff9cb;font-size:clamp(10px,.9vw,16px);background:#fffef1}
.map-progress-live{position:absolute;left:87.4%;top:72%;width:12.6%;height:27%;z-index:12;display:flex;flex-direction:column;gap:clamp(2px,.55vw,7px);padding:clamp(8px,1.2vw,17px) clamp(6px,.85vw,13px);background:linear-gradient(145deg,#fffaf0,#ffecc4);border:4px solid #fff4d3;border-radius:22px;box-shadow:inset 0 0 0 2px #be7e39,0 4px 9px #2e160a6b;color:#663d1e;text-align:left;cursor:pointer;font-size:clamp(9px,.97vw,15px)}
.map-progress-title{font-size:clamp(13px,1.2vw,20px);font-weight:1000;line-height:1.25}.map-progress-line{display:flex;justify-content:space-between;gap:4px;line-height:1.1}.map-progress-line strong{color:#3b7653;white-space:nowrap}.map-progress-live>small{margin-top:auto;color:#83542d;font-size:clamp(8px,.8vw,12px)}
.map-stickers-live{position:absolute;left:73.0%;top:72.0%;width:13.7%;height:6.4%;z-index:11;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:4px 9px;border-radius:18px;background:linear-gradient(165deg,#fff5cf,#fff9e9);border:3px solid #e9c18f;color:#714e20;cursor:pointer;font-size:clamp(10px,.9vw,14px)}
.map-stickers-live strong{color:#2375b1}.map-stickers-live small{display:none}
.mobile-profile{font-weight:1000;color:#714b20;white-space:nowrap;background:#fff7df;border:2px solid #eccc89;border-radius:11px;padding:7px}
.header-mode{background:#fffae5;border:2px solid #cda56e;border-radius:17px;padding:9px;color:#744d28;display:flex;gap:11px;font-weight:950;align-items:center;white-space:nowrap}
.header-mode span{background:white;border-radius:11px;padding:2px 7px}
.week-graph{display:flex;justify-content:space-around;align-items:end;min-height:175px;gap:7px;background:linear-gradient(#fffef9,#f2faff);border:2px solid #dfecf9;border-radius:20px;padding:15px}
.week-day{display:flex;flex-direction:column;align-items:center;justify-content:end;gap:7px;min-width:32px;flex:1;font-weight:900;color:#467398}
.week-day strong{font-size:16px}.week-day small{font-size:11px;color:#6981a0}.week-bar{max-width:45px;width:100%;border-radius:10px 10px 3px 3px;background:linear-gradient(#8ce093,#34bfa6)}
.skill-report{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.skill-progress-card{text-align:left;background:#fffaf0;border:2px solid #efdcb8;padding:15px;border-radius:19px;color:#37557b}.skill-head{display:flex;justify-content:space-between;flex-wrap:wrap;gap:5px;margin-bottom:8px}.skill-head>strong{font-size:15px}.skill-head>span{font-size:13px}.skill-progress-card small{color:#6e7b8b}
.sticker{cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.sticker small{font-weight:850;color:#6c5732;font-size:12px}.sticker.locked{filter:grayscale(1);opacity:.47}.sticker.locked:hover{opacity:.85}.sticker:focus-visible{outline:5px solid #50aae8}
.life-hearts{font-size:23px;display:flex;align-items:center;gap:1px;margin:12px 0}.life-hearts small{font-size:14px;color:#6f859a;margin-left:12px;font-weight:850}
.confetti-field{pointer-events:none;z-index:1000;position:fixed;inset:0;overflow:hidden}.confetti-field i{position:absolute;top:-30px;left:var(--x);width:12px;height:22px;background:hsl(var(--hue),90%,62%);border-radius:2px;animation:confetti-fall 2s var(--delay) ease-in forwards}
@keyframes confetti-fall{from{opacity:0;transform:translateY(-20px) rotate(0)}10%{opacity:1}to{opacity:0;transform:translateY(110vh) rotate(var(--spin))}}
@media (max-width:980px){.profile-map-bar{left:60%;width:39%;gap:3px}.profile-map-bar button{padding:4px 5px}.profile-map-bar .profile-mode{max-width:110px}.timer-map{left:44%;width:15.5%}.timer-map .timer-label{display:none}.timer-map .round-btn{height:31px;width:31px}}
@media (max-width:760px){.welcome-choices{grid-template-columns:1fr}.welcome-choice{min-height:118px;flex-direction:row;text-align:left}.welcome-choice>span{font-size:39px}.welcome-choice strong{font-size:20px}.welcome-choice small{font-size:13px}.profile-map-bar{left:59%;width:40%;top:5%;gap:4px}.profile-map-bar .profile-mode{max-width:100px}.map-progress-live{font-size:11px}.map-progress-title{font-size:15px}.skill-report{grid-template-columns:1fr}.header-mode{font-size:13px;padding:7px}.welcome-card{padding:22px}}
@media(prefers-reduced-motion:reduce){.confetti-field i{animation:none;display:none}}
.map-stickers-live{height:27%;padding:8px 7px 12px;display:flex;flex-direction:column;justify-content:stretch;background:linear-gradient(155deg,#fff7d8,#ffeed1);gap:10px}
.map-stickers-header{width:100%;border:0;background:#fffcf2;border-radius:12px;padding:5px;color:#704822;display:flex;justify-content:space-between;align-items:center;gap:4px;cursor:pointer}
.map-stickers-header strong{font-size:clamp(10px,.92vw,16px);white-space:nowrap}.map-stickers-header small{font-size:clamp(8px,.67vw,11px);color:#246daa;white-space:nowrap;display:block}
.map-mini-stickers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:100%;flex:1;min-height:0}
.map-mini-sticker{background:#fffefd;border:1px solid #e8dbba;border-radius:10px;display:grid;place-items:center;min-width:0;font-size:clamp(18px,2vw,31px);box-shadow:none;cursor:pointer}
.map-mini-sticker.locked{filter:grayscale(1);opacity:.38}
.map-quest-ticks{position:absolute;inset:0;pointer-events:none;z-index:7}
.map-quest-ticks span{position:absolute;top:92.3%;width:2.4%;height:3%;border-radius:50%;background:#fff5db;border:2px solid #ead198;color:#a58d65;display:grid;place-items:center;transform:translateX(-50%);font-size:clamp(13px,1.35vw,22px);font-weight:900;line-height:1}
.map-quest-ticks span:has(+ span){/* Keep original artwork visible around the dynamic checks. */}
@media(max-width:760px){.map-mini-sticker{font-size:21px}.map-stickers-live{gap:3px;padding:6px 5px}.map-mini-stickers{gap:2px}}

/* The four reaction monkeys are cropped from the approved game-map illustration.
   No new stock images or third-party characters. */
.reaction-portrait{width:158px;height:207px;margin:14px auto;border:4px solid #fff7da;
 border-radius:18px;box-shadow:0 8px 22px #26567b4f;
 background-image:url('./world-map-original.png');background-repeat:no-repeat;
 background-size:1672px 941px;background-color:#d4ebff}
.reaction-portrait.correct{background-position:-623px -715px}
.reaction-portrait.one{background-position:-794px -715px}
.reaction-portrait.two{background-position:-940px -715px}
.reaction-portrait.angel{background-position:-1074px -715px}
.reaction-inline{margin-top:15px;display:flex;align-items:center;gap:16px;padding:9px 18px;
 border:3px solid #ffe3a1;border-radius:22px;background:linear-gradient(100deg,#fff8d8,#e9fbff)}
.reaction-inline .reaction-portrait{flex:0 0 158px;margin:3px 0}
.reaction-inline strong{color:#265c8e;font-size:21px}
.reaction-inline p{color:#58708c;font-weight:750;line-height:1.5}
.dialog .reaction-portrait{margin:12px auto;max-width:100%}
@media (max-width:520px){.reaction-inline{flex-direction:column;text-align:center}
 .reaction-inline .reaction-portrait{flex:auto}}

/* v3 finishing: keep the map footer inside the illustrated park palette. */
.map-footer{flex:0 0 auto;min-height:72px;gap:12px 22px;padding:12px 20px;background:linear-gradient(160deg,#fff6cc,#e9f7db);border-top:5px solid #9b6d3a;color:#704e24;box-shadow:inset 0 4px 0 #f6d98d;font-size:clamp(12px,1.2vw,16px)}
.map-footer>span[data-sync-status]{font-weight:850;color:#216b61}
.map-footer button{background:linear-gradient(#92ee92,#42c364);color:#145829;border:3px solid #fbffd8;box-shadow:0 4px #279451}
@media(max-width:760px){.map-footer{min-height:62px;padding:10px;font-size:12px;gap:6px}}
/* Martin's Learning World v4 — game-map continuity, gentle live environments.
   User-approved world-map-original.png stays byte-for-byte unchanged. */
:root{--forest:#28745d;--camp:#b86d2d;--parchment:#fff8dd;--sunshine:#ffde65;--deep-wood:#60351d}
.map-shell{background:linear-gradient(180deg,#50bde9,#167db9 80%,#317f4c)}
.map-stage{isolation:isolate}
/* Geometry-aware illustrated locations: inline clip-path on each full-zone hit target. */
.map-hit.island{border-radius:0;filter:drop-shadow(0 0 4px #ffe24a00);transition:background .2s,filter .2s,transform .15s}
.map-hit.island:hover,.map-hit.island:focus-visible{background:rgba(254,222,80,.25);box-shadow:none;filter:drop-shadow(0 0 8px #fff39a);outline:none}
.map-hit.island:active{background:rgba(248,205,44,.46);transform:scale(.98)}
.map-hit.island.locked-map-zone:hover,.map-hit.island.locked-map-zone:focus-visible{background:rgba(35,49,69,.25);filter:drop-shadow(0 0 8px #e2ebff)}
.map-hit.bottom-hit[data-action=feedback-demo]{border-radius:8%;transition:background .2s,box-shadow .2s,transform .2s;z-index:10}
.map-hit.bottom-hit[data-action=feedback-demo]:hover,.map-hit.bottom-hit[data-action=feedback-demo]:focus-visible{background:rgba(255,238,110,.19);box-shadow:inset 0 0 0 5px #ffdc63,0 0 16px #ffda66ab;transform:translateY(-3px)}
.world-map-hud{position:absolute;z-index:22;top:3.4%;left:54.7%;width:44.7%;height:10.3%;display:flex;align-items:center;justify-content:space-around;gap:6px;padding:8px 11px 8px 12px;color:#fff4df;font-weight:1000;white-space:nowrap;border:5px solid #ffe5a4;border-radius:48px;background:linear-gradient(160deg,#a96b38 0%,#85502a 55%,#603a1d 100%);box-shadow:0 12px 25px #122f3d69,inset 0 2px 0 #d99c50;font-size:clamp(12px,1.1vw,19px)}
.world-map-hud::after{content:'🌿';position:absolute;right:0;top:-24px;font-size:27px;pointer-events:none}
.hud-avatar{background:#ffecad;border:3px solid #fff;color:#794522;width:clamp(37px,3.5vw,56px);height:clamp(37px,3.5vw,56px);border-radius:50%;display:grid;place-items:center;font-size:24px;flex:0 0 auto}
.hud-stars{color:#7c4b0d;background:#fff8d9;border:2px solid #f6cf74;border-radius:22px;padding:8px 11px;font-size:clamp(14px,1.3vw,22px)}
.hud-divider{height:60%;width:2px;background:#e6aa70a1}
.world-map-hud button{min-height:38px;padding:7px 9px;border:2px solid #fff1c2;border-radius:22px;background:linear-gradient(#f9fdfa,#d8f6ff);color:#194b87;font-weight:1000;font-size:clamp(12px,.96vw,17px);box-shadow:0 3px #466e8c;white-space:nowrap}
.world-map-hud button:hover,.world-map-hud button:focus-visible{background:#fff4aa}
.world-map-hud .hud-timer{background:#fff4af;color:#1c4d72;font-size:clamp(13px,1.13vw,19px)}
.world-map-hud .help-control{background:linear-gradient(#ffe2a9,#ffa951);color:#6a3d16}
.world-map-hud .exit-control{min-width:40px}
/* Hide previous overlapping controls entirely; v4 has one joined wood HUD. */
.timer-map,.profile-map-bar{display:none!important}
/* Interactive map: water sparkles, drifting clouds, bird flight, little boat. */
.map-life-layer{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none;isolation:isolate}
.floating-bird,.floating-boat,.ripple-lines,.shimmer-dots{position:absolute;display:block;will-change:transform}
.floating-bird{font-size:clamp(22px,2.8vw,47px);filter:drop-shadow(0 4px 3px #3b53744d)}
.bird-a{left:11%;top:22%;animation:flyAcross 21s linear infinite}
.bird-b{left:74%;top:14%;animation:flyAcrossOther 27s linear infinite}
.floating-boat{left:49%;top:61%;font-size:clamp(26px,3.2vw,50px);animation:sailAcross 23s ease-in-out infinite;filter:drop-shadow(0 6px 3px #2b7d9388)}
.ripple-lines{border:2px solid #ffffff64;border-radius:50%;height:19px;width:48px;opacity:.75;animation:waterPulse 4s ease-in-out infinite}
.ripples-a{left:46%;top:67%}.ripples-b{left:73%;top:66%;animation-delay:2s}
.shimmer-dots{left:48%;top:71%;font-size:22px;color:#ecfcff;animation:twinkle 5s ease-in-out infinite}
.map-life-layer.motion-paused *{animation-play-state:paused!important}
@keyframes sailAcross{0%,100%{transform:translate(-75px,10px) rotate(-5deg)}50%{transform:translate(95px,-23px) rotate(4deg)}}
@keyframes flyAcross{0%,100%{transform:translate(-25px,12px)}50%{transform:translate(240px,-70px)}}
@keyframes flyAcrossOther{0%,100%{transform:translate(140px,25px) scaleX(-1)}50%{transform:translate(-230px,-35px) scaleX(-1)}}
@keyframes waterPulse{0%,100%{transform:scale(.6);opacity:.12}50%{transform:scale(2.5);opacity:.65}}
@keyframes twinkle{0%,100%{opacity:.1;transform:translateY(3px)}50%{opacity:.9;transform:translateY(-8px)}}
.map-lock-marker{position:absolute;z-index:8;pointer-events:none;transform:translate(-50%,-50%);background:linear-gradient(#edf8ff,#b9d6ef);width:clamp(33px,3.8vw,61px);height:clamp(33px,3.8vw,61px);border:4px solid #fff4cc;border-radius:50%;display:grid;place-items:center;box-shadow:0 6px 15px #102b5477;font-size:clamp(18px,2vw,31px);filter:drop-shadow(0 3px 5px #2224)}
.map-lock-badge{position:absolute;z-index:8;pointer-events:none;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:2px}
.map-lock-badge .map-lock-marker{position:static;transform:none}
.map-lock-text{font-size:clamp(8px,1vw,12px);font-weight:1000;color:#fff;background:#d95f2b;border:2px solid #fff;border-radius:10px;padding:1px 7px;white-space:nowrap;box-shadow:none;line-height:1.3}

.quest-status-layer{position:absolute;inset:0;z-index:11;pointer-events:none}
.quest-status{position:absolute;top:91.8%;transform:translateX(-50%);height:3.5%;width:2.15%;font-size:clamp(11px,1.2vw,18px);font-weight:1000;display:grid;place-items:center;color:#3d7637;background:#fff9e6;border:2px solid #b38e57;border-radius:50%;line-height:1}
.quest-status.q-math{left:6.45%}.quest-status.q-english{left:13.55%}
.quest-coming{position:absolute;top:82%;transform:translateX(-50%);font-size:clamp(24px,2.7vw,40px);display:grid;place-items:center;width:6.4%;height:12%;border:3px solid #f2e8d2;border-radius:18px;background:#455066b8;box-shadow:0 5px 14px #0005;filter:drop-shadow(0 2px 3px #fff)}
.mission-count{left:45.8%;top:74.9%;width:11.5%;height:3.8%;background:#fff8da;border:2px solid #f3d4a0;font-size:clamp(10px,.97vw,16px);z-index:11;white-space:nowrap}
.map-hit[data-action=quest]:hover{border-radius:12px}
.map-progress-live{z-index:12}
.map-stickers-live{z-index:12}
.mobile-island-bar .locked-nav{background:#d5dce3!important;border-color:#adb9c8!important;color:#5b6672!important}
.mobile-ribbon button{border:2px solid #f2dba3!important;background:#fff8d7!important;color:#6b4a2b!important}
/* The lesson IS a location on the map, not a generic worksheet. Each zone owns a palette and illustrated backdrop. */
.world-page{background:#98daf8;isolation:isolate}
.world-page.zone-math{--zone-accent:#c76a27;--zone-bright:#ffcc50;--zone-soft:#fff1b8;--zone-wood:#80411d;--zone-outline:#e9aa52;background:#aeea8d}
.world-page.zone-english{--zone-accent:#197b65;--zone-bright:#64dbaa;--zone-soft:#d6f9da;--zone-wood:#365e36;--zone-outline:#77bc83;background:#a9e9cb}
.world-page.zone-math::before,.world-page.zone-english::before{content:'';position:fixed;inset:0;z-index:0;opacity:1;transform:none;filter:none;background-repeat:no-repeat;background-size:cover;background-position:center 25%;pointer-events:none}
.world-page.zone-math::before{background-image:url('./scenes/math-camp.svg')}
.world-page.zone-english::before{background-image:url('./scenes/english-woods.svg')}
.world-page.zone-math::after,.world-page.zone-english::after{content:'';position:fixed;inset:0;z-index:0;pointer-events:none;backdrop-filter:blur(3px);opacity:1}
.world-page.zone-math::after{background:linear-gradient(135deg,#f4f0be9c,#a3e5c388 50%,#d7f1fd88)}
.world-page.zone-english::after{background:linear-gradient(130deg,#a4edd18a,#d4fad19c 50%,#82d1e69c)}
.world-inner{z-index:3;max-width:1300px;padding-top:15px}
.world-page .game-header{border:4px solid #fff3c5;background:linear-gradient(110deg,#fff0cbef,#f7f8ddef);box-shadow:0 8px 25px #324b3a55;backdrop-filter:blur(8px);border-radius:24px;gap:9px}
.world-page .game-header h1{color:var(--zone-wood,#36607a);text-shadow:1px 2px 0 #fff5be}
.world-page .game-header .header-mode{background:#fff9df;border:2px solid #ddbd78;border-radius:18px;padding:10px;color:#794e25;font-weight:900}
.world-page .top-timer{border-color:#dfb568;background:linear-gradient(#fff9e4,#ffeab3)}
.world-page .card{position:relative;background:linear-gradient(167deg,#fffdf2f5,#fff5d6f7);border:5px solid #fff0bd;border-radius:28px;box-shadow:0 5px 0 var(--zone-wood,#827249),0 16px 38px #3c523d55,inset 0 0 0 2px #cfa979;backdrop-filter:blur(5px)}
.world-page.zone-english .card{background:linear-gradient(155deg,#f7fff3f5,#e5ffe8f5);border-color:#e5ffcd;box-shadow:0 17px 38px #27594850,inset 0 0 0 2px #7dbe85}
.world-page .learning-layout{grid-template-columns:minmax(0,1.7fr) minmax(250px,.82fr)}
.world-page .hero-strip{position:relative;overflow:hidden;background:linear-gradient(108deg,#a46b34,#c88f45 46%,#7d4b25);border:5px solid #ffe5a1;box-shadow:0 15px 28px #4d39185b;min-height:111px;border-radius:30px}
.world-page .hero-strip::after{content:'🍃🌼';position:absolute;right:20px;bottom:-2px;font-size:29px;opacity:.8}
.world-page.zone-english .hero-strip{background:linear-gradient(110deg,#276844,#4a9f59,#205b55);border-color:#edffb0;box-shadow:0 14px 28px #194f3666}
.world-page .hero-strip h2{text-shadow:0 3px 5px #36211670}
.world-page .hero-strip .hero-emoji{font-size:65px;animation:decorBob 4s ease-in-out infinite}
.world-page .section-title{color:var(--zone-wood,#496071)}
.world-page .math-question{color:#51391d;text-shadow:0 2px 0 #fffce4;font-size:clamp(25px,3vw,39px)}
.world-page.zone-english .math-question{color:#194e37}
.world-page .scene{background:linear-gradient(165deg,#f5fff1d4,#d9f4d3dc);border:4px dashed #99c78f;border-radius:26px;min-height:190px}
.world-page.zone-math .scene{background:linear-gradient(150deg,#fdf2cacc,#c7e9d2e8);border-color:#d1b55f}
.world-page .answer-choice{border:4px solid #f4d18a;background:linear-gradient(155deg,#fffef6,#fff0b8);color:#5e401d;border-radius:24px;box-shadow:inset 0 2px 0 white;min-height:116px;font-size:clamp(20px,2.15vw,29px)}
.world-page .answer-choice:nth-child(2){background:linear-gradient(#f6fff9,#d0f8ec);border-color:#9bd0af;box-shadow:none}
.world-page .answer-choice:nth-child(3){background:linear-gradient(#fff1fa,#fce0fa);border-color:#eeb2dd;box-shadow:none}
.world-page .answer-choice:nth-child(4){background:linear-gradient(#f2f7ff,#dbe9ff);border-color:#a3c5f2;box-shadow:none}
.world-page .answer-choice:hover{transform:translateY(-4px) rotate(-1deg);border-color:#ffe15e;filter:brightness(1.03)}
.world-page .answer-choice.selected-correct{background:#d7ffc8!important;border-color:#3cac69!important;box-shadow:none!important}
.world-page .answer-choice.selected-wrong{background:#ffe5dc!important;border-color:#f18f7d!important}
.world-page .answer-choice .opt-emoji{font-size:clamp(37px,4.6vw,68px)}
.world-page .feedback{border:3px solid #f7c46a;background:#fffae5;color:#6a481c}
.world-page .feedback.success{background:#eaffdd;border-color:#79c76f;color:#2b7437}
.world-page .feedback.retry{background:#fff3d9;border-color:#f5ad73;color:#925121}
.world-page .pill{border:3px solid #dcb97a;background:linear-gradient(#fffce9,#fbe8b8);color:#744b23;box-shadow:0 2px #ae8854}
.world-page .pill.active{background:var(--zone-accent,#2a8ef0);border-color:#fff5cb;color:#fff;box-shadow:0 2px var(--zone-wood,#256cc4)}
.world-page .btn.blue{background:linear-gradient(#57c9fd,#1f87d0)}
.world-page .btn.white{background:#fffbef;border-color:#e6bd83}
.world-page .progress-fill{background:linear-gradient(90deg,#82d970,var(--zone-bright,#44bccd))}
.life-hearts,.forest-task-chances{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.forest-task-chances{background:#ebfff0;border:3px solid #b3df91;border-radius:24px;padding:8px 12px;margin:14px 0;color:#397343;font-size:22px;font-weight:1000}
.forest-task-chances>span{font-size:29px;margin-right:7px}
.forest-task-chances small{font-size:14px;color:#39704a;margin-left:9px}
/* Living scenery — independent of lesson content; all motion is optional for reduced motion. */
.adventure-environment{position:fixed;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.adventure-environment>div{position:absolute;will-change:transform;filter:drop-shadow(0 7px 7px #204a3c38)}
.environment-cloud{font-size:86px;opacity:.78;animation:cloudDrift 24s ease-in-out infinite alternate}
.cloud-one{left:-7%;top:10%}.cloud-two{right:-5%;top:28%;animation-duration:31s;animation-direction:alternate-reverse}
.environment-bird{right:9%;top:19%;font-size:46px;animation:flyBird 17s linear infinite}
.environment-pet{bottom:3%;left:8%;font-size:70px;animation:puppyRun 18s ease-in-out infinite;transform-origin:center bottom}
.environment-leaves{right:5%;top:50%;font-size:38px;animation:leafDance 9s ease-in-out infinite}
.environment-pond{left:17%;bottom:7%;color:#dcfcff;letter-spacing:20px;font-size:45px;opacity:.9;animation:waterPulse 6s ease-in-out infinite}
.zone-english .environment-pet{bottom:13%;animation:butterflyPath 14s ease-in-out infinite;font-size:49px}
.zone-english .environment-bird{font-size:44px;right:5%;top:12%;animation:decorBob 6s ease-in-out infinite}
@keyframes cloudDrift{from{transform:translateX(0)}to{transform:translateX(240px)}}
@keyframes flyBird{0%,100%{transform:translateX(30px) translateY(15px)}50%{transform:translate(-160px,-45px)}}
@keyframes puppyRun{0%,100%{transform:translateX(0) scaleX(1) translateY(0)}28%{transform:translate(140px,-6px) rotate(-6deg)}49%{transform:translate(270px,0) scaleX(1)}52%{transform:translate(270px,0) scaleX(-1)}78%{transform:translate(140px,-4px) scaleX(-1)}}
@keyframes butterflyPath{0%,100%{transform:translate(0,0) rotate(-8deg)}50%{transform:translate(180px,-120px) rotate(9deg)}}
@keyframes leafDance{0%,100%{transform:rotate(-12deg) translateY(5px)}50%{transform:rotate(9deg) translateY(-32px)}}
@keyframes decorBob{0%,100%{transform:translateY(2px)}50%{transform:translateY(-8px)}}
/* Word Woods: a clickable forest path where every card is a real lesson template. */
.forest-quest-head{display:flex;gap:20px;align-items:center;padding:12px 16px 26px}
.forest-pet{font-size:clamp(65px,9vw,115px);filter:drop-shadow(0 8px 5px #45795044);animation:decorBob 4s ease-in-out infinite}
.forest-mini-label{font-size:12px;letter-spacing:2px;color:#558e4a;font-weight:1000}
.forest-quest-head h2{font-size:clamp(24px,3vw,37px);color:#225d3c;margin:4px 0}
.forest-quest-head p{font-size:17px;color:#467058;font-weight:800;max-width:600px}
.trail-progress{display:inline-block;background:#fff5ba;border:2px solid #dbbe70;border-radius:22px;padding:8px 14px;font-size:15px;font-weight:900;color:#6a5123}
.english-trail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.english-trail{display:grid;grid-template-columns:60px 1fr auto;align-items:center;grid-template-rows:auto auto;text-align:left;gap:3px 13px;min-height:111px;border:4px solid #bcdd9e;background:linear-gradient(160deg,#f5ffd5,#d3f1c3);color:#356540;border-radius:25px;padding:15px 16px;box-shadow:none;transition:transform .18s}
.english-trail:hover,.english-trail:focus-visible{transform:translateY(-4px);filter:saturate(1.2)}
.english-trail .trail-icon{grid-row:1/3;font-size:47px;display:grid;place-items:center}
.english-trail strong{font-size:20px}.english-trail small{font-size:13px;font-weight:750;color:#537a5b;line-height:1.3}
.english-trail .trail-play{grid-column:3;grid-row:1/3;padding:7px 9px;border-radius:16px;background:#2da879;color:white;font-size:13px;font-weight:1000}
.english-trail.trail-1{background:linear-gradient(#fff7d9,#ffe5a3);border-color:#e6c276;box-shadow:none}
.english-trail.trail-2{background:linear-gradient(#ebf8ff,#c7e9ff);border-color:#92c6ec;box-shadow:none}
.english-trail.trail-3{background:linear-gradient(#fff3fd,#f6d7f8);border-color:#deb4e9;box-shadow:none}
.forest-task .math-question{margin-top:19px;text-align:center}
.forest-task .scene{font-size:62px}
.forest-task .scene>span{filter:drop-shadow(0 7px 5px #4a815077)}
.english-answers .answer-choice{font-size:clamp(30px,3.3vw,44px);min-height:120px}
/* Help: tiny narrated illustrated instructions. */
.help-story{display:grid;gap:9px;margin-top:12px}
.help-hero{text-align:center;font-size:64px;padding:10px}
.help-step{display:flex;align-items:center;gap:14px;border:2px solid #f1d79e;background:#fff8e5;border-radius:16px;padding:10px 14px;color:#705129;font-size:15px;line-height:1.4}
.help-step span{font-size:30px}
/* Happy whimsical celebration, no frightening failure effect or punitive loss of earned stars. */
.reaction-inline{background:linear-gradient(105deg,#fff2be,#dbffcc);box-shadow:none;border-color:#fce49b}
.confetti-field{pointer-events:none}
.world-page .reward-hero{animation:decorBob 3s ease-in-out infinite}
/* Keep locked-sticker artwork visible enough to entice, not grey dust. */
.map-mini-sticker.locked{filter:grayscale(.4);opacity:.6}
.sticker.locked{filter:grayscale(.5);opacity:.5}
/* Phone and tablet — tap-friendly and no horizontal overflow in lessons. */
@media(max-width:1200px){.world-map-hud{gap:3px;padding:5px 7px}.world-map-hud .hud-control span{display:none}.world-map-hud button{min-width:39px;padding:6px}.world-map-hud .hud-divider{display:none}.world-map-hud{left:56%;width:43%}}
@media(max-width:980px){.world-page .learning-layout{grid-template-columns:1fr}.world-inner{max-width:740px}.world-map-hud{top:4%;height:10%}.world-page .hero-strip{min-height:88px}}
@media(max-width:760px){
 .world-map-hud{display:none}.mobile-ribbon{background:linear-gradient(#fff5d7,#ffe3ac);border-bottom:4px solid #af7640;gap:6px}
 .mobile-ribbon button{padding:7px;font-size:12px}
 .map-scroller{touch-action:pan-x pan-y}.map-stage{min-height:665px}
 .world-inner{padding:11px 11px 45px}
 .world-page .game-header{top:4px;border-width:3px;padding:7px}
 .world-page .game-header .title-block{flex-basis:100%;order:3;margin-top:1px}
 .world-page .game-header h1{font-size:25px}
 .world-page .game-header p{font-size:13px}
 .world-page .card{padding:15px;border-width:4px}
 .world-page .hero-strip{padding:9px 13px;min-height:83px;border-width:4px}
 .world-page .hero-strip .hero-emoji{font-size:42px}
 .world-page .hero-strip h2{font-size:24px}
 .world-page .hero-strip p{font-size:12px}
 .environment-cloud{font-size:45px;opacity:.45}
 .environment-pet{font-size:50px;bottom:1%;left:3%}
 .environment-bird{font-size:31px}
 .forest-quest-head{align-items:flex-start;padding:7px 0 20px;gap:10px}
 .forest-pet{font-size:60px}
 .forest-quest-head p{font-size:14px}
 .english-trail-grid{grid-template-columns:1fr;gap:11px}
 .english-trail{min-height:100px;grid-template-columns:48px 1fr auto;padding:10px}
 .english-trail .trail-icon{font-size:37px}
 .english-trail strong{font-size:18px}
 .world-page .answer-choice{min-height:102px;font-size:23px;padding:8px}
 .world-page .scene{min-height:130px;padding:8px}
 .world-page .game-header .header-mode{padding:7px;font-size:12px}
 .world-page .top-timer{padding:7px}
 .world-page .top-timer strong{font-size:19px}
}
@media(max-width:390px){.mobile-ribbon strong{font-size:12px}.mobile-clock{font-size:12px}.world-page .game-header{gap:4px}.world-page .game-header .btn{padding:8px;font-size:12px}.english-trail{grid-template-columns:43px 1fr auto}.english-trail .trail-play{font-size:11px}}
@media(prefers-reduced-motion:reduce){.map-life-layer *,.adventure-environment *,.forest-pet,.world-page .hero-strip .hero-emoji,.world-page .reward-hero{animation:none!important}.map-hit,.english-trail,.answer-choice{transition:none!important}}
/* Three landscapes per subject. Background changes as questions advance. */
.zone-math.scene-theme-1::before{background-image:url('./scenes/math-river.svg');background-position:center 65%}
.zone-math.scene-theme-2::before{background-image:url('./scenes/math-meadow.svg');background-position:center 30%}
.zone-english.scene-theme-1::before{background-image:url('./scenes/english-bridge.svg');background-position:center 70%}
.zone-english.scene-theme-2::before{background-image:url('./scenes/english-canopy.svg');background-position:center 25%}
.mini-scene-illustration{margin:12px 0 18px;text-align:center;font-size:clamp(45px,6vw,68px);padding:20px;border:4px dashed #aedc87;border-radius:23px;background:linear-gradient(145deg,#f8ffe2d9,#e0f7dbad)}
/* Final visual audit fixes */
.mission-count{left:30.9%;top:74.5%;width:6.9%;height:4%;font-size:clamp(10px,.85vw,13px);border-radius:16px}
.water-current{position:absolute;left:42.2%;top:64.6%;width:42%;height:5%;border-radius:50%;background:repeating-linear-gradient(105deg,transparent 0 19px,#d6fcff7d 25px 39px,transparent 48px 62px);mix-blend-mode:screen;filter:blur(5px);opacity:.65;transform:rotate(-4deg);animation:riverFlow 7s linear infinite}
@keyframes riverFlow{from{background-position:0 0;opacity:.36}50%{opacity:.6}to{background-position:270px 0;opacity:.36}}
.world-page.motion-paused .adventure-environment *{animation-play-state:paused!important}

/* v4 final visual QA: align quest markers to baked circles; keep status within quest board. */
.quest-status{top:88.4%!important}
.mission-count{left:29.7%!important;top:74.6%!important;width:6.9%!important;height:3.6%!important;white-space:nowrap!important;font-size:clamp(11px,.97vw,16px)!important}
.world-page.zone-math::after{background:linear-gradient(135deg,#fff9d539,#d5f6d33a 50%,#b7eafc28)!important;backdrop-filter:blur(1.2px)!important}
.world-page.zone-english::after{background:linear-gradient(125deg,#f3ffdc33,#d7fce93a 50%,#a7e2dc31)!important;backdrop-filter:blur(1.2px)!important}

/* Final quest alignment and bright overlay title replace baked labels without editing the art. */
.quest-status{top:90.1%!important;width:2.3%!important;height:3.7%!important;background:#fffaf0;border:2px solid #ba985b;box-shadow:0 0 0 3px #fff2cebf}
.monkey-zone-label{position:absolute;z-index:14;top:70.8%;left:45.2%;width:17.0%;height:4.4%;display:flex;align-items:center;justify-content:center;pointer-events:none;white-space:nowrap;border:3px solid #9a5b2e;border-radius:18px;background:linear-gradient(160deg,#ce8c43,#9a532c 65%,#6f3a22);color:#fff5dd;text-shadow:0 2px 1px #51230f;box-shadow:inset 0 2px 2px #ffe1a077,0 3px 5px #44291877;font-weight:1000;font-size:clamp(10px,1.15vw,18px)}
/* Martin v5 — approved master design as product-wide art direction. */
:root{--v5-ink:#112752;--v5-wood:#8c4925;--v5-light:#fffbee;--v5-lime:#58d66f}
.v5-game,.v5-forest-hub,.v5-interior{min-height:100dvh;position:relative;isolation:isolate;background:#57b8e8;font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif}
.v5-game{display:grid;place-items:start center;overflow:hidden}
.v5-gameboard{position:relative;isolation:isolate;width:min(100%,1672px);aspect-ratio:1672/941;min-height:660px;background-image:url('./v5/math-board-blank.webp');background-size:cover;background-position:center;box-shadow:0 25px 65px #15467b85;overflow:hidden}
.v5-english-board{background-image:url('./v5/english-board-blank.webp')}
.v5-game button,.v5-forest-hub button,.v5-interior button{touch-action:manipulation}
.v5-level-badge{white-space:nowrap;font-weight:1000;font-size:clamp(11px,1.3vw,17px);color:#7a4a12;background:#ffe9b8;border:2px solid #f5cf7a;border-radius:20px;padding:2px 10px;}.v5-progress-hud{position:absolute;z-index:8;left:42.7%;top:6.1%;width:32.1%;height:8.1%;border-radius:90px;background:#fff8e6;border:2px solid #f5e4bb;box-shadow:0 4px 14px #604a2655;display:flex;align-items:center;gap:12px;padding:7px 12px;color:#152b60}
.v5-progress-hud>span{font-size:clamp(19px,2.4vw,38px);filter:drop-shadow(0 2px #ca772e)}
.v5-progress-hud strong{font-size:clamp(17px,2.25vw,35px);font-weight:1000;white-space:nowrap;min-width:70px;text-align:center}
.v5-level-track{height:32%;flex:1;border-radius:25px;background:#e8d7b9;border:2px solid #efc796;overflow:hidden;box-shadow:inset 0 2px 5px #bb967e}
.v5-level-track>span{height:100%;display:block;background:linear-gradient(90deg,#26d1a6,#29c36d,#a1eb55);border-radius:25px;transition:width .25s}
.v5-scene-tools{position:absolute;z-index:10;right:2.8%;top:4.8%;display:flex;gap:24px;align-items:center;flex-wrap:nowrap}
.v5-scene-tools button{flex-shrink:0;height:clamp(40px,5vw,64px);width:clamp(40px,5vw,64px);border-radius:50%;background:linear-gradient(160deg,#fff,#f1f7ff);color:#0780e3;font-size:clamp(22px,3.2vw,47px);border:4px solid #fff9e5;box-shadow:0 12px 21px #25456543;font-weight:1000;display:grid;place-items:center}
.v5-scene-tools button:hover{transform:scale(1.05);filter:brightness(1.04)}
.v5-lesson-question{position:absolute;z-index:6;left:32.8%;top:24.5%;width:41.5%;height:24.6%;background:linear-gradient(145deg,#fffdf1,#fff6dd);border:3px solid #e5b96c;border-radius:34px;box-shadow:0 8px 24px #6d502547,inset 0 2px #fff;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:14px 20px;overflow:hidden;text-align:center}
.v5-lesson-question h2{margin:0;color:var(--v5-ink);font-size:clamp(18px,2.6vw,39px);line-height:1.18;font-weight:1000;max-width:100%;text-wrap:balance;text-shadow:0 1px #fff}
.v5-question-diagram{width:100%;max-height:52%;margin-top:3px;display:flex;justify-content:center;align-items:center;overflow:hidden}
.v5-question-diagram .scene{background:transparent;border:0;box-shadow:none;min-height:0;max-height:100%;margin:0;padding:0;font-size:20px;line-height:1.1;gap:4px}
.v5-question-diagram .scene .math-emojis{font-size:clamp(18px,2.1vw,30px);line-height:1.1;letter-spacing:0}
.v5-question-diagram .scene .objects{font-size:clamp(17px,2.1vw,29px)}
.v5-question-diagram .scene .scene-group{background:#fff6dbab;border:1px solid #f6deab;padding:3px;font-size:14px}
.v5-question-diagram .ten-frame{max-width:240px;padding:2px;border-width:2px;gap:1px}.v5-question-diagram .frame-cell{font-size:17px;border-width:1px;min-height:14px}
.v5-question-diagram .count-node{height:35px;min-width:27px;font-size:18px;border-width:1px}.v5-question-diagram .counting-line{gap:3px}
.v5-question-diagram .math-svg{width:80px;height:75px}.v5-question-diagram .scene-pos{transform:scale(.7);margin:-19px}
.v5-question-diagram .vs-number{min-width:55px;font-size:35px;padding:2px 8px;border-width:2px}.v5-question-diagram .vs-number small{font-size:11px}
.v5-option-area{position:absolute;z-index:7;left:28%;top:51%;width:53%;height:32%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:11px}
.v5-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:0;padding:7px 12px;background:linear-gradient(#fffefa,#fff6e8);border:4px solid #fffbea;border-radius:23px;box-shadow:0 5px 16px #68492c40;color:#26385c;font-size:clamp(14px,1.9vw,28px);font-weight:1000;overflow:hidden;transition:transform .16s,box-shadow .16s,border-color .16s}
.v5-option strong{line-height:1.13;text-align:center;overflow-wrap:anywhere;text-wrap:balance}
.v5-option:hover,.v5-option:focus-visible{transform:translateY(-4px);border-color:#5edb87;box-shadow:0 8px 26px #4e815a5a;outline:none}
.v5-option:active{transform:translateY(1px)}
.v5-opt-visual{display:block;line-height:1.1;font-size:clamp(20px,2.6vw,41px);white-space:normal}
.v5-option .math-svg{width:min(98%,87px);height:60px}
.v5-option .measure-preview{height:44px;width:100px;display:grid;place-items:center}.v5-option .tower-visual{width:33px}.v5-option .cup-visual{height:48px;width:40px}
.v5-option-wrong{border-color:#faaa9f;background:#fff0e9}
.v5-game-english .v5-lesson-question{left:27.2%;top:20.8%;width:46%;height:20.3%;padding:12px 28px}
.v5-forest-picture{position:absolute;z-index:7;left:36%;top:45.2%;width:28%;height:24%;display:grid;place-items:center;font-size:clamp(57px,9.6vw,145px);background:#fffdf2;border:5px solid #fffaf0;border-radius:30px;box-shadow:0 10px 20px #322f2233}
.v5-english-choices{left:27%;top:73%;width:47%;height:15%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:1fr;gap:8px}
.v5-english-choices .v5-option{border-color:#ffe7a1;border-radius:17px;box-shadow:0 7px 9px #5d3c2a66;background:linear-gradient(#f5ba60,#cc792f);font-size:clamp(30px,4.6vw,73px);color:#145fa6;text-shadow:2px 3px #fff7e3;-webkit-text-stroke:.6px #fff2cb}
.v5-english-choices .v5-option:hover{border-color:#b5fc85}
.v5-lesson-assist{position:absolute;z-index:9;bottom:8%;left:1.8%;display:flex;gap:8px;align-items:center;max-width:24%;flex-wrap:wrap}
.v5-lesson-assist button{border:3px solid #ffe4a4;background:linear-gradient(#fff7d8,#ffdc8c);padding:9px 11px;border-radius:20px;box-shadow:none;color:#714320;font-weight:1000;font-size:clamp(11px,1vw,16px)}
.v5-hint-inline{font-weight:900;color:#744221;background:#ffeb9ccc;padding:5px 12px;border-radius:20px;font-size:13px}
.v5-lives{position:absolute;left:3%;bottom:20%;z-index:9;background:#fff8e5e8;border:3px solid #d9a45d;border-radius:24px;padding:5px 10px;font-size:clamp(14px,1.4vw,21px)}
.v5-mini-toolbar{position:absolute;z-index:8;bottom:1.1%;right:1.8%;display:flex;align-items:center;justify-content:center;gap:12px;background:#fff9ddf2;border-radius:24px;border:3px solid #d9a457;padding:8px 10px;box-shadow:0 4px #895829;font-weight:900;color:#784e22;font-size:clamp(10px,.9vw,14px)}
.v5-mini-toolbar button{border:none;border-radius:15px;background:#e6f7ff;padding:7px 10px;font-weight:1000;color:#205a91}
.v5-scene-glimmer{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden;opacity:.8}
.v5-scene-glimmer i{position:absolute;left:82%;top:61%;width:14px;height:14px;border-radius:70% 30% 70% 30%;background:#b8fbe5;box-shadow:0 0 8px #fff;animation:v5Flit 10s ease-in-out infinite}
.v5-scene-glimmer i:nth-child(2){left:7%;top:30%;animation-delay:2s;background:#f9dc61}.v5-scene-glimmer i:nth-child(3){left:91%;top:33%;animation-delay:6s;background:#ffeec2}
@keyframes v5Flit{0%,100%{transform:translate(0,0) rotate(10deg);opacity:0}28%{opacity:1}50%{transform:translate(-56px,-58px) rotate(180deg);opacity:1}75%{opacity:.6}}
.v5-game.motion-paused .v5-scene-glimmer *{animation:none!important}
/* Approved outcome panels: same explorer/dog, with live controls rather than baked buttons. */
.v5-result-screen{position:absolute;inset:17% 16% 11%;z-index:7;border:8px solid #f9e4a2;background:linear-gradient(#fff0be,#e4fbbb);border-radius:37px;box-shadow:0 27px 45px #493d266b;overflow:hidden;display:grid;grid-template-columns:1.2fr .85fr}
.v5-result-screen::before{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 30% 25%,#fff8a59e,transparent 50%);z-index:1}
.v5-result-illustration{display:block;width:100%;height:100%;object-fit:cover;object-position:34% 50%;filter:saturate(1.15)}
.v5-result-copy{position:relative;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px 27px;text-align:center;background:linear-gradient(155deg,#fff7d5ed,#fff1b5d9);color:#4d381e}
.v5-celebration-heading{color:#096ac8;-webkit-text-stroke:1.4px #fff9ad;text-shadow:2px 5px 0 #113f85;font-size:clamp(32px,4.2vw,70px);font-weight:1000;line-height:1.05}
.v5-award{font-size:clamp(40px,5vw,84px);font-weight:1000;color:#d27218;text-shadow:0 3px #fff}
.v5-result-copy p{font-size:clamp(15px,1.5vw,24px);line-height:1.3;font-weight:900;margin:0;max-width:400px}
.v5-hero-next,.v5-retry-button{border:4px solid #fff4c6;border-radius:32px;padding:12px 26px;background:linear-gradient(#51f27d,#03aa4e);color:#fff;box-shadow:none;font-size:clamp(17px,1.7vw,25px);font-weight:1000;text-shadow:0 2px #227344;max-width:100%}
.v5-result-copy .v5-secondary-link{border:none;background:#fff7db;border-radius:20px;padding:9px 15px;color:#754d22;font-weight:1000}
.v5-result-oops{border-color:#ffd79e;background:#ffe3ad}
.v5-result-oops .v5-result-copy{background:linear-gradient(#fff4e3f2,#ffdebaef)}
.v5-oops-heading{color:#e24039;-webkit-text-stroke:1px white;text-shadow:0 3px #983b37;font-size:clamp(34px,4.5vw,71px);font-weight:1000;line-height:1.02}
.v5-oops-buttons{display:flex;gap:9px;flex-wrap:wrap;justify-content:center}
.v5-retry-button{background:linear-gradient(#62c8ff,#2385e3);box-shadow:none;font-size:18px}
.v5-hint-button{border:4px solid #fff9cd;background:linear-gradient(#fff4bb,#ffc954);color:#6f481b;box-shadow:0 6px #bd852e;font-size:18px;font-weight:1000;border-radius:23px;padding:10px 20px}
.v5-life-row{font-size:clamp(20px,2.5vw,36px)}
/* English trail hub has the exact Word Woods landscape with real game destinations. */
.v5-forest-hub{padding:24px 18px 48px;background:linear-gradient(#79d59b,#1e8aa6)}
.v5-hub-scene{position:relative;max-width:1460px;min-height:calc(100dvh - 70px);border-radius:28px;margin:auto;background:url('./v5/english-board-blank.webp') center/cover;box-shadow:0 22px 50px #214b2d8c;display:flex;flex-direction:column;align-items:center;padding:20px 20px 27px;gap:20px}
.v5-hub-sign{font-size:clamp(29px,4.6vw,59px);font-weight:1000;color:#fff5cb;text-shadow:2px 5px 0 #582d1e;background:linear-gradient(#b87a42,#824220);border:6px solid #f1d094;box-shadow:0 16px 25px #33250d55;padding:10px 30px;border-radius:26px;text-align:center}
.v5-hub-sign small{display:block;font-size:.31em;color:#fff6c2}
.v5-hub-list{width:min(100%,920px);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:auto 0;max-height:67vh;overflow:auto;padding:15px}
.v5-hub-trail{display:grid;grid-template-columns:54px 1fr auto;grid-template-rows:auto auto;gap:4px 12px;align-items:center;border:5px solid #ffe7af;border-radius:25px;padding:12px 16px;min-height:110px;text-align:left;box-shadow:0 6px #784223,0 10px 18px #3a352d77;background:linear-gradient(#fffce9,#eaffd1);color:#35633a;font-weight:1000}
.v5-hub-trail:nth-child(4n+2){background:linear-gradient(#fff4d4,#ffe0aa)}.v5-hub-trail:nth-child(4n+3){background:linear-gradient(#d7f6ff,#bce9f8)}.v5-hub-trail:nth-child(4n+4){background:linear-gradient(#fff0fb,#f8d9f1)}
.v5-hub-trail>span{font-size:38px;grid-row:1/3}.v5-hub-trail strong{font-size:clamp(17px,1.6vw,23px)}.v5-hub-trail small{grid-column:2;font-size:12px;line-height:1.35;color:#59785f}.v5-hub-trail b{grid-column:3;grid-row:1/3;background:#2db96d;color:white;padding:8px 10px;border-radius:17px}
.v5-hub-trail:hover{transform:translateY(-3px)}
.v5-hub-footer{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;background:#fff6dcef;border:3px solid #edc68c;border-radius:25px;padding:9px 16px;color:#68432a;font-weight:900}
.v5-hub-footer button{border:2px solid #d9b16f;background:#fff;border-radius:19px;padding:7px 14px;color:#275f8d;font-weight:1000}
/* Progress, Help, Stickers and parental boards: wood-framed game panels, not an unrelated white dashboard. */
.v5-interior{padding:22px 16px 55px;background-image:linear-gradient(#2b9ab96b,#41925373),url('./world-map-original.png');background-size:cover;background-position:center;background-attachment:fixed}
.v5-interior-top{max-width:1190px;margin:0 auto 16px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:linear-gradient(#b77b42,#81461d);border:5px solid #ffe7b6;border-radius:26px;padding:8px 20px;box-shadow:none}
.v5-interior-top>span{font-size:clamp(21px,3vw,36px);font-weight:1000;color:#fff8e3;text-shadow:0 3px #593619;margin-right:auto}
.v5-interior-top button{border:3px solid white;background:#fffbe8;border-radius:19px;padding:9px 14px;font-weight:1000;color:#70401f}
.v5-wood-sheet{width:min(1190px,100%);margin:auto;background:linear-gradient(155deg,#fffef0f5,#fff0ccf7);border:12px solid #9c592e;outline:5px solid #ffd79d;border-radius:35px;padding:28px 32px;box-shadow:0 28px 56px #2c4f3c81}
.v5-wood-sheet header{text-align:center;border-bottom:3px solid #e8c897;margin-bottom:20px;padding-bottom:14px}.v5-wood-sheet h1{font-size:clamp(28px,4vw,49px);font-weight:1000;color:#624024;margin:3px 0}.v5-wood-sheet header p{font-size:16px;font-weight:850;color:#87613e}.v5-wood-sheet header p>span{display:block;font-size:13px}
.v5-progress-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:18px 0}
.v5-progress-summary>div{display:grid;text-align:center;gap:6px;padding:18px 10px;border:3px solid #f1d9aa;border-radius:25px;background:#fff7dd}.v5-progress-summary strong{font-size:clamp(22px,2.9vw,38px);color:#2d79b5}.v5-progress-summary small{font-weight:900;color:#815c35}
.v5-island-progress-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;padding:10px 0}
.v5-island-progress{display:flex;align-items:center;flex-direction:column;gap:5px;background:linear-gradient(#efffdf,#e2f4c9);border:3px solid #c1dea2;border-radius:20px;padding:17px 8px;text-align:center;color:#466e44}
.v5-island-progress span{font-size:37px}.v5-island-progress strong{font-size:13px}.v5-island-progress small{font-size:16px;font-weight:1000}.v5-island-progress.locked{filter:grayscale(.6);opacity:.65}
.v5-wood-sheet h2{font-size:24px;color:#7f4c23}
.v5-skill-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.v5-skill-meter{text-align:left;border:3px solid #dcc99e;background:#fffdf4;border-radius:16px;display:grid;gap:5px;padding:14px;color:#5d533d;font-weight:1000}.v5-skill-track{display:block;height:12px;border-radius:20px;background:#ebdfbd;overflow:hidden}.v5-skill-track i{display:block;height:100%;background:linear-gradient(90deg,#51cfe8,#41c36b);border-radius:20px}.v5-skill-meter small{font-weight:700;color:#777}
.v5-progress-footer{padding:14px 0;display:flex;flex-wrap:wrap;gap:12px;align-items:center}.v5-progress-footer .week-graph{width:100%;max-width:510px}.v5-progress-footer button{background:#fff1ae;border:2px solid #e3bd64;border-radius:19px;font-weight:1000;padding:9px 17px;color:#80501f}
.v5-sticker-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;max-width:940px;margin:25px auto}.v5-sticker{min-height:147px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;border:5px solid #ffebba;background:linear-gradient(#fff,#ffedc9);border-radius:25px;box-shadow:none}.v5-sticker>span{font-size:57px}.v5-sticker strong{font-size:14px;color:#6c5031}.v5-sticker small{font-size:11px;color:#5c8657}.v5-sticker.locked{filter:grayscale(.6);opacity:.6}
.v5-interior-rewards .v5-hero-next{display:block;margin:20px auto}
/* Modals are real game screens with the approved board images and child-friendly wood frames. */
#overlay .dialog{background:linear-gradient(#fff8dd,#ffedc5);border:11px solid #a26735;outline:4px solid #ffdd9b;box-shadow:0 28px 70px #102b36a8;border-radius:34px;max-width:660px;text-align:center}
#overlay .dialog h2{font-size:clamp(26px,3.1vw,41px);color:#7f421f;text-shadow:0 2px #fff}
#overlay .dialog .quiet{font-weight:850;color:#765337}
#overlay .dialog .dialog-close{background:#ed734d;color:white;font-weight:1000}
.v5-dialog-art{display:block;width:100%;height:auto;max-height:290px;object-fit:cover;object-position:center;border-radius:20px;border:5px solid white;box-shadow:0 6px #ad7d4e;margin:12px 0}
.v5-help-steps{display:grid;grid-template-columns:1fr 1fr;gap:9px;text-align:left;margin:15px 0}.v5-help-steps div{background:#fffaf1;border:2px solid #ebd4ab;border-radius:17px;padding:9px;display:flex;align-items:center;gap:9px;color:#784e2b;font-size:14px}.v5-help-steps span{font-size:23px}
.v5-modal-hearts{font-size:27px}
/* Legacy supplementary activities and Parent Lesson Studio inherit the same woodland board language. */
.world-page .card,.world-page .panel{border:6px solid #ffe9b5;outline:2px solid #ac7d42;background:linear-gradient(#fffdf1f5,#fff2d6f7);border-radius:28px;box-shadow:0 17px 32px #28423651}
.world-page .game-header{background:linear-gradient(100deg,#ffe2a2,#fff7df,#fde0ab);border:5px solid #a76e3e;box-shadow:none}
.world-page .hero-strip{background:linear-gradient(110deg,#966032,#c99b52,#956034);border:5px solid #ffe4a6;box-shadow:none}
.world-page.zone-english .hero-strip{background:linear-gradient(110deg,#377849,#5baf5d,#2a674b)}
.world-page .section-title{color:#754c27}.world-page .pill{border-color:#c7a172;background:#fff9e8;color:#69431f}
.world-page .pill.active{background:#378e5e;color:#fff;border-color:#ffe3a6}
.world-page.zone-common{background:#b5ddad}
.world-page.zone-common::before{background:url('./world-map-original.png') center/cover;opacity:.55;filter:blur(8px)}
.map-lock-marker{width:clamp(25px,2.7vw,43px)!important;height:clamp(25px,2.7vw,43px)!important;font-size:clamp(14px,1.6vw,22px)!important;border-width:3px!important}
.map-stickers-live{left:73%!important;width:13.7%!important;box-sizing:border-box!important;text-align:center!important}
.map-stickers-header{width:100%!important;text-align:center!important;justify-content:center!important}
.map-mini-stickers{justify-content:center!important;align-items:center!important}
.quest-status{background:transparent!important;border-color:transparent!important;box-shadow:none!important;color:#2fa94a!important}
.quest-status:not(:has(*)){pointer-events:none}
.mission-count{z-index:7!important}
/* Full-box tap targets for all 4 monkey reaction cards. */
.map-hit.bottom-hit[data-action="feedback-demo"]{border-radius:11px!important}
.map-hit.bottom-hit[data-action="feedback-demo"]:hover{box-shadow:inset 0 0 0 5px #ffe183,0 0 28px #ffdf7b9e!important}
@media(max-width:900px){
 .v5-gameboard{position:relative;aspect-ratio:auto;min-height:100dvh;padding:15px 12px 22px;display:flex;flex-direction:column;align-items:center;gap:15px;overflow:auto;background-position:55% center;background-size:auto 100%}
 .v5-game-english .v5-gameboard{background-position:56% center}
 .v5-progress-hud,.v5-scene-tools,.v5-lesson-question,.v5-option-area,.v5-forest-picture,.v5-lesson-assist,.v5-mini-toolbar,.v5-lives,.v5-result-screen{position:relative;left:auto;right:auto;top:auto;bottom:auto;transform:none;max-width:none;width:100%;height:auto}
 .v5-progress-hud{margin:0 105px 0 0;width:calc(100% - 116px);min-height:60px;flex-shrink:0}.v5-progress-hud strong{font-size:19px;min-width:45px}.v5-progress-hud>span{font-size:22px}
 .v5-scene-tools{position:absolute;top:16px;right:10px;width:auto;display:flex;gap:6px}.v5-scene-tools button{width:47px;height:47px;font-size:28px;border-width:3px}
 .v5-lesson-question,.v5-game-english .v5-lesson-question{margin:70px 0 0;min-height:178px;max-height:280px;padding:16px;border:6px solid #d9a86c;background:#fffbebf6;flex-shrink:0}
 .v5-lesson-question h2{font-size:clamp(21px,5.9vw,32px)}
 .v5-question-diagram{max-height:140px}
 .v5-option-area{margin-top:5px;flex:1;min-height:255px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(110px,1fr));padding-bottom:5px;gap:11px}
 .v5-option{border-width:3px;font-size:20px;min-height:104px}.v5-opt-visual{font-size:29px}
 .v5-game-english .v5-forest-picture{width:60%;max-height:160px;min-height:140px;flex:1;font-size:85px;margin:0}
 .v5-english-choices{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:1fr;min-height:100px;flex:0}.v5-english-choices .v5-option{font-size:31px;min-height:100px}
 .v5-lesson-assist{width:100%;max-width:100%;justify-content:center}.v5-lesson-assist button{font-size:14px;padding:10px 15px}
 .v5-lives{align-self:flex-start;width:auto;background:#fff4d8;order:7}
 .v5-mini-toolbar{width:100%;margin-top:auto;flex-wrap:wrap;order:9;font-size:12px}
 .v5-result-screen{margin:75px 0 20px;display:flex;flex-direction:column;min-height:440px;overflow:hidden}.v5-result-illustration{height:215px}.v5-result-copy{padding:16px;flex:1;gap:9px}.v5-celebration-heading,.v5-oops-heading{font-size:clamp(35px,7.5vw,53px)}.v5-award{font-size:38px}.v5-result-copy p{font-size:15px}
 .v5-hub-list{grid-template-columns:1fr;max-height:none}.v5-hub-scene{min-height:100dvh;background-position:center}.v5-hub-trail{min-height:100px}.v5-hub-sign{font-size:32px}
 .v5-progress-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.v5-island-progress-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.v5-sticker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.v5-skill-grid{grid-template-columns:1fr}.v5-wood-sheet{padding:18px;border-width:7px;outline-width:3px}
}
@media(max-width:430px){.v5-gameboard{padding:12px 10px;gap:10px}.v5-lesson-question{margin-top:66px}.v5-option-area{min-height:255px}.v5-forest-picture{height:120px!important;min-height:120px!important}.v5-english-choices .v5-option{font-size:25px;min-height:80px}.v5-hub-trail small{font-size:10px}.v5-help-steps{grid-template-columns:1fr}.v5-sticker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.v5-scene-glimmer *{animation:none!important}.v5-option,.v5-hub-trail{transition:none!important}}
/* Final visual matching: show entire approved dog + child reaction art, do not clip half of the duo. */
.v5-result-screen{display:flex;flex-direction:column}
.v5-result-illustration{width:100%;height:73%;min-height:0;object-fit:fill;flex:0 0 auto}
.v5-result-copy{width:100%;flex:1;display:flex;flex-direction:row;flex-wrap:wrap;gap:12px;padding:12px 18px;min-height:0}
.v5-celebration-heading,.v5-oops-heading{display:none}
.v5-result-copy p{max-width:410px;font-size:clamp(14px,1.25vw,20px)}
.v5-award{font-size:clamp(27px,3vw,46px)}
.v5-result-copy .v5-hero-next,.v5-result-copy .v5-retry-button,.v5-result-copy .v5-hint-button{font-size:clamp(15px,1.2vw,21px);padding:10px 18px}
.v5-result-copy .v5-secondary-link{font-size:13px}
.v5-life-row{position:absolute;z-index:5;top:14px;right:18px;background:#fff6dfe9;border:3px solid #ffd490;padding:5px 10px;border-radius:20px;box-shadow:0 3px #96603b}
.v5-group-visual{display:block;font-size:clamp(18px,2.5vw,37px);line-height:1.15;word-break:break-all;text-align:center;max-width:96%;letter-spacing:1px}
.quest-coming{top:89.8%!important;width:2.65%!important;height:4.2%!important;font-size:clamp(11px,1.1vw,16px)!important;border-radius:50%!important;border-width:2px!important;box-shadow:0 2px 3px #3248!important}
@media(max-width:900px){
 .v5-result-screen{display:flex;flex-direction:column;min-height:510px}
 .v5-result-illustration{height:57%;min-height:245px;object-fit:contain;background:linear-gradient(#97b881,#d6f5c6)}
 .v5-result-copy{flex-direction:column;padding:12px;flex:1;gap:9px}
 .v5-result-copy p{font-size:14px}
 .v5-life-row{top:7px;right:7px}
 .v5-group-visual{font-size:clamp(18px,6vw,27px)}
}
.v5-angel-pop{position:absolute;z-index:7;top:8px;left:32%;font-size:clamp(30px,4vw,58px);filter:drop-shadow(0 4px 6px #266382);animation:v5AngelFloat 4s ease-in-out infinite;pointer-events:none;background:#fff9dcdd;border:3px solid #fff;border-radius:50%;padding:7px 15px}
@keyframes v5AngelFloat{0%,100%{transform:translateY(15px);opacity:.8}50%{transform:translateY(-9px);opacity:1}}
@media(prefers-reduced-motion:reduce){.v5-angel-pop{animation:none}}

/* V5 landscape expansion BEGIN */
/*
 * MARTIN V5 LANDSCAPE EDITION
 * Responsive refinements only. The six approved illustration assets and their
 * source aspect ratios stay unchanged; gameplay / saved progress remains intact.
 * Target layouts: desktop wide, iPad 4:3 landscape, phone 16:9-22:9 landscape.
 */

/* Desktop: preserve the approved artwork at its native 1672:941 proportion. */
.v5-game{
  display:grid;
  place-items:center;
  min-height:100svh;
  background:
    linear-gradient(135deg,rgba(29,118,106,.56),rgba(63,178,221,.66)),
    url('./v5/math-board-blank.webp') center/cover fixed;
}
.v5-game-english{
  background-image:linear-gradient(135deg,rgba(29,118,106,.56),rgba(63,178,221,.66)),url('./v5/english-board-blank.webp');
}
.v5-gameboard{
  width:min(100%,1672px);
  min-height:0;
  aspect-ratio:1672/941;
  background-size:cover;
  background-position:center;
}
.v5-gameboard .v5-lesson-question h2{
  font-size:clamp(18px,2.45vw,40px);
}
.v5-gameboard .v5-option strong{line-height:1.12}
.v5-scene-tools button,.v5-option,.v5-hero-next,.v5-retry-button,
.v5-hint-button,.v5-mini-toolbar button,.v5-interior button,
.v5-hub-trail,.mobile-island-bar button{touch-action:manipulation}
.v5-game :focus-visible,.v5-interior :focus-visible,.v5-forest-hub :focus-visible,
.mobile-island-bar :focus-visible{outline:4px solid #ffe36a;outline-offset:3px}

/* Tablets in landscape have more height relative to their width than desktops. */
@media (orientation:landscape) and (min-width:900px) and (max-aspect-ratio:1.55){
  .map-stage{width:100%!important;min-height:0!important;aspect-ratio:1672/941}
  .map-scroller{overflow-x:hidden}
  .map-footer{min-height:76px;padding:10px 16px;gap:8px 19px}
  .v5-game{padding:0;min-height:100svh;place-items:center}
  .v5-gameboard{min-height:0!important;width:100%;height:auto;aspect-ratio:1672/941}
  .v5-progress-hud{left:43%;width:31%;gap:7px;padding:6px 9px}
  .v5-progress-hud strong{min-width:46px;font-size:21px}
  .v5-progress-hud>span{font-size:28px}
  .v5-scene-tools{gap:7px}
  .v5-scene-tools button{height:clamp(44px,5.5vw,64px);width:clamp(44px,5.5vw,64px);font-size:clamp(23px,3vw,33px)}
  .v5-lesson-question{padding:10px 14px}
  .v5-lesson-question h2{font-size:clamp(19px,2.7vw,29px)!important}
  .v5-option{font-size:clamp(18px,2.4vw,29px);border-width:3px;padding:5px}
  .v5-option strong{font-size:clamp(17px,2.2vw,26px)}
  .v5-opt-visual{font-size:clamp(24px,3vw,33px)}
  .v5-forest-picture{font-size:clamp(70px,10vw,106px)}
  .v5-english-choices .v5-option{font-size:clamp(33px,4vw,48px)}
  .v5-lesson-assist{bottom:6%;left:1%;max-width:26%}
  .v5-lesson-assist button{padding:5px 8px;font-size:13px}
  .v5-mini-toolbar{font-size:11px;gap:6px}
  .v5-mini-toolbar button{padding:5px 7px}
  .v5-hub-list{max-height:none}
  .v5-interior{background-attachment:scroll}
}

/* Short-screen laptops: scale the full artwork into the available viewport. */
@media (orientation:landscape) and (min-width:1051px) and (max-height:750px){
  .v5-gameboard{width:min(100vw,calc(100svh * 1672 / 941));min-height:0}
  .v5-gameboard .v5-lesson-question h2{font-size:clamp(18px,2.3vw,33px)}
}

/* Phone landscape is a REAL horizontal game board, never the portrait stack. */
@media (orientation:landscape) and (max-width:1050px) and (max-height:560px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .v5-game{display:block;width:100%;height:100svh;min-height:100svh;overflow:hidden;padding:0}
  .v5-gameboard,.v5-game-math .v5-gameboard,.v5-game-english .v5-gameboard{
    box-sizing:border-box;display:block;position:relative;width:100%;height:100svh;
    min-height:0!important;max-height:100svh;aspect-ratio:auto;
    padding:0;margin:0;gap:0;overflow:hidden;background-size:cover;background-position:50% 50%;
  }
  .v5-progress-hud{
    position:absolute;left:42.4%;top:1.6%;width:31.3%;height:12%;min-height:0;
    display:flex;flex-direction:row;align-items:center;gap:5px;
    padding:4px 7px;margin:0;background:#fff8e6ed;border-width:2px;
  }
  .v5-progress-hud>span{font-size:clamp(19px,4.7vh,27px)}
  .v5-progress-hud strong{font-size:clamp(15px,3.9vh,21px);min-width:37px}
  .v5-level-track{height:11px}
  .v5-scene-tools{
    position:absolute;top:1.5%;right:1.3%;left:auto;width:auto;height:auto;
    display:flex;gap:6px;margin:0;
  }
  .v5-scene-tools button{
    box-sizing:border-box;width:clamp(43px,11vh,53px);height:clamp(43px,11vh,53px);
    min-height:43px;border-width:3px;font-size:clamp(22px,6vh,30px);
    padding:0;
  }
  .v5-lesson-question,.v5-game-english .v5-lesson-question{
    box-sizing:border-box;position:absolute;left:32.2%;top:22.2%;width:43%;height:27%;
    margin:0;padding:5px 9px;min-height:0;max-height:none;
    display:flex;flex-direction:column;gap:0;border:3px solid #e5b96c;
    border-radius:clamp(13px,3vh,22px);flex:none;
  }
  .v5-lesson-question h2,.v5-gameboard .v5-lesson-question h2{
    font-size:clamp(14px,4.25vh,21px)!important;line-height:1.1;
    max-height:100%;overflow:hidden;letter-spacing:-.25px;
  }
  .v5-question-diagram{max-height:45%;margin:0;overflow:hidden;min-height:0}
  .v5-question-diagram .scene{min-height:0;max-height:100%;padding:0;gap:2px}
  .v5-question-diagram .scene .math-emojis{font-size:clamp(14px,3.9vh,20px)}
  .v5-question-diagram .ten-frame{max-width:180px;padding:1px;gap:1px}
  .v5-question-diagram .frame-cell{min-height:9px;font-size:12px;border-radius:3px}
  .v5-question-diagram .count-node{height:25px;min-width:20px;font-size:12px}
  .v5-question-diagram .vs-number{font-size:20px;min-width:35px;padding:0 6px}
  .v5-question-diagram .math-svg{width:58px;height:42px}
  .v5-option-area{
    box-sizing:border-box;position:absolute;top:52%;left:28.7%;width:51.6%;height:32.5%;
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));
    align-items:stretch;gap:5px;padding:0;margin:0;min-height:0;max-height:none;flex:none;
  }
  .v5-option,.v5-option-area .v5-option{
    box-sizing:border-box;min-height:0;height:100%;padding:3px 6px;
    border-width:2px;border-radius:clamp(10px,3vh,17px);
    font-size:clamp(13px,4vh,18px);line-height:1.1;
    justify-content:center;align-items:center;gap:1px;
  }
  .v5-option strong{font-size:clamp(11px,3.5vh,17px);line-height:1.04}
  .v5-opt-visual{font-size:clamp(17px,5.2vh,26px);line-height:1.1}
  .v5-group-visual{font-size:clamp(13px,3.7vh,20px);letter-spacing:0;line-height:1.05}
  .v5-option .math-svg{height:33px;width:50px}
  .v5-option .measure-preview{height:27px;width:60px}
  .v5-option .tower-visual{width:20px}.v5-option .cup-visual{height:28px;width:26px}
  .v5-game-english .v5-lesson-question{left:27.5%;top:21%;width:45.4%;height:21.8%;padding:4px 8px}
  .v5-forest-picture,.v5-game-english .v5-forest-picture{
    box-sizing:border-box;position:absolute;left:37%;top:45.4%;width:26%;height:23.5%;
    min-height:0;max-height:none;flex:none;margin:0;
    border-width:3px;border-radius:15px;
    font-size:clamp(34px,11vh,64px);
  }
  .v5-english-choices,.v5-game-english .v5-english-choices{
    position:absolute;left:27.6%;top:73%;width:46%;height:15.5%;
    margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
    grid-template-rows:1fr;gap:4px;min-height:0;max-height:none;flex:none;
  }
  .v5-english-choices .v5-option{font-size:clamp(23px,7vh,40px);min-height:0;border-width:2px;border-radius:10px}
  .v5-lesson-assist{
    box-sizing:border-box;position:absolute;left:1.2%;bottom:4%;top:auto;right:auto;
    width:25.8%;max-width:25.8%;height:auto;
    display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px;margin:0;
  }
  .v5-lesson-assist button{border-width:2px;border-radius:12px;font-size:clamp(11px,3vh,13px);padding:6px 7px;line-height:1}
  .v5-hint-inline{display:none}
  .v5-lives{
    position:absolute;left:2.1%;bottom:25%;top:auto;right:auto;order:initial;
    height:auto;width:auto;margin:0;font-size:clamp(12px,3.9vh,17px);padding:2px 5px;border-width:2px;
  }
  .v5-mini-toolbar{
    position:absolute;z-index:9;right:1.1%;bottom:1%;top:auto;left:auto;
    display:flex;flex-wrap:nowrap;width:auto;height:auto;max-width:32%;
    margin:0;padding:3px 5px;gap:3px;font-size:clamp(9px,2.55vh,12px);
    border-width:2px;border-radius:12px;order:initial;
  }
  .v5-mini-toolbar>span:nth-of-type(2){display:none}
  .v5-mini-toolbar button{padding:4px 5px;font-size:inherit}
  .v5-result-screen,.v5-result-screen.v5-result-oops{
    box-sizing:border-box;position:absolute;inset:13% 13% 10%;width:auto;height:auto;min-height:0;
    display:grid;grid-template-columns:49% 51%;grid-template-rows:100%;
    margin:0;border-width:4px;border-radius:17px;overflow:hidden;
  }
  .v5-result-illustration{
    width:100%;height:100%;min-height:0;max-height:none;
    object-fit:contain;object-position:center;background:#cde9b6;
  }
  .v5-result-copy{
    box-sizing:border-box;width:100%;height:100%;min-height:0;padding:7px 9px;
    display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;align-items:center;
    gap:clamp(4px,1.5vh,8px);text-align:center;
  }
  .v5-result-copy p{font-size:clamp(10px,2.9vh,14px);line-height:1.22;margin:0}
  .v5-award{font-size:clamp(23px,6.5vh,37px)}
  .v5-result-copy .v5-hero-next,.v5-result-copy .v5-retry-button,.v5-result-copy .v5-hint-button{
    min-height:35px;padding:4px 9px;font-size:clamp(12px,3.2vh,16px);border-width:2px;
    box-shadow:0 3px 0 #238139;
  }
  .v5-oops-buttons{gap:5px;flex-wrap:nowrap}
  .v5-result-copy .v5-secondary-link{font-size:clamp(10px,2.6vh,12px);padding:3px 6px}
  .v5-life-row{top:3px;right:5px;font-size:clamp(16px,5vh,24px);padding:2px 5px;border-width:2px}
  .v5-angel-pop{font-size:27px;top:3px;left:24%;padding:2px 8px}
  .v5-forest-hub{padding:5px;min-height:100svh;max-height:none;overflow-y:auto;overflow-x:hidden}
  .v5-hub-scene{
    min-height:calc(100svh - 10px);border-radius:16px;
    padding:6px 9px;gap:7px;display:flex;flex-direction:column;
  }
  .v5-hub-sign{font-size:clamp(18px,5vh,31px);border-width:3px;padding:3px 16px;border-radius:13px}
  .v5-hub-list{
    width:min(100%,940px);margin:0 auto;max-height:none;overflow:visible;padding:4px;
    grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(82px,1fr));gap:6px;
  }
  .v5-hub-trail{
    min-height:79px;padding:5px 7px;border-width:3px;border-radius:13px;
    grid-template-columns:31px 1fr;grid-template-rows:auto auto;gap:1px 4px;
  }
  .v5-hub-trail>span{font-size:24px}
  .v5-hub-trail strong{font-size:clamp(11px,2.9vh,15px)}
  .v5-hub-trail small{font-size:10px;line-height:1.12}
  .v5-hub-trail b{display:none}
  .v5-hub-footer{font-size:10px;gap:4px;padding:3px 6px;border-width:2px}
  .v5-hub-footer button{font-size:10px;padding:4px 7px}
  .v5-interior{min-height:100svh;padding:7px 9px 30px;background-attachment:scroll}
  .v5-interior-top{padding:4px 9px;margin-bottom:11px;border-width:3px;gap:5px}
  .v5-interior-top>span{font-size:20px}
  .v5-interior-top button{padding:5px 9px;border-width:2px;font-size:12px}
  .v5-wood-sheet{padding:12px 15px;border-width:6px;border-radius:19px;outline-width:2px}
  .v5-wood-sheet h1{font-size:clamp(22px,5.5vh,34px)}
  .v5-progress-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0}
  .v5-progress-summary>div{padding:6px;border-width:2px;border-radius:12px}
  .v5-progress-summary strong{font-size:23px}
  .v5-progress-summary small{font-size:11px}
  .v5-island-progress-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
  .v5-island-progress{padding:5px;border-radius:12px}
  .v5-island-progress span{font-size:25px}
  .v5-sticker-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:12px auto}
  .v5-sticker{min-height:102px;border-width:3px;border-radius:15px}
  .v5-sticker>span{font-size:42px}
  .v5-sticker strong{font-size:12px}
  .v5-skill-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #overlay .dialog{max-width:min(95vw,660px);max-height:96svh;overflow-y:auto;padding:12px 15px;border-width:6px;border-radius:17px}
  #overlay .dialog h2{font-size:clamp(21px,5vh,28px)}
  .v5-dialog-art{max-height:130px;margin:6px 0}
  .v5-help-steps{gap:5px;margin:8px 0}
  .v5-help-steps div{padding:5px 7px;font-size:11px;border-radius:9px}
  .v5-help-steps span{font-size:19px}
  .map-shell{min-height:100svh}
  .mobile-ribbon{
    display:flex;position:relative;z-index:30;gap:6px;padding:4px 10px;
    min-height:40px;align-items:center;white-space:nowrap;
  }
  .mobile-ribbon strong,.mobile-ribbon .mobile-clock{font-size:12px}
  .mobile-ribbon button{padding:5px 8px;font-size:11px}
  .mobile-island-bar{
    display:flex;position:relative;z-index:22;gap:6px;padding:4px 7px;
    min-height:43px;white-space:nowrap;overflow-x:auto;align-items:center;
  }
  .mobile-island-bar button{min-height:32px;padding:5px 8px;font-size:11px}
  .map-scroller{overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x pan-y}
  .map-stage{width:max(920px,100vw)!important;height:auto;min-height:0!important;aspect-ratio:1672/941}
  .world-map-hud{display:none!important}
  .map-footer{min-height:52px;padding:7px 9px;gap:6px 14px;font-size:11px}
  .map-footer button{padding:7px 10px;font-size:11px;border-width:2px}
  .map-hit[data-tip]:hover::after{display:none}
}

/* Exceptionally short phones: preserve question + buttons; scrolling remains possible in panels. */
@media (orientation:landscape) and (max-width:760px) and (max-height:360px){
  .v5-lesson-question h2,.v5-gameboard .v5-lesson-question h2{font-size:clamp(12px,4vh,16px)!important}
  .v5-option strong{font-size:clamp(11px,3.3vh,14px)}
  .v5-lesson-assist button{font-size:10px;padding:4px 5px}
  .v5-mini-toolbar{bottom:.5%;padding:2px 4px}
  .v5-mini-toolbar button{padding:3px}
  .v5-result-copy{gap:3px;padding:4px 5px}
  .v5-result-copy p{font-size:10px}
}

/* Rotating the phone is recommended, but portrait mode remains playable. */
.landscape-tip{
  display:none;position:fixed;right:12px;bottom:max(12px,env(safe-area-inset-bottom));z-index:135;
  max-width:min(290px,90vw);padding:11px 13px;
  border:4px solid #fcebbd;border-radius:21px;background:linear-gradient(#fff8d7,#ffdfa4);
  box-shadow:0 5px 0 #a86e38,0 8px 25px #162b5366;color:#79451e;
  font-size:13px;line-height:1.3;font-weight:900;
}
.landscape-tip .landscape-tip-head{font-size:17px;margin-bottom:5px}
.landscape-tip button{margin-top:7px;border:2px solid white;border-radius:12px;background:#3eb86c;color:white;padding:6px 12px;font-size:12px;font-weight:1000}
@media (orientation:portrait) and (max-width:740px) and (pointer:coarse){
  body:has(.map-shell) .landscape-tip:not(.dismissed),
  body:has(.v5-game) .landscape-tip:not(.dismissed),
  body:has(.v5-forest-hub) .landscape-tip:not(.dismissed){display:block}
}

/* No shimmering/automatic motion for users who request reduced animation. */
@media(prefers-reduced-motion:reduce){
  .map-life-layer *,.v5-scene-glimmer *,.floating-boat,.floating-bird{animation:none!important}
}
/* Regression corrections from live screenshots: no repeated background signage. */
.v5-game{background:linear-gradient(175deg,#81d9ef 0%,#7ac5ac 52%,#457d6c 100%)}
.v5-game-english{background:linear-gradient(175deg,#87dacc 0%,#67c0ad 55%,#3b8b65 100%)}
@media(orientation:landscape) and (max-width:1050px) and (max-height:560px){
  /* The reference art already contains a decorative HUD; cover it with the actual progress meter. */
  .v5-progress-hud{top:0;height:14%;border-radius:0 0 22px 22px}
  /* Never block the child's answer choices with a full-width welcome notification. */
  .toast{left:12px;bottom:6px;transform:none;max-width:230px;padding:5px 8px;font-size:10px;line-height:1.16;border-width:2px;box-shadow:0 4px 10px #102b5266}
  @keyframes toastin{from{transform:translateY(9px);opacity:0}to{transform:translateY(0);opacity:1}}
}
/* Friendly scene-name plaque appears only where the original sign is cropped on phones. */
.v5-compact-scene-title{display:none}
@media (orientation:landscape) and (max-width:1050px) and (max-height:560px){
  .v5-compact-scene-title{
    display:flex;align-items:center;justify-content:center;
    position:absolute;z-index:9;left:1%;top:0;width:29%;min-height:34px;height:10%;
    border:3px solid #ffdea6;border-radius:0 0 17px 17px;
    background:linear-gradient(145deg,#be8244,#8a4b25 68%,#75401e);
    box-shadow:0 3px 0 #5b351c,0 6px 14px #2b4b3644;
    color:#fff8d7;text-shadow:0 2px 1px #5b351d;
    font-weight:1000;font-size:clamp(13px,4vh,18px);white-space:nowrap;
  }
  .mobile-ribbon{
    color:#fff5cf;background:linear-gradient(165deg,#b9793b,#7a482b);
    border-bottom:2px solid #f3d49d;box-shadow:0 2px 6px #2c492c77;
    padding-left:max(10px,env(safe-area-inset-left));
    padding-right:max(10px,env(safe-area-inset-right));
  }
  .mobile-ribbon .mobile-clock{color:#fff8d9}
  .mobile-ribbon button{background:#ffefb9!important;border-color:#ffe8b5!important;color:#74421c!important}
  .mobile-island-bar{
    padding-left:max(7px,env(safe-area-inset-left));
    padding-right:max(7px,env(safe-area-inset-right));
  }
  .v5-scene-tools{right:max(1.3%,env(safe-area-inset-right))}
  .v5-lesson-assist{left:max(1.2%,env(safe-area-inset-left))}
  .v5-mini-toolbar{right:max(1.1%,env(safe-area-inset-right))}
}
/* Landscape reaction screens show large mascots, not a tiny image in a blank card. */
@media(orientation:landscape) and (max-width:1050px) and (max-height:560px){
  .v5-result-screen,.v5-result-screen.v5-result-oops{
    grid-template-columns:61% 39%;
    background:linear-gradient(110deg,#d0efb9,#ffeccc 62%);
  }
  .v5-result-illustration{
    object-fit:cover;object-position:12% center;
    background:#c6e7bb;
  }
  .v5-result-copy{padding:6px 8px;background:linear-gradient(155deg,#fff9e8ed,#ffe8bbfa)}
  .v5-celebration-heading,.v5-oops-heading{
    display:block;font-size:clamp(20px,6.2vh,30px);line-height:1.02;
    text-wrap:balance;
  }
  .v5-celebration-heading{color:#1385d9;-webkit-text-stroke:.7px #fff1ac}
  .v5-oops-heading{color:#e04538;-webkit-text-stroke:.7px #fff9ee}
  .v5-result-copy p{font-size:clamp(10px,2.95vh,13px)}
  .v5-result-copy .v5-hero-next,.v5-result-copy .v5-retry-button,.v5-result-copy .v5-hint-button{padding:4px 7px}
  .v5-oops-buttons{flex-wrap:wrap}
}
/* Approved picture-led feedback in compact landscape: show BOTH the child and dog. */
@media(orientation:landscape) and (max-width:1050px) and (max-height:560px){
  .v5-result-screen,.v5-result-screen.v5-result-oops{
    display:block;grid-template-columns:none;grid-template-rows:none;
    background:#dff1cd;
  }
  .v5-result-illustration{
    position:absolute;inset:0;display:block;width:100%;height:100%;
    object-fit:cover;object-position:center center;mask-image:none;
  }
  .v5-result-copy{
    position:absolute;z-index:5;left:0;right:0;bottom:0;top:auto;
    width:100%;height:auto;min-height:62px;max-height:42%;
    display:flex;flex-flow:row wrap;justify-content:center;align-items:center;
    gap:4px 7px;padding:5px 8px;overflow-y:auto;
    background:linear-gradient(to bottom,#fff8e2dc,#fff7e7f8);
    border-top:2px solid #ffe2a4;
  }
  .v5-result-copy .v5-celebration-heading,.v5-result-copy .v5-oops-heading,
  .v5-result-copy .v5-award{display:none}
  .v5-result-copy p{font-size:clamp(10px,2.85vh,13px);max-width:280px;line-height:1.14}
  .v5-result-copy .v5-hero-next,.v5-result-copy .v5-retry-button,.v5-result-copy .v5-hint-button{
    min-height:36px;padding:5px 10px;border-width:2px;font-size:clamp(12px,3.2vh,15px);
  }
  .v5-result-copy .v5-secondary-link{font-size:11px;padding:4px 7px}
  .v5-life-row{z-index:8;top:4px;right:4px;background:#fff8ddf3}
  .v5-oops-buttons{display:flex;flex-wrap:nowrap;gap:5px}
}

/* V5 landscape expansion END */


/* 2026-10-14 hotfix: Safari/iPad production issues. This block overrides
   legacy portrait/landscape rules WITHOUT editing the approved illustration. */
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
/* The illustrated boards ALREADY CONTAIN the speaker and home circles. Only
   invisible, accessible hit targets are needed. Prevent duplicated emojis. */
.v5-gameboard .v5-scene-tools button{
 background:transparent!important;border:0!important;box-shadow:none!important;
 color:transparent!important;font-size:0!important;-webkit-appearance:none;appearance:none;
 min-width:40px;min-height:40px;outline-offset:3px;
}
.v5-gameboard .v5-scene-tools button:hover{transform:none;filter:none}
.v5-gameboard .v5-scene-tools button:focus-visible{outline:4px solid #ffe058!important;outline-offset:1px}
/* Baked scene artwork and dynamic overlays share one aspect-ratio coordinate
   system. On iPad preserve the scene's width:height to stop drifting hotspots. */
@media (orientation:landscape) and (min-width:900px) and (min-height:561px){
 .v5-game{display:grid;place-items:center;min-height:100svh}
 .v5-gameboard{position:relative;width:min(100vw,calc(100svh * 1672 / 941));height:auto;min-height:0!important;aspect-ratio:1672/941;background-size:100% 100%;background-position:center;}
 .v5-scene-tools{gap:clamp(11px,1.35vw,24px);right:2.5%;top:4.4%;}
 .v5-scene-tools button{width:clamp(40px,4vw,64px);height:clamp(40px,4vw,64px);}
}
/* Use a REAL SVG for 10-frame instead of emoji-containing CSS grid: all ten
   cells paint in Safari even when the emoji font is unavailable. */
.v5-gameboard .v5-lesson-question.v5-has-diagram{
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 overflow:hidden;gap:2px;min-width:0;min-height:0;
}
.v5-gameboard .v5-lesson-question.v5-has-diagram h2{flex:0 1 auto;min-height:0;max-height:none!important;overflow:visible!important;line-height:1.1}
.v5-gameboard .v5-lesson-question.v5-has-diagram .v5-question-diagram{
 box-sizing:border-box;display:flex;flex:1 1 auto;align-self:stretch;justify-content:center;align-items:center;
 min-width:0;min-height:38px;height:auto;max-height:84px!important;
 overflow:visible!important;margin:0;
}
.v5-question-diagram .ten-frame-scene{display:flex!important;align-items:center;justify-content:center;width:100%;height:100%;min-height:40px;}
.v5-question-diagram .ten-frame-svg{display:block!important;width:min(98%,250px);height:100%;max-height:78px;max-width:100%;overflow:visible!important;flex-shrink:0}
.v5-question-diagram .v5-clock-svg{width:auto;height:100%;max-height:72px;min-height:36px;flex-shrink:0}
.v5-question-diagram .v5-rect-svg{width:min(100%,180px);height:100%;max-height:72px;flex-shrink:0}
.v5-question-diagram .v5-chart-scene{width:100%;gap:3px;flex-direction:column;font-size:10px}
.v5-chart-scene>div{display:grid;grid-template-columns:105px minmax(0,1fr) 22px;align-items:center;gap:5px;width:100%;max-width:280px;height:24px;font-size:11px;color:#21466d}
.v5-chart-scene b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
.v5-chart-bar{display:block;width:calc(var(--units)*100%/30);height:14px;border-radius:6px;border:1px solid #cd7d39;background:linear-gradient(#ffab81,#e64842)}
.v5-chart-bar.blue{background:linear-gradient(#90dcfc,#368be9);border-color:#367baf}
.v5-shape-pair{display:flex;gap:6px;max-height:100%;align-items:center}
.v5-shape-pair .math-svg{width:55px;height:45px;flex:none}
.v5-place-value,.v5-story-steps{display:flex;gap:10px;align-items:center;justify-content:center;white-space:nowrap;font-size:clamp(14px,1.5vw,21px);font-weight:900;color:#194d88}
.v5-story-steps>span{background:#fff1c7;border-radius:9px;padding:2px 8px}
.v5-facts{font-size:25px}
.v5-gameboard .v5-long-question h2{font-size:clamp(15px,1.9vw,29px)!important}
/* Explicit word-choice tile sizing prevents Level 3-5 multisyllabic words
   from overflowing the four-column ABC layout on tablets. */
.v5-gameboard .v5-english-choices.v5-english-words .v5-option{font-size:clamp(13px,1.45vw,23px)!important;letter-spacing:-.15px;line-height:1.02;text-shadow:none;-webkit-text-stroke:0;overflow-wrap:anywhere}
.v5-gameboard .v5-english-choices.v5-english-words .v5-option strong{font-size:inherit!important;line-height:1.06}
@media (orientation:landscape) and (max-width:1050px) and (max-height:560px){
 .v5-gameboard{background-size:cover;background-position:center;}
 .v5-gameboard .v5-lesson-question.v5-has-diagram{padding:2px 6px;gap:0}
 .v5-gameboard .v5-lesson-question.v5-has-diagram h2{font-size:clamp(11px,3.6vh,16px)!important;line-height:1.04}
 .v5-gameboard .v5-long-question h2{font-size:clamp(10px,3.1vh,14px)!important}
 .v5-gameboard .v5-lesson-question.v5-has-diagram .v5-question-diagram{min-height:27px;max-height:46px!important;flex:1 1 auto}
 .v5-question-diagram .ten-frame-scene{min-height:26px;}
 .v5-question-diagram .ten-frame-svg{max-height:43px;min-height:24px;width:min(94%,150px)}
 .v5-question-diagram .v5-chart-scene>div{height:15px;grid-template-columns:62px 1fr 15px;font-size:8px;gap:2px}
 .v5-question-diagram .v5-chart-scene b{font-size:8px}
 .v5-question-diagram .v5-chart-bar{height:8px}
 .v5-question-diagram .v5-place-value,.v5-question-diagram .v5-story-steps{font-size:11px;gap:3px}
 .v5-question-diagram .v5-clock-svg{max-height:43px}
 .v5-question-diagram .v5-rect-svg{max-height:43px}
 .v5-gameboard .v5-english-choices.v5-english-words .v5-option{font-size:clamp(10px,2.65vh,15px)!important;padding:1px 2px;}
 .v5-gameboard .v5-scene-tools button{min-width:43px;min-height:43px}
}

/* Final diagram text metric: keep artwork BELOW the prompt, never crossing it. */
.v5-gameboard .v5-lesson-question.v5-has-diagram h2{
 flex:0 0 auto!important;max-height:none!important;overflow:visible!important;
 font-size:clamp(14px,1.75vw,23px)!important;line-height:1.08!important;
}
@media (orientation:landscape) and (max-width:1050px) and (max-height:560px){
 .v5-gameboard .v5-lesson-question.v5-has-diagram h2{font-size:clamp(10px,3.3vh,15px)!important;}
}
/* 2026-10-14 QA: SVGs should fill their illustration slots, even in Safari. */
.v5-gameboard .v5-question-diagram > .scene{
  width:100%;height:100%;max-height:100%;min-height:0;
  display:flex;align-items:center;justify-content:center;
}
.v5-gameboard .v5-question-diagram .v5-clock-svg{
  display:block;width:72px;min-width:60px;height:72px;max-height:100%;
}
.v5-gameboard .v5-question-diagram .v5-rect-svg{display:block;height:68px;max-height:100%;}
.v5-level-status{
  display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;
  margin:12px 0 14px;padding:8px 12px;border-radius:14px;
  background:linear-gradient(120deg,#fce9b8,#e2f8d1);
  border:2px solid #d8ad6e;color:#4a382c;font-weight:900;text-align:center;
}
.v5-level-status small{font-size:12px;font-weight:750;color:#6e6557}
@media (orientation:landscape) and (max-width:1050px) and (max-height:560px){
  .v5-gameboard .v5-question-diagram .v5-clock-svg{width:40px;min-width:32px;height:40px;}
  .v5-gameboard .v5-question-diagram .v5-rect-svg{height:38px;}
  .v5-level-status{margin:4px 0;padding:5px;gap:6px;font-size:12px}
}

/* Count-of-shapes activity for advanced geometry; full illustrated SVG, no emoji. */
.v5-question-diagram .v5-shape-count{display:flex;justify-content:center;align-items:center;gap:11px;height:100%;max-height:100%;font-size:24px;color:#235e8d;font-weight:1000}
.v5-question-diagram .v5-shape-count .math-svg{height:52px;width:60px;display:block}
.v5-question-diagram .v5-shape-count strong{font-size:clamp(16px,1.65vw,26px)}
@media(orientation:landscape) and (max-height:560px){.v5-question-diagram .v5-shape-count{gap:3px}.v5-question-diagram .v5-shape-count .math-svg{width:37px;height:33px}.v5-question-diagram .v5-shape-count strong{font-size:14px}}


/* BEGIN V5 UNIFIED CENTERED BOARD. Canonical source of truth.
   One centered, wood-framed quest card; question and answers share ONE grid.
   The approved illustrated background is unchanged. We cover its baked empty
   boards completely, instead of placing mismatched nested overlays above them.
   Coordinates use percentages of the SAME gameboard aspect-ratio container.
*/
.v5-gameboard{container-type:inline-size}
.v5-gameboard .v5-unified-quest{
  box-sizing:border-box!important;position:absolute!important;z-index:7;
  top:20.8%!important;left:53.4%!important;right:auto!important;bottom:auto!important;
  transform:translateX(-50%)!important;width:53.9%!important;height:66.2%!important;
  min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
  margin:0!important;padding:clamp(5px,.6cqw,11px)!important;
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,52fr) minmax(0,48fr)!important;
  gap:clamp(4px,.55cqw,11px)!important;
  border:clamp(4px,.65cqw,11px) solid #855025!important;
  border-radius:clamp(16px,2.3cqw,40px)!important;
  background:repeating-linear-gradient(3deg,#c68337 0px,#bd7330 16px,#a96830 20px,#d4994c 35px,#b87432 44px)!important;
  box-shadow:inset 0 0 0 2px #ffdb8e,0 9px 19px #49301c80,0 0 0 2px #59361266!important;
  isolation:isolate;overflow:hidden!important;
  -webkit-transform:translateX(-50%)!important;
}
.v5-gameboard .v5-unified-quest::before{
 content:'';position:absolute;inset:clamp(2px,.32cqw,5px);border:2px solid #ffe5a78a;
 border-radius:inherit;pointer-events:none;z-index:0;
}
.v5-gameboard .v5-unified-quest .v5-lesson-question,
.v5-gameboard.v5-english-board .v5-unified-quest .v5-lesson-question{
 position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
 transform:none!important;box-sizing:border-box!important;width:100%!important;height:100%!important;
 min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
 margin:0!important;padding:clamp(5px,.8cqw,16px)!important;flex-shrink:1!important;
 display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
 gap:clamp(3px,.4cqw,9px)!important;
 border:clamp(2px,.33cqw,6px) solid #f3d6a1!important;
 border-radius:clamp(12px,1.6cqw,25px)!important;
 background:linear-gradient(155deg,#fffef3 0%,#fff9e4 75%,#f5e8c5 100%)!important;
 box-shadow:inset 0 3px 4px #fff,0 3px 6px #6a3b1b48!important;
 overflow:hidden!important;
}
.v5-gameboard .v5-unified-quest .v5-lesson-question h2,
.v5-gameboard .v5-unified-quest .v5-lesson-question.v5-has-diagram h2,
.v5-gameboard .v5-unified-quest .v5-long-question h2{
 box-sizing:border-box;margin:0!important;min-width:0;max-width:100%!important;
 font-size:clamp(12px,2.03cqw,36px)!important;line-height:1.12!important;
 letter-spacing:-.012em!important;font-weight:1000;flex:0 0 auto!important;
 max-height:none!important;overflow:visible!important;text-align:center;overflow-wrap:break-word;
 color:#172b55!important;text-shadow:0 1px #fff9dd;
}
.v5-gameboard .v5-unified-quest .v5-long-question h2{font-size:clamp(11px,1.70cqw,30px)!important;line-height:1.1!important}
.v5-gameboard .v5-unified-quest .v5-question-diagram,
.v5-gameboard .v5-unified-quest .v5-lesson-question.v5-has-diagram .v5-question-diagram{
 box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:0!important;
 max-width:100%!important;max-height:none!important;height:auto!important;
 margin:0!important;padding:0!important;
 flex:1 1 0!important;align-self:stretch!important;display:flex!important;
 align-items:center!important;justify-content:center!important;overflow:hidden!important;
}
.v5-gameboard .v5-unified-quest .v5-question-diagram > .scene{min-height:0!important;max-height:100%!important;height:100%!important;display:flex;align-items:center;justify-content:center;gap:5px}
.v5-gameboard .v5-unified-quest .ten-frame-scene{height:100%!important;min-height:0!important}
.v5-gameboard .v5-unified-quest .ten-frame-svg{height:100%!important;max-height:100%!important;width:min(91%,460px)!important;min-height:0!important;display:block!important}
.v5-gameboard .v5-unified-quest .v5-clock-svg{height:100%!important;width:auto!important;max-height:100%!important;min-height:0!important}
.v5-gameboard .v5-unified-quest .v5-rect-svg{height:100%!important;max-height:100%!important}
.v5-gameboard .v5-unified-quest .v5-option-area,
.v5-gameboard .v5-unified-quest .v5-english-choices{
 box-sizing:border-box!important;position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
 transform:none!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;
 min-width:0!important;min-height:0!important;max-height:none!important;
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:clamp(4px,.53cqw,11px)!important;
 overflow:visible!important;z-index:1;
}
.v5-gameboard .v5-unified-quest .v5-option{
 box-sizing:border-box;min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;
 margin:0!important;padding:clamp(3px,.55cqw,10px)!important;
 border:clamp(2px,.30cqw,6px) solid #b2763e!important;
 border-radius:clamp(10px,1.45cqw,26px)!important;
 background:linear-gradient(158deg,#fffefa 0%,#fff8e7 82%,#f3e9ce 100%)!important;
 box-shadow:inset 0 0 0 2px #fff7df,0 3px 4px #522e1c59!important;
 font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif;color:#1b2d59!important;
 font-size:clamp(12px,1.75cqw,29px)!important;line-height:1.10!important;
 display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
 gap:clamp(1px,.3cqw,5px)!important;overflow:hidden!important;
 transition:transform .12s ease,background-color .12s ease,box-shadow .12s ease!important;
 text-shadow:none!important;-webkit-text-stroke:0!important;
}
.v5-gameboard .v5-unified-quest .v5-option strong{font-size:inherit!important;max-width:100%;line-height:1.07;overflow-wrap:anywhere}
.v5-gameboard .v5-unified-quest .v5-option:hover,
.v5-gameboard .v5-unified-quest .v5-option:focus-visible{transform:translateY(-2px)!important;border-color:#40b971!important;box-shadow:0 0 0 3px #b5ffa7,0 3px 6px #42301b!important;outline:none}
.v5-gameboard .v5-unified-quest .v5-opt-visual{font-size:clamp(17px,2.4cqw,39px)!important;line-height:1.0!important;max-width:100%}
.v5-gameboard .v5-unified-quest .v5-option .math-svg{height:min(7cqw,66px);max-height:70%;width:auto;max-width:100%}
.v5-gameboard .v5-unified-quest .v5-option .measure-preview{height: min(5cqw,50px);max-height:60%;max-width:100%}
.v5-gameboard .v5-unified-quest .v5-group-visual{font-size:clamp(12px,1.8cqw,27px);max-width:100%;line-height:1.0!important;overflow:hidden}
/* English keeps the approved owl, treehouse and forest colors but has only ONE
   parchment question-and-picture zone plus the four real answer buttons. */
.v5-gameboard.v5-english-board .v5-unified-quest{
 left:50.0%!important;top:19.1%!important;width:47.7%!important;height:73.0%!important;
 grid-template-rows:minmax(0,68fr) minmax(0,32fr)!important;
}
.v5-gameboard .v5-english-quest .v5-forest-picture{
 position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
 display:grid!important;place-items:center!important;margin:0!important;padding:0!important;
 flex:1 1 0!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
 background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;
 font-size:clamp(36px,8.4cqw,124px)!important;line-height:1!important;overflow:hidden;
}
.v5-gameboard .v5-english-quest .v5-english-choices{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:1fr!important}
.v5-gameboard .v5-english-quest .v5-english-choices.v5-english-words{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}
.v5-gameboard .v5-english-quest .v5-option{
 background:linear-gradient(155deg,#ffc975,#eba54a 62%,#c6782b)!important;
 color:#185d9b!important;border-color:#9d5c28!important;
 font-size:clamp(15px,3.25cqw,55px)!important;text-shadow:1px 1px #fff2d3!important;
}
.v5-gameboard .v5-english-quest .v5-english-words .v5-option{font-size:clamp(11px,1.65cqw,25px)!important;text-shadow:none!important}
/* The original illustrated header and speaker art remain visible; invisible
   accessible hit targets are already handled by the Safari patch above. */
.v5-gameboard .v5-progress-hud{
 left:41.6%!important;top:5.5%!important;width:33.5%!important;height:8.2%!important;
 transform:none!important;min-height:0!important;max-height:none!important;
 padding:clamp(3px,.5cqw,9px)!important;gap:clamp(4px,.6cqw,10px)!important;
}
.v5-gameboard .v5-progress-hud strong{min-width:0!important;font-size:clamp(12px,1.8cqw,30px)!important}
.v5-gameboard .v5-progress-hud .v5-level-badge{font-size:clamp(9px,1.05cqw,17px)!important;padding:1px 6px!important}
.v5-gameboard .v5-lesson-assist{z-index:9}
/* For very small landscape screens, preserve a single scene; do not switch to
   stacked portrait layout. All geometry remains tied to the same viewport. */
@media (orientation:landscape) and (max-height:560px){
 .v5-gameboard .v5-unified-quest{
   top:19.6%!important;left:53.5%!important;width:56.2%!important;height:69.7%!important;
   padding:3px!important;gap:3px!important;border-width:3px!important;border-radius:13px!important;
 }
 .v5-gameboard.v5-english-board .v5-unified-quest{
   top:18.7%!important;left:49.5%!important;width:49.5%!important;height:73.5%!important;
   grid-template-rows:minmax(0,64fr) minmax(0,36fr)!important;
 }
 .v5-gameboard .v5-unified-quest .v5-lesson-question,
 .v5-gameboard.v5-english-board .v5-unified-quest .v5-lesson-question{
   padding:2px 5px!important;border-width:2px!important;border-radius:9px!important;gap:1px!important;
 }
 .v5-gameboard .v5-unified-quest .v5-lesson-question h2,
 .v5-gameboard .v5-unified-quest .v5-lesson-question.v5-has-diagram h2{
    font-size:clamp(11px,1.95cqw,19px)!important;line-height:1.06!important;
 }
 .v5-gameboard .v5-unified-quest .v5-long-question h2{font-size:clamp(10px,1.52cqw,15px)!important}
 .v5-gameboard .v5-unified-quest .v5-option{border-width:2px!important;border-radius:8px!important;padding:2px 4px!important;font-size:clamp(11px,1.65cqw,17px)!important}
 .v5-gameboard .v5-unified-quest .v5-opt-visual{font-size:clamp(12px,2.6cqw,22px)!important}
 .v5-gameboard .v5-unified-quest .v5-question-diagram .ten-frame-svg{width:min(90%,270px)!important}
 .v5-gameboard .v5-english-quest .v5-forest-picture{font-size:clamp(27px,8cqw,70px)!important}
 .v5-gameboard .v5-english-quest .v5-option{font-size:clamp(17px,3.7cqw,31px)!important}
 .v5-gameboard .v5-english-quest .v5-english-words .v5-option{font-size:clamp(11px,1.55cqw,14px)!important}
 .v5-gameboard .v5-progress-hud{top:1.5%!important;height:11.8%!important;left:41.5%!important;width:33.5%!important;padding:2px 5px!important;}
 .v5-gameboard .v5-progress-hud strong{font-size:clamp(12px,2cqw,18px)!important}
 .v5-gameboard .v5-progress-hud .v5-level-badge{font-size:clamp(9px,1.1cqw,13px)!important}
}
@media (orientation:landscape) and (max-height:345px){
 .v5-gameboard .v5-unified-quest{top:18.5%!important;height:73.5%!important}
 .v5-gameboard.v5-english-board .v5-unified-quest{top:18%!important;height:76%!important}
 .v5-gameboard .v5-unified-quest .v5-lesson-question h2{font-size:clamp(10px,1.9cqw,13px)!important}
}
/* iPad and taller desktops use the natural 1672:941 scene coordinates.
   Never scale the wood components independently of the gameboard. */
@media (orientation:landscape) and (min-height:561px){
 .v5-game{place-items:center}
 .v5-gameboard{min-height:0!important;width:min(100vw,calc(100svh * 1672 / 941))!important;aspect-ratio:1672/941!important;background-size:100% 100%!important}
}
@media (prefers-reduced-motion:reduce){.v5-unified-quest *{transition:none!important}}
/* END V5 UNIFIED CENTERED BOARD */
/* Phone cinematic crop: keep the original header entirely visible instead of
   cropping it off and drawing a second small title on top. */
@media(orientation:landscape) and (max-height:560px){
 .v5-gameboard,.v5-game-math .v5-gameboard,.v5-game-english .v5-gameboard{
   background-size:100% auto!important;background-position:center top!important;
 }
 .v5-gameboard .v5-compact-scene-title{display:none!important}
 .v5-gameboard .v5-progress-hud{top:5.7%!important;height:11%!important}
 .v5-gameboard .v5-unified-quest{top:19.9%!important;height:71%!important}
 .v5-gameboard.v5-english-board .v5-unified-quest{top:19%!important;height:74%!important}
}
/* Extend the unified wood base below the last row on very wide phones.
   The approved 16:9 drawing has dormant answer panels close to the bottom;
   this matching plank masks their exposed edges without stretching artwork. */
@media(orientation:landscape) and (max-height:560px) and (min-aspect-ratio:19/10){
 .v5-gameboard::before{
  content:'';position:absolute;z-index:6;pointer-events:none;
  left:26.2%;width:55%;bottom:0;height:10.5%;
  border:3px solid #875024;border-bottom:none;border-radius:0 0 10px 10px;
  background:repeating-linear-gradient(96deg,#bb7537 0 21px,#d59a50 21px 29px,#a8642d 30px 35px);
  box-shadow:inset 0 2px 2px #f3c078,0 -2px 6px #5330137a;
 }
 .v5-gameboard.v5-english-board::before{left:24.2%;width:51.5%;}
}
/* Enlarged, organized paired-picture diagrams inside the one big card. */
.v5-gameboard .v5-unified-quest .groups-scene{
 width:100%;height:100%;display:grid!important;grid-template-columns:1fr 1fr;
 align-items:stretch;gap:clamp(4px,.5cqw,10px);padding:0!important;
}
.v5-gameboard .v5-unified-quest .groups-scene .group-picture{
 display:flex;flex-direction:column;gap:1px;align-items:center;justify-content:center;
 background:#fff9eacb;border:1px solid #e9ca8e;border-radius:clamp(6px,.7cqw,12px);
 min-width:0;padding:2px 4px;font-size:clamp(11px,1.2cqw,20px);overflow:hidden;
}
.v5-gameboard .v5-unified-quest .groups-scene .group-picture>div{
 text-align:center;font-size:clamp(13px,1.75cqw,27px);max-width:100%;line-height:1.05;
 overflow-wrap:anywhere;letter-spacing:0;
}
.v5-gameboard .v5-unified-quest .scene-group{
 border-radius:clamp(5px,.6cqw,10px);padding:clamp(2px,.35cqw,6px);
 background:#fff5d5;border:1px solid #f0d59b;
}
.v5-gameboard .v5-unified-quest .scene-group .objects{
 font-size:clamp(14px,1.7cqw,26px);line-height:1.08;letter-spacing:0;
}
@media(orientation:landscape) and (max-height:560px){
 .v5-gameboard .v5-unified-quest .groups-scene .group-picture{font-size:11px;padding:0 1px}
 .v5-gameboard .v5-unified-quest .groups-scene .group-picture>div{font-size:clamp(10px,1.7cqw,16px)}
 .v5-gameboard .v5-unified-quest .scene-group .objects{font-size:clamp(10px,1.7cqw,16px)}
}
/* THEMED RESULTS: click the buttons painted in the approved image itself.
   Both the illustrated boy/dog and painted buttons stay visible and functional,
   while the extra duplicate controls below the picture are removed. */
.v5-gameboard .v5-result-screen{left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:72%!important;top:17%!important;height:72%!important;bottom:auto!important;box-sizing:border-box;overflow:hidden;min-height:0!important;display:flex!important;flex-direction:column!important;}
.v5-gameboard .v5-result-screen .v5-result-illustration{position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;width:100%!important;height:74%!important;min-height:0!important;max-height:74%!important;object-fit:fill!important;flex:0 0 74%!important;}
.v5-gameboard .v5-result-screen .v5-art-hitzones{position:absolute!important;left:0!important;top:0!important;width:100%!important;height:74%!important;z-index:8;pointer-events:none;}
.v5-art-target{position:absolute!important;pointer-events:auto;display:block!important;border:none!important;background:transparent!important;box-shadow:none!important;padding:0!important;margin:0!important;cursor:pointer;touch-action:manipulation!important;}
.v5-art-target:hover{background:#ffffff16!important;box-shadow:0 0 12px #ffffff4a!important;}
.v5-art-target:focus-visible{outline:4px solid #ffdd39!important;outline-offset:2px!important;border-radius:14px!important;}
.v5-art-next{left:54%;top:65%;width:37%;height:28%;}
.v5-art-hint{left:37%;top:69%;width:27%;height:27%;}
.v5-art-retry{left:66%;top:69%;width:31%;height:27%;}
.v5-gameboard .v5-result-screen .v5-result-copy{box-sizing:border-box!important;position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;flex:1 1 26%!important;max-height:26%!important;width:100%!important;min-height:0!important;height:26%!important;padding:clamp(3px,.65cqw,12px)!important;display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;gap:clamp(4px,.6cqw,12px)!important;overflow:auto!important;background:linear-gradient(155deg,#fff7d9f5,#ffe3b6f5)!important;}
.v5-gameboard .v5-result-screen .v5-result-copy .v5-celebration-heading,
.v5-gameboard .v5-result-screen .v5-result-copy .v5-oops-heading,
.v5-gameboard .v5-result-screen .v5-result-copy .v5-award{display:none!important;}
.v5-gameboard .v5-result-screen .v5-result-copy p{max-width:70%!important;font-size:clamp(11px,1.15cqw,18px)!important;line-height:1.17!important;}
.v5-gameboard .v5-result-screen .v5-result-copy .v5-secondary-link{font-size:clamp(10px,1cqw,15px)!important;padding:6px 12px!important;flex-shrink:0;}
@media (orientation:landscape) and (max-height:560px){
 .v5-gameboard .v5-result-screen{top:14%!important;height:76%!important;width:74%!important;}
 .v5-gameboard .v5-result-screen .v5-result-copy{padding:2px 4px!important;gap:2px 7px!important;}
 .v5-gameboard .v5-result-screen .v5-result-copy p{font-size:clamp(10px,1.5cqw,12px)!important;max-width:72%!important;}
 .v5-gameboard .v5-result-screen .v5-result-copy .v5-secondary-link{padding:3px 6px!important;font-size:10px!important;}
}
/* The approved Oops artwork contains a FIXED 1-heart illustration. Put the
   current dynamic 3-try heart indicator exactly over that sign, never elsewhere.
   It hides the baked static hearts and avoids conflicting/doubled life counts. */
.v5-gameboard .v5-result-oops .v5-life-row{
 position:absolute!important;z-index:12!important;top:6.8%!important;left:40.1%!important;
 right:auto!important;bottom:auto!important;display:flex!important;align-items:center!important;
 justify-content:center!important;min-width:22.0%!important;width:22%!important;height:12.4%!important;
 box-sizing:border-box!important;padding:0 2px!important;margin:0!important;
 border:clamp(2px,.26cqw,4px) solid #dcb17c!important;border-radius:clamp(5px,.7cqw,13px)!important;
 background:linear-gradient(165deg,#85512c,#614021)!important;
 box-shadow:inset 0 2px 2px #e8aa70,0 2px 5px #3a210f88!important;
 font-size:clamp(11px,1.65cqw,24px)!important;line-height:1!important;
}
@media(orientation:landscape) and (max-height:560px){
 .v5-gameboard .v5-result-oops .v5-life-row{top:7%!important;left:40%!important;font-size:clamp(10px,1.9cqw,16px)!important}
}

/* Voice capability warnings must not become giant blue overlays over the game. */
.toast.voice-toast{box-sizing:border-box;max-width:min(350px,68vw)!important;border:2px solid #dfbc83!important;background:linear-gradient(#fff8dd,#ffe8ba)!important;color:#704824!important;border-radius:16px!important;padding:6px 11px!important;box-shadow:0 3px 10px #3d291c66!important;font-size:clamp(10px,1vw,13px)!important;line-height:1.15!important;left:50%!important;right:auto!important;bottom:8px!important;transform:translateX(-50%)!important;}
@media(orientation:landscape) and (max-height:560px){.toast.voice-toast{max-width:230px!important;left:48%!important;font-size:10px!important;padding:3px 6px!important;bottom:1px!important}}
/* Short landscape: leave a clean strip for the title, progress and controls.
   The illustrated success panel must never cover 'Counting Camp' / 'Word Woods'. */
@media(orientation:landscape) and (max-height:560px){
 .v5-gameboard .v5-result-screen{top:20%!important;height:70%!important;}
}

/* Safari read-aloud: visual confirmation that the question has started playing.
   Never overlays the approved design board or duplicates its speaker icon. */
.v5-scene-tools button.voice-speaking{box-shadow:0 0 0 5px rgba(69,212,153,.52),0 8px 20px #25456543;animation:voice-speak-pulse 1.2s ease-in-out infinite}
@keyframes voice-speak-pulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.12)}}
@media(prefers-reduced-motion:reduce){.v5-scene-tools button.voice-speaking{animation:none}}

/* V6 literacy: one readable passage or one large pictogram, not tiny emoji. */
.v5-gameboard .v5-unified-quest .v5-forest-picture{
  min-width:0!important;min-height:0!important;overflow:hidden!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
}
.v5-gameboard .v5-unified-quest .v6-english-pictogram{
  display:grid;place-items:center;width:100%;height:100%;line-height:1;
  font-size:clamp(62px,9.5cqw,156px)!important;
  text-align:center;max-height:100%;overflow:hidden;
}
.v5-gameboard .v5-unified-quest .v6-reading-passage{
  box-sizing:border-box;width:100%;max-height:100%;padding:clamp(5px,.7cqw,12px);
  font-size:clamp(12px,1.5cqw,25px)!important;line-height:1.22;
  font-weight:850;color:#2b4769;background:#fffaf0ee;
  border:2px solid #e5bd7e;border-radius:clamp(8px,1cqw,17px);
  text-align:left;overflow-y:auto;overflow-wrap:break-word;
  -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
}
.v5-gameboard .v5-unified-quest.v6-reading-quest{
  grid-template-rows:minmax(0,70fr) minmax(0,30fr)!important;
}
.v5-gameboard .v5-unified-quest.v6-visual-question{
  grid-template-rows:minmax(0,60fr) minmax(0,40fr)!important;
}
.v5-gameboard .v5-unified-quest .v5-opt-visual{
  font-size:clamp(23px,3.2cqw,48px)!important;
  flex:0 1 auto;overflow:hidden;max-height:68%;line-height:1;
}
.v5-gameboard .v5-unified-quest .v5-group-visual{
  font-size:clamp(16px,2.4cqw,34px)!important;
  max-height:65%;line-height:1.05;
}
@media (orientation:landscape) and (max-height:560px){
 .v5-gameboard .v5-unified-quest .v6-reading-passage{
  font-size:clamp(10px,1.52cqw,16px)!important;
  line-height:1.12;padding:3px 6px;border-width:1px;
 }
 .v5-gameboard .v5-unified-quest .v6-english-pictogram{
  font-size:clamp(37px,8.5cqw,84px)!important;
 }
 .v5-gameboard .v5-unified-quest.v6-reading-quest{
  grid-template-rows:minmax(0,69fr) minmax(0,31fr)!important;
 }
 .v5-gameboard .v5-unified-quest .v5-opt-visual{
  font-size:clamp(17px,2.8cqw,32px)!important;
 }
}

/* V6 interactive earned badges: centered inside the original map's wood area. */
.map-stickers-live.v6-map-badges{
 position:absolute;left:72.7%;top:72.65%;width:14.15%;height:26%;
 display:grid;grid-template-rows:auto minmax(0,1fr);
 justify-items:stretch;align-items:stretch;gap:clamp(4px,.45vw,8px);
 padding:clamp(6px,.7vw,11px);box-sizing:border-box;
 border:3px solid #c18c46;border-radius:clamp(12px,1.5vw,24px);
 background:linear-gradient(155deg,#fff9e3 0%,#ffeac1 100%);
 box-shadow:inset 0 0 0 2px #fffdf2,0 5px 9px #5d3a2150;
 z-index:13;
}
.map-stickers-live.v6-map-badges .map-stickers-header{
 width:100%;height:auto;min-height:0;display:flex;flex-direction:column;
 justify-content:center;align-items:center;text-align:center;gap:0;
 background:#fffdf2;border:1px solid #f1dbb9;border-radius:9px;
 padding:clamp(3px,.4vw,7px);
}
.map-stickers-live.v6-map-badges .map-stickers-header strong{
 color:#664220;font-size:clamp(10px,1.05vw,17px);line-height:1.2;
}
.map-stickers-live.v6-map-badges .map-stickers-header small{
 display:block;font-size:clamp(8px,.76vw,12px);color:#8a6d38;
}
.map-stickers-live.v6-map-badges .map-mini-stickers{
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
 grid-template-rows:repeat(2,minmax(0,1fr));place-items:stretch;
 width:100%;max-width:100%;min-height:0;gap:clamp(2px,.3vw,6px);
}
.map-stickers-live.v6-map-badges .map-mini-sticker{
 display:grid;place-items:center;text-align:center;
 font-size:clamp(14px,1.68vw,29px);
 line-height:1;border-radius:clamp(5px,.6vw,11px);
 border:1px solid #efd8a2;background:#fffcf3;padding:0;min-width:0;min-height:0;
}
.map-stickers-live.v6-map-badges .map-mini-sticker.locked{
 opacity:.38;filter:grayscale(1);
}
.map-stickers-live.v6-map-badges .map-mini-sticker:focus-visible{
 outline:3px solid #126fc1;outline-offset:1px;
}

/* Badge journeys rather than inert sticker taps. */
.v6-badge-journey .v5-wood-sheet{max-width:1220px;margin-inline:auto;}
.v6-badge-journey .v5-wood-sheet>header{text-align:center;}
.v6-badge-grid{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(158px,1fr));
 gap:clamp(10px,1.3vw,20px);width:100%;margin:16px auto;align-items:stretch;
}
.v6-badge-card{
 position:relative;display:flex;flex-direction:column;align-items:center;
 justify-content:flex-start;gap:9px;min-width:0;min-height:200px;
 padding:14px 10px 12px;border:4px solid #a46a32;
 border-radius:21px;background:linear-gradient(165deg,#fffdf3,#fff2cc);
 color:#50391e;font-family:inherit;text-align:center;
 box-shadow:0 5px 0 #81502a,0 11px 23px #47311c3d;
 cursor:pointer;transition:transform .14s ease;
}
.v6-badge-card:hover,.v6-badge-card:focus-visible{transform:translateY(-3px);outline-color:#4393d2;}
.v6-badge-card.earned{border-color:#d29b27;background:linear-gradient(145deg,#fffef0,#ffde7d);}
.v6-badge-card.locked .v6-badge-medal{filter:grayscale(1);opacity:.52;}
.v6-badge-medal{
 width:70px;height:70px;display:grid;place-items:center;border-radius:50%;
 font-size:42px;background:radial-gradient(circle at 30% 20%,#fffde9,#ffd577 74%,#c99043);
 border:3px solid #bb8533;box-shadow:inset 0 0 0 3px #fff9df,0 4px 8px #5f412f33;
}
.v6-badge-card strong{font-size:clamp(15px,1.2vw,19px);line-height:1.18;}
.v6-badge-card small{font-size:12px;line-height:1.25;color:#6a5231;flex:1;}
.v6-badge-card b{font-size:13px;color:#765426;}
.v6-badge-track{display:block;height:9px;min-height:9px;width:92%;background:#d6c5a4;border-radius:20px;overflow:hidden;}
.v6-badge-track i{display:block;height:100%;background:linear-gradient(90deg,#5ecc75,#1ca785);border-radius:20px;}
.v6-badge-next{text-align:center;margin:12px auto;max-width:650px;padding:14px;border:3px solid #d6ac6b;border-radius:18px;background:#fff8dd;}
.v6-badge-next h2{margin:0 0 6px;color:#684422;}
.v6-badge-next p{margin:0 0 13px;}
.v6-badge-modal-icon{
 width:112px;height:112px;margin:12px auto;display:grid;place-items:center;
 border-radius:50%;border:6px solid #e9b64a;
 background:radial-gradient(circle at 35% 25%,#fffde8,#ffcf5a);
 box-shadow:0 9px 18px #59422044;font-size:63px;
}
@media(max-width:660px){.v6-badge-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.v6-badge-card{min-height:170px;padding:9px 6px}.v6-badge-medal{height:58px;width:58px;font-size:34px}}
@media(prefers-reduced-motion:reduce){.v6-badge-card{transition:none}}

/* V7: place-value layout. Explicit columns prevent digit drift at all widths. */
.v7-columns{width:min(100%,370px);height:100%;max-height:100%;display:flex;flex-direction:column;justify-content:center;font-variant-numeric:tabular-nums;color:#152b51;gap:2px;margin:auto}
.v7-column-row,.v7-column-head{display:grid;grid-template-columns:28px repeat(var(--v7-cols),minmax(0,1fr));align-items:center;text-align:center;gap:4px;min-height:0}
.v7-column-head{font-size:clamp(10px,1cqw,14px);font-weight:700;color:#614022}
.v7-column-row{font-size:clamp(21px,2.55cqw,38px);line-height:1.05;font-weight:900;flex:0 1 auto}
.v7-digit{border-radius:7px;padding:2px;min-width:0;letter-spacing:0}
.v7-column-sign small{font-size:10px}.v7-column-rule{height:3px;flex-shrink:0;background:#78532d;margin:1px 0 0 32px;border-radius:3px}
.v7-active-place{background:#ffedab;box-shadow:inset 0 0 0 1px #dab14c}.v7-result{color:#237747}
.v7-carry-row{font-size:18px;min-height:22px;color:#176aac}.v7-carry:empty{visibility:hidden}
.v7-array{display:flex;flex-direction:column;gap:3px;width:min(100%,410px);max-height:100%;margin:auto}
.v7-array-group{display:grid;grid-template-columns:18px repeat(var(--each),minmax(0,1fr));gap:5px;align-items:center;padding:3px 6px;border:1px solid #b6d8c4;border-radius:6px;background:#f1fced;min-height:10px;flex:1;overflow:hidden}
.v7-group-label{font-size:11px;color:#426846}.v7-dot{display:block;aspect-ratio:1;max-height:20px;max-width:20px;width:100%;background:#2186cc;border:1px solid #135688;border-radius:50%;margin:auto}
.v7-sharing{text-align:center;display:flex;flex-direction:column;gap:6px;max-height:100%;width:100%}.v7-sharing>strong{font-size:clamp(13px,1.7cqw,25px)}
.v7-fact{font-size:clamp(18px,2.6cqw,36px);text-align:center;font-weight:900}.v7-round-mode{display:block;font-size:10px;text-transform:capitalize;font-weight:600}
.v7-assist{display:flex!important;align-items:center;flex-wrap:wrap;gap:4px;max-width:43%}.v7-assist button{white-space:nowrap}
.v7-assist .v5-hint-inline{display:none}.v7-teacher-scrim{padding:12px;background:#081c37b8;z-index:10000}
.v7-teacher{width:min(900px,96vw)!important;max-width:900px!important;max-height:94dvh!important;max-height:94vh;overflow:auto!important;padding:18px!important;border:7px solid #a66a32!important;border-radius:24px!important;background:linear-gradient(155deg,#fffdf0,#fff0c8)!important;color:#193553;font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif}
.v7-teacher header,.v7-teacher footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.v7-teacher header>span{font-weight:800}.v7-teacher h2{margin:8px 0 12px;text-align:center;font-size:26px;color:#654022}
.v7-teacher-main{display:grid;grid-template-columns:minmax(0,42fr) minmax(0,58fr);gap:22px;align-items:center}.v7-teacher-visual{min-height:140px;max-height:280px;display:flex;align-items:center;justify-content:center}
.v7-teacher .v7-columns{height:auto;max-height:none;width:100%}.v7-teacher .v7-column-row{font-size:32px}.v7-teacher .v7-column-head{font-size:12px}.v7-teacher .v7-carry-row{font-size:18px}
.v7-teacher-text{min-width:0;font-size:18px;line-height:1.4}.v7-teacher-text p{margin:6px 0}.v7-step-label{display:block;margin:10px 0 6px;font-weight:800}.v7-step-input{display:flex;gap:8px;flex-wrap:wrap}
.v7-step-input input{width:100px;min-height:42px;font-size:24px;text-align:center;border:2px solid #be9659;border-radius:10px;background:#fff}
.v7-teacher button,.v7-end-card button,.v7-action-row button{min-height:42px;padding:8px 14px;border:2px solid #af7435;background:linear-gradient(#fff4d5,#f6d994);border-radius:12px;color:#3a2a13;font:700 15px ui-rounded,'Trebuchet MS',system-ui,sans-serif;cursor:pointer;box-shadow:0 2px 0 #805728}
.v7-teacher button:disabled,.v7-level-grid button:disabled{opacity:.45;cursor:default;box-shadow:none}.v7-teacher button:focus-visible,.v7-level-grid button:focus-visible,.v7-action-row button:focus-visible{outline:3px solid #1886d0;outline-offset:2px}
.v7-teacher footer{margin-top:14px;padding-top:10px;border-top:1px solid #d6ba86}.v7-teacher footer span{font-size:12px;color:#715736}.v7-teaching-mascot{font-size:90px}.v7-teacher .v7-array{max-height:260px}
.v7-teacher .v7-text-link{font-size:13px;box-shadow:none;border:none;background:transparent;text-decoration:underline;min-height:30px}
.v7-end-card{position:absolute;left:50%;top:20%;transform:translateX(-50%);width:68%;height:69%;box-sizing:border-box;background:linear-gradient(140deg,#fffceb,#fff0c8);border:6px solid #a9713c;border-radius:25px;padding:clamp(9px,1.8cqw,26px);text-align:center;display:flex;flex-direction:column;justify-content:center;gap:clamp(3px,.5cqw,10px);overflow:auto;color:#253e59;box-shadow:0 6px 0 #664325}
.v7-end-card h1{font-size:clamp(18px,2.8cqw,37px);margin:0;color:#775023}.v7-end-card p{margin:0;font-size:clamp(11px,1.25cqw,18px)}.v7-end-card>small{font-size:11px;line-height:1.2}
.v7-summary-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.v7-summary-stats>span{background:#fffdf6;border:1px solid #d6b974;border-radius:12px;padding:8px;font-size:13px;display:flex;flex-direction:column}.v7-summary-stats strong{font-size:25px;color:#2d7547}
.v7-action-row{display:flex;gap:9px;justify-content:center;flex-wrap:wrap;margin:10px 0}.v7-journey{width:min(970px,96vw)!important;max-width:970px!important;max-height:92dvh!important;overflow:auto!important}
.v7-journey-status{display:flex;flex-direction:column;align-items:center;gap:5px}.v7-level-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(136px,1fr));gap:12px;margin:16px 0}.v7-level-grid button{border:3px solid #ac773b;background:#fff5d6;padding:12px 8px;border-radius:17px;color:#473016;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:120px;gap:5px;cursor:pointer}.v7-level-grid strong{font-size:27px}.v7-level-grid span{font-size:14px;font-weight:700}.v7-level-grid small{font-size:11px}.v7-level-grid .v7-current-level{border-color:#189d69;background:#e2f8d8}
.v7-evidence{background:#fff8e2;color:#393e4a;padding:18px;border:3px solid #b17e3c;border-radius:20px;margin:20px 0}.v7-evidence h2{margin-top:0;color:#715028}.v7-report-scroll{overflow:auto}.v7-evidence table{width:100%;border-collapse:collapse;font-size:14px}.v7-evidence td,.v7-evidence th{padding:10px 8px;text-align:left;border-bottom:1px solid #decf9f}.v7-evidence td small{display:block;color:#6f624a}.v7-round-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.v7-round-list>div{padding:12px;background:#fffdf2;border-radius:12px;display:flex;flex-direction:column;gap:4px}.v7-round-list small{font-size:11px}
@media(orientation:landscape) and (max-height:500px){
 .v7-columns{max-width:240px;gap:0}.v7-column-row{font-size:clamp(19px,2.7cqw,28px);line-height:1}.v7-column-head{font-size:10px}.v7-column-rule{height:2px}.v7-digit{padding:1px}
 .v7-teacher{padding:9px!important;border-width:4px!important}.v7-teacher h2{font-size:20px;margin:3px 0 7px}.v7-teacher-main{gap:15px}.v7-teacher-text{font-size:14px;line-height:1.24}.v7-teacher footer{margin-top:8px;padding-top:6px}.v7-teacher header{font-size:12px}.v7-teacher .v7-column-row{font-size:24px}.v7-teacher .v7-carry-row{font-size:16px}
 .v7-end-card{width:80%;height:73%;top:18%;border-width:3px;padding:8px;gap:3px}.v7-end-card h1{font-size:19px}.v7-summary-stats>span{font-size:10px;padding:4px}.v7-summary-stats strong{font-size:18px}.v7-end-card button{min-height:32px;font-size:12px;padding:5px 9px}.v7-action-row{margin:5px 0;gap:5px}.v7-end-card>small{font-size:9px}.v7-round-mode{font-size:8px}.v7-array{gap:1px}.v7-array-group{padding:1px 4px;gap:3px}.v7-dot{max-height:12px;max-width:12px}
}
@media(max-width:550px) and (orientation:portrait){.v7-teacher-main{grid-template-columns:1fr}.v7-teacher-visual{max-height:220px}.v7-teacher h2{font-size:22px}.v7-teacher-text{font-size:16px}.v7-teacher footer{flex-wrap:wrap}.v7-teacher footer span{order:3;width:100%;text-align:center}}
.v5-gameboard .v7-columns{max-width:285px}
.v7-teacher .v7-columns{max-width:300px}
@media(orientation:landscape) and (max-height:500px){.v5-gameboard .v7-columns{max-width:235px}}
/* Intrinsically scaled SVG counters cannot grow beyond the question region. */
.v7-array{width:100%;height:100%;min-height:0;display:flex;align-items:center;justify-content:center;overflow:visible;max-height:100%}
.v7-array-svg{display:block;height:100%;width:100%;max-width:100%;max-height:100%;min-height:0}
.v7-sharing{height:100%;min-height:0}
.v7-sharing>.v7-array{flex:1 1 0;min-height:0;height:0}
.v7-teacher-visual>.v7-array{height:230px;max-height:230px}
@media(orientation:landscape) and (max-height:500px){.v7-teacher-visual>.v7-array{height:150px;max-height:150px}}

/* v7.0.1 speaker-target: positions are measured from the approved scenery.
   Old header flex sizing left the click area beside/above the drawn speaker.
   Only the buttons receive pointer events; this full-board layer cannot block
   answer cards, scenes, or the status toolbar. No second speaker is painted. */
.v5-gameboard .v5-scene-tools{
 position:absolute!important;inset:0!important;left:0!important;right:auto!important;
 top:0!important;bottom:auto!important;width:100%!important;height:100%!important;
 display:block!important;transform:none!important;margin:0!important;padding:0!important;
 z-index:40!important;pointer-events:none!important;gap:0!important;
}
.v5-gameboard .v5-scene-tools button{
 position:absolute!important;min-width:0!important;min-height:0!important;
 max-width:none!important;max-height:none!important;display:block!important;
 margin:0!important;padding:0!important;transform:none!important;border-radius:50%!important;
 pointer-events:auto!important;touch-action:manipulation!important;cursor:pointer;
 background:transparent!important;border:0!important;box-shadow:none!important;
 color:transparent!important;font-size:0!important;-webkit-appearance:none;appearance:none;
}
.v5-gameboard .v5-scene-tools button:active{outline:3px solid #ffd36a!important;outline-offset:-3px!important}
.v5-gameboard .v5-scene-tools button.voice-speaking{outline:3px solid #42bd88!important;outline-offset:-3px!important;animation:none!important}
.v5-scene-tools [data-reader-status]{position:absolute;pointer-events:none;display:block;text-align:center;font-size:clamp(10px,1cqw,14px);font-weight:800;line-height:1.2;color:#254d74;background:#fff9e9f5;border:1px solid #ebc382;border-radius:8px;padding:3px 4px;}
.v5-scene-tools [data-reader-status]:empty{display:none}
