:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#fff;background:#06152f}*{box-sizing:border-box}html,body,#app{margin:0;width:100%;height:100%;overflow:hidden;touch-action:none}#app{position:relative;background:linear-gradient(#071a49,#1788b8 70%,#f8c86a)}canvas{display:block;width:100%;height:100%}.panel{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(88vw,520px);padding:28px;text-align:center;border:2px solid #ffffff55;border-radius:28px;background:#061b44ed;box-shadow:0 18px 60px #0008;backdrop-filter:blur(10px)}.logo{font-size:72px;filter:drop-shadow(0 8px 8px #0006)}h1{font-size:clamp(36px,8vw,68px);margin:0;color:#ffd24a;text-shadow:0 4px #ba6718}p{font-size:clamp(18px,3vw,26px)}button{border:0;border-radius:18px;padding:14px 30px;font-weight:800;font-size:22px;color:#071a49;background:linear-gradient(#ffe56e,#ffb52e);box-shadow:0 6px 0 #bc6716;cursor:pointer}button:active{transform:translateY(4px);box-shadow:0 2px 0 #bc6716}small{display:block;margin-top:22px;color:#bdeaff}.hidden{display:none!important}#fire{position:absolute;right:max(22px,env(safe-area-inset-right));bottom:max(24px,env(safe-area-inset-bottom));width:86px;height:86px;border-radius:50%;padding:0;font-size:38px;border:5px solid #fff8}#sound{position:absolute;left:max(14px,env(safe-area-inset-left));top:max(14px,env(safe-area-inset-top));width:52px;height:52px;border-radius:50%;padding:0;font-size:24px;box-shadow:0 4px 0 #18435e;background:#ffffffdd}@media(orientation:portrait){#app:after{content:"لفّ الهاتف للوضع الأفقي ↻";position:absolute;inset:0;display:grid;place-items:center;text-align:center;font-size:28px;font-weight:900;background:#061b44;z-index:20}#app>*{visibility:hidden}#app:after{visibility:visible}}
.difficulty{display:flex;gap:10px;margin:18px 0}.difficulty button{flex:1;padding:10px 5px;font-size:15px;background:#173d68;color:#fff;box-shadow:0 4px 0 #08203e}.difficulty button small{font-size:11px;margin:3px 0 0}.difficulty button.selected{background:linear-gradient(#ffe56e,#ffb52e);color:#071a49;outline:3px solid #fff}#toast{position:absolute;left:50%;bottom:25%;transform:translateX(-50%) scale(.7);opacity:0;padding:10px 24px;border-radius:20px;background:#071a49e8;color:#fff;font-size:30px;font-weight:900;pointer-events:none;transition:.2s}#toast.show{opacity:1;transform:translateX(-50%) scale(1)}
.animal-card .animal{height:94px;display:grid;place-items:center;overflow:hidden;border-radius:15px}.animal-card .animal img{width:100%;height:94px;object-fit:cover}
.target-preview{position:absolute;top:18px;left:50%;transform:translateX(-50%);width:400px;height:118px;display:flex;align-items:center;gap:16px;padding:9px 18px;border-radius:27px;background:#071a49ee;border:3px solid #ffffff77;z-index:3;pointer-events:none}.target-preview img{width:118px;height:94px;object-fit:cover;border-radius:18px;border:3px solid #fff}.target-preview div{flex:1;text-align:center}.target-preview span{display:block;font-size:18px;color:#ffe16a;font-weight:800}.target-preview b{display:block;font-size:34px;letter-spacing:7px;color:#fff}
.target-preview{top:0;bottom:0;left:0;transform:none;width:20%;height:100%;flex-direction:column;justify-content:center;padding:18px 14px;border-radius:0 28px 28px 0;border:0;border-right:5px solid #ffe16a;background:linear-gradient(#073a53ee,#092744f5);box-shadow:12px 0 35px #001b2d99}.target-preview img{width:100%;height:min(48vh,350px);border-radius:22px;border:5px solid #fff;box-shadow:0 9px 0 #c97920}.target-preview div{flex:0;width:100%;padding:12px 4px;border-radius:18px;background:#ffffff18}.target-preview span{font-size:24px}.target-preview b{font-size:clamp(20px,2.2vw,34px);letter-spacing:5px;overflow-wrap:anywhere}#mapPath{position:relative;background:linear-gradient(#0b6d5b99,#0a483fcc),url('assets/jungle-background.png') center/cover fixed;padding-top:110px}.stage-node{margin:34px auto}.stage-node:after{content:"";position:absolute;z-index:-1;left:50%;top:62px;width:14px;height:66px;border-radius:12px;background:#f2c56e;box-shadow:0 0 0 5px #744e24aa}.map-zone{width:max-content;margin:54px auto 22px;padding:12px 28px;border-radius:24px;background:#07384fe8;border:3px solid #ffe16a;color:#fff;font-size:24px;font-weight:900;box-shadow:0 7px 0 #052635}.map-zone span{display:block;color:#bff4cf;font-size:13px;text-align:center}
.celebration{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;background:radial-gradient(circle,#ffe76a99,#063c56ee 65%);z-index:10}.rays{position:absolute;width:850px;height:850px;background:repeating-conic-gradient(#fff6 0 8deg,transparent 8deg 18deg);animation:spin 14s linear infinite;border-radius:50%}.reward-card{position:relative;width:min(88vw,440px);padding:16px 22px 22px;text-align:center;border-radius:30px;background:linear-gradient(#fffdf2,#dfffe8);color:#113a44;border:6px solid #ffe067;box-shadow:0 15px 0 #b76d18,0 25px 70px #0009;animation:rewardIn .7s cubic-bezier(.2,1.5,.4,1)}.reward-card h2{margin:0;color:#e27218;font-size:32px}.reward-card h3{margin:8px 0 0;font-size:34px;color:#0c745a}.reward-card p{margin:0 0 12px;font-weight:800}.reward-card img{width:220px;height:180px;object-fit:cover;border-radius:24px;border:5px solid #fff;box-shadow:0 8px 22px #0004}.crown{position:absolute;left:50%;top:-38px;transform:translateX(-50%);font-size:52px}.reward-actions{display:flex;gap:12px}.reward-actions button{flex:1;padding:11px;font-size:17px}.confetti-piece{position:absolute;top:-10%;width:13px;height:25px;border-radius:4px;animation:fall 2.7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@keyframes rewardIn{from{transform:scale(.25) rotate(-8deg);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fall{to{transform:translateY(120vh) rotate(720deg)}}
.screen{position:absolute;inset:0;background:linear-gradient(#063a4caa,#0c6b5dbb),url('assets/jungle-background.png') center/cover;overflow:hidden}.screen header{height:82px;display:flex;align-items:center;justify-content:space-between;padding:10px 22px;background:#062e43e8;border-bottom:3px solid #ffffff44;z-index:2;position:relative}.screen header b{display:block;text-align:center;font-size:28px;color:#ffe565}.screen header small{margin:2px 0 0;text-align:center;font-size:14px}.round{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;padding:0;font-size:27px;background:#fff3;box-shadow:0 4px 0 #052538;color:#fff}.screen header span.round{border:2px solid #fff5}#mapPath{height:calc(100% - 82px);overflow-y:auto;padding:80px 0 150px;scroll-behavior:smooth;background:linear-gradient(90deg,transparent 20%,#d8a950aa 20% 22%,transparent 22% 78%,#d8a950aa 78% 80%,transparent 80%)}.stage-node{position:relative;display:grid;place-items:center;width:74px;height:74px;margin:22px auto;border-radius:50%;font-size:25px;font-weight:900;background:linear-gradient(#fff48c,#ffb72e);color:#17334b;border:6px solid #fff;box-shadow:0 8px 0 #a65a17,0 10px 25px #0007}.stage-node:nth-child(4n+1){transform:translateX(-150px)}.stage-node:nth-child(4n+3){transform:translateX(150px)}.stage-node.locked{filter:grayscale(1);opacity:.72;background:#739098;color:#e6f1f1;box-shadow:0 7px 0 #3b555c}.stage-node.current{animation:pulse 1.2s infinite;outline:7px solid #62f2a0}.stage-node .stars{position:absolute;top:-24px;font-size:15px;white-space:nowrap}.stage-node .gift{position:absolute;right:-26px;top:-15px;font-size:28px}@keyframes pulse{50%{transform:scale(1.09)}}#animalGrid{height:calc(100% - 82px);overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:16px;padding:24px}.animal-card{min-height:155px;border-radius:22px;padding:12px;text-align:center;background:linear-gradient(#fffdf0,#d9ffe5);color:#163b43;border:4px solid #fff;box-shadow:0 7px 0 #176d59}.animal-card .animal{font-size:61px;filter:drop-shadow(0 4px 2px #0002)}.animal-card b{display:block;font-size:18px}.animal-card small{margin:3px 0;color:#39705f}.animal-card.locked{filter:grayscale(1);background:#789297;color:#dce7e8}.animal-card.locked .animal{filter:blur(7px)}

/* Jungle journey map */
#mapPath{background:linear-gradient(#083f3266,#05291ecc),var(--map-bg,url('assets/jungle-background.png')) center/cover fixed;padding:90px 0 160px}
.map-vines{position:sticky;top:8px;z-index:4;width:max-content;max-width:90%;margin:-65px auto 28px;padding:8px 22px;border-radius:24px;background:#063d2ddd;border:2px solid #b6f099;color:#fff;font-size:24px;letter-spacing:10px;box-shadow:0 8px 20px #0019}
.map-zone{width:max-content;margin:66px auto 38px;padding:13px 34px;border-radius:8px;background:linear-gradient(#8b592d,#543017);border:4px solid #c88a47;color:#fff5be;font-size:24px;font-weight:900;box-shadow:0 9px 0 #321a0b,0 14px 25px #0018;transform:rotate(-1deg)}
.map-zone strong{display:block}.map-zone span{display:block;color:#e5ffd7;font-size:13px;text-align:center}
.stage-node{position:relative;display:flex;align-items:center;justify-content:center;gap:7px;width:132px;height:66px;margin:38px auto;border-radius:9px;padding:7px 14px;background:linear-gradient(175deg,#b97838,#70401d);color:#fff6c2;border:4px solid #d89a51;box-shadow:0 8px 0 #3f210e,0 13px 25px #0019;text-shadow:0 2px #301608;transform:rotate(-2deg)}
.stage-node:before,.stage-node:after{content:"";position:absolute;z-index:-1;top:50%;width:14px;height:86px;border-radius:7px;background:#4d2b15;border:2px solid #2d170a}.stage-node:before{left:13px}.stage-node:after{right:13px}.stage-node:nth-child(4n+1){transform:translateX(-155px) rotate(-3deg)}.stage-node:nth-child(4n+3){transform:translateX(155px) rotate(3deg)}
.stage-node .stage-label{font-size:12px;color:#ffdda1}.stage-node strong{font-size:29px}.stage-node .stars{position:absolute;top:-26px;font-size:15px;white-space:nowrap;text-shadow:none}.stage-node .gift{position:absolute;right:-27px;top:-22px;font-size:31px;filter:drop-shadow(0 4px 2px #0007)}
.stage-node.locked{filter:grayscale(.85);opacity:.78;background:linear-gradient(#725b49,#4e3d31);color:#eee;box-shadow:0 8px 0 #28201b}.stage-node.current{animation:signPulse 1.25s infinite;outline:6px solid #74ff99;outline-offset:4px}@keyframes signPulse{50%{filter:brightness(1.25);box-shadow:0 8px 0 #3f210e,0 0 35px #7cff9f}}

/* Clear left learning card */
.target-preview:before{content:attr(data-label);font-weight:900;color:#fff;background:#e56f24;padding:7px 12px;border-radius:20px;margin-bottom:10px}.target-preview img{height:min(43vh,315px)}.target-preview div{margin-top:15px}.target-preview b:before{content:"SPELL THE WORD";display:block;margin-bottom:7px;letter-spacing:0;font-size:13px;color:#bff4cf}

/* Celebration popup */
.learned-badge{display:inline-block;margin:3px 0 10px;padding:5px 13px;border-radius:18px;background:#0b805f;color:#fff;font-size:14px;font-weight:900}.reward-card{width:min(90vw,475px);padding:18px 24px 22px;border-radius:34px}.reward-card img{width:240px;height:190px}.hear-name{margin:0 0 13px;padding:8px 18px;font-size:15px;background:linear-gradient(#66e7ff,#2db4d5);box-shadow:0 5px 0 #16748a}.reward-actions button{font-size:15px}

/* Lively sanctuary */
.sanctuary-body{height:calc(100% - 82px);overflow-y:auto;padding:20px 24px 50px;background:linear-gradient(#0b6a4877,#062d29bb),url('assets/jungle-background.png') center/cover fixed}.sanctuary-welcome{max-width:880px;margin:0 auto 20px;display:flex;align-items:center;justify-content:center;gap:18px;padding:14px 22px;border:4px solid #fff1a2;border-radius:25px;background:linear-gradient(135deg,#fff7b9,#b7f6b5);color:#174d3d;box-shadow:0 8px 0 #387a42,0 14px 28px #0017}.sanctuary-welcome>span{font-size:42px}.sanctuary-welcome b{display:block;font-size:21px}.sanctuary-welcome small{margin:4px 0 0;color:#34745d;font-size:13px}#animalGrid{height:auto;overflow:visible;max-width:1050px;margin:auto;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:20px;padding:8px}.animal-card{position:relative;min-height:190px;border-radius:25px;padding:12px;background:linear-gradient(#fffbe8,#c8ffd8);border:5px solid #fff8bf;box-shadow:0 9px 0 #216b48,0 15px 25px #0015;transition:.2s}.animal-card:not(.locked):hover{transform:translateY(-5px) rotate(-1deg);filter:brightness(1.05)}.animal-card:before{content:"🌿";position:absolute;right:-8px;top:-12px;font-size:30px;filter:none}.animal-card .animal,.animal-card .animal img{height:112px}.animal-card b{font-size:20px;color:#164633}.animal-card small{margin:4px 0 0;color:#39705f}.animal-card.locked{background:linear-gradient(#8ba39a,#637a72);border-color:#bdd1c8}.animal-card.locked:before{content:"🌿"}

/* Reliable mobile rotation: never hide the game controls themselves. */
#rotatePrompt{display:none}
#orientationToggle{position:absolute;z-index:60;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));display:none;align-items:center;gap:5px;padding:8px 12px;border:2px solid #fff;border-radius:15px;background:linear-gradient(#68e7ff,#2ba8cf);box-shadow:0 4px 0 #17637e;color:#082d4e;font-size:12px}
@media(orientation:portrait){
  #app>*{visibility:visible}
  #app:after{display:none!important}
  #rotatePrompt{display:none!important}
  #orientationToggle{display:none!important}
}

/* Ensure the compact Unit 6 card contract wins over older responsive overrides. */
#lessonScreen.kg1-lesson .lesson-words>button.missing-card{grid-template-rows:78px 22px 18px 16px!important;min-height:0!important;height:142px!important;padding:4px!important;align-items:start!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card .lesson-media{min-height:76px!important;height:76px!important;max-height:76px!important;display:grid!important;place-items:center!important;margin:0!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card .lesson-media img{width:76px!important;height:76px!important;max-width:100%!important;max-height:76px!important;object-fit:contain!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card b,#lessonScreen.kg1-lesson .lesson-words>button.missing-card small{align-self:start!important;margin:0!important;line-height:1!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card small{font-size:7px!important;line-height:15px!important}
@media(max-width:700px){#lessonScreen.kg1-lesson .lesson-words{grid-auto-rows:146px!important;gap:7px!important}#lessonScreen.kg1-lesson .lesson-words>button.missing-card{height:142px!important}}

/* Final override for compact KG1 Unit 6 lesson cards. */
#lessonScreen.kg1-lesson .lesson-words>button.missing-card{grid-template-rows:78px 22px 18px 16px!important;min-height:0!important;height:142px!important;padding:4px!important;align-items:start!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card .lesson-media{min-height:76px!important;height:76px!important;max-height:76px!important;display:grid!important;place-items:center!important;margin:0!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card .lesson-media img{width:76px!important;height:76px!important;max-width:100%!important;max-height:76px!important;object-fit:contain!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card b,#lessonScreen.kg1-lesson .lesson-words>button.missing-card small{align-self:start!important;margin:0!important;line-height:1!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card small{font-size:7px!important;line-height:15px!important}
@media(max-width:700px){#lessonScreen.kg1-lesson .lesson-words{grid-auto-rows:146px!important;gap:7px!important}#lessonScreen.kg1-lesson .lesson-words>button.missing-card{height:142px!important}}

/* Money quiz template: two answer columns, larger currency, no duplicate equation caption. */
@media (orientation:portrait){
  #examScreen[data-world="numbers"] .exam-choices{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  #examScreen[data-world="numbers"] .exam-visual:has(.stage-egypt-money) .stage-egypt-money>small{display:none!important}
  #examScreen[data-world="numbers"] .exam-visual:has(.stage-egypt-money) img.money-asset{transform:scale(1.4);transform-origin:center}
}

/* Final color-shape asset and missing-letter spacing pass. */
.kg1-combo-single-art{
  display:block!important;
  width:70%!important;
  height:70%!important;
  max-width:70%!important;
  max-height:70%!important;
  margin:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card .kg1-combo-single-art,
#kg1ChoiceGrid:has(.kg1-combo-target) .kg1-combo-target .kg1-combo-single-art,
#examScreen .exam-visual .kg1-combo-single-art{
  width:72%!important;
  height:72%!important;
  max-width:72%!important;
  max-height:72%!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card{
  grid-template-rows:minmax(0,1fr) auto!important;
  align-items:center!important;
  justify-items:center!important;
  padding:10px!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card .lesson-media{
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card b{
  font-size:clamp(14px,3.4vw,20px)!important;
  font-weight:800!important;
  line-height:1.08!important;
  text-align:center!important
}
#kg1ChoiceGrid:has(.kg1-combo-target){
  grid-template-rows:minmax(145px,.92fr) repeat(2,minmax(86px,.42fr))!important;
  align-content:center!important
}
#kg1ChoiceGrid .kg1-combo-target{
  grid-column:1/-1!important;
  display:grid!important;
  place-items:center!important;
  min-height:clamp(145px,28svh,230px)!important;
  width:100%!important
}
#kg1ChoiceGrid:has(.kg1-combo-target) .kg1-option.word-option{
  display:grid!important;
  place-items:center!important;
  min-height:86px!important;
  height:100%!important;
  padding:8px 10px!important;
  border-radius:22px!important
}
#kg1ChoiceGrid:has(.kg1-combo-target) .word-option b{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  font-size:clamp(18px,4.6vw,28px)!important;
  font-weight:800!important;
  line-height:1.06!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  text-align:center!important
}
.reward-card img[src*="/kg1-colors-shapes/combo/"],.reward-card img[src*="kg1-colors-shapes/combo/"]{
  width:min(42vw,185px)!important;
  height:min(26svh,185px)!important;
  max-width:70%!important;
  max-height:70%!important;
  object-fit:contain!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important
}
#examScreen.missing-letter-exam .exam-card-body{
  padding-top:clamp(18px,3.8svh,42px)!important;
  justify-content:flex-start!important
}
#examScreen.missing-letter-exam #examPrompt{
  margin-top:clamp(10px,2.4svh,24px)!important;
  margin-bottom:clamp(8px,1.8svh,18px)!important;
  font-size:clamp(23px,5.6vw,34px)!important;
  font-weight:900!important;
  line-height:1.12!important;
  text-align:center!important
}
#examScreen.missing-letter-exam #examPrompt strong{
  display:block!important;
  font-weight:1000!important;
  font-size:1.08em!important;
  color:#092f58!important
}
#examScreen.missing-letter-exam .exam-visual{
  min-height:clamp(150px,25svh,220px)!important;
  margin-top:clamp(8px,1.8svh,16px)!important;
  margin-bottom:clamp(10px,2.2svh,22px)!important
}
#examScreen.missing-letter-exam .exam-choices{
  margin-top:clamp(8px,1.8svh,18px)!important;
  margin-bottom:clamp(78px,12svh,116px)!important
}
.kg1-match-card.match-word b{
  font-size:clamp(17px,5.2vw,32px)!important;
  line-height:1.02!important;
  font-weight:900!important;
  text-align:center!important;
  max-width:92%!important;
  margin:auto!important
}

/* Final KG1 action guard: keep these art assets 15% smaller on play/quiz
   surfaces after every earlier mobile override has run. */
#targetPreview #targetImage[src*="kg1-actions/look.png"],
#targetPreview #targetImage[src*="kg1-actions/run.png"],
#targetPreview #targetImage[src*="kg1-actions/clap.png"],
#targetPreview #targetImage[src*="kg1-actions/dance.png"],
#targetPreview #targetImage[src*="kg1-actions/drink.png"],
#targetPreview #targetImage[src*="kg1-actions/walk.png"],
#targetPreview #targetImage[src*="kg1-actions/stand.png"],
#targetPreview #targetImage[src*="kg1-actions/sit.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/look.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/run.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/clap.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/dance.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/drink.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/walk.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/stand.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/sit.png"],
.kg1-match-card img[src*="kg1-actions/look.png"],
.kg1-match-card img[src*="kg1-actions/run.png"],
.kg1-match-card img[src*="kg1-actions/clap.png"],
.kg1-match-card img[src*="kg1-actions/dance.png"],
.kg1-match-card img[src*="kg1-actions/drink.png"],
.kg1-match-card img[src*="kg1-actions/walk.png"],
.kg1-match-card img[src*="kg1-actions/stand.png"],
.kg1-match-card img[src*="kg1-actions/sit.png"],
.exam-visual img[src*="kg1-actions/look.png"],
.exam-visual img[src*="kg1-actions/run.png"],
.exam-visual img[src*="kg1-actions/clap.png"],
.exam-visual img[src*="kg1-actions/dance.png"],
.exam-visual img[src*="kg1-actions/drink.png"],
.exam-visual img[src*="kg1-actions/walk.png"],
.exam-visual img[src*="kg1-actions/stand.png"],
.exam-visual img[src*="kg1-actions/sit.png"]{
  transform:scale(.85)!important;
  transform-origin:center!important;
}

.kg1-choice-board .kg1-choice-image[src*="kg1-actions/look.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/run.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/clap.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/dance.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/drink.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/walk.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/stand.png"],
.kg1-choice-board .kg1-choice-image[src*="kg1-actions/sit.png"]{
  max-width:72%!important;
  max-height:72%!important;
}

/* KG1 Number lessons: Count and Choose lesson cards should preview the actual
   counted objects, not a broken image path or oversized word art. */
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card{
  grid-template-rows:minmax(88px,1fr) auto 0 18px!important;
  padding:8px!important;
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card .kg1-lesson-count{
  display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:wrap!important;
  gap:4px!important;width:100%!important;height:100%!important;min-height:88px!important;max-height:132px!important;
  padding:5px!important;overflow:hidden!important;
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card .kg1-lesson-count img{
  width:clamp(30px,10vw,64px)!important;height:clamp(30px,10vw,64px)!important;
  max-width:32%!important;max-height:48%!important;object-fit:contain!important;transform:none!important;
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card .kg1-lesson-count.count-1 img,
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card .kg1-lesson-count.count-2 img{
  width:clamp(54px,17vw,96px)!important;height:clamp(54px,17vw,96px)!important;max-width:46%!important;max-height:78%!important;
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card .kg1-lesson-count.count-8 img,
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card .kg1-lesson-count.count-9 img,
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card .kg1-lesson-count.count-10 img{
  width:clamp(24px,7.2vw,46px)!important;height:clamp(24px,7.2vw,46px)!important;max-width:22%!important;max-height:34%!important;
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-count-card>b{
  font-size:clamp(20px,5vw,32px)!important;line-height:1!important;margin-top:2px!important;
}

/* KG1 Number match stages: keep the three word choices in one balanced row. */
.kg1-choice-grid:has(.kg1-number-match-target){
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:minmax(0,.9fr) minmax(82px,.52fr)!important;
  align-content:center!important;
}
.kg1-choice-grid:has(.kg1-number-match-target) .kg1-number-match-target{
  grid-column:1/-1!important;
}
.kg1-choice-grid:has(.kg1-number-match-target) .number-match-option{
  min-height:clamp(82px,14svh,132px)!important;
}
.kg1-choice-grid:has(.kg1-number-match-target) .number-match-option b{
  font-size:clamp(17px,4.1vw,30px)!important;
}
.kg1-exam-missing-number b.completed-word{
  color:#fff4a3!important;border-color:#63dfbd!important;background:#ffffff1d!important;
}

#lessonScreen.kg1-lesson .lesson-words>button:has(.lesson-media img[src*="kg1-unit7/numbers/"]){
  grid-template-rows:minmax(112px,1fr) auto 0 18px!important;
}
#lessonScreen.kg1-lesson .lesson-words>button:has(.lesson-media img[src*="kg1-unit7/numbers/"]) .lesson-media img{
  max-width:200%!important;
  max-height:200%!important;
  width:auto!important;
  height:auto!important;
  transform:scale(2)!important;
  transform-origin:center!important;
}
#lessonScreen.kg1-lesson .lesson-words>button:has(.lesson-media img[src*="kg1-unit7/numbers/"])>b{
  font-size:clamp(28px,7.4vw,54px)!important;
  line-height:1!important;
}
.kg1-match-card.match-picture img[src*="kg1-actions/"]{
  max-width:96%!important;
  max-height:96%!important;
  transform:scale(1.14)!important;
  transform-origin:center!important;
}
.kg1-match-card.match-word b{
  font-size:clamp(22px,5.5vw,41px)!important;
}
#examScreen.action-missing-exam .exam-card-body{
  padding-top:clamp(24px,7svh,64px)!important;
}
#examScreen.action-missing-exam #examPrompt{
  margin-top:clamp(10px,3svh,28px)!important;
  margin-bottom:clamp(12px,3svh,26px)!important;
  font-weight:1000!important;
  font-size:clamp(23px,6vw,34px)!important;
  line-height:1.16!important;
}
#examScreen.action-missing-exam .exam-visual{
  margin-top:clamp(8px,2.4svh,22px)!important;
  margin-bottom:clamp(18px,4svh,34px)!important;
  min-height:clamp(170px,30svh,250px)!important;
}
#examScreen.action-missing-exam .exam-choices{
  margin-top:clamp(12px,3.2svh,30px)!important;
}

/* Ensure the compact Unit 6 card contract wins over older responsive overrides. */
#lessonScreen.kg1-lesson .lesson-words>button.missing-card{grid-template-rows:78px 22px 18px 16px!important;min-height:0!important;height:142px!important;padding:4px!important;align-items:start!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card .lesson-media{min-height:76px!important;height:76px!important;max-height:76px!important;display:grid!important;place-items:center!important;margin:0!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card .lesson-media img{width:76px!important;height:76px!important;max-width:100%!important;max-height:76px!important;object-fit:contain!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card b,#lessonScreen.kg1-lesson .lesson-words>button.missing-card small{align-self:start!important;margin:0!important;line-height:1!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card small{font-size:7px!important;line-height:15px!important}
@media(max-width:700px){#lessonScreen.kg1-lesson .lesson-words{grid-auto-rows:146px!important;gap:7px!important}#lessonScreen.kg1-lesson .lesson-words>button.missing-card{height:142px!important}}

/* v169: absolute final contract for the standalone renaming activity.
   This intentionally comes last so legacy target-preview and fraction rules
   cannot shrink or reposition this screen. */
@media (orientation:portrait){
  #app.renaming-fullscreen .target-preview.renaming-fullscreen,
  #app.renaming-fullscreen .target-preview.renaming-fullscreen.number-hard:has(.renaming-board){
    position:absolute!important;inset:68px 10px 14px!important;
    width:auto!important;height:calc(100dvh - 82px)!important;max-height:none!important;min-height:560px!important;
    margin:0!important;transform:none!important;display:block!important;
    padding:0!important;overflow:hidden!important
  }
  #app.renaming-fullscreen .target-preview.renaming-fullscreen:before{
    position:absolute!important;z-index:2!important;top:0!important;left:0!important;right:0!important;
    width:100%!important;height:92px!important;margin:0!important;padding:0 62px 0 18px!important;
    font-size:clamp(22px,6.5vw,31px)!important;white-space:nowrap!important;overflow:hidden!important
  }
  #app.renaming-fullscreen .target-preview.renaming-fullscreen>#grade2StagePanel{
    position:absolute!important;z-index:3!important;inset:100px 8px 8px!important;
    width:auto!important;height:auto!important;max-width:none!important;margin:0!important;padding:12px!important;
    display:grid!important;place-items:center!important;overflow:visible!important;pointer-events:auto!important
  }
  #app.renaming-fullscreen .target-preview.renaming-fullscreen{pointer-events:auto!important}
  #app.renaming-fullscreen .target-preview.renaming-fullscreen button{pointer-events:auto!important;position:relative!important;z-index:30!important}
  #app.renaming-fullscreen .renaming-board{align-content:center!important;width:100%!important;height:100%!important;max-width:430px!important;gap:16px!important}
  #app.renaming-fullscreen .renaming-expression{font-size:clamp(40px,11vw,58px)!important;line-height:1!important}
  #app.renaming-fullscreen .place-columns{width:min(100%,360px)!important}
  #app.renaming-fullscreen .ones-tray{width:min(100%,360px)!important;min-height:54px!important;align-content:center!important}
  #app.renaming-fullscreen .make-ten-button{width:min(100%,360px)!important;min-height:68px!important}
  #app.renaming-fullscreen .renaming-answers{width:min(100%,360px)!important}
  #app.renaming-fullscreen #exitStage{top:12px!important;left:12px!important;right:auto!important;bottom:auto!important;transform:none!important}
  #app.renaming-fullscreen #helpStage{top:12px!important;left:68px!important;right:auto!important;bottom:auto!important;transform:none!important}
  #app.renaming-fullscreen #repeatStage{top:12px!important;right:68px!important;left:auto!important;bottom:auto!important;transform:none!important}
  #app.renaming-fullscreen #sound{top:12px!important;right:12px!important;left:auto!important;bottom:auto!important;transform:none!important}
}

/* Non-shooting lessons are full-screen learning boards, not a squeezed
   shooter with a worksheet placed over it. */
#app.renaming-fullscreen{background:linear-gradient(180deg,#f8fff7 0%,#e7fff4 100%)!important}
#app.renaming-fullscreen canvas{visibility:hidden!important}
#app.renaming-fullscreen #fire{display:none!important}
#app.renaming-fullscreen .placement-fab{display:none!important}
.target-preview.renaming-fullscreen{pointer-events:auto!important}
.renaming-lesson-media{display:grid!important;place-items:center!important}
.lesson-place-mat{display:grid!important;grid-template-columns:repeat(3,1fr);gap:5px;width:min(100%,230px);padding:8px;border:3px solid #4dcdbb;border-radius:12px;background:#ecfff8;color:#14506d;text-align:center}
.lesson-place-mat b{font-size:9px!important;letter-spacing:0!important;color:#116b78!important}.lesson-place-mat strong{font-size:24px;color:#123d78}
@media(orientation:portrait){
  .target-preview.renaming-fullscreen{top:66px!important;left:10px!important;right:10px!important;bottom:14px!important;width:auto!important;height:auto!important;min-height:0!important;display:block!important;padding:12px!important;border:5px solid #55cfc7!important;border-radius:28px!important;background:linear-gradient(180deg,#0b526e 0 108px,#f9fff9 108px 100%)!important;box-shadow:0 8px 0 #084052!important;overflow:hidden!important}
  .target-preview.renaming-fullscreen:before{content:'MAKE A NEW TEN'!important;display:grid!important;place-items:center!important;height:78px!important;margin:0!important;padding:0 10px!important;background:transparent!important;color:#ffe36c!important;font-size:clamp(25px,7vw,34px)!important;line-height:1!important;box-shadow:none!important}
  .target-preview.renaming-fullscreen>#targetImage,.target-preview.renaming-fullscreen>#targetEmoji,.target-preview.renaming-fullscreen>div:not(#grade2StagePanel){display:none!important}
  .target-preview.renaming-fullscreen>#grade2StagePanel{position:absolute!important;inset:112px 12px 12px!important;display:grid!important;place-items:center!important;width:auto!important;height:auto!important;padding:8px!important;background:transparent!important;overflow:visible!important}
  .target-preview.renaming-fullscreen .renaming-board{width:100%!important;max-width:430px!important;gap:clamp(14px,2.3vh,22px)!important}
  .target-preview.renaming-fullscreen .renaming-expression{font-size:clamp(42px,12vw,62px)!important}
  .target-preview.renaming-fullscreen .place-columns{width:min(100%,380px)!important;gap:12px!important}
  .target-preview.renaming-fullscreen .place-columns div{padding:13px!important;border-radius:18px!important}
  .target-preview.renaming-fullscreen .place-columns b{font-size:15px!important}.target-preview.renaming-fullscreen .place-columns span{font-size:34px!important}
  .target-preview.renaming-fullscreen .ones-tray{width:min(100%,380px)!important;gap:7px!important}.target-preview.renaming-fullscreen .one-dot{width:20px!important;height:20px!important}
  .target-preview.renaming-fullscreen .make-ten-button{width:min(100%,390px)!important;min-height:72px!important;font-size:clamp(20px,6vw,28px)!important;border-radius:20px!important}
  .target-preview.renaming-fullscreen .renaming-success{font-size:20px!important}.target-preview.renaming-fullscreen .renaming-answers{width:min(100%,390px)!important;gap:12px!important}.target-preview.renaming-fullscreen .renaming-answers button{min-height:70px!important;font-size:30px!important}
  #app.renaming-fullscreen #exitStage{background:#ffdc61!important;z-index:20!important}
  #app.renaming-fullscreen #sound{background:#fff!important;z-index:20!important}
}

/* Hands-on place-value board: Lesson 67–68 uses taps, not cannon fire. */
.grade2-stage-panel:has(.renaming-board){display:grid!important;place-items:center!important;width:100%!important;height:100%!important;padding:8px!important}
.renaming-board{width:min(100%,520px);display:grid;gap:10px;justify-items:center;color:#123d78;text-align:center}
.renaming-expression{font-size:clamp(30px,5vw,52px);line-height:1;color:#123d78}
.place-columns{display:grid;grid-template-columns:repeat(2,minmax(95px,1fr));width:min(100%,340px);gap:8px}
.place-columns div{display:grid;gap:3px;padding:8px;border:3px solid #53cfc5;border-radius:16px;background:#effff9;box-shadow:0 4px 0 #0b7180}
.place-columns b{font-size:13px;color:#17637b;letter-spacing:.7px}.place-columns span{font-size:27px;font-weight:950}
.ones-tray{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;min-height:25px;width:min(100%,330px)}
.one-dot{width:17px;height:17px;border-radius:5px;background:#ffd94f;box-shadow:0 2px 0 #d68c11}.one-dot.moved{background:#63d6be;transform:scale(.65);opacity:.55}
.make-ten-button,.renaming-answers button{border:0;border-radius:15px;background:linear-gradient(#ffdd61,#ffae35);box-shadow:0 5px 0 #bd6919;color:#123d78;font:950 16px sans-serif;padding:12px 18px;min-height:48px;cursor:pointer}
.renaming-success{margin:0;color:#087b66;font-weight:950}.renaming-answers{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:min(100%,360px)}
.renaming-answers button{background:linear-gradient(#fff,#ebfff8);border:3px solid #ffcf50;box-shadow:0 4px 0 #b87117;font-size:25px}
@media(orientation:portrait){.target-preview.number-hard:has(.renaming-board){height:300px!important}.renaming-board{gap:8px}.renaming-expression{font-size:34px}.one-dot{width:15px;height:15px}.place-columns{width:290px}.renaming-answers{width:300px}}

/* v157 — isolated money-stage composition; lesson layout is intentionally untouched. */
@media (orientation:portrait) and (max-width:760px){
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #exitStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #helpStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #repeatStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #sound{top:1.2%!important;z-index:12!important}

  .target-preview.money-egypt-stage{
    top:9%!important;left:4%!important;width:92%!important;height:25%!important;max-height:none!important;
    transform:none!important;display:block!important;padding:7px!important;border:5px solid #ffe46e!important;
    border-radius:28px!important;overflow:hidden!important;z-index:6!important
  }
  .target-preview.money-egypt-stage:before,
  .target-preview.money-egypt-stage>div{display:none!important}
  .target-preview.money-egypt-stage>.target-emoji{
    display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:7px 10px!important;border:0!important;border-radius:21px!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money{
    display:grid!important;grid-template-rows:minmax(0,1fr) 42px!important;align-items:stretch!important;
    width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;
    gap:0!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage .egypt-money-row{
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:3px 8px!important;
    gap:8px!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage img.money-asset.coin{
    display:block!important;width:128px!important;height:128px!important;max-width:38%!important;max-height:100%!important;
    margin:auto!important;padding:0!important;object-fit:contain!important;object-position:center!important;transform:none!important
  }
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.coin{
    width:150px!important;height:150px!important;max-width:55%!important;max-height:100%!important
  }
  .target-preview.money-egypt-stage .egypt-money-row[data-count="4"] img.money-asset.coin{
    width:76px!important;height:76px!important;max-width:23%!important;max-height:86%!important
  }
  .target-preview.money-egypt-stage img.money-asset.note{
    display:block!important;width:min(43%,220px)!important;height:110px!important;max-height:96%!important;
    margin:auto!important;padding:0!important;object-fit:contain!important;object-position:center!important;transform:none!important
  }
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.note{
    width:min(92%,360px)!important;height:125px!important;max-width:360px!important;max-height:98%!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money>small{
    display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:42px!important;
    min-height:42px!important;margin:0!important;padding:3px 8px!important;color:#164c70!important;
    direction:ltr!important;unicode-bidi:plaintext!important;text-align:center!important;text-wrap:balance!important;
    font-size:clamp(15px,4.15vw,20px)!important;line-height:1.08!important;font-weight:900!important;overflow:hidden!important
  }
  .money-stage-choices{
    position:absolute!important;z-index:11!important;top:37%!important;left:6%!important;width:88%!important;height:72px!important;
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;
    direction:ltr!important;pointer-events:auto!important
  }
  .money-stage-choices button{
    width:100%!important;height:68px!important;min-width:0!important;margin:0!important;padding:4px!important;
    border:5px solid #ff7f9f!important;border-radius:22px!important;background:linear-gradient(#fff,#fff7dc)!important;
    box-shadow:0 7px 0 #bd4968,0 11px 18px #0016!important;color:#102c58!important;
    font-size:clamp(27px,7.8vw,38px)!important;line-height:1!important;font-weight:950!important
  }
  .money-stage-choices button.try-again{background:#ffe1e7!important;animation:moneyWrong .35s ease!important}
  #app:has(.target-preview.hidden) .money-stage-choices{display:none!important}
}

/* v159: money-stage presentation is rendered entirely by the game canvas. */
#app.money-stage-active .target-preview{display:none!important}
#app.money-stage-active #toast{top:44%!important;bottom:auto!important;max-width:72%!important;padding:8px 16px!important;font-size:18px!important;line-height:1.1!important;text-align:center!important}

/* v160: readable money equations and safely contained four-coin quiz rows. */
#examScreen[data-world="numbers"] .exam-visual .stage-egypt-money>small{
  color:#fff!important;font-size:clamp(13px,3.5vw,17px)!important;
  line-height:1.1!important;text-shadow:0 2px 3px #001b!important
}
#examScreen[data-world="numbers"] .exam-visual .egypt-money-row[data-count="4"]{
  justify-content:center!important;gap:12px!important;padding:8px 22px!important;overflow:hidden!important
}
#examScreen[data-world="numbers"] .exam-visual .egypt-money-row[data-count="4"] img.money-asset.coin{
  flex:0 0 66px!important;width:66px!important;height:66px!important;
  max-width:20%!important;max-height:66px!important;margin:0!important;padding:1px!important
}
@keyframes moneyWrong{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}

/* Grade 2 Math rebuild v1 — one compact, reusable money layout. */
@media (orientation:portrait) and (max-width:760px){
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #exitStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #helpStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #repeatStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #sound{
    top:8px!important
  }
  .target-preview.money-egypt-stage{
    top:76px!important;left:3.5vw!important;width:93vw!important;height:238px!important;max-height:238px!important;
    grid-template-columns:1fr!important;grid-template-rows:32px 52px minmax(0,1fr)!important;
    gap:3px!important;padding:7px 10px 9px!important;overflow:visible!important
  }
  .target-preview.money-egypt-stage:before{grid-row:1!important;font-size:12px!important;line-height:25px!important}
  .target-preview.money-egypt-stage>div{
    grid-row:2!important;width:100%!important;min-height:52px!important;max-height:52px!important;
    padding:3px 8px!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage>div #targetArabic{
    display:block!important;font-size:clamp(15px,4.1vw,20px)!important;line-height:1.05!important;
    white-space:normal!important;text-wrap:balance!important
  }
  .target-preview.money-egypt-stage>div #targetEnglish{font-size:10px!important;line-height:1!important;margin-top:1px!important}
  .target-preview.money-egypt-stage>.target-emoji{
    grid-row:3!important;width:100%!important;height:132px!important;min-height:132px!important;max-height:132px!important;
    padding:2px 5px!important;border-width:3px!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money{height:100%!important;min-height:0!important;padding:1px 4px!important;gap:1px!important}
  .target-preview.money-egypt-stage .stage-egypt-money .egypt-money-row{height:105px!important;min-height:105px!important;gap:4px!important;padding:1px 4px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage .stage-egypt-money img.money-asset.coin{width:96px!important;height:96px!important;max-width:28%!important;max-height:96px!important;padding:1px!important}
  .target-preview.money-egypt-stage .stage-egypt-money .egypt-money-row[data-count="4"] img.money-asset.coin{width:70px!important;height:70px!important;max-width:22%!important;max-height:70px!important}
  .target-preview.money-egypt-stage .stage-egypt-money img.money-asset.note{width:min(43%,205px)!important;height:88px!important;max-height:88px!important;padding:2px!important}
  .target-preview.money-egypt-stage .stage-egypt-money .egypt-money-row[data-count="1"] img.money-asset.note{width:min(90%,345px)!important;max-width:345px!important;height:98px!important;max-height:98px!important}
  .target-preview.money-egypt-stage .stage-egypt-money>small{height:14px!important;min-height:14px!important;font-size:9px!important;line-height:1!important}

  #examScreen[data-world="numbers"] .exam-card{width:94vw!important;max-height:calc(100dvh - 18px)!important;padding:10px!important;overflow:hidden!important}
  #examScreen[data-world="numbers"] .exam-card-body{min-height:0!important;gap:6px!important}
  #examScreen[data-world="numbers"] #examPrompt{font-size:clamp(17px,4.4vw,22px)!important;line-height:1.08!important;margin:3px 0!important}
  #examScreen[data-world="numbers"] .exam-visual{height:185px!important;min-height:185px!important;max-height:185px!important;padding:5px!important}
  #examScreen[data-world="numbers"] .exam-visual .stage-egypt-money{height:100%!important}
  #examScreen[data-world="numbers"] .exam-visual .egypt-money-row{height:145px!important;min-height:145px!important;overflow:hidden!important}
  #examScreen[data-world="numbers"] .exam-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
#examScreen[data-world="numbers"] .exam-choices button{min-height:64px!important;padding:6px!important;font-size:clamp(18px,5vw,26px)!important}
  #examScreen[data-world="numbers"] .exam-choices{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch!important}
  #examScreen[data-world="numbers"] .exam-actions{display:none!important}

  #lessonScreen.money-lesson .lesson-card{width:94vw!important;max-height:calc(100dvh - 18px)!important;padding:10px!important;overflow:hidden!important}
  #lessonScreen.money-lesson .lesson-head h2{font-size:clamp(18px,5vw,25px)!important;line-height:1.05!important}
  #lessonScreen.money-lesson #lessonLead{font-size:12px!important;margin:2px 0 5px!important}
  #lessonScreen.money-lesson .lesson-words{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:136px!important;gap:7px!important;overflow-y:auto!important;padding:2px 2px 14px!important}
  #lessonScreen.money-lesson .lesson-words>button.money-card{height:136px!important;min-height:136px!important;grid-template-rows:61px 20px 29px 18px!important;padding:3px!important}
  #lessonScreen.money-lesson .lesson-words>button.money-card .lesson-media{height:61px!important;min-height:61px!important;max-height:61px!important;padding:2px!important}
  #lessonScreen.money-lesson .lesson-words>button.money-card .lesson-media img{height:57px!important;max-height:57px!important;object-fit:contain!important}
  #lessonScreen.money-lesson .lesson-words>button.money-card .lesson-media img[src*="coin"]{width:57px!important;height:57px!important;max-width:57px!important;max-height:57px!important}
  #lessonScreen.money-lesson .lesson-words>button.money-card b{min-height:20px!important;font-size:12px!important}
  #lessonScreen.money-lesson .lesson-words>button.money-card .lesson-note{min-height:29px!important;max-height:29px!important;padding:2px!important;font-size:8px!important}
  #lessonScreen.money-lesson .lesson-words>button.money-card small{min-height:18px!important;margin:0!important;font-size:7px!important;line-height:16px!important}
}

/* Final cascade guard for the rebuilt Grade 2 money lesson. */
@media (orientation:portrait) and (max-width:760px){
  .target-preview.money-egypt-stage{top:76px!important;left:3.5vw!important;width:93vw!important;height:238px!important;max-height:238px!important;grid-template-columns:1fr!important;grid-template-rows:32px 52px 132px!important;gap:3px!important;padding:7px 10px 9px!important;overflow:visible!important}
  .target-preview.money-egypt-stage:before{grid-column:1!important;grid-row:1!important;margin:0!important;padding:3px 9px!important;font-size:12px!important;line-height:25px!important}
  .target-preview.money-egypt-stage>div{grid-column:1!important;grid-row:2!important;width:100%!important;min-height:52px!important;max-height:52px!important;margin:0!important;padding:3px 8px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage>div #targetArabic{display:block!important;font-size:clamp(15px,4.1vw,20px)!important;line-height:1.05!important;white-space:normal!important}
  .target-preview.money-egypt-stage>div #targetEnglish{display:block!important;font-size:10px!important;line-height:1!important;margin-top:1px!important}
  .target-preview.money-egypt-stage>.target-emoji{grid-column:1!important;grid-row:3!important;width:100%!important;height:132px!important;min-height:132px!important;max-height:132px!important;padding:2px 5px!important;border-width:3px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage .stage-egypt-money,.target-preview.money-egypt-stage .egypt-money-row{min-height:0!important;overflow:hidden!important}
  .target-preview.money-egypt-stage .stage-egypt-money{height:100%!important;padding:1px 4px!important;gap:1px!important}
  .target-preview.money-egypt-stage .egypt-money-row{height:105px!important;padding:1px 4px!important;gap:4px!important}
  .target-preview.money-egypt-stage img.money-asset.coin{width:96px!important;height:96px!important;max-width:28%!important;max-height:96px!important;padding:1px!important;object-fit:contain!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="4"] img.money-asset.coin{width:70px!important;height:70px!important;max-width:22%!important;max-height:70px!important}
  .target-preview.money-egypt-stage img.money-asset.note{width:min(43%,205px)!important;height:88px!important;max-height:88px!important;object-fit:contain!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.note{width:min(90%,345px)!important;height:98px!important;max-width:345px!important;max-height:98px!important}
  .target-preview.money-egypt-stage .stage-egypt-money>small{height:14px!important;min-height:14px!important;margin:0!important;font-size:9px!important;line-height:1!important}
  #examScreen[data-world="numbers"] .exam-card{width:94vw!important;max-height:calc(100dvh - 18px)!important;padding:10px!important;overflow:hidden!important}
  #examScreen[data-world="numbers"] .exam-card-body{min-height:0!important;gap:6px!important}
  #examScreen[data-world="numbers"] #examPrompt{font-size:clamp(17px,4.4vw,22px)!important;line-height:1.08!important;margin:3px 0!important}
  #examScreen[data-world="numbers"] .exam-visual{height:185px!important;min-height:185px!important;max-height:185px!important;padding:5px!important}
  #examScreen[data-world="numbers"] .exam-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  #examScreen[data-world="numbers"] .exam-choices button{min-height:64px!important;padding:6px!important;font-size:clamp(18px,5vw,26px)!important}
  #examScreen[data-world="numbers"] .exam-actions{display:none!important}
}

#mapPath.numbers-map .path-journey>.stage-node:nth-of-type(5n+1){background:radial-gradient(circle at 35% 28%,#fff 0 8%,#ffe76a 9% 53%,#ff9b48 54% 70%,#2d73c9 71%)!important}
#mapPath.numbers-map .path-journey>.stage-node:nth-of-type(5n+2){background:radial-gradient(circle at 35% 28%,#fff 0 8%,#9df0dd 9% 53%,#2fc5a3 54% 70%,#126b8f 71%)!important}
#mapPath.numbers-map .path-journey>.stage-node:nth-of-type(5n+3){background:radial-gradient(circle at 35% 28%,#fff 0 8%,#ffb7d8 9% 53%,#ec62a2 54% 70%,#883a91 71%)!important}
#mapPath.numbers-map .path-journey>.stage-node:nth-of-type(5n+4){background:radial-gradient(circle at 35% 28%,#fff 0 8%,#b9d8ff 9% 53%,#639bf0 54% 70%,#304fb2 71%)!important}
#mapPath.numbers-map .path-journey>.stage-node:nth-of-type(5n){background:radial-gradient(circle at 35% 28%,#fff 0 8%,#ffd5a5 9% 53%,#f28a5b 54% 70%,#a4424a 71%)!important}

/* v106 — one safe art contract for Grade 2 English stages 31–50. The exact
   same source image is contained, centered, and never cropped in every view. */
img[src*="grade2-english-units/"],
img[src*="grade2-english-replacements/"]{
  display:block!important;box-sizing:border-box!important;
  max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:center!important;
  clip-path:none!important
}
.target-preview img[src*="grade2-english-units/"],
.target-preview img[src*="grade2-english-replacements/"]{
  width:100%!important;height:min(30dvh,230px)!important;
  max-width:250px!important;max-height:230px!important;margin:auto!important;
  padding:4px!important;background:transparent!important;border:0!important;
  border-radius:16px!important;box-shadow:none!important
}
.lesson-media img[src*="grade2-english-units/"],
.lesson-media img[src*="grade2-english-replacements/"],
.exam-visual img[src*="grade2-english-units/"],
.exam-visual img[src*="grade2-english-replacements/"],
.challenge-choice img[src*="grade2-english-units/"],
.challenge-choice img[src*="grade2-english-replacements/"],
.reward-card img[src*="grade2-english-units/"],
.reward-card img[src*="grade2-english-replacements/"]{
  width:100%!important;height:100%!important;margin:auto!important;
  object-fit:contain!important;object-position:center!important
}

/* v102: isolated mobile renderer for Grade 2 stages 11–20.  It deliberately
   bypasses the legacy target-emoji cascade. */
@media(max-width:760px){
  .target-preview{position:absolute!important}
  .target-preview>.grade2-stage-panel{
    position:absolute!important;z-index:20!important;left:22px!important;right:22px!important;
    top:94px!important;bottom:18px!important;display:flex!important;flex-direction:column!important;
    align-items:center!important;justify-content:center!important;gap:14px!important;
    width:auto!important;max-width:none!important;padding:8px!important;box-sizing:border-box!important;
    overflow:hidden!important;background:transparent!important
  }
  .grade2-stage-panel>.grade2-fraction-disc{
    display:block!important;flex:0 0 132px!important;width:132px!important;height:132px!important;
    border:7px solid #176895!important;border-radius:50%!important;
    background:conic-gradient(#ffd84a 0 var(--fraction),#48c98b var(--fraction) 100%)!important;
    box-shadow:inset 0 0 0 4px #fff,0 7px 0 #0a456c!important
  }
  .grade2-stage-panel>.grade2-array-grid{
    display:grid!important;flex:0 0 auto!important;
    grid-template-columns:repeat(var(--cols),22px)!important;
    grid-template-rows:repeat(var(--rows),22px)!important;
    gap:7px!important;width:max-content!important;height:max-content!important;
    max-width:90%!important;max-height:150px!important;place-content:center!important;overflow:visible!important
  }
  .grade2-stage-panel>.grade2-array-grid>i{
    display:block!important;width:22px!important;height:22px!important;border-radius:7px!important;
    background:linear-gradient(145deg,#315c92,#102e62)!important;
    box-shadow:inset 0 0 0 2px #ffdd68,0 3px 0 #0b234c!important
  }
  .target-preview>.grade2-stage-panel>strong{
    display:block!important;flex:0 0 auto!important;width:100%!important;margin:0!important;padding:0!important;
    color:#123d78!important;font:1000 27px/1.1 Arial,sans-serif!important;text-align:center!important;
    white-space:normal!important;overflow:visible!important
  }
}

/* v97: explicit Grade 2 fraction/array questions and stable hit resolution. */
.target-preview.number-fraction>.target-emoji{
  flex:1 1 auto!important;max-height:none!important;min-height:0!important;
  padding:8px 12px!important;overflow:visible!important
}
.target-preview .stage-fraction-model,.target-preview .stage-array-model{
  display:grid!important;grid-template-rows:minmax(0,1fr) auto!important;
  align-items:center!important;justify-items:center!important;gap:8px!important;
  width:100%!important;height:100%!important;min-height:0!important;overflow:visible!important
}
.target-preview .stage-question{
  display:block!important;width:100%!important;margin:0!important;padding:0 4px!important;
  color:#123d78!important;font:1000 clamp(18px,2.25vw,34px)/1.05 sans-serif!important;
  letter-spacing:0!important;text-align:center!important;white-space:normal!important;overflow:visible!important
}
.target-preview .fraction-groups{
  display:flex!important;align-items:stretch!important;justify-content:center!important;
  width:min(100%,480px)!important;max-height:132px!important;gap:7px!important;margin:0!important
}
.target-preview .fraction-group{
  display:grid!important;grid-template-columns:repeat(5,minmax(8px,16px))!important;
  place-content:center!important;gap:5px!important;flex:1 1 0!important;min-width:0!important;
  padding:8px 5px!important;border:3px solid #2298a8!important;border-radius:13px!important;
  background:#fff!important;box-shadow:0 4px 0 #0b637d!important
}
.target-preview .fraction-group.selected{background:#ffe46b!important;border-color:#e77d25!important;box-shadow:0 4px 0 #a94b19!important}
.target-preview .fraction-group i{
  display:block!important;width:clamp(8px,1.15vw,16px)!important;aspect-ratio:1!important;
  border-radius:50%!important;background:#173d79!important;box-shadow:inset 0 0 0 2px #ffe174!important
}
.target-preview .stage-array-model>.array-model{min-height:0!important;align-self:center!important}
@media(orientation:portrait){
  .target-preview.number-fraction>.target-emoji{padding:5px 8px!important}
  .target-preview .stage-fraction-model,.target-preview .stage-array-model{gap:5px!important}
  .target-preview .stage-question{font-size:clamp(18px,5.2vw,28px)!important}
  .target-preview .fraction-groups{max-height:92px!important;gap:4px!important}
  .target-preview .fraction-group{grid-template-columns:repeat(5,minmax(6px,11px))!important;gap:3px!important;padding:5px 3px!important;border-width:2px!important}
  .target-preview .fraction-group i{width:clamp(6px,2.4vw,11px)!important;box-shadow:inset 0 0 0 1px #ffe174!important}
}

/* v82 — one curriculum source drives lesson, stage and quiz. */
.exam-animal-image{max-width:230px!important;max-height:190px!important;filter:drop-shadow(0 8px 8px #0018)}
.exam-animal-fallback{display:grid;place-items:center;min-height:135px;font-size:clamp(82px,10vw,138px);line-height:1;filter:drop-shadow(0 7px 5px #0018)}
.exam-equation{display:block;color:#153d72;font-size:clamp(30px,5vw,56px);line-height:1.12;white-space:nowrap}
.exam-square{margin:3px auto 14px!important}
.target-preview{padding-top:82px!important;border-right-color:#70ead7!important;background:linear-gradient(165deg,#073a62f5,#082744f7 58%,#104e55f4)!important;box-shadow:12px 0 35px #001b2d99,inset -5px 0 0 #ffe16a55!important}
.target-preview:before{margin:0 0 8px!important;background:linear-gradient(#ff8b36,#ed651f)!important;box-shadow:0 4px 0 #9b3f16!important}
.target-preview>div{background:linear-gradient(145deg,#ffffff20,#50e4c815)!important;border:2px solid #ffffff24!important}
@media(orientation:portrait){.target-preview{padding-top:11px!important}}
@media(orientation:landscape) and (max-height:650px){.target-preview{padding-top:62px!important}.target-preview:before{margin-bottom:4px!important}}

/* v81 — unified learning-stage layout, generated curriculum art and text fitting. */
.grade-plaque{position:fixed;z-index:34;top:12px;left:50%;transform:translateX(-50%) rotate(-.7deg);min-width:138px;padding:9px 24px 8px;text-align:center;color:#fff4c4;font:900 18px/1 sans-serif;background:linear-gradient(#c9823b,#8f4a1d 60%,#663113);border:3px solid #f2b55d;border-radius:10px;box-shadow:0 6px 0 #48200d,0 9px 16px #001a;pointer-events:none}
.grade-plaque i{position:absolute;bottom:100%;width:4px;height:19px;background:#70401e;border-radius:4px}.grade-plaque i:first-child{left:23px}.grade-plaque i:nth-child(2){right:23px}
#app:has(#targetPreview.hidden) .grade-plaque{display:none}
.target-preview{overflow:hidden!important}
.target-preview img{object-fit:contain!important;max-width:100%!important;max-height:100%!important}
.target-preview.unknown-target{grid-template-columns:42% 58%!important}
.target-preview .target-art-icon{display:block;font-size:clamp(58px,8vw,110px);line-height:1}
.target-preview .shape-question{display:flex;justify-content:center;align-items:center;min-height:100px;margin:0 auto 8px}
.target-preview .square-diagram{position:relative;display:block;width:90px;height:90px;border:7px solid #176f9b;border-radius:7px;background:#55d4ec24;box-shadow:inset 0 0 0 3px #fff,0 6px 0 #0c3f66}
.target-preview .square-diagram em{position:absolute;left:50%;bottom:-31px;transform:translateX(-50%);padding:2px 10px;border-radius:12px;background:#fff;color:#08295b;font:900 20px/1 sans-serif}
.target-preview .shape-question+.number-equation{font-size:clamp(22px,3vw,36px)!important;line-height:1!important}
.lesson-words button{min-width:0!important;overflow:hidden!important}
.lesson-words button img{width:78px!important;height:78px!important;object-fit:contain!important;filter:drop-shadow(0 5px 5px #2344)!important}
.lesson-words button b{display:block!important;width:100%!important;max-width:100%!important;padding:0 4px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;font-size:clamp(11px,1.45vw,20px)!important;line-height:1.05!important}
.lesson-words button.long-word b{font-size:clamp(9px,1.13vw,15px)!important;letter-spacing:-.35px!important}
.lesson-square{display:grid!important;place-items:center!important;width:70px!important;height:70px!important;margin:auto!important;border:5px solid #1681a7!important;border-radius:9px!important;background:#7be0ef33!important;box-shadow:inset 0 0 0 3px #fff!important}
.lesson-square i{font:900 23px/1 sans-serif!important;color:#09285a!important}
.reward-card{padding-top:18px!important;overflow:hidden!important}
.reward-card .crown{position:static!important;display:block!important;width:auto!important;margin:-5px auto 1px!important;transform:none!important;font-size:35px!important;line-height:1!important}
.reward-card #rewardTitle{margin:0 auto 3px!important;line-height:1.05!important}
.reward-card #rewardAnimal{object-fit:contain!important}
#exitStage,#helpStage,#repeatStage{top:14px!important;width:48px!important;height:48px!important;font-size:22px!important}
#exitStage{left:12px!important}#helpStage{left:68px!important}#repeatStage{left:124px!important}
#exitStage:after,#helpStage:after,#repeatStage:after{display:none!important}
@media(orientation:portrait){
  .grade-plaque{top:max(10px,env(safe-area-inset-top));font-size:14px;min-width:112px;padding:7px 18px}
  .grade-plaque i{height:12px}
  .target-preview .shape-question{min-height:72px}.target-preview .square-diagram{width:62px;height:62px;border-width:5px}.target-preview .square-diagram em{bottom:-25px;font-size:16px}
  .lesson-words button img{width:62px!important;height:62px!important}
}
@media(orientation:landscape) and (max-height:700px){
  .grade-plaque{top:8px;padding:6px 18px;font-size:14px;min-width:118px}.grade-plaque i{height:10px}
  .lesson-words button img{width:58px!important;height:58px!important}
  .reward-card{padding-top:8px!important}.reward-card .crown{font-size:27px!important}
}
@media(orientation:landscape){#rotatePrompt{display:none!important}}
@media(orientation:landscape) and (max-width:950px){#orientationToggle{display:flex}}
@keyframes phoneTurn{50%{transform:rotate(90deg)}}

/* Compact start screen for landscape phones with browser bars visible. */
@media (orientation:landscape) and (max-height:650px){
  #start{width:min(82vw,760px);max-height:calc(100dvh - 12px);padding:10px 22px 12px;border-radius:20px;overflow-y:auto;scrollbar-width:none}
  #start::-webkit-scrollbar{display:none}
  #start .logo{font-size:34px;line-height:1;margin:0}
  #start h1{font-size:clamp(31px,7.2vh,44px);line-height:1.05;margin:1px 0 3px}
  #start p{font-size:clamp(14px,3.2vh,19px);line-height:1.2;margin:5px 0 8px}
  #start .difficulty{gap:9px;margin:7px 0 9px}
  #start .difficulty button{padding:6px 4px;font-size:13px;border-radius:13px;box-shadow:0 3px 0 #08203e}
  #start .difficulty button small{font-size:10px;line-height:1.1;margin:2px 0 0}
  #start #play{padding:8px 30px;border-radius:14px;font-size:18px;box-shadow:0 4px 0 #bc6716}
  #start>small{font-size:11px;line-height:1.1;margin-top:8px}
  #sound{top:max(7px,env(safe-area-inset-top));left:max(7px,env(safe-area-inset-left));width:43px;height:43px;font-size:20px}
}

@media (orientation:landscape) and (max-height:420px){
  #start{width:min(86vw,820px);padding:6px 18px 8px}
  #start .logo{font-size:27px}
  #start h1{font-size:29px}
  #start p{font-size:13px;margin:3px 0 5px}
  #start .difficulty{margin:5px 0 7px}
  #start .difficulty button{padding:4px 3px}
  #start #play{padding:6px 26px;font-size:16px}
  #start>small{margin-top:5px;font-size:10px}
}

/* Worlds hub */
.worlds-body{height:calc(100% - 82px);overflow-y:auto;padding:18px 28px 45px;background:linear-gradient(#083f4c88,#072a32cc),url('assets/jungle-background.png') center/cover fixed}.worlds-title{text-align:center;margin:0 auto 15px}.worlds-title h2{margin:0;color:#ffe56c;font-size:clamp(25px,4vw,39px);text-shadow:0 4px #77500e}.worlds-title p{margin:4px 0 0;font-size:16px;color:#d8fff0}#worldGrid{max-width:1120px;margin:auto;display:grid;grid-template-columns:repeat(5,1fr);gap:17px;align-items:stretch}.world-card{position:relative;min-height:270px;padding:18px 12px 15px;border-radius:30px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#fff;border:5px solid #fff9;box-shadow:0 10px 0 #052634,0 18px 35px #0018;overflow:hidden;transition:.2s}.world-card:after{content:"";position:absolute;inset:auto -25% -40% -25%;height:58%;border-radius:50%;background:#ffffff22}.world-card:hover{transform:translateY(-7px);filter:brightness(1.08)}.world-card.animals{background:linear-gradient(145deg,#21a35f,#08704b)}.world-card.numbers{background:linear-gradient(145deg,#4b8cff,#524ac8)}.world-card.objects{background:linear-gradient(145deg,#ee9737,#bd572c)}.world-card.actions{background:linear-gradient(145deg,#ee526e,#a72a68)}.world-card.colors{background:linear-gradient(145deg,#8c59e9,#d34cad)}.world-icon{position:relative;z-index:1;font-size:78px;filter:drop-shadow(0 7px 4px #0004)}.world-card b{position:relative;z-index:1;font-size:20px}.world-card small{position:relative;z-index:1;margin:0;color:#fffbc1;font-size:14px}.world-card em{position:relative;z-index:1;margin-top:9px;padding:6px 10px;border-radius:15px;background:#071f3d66;color:#fff;font-size:11px;font-style:normal}.world-card .soon{position:absolute;z-index:2;top:14px;right:-35px;width:125px;padding:5px 0;transform:rotate(35deg);background:#ffe454;color:#4c2e09;font-size:12px;font-weight:900}.world-card.locked{filter:saturate(.55);cursor:default}.world-card.locked:hover{transform:none;filter:saturate(.55)}
.target-emoji{display:grid;place-items:center;width:100%;height:min(43vh,315px);border-radius:22px;border:5px solid #fff;background:linear-gradient(#fff9d6,#91ddff);font-size:clamp(75px,10vw,135px);box-shadow:0 9px 0 #376bb8;line-height:1}.numbers-map{background:linear-gradient(#153c7a77,#262763cc),radial-gradient(circle at 20% 20%,#fff4 0 4px,transparent 5px),var(--map-bg,url('assets/jungle-background.png')) center/cover fixed!important}.numbers-map .stage-node{background:linear-gradient(175deg,#546ff0,#33419d);border-color:#98c9ff;box-shadow:0 8px 0 #1d2467,0 13px 25px #0019}.numbers-map .map-zone{background:linear-gradient(#536ee8,#2a398f);border-color:#a8d5ff;box-shadow:0 9px 0 #18215f,0 14px 25px #0018}
@media(max-width:980px){#worldGrid{grid-template-columns:repeat(3,1fr)}.world-card{min-height:215px}.world-icon{font-size:58px}.world-card b{font-size:17px}}
@media(orientation:landscape) and (max-height:650px){.worlds-body{padding:9px 18px 28px}.worlds-title{margin-bottom:8px}.worlds-title h2{font-size:23px}.worlds-title p{font-size:12px;margin:1px 0}#worldGrid{grid-template-columns:repeat(5,1fr);gap:10px}.world-card{min-height:calc(100dvh - 165px);max-height:300px;padding:8px 6px;border-radius:20px;border-width:3px}.world-icon{font-size:clamp(38px,10vh,62px)}.world-card b{font-size:14px}.world-card small{font-size:11px}.world-card em{margin-top:3px;padding:4px 6px;font-size:9px}.world-card .soon{top:9px}}

/* In-stage navigation and clear number visual */
.target-preview:before{content:attr(data-label)}
.target-preview .target-emoji{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:min(43vh,315px);border-radius:22px;border:5px solid #fff;background:radial-gradient(circle at 28% 20%,#fff,#fff3ae 42%,#70c9ff);box-shadow:0 9px 0 #376bb8;line-height:1;color:#123870}
.target-preview .target-emoji strong{font-size:clamp(92px,11vw,160px);line-height:.9;text-shadow:0 6px 0 #fff,0 10px 18px #174e7e55}
.target-preview .target-emoji small{display:block;width:86%;margin:14px 0 0;color:#176895;font-size:clamp(13px,1.6vw,23px);line-height:1.25;letter-spacing:3px;text-align:center;white-space:normal}
#exitStage{position:absolute;z-index:7;top:max(12px,env(safe-area-inset-top));left:calc(20% - 62px);width:48px;height:48px;padding:0;border-radius:15px;background:linear-gradient(#fff8c9,#ffc23e);border:3px solid #fff;box-shadow:0 5px 0 #a75d17;color:#17334b;font-size:28px}
#exitStage:after{content:"الخريطة";position:absolute;top:50px;left:50%;transform:translateX(-50%);padding:3px 7px;border-radius:9px;background:#052b43dd;color:#fff;font-size:10px;white-space:nowrap}
#exitStage:after{content:"MAP"}
#repeatStage{position:absolute;z-index:8;top:max(12px,env(safe-area-inset-top));left:calc(20% + 6px);width:48px;height:48px;padding:0;border-radius:15px;border:3px solid #fff;background:linear-gradient(#84efff,#28aacf);box-shadow:0 5px 0 #176d88;color:#082e58;font-size:24px}
#helpStage{display:none!important}
#openPlacement{display:none!important}
#lessonScreen.kg1-lesson #lessonLead{text-align:center!important;margin:8px auto 14px!important}
#lessonScreen.kg1-lesson .lesson-head{text-align:center!important}
#lessonScreen.kg1-lesson .lesson-head div{display:flex;flex-direction:column;align-items:center}
#lessonScreen.kg1-lesson .lesson-head h2{max-width:80%;text-align:center!important}
#lessonScreen.kg1-lesson .lesson-words{margin-top:8px!important}
#app.kg1-choice-active #kg1ChoicePrompt{text-align:center!important;margin:0 auto 8px!important;max-width:90%!important}
.age-grid button{background:linear-gradient(#fff,var(--age-color,#ffd24f));box-shadow:0 6px 0 color-mix(in srgb,var(--age-color,#ffd24f),#613000 38%)}.age-grid button.selected{outline:5px solid var(--age-color);transform:translateY(-2px)}
.avatar-choice button img{width:58px;height:58px;border-radius:50%;object-fit:cover;filter:drop-shadow(0 5px 4px #0017)}
.lesson-card{width:min(940px,94vw);max-height:94dvh;overflow:auto}.lesson-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.lesson-head span{font-size:42px}.lesson-head div{flex:1}.lesson-head small{color:#62eadc;font-weight:900;letter-spacing:2px}.lesson-head h2{margin:4px 0;color:#ffe058}.lesson-words{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));gap:12px;margin:18px 0}.lesson-words button{min-height:145px;border:3px solid #ffd34f;border-radius:20px;background:#fffdf0;color:#153a58;box-shadow:0 6px 0 #b86819}.lesson-words button.heard{border-color:#54e2a2;background:#ddfff1;box-shadow:0 6px 0 #17865f}.lesson-words img{display:block;width:72px;height:72px;margin:auto;object-fit:contain}.lesson-words span{display:block;font-size:48px}.lesson-words b,.lesson-words small{display:block}.lesson-words small{font-size:10px;color:#46707e}.lesson-node{display:block;width:260px;margin:44px auto;padding:13px;border:4px solid #79f1dd;border-radius:24px;background:linear-gradient(#123e70,#082651);color:#fff;box-shadow:0 8px 0 #031936}.lesson-node span{font-size:30px}.lesson-node b,.lesson-node small{display:block}.lesson-node b{color:#ffe058;font-size:22px}.lesson-node.done{border-color:#70e59b}.written-number{display:block;font-size:clamp(30px,5vw,58px);color:#173e79;letter-spacing:2px}.plane-blueprint img{filter:var(--plane-filter,none);transition:filter .15s,transform .15s}.plane-fleet .locked img{filter:grayscale(1) brightness(.45)!important}
@media(max-width:720px){.lesson-words{grid-template-columns:repeat(2,minmax(105px,1fr))}.lesson-words button{min-height:118px}.lesson-card .safe-nav{position:sticky;bottom:0;background:#082b52;padding:8px;border-radius:18px}#repeatStage{left:134px}}
@media(orientation:landscape) and (max-height:650px){.target-preview .target-emoji strong{font-size:clamp(72px,16vh,120px)}.target-preview .target-emoji small{margin-top:8px;font-size:clamp(10px,2.6vh,17px)}#exitStage{top:7px;width:42px;height:42px;font-size:23px;left:calc(20% - 52px)}#exitStage:after{top:43px}}

/* Ashter Katkoot brand identity */
#start{width:min(91vw,650px);padding:18px 26px 20px;background:linear-gradient(160deg,#092a54f2,#061b44f4);border:4px solid #ffe26e;box-shadow:0 12px 0 #b76619,0 22px 65px #001b}
.brand-hero{display:block;width:min(72%,410px);height:190px;margin:-8px auto -18px;object-fit:contain;filter:drop-shadow(0 10px 10px #0018)}
#start h1{font-size:clamp(38px,6vw,62px);color:#ffe35f;text-shadow:0 5px 0 #c56d1a;margin:0;line-height:1.05}
#start .brand-tagline{margin:5px 0 10px;color:#fff;font-size:clamp(17px,2.2vw,23px);font-weight:800}
#start .difficulty{align-items:stretch;margin:12px 0 15px}
#start .difficulty button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:130px;padding:7px 5px 9px;border-radius:22px}
#start .difficulty button img{width:82px;height:82px;margin:-2px auto 2px;object-fit:contain;filter:drop-shadow(0 5px 5px #0017)}
#start .difficulty button b{display:block;font-size:16px;line-height:1}
#start .difficulty button small{font-size:10px;line-height:1;margin:4px 0 0}
#start .difficulty button.selected{outline:4px solid #fff;box-shadow:0 6px 0 #b66b18,0 0 28px #ffe56e88}
@media(orientation:landscape) and (max-height:650px){#start{width:min(84vw,720px);padding:7px 18px 9px}.brand-hero{width:260px;height:82px;margin:-6px auto -11px}#start h1{font-size:clamp(28px,7vh,39px)}#start .brand-tagline{margin:2px 0 4px;font-size:13px}#start .difficulty{margin:5px 0 7px}#start .difficulty button{min-height:83px;padding:2px 3px 4px}#start .difficulty button img{width:52px;height:52px;margin:-1px auto 0}#start .difficulty button b{font-size:12px}#start .difficulty button small{font-size:8px;margin-top:2px}}
@media(orientation:landscape) and (max-height:420px){.brand-hero{width:220px;height:61px;margin:-5px auto -8px}#start h1{font-size:27px}#start .difficulty button{min-height:67px}#start .difficulty button img{width:42px;height:42px}#start .brand-tagline{font-size:11px}}

/* Cleaner level selector: circles only, no surrounding cards. */
#start{width:min(90vw,620px);padding:15px 28px 18px;border:2px solid #ffffff66;box-shadow:0 18px 55px #001a;background:linear-gradient(160deg,#092a54e8,#061b44ed)}
.brand-hero{width:min(58%,330px);height:145px;margin:-5px auto -13px}
#start h1{font-size:clamp(36px,5.4vw,55px);text-shadow:0 4px 0 #b96519}
#start .brand-tagline{font-size:clamp(15px,2vw,20px);margin:4px 0 9px;color:#dff7ff}
#start .difficulty{gap:24px;justify-content:center;align-items:flex-start;margin:10px auto 13px;max-width:480px}
#start .difficulty button,#start .difficulty button.selected{flex:0 1 130px;min-height:0;padding:0;background:transparent!important;border:0;border-radius:0;box-shadow:none!important;outline:0;color:#fff;overflow:visible}
#start .difficulty button:active{transform:scale(.96)}
#start .difficulty button img{display:block;width:96px;height:96px;margin:0 auto 7px;border-radius:50%;object-fit:contain;filter:drop-shadow(0 7px 7px #0018);transition:.2s}
#start .difficulty button b{font-size:17px;color:#fff}
#start .difficulty button small{font-size:10px;color:#bdeaff;margin-top:4px}
#start .difficulty button.selected img{outline:5px solid #fff7a8;outline-offset:4px;filter:drop-shadow(0 0 12px #ffe56e) drop-shadow(0 7px 7px #0018);transform:scale(1.06)}
#start .difficulty button.selected b{color:#ffe56e}
@media(orientation:landscape) and (max-height:650px){#start{width:min(80vw,650px);padding:6px 20px 8px}.brand-hero{width:230px;height:70px;margin:-5px auto -9px}#start h1{font-size:31px}#start .brand-tagline{font-size:12px;margin:1px 0 3px}#start .difficulty{gap:24px;margin:4px auto 6px}#start .difficulty button,#start .difficulty button.selected{flex-basis:100px;min-height:0;padding:0}#start .difficulty button img{width:58px;height:58px;margin-bottom:3px}#start .difficulty button b{font-size:12px}#start .difficulty button small{font-size:8px;margin-top:2px}#start .difficulty button.selected img{outline-width:3px;outline-offset:2px}}
@media(orientation:landscape) and (max-height:420px){.brand-hero{width:190px;height:48px;margin:-4px auto -6px}#start h1{font-size:25px}#start .difficulty button img{width:46px;height:46px}#start .difficulty{margin:2px auto 4px}}

/* Clean album tiles: the animal cutout is the only artwork inside each square. */
#animalGrid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:18px}
.animal-card{min-height:185px;padding:12px;border:0;border-radius:22px;background:#fffdf3;box-shadow:0 7px 0 #246b4d,0 12px 22px #0014;overflow:hidden}
.animal-card:before{content:none}
.animal-card:not(.locked):hover{transform:translateY(-3px);filter:brightness(1.02)}
.animal-card .animal{height:118px;display:grid;place-items:center;overflow:visible;background:transparent;border:0;border-radius:0;filter:none}
.animal-card .animal img{width:100%;height:118px;object-fit:contain;border:0;border-radius:0;background:transparent;filter:drop-shadow(0 5px 4px #2243)}
.animal-card b{margin-top:3px}
.animal-card.locked{background:#667b73;border:0}.animal-card.locked:before{content:none}
.animal-card.gift-animal{background:linear-gradient(#fff8ce,#ffe0f0);box-shadow:0 7px 0 #a95b8a,0 12px 22px #0014}.animal-card.gift-animal em{position:absolute;top:5px;right:6px;z-index:2;padding:3px 7px;border-radius:11px;background:#d84b8c;color:#fff;font-size:9px;font-style:normal;font-weight:900}.animal-card.gift-animal.locked{background:#706575;box-shadow:0 7px 0 #463a49}
.bonus-gift{display:flex;align-items:center;justify-content:center;gap:10px;margin:7px auto 12px;padding:8px 13px;border:3px solid #ffbf45;border-radius:18px;background:linear-gradient(135deg,#fff3a9,#ffd1eb);color:#84345f}.bonus-gift span{font-size:12px;font-weight:900}.bonus-gift strong{font-size:20px}

/* End-of-zone review challenge */
.zone-challenge{position:absolute;inset:0;z-index:12;display:grid;place-items:center;padding:20px;background:linear-gradient(#052b48dd,#073a39ee),var(--challenge-bg,url('assets/jungle-background.png')) center/cover}.challenge-card{width:min(92vw,650px);padding:24px 28px 25px;border:6px solid #ffe064;border-radius:34px;background:linear-gradient(#fffde9,#d9ffec);box-shadow:0 14px 0 #a75c18,0 25px 70px #001b;text-align:center;color:#153e48;animation:rewardIn .55s cubic-bezier(.2,1.4,.4,1)}.challenge-flag{display:inline-block;padding:6px 14px;border-radius:18px;background:#0c755b;color:#fff;font-size:13px;font-weight:900}.challenge-card h2{margin:8px 0 2px;color:#dc6c18;font-size:32px}.challenge-card p{margin:2px 0 17px;font-size:21px;font-weight:900}.challenge-card>small{display:block;margin-top:14px;color:#4f796d}.challenge-card #challengeChoices{display:flex;direction:ltr;align-items:center;justify-content:center;gap:22px}.challenge-choice{display:grid;place-items:center;width:145px;height:145px;padding:8px;border:5px solid #fff;border-radius:27px;background:linear-gradient(#fff,#bcecff);box-shadow:0 8px 0 #3473a3;color:#173c73;transition:.15s}.challenge-choice img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 6px 5px #0015)}.challenge-choice strong{font-size:74px}.challenge-choice:active{transform:translateY(5px);box-shadow:0 3px 0 #3473a3}.challenge-choice.correct{background:#b8ffd0;border-color:#45d57c;box-shadow:0 8px 0 #168c4a}.challenge-choice.wrong{animation:challengeWrong .35s;background:#ffd6d6;border-color:#e95959;opacity:.62}@keyframes challengeWrong{25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}
@media(orientation:landscape) and (max-height:650px){.challenge-card{padding:12px 22px 15px}.challenge-card h2{font-size:23px;margin:4px 0}.challenge-card p{font-size:16px;margin-bottom:9px}.challenge-choice{width:102px;height:102px;border-radius:20px}.challenge-choice strong{font-size:55px}.challenge-card>small{margin-top:7px}}

/* Large, readable animal target on the gameplay side panel. */
.target-preview img{width:100%;height:min(48vh,350px);padding:2px;object-fit:contain;border:0;border-radius:0;background:transparent;box-shadow:none;filter:drop-shadow(0 8px 6px #0016)}
.target-preview span.target-emoji{width:100%;height:min(48vh,350px);font-size:clamp(125px,14vw,215px);line-height:1;border:0;border-radius:18px;background:linear-gradient(145deg,#fffce6,#d9f5ee);box-shadow:none}
@media(orientation:landscape) and (max-height:650px){.target-preview img{height:min(45vh,270px)}.target-preview span.target-emoji{height:min(45vh,270px);font-size:clamp(88px,22vh,155px)}}

/* Start-screen world carousel */
#start{width:min(94vw,760px);max-height:calc(100dvh - 14px);overflow-y:auto;scrollbar-width:none;padding:10px 26px 13px}
#start::-webkit-scrollbar{display:none}.brand-hero{height:105px;width:270px;margin:-9px auto -13px}#start h1{font-size:43px}.brand-tagline{margin:2px 0 5px!important}
#start .difficulty{margin:6px auto 7px;gap:28px}#start .difficulty button img{width:70px;height:70px;margin-bottom:4px}#start .difficulty button b{font-size:14px}
.world-picker{position:relative;width:min(100%,590px);margin:2px auto 8px;padding:18px 45px 2px;overflow:hidden}
.world-picker-title{position:absolute;z-index:5;top:0;left:50%;transform:translateX(-50%);padding:3px 14px;border-radius:15px;background:#ffe160;color:#183559;font-size:12px;white-space:nowrap;box-shadow:0 3px 0 #a85d19}
.world-carousel{direction:rtl;display:flex;align-items:center;gap:20px;width:100%;padding:20px calc(50% - 50px) 12px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior-x:contain}
.world-carousel::-webkit-scrollbar{display:none}
.world-orb{position:relative;flex:0 0 100px;scroll-snap-align:center;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100px;height:126px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#fff;opacity:.55;transform:scale(.78);transition:transform .25s,opacity .25s,filter .25s;overflow:visible}
.world-orb img{display:block;width:96px;height:96px;object-fit:contain;border-radius:50%;filter:drop-shadow(0 7px 7px #0019)}.world-orb b{margin-top:3px;font-size:11px;line-height:1.1}.world-orb small{margin:1px 0 0;color:#d5f5ff;font-size:8px}.world-orb i{position:absolute;z-index:2;top:-2px;right:-1px;display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#102c4c;font-size:13px;font-style:normal;border:2px solid #fff}
.world-orb.selected{z-index:3;opacity:1;transform:scale(1.14);filter:drop-shadow(0 0 12px #ffe56e)}.world-orb.selected img{filter:drop-shadow(0 0 7px #ffe56e) drop-shadow(0 8px 8px #0019)}.world-orb.locked{filter:grayscale(.65)}.world-orb.locked.selected{filter:grayscale(.45) drop-shadow(0 0 9px #ffe56e)}
.world-arrow{position:absolute;z-index:6;top:64px;width:34px;height:46px;padding:0;border-radius:16px;background:#ffffffd9;color:#143c58;font-size:34px;line-height:1;box-shadow:0 4px 0 #174c62}.world-arrow.prev{left:5px}.world-arrow.next{right:5px}#selectedWorldName{display:block;margin:-2px auto 0;color:#ffe56b;font-size:14px}
#start #play{padding:9px 26px;font-size:17px;margin-top:1px}#start #play:disabled{filter:grayscale(.7);opacity:.7;box-shadow:0 4px 0 #3e5158}
#start h1{line-height:1.18;margin:4px 0 0}#start .brand-tagline{display:block;position:relative;margin:8px 0 6px!important;line-height:1.35}
@media(orientation:landscape) and (max-height:650px){#start{width:min(92vw,760px);padding:4px 20px 7px}.brand-hero{height:55px;width:190px;margin:-6px auto -7px}#start h1{font-size:27px;line-height:1.18;margin-top:3px}#start .brand-tagline{font-size:10px!important;margin:5px 0 4px!important;line-height:1.25}#start .difficulty{margin:2px auto 3px}#start .difficulty button img{width:44px;height:44px}#start .difficulty button b{font-size:10px}#start .difficulty button small{font-size:7px}.world-picker{width:540px;padding-top:14px;margin:-2px auto 2px}.world-carousel{padding-top:12px;padding-bottom:3px}.world-orb{flex-basis:74px;width:74px;height:90px}.world-orb img{width:70px;height:70px}.world-orb.selected{transform:scale(1.13)}.world-arrow{top:47px;height:37px;font-size:28px}#selectedWorldName{font-size:11px}#start #play{padding:6px 23px;font-size:14px}#start>small{font-size:8px;margin-top:4px}}

/* Ten-stage learning checks: quiet assessment with no answer reveal. */
.exam-screen,.exam-result{position:fixed;z-index:80;inset:0;display:grid;place-items:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:radial-gradient(circle at 50% 18%,#35b9d766,#061e3aeF 65%),url('assets/zones/bg-numbers-1.jpg') center/cover}
.exam-card,.exam-result-card{width:min(92vw,620px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;padding:18px;border:5px solid #ffd85d;border-radius:30px;background:linear-gradient(180deg,#fffbe7,#e4fff1);box-shadow:0 10px 0 #b86b16,0 20px 45px #001b;color:#123b58;text-align:center}
.exam-head{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:8px}.exam-head span{font-size:34px}.exam-head h2{margin:0;color:#0c6b53;font-size:clamp(19px,5vw,30px)}.exam-head b{direction:ltr;padding:7px 10px;border-radius:16px;background:#123b58;color:#fff;font-size:14px}
.exam-meter{height:12px;margin:12px 0 15px;border-radius:12px;background:#c7d9dd;overflow:hidden}.exam-meter i{display:block;width:10%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#42d794,#ffd54e);transition:width .22s ease}
#examPrompt{min-height:42px;margin:5px 0 10px;font-size:clamp(21px,5.4vw,30px);line-height:1.35;color:#173a6c}
.exam-visual{display:grid;place-items:center;min-height:100px;margin:4px auto 12px;padding:9px;border:3px solid #76ded7;border-radius:22px;background:#073d56;color:#fff}.exam-visual img{display:block;width:auto;height:auto;max-width:160px;max-height:145px;object-fit:contain}.exam-count{display:grid;grid-template-columns:repeat(5,1fr);gap:8px 12px;align-items:center;justify-items:center}.exam-count i{font-style:normal;font-size:32px;filter:drop-shadow(0 3px 2px #0018)}.kg1-exam-count{grid-template-columns:repeat(5,minmax(24px,58px));grid-auto-rows:minmax(24px,58px);justify-content:center;align-content:center;width:min(92%,360px);height:100%;margin:auto;gap:5px}.kg1-exam-count img{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain}
.exam-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.exam-choices button{min-height:58px;padding:8px;border:4px solid #ffd354;border-radius:22px;background:#fff;color:#123b58;font-size:clamp(18px,5vw,25px);font-weight:900;box-shadow:0 6px 0 #d98c1e;overflow-wrap:anywhere}.exam-choices button.selected{border-color:#67f0ce;background:#1679ad;color:#fff;transform:translateY(3px);box-shadow:0 3px 0 #064a72}.exam-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px}.exam-actions button{min-height:51px;border:0;border-radius:20px;font-weight:900;font-size:16px}.exam-actions #examNext{background:linear-gradient(#ffe879,#ffbb38);color:#173a6c;box-shadow:0 6px 0 #c67218}.exam-actions #examNext:disabled{filter:grayscale(.8);opacity:.55}.exam-actions #examExit{background:#dbe9e8;color:#315264;box-shadow:0 6px 0 #91aaaa}
.exam-node{position:relative;z-index:3;display:grid;grid-template-columns:48px 1fr;grid-template-rows:auto auto;align-items:center;width:190px;min-height:72px;margin:36px auto;padding:8px 14px;border:4px solid #fff4a2;border-radius:22px;background:linear-gradient(135deg,#8154d4,#3e90dc);color:#fff;box-shadow:0 8px 0 #25326d,0 14px 25px #0018}.exam-node span{grid-row:1/3;font-size:36px}.exam-node b{font-size:19px}.exam-node small{font-size:12px;color:#fffbd0}.exam-node.ready{animation:worldNodePulse 1.15s ease-in-out infinite}.exam-node.done{background:linear-gradient(135deg,#159b68,#56c989)}.exam-node.locked{filter:grayscale(.9);opacity:.7}
.exam-result-card .exam-medal{font-size:64px}.exam-result-card h2{margin:0;color:#d46a19;font-size:31px}.exam-score{direction:ltr;margin:10px auto;width:170px;padding:12px;border-radius:25px;background:#0b7356;color:#fff;font-size:38px;font-weight:1000}.exam-result-card p{font-size:19px}.exam-review{max-height:30dvh;overflow:auto;padding:10px;border-radius:18px;background:#e0eee9}.exam-review div{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin-top:8px}.exam-review span{padding:6px 9px;border-radius:12px;background:#fff;color:#17466a;font-weight:800}.exam-result-card>button{min-height:55px;margin-top:14px;padding:8px 25px;border:0;border-radius:20px;background:linear-gradient(#ffe879,#ffba36);color:#173a6c;font-size:19px;font-weight:900;box-shadow:0 6px 0 #c67218}
@media(orientation:landscape) and (max-height:650px){.exam-card,.exam-result-card{width:min(88vw,760px);padding:10px 15px;border-radius:23px}.exam-head{grid-template-columns:40px 1fr auto}.exam-head span{font-size:27px}.exam-meter{margin:7px 0}.exam-card-body{display:grid;grid-template-columns:minmax(180px,.8fr) 1.2fr;gap:12px;align-items:center}#examPrompt{grid-column:1/-1;min-height:0;margin:0;font-size:20px}.exam-visual{min-height:74px;margin:0}.exam-visual img{max-height:90px}.exam-count i{font-size:23px}.exam-choices button{min-height:44px;font-size:17px}.exam-actions{margin-top:10px}.exam-actions button{min-height:42px}.exam-result-card .exam-medal{font-size:38px}.exam-result-card h2{font-size:24px}.exam-score{margin:5px auto;padding:5px;font-size:28px}.exam-result-card p{margin:5px;font-size:16px}.exam-review{max-height:19dvh}}
.exam-object-emoji{font-size:76px;line-height:1;filter:drop-shadow(0 5px 3px #0018)}
.achievement-exams{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:4px 0 10px}.achievement-exams>span{display:flex;flex-direction:column;padding:5px 2px;border-radius:10px;background:#d9f4e8;color:#235a55;font-size:8px;font-weight:900}.achievement-exams>span b{direction:ltr;margin-top:1px;color:#087653;font-size:11px}.achievement-exams>span.pending{background:#e6ecee;color:#829195}.achievement-exams>span.pending b{color:#829195}

/* Six-stage Objects prototype: a warm toy-room identity, distinct from jungle and numbers. */
.objects-map{background:linear-gradient(#713f7a66,#283b76a8),radial-gradient(circle at 25% 15%,#fff6 0 4px,transparent 5px),var(--map-bg,url('assets/zones/bg-objects-1.jpg')) center/cover fixed!important}
.objects-map .stage-node{background:linear-gradient(175deg,#ff9f45,#e75b65);border-color:#fff0a7;box-shadow:0 8px 0 #8d3150,0 13px 25px #0019}
.objects-map .map-zone{background:linear-gradient(135deg,#8a55bc,#e15d8c);border-color:#ffe8a8;box-shadow:0 9px 0 #5e2d79,0 14px 25px #0018}

/* Every world now has its own journey language, not recolored wooden signs. */
#mapPath.animals-map,#mapPath.numbers-map,#mapPath.objects-map{isolation:isolate}
#mapPath.animals-map:before,#mapPath.numbers-map:before,#mapPath.objects-map:before{content:"";position:absolute;z-index:0;left:50%;top:90px;bottom:70px;transform:translateX(-50%);pointer-events:none}

/* Animals: a living branch, flower milestones and small leaves. */
#mapPath.animals-map:before{width:25px;border-radius:50% 38% 45% 55%;background:linear-gradient(90deg,#3c1d0a,#8b5224 35%,#5a2d10 72%,#2e1608);box-shadow:-9px 0 0 -5px #2c6d32,10px 0 0 -6px #7fb741,0 0 0 3px #2b1609aa;transform:translateX(-50%) rotate(1.5deg)}
#mapPath.animals-map .stage-node{z-index:1;width:86px;height:86px;margin:34px auto;border-radius:50%;padding:0;transform:none;background:radial-gradient(circle,#fff8b9 0 29%,#ffbd35 30% 45%,#ff6f87 46% 63%,#fff4a4 64% 100%);border:6px solid #fff7bd;box-shadow:0 7px 0 #7c3d19,0 10px 24px #0018;color:#28482e;text-shadow:0 2px #fff;clip-path:none}
#mapPath.animals-map .stage-node:nth-of-type(4n+1){transform:translateX(-145px) rotate(-5deg)}
#mapPath.animals-map .stage-node:nth-of-type(4n+3){transform:translateX(145px) rotate(5deg)}
#mapPath.animals-map .stage-node:before{content:"🌿";position:absolute;z-index:-1;left:-48px;top:24px;width:auto;height:auto;border:0;background:none;font-size:34px;transform:rotate(-24deg)}
#mapPath.animals-map .stage-node:after{content:"";position:absolute;z-index:-2;left:50%;top:50%;width:175px;height:18px;border:0;border-radius:50%;background:linear-gradient(#8a5126,#4c260f);transform:translate(-50%,-50%) rotate(-9deg);box-shadow:0 4px 0 #2c160b}
#mapPath.animals-map .stage-node:nth-of-type(4n+3):after{transform:translate(-50%,-50%) rotate(9deg)}
#mapPath.animals-map .stage-node .stage-label{display:none}
#mapPath.animals-map .stage-node strong{font-size:32px}
#mapPath.animals-map .map-zone{position:relative;z-index:2;border-radius:20px 6px 20px 6px;background:linear-gradient(#8b592d,#543017)}

/* Numbers: real rails, sleepers and bright station stops. */
#mapPath.numbers-map:before{width:78px;background:linear-gradient(90deg,#c7d0dc 0 8px,#4b5667 8px 14px,transparent 14px 64px,#4b5667 64px 70px,#c7d0dc 70px),repeating-linear-gradient(0deg,#56351f 0 9px,transparent 9px 34px);filter:drop-shadow(0 5px 4px #0018)}
#mapPath.numbers-map .stage-node{z-index:1;width:142px;height:76px;margin:42px auto;border-radius:31px 31px 14px 14px;padding:8px 15px;transform:none;background:linear-gradient(#65cfff 0 32%,#fff8c2 33% 70%,#3869d7 71%);border:5px solid #eaffff;box-shadow:0 8px 0 #192f75,0 13px 24px #0019;color:#163765;text-shadow:0 2px #fff;clip-path:none}
#mapPath.numbers-map .stage-node:before{content:"";position:absolute;z-index:-1;left:13px;right:13px;bottom:-17px;height:18px;border-radius:4px;background:repeating-linear-gradient(90deg,#30343c 0 13px,#9aa7b5 13px 21px);border:2px solid #dce9f3}
#mapPath.numbers-map .stage-node:after{content:"🚦";position:absolute;z-index:2;right:-38px;top:8px;width:auto;height:auto;border:0;background:none;font-size:31px}
#mapPath.numbers-map .stage-node .stage-label{font-size:11px;color:#284774}
#mapPath.numbers-map .stage-node strong{font-size:31px}
#mapPath.numbers-map .map-zone{position:relative;z-index:2;border-radius:28px;background:linear-gradient(#536ee8,#2a398f)}

/* Objects: a winding party ribbon with alternating pennant milestones. */
#mapPath.objects-map:before{width:16px;border-radius:12px;background:repeating-linear-gradient(0deg,#ffda52 0 24px,#ef5882 24px 48px,#50cfe1 48px 72px,#8c5ed8 72px 96px);box-shadow:0 0 0 5px #fff8c4aa,0 5px 13px #0018;transform:translateX(-50%) rotate(-2deg)}
#mapPath.objects-map .stage-node{z-index:1;width:132px;height:94px;margin:38px auto;padding:7px 13px 22px;border-radius:20px 20px 7px 7px;clip-path:polygon(0 0,100% 0,100% 77%,50% 100%,0 77%);transform:none;background:linear-gradient(155deg,#ffbe45,#ff657f);border:0;outline:5px solid #fff4b0;outline-offset:2px;box-shadow:0 10px 0 #8f385f,0 16px 26px #0018;color:#53355e;text-shadow:0 2px #fff4c0}
#mapPath.objects-map .stage-node:nth-of-type(4n+1){transform:translateX(-145px) rotate(-5deg)}
#mapPath.objects-map .stage-node:nth-of-type(4n+3){transform:translateX(145px) rotate(5deg)}
#mapPath.objects-map .stage-node:before{content:"";position:absolute;z-index:-2;left:50%;top:-35px;width:190px;height:12px;border:0;border-radius:12px;background:repeating-linear-gradient(90deg,#ffe261 0 30px,#ee5e89 30px 60px,#55d3dd 60px 90px);transform:translateX(-50%) rotate(-7deg);box-shadow:0 3px 0 #6a3762}
#mapPath.objects-map .stage-node:nth-of-type(4n+3):before{transform:translateX(-50%) rotate(7deg)}
#mapPath.objects-map .stage-node:after{content:"★";position:absolute;z-index:2;left:9px;top:8px;width:auto;height:auto;border:0;background:none;color:#fff7a1;font-size:20px}
#mapPath.objects-map .stage-node .stage-label{font-size:11px;color:#75435c}
#mapPath.objects-map .stage-node strong{font-size:31px}
#mapPath.objects-map .map-zone{position:relative;z-index:2;border-radius:35px;background:linear-gradient(135deg,#8a55bc,#e15d8c)}

/* Locked and current states remain unmistakable across all three silhouettes. */
#mapPath .stage-node.locked{filter:grayscale(.88);opacity:.72}
#mapPath .stage-node.current{outline-color:#76ffae;filter:brightness(1.08);animation:worldNodePulse 1.15s ease-in-out infinite}
@keyframes worldNodePulse{50%{filter:brightness(1.32) drop-shadow(0 0 13px #7cffad)}}
@media(orientation:landscape) and (max-height:650px){#mapPath.animals-map .stage-node:nth-of-type(4n+1),#mapPath.objects-map .stage-node:nth-of-type(4n+1){transform:translateX(-110px) rotate(-4deg)}#mapPath.animals-map .stage-node:nth-of-type(4n+3),#mapPath.objects-map .stage-node:nth-of-type(4n+3){transform:translateX(110px) rotate(4deg)}}

/* Connected-path rebuild: one uninterrupted route, one child-readable idea per world. */
#mapPath.animals-map:before,#mapPath.numbers-map:before,#mapPath.objects-map:before{content:none}
.path-journey{position:relative;width:min(92%,650px);min-height:100%;margin:0 auto;padding:38px 0 130px;isolation:isolate}
.path-journey:before{content:"";position:absolute;z-index:0;top:0;bottom:0;left:50%;transform:translateX(-50%);pointer-events:none}
.path-journey>.stage-node,.path-journey>.map-zone{position:relative;z-index:2}
.path-journey>.stage-node:before,.path-journey>.stage-node:after{box-sizing:border-box}

/* Animals — one long tree limb, with every flower growing from it. */
#mapPath.animals-map .path-journey:before{width:34px;border:5px solid #3b1c0a;border-radius:46% 54% 42% 58%;background:linear-gradient(90deg,#3a1908 0,#744018 18%,#a86529 45%,#724016 72%,#321607 100%);box-shadow:inset 6px 0 0 #c8833a55,inset -5px 0 0 #20100566,0 6px 8px #0017;transform:translateX(-50%) rotate(1deg)}
#mapPath.animals-map .path-journey>.stage-node{width:82px;height:82px;margin:56px auto;border-radius:50%;padding:0;clip-path:none;outline:0;background:radial-gradient(circle,#fff7b0 0 30%,#ffd74f 31% 45%,#ff718b 46% 64%,#fff1a1 65%);border:6px solid #fff9c5;box-shadow:0 7px 0 #784019,0 12px 23px #0017;color:#244c2d;text-shadow:0 2px #fff;transform:none}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(odd){transform:translateX(-142px)}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even){transform:translateX(142px)}
#mapPath.animals-map .path-journey>.stage-node:after{content:"";position:absolute;z-index:-2;top:50%;left:50%;width:168px;height:19px;border:4px solid #3b1c0a;border-radius:55% 45% 50% 50%;background:linear-gradient(#a86529,#5b2d10);box-shadow:0 4px 4px #0016;transform:translateY(-50%) rotate(-7deg)}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even):after{left:auto;right:50%;transform:translateY(-50%) rotate(7deg)}
#mapPath.animals-map .path-journey>.stage-node:before{content:"🌿";position:absolute;z-index:3;top:20px;left:-42px;width:auto;height:auto;border:0;background:none;font-size:31px;transform:rotate(-20deg)}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even):before{left:auto;right:-42px;transform:rotate(20deg)}
#mapPath.animals-map .path-journey>.stage-node .stage-label{display:none}#mapPath.animals-map .path-journey>.stage-node strong{font-size:31px}

/* Numbers — one clean railway; each number is a stop, with no repeated traffic-light clutter. */
#mapPath.numbers-map .path-journey{width:min(88%,520px)}
#mapPath.numbers-map .path-journey:before{width:82px;background:linear-gradient(90deg,#cbd5df 0 7px,#3d4652 7px 14px,transparent 14px 68px,#3d4652 68px 75px,#cbd5df 75px),repeating-linear-gradient(0deg,#654020 0 9px,transparent 9px 34px);filter:drop-shadow(0 5px 3px #0018)}
#mapPath.numbers-map .path-journey>.stage-node{width:86px;height:86px;margin:48px auto;border-radius:50%;padding:0;clip-path:none;outline:0;background:radial-gradient(circle,#fff8c5 0 52%,#55bff1 53% 68%,#2857bd 69%);border:6px solid #fff;box-shadow:0 7px 0 #182d70,0 11px 20px #0017;color:#173a6c;text-shadow:0 2px #fff;transform:none}
#mapPath.numbers-map .path-journey>.stage-node:before{content:"";position:absolute;z-index:-1;left:-18px;right:-18px;bottom:-13px;height:14px;border:3px solid #e4edf5;border-radius:4px;background:#454c57}
#mapPath.numbers-map .path-journey>.stage-node:after{content:none}
#mapPath.numbers-map .path-journey>.stage-node .stage-label{display:none}#mapPath.numbers-map .path-journey>.stage-node strong{font-size:33px}
.numbers-map .path-journey>.map-zone{margin:62px auto 44px;padding:10px 24px;border-radius:22px;font-size:20px}

/* Objects — a familiar party garland: colored ribbon, round ornaments and bows. */
#mapPath.objects-map .path-journey:before{width:16px;border:4px solid #fff3a8;border-radius:14px;background:repeating-linear-gradient(0deg,#ffcf45 0 45px,#f05d86 45px 90px,#53c9dd 90px 135px,#8d62d9 135px 180px);box-shadow:0 5px 7px #0016;transform:translateX(-50%) rotate(-1deg)}
#mapPath.objects-map .path-journey>.stage-node{width:84px;height:84px;margin:54px auto;border-radius:50%;padding:0;clip-path:none;outline:0;background:radial-gradient(circle at 35% 28%,#fff 0 7%,#ffd15a 8% 50%,#f26486 51% 72%,#fff3a8 73%);border:5px solid #fff9cf;box-shadow:0 7px 0 #87365e,0 11px 21px #0017;color:#533455;text-shadow:0 2px #fff;transform:none}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(odd){transform:translateX(-126px)}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(even){transform:translateX(126px)}
#mapPath.objects-map .path-journey>.stage-node:after{content:"";position:absolute;z-index:-2;top:50%;left:50%;width:150px;height:12px;border:3px solid #fff0a2;border-radius:9px;background:#f05d86;transform:translateY(-50%)}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(even):after{left:auto;right:50%;background:#54cadc}
#mapPath.objects-map .path-journey>.stage-node:before{content:"🎀";position:absolute;z-index:3;left:50%;top:-31px;width:auto;height:auto;border:0;background:none;font-size:28px;transform:translateX(-50%)}
#mapPath.objects-map .path-journey>.stage-node .stage-label{display:none}#mapPath.objects-map .path-journey>.stage-node strong{font-size:32px}
.objects-map .path-journey>.map-zone{margin:58px auto 42px;padding:10px 24px;border-radius:24px;font-size:20px}

#mapPath .path-journey>.stage-node.locked{filter:grayscale(.88);opacity:.74}#mapPath .path-journey>.stage-node.current{outline:6px solid #75ffab;outline-offset:5px}
@media(orientation:landscape) and (max-height:650px){#mapPath.animals-map .path-journey>.stage-node:nth-of-type(odd){transform:translateX(-112px)}#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even){transform:translateX(112px)}#mapPath.animals-map .path-journey>.stage-node:after{width:138px}#mapPath.objects-map .path-journey>.stage-node:nth-of-type(odd){transform:translateX(-104px)}#mapPath.objects-map .path-journey>.stage-node:nth-of-type(even){transform:translateX(104px)}#mapPath.objects-map .path-journey>.stage-node:after{width:128px}}

/* Asset-backed map refresh: clearer, connected paths for children. */
#mapPath.animals-map .path-journey{width:min(94%,720px);padding-bottom:210px}
#mapPath.animals-map .path-journey:before{width:56px;border:5px solid #3c1e0d;background:linear-gradient(90deg,#3a1a0b 0,#81451e 22%,#b56f31 48%,#7a3d19 74%,#321407 100%);box-shadow:inset 8px 0 #e0a05b44,inset -7px 0 #1c0b0666,0 8px 13px #0018}
#mapPath.animals-map .path-journey:after{content:"";position:absolute;z-index:1;left:50%;bottom:18px;width:190px;height:200px;transform:translateX(-50%);background:url('assets/map/stump-base.png') center bottom/contain no-repeat;pointer-events:none;filter:drop-shadow(0 12px 9px #0018)}
#mapPath.animals-map .path-journey>.stage-node{width:104px;height:104px;margin:64px auto;border:0;background:url('assets/map/flower-level.png') center/contain no-repeat;box-shadow:none;color:#123b50;text-shadow:0 2px #fff,0 0 7px #fff;filter:drop-shadow(0 9px 5px #0018)}
#mapPath.animals-map .path-journey>.stage-node strong{display:grid;place-items:center;width:49px;height:49px;border-radius:50%;background:#fffdf1dd;box-shadow:inset 0 0 0 3px #9ddfff;font-size:28px}
#mapPath.animals-map .path-journey>.stage-node:after{width:114px;height:96px;top:50%;left:50%;border:0;box-shadow:none;border-radius:0;background:url('assets/map/branch-liana.png') center/100% 100% no-repeat;transform:translateY(-50%) scaleX(-1);transform-origin:right center}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even):after{left:auto;right:50%;transform:translateY(-50%);transform-origin:left center}
#mapPath.animals-map .path-journey>.stage-node:before{content:none}
#mapPath.animals-map .path-journey>.stage-node.current{outline:7px solid #76ffae;outline-offset:6px;border-radius:50%}
#mapPath.animals-map .path-journey>.map-zone{min-width:270px;margin:82px auto 58px;padding:18px 28px;border:5px solid #f5c46f;border-radius:18px;background:linear-gradient(145deg,#8a4c20,#4b2510);box-shadow:0 9px 0 #2e1508,0 15px 25px #0018}

#mapPath.numbers-map .path-journey{width:min(90%,560px);padding-bottom:150px}
#mapPath.numbers-map .path-journey:before{width:142px;border:0;border-radius:0;background:url('assets/map/rail-straight.png') center top/140px auto repeat-y;filter:drop-shadow(0 7px 5px #0018)}
#mapPath.numbers-map .path-journey>.stage-node{width:92px;height:92px;margin:58px auto;border:6px solid #fff8cf;background:radial-gradient(circle at 35% 28%,#fff 0 8%,#ffe36c 9% 51%,#ff914d 52% 68%,#3479dc 69%);box-shadow:0 8px 0 #163d83,0 13px 22px #0018;color:#153866}
#mapPath.numbers-map .path-journey>.stage-node strong{font-size:34px}
#mapPath.numbers-map .path-journey>.stage-node:before,#mapPath.numbers-map .path-journey>.stage-node:after{content:none}
#mapPath.numbers-map .path-journey>.map-zone{width:290px;min-height:195px;margin:76px auto 50px;padding:126px 18px 14px;border:4px solid #fff5c2;border-radius:28px;background:url('assets/map/station-building.png') center 5px/190px auto no-repeat,linear-gradient(#5bc4e8,#345fc1);box-shadow:0 9px 0 #173372,0 15px 26px #0019;color:#fff;text-shadow:0 2px #173372}
#mapPath.numbers-map .path-journey>.map-zone strong{display:block;font-size:22px}
#mapPath.numbers-map .path-journey>.map-zone span{color:#fffbd1}

@media(max-width:620px){#mapPath.animals-map .path-journey>.stage-node:nth-of-type(odd){transform:translateX(-102px)}#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even){transform:translateX(102px)}#mapPath.animals-map .path-journey>.stage-node:after{width:74px;height:68px}#mapPath.numbers-map .path-journey>.map-zone{width:250px}}
@media(orientation:landscape) and (max-height:650px) and (min-width:621px){#mapPath.animals-map .path-journey>.stage-node:after{width:86px;height:76px}}

/* Objects world: one playful 3D party garland, not disconnected cards. */
#mapPath.objects-map .path-journey{width:min(92%,620px);padding:45px 0 145px}
#mapPath.objects-map .path-journey:before{width:18px;border:0;border-radius:14px;background:linear-gradient(90deg,#251722,#4d3449 40%,#241721 62%,#080609);box-shadow:5px 0 0 #fff4bd33,0 7px 9px #0018;transform:translateX(-50%)}
#mapPath.objects-map .path-journey>.stage-node{width:118px;height:130px;margin:64px auto;border:0;border-radius:0;padding:20px 0 0;background:url('assets/map/party-ball.png') center/contain no-repeat;box-shadow:none;outline:0;color:#fff;text-shadow:0 3px 2px #641322,0 0 7px #fff;filter:drop-shadow(0 11px 7px #0018)}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(odd){--object-shift:-132px;transform:translateX(var(--object-shift))}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(even){--object-shift:132px;transform:translateX(var(--object-shift))}
#mapPath.objects-map .path-journey>.stage-node strong{display:grid;place-items:center;width:48px;height:48px;margin:12px auto 0;border-radius:50%;background:#ffffffde;color:#6c214a;text-shadow:0 2px #fff;box-shadow:0 0 0 4px #ffd970;font-size:30px}
#mapPath.objects-map .path-journey>.stage-node:after{content:"";position:absolute;z-index:-2;top:22px;left:54%;width:148px;height:12px;border:0;border-radius:12px;background:linear-gradient(#21151f,#050405);box-shadow:0 3px 0 #fff2b32e;transform:translateY(-50%)}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(even):after{left:auto;right:54%;background:linear-gradient(#21151f,#050405)}
#mapPath.objects-map .path-journey>.stage-node:before{content:"";position:absolute;z-index:3;left:50%;top:0;width:35px;height:17px;border:0;border-radius:50% 50% 25% 25%;background:linear-gradient(90deg,#ffdb5a,#ff8d2f,#ffdb5a);transform:translateX(-50%)}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(3n+1){filter:hue-rotate(0deg) drop-shadow(0 11px 7px #0018)}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(3n+2){filter:hue-rotate(110deg) drop-shadow(0 11px 7px #0018)}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(3n){filter:hue-rotate(245deg) drop-shadow(0 11px 7px #0018)}
#mapPath.objects-map .path-journey>.stage-node.current{outline:7px solid #77ffad;outline-offset:5px;border-radius:50%;animation:objectBallPulse 1.1s ease-in-out infinite}
@keyframes objectBallPulse{50%{transform:translateX(var(--object-shift,0)) scale(1.08);filter:brightness(1.25) drop-shadow(0 0 17px #7cffad)}}
#mapPath.objects-map .path-journey>.map-zone{width:310px;min-height:155px;margin:68px auto 42px;padding:88px 22px 15px;border:4px solid #fff2a8;border-radius:27px;background:url('assets/map/party-bunting.png') center 9px/270px auto no-repeat,linear-gradient(145deg,#8a55bc,#d74d82);box-shadow:0 9px 0 #592268,0 15px 26px #0018;color:#fff;text-shadow:0 2px #592268}
#mapPath.objects-map .path-journey>.map-zone strong{font-size:23px}

/* Richer completion celebration using the supplied confetti artwork. */
.celebration:before{content:"";position:absolute;inset:0;z-index:0;background:url('assets/map/celebration-confetti.png') center/cover no-repeat;opacity:.42;pointer-events:none;animation:celebrationFloat 3s ease-in-out infinite alternate}
.celebration .rays,.celebration #confetti,.celebration .reward-card{z-index:1}
@keyframes celebrationFloat{to{transform:translateY(18px) scale(1.03)}}

@media(max-width:620px){#mapPath.objects-map .path-journey>.stage-node:nth-of-type(odd){--object-shift:-96px}#mapPath.objects-map .path-journey>.stage-node:nth-of-type(even){--object-shift:96px}#mapPath.objects-map .path-journey>.stage-node:after{width:112px}#mapPath.objects-map .path-journey>.map-zone{width:260px}}

/* One compact explanation that changes with the selected difficulty. */
.difficulty-info{width:max-content;max-width:min(92%,520px);margin:3px auto 1px;padding:5px 14px;border-radius:18px;background:#061d3bbd;border:1px solid #ffe78999;color:#fff;box-shadow:0 4px 10px #0016;font-size:10px;line-height:1.35;text-align:center}
.difficulty-info b{margin-left:7px;color:#ffe66c;font-size:12px}.difficulty-info span{color:#dff8ff}
@media(orientation:landscape) and (max-height:650px){.difficulty-info{padding:3px 11px;font-size:8px}.difficulty-info b{font-size:9px}}

/* Single automatic branch geometry for every current and future animal stage. */
#mapPath.animals-map .path-journey{--stage-offset:142px;--trunk-half:33px;--branch-length:calc(var(--stage-offset) - var(--trunk-half))}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(odd){transform:translateX(calc(0px - var(--stage-offset)))}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even){transform:translateX(var(--stage-offset))}
#mapPath.animals-map .path-journey>.stage-node:after{width:var(--branch-length);height:82px;left:50%;right:auto;background-size:100% 100%;transform:translateY(-50%) scaleX(-1);transform-origin:right center}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even):after{left:auto;right:50%;transform:translateY(-50%);transform-origin:left center}
@media(max-width:620px){#mapPath.animals-map .path-journey{--stage-offset:102px;--trunk-half:33px}#mapPath.animals-map .path-journey>.stage-node:after{height:64px}}
@media(orientation:landscape) and (max-height:650px) and (min-width:621px){#mapPath.animals-map .path-journey{--stage-offset:112px;--trunk-half:33px}#mapPath.animals-map .path-journey>.stage-node:after{height:70px}}

/* Edge-to-edge connector: flower edge -> trunk edge, shared by every stage. */
#mapPath.animals-map .path-journey{--stage-offset:175px;--trunk-half:33px;--flower-radius:52px;--branch-overlap:10px;--branch-length:calc(var(--stage-offset) - var(--flower-radius) - var(--trunk-half) + var(--branch-overlap))}
#mapPath.animals-map .path-journey>.stage-node:after{left:calc(100% - var(--branch-overlap));right:auto;width:var(--branch-length);height:82px;transform:translateY(-50%) scaleX(-1);transform-origin:right center}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even):after{left:auto;right:calc(100% - var(--branch-overlap));transform:translateY(-50%);transform-origin:left center}
@media(max-width:620px){#mapPath.animals-map .path-journey{--stage-offset:122px;--trunk-half:33px;--flower-radius:52px;--branch-overlap:9px}#mapPath.animals-map .path-journey>.stage-node:after{height:58px}}
@media(orientation:landscape) and (max-height:650px) and (min-width:621px){#mapPath.animals-map .path-journey{--stage-offset:155px;--trunk-half:33px;--flower-radius:52px;--branch-overlap:10px}#mapPath.animals-map .path-journey>.stage-node:after{height:72px}}

/* Animals: one adaptive Candy-Crush-style vine. The SVG is calculated from the
   real flower centres, so new stages always land directly on the same branch. */
#mapPath.animals-map>.map-vines{display:none}
#mapPath.animals-map .path-journey{--stage-offset:108px;width:min(94%,620px);padding:58px 0 150px}
#mapPath.animals-map .path-journey:before,#mapPath.animals-map .path-journey:after{content:none}
#mapPath.animals-map .path-journey>.stage-node{margin:53px auto;z-index:2}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(odd){transform:translateX(calc(0px - var(--stage-offset)))}
#mapPath.animals-map .path-journey>.stage-node:nth-of-type(even){transform:translateX(var(--stage-offset))}
#mapPath.animals-map .path-journey>.stage-node:before,#mapPath.animals-map .path-journey>.stage-node:after{content:none}
.animal-vine{position:absolute;inset:0;z-index:0;width:100%;height:100%;overflow:visible;pointer-events:none;filter:drop-shadow(0 8px 6px #0018)}
.animal-vine path{fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.animal-vine .vine-shadow{stroke:#231006;stroke-width:34}
.animal-vine .vine-bark{stroke:url(#animalVineBark);stroke-width:25}
.animal-vine .vine-highlight{stroke:#efad62;stroke-width:4;opacity:.48}
.animal-vine .twig-shadow{stroke:#241006;stroke-width:15}
.animal-vine .twig-bark{stroke:#744019;stroke-width:10}
.animal-vine .vine-leaf{fill:#62bd35;stroke:#205e20;stroke-width:2;filter:drop-shadow(0 3px 2px #0017)}
.animal-vine .leaf-1{fill:#91d83e}.animal-vine .leaf-2{fill:#3f9c31}
#mapPath.animals-map .path-journey>.map-zone{z-index:3;margin:62px auto 42px}
@media(max-width:620px){#mapPath.animals-map .path-journey{--stage-offset:82px;width:min(98%,430px)}#mapPath.animals-map .path-journey>.stage-node{margin:48px auto}.animal-vine .vine-shadow{stroke-width:30}.animal-vine .vine-bark{stroke-width:22}}
@media(orientation:landscape) and (max-height:650px) and (min-width:621px){#mapPath.animals-map .path-journey{--stage-offset:92px;width:min(90%,540px)}}

/* Final map alignment pass: the legend belongs to the map header and must not
   float over milestones while the child scrolls. */
#mapPath>.map-vines{position:relative;top:auto}

/* Numbers: the station is a freestanding 3D landmark placed directly on the
   railway. No card, panel or artificial background surrounds it. */
#mapPath.numbers-map .path-journey>.map-zone{
  width:270px;min-height:225px;margin:82px auto 48px;padding:166px 8px 0;
  border:0;border-radius:0;
  background:url('assets/map/station-building.png') center top/235px auto no-repeat;
  box-shadow:none;color:#fff7c5;text-align:center;
  text-shadow:0 3px 2px #102f61,0 0 8px #102f61;
  filter:drop-shadow(0 13px 8px #0019)
}
#mapPath.numbers-map .path-journey>.map-zone strong{font-size:22px;line-height:1.15}
#mapPath.numbers-map .path-journey>.map-zone span{display:block;margin-top:3px;color:#fff;font-weight:900}

/* Objects: one central party cable. Every ornament uses the same edge-to-edge
   calculation, so future stages connect correctly without hand positioning. */
#mapPath.objects-map .path-journey{
  --object-offset:150px;--object-radius:59px;--cord-half:7px;
  --connector-overlap:7px;
  --object-link:calc(var(--object-offset) - var(--object-radius) - var(--cord-half) + var(--connector-overlap));
  width:min(94%,620px);padding:55px 0 145px
}
#mapPath.objects-map .path-journey:before{
  width:14px;border:0;border-radius:12px;
  background:linear-gradient(90deg,#130b14,#493044 35%,#241421 65%,#090609);
  box-shadow:inset 3px 0 #ffffff1f,0 7px 9px #0018;
  transform:translateX(-50%)
}
#mapPath.objects-map .path-journey>.stage-node{
  width:118px;height:122px;margin:62px auto;padding:13px 0 0;
  background:url('assets/map/party-ball-clean.png') center/contain no-repeat;
  overflow:visible
}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(odd){--object-shift:calc(0px - var(--object-offset));transform:translateX(var(--object-shift))}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(even){--object-shift:var(--object-offset);transform:translateX(var(--object-shift))}
#mapPath.objects-map .path-journey>.stage-node strong{margin:25px auto 0}
#mapPath.objects-map .path-journey>.stage-node:before{content:none}
#mapPath.objects-map .path-journey>.stage-node:after{
  content:"";position:absolute;z-index:-2;top:10px;
  left:calc(100% - var(--connector-overlap));right:auto;
  width:var(--object-link);height:10px;border:0;border-radius:9px;
  background:linear-gradient(#493044,#0a070a);box-shadow:0 3px 0 #fff2b31f;
  transform:translateY(-50%)
}
#mapPath.objects-map .path-journey>.stage-node:nth-of-type(even):after{
  left:auto;right:calc(100% - var(--connector-overlap));
  background:linear-gradient(#493044,#0a070a)
}
#mapPath.objects-map .path-journey>.map-zone{
  width:300px;min-height:126px;margin:76px auto 42px;padding:78px 12px 0;
  border:0;border-radius:0;
  background:url('assets/map/party-bunting.png') center top/290px auto no-repeat;
  box-shadow:none;color:#fff6ac;text-shadow:0 3px 2px #592268,0 0 8px #592268
}
#mapPath.objects-map .path-journey>.map-zone span{color:#fff;font-weight:900}

@media(max-width:620px){
  #mapPath.numbers-map .path-journey>.map-zone{width:235px;min-height:205px;padding-top:150px;background-size:210px auto}
  #mapPath.objects-map .path-journey{--object-offset:108px;--object-radius:52px;--cord-half:7px;--connector-overlap:7px;width:min(98%,430px)}
  #mapPath.objects-map .path-journey>.stage-node{width:104px;height:108px;margin:56px auto}
  #mapPath.objects-map .path-journey>.stage-node strong{margin-top:20px}
  #mapPath.objects-map .path-journey>.map-zone{width:255px;background-size:248px auto}
}

@media(orientation:landscape) and (max-height:650px) and (min-width:621px){
  #mapPath.objects-map .path-journey{--object-offset:126px;--object-radius:55px;width:min(90%,540px)}
  #mapPath.objects-map .path-journey>.stage-node{width:110px;height:114px;margin:54px auto}
}

/* The route key stays at the top rather than covering a stage. The stage art
   already explains these two routes clearly, so the floating strip is removed. */
#mapPath.numbers-map>.map-vines,#mapPath.objects-map>.map-vines{display:none}

/* The railway station is a real transparent image element, not a CSS card. */
#mapPath.numbers-map .path-journey>.map-zone{
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  width:270px;min-height:230px;margin:76px auto 48px;padding:0;
  background:none!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;filter:none
}
#mapPath.numbers-map .path-journey>.map-zone .railway-station{
  display:block;width:240px;height:190px;margin:0 auto -24px;object-fit:contain;
  filter:drop-shadow(0 13px 8px #0019);pointer-events:none
}
#mapPath.numbers-map .path-journey>.map-zone strong,
#mapPath.numbers-map .path-journey>.map-zone span{position:relative;z-index:2}

/* A quieter, perfectly mirrored object route: ornament edge to cable edge. */
#mapPath.objects-map .path-journey>.stage-node:after{top:10px;height:8px;box-shadow:none}
#mapPath.objects-map .path-journey>.stage-node strong{width:46px;height:46px;font-size:28px}

@media(max-width:620px){
  #mapPath.numbers-map .path-journey>.map-zone{width:230px;min-height:205px;padding:0}
  #mapPath.numbers-map .path-journey>.map-zone .railway-station{width:210px;height:170px;margin-bottom:-22px}
}

/* Number-world question art: counting remains readable without crowding the
   side panel, and equations use one child-friendly line. */
.target-preview .target-emoji .counting-dots{
  display:flex;direction:ltr;flex-wrap:wrap;align-content:center;justify-content:center;
  gap:3px;width:88%;max-width:260px;font-size:25px;line-height:1.05;text-shadow:none
}
.target-preview .target-emoji .counting-dots i{font-style:normal}
.target-preview .target-emoji .number-equation{font-size:clamp(56px,7vw,96px);white-space:nowrap}
.target-preview .target-emoji .clue-icon{font-size:clamp(78px,9vw,130px);text-shadow:0 7px 0 #fff,0 12px 20px #174e7e44}
.target-preview div{min-width:0;max-width:100%;overflow:hidden}
.target-preview.number-hard .target-emoji .number-equation{max-width:96%;font-size:clamp(28px,5.4vw,66px);letter-spacing:-2px;line-height:1;white-space:nowrap}
.target-preview.number-hard b{font-size:clamp(13px,1.6vw,21px);letter-spacing:1px}
.target-preview.object-hard b{max-width:100%;font-size:clamp(12px,1.65vw,20px);line-height:1.2;letter-spacing:0;overflow-wrap:anywhere;word-break:normal}
.target-preview.object-hard b:before{content:"READ THE CLUE"}
.target-preview .target-emoji .unknown-mark{font-size:clamp(70px,9vw,130px);line-height:.9;color:#173c78;text-shadow:0 5px 0 #fff}
@media(orientation:landscape) and (max-height:650px){
  .target-preview .target-emoji .counting-dots{max-width:210px;font-size:20px}
  .target-preview .target-emoji .number-equation{font-size:clamp(45px,12vh,75px)}
}

/* v79 — six age paths, stable lesson cards, clear stage controls and planes. */
.age-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.age-grid button{border-color:var(--age-color);background:linear-gradient(180deg,color-mix(in srgb,var(--age-color) 78%,#fff),var(--age-color));color:#082451}

.lesson-card{width:min(1000px,95vw)}
.lesson-words{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.lesson-words button{min-width:0;overflow:hidden;padding:10px 5px}
.lesson-words b{display:block;max-width:100%;padding-inline:2px;overflow:hidden;font-size:clamp(15px,1.55vw,21px);line-height:1.05;letter-spacing:-.4px;white-space:nowrap;text-overflow:clip}
.lesson-words button.long-word b{font-size:clamp(12px,1.25vw,17px);letter-spacing:-.8px}
.lesson-card .safe-nav{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;position:sticky;z-index:3;bottom:0;margin-top:10px;padding:8px;border-radius:18px;background:#e5fff2}
.lesson-card .safe-nav button{min-width:0;padding:9px 7px;font-size:clamp(11px,1.45vw,16px);white-space:nowrap}

/* Keep the three stage controls in one clean row inside the left rail. */
#exitStage,#helpStage,#repeatStage{top:max(12px,env(safe-area-inset-top))!important;width:46px!important;height:46px!important}
#exitStage{left:12px!important}
#helpStage{left:66px!important}
#repeatStage{left:120px!important}

/* Locked aircraft remain aspirational and readable; the lock communicates
   state without hiding the reward artwork. */
.plane-fleet button.locked{position:relative;filter:none!important;opacity:1!important;background:linear-gradient(#173a59,#0a2948)!important}
.plane-fleet button.locked img{filter:brightness(.82) saturate(.82)!important;opacity:.88!important}
.plane-fleet button.locked:after{content:"🔒";position:absolute;right:7px;top:6px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#071d38e6;border:2px solid #ffe56b;font-size:13px;box-shadow:0 3px 8px #0019}
.plane-fleet button.locked b{color:#ffe56b}
.plane-fleet button.locked small{color:#c8e9f2}

@media(max-width:720px){
  .lesson-words{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lesson-card .safe-nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:6px}
  .lesson-card .safe-nav button{padding:8px 3px;font-size:10px}
}
@media(orientation:landscape) and (max-height:650px){
  .lesson-card{width:min(96vw,1040px)}
  .lesson-words{gap:8px;margin:9px 0}
  .lesson-words button{min-height:116px;padding:5px 3px}
  .lesson-words img{width:58px;height:58px}
  .lesson-words b{font-size:clamp(13px,1.55vw,19px)}
  .lesson-words button.long-word b{font-size:clamp(11px,1.25vw,15px)}
  .lesson-card .safe-nav{margin-top:4px;padding:5px}
  #exitStage,#helpStage,#repeatStage{top:7px!important;width:42px!important;height:42px!important}
  #exitStage{left:10px!important}#helpStage{left:59px!important}#repeatStage{left:108px!important}
}

/* v74 — safe journey navigation and a clearer learning/reward hierarchy. */
.safe-nav{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.25fr);gap:10px;width:100%;margin-top:14px}
.safe-nav button{min-height:49px;padding:8px 12px;border:0;border-radius:18px;font-weight:1000;font-size:clamp(12px,2.8vw,16px)}
.safe-nav .home-action{background:#e5f0ef!important;color:#17455c!important;box-shadow:0 5px 0 #91aaaa!important}
.safe-nav button:not(.home-action){background:linear-gradient(#ffe879,#ffb52f)!important;color:#173a6c!important;box-shadow:0 5px 0 #c67218!important}
.exam-result-card{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.exam-result-card>.safe-nav{position:sticky;bottom:0;padding-top:5px;background:linear-gradient(#edfff500,#edfff5 25%)}
.journey-summary{display:grid;grid-template-columns:1fr 1fr;gap:7px 10px;width:100%;margin-top:12px;padding:10px 12px;border-radius:16px;background:#0a4966;color:#fff;font-size:12px;font-weight:900}
.journey-summary i,.reward-milestone i{grid-column:1/-1;display:block;height:8px;border-radius:99px;background:linear-gradient(90deg,#55e4bd var(--journey,0%),#ffffff38 var(--journey,0%));box-shadow:inset 0 1px 3px #0017}
.reward-milestone{grid-area:gift;display:grid;gap:6px;width:min(100%,390px);padding:8px 12px;border:2px solid #74e5c7;border-radius:15px;background:#073f58;color:#fff;font-size:11px;text-align:center}
.reward-milestone i{--journey:var(--reward-progress);background:linear-gradient(90deg,#ffe059 var(--reward-progress,0%),#ffffff38 var(--reward-progress,0%))}
.reward-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
.reward-actions button{min-width:0!important;padding-inline:6px!important;font-size:clamp(9px,2vw,13px)!important;white-space:nowrap}

/* Counting artwork must feel part of the game, never like a white document. */
.target-preview.number-count>.target-emoji,
.exam-screen[data-world="numbers"] .exam-visual:has(.counting-items){background:linear-gradient(145deg,#062b45,#07566a)!important;border:3px solid #67e4d3!important;color:#fff!important;box-shadow:inset 0 0 28px #0019,0 6px 0 #063247!important}
.target-preview.number-count .counting-items i,
.exam-screen[data-world="numbers"] .counting-items i{filter:drop-shadow(0 4px 3px #001)!important}

@media(orientation:portrait){
  .exam-result-card{width:min(94vw,620px);padding:14px 14px 16px}
  .exam-result-card .exam-review{max-height:25dvh;overflow:auto}
  .journey-summary{font-size:10px;padding:8px}
  .reward-actions{width:100%!important}
}
@media(orientation:landscape) and (max-height:500px){
  .exam-result-card{width:min(86vw,650px);padding:8px 14px 10px}
  .exam-result-card .exam-medal{font-size:25px}.exam-result-card .exam-score{font-size:32px}
  .exam-result-card .exam-review{max-height:19vh;overflow:auto}
  .journey-summary{margin-top:6px;padding:6px 9px}.safe-nav{margin-top:6px}.safe-nav button{min-height:38px}
  .reward-milestone{padding:5px 9px}.reward-actions button{min-height:34px!important}
}

/* v69 — five school levels, onboarding, placement test and plane workshop. */
.grade-picker{max-width:680px!important;gap:12px!important}.grade-picker button{flex-basis:100px!important}.grade-picker button img{width:62px!important;height:62px!important}.grade-picker button b{white-space:nowrap}
.profile-setup{position:absolute;inset:0;z-index:120;display:grid;place-items:center;padding:max(18px,env(safe-area-inset-top)) 18px;background:linear-gradient(150deg,#061b44e8,#0b6596e8)}
.profile-card,.placement-card,.hangar-card{width:min(92vw,540px);max-height:92dvh;overflow:auto;text-align:center;padding:24px;border:4px solid #ffe16b;border-radius:32px;background:linear-gradient(160deg,#0b3158,#071b43);box-shadow:0 13px 0 #a85a17,0 30px 70px #001a;color:#fff}
.profile-card h2,.hangar-card h2{font-size:clamp(28px,7vw,44px);margin:8px 0;color:#ffe46d}.profile-card p,.hangar-card p{font-size:16px;margin:8px 0 18px}.setup-kicker,.hangar-title{font-weight:1000;letter-spacing:2px;color:#74edda}
.age-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin:16px 0}.age-grid button{padding:12px;font-size:30px}.age-grid button.selected,.avatar-choice button.selected{outline:5px solid #78f1d9;transform:scale(1.05)}
.avatar-choice{display:flex;align-items:center;justify-content:space-between;margin:16px 0;padding:10px 14px;border-radius:20px;background:#ffffff13;font-weight:900}.avatar-choice div{display:flex;gap:9px}.avatar-choice button{padding:7px 10px;font-size:29px;background:#fff;box-shadow:0 4px 0 #8b6b3d}
.placement-fab{position:absolute;z-index:75;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));display:flex;align-items:center;gap:7px;padding:8px 12px;border:3px solid #fff;border-radius:22px;background:linear-gradient(#40ddc3,#159f96);box-shadow:0 5px 0 #096363;color:#06264b;font-size:12px}.placement-fab span{font-size:22px}
.placement-card{direction:ltr}.placement-card #placementPrompt{font-size:clamp(22px,5vw,32px);font-weight:900;color:#ffe476}.placement-card #placementVisual{min-height:85px;display:grid;place-items:center;font-size:clamp(40px,10vw,72px);background:#eefceb;color:#173b70;border-radius:22px;margin:12px 0}.placement-card .exam-choices button{white-space:normal}
.hangar-card{direction:ltr}.plane-blueprint{--plane-paint:#27c3e6;position:relative;display:grid;place-items:center;min-height:190px;margin:15px 0;border:3px dashed #71e9d8;border-radius:25px;background:radial-gradient(circle,var(--plane-paint)55,#092a4d 70%);transition:background .2s}.plane-blueprint>img{width:150px;height:150px;object-fit:contain;filter:drop-shadow(0 0 18px var(--plane-paint));animation:hangarPlaneFloat 1.5s ease-in-out infinite alternate}.plane-blueprint #planeParts{position:absolute;inset:8px;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;gap:4px}.plane-blueprint #planeParts span{opacity:.38;font-size:8px;color:#fff}.plane-blueprint #planeParts span.earned{opacity:1;color:#ffe56c}.plane-blueprint #planeParts i{display:grid;place-items:center;width:28px;height:28px;margin:auto;border-radius:50%;background:#09213f;border:2px solid currentColor;font-size:16px}.plane-blueprint #planeParts b{display:block;margin-top:4px}.plane-fleet{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.plane-fleet button{min-width:0;padding:7px 4px;border:3px solid #6f9ab7;border-radius:17px;background:#092849;color:#fff;box-shadow:0 5px 0 #04152b;transition:.15s}.plane-fleet button img{display:block;width:68px;height:58px;margin:auto;object-fit:contain}.plane-fleet button b,.plane-fleet button small{display:block;white-space:nowrap;font-size:8px}.plane-fleet button small{margin-top:3px;color:#87eedd;font-size:6px}.plane-fleet button.selected{border-color:#ffe568;background:#175c78;box-shadow:0 0 0 3px #ffe56844,0 5px 0 #6c4510;transform:translateY(-2px)}.plane-fleet button.locked{filter:grayscale(1);opacity:.55}.paint-label{display:block;margin-top:9px;color:#fff6ad;font-size:11px;letter-spacing:1px}.paint-row{display:flex;justify-content:center;gap:12px;margin:8px 15px 14px}.paint-row button{width:42px;height:42px;padding:0;border:4px solid #fff;border-radius:50%;box-shadow:0 4px 0 #0018}.paint-row button.selected{outline:4px solid #77f5df;outline-offset:3px;transform:scale(1.1)}.pilot-plane{position:absolute;right:-32px;bottom:-20px;width:80px;height:54px;filter:drop-shadow(0 6px 6px #0018);animation:pilotBob 1.2s ease-in-out infinite alternate}.pilot-plane i{font-style:normal;font-size:54px}.pilot-plane em{position:absolute;left:27px;top:14px;font-style:normal;font-size:17px}@keyframes pilotBob{to{transform:translateY(-7px)}}@keyframes hangarPlaneFloat{to{transform:translateY(-7px) rotate(2deg)}}
.plane-collection-progress{display:block;min-height:20px;margin:7px 0 2px;color:#8ff5e5;font-weight:800}.plane-blueprint #planeParts span.newly-earned i{animation:newPartFit .8s cubic-bezier(.2,.9,.25,1.35) both;box-shadow:0 0 0 8px #ffe56c33,0 0 22px #ffe56c}@keyframes newPartFit{0%{opacity:0;transform:translateY(-55px) scale(2.1) rotate(-25deg)}65%{opacity:1;transform:translateY(5px) scale(.9) rotate(5deg)}100%{transform:none}}
@media(orientation:portrait){.grade-picker{display:grid!important;grid-template-columns:repeat(5,1fr);gap:6px!important}.grade-picker button,.grade-picker button.selected{min-width:0!important;flex-basis:auto!important}.grade-picker button img{width:45px!important;height:45px!important}.grade-picker button b{font-size:9px!important}.grade-picker button small{font-size:6px!important}.placement-fab{top:max(74px,env(safe-area-inset-top));padding:6px 8px}.placement-fab b{display:none}.profile-card,.placement-card,.hangar-card{padding:18px 14px}}
@media(orientation:landscape) and (max-height:650px){.grade-picker{gap:10px!important}.grade-picker button img{width:40px!important;height:40px!important}.grade-picker button b{font-size:9px!important}.profile-card,.placement-card,.hangar-card{max-height:96dvh;padding:10px 18px}.placement-card #placementVisual{min-height:55px;margin:6px 0}.hangar-card h2{font-size:25px;margin:3px}.hangar-card>p{margin:3px}.plane-blueprint{min-height:105px;margin:5px 0}.plane-blueprint>img{width:88px;height:88px}.plane-fleet{margin:7px 0}.plane-fleet button img{width:52px;height:38px}.paint-row{margin:5px 15px 8px}.paint-row button{width:32px;height:32px}.placement-fab{padding:5px 8px}.placement-fab span{font-size:17px}}

/* v70 — show only the child's assigned school level and keep utilities clear. */
.grade-picker .grade-hidden{display:none!important}.grade-picker:has(.grade-hidden){width:max-content!important;min-width:135px!important;margin-inline:auto!important}.grade-picker:has(.grade-hidden) button.selected{flex-basis:128px!important}
.avatar-choice div{gap:12px}.avatar-choice button{display:flex;flex-direction:column;align-items:center;justify-content:center;width:66px;height:66px;padding:4px!important;border-radius:18px!important}.avatar-choice button i{font-style:normal;font-size:29px;line-height:1}.avatar-choice button b{margin-top:4px;font-size:8px;letter-spacing:.5px;color:#08234b}
.placement-fab{top:96px!important;right:16px!important;width:54px;height:54px;padding:0!important;justify-content:center;border-radius:50%!important}.placement-fab span{font-size:25px!important}.placement-fab b{display:none!important}
.map-screen:not(.hidden)~.placement-fab,.game-ui:not(.hidden)~.placement-fab{top:106px!important}
.target-preview.object-hard #targetArabic:after{content:none!important;display:none!important}
@media(orientation:portrait){.grade-picker:has(.grade-hidden){display:flex!important;grid-template-columns:none!important}.grade-picker:has(.grade-hidden) button.selected{width:105px}.placement-fab{top:82px!important;right:10px!important;width:50px;height:50px}}
@media(orientation:landscape) and (max-height:650px){.placement-fab{top:66px!important;right:9px!important;width:43px;height:43px}.placement-fab span{font-size:21px!important}.avatar-choice button{width:54px;height:54px}.avatar-choice button i{font-size:23px}}

/* A short child-readable mission guide, shown once per world and difficulty. */
.mission-guide{position:absolute;inset:0;z-index:30;display:grid;place-items:center;padding:18px;background:#031b38d9;backdrop-filter:blur(7px)}
.guide-card{width:min(92vw,560px);padding:23px 28px 25px;border:5px solid #fff3a2;border-radius:34px;background:linear-gradient(155deg,#fffdf0,#dff8ff);box-shadow:0 12px 0 #b5661d,0 25px 70px #001b;text-align:center;color:#153e5c;animation:rewardIn .45s cubic-bezier(.2,1.35,.4,1)}
.guide-world-icon{display:grid;place-items:center;width:94px;height:94px;margin:-4px auto 5px;border:5px solid #fff;border-radius:50%;background:linear-gradient(#ffe982,#ffad4b);box-shadow:0 7px 0 #b45e1d;font-size:55px}
.guide-kicker{display:inline-block;margin:3px 0;padding:4px 13px;border-radius:16px;background:#176d66;color:#fff;font-size:12px;font-weight:900}
.guide-card h2{margin:5px 0;color:#dc6b1d;font-size:30px}.guide-card p{min-height:52px;margin:4px auto 13px;font-size:19px;font-weight:900;line-height:1.55}
.guide-steps{display:flex;direction:rtl;justify-content:center;gap:9px;margin:9px 0 18px}.guide-steps span{padding:8px 11px;border:2px solid #8fd8e6;border-radius:16px;background:#fff;color:#28546a;font-size:13px;font-weight:900}
.guide-card button{padding:11px 30px;border-radius:20px;background:linear-gradient(#ffe764,#ffb52f);color:#153654;box-shadow:0 6px 0 #b35e18;font-size:19px}
#helpStage{position:absolute;z-index:8;top:max(12px,env(safe-area-inset-top));left:calc(20% - 116px);width:48px;height:48px;padding:0;border:3px solid #fff;border-radius:15px;background:linear-gradient(#9cf4ff,#42b8df);box-shadow:0 5px 0 #176586;color:#143c58;font-size:27px}
@media(orientation:landscape) and (max-height:650px){.guide-card{width:min(88vw,620px);padding:10px 24px 14px}.guide-world-icon{width:62px;height:62px;font-size:38px;margin-top:-3px}.guide-card h2{font-size:22px}.guide-card p{min-height:0;margin:2px auto 7px;font-size:14px}.guide-steps{margin:5px 0 10px}.guide-steps span{padding:5px 9px;font-size:10px}.guide-card button{padding:7px 26px;font-size:15px}#helpStage{top:7px;left:calc(20% - 100px);width:42px;height:42px;font-size:23px}}

/* Progress and rewards: separate progress per world and difficulty. */
#start .achievements-button{display:inline-block;margin:5px 8px 0;padding:7px 17px;border:2px solid #fff6a8;border-radius:17px;background:#0b6b69;color:#fff;box-shadow:0 4px 0 #064442;font-size:13px}
.parent-report{width:min(94%,900px);margin:0 auto 20px;padding:15px;border:4px solid #8cebd1;border-radius:26px;background:linear-gradient(145deg,#073e56f2,#0b6c64f2);box-shadow:0 8px 0 #032f3f,0 14px 28px #0017;color:#fff}.parent-report-head{display:flex;align-items:center;justify-content:center;gap:11px;text-align:right}.parent-report-head>span{font-size:39px}.parent-report h2{margin:0;color:#ffe676;font-size:23px}.parent-report-head p{margin:2px 0 0;color:#d6fff3;font-size:12px}.parent-report-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:13px 0}.parent-report-stats article{display:flex;min-height:74px;flex-direction:column;align-items:center;justify-content:center;padding:8px;border:2px solid #ffffff8a;border-radius:18px;background:#ffffff18;text-align:center}.parent-report-stats b{font-size:21px;color:#fff}.parent-report-stats b i{font-style:normal;font-size:12px;color:#bff5e7}.parent-report-stats small{margin-top:3px;color:#d7fff3;font-weight:800}.parent-review-list h3{display:flex;align-items:end;justify-content:center;gap:8px;margin:8px 0;color:#ffe676}.parent-review-list h3 small{color:#d7fff3;font-size:10px}.parent-review-list>article{display:grid;grid-template-columns:38px 1fr 48px auto;align-items:center;gap:8px;margin-top:8px;padding:9px;border-radius:17px;background:#fff;color:#23475c;text-align:right}.parent-review-list>article>span{font-size:28px}.parent-review-list>article div{display:flex;flex-direction:column}.parent-review-list>article small{color:#617985;font-weight:800}.parent-review-list>article strong{direction:ltr;color:#d4661b;font-size:18px}.parent-review-list button{min-height:39px;padding:6px 12px;border:0;border-radius:14px;background:linear-gradient(#ffe875,#ffba39);color:#173a5b;font-weight:900;box-shadow:0 4px 0 #bd6e19}.parent-empty,.parent-success{padding:13px;border-radius:16px;background:#ffffff1a;color:#eafff8;text-align:center;font-weight:900}.parent-success{background:#3ec98d2e;color:#fffbd1}
.achievements-screen{background:linear-gradient(#062b4ad9,#0b5a58df),url('assets/jungle-background.png') center/cover}.achievements-body{height:calc(100dvh - 74px);padding:18px 5vw 40px;overflow-y:auto}.achievement-summary{display:flex;align-items:center;justify-content:center;gap:20px;width:min(94%,650px);margin:0 auto 18px;padding:13px 22px;border:4px solid #ffe175;border-radius:25px;background:linear-gradient(135deg,#fff8cf,#d8fff0);box-shadow:0 7px 0 #a95e1b;color:#174b56}.achievement-summary>span{font-size:45px}.achievement-summary div{display:flex;flex-direction:column}.achievement-summary b{font-size:25px;color:#d7681c}.achievement-summary small{font-weight:900}.achievement-worlds{display:grid;grid-template-columns:repeat(3,minmax(210px,1fr));gap:16px;max-width:1050px;margin:auto}.achievement-world{padding:14px;border:4px solid #fff;border-radius:25px;background:#fffdf2;box-shadow:0 8px 0 #183e55,0 14px 25px #0016}.achievement-world.numbers{background:#eef8ff}.achievement-world.objects{background:#fff1fb}.achievement-world-title{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:13px;color:#17445c;font-size:17px}.achievement-world-title span{font-size:32px}.achievement-level{display:grid;grid-template-columns:65px 1fr 42px;align-items:center;gap:7px;margin:9px 0;color:#315467;font-size:11px}.progress-track{height:13px;border-radius:9px;background:#c8d7dc;overflow:hidden;box-shadow:inset 0 2px 3px #5674}.progress-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#42c477,#ffe15d,#ff9947)}.badge-shelf{max-width:900px;margin:23px auto 0;text-align:center;color:#fff}.badge-shelf h3{margin:0 0 10px;color:#ffe76d;font-size:22px}.badge-shelf>div{display:flex;justify-content:center;gap:13px;flex-wrap:wrap}.achievement-badge{display:flex;flex-direction:column;align-items:center;width:150px;padding:10px 8px;border:3px solid #ffe581;border-radius:20px;background:#fffdf0;color:#254e5a;box-shadow:0 6px 0 #9d5d1d}.achievement-badge span{font-size:36px}.achievement-badge b{font-size:13px}.achievement-badge small{font-size:9px}.achievement-badge.locked{filter:grayscale(1);opacity:.68}
@media(max-width:820px){.achievement-worlds{grid-template-columns:1fr;max-width:520px}.achievement-summary{margin-top:3px}.achievement-badge{width:130px}}
@media(max-width:560px){.parent-report{width:94%;padding:11px}.parent-report-stats{grid-template-columns:1fr 1fr}.parent-report-stats article:last-child{grid-column:1/-1}.parent-review-list>article{grid-template-columns:34px 1fr 44px}.parent-review-list button{grid-column:1/-1;width:100%}.parent-report h2{font-size:20px}}

/* v71 — stable opening scene and collision-free home hierarchy. */
.intro-splash{cursor:pointer}
.intro-start{margin-top:6px;padding:10px 24px;border:3px solid #fff8b0;border-radius:18px;font-size:15px;animation:introTitle .42s ease-out 1.28s both}
#start{display:flex;flex-direction:column;align-items:center;gap:7px;width:min(92vw,760px);max-height:calc(100dvh - 24px);padding:12px 28px 14px;overflow:hidden}
#start.hidden{display:none!important}
#start .brand-hero{flex:0 0 auto;width:190px;height:72px;margin:-5px auto -4px}
#start h1{flex:0 0 auto;margin:0;font-size:clamp(32px,5vw,47px);line-height:1.15}
#start .brand-tagline{flex:0 0 auto;margin:0 0 3px!important;font-size:15px!important;line-height:1.25}
#start .grade-picker:has(.grade-hidden){flex:0 0 auto;display:flex!important;min-width:112px!important;margin:2px auto 1px!important}
#start .grade-picker:has(.grade-hidden) button.selected{flex-basis:104px!important;width:104px!important}
#start .grade-picker:has(.grade-hidden) button.selected img{width:64px!important;height:64px!important;margin:0 auto 4px!important}
#start .grade-picker:has(.grade-hidden) button.selected b{font-size:13px!important;line-height:1.1}
#start .grade-picker:has(.grade-hidden) button.selected small{font-size:8px!important;margin-top:2px!important}
#start .difficulty-info{flex:0 0 auto;margin:1px auto 3px;padding:5px 14px;white-space:normal}
#start .difficulty-info b{display:inline-block;margin:0 6px 0 0}
#start .world-picker{flex:0 0 auto;width:min(96%,600px);margin:0 auto 2px;padding-top:20px}
#start .world-picker-title{top:0}
#start .world-carousel{height:132px;padding-top:17px;padding-bottom:4px}
#start .world-orb{flex-basis:88px;width:88px;height:112px}
#start .world-orb img{width:82px;height:82px}
#start #selectedWorldName{margin-top:3px}
#start #play,#start .achievements-button{vertical-align:middle;margin-top:2px}
#orientationToggle{top:14px!important;right:14px!important}
.placement-fab{top:78px!important;right:16px!important}
.assigned-grade{margin:8px auto 13px;padding:8px 14px;border:2px solid #74edda;border-radius:16px;background:#ffffff12;color:#ffe46d;font-size:15px;font-weight:900}
@media(orientation:landscape) and (max-height:650px){
  #start{gap:3px;max-height:calc(100dvh - 10px);padding:5px 22px 7px}
  #start .brand-hero{width:142px;height:38px;margin:-4px auto -2px}
  #start h1{font-size:25px}#start .brand-tagline{font-size:9px!important;margin:0!important}
  #start .grade-picker:has(.grade-hidden) button.selected img{width:38px!important;height:38px!important;margin-bottom:1px!important}
  #start .grade-picker:has(.grade-hidden) button.selected b{font-size:9px!important}
  #start .grade-picker:has(.grade-hidden) button.selected small{font-size:6px!important}
  #start .difficulty-info{padding:2px 9px;margin:0 auto 1px;font-size:7px}
  #start .world-picker{width:520px;padding-top:13px;margin:0 auto}
  #start .world-carousel{height:86px;padding-top:10px;padding-bottom:0}
  #start .world-orb{flex-basis:64px;width:64px;height:78px}#start .world-orb img{width:58px;height:58px}
  #start #play{padding:5px 20px;font-size:12px}#start .achievements-button{padding:4px 10px;font-size:8px}
  .placement-fab{top:62px!important;right:10px!important}
}

/* v82 absolute final stage-card guard. */
.target-preview{padding:82px 14px 18px!important;border-right:5px solid #72ead8!important;background:linear-gradient(165deg,#073d66f7,#082946f8 58%,#10545cf5)!important;box-shadow:12px 0 35px #001b2d99,inset -5px 0 0 #ffe16a55!important}
.target-preview:before{margin:0 0 8px!important;background:linear-gradient(#ff963d,#ec671f)!important;box-shadow:0 4px 0 #963b16!important}
.target-preview>div{background:linear-gradient(145deg,#ffffff24,#4ee6c91a)!important;border:2px solid #ffffff2b!important}
.exam-visual .exam-animal-image{display:block!important;width:auto!important;height:auto!important;max-width:250px!important;max-height:190px!important;margin:auto!important;object-fit:contain!important}
.exam-visual .exam-animal-fallback{display:grid!important;place-items:center!important;width:100%!important;min-height:145px!important;font-size:clamp(92px,11vw,148px)!important;line-height:1!important}.exam-visual .exam-animal-fallback[hidden]{display:none!important}
@media(orientation:portrait){.target-preview{padding:12px!important}}
@media(orientation:landscape) and (max-height:650px){.target-preview{padding:64px 10px 12px!important}.target-preview:before{margin-bottom:4px!important}}

/* v94 — curriculum stability and phone-safe learning layouts. */
.lesson-card .safe-nav{
  position:static!important;bottom:auto!important;z-index:auto!important;
  flex:0 0 auto!important;order:20!important;margin-top:14px!important;
}
.lesson-words{flex:0 0 auto!important;grid-auto-rows:minmax(150px,auto)!important}
.lesson-media{min-height:78px!important;max-height:98px!important}
.lesson-media img{width:94%!important;height:94%!important;max-width:145px!important;max-height:94px!important;object-fit:contain!important}
#targetEnglish:has(.spelling-line){display:flex!important;flex-direction:column!important;gap:8px!important;align-items:center!important}
#targetEnglish .spelling-line{display:flex!important;justify-content:center!important;gap:clamp(5px,1vw,12px)!important;width:100%!important;white-space:nowrap!important}
#targetEnglish .spelling-line i{font-style:normal!important;line-height:1!important}
.target-preview .array-model,.challenge-math-visual .array-model{
  width:min(96%,360px)!important;height:auto!important;min-height:105px!important;max-height:150px!important;
  grid-template-columns:repeat(var(--cols),minmax(16px,30px))!important;
  grid-template-rows:repeat(var(--rows),minmax(16px,30px))!important;
  gap:clamp(8px,1.4vw,15px)!important;place-content:center!important;overflow:visible!important;
}
.target-preview .array-model i,.challenge-math-visual .array-model i{min-width:16px!important;min-height:16px!important;width:100%!important;height:100%!important;aspect-ratio:1!important;border-radius:7px!important;background:linear-gradient(145deg,#315c92,#102e62)!important;box-shadow:inset 0 0 0 2px #ffdd68,0 3px 0 #0b234c!important}
.target-preview.number-fraction .target-emoji{gap:4px!important}
.target-preview.number-fraction .number-equation{font-size:clamp(18px,2.3vw,31px)!important}
.target-preview img[src*="curriculum/animal-parts"]{width:96%!important;height:96%!important;max-width:260px!important;max-height:260px!important;object-fit:contain!important;object-position:center!important}
@media(orientation:portrait){
  .lesson-card{display:block!important;max-height:calc(100dvh - 12px)!important;overflow-y:auto!important}
  .lesson-words{grid-auto-rows:minmax(190px,auto)!important}
  .lesson-media{min-height:105px!important;max-height:125px!important}
  .lesson-media img{max-width:175px!important;max-height:120px!important}
  .lesson-card .safe-nav{display:grid!important;margin-top:18px!important;margin-bottom:8px!important}
  .target-preview .array-model{min-height:120px!important;max-height:155px!important;gap:9px!important}
}

/* v94 final cascade guard: these rules intentionally come last. */
#fire{display:none!important;pointer-events:none!important}
.target-preview.number-money>.target-emoji,.target-preview.number-pattern>.target-emoji,.target-preview.number-data>.target-emoji,.target-preview.number-fraction>.target-emoji{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:100%!important;overflow:hidden!important}
.target-preview .money-exact.money-only{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:100%!important;gap:clamp(6px,1vw,15px)!important;overflow:hidden!important}
.target-preview .money-exact.money-only .money-note{display:grid!important;place-items:center!important;flex:1 1 0!important;min-width:0!important;max-width:155px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.target-preview .money-exact.money-only .money-note img{display:block!important;width:100%!important;height:auto!important;max-height:118px!important;object-fit:contain!important}
.target-preview .pattern-model.exact{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:100%!important;gap:clamp(3px,.7vw,10px)!important;white-space:nowrap!important;overflow:hidden!important}
.target-preview .pattern-model.exact i{display:grid!important;place-items:center!important;flex:0 1 72px!important;min-width:0!important;padding:clamp(6px,.8vw,12px)!important;font-size:clamp(19px,2.25vw,35px)!important;line-height:1!important}
.target-preview .pattern-model.exact b{flex:0 0 auto!important;font-size:clamp(15px,1.7vw,27px)!important}
.target-preview .data-count-model{display:flex!important;flex-flow:row wrap!important;align-content:center!important;justify-content:center!important;width:100%!important;max-width:100%!important;gap:clamp(8px,1.15vw,17px)!important;overflow:hidden!important}
.target-preview .data-count-model i{font-size:clamp(25px,2.8vw,44px)!important;font-style:normal!important;line-height:1!important}

/* v94 — direct-tap play and purpose-built Grade 2 math canvases. */
#fire{display:none!important}
.target-preview.number-money,.target-preview.number-pattern,.target-preview.number-data,.target-preview.number-fraction{overflow:hidden!important}
.target-preview.number-money>.target-emoji,.target-preview.number-pattern>.target-emoji,.target-preview.number-data>.target-emoji,.target-preview.number-fraction>.target-emoji{
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;overflow:hidden!important
}
.target-preview .money-exact.money-only{display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:nowrap!important;width:100%!important;max-width:100%!important;gap:clamp(7px,1.2vw,18px)!important;margin:0!important;overflow:hidden!important}
.target-preview .money-exact.money-only .money-note{display:grid!important;place-items:center!important;flex:1 1 0!important;min-width:0!important;max-width:150px!important;margin:0!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
.target-preview .money-exact.money-only .money-note img{display:block!important;width:100%!important;height:auto!important;max-height:112px!important;object-fit:contain!important;filter:drop-shadow(0 7px 5px #0018)!important}
.target-preview .money-exact.money-only>i{flex:0 0 auto!important;color:#ffe15a!important;font:1000 clamp(23px,2.7vw,42px)/1 sans-serif!important}
.target-preview .pattern-model.exact{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:100%!important;gap:clamp(4px,.8vw,12px)!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important}
.target-preview .pattern-model.exact i{display:grid!important;place-items:center!important;flex:0 1 72px!important;min-width:0!important;padding:clamp(7px,1vw,13px)!important;font-size:clamp(20px,2.3vw,36px)!important;line-height:1!important}
.target-preview .pattern-model.exact b{flex:0 0 auto!important;font-size:clamp(16px,1.8vw,29px)!important}
.target-preview .data-count-model{display:flex!important;flex-flow:row wrap!important;align-content:center!important;justify-content:center!important;width:100%!important;max-width:100%!important;gap:clamp(8px,1.15vw,17px)!important;overflow:hidden!important}
.target-preview .data-count-model i{display:grid!important;place-items:center!important;font-size:clamp(25px,2.8vw,44px)!important;font-style:normal!important;line-height:1!important}
.lesson-concept-icon{font-size:clamp(28px,3vw,44px)!important;line-height:1!important}
.lesson-concept-icon img{width:100%!important;height:100%!important;object-fit:contain!important;filter:drop-shadow(0 6px 5px #1235)!important}
@media(orientation:portrait){
  .target-preview .money-exact.money-only{gap:5px!important}.target-preview .money-exact.money-only .money-note img{max-height:78px!important}
  .target-preview .pattern-model.exact{gap:3px!important}.target-preview .pattern-model.exact i{flex-basis:51px!important;padding:7px 4px!important;font-size:clamp(18px,5vw,27px)!important}
}

/* v92 — final collision guard shared by every grade and world. */
#exitStage,#helpStage,#repeatStage{position:absolute!important;top:max(10px,env(safe-area-inset-top))!important;width:44px!important;height:44px!important;margin:0!important;padding:0!important;transform:none!important;z-index:120!important}
#exitStage{left:10px!important}#helpStage{left:62px!important}#repeatStage{left:114px!important}
.target-preview{padding-top:70px!important}
.target-preview:before{position:relative!important;z-index:2!important;max-width:calc(100% - 18px)!important}
.target-preview .target-emoji{width:100%!important;max-width:100%!important;padding-inline:10px!important;box-sizing:border-box!important}
.target-preview .target-emoji .number-equation{max-width:100%!important;font-size:clamp(17px,1.55vw,25px)!important;line-height:1.08!important;overflow:hidden!important;text-overflow:ellipsis!important}
.lesson-media img[src*="generated/"]{max-width:96%!important;max-height:94px!important}
@media(orientation:landscape) and (max-height:650px){#exitStage,#helpStage,#repeatStage{top:7px!important;width:39px!important;height:39px!important;font-size:20px!important}#exitStage{left:8px!important}#helpStage{left:53px!important}#repeatStage{left:98px!important}.target-preview{padding-top:56px!important}}

/* v91 — unified Grade 2 learning layout.  Content is constrained by its
   component instead of relying on one-off font sizes for each question. */
.fit-text,.lesson-note,.lesson-words b,.number-equation,.target-copy{
  max-width:100%!important;min-width:0!important;overflow-wrap:anywhere!important;
  word-break:normal!important;white-space:normal!important;text-wrap:balance!important
}
.money-exact{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;max-width:100%!important;max-height:116px!important;overflow:hidden!important}
.money-note{display:grid!important;place-items:center!important;gap:1px!important;min-width:0!important}
.money-note img{display:block!important;width:clamp(46px,5.2vw,78px)!important;height:52px!important;object-fit:contain!important}
.money-note b{font-size:clamp(11px,1.15vw,17px)!important;color:#074d3f!important;line-height:1!important}
.money-exact>i{font-style:normal!important;font-size:clamp(17px,1.8vw,25px)!important;font-weight:900!important;color:#0b4778!important}
.data-count-model{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;align-content:center!important;justify-content:center!important;gap:9px 12px!important;width:min(100%,260px)!important;margin:auto!important;overflow:hidden!important}
.data-count-model i{display:grid!important;place-items:center!important;font-style:normal!important;font-size:clamp(25px,2.8vw,39px)!important;line-height:1!important}
.pattern-model.exact{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;max-width:100%!important;overflow:hidden!important}
.pattern-model.exact i{display:grid!important;place-items:center!important;min-width:42px!important;height:42px!important;padding:2px 6px!important;border-radius:12px!important;background:#dffbf4!important;color:#0b4778!important;font-style:normal!important;font-size:clamp(18px,2vw,27px)!important;font-weight:1000!important}
.pattern-model.exact b{font-size:21px!important;color:#ef7c28!important}

.lesson-words{align-items:stretch!important}
.lesson-words button{min-width:0!important;overflow:hidden!important}
.lesson-media{display:grid!important;place-items:center!important;min-height:76px!important;overflow:hidden!important}
.lesson-media img{display:block!important;width:auto!important;height:auto!important;max-width:94%!important;max-height:88px!important;object-fit:contain!important;filter:drop-shadow(0 6px 6px #07365b28)!important}
.lesson-words b{font-size:clamp(13px,1.25vw,19px)!important;line-height:1.08!important}
.lesson-note{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;font-size:clamp(9px,.8vw,12px)!important;line-height:1.12!important}

.exam-choices button.numeric-option{font-size:clamp(30px,5vw,48px)!important;font-weight:1000!important;line-height:1!important}
.challenge-choice.numeric-option strong{font-size:clamp(42px,6vw,70px)!important;line-height:1!important}
.challenge-math-visual{display:grid!important;place-items:center!important;gap:7px!important;max-width:100%!important;overflow:hidden!important}
.challenge-math-visual .number-equation{font-size:clamp(20px,3vw,34px)!important;line-height:1.05!important}

@media(orientation:landscape){
  .target-preview.number-hard{grid-template-rows:auto minmax(46px,auto) minmax(0,1fr)!important}
  .target-preview.number-hard>div{max-height:68px!important;overflow:hidden!important}
  .target-preview.number-hard>.target-emoji{display:grid!important;align-content:center!important;justify-items:center!important;gap:8px!important;max-height:none!important;padding:10px!important}
  .target-preview.number-hard .target-emoji .number-equation{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;max-width:100%!important;margin:0!important;overflow:hidden!important;font-size:clamp(18px,1.75vw,28px)!important;line-height:1.04!important;letter-spacing:-.4px!important}
  .target-preview.number-hard .target-emoji>small{font-size:clamp(10px,.95vw,14px)!important;line-height:1.15!important}
  .target-preview.number-hard .money-exact{max-height:105px!important}
  .target-preview.number-hard .money-note img{width:clamp(39px,4vw,61px)!important;height:42px!important}
  .target-preview.number-hard .data-count-model{width:min(100%,225px)!important;gap:8px 10px!important}
  .target-preview.number-hard .data-count-model i{font-size:clamp(22px,2vw,31px)!important}
}
@media(orientation:landscape) and (max-height:650px){
  .lesson-media{min-height:61px!important}.lesson-media img{max-height:70px!important}
  .lesson-words b{font-size:clamp(11px,2.5vh,16px)!important}.lesson-note{font-size:clamp(8px,1.8vh,11px)!important}
  .target-preview.number-hard .target-emoji .number-equation{font-size:clamp(17px,3.8vh,24px)!important}
}
@media(orientation:portrait){
  .money-exact{max-height:82px!important}.money-note img{width:48px!important;height:39px!important}
  .lesson-media img{max-height:76px!important}
}

/* v88 — one safe visual system for lessons, stages, quizzes, and maps. */
.lesson-words{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important;min-width:0!important}
.lesson-words>button{display:grid!important;grid-template-rows:minmax(70px,1fr) auto auto 22px!important;align-items:center!important;min-width:0!important;min-height:0!important;padding:7px!important;overflow:hidden!important}
.lesson-media{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;min-width:0!important;min-height:58px!important;overflow:hidden!important}
.lesson-media img,.target-emoji img,.challenge-choice img,.exam-visual img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;margin:auto!important;object-fit:contain!important;object-position:center!important}
.lesson-words b,.lesson-words em{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:2px 0!important;line-height:1.05!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:center!important;overflow:hidden!important}
.lesson-words em{min-height:18px!important;padding:3px!important}
.lesson-concept-icon{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;max-height:78px!important;font-size:clamp(24px,3vw,46px)!important;line-height:1!important;overflow:hidden!important;white-space:normal!important}
.fraction-model{display:flex!important;width:min(120px,92%)!important;height:58px!important;border:4px solid #19477c!important;border-radius:50%!important;overflow:hidden!important;background:#fff!important}.fraction-model i{flex:1!important;border-left:3px solid #19477c!important}.fraction-model i:first-child{border-left:0!important}.fraction-model .filled{background:#ffd454!important}
.array-model{display:grid!important;grid-template-columns:repeat(var(--cols),14px)!important;grid-template-rows:repeat(var(--rows),14px)!important;gap:7px!important;place-content:center!important;width:100%!important;height:72px!important;overflow:hidden!important}.array-model i{width:14px!important;height:14px!important;border-radius:50%!important;background:#1d4a80!important}
.picture-graph-model{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:3px!important;font-size:25px!important}.tally-model,.pattern-preview{font:900 clamp(18px,2.4vw,32px)/1.1 sans-serif!important;color:#143f74!important;white-space:normal!important;text-align:center!important}
.money-model.generated{display:grid!important;grid-template-columns:minmax(90px,1fr) auto!important;align-items:center!important;gap:8px!important;width:100%!important;max-height:112px!important;overflow:hidden!important}.money-model.generated img{width:100%!important;height:88px!important;object-fit:contain!important}.money-model.generated span{display:flex!important;align-items:center!important;gap:4px!important;flex-wrap:wrap!important}.money-model.generated b{font-size:clamp(15px,1.5vw,23px)!important}.money-model.generated i{font-style:normal!important}
.target-preview .target-emoji{display:grid!important;place-items:center!important;min-width:0!important;overflow:hidden!important}.target-preview .number-equation{display:block!important;width:100%!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:center!important;line-height:1.05!important}
.target-preview .array-model{height:82px!important}.target-preview .fraction-model{height:64px!important}.target-preview .money-model.generated{max-height:120px!important}
.challenge-math-visual{display:grid!important;place-items:center!important;min-width:0!important;max-height:240px!important;overflow:hidden!important}.challenge-math-visual>*{max-width:100%!important}.challenge-card,.exam-card{max-height:calc(100dvh - 24px)!important;overflow:auto!important}
.challenge-choices,.exam-choices{min-width:0!important}.challenge-choice,.exam-choices button{min-width:0!important;overflow:hidden!important;white-space:normal!important;overflow-wrap:anywhere!important}
.path-journey{isolation:isolate!important}.path-journey:before,.path-journey:after,.animal-vine{z-index:1!important}.stage-node{z-index:10!important}.map-zone,.lesson-node,.railway-station{position:relative!important;z-index:30!important}.map-zone>*{position:relative!important;z-index:2!important}.map-zone{background:#093d61!important;box-shadow:0 7px 0 #05243c,0 10px 18px #0018!important}
.celebration-card{display:grid!important;grid-template-rows:auto auto minmax(70px,1fr) auto auto auto!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important}.celebration-card img{display:block!important;max-width:210px!important;max-height:170px!important;width:auto!important;height:auto!important;margin:auto!important;object-fit:contain!important}
@media(max-width:760px),(max-height:650px){.lesson-words{gap:5px!important}.lesson-words>button{grid-template-rows:minmax(48px,1fr) auto auto 16px!important;padding:4px!important}.lesson-media{min-height:42px!important}.lesson-media img{max-height:54px!important}.lesson-words small{font-size:7px!important}.lesson-concept-icon{max-height:54px!important}.array-model{height:50px!important;gap:4px!important}.array-model i{width:10px!important;height:10px!important}.lesson-card{max-height:calc(100dvh - 12px)!important;overflow:auto!important}}
@media(max-width:700px){.lesson-words{grid-template-columns:repeat(2,minmax(0,1fr))!important}.lesson-card{overflow:auto!important}}

/* v89 — shared collision-proof learning layout. One rule set is used by every
   grade, world, lesson, stage, quiz and result instead of screen-specific fixes. */
.lesson-card,.exam-card,.challenge-card,.reward-card,.target-preview{box-sizing:border-box!important}
.lesson-card{display:flex!important;flex-direction:column!important;max-height:calc(100dvh - 18px)!important;overflow:auto!important}
.lesson-card>h2,.lesson-card>p{flex:0 0 auto!important;margin-block:3px 7px!important;max-width:92%!important;align-self:center!important;text-align:center!important;line-height:1.15!important;text-wrap:balance!important}
.lesson-words{flex:1 1 auto!important;grid-auto-rows:minmax(132px,1fr)!important;align-items:stretch!important;min-height:0!important}
.lesson-words>button{display:grid!important;grid-template-rows:minmax(58px,1fr) minmax(17px,auto) minmax(18px,auto) 18px!important;align-items:center!important;justify-items:center!important;min-width:0!important;min-height:0!important;overflow:hidden!important}
.lesson-media{width:100%!important;height:100%!important;max-height:82px!important;padding:2px!important;overflow:hidden!important}
.lesson-media img{width:100%!important;height:100%!important;max-width:116px!important;max-height:78px!important;object-fit:contain!important;object-position:center!important;clip-path:none!important}
.lesson-words b,.lesson-words em{box-sizing:border-box!important;display:-webkit-box!important;width:100%!important;max-width:100%!important;padding:2px 4px!important;overflow:hidden!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;text-align:center!important;line-height:1.05!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important}
.lesson-words b{font-size:clamp(10px,1.2vw,17px)!important}.lesson-note{min-height:18px!important;margin:1px 0!important;font-size:clamp(7px,.82vw,11px)!important}
.array-model{box-sizing:border-box!important;max-width:100%!important;max-height:72px!important;grid-template-columns:repeat(var(--cols),minmax(8px,16px))!important;grid-template-rows:repeat(var(--rows),minmax(8px,16px))!important;gap:5px!important;overflow:hidden!important}.array-model i{width:auto!important;height:auto!important;aspect-ratio:1!important}
.fraction-model{box-sizing:border-box!important;max-width:92%!important;height:58px!important}
.lesson-concept-icon{box-sizing:border-box!important;max-width:100%!important;max-height:70px!important;overflow:hidden!important;font-size:clamp(12px,1.65vw,23px)!important}

.target-preview{contain:layout paint!important}.target-preview>div{box-sizing:border-box!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;min-width:0!important;max-width:100%!important;overflow:hidden!important}.target-preview .target-emoji{width:100%!important;height:min(40vh,300px)!important}.target-preview .target-emoji img{display:block!important;width:92%!important;height:92%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important}.target-copy,.number-equation,.written-number,.object-clue{box-sizing:border-box!important;width:100%!important;max-width:100%!important;margin-inline:auto!important;padding-inline:7px!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;text-align:center!important;text-wrap:balance!important;line-height:1.05!important;overflow:hidden!important}
.target-preview .array-model{max-width:92%!important;max-height:94px!important}.target-preview .money-model.generated{width:94%!important;max-height:128px!important}.target-preview .money-model.generated img{max-width:170px!important;height:82px!important}

.exam-card,.challenge-card{box-sizing:border-box!important;width:min(760px,94vw)!important;max-height:calc(100dvh - 20px)!important;padding:18px!important;overflow:auto!important}.exam-card-body,.exam-visual,.exam-choices,.challenge-choices{min-width:0!important;max-width:100%!important}.exam-visual,.challenge-math-visual{box-sizing:border-box!important;max-height:210px!important;overflow:hidden!important}.exam-visual img,.challenge-math-visual img{display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:150px!important;margin:auto!important;object-fit:contain!important}.exam-choices,.challenge-choices{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}.exam-choices button,.challenge-choice{box-sizing:border-box!important;min-width:0!important;max-width:100%!important;min-height:64px!important;padding:8px!important;overflow:hidden!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.05!important}.exam-choices button img,.challenge-choice img{display:block!important;width:100%!important;height:100%!important;max-width:160px!important;max-height:125px!important;margin:auto!important;object-fit:contain!important}
.reward-card{max-height:calc(100dvh - 20px)!important;overflow:auto!important}.reward-card #rewardAnimal{display:block!important;width:auto!important;height:auto!important;max-width:180px!important;max-height:145px!important;margin:auto!important;object-fit:contain!important}.reward-name,.reward-card h2,.reward-card p{max-width:100%!important;overflow-wrap:anywhere!important;text-wrap:balance!important;text-align:center!important}

/* Route artwork must never paint over lesson signs. */
#mapPath .path-journey{isolation:isolate!important}#mapPath .path-journey:before,#mapPath .path-journey:after,#mapPath .animal-vine{z-index:1!important;pointer-events:none!important}#mapPath .stage-node{position:relative!important;z-index:10!important}#mapPath .map-zone{position:relative!important;z-index:50!important;isolation:isolate!important}#mapPath .map-zone:before{content:"";position:absolute!important;z-index:-1!important;inset:-8px!important;border-radius:inherit!important;background:inherit!important;box-shadow:inherit!important}#mapPath .map-zone>*,#mapPath .map-zone strong,#mapPath .map-zone span{position:relative!important;z-index:3!important}

@media(orientation:landscape) and (max-height:700px){.lesson-card{width:min(1060px,96vw)!important;padding:10px 16px!important}.lesson-words{grid-auto-rows:minmax(112px,1fr)!important;gap:7px!important}.lesson-words>button{grid-template-rows:minmax(46px,1fr) minmax(15px,auto) minmax(16px,auto) 15px!important;padding:4px!important}.lesson-media{max-height:60px!important}.lesson-media img{max-height:57px!important}.lesson-card .safe-nav{position:static!important}.target-preview{padding-top:60px!important}.target-preview .target-emoji{height:min(38vh,245px)!important}.exam-card,.challenge-card{padding:12px!important}.exam-visual,.challenge-math-visual{max-height:165px!important}.reward-card #rewardAnimal{max-height:110px!important}}
@media(orientation:portrait){.lesson-card{width:95vw!important;padding:12px!important}.lesson-words{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(128px,1fr)!important}.target-preview .target-emoji{height:min(30vh,230px)!important}.exam-card,.challenge-card{width:94vw!important}.exam-visual,.challenge-math-visual{max-height:190px!important}}

/* Grade 2 curriculum world */
.grade2-only.grade-hidden{display:none!important}
.english-world-icon{display:grid;place-items:center;width:82px;height:82px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#fff7a5,#ffb51f 58%,#e66c00);color:#103a74;font:1000 clamp(18px,2.2vw,30px)/1 sans-serif;text-shadow:0 2px #fff;box-shadow:inset 0 0 0 5px #fff9}
.world-card.english{background:linear-gradient(145deg,#632fb4,#1c84c9);border-color:#ffe15a}.world-card.english .world-icon{font-size:clamp(24px,4vw,48px);font-weight:1000;color:#ffe15a;text-shadow:0 3px #17265e}
@media(orientation:landscape) and (max-height:650px){#start .english-world-icon{width:58px;height:58px}}

/* v82 definitive stage-card guard — intentionally last in the cascade. */
.target-preview{
  padding:82px 14px 18px!important;
  border-right:5px solid #72ead8!important;
  background:linear-gradient(165deg,#073d66f7,#082946f8 58%,#10545cf5)!important;
  box-shadow:12px 0 35px #001b2d99,inset -5px 0 0 #ffe16a55!important
}
.target-preview:before{margin:0 0 8px!important;background:linear-gradient(#ff963d,#ec671f)!important;box-shadow:0 4px 0 #963b16!important}
.target-preview>div{background:linear-gradient(145deg,#ffffff24,#4ee6c91a)!important;border:2px solid #ffffff2b!important}
.exam-visual .exam-animal-image{display:block!important;width:auto!important;height:auto!important;max-width:250px!important;max-height:190px!important;margin:auto!important;object-fit:contain!important}
.exam-visual .exam-animal-fallback{display:grid!important;place-items:center!important;width:100%!important;min-height:145px!important;font-size:clamp(92px,11vw,148px)!important;line-height:1!important}
.exam-visual .exam-animal-fallback[hidden]{display:none!important}
@media(orientation:portrait){.target-preview{padding:12px!important}}
@media(orientation:landscape) and (max-height:650px){.target-preview{padding:64px 10px 12px!important}.target-preview:before{margin-bottom:4px!important}}

/* v82 final overrides: keep controls and the learning card in separate zones. */
.exam-visual .exam-animal-image{width:auto!important;height:auto!important;max-width:240px!important;max-height:195px!important;object-fit:contain!important}
.exam-visual .exam-animal-fallback{display:grid!important;place-items:center!important;width:100%!important;min-height:140px!important;font-size:clamp(88px,11vw,145px)!important;line-height:1!important}
.exam-visual .exam-animal-fallback[hidden]{display:none!important}
.target-preview{padding:82px 14px 18px!important;border-right:5px solid #70ead7!important;background:linear-gradient(165deg,#073a62f5,#082744f7 58%,#104e55f4)!important;box-shadow:12px 0 35px #001b2d99,inset -5px 0 0 #ffe16a55!important}
.target-preview:before{margin:0 0 8px!important;background:linear-gradient(#ff8b36,#ed651f)!important;box-shadow:0 4px 0 #9b3f16!important}
.target-preview>div{background:linear-gradient(145deg,#ffffff20,#50e4c815)!important;border:2px solid #ffffff24!important}
@media(orientation:portrait){.target-preview{padding:11px 12px!important}}
@media(orientation:landscape) and (max-height:650px){.target-preview{padding:62px 10px 12px!important}.target-preview:before{margin-bottom:4px!important}}

/* v81 final cascade guard. */
.grade-plaque{position:fixed!important;z-index:80!important;top:12px!important;left:50%!important;transform:translateX(-50%) rotate(-.7deg)!important;min-width:138px!important;padding:9px 24px 8px!important;text-align:center!important;color:#fff4c4!important;font:900 18px/1 sans-serif!important;background:linear-gradient(#c9823b,#8f4a1d 60%,#663113)!important;border:3px solid #f2b55d!important;border-radius:10px!important;box-shadow:0 6px 0 #48200d,0 9px 16px #001a!important;pointer-events:none!important}
.grade-plaque i{position:absolute!important;bottom:100%!important;width:4px!important;height:19px!important;background:#70401e!important}.grade-plaque i:first-child{left:23px!important}.grade-plaque i:nth-child(2){right:23px!important}#app:has(#targetPreview.hidden) .grade-plaque{display:none!important}
.lesson-words button{min-width:0!important;overflow:hidden!important}.lesson-words button img{width:72px!important;height:72px!important;object-fit:contain!important;filter:drop-shadow(0 5px 5px #2344)!important}.lesson-words button b{display:block!important;width:100%!important;max-width:100%!important;padding:0 3px!important;white-space:nowrap!important;overflow:hidden!important;font-size:clamp(10px,1.35vw,18px)!important;line-height:1.05!important}.lesson-words button.long-word b{font-size:clamp(8px,1.05vw,14px)!important;letter-spacing:-.35px!important}
.lesson-note{display:block;max-width:100%;min-height:22px;margin:3px 0 1px;padding:3px 5px;border-radius:8px;background:#dff8ef;color:#075d63;font:900 clamp(8px,1vw,12px)/1.05 sans-serif;white-space:normal;overflow-wrap:anywhere}
.lesson-concept-icon{display:grid!important;place-items:center;width:76px;height:64px;margin:auto;border:3px solid #67d9cf;border-radius:14px;background:#eafff8;color:#143e6c;font:900 clamp(16px,2.1vw,29px)/1.05 sans-serif!important;white-space:normal}
.fraction-model{display:flex;width:min(190px,72%);height:72px;margin:0 auto 5px;border:4px solid #173e79;border-radius:50%;overflow:hidden;background:#fff}.fraction-model i{flex:1;border-right:3px solid #173e79}.fraction-model i:last-child{border:0}.fraction-model i.filled{background:#ffd451}
.array-model{display:grid;grid-template-columns:repeat(var(--cols),18px);grid-template-rows:repeat(var(--rows),18px);gap:7px;justify-content:center;margin:2px auto 6px}.array-model i{border-radius:50%;background:#ff695f;box-shadow:0 2px 0 #9a2440}
.money-model,.data-model,.pattern-model{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;margin:2px auto 6px}.money-model i{display:grid;place-items:center;min-width:84px;padding:8px;border:3px solid #f6d158;border-radius:12px;background:linear-gradient(135deg,#72d798,#e9ffd3);color:#124d44;font-style:normal}.money-model i b{font-size:24px}.money-model i small{font-size:9px}.data-model span,.pattern-model i{padding:8px 12px;border-radius:12px;background:#e8fff7;color:#123f67;font-style:normal;font-weight:900}.pattern-model b{color:#ffe05d;font-size:22px}
.challenge-math-prompt{display:block;font-size:clamp(15px,2.1vw,23px)}.challenge-math-visual{display:grid;place-items:center;min-height:105px;margin:8px auto 12px;padding:8px;border:3px solid #65d8cc;border-radius:18px;background:#073e58;color:#fff}.challenge-math-visual .number-equation{max-width:100%;font-size:clamp(22px,4vw,42px);white-space:normal}.challenge-math-visual>small{font-size:11px}.challenge-math-visual .money-model i{min-width:64px}.challenge-math-visual .fraction-model{height:48px}
.target-preview,.target-preview>div,.target-preview b,.target-preview strong{min-width:0;max-width:100%;overflow:hidden}.target-preview .number-equation{display:block;width:100%;max-width:100%;white-space:normal!important;overflow-wrap:anywhere;text-wrap:balance}
.exam-card,.exam-card-body,.exam-visual,.exam-choices,.challenge-card{min-width:0}.exam-visual{overflow:hidden}.exam-visual .number-equation{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center}.exam-choices button{min-width:0;max-width:100%;overflow:hidden;overflow-wrap:anywhere}
.target-preview{overflow:hidden!important}.target-preview img{object-fit:contain!important;max-width:100%!important;max-height:100%!important}.target-preview .shape-question{display:flex!important;justify-content:center!important;align-items:center!important;min-height:94px!important;margin:0 auto 9px!important}.target-preview .square-diagram{position:relative!important;display:block!important;width:84px!important;height:84px!important;border:7px solid #176f9b!important;border-radius:7px!important;background:#55d4ec24!important;box-shadow:inset 0 0 0 3px #fff,0 6px 0 #0c3f66!important}.target-preview .square-diagram em{position:absolute!important;left:50%!important;bottom:-29px!important;transform:translateX(-50%)!important;padding:2px 10px!important;border-radius:12px!important;background:#fff!important;color:#08295b!important;font:900 19px/1 sans-serif!important}.target-preview .shape-question+.number-equation{font-size:clamp(20px,2.7vw,34px)!important;line-height:1!important}
.lesson-square{display:grid!important;place-items:center!important;width:68px!important;height:68px!important;margin:auto!important;border:5px solid #1681a7!important;border-radius:9px!important;background:#7be0ef33!important}.lesson-square i{font:900 22px/1 sans-serif!important;color:#09285a!important}
.reward-card{padding-top:14px!important;overflow:hidden!important}.reward-card .crown{position:static!important;display:block!important;width:auto!important;margin:-4px auto 1px!important;transform:none!important;font-size:33px!important;line-height:1!important}.reward-card #rewardTitle{margin:0 auto 3px!important;line-height:1.05!important}.reward-card #rewardAnimal{object-fit:contain!important}
#exitStage,#helpStage,#repeatStage{top:14px!important;width:48px!important;height:48px!important;font-size:22px!important}#exitStage{left:12px!important}#helpStage{left:68px!important}#repeatStage{left:124px!important}#exitStage:after,#helpStage:after,#repeatStage:after{display:none!important}

/* v79 final cascade guard. */
.lesson-card{width:min(1000px,95vw)!important}
.lesson-words{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.lesson-words button{min-width:0!important;overflow:hidden!important;padding-inline:5px!important}
.lesson-words b{display:block!important;max-width:100%!important;overflow:hidden!important;white-space:nowrap!important;font-size:clamp(15px,1.55vw,21px)!important;letter-spacing:-.4px!important}
.lesson-words button.long-word b{font-size:clamp(12px,1.25vw,17px)!important;letter-spacing:-.8px!important}
.lesson-card .safe-nav{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;position:sticky!important;bottom:0!important;background:#e5fff2!important;padding:7px!important;border-radius:18px!important}
.lesson-card .safe-nav button{min-width:0!important;padding:9px 5px!important;font-size:clamp(10px,1.35vw,15px)!important;white-space:nowrap!important}
#exitStage{left:12px!important}#helpStage{left:66px!important}#repeatStage{left:120px!important}
.plane-fleet button.locked{position:relative!important;filter:none!important;opacity:1!important;background:linear-gradient(#173a59,#0a2948)!important}
.plane-fleet button.locked img{filter:brightness(.82) saturate(.82)!important;opacity:.88!important}
.plane-fleet button.locked:after{content:"🔒";position:absolute;right:7px;top:6px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#071d38e6;border:2px solid #ffe56b;font-size:13px;box-shadow:0 3px 8px #0019}
.plane-fleet button.locked b{color:#ffe56b!important}.plane-fleet button.locked small{color:#c8e9f2!important}
@media(max-width:720px){
  .lesson-words{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .lesson-card .safe-nav{gap:4px!important;padding:5px!important}
  .lesson-card .safe-nav button{padding:8px 2px!important;font-size:9px!important}
}
@media(orientation:landscape) and (max-height:650px){
  .lesson-card{width:min(96vw,1040px)!important}
  .lesson-words{gap:8px!important;margin:9px 0!important}
  .lesson-words button{min-height:116px!important;padding:5px 3px!important}
  .lesson-words img{width:58px!important;height:58px!important}
  .lesson-words b{font-size:clamp(13px,1.55vw,19px)!important}
  .lesson-words button.long-word b{font-size:clamp(11px,1.25vw,15px)!important}
  #exitStage{left:10px!important}#helpStage{left:59px!important}#repeatStage{left:108px!important}
}

/* v74 final cascade guard: milestone and navigation always keep their own rows. */
.reward-milestone{grid-area:milestone!important}
.reward-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.target-preview.number-count>.target-emoji{background:linear-gradient(145deg,#062b45,#07566a)!important;border-color:#67e4d3!important}
@media(orientation:landscape){
  .celebration .reward-card{grid-template-areas:"title title" "badge badge" "stars stars" "image image" "name name" "desc desc" "gift gift" "hear hear" "milestone milestone" "actions actions"!important}
}
@media(orientation:landscape) and (max-height:650px){#start .achievements-button{margin-top:2px;padding:4px 14px;font-size:10px}.achievements-body{height:calc(100dvh - 56px);padding:10px 3vw 25px}.achievement-summary{margin-bottom:10px;padding:7px 18px}.achievement-summary>span{font-size:30px}.achievement-summary b{font-size:19px}.achievement-world{padding:9px}.achievement-world-title{margin-bottom:5px}.achievement-level{margin:5px 0}.badge-shelf{margin-top:13px}.achievement-badge{padding:6px;width:132px}.achievement-badge span{font-size:27px}}

/* Compact phone maps: the route stays large enough to tap, but four to five
   nearby milestones remain visible like a classic mobile level map. */
@media (orientation:portrait) and (max-width:620px){
  #mapPath .path-journey{padding-top:24px;padding-bottom:95px}
  #mapPath .path-journey>.stage-node .stars{top:-18px;font-size:13px;letter-spacing:-2px}
  #mapPath .path-journey>.stage-node .gift{right:-19px;font-size:22px}
  #mapPath .path-journey>.stage-node.current{outline-width:5px;outline-offset:4px}

  #mapPath.animals-map .path-journey{--stage-offset:70px;width:min(96%,390px);padding-top:26px;padding-bottom:90px}
  #mapPath.animals-map .path-journey>.stage-node{width:74px;height:74px;margin:25px auto;border-width:5px}
  #mapPath.animals-map .path-journey>.stage-node strong{width:40px;height:40px;font-size:23px}
  #mapPath.animals-map .path-journey>.map-zone{min-width:230px;margin:38px auto 28px;padding:13px 20px}
  .animal-vine .vine-shadow{stroke-width:25}.animal-vine .vine-bark{stroke-width:18}.animal-vine .vine-highlight{stroke-width:3}

  #mapPath.numbers-map .path-journey{width:min(86%,360px);padding-top:22px;padding-bottom:85px}
  #mapPath.numbers-map .path-journey:before{width:68px;background-size:auto}
  #mapPath.numbers-map .path-journey>.stage-node{width:72px;height:72px;margin:25px auto;border-width:5px}
  #mapPath.numbers-map .path-journey>.stage-node strong{font-size:27px}
  #mapPath.numbers-map .path-journey>.map-zone{width:205px;min-height:170px;margin:42px auto 30px}
  #mapPath.numbers-map .path-journey>.map-zone .railway-station{width:185px;height:145px;margin-bottom:-18px}

  #mapPath.objects-map .path-journey{--object-offset:76px;--object-radius:39px;--cord-half:7px;width:min(96%,390px);padding-top:24px;padding-bottom:90px}
  #mapPath.objects-map .path-journey>.stage-node{width:78px;height:81px;margin:25px auto;padding-top:9px}
  #mapPath.objects-map .path-journey>.stage-node strong{width:38px;height:38px;margin-top:16px;font-size:23px}
  #mapPath.objects-map .path-journey>.stage-node:after{height:7px}
  #mapPath.objects-map .path-journey>.map-zone{width:225px;min-height:108px;margin:40px auto 28px;padding-top:66px;background-size:220px auto}
}
.earned-stars{margin:7px auto 2px;color:#ffbf24;font-size:30px;letter-spacing:4px;text-shadow:0 3px 0 #a85a18,0 0 8px #fff}

/* Real phones often report 651–760 CSS pixels in landscape. Treat that range
   as mobile too, so every primary action remains visible without scrolling. */
@media(orientation:landscape) and (max-height:780px){
  #start{width:min(94vw,790px);max-height:calc(100dvh - 8px);padding:4px 18px 7px;overflow:hidden}
  .brand-hero{width:180px;height:48px;margin:-5px auto -7px}
  #start h1{margin:2px 0 0;font-size:25px;line-height:1.08}
  #start .brand-tagline{margin:3px 0!important;font-size:10px!important;line-height:1.15}
  #start .difficulty{gap:24px;margin:2px auto 3px}
  #start .difficulty button,#start .difficulty button.selected{flex-basis:92px}
  #start .difficulty button img{width:43px;height:43px;margin-bottom:2px}
  #start .difficulty button b{font-size:10px}#start .difficulty button small{font-size:7px;margin-top:1px}
  #start .difficulty button.selected img{outline-width:3px;outline-offset:2px}
  .difficulty-info{margin:1px auto;padding:3px 11px;font-size:8px}.difficulty-info b{font-size:9px}
  .world-picker{width:min(100%,550px);margin:-2px auto 1px;padding:13px 40px 0}
  .world-picker-title{padding:2px 11px;font-size:9px}
  .world-carousel{gap:15px;padding:11px calc(50% - 38px) 2px}
  .world-orb{flex-basis:76px;width:76px;height:83px}.world-orb img{width:64px;height:64px}.world-orb b{font-size:9px}.world-orb small{font-size:7px}.world-orb i{width:21px;height:21px;font-size:10px}
  .world-arrow{top:42px;width:29px;height:34px;font-size:25px}.world-arrow.prev{left:4px}.world-arrow.next{right:4px}
  #selectedWorldName{font-size:10px}#start #play{margin-top:0;padding:5px 21px;font-size:13px;box-shadow:0 4px 0 #bc6716}
  #start .achievements-button{margin:2px 6px 0;padding:4px 12px;font-size:9px;box-shadow:0 3px 0 #064442}
  #start>small{display:block;margin-top:3px;font-size:7px}

  .target-preview{padding:8px 8px;justify-content:flex-start;overflow:hidden}
  .target-preview:before{margin:35px 0 4px;padding:4px 8px;font-size:9px}
  .target-preview img{height:min(34vh,220px);max-width:100%;object-fit:contain}
  .target-preview span.target-emoji{height:min(34vh,220px);font-size:clamp(72px,18vh,125px)}
  .target-preview div{margin-top:7px;padding:7px 3px}.target-preview span{font-size:15px}.target-preview b{font-size:clamp(15px,2vw,24px);letter-spacing:3px}.target-preview b:before{margin-bottom:3px;font-size:9px}
  #exitStage{top:7px;left:calc(20% - 48px);width:40px;height:40px;font-size:21px}#exitStage:after{top:41px;font-size:8px}
  #helpStage{top:7px;left:calc(20% - 94px);width:40px;height:40px;font-size:21px}

  .celebration{padding:9px;overflow:hidden}
  .reward-card{display:grid;direction:ltr;grid-template-columns:minmax(150px,42%) minmax(260px,58%);grid-template-areas:"image title" "image badge" "image stars" "image name" "image desc" "image gift" "image hear" "image actions";column-gap:15px;row-gap:2px;align-items:center;width:min(91vw,720px);max-height:calc(100dvh - 18px);padding:11px 17px 13px;border-width:5px;border-radius:25px;overflow:visible}
  .reward-card>*{direction:rtl}.crown{top:-20px;font-size:34px}.reward-card h2{grid-area:title;margin:0;font-size:23px;line-height:1.05}.learned-badge{grid-area:badge;justify-self:center;margin:1px 0;padding:3px 10px;font-size:9px}
  .earned-stars{grid-area:stars;margin:1px auto;font-size:22px;line-height:1.1}
  .reward-card img{grid-area:image;width:100%;height:min(48dvh,190px);border-width:3px;border-radius:17px;object-fit:contain;box-shadow:0 5px 13px #0003}
  .reward-card h3{grid-area:name;margin:1px 0 0;font-size:23px;line-height:1.05}.reward-card p{grid-area:desc;margin:0;font-size:11px;line-height:1.2}
  .bonus-gift{grid-area:gift;margin:2px auto;padding:3px 9px}.bonus-gift span{font-size:9px}.bonus-gift strong{font-size:14px}
  .hear-name{grid-area:hear;justify-self:center;margin:1px 0 3px;padding:5px 13px;font-size:11px;box-shadow:0 3px 0 #16748a}
  .reward-actions{grid-area:actions;width:100%;gap:8px}.reward-actions button{padding:7px 8px;font-size:11px;box-shadow:0 4px 0 #9d5716}
}

@media(orientation:landscape) and (max-height:430px){
  .reward-card{grid-template-columns:minmax(125px,38%) minmax(250px,62%);width:min(94vw,690px);padding:8px 14px 10px;row-gap:0}
  .reward-card img{height:min(47dvh,150px)}.reward-card h2{font-size:20px}.earned-stars{font-size:18px}.reward-card h3{font-size:19px}.reward-card p{font-size:9px}.learned-badge{font-size:8px}.hear-name{padding:4px 10px}.reward-actions button{padding:5px 7px;font-size:10px}
}

/* Ultra-short landscape phones (browser bars included). Keep the complete
   start flow in one viewport: difficulty, world, and both primary actions. */
@media(orientation:landscape) and (max-height:500px){
  #start{
    width:min(94vw,790px);
    height:calc(100dvh - 8px);
    max-height:none;
    padding:3px 16px 5px;
    overflow:hidden;
  }
  .brand-hero{width:150px;height:34px;margin:-3px auto -5px}
  #start h1{font-size:21px;line-height:1;margin:1px 0}
  #start .brand-tagline{font-size:8px!important;line-height:1;margin:2px 0!important}
  #start .difficulty{gap:18px;margin:1px auto 2px}
  #start .difficulty button,#start .difficulty button.selected{flex-basis:82px}
  #start .difficulty button img{width:35px;height:35px;margin-bottom:1px}
  #start .difficulty button b{font-size:9px}
  #start .difficulty button small{font-size:6px;margin-top:0}
  #start .difficulty button.selected img{outline-width:2px;outline-offset:1px}
  .difficulty-info{margin:0 auto;padding:2px 9px;font-size:7px;line-height:1.1}
  .difficulty-info b{font-size:8px}
  .world-picker{width:min(100%,510px);height:82px;margin:-1px auto 0;padding:10px 36px 0}
  .world-picker-title{padding:1px 9px;font-size:8px;box-shadow:0 2px 0 #a85d19}
  .world-carousel{gap:12px;padding:8px calc(50% - 30px) 0}
  .world-orb{flex-basis:60px;width:60px;height:67px}
  .world-orb img{width:50px;height:50px}
  .world-orb b{margin-top:1px;font-size:8px}.world-orb small{display:none}
  .world-orb i{width:18px;height:18px;font-size:8px}
  .world-arrow{top:31px;width:27px;height:29px;font-size:22px;box-shadow:0 2px 0 #174c62}
  #selectedWorldName{position:absolute;left:50%;bottom:0;transform:translateX(-50%);font-size:8px;white-space:nowrap}
  #start #play{margin:1px 3px 0;padding:4px 18px;font-size:11px;box-shadow:0 3px 0 #bc6716}
  #start .achievements-button{margin:1px 3px 0;padding:4px 10px;font-size:8px;box-shadow:0 3px 0 #064442}
  #start>small{display:none}
}

/* Portrait is the primary phone experience. The map gains vertical context,
   while the shooter becomes a true portrait composition rather than a
   squeezed landscape canvas. */
@media(orientation:portrait){
  html,body,#app{width:100%;height:100%;height:100dvh}
  canvas{position:absolute;inset:0;width:100%;height:100%}

  #start{width:94vw;max-height:96dvh;padding:12px 14px 14px;border-radius:24px;overflow-y:auto;scrollbar-width:none}
  #start::-webkit-scrollbar{display:none}
  .brand-hero{width:210px;height:78px;margin:-7px auto -10px}
  #start h1{font-size:34px;line-height:1.05;margin:2px 0}
  #start .brand-tagline{font-size:13px!important;margin:4px 0!important}
  #start .difficulty{gap:16px;margin:7px auto 8px}
  #start .difficulty button,#start .difficulty button.selected{flex-basis:92px}
  #start .difficulty button img{width:61px;height:61px;margin-bottom:4px}
  #start .difficulty button b{font-size:12px}#start .difficulty button small{font-size:8px}
  .difficulty-info{max-width:96%;font-size:9px;padding:4px 9px}.difficulty-info b{font-size:10px}
  .world-picker{width:100%;margin:3px auto 4px;padding:17px 34px 2px}
  .world-carousel{gap:17px;padding:16px calc(50% - 40px) 5px}
  .world-orb{flex-basis:80px;width:80px;height:100px}.world-orb img{width:75px;height:75px}
  .world-arrow{top:49px;width:31px;height:39px;font-size:27px}
  #selectedWorldName{font-size:11px}
  #start #play{padding:8px 20px;font-size:15px}
  #start .achievements-button{padding:7px 13px;font-size:11px}
  #start>small{margin-top:7px;font-size:9px}

  .screen header{height:70px;padding:7px 10px}.screen header b{font-size:18px}.screen header small{font-size:9px}.round{width:46px;height:46px;font-size:21px}
  #mapPath{height:calc(100% - 70px);padding-top:76px;padding-bottom:130px}
  .map-vines{top:6px;max-width:92%;margin:-57px auto 22px;padding:7px 14px;font-size:18px;letter-spacing:6px}
  .path-journey{width:100%}
  #mapPath.animals-map .stage-node:nth-of-type(4n+1){transform:translateX(-105px) rotate(-5deg)}
  #mapPath.animals-map .stage-node:nth-of-type(4n+3){transform:translateX(105px) rotate(5deg)}
  #mapPath.animals-map .stage-node:after{width:135px}
  #mapPath .map-zone{max-width:86%;margin:50px auto 30px;padding:10px 18px;font-size:18px;text-align:center}

  .target-preview{top:68px;left:10px;right:10px;bottom:auto;width:auto;height:285px;transform:none;display:grid;grid-template-columns:42% 58%;grid-template-rows:auto 1fr;padding:11px 12px;border:4px solid #ffe16a;border-radius:24px;background:linear-gradient(135deg,#073a53f5,#092744f8);box-shadow:0 9px 22px #0019}
  .target-preview:before{grid-column:1/-1;justify-self:center;margin:0 0 6px;padding:5px 12px;font-size:11px}
  .target-preview img,.target-preview span.target-emoji{grid-column:1;grid-row:2;width:100%;height:215px;max-height:215px;margin:0;object-fit:contain}
  .target-preview span.target-emoji{font-size:95px}
  .target-preview div{grid-column:2;grid-row:2;align-self:center;width:100%;margin:0;padding:12px 5px;background:#ffffff18}
  .target-preview span{font-size:17px}.target-preview b{font-size:clamp(18px,6vw,29px);letter-spacing:3px}.target-preview b:before{font-size:10px}
  .target-preview .target-emoji strong{font-size:85px}.target-preview .target-emoji small{margin-top:8px;font-size:12px}
  .target-preview .target-emoji .number-equation{font-size:54px}
  .target-preview .target-emoji .counting-dots{font-size:19px}
  #exitStage{top:max(11px,env(safe-area-inset-top));left:12px;width:44px;height:44px;font-size:23px}#exitStage:after{top:45px}
  #helpStage{top:max(11px,env(safe-area-inset-top));left:64px;width:44px;height:44px;font-size:23px}
  #sound{top:max(11px,env(safe-area-inset-top));right:12px;left:auto;width:44px;height:44px;font-size:21px}
  #fire{right:max(17px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));width:78px;height:78px;font-size:34px}
  #toast{bottom:18%;max-width:88%;font-size:20px;text-align:center}

  .celebration{padding:12px;overflow:hidden}
  .reward-card{display:flex;flex-direction:column;width:94vw;max-height:94dvh;padding:13px 16px 15px;border-width:5px;border-radius:26px;overflow:hidden}
  .reward-card h2{margin:0;font-size:25px}.learned-badge{margin:2px 0 5px;padding:4px 11px;font-size:10px}.earned-stars{margin:2px auto;font-size:23px}
  .reward-card img{width:min(68vw,290px);height:min(29dvh,250px);object-fit:contain;border-width:3px;border-radius:18px}
  .reward-card h3{margin:4px 0 0;font-size:27px}.reward-card p{margin:0 0 5px;font-size:12px}
  .bonus-gift{margin:3px auto;padding:4px 10px}.hear-name{margin:2px 0 7px;padding:7px 13px;font-size:12px}
  .reward-actions{width:100%;gap:8px}.reward-actions button{padding:9px 5px;font-size:12px}
  .crown{top:-24px;font-size:38px}

  .guide-card,.challenge-card{width:92vw;max-height:92dvh;overflow-y:auto}
  .sanctuary-body{height:calc(100% - 70px);padding:13px 10px 35px}.sanctuary-welcome{padding:10px 12px;gap:8px}.sanctuary-welcome>span{font-size:28px}.sanctuary-welcome b{font-size:16px}.sanctuary-welcome small{font-size:10px}
  #animalGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:5px}.animal-card{min-height:170px;padding:9px}.animal-card .animal,.animal-card .animal img{height:105px}
}

/* Learning-first hierarchy: pictures are compact visual clues; letters,
   numbers and actions keep the strongest visual weight. */
.target-preview img,.target-preview span.target-emoji{width:55%;height:min(24vh,165px);align-self:center}
.reward-card img{width:120px;height:96px;object-fit:contain}

/* Deterministic one-world-at-a-time carousel. Native momentum scrolling is
   intentionally disabled so one finger gesture can never skip two worlds. */
.world-carousel{overflow-x:hidden;scroll-snap-type:none;scroll-behavior:auto;touch-action:pan-y;cursor:grab}
.world-carousel:active{cursor:grabbing}
.world-orb{transition:transform .1s ease-out,opacity .06s linear,filter .06s linear;will-change:transform,opacity,filter}
.world-orb.selected{transform:scale(1.14)}

@media(orientation:landscape) and (max-height:780px){
  .target-preview img,.target-preview span.target-emoji{width:55%;height:min(22vh,125px)}
  .reward-card{grid-template-columns:minmax(105px,28%) minmax(260px,72%)}
  .reward-card img{width:110px;height:92px;justify-self:center}
}

@media(orientation:portrait){
  .target-preview{height:190px;grid-template-columns:30% 70%;padding:9px 10px}
  .target-preview img,.target-preview span.target-emoji{grid-column:1;width:108px;max-width:100%;height:108px;max-height:108px;justify-self:center}
  .target-preview span.target-emoji{font-size:52px}
  .target-preview .target-emoji strong{font-size:48px}.target-preview .target-emoji small{font-size:9px;letter-spacing:1px}
  .target-preview .target-emoji .number-equation{font-size:38px}
  .target-preview.number-hard .target-emoji .number-equation{font-size:clamp(21px,6.5vw,32px);letter-spacing:-1.5px}
  .target-preview.number-hard b{font-size:clamp(11px,3.2vw,15px);letter-spacing:.5px}
  .target-preview.object-hard b{font-size:clamp(10px,2.85vw,14px);line-height:1.18;letter-spacing:0}
  .target-preview .target-emoji .unknown-mark{font-size:52px}
  .target-preview .target-emoji .counting-dots{font-size:13px}
  .target-preview div{padding:9px 4px}.target-preview span{font-size:15px}.target-preview b{font-size:clamp(21px,7vw,32px)}
  .reward-card img{width:min(34vw,145px);height:min(15dvh,125px)}
}

/* The result belongs to the visual centre of the phone, independently of the
   previous page's scroll position or the browser's dynamic toolbars. */
.celebration{
  position:fixed!important;inset:0!important;width:100vw;height:100dvh;
  display:flex;align-items:center!important;justify-content:center!important;
  padding:max(14px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
}
/* Hidden screens must always stay hidden on initial load. */
.celebration.hidden{display:none!important}
.celebration .reward-card{margin:0!important;transform-origin:center center}

/* Number-world results use a compact, readable learning badge instead of an
   empty image placeholder. It shares the same grid slot as reward artwork. */
.reward-number{grid-area:image;display:grid;place-items:center;justify-self:center;width:120px;height:120px;border:5px solid #fff;border-radius:50%;background:radial-gradient(circle at 30% 22%,#fff,#ffe97a 42%,#ffae34 72%,#446ee9 73%);box-shadow:0 8px 0 #244ca9,0 14px 25px #0015;color:#173b78;font-size:62px;font-weight:1000;line-height:1}
.reward-card #rewardAnimal.number-reward-art{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;width:min(180px,42vw)!important;height:min(180px,22vh)!important;object-fit:contain!important}

@media(orientation:portrait){
  .reward-number{width:112px;height:112px;font-size:58px;border-width:4px;box-shadow:0 6px 0 #244ca9,0 11px 20px #0015}
  .reward-card:has(.reward-number:not(.hidden)){gap:4px;padding-top:12px;padding-bottom:13px}
}

@media(orientation:landscape) and (max-height:430px){
  .reward-number{width:88px;height:88px;font-size:45px;border-width:3px;box-shadow:0 5px 0 #244ca9}
}

/* Stable mathematical reading inside the Arabic interface. */
.target-preview .target-emoji .number-equation{
  direction:ltr;
  unicode-bidi:isolate;
  display:block;
  width:max-content;
  max-width:96%;
  margin-inline:auto;
  text-align:center;
}

/* Long English clues stay fully inside the learning card. */
.target-preview.object-hard div{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0;max-height:100%;overflow:hidden}
.target-preview.object-hard #targetEnglish{
  width:100%;max-width:100%;margin:0 auto;
  font-size:clamp(10px,1.45vw,17px)!important;
  line-height:1.18!important;letter-spacing:0!important;
  white-space:normal;overflow-wrap:anywhere;word-break:normal;
}

/* End-of-zone answers use a predictable grid; no option can escape the card. */
.challenge-card{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:hidden}
.challenge-card #challengeChoices{
  display:grid;
  direction:ltr;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center;
  justify-items:center;
  gap:14px;
  width:min(100%,340px);
  margin-inline:auto;
}
.challenge-choice{
  width:min(100%,132px);height:auto;aspect-ratio:1;
  min-width:0;min-height:0;padding:7px;
}
.challenge-choice strong{font-size:clamp(38px,8vw,66px)}
.challenge-choice img{max-width:100%;max-height:100%}

/* Completion artwork is a compact centred reward, never a side column. */
@media(orientation:landscape){
  .celebration .reward-card{
    display:grid;direction:rtl;
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "title title" "badge badge" "stars stars" "image image"
      "name name" "desc desc" "gift gift" "hear hear" "actions actions";
    justify-items:center;align-content:center;
    column-gap:8px;row-gap:1px;
    width:min(92vw,620px);max-height:calc(100dvh - 18px);
    padding:9px 16px 12px;overflow:hidden;
  }
  .celebration .reward-card img{
    grid-area:image;justify-self:center;
    width:94px!important;height:78px!important;
    object-fit:contain;
  }
  .celebration .reward-number{grid-area:image;justify-self:center;width:88px;height:88px;font-size:46px}
  .celebration .reward-card h2{grid-area:title}.celebration .learned-badge{grid-area:badge}.celebration .earned-stars{grid-area:stars}
  .celebration .reward-card h3{grid-area:name}.celebration .reward-card p{grid-area:desc}.celebration .bonus-gift{grid-area:gift}
  .celebration .hear-name{grid-area:hear}.celebration .reward-actions{grid-area:actions;width:min(100%,480px)}
}

/* v59 — state cleanup must outrank every specialised learning layout. */
#targetPreview.hidden{display:none!important}
.kg1-choice-board{position:fixed;inset:0;z-index:24;display:grid;place-items:stretch;padding:74px 12px 14px;background:linear-gradient(145deg,#fff8df33,#d7f5ed33);backdrop-filter:brightness(.8) saturate(.9);overflow:auto}
.kg1-choice-board.hidden{display:none!important}.kg1-choice-card{width:min(980px,100%);min-height:calc(100dvh - 88px);margin:auto;padding:16px;border:5px solid #d9ad31;border-radius:30px;background:#fffdf3e6;box-shadow:0 8px 0 #9c6615;display:flex;flex-direction:column;gap:12px}.kg1-choice-head{display:flex;justify-content:space-between;gap:12px;color:#183c54;font-weight:1000}.kg1-choice-head span{color:#b45a13}.kg1-choice-card h2{margin:0;text-align:center;color:#173c56;font-size:clamp(25px,4vw,44px)}.kg1-choice-grid{flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-content:center}.kg1-option{min-height:clamp(145px,28vh,260px);border:4px solid #e0b135;border-radius:24px;background:#fffaf0;color:#173c56;box-shadow:0 6px 0 #ae7316;overflow:hidden;display:grid;place-items:center;align-content:center;gap:7px;font-weight:1000}.kg1-option img{width:min(70%,180px);height:min(18vh,155px);object-fit:contain}.kg1-option b{font-size:clamp(18px,3.2vw,34px);line-height:1.05}.kg1-option.word-option{min-height:clamp(100px,18vh,190px);background:#eef9f2}.kg1-target-image{grid-column:1/-1;width:min(42vw,210px);height:min(22vh,170px);object-fit:contain;justify-self:center}.kg1-option.selected{outline:6px solid #43b7ed;background:#e5f7ff}.kg1-option.correct{border-color:#36b86a;background:#ddffea;box-shadow:0 6px 0 #197847}.kg1-option.wrong{border-color:#ef4b57;background:#ffe0e3;box-shadow:0 6px 0 #a52535}.kg1-choice-check{align-self:center;min-width:220px;padding:15px 28px;border:0;border-radius:18px;background:#f4b72c;color:#173c56;font-size:24px;font-weight:1000;box-shadow:0 6px 0 #a66612}.kg1-choice-active #game{visibility:visible;pointer-events:none;filter:brightness(.7) saturate(.82)}.kg1-choice-active #fire{display:none!important}
@media(max-width:700px){.kg1-choice-board{padding:66px 8px 9px}.kg1-choice-card{min-height:calc(100dvh - 75px);padding:12px;border-radius:24px}.kg1-choice-grid{gap:10px}.kg1-option{min-height:clamp(128px,27vh,210px);border-radius:18px}.kg1-option img{height:min(16vh,125px)}.kg1-option.word-option{min-height:clamp(92px,16vh,145px)}}
#lessonScreen.kg1-lesson .lesson-words>button{grid-template-rows:minmax(92px,1fr) auto auto 22px!important}#lessonScreen.kg1-lesson .lesson-media{min-height:88px!important;max-height:132px!important}#lessonScreen.kg1-lesson .lesson-media img{width:112px!important;height:112px!important;max-height:125px!important}#lessonScreen.kg1-lesson .lesson-words b{margin-top:6px!important}
/* Compact KG1 Unit 6 lesson cards: keep artwork, word and listen label aligned. */
#lessonScreen.kg1-lesson .lesson-words>button.missing-card{grid-template-rows:78px 22px 18px 16px!important;min-height:0!important;height:142px!important;padding:4px!important;align-items:start!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card .lesson-media{min-height:76px!important;height:76px!important;max-height:76px!important;display:grid!important;place-items:center!important;margin:0!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card .lesson-media img{width:76px!important;height:76px!important;max-width:100%!important;max-height:76px!important;object-fit:contain!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card b,#lessonScreen.kg1-lesson .lesson-words>button.missing-card small{align-self:start!important;margin:0!important;line-height:1!important}
#lessonScreen.kg1-lesson .lesson-words>button.missing-card small{font-size:7px!important;line-height:15px!important}
@media(max-width:700px){#lessonScreen.kg1-lesson .lesson-words{grid-auto-rows:146px!important;gap:7px!important}#lessonScreen.kg1-lesson .lesson-words>button.missing-card{height:142px!important}}
@media(max-width:700px){#lessonScreen.kg1-lesson .lesson-words{grid-auto-rows:184px!important;padding-bottom:14px!important}#lessonScreen.kg1-lesson .lesson-words>button{grid-template-rows:minmax(112px,1fr) auto auto 19px!important}#lessonScreen.kg1-lesson .lesson-media{min-height:104px!important;max-height:128px!important}#lessonScreen.kg1-lesson .lesson-media img{width:120px!important;height:120px!important;max-height:124px!important}}
.kg1-choice-grid .kg1-listen-target{grid-column:1/-1;justify-self:center;margin:-4px 0 4px;padding:6px 20px;border-radius:14px;background:#173c56;color:#fff;font-size:clamp(24px,6vw,42px);line-height:1;letter-spacing:.04em}.kg1-option{padding:12px;box-sizing:border-box}.kg1-option b{display:block;width:100%;max-width:100%;padding:0 4px;box-sizing:border-box;overflow:hidden;text-align:center;text-wrap:balance;overflow-wrap:anywhere;word-break:normal;font-size:clamp(16px,3.1vw,31px)!important;line-height:1.05}.kg1-option.word-option b{font-size:clamp(15px,2.75vw,27px)!important}.kg1-option.picture-option img{width:min(92%,250px);height:min(26vh,215px);max-height:none;object-fit:contain;transform:scale(1.38)}.kg1-option.picture-option:has(img)+*{margin-top:0}.kg1-option.picture-option b{margin-top:auto}.kg1-choice-grid:has(.kg1-listen-target) .picture-option b{display:none}.kg1-choice-grid:has(.kg1-listen-target) .picture-option img{width:min(96%,280px);height:min(30vh,240px);transform:scale(1.55)}
@media(max-width:700px){.kg1-option{padding:9px}.kg1-option b{font-size:clamp(15px,5.5vw,24px)!important}.kg1-option.word-option b{font-size:clamp(14px,4.7vw,21px)!important}.kg1-option.picture-option img{height:min(24vh,205px);transform:scale(1.5)}.kg1-choice-grid:has(.kg1-listen-target) .picture-option img{height:min(29vh,230px);transform:scale(1.7)}}

/* KG1 choice boards: every card must fit in a phone viewport.  Images are
   contained rather than transformed, so transparent artwork cannot escape a card. */
.kg1-choice-board{overflow:hidden;align-items:stretch}
.kg1-choice-card{box-sizing:border-box;height:calc(100dvh - 88px);min-height:0;overflow:hidden}
.kg1-choice-grid{min-height:0;align-content:stretch;grid-template-rows:repeat(2,minmax(0,1fr))}
.kg1-choice-grid:has(.kg1-target-image),.kg1-choice-grid:has(.kg1-four-art){grid-template-rows:minmax(0,.82fr) repeat(2,minmax(0,1fr))}
.kg1-choice-grid:has(.kg1-listen-target){grid-template-rows:auto repeat(2,minmax(0,1fr))}
.kg1-option{min-height:0!important;height:auto;padding:10px!important;min-width:0}
.kg1-option b,.kg1-option.word-option b{white-space:nowrap!important;overflow:hidden!important;overflow-wrap:normal!important;word-break:keep-all!important;text-wrap:nowrap!important;font-size:clamp(14px,2.8vw,27px)!important}
.kg1-option.picture-option{grid-template-rows:minmax(0,1fr) auto}
.kg1-choice-image,.kg1-option.picture-option img{display:block;width:auto!important;height:auto!important;max-width:84%!important;max-height:76%!important;object-fit:contain!important;transform:none!important}
.kg1-choice-image.compact-art{max-width:68%!important;max-height:62%!important}
.kg1-choice-grid:has(.kg1-listen-target) .picture-option{display:grid;place-items:center;grid-template-rows:1fr}
.kg1-choice-grid:has(.kg1-listen-target) .picture-option .kg1-choice-image{max-width:86%!important;max-height:84%!important}
.kg1-target-image{width:auto!important;height:auto!important;max-width:68%!important;max-height:100%!important;object-fit:contain;align-self:center}
.kg1-four-art{grid-column:1/-1;justify-self:center;align-self:center;display:grid;place-items:center;width:min(34vw,190px);aspect-ratio:1;border-radius:25%;background:linear-gradient(145deg,#79a9f3,#274eaa);border:4px solid #d8ecff;box-shadow:inset 0 7px #ffffff55,0 7px 0 #173575;color:#fff;font:bold clamp(68px,15vw,150px)/1 Arial,sans-serif;text-shadow:0 4px #173575}
/* Unit 7 choice alignment: enlarge the spoken target and keep it centered
   between the instruction and the four answer cards. */
.kg1-choice-grid .kg1-listen-target{font-size:clamp(48px,12vw,84px)!important;margin:-30px auto 0!important;transform:translateY(-12px)}
.kg1-choice-grid .kg1-number-target{grid-column:1/-1;justify-self:center;align-self:center;font-size:clamp(72px,18vw,140px);line-height:.8;color:#173c56;margin:-8px 0 0}
.kg1-number-badge{display:grid;place-items:center;justify-self:center;align-self:center;width:min(28vw,132px);height:min(28vw,132px);border-radius:28px;border:5px solid #e9fbff;background:radial-gradient(circle at 30% 20%,#fff6,#54c8ff 35%,#1e70f5 72%,#1745b8);box-shadow:inset 0 7px #ffffff66,0 8px 0 #183b89;color:#fff;font:1000 clamp(42px,10vw,76px)/1 Arial,sans-serif;text-shadow:0 4px #123078}
img.kg1-number-art-badge{display:block;width:auto!important;height:auto!important;max-width:min(23vw,112px)!important;max-height:min(13dvh,112px)!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;object-fit:contain!important}
.kg1-number-missing-target{grid-column:1/-1;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;justify-content:center;gap:18px;width:min(92%,560px);margin:auto;padding:14px 18px;border-radius:24px;border:3px solid #75e0d5;background:#083e58;color:#fff;box-shadow:inset 0 0 24px #0018}
.kg1-number-missing-target b{min-width:0;padding:12px 18px;border-radius:18px;border:3px solid #ffffff35;background:#ffffff12;font:1000 clamp(34px,9vw,66px)/1.05 Arial,sans-serif;letter-spacing:.05em;text-align:center;white-space:nowrap}
.kg1-number-match-target{grid-column:1/-1;display:grid;place-items:center;width:100%;min-height:0}
.kg1-choice-grid:has(.kg1-number-match-target){grid-template-rows:minmax(0,.82fr) repeat(2,minmax(0,1fr))!important}
.kg1-choice-grid .number-choice-option b{font-size:clamp(42px,11vw,90px)!important}
#app.kg1-odd-active #kg1ChoicePrompt{margin:clamp(18px,4vh,42px) auto 0!important;transform:none!important}
.kg1-choice-grid:has(.kg1-number-target){grid-template-rows:minmax(0,.72fr) repeat(2,minmax(0,1fr))!important}
.kg1-count-target{grid-column:1/-1;justify-self:center;align-self:center;display:grid;grid-auto-rows:minmax(34px,72px);gap:6px;place-items:center;justify-content:center;align-content:center;width:min(92%,360px);max-height:100%;overflow:hidden;margin-inline:auto}
.kg1-count-target.count-1{grid-template-columns:1fr;width:min(92%,120px)}
.kg1-count-target.count-2{grid-template-columns:repeat(2,minmax(34px,72px));width:min(92%,180px)}
.kg1-count-target.count-3{grid-template-columns:repeat(3,minmax(34px,72px));width:min(92%,260px)}
.kg1-count-target.count-4,.kg1-count-target.count-5,.kg1-count-target.count-6,.kg1-count-target.count-7,.kg1-count-target.count-8{grid-template-columns:repeat(4,minmax(34px,72px))}
.kg1-count-target.count-9,.kg1-count-target.count-10{grid-template-columns:repeat(5,minmax(28px,58px));grid-auto-rows:minmax(28px,58px);gap:4px;width:min(92%,340px)}
.kg1-count-target img{width:100%;height:100%;object-fit:contain}
.kg1-choice-grid:has(.kg1-count-target){grid-template-rows:minmax(0,.9fr) repeat(2,minmax(0,1fr))!important}
.kg1-number-choice-option{display:grid!important;place-items:center!important;padding:8px!important}
.kg1-number-option-image{width:auto!important;height:auto!important;max-width:78%!important;max-height:78%!important;object-fit:contain!important}
.exam-count-image{display:grid;grid-template-columns:repeat(5,minmax(28px,58px));grid-auto-rows:minmax(28px,58px);gap:5px;place-items:center;justify-content:center;align-content:center;width:100%;max-width:92%;max-height:180px;margin:auto;overflow:hidden}
.exam-count-image.count-1{grid-template-columns:minmax(34px,72px)}
.exam-count-image.count-2{grid-template-columns:repeat(2,minmax(34px,72px))}
.exam-count-image.count-3{grid-template-columns:repeat(3,minmax(34px,72px))}
.exam-count-image.count-4{grid-template-columns:repeat(4,minmax(34px,72px))}
.exam-count-image.count-5,.exam-count-image.count-6,.exam-count-image.count-7,.exam-count-image.count-8{grid-template-columns:repeat(4,minmax(30px,64px))}
.exam-count-image.count-9,.exam-count-image.count-10{grid-template-columns:repeat(5,minmax(26px,56px))}
.exam-count-image img{width:100%;height:100%;object-fit:contain}
.exam-visual .kg1-number-badge{width:min(23vw,118px)!important;height:min(23vw,118px)!important;border-radius:24px!important;font-size:clamp(36px,8vw,62px)!important;margin:auto!important}
.kg1-exam-missing-number{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:14px;width:min(96%,390px);margin:auto}
.kg1-exam-missing-number b{display:block;min-width:0;padding:10px 14px;border-radius:16px;border:3px solid #ffffff33;background:#ffffff14;color:#fff;font:1000 clamp(28px,7.5vw,50px)/1 Arial,sans-serif;letter-spacing:.04em;white-space:nowrap}
@media(max-width:700px){.kg1-count-target{gap:4px}.kg1-count-target.count-1{width:min(92%,100px)}.kg1-count-target.count-2{grid-template-columns:repeat(2,minmax(28px,58px));width:min(92%,150px)}.kg1-count-target.count-3{grid-template-columns:repeat(3,minmax(28px,58px));width:min(92%,200px)}.kg1-count-target.count-4,.kg1-count-target.count-5,.kg1-count-target.count-6,.kg1-count-target.count-7,.kg1-count-target.count-8{grid-template-columns:repeat(4,minmax(28px,58px));grid-auto-rows:minmax(28px,58px)}.kg1-count-target.count-9,.kg1-count-target.count-10{grid-template-columns:repeat(5,minmax(22px,48px));grid-auto-rows:minmax(22px,48px);width:min(92%,270px)}.kg1-choice-grid:has(.kg1-count-target){grid-template-rows:minmax(0,.9fr) repeat(2,minmax(0,1fr))!important}.kg1-number-option-image{max-width:82%!important;max-height:82%!important}}
@media(max-width:700px){
  .kg1-choice-board{padding:66px 8px 8px!important}
  .kg1-choice-card{height:calc(100dvh - 74px)!important;min-height:0!important;padding:10px!important;gap:8px!important;border-width:4px!important}
  .kg1-choice-head{font-size:13px;line-height:1.1}.kg1-choice-card h2{font-size:clamp(23px,7.1vw,34px)!important;line-height:1.05}
  .kg1-choice-grid{gap:8px!important}.kg1-choice-grid .kg1-listen-target{margin:-8px auto 0!important;padding:5px 15px!important;font-size:clamp(20px,6.4vw,31px)!important;transform:translateY(-4px)}
  .kg1-option{border-width:3px!important;border-radius:17px!important;box-shadow:0 4px 0 #ae7316!important;padding:6px!important}
  .kg1-option b,.kg1-option.word-option b{font-size:clamp(13px,4.35vw,20px)!important;letter-spacing:0!important}
  .kg1-choice-image,.kg1-option.picture-option img{max-width:83%!important;max-height:73%!important}
  .kg1-choice-image.compact-art{max-width:64%!important;max-height:57%!important}
  .kg1-choice-grid:has(.kg1-listen-target) .picture-option .kg1-choice-image{max-width:84%!important;max-height:82%!important}
  .kg1-target-image{max-width:74%!important;max-height:100%!important}
  .kg1-four-art{width:min(30vw,132px);border-width:3px;font-size:clamp(56px,14vw,100px)}
  .kg1-number-badge{width:min(22vw,92px);height:min(22vw,92px);border-width:3px;border-radius:20px;font-size:clamp(31px,8vw,48px)}
  .kg1-number-missing-target{width:100%;gap:9px;padding:9px 10px;border-radius:19px}
  .kg1-number-missing-target b{padding:9px 10px;border-radius:14px;font-size:clamp(25px,7.2vw,40px)}
  .kg1-choice-grid:has(.kg1-number-missing-target){grid-template-rows:minmax(0,.62fr) repeat(2,minmax(0,1fr))!important}
  .exam-visual .kg1-number-badge{width:min(19vw,82px)!important;height:min(19vw,82px)!important;border-width:3px!important;border-radius:18px!important;font-size:clamp(30px,7vw,44px)!important}
  .exam-visual img.kg1-number-art-badge{max-width:min(22vw,96px)!important;max-height:min(11dvh,92px)!important}
  .kg1-exam-missing-number{gap:9px;width:min(100%,330px)}
  .kg1-exam-missing-number b{padding:8px 10px;border-radius:14px;font-size:clamp(24px,6.7vw,38px)}
  .kg1-choice-check{min-width:0!important;padding:10px 20px!important;font-size:19px!important}
}

.target-preview.missing-letters-stage[data-world-number="true"] #targetImage,
#targetPreview.missing-letters-stage[data-word="ONE"] #targetImage,
#targetPreview.missing-letters-stage[data-word="TWO"] #targetImage,
#targetPreview.missing-letters-stage[data-word="THREE"] #targetImage,
#targetPreview.missing-letters-stage[data-word="FOUR"] #targetImage,
#targetPreview.missing-letters-stage[data-word="FIVE"] #targetImage,
#targetPreview.missing-letters-stage[data-word="SIX"] #targetImage,
#targetPreview.missing-letters-stage[data-word="SEVEN"] #targetImage,
#targetPreview.missing-letters-stage[data-word="EIGHT"] #targetImage,
#targetPreview.missing-letters-stage[data-word="NINE"] #targetImage,
#targetPreview.missing-letters-stage[data-word="TEN"] #targetImage{
  object-fit:contain!important;background:transparent!important;border:0!important;
  box-shadow:none!important;padding:4px!important;
}

.celebration .reward-card img.number-reward-art{
  width:min(46vw,210px)!important;height:min(21dvh,170px)!important;
  object-fit:contain!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;background:transparent!important;margin:2px auto 4px!important;
}
@media(orientation:portrait){
  .celebration .reward-card img.number-reward-art{
    width:min(50vw,220px)!important;height:min(18dvh,155px)!important;
  }
}

/* Picture choices keep the same width but use shorter, centered cards. */
.kg1-choice-grid:has(.picture-option){grid-template-rows:repeat(2,minmax(0,min(22svh,300px)));align-content:center}
.kg1-choice-grid:has(.kg1-listen-target){grid-template-rows:auto repeat(2,minmax(0,min(22svh,300px)))}
@media(max-width:700px){
  .kg1-choice-grid:has(.picture-option){grid-template-rows:repeat(2,minmax(0,min(22svh,260px)));align-content:center}
  .kg1-choice-grid:has(.kg1-listen-target){grid-template-rows:auto repeat(2,minmax(0,min(22svh,260px)))}
}

.kg1-match-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  align-content:center!important;
  gap:clamp(8px,1.8vw,16px)!important;
  width:min(100%,590px)!important;
  min-height:min(60svh,620px)!important;
  margin:auto!important;
}
.kg1-match-card{
  display:grid;place-items:center;min-width:0;min-height:0;border-radius:20px;
  border:4px solid #f3c332;background:#f7fff5;box-shadow:0 8px 0 #b8790b;
  color:#153d55;font:1000 clamp(18px,4.6vw,34px)/1.05 Arial,sans-serif;
  transition:transform .18s ease,opacity .28s ease,filter .2s ease;
  transform-style:preserve-3d;
}
.kg1-match-card img{max-width:82%;max-height:82%;object-fit:contain}
.kg1-match-card.selected{outline:6px solid #74ffd0;transform:translateY(-4px)}
.kg1-match-card.wrong{outline:6px solid #ff4f6d}
.kg1-match-card.matched{opacity:0;pointer-events:none;animation:kg1MatchFlip .42s ease forwards}
.kg1-match-card.match-center{border-color:#7ce9d7;background:#0b4460;color:#fff;box-shadow:inset 0 0 24px #0018,0 8px 0 #073148}
.kg1-match-card.match-center strong{font-size:clamp(18px,5vw,38px);letter-spacing:.04em}
.kg1-match-card.match-center span{
  width:min(52%,72px);aspect-ratio:1;border-radius:30% 70% 55% 45%;
  background:linear-gradient(135deg,#ffe36d,#ff8a3d 58%,#2ce5c8 60%,#1787ff);
  box-shadow:inset 0 0 18px #fff8,0 8px 18px #0015;
}
@keyframes kg1MatchFlip{
  0%{opacity:1;transform:rotateY(0) scale(1)}
  70%{opacity:.75;transform:rotateY(180deg) scale(1.05)}
  100%{opacity:0;transform:rotateY(180deg) scale(.72)}
}
@media(max-width:700px){
  .kg1-match-grid{gap:9px!important;min-height:min(58svh,500px)!important}
  .kg1-match-card{border-width:3px;border-radius:16px;box-shadow:0 6px 0 #b8790b}
}

/* KG1 Actions: keep large standing and movement art inside stage cards. */
.target-preview img[src*="kg1-actions/walk.png"],
.target-preview img[src*="kg1-actions/stand.png"],
.target-preview img[src*="kg1-actions/open.png"],
.target-preview img[src*="kg1-actions/close.png"],
.target-preview img[src*="kg1-actions/look.png"],
.target-preview img[src*="kg1-actions/run.png"],
.target-preview img[src*="kg1-actions/clap.png"],
.target-preview img[src*="kg1-actions/dance.png"],
.target-preview img[src*="kg1-actions/drink.png"],
.target-preview img[src*="kg1-actions/sit.png"],
.kg1-choice-image[src*="kg1-actions/walk.png"],
.kg1-choice-image[src*="kg1-actions/stand.png"],
.kg1-choice-image[src*="kg1-actions/open.png"],
.kg1-choice-image[src*="kg1-actions/close.png"],
.kg1-choice-image[src*="kg1-actions/look.png"],
.kg1-choice-image[src*="kg1-actions/run.png"],
.kg1-choice-image[src*="kg1-actions/clap.png"],
.kg1-choice-image[src*="kg1-actions/dance.png"],
.kg1-choice-image[src*="kg1-actions/drink.png"],
.kg1-choice-image[src*="kg1-actions/sit.png"],
.kg1-match-card img[src*="kg1-actions/walk.png"],
.kg1-match-card img[src*="kg1-actions/stand.png"],
.kg1-match-card img[src*="kg1-actions/open.png"],
.kg1-match-card img[src*="kg1-actions/close.png"],
.kg1-match-card img[src*="kg1-actions/look.png"],
.kg1-match-card img[src*="kg1-actions/run.png"],
.kg1-match-card img[src*="kg1-actions/clap.png"],
.kg1-match-card img[src*="kg1-actions/dance.png"],
.kg1-match-card img[src*="kg1-actions/drink.png"],
.kg1-match-card img[src*="kg1-actions/sit.png"],
.challenge-article-image[src*="kg1-actions/walk.png"],
.challenge-article-image[src*="kg1-actions/stand.png"],
.challenge-article-image[src*="kg1-actions/open.png"],
.challenge-article-image[src*="kg1-actions/close.png"],
.challenge-article-image[src*="kg1-actions/look.png"],
.challenge-article-image[src*="kg1-actions/run.png"],
.challenge-article-image[src*="kg1-actions/clap.png"],
.challenge-article-image[src*="kg1-actions/dance.png"],
.challenge-article-image[src*="kg1-actions/drink.png"],
.challenge-article-image[src*="kg1-actions/sit.png"],
.exam-visual img[src*="kg1-actions/walk.png"],
.exam-visual img[src*="kg1-actions/stand.png"],
.exam-visual img[src*="kg1-actions/open.png"],
.exam-visual img[src*="kg1-actions/close.png"],
.exam-visual img[src*="kg1-actions/look.png"],
.exam-visual img[src*="kg1-actions/run.png"],
.exam-visual img[src*="kg1-actions/clap.png"],
.exam-visual img[src*="kg1-actions/dance.png"],
.exam-visual img[src*="kg1-actions/drink.png"],
.exam-visual img[src*="kg1-actions/sit.png"]{
  transform:scale(.85)!important;
  transform-origin:center!important;
}
#lessonScreen.kg1-lesson .lesson-media img[src*="kg1-actions/walk.png"],
#lessonScreen.kg1-lesson .lesson-media img[src*="kg1-actions/stand.png"],
#lessonScreen.kg1-lesson .lesson-media img[src*="kg1-actions/open.png"],
#lessonScreen.kg1-lesson .lesson-media img[src*="kg1-actions/close.png"]{
  transform:scale(.85)!important;
  transform-origin:center!important;
}

.kg1-match-card.match-picture img[src*="kg1-actions/"]{
  max-width:96%!important;
  max-height:96%!important;
  transform:scale(1.14)!important;
  transform-origin:center!important;
}
.kg1-match-card.match-word b{
  font-size:clamp(22px,5.5vw,41px)!important;
}

.target-clue-ar{
  display:block;width:100%;margin:6px 0 0!important;padding:5px 7px;
  color:#fff2a6!important;font-size:clamp(10px,1.25vw,15px)!important;
  line-height:1.3!important;letter-spacing:0!important;text-align:center;
  border-top:1px solid #ffffff38;
}
.target-clue-ar.hidden{display:none!important}

/* Counting uses a compact dark tray so pale fruit and candy remain legible,
   while the answer row stays unobstructed below the lesson card. */
.target-preview.number-count>.target-emoji{
  background:linear-gradient(145deg,#082d48,#0b5367)!important;
  border:2px solid #6fe5d5!important;border-radius:18px!important;
  box-shadow:inset 0 0 24px #0018!important;
}
.target-preview.number-count .counting-items i{filter:drop-shadow(0 3px 2px #001)!important}

@media(orientation:portrait){
  .target-preview.number-count{height:230px!important;grid-template-rows:auto 56px minmax(0,1fr)!important;padding:8px 10px!important}
  .target-preview.number-count>div{padding:3px 6px!important}
  .target-preview.number-count>div span{font-size:16px!important}
  .target-preview.number-count>div b{font-size:25px!important}
  .target-preview.number-count>.target-emoji{padding:5px 10px!important}
  .target-preview.number-count .counting-items{font-size:clamp(17px,5.2vw,25px)!important;gap:2px 4px!important}
  .target-preview.object-hard{height:225px!important;grid-template-columns:28% 72%!important}
  .target-preview.object-hard>div{padding:8px 8px!important;justify-content:flex-start!important}
  .target-preview.object-hard #targetEnglish{font-size:clamp(10px,2.75vw,14px)!important;line-height:1.18!important}
  .target-preview.object-hard .target-clue-ar{font-size:clamp(9px,2.45vw,12px)!important;line-height:1.22!important;margin-top:5px!important}
}
@media(orientation:portrait){
  .celebration .reward-card img{width:min(29vw,123px)!important;height:min(12.7dvh,106px)!important;align-self:center}
  .target-preview.object-hard #targetEnglish{font-size:clamp(9px,2.45vw,12px)!important;line-height:1.14!important}
  .challenge-card{padding:13px 14px 16px!important;overflow:hidden!important}
  .challenge-card h2{font-size:23px;margin:5px 0 1px}.challenge-card p{font-size:15px;line-height:1.25;margin:2px 0 10px}
  .challenge-card #challengeChoices{width:min(100%,310px);gap:11px}
  .challenge-choice{width:min(100%,112px);border-width:4px;border-radius:21px}
}
@media(orientation:landscape) and (max-height:500px){
  .challenge-card{padding:8px 15px 11px}
  .challenge-card h2{font-size:20px;margin:2px 0}.challenge-card p{font-size:13px;margin:1px 0 6px}.challenge-card>small{margin-top:5px;font-size:9px}
  .challenge-card #challengeChoices{grid-template-columns:repeat(4,minmax(0,1fr));width:min(100%,440px);gap:10px}
  .challenge-choice{width:min(100%,88px);border-width:3px;border-radius:17px;box-shadow:0 5px 0 #3473a3}
  .celebration .reward-card img{width:80px!important;height:66px!important}
}

/* The opening logo uses the transparent in-game plane and a short arrival. */
.brand-plane{
  object-fit:contain!important;
  filter:drop-shadow(0 9px 9px #0019)!important;
  animation:brandPlaneArrival 1.15s cubic-bezier(.2,.8,.25,1) both;
  transform-origin:center;
}
#start h1{animation:brandNameArrival .48s ease-out .92s both}
#start .brand-tagline{animation:brandNameArrival .48s ease-out 1.05s both}
@keyframes brandPlaneArrival{
  0%{opacity:0;transform:translate(-55vw,-24vh) scale(.18) rotate(-170deg)}
  58%{opacity:1;transform:translate(7vw,-3vh) scale(1.08) rotate(-18deg)}
  78%{transform:translate(-2vw,1vh) scale(.96) rotate(8deg)}
  100%{opacity:1;transform:translate(0,0) scale(1) rotate(0)}
}
@keyframes brandNameArrival{from{opacity:0;transform:translateY(13px) scale(.92)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.brand-plane,#start h1,#start .brand-tagline{animation:none}}

/* v57 — dedicated transparent opening scene (before difficulty selection). */
.intro-splash{
  position:fixed;inset:0;z-index:120;display:flex;flex-direction:column;
  align-items:center;justify-content:center;overflow:hidden;text-align:center;
  background:radial-gradient(circle at 50% 42%,#168dcc 0,#0a5c9f 45%,#061b44 100%);
  transition:opacity .32s ease,transform .32s ease;
}
.intro-splash.leaving{opacity:0;transform:scale(1.04);pointer-events:none}
.intro-splash img{width:min(62vw,360px);height:min(32dvh,230px);object-fit:contain;filter:drop-shadow(0 13px 14px #0019);animation:introPlane 1.18s cubic-bezier(.18,.82,.22,1) both}
.intro-splash h1{margin:-8px 0 0;font-size:clamp(42px,10vw,76px);animation:introTitle .42s ease-out 1s both}
.intro-splash p{margin:6px 0 15px;font-size:clamp(17px,4vw,25px);font-weight:800;animation:introTitle .42s ease-out 1.12s both}
.intro-chicks{display:flex;direction:ltr;gap:12px;align-items:center;animation:introTitle .42s ease-out 1.25s both}
.intro-chicks span{display:grid;place-items:center;min-width:48px;height:48px;padding:0 9px;border:3px solid #fff;border-radius:50%;background:#ffe05b;color:#173b78;font-size:18px;font-weight:1000;box-shadow:0 5px 0 #bf721f}
@keyframes introPlane{0%{opacity:0;transform:translate(-58vw,-28vh) scale(.16) rotate(-175deg)}58%{opacity:1;transform:translate(8vw,-2vh) scale(1.1) rotate(-20deg)}80%{transform:translate(-2vw,1vh) scale(.96) rotate(7deg)}100%{transform:none}}
@keyframes introTitle{from{opacity:0;transform:translateY(17px) scale(.86)}to{opacity:1;transform:none}}

/* One attractive object type per counting question. The grid remains readable
   from 1 through 15 without pushing the prompt outside its panel. */
.target-preview .target-emoji .counting-question{order:0;width:100%;margin:0 0 7px;color:#176895;font-size:clamp(12px,1.4vw,18px);line-height:1.15;letter-spacing:0}
.counting-question b,.counting-question em{display:block;font-style:normal}
.target-preview .target-emoji .counting-items{order:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));place-items:center;gap:3px 5px;width:min(100%,230px);margin:auto;font-size:clamp(19px,2.5vw,31px);line-height:1.05}
.target-preview .target-emoji .counting-items i{font-style:normal;filter:drop-shadow(0 2px 1px #174e7e40)}

/* Arithmetic learning card: instruction above, equation below. This shared
   mechanism works for every expression length and both phone orientations. */
.target-preview.number-hard{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto minmax(44px,auto) minmax(0,1fr)!important;align-content:stretch!important;gap:7px!important}
.target-preview.number-hard:before{grid-column:1!important;grid-row:1!important;justify-self:center!important;margin:0!important}
.target-preview.number-hard>div{grid-column:1!important;grid-row:2!important;width:100%!important;margin:0!important;padding:7px 9px!important;align-self:stretch!important;display:flex;flex-direction:column;align-items:center;justify-content:center}
.target-preview.number-hard>.target-emoji{grid-column:1!important;grid-row:3!important;width:100%!important;height:100%!important;min-height:78px!important;max-height:none!important;margin:0!important;justify-self:stretch!important}
.target-preview.number-hard .target-emoji .number-equation{width:100%!important;max-width:100%!important;font-size:clamp(24px,4vw,48px)!important;letter-spacing:-1px!important;white-space:nowrap!important}
.target-preview.number-hard #targetEnglish{font-size:clamp(11px,1.35vw,17px)!important;line-height:1.12!important;letter-spacing:.2px!important}

/* Results always own the centre slot. Number artwork is 15% smaller so the
   word, explanation and navigation remain the main focus. */
.celebration .reward-card img,.celebration .reward-number{grid-column:1/-1!important;justify-self:center!important;align-self:center!important;margin-inline:auto!important}
.celebration .reward-number{width:102px;height:102px;font-size:53px}
@media(orientation:portrait){
  .target-preview.number-hard{height:235px!important;grid-template-rows:auto 50px minmax(0,1fr)!important}
  .target-preview.number-hard>.target-emoji{font-size:60px!important}
  .target-preview.number-hard .target-emoji .number-equation{font-size:clamp(23px,7.1vw,34px)!important}
  .target-preview.number-count .target-emoji{display:flex!important;flex-direction:column!important;padding:8px!important}
  .target-preview .target-emoji .counting-items{width:min(100%,205px);font-size:clamp(18px,5.3vw,27px)}
  .celebration .reward-number{width:95px!important;height:95px!important;font-size:49px!important}
}
@media(orientation:landscape) and (max-height:500px){
  .intro-splash img{width:220px;height:90px}.intro-splash h1{font-size:34px}.intro-splash p{font-size:13px;margin:2px 0 7px}.intro-chicks span{min-width:34px;height:34px;font-size:12px}
  .target-preview.number-hard{grid-template-rows:auto 42px minmax(0,1fr)!important;padding-inline:8px!important}
  .target-preview.number-hard .target-emoji .number-equation{font-size:clamp(21px,3.5vw,34px)!important}
  .target-preview .target-emoji .counting-items{width:min(100%,175px);font-size:17px;gap:2px}
  .celebration .reward-number{width:75px!important;height:75px!important;font-size:39px!important}
}
@media(prefers-reduced-motion:reduce){.intro-splash img,.intro-splash h1,.intro-splash p,.intro-chicks{animation:none}}

/* v58 — phone-safe lesson layout. Four large choices always remain fully
   inside the logical 720px playfield, including the two edge choices. */
@media(orientation:portrait){
  .target-preview.number-count{
    height:300px!important;display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto 72px minmax(0,1fr)!important;
    gap:7px!important;
  }
  .target-preview.number-count:before{grid-column:1!important;grid-row:1!important;margin:0!important}
  .target-preview.number-count>div{grid-column:1!important;grid-row:2!important;width:100%!important;margin:0!important;padding:6px!important}
  .target-preview.number-count>div span{font-size:19px!important}
  .target-preview.number-count>div b{font-size:31px!important;letter-spacing:2px!important;line-height:1!important}
  .target-preview.number-count>.target-emoji{
    grid-column:1!important;grid-row:3!important;width:100%!important;
    height:100%!important;max-height:none!important;min-height:0!important;
    padding:7px 12px!important;margin:0!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
  }
  .target-preview.number-count .counting-items{
    display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;
    place-items:center;width:min(100%,520px)!important;max-height:100%!important;
    gap:4px!important;margin:auto!important;font-size:clamp(20px,6vw,30px)!important;
  }
  #toast{bottom:38%!important;max-width:78%!important;padding:9px 18px!important;font-size:18px!important;line-height:1.25!important}
}

@media(orientation:landscape){
  .target-preview.number-count{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:6px!important}
  .target-preview.number-count:before{grid-column:1!important;grid-row:1!important;margin:0!important}
  .target-preview.number-count>div{grid-column:1!important;grid-row:2!important;margin:0!important;padding:6px 3px!important}
  .target-preview.number-count>.target-emoji{grid-column:1!important;grid-row:3!important;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;padding:6px!important}
  .target-preview.number-count .counting-items{grid-template-columns:repeat(5,minmax(0,1fr))!important;width:100%!important;font-size:clamp(15px,2vw,23px)!important;gap:2px!important}
}

/* Final v60 overrides — deliberately last in the cascade. */
#targetPreview.hidden{display:none!important}
@media(orientation:portrait){
  .target-preview.number-count{height:230px!important;grid-template-rows:auto 56px minmax(0,1fr)!important;padding:8px 10px!important}
  .target-preview.number-count>div{padding:3px 6px!important}
  .target-preview.number-count>div span{font-size:16px!important}
  .target-preview.number-count>div b{font-size:25px!important}
  .target-preview.number-count>.target-emoji{padding:5px 10px!important;background:linear-gradient(145deg,#082d48,#0b5367)!important}
  .target-preview.number-count .counting-items{font-size:clamp(17px,5.2vw,24px)!important;column-gap:8px!important;row-gap:13px!important;line-height:1!important}
  .target-preview.object-hard{height:225px!important;grid-template-columns:28% 72%!important}
  .target-preview.object-hard>div{padding:8px!important;justify-content:flex-start!important}
  .target-preview.object-hard #targetEnglish{font-size:clamp(10px,2.75vw,14px)!important;line-height:1.18!important}
  .target-preview.object-hard .target-clue-ar{font-size:clamp(9px,2.45vw,12px)!important;line-height:1.22!important;margin-top:5px!important}
}

@media(orientation:landscape){
  .target-preview.number-count .counting-items{column-gap:8px!important;row-gap:10px!important;line-height:1!important}
}

/* v66 — one phone-safe rule set for maths, counting and long exam words. */
.target-preview.number-hard #targetEnglish{display:none!important}
.target-preview.number-hard>div{min-height:42px!important;padding:5px 8px!important}
.target-preview.number-hard>div #targetArabic{font-size:clamp(20px,5vw,29px)!important;line-height:1.1!important}
.target-preview.number-hard>.target-emoji{overflow:hidden!important;padding:8px 10px!important}
.target-preview.number-hard>.target-emoji small{direction:rtl;letter-spacing:0!important;font-size:clamp(12px,3vw,17px)!important;margin-top:9px!important}
.target-preview.number-count{overflow:hidden!important}
.target-preview.number-count>.target-emoji{min-width:0!important;overflow:hidden!important}
.target-preview.number-count .counting-items{grid-auto-rows:minmax(0,1fr)!important;align-content:center!important;max-width:100%!important;max-height:100%!important;overflow:hidden!important}
.target-preview.number-count .counting-items i{display:grid;place-items:center;min-width:0;max-width:100%;line-height:1!important}
.exam-choices button{font-size:var(--option-size,clamp(18px,5vw,25px));white-space:nowrap;overflow:hidden;text-overflow:clip;overflow-wrap:normal;word-break:keep-all;letter-spacing:-.25px}
.exam-screen[data-world="objects"] #examPrompt{font-size:clamp(18px,4.8vw,26px);overflow-wrap:normal;word-break:normal}

@media(orientation:portrait){
  .target-preview.number-count{height:218px!important;grid-template-rows:auto 50px minmax(0,1fr)!important;gap:5px!important}
  .target-preview.number-count>div{min-height:0!important;padding:2px 5px!important}
  .target-preview.number-count>div span{font-size:15px!important;line-height:1!important}
  .target-preview.number-count>div b{font-size:23px!important;line-height:1!important}
  .target-preview.number-count>.target-emoji{padding:7px 12px!important}
  .target-preview.number-count .counting-items{grid-template-columns:repeat(5,minmax(0,1fr))!important;column-gap:13px!important;row-gap:10px!important;font-size:clamp(17px,5.1vw,24px)!important}
  .target-preview.number-hard{height:216px!important;grid-template-rows:auto 43px minmax(0,1fr)!important;gap:5px!important}
  .target-preview.number-hard .target-emoji .number-equation{font-size:clamp(25px,7.5vw,36px)!important}
  .exam-card{padding:15px 14px 17px}
  .exam-choices{gap:9px}
  .exam-choices button{min-height:55px;padding:7px 4px}
}

@media(orientation:landscape) and (max-height:650px){
  .target-preview.number-count{height:calc(100% - 4px)!important;grid-template-rows:auto 46px minmax(0,1fr)!important;gap:4px!important}
  .target-preview.number-count .counting-items{grid-template-columns:repeat(5,minmax(0,1fr))!important;column-gap:9px!important;row-gap:7px!important;font-size:clamp(15px,3.6vh,21px)!important}
  .target-preview.number-hard{grid-template-rows:auto 38px minmax(0,1fr)!important;gap:4px!important}
}

/* v67 — a single landscape side-panel contract for every world.
   Earlier specialised rules no longer get to collapse the image or text rows. */
@media(orientation:landscape){
  .target-preview,
  .target-preview.number-count,
  .target-preview.number-hard,
  .target-preview.object-hard,
  .target-preview.unknown-target{
    top:0!important;bottom:0!important;left:0!important;right:auto!important;
    width:20%!important;height:100%!important;transform:none!important;
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto minmax(150px,46vh) minmax(72px,auto)!important;
    align-content:center!important;align-items:center!important;justify-items:stretch!important;
    gap:13px!important;padding:92px 14px 24px!important;
    overflow:hidden!important;border-radius:0 28px 28px 0!important;
  }
  .target-preview:before,
  .target-preview.number-count:before,
  .target-preview.number-hard:before,
  .target-preview.object-hard:before{
    grid-column:1!important;grid-row:1!important;align-self:center!important;justify-self:center!important;
    margin:0!important;padding:7px 13px!important;font-size:clamp(10px,1vw,14px)!important;
    line-height:1.1!important;white-space:nowrap!important;
  }
  .target-preview>img,
  .target-preview>.target-emoji,
  .target-preview.number-count>.target-emoji,
  .target-preview.object-hard>.target-emoji{
    grid-column:1!important;grid-row:2!important;align-self:stretch!important;justify-self:stretch!important;
    width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:46vh!important;
    margin:0!important;padding:10px!important;object-fit:contain!important;overflow:hidden!important;
  }
  .target-preview>div,
  .target-preview.object-hard>div,
  .target-preview.unknown-target>div{
    grid-column:1!important;grid-row:3!important;align-self:center!important;justify-self:stretch!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    width:100%!important;min-width:0!important;min-height:72px!important;max-width:100%!important;max-height:none!important;
    margin:0!important;padding:10px 7px!important;overflow:hidden!important;
  }
  .target-preview>div span{font-size:clamp(15px,1.35vw,23px)!important;line-height:1.15!important}
  .target-preview>div b{max-width:100%!important;font-size:clamp(17px,1.8vw,29px)!important;line-height:1.16!important;letter-spacing:2px!important;overflow-wrap:normal!important;word-break:normal!important}
  .target-preview>div b:before{margin-bottom:5px!important;font-size:clamp(9px,.85vw,13px)!important;line-height:1.1!important}
  .target-preview .target-clue-ar{max-height:64px!important;margin-top:5px!important;padding:5px!important;font-size:clamp(9px,.9vw,13px)!important;line-height:1.22!important;overflow:hidden!important}

  .target-preview.number-hard{
    grid-template-rows:auto minmax(54px,auto) minmax(150px,1fr)!important;
  }
  .target-preview.number-hard>div{grid-column:1!important;grid-row:2!important;min-height:54px!important;padding:8px!important}
  .target-preview.number-hard>.target-emoji{grid-column:1!important;grid-row:3!important;max-height:none!important;padding:12px!important}
  .target-preview.number-hard>div #targetArabic{font-size:clamp(19px,1.8vw,28px)!important}
  .target-preview.number-hard .target-emoji .number-equation{font-size:clamp(30px,3.2vw,54px)!important}

  .target-preview.number-count{
    grid-template-rows:auto minmax(58px,auto) minmax(150px,1fr)!important;
  }
  .target-preview.number-count>div{grid-column:1!important;grid-row:2!important;min-height:58px!important;margin:0!important;padding:7px!important}
  .target-preview.number-count>.target-emoji{grid-column:1!important;grid-row:3!important;max-height:none!important;padding:12px!important}
  .target-preview.number-count .counting-items{grid-template-columns:repeat(5,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;column-gap:12px!important;row-gap:12px!important;font-size:clamp(16px,2vw,26px)!important}
}

@media(orientation:landscape) and (max-height:650px){
  .target-preview,
  .target-preview.number-count,
  .target-preview.number-hard,
  .target-preview.object-hard,
  .target-preview.unknown-target{
    grid-template-rows:auto minmax(105px,42vh) minmax(58px,auto)!important;
    gap:7px!important;padding:64px 10px 13px!important;
  }
  .target-preview>div,.target-preview.object-hard>div,.target-preview.unknown-target>div{min-height:58px!important;padding:6px 4px!important}
  .target-preview.number-hard{grid-template-rows:auto minmax(42px,auto) minmax(105px,1fr)!important}
  .target-preview.number-count{grid-template-rows:auto minmax(44px,auto) minmax(105px,1fr)!important}
  .target-preview.number-hard>div,.target-preview.number-count>div{min-height:42px!important;padding:4px!important}
  .target-preview.number-hard>.target-emoji,.target-preview.number-count>.target-emoji{padding:7px!important}
  .target-preview.number-count .counting-items{column-gap:8px!important;row-gap:7px!important;font-size:clamp(14px,3.3vh,20px)!important}
}

/* v68 — keep only useful learning information and emphasize the target word. */
.target-preview b:before,
.target-preview.object-hard b:before{content:none!important;display:none!important}
.target-preview .target-emoji small.number-word{
  width:100%!important;margin-top:12px!important;
  font-size:clamp(28px,3.1vw,48px)!important;font-weight:1000!important;
  line-height:1!important;letter-spacing:5px!important;color:#0b4778!important;
  white-space:nowrap!important
}
.target-preview.object-hard #targetArabic:after{
  content:"اقرأ الوصف";display:block;margin-top:5px;
  color:#bff4cf;font-size:clamp(11px,1vw,14px);font-weight:800
}
@media(orientation:landscape){
  .target-preview.number-count{grid-template-rows:auto minmax(48px,auto) minmax(190px,1fr)!important}
  .target-preview.number-count>div{min-height:48px!important;padding:4px 7px!important}
  .target-preview.number-count>div span{font-size:clamp(18px,1.45vw,24px)!important}
  .target-preview.number-count>div b{font-size:clamp(25px,2.25vw,36px)!important;letter-spacing:1px!important}
  .target-preview.number-count>.target-emoji{padding:15px!important}
  .target-preview.number-count .counting-items{column-gap:15px!important;row-gap:16px!important;font-size:clamp(18px,2.15vw,29px)!important}
}
@media(orientation:landscape) and (max-height:650px){
  .target-preview .target-emoji small.number-word{font-size:clamp(23px,5.3vh,36px)!important}
  .target-preview.number-count{grid-template-rows:auto minmax(40px,auto) minmax(125px,1fr)!important}
  .target-preview.number-count>div{min-height:40px!important}
  .target-preview.number-count>.target-emoji{padding:9px!important}
  .target-preview.number-count .counting-items{column-gap:10px!important;row-gap:10px!important;font-size:clamp(15px,3.5vh,22px)!important}
}

/* v71 final home-screen contract — intentionally last. */
.intro-start{display:block!important;margin:7px auto 0!important;padding:10px 24px!important;font-size:15px!important}
#start:not(.hidden){display:flex!important;flex-direction:column!important;align-items:center!important;gap:7px!important;width:min(92vw,760px)!important;max-height:calc(100dvh - 24px)!important;padding:12px 28px 14px!important;overflow:hidden!important}
#start .brand-hero{flex:none!important;width:190px!important;height:72px!important;margin:-5px auto -4px!important}
#start h1{flex:none!important;margin:0!important;font-size:clamp(32px,5vw,47px)!important;line-height:1.15!important}
#start .brand-tagline{flex:none!important;margin:0 0 3px!important;font-size:15px!important;line-height:1.25!important}
#start .grade-picker:has(.grade-hidden){display:flex!important;flex:none!important;min-width:112px!important;margin:2px auto 1px!important}
#start .grade-picker:has(.grade-hidden) button.selected{flex:0 0 104px!important;width:104px!important;min-height:0!important}
#start .grade-picker:has(.grade-hidden) button.selected img{width:64px!important;height:64px!important;margin:0 auto 4px!important}
#start .grade-picker:has(.grade-hidden) button.selected b{font-size:13px!important;line-height:1.1!important}
#start .grade-picker:has(.grade-hidden) button.selected small{font-size:8px!important;margin:2px 0 0!important}
#start .difficulty-info{flex:none!important;margin:1px auto 3px!important;padding:5px 14px!important;white-space:normal!important}
#start .difficulty-info b{display:inline-block!important;margin:0 6px 0 0!important}
#start .world-picker{flex:none!important;width:min(96%,600px)!important;margin:0 auto 2px!important;padding-top:20px!important}
#start .world-picker-title{top:0!important}
#start .world-carousel{height:132px!important;padding-top:17px!important;padding-bottom:4px!important}
#start .world-orb{flex-basis:88px!important;width:88px!important;height:112px!important}
#start .world-orb img{width:82px!important;height:82px!important}
#start #selectedWorldName{margin-top:3px!important}
#start #play,#start .achievements-button{vertical-align:middle!important;margin-top:2px!important}
#orientationToggle{top:14px!important;right:14px!important}
.placement-fab{top:78px!important;right:16px!important}
@media(orientation:landscape) and (max-height:650px){
  #start:not(.hidden){gap:3px!important;max-height:calc(100dvh - 10px)!important;padding:5px 22px 7px!important}
  #start .brand-hero{width:142px!important;height:38px!important;margin:-4px auto -2px!important}
  #start h1{font-size:25px!important}#start .brand-tagline{font-size:9px!important;margin:0!important}
  #start .grade-picker:has(.grade-hidden) button.selected img{width:38px!important;height:38px!important;margin-bottom:1px!important}
  #start .grade-picker:has(.grade-hidden) button.selected b{font-size:9px!important}
  #start .grade-picker:has(.grade-hidden) button.selected small{font-size:6px!important}
  #start .difficulty-info{padding:2px 9px!important;margin:0 auto 1px!important;font-size:7px!important}
  #start .world-picker{width:520px!important;padding-top:13px!important;margin:0 auto!important}
  #start .world-carousel{height:86px!important;padding-top:10px!important;padding-bottom:0!important}
  #start .world-orb{flex-basis:64px!important;width:64px!important;height:78px!important}#start .world-orb img{width:58px!important;height:58px!important}
  #start #play{padding:5px 20px!important;font-size:12px!important}#start .achievements-button{padding:4px 10px!important;font-size:8px!important}
  .placement-fab{top:62px!important;right:10px!important}
}

/* v82 LAST RULES: stage controls and the learning card never overlap. */
.target-preview{padding:82px 14px 18px!important;border-right:5px solid #72ead8!important;background:linear-gradient(165deg,#073d66f7,#082946f8 58%,#10545cf5)!important;box-shadow:12px 0 35px #001b2d99,inset -5px 0 0 #ffe16a55!important}
.target-preview:before{margin:0 0 8px!important;background:linear-gradient(#ff963d,#ec671f)!important;box-shadow:0 4px 0 #963b16!important}.target-preview>div{background:linear-gradient(145deg,#ffffff24,#4ee6c91a)!important;border:2px solid #ffffff2b!important}
.exam-visual .exam-animal-image{display:block!important;width:auto!important;height:auto!important;max-width:250px!important;max-height:190px!important;margin:auto!important;object-fit:contain!important}.exam-visual .exam-animal-fallback{display:grid!important;place-items:center!important;width:100%!important;min-height:145px!important;font-size:clamp(92px,11vw,148px)!important;line-height:1!important}.exam-visual .exam-animal-fallback[hidden]{display:none!important}
.challenge-article-image{display:block!important;width:min(190px,40vw)!important;height:150px!important;max-height:24vh!important;margin:8px auto 2px!important;object-fit:contain!important;filter:drop-shadow(0 8px 9px #052d4c44)!important}
.target-preview img[src*="curriculum/animal-parts"]{width:82%!important;height:82%!important;object-fit:contain!important;margin:auto!important;filter:drop-shadow(0 10px 10px #06243b33)!important}
@media(orientation:portrait){.target-preview{padding:12px!important}}
@media(orientation:landscape) and (max-height:650px){.target-preview{padding:64px 10px 12px!important}.target-preview:before{margin-bottom:4px!important}}

/* v95 — final curriculum layout contract. Keep these rules last. */
.lesson-card .safe-nav{
  position:static!important;inset:auto!important;order:99!important;
  margin:18px 0 4px!important;padding:0!important;background:transparent!important
}
.lesson-card{overflow:auto!important;overscroll-behavior:contain!important}
.lesson-words{flex:none!important}
.lesson-media img{width:96%!important;height:96%!important;max-width:170px!important;max-height:115px!important;object-fit:contain!important}
.lesson-concept-icon{width:100%!important;height:100%!important;max-width:170px!important;max-height:115px!important;font-size:clamp(36px,5vw,72px)!important;border:0!important;background:transparent!important;overflow:visible!important}
.array-model{
  display:grid!important;
  grid-template-columns:repeat(var(--cols),minmax(15px,23px))!important;
  grid-template-rows:repeat(var(--rows),minmax(15px,23px))!important;
  grid-auto-flow:row!important;width:max-content!important;height:max-content!important;
  max-width:100%!important;gap:7px!important;margin:auto!important;overflow:visible!important
}
.array-model i{display:block!important;width:100%!important;height:100%!important;min-width:15px!important;min-height:15px!important}
#targetEnglish:has(.spelling-line){display:flex!important;flex-direction:column!important;gap:10px!important;align-items:center!important}
#targetEnglish .spelling-line{display:flex!important;flex-wrap:nowrap!important;justify-content:center!important;gap:clamp(6px,1.2vw,13px)!important;width:100%!important}
#targetEnglish .spelling-line i{font-style:normal!important;line-height:1!important}
.target-preview img[src*="curriculum/animal-parts"]{width:96%!important;height:96%!important;max-width:300px!important;max-height:260px!important}
@media(orientation:portrait){
  .lesson-card{max-height:calc(100dvh - 24px)!important;padding-bottom:14px!important}
  .lesson-words{padding-bottom:4px!important}
  .lesson-media img{max-width:150px!important;max-height:105px!important}
  .lesson-concept-icon{max-width:150px!important;max-height:105px!important}
  .lesson-card .safe-nav{margin-top:14px!important}
}

/* v96: one stage-only layout contract. Lessons and quizzes remain unchanged. */
#gradePlaque,.grade-plaque{display:none!important}
.target-preview.number-hard{grid-template-rows:auto minmax(50px,auto) minmax(0,1fr)!important}
.target-preview.number-hard>.target-emoji{padding:10px 14px!important;background:linear-gradient(145deg,#fffdf0,#e4faef)!important;border:0!important;border-radius:25px!important;overflow:visible!important}
.target-preview .stage-math-model{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;min-height:0!important;gap:10px!important;overflow:visible!important}
.target-preview .stage-math-model>small{width:100%!important;margin:0!important;color:#15517b!important;font-size:clamp(11px,1.25vw,18px)!important;font-weight:900!important;line-height:1.1!important;letter-spacing:.3px!important;text-align:center!important}
.target-preview .stage-math-model>.number-equation{order:2!important;width:100%!important;margin:0!important;color:#123d78!important;font-size:clamp(25px,3.25vw,48px)!important;line-height:1!important;text-align:center!important}
.target-preview .stage-fraction-model>.fraction-model{order:1!important;flex:none!important;width:72px!important;height:72px!important;margin:0!important;border:4px solid #fff!important;border-radius:50%!important;background:#ffd936!important;box-shadow:0 5px 0 #0b8290,0 0 0 3px #28b9b1!important;overflow:hidden!important}
.target-preview .stage-fraction-model>.number-equation{margin-top:2px!important}
.target-preview .stage-array-model{gap:9px!important}
.target-preview .stage-array-model>.array-model{order:1!important;grid-template-columns:repeat(var(--cols),22px)!important;grid-template-rows:repeat(var(--rows),22px)!important;gap:7px 9px!important;max-height:none!important;margin:0!important;overflow:visible!important}
.target-preview .stage-array-model>.number-equation{order:2!important}
.target-preview .money-exact.money-only{min-height:80px!important;max-height:120px!important;padding:8px 4px!important;overflow:visible!important}
.target-preview .money-exact.money-only .money-note{height:74px!important;max-width:170px!important;overflow:visible!important}
.target-preview .money-exact.money-only .money-note img{width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;object-position:center!important}
.target-preview .data-count-model{display:grid!important;grid-template-columns:repeat(5,minmax(34px,1fr))!important;grid-auto-rows:minmax(34px,52px)!important;width:min(100%,470px)!important;gap:10px 14px!important;align-items:center!important;justify-items:center!important;overflow:visible!important}
.target-preview .data-count-model i{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;overflow:visible!important}
.target-preview .data-count-model img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;border:0!important;box-shadow:none!important;background:transparent!important}
.target-preview .data-count-model span{display:block!important;font-size:clamp(28px,3.2vw,48px)!important;line-height:1!important;overflow:visible!important}
@media(orientation:portrait){
  .target-preview.number-hard{height:250px!important;grid-template-rows:auto 44px minmax(0,1fr)!important}
  .target-preview.number-hard>.target-emoji{padding:7px 10px!important}
  .target-preview .stage-math-model{gap:6px!important}
  .target-preview .stage-fraction-model>.fraction-model{width:54px!important;height:54px!important}
  .target-preview .stage-array-model>.array-model{grid-template-columns:repeat(var(--cols),16px)!important;grid-template-rows:repeat(var(--rows),16px)!important;gap:4px 6px!important}
  .target-preview .stage-math-model>.number-equation{font-size:clamp(25px,7vw,37px)!important}
  .target-preview .money-exact.money-only{min-height:62px!important;max-height:82px!important}
  .target-preview .money-exact.money-only .money-note{height:58px!important}
  .target-preview .data-count-model{grid-template-columns:repeat(5,minmax(25px,1fr))!important;grid-auto-rows:minmax(25px,38px)!important;gap:7px 10px!important}
}

/* v97 final cascade guard. */
.target-preview.number-fraction>.target-emoji{flex:1 1 auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
.target-preview .stage-fraction-model,.target-preview .stage-array-model{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;
  grid-auto-flow:row!important;align-items:center!important;justify-items:center!important;
  width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important
}
.target-preview .stage-fraction-model>.fraction-model,.target-preview .stage-array-model>.array-model{
  grid-column:1!important;grid-row:1!important;align-self:center!important;justify-self:center!important;margin:0 auto!important
}
.target-preview .stage-fraction-model>.stage-question,.target-preview .stage-array-model>.stage-question{
  grid-column:1!important;grid-row:2!important;align-self:end!important;justify-self:center!important;
  width:100%!important;margin:6px auto 0!important;text-align:center!important
}
.target-preview .stage-fraction-model>.fraction-model{
  display:flex!important;width:min(62%,230px)!important;height:82px!important;max-width:230px!important;max-height:82px!important;
  border:4px solid #188a9a!important;border-radius:46px!important;background:#f8fbef!important;
  box-shadow:0 5px 0 #0b637d!important;overflow:hidden!important
}
.target-preview .stage-fraction-model>.fraction-model i{
  display:block!important;flex:1 1 0!important;width:auto!important;height:100%!important;
  border:0!important;border-right:3px solid #188a9a!important;background:#f8fbef!important
}
.target-preview .stage-fraction-model>.fraction-model i:last-child{border-right:0!important}
.target-preview .stage-fraction-model>.fraction-model i.filled{background:#ffd94f!important}
.target-preview .stage-array-model>.array-model{
  width:max-content!important;height:max-content!important;max-width:72%!important;max-height:150px!important;
  place-content:center!important;overflow:visible!important
}
@media(orientation:portrait){
  .target-preview .stage-fraction-model>.fraction-model{width:min(58%,205px)!important;height:68px!important;max-height:68px!important}
  .target-preview .stage-array-model>.array-model{max-width:68%!important;max-height:132px!important}
  .target-preview .stage-fraction-model>.stage-question,.target-preview .stage-array-model>.stage-question{margin-top:4px!important}
}

/* v98 mobile-only Grade 2 fractions and arrays. Desktop is intentionally ignored. */
@media(max-width:760px){
  .target-preview.number-fraction>.target-emoji{
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:250px!important;min-height:250px!important;max-height:250px!important;
    padding:12px 16px!important;overflow:hidden!important
  }
  .target-preview.number-fraction .stage-fraction-model,
  .target-preview.number-fraction .stage-array-model{
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;
    gap:10px!important;margin:0!important;padding:0!important;overflow:hidden!important
  }
  .target-preview.number-fraction .stage-fraction-art{
    display:block!important;order:1!important;flex:0 0 auto!important;
    width:132px!important;height:132px!important;max-width:132px!important;max-height:132px!important;
    margin:0 auto!important;padding:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;object-fit:contain!important
  }
  .target-preview.number-fraction .stage-array-model>.array-model{
    display:grid!important;order:1!important;flex:0 0 auto!important;
    grid-template-columns:repeat(var(--cols),20px)!important;
    grid-template-rows:repeat(var(--rows),20px)!important;
    width:max-content!important;height:max-content!important;max-width:78%!important;max-height:132px!important;
    gap:7px!important;margin:0 auto!important;padding:0!important;
    place-content:center!important;align-self:center!important;justify-self:center!important;overflow:visible!important
  }
  .target-preview.number-fraction .stage-array-model>.array-model i{
    display:block!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;
    aspect-ratio:1!important;border-radius:7px!important;background:linear-gradient(145deg,#315c92,#102e62)!important;
    box-shadow:inset 0 0 0 2px #ffdd68,0 3px 0 #0b234c!important
  }
  .target-preview.number-fraction .stage-question{
    display:block!important;order:2!important;flex:0 0 auto!important;
    width:100%!important;min-height:30px!important;margin:0 auto!important;padding:0 4px!important;
    color:#123d78!important;font:1000 25px/1.1 sans-serif!important;letter-spacing:0!important;
    text-align:center!important;white-space:normal!important;overflow:visible!important
  }
}

/* v103 — mobile English stage art. Keep this contract last so the older
   responsive rules cannot shrink emoji teaching art back to caption size. */
@media (orientation:portrait) and (max-width:760px){
  .target-preview[data-word]>.target-emoji:not(.hidden){
    display:grid!important;place-items:center!important;
    width:100%!important;height:100%!important;padding:0!important;
    overflow:visible!important
  }
  .target-preview[data-word]>.target-emoji:not(.hidden)>.target-art-icon{
    display:block!important;width:auto!important;height:auto!important;
    max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;
    font-size:clamp(92px,25vw,132px)!important;line-height:1!important;
    transform:none!important;overflow:visible!important
  }
}

/* v140 — Lesson 19 uses transparent character art. Keep every character
   directly on the game surface, with enough fixed room for both labels. */
.describing-people-lesson .lesson-words>button.describing-people-card{
  overflow:hidden!important;grid-template-rows:126px 30px 45px 21px!important;
  row-gap:2px!important;padding:6px!important
}
.describing-people-lesson .lesson-words>button.describing-people-card .lesson-media{
  min-height:126px!important;max-height:126px!important;padding:0!important;
  background:transparent!important;border:0!important;box-shadow:none!important
}
.describing-people-lesson .lesson-words>button.describing-people-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:126px!important;max-height:126px!important;
  object-fit:contain!important;object-position:center bottom!important;transform:none!important
}
.describing-people-lesson .lesson-words>button.describing-people-card b{
  min-height:30px!important;padding:2px!important;font-size:clamp(12px,3.2vw,17px)!important;line-height:1.05!important
}
.describing-people-lesson .lesson-words>button.describing-people-card .lesson-note{
  min-height:45px!important;margin:0 3px!important;padding:5px 4px!important;
  font-size:clamp(9px,2.4vw,12px)!important;line-height:1.15!important;white-space:normal!important
}
.describing-people-lesson .lesson-words>button.describing-people-card small{
  display:block!important;min-height:21px!important;font-size:9px!important;line-height:17px!important
}
.target-preview.describing-people-stage>#targetImage{
  object-fit:contain!important;object-position:center bottom!important;clip-path:none!important;
  background:transparent!important;border:0!important;box-shadow:none!important
}
@media (orientation:portrait) and (max-width:760px){
  #lessonScreen.describing-people-lesson .lesson-words{grid-auto-rows:214px!important;padding-bottom:18px!important}
  #lessonScreen.describing-people-lesson .lesson-words>button.describing-people-card{
    min-height:214px!important;height:214px!important;grid-template-rows:120px 28px 43px 19px!important;
    row-gap:2px!important;padding:5px!important
  }
  #lessonScreen.describing-people-lesson .lesson-words>button.describing-people-card .lesson-media{
    width:120px!important;height:120px!important;min-height:120px!important;max-height:120px!important;margin:auto!important
  }
  #lessonScreen.describing-people-lesson .lesson-words>button.describing-people-card .lesson-media img{
    display:block!important;width:120px!important;height:120px!important;max-width:120px!important;max-height:120px!important;margin:auto!important
  }
  #lessonScreen.describing-people-lesson .lesson-words>button.describing-people-card b{
    min-height:30px!important;max-height:30px!important;font-size:12px!important;line-height:14px!important;
    white-space:normal!important;-webkit-line-clamp:2!important
  }
  #lessonScreen.describing-people-lesson .lesson-words>button.describing-people-card .lesson-note{
    min-height:45px!important;max-height:45px!important;margin:0!important;padding:4px 2px!important;
    font-size:10px!important;line-height:12px!important;white-space:normal!important;-webkit-line-clamp:3!important
  }
  #app:has(.target-preview.describing-people-stage:not(.hidden)) #exitStage,
  #app:has(.target-preview.describing-people-stage:not(.hidden)) #helpStage,
  #app:has(.target-preview.describing-people-stage:not(.hidden)) #repeatStage,
  #app:has(.target-preview.describing-people-stage:not(.hidden)) #sound{
    position:fixed!important;top:max(58px,calc(env(safe-area-inset-top) + 18px))!important;z-index:180!important
  }
  .target-preview.describing-people-stage{
    top:112px!important;height:190px!important;max-height:190px!important;
    grid-template-columns:136px minmax(0,1fr)!important;padding:10px!important
  }
  .target-preview.describing-people-stage>#targetImage{
    justify-self:center!important;align-self:center!important;width:127px!important;height:127px!important;
    max-width:127px!important;max-height:127px!important;margin:0!important;padding:0!important
  }
  .target-preview.describing-people-stage>div{min-width:0!important;padding:6px!important}
  .target-preview.describing-people-stage #targetArabic{font-size:clamp(12px,3.2vw,16px)!important;line-height:1.08!important}
  .target-preview.describing-people-stage #targetEnglish{
    display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;
    max-height:48px!important;font-size:clamp(15px,4vw,20px)!important;line-height:1!important;letter-spacing:2px!important
  }
}

/* v141 — the people quiz uses three short one-word answers in one row. */
#examScreen.describing-people-exam .exam-choices{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important
}
#examScreen.describing-people-exam .exam-choices button{
  min-height:58px!important;padding:6px 2px!important;font-size:clamp(13px,3.8vw,20px)!important;
  white-space:nowrap!important;overflow:hidden!important
}
#examScreen.describing-people-exam .exam-visual img{
  max-height:173px!important;transform:scale(1.15);transform-origin:center bottom
}

/* v145 — the 30-question final exam records one choice and moves on without
   revealing correctness. Only the save/exit control remains during the test. */
#examScreen.final-english-exam #examNext{display:none!important}
#examScreen.final-english-exam .exam-actions{grid-template-columns:1fr!important;margin-top:10px!important}
#examScreen.final-english-exam .exam-head small{font-size:0!important}
#examScreen.final-english-exam .exam-head small::after{content:'FINAL ASSESSMENT';font-size:11px!important}
#examScreen.final-english-exam .exam-choices button:disabled{opacity:1!important;filter:none!important}
#examScreen.final-english-exam .exam-visual img.final-exam-image{
  display:block!important;width:auto!important;height:auto!important;max-width:90%!important;
  max-height:180px!important;object-fit:contain!important;transform:scale(1.2)!important;
  transform-origin:center!important;margin:auto!important
}
#examScreen.final-english-exam .exam-choices button{
  font-size:var(--option-size,clamp(16px,4.5vw,22px))!important;
  white-space:nowrap!important;overflow-wrap:normal!important;word-break:keep-all!important
}
#examScreen.final-english-exam .exam-choices button:last-child:nth-child(odd){
  grid-column:1/-1!important;width:calc(50% - 4px)!important;justify-self:center!important
}
.final-exam-node{background:linear-gradient(145deg,#fff4aa,#ffbf3e)!important;border-color:#fff0a0!important}
.final-exam-node>span{font-size:42px!important}
#examRetry{display:block;width:100%;min-height:49px;margin:10px 0;border:0;border-radius:18px;background:linear-gradient(#6beac9,#20b99b);color:#073c57;font-weight:1000;font-size:16px;box-shadow:0 5px 0 #087c70}
#examRetry.hidden{display:none!important}
.final-exam-result .exam-review{max-height:30dvh!important;text-align:left!important;direction:ltr!important}
.final-exam-result .exam-review span{display:block!important;margin:5px 0!important;padding:7px!important;font-size:12px!important;line-height:1.2!important}

/* v104 — mobile English reliability. Keep quiz/result navigation in the first
   phone viewport without changing the stage canvas or desktop layout. */
@media (orientation:portrait) and (max-width:760px){
  #examScreen,#examResult{padding:5px!important;overflow:hidden!important;align-items:center!important}
  .exam-card,.exam-result-card{
    display:flex!important;flex-direction:column!important;
    width:min(96vw,520px)!important;height:calc(100dvh - 10px)!important;
    max-height:calc(100dvh - 10px)!important;padding:12px 14px!important;
    border-width:5px!important;border-radius:28px!important;overflow:hidden!important
  }
  .exam-head{grid-template-columns:38px minmax(0,1fr) auto!important;gap:7px!important}
  .exam-head span{font-size:clamp(23px,7vw,31px)!important;line-height:.95!important}
  .exam-head b{font-size:19px!important}.exam-meter{margin:8px 0!important;height:12px!important}
  #examPrompt{min-height:0!important;margin:4px 0 7px!important;font-size:clamp(19px,5.7vw,25px)!important;line-height:1.08!important}
  .exam-card-body{display:flex!important;flex:1 1 auto!important;min-height:0!important;flex-direction:column!important}
  .exam-visual{flex:1 1 auto!important;min-height:90px!important;max-height:34dvh!important;margin:3px 0 8px!important;overflow:hidden!important}
  .exam-visual img{width:100%!important;height:100%!important;max-height:34dvh!important;object-fit:contain!important}
  .exam-choices{flex:0 0 auto!important;gap:8px!important}.exam-choices button{min-height:51px!important;font-size:20px!important;padding:5px!important}
  .exam-actions{position:static!important;display:grid!important;flex:0 0 auto!important;margin-top:10px!important;padding:0!important}
  .exam-actions button{min-height:46px!important}
  .exam-result-card .exam-medal{font-size:40px!important}.exam-result-card h2{margin:3px 0!important;font-size:25px!important}
  .exam-score{margin:4px auto!important;padding:5px 12px!important;font-size:28px!important}.exam-result-card p{margin:4px!important;font-size:16px!important}
  .exam-review{flex:1 1 auto!important;min-height:0!important;max-height:none!important;margin:5px 0!important;overflow:auto!important}
  .exam-result-card .exam-actions{margin-top:7px!important}
}

/* v145 — use the actually visible Android browser viewport. This prevents the
   final exam header from sitting behind the host browser toolbar. */
@media (orientation:portrait) and (max-width:760px){
  #examScreen.final-english-exam{
    inset:0!important;width:100vw!important;height:var(--app-height,100dvh)!important;
    min-height:0!important;place-items:start center!important;padding:5px!important
  }
  #examScreen.final-english-exam .exam-card{
    width:min(96vw,520px)!important;height:calc(var(--app-height,100dvh) - 10px)!important;
    max-height:calc(var(--app-height,100dvh) - 10px)!important;margin:0!important
  }
}

/* v111 — the ten-card listening lesson must pan on touch screens. The global
   game surface disables touch gestures for flying, so the lesson opts back in
   and keeps its controls visible while only the card grid scrolls. */
#lessonScreen{overflow:hidden!important;touch-action:pan-y!important}
#lessonScreen .lesson-card{
  display:grid!important;
  grid-template-rows:auto auto minmax(0,1fr) auto!important;
  width:min(1000px,95vw)!important;
  height:calc(100dvh - 24px)!important;
  max-height:calc(100dvh - 24px)!important;
  overflow:hidden!important;
  touch-action:pan-y!important
}
#lessonScreen .lesson-head{min-width:0!important;flex:0 0 auto!important}
#lessonScreen .lesson-head small{margin:0!important}
#lessonScreen #lessonLead{margin:6px auto 8px!important;line-height:1.12!important}
#lessonScreen .lesson-words{
  flex:none!important;min-height:0!important;max-height:none!important;
  margin:4px 0 10px!important;padding:2px 3px 10px!important;
  align-content:start!important;overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch;
  touch-action:pan-y!important;scrollbar-gutter:stable
}
#lessonScreen .lesson-card .safe-nav{
  position:static!important;inset:auto!important;order:initial!important;
  flex:0 0 auto!important;margin:0!important;padding:5px!important;
  background:#e5fff2!important
}
@media (orientation:portrait) and (max-width:760px){
  #lessonScreen{padding:5px!important}
  #lessonScreen .lesson-card{
    width:min(96vw,520px)!important;height:calc(100dvh - 10px)!important;
    max-height:calc(100dvh - 10px)!important;padding:10px 12px!important
  }
  #lessonScreen .lesson-words{grid-auto-rows:minmax(128px,auto)!important;gap:8px!important}
  #lessonScreen .lesson-card .safe-nav{gap:4px!important}
}

/* v113 — only Grade 2 English stages 31–50 reuse the compact portrait stage
   board. Uploaded art is contained inside the old 108px clue slot so the
   target letters and plane keep their full play area below the board. */
@media (orientation:portrait) and (max-width:760px){
  .target-preview.grade2-english-picture-stage{
    top:68px!important;left:10px!important;right:10px!important;bottom:auto!important;
    width:auto!important;height:190px!important;max-height:190px!important;
    transform:none!important;display:grid!important;
    grid-template-columns:minmax(0,30%) minmax(0,70%)!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    gap:0!important;padding:9px 10px!important;overflow:hidden!important
  }
  .target-preview.grade2-english-picture-stage:before{
    grid-column:1/-1!important;grid-row:1!important;justify-self:center!important;
    margin:0 0 6px!important
  }
  .target-preview.grade2-english-picture-stage>#targetImage{
    grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;
    display:block!important;width:108px!important;height:108px!important;
    min-width:0!important;min-height:0!important;max-width:100%!important;max-height:108px!important;
    margin:0!important;padding:4px!important;object-fit:contain!important;object-position:center!important;
    clip-path:none!important;border:0!important;border-radius:16px!important;
    background:transparent!important;box-shadow:none!important
  }
  .target-preview.grade2-english-picture-stage>div{
    grid-column:2!important;grid-row:2!important;align-self:center!important;
    width:100%!important;height:auto!important;max-height:100%!important;
    margin:0!important;padding:9px 4px!important;overflow:hidden!important
  }
}

/* v114 — paged plane hangar. One fixed-size card is shown at a time; arrows
   and native horizontal swiping move through owned and upcoming planes. */
.plane-fleet-carousel{
  display:grid!important;grid-template-columns:42px minmax(0,1fr) 42px!important;
  align-items:center!important;gap:7px!important;width:100%!important;margin:10px 0 2px!important
}
.plane-fleet{
  display:flex!important;grid-template-columns:none!important;gap:10px!important;
  width:100%!important;margin:0!important;overflow-x:auto!important;overflow-y:hidden!important;
  scroll-snap-type:x mandatory!important;scroll-behavior:smooth!important;
  overscroll-behavior-inline:contain!important;touch-action:pan-x!important;
  scrollbar-width:none!important
}
.plane-fleet::-webkit-scrollbar{display:none!important}
.plane-fleet button{
  flex:0 0 100%!important;scroll-snap-align:center!important;scroll-snap-stop:always!important;
  min-width:100%!important;min-height:88px!important;padding:7px 8px!important;transform:none!important
}
.plane-fleet button.selected{transform:none!important}
.plane-fleet button img{width:78px!important;height:62px!important;object-fit:contain!important}
.plane-fleet button b{font-size:11px!important}.plane-fleet button small{font-size:8px!important}
.plane-fleet-arrow{
  display:grid!important;place-items:center!important;width:42px!important;height:56px!important;
  min-width:0!important;padding:0!important;border-radius:16px!important;font-size:38px!important;
  line-height:1!important;color:#082d4e!important;background:linear-gradient(#75e7f1,#37a8c8)!important;
  box-shadow:0 5px 0 #17637e!important
}
.plane-fleet-arrow:disabled{opacity:.35!important;filter:grayscale(1)!important;transform:none!important}
.plane-fleet-position{min-height:16px!important;margin:2px 0 4px!important;color:#9bf4e5!important;font-size:10px!important;font-weight:900!important}

/* v129 — the next aircraft stays visibly under construction and cannot be
   selected until all five parts have been earned. Later aircraft remain
   locked behind it. */
.plane-fleet button.building{
  border-color:#ffe568!important;background:linear-gradient(#173f59,#0a2948)!important;
  box-shadow:0 0 0 3px #ffe56838,0 5px 0 #04152b!important
}
.plane-fleet button.building:after{content:"🔧"!important}
.plane-fleet button.building b{color:#ffe568!important}
.plane-fleet button.building small{color:#9bf4e5!important}
.plane-blueprint.locked-preview>img{filter:grayscale(.72) brightness(.8)!important;opacity:.9!important}
.plane-blueprint.building-preview{border-color:#ffe568!important}

/* v116 — Lesson 6 uses the established compact clue board. Sentence pieces
   wrap inside their own row, while the 640px source art is always contained. */
.sentence-lesson .lesson-words>button.sentence-card{
  grid-template-rows:minmax(82px,1fr) minmax(38px,auto) 20px!important;
  min-height:168px!important
}
.sentence-lesson .lesson-words>button.sentence-card .lesson-media{max-height:96px!important}
.sentence-lesson .lesson-words>button.sentence-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:118px!important;max-height:92px!important;
  object-fit:contain!important;object-position:center!important
}
.sentence-lesson .lesson-words>button.sentence-card b{
  display:block!important;min-height:36px!important;padding:2px 4px!important;
  font-size:clamp(10px,1.15vw,16px)!important;line-height:1.15!important;
  white-space:normal!important;overflow:visible!important;overflow-wrap:normal!important
}
.target-preview.sentence-builder-stage #targetEnglish.sentence-progress{
  display:flex!important;flex-flow:row wrap!important;align-items:center!important;justify-content:center!important;
  gap:5px!important;width:100%!important;max-width:100%!important;margin:0!important;
  padding:2px!important;letter-spacing:0!important;overflow:hidden!important
}
.target-preview.sentence-builder-stage #targetEnglish.sentence-progress>span{
  display:inline-grid!important;place-items:center!important;min-width:25px!important;min-height:25px!important;
  padding:3px 6px!important;border-radius:8px!important;background:#ffffff18!important;
  color:#fff!important;font-size:clamp(9px,1.05vw,14px)!important;line-height:1!important;
  letter-spacing:0!important;white-space:nowrap!important
}
.target-preview.sentence-builder-stage #targetEnglish.sentence-progress>span.placed{
  background:#fff7c8!important;color:#0a3158!important
}
.target-preview.sentence-builder-stage>#targetImage{
  object-fit:contain!important;object-position:center!important;clip-path:none!important
}
@media (orientation:portrait) and (max-width:760px){
  .target-preview.sentence-builder-stage{
    top:68px!important;left:10px!important;right:10px!important;bottom:auto!important;
    width:auto!important;height:190px!important;max-height:190px!important;transform:none!important;
    display:grid!important;grid-template-columns:minmax(0,30%) minmax(0,70%)!important;
    grid-template-rows:auto minmax(0,1fr)!important;gap:0!important;
    padding:9px 10px!important;overflow:hidden!important
  }
  .target-preview.sentence-builder-stage:before{
    grid-column:1/-1!important;grid-row:1!important;justify-self:center!important;margin:0 0 6px!important
  }
  .target-preview.sentence-builder-stage>#targetImage{
    grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;
    display:block!important;width:108px!important;height:108px!important;max-width:100%!important;max-height:108px!important;
    margin:0!important;padding:4px!important;border:0!important;border-radius:16px!important;
    background:transparent!important;box-shadow:none!important
  }
  .target-preview.sentence-builder-stage>div{
    grid-column:2!important;grid-row:2!important;align-self:center!important;
    width:100%!important;height:112px!important;max-height:112px!important;margin:0!important;
    padding:7px 4px!important;overflow:hidden!important
  }
  .target-preview.sentence-builder-stage #targetArabic{font-size:13px!important;line-height:1!important}
  .target-preview.sentence-builder-stage #targetEnglish.sentence-progress>span{
    min-width:22px!important;min-height:22px!important;padding:3px 5px!important;font-size:10px!important
  }
  .sentence-lesson .lesson-words{grid-auto-rows:minmax(174px,auto)!important}
}

/* v117 — sentence answers stay silent until solved, and hangar navigation is
   always visible on a phone-sized viewport. */
#repeatStage:disabled{
  opacity:.42!important;filter:grayscale(1)!important;cursor:not-allowed!important;
  box-shadow:0 3px 0 #4b5964!important
}
.hangar-card{
  width:min(94vw,540px)!important;max-height:calc(100dvh - 10px)!important;
  overflow:hidden!important;display:flex!important;flex-direction:column!important
}
.hangar-actions{
  flex:0 0 auto!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;width:100%!important;margin:5px 0 0!important;padding:5px!important;
  background:#092849!important;border-radius:16px!important
}
.hangar-actions button{min-width:0!important;min-height:44px!important;padding:7px 2px!important;font-size:clamp(8px,2.35vw,11px)!important;white-space:nowrap!important}
@media (orientation:portrait) and (max-width:760px){
  #hangarPopup{padding:5px!important;overflow:hidden!important}
  .hangar-card{height:calc(100dvh - 10px)!important;padding:9px 11px!important}
  .hangar-card .hangar-title{font-size:13px!important;line-height:1!important}
  .hangar-card h2{font-size:clamp(22px,6vw,30px)!important;line-height:1!important;margin:4px 0!important}
  .hangar-card>p{font-size:12px!important;line-height:1.1!important;margin:2px 0 5px!important}
  .hangar-card .plane-blueprint{flex:1 1 145px!important;min-height:125px!important;max-height:175px!important;margin:5px 0!important}
  .hangar-card .plane-blueprint>img{width:118px!important;height:118px!important}
  .hangar-card .plane-collection-progress{min-height:15px!important;margin:3px 0!important;font-size:9px!important;line-height:1.1!important}
  .hangar-card .plane-fleet-carousel{margin:5px 0 1px!important}
  .hangar-card .plane-fleet button{min-height:76px!important;padding:4px 7px!important}
  .hangar-card .plane-fleet button img{width:68px!important;height:48px!important}
  .hangar-card .plane-fleet-position{min-height:12px!important;margin:1px 0!important;font-size:8px!important}
  .hangar-card .paint-label{margin-top:3px!important;font-size:9px!important}
  .hangar-card .paint-row{margin:5px 10px 6px!important}
  .hangar-card .paint-row button{width:34px!important;height:34px!important}
}

/* v118 — Lesson 7 keeps the proven compact clue board and limits every round
   to five large letter targets.  The source art is always contained and the
   two missing positions remain readable without pushing the plane downward. */
.missing-letters-lesson .lesson-words>button.missing-card{
  grid-template-rows:minmax(82px,1fr) auto auto 20px!important;
  min-height:178px!important
}
.missing-letters-lesson .lesson-words>button.missing-card .lesson-media{max-height:92px!important}
.missing-letters-lesson .lesson-words>button.missing-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:118px!important;max-height:90px!important;
  object-fit:contain!important;object-position:center!important
}
.missing-letters-lesson .lesson-words>button.missing-card .lesson-note{
  display:block!important;min-height:24px!important;margin:1px 4px!important;padding:3px 5px!important;
  border-radius:8px!important;background:#dff3e8!important;color:#155948!important;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace!important;font-size:clamp(13px,1.5vw,18px)!important;
  font-style:normal!important;font-weight:900!important;line-height:1!important;letter-spacing:3px!important
}
.target-preview.missing-letters-stage>#targetImage{
  object-fit:contain!important;object-position:center!important;clip-path:none!important
}
.target-preview.missing-letters-stage #targetEnglish.missing-word-progress{
  display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:nowrap!important;
  gap:3px!important;width:100%!important;max-width:100%!important;margin:0!important;padding:4px!important;
  letter-spacing:0!important;white-space:nowrap!important;overflow:hidden!important
}
.target-preview.missing-letters-stage #targetEnglish.missing-word-progress>i{
  display:inline-grid!important;place-items:center!important;min-width:18px!important;height:32px!important;
  padding:2px!important;border-radius:7px!important;font-style:normal!important;font-size:clamp(13px,1.7vw,24px)!important;
  font-weight:950!important;line-height:1!important;letter-spacing:0!important
}
.target-preview.missing-letters-stage #targetEnglish.missing-word-progress>i.given-letter{
  background:#ffffff18!important;color:#fff!important
}
.target-preview.missing-letters-stage #targetEnglish.missing-word-progress>i.missing-slot{
  color:#ffe057!important;border-bottom:3px solid #ffe057!important;background:#091e3599!important
}
.target-preview.missing-letters-stage #targetEnglish.missing-word-progress>i.filled-missing{
  color:#082d4e!important;background:#fff3a8!important;border-bottom:3px solid #65d7b5!important
}
.missing-pair-choice strong{font-size:clamp(24px,4vw,42px)!important;letter-spacing:3px!important}
@media (orientation:portrait) and (max-width:760px){
  .target-preview.missing-letters-stage{
    top:68px!important;left:10px!important;right:10px!important;bottom:auto!important;
    width:auto!important;height:190px!important;max-height:190px!important;transform:none!important;
    display:grid!important;grid-template-columns:minmax(0,30%) minmax(0,70%)!important;
    grid-template-rows:auto minmax(0,1fr)!important;gap:0!important;
    padding:9px 10px!important;overflow:hidden!important
  }
  .target-preview.missing-letters-stage:before{
    grid-column:1/-1!important;grid-row:1!important;justify-self:center!important;margin:0 0 6px!important
  }
  .target-preview.missing-letters-stage>#targetImage{
    grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;
    display:block!important;width:108px!important;height:108px!important;max-width:100%!important;max-height:108px!important;
    margin:0!important;padding:4px!important;border:0!important;border-radius:16px!important;
    background:transparent!important;box-shadow:none!important
  }
  .target-preview.missing-letters-stage>div{
    grid-column:2!important;grid-row:2!important;align-self:center!important;
    width:100%!important;height:112px!important;max-height:112px!important;margin:0!important;
    padding:7px 3px!important;overflow:hidden!important
  }
  .target-preview.missing-letters-stage #targetArabic{font-size:12px!important;line-height:1!important}
  .target-preview.missing-letters-stage #targetEnglish.missing-word-progress{gap:2px!important;padding:3px 0!important}
  .target-preview.missing-letters-stage #targetEnglish.missing-word-progress>i{
    min-width:16px!important;height:29px!important;padding:1px!important;font-size:clamp(11px,3.7vw,17px)!important
  }
  .missing-letters-lesson .lesson-words{grid-auto-rows:minmax(178px,auto)!important}
}

/* v120 — replacement art uses the same compact portrait board as the proven
   earlier stages. The image and spelling panel stay centered inside row two
   instead of inheriting a 230px image height that clips below the frame. */
#lessonScreen.kg1-lesson.missing-letters-lesson .lesson-words{
  grid-auto-rows:minmax(142px,auto)!important;
  gap:7px!important
}
#lessonScreen.kg1-lesson.missing-letters-lesson .lesson-words>button.missing-card{
  min-height:142px!important;
  height:142px!important;
  padding:5px!important;
  overflow:hidden!important;
  grid-template-rows:70px auto auto!important
}
#lessonScreen.kg1-lesson.missing-letters-lesson .lesson-words>button.missing-card .lesson-media{max-height:70px!important}
#lessonScreen.kg1-lesson.missing-letters-lesson .lesson-words>button.missing-card .lesson-media img{
  max-width:102px!important;
  max-height:68px!important;
  object-fit:contain!important;
  object-position:center!important
}
#lessonScreen.kg1-lesson.missing-letters-lesson .lesson-words>button.missing-card b{
  font-size:clamp(13px,2vw,18px)!important;
  line-height:1!important
}
#lessonScreen.kg1-lesson.missing-letters-lesson .lesson-words>button.missing-card .lesson-note{
  min-height:20px!important;
  font-size:clamp(11px,1.6vw,15px)!important;
  line-height:1!important
}
.world-carousel{
  overflow-x:hidden!important;overflow-y:hidden!important;scroll-snap-type:none!important;
  touch-action:pan-y!important;overscroll-behavior:contain!important;
  user-select:none!important;-webkit-user-select:none!important
}
@media (orientation:portrait) and (max-width:760px){
  .target-preview.replacement-art-stage{
    top:68px!important;left:10px!important;right:10px!important;bottom:auto!important;
    width:auto!important;height:190px!important;max-height:190px!important;transform:none!important;
    display:grid!important;grid-template-columns:minmax(0,30%) minmax(0,70%)!important;
    grid-template-rows:auto minmax(0,1fr)!important;gap:0!important;
    padding:9px 10px!important;overflow:hidden!important
  }
  .target-preview.replacement-art-stage:before{
    grid-column:1/-1!important;grid-row:1!important;align-self:start!important;justify-self:center!important;
    margin:0 0 6px!important
  }
  .target-preview.replacement-art-stage>#targetImage{
    grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;
    display:block!important;width:108px!important;height:108px!important;
    min-width:0!important;min-height:0!important;max-width:108px!important;max-height:108px!important;
    margin:0!important;padding:4px!important;object-fit:contain!important;object-position:center!important;
    clip-path:none!important;border:0!important;border-radius:16px!important;
    background:transparent!important;box-shadow:none!important
  }
  .target-preview.replacement-art-stage>div{
    grid-column:2!important;grid-row:2!important;align-self:center!important;justify-self:stretch!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:108px!important;max-height:108px!important;
    margin:0!important;padding:7px 4px!important;overflow:hidden!important
  }
  .target-preview.replacement-art-stage #targetArabic,
  .target-preview.replacement-art-stage #targetEnglish{margin:0!important;line-height:1.05!important}
}

/* v122 — Lesson 8 keeps the proven compact board and offers only two large
   THIS / THESE targets. Every uploaded image is contained without cropping,
   leaving the answer row, flight path, and plane fully visible below it. */
.demonstratives-lesson .lesson-words>button.demonstrative-card{
  grid-template-rows:minmax(82px,1fr) 28px minmax(38px,auto) 20px!important;
  min-height:178px!important
}
.demonstratives-lesson .lesson-words>button.demonstrative-card .lesson-media{max-height:92px!important}
.demonstratives-lesson .lesson-words>button.demonstrative-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:124px!important;max-height:90px!important;
  object-fit:contain!important;object-position:center!important
}
.demonstratives-lesson .lesson-words>button.demonstrative-card b{
  color:#b64c13!important;font-size:clamp(18px,2vw,25px)!important;letter-spacing:1px!important
}
.demonstratives-lesson .lesson-words>button.demonstrative-card .lesson-note{
  display:block!important;min-height:34px!important;margin:1px 4px!important;padding:4px 6px!important;
  border-radius:9px!important;background:#dff3e8!important;color:#155948!important;
  font-size:clamp(9px,1vw,13px)!important;font-style:normal!important;font-weight:900!important;
  line-height:1.15!important;white-space:normal!important
}
.target-preview.demonstratives-stage>#targetImage{
  object-fit:contain!important;object-position:center!important;clip-path:none!important
}
.target-preview.demonstratives-stage #targetEnglish{
  display:grid!important;place-items:center!important;width:100%!important;margin:0!important;padding:4px!important;
  color:#ffe057!important;font-size:clamp(19px,2.2vw,31px)!important;line-height:1.12!important;
  letter-spacing:.4px!important;text-transform:none!important;white-space:normal!important;overflow:hidden!important
}
@media (orientation:portrait) and (max-width:760px){
  .target-preview.demonstratives-stage{
    top:68px!important;left:10px!important;right:10px!important;bottom:auto!important;
    width:auto!important;height:190px!important;max-height:190px!important;transform:none!important;
    display:grid!important;grid-template-columns:minmax(0,30%) minmax(0,70%)!important;
    grid-template-rows:auto minmax(0,1fr)!important;gap:0!important;
    padding:9px 10px!important;overflow:hidden!important
  }
  .target-preview.demonstratives-stage:before{
    grid-column:1/-1!important;grid-row:1!important;justify-self:center!important;margin:0 0 6px!important
  }
  .target-preview.demonstratives-stage>#targetImage{
    grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;
    display:block!important;width:108px!important;height:108px!important;min-width:0!important;min-height:0!important;
    max-width:108px!important;max-height:108px!important;margin:0!important;padding:4px!important;
    object-fit:contain!important;object-position:center!important;clip-path:none!important;border:0!important;
    border-radius:16px!important;background:#f5f5f2!important;box-shadow:none!important
  }
  .target-preview.demonstratives-stage>div{
    grid-column:2!important;grid-row:2!important;align-self:center!important;justify-self:stretch!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:108px!important;max-height:108px!important;margin:0!important;
    padding:6px 4px!important;overflow:hidden!important
  }
  .target-preview.demonstratives-stage #targetArabic{font-size:12px!important;line-height:1!important}
  .target-preview.demonstratives-stage #targetEnglish{font-size:clamp(17px,5vw,24px)!important;line-height:1.08!important}
  .demonstratives-lesson .lesson-words{grid-auto-rows:minmax(178px,auto)!important}
}

/* v124 — Lesson 9 reuses the compact demonstratives contract while making
   distance visible. Art stays fully contained and the board remains 190px so
   the two large answer targets, flight path, and plane keep their space. */
.far-demonstratives-lesson .lesson-media{
  position:relative!important;border:2px dashed #62cdb9!important;border-radius:15px!important;
  background:radial-gradient(circle at 50% 58%,#fff 0 28%,#dff5ef 62%,#b8e7dc 100%)!important;
  overflow:hidden!important
}
.far-demonstratives-lesson .lesson-media:after{
  content:'↗ FAR AWAY';position:absolute;right:5px;bottom:4px;padding:2px 5px;border-radius:8px;
  background:#07546ed9;color:#fff;font-size:8px;font-weight:1000;letter-spacing:.4px
}
.far-demonstratives-lesson .lesson-media img{transform:scale(.88)!important;transform-origin:center!important}
.target-preview.far-demonstratives-stage>#targetImage{
  padding:6px!important;border:2px dashed #75e6d4!important;
  background:radial-gradient(circle,#fff 0 34%,#dff5ef 68%,#a7ded2 100%)!important;
  transform:scale(.91)!important;transform-origin:center!important
}

/* v125 — demonstrative answers stay as whole words inside the square zone
   buttons. This selector is isolated from numbers and picture answers. */
.challenge-choice.demonstrative-choice strong{
  display:block!important;max-width:100%!important;font-size:clamp(22px,6vw,34px)!important;
  line-height:1!important;letter-spacing:0!important;white-space:nowrap!important;
  overflow-wrap:normal!important;word-break:keep-all!important
}

/* v128 — keep Lesson 11 speech natural and its long questions unobstructed.
   Only Do / Does art is reduced by ten percent; earlier grammar layouts stay
   unchanged. */
.do-does-lesson .lesson-media img{
  transform:scale(.9)!important;transform-origin:center!important
}
.can-cant-lesson .lesson-media img{
  transform:scale(.81)!important;transform-origin:center!important
}
@media (orientation:portrait) and (max-width:760px){
  .target-preview.do-does-stage>#targetImage,
  .target-preview.can-cant-stage>#targetImage{
    width:97px!important;height:97px!important;max-width:97px!important;max-height:97px!important
  }
  .target-preview.can-cant-stage>#targetImage{
    width:87px!important;height:87px!important;max-width:87px!important;max-height:87px!important
  }
}

/* Locked and unfinished aircraft may be browsed, but never look usable. */
.plane-blueprint.locked-preview:after{
  content:'🔒 LOCKED';position:absolute;inset:50% auto auto 50%;z-index:4;
  transform:translate(-50%,-50%);padding:8px 14px;border:3px solid #ffe568;
  border-radius:16px;background:#06172ee8;color:#ffe568;font-size:17px;
  font-weight:1000;letter-spacing:1px;box-shadow:0 6px 16px #001a
}
.plane-blueprint.building-preview:after{content:'🔧 BUILDING • LOCKED'}
.plane-blueprint.locked-preview>img{filter:grayscale(1) brightness(.5)!important;opacity:.42!important}

/* Lesson 13 — keep one prompt only and reserve a clear top control row. */
.singular-plural-lesson .lesson-words{grid-auto-rows:minmax(178px,auto)!important}
.singular-plural-lesson .lesson-words>button.singular-plural-card .lesson-media{
  min-height:92px!important;max-height:102px!important;padding:0!important
}
.singular-plural-lesson .lesson-words>button.singular-plural-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:132px!important;max-height:98px!important;
  object-fit:contain!important;object-position:center!important;transform:none!important;clip-path:none!important
}
.target-preview.singular-plural-stage>#targetImage{
  object-fit:contain!important;object-position:center!important;transform:none!important;clip-path:none!important
}
@media (orientation:portrait) and (max-width:760px){
  #app:has(.target-preview.singular-plural-stage:not(.hidden)) #exitStage,
  #app:has(.target-preview.singular-plural-stage:not(.hidden)) #helpStage,
  #app:has(.target-preview.singular-plural-stage:not(.hidden)) #repeatStage{
    top:max(22px,env(safe-area-inset-top))!important
  }
  .target-preview.singular-plural-stage{
    top:78px!important;height:176px!important;max-height:176px!important;
    grid-template-columns:minmax(0,29%) minmax(0,71%)!important;
    padding:8px 10px!important
  }
  .target-preview.singular-plural-stage>#targetImage{
    width:97px!important;height:97px!important;max-width:97px!important;max-height:97px!important
  }
  .target-preview.singular-plural-stage>div{
    height:97px!important;max-height:97px!important;padding:4px!important
  }
  .target-preview.singular-plural-stage #targetArabic{
    font-size:clamp(14px,4vw,20px)!important;line-height:1.08!important
  }
  .target-preview.singular-plural-stage #targetEnglish:empty{
    display:none!important
  }
}

/* Lesson 14 — the uploaded square weather scenes reuse the proven compact
   Grade 2 board. Images remain fully contained while the question, spelling
   targets, flight path, and plane keep their established positions. */
.weather-seasons-lesson .lesson-words{grid-auto-rows:minmax(178px,auto)!important}
.weather-seasons-lesson .lesson-words>button.weather-seasons-card .lesson-media{
  min-height:92px!important;max-height:102px!important;padding:0!important
}
.weather-seasons-lesson .lesson-words>button.weather-seasons-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:132px!important;max-height:98px!important;
  object-fit:contain!important;object-position:center!important;transform:none!important;clip-path:none!important
}
.target-preview.weather-seasons-stage>#targetImage{
  object-fit:contain!important;object-position:center!important;transform:none!important;clip-path:none!important
}
@media (orientation:portrait) and (max-width:760px){
  .target-preview.weather-seasons-stage{
    top:68px!important;left:10px!important;right:10px!important;bottom:auto!important;
    width:auto!important;height:190px!important;max-height:190px!important;transform:none!important;
    display:grid!important;grid-template-columns:minmax(0,30%) minmax(0,70%)!important;
    grid-template-rows:auto minmax(0,1fr)!important;gap:0!important;
    padding:9px 10px!important;overflow:hidden!important
  }
  .target-preview.weather-seasons-stage:before{
    grid-column:1/-1!important;grid-row:1!important;justify-self:center!important;margin:0 0 6px!important
  }
  .target-preview.weather-seasons-stage>#targetImage{
    grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;
    display:block!important;width:108px!important;height:108px!important;min-width:0!important;min-height:0!important;
    max-width:108px!important;max-height:108px!important;margin:0!important;padding:2px!important;
    object-fit:contain!important;object-position:center!important;clip-path:none!important;border:0!important;
    border-radius:16px!important;background:transparent!important;box-shadow:none!important
  }
  .target-preview.weather-seasons-stage>div{
    grid-column:2!important;grid-row:2!important;align-self:center!important;justify-self:stretch!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:108px!important;max-height:108px!important;margin:0!important;
    padding:5px 4px!important;overflow:hidden!important
  }
  .target-preview.weather-seasons-stage #targetArabic{font-size:clamp(11px,3vw,14px)!important;line-height:1.05!important}
  .target-preview.weather-seasons-stage #targetEnglish{font-size:clamp(17px,5vw,24px)!important;line-height:1.08!important}
}

/* Lessons 15–16 — all twelve square month scenes use their full composition. */
.months-lesson .lesson-words{grid-auto-rows:minmax(178px,auto)!important}
.months-lesson .lesson-words>button.months-card .lesson-media{
  min-height:92px!important;max-height:102px!important;padding:0!important
}
.months-lesson .lesson-words>button.months-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:132px!important;max-height:98px!important;
  object-fit:contain!important;object-position:center!important;transform:none!important;clip-path:none!important
}
.target-preview.months-stage>#targetImage{
  object-fit:contain!important;object-position:center!important;transform:none!important;clip-path:none!important
}
@media (orientation:portrait) and (max-width:760px){
  .target-preview.months-stage{
    top:68px!important;left:10px!important;right:10px!important;bottom:auto!important;
    width:auto!important;height:190px!important;max-height:190px!important;transform:none!important;
    display:grid!important;grid-template-columns:minmax(0,27%) minmax(0,73%)!important;
    grid-template-rows:auto minmax(0,1fr)!important;gap:0!important;
    padding:9px 10px!important;overflow:hidden!important
  }
  .target-preview.months-stage:before{
    grid-column:1/-1!important;grid-row:1!important;justify-self:center!important;margin:0 0 6px!important
  }
  .target-preview.months-stage>#targetImage{
    grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;
    display:block!important;width:90px!important;height:90px!important;min-width:0!important;min-height:0!important;
    max-width:90px!important;max-height:90px!important;margin:0!important;padding:2px!important;
    object-fit:contain!important;object-position:center!important;clip-path:none!important;border:0!important;
    border-radius:16px!important;background:transparent!important;box-shadow:none!important
  }
  .target-preview.months-stage>div{
    grid-column:2!important;grid-row:2!important;align-self:center!important;justify-self:stretch!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:108px!important;max-height:108px!important;margin:0!important;
    padding:5px 4px!important;overflow:hidden!important
  }
  .target-preview.months-stage #targetArabic{font-size:clamp(11px,3vw,14px)!important;line-height:1.05!important}
  .target-preview.months-stage #targetEnglish{font-size:clamp(17px,5vw,24px)!important;line-height:1.08!important}
}

/* v133 — transparent lesson art sits directly on the existing game surface.
   The source cutout, not a second rectangular scene, carries the visual. */
img[src*="-cutout."]{
  background:transparent!important;border:0!important;box-shadow:none!important;
  object-fit:contain!important;object-position:center!important;
  filter:drop-shadow(0 6px 6px #0018)!important
}

/* v135 — Days need taller, explicit rows so the calendar, day name, number,
   and listen label never share the same space on narrow portrait screens. */
.days-lesson .lesson-words{
  grid-auto-rows:220px!important;
  padding-bottom:22px!important
}
.days-lesson .lesson-words>button.days-card{
  min-height:220px!important;
  grid-template-rows:128px 27px 29px 22px!important;
  row-gap:2px!important;
  padding:6px!important;
  overflow:hidden!important
}
.days-lesson .lesson-words>button.days-card .lesson-media{
  min-height:128px!important;max-height:128px!important;padding:0!important
}
.days-lesson .lesson-words>button.days-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:150px!important;max-height:124px!important;
  object-fit:contain!important;object-position:center!important;transform:none!important
}
.days-lesson .lesson-words>button.days-card b{
  min-height:27px!important;padding:1px 3px!important;font-size:clamp(15px,4vw,20px)!important;
  line-height:1.1!important;overflow:visible!important;-webkit-line-clamp:1!important
}
.days-lesson .lesson-words>button.days-card .lesson-note{
  min-height:29px!important;margin:0 4px!important;padding:6px 4px!important;line-height:1!important
}
.days-lesson .lesson-words>button.days-card small{
  display:block!important;min-height:22px!important;font-size:9px!important;line-height:18px!important
}

/* Days lesson: keep every label in its own reserved row.  The previous row
   heights plus padding were slightly taller than the card itself, which made
   the listen label clip and allowed long day names to touch the artwork. */
.days-lesson .lesson-words{grid-auto-rows:226px!important;padding-bottom:28px!important}
.days-lesson .lesson-words>button.days-card{
  min-height:226px!important;
  grid-template-rows:112px 30px 32px 22px!important;
  row-gap:3px!important;
  padding:8px 7px!important
}
.days-lesson .lesson-words>button.days-card .lesson-media{
  min-height:108px!important;max-height:112px!important
}
.days-lesson .lesson-words>button.days-card .lesson-media img{
  max-width:132px!important;max-height:108px!important
}
.days-lesson .lesson-words>button.days-card b{
  display:flex!important;align-items:center!important;justify-content:center!important;
  min-height:30px!important;margin:0!important;padding:2px 3px!important;
  font-size:clamp(14px,3.7vw,19px)!important;line-height:1.05!important;
  white-space:nowrap!important;overflow:hidden!important
}
.days-lesson .lesson-words>button.days-card .lesson-note{
  display:flex!important;align-items:center!important;justify-content:center!important;
  min-height:32px!important;margin:0 4px!important;padding:4px!important
}
.days-lesson .lesson-words>button.days-card small{
  min-height:22px!important;line-height:20px!important;overflow:visible!important
}

/* The project already contains real transparent cutouts for Lessons 8–14.
   Remove the old decorative image plates so those cutouts sit directly on the
   existing lesson and stage surfaces. */
.demonstratives-lesson .lesson-media,
.singular-plural-lesson .lesson-media,
.do-does-lesson .lesson-media,
.can-cant-lesson .lesson-media{
  background:transparent!important;border:0!important;box-shadow:none!important
}
.far-demonstratives-lesson .lesson-media:after{display:none!important;content:none!important}
.far-demonstratives-lesson .lesson-media img{transform:none!important}
.target-preview.demonstratives-stage>#targetImage,
.target-preview.far-demonstratives-stage>#targetImage,
.target-preview.do-does-stage>#targetImage,
.target-preview.can-cant-stage>#targetImage,
.target-preview.singular-plural-stage>#targetImage{
  background:transparent!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;transform:none!important;filter:drop-shadow(0 6px 6px #0018)!important
}

/* v136 — There Is / There Are artwork is 17% smaller in both the listening
   cards and gameplay board, without changing the other grammar lessons. */
.is-are-lesson .lesson-media img{
  transform:scale(.83)!important;transform-origin:center!important
}
.target-preview.demonstratives-stage.is-are-stage>#targetImage{
  transform:scale(.83)!important;transform-origin:center!important
}

/* v137 — Lesson 18 uses complete routine scenes. The image, activity phrase,
   time sentence, and listen label each keep a dedicated row on phones. */
.time-routines-lesson .lesson-words{grid-auto-rows:230px!important;padding-bottom:24px!important}
.time-routines-lesson .lesson-words>button.time-routines-card{
  min-height:230px!important;grid-template-rows:126px 28px 43px 21px!important;
  row-gap:2px!important;padding:6px!important;overflow:hidden!important
}
.time-routines-lesson .lesson-words>button.time-routines-card .lesson-media{
  min-height:126px!important;max-height:126px!important;padding:0!important
}
.time-routines-lesson .lesson-words>button.time-routines-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:150px!important;max-height:122px!important;
  object-fit:contain!important;object-position:center!important;transform:none!important
}
.time-routines-lesson .lesson-words>button.time-routines-card b{
  min-height:28px!important;padding:2px!important;font-size:clamp(14px,3.6vw,19px)!important;line-height:1.05!important
}
.time-routines-lesson .lesson-words>button.time-routines-card .lesson-note{
  min-height:43px!important;margin:0 3px!important;padding:5px 4px!important;
  font-size:clamp(9px,2.4vw,12px)!important;line-height:1.15!important;white-space:normal!important
}
.time-routines-lesson .lesson-words>button.time-routines-card small{
  display:block!important;min-height:21px!important;font-size:9px!important;line-height:17px!important
}
.target-preview.time-routines-stage>#targetImage{
  object-fit:contain!important;object-position:center!important;clip-path:none!important
}

/* v138 — routine cards keep their activity and sentence visible, and the
   square scene stays fully inside a square clue slot on portrait phones. */
@media (orientation:portrait) and (max-width:760px){
  #lessonScreen.time-routines-lesson .lesson-words{grid-auto-rows:214px!important;padding-bottom:18px!important}
  #lessonScreen.time-routines-lesson .lesson-words>button.time-routines-card{
    min-height:214px!important;height:214px!important;
    grid-template-rows:108px 30px 45px 19px!important;row-gap:2px!important;padding:5px!important
  }
  #lessonScreen.time-routines-lesson .lesson-words>button.time-routines-card .lesson-media{
    width:108px!important;height:108px!important;min-height:108px!important;max-height:108px!important;
    margin:auto!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important
  }
  #lessonScreen.time-routines-lesson .lesson-words>button.time-routines-card .lesson-media img{
    display:block!important;width:104px!important;height:104px!important;max-width:104px!important;max-height:104px!important;
    margin:auto!important;object-fit:contain!important;border-radius:14px!important
  }
  #lessonScreen.time-routines-lesson .lesson-words>button.time-routines-card b{
    display:block!important;min-height:30px!important;max-height:30px!important;font-size:13px!important;line-height:15px!important;
    white-space:normal!important;-webkit-line-clamp:2!important
  }
  #lessonScreen.time-routines-lesson .lesson-words>button.time-routines-card .lesson-note{
    display:block!important;min-height:45px!important;max-height:45px!important;margin:0!important;padding:4px 2px!important;
    font-size:10px!important;line-height:12px!important;white-space:normal!important;-webkit-line-clamp:3!important
  }
  .target-preview.time-routines-stage{
    grid-template-columns:116px minmax(0,1fr)!important;padding:10px!important
  }
  .target-preview.time-routines-stage>#targetImage{
    justify-self:center!important;align-self:center!important;width:96px!important;height:96px!important;
    max-width:96px!important;max-height:96px!important;margin:0!important;padding:0!important;
    object-fit:contain!important;border-radius:14px!important;background:transparent!important;border:0!important;box-shadow:none!important
  }
  .target-preview.time-routines-stage>div{min-width:0!important;padding:6px!important}
  .target-preview.time-routines-stage #targetArabic{font-size:clamp(13px,3.4vw,17px)!important;line-height:1.08!important}
  .target-preview.time-routines-stage #targetEnglish{font-size:clamp(13px,3.5vw,18px)!important;line-height:1.12!important}
}

/* v139 — embedded mobile browsers can reserve an invisible toolbar strip at
   the visual top. Keep all routine-stage controls below it and preserve the
   familiar letter-spelling play area. */
@media (orientation:portrait) and (max-width:760px){
  #app:has(.target-preview.time-routines-stage:not(.hidden)) #exitStage,
  #app:has(.target-preview.time-routines-stage:not(.hidden)) #helpStage,
  #app:has(.target-preview.time-routines-stage:not(.hidden)) #repeatStage,
  #app:has(.target-preview.time-routines-stage:not(.hidden)) #sound{
    position:fixed!important;top:max(58px,calc(env(safe-area-inset-top) + 18px))!important;z-index:180!important
  }
  .target-preview.time-routines-stage{top:112px!important;height:190px!important;max-height:190px!important}
  .target-preview.time-routines-stage #targetArabic{
    display:block!important;max-height:58px!important;font-size:clamp(12px,3.2vw,16px)!important;line-height:1.1!important
  }
  .target-preview.time-routines-stage #targetEnglish{
    display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;
    max-height:48px!important;font-size:clamp(16px,4.2vw,21px)!important;line-height:1!important;letter-spacing:2px!important
  }
}
/* Grade 2 Egyptian Money — real currency stays fully contained on phones. */
.stage-egypt-money{display:grid!important;place-items:center!important;gap:5px!important;width:100%!important;max-width:100%!important;overflow:hidden!important}
.egypt-money-row{display:flex!important;align-items:center!important;justify-content:center!important;gap:clamp(6px,1.2vw,14px)!important;width:100%!important;min-width:0!important}
.egypt-money-row>span{display:grid!important;place-items:center!important;flex:1 1 0!important;min-width:0!important;max-width:190px!important;height:100px!important;overflow:hidden!important}
.egypt-money-row img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}
.stage-egypt-money>small{font-size:clamp(10px,1.7vw,15px)!important;font-weight:900!important;color:#ffe15a!important;letter-spacing:.5px!important}
.lesson-words img[src*="grade2-math-money"]{width:94%!important;height:78px!important;object-fit:contain!important}
@media (max-width:520px){
  .egypt-money-row>span{height:74px!important;max-width:132px!important}
  .stage-egypt-money>small{font-size:10px!important}
}

/* v153 — one reusable Egyptian-currency frame for lesson, stages and quizzes.
   Notes keep their wide ratio, coins keep a square ratio, and neither may be
   cropped by a parent surface. */
.stage-egypt-money{
  box-sizing:border-box!important;display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;place-items:center!important;
  width:100%!important;height:100%!important;min-height:145px!important;
  padding:10px 12px 7px!important;gap:6px!important;overflow:hidden!important
}
.stage-egypt-money .egypt-money-row{
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:100%!important;height:100%!important;min-height:0!important;
  gap:10px!important;padding:8px!important;overflow:hidden!important
}
.stage-egypt-money .egypt-money-frame{
  box-sizing:border-box!important;display:grid!important;place-items:center!important;
  flex:0 1 auto!important;margin:0!important;padding:8px!important;
  overflow:hidden!important;background:transparent!important;border:0!important
}
.stage-egypt-money .egypt-money-frame.note{
  width:min(42%,240px)!important;height:112px!important;max-width:240px!important
}
.stage-egypt-money .egypt-money-row[data-count="1"] .egypt-money-frame.note{
  width:min(88%,430px)!important;max-width:430px!important;height:132px!important
}
.stage-egypt-money .egypt-money-frame.coin{
  width:126px!important;height:126px!important;max-width:34%!important
}
.stage-egypt-money .egypt-money-frame img{
  display:block!important;width:100%!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;margin:auto!important;
  object-fit:contain!important;object-position:center!important;clip-path:none!important;
  transform:none!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important
}
.stage-egypt-money>small{
  width:100%!important;min-height:18px!important;margin:0!important;
  color:#15517b!important;font-size:clamp(11px,2.8vw,15px)!important;
  line-height:1.1!important;text-align:center!important
}
.exam-visual:has(.stage-egypt-money),
.challenge-math-visual:has(.stage-egypt-money){
  box-sizing:border-box!important;min-height:190px!important;height:210px!important;
  max-height:210px!important;padding:6px!important;overflow:hidden!important
}

/* The listening lesson uses the same contain contract instead of per-note
   manual sizing. */
#lessonScreen .lesson-media:has(img[src*="grade2-math-money"]){
  display:grid!important;place-items:center!important;width:100%!important;
  height:112px!important;min-height:112px!important;max-height:112px!important;
  padding:7px!important;overflow:hidden!important;background:transparent!important
}
#lessonScreen .lesson-media img[src*="grade2-math-money"]{
  display:block!important;width:100%!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;margin:auto!important;
  object-fit:contain!important;object-position:center!important;transform:none!important;
  clip-path:none!important;border:0!important;background:transparent!important
}

@media (orientation:portrait) and (max-width:760px){
  /* Embedded browser chrome can consume the visual top. Reserve a real header
     band before the question panel, as already done for the English routines. */
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #exitStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #helpStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #repeatStage,
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #sound{
    position:fixed!important;top:max(58px,calc(env(safe-area-inset-top) + 18px))!important;
    z-index:190!important
  }
  .target-preview.money-egypt-stage{
    top:118px!important;left:10px!important;right:10px!important;width:auto!important;
    height:330px!important;max-height:330px!important;padding:10px 12px 12px!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto 52px minmax(0,1fr)!important;gap:6px!important;
    overflow:hidden!important
  }
  .target-preview.money-egypt-stage:before{grid-column:1!important;grid-row:1!important}
  .target-preview.money-egypt-stage>div{
    grid-column:1!important;grid-row:2!important;min-height:52px!important;
    max-height:52px!important;padding:5px 8px!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage>.target-emoji{
    grid-column:1!important;grid-row:3!important;width:100%!important;height:100%!important;
    min-height:0!important;max-height:none!important;padding:0!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money{min-height:0!important;padding:4px 6px!important}
  .target-preview.money-egypt-stage .stage-egypt-money .egypt-money-row{padding:4px!important;gap:6px!important}
  .target-preview.money-egypt-stage .egypt-money-frame.note{
    width:min(43%,230px)!important;height:105px!important;padding:5px!important
  }
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] .egypt-money-frame.note{
    width:min(88%,390px)!important;max-width:390px!important;height:118px!important
  }
  .target-preview.money-egypt-stage .egypt-money-frame.coin{
    width:112px!important;height:112px!important;max-width:31%!important;padding:5px!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money>small{min-height:15px!important;font-size:11px!important}
  .exam-visual:has(.stage-egypt-money),
  .challenge-math-visual:has(.stage-egypt-money){height:205px!important;max-height:205px!important}
}

/* v154 — compact money layout. Currency images are direct children so no
   inherited flex frame can collapse them to zero. */
.stage-egypt-money .egypt-money-row{height:108px!important;min-height:108px!important;padding:3px 8px!important}
.stage-egypt-money img.money-asset{
  display:block!important;flex:0 1 auto!important;margin:auto!important;padding:4px!important;
  object-fit:contain!important;object-position:center!important;opacity:1!important;
  visibility:visible!important;clip-path:none!important;transform:none!important
}
.stage-egypt-money img.money-asset.coin{
  width:100px!important;height:100px!important;max-width:29%!important;max-height:100px!important
}
.stage-egypt-money img.money-asset.note{
  width:min(42%,230px)!important;height:92px!important;max-width:230px!important;max-height:92px!important
}
.stage-egypt-money .egypt-money-row[data-count="1"] img.money-asset.note{
  width:min(86%,370px)!important;max-width:370px!important;height:104px!important;max-height:104px!important
}
.exam-visual:has(.stage-egypt-money),.challenge-math-visual:has(.stage-egypt-money){
  min-height:155px!important;height:165px!important;max-height:165px!important
}
.exam-visual .stage-egypt-money,.challenge-math-visual .stage-egypt-money{
  min-height:0!important;height:100%!important;padding:4px 8px!important
}

#lessonScreen.money-lesson .lesson-words{grid-auto-rows:180px!important;padding-bottom:24px!important}
#lessonScreen.money-lesson .lesson-words>button.money-card{
  height:180px!important;min-height:180px!important;
  grid-template-rows:82px 25px 39px 22px!important;row-gap:1px!important;
  padding:5px!important;overflow:hidden!important
}
#lessonScreen.money-lesson .lesson-words>button.money-card .lesson-media{
  width:100%!important;height:82px!important;min-height:82px!important;max-height:82px!important;
  padding:5px!important;overflow:hidden!important
}
#lessonScreen.money-lesson .lesson-words>button.money-card .lesson-media img{
  width:100%!important;height:100%!important;max-width:145px!important;max-height:72px!important;
  padding:2px!important;object-fit:contain!important;object-position:center!important
}
#lessonScreen.money-lesson .lesson-words>button.money-card .lesson-media img[src*="coin"]{
  width:72px!important;height:72px!important;max-width:72px!important;max-height:72px!important
}
#lessonScreen.money-lesson .lesson-words>button.money-card b{
  min-height:25px!important;margin:0!important;font-size:clamp(13px,3.5vw,18px)!important;
  line-height:1.05!important;white-space:nowrap!important;overflow:hidden!important
}
#lessonScreen.money-lesson .lesson-words>button.money-card .lesson-note{
  min-height:39px!important;max-height:39px!important;margin:0 3px!important;padding:4px!important;
  font-size:clamp(9px,2.35vw,12px)!important;line-height:1.12!important;overflow:hidden!important
}
#lessonScreen.money-lesson .lesson-words>button.money-card small{
  align-self:start!important;min-height:22px!important;margin:-3px 0 0!important;
  font-size:8px!important;line-height:18px!important;overflow:visible!important
}

@media (orientation:portrait) and (max-width:760px){
  .target-preview.money-egypt-stage{
    top:104px!important;height:220px!important;max-height:220px!important;
    grid-template-rows:auto 43px minmax(0,1fr)!important;gap:4px!important;
    padding:7px 10px 9px!important
  }
  .target-preview.money-egypt-stage>div{
    min-height:43px!important;max-height:43px!important;padding:3px 7px!important
  }
  .target-preview.money-egypt-stage>div #targetArabic{
    font-size:clamp(17px,4.7vw,23px)!important;line-height:1.05!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money{
    min-height:0!important;height:100%!important;padding:2px 5px!important;gap:2px!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money .egypt-money-row{
    height:91px!important;min-height:91px!important;padding:1px 5px!important;gap:5px!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money img.money-asset.coin{
    width:84px!important;height:84px!important;max-width:28%!important;max-height:84px!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money img.money-asset.note{
    width:min(43%,205px)!important;height:78px!important;max-width:205px!important;max-height:78px!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money .egypt-money-row[data-count="1"] img.money-asset.note{
    width:min(84%,330px)!important;max-width:330px!important;height:86px!important;max-height:86px!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money>small{
    min-height:13px!important;font-size:9px!important;line-height:1!important
  }
}

/* Grade 2 money rebuild: authoritative final mobile rules. */
@media (orientation:portrait) and (max-width:760px){
  .target-preview.money-egypt-stage{top:76px!important;left:3.5vw!important;width:93vw!important;height:238px!important;max-height:238px!important;grid-template-columns:1fr!important;grid-template-rows:32px 52px 132px!important;gap:3px!important;padding:7px 10px 9px!important;overflow:visible!important}
  .target-preview.money-egypt-stage:before{grid-column:1!important;grid-row:1!important;margin:0!important;padding:3px 9px!important;font-size:12px!important;line-height:25px!important}
  .target-preview.money-egypt-stage>div{grid-column:1!important;grid-row:2!important;width:100%!important;min-height:52px!important;max-height:52px!important;margin:0!important;padding:3px 8px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage>div #targetArabic{display:block!important;font-size:clamp(15px,4.1vw,20px)!important;line-height:1.05!important;white-space:normal!important}
  .target-preview.money-egypt-stage>div #targetEnglish{display:block!important;font-size:10px!important;line-height:1!important;margin-top:1px!important}
  .target-preview.money-egypt-stage>.target-emoji{grid-column:1!important;grid-row:3!important;width:100%!important;height:132px!important;min-height:132px!important;max-height:132px!important;padding:2px 5px!important;border-width:3px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage .stage-egypt-money{height:100%!important;min-height:0!important;padding:1px 4px!important;gap:1px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage .egypt-money-row{height:105px!important;min-height:0!important;padding:1px 4px!important;gap:4px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage img.money-asset.coin{width:96px!important;height:96px!important;max-width:28%!important;max-height:96px!important;padding:1px!important;object-fit:contain!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="4"] img.money-asset.coin{width:70px!important;height:70px!important;max-width:22%!important;max-height:70px!important}
  .target-preview.money-egypt-stage img.money-asset.note{width:min(43%,205px)!important;height:88px!important;max-height:88px!important;object-fit:contain!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.note{width:min(90%,345px)!important;height:98px!important;max-width:345px!important;max-height:98px!important}
  .target-preview.money-egypt-stage .stage-egypt-money>small{height:14px!important;min-height:14px!important;margin:0!important;font-size:9px!important;line-height:1!important}
  #examScreen[data-world="numbers"] .exam-card{width:94vw!important;max-height:calc(100dvh - 18px)!important;padding:10px!important;overflow:hidden!important}
  #examScreen[data-world="numbers"] .exam-card-body{min-height:0!important;gap:6px!important}
  #examScreen[data-world="numbers"] #examPrompt{font-size:clamp(17px,4.4vw,22px)!important;line-height:1.08!important;margin:3px 0!important}
  #examScreen[data-world="numbers"] .exam-visual{height:185px!important;min-height:185px!important;max-height:185px!important;padding:5px!important}
  #examScreen[data-world="numbers"] .exam-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  #examScreen[data-world="numbers"] .exam-choices button{min-height:64px!important;padding:6px!important;font-size:clamp(18px,5vw,26px)!important}
  #examScreen[data-world="numbers"] .exam-actions{display:none!important}
}

/* v156 — single-board money question: large currency, prompt beneath it. */
@media (orientation:portrait) and (max-width:760px){
  .target-preview.money-egypt-stage{
    top:68px!important;left:3.5vw!important;width:93vw!important;height:174px!important;max-height:174px!important;
    display:grid!important;grid-template-columns:1fr!important;grid-template-rows:1fr!important;
    padding:7px 10px!important;overflow:visible!important
  }
  .target-preview.money-egypt-stage:before,
  .target-preview.money-egypt-stage>div{display:none!important}
  .target-preview.money-egypt-stage>.target-emoji{
    display:block!important;grid-column:1!important;grid-row:1!important;width:100%!important;height:154px!important;
    min-height:154px!important;max-height:154px!important;padding:3px 7px!important;border-width:3px!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money{
    display:grid!important;grid-template-rows:minmax(0,1fr) 30px!important;
    width:100%!important;height:100%!important;padding:1px 4px!important;gap:1px!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage .egypt-money-row{
    height:116px!important;min-height:116px!important;padding:1px 4px!important;gap:5px!important;overflow:hidden!important
  }
  .target-preview.money-egypt-stage img.money-asset.coin{
    width:116px!important;height:116px!important;max-width:38%!important;max-height:116px!important;
    padding:0!important;object-fit:contain!important
  }
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.coin{
    width:132px!important;height:132px!important;max-width:52%!important;max-height:132px!important
  }
  .target-preview.money-egypt-stage .egypt-money-row[data-count="4"] img.money-asset.coin{
    width:76px!important;height:76px!important;max-width:23%!important;max-height:76px!important
  }
  .target-preview.money-egypt-stage img.money-asset.note{
    width:min(45%,210px)!important;height:104px!important;max-height:104px!important;object-fit:contain!important
  }
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.note{
    width:min(94%,350px)!important;height:112px!important;max-width:350px!important;max-height:112px!important
  }
  .target-preview.money-egypt-stage .stage-egypt-money>small{
    display:flex!important;align-items:center!important;justify-content:center!important;
    height:30px!important;min-height:30px!important;margin:0!important;padding:0 4px!important;
    color:#164c70!important;font-size:clamp(12px,3.25vw,16px)!important;line-height:1.05!important;
    font-weight:900!important;text-align:center!important;text-wrap:balance!important
  }
  #rewardNumber{width:auto!important;min-width:190px!important;max-width:92%!important;height:auto!important;min-height:112px!important;padding:20px 18px!important;font-size:clamp(25px,7vw,38px)!important;line-height:1.05!important;text-align:center!important}
}

/* v157 final cascade guard — stages only. */
@media (orientation:portrait) and (max-width:760px){
  #app:has(.target-preview.money-egypt-stage:not(.hidden)) #exitStage,#app:has(.target-preview.money-egypt-stage:not(.hidden)) #helpStage,#app:has(.target-preview.money-egypt-stage:not(.hidden)) #repeatStage,#app:has(.target-preview.money-egypt-stage:not(.hidden)) #sound{top:1.2%!important;z-index:12!important}
  .target-preview.money-egypt-stage{top:9%!important;left:4%!important;width:92%!important;height:25%!important;max-height:none!important;transform:none!important;display:block!important;padding:7px!important;border:5px solid #ffe46e!important;border-radius:28px!important;overflow:hidden!important;z-index:6!important}
  .target-preview.money-egypt-stage:before,.target-preview.money-egypt-stage>div{display:none!important}
  .target-preview.money-egypt-stage>.target-emoji{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:7px 10px!important;border:0!important;border-radius:21px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage .stage-egypt-money{display:grid!important;grid-template-rows:minmax(0,1fr) 42px!important;align-items:stretch!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;gap:0!important;overflow:hidden!important}
  .target-preview.money-egypt-stage .egypt-money-row{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:3px 8px!important;gap:8px!important;overflow:hidden!important}
  .target-preview.money-egypt-stage img.money-asset.coin{display:block!important;width:128px!important;height:128px!important;max-width:38%!important;max-height:100%!important;margin:auto!important;padding:0!important;object-fit:contain!important;object-position:center!important;transform:none!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.coin{width:150px!important;height:150px!important;max-width:55%!important;max-height:100%!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="4"] img.money-asset.coin{width:76px!important;height:76px!important;max-width:23%!important;max-height:86%!important}
  .target-preview.money-egypt-stage img.money-asset.note{display:block!important;width:min(43%,220px)!important;height:110px!important;max-height:96%!important;margin:auto!important;padding:0!important;object-fit:contain!important;object-position:center!important;transform:none!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.note{width:min(92%,360px)!important;height:125px!important;max-width:360px!important;max-height:98%!important}
  .target-preview.money-egypt-stage .stage-egypt-money>small{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:42px!important;min-height:42px!important;margin:0!important;padding:3px 8px!important;color:#164c70!important;direction:ltr!important;unicode-bidi:plaintext!important;text-align:center!important;text-wrap:balance!important;font-size:clamp(15px,4.15vw,20px)!important;line-height:1.08!important;font-weight:900!important;overflow:hidden!important}
  .money-stage-choices{position:absolute!important;z-index:11!important;top:37%!important;left:6%!important;width:88%!important;height:72px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;direction:ltr!important;pointer-events:auto!important}
  .money-stage-choices button{width:100%!important;height:68px!important;min-width:0!important;margin:0!important;padding:4px!important;border:5px solid #ff7f9f!important;border-radius:22px!important;background:linear-gradient(#fff,#fff7dc)!important;box-shadow:0 7px 0 #bd4968,0 11px 18px #0016!important;color:#102c58!important;font-size:clamp(27px,7.8vw,38px)!important;line-height:1!important;font-weight:950!important}
  .money-stage-choices button.try-again{background:#ffe1e7!important;animation:moneyWrong .35s ease!important}
  #app:has(.target-preview.hidden) .money-stage-choices{display:none!important}
}
@keyframes moneyWrong{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}

/* v158 final cascade guard — money stages only. */
@media (orientation:portrait) and (max-width:760px){
  .money-stage-choices{display:none!important}
  .target-preview.money-egypt-stage{top:150px!important;left:4%!important;width:92%!important;height:250px!important;max-height:none!important;transform:none!important;display:block!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;z-index:6!important}
  .target-preview.money-egypt-stage:before,.target-preview.money-egypt-stage>div{display:none!important}
  .target-preview.money-egypt-stage>.target-emoji{display:block!important;width:100%!important;height:250px!important;min-height:250px!important;max-height:250px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}
  .target-preview.money-egypt-stage .stage-egypt-money{display:grid!important;grid-template-rows:64px 176px!important;gap:10px!important;width:100%!important;height:250px!important;min-height:250px!important;margin:0!important;padding:0!important;background:transparent!important;overflow:visible!important}
  .target-preview.money-egypt-stage .stage-egypt-money>small{grid-row:1!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:64px!important;min-height:64px!important;margin:0!important;padding:7px 16px!important;background:linear-gradient(180deg,#125779,#083f60)!important;border:4px solid #ffe46e!important;border-radius:18px!important;box-shadow:0 7px 0 #06374f,0 10px 18px #0016!important;color:#fff4a3!important;direction:ltr!important;unicode-bidi:plaintext!important;text-align:center!important;text-wrap:balance!important;font-size:clamp(18px,5vw,23px)!important;line-height:1.08!important;font-weight:950!important;overflow:hidden!important}
  .target-preview.money-egypt-stage .egypt-money-row{grid-row:2!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:176px!important;min-height:176px!important;margin:0!important;padding:8px 14px!important;gap:10px!important;background:linear-gradient(180deg,#fffef4,#effff7)!important;border:5px solid #6de0dc!important;border-radius:25px!important;box-shadow:0 8px 0 #0c5266,0 12px 20px #0018!important;overflow:hidden!important}
  .target-preview.money-egypt-stage img.money-asset.coin{display:block!important;width:136px!important;height:136px!important;max-width:40%!important;max-height:148px!important;margin:0!important;padding:0!important;object-fit:contain!important;object-position:center!important;transform:none!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.coin{width:154px!important;height:154px!important;max-width:62%!important;max-height:154px!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="4"] img.money-asset.coin{width:72px!important;height:72px!important;max-width:23%!important;max-height:72px!important}
  .target-preview.money-egypt-stage img.money-asset.note{display:block!important;width:min(44%,230px)!important;height:124px!important;max-height:140px!important;margin:0!important;padding:0!important;object-fit:contain!important;object-position:center!important;transform:none!important}
  .target-preview.money-egypt-stage .egypt-money-row[data-count="1"] img.money-asset.note{width:min(94%,390px)!important;height:148px!important;max-width:390px!important;max-height:148px!important}
}

/* Final mobile money-quiz overrides. */
@media (orientation:portrait){
  #examScreen[data-world="numbers"] .exam-choices{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  #examScreen[data-world="numbers"] .exam-visual:has(.stage-egypt-money) .stage-egypt-money>small{display:none!important}
  #examScreen[data-world="numbers"] .exam-visual:has(.stage-egypt-money) img.money-asset{transform:scale(1.4);transform-origin:center}
}

/* Final KG1 polish: numeric lessons, action matching, and quiz review balance. */
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-word-card{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  align-items:center!important;
  justify-items:center!important;
  text-align:center!important;
  gap:8px!important;
  padding:18px 10px!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-word-card .lesson-media{
  display:flex!important;
  align-items:end!important;
  justify-content:center!important;
  width:100%!important;
  min-height:112px!important;
  margin:0!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-word-card .lesson-concept-icon{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:auto!important;
  color:#123f63!important;
  font-size:clamp(76px,18vw,145px)!important;
  font-weight:1000!important;
  line-height:.9!important;
  text-align:center!important;
  text-shadow:0 7px 13px #0024!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-number-word-card>b{
  display:block!important;
  width:100%!important;
  min-height:44px!important;
  margin:0!important;
  color:#123f63!important;
  font-size:clamp(34px,8.5vw,62px)!important;
  font-weight:1000!important;
  line-height:1!important;
  text-align:center!important
}

.kg1-match-card.match-word{
  display:grid!important;
  place-items:center!important;
  justify-items:center!important;
  align-items:center!important;
  padding-inline:6px!important;
  text-align:center!important
}
.kg1-match-card.match-word b{
  display:block!important;
  width:100%!important;
  margin:0 auto!important;
  color:#133f5b!important;
  font-size:clamp(28px,7.5vw,50px)!important;
  line-height:1.02!important;
  text-align:center!important;
  transform:none!important
}
.kg1-match-card.match-picture img[src*="kg1-actions/"]{
  max-width:96%!important;
  max-height:96%!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important
}
.kg1-match-card.match-center.match-finished{
  background:linear-gradient(160deg,#ffe777,#ff9d43 58%,#4ce0d4)!important;
  color:#123f63!important;
  animation:kg1CenterBravo .7s ease both!important
}
.kg1-match-card.match-center.match-finished strong{
  width:100%!important;
  text-align:center!important;
  font-size:clamp(25px,6.8vw,46px)!important;
  letter-spacing:0!important
}
@keyframes kg1CenterBravo{
  0%{transform:rotateY(0) scale(1)}
  50%{transform:rotateY(90deg) scale(1.04)}
  100%{transform:rotateY(0) scale(1)}
}

.target-preview.missing-letters-stage #targetImage[src*="kg1-actions/"]{
  max-width:96%!important;
  max-height:96%!important;
  transform:scale(1.3)!important;
  transform-origin:center!important;
  object-fit:contain!important;
  object-position:center!important
}

.exam-review .exam-review-columns{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
  margin:0!important;
  direction:ltr!important;
  text-align:center!important
}
.exam-review .exam-review-columns section{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:7px!important;
  min-width:0!important;
  padding:8px!important;
  border-radius:16px!important;
  background:#f8fff9!important
}
.exam-review .exam-review-columns b{
  display:block!important;
  margin:0 0 2px!important;
  color:#17466a!important;
  font-size:clamp(12px,3.2vw,16px)!important;
  line-height:1.1!important;
  text-align:center!important
}
.exam-review .exam-review-columns span{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:7px 6px!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#17466a!important;
  font-size:clamp(12px,3.15vw,15px)!important;
  font-weight:900!important;
  line-height:1.12!important;
  text-align:center!important;
  overflow-wrap:anywhere!important
}
.exam-review .wrong-list span:before{content:"✕ ";color:#d83c50;font-weight:1000}
.exam-review .correct-list span:before{content:"✓ ";color:#0f9d58;font-weight:1000}

/* Colors/shapes and action matching refinements. */
.kg1-match-card.match-center{
  display:grid!important;
  place-items:center!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  gap:4px!important;
  overflow:hidden!important;
  text-align:center!important
}
.kg1-match-card.match-center .match-center-art{
  display:block!important;
  width:70%!important;
  height:70%!important;
  max-width:70%!important;
  max-height:70%!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:auto!important;
  border:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  transform:none!important
}
.kg1-match-card.match-center:not(.match-finished) strong{
  display:none!important
}
.kg1-match-card.match-center.match-finished{
  grid-template-rows:1fr!important
}
.kg1-match-card.match-center.match-finished strong{
  display:grid!important;
  place-items:center!important;
  height:100%!important
}

.target-preview.missing-letters-stage[data-world="actions"] #targetImage,
.target-preview.missing-letters-stage #targetImage[src*="kg1-actions/"]{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  padding:2px!important;
  transform:scale(1.32)!important;
  transform-origin:center!important;
  object-fit:contain!important;
  object-position:center!important
}

#lessonScreen.kg1-lesson .lesson-words>button img[src*="kg1-colors-shapes/"],
#lessonScreen.kg1-lesson .lesson-words>button img[src*="kg1-colors-shapes/"][src$=".svg"]{
  object-fit:contain!important;
  object-position:center!important
}
#lessonScreen.kg1-lesson .lesson-words>button img[src*="kg1-colors-shapes/circle-outline"],
#lessonScreen.kg1-lesson .lesson-words>button img[src*="kg1-colors-shapes/square-outline"],
#lessonScreen.kg1-lesson .lesson-words>button img[src*="kg1-colors-shapes/triangle-outline"],
#lessonScreen.kg1-lesson .lesson-words>button img[src*="kg1-colors-shapes/rectangle-outline"]{
  max-width:72%!important;
  max-height:72%!important;
  margin:auto auto 8px!important
}
#lessonScreen.kg1-lesson .lesson-words>button:has(img[src*="kg1-colors-shapes/"]) {
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  align-items:center!important;
  justify-items:center!important;
  gap:10px!important;
  padding:14px 8px!important;
  text-align:center!important
}
#lessonScreen.kg1-lesson .lesson-words>button:has(img[src*="kg1-colors-shapes/"]) b{
  display:block!important;
  width:100%!important;
  margin:0!important;
  color:#133f5b!important;
  font-size:clamp(18px,4.8vw,31px)!important;
  line-height:1.04!important;
  text-align:center!important
}

.kg1-combo-target{
  grid-column:1/-1!important;
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  min-height:230px!important;
  padding:10px!important;
  border:5px solid #6fe4dc!important;
  border-radius:28px!important;
  background:#084962!important;
  box-shadow:0 8px 0 #07384f!important
}
.kg1-combo-art{
  width:min(56vw,245px)!important;
  height:min(32vh,210px)!important;
  background:linear-gradient(145deg,#fff8,var(--combo-color))!important;
  border:18px solid var(--combo-edge)!important;
  box-shadow:inset 0 0 18px #fff9,0 13px 24px #0019!important
}
.kg1-combo-art.circle{border-radius:999px!important}
.kg1-combo-art.square{aspect-ratio:1!important;height:min(34vh,220px)!important;border-radius:28px!important}
.kg1-combo-art.rectangle{width:min(66vw,300px)!important;height:min(24vh,150px)!important;border-radius:28px!important}
.kg1-combo-art.triangle{
  width:0!important;
  height:0!important;
  background:transparent!important;
  border-left:min(30vw,130px) solid transparent!important;
  border-right:min(30vw,130px) solid transparent!important;
  border-bottom:min(42vw,235px) solid var(--combo-color)!important;
  filter:drop-shadow(0 13px 12px #0018)!important;
  box-shadow:none!important
}

#kg1ChoiceGrid:has(.kg1-combo-target) .word-option b{
  display:block!important;
  width:100%!important;
  text-align:center!important;
  font-size:clamp(18px,5vw,27px)!important;
  line-height:1.05!important
}

/* Final correction pass for action matching and color-shape combo screens. */
.kg1-match-card.match-word b{
  font-size:clamp(22px,6vw,40px)!important;
  line-height:1.02!important;
  letter-spacing:0!important;
  text-align:center!important
}
.kg1-match-card.match-center .match-center-art{
  width:80%!important;
  height:80%!important;
  max-width:80%!important;
  max-height:80%!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important
}

#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  align-items:center!important;
  justify-items:center!important;
  gap:10px!important;
  padding:12px 9px!important;
  text-align:center!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card .kg1-combo-lesson-art{
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  min-height:118px!important;
  margin:0!important;
  overflow:hidden!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card>b{
  display:block!important;
  width:100%!important;
  margin:0!important;
  color:#133f5b!important;
  font-size:clamp(22px,5.8vw,38px)!important;
  font-weight:1000!important;
  line-height:1.02!important;
  text-align:center!important;
  white-space:normal!important
}

.kg1-combo-art{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:min(3vw,18px)!important;
  width:100%!important;
  height:100%!important;
  max-width:70%!important;
  max-height:70%!important;
  margin:auto!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  filter:none!important
}
.kg1-combo-art img{
  display:block!important;
  width:48%!important;
  height:100%!important;
  max-width:48%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
  transform:none!important
}
.kg1-combo-art img:first-child{
  width:52%!important;
  max-width:52%!important
}

#kg1ChoiceGrid:has(.kg1-combo-target){
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:minmax(210px,34dvh) repeat(2,minmax(86px,1fr))!important;
  gap:10px!important;
  align-items:stretch!important
}
#kg1ChoiceGrid:has(.kg1-combo-target) .kg1-combo-target{
  grid-column:1/-1!important;
  grid-row:1!important;
  min-height:0!important;
  height:100%!important;
  padding:12px!important;
  overflow:hidden!important
}
#kg1ChoiceGrid:has(.kg1-combo-target) .kg1-option.word-option{
  display:grid!important;
  place-items:center!important;
  min-height:86px!important;
  height:100%!important;
  padding:8px 10px!important;
  border-radius:22px!important
}
#kg1ChoiceGrid:has(.kg1-combo-target) .word-option b{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  font-size:clamp(20px,5.1vw,31px)!important;
  line-height:1.04!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  text-align:center!important
}

#examScreen.missing-letter-exam .exam-card-body{
  padding-top:clamp(20px,5svh,52px)!important;
  gap:clamp(10px,2.2svh,20px)!important
}
#examScreen.missing-letter-exam #examPrompt{
  margin-top:clamp(14px,3svh,34px)!important;
  margin-bottom:clamp(10px,2.5svh,26px)!important;
  color:#173a6c!important;
  font-size:clamp(22px,5.6vw,33px)!important;
  font-weight:800!important;
  line-height:1.12!important;
  text-align:center!important
}
#examScreen.missing-letter-exam #examPrompt strong{
  display:inline-block!important;
  font-weight:1000!important;
  color:#092f58!important;
  letter-spacing:.02em!important
}
#examScreen.missing-letter-exam .exam-visual{
  min-height:clamp(170px,29svh,250px)!important;
  margin-top:clamp(8px,2svh,20px)!important;
  margin-bottom:clamp(12px,3svh,30px)!important;
  padding:12px!important
}
#examScreen.missing-letter-exam .exam-choices{
  margin-top:clamp(10px,2.4svh,24px)!important;
  gap:10px!important
}
#examScreen .exam-visual .kg1-combo-art{
  max-width:78%!important;
  max-height:78%!important
}

/* Latest QA pass: action matching word scale, mascot fit, and lower missing-letter quizzes. */
.kg1-match-card.match-word b{
  font-size:clamp(18px,4.8vw,32px)!important;
  text-align:center!important;
  justify-self:center!important;
  align-self:center!important
}
.kg1-match-card.match-center .match-center-art{
  width:88%!important;
  height:88%!important;
  max-width:88%!important;
  max-height:88%!important;
  background:transparent!important
}
#examScreen.missing-letter-exam .exam-card-body{
  padding-top:clamp(42px,9svh,86px)!important;
  justify-content:flex-start!important
}
#examScreen.missing-letter-exam #examPrompt{
  margin-top:clamp(30px,6svh,58px)!important;
  margin-bottom:clamp(18px,3.8svh,36px)!important;
  font-size:clamp(24px,5.9vw,35px)!important;
  font-weight:900!important
}
#examScreen.missing-letter-exam #examPrompt strong{
  font-weight:1000!important;
  font-size:1.08em!important
}
#examScreen.missing-letter-exam .exam-visual{
  margin-top:clamp(14px,3svh,30px)!important;
  margin-bottom:clamp(18px,4svh,40px)!important
}
#examScreen.missing-letter-exam .exam-choices{
  margin-top:clamp(16px,3.5svh,36px)!important
}

/* v159 — missing-letter quizzes: center choices between the picture frame and bottom actions. */
@media (orientation:portrait){
  #examScreen.missing-letter-exam .exam-card{
    overflow:hidden!important
  }
  #examScreen.missing-letter-exam .exam-card-body{
    padding-top:clamp(10px,2.4svh,24px)!important;
    gap:clamp(8px,1.8svh,16px)!important;
    justify-content:flex-start!important;
    min-height:0!important
  }
  #examScreen.missing-letter-exam #examPrompt{
    margin:clamp(8px,1.8svh,16px) 0 clamp(6px,1.4svh,12px)!important;
    font-size:clamp(22px,5.45vw,32px)!important;
    line-height:1.08!important;
    font-weight:850!important
  }
  #examScreen.missing-letter-exam #examPrompt strong{
    display:block!important;
    margin-top:2px!important;
    font-size:1.08em!important;
    line-height:1.02!important;
    font-weight:1000!important
  }
  #examScreen.missing-letter-exam .exam-visual{
    min-height:clamp(150px,25svh,220px)!important;
    height:clamp(150px,25svh,220px)!important;
    max-height:220px!important;
    margin:clamp(6px,1.3svh,12px) 0 clamp(10px,2svh,20px)!important;
    padding:10px!important
  }
  #examScreen.missing-letter-exam .exam-visual img{
    max-height:100%!important;
    object-fit:contain!important
  }
  #examScreen.missing-letter-exam .exam-choices{
    position:relative!important;
    z-index:2!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:clamp(9px,1.7svh,14px) clamp(12px,3vw,18px)!important;
    margin:clamp(8px,1.6svh,16px) 0 clamp(64px,9svh,92px)!important;
    transform:translateY(clamp(-64px,-7svh,-42px))!important
  }
  #examScreen.missing-letter-exam .exam-choices button{
    min-height:clamp(58px,8svh,76px)!important;
    padding:6px 10px!important
  }
  #examScreen.missing-letter-exam .exam-actions{
    position:relative!important;
    z-index:3!important;
    margin-top:0!important
  }
}

/* v159 — keep long matching words inside their cards. */
.kg1-match-card.match-word b{
  display:block!important;
  max-width:88%!important;
  margin:auto!important;
  line-height:1.02!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  text-align:center!important
}
.kg1-match-card.match-word[data-value="TRIANGLE"] b{
  font-size:clamp(16px,4.25vw,27px)!important
}
.kg1-match-card.match-word[data-value="RECTANGLE"] b{
  font-size:clamp(14px,3.75vw,23px)!important
}

/* v159 — combo shapes use one transparent asset, centered on every surface. */
.kg1-combo-single-art{
  display:block!important;
  width:72%!important;
  height:72%!important;
  max-width:72%!important;
  max-height:72%!important;
  margin:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card b,
#kg1ChoiceGrid:has(.kg1-combo-target) .word-option b{
  font-size:clamp(16px,4.1vw,24px)!important;
  font-weight:800!important;
  line-height:1.06!important;
  text-align:center!important;
  white-space:normal!important
}
#lessonScreen.kg1-lesson .lesson-words>button.kg1-combo-lesson-card b{
  max-width:92%!important
}
#kg1ChoiceGrid:has(.kg1-combo-target){
  align-content:center!important
}
#kg1ChoiceGrid .kg1-combo-target{
  display:grid!important;
  place-items:center!important
}
.reward-card img[src*="kg1-colors-shapes/combo/"]{
  width:min(46vw,190px)!important;
  height:min(24svh,180px)!important;
  max-width:72%!important;
  max-height:72%!important;
  object-fit:contain!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important
}
