/* Generated by tools/build_image_assets.py; original CSS preserved. */
/* Stable mobile layout overrides. Map visuals intentionally remain owned by style.css. */
#qaBanner{position:fixed;z-index:1000;top:max(4px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);padding:4px 10px;border-radius:999px;background:#173c58e8;color:#fff7c8;font:800 11px/1.2 system-ui;pointer-events:none;box-shadow:0 2px 7px #0004}
.celebration{overflow:hidden!important;place-items:center!important;padding:12px!important}
.celebration .reward-card{box-sizing:border-box!important;width:min(90vw,430px)!important;max-height:calc(100dvh - 24px)!important;min-height:0!important;overflow:hidden!important;padding:12px 16px 14px!important;display:grid!important;grid-template-columns:1fr!important;grid-auto-rows:auto!important;gap:4px!important;transform:none!important}
.celebration .reward-card .crown{position:static!important;display:block!important;margin:0 auto!important;transform:none!important;font-size:30px!important;line-height:1!important}
.celebration .reward-card h2{margin:0!important;font-size:clamp(24px,6vw,34px)!important;line-height:1.05!important}
.celebration .reward-card .earned-stars{margin:0!important;font-size:clamp(18px,5vw,28px)!important;line-height:1!important}
.celebration .reward-card img#rewardAnimal{width:min(42vw,150px)!important;height:min(18dvh,118px)!important;object-fit:contain!important;margin:0 auto!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.celebration .reward-card h3{margin:0!important;font-size:clamp(20px,5vw,30px)!important;line-height:1.05!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.celebration .reward-card p{margin:0!important;line-height:1.05!important}
.celebration .hear-name{margin:2px auto!important;padding:7px 12px!important;font-size:clamp(14px,3.8vw,18px)!important}
.celebration .reward-milestone,.celebration .bonus-gift{margin:0!important;padding:4px 8px!important;font-size:clamp(13px,3.5vw,17px)!important;line-height:1.05!important}
.celebration .reward-actions{width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;direction:ltr!important;margin-top:3px!important}
.celebration .reward-actions button{min-width:0!important;min-height:40px!important;padding:7px 4px!important;font-size:clamp(12px,3.5vw,17px)!important;line-height:1.05!important;white-space:nowrap!important}
#celebrationHome{order:1!important}#celebrationSanctuary{order:2!important}#celebrationNext{order:3!important}
.target-preview.full-scene-missing{position:absolute!important;top:8%!important;left:4%!important;right:4%!important;bottom:13%!important;width:auto!important;height:auto!important;transform:none!important;display:grid!important;grid-template-columns:1fr!important;align-content:start!important;justify-items:center!important;padding:16px!important;border-radius:26px!important;background:#073a53dd!important;border:4px solid #70ead7!important;box-shadow:0 10px 30px #001b2d99!important}
.target-preview.full-scene-missing>img{width:min(72vw,360px)!important;height:min(40vh,290px)!important;object-fit:contain!important}
.target-preview.full-scene-missing>div{width:100%!important;background:#ffffff12!important}
.safe-nav{direction:ltr!important}
/* Animal missing-letter rounds use the whole scene, not the legacy left rail. */
#app:has(.target-preview.missing-letters-stage:not(.hidden)){background:#0b526e url('assets/optimized/zones-bg-animals-1.2d16519f83d7.webp') center/cover no-repeat!important}
#app:has(.target-preview.missing-letters-stage:not(.hidden)) canvas{background:transparent!important}
#app:has(.target-preview.missing-letters-stage:not(.hidden)) .target-preview{left:3%!important;right:3%!important;top:9%!important;bottom:14%!important;width:auto!important;height:auto!important;transform:none!important;display:grid!important;grid-template-columns:1fr!important;align-content:start!important;justify-items:center!important;padding:18px!important;border-radius:26px!important;background:#073a53d9!important;border:4px solid #70ead7!important}
#app:has(.target-preview.missing-letters-stage:not(.hidden)) .target-preview>img{width:min(72vw,360px)!important;height:min(39vh,290px)!important;object-fit:contain!important}
#app:has(.target-preview.missing-letters-stage:not(.hidden)) .target-preview>div{width:100%!important;background:#ffffff12!important}
#app:has(.target-preview.missing-letters-stage:not(.hidden)) #targetEnglish{direction:ltr!important;unicode-bidi:isolate!important;letter-spacing:.14em!important}
/* A mask is an English word: keep its visual order even inside RTL chrome. */
#examScreen.missing-letter-exam #examPrompt strong,#challengeScreen .missing-pair-choice,#targetEnglish.missing-word-progress{direction:ltr!important;unicode-bidi:isolate!important}
.safe-nav .home-action{order:1!important}
.safe-nav #lessonStart,.safe-nav #continue,.safe-nav #examResultContinue,.safe-nav #placementNext,.safe-nav #closeHangar{order:3!important}
#start{box-sizing:border-box!important;max-height:calc(100dvh - 18px)!important;overflow-y:auto!important;overflow-x:hidden!important}
.world-carousel{max-width:100%!important;overflow:hidden!important}
.world-orb.selected{filter:none!important}
@media(max-width:620px){
  #start{padding-bottom:12px!important}
  #start .world-picker{margin-top:4px!important}
  #start .world-picker-title{font-size:18px!important}
  .celebration .reward-card{width:min(92vw,390px)!important;padding:9px 12px 11px!important}
  .celebration .reward-card img#rewardAnimal{height:min(15dvh,95px)!important}
}

/* English animal masks stay left-to-right inside Arabic screens and quizzes. */
.animal-missing-word{direction:ltr!important;unicode-bidi:isolate!important;flex-direction:row!important}
.animal-missing-word>*{direction:ltr!important;unicode-bidi:isolate!important}
#examScreen[data-world="animals"].missing-letter-exam #examPrompt .exam-ltr-mask{direction:ltr!important;unicode-bidi:isolate!important;display:inline-block!important;white-space:nowrap!important}

/* Build-the-word is an image and empty slots in one frame, with shuffled
   individual letter tiles outside the frame. It does not use word options. */
#kg1ChoiceGrid.kg1-build-grid{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:stretch!important;gap:clamp(14px,3dvh,28px)!important;direction:ltr!important;min-height:0!important}
.kg1-build-frame{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(10px,2dvh,18px);min-height:0;flex:0 1 58%;border:4px solid #8bcabb;border-radius:26px;background:#173a42;color:#fff;padding:12px 7px;overflow:hidden}
.kg1-build-frame img{display:block;width:min(60vw,240px);height:min(28dvh,210px);max-width:100%;object-fit:contain;background:transparent;border:0;box-shadow:none}
.kg1-build-slots,.kg1-build-tiles{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:clamp(3px,1vw,8px);width:100%;direction:ltr!important}
.kg1-build-slot{display:grid;place-items:center;flex:0 0 auto;width:clamp(25px,7vw,47px);height:clamp(33px,9vw,54px);border:2px solid #ffdc6e;border-radius:8px;background:#fffdf1;color:#193d57;font:900 clamp(17px,5vw,30px)/1 sans-serif;box-shadow:0 3px 0 #ae7316}
.kg1-build-slot.filled{background:#c4f6d9}
.kg1-build-tiles{gap:clamp(7px,2vw,13px);flex:0 0 auto;min-height:70px}
.kg1-build-tile{display:grid;place-items:center;flex:0 0 auto;width:clamp(43px,11vw,64px);height:clamp(48px,12vw,68px);min-height:0;padding:0;border:3px solid #e0b135;border-radius:13px;background:#fffdf2;color:#193d57;font:900 clamp(22px,6vw,35px)/1 sans-serif;box-shadow:0 4px 0 #ae7316}
.kg1-build-tile.used{visibility:hidden}.kg1-build-tile.wrong{border-color:#d95252;background:#ffdcdc}
@media(max-width:620px){.kg1-build-slot{width:clamp(25px,7vw,34px);height:clamp(32px,9vw,42px)}.kg1-build-tile{width:clamp(43px,11vw,53px);height:clamp(47px,12vw,57px)}}

/* Keep the shared non-animal result layout as it was; animals use the older card grid. */
.celebration:not(.animal-world-celebration) .reward-card{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;direction:rtl!important;width:min(90vw,430px)!important;max-height:94dvh!important;overflow:hidden!important}
.celebration:not(.animal-world-celebration) .reward-card>*{grid-area:auto!important;position:static!important;float:none!important;transform:none!important}
.celebration:not(.animal-world-celebration) .reward-card .bonus-gift,.celebration:not(.animal-world-celebration) .reward-card .reward-milestone{display:none!important}
.celebration:not(.animal-world-celebration) .reward-card img#rewardAnimal{flex:0 0 auto!important;width:min(54vw,190px)!important;height:min(24dvh,170px)!important;margin:4px auto!important}
.celebration:not(.animal-world-celebration) .reward-card .reward-actions{display:flex!important;flex:0 0 auto!important;flex-direction:row!important;width:100%!important;direction:rtl!important;gap:8px!important;margin-top:5px!important}
.celebration:not(.animal-world-celebration) .reward-card .reward-actions button{flex:1 1 0!important;width:auto!important;min-width:0!important}

/* ===== KG1 ANIMAL QUIZ — REUSE KG1 CHOICE BOARD ZONING ===== */
#examScreen[data-world="animals"][data-grade="kg1"] .exam-card{
  display:grid !important;grid-template-rows:auto auto 1fr auto auto !important;
  min-height:0 !important;max-height:calc(100dvh-24px) !important;height:calc(100dvh-24px) !important;
  overflow:hidden !important;padding:12px !important;
}
#examScreen[data-world="animals"][data-grade="kg1"] .exam-head{grid-row:1 !important;flex-shrink:0 !important;}
#examScreen[data-world="animals"][data-grade="kg1"] #examPrompt{grid-row:2 !important;flex-shrink:0 !important;margin:4px 0 8px !important;font-size:clamp(22px,5.4vw,32px) !important;line-height:1.15 !important;text-align:center !important;}
#examScreen[data-world="animals"][data-grade="kg1"] .exam-visual{grid-row:3 !important;display:flex !important;align-items:center !important;justify-content:center !important;width:100% !important;height:clamp(170px,26dvh,220px) !important;min-height:0 !important;max-height:none !important;flex:0 0 clamp(170px,26dvh,220px) !important;margin:0 0 12px !important;overflow:hidden !important;padding:0 !important;border:none !important;background:transparent !important;}
#examScreen[data-world="animals"][data-grade="kg1"] .exam-visual>img.exam-animal-image{position:static !important;inset:auto !important;display:block !important;width:100% !important;height:100% !important;max-width:250px !important;max-height:190px !important;margin:auto !important;object-fit:contain !important;object-position:center center !important;transform:none !important;flex:0 1 auto !important;}
#examScreen[data-world="animals"][data-grade="kg1"] .exam-choices{grid-row:4 !important;display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;grid-auto-rows:minmax(62px,auto) !important;align-content:start !important;gap:10px !important;width:100% !important;min-height:0 !important;margin:0 0 8px !important;padding:0 !important;direction:ltr !important;unicode-bidi:isolate !important;transform:none !important;}
#examScreen[data-world="animals"][data-grade="kg1"] .exam-choices button{min-width:0 !important;min-height:62px !important;padding:8px !important;font-size:clamp(20px,5.2vw,28px) !important;line-height:1 !important;direction:ltr !important;unicode-bidi:isolate !important;}
#examScreen[data-world="animals"][data-grade="kg1"] .exam-actions{grid-row:5 !important;flex-shrink:0 !important;display:grid !important;grid-template-columns:1fr 1fr !important;gap:10px !important;margin-top:8px !important;padding-top:8px !important;}
#examScreen[data-world="animals"][data-grade="kg1"] .exam-actions button{min-height:48px !important;font-size:clamp(16px,4vw,20px) !important;}
#examScreen[data-world="animals"][data-grade="kg1"].missing-letter-exam .exam-card{display:grid !important;grid-template-rows:auto auto 1fr auto auto !important;gap:0 !important;min-height:0 !important;padding:8px 0 0 !important;}
#examScreen[data-world="animals"][data-grade="kg1"].missing-letter-exam #examPrompt{grid-row:2 !important;margin:0 0 10px !important;}
#examScreen[data-world="animals"][data-grade="kg1"].missing-letter-exam .exam-visual{grid-row:3 !important;}
#examScreen[data-world="animals"][data-grade="kg1"].missing-letter-exam .exam-choices{grid-row:4 !important;}
#examScreen[data-world="animals"][data-grade="kg1"].missing-letter-exam .exam-actions{grid-row:5 !important;}
#examScreen[data-world="animals"][data-grade="kg1"] .exam-visual>img.exam-animal-image{transform:none !important;}

/* Missing Letter gameplay panel — move down to avoid top controls collision */
#app:has(.target-preview.missing-letters-stage:not(.hidden)) .target-preview{top:14% !important;bottom:18% !important;}
#app:has(.target-preview.missing-letters-stage:not(.hidden)) #targetEnglish{margin-top:clamp(20px,4vh,40px) !important;}

/* Build Word - ensure letter speech from tap */
.kg1-build-tile:active{transform:scale(0.98) !important;}

/* Remove transform:scale hacks for animal images in quizzes */
#examScreen[data-world="animals"][data-grade="kg1"] .exam-visual>img.exam-animal-image{transform:none !important;}
