/* ===========================================================
   學習島 · Learning Island
   Same 3-game layout as before — deep-sea reskin only.
   =========================================================== */
:root{
  --sky1:#5fc7dd; --sky2:#8fe0e8;
  --bar:#1f7fa4; --bar-edge:#14607f;
  --cream:#fbf5e6; --cream-line:#1f5a6e;
  --ink:#123a45; --green:#3aa7c2; --green-d:#1f6f9e;
  --yellow:#f2c14e; --yellow-d:#cf9f34;
  --orange:#e2853c; --orange-d:#b5652a;
  --wood:#6d7f88;
  --sand:#ecd9a8; --sand-d:#d8bd82;
  --glow:#7ef0d0;
  font-family:"SF Pro Rounded", ui-rounded, "Baloo 2", "Yuanti TC", "Yuanti SC",
    "PingFang HK", "Noto Sans TC", system-ui, sans-serif;
  color:var(--ink);
}
*{box-sizing:border-box}
html,body{overflow-x:hidden}
body{min-height:100dvh;margin:0;background:#0a2140;-webkit-tap-highlight-color:transparent;
  touch-action:manipulation}
button{font:inherit;cursor:pointer;color:inherit;border:0;background:none}
button:focus-visible{outline:4px solid #fff;outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media (prefers-reduced-motion:reduce){*{animation-duration:.001s!important;animation-iteration-count:1!important;transition-duration:.06s!important}}

/* ===========================================================
   deep-sea backdrop
   =========================================================== */
.scene{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;
  background:linear-gradient(180deg,#7fd6e4 0%,#4fc4d6 24%,#2f8fb0 50%,#1f6f9e 72%,#123a63 100%)}
.sea-rays{position:absolute;inset:0;opacity:.45;mix-blend-mode:screen;
  background:
    linear-gradient(102deg,transparent 44%,rgba(255,255,255,.5) 47%,transparent 50%),
    linear-gradient(84deg,transparent 60%,rgba(255,255,255,.35) 64%,transparent 68%),
    linear-gradient(96deg,transparent 22%,rgba(255,255,255,.3) 26%,transparent 30%)}
.sea-floor{position:absolute;left:0;right:0;bottom:0;height:15vh;
  background:linear-gradient(180deg,transparent,var(--sand-d) 55%,var(--sand));
  border-radius:50% 50% 0 0/28px 28px 0 0;opacity:.92}
.sea-kelp{position:absolute;bottom:0;width:120px;height:46vh;opacity:.5;
  background:linear-gradient(#2f8f6a,#2f8f6a);
  -webkit-mask:radial-gradient(circle at 50% 100%,#000 30%,transparent 32%) 0 0/42px 120px repeat-y;
  border-radius:40% 40% 0 0}
.kelp-l{left:2%;transform:rotate(-4deg)}
.kelp-r{right:3%;transform:rotate(5deg) scaleX(-1)}
.sea-bubbles{position:absolute;inset:0}
.sea-bubbles i{position:absolute;bottom:-30px;width:14px;height:14px;border-radius:50%;
  background:radial-gradient(circle at 34% 30%,rgba(255,255,255,.85),rgba(255,255,255,.15) 60%,transparent 70%);
  animation:rise linear infinite}
.sea-bubbles i:nth-child(1){left:6%;width:9px;height:9px;animation-duration:12s;animation-delay:-2s}
.sea-bubbles i:nth-child(2){left:17%;width:18px;height:18px;animation-duration:16s;animation-delay:-8s}
.sea-bubbles i:nth-child(3){left:28%;width:7px;height:7px;animation-duration:9s;animation-delay:-4s}
.sea-bubbles i:nth-child(4){left:39%;width:13px;height:13px;animation-duration:14s;animation-delay:-11s}
.sea-bubbles i:nth-child(5){left:50%;width:10px;height:10px;animation-duration:11s;animation-delay:-1s}
.sea-bubbles i:nth-child(6){left:61%;width:16px;height:16px;animation-duration:17s;animation-delay:-6s}
.sea-bubbles i:nth-child(7){left:70%;width:8px;height:8px;animation-duration:10s;animation-delay:-9s}
.sea-bubbles i:nth-child(8){left:80%;width:12px;height:12px;animation-duration:13s;animation-delay:-3s}
.sea-bubbles i:nth-child(9){left:88%;width:15px;height:15px;animation-duration:15s;animation-delay:-13s}
.sea-bubbles i:nth-child(10){left:94%;width:9px;height:9px;animation-duration:12s;animation-delay:-7s}
@keyframes rise{to{transform:translateY(-112vh) translateX(16px);opacity:0}}

/* ---- Jurassic Park theme: the Chinese island ---- */
body.dino{--bar:#5a7d38;--bar-edge:#3c5423;--green:#6a9a44;--green-d:#41652b;--glow:#f2c14e}
body.dino .scene{overflow:hidden;
  background:linear-gradient(180deg,#cfe7ef 0%,#dfe9c6 26%,#a7cf7c 46%,#6a9a48 66%,#3f6b34 82%,#26461f 100%)}
/* layered hills */
body.dino .scene::before{content:"";position:absolute;left:-10%;right:-10%;bottom:16%;height:40%;
  background:
    radial-gradient(60% 100% at 22% 100%,#5c8a3e 0 70%,transparent 72%),
    radial-gradient(60% 100% at 70% 100%,#4c7a34 0 70%,transparent 72%);
  opacity:.85}
/* distant volcano, bottom-right */
body.dino .scene::after{content:"";position:absolute;right:6%;bottom:16%;
  border-left:16vw solid transparent;border-right:16vw solid transparent;border-bottom:20vh solid #6b5038;
  filter:drop-shadow(0 0 0 #3a2a1c)}
body.dino .sea-rays{opacity:0}
body.dino .sea-bubbles{opacity:.12}                       /* drifting pollen/spores */
body.dino .sea-floor{background:linear-gradient(180deg,transparent,#6b4a2c 48%,#4a3220);border-radius:0}
body.dino .sea-kelp{opacity:.55;
  background:linear-gradient(#2f5d2a,#3f6b34);
  -webkit-mask:radial-gradient(ellipse 60% 30% at 50% 100%,#000 60%,transparent 62%) 0 0/60px 90px repeat-y}
body.dino .sea-life{display:none}                          /* hide the sea-creature silhouettes */
body.dino .topbar{background:linear-gradient(180deg,#79a04e,var(--bar))}
body.dino .prog-eggs{display:none}

/* ---- hub: warm two-island menu ---- */
body.hubtheme{--bar:#c98f4a;--bar-edge:#9c6a30}
body.hubtheme .scene{background:linear-gradient(180deg,#fbeccf 0%,#f4d9a8 30%,#e7bd7f 58%,#cf9a58 100%)}
body.hubtheme .sea-rays{opacity:.18}
body.hubtheme .sea-bubbles{opacity:.10}
body.hubtheme .sea-floor{background:linear-gradient(180deg,transparent,#c99a5e 55%,#b9863f)}
body.hubtheme .sea-kelp{background:linear-gradient(#3f6b34,#3f6b34);opacity:.30}
body.hubtheme .sea-life{opacity:.35}
body.hubtheme .topbar{background:linear-gradient(180deg,#e0aa63,var(--bar))}
body.hubtheme .title-wrap h1{-webkit-text-stroke-color:#7a4e1f}
body.hubtheme .prog-eggs{display:none}

/* ===========================================================
   top bar
   =========================================================== */
.topbar{position:relative;z-index:5;display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:8px clamp(10px,2vw,22px);min-height:62px;
  background:linear-gradient(180deg,#2fa6c4,var(--bar));border-bottom:5px solid var(--bar-edge);
  box-shadow:0 6px 16px rgba(0,0,0,.25)}
.tb-btn{width:46px;height:46px;flex:0 0 auto;display:grid;place-items:center;color:#1a5c76;
  background:linear-gradient(180deg,#fdfefe,#dff1f5);border:3px solid #fff;border-radius:14px;
  box-shadow:0 3px 0 var(--bar-edge)}
.tb-btn:active{transform:translateY(2px);box-shadow:none}
.tb-btn svg{width:58%;height:58%}
.tb-btn.small{width:42px;height:42px;font-size:15px;font-weight:900;color:#1a5c76}
.tb-btn.off{opacity:.45}
.tb-right{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto}
.title-wrap{display:flex;flex-direction:column;align-items:center;gap:1px;flex:0 1 auto;white-space:nowrap}
.title-wrap h1{margin:0;font-size:clamp(16px,2.9vw,26px);font-weight:900;color:#fff;
  -webkit-text-stroke:5px #0e4560;paint-order:stroke fill;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;max-width:52vw}
.prog-eggs{display:flex;gap:5px}
.prog-eggs i{width:20px;height:24px;border-radius:50% 50% 46% 46%/60% 60% 40% 40%;
  border:2px solid #0e4560;background:#cfe6ec;opacity:.4;transition:opacity .3s,transform .3s}
.prog-eggs i.done{opacity:1;background:var(--glow)}
.prog-eggs i.prog-dino{border-radius:46% 46% 40% 40%/58% 58% 42% 42%;transform:rotate(-4deg)}
.prog-eggs i.prog-dino.done{background:#a7d16a}
.prog-eggs i.pop{animation:pop .5s ease}
@keyframes pop{0%{transform:scale(1)}45%{transform:scale(1.5)}100%{transform:scale(1)}}

/* ===========================================================
   screen scaffold
   =========================================================== */
.viewport{position:relative;z-index:2}
.screen{display:none}
.screen.active{display:block;animation:fade .3s ease}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ---- map ---- */
.map{min-height:calc(100dvh - 70px);padding:clamp(16px,4vh,54px) clamp(14px,4vw,60px);position:relative}
.map-inner{max-width:660px}
.eyebrow{margin:0;color:#e7fbff;font-size:13px;font-weight:900;letter-spacing:.1em;text-shadow:0 1px 3px rgba(0,0,0,.35)}
.map-h{margin:6px 0 0;font-size:clamp(32px,6vw,64px);line-height:1.05;letter-spacing:-.04em;color:#fff;
  -webkit-text-stroke:2px #0e4560;paint-order:stroke fill}
.map-h em{font-style:normal;color:var(--yellow)}
.map-lead{max-width:460px;font-size:15px;line-height:1.7;color:#123a45;font-weight:650;
  background:rgba(251,245,230,.82);border-radius:14px;padding:8px 12px;display:inline-block}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:clamp(18px,4vh,40px)}
.card{position:relative;text-align:left;padding:16px;min-height:180px;display:grid;
  grid-template-columns:52px 1fr;grid-template-rows:1fr auto;gap:8px 12px;
  background:var(--cream);border:4px solid var(--cream-line);border-radius:22px;
  box-shadow:inset 0 0 0 3px var(--cream),inset 0 0 0 6px rgba(31,90,110,.2),0 8px 0 rgba(0,0,0,.22);
  transition:transform .15s ease}
.card:hover{transform:translateY(-4px)}
.card-ico{width:52px;height:52px;background:var(--green);border:3px solid var(--cream-line);
  border-radius:14px;display:grid;place-items:center;padding:6px}
.card.green .card-ico{background:#3aa7c2}
.card.blue .card-ico{background:#2f6f9e}
.card.dino .card-ico{background:#6b8f3a}
.card.dino.done{border-color:#8a6a3a}
.card.dino .card-txt small{color:#7a6a3e}
.card-ico svg{width:100%;height:100%}
.card-txt small{display:block;font-size:11px;font-weight:900;color:#5d7f88}
.card-txt strong{display:block;font-size:19px;margin-top:3px}
.card-txt em{display:block;font-style:normal;font-size:12px;line-height:1.55;color:#43707c;margin-top:6px}
.go{grid-column:1/-1;color:#1f6f9e;font-weight:900;font-size:13px}
.stamp{position:absolute;right:12px;top:10px;display:none;padding:3px 10px;font-size:12px;font-weight:900;
  color:#fff;background:#3fae6a;border:2px solid var(--cream-line);border-radius:10px;transform:rotate(6deg)}
.card.done .stamp{display:block;animation:pop .45s ease}
.card.done{border-color:#3fae6a}
.card.done .go{visibility:hidden}
.mascot-map{position:absolute;right:2%;bottom:2%;width:min(26vw,300px);height:min(42vh,320px)}
.mascot svg{width:100%;height:100%;overflow:visible}

/* ---- hub: one shared Adventure Base, using the original chunky UI style ---- */
.hub{min-height:calc(100dvh - 56px);padding:0;position:relative;overflow:hidden}
.hub.active{display:block}
.hub-base{position:relative;width:100%;height:calc(100dvh - 56px);min-height:560px;
  background:linear-gradient(180deg,#9ddce6 0 32%,#efd59c 32% 33%,#76b662 33% 100%)}
.hub-heading{position:absolute;z-index:12;left:50%;top:clamp(14px,3vh,28px);transform:translateX(-50%);
  width:min(92%,720px);text-align:center;pointer-events:none}
.hub .eyebrow{margin:0;color:#7a4e1f;text-shadow:0 1px 0 rgba(255,255,255,.65)}
.hub-h{margin:4px 0 0;font-size:clamp(30px,5vw,54px);line-height:1.04;letter-spacing:-.03em;
  color:#fff;-webkit-text-stroke:2px #7a4e1f;paint-order:stroke fill;text-shadow:0 4px 0 rgba(122,78,31,.18)}
.hub-h em{font-style:normal;color:#3a6b2a;-webkit-text-stroke-color:#25401c}
.hub-worlds{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr}
.hub-world{position:relative;min-width:0;overflow:hidden;border:0;padding:0;text-align:left;cursor:pointer;
  transition:filter .18s ease,transform .12s ease}
.hub-world:hover{filter:brightness(1.05)}
.hub-world:active{transform:scale(.992);filter:brightness(.98)}
.hub-world-sea{background:linear-gradient(180deg,transparent 0 33%,#5fc7dd 33%,#2f8fb0 65%,#123a63 100%);
  border-right:3px solid rgba(255,255,255,.38);clip-path:polygon(0 0,94% 0,100% 100%,0 100%);z-index:2}
.hub-world-jungle{margin-left:-6%;padding-left:6%;background:
  radial-gradient(75% 55% at 100% 74%,#3f6b34 0 60%,transparent 61%),
  radial-gradient(82% 54% at 46% 78%,#5d8f45 0 62%,transparent 63%),
  linear-gradient(180deg,transparent 0 33%,#a7cf7c 33%,#6a9a48 64%,#3f6b34 100%)}
.hub-sea-rays{position:absolute;inset:31% 0 0;opacity:.35;mix-blend-mode:screen;background:
  linear-gradient(103deg,transparent 25%,rgba(255,255,255,.55) 30%,transparent 39%),
  linear-gradient(85deg,transparent 56%,rgba(255,255,255,.35) 62%,transparent 69%)}
.hub-seabed{position:absolute;left:0;right:0;bottom:0;height:15%;background:linear-gradient(#d8bd82,#ecd9a8);
  clip-path:polygon(0 35%,18% 8%,36% 38%,54% 4%,72% 39%,88% 15%,100% 36%,100% 100%,0 100%)}
.hub-coral{position:absolute;bottom:7%;width:92px;height:105px;background:#e2853c;
  clip-path:polygon(42% 100%,38% 58%,8% 32%,34% 43%,29% 4%,49% 38%,66% 8%,62% 47%,94% 28%,68% 61%,72% 100%)}
.hub-coral-a{left:3%}.hub-coral-b{right:5%;transform:scale(.72);background:#d5654f}
.hub-coral-c{left:22%;transform:scale(.5);background:#f2c14e;z-index:1}
.hub-starfish{position:absolute;left:45%;bottom:9%;width:30px;height:30px;z-index:1;background:#f2a03c;
  clip-path:polygon(50% 0,63% 35%,100% 35%,70% 57%,82% 92%,50% 71%,18% 92%,30% 57%,0 35%,37% 35%);
  animation:hubTwinkle 3.6s ease-in-out infinite}
.hub-hills{position:absolute;inset:30% 0 0;background:
  radial-gradient(80% 60% at 92% 100%,#3f6b34 0 58%,transparent 59%),
  radial-gradient(80% 58% at 34% 100%,#6a9a44 0 60%,transparent 61%)}
.hub-volcano{position:absolute;right:4%;bottom:12%;width:38%;height:42%;background:linear-gradient(#8a6a4a,#5c4630);
  clip-path:polygon(50% 0,100% 100%,0 100%)}
.hub-volcano::after{content:"";position:absolute;left:34%;right:34%;top:-1%;height:16%;border-radius:50%;background:#e0603c}
.hub-tree{position:absolute;bottom:9%;width:34px;height:28%;border-radius:20px;background:#795236;z-index:2;
  transform-origin:bottom;animation:hubSway 5s ease-in-out infinite}
.hub-tree::before{content:"";position:absolute;width:150px;height:105px;border-radius:50%;left:-58px;top:-38px;
  background:#3f6b34;box-shadow:42px -24px 0 #4f8141,-35px 17px 0 #48783c}
.hub-tree-a{right:3%}
.hub-tree-b{right:43%;transform-origin:bottom;animation-name:hubSwayB;animation-delay:-2.4s}
.hub-bush{position:absolute;bottom:8%;left:6%;width:70px;height:34px;border-radius:50% 50% 20% 20%;
  background:#5d8f45;z-index:2;box-shadow:36px 4px 0 -4px #6a9a44,-24px 6px 0 -8px #4f7c38}

/* ---- extra sky/water/jungle life — enhances the "island" feel ---- */
.hub-sun{position:absolute;top:36%;width:22%;aspect-ratio:1;border-radius:50%;z-index:1;pointer-events:none}
.hub-sun-sea{left:6%;background:radial-gradient(circle,#fff8d8 0%,#ffe9a0 38%,rgba(255,233,160,0) 72%)}
.hub-sun-jungle{right:8%;background:radial-gradient(circle,#fffbe0 0%,#ffe28a 40%,rgba(255,226,138,0) 72%)}
.hub-cloud{position:absolute;top:38%;z-index:1;background:#fff;opacity:.85;border-radius:50px;pointer-events:none}
.hub-cloud::before,.hub-cloud::after{content:"";position:absolute;background:inherit;border-radius:50%}
.hub-cloud-1{left:-140px;width:78px;height:24px;animation:hubDrift 28s linear infinite}
.hub-cloud-1::before{width:40px;height:40px;left:8px;top:-20px}
.hub-cloud-1::after{width:30px;height:30px;right:8px;top:-14px}
.hub-cloud-2{left:-100px;top:47%;width:54px;height:17px;opacity:.7;animation:hubDrift 36s linear infinite;animation-delay:-12s}
.hub-cloud-2::before{width:28px;height:28px;left:6px;top:-13px}
.hub-cloud-2::after{width:20px;height:20px;right:6px;top:-9px}
.hub-cloud-3{left:-120px;top:41%;width:68px;height:21px;opacity:.8;animation:hubDrift 32s linear infinite;animation-delay:-6s}
.hub-cloud-3::before{width:36px;height:36px;left:8px;top:-17px}
.hub-cloud-3::after{width:26px;height:26px;right:6px;top:-12px}
@keyframes hubDrift{to{transform:translateX(calc(100% + 260px))}}
.hub-fish{position:absolute;z-index:1;width:20px;height:12px;background:rgba(255,255,255,.6);
  clip-path:polygon(0 50%,70% 6%,66% 35%,100% 50%,66% 65%,70% 94%)}
.hub-fish-a{left:18%;top:44%;animation:hubSwimL 7s ease-in-out infinite}
.hub-fish-b{left:58%;top:55%;animation:hubSwimR 9s ease-in-out infinite;animation-delay:-3s}
@keyframes hubSwimL{0%,100%{transform:translateX(0)}50%{transform:translateX(30px)}}
@keyframes hubSwimR{0%,100%{transform:scaleX(-1) translateX(0)}50%{transform:scaleX(-1) translateX(30px)}}
.hub-bubbles{position:absolute;z-index:1;left:38%;bottom:18%;width:26px;height:60%;pointer-events:none}
.hub-bubbles i{position:absolute;bottom:0;border-radius:50%;
  background:radial-gradient(circle at 34% 30%,rgba(255,255,255,.9),rgba(255,255,255,.15) 60%,transparent 70%);
  animation:hubRise linear infinite}
.hub-bubbles i:nth-child(1){left:0;width:8px;height:8px;animation-duration:6s}
.hub-bubbles i:nth-child(2){left:13px;width:5px;height:5px;animation-duration:4.6s;animation-delay:-2s}
.hub-bubbles i:nth-child(3){left:5px;width:6px;height:6px;animation-duration:5.4s;animation-delay:-3.4s}
.hub-bubbles i:nth-child(4){left:19px;width:4px;height:4px;animation-duration:4s;animation-delay:-1s}
@keyframes hubRise{to{transform:translateY(-110px);opacity:0}}
.hub-bird{position:absolute;top:38%;width:20px;height:9px;z-index:1;animation:hubFly 16s linear infinite}
.hub-bird::before,.hub-bird::after{content:"";position:absolute;top:0;width:11px;height:11px;
  border:2px solid #2f4a20;border-right-color:transparent;border-bottom-color:transparent;border-radius:50%}
.hub-bird::before{left:0;transform:rotate(-45deg)}
.hub-bird::after{right:0;transform:rotate(135deg) scaleX(-1)}
.hub-bird-a{left:-30px;animation-duration:15s}
.hub-bird-b{left:-60px;top:45%;animation-duration:19s;animation-delay:-7s;transform:scale(.75)}
@keyframes hubFly{to{transform:translateX(calc(100% + 90px))}}
.hub-leaf{position:absolute;top:36%;z-index:1;width:11px;height:15px;background:#8fbf57;
  border-radius:0 70% 0 70%;animation:hubFall 6.5s ease-in infinite}
.hub-leaf-a{left:32%;animation-delay:-1.8s}
.hub-leaf-b{left:56%;background:#d9a848;animation-delay:-4.4s;animation-duration:7.5s}
@keyframes hubFall{0%{transform:translateY(0) rotate(0);opacity:.9}100%{transform:translateY(230px) rotate(220deg);opacity:0}}
@keyframes hubTwinkle{50%{transform:scale(1.15) rotate(8deg)}}
@keyframes hubSway{50%{transform:rotate(2.5deg)}}
@keyframes hubSwayB{0%,100%{transform:scale(.78) rotate(0)}50%{transform:scale(.78) rotate(2.5deg)}}

.hub-world-character{position:absolute;z-index:5;display:block;filter:drop-shadow(0 9px 7px rgba(0,0,0,.28));pointer-events:none}
.hub-world-character svg{width:100%;height:100%}
.hub-sub{width:min(31vw,330px);height:min(40vh,300px);left:12%;top:30%;animation:hubFloat 4s ease-in-out infinite}
.hub-dino{width:min(30vw,320px);height:min(38vh,285px);right:10%;top:31%;animation:hubWalk 4.2s ease-in-out infinite}
@keyframes hubFloat{50%{transform:translateY(-9px) rotate(1deg)}}
@keyframes hubWalk{50%{transform:translateX(9px) rotate(-1deg)}}
.hub-world-label{position:absolute;z-index:8;left:clamp(14px,4vw,54px);right:clamp(14px,7vw,88px);bottom:clamp(18px,4vh,38px);
  display:block;padding:13px 16px 12px;background:rgba(251,245,230,.96);border:4px solid var(--cream-line);border-radius:18px;
  box-shadow:inset 0 0 0 3px var(--cream),0 7px 0 rgba(0,0,0,.22)}
.hub-world-jungle .hub-world-label{left:clamp(44px,8vw,100px);right:clamp(14px,4vw,54px);border-color:#456a34}
.hub-world-label>strong{display:block;font-size:clamp(21px,3vw,31px);color:var(--ink)}
.hub-world-label>em{display:block;margin-top:2px;font-style:normal;font-size:12px;line-height:1.45;color:#43707c;font-weight:800}
.hub-progress{display:flex;align-items:center;gap:9px;margin-top:9px}
.hub-progress>i{display:block;flex:1;height:10px;border-radius:8px;background:#d8e4df;overflow:hidden}
.hub-progress>i>b{display:block;width:0;height:100%;border-radius:inherit;background:#2f8fb0;transition:width .35s ease}
.hub-world-jungle .hub-progress>i>b{background:#6a9a44}
.hub-progress>strong{font-size:12px;color:#2f6f78;white-space:nowrap}
.hub-signpost{position:absolute;z-index:10;left:50%;bottom:12px;width:92px;height:150px;transform:translateX(-50%);pointer-events:none}
.hub-signpost i{position:absolute;left:39px;top:19px;width:14px;height:130px;border-radius:8px;background:#6d4a30;box-shadow:inset -4px 0 rgba(0,0,0,.16)}
.hub-signpost span{position:absolute;left:-49px;width:190px;height:39px;display:grid;place-items:center;border:4px solid #f8e9b9;
  border-radius:8px;background:var(--yellow);color:#5a3a14;box-shadow:0 4px 0 #9f6829;font-size:14px;font-weight:900}
.hub-signpost span:nth-of-type(1){top:0;transform:rotate(-3deg)}
.hub-signpost span:nth-of-type(2){top:50px;background:#91bf63;border-color:#d5e8ae;color:#294621;transform:rotate(3deg)}
.hub-book{position:absolute;z-index:15;right:14px;top:14px;margin:0}
.cards-2{grid-template-columns:1fr 1fr}
.cards-1{grid-template-columns:minmax(260px,420px);justify-content:center}
@media (max-width:680px){
  .hub-base{height:calc(100dvh - 56px);min-height:610px;background:#8ed3df}
  .hub-heading{top:8px}.hub .eyebrow{font-size:11px}.hub-h{font-size:clamp(25px,8vw,35px)}
  .hub-worlds{top:74px;bottom:0;display:grid;grid-template-columns:1fr;grid-template-rows:1fr 1fr;gap:9px;padding:0 10px 64px}
  .hub-world{border:4px solid rgba(255,255,255,.68);border-radius:22px;clip-path:none;margin:0;padding:0;box-shadow:0 6px 0 rgba(0,0,0,.18)}
  .hub-world-sea{background:linear-gradient(#65cada,#2f8fb0 56%,#1f6f9e)}
  .hub-world-jungle{background:linear-gradient(#efd08f,#87bd63 48%,#4d7b3e)}
  .hub-sea-rays,.hub-hills{inset:0}.hub-seabed{height:22%}
  .hub-sub{width:145px;height:112px;left:8%;top:12%}
  .hub-dino{width:150px;height:115px;right:7%;top:7%}
  .hub-volcano{height:72%;width:39%;bottom:0}.hub-tree{height:65%;bottom:0}
  .hub-world-label,.hub-world-jungle .hub-world-label{left:auto;right:9px;bottom:9px;width:58%;padding:9px 11px;border-width:3px;border-radius:14px;box-shadow:inset 0 0 0 2px var(--cream),0 4px 0 rgba(0,0,0,.2)}
  .hub-world-label>strong{font-size:19px}.hub-world-label>em{display:none}.hub-progress{margin-top:5px}
  .hub-signpost{display:none}.hub-book{top:auto;bottom:8px;right:50%;transform:translateX(50%);font-size:13px;padding:7px 14px}
  .cards-2{grid-template-columns:1fr}
}

/* ---- transient toast ---- */
.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,20px);z-index:60;
  max-width:min(88vw,420px);padding:12px 20px;border-radius:16px;
  background:rgba(24,44,26,.94);color:#fdf6e6;font-weight:800;font-size:14px;line-height:1.5;
  text-align:center;box-shadow:0 10px 26px rgba(0,0,0,.35);
  opacity:0;pointer-events:none;transition:opacity .22s ease,transform .22s ease}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---- level select ---- */
.levels{min-height:calc(100dvh - 70px);padding:clamp(16px,4vh,44px) clamp(14px,5vw,60px);
  max-width:620px;margin:0 auto}
.lvl-back{display:inline-flex;align-items:center;gap:4px;background:var(--cream);color:var(--cream-line);
  border:3px solid var(--cream-line);border-radius:12px;padding:7px 14px;font-weight:900;font-size:14px;
  box-shadow:0 3px 0 rgba(0,0,0,.2)}
.lvl-back:active{transform:translateY(2px);box-shadow:none}
.lvl-title{margin:14px 0 2px;font-size:clamp(26px,5.6vw,40px);font-weight:900;color:#fff;
  -webkit-text-stroke:2px #0e4560;paint-order:stroke fill;text-align:center}
.lvl-sub{margin:0 0 18px;text-align:center;color:#e7fbff;font-weight:900;font-size:13px;
  text-shadow:0 1px 3px rgba(0,0,0,.35)}
.levels-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:clamp(8px,2.4vw,16px)}
.lvl-node{position:relative;aspect-ratio:1;display:grid;place-items:center;
  background:var(--cream);border:4px solid var(--cream-line);border-radius:18px;
  box-shadow:inset 0 0 0 3px var(--cream),inset 0 0 0 6px rgba(31,90,110,.18),0 6px 0 rgba(0,0,0,.22);
  transition:transform .15s ease}
.lvl-node .lvl-n{font-size:clamp(20px,5vw,30px);font-weight:900;color:var(--ink)}
.lvl-node .lvl-lock{font-size:clamp(18px,4vw,24px)}
.lvl-node .lvl-tick{position:absolute;right:-5px;bottom:-5px;width:22px;height:22px;display:grid;
  place-items:center;font-size:13px;color:#fff;background:#3fae6a;border:2px solid var(--cream-line);border-radius:50%}
.lvl-node:not(.locked):hover{transform:translateY(-3px)}
.lvl-node:not(.locked):active{transform:translateY(1px)}
.lvl-node.done{background:#d6f2e0;border-color:#3fae6a}
.lvl-node.cur{border-color:var(--yellow);
  box-shadow:0 0 0 3px var(--yellow),inset 0 0 0 3px var(--cream),0 6px 0 rgba(0,0,0,.22)}
.lvl-node.cur .lvl-n{color:var(--green-d)}
.lvl-node.locked{opacity:.5}
@media (max-width:520px){.levels-grid{grid-template-columns:repeat(4,1fr)}}

/* ===========================================================
   play stage — the container-query "iPad composition" below.
   NOTE: this whole wide layout is now SUPERSEDED by the
   `@media all` vertical-flow block further down (it only held up
   in a narrow range of screen sizes). These rules are kept as a
   base but are fully overridden on every viewport.
   =========================================================== */
.play{padding:10px}
.screen.play.active{display:flex;justify-content:center}
.stage{position:relative;container-type:size;
  width:auto;height:calc(100dvh - 92px);max-height:820px;aspect-ratio:4/3;max-width:96vw;
  border-radius:22px}

/* cream signs */
.sign{position:absolute;z-index:3;display:flex;align-items:center;gap:2.2cqw;
  padding:1.8cqh 3cqw;background:var(--cream);border:0.7cqh solid var(--cream-line);
  border-radius:3cqw;font-weight:900;color:var(--ink);
  box-shadow:inset 0 0 0 0.5cqh var(--cream),inset 0 0 0 1cqh rgba(31,90,110,.2),0 1cqh 0 rgba(0,0,0,.18)}
.sign--q{top:2.5cqh;left:50%;transform:translateX(-50%);font-size:4.4cqw;max-width:64cqw}
.sign--q .badge{width:11cqw;height:11cqw;display:grid;place-items:center;background:var(--green);
  color:#fff;border:0.7cqh solid #fff;border-radius:50%;box-shadow:0 0 0 0.6cqh var(--cream-line);
  font-size:7cqw;flex:0 0 auto}
.sign--q b{color:var(--green-d);font-size:1.35em}
.sign--eq{top:3cqh;left:3cqw;font-size:5.6cqw;gap:1cqw}
.sign--eq b{color:var(--orange-d)}
.sign--eq span{padding:0 .16em;border-radius:.16em;transition:background .2s,color .2s,box-shadow .2s}
.sign--eq .q{color:var(--green-d)}
.sign--eq .hl{background:var(--yellow);color:var(--ink);
  box-shadow:0 0 .5em var(--yellow),0 .12em 0 var(--yellow-d);animation:eqpulse 1.1s ease-in-out infinite}
.sign--eq .q.hl{background:#3fae6a;color:#fff;box-shadow:0 0 .5em #3fae6a,0 .12em 0 #2f8a52;animation:none}
@keyframes eqpulse{50%{box-shadow:0 0 1em var(--yellow),0 .12em 0 var(--yellow-d)}}

/* generic buttons */
.btn-yellow,.btn-orange{display:inline-flex;align-items:center;justify-content:center;gap:.4em;
  font-weight:900;color:#0e3a4a;border-radius:1em;padding:.55em 1.2em;line-height:1;
  background:linear-gradient(180deg,#f7d564,var(--yellow));border:0.14em solid var(--yellow-d);
  box-shadow:0 0.3em 0 var(--yellow-d),0 0.5em 0.6em rgba(0,0,0,.25)}
.btn-yellow:active,.btn-orange:active{transform:translateY(.2em);box-shadow:0 .1em 0 var(--yellow-d)}
.btn-yellow:disabled{opacity:.5;cursor:not-allowed}
.btn-yellow:disabled:active{transform:none;box-shadow:0 0.3em 0 var(--yellow-d),0 0.5em 0.6em rgba(0,0,0,.25)}
.btn-yellow.ghost{background:var(--cream);color:var(--cream-line);border-color:var(--cream-line);box-shadow:0 .3em 0 var(--cream-line)}
/* a clear green "this is the OK button" tick — for pre-readers */
.btn-tick::after{content:"";width:1.5em;height:1.5em;flex:0 0 auto;border-radius:50%;
  background:#2f9e5a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round' d='M4 13l6 6L20 6'/%3E%3C/svg%3E") center/62% no-repeat;
  border:0.12em solid #fff;box-shadow:0 .14em 0 rgba(0,0,0,.28)}
.btn-orange{background:linear-gradient(180deg,#ee9a4c,var(--orange));border-color:var(--orange-d);
  color:#4a2a12;box-shadow:0 0.3em 0 var(--orange-d),0 .5em .6em rgba(0,0,0,.25)}
.btn-grey{display:inline-flex;align-items:center;justify-content:center;gap:.4em;font-weight:900;
  color:#5b6f78;border-radius:1em;padding:.55em 1.2em;line-height:1;
  background:linear-gradient(180deg,#e8ecee,#d3dbdf);border:0.14em solid #b7c2c7;
  box-shadow:0 0.3em 0 #b7c2c7}
.btn-grey:disabled{opacity:.55;cursor:not-allowed}
.btn-grey.armed{color:#5a2a1c;background:linear-gradient(180deg,#f0a184,#e5825f);
  border-color:#c56646;box-shadow:0 0.3em 0 #c56646,0 .5em .6em rgba(0,0,0,.25)}
.btn-grey.armed:active{transform:translateY(.2em);box-shadow:0 .1em 0 #c56646}

/* Parent lock and protected settings. */
.parent-lock{position:relative;overflow:hidden;font-size:18px;touch-action:none;user-select:none;-webkit-user-select:none}
.parent-lock::after{content:"";position:absolute;left:0;bottom:0;width:var(--hold,0%);height:6px;background:#3fae6a;transition:width .05s linear}
.parent-lock.holding{background:#fff4c8;color:#4c6f31;font-size:16px;font-weight:900}
.parent-card{max-width:390px;width:min(92vw,390px)}
.parent-card>p{margin:2px 0;color:#43707c;font-size:14px;font-weight:800;line-height:1.55}
.parent-actions{width:100%;display:grid;gap:10px;margin:8px 0 4px}
.parent-actions button{width:100%;min-height:48px}
.parent-reset{margin-top:6px;color:#7a4a3a}
.parent-done{margin-top:8px;min-width:150px}

/* Chinese audio gate — large, unmistakable and initiated by the child's tap. */
.sound-card{max-width:390px;width:min(92vw,390px)}
.sound-card>p{margin:2px 0 8px;color:#43707c;font-weight:800;line-height:1.55}
.sound-check-play{width:150px;height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  border-radius:34px;background:linear-gradient(180deg,#a9d17c,#7fb257);border:6px solid #fff;
  box-shadow:0 8px 0 #4c6f31;color:#24451b}
.sound-check-play span{font-size:68px;line-height:1}.sound-check-play b{font-size:15px}
.sound-check-play:active{transform:translateY(4px);box-shadow:0 4px 0 #4c6f31}
.sound-check-play.playing{animation:soundPulse .75s ease-in-out infinite}
.sound-check-status{min-height:44px;text-align:center;background:#edf5e7;border-radius:12px;padding:8px 10px}
@keyframes soundPulse{50%{transform:scale(1.06);box-shadow:0 8px 0 #4c6f31,0 0 0 10px rgba(127,178,87,.22)}}

/* Gentle, single-focus guidance for pre-readers. */
.next-cue{position:relative;z-index:2;animation:nextCue 1.15s ease-in-out infinite}
.next-cue-area{border-radius:18px;animation:nextCueArea 1.3s ease-in-out infinite}
@keyframes nextCue{50%{transform:translateY(-3px) scale(1.035);filter:drop-shadow(0 0 9px rgba(242,193,78,.9))}}
@keyframes nextCueArea{50%{box-shadow:0 0 0 5px rgba(242,193,78,.58),0 0 18px rgba(242,193,78,.5)}}
@media (prefers-reduced-motion:reduce){.next-cue,.next-cue-area{animation:none;outline:4px solid var(--yellow);outline-offset:3px}}

/* ===========================================================
   GAME 1 — eggs
   =========================================================== */
.mascot-stage{position:absolute;z-index:2;left:0;bottom:3cqh;width:30cqw;height:52cqh}
#egg .eggs{position:absolute;z-index:3;left:31cqw;top:20cqh;width:66cqw;
  display:grid;grid-template-columns:repeat(3,1fr);gap:2.4cqw 3cqw}
.egg{position:relative;border:0;background:none;padding:0;width:100%;aspect-ratio:5/6;
  transition:transform .16s cubic-bezier(.34,1.56,.64,1)}
.egg .egg-art{position:absolute;inset:0}
.egg .egg-art svg{width:100%;height:100%;overflow:visible;display:block;
  filter:drop-shadow(0 0.8cqh 0 rgba(0,0,0,.18))}
.egg .egg-num{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;
  font-weight:900;font-size:6cqw;color:var(--ink);text-shadow:0 2px 3px rgba(255,255,255,.7)}
.egg:hover{transform:translateY(-3px)}
.egg:active{transform:scale(.94)}
.egg.selected{transform:translateY(-1.4cqh) scale(1.05)}
.egg.selected .egg-art svg{filter:drop-shadow(0 0 2.4cqh rgba(126,240,208,.98)) drop-shadow(0 0 1.2cqh rgba(126,240,208,.9)) drop-shadow(0 1cqh 0 rgba(0,0,0,.18))}
.egg.selected::after{content:"";position:absolute;right:1.4cqw;bottom:1.4cqh;width:3.2cqw;height:3.2cqw;
  background:#3fae6a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M4 13l6 6L20 6'/%3E%3C/svg%3E") center/56% no-repeat;
  border:0.3cqh solid #fff;border-radius:50%;box-shadow:0 0.2cqh 0 rgba(0,0,0,.22);animation:tickIn .25s cubic-bezier(.34,1.7,.5,1) both}
@keyframes tickIn{from{transform:scale(0)}}
.egg.glow .egg-art svg{filter:drop-shadow(0 0 2.6cqh rgba(242,193,78,1)) drop-shadow(0 1cqh 0 rgba(0,0,0,.18));animation:eglow 1.4s ease-in-out infinite}
@keyframes eglow{50%{filter:drop-shadow(0 0 3.6cqh rgba(255,220,120,1)) drop-shadow(0 1cqh 0 rgba(0,0,0,.18))}}
.egg.wrong{animation:shake .4s ease}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}50%{transform:translateX(6px)}75%{transform:translateX(-4px)}}
.egg.hatch{animation:hatch .6s ease}
@keyframes hatch{30%{transform:translateY(-2cqh) rotate(-7deg)}60%{transform:translateY(0) rotate(6deg)}}

.egg-bottom{position:absolute;z-index:3;left:24cqw;right:2cqw;bottom:2.5cqh;
  display:flex;flex-direction:column;align-items:center;gap:1.6cqh}
.egg-bottom .qbar{display:flex;align-items:center;gap:2cqw;background:var(--cream);
  border:0.6cqh solid var(--cream-line);border-radius:2.4cqw;padding:1.4cqh 3cqw;
  font-size:3.6cqw;font-weight:900;
  box-shadow:inset 0 0 0 0.4cqh var(--cream),inset 0 0 0 0.9cqh rgba(31,90,110,.2)}
.egg-bottom .answers{display:flex;gap:2.4cqw}
.answer{width:8.4cqw;height:8.4cqw;border:0.6cqh solid var(--cream-line);border-radius:50%;
  background:var(--cream);color:var(--ink);font-size:4.6cqw;font-weight:900;display:grid;place-items:center}
.answer.chosen{background:var(--green);color:#fff}
.egg-bottom .btn-yellow{font-size:3.4cqw}

/* ===========================================================
   GAME 2 — feeding
   =========================================================== */
.feed-pair{display:contents}
/* sub = small spectator top-left; sea lion = big, right, facing the food */
#feed .mascot-stage{left:1cqw;top:1cqh;bottom:auto;width:15cqw;height:20cqh;z-index:2}
.trike{position:absolute;z-index:2;right:0;bottom:2cqh;width:38cqw;height:50cqh}
.trike svg{width:100%;height:100%;overflow:visible}
/* feeding spot — a patch of sand right in front of the sea lion */
.bowl{position:absolute;z-index:3;right:22cqw;bottom:5cqh;width:36cqw;height:22cqh;
  display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:1cqw;padding:2.5cqh 3cqw;
  background:radial-gradient(ellipse at 50% 34%,#ecd9a8,#d3b97e 68%,#bfa268);
  border:0.6cqh dashed rgba(255,255,255,.6);border-radius:50%/42%;
  box-shadow:inset 0 -1cqh 0 rgba(0,0,0,.14)}
.bowl .empty{font-size:2.8cqw;font-weight:900;color:#6b5b3a;position:relative}
.feed-arrow{position:absolute;z-index:3;left:35cqw;bottom:17cqh;font-size:8cqw;color:var(--glow);
  text-shadow:0 0.4cqh 0 #1f6f9e}
.basket-wrap{position:absolute;z-index:3;left:2cqw;bottom:3cqh;width:32cqw;text-align:center}
.basket-wrap .label{display:block;font-size:2.6cqw;font-weight:900;color:#e7fbff;margin-bottom:.6cqh;
  text-shadow:0 1px 2px rgba(0,0,0,.4)}
.basket{position:relative;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;
  gap:.6cqw;min-height:20cqh;padding:3cqh 3cqw;transform:rotate(-3deg);
  background:
    repeating-linear-gradient(46deg,#5b6f78 0 1.1cqh,#748c95 1.1cqh 2.2cqh),
    repeating-linear-gradient(-46deg,rgba(30,50,60,.4) 0 1.1cqh,transparent 1.1cqh 2.2cqh);
  border:1.2cqh solid #445862;border-radius:46% 46% 44% 44%/26% 26% 40% 40%;
  box-shadow:inset 0 -1.6cqh 0 rgba(0,0,0,.2)}
.leaf{width:6.4cqw;height:6.4cqw;border:0;background:none;padding:0;transition:transform .15s ease}
.bowl .leaf{width:6cqw;height:6cqw;pointer-events:none;display:block}
.leaf svg{width:100%;height:100%;display:block;filter:drop-shadow(0 0.4cqh 0 rgba(0,0,0,.25))}
.leaf:hover{transform:translateY(-.8cqh) rotate(-8deg)}
.leaf:active{transform:scale(.86)}
.leaf.pop{animation:lpop .32s cubic-bezier(.34,1.56,.64,1)}
@keyframes lpop{0%{transform:scale(0) rotate(-40deg)}70%{transform:scale(1.2) rotate(8deg)}}
.leaf.fade{animation:lfade .4s ease forwards}
@keyframes lfade{to{opacity:0;transform:translate(6cqw,-3cqh) scale(.3) rotate(40deg)}}

.feed-count{position:absolute;z-index:3;left:2cqw;top:15cqh;width:24cqw;
  display:flex;flex-wrap:wrap;gap:1cqw;align-content:flex-start}
.feed-count i{width:4.6cqw;height:4.6cqw;flex:0 0 auto;background:#5fb3c2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231f6f9e' d='M12 3c5 0 9 6 9 12 0 3-1 6-1 6H4s-1-3-1-6C3 9 7 3 12 3z'/%3E%3C/svg%3E") center/78% no-repeat;
  border-radius:44%;opacity:.35;transition:opacity .2s,filter .2s}
.feed-count i.on{opacity:1;filter:drop-shadow(0 0 1.2cqh rgba(126,240,208,.95))}
.feed-count .tally{flex:1 0 100%;margin-bottom:.8cqh;background:var(--cream);text-align:center;
  border:0.5cqh solid var(--cream-line);border-radius:2cqw;padding:.6cqh 2cqw;font-size:3.2cqw;font-weight:900}
.feed-btns{position:absolute;z-index:4;left:50%;bottom:3.4cqh;transform:translateX(-50%);
  display:flex;gap:2.5cqw;align-items:center;white-space:nowrap}
.feed-go{font-size:3.4cqw;white-space:nowrap}
.feed-clear{font-size:3cqw;white-space:nowrap}
#feed .notice{position:absolute;left:8cqw;right:8cqw;bottom:0.6cqh;z-index:4;text-align:center}

/* ===========================================================
   GAME 3 — coral hop
   =========================================================== */
.tiles{position:absolute;z-index:3;top:3cqh;right:3cqw;display:flex;gap:1.6cqw}
.tile{width:12cqw;height:12cqw;display:grid;place-items:center;position:relative;
  background:var(--cream);border:0.7cqh solid var(--cream-line);border-radius:2.2cqw;
  font-size:6cqw;font-weight:900;color:var(--ink);
  box-shadow:inset 0 0 0 0.4cqh var(--cream),inset 0 0 0 0.9cqh rgba(31,90,110,.18),0 0.6cqh 0 rgba(0,0,0,.18)}
.tile[disabled]{opacity:.5}
.tile.chosen{background:var(--green);color:#fff}
.tile.chosen::after{content:"";position:absolute;right:-1cqw;bottom:-1cqh;width:5cqw;height:5cqw;
  background:#3fae6a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round' d='M4 13l6 6L20 6'/%3E%3C/svg%3E") center/62% no-repeat;
  border:0.5cqh solid #fff;border-radius:50%}

.line-inst{position:absolute;z-index:3;left:3cqw;top:20cqh;max-width:52cqw;margin:0;
  font-size:2.8cqw;font-weight:800;color:var(--ink);background:rgba(251,245,230,.85);
  border-radius:1.6cqw;padding:1cqh 2cqw}

.trail{position:absolute;z-index:2;left:2cqw;right:2cqw;bottom:25cqh;height:26cqh;padding:0 2cqw}
.rail{position:absolute;left:0;right:0;bottom:5.2cqh;height:2.2cqh;
  background:linear-gradient(180deg,#8a97a0,#5c6d76);border-radius:1cqh;box-shadow:0 0.6cqh 0 rgba(0,0,0,.25)}
.stones{position:absolute;left:0;right:0;bottom:0;height:100%;display:grid;grid-template-columns:repeat(11,1fr);align-items:end}
.stone{position:relative;min-width:0;height:92px;display:flex;flex-direction:column;justify-content:flex-end;
  align-items:center;gap:2px;padding-bottom:6px;--p:#f0a488;--pl:#c96f52}
.stone .fp{width:100%;max-width:60px;height:auto}
.stone .fp svg{width:100%;height:auto;display:block;filter:drop-shadow(0 0.5cqh 0 rgba(0,0,0,.2))}
.stone .n{font-size:clamp(12px,2.4vw,18px);font-weight:900;color:var(--ink)}
.stone.visited{--p:#7ee0cf;--pl:#3aa08c}
.stone.checkpoint{--p:#5cc2ac;--pl:#2f8a76}
.stone.current{--p:#3fb9a0;--pl:#1f7a66}
.stone .flag{position:absolute;top:-2.6cqh;font-size:2cqw;font-weight:900;color:#fff;background:var(--orange);
  border:0.3cqh solid var(--cream-line);border-radius:.8cqw;padding:.2cqh .8cqw}

.mascot-line{position:absolute;z-index:4;bottom:6.4cqh;left:calc((.5/11)*100%);transform:translateX(-50%);
  width:12cqw;height:16cqh;transition:left .3s cubic-bezier(.23,1,.32,1)}
.mascot-line .art{position:absolute;inset:0}
.mascot-line .art svg{width:100%;height:100%;overflow:visible}
.mascot-line span{position:absolute;left:50%;bottom:-2.4cqh;transform:translateX(-50%);white-space:nowrap;
  background:var(--cream);border:0.3cqh solid var(--cream-line);border-radius:.8cqw;padding:.1cqh .8cqw;
  font-size:2cqw;font-weight:900}
.mascot-line.hop{animation:hop .3s ease}
@keyframes hop{45%{transform:translateX(-50%) translateY(-3.6cqh)}}
.arcs{position:absolute;left:0;right:0;top:0;bottom:5.2cqh;pointer-events:none}
.arcs .arc{position:absolute;bottom:0;height:9cqh;border:0.7cqh solid var(--glow);border-bottom:0;
  border-radius:50% 50% 0 0/100% 100% 0 0;filter:drop-shadow(0 0 1cqh rgba(126,240,208,.9));animation:fade .25s ease}

.line-controls{position:absolute;z-index:3;left:50%;bottom:16cqh;transform:translateX(-50%);display:flex;gap:3cqw}
.step-btn{font-size:3cqw;border-radius:44%/60%;padding:1.4cqh 3cqw}
.btn-hint{position:absolute;z-index:3;left:3cqw;bottom:3.5cqh;display:flex;align-items:center;gap:.6cqw;
  background:var(--cream);border:0.6cqh solid var(--cream-line);border-radius:2cqw;padding:1cqh 2.2cqw;
  font-size:2.8cqw;font-weight:900;box-shadow:0 0.5cqh 0 rgba(0,0,0,.18)}
.btn-hint .bulb{font-size:3.2cqw}
.line-check{position:absolute;z-index:3;left:50%;bottom:3.5cqh;transform:translateX(-50%);font-size:3.2cqw;white-space:nowrap}
.line-check.hidden{display:none}
#line .notice{position:absolute;left:20cqw;right:6cqw;bottom:1cqh;z-index:4;text-align:right}
.stone.hint-flash{animation:hflash .5s ease 3}
@keyframes hflash{50%{filter:brightness(1.4) drop-shadow(0 0 2cqh rgba(126,240,208,1))}}

.notice{font-size:2.6cqw;font-weight:900;color:#eafaff;text-align:center;min-height:1.2em;text-shadow:0 1px 2px rgba(0,0,0,.4)}
.notice.warn{color:#ffd6a0}

/* ===========================================================
   shared success bar + overlays
   =========================================================== */
.success{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:40;display:none;
  align-items:center;gap:12px;flex-wrap:wrap;justify-content:center;max-width:94vw;
  padding:12px 18px;background:#0e3a4a;border:4px solid var(--yellow);border-radius:20px;
  color:#fff;font-weight:900;box-shadow:0 10px 24px rgba(0,0,0,.4)}
.success.show{display:flex;animation:fade .3s ease}
.success .btn-yellow{font-size:15px}

.overlay{position:fixed;inset:0;z-index:50;display:none;place-items:center;padding:20px;background:rgba(6,20,40,.62)}
.overlay.show{display:grid;animation:fade .3s ease}
.overlay-card{position:relative;max-width:430px;text-align:center;padding:24px 26px;
  background:var(--cream);border:5px solid var(--cream-line);border-radius:26px;
  box-shadow:inset 0 0 0 4px var(--cream),inset 0 0 0 8px rgba(31,90,110,.2),0 14px 0 rgba(0,0,0,.3)}
.overlay-card h2{margin:10px 0 6px;font-size:25px;color:var(--ink)}
.overlay-card p{margin:0 0 16px;font-size:14px;font-weight:700;color:#43707c}
.mascot-cheer{width:130px;height:130px;margin:0 auto;animation:bob 2.4s ease-in-out infinite}
@keyframes bob{50%{transform:translateY(-8px) rotate(-2deg)}}
.confirm-actions{display:flex;gap:14px;justify-content:center;align-items:center;flex-wrap:wrap}
.confirm-actions .reset-keep{transform:scale(1.08);font-size:1.05em;padding:.6em 1.5em;
  animation:keepPulse 1.5s ease-in-out infinite}
@keyframes keepPulse{50%{box-shadow:0 .3em 0 var(--yellow-d),0 0 0 .55em rgba(242,193,78,.45)}}
.confirm-actions .reset-go{min-width:8em}
.confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.confetti i{position:absolute;top:-14px;width:11px;height:15px;border-radius:2px;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(112vh) rotate(560deg)}}

/* ===========================================================
   drifting background sea life
   =========================================================== */
.sea-life{position:absolute;inset:0;overflow:hidden}
.sea-life i{position:absolute;left:0;display:block;opacity:.085;filter:brightness(0);will-change:transform}
.sea-life i svg{width:100%;height:100%;display:block;overflow:visible}
@keyframes swimAcross{from{transform:translateX(-32vw)}to{transform:translateX(132vw)}}

/* ===========================================================
   per-stage creature prize (剪影 → 解鎖)
   =========================================================== */
.prize{position:absolute;z-index:4;top:1cqh;right:1.5cqw;width:12cqw;
  display:flex;flex-direction:column;align-items:center;gap:.5cqh}
.prize-badge{font-size:1.8cqw;font-weight:900;color:#0e3a4a;background:var(--yellow);
  border-radius:1cqw;padding:.2cqh 1cqw;white-space:nowrap;box-shadow:0 .3cqh 0 var(--yellow-d)}
.prize-art{width:100%;aspect-ratio:1;display:grid;place-items:center;padding:1.4cqw;
  background:rgba(251,245,230,.74);border:0.55cqh solid var(--cream-line);border-radius:2.6cqw;
  box-shadow:0 0.6cqh 0 rgba(0,0,0,.18)}
.prize-art svg{width:100%;height:100%;overflow:visible}
.prize.locked .prize-art{background:rgba(18,58,69,.32)}
.prize.locked .prize-art svg{filter:brightness(0);opacity:.4}
.prize-cap{font-size:1.9cqw;font-weight:900;color:#eafaff;text-align:center;max-width:17cqw;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(0,0,0,.5);
  background:rgba(18,58,69,.55);border-radius:1.2cqw;padding:.3cqh 1.2cqw}
.prize.unlocked .prize-cap{background:#3fae6a;color:#fff}
.prize.just{animation:prizePop .7s cubic-bezier(.34,1.56,.64,1)}
@keyframes prizePop{0%{transform:scale(.5) rotate(-8deg)}60%{transform:scale(1.16) rotate(4deg)}100%{transform:scale(1)}}
.prize.just .prize-art{animation:prizeGlow 1.1s ease}
@keyframes prizeGlow{0%,100%{box-shadow:0 0.6cqh 0 rgba(0,0,0,.18)}50%{box-shadow:0 0 3cqh var(--glow),0 0 6cqh var(--glow)}}

/* creature-unlocked pop-up — a big centred reward moment */
.unlock{position:fixed;inset:0;z-index:45;display:none;place-items:center;pointer-events:none;padding:20px}
.unlock.show{display:grid}
.unlock-card{position:relative;pointer-events:auto;display:flex;flex-direction:column;align-items:center;gap:9px;
  padding:22px 30px 18px;background:var(--cream);border:5px solid var(--cream-line);border-radius:26px;
  box-shadow:inset 0 0 0 4px var(--cream),inset 0 0 0 8px rgba(31,90,110,.2),0 18px 34px rgba(0,0,0,.45);
  animation:unlockIn .55s cubic-bezier(.34,1.7,.5,1) both}
.unlock.hide .unlock-card{animation:unlockOut .3s ease forwards}
.unlock-burst{position:absolute;top:46%;left:50%;width:240px;height:240px;transform:translate(-50%,-50%);z-index:-1;
  background:repeating-conic-gradient(from 0deg,var(--gold) 0 10deg,transparent 10deg 26deg);
  border-radius:50%;opacity:.4;filter:blur(1px);animation:burstSpin 5s linear infinite}
.unlock-title{font-size:15px;font-weight:900;color:#0e3a4a;background:var(--yellow);
  border-radius:12px;padding:4px 16px;box-shadow:0 4px 0 var(--yellow-d)}
.unlock-art{width:132px;height:132px;animation:unlockWiggle 1.5s ease-in-out infinite}
.unlock-art svg{width:100%;height:100%;overflow:visible;filter:drop-shadow(0 7px 0 rgba(0,0,0,.16))}
.unlock-name{font-size:23px;font-weight:900;color:var(--ink)}
@keyframes unlockIn{0%{opacity:0;transform:scale(.2) rotate(-14deg)}
  55%{opacity:1;transform:scale(1.14) rotate(5deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes unlockOut{to{opacity:0;transform:scale(.7) translateY(-16px)}}
@keyframes unlockWiggle{25%{transform:rotate(-8deg)}75%{transform:rotate(8deg)}}
@keyframes burstSpin{to{transform:translate(-50%,-50%) rotate(360deg)}}

/* creature detail card — tap a sticker in the book */
.cdex{position:fixed;inset:0;z-index:55;display:none;place-items:center;padding:24px;
  background:rgba(6,20,40,.62)}
.cdex.show{display:grid;animation:fade .25s ease}
.cdex-card{position:relative;max-width:360px;width:100%;display:flex;flex-direction:column;align-items:center;
  gap:8px;padding:26px 26px 22px;background:var(--cream);border:5px solid var(--cream-line);border-radius:26px;
  box-shadow:inset 0 0 0 4px var(--cream),inset 0 0 0 8px rgba(31,90,110,.2),0 18px 34px rgba(0,0,0,.45);
  animation:unlockIn .5s cubic-bezier(.34,1.7,.5,1) both}
.cdex-close{position:absolute;top:-14px;right:-14px;width:40px;height:40px;border-radius:50%;
  background:var(--cream);border:4px solid var(--cream-line);color:var(--cream-line);font-size:15px;font-weight:900;
  display:grid;place-items:center;box-shadow:0 4px 0 rgba(0,0,0,.28)}
.cdex-close:active{transform:translateY(2px);box-shadow:none}
.cdex-no{font-size:12px;font-weight:900;color:#8aa0a8;letter-spacing:.08em}
.cdex-art{width:150px;height:150px;animation:unlockWiggle 1.8s ease-in-out infinite}
.cdex-art svg{width:100%;height:100%;overflow:visible;filter:drop-shadow(0 8px 0 rgba(0,0,0,.16))}
.cdex.locked .cdex-art svg{filter:brightness(0);opacity:.24}
.cdex-name{font-size:24px;font-weight:900;color:var(--ink)}
.cdex.locked .cdex-name{color:#8aa0a8;letter-spacing:.12em}
.cdex-desc{margin:2px 4px 0;font-size:14px;line-height:1.7;font-weight:650;color:#43707c;text-align:center}
.cdex-go{margin-top:10px;font-size:15px;padding:.6em 1.4em}
.cdex-go[hidden]{display:none}

/* ===========================================================
   sticker book
   =========================================================== */
.book{min-height:calc(100dvh - 70px);padding:clamp(16px,4vh,44px) clamp(14px,5vw,50px);
  max-width:760px;margin:0 auto}

/* aquarium — collected creatures swim here; tap one for its detail card */
.tank{position:relative;width:100%;height:clamp(210px,46vw,340px);margin:6px 0 20px;
  border-radius:20px;overflow:hidden;
  background:linear-gradient(180deg,#48b4d0 0%,#2f8fb0 55%,#1f6f9e 100%);
  border:5px solid #eef7f9;
  box-shadow:inset 0 0 44px rgba(9,38,66,.5),0 10px 24px rgba(0,0,0,.28)}
.tank::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(116deg,rgba(255,255,255,.22) 0 12%,transparent 26% 60%,
    rgba(255,255,255,.14) 72% 80%,transparent 90%)}
.tank-sand{position:absolute;left:0;right:0;bottom:0;height:15%;z-index:1;
  background:linear-gradient(180deg,#ecd9a8,#d3ba82);border-radius:48% 48% 0 0/70% 70% 0 0}
.tank-bubbles i{position:absolute;bottom:12%;width:8px;height:8px;border-radius:50%;
  background:radial-gradient(circle at 34% 30%,rgba(255,255,255,.9),rgba(255,255,255,.15) 60%,transparent 70%);
  animation:tankRise linear infinite}
@keyframes tankRise{to{transform:translateY(-300px);opacity:0}}
.tank-fish-layer{position:absolute;left:6px;right:6px;top:6px;bottom:15%;z-index:2}
.tank-fish{position:absolute;left:0;top:0;margin:0;padding:0;border:0;background:none;
  will-change:transform;cursor:pointer;filter:drop-shadow(0 3px 4px rgba(0,0,0,.3));transition:filter .15s}
.tank-fish svg{width:100%;height:100%;overflow:visible;display:block;pointer-events:none}
.tank-fish:active{filter:drop-shadow(0 0 9px var(--glow)) drop-shadow(0 3px 4px rgba(0,0,0,.3))}
.tank-empty{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;
  text-align:center;padding:22px;margin:0;color:#eafaff;font-weight:900;font-size:14px;line-height:1.7;
  text-shadow:0 2px 3px rgba(0,0,0,.4)}
.tank-empty[hidden]{display:none}

.book-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:clamp(9px,2vw,15px)}
.sticker{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer;
  min-width:0;background:#fffaf0;border:3px solid #c9a96c;border-radius:18px;padding:8px 7px 7px;
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.75),0 5px 0 rgba(0,0,0,.2);
  transition:transform .12s ease,box-shadow .12s ease}
.sticker:hover{transform:translateY(-4px) rotate(-1deg);box-shadow:inset 0 0 0 3px rgba(255,255,255,.8),0 8px 0 rgba(0,0,0,.18)}
.sticker:active{transform:translateY(1px);box-shadow:inset 0 0 0 3px rgba(255,255,255,.75),0 2px 0 rgba(0,0,0,.2)}
.sticker-art{position:relative;width:100%;aspect-ratio:1;display:grid;place-items:center;padding:5px;isolation:isolate}
.sticker-art>i{position:absolute;z-index:-1;width:82%;height:82%;border-radius:50%;
  background:hsl(var(--sticker-tone) 48% 86%);box-shadow:inset 0 -8px 0 rgba(31,90,110,.08);transform:rotate(-7deg)}
.sticker-art svg{width:112%;height:112%;overflow:visible;filter:drop-shadow(0 5px 2px rgba(18,58,69,.2))}
.sticker-name{width:100%;font-size:12px;font-weight:900;color:var(--ink);text-align:center;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sticker-no{font-size:9px;font-weight:900;color:#80959c;letter-spacing:.08em;line-height:1.25}
.sticker.locked{background:#d7dedc;border-color:#8da0a2;box-shadow:inset 0 0 0 3px rgba(255,255,255,.28),0 5px 0 rgba(0,0,0,.18)}
.sticker.locked .sticker-art>i{background:#b7c3c2;box-shadow:inset 0 -8px 0 rgba(37,58,58,.08)}
.sticker.locked .sticker-art svg{filter:brightness(0);opacity:.22}
.sticker.locked .sticker-name{color:#718487;letter-spacing:.08em}
.sticker.unlocked{border-color:#3fae6a}
.sticker.unlocked .sticker-art{animation:stickIn .4s cubic-bezier(.34,1.56,.64,1)}
@keyframes stickIn{0%{transform:scale(.8)}60%{transform:scale(1.08)}}
@media (max-width:640px){.book-grid{grid-template-columns:repeat(4,1fr)}}
@media (max-width:430px){.book-grid{grid-template-columns:repeat(3,1fr)}}

/* ===========================================================
   book · section 2 — Jurassic Park
   Dinosaur stickers intentionally share the same collectible
   card language as the sea-creature stickers above.
   =========================================================== */
.book-sub2{margin-top:26px}
/* .dino-grid inherits .book-grid's responsive 5/4/3 columns */

.park{position:relative;width:100%;height:clamp(200px,42vw,300px);margin:6px 0 20px;
  border-radius:20px;overflow:hidden;border:5px solid #efe7d3;
  box-shadow:inset 0 0 40px rgba(40,30,10,.4),0 10px 24px rgba(0,0,0,.28)}
.park-sky{position:absolute;inset:0;
  background:linear-gradient(180deg,#bfe0ef 0%,#dcecc0 42%,#a7cf7c 66%,#7cae58 100%)}
.park-hill{position:absolute;left:-12%;right:-12%;bottom:15%;height:44%;
  background:#6a9a44;border-radius:50%/72% 72% 0 0;opacity:.5}
.park-volcano{position:absolute;right:7%;bottom:15%;width:28%;height:52%;
  background:linear-gradient(180deg,#8a6a4a,#5c4630);clip-path:polygon(50% 0,100% 100%,0 100%)}
.park-volcano::after{content:"";position:absolute;left:32%;right:32%;top:-2%;height:22%;
  background:#e0603c;border-radius:50%}
.park-ground{position:absolute;left:0;right:0;bottom:0;height:15%;
  background:linear-gradient(180deg,#7a5a34,#5f4526)}
.park-dino-layer{position:absolute;left:10px;right:34%;bottom:15%;height:0;z-index:2}
.park-dino{position:absolute;left:0;bottom:0;margin:0;padding:0;border:0;background:none;
  will-change:transform;cursor:pointer;filter:drop-shadow(0 4px 4px rgba(0,0,0,.32))}
.park-dino svg{width:100%;height:100%;overflow:visible;display:block;pointer-events:none}
.park-dino:active{filter:drop-shadow(0 0 9px var(--glow)) drop-shadow(0 4px 4px rgba(0,0,0,.32))}

/* ===========================================================
   GAME 4 · 方塊點點數 / Block Count
   =========================================================== */
.blockgame{min-height:calc(100dvh - 70px);padding:clamp(12px,2.4vh,22px) clamp(14px,5vw,44px);
  max-width:660px;margin:0 auto}
.blockgame.active{display:flex;flex-direction:column;gap:10px}
.block-ladder{display:flex;gap:8px;background:rgba(20,44,26,.42);border-radius:16px;padding:8px}
.blad{flex:1;position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:1px;
  background:rgba(255,255,255,.1);border:2px solid transparent;border-radius:12px;padding:8px 10px;
  color:#eaf3dd;font-weight:900;text-align:left}
.blad-no{font-size:11px;opacity:.72}
.blad-txt{font-size:13px}
.blad-mk{position:absolute;right:6px;top:5px;font-size:12px}
.blad.done .blad-mk{color:#3fae6a}
.blad.cur{background:var(--cream);color:var(--ink);border-color:var(--yellow);box-shadow:0 0 0 3px var(--yellow)}
.blad.locked{opacity:.45}

.block-card{background:var(--cream);border:4px solid var(--cream-line);border-radius:20px;padding:14px;
  box-shadow:inset 0 0 0 3px var(--cream),inset 0 0 0 6px rgba(31,90,110,.14)}
.block-head{display:flex;gap:12px;align-items:flex-start}
.block-badge{width:38px;height:38px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;
  background:#e0603c;color:#fff;font-size:19px;font-weight:900;border:3px solid #fff;
  box-shadow:0 0 0 3px var(--cream-line)}
.block-headtxt{min-width:0}
.block-eyebrow{margin:0;font-size:11px;font-weight:900;color:#7a6a3e;letter-spacing:.04em}
.block-q{margin:2px 0;font-size:clamp(17px,4.6vw,21px);font-weight:900;color:var(--ink);text-wrap:balance}
.block-q-en{margin:0;font-size:12px;font-weight:650;color:#6b5b3a}
.block-trays{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.block-tray{position:relative;min-height:88px;padding:26px 12px 12px;border:3px solid #c8d3bd;
  border-radius:14px;background:#eef3e4;display:flex;align-items:flex-end;justify-content:center;
  transition:opacity .2s}
.block-tray.dim{opacity:.42}
.block-tray.active{border-color:var(--yellow);background:#fbf5e6;box-shadow:0 0 0 3px rgba(242,193,78,.42)}
.block-tray.solved{border-color:#3fae6a;background:#eef8f0}
.block-tray.solved.active{border-color:#3fae6a;box-shadow:0 0 0 3px rgba(63,174,106,.4)}
.block-tray.wrong{animation:shake .42s ease}
.tray-label{position:absolute;left:10px;top:7px;font-size:11px;font-weight:900;color:#7a6a3e}
.tray-active{position:absolute;right:8px;top:6px;font-size:10px;font-weight:900;color:#0e3a4a;
  background:var(--yellow);border-radius:8px;padding:2px 7px}
.tray-count{position:absolute;right:8px;top:5px;min-width:24px;height:24px;padding:0 6px;
  display:grid;place-items:center;border-radius:12px;background:#3fae6a;color:#fff;font-size:15px;font-weight:900;
  box-shadow:0 2px 0 rgba(0,0,0,.2)}
.tray-row{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.block-cube{position:relative;width:clamp(46px,13vw,56px);height:clamp(46px,13vw,56px);flex:0 0 auto;border-radius:10px;
  background:linear-gradient(180deg,#e6b76a,#cf9142);
  box-shadow:inset 0 -7px 0 rgba(0,0,0,.2),0 4px 0 rgba(0,0,0,.22)}
.block-cube.numbered{background:linear-gradient(180deg,#e9c079,#cf9142)}
.block-cube.numbered::after{content:attr(data-n);position:absolute;inset:0;display:grid;place-items:center;
  font-size:24px;font-weight:900;color:#5a3a12;text-shadow:0 1px 0 rgba(255,255,255,.35)}
.block-tray.dim .block-cube{background:linear-gradient(180deg,#d6cbb0,#bcae8f);
  box-shadow:inset 0 -6px 0 rgba(0,0,0,.1)}
.block-crumb{margin:0;text-align:center;font-size:12px;font-weight:900;color:#5b4a2a;letter-spacing:.03em}
.block-hint{margin:10px 0 0;font-size:12px;font-weight:800;color:#5b4a2a;
  background:rgba(255,255,255,.55);border-radius:10px;padding:6px 10px}
.block-answer{display:flex;flex-direction:column;align-items:center;gap:12px}
.block-answer .answers{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
.block-answer .answer{width:clamp(52px,15vw,62px);height:clamp(52px,15vw,62px);font-size:clamp(26px,7vw,32px);border-width:3px}
.block-answer .btn-yellow{font-size:17px}

/* game 4 lives on the Math island now — sea palette instead of jungle amber */
.block-ladder{background:rgba(18,58,71,.42)}
.block-badge{background:#1f7fa4}
.block-cube{background:linear-gradient(180deg,#f2ab7c,#e07a48)}
.block-cube.numbered{background:linear-gradient(180deg,#f6b98d,#e07a48)}
.block-cube.numbered::after{color:#7a3018}
.block-tray.dim .block-cube{background:linear-gradient(180deg,#cdd8d0,#aeb9b0)}
.tray-label,.block-eyebrow{color:#3a6675}
.block-q-en,.block-crumb,.block-hint{color:#365b68}
.card.teal .card-ico{background:#2f8fb0}

/* ===========================================================
   中文島 games — 聽音選字 · 點擊配對
   =========================================================== */
.zgame{min-height:calc(100dvh - 70px);padding:clamp(14px,3vh,30px) clamp(14px,5vw,44px);
  max-width:560px;margin:0 auto}
.zgame.active{display:flex;flex-direction:column;gap:12px}
.zl-eyebrow{margin:0;font-size:12px;font-weight:900;color:#eafaff;letter-spacing:.03em;
  text-shadow:0 1px 3px rgba(0,0,0,.35)}
.zl-card{background:var(--cream);border:4px solid #4c6f31;border-radius:22px;
  padding:clamp(14px,3vw,22px);display:flex;flex-direction:column;align-items:center;gap:12px;
  box-shadow:inset 0 0 0 3px var(--cream),inset 0 0 0 6px rgba(76,111,49,.16),0 8px 0 rgba(0,0,0,.2)}
.zl-card .zl-eyebrow{color:#4c6f31;text-shadow:none;text-align:center}
/* ---- 聽音認字 : big speaker + 3 character choices ---- */
.zl-speaker{width:min(140px,40vw);aspect-ratio:1;display:grid;place-items:center;
  border-radius:30px;background:linear-gradient(180deg,#a9d17c,#7fb257);
  border:5px solid #fff;box-shadow:0 7px 0 #4c6f31}
.zl-spk-ico{font-size:clamp(56px,16vw,80px);line-height:1}
.zl-speaker:active{transform:translateY(3px);box-shadow:0 3px 0 #4c6f31}
.zl-speaker:hover{filter:brightness(1.04)}
.zl-listen-cap{margin:-2px 0 0;font-size:13px;font-weight:900;color:#4c6f31}
.zl-opts{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;width:100%}
.zl-opt{flex:1 1 auto;min-width:96px;max-width:150px;padding:16px 8px;border-radius:16px;
  background:#fff;border:3px solid #c9d3bd;font-size:clamp(28px,8vw,40px);font-weight:900;color:var(--ink);
  box-shadow:0 4px 0 rgba(0,0,0,.16)}
.zl-opt:active{transform:translateY(2px);box-shadow:0 2px 0 rgba(0,0,0,.16)}
.zl-opt.right{border-color:#3fae6a;background:#eef8f0;box-shadow:0 0 0 3px rgba(63,174,106,.4)}
.zl-prompt{margin:0;font-size:12px;font-weight:800;color:#5b4a2a;text-align:center}

/* map → book shortcut */
.book-cta{margin-top:16px;display:inline-flex;align-items:center;gap:8px;
  background:var(--cream);color:var(--cream-line);border:4px solid var(--cream-line);border-radius:16px;
  padding:9px 16px;font-weight:900;font-size:14px;box-shadow:0 6px 0 rgba(0,0,0,.22)}
.book-cta span:first-child{font-size:18px}
.book-cta b{background:#3fae6a;color:#fff;border-radius:8px;padding:2px 8px;font-size:13px}
.book-cta:active{transform:translateY(2px);box-shadow:0 3px 0 rgba(0,0,0,.22)}
#bookBtn{font-size:20px}

/* ===========================================================
   portrait / narrow — clean vertical flow
   =========================================================== */
/* Vertical flow layout — used on EVERY viewport. The old wide/container-query
   composition (rules above) only held together in a narrow band of screen
   sizes and broke on phone landscape / short windows; this single flexible
   column is responsive everywhere (it just scrolls when a screen is tiny). */
@media all {
  .play{padding:10px}
  .stage,#feed .stage,.stage--sand{position:relative;container-type:normal;
    aspect-ratio:auto;width:min(680px,94vw);height:auto;max-height:none;
    display:flex;flex-direction:column;align-items:center;gap:8px;
    padding:12px 12px 14px;border-radius:22px;
    background:rgba(251,245,230,.5);border:3px solid rgba(31,90,110,.4)}

  .sign,.sign--q,.sign--eq,.mascot-stage,#feed .mascot-stage,.trike,.prize,
  #egg .eggs,.egg-bottom,.bowl,.feed-arrow,.basket-wrap,.feed-count,.feed-go,.feed-btns,
  #feed .notice,.tiles,.line-inst,.trail,.line-controls,.btn-hint,.line-check,
  #line .notice,.arcs{position:static;transform:none;inset:auto;left:auto;right:auto;
    top:auto;bottom:auto;margin:0}

  .feed-btns{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;align-items:center}

  .prize{flex-direction:row;flex-wrap:wrap;justify-content:center;width:auto;align-self:center;gap:6px;
    background:rgba(251,245,230,.6);border-radius:14px;padding:5px 10px}
  .prize-art{width:52px;height:52px;aspect-ratio:auto;padding:5px;border-width:3px;border-radius:12px;box-shadow:0 3px 0 rgba(0,0,0,.18)}
  .prize-badge{font-size:11px;padding:2px 7px;border-radius:8px;box-shadow:0 2px 0 var(--yellow-d)}
  .prize-cap{font-size:12px;max-width:160px;padding:3px 8px;border-radius:8px}
  .prize.just{animation:none}

  .unlock-card{padding:18px 24px 14px}
  .unlock-art{width:112px;height:112px}
  .unlock-name{font-size:21px}
  .unlock-burst{width:200px;height:200px}

  .sign{font-size:clamp(17px,4.6vw,22px);gap:10px;padding:9px 16px;border-width:4px;border-radius:16px;
    box-shadow:inset 0 0 0 3px var(--cream),inset 0 0 0 6px rgba(31,90,110,.18),0 5px 0 rgba(0,0,0,.18)}
  .sign--q .badge{width:clamp(46px,12vw,58px);height:clamp(46px,12vw,58px);font-size:clamp(26px,7vw,34px);
    border-width:3px;box-shadow:0 0 0 3px var(--cream-line)}
  .sign--eq{font-size:clamp(22px,6vw,30px);gap:5px}
  .sign--eq span{padding:0 .14em}

  .mascot-stage{width:110px;height:110px;flex:0 0 auto}
  #feed .mascot-stage{display:none}
  #egg .mascot-stage{display:none}
  .trike{width:132px;height:118px;flex:0 0 auto}
  .feed-pair{display:flex;align-items:flex-end;justify-content:center;width:100%}

  /* game 1: fit the grid + question + answers on one phone screen */
  #egg .stage{gap:6px;padding:10px 12px}
  #egg .eggs{width:100%;max-width:236px;grid-template-columns:repeat(3,minmax(0,68px));justify-content:center;gap:8px}
  .egg .egg-num{font-size:21px}
  .egg.selected::after{width:14px;height:14px;right:4px;bottom:4px;border-width:2px;box-shadow:none}
  .egg-bottom{width:100%;gap:6px}
  .egg-bottom .qbar{font-size:13px;padding:5px 12px;border-width:4px;border-radius:14px}
  .answer{width:40px;height:40px;font-size:21px;border-width:3px}
  .egg-bottom .btn-yellow{font-size:16px}
  #egg .prize-art{width:44px;height:44px}

  .bowl{width:min(88%,380px);height:auto;min-height:96px;aspect-ratio:auto;padding:14px 16px;border-width:8px;gap:8px}
  .bowl .leaf{width:44px;height:44px}
  .bowl .empty{font-size:14px}
  .feed-arrow{font-size:30px;transform:rotate(-90deg)}
  .basket-wrap{width:min(92%,400px)}
  .basket-wrap .label{font-size:13px;margin-bottom:2px}
  .basket{min-height:74px;gap:7px;padding:12px;border-width:8px;transform:none}
  .basket .leaf,.leaf{width:40px;height:40px}
  .feed-count{width:min(90%,360px);gap:9px 10px;justify-content:center}
  .feed-count i{width:34px;height:34px}
  .feed-count .tally{font-size:15px;padding:5px 16px;border-width:3px;margin-bottom:6px}
  .feed-go{font-size:17px}
  .feed-clear{font-size:15px}
  .notice{font-size:13px}

  .tiles{gap:12px}
  .tile{width:64px;height:64px;font-size:30px;border-width:4px;border-radius:14px;
    box-shadow:inset 0 0 0 3px var(--cream),inset 0 0 0 6px rgba(31,90,110,.16),0 4px 0 rgba(0,0,0,.18)}
  .tile.chosen::after{width:26px;height:26px;right:-6px;bottom:-6px;border-width:3px}
  .line-inst{font-size:14px;padding:7px 12px;border-radius:12px;text-align:center;max-width:100%}
  .trail{position:relative;width:100%;height:118px;padding:0 20px}
  .rail{bottom:26px;height:8px}
  .stones{bottom:0}
  .stone{height:64px}
  .stone .n{font-size:12px;margin-top:-4px}
  .stone .flag{font-size:9px;top:-14px;padding:1px 4px}
  .mascot-line{width:46px;height:64px;bottom:50px}
  .mascot-line span{font-size:10px;bottom:-12px;padding:1px 4px}
  .arcs{bottom:26px}
  .arcs .arc{height:34px;border-width:4px}
  .line-controls{gap:14px}
  .step-btn{font-size:15px;padding:10px 16px;border-radius:44%/60%}
  .btn-hint{font-size:14px;padding:8px 16px;border-width:3px;border-radius:14px;box-shadow:0 4px 0 rgba(0,0,0,.18)}
  .btn-hint .bulb{font-size:16px}
  .line-check{font-size:16px}
  #line .notice{text-align:center}
}

@media (max-width:820px){
  .cards{grid-template-columns:1fr}
  .card{min-height:0}
  .mascot-map{width:120px;height:120px;right:6px;bottom:auto;top:76px}
  .map{min-height:0;padding-top:12px}
  .map-inner{padding-right:96px}
  .map-lead{padding-right:0}
}
@media (max-width:520px){
  .mascot-map{display:none}
  .map-inner{padding-right:0}
}

/* compact one-row top bar everywhere — never wrap to two rows */
@media all {
  .topbar{flex-wrap:nowrap;gap:8px;min-height:56px;padding:6px 10px}
  .tb-btn{width:42px;height:42px;border-radius:12px}
  .tb-btn.small{width:40px;height:40px;font-size:14px}
  #bookBtn{font-size:18px}
  .tb-right{gap:7px}
  .title-wrap{flex:1 1 auto;min-width:0}
  .title-wrap h1{max-width:none;font-size:clamp(14px,3.4vw,22px);-webkit-text-stroke:3px #0e4560}
}

/* short landscape (phone held sideways) can't fit the play area — ask to rotate */
#rotateHint{display:none}
@media (orientation:landscape) and (max-height:520px){
  #rotateHint{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:14px;text-align:center;padding:24px;
    background:linear-gradient(180deg,#2f8fb0,#123a63);color:#eafaff}
  #rotateHint .rh-icon{font-size:52px;animation:rhSpin 2.4s ease-in-out infinite}
  #rotateHint p{margin:0;max-width:22em;font-size:16px;font-weight:900;line-height:1.6;
    text-shadow:0 2px 4px rgba(0,0,0,.4)}
  body > *:not(#rotateHint):not(.scene){filter:blur(2px)}
}
@keyframes rhSpin{0%,60%{transform:rotate(0)}80%{transform:rotate(-90deg)}100%{transform:rotate(-90deg)}}

/* Storybook Islands — approved September 2026 presentation */
:root{--muted:#6d817d}
.hub-base{height:auto!important}.hub-heading{position:relative!important;left:auto!important;top:auto!important;transform:none!important;width:100%!important}
.title-wrap h1,.hub-h,.map-h,.lvl-title,.z-title{-webkit-text-stroke:0!important}
:is(#map,#zhIsland) .card .go{grid-column:2;grid-row:2}:is(#map,#zhIsland) .card{grid-template-rows:auto auto}
@media(max-width:700px){:is(#map,#zhIsland) .card .go{grid-column:1;grid-row:3}}
:root{--ink:#233f43;--cream:#fffdf5;--cream-line:#cdded3;--yellow:#f9cb62;--yellow-d:#dbac44;--green:#478f7f;--green-d:#327565}
body,body.hubtheme,body.dino{background:#f0eee3;color:#233f43;font-family:ui-rounded,"Arial Rounded MT Bold","PingFang HK",system-ui,sans-serif}
body>.scene{display:none}
.topbar,body.dino .topbar,body.hubtheme .topbar{background:#fffdf5;color:#233f43;border:0;border-bottom:1px solid #e5e8da;box-shadow:none;max-width:1280px;margin:auto;min-height:78px;padding:12px 28px;gap:14px}
.title-wrap h1{color:#233f43;text-shadow:none;font-size:20px}.prog-eggs{display:none}
.tb-btn,.tb-btn.small{background:#edf1e6;color:#366960;border:0;border-radius:13px;box-shadow:none;width:44px;height:44px}
.tb-btn.active{background:#dcefe8}.tb-btn.book-tab{width:auto;min-width:86px;padding:0 13px;font-size:14px;gap:5px;display:flex;align-items:center;justify-content:center}.tb-right{gap:7px}
.viewport{max-width:1280px;margin:0 auto 30px;background:#fffdf5;min-height:calc(100dvh - 100px);border-radius:0 0 30px 30px;padding:0 28px 26px;overflow:hidden}
.hub,.map,.book,.levels,.blockgame,.zgame{max-width:none;min-height:0;padding:28px 8px}
.hub-base{max-width:none;padding:0;min-height:0;background:none;border:0;box-shadow:none}.hub-base::before,.hub-base::after{display:none}
.hub-heading{text-align:left;padding:0;margin:0 0 24px}.hub-h,.map-h,.lvl-title,.z-title{color:#233f43;text-shadow:none;font-size:clamp(26px,3vw,37px);line-height:1.25;letter-spacing:-.035em;margin:0 0 10px}
.hub-heading .eyebrow,.eyebrow{color:#397d76;letter-spacing:.12em}.hub-heading p,.map-lead,.lvl-sub{color:#6d817d;text-shadow:none}.map-h em{color:#397d76}.map-inner{max-width:none;padding:0}.mascot-map{display:none}
.worlds{display:grid;grid-template-columns:1fr 1fr;gap:24px}.world{border:1px solid #dce6df;border-radius:26px;overflow:hidden;padding:0;background:#fff;text-align:left;transition:transform .2s}.world:hover{transform:translateY(-4px)}.world .scene{height:298px;position:relative;overflow:hidden;background:#bfe6e5}.world .scene svg.landscape{position:absolute;width:100%;height:100%;inset:0}.world .scene .animal{position:absolute;filter:drop-shadow(0 10px 0 #174c4c12);animation:float 6s ease-in-out infinite}.sea .a1{width:170px;left:22%;top:116px;transform:rotate(-12deg)}.sea .a2{width:92px;left:69%;top:151px;animation-delay:-3s}.jungle .a1{width:185px;left:29%;top:101px}.jungle .a2{width:89px;left:7%;top:172px;animation-delay:-2s}.tag{position:absolute;left:22px;top:20px;padding:7px 11px;border-radius:20px;background:#ffffffb8;font-size:11px;letter-spacing:.12em;font-weight:800}.world-label{padding:22px 24px;display:flex;align-items:center;gap:15px}.world-label h2{margin:0 0 4px;font-size:27px}.world-label small{color:var(--muted);font-size:13px}.arrow{margin-left:auto;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;background:#dff1ec;font-size:25px}.jungle .arrow{background:#e9efcf}
.world .scene{position:relative;inset:auto;z-index:auto;pointer-events:auto}.world .animal svg{width:100%;height:100%}
:is(#map,#zhIsland) .cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:26px 0 0}
:is(#map,#zhIsland) .card{display:grid;grid-template-columns:1fr auto;padding:0;border:1px solid #dbe5df;border-radius:25px;overflow:hidden;background:#fff;box-shadow:none;gap:0;min-height:0;align-items:center;text-align:left}
:is(#map,#zhIsland) .card:hover{transform:translateY(-3px);box-shadow:0 12px 25px #22595912}
:is(#map,#zhIsland) .game-picture{grid-column:1/-1;position:relative;display:block;height:190px;overflow:hidden;background:#c6e6df}
.game-picture>svg{width:100%;height:100%;display:block}.game-picture .scene-creature{position:absolute;width:125px;height:108px;right:7%;bottom:23px;filter:drop-shadow(0 6px 0 #20575312)}
.game-picture .scene-creature svg{width:100%;height:100%}.game-picture .egg-turtle{width:85px;height:80px;right:6%;bottom:72px;transform:rotate(-24deg)}
.game-no{position:absolute;left:17px;top:15px;font-size:10px;font-weight:800;color:#336966;background:#ffffffb8;padding:6px 9px;border-radius:20px}
:is(#map,#zhIsland) .card-txt{padding:18px 21px;min-width:0}:is(#map,#zhIsland) .card-txt strong{font-size:22px;color:#233f43}:is(#map,#zhIsland) .card-txt small{color:#488277;font-size:11px}:is(#map,#zhIsland) .card-txt em{font-size:12px;color:#6d817d;line-height:1.5}
:is(#map,#zhIsland) .card .go{position:static;margin:0 17px 0 0;background:#e0eee6;color:#397267;border:0;box-shadow:none;padding:9px;border-radius:13px;font-size:12px;white-space:nowrap}
:is(#map,#zhIsland) .card .stamp{right:12px;top:12px;bottom:auto;font-size:11px}
.lvl-back{color:#397d76;background:#edf3ea;border:0;border-radius:13px;box-shadow:none;text-shadow:none}
.lvl-node{background:#f2f6ec;border:1px solid #d5e0d0;box-shadow:0 3px 0 #d5e0d0;color:#315750;border-radius:20px}.lvl-node.done{background:#e0efe3}.lvl-node.cur{border-color:#e0af42}
.book-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0}.book-tabs button{border:1px solid #dce5d9;background:white;padding:12px 20px;border-radius:24px;font:inherit;font-size:14px;font-weight:750;color:#386359}.book-tabs button.active{background:#233f43;color:white}
#book [hidden]{display:none!important}.book-sub2{font-size:20px;margin-top:15px}
.book-grid,.book-grid.dino-grid{grid-template-columns:repeat(6,minmax(0,1fr));max-width:none;width:100%;gap:14px}
.sticker,.sticker.dino,.sticker.locked,.sticker.unlocked{background:white;border:1px solid #e0e5d9;border-radius:20px;box-shadow:none;padding:13px 10px;gap:5px}
.sticker-art{width:100%;max-width:120px;aspect-ratio:1.18}.sticker-art>i{display:none}.sticker-art svg{width:90%;height:90%;filter:drop-shadow(0 4px 2px #26413812)}
.sticker-name{font-size:13px;white-space:normal;line-height:1.4}.sticker.locked .sticker-art svg{opacity:.14}.sticker:hover{box-shadow:0 5px 15px #26413812}
.tank{height:290px;margin:28px 0 35px;border:9px solid #526d6b;border-top-width:13px;border-bottom-width:15px;border-radius:17px 17px 12px 12px;background:linear-gradient(#d6f2e8 0 12%,#87cec8 12.5%,#63b5b6 67%,#46929e);box-shadow:0 10px 0 #d9c8a6,0 15px 0 #a99b82,0 22px 24px #29484417,inset 0 0 0 3px #d8f6ee91;overflow:hidden}
.tank::after{inset:0;z-index:4;background:linear-gradient(113deg,transparent 7%,#fff3 7.2%,#fff3 10%,transparent 10.2%,transparent 14%,#fff2 14.2%,#fff2 15%,transparent 15.2%);pointer-events:none}
.tank::before{content:'';position:absolute;inset:12% 0 auto;height:4px;background:#effff2a8;z-index:3;pointer-events:none}
.tank-sand{background:#e2d2aa;border:0;box-shadow:none}.tank-decor{position:absolute;inset:0;z-index:1;pointer-events:none}.tank-fish-layer{top:15%;bottom:16%;left:8px;right:8px}.tank-empty{color:#345d59;text-shadow:none;font-size:15px;padding:25px;pointer-events:none}
.park{border:2px solid #c3d5b4;border-radius:23px;box-shadow:none}
.play{padding:26px 0}.stage,#feed .stage,.stage--sand{width:min(900px,100%);background:#edf7f3;border:1px solid #dce8dd;border-radius:25px;padding:24px;gap:14px}
.sign,.sign--q,.sign--eq{background:transparent;border:0;box-shadow:none;color:#233f43;padding:6px 12px}.sign--q .badge{background:white;color:#277b78;border:2px solid #bdd8ce;border-radius:17px;box-shadow:none;width:65px;height:65px;font-size:43px}
.btn-yellow{border:0;border-radius:16px;background:#f9cb62;color:#233f43;box-shadow:0 4px 0 #dbac44;text-shadow:none}.btn-grey{border:1px solid #d5ddd1;border-radius:14px;box-shadow:none;background:#f4f4eb;color:#53756a}
.answer{background:white;border:2px solid #ceddd2;border-radius:16px;box-shadow:0 3px 0 #d9e3d8;min-width:48px;min-height:48px}.answer.chosen{border-color:#d6a641;background:#fff1b9}
#egg .stage{padding:20px;gap:12px}#egg .eggs{max-width:345px;grid-template-columns:repeat(3,minmax(0,92px));gap:12px}#egg .egg-num{font-size:28px}
#feed .stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,.65fr);align-items:center;justify-items:center;gap:14px 22px}
#feed .sign{grid-column:1/-1;grid-row:1}.feed-pair{grid-column:2;grid-row:2;width:100%}.trike{width:190px;height:175px}.bowl{grid-column:1;grid-row:2;width:100%;min-height:140px;border:3px dashed #aaccc1;background:#fffdf4;border-radius:45%;padding:20px;display:flex;justify-content:center}
.feed-arrow{display:none}.basket-wrap{grid-column:1/-1;width:100%}.basket{width:100%;max-width:640px;margin:auto;background:none;border:0;box-shadow:none;gap:10px;padding:8px;justify-content:center}
.basket .leaf{width:54px;height:54px;background:white;border:1px solid #d9e4dc;border-radius:14px;box-shadow:0 3px 0 #dae6de;padding:5px}.bowl .leaf{width:48px;height:48px}.feed-count{grid-column:1/-1}.feed-count i{display:none}.feed-count .tally{background:none;border:0;box-shadow:none;font-size:15px;margin:0;padding:0}
.feed-btns,#feed .notice{grid-column:1/-1}.feed-go{min-width:175px;font-size:20px}.basket-wrap .label{color:#608078}.block-card,.zl-card{background:#f0f5e9;border:1px solid #d5e0d0;border-radius:24px;box-shadow:none;padding:24px}.block-cube{width:44px;height:44px}.block-tray{padding-top:28px}.block-q,.block-hint,.zl-q{color:#315750}.zgame{max-width:900px;margin:auto}.zl-speaker{background:#dce8c7;box-shadow:0 4px 0 #b1c897;border:0}
.cdex,.unlock-card{background:#fffdf5;border-color:#e0e5d9;border-radius:28px;box-shadow:0 20px 80px #183e4530}.unlock-art{width:190px;height:190px}
@media(max-width:700px){
.topbar,body.dino .topbar,body.hubtheme .topbar{padding:9px 12px;gap:7px;min-height:64px}.title-wrap h1{font-size:14px}.tb-btn,.tb-btn.small{width:36px;height:38px;font-size:13px}.tb-btn.book-tab{min-width:60px;padding:0 7px;font-size:12px}.tb-right{gap:4px}
.viewport{padding:0 14px 18px;border-radius:0}.hub,.map,.book,.levels,.blockgame,.zgame{padding:22px 0}.worlds{grid-template-columns:1fr;gap:16px}.world .scene{height:210px}.world-label{padding:16px 20px}.world-label h2{font-size:24px}.sea .a1{width:135px;top:60px}.sea .a2{width:70px;top:92px}.jungle .a1{width:155px;top:48px}.jungle .a2{width:70px;top:120px}
:is(#map,#zhIsland) .cards{gap:12px}:is(#map,#zhIsland) .game-picture{height:130px}:is(#map,#zhIsland) .card{grid-template-columns:1fr}:is(#map,#zhIsland) .card-txt{padding:12px 11px 7px}:is(#map,#zhIsland) .card-txt strong{font-size:16px}:is(#map,#zhIsland) .card-txt em{display:none}:is(#map,#zhIsland) .card-txt small{font-size:10px}:is(#map,#zhIsland) .card .go{justify-self:start;margin:0 11px 12px;padding:5px 8px;font-size:10px}.game-picture .scene-creature{width:70px;height:72px;right:3%;bottom:15px}.game-picture .egg-turtle{width:48px;height:46px;bottom:56px}.game-no{left:9px;top:9px;font-size:8px;padding:4px 6px}
.book-grid,.book-grid.dino-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.tank{height:245px}.book-tabs button{font-size:12px;padding:10px 13px}
.stage,#feed .stage,.stage--sand{padding:14px;gap:10px}#feed .stage{column-gap:10px;grid-template-columns:minmax(0,1fr) 110px}.trike{width:110px;height:120px}.bowl{min-height:113px;padding:12px;gap:5px}.bowl .leaf{width:32px;height:32px}.basket .leaf{width:42px;height:42px}.basket{gap:7px}.sign{max-width:100%;font-size:18px}.sign--q .badge{width:50px;height:50px;font-size:32px;flex-shrink:0}.feed-go{font-size:17px;min-width:130px}
#egg .stage{padding:12px;gap:8px}#egg .eggs{max-width:265px;grid-template-columns:repeat(3,minmax(0,72px));gap:8px}#egg .egg-num{font-size:24px}.block-card,.zl-card{padding:16px}.block-cube{width:38px;height:38px}
}
@media(orientation:landscape) and (max-height:520px){#rotateHint{display:none}body>*:not(#rotateHint):not(.scene){filter:none}}

/* ---- hub island animals: the bob the storybook layout asks for ---- */
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
/* the tilt lives on the inner svg so `float` owns the span's transform */
.sea .a1{transform:none}.sea .a1 svg{transform:rotate(-12deg)}
@media(prefers-reduced-motion:reduce){.world .scene .animal{animation:none}}

/* ---- topbar: keep the title readable when the book label is long (EN) ---- */
.title-wrap{min-width:0}
.title-wrap h1{max-width:100%;overflow:hidden;text-overflow:ellipsis}
@media(max-width:700px){
  .tb-btn.book-tab .book-tab-label{display:none}
  .tb-btn.book-tab{min-width:0;width:38px;padding:0}
}

/* ---- collection book paint cost ----
   .tank-fish / .park-dino are transform-animated every frame; a drop-shadow
   filter on them forces a re-raster per element per frame (60 fish = ~3600/s),
   which stalls the book on entry for a beat on iPad. Shadow stays on tap only. */
.tank-fish,.park-dino{filter:none;transition:none}
/* 80 sticker svgs in a ~4000px scroller: skip the ones nobody can see yet */
.sticker{content-visibility:auto;contain-intrinsic-size:auto 150px}

/* ---- progress: the topbar dots were being updated but never shown ----
   the old hub carried its own progress bars, so the themes hid these; the
   storybook hub has none, so the topbar is now the only place progress shows */
.prog-eggs,body.hubtheme .prog-eggs,body.dino .prog-eggs{display:flex;gap:4px}
.prog-eggs i{width:13px;height:15px;background:#dfe7dc;box-shadow:none;opacity:1}
.prog-eggs i.done{background:#4d9c86}
.prog-eggs i.prog-dino.done{background:#7fa757}
@media(max-width:700px){.prog-eggs,body.hubtheme .prog-eggs,body.dino .prog-eggs{display:none}}
:is(#math-extra,#quest){--ink:#254743;--muted:#6f8379;--teal:#337f78;--paper:#fffdf5;--yellow:#f5cc6d;--line:#dfe6d9}:is(#math-extra,#quest) *{box-sizing:border-box}:is(#math-extra,#quest){margin:0;background:#eeeee3;color:var(--ink);font-family:ui-rounded,'Arial Rounded MT Bold','PingFang HK',system-ui,sans-serif}:is(#math-extra,#quest) button{font:inherit;color:inherit;cursor:pointer}:is(#math-extra,#quest) button:disabled{cursor:default;opacity:.45}:is(#math-extra,#quest) button:focus-visible{outline:4px solid #d99432;outline-offset:4px}:is(#math-extra,#quest) button:active:not(:disabled){translate:0 2px}:is(#math-extra,#quest) button:hover:not(:disabled){filter:brightness(1.025)}:is(#math-extra,#quest) .draft{max-width:1160px;margin:auto;padding:18px 25px;display:flex;justify-content:space-between;font-size:10px;letter-spacing:.12em;color:#72877c}:is(#math-extra,#quest) .app{max-width:1160px;margin:auto;background:var(--paper);border-radius:25px;overflow:hidden;box-shadow:0 20px 50px #264e3710}:is(#math-extra,#quest) header{padding:19px 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:12px}:is(#math-extra,#quest) .brand{display:flex;align-items:center;gap:12px;border:0;background:none;font-size:20px;font-weight:800;text-align:left}:is(#math-extra,#quest) .logo{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#dbeee4;color:var(--teal);font-size:29px}:is(#math-extra,#quest) nav{display:flex;gap:8px}:is(#math-extra,#quest) nav button,:is(#math-extra,#quest) .back{border:0;border-radius:13px;background:#edf2e7;padding:11px 14px;font-size:13px;font-weight:750}:is(#math-extra,#quest) nav b{font-size:11px;margin-left:5px;color:var(--teal)}:is(#math-extra,#quest) main{padding:30px;min-height:580px}:is(#math-extra,#quest) .eyebrow{font-size:10px;font-weight:850;letter-spacing:.15em;color:var(--teal);margin:0 0 9px}:is(#math-extra,#quest) h1{font-size:clamp(26px,4vw,36px);line-height:1.25;letter-spacing:-.04em;margin:0 0 10px}:is(#math-extra,#quest) h2{margin:0 0 9px;font-size:25px}:is(#math-extra,#quest) p{line-height:1.6;color:var(--muted);margin:0}:is(#math-extra,#quest) .lead{font-size:14px}:is(#math-extra,#quest) .cards{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:27px}:is(#math-extra,#quest) .mission{border:1px solid var(--line);border-radius:24px;overflow:hidden;background:#fff}:is(#math-extra,#quest) .poster{height:183px;position:relative;background:#c5e3d9;display:flex;align-items:center;justify-content:center;overflow:hidden}:is(#math-extra,#quest) .poster:after{content:'';position:absolute;bottom:-24px;left:-10%;width:120%;height:55px;background:#e2d6b5;border-radius:50%}:is(#math-extra,#quest) .poster.sum{background:#c6dddd}:is(#math-extra,#quest) .poster .art{position:absolute;right:7px;bottom:4px;width:100px;opacity:.9;rotate:-10deg}:is(#math-extra,#quest) .demo-equation{display:flex;align-items:center;gap:14px;font-size:29px;font-weight:800;z-index:1;margin-right:40px}:is(#math-extra,#quest) .demo-equation b{background:#fffaf0;border:2px solid #95bcaa;border-radius:16px;padding:12px;min-width:57px;text-align:center}:is(#math-extra,#quest) .demo-equation b.focus{background:#f7d986}:is(#math-extra,#quest) .mission-body{padding:21px}:is(#math-extra,#quest) .mission-body h2{font-size:24px}:is(#math-extra,#quest) .mission-body p{font-size:13px}:is(#math-extra,#quest) .stages{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:20px}:is(#math-extra,#quest) .stage{border:1px solid #d4e0d1;border-radius:13px;background:#f0f5e9;padding:12px 5px;font-size:22px;font-weight:850}:is(#math-extra,#quest) .stage.done{background:#dceee0;border-color:#75ac8f}:is(#math-extra,#quest) .stage small{font-size:9px;display:block;line-height:1.4;margin-top:4px;font-weight:600}:is(#math-extra,#quest) .explainer{display:flex;gap:12px;align-items:center;background:#f5f3e7;border-radius:17px;padding:16px 20px;margin-top:24px;font-size:13px}:is(#math-extra,#quest) .explainer b{font-size:27px;color:#8ca773}:is(#math-extra,#quest) .game-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px}:is(#math-extra,#quest) .crumb{font-size:13px;color:var(--muted)}:is(#math-extra,#quest) .play-layout{display:grid;grid-template-columns:minmax(0,1fr) 195px;gap:20px}:is(#math-extra,#quest) .board{border:1px solid #d9e5d9;border-radius:24px;background:#eff6ee;padding:25px;text-align:center}:is(#math-extra,#quest) .board.sum{background:#edf5f2}:is(#math-extra,#quest) .question-title{font-size:23px;font-weight:800;margin-bottom:6px}:is(#math-extra,#quest) .instruction{font-size:14px;min-height:23px}:is(#math-extra,#quest) .progress{display:flex;justify-content:center;gap:9px;margin-bottom:22px}:is(#math-extra,#quest) .progress span{width:30px;height:30px;border:1px solid #d3dfd1;border-radius:50%;background:#fff;display:grid;place-items:center;font-size:13px;color:#87a08c}:is(#math-extra,#quest) .progress .current{background:#f7d581;color:#4f5c37;border-color:#d5ad56}:is(#math-extra,#quest) .progress .done{background:#75a790;color:#fff;border-color:#75a790}:is(#math-extra,#quest) .numberline{display:grid;grid-template-columns:repeat(10,1fr);margin:24px 0 18px;border-top:3px solid #b5c9bb;padding-top:9px;gap:3px}:is(#math-extra,#quest) .numberline span{position:relative;padding:4px 0;border-radius:9px;font-size:14px}:is(#math-extra,#quest) .numberline span:before{content:'';position:absolute;top:-12px;height:7px;width:2px;background:#9db6a6;left:50%}:is(#math-extra,#quest) .numberline .center{background:#d6e9dd;font-weight:850;color:#277263}:is(#math-extra,#quest) .numberline .reveal{background:#f8daa0;font-weight:850}:is(#math-extra,#quest) .neighbour-row{display:grid;grid-template-columns:1fr 50px 1fr 50px 1fr;align-items:center;gap:6px;margin:28px auto 20px;max-width:480px}:is(#math-extra,#quest) .slot{width:100%;aspect-ratio:1;border:2px dashed #b4c9b8;border-radius:19px;background:#fffaf0;display:grid;place-items:center;font-size:46px;font-weight:850;position:relative}:is(#math-extra,#quest) .slot.active{border:3px solid #d8ae52;background:#fff4c8;box-shadow:0 0 0 4px #f4db952e}:is(#math-extra,#quest) .slot.center{border:2px solid #9abda9;background:#dcecdf}:is(#math-extra,#quest) .slot.correct{border:2px solid #5f9d7c;background:#e2f1e2}:is(#math-extra,#quest) .slot-label{font-size:11px;color:#6a8775;margin-top:7px}:is(#math-extra,#quest) .direction{font-size:24px;color:#72a187}:is(#math-extra,#quest) .direction small{display:block;font-size:12px}:is(#math-extra,#quest) .answers{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:22px auto 0;max-width:490px}:is(#math-extra,#quest) .answer{width:61px;height:59px;border:2px solid #d3dfd0;border-radius:15px;background:white;font-size:28px;font-weight:850;box-shadow:0 3px 0 #dae3d6}:is(#math-extra,#quest) .answer.selected{background:#ffe2a0;border-color:#d9af58}:is(#math-extra,#quest) .feedback{min-height:44px;padding-top:14px;font-size:14px;color:#4d7f67}:is(#math-extra,#quest) .feedback.wrong{color:#a9653c}:is(#math-extra,#quest) .primary{border:0;border-radius:15px;background:var(--yellow);box-shadow:0 4px 0 #d8ad53;padding:14px 23px;min-width:170px;font-size:18px;font-weight:850}:is(#math-extra,#quest) .actions{margin-top:7px;display:flex;justify-content:center;gap:12px}:is(#math-extra,#quest) .secondary{border:1px solid #d7dfcd;border-radius:14px;background:var(--paper);padding:11px 14px;font-weight:750;font-size:13px}:is(#math-extra,#quest) .reward-side{padding:23px 16px;background:#faf2dd;border-radius:24px;text-align:center}:is(#math-extra,#quest) .reward-side .art{margin:24px auto 15px;max-width:145px}:is(#math-extra,#quest) .reward-side .art.locked{filter:brightness(0);opacity:.14}:is(#math-extra,#quest) .reward-side h3{font-size:17px;margin:12px 0 7px}:is(#math-extra,#quest) .reward-side p{font-size:12px}:is(#math-extra,#quest) .reward-side .pill{display:inline-block;margin-top:22px;padding:8px 12px;background:#fffaf0;border-radius:14px;font-weight:800;color:#5f8170}:is(#math-extra,#quest) .equation{display:flex;justify-content:center;align-items:center;gap:15px;font-size:40px;font-weight:850;margin:23px 0 18px}:is(#math-extra,#quest) .equation .result{min-width:70px;padding:7px;border:2px dashed #cab565;border-radius:16px;background:#fff5d0}:is(#math-extra,#quest) .groups{display:grid;grid-template-columns:1fr 30px 1fr;gap:10px;align-items:center}:is(#math-extra,#quest) .plus{font-size:28px;color:#6a9380}:is(#math-extra,#quest) .group{background:#fffdf4;border:2px solid #d4dfcb;border-radius:18px;padding:13px 9px;min-height:138px}:is(#math-extra,#quest) .group strong{font-size:15px;color:#5e806d;display:block;margin-bottom:10px}:is(#math-extra,#quest) .tokens{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-width:170px;margin:auto;justify-items:center}:is(#math-extra,#quest) .token{position:relative;width:42px;height:42px}:is(#math-extra,#quest) .token svg{width:100%;height:100%}:is(#math-extra,#quest) .token i{position:absolute;inset:auto 0 -3px;background:#fffdf0e8;border-radius:7px;margin:0 auto;width:23px;font-size:13px;font-style:normal;font-weight:850;color:#396457}:is(#math-extra,#quest) .bookgrid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-top:24px}:is(#math-extra,#quest) .sticker{border:1px solid var(--line);background:white;border-radius:20px;padding:18px 10px;text-align:center}:is(#math-extra,#quest) .art svg{width:100%;height:100%;overflow:visible}:is(#math-extra,#quest) .sticker .art{width:100%;height:95px;filter:drop-shadow(0 5px 1px #375c4010)}:is(#math-extra,#quest) .sticker h3{font-size:14px;margin:11px 0 4px}:is(#math-extra,#quest) .sticker p{font-size:10px}:is(#math-extra,#quest) .sticker .status{color:#7a926e;font-size:10px;margin-top:9px}:is(#math-extra,#quest) .art{display:block}:is(#math-extra,#quest) .collection-intro{display:flex;gap:16px;justify-content:space-between;align-items:center}:is(#math-extra,#quest) .legend{font-size:12px;margin-top:13px}:is(#math-extra,#quest) .all-done{padding:40px;text-align:center}:is(#math-extra,#quest) .all-done .art{width:180px;margin:0 auto 20px}:is(#math-extra,#quest) dialog{border:0;border-radius:28px;padding:32px;width:min(420px,90vw);text-align:center;background:#fffdf5;color:var(--ink);box-shadow:0 30px 100px #25433f30}:is(#math-extra,#quest) dialog::backdrop{background:#15372d85;backdrop-filter:blur(4px)}:is(#math-extra,#quest) dialog .art{width:195px;height:165px;margin:0 auto 20px;animation:arrive .5s ease}:is(#math-extra,#quest) dialog .primary{margin-top:22px}:is(#math-extra,#quest) dialog p{font-size:14px}:is(#math-extra,#quest) .close{position:absolute;right:12px;top:12px;background:#edf0e1;border:0;border-radius:50%;width:33px;height:33px;font-size:22px}:is(#math-extra,#quest) footer{max-width:1060px;margin:20px auto;padding:0 20px;color:var(--muted);font-size:12px;line-height:1.6}@keyframes arrive{from{scale:.7;opacity:0}to{scale:1;opacity:1}}@media(max-width:760px){.draft{padding:12px 15px}:is(#math-extra,#quest) .draft span:last-child{display:none}:is(#math-extra,#quest) .app{border-radius:0}:is(#math-extra,#quest) header{padding:14px}:is(#math-extra,#quest) .brand{font-size:15px;gap:7px}:is(#math-extra,#quest) .logo{width:34px;height:34px}:is(#math-extra,#quest) nav button{padding:10px;font-size:11px}:is(#math-extra,#quest) main{padding:20px 15px;min-height:0}:is(#math-extra,#quest) .cards{grid-template-columns:1fr;gap:17px}:is(#math-extra,#quest) .poster{height:155px}:is(#math-extra,#quest) .play-layout{grid-template-columns:1fr}:is(#math-extra,#quest) .reward-side{display:none}:is(#math-extra,#quest) .board{padding:17px 13px}:is(#math-extra,#quest) .game-header{gap:9px;margin-bottom:16px}:is(#math-extra,#quest) .crumb{font-size:11px}:is(#math-extra,#quest) .question-title{font-size:21px}:is(#math-extra,#quest) .slot{font-size:36px;border-radius:14px}:is(#math-extra,#quest) .neighbour-row{grid-template-columns:1fr 31px 1fr 31px 1fr;gap:5px;margin:24px 0 14px}:is(#math-extra,#quest) .direction{font-size:21px}:is(#math-extra,#quest) .answer{width:49px;height:49px;font-size:25px}:is(#math-extra,#quest) .answers{gap:8px;margin-top:15px}:is(#math-extra,#quest) .numberline{margin-top:19px}:is(#math-extra,#quest) .progress{margin-bottom:17px}:is(#math-extra,#quest) .bookgrid{grid-template-columns:repeat(2,1fr);gap:11px}:is(#math-extra,#quest) .equation{font-size:33px;gap:11px}:is(#math-extra,#quest) .equation .result{min-width:60px}:is(#math-extra,#quest) .groups{gap:6px;grid-template-columns:1fr 20px 1fr}:is(#math-extra,#quest) .group{padding:12px 7px}:is(#math-extra,#quest) .tokens{gap:6px}:is(#math-extra,#quest) .token{width:32px;height:35px}:is(#math-extra,#quest) .group strong{font-size:13px}:is(#math-extra,#quest) .collection-intro{display:block}:is(#math-extra,#quest) .collection-intro button{margin-top:12px}:is(#math-extra,#quest) .primary{font-size:17px;padding:13px 17px}:is(#math-extra,#quest) .explainer{padding:14px;font-size:12px}}@media(prefers-reduced-motion:reduce){*{animation:none!important}}:is(#math-extra,#quest) .game-entry{padding:0;text-align:left;transition:translate .2s,box-shadow .2s}:is(#math-extra,#quest) .game-entry:hover{translate:0 -4px;box-shadow:0 12px 24px #25474312}:is(#math-extra,#quest) .entry-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:18px;font-size:13px;color:var(--teal);font-weight:750}:is(#math-extra,#quest) .enter-arrow{display:grid;place-items:center;width:41px;height:41px;border-radius:50%;background:#e0eee5;font-size:25px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;margin:30px 0}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-tile{display:flex;flex-direction:column;align-items:center;padding:17px 12px;border:1px solid #dbe4d4;border-radius:22px;background:#fff;box-shadow:0 4px 0 #e3e8d9;gap:14px;transition:translate .2s}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-tile:hover{translate:0 -3px;border-color:#92b7a0}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-tile.done{background:#f0f7e9;border-color:#94b89a}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-heading{display:flex;align-items:center;justify-content:space-between;width:100%}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-number{display:grid;place-items:center;border-radius:16px;background:#e2eee4;color:#327c6b;width:51px;height:51px;font-size:31px;font-weight:850}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-mark{color:#81a28c;font-size:20px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-tile.done .stage-mark{color:#438c67}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-creature{display:block;width:105px;height:86px;max-width:100%;}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-creature svg{width:100%;height:100%;overflow:visible}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-creature.silhouette{filter:brightness(0);opacity:.14}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-range{font-size:11px;color:#70917c;background:#f1f4e8;padding:5px 9px;border-radius:11px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-dots{display:flex;gap:7px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-dots i{width:9px;height:9px;border:1px solid #c3d3bf;border-radius:50%;background:#f0f4e9}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-dots i.filled{background:#72a98a;border-color:#72a98a}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-caption{font-size:11px;font-weight:750;color:#62826e;line-height:1.5}:is(#math-extra,#quest) .game-grid .poster.sum .demo-equation{gap:9px;font-size:25px}:is(#math-extra,#quest) .game-grid .poster.sum .demo-equation b{min-width:48px;padding:10px}@media(max-width:760px){.stage-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-tile{padding:12px 8px;gap:11px;border-radius:18px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-number{width:40px;height:40px;font-size:26px;border-radius:12px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-creature{width:76px;height:66px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-range{font-size:9px;padding:5px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-caption{font-size:10px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-dots{gap:5px}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-dots i{width:8px;height:8px}}@media(max-width:350px){.stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

:is(#math-extra,#quest){background:transparent}:is(#math-extra,#quest) #main{min-height:0;padding:24px 0}:is(#math-extra,#quest) .back{position:static;box-shadow:none}:is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-creature svg{width:100%;height:100%}:is(#map,#zhIsland) .extra-picture{display:flex;align-items:center;justify-content:flex-start;padding-left:35px;background:#c6e1d8}:is(#map,#zhIsland) .extra-equation{font-size:38px;font-weight:850;color:#376c61;background:#fff7da;border-radius:18px;padding:16px;position:relative;z-index:1}:is(#map,#zhIsland) .extra-picture .scene-creature{opacity:.8;right:3%;width:90px}@media(max-width:700px){:is(#map,#zhIsland) .extra-equation{font-size:21px;padding:10px}:is(#map,#zhIsland) .extra-picture{padding-left:12px}:is(#map,#zhIsland) .extra-picture .scene-creature{width:60px}}
/* Deep-sea surroundings; all decorations sit behind the work surfaces. */
body.ocean-depth{background:#174759}
body.ocean-depth>.scene{display:block;background:linear-gradient(180deg,#80c5ce 0%,#3f909f 34%,#205c76 72%,#12384f 100%)}
body.ocean-depth>.scene .sea-rays{opacity:.25}
body.ocean-depth>.scene .sea-floor{opacity:.32}
body.ocean-depth>.scene .sea-life{opacity:.16}
body.ocean-depth .viewport{background:linear-gradient(180deg,#eef7ed 0%,#f8faf0 42%,#edf5eb 100%);isolation:isolate}
body.ocean-depth .topbar{background:#f0f8ee;border-bottom-color:#cde1d6}
.ocean-ornaments{display:none;position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;border-radius:inherit}
body.ocean-depth .ocean-ornaments{display:block}
.viewport>.screen{position:relative;z-index:1}
.deep-reef{position:absolute;bottom:0;left:0;width:100%;height:90px;opacity:.5}
.deep-drifter{position:absolute;display:block;width:80px;height:86px;opacity:.22;animation:deep-drift 9s ease-in-out infinite;filter:drop-shadow(0 0 9px #a3e5d7)}
.deep-drifter svg{width:100%;height:100%}
.deep-drifter.jelly{top:117px;right:20px}.deep-drifter.fish{left:7px;bottom:135px;width:72px;animation-delay:-4s}
body.ocean-depth .stage,body.ocean-depth #feed .stage,body.ocean-depth :is(#math-extra,#quest) .board{background:radial-gradient(circle at 97% 4%,#d7ece6 0 10px,transparent 11px),radial-gradient(circle at 94% 9%,#dfefe8 0 5px,transparent 6px),linear-gradient(150deg,#f2f9ed,#e6f1ec);border-color:#bcd9d0;box-shadow:0 8px 22px #3175750a}
body.ocean-depth :is(#math-extra,#quest) .reward-side{background:linear-gradient(#d7eee8,#f6efd9);border:1px solid #c4ded3}
body.ocean-depth :is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-tile{background:linear-gradient(160deg,#fffdf4,#eaf4ee);border-color:#c8dcd0}
body.ocean-depth :is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-number{background:#cde7df;border:2px solid #aed0c4;box-shadow:0 3px 0 #b7d5c7}
body.ocean-depth .block-card{background:linear-gradient(150deg,#f5f9ed,#e5f2ec);border-color:#bbd9cc}
body.ocean-depth :is(#math-extra,#quest) .numberline{border-top-color:#79aaa0}
body.ocean-depth :is(#math-extra,#quest) .slot.center{background:#d5eae2;border-color:#77aaa0;box-shadow:0 4px 0 #bdd8cd}
body.ocean-depth :is(#math-extra,#quest) .group{border-color:#b5d2c4;background:#fffdf2}
:is(#math-extra,#quest) .slot.answer-error{border:3px solid #cc7557;background:#fff0df;color:#904c37;box-shadow:0 0 0 5px #dc8a6228;animation:neighbour-wobble .5s ease-in-out}
:is(#math-extra,#quest) .slot .error-mark{position:absolute;right:-8px;top:-9px;display:grid;place-items:center;width:27px;height:27px;border:3px solid #fff9eb;border-radius:50%;background:#c87858;color:#fff;font-size:22px;line-height:1;box-shadow:0 2px 0 #ae5e4320}
:is(#math-extra,#quest) .feedback.wrong{color:#934c33;font-weight:800;background:#fff0dd;border:1px solid #e8c3a0;border-radius:12px;padding:10px 12px;margin-top:14px}
@keyframes neighbour-wobble{0%,100%{transform:translateX(0) rotate(0)}18%{transform:translateX(-7px) rotate(-3deg)}36%{transform:translateX(7px) rotate(3deg)}54%{transform:translateX(-5px) rotate(-2deg)}72%{transform:translateX(4px) rotate(1deg)}88%{transform:translateX(-2px)}}
@keyframes deep-drift{50%{transform:translateY(-12px) rotate(3deg)}}
@media(max-width:700px){.deep-drifter{width:48px;opacity:.14}.deep-drifter.jelly{right:3px;top:90px}.deep-drifter.fish{left:-9px;width:47px}.deep-reef{height:64px}}
@media(prefers-reduced-motion:reduce){.deep-drifter,:is(#math-extra,#quest) .slot.answer-error{animation:none!important}}
:is(#math-extra,#quest) .board{position:relative;isolation:isolate}
:is(#math-extra,#quest) .board.answer-success{border-color:#72b695;animation:correct-board-glow .65s ease-out}
:is(#math-extra,#quest) .answer-success .slot.correct,:is(#math-extra,#quest) .answer-success .equation .result{animation:correct-number-pop .5s ease-out;border-color:#69a987;background:#e2f2de;color:#337653}
:is(#math-extra,#quest) .feedback.correct-feedback{font-size:15px;font-weight:850;color:#327952;background:#e0f0da;border:1px solid #b4d8aa;border-radius:14px;padding:11px 13px;margin-top:14px;animation:correct-number-pop .45s ease-out}
:is(#math-extra,#quest) .answer-celebration{position:absolute;left:50%;top:43%;width:0;height:0;pointer-events:none;z-index:4}
:is(#math-extra,#quest) .answer-celebration i{position:absolute;display:block;width:11px;height:11px;border:2px solid #83c1a5;background:#d7efb9;border-radius:50%;opacity:0;animation:correct-bubble-burst .85s ease-out var(--burst-delay) both}
:is(#math-extra,#quest) .answer-celebration i:nth-child(2n){background:#ffe3a2;border-color:#d9b563;width:8px;height:8px}
@keyframes correct-number-pop{0%{transform:scale(.96)}45%{transform:scale(1.08)}100%{transform:scale(1)}}
@keyframes correct-board-glow{0%{box-shadow:0 0 0 0 #7bbf933b}50%{box-shadow:0 0 0 7px #7bbf9326}100%{box-shadow:0 0 0 0 #7bbf9300}}
@keyframes correct-bubble-burst{0%{opacity:0;transform:translate(0,15px) scale(.5)}20%{opacity:.9}100%{opacity:0;transform:translate(var(--burst-x),-95px) scale(1.15)}}
@media(prefers-reduced-motion:reduce){:is(#math-extra,#quest) .board.answer-success,:is(#math-extra,#quest) .answer-success .slot.correct,:is(#math-extra,#quest) .answer-success .equation .result,:is(#math-extra,#quest) .feedback.correct-feedback{animation:none!important}:is(#math-extra,#quest) .answer-celebration{display:none}}

/* ===== Quest games (2026-09-17) — board, stage tiles and sidebar come from the shared :is(#math-extra,#quest) rules ===== */
#quest{background:transparent}
#quest .quest-main{min-height:0;padding:24px 0}
#quest .quest-title-row{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:6px}
#quest .quest-title-row .question-title{margin:0}
#quest .quest-speaker{flex:none;display:grid;place-items:center;width:48px;height:48px;border:0;border-radius:50%;background:#dce9c6;color:#3f6b45;box-shadow:0 3px 0 #c4d3ad;font-size:24px;font-weight:800}
#quest .quest-speaker.playing{animation:quest-pulse 1s ease-in-out infinite}
#quest .quest-scene{margin:16px 0 4px;border-radius:20px;overflow:hidden}
#quest .quest-scene svg{display:block;width:100%;height:auto}
#quest .quest-scene [data-zone]{cursor:pointer;outline:none}
#quest .quest-scene .zone-hit{fill:transparent;stroke:transparent;stroke-width:4;stroke-dasharray:9 7}
#quest .quest-scene.holding .zone-hit{stroke:#d5ad56;animation:quest-dash 1.2s linear infinite}
#quest .quest-scene [data-zone]:hover .zone-hit,#quest .quest-scene [data-zone]:focus-visible .zone-hit{stroke:#c9962f;fill:#fff3c62e}
#quest .quest-choices{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:16px auto 4px}
#quest .quest-choice{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:calc((100% - 24px) / 3);max-width:124px;min-height:100px;padding:8px;border:2px solid #cad9be;border-radius:17px;background:#fffdf4;box-shadow:0 3px 0 #e1e7d3}
#quest .quest-choice svg{display:block;width:100%;height:80px}
#quest .quest-choice.selected{border-color:#d4ac50;background:#fff1bc;box-shadow:0 0 0 4px #ebcf8440}
#quest .quest-choice.used{opacity:.5}
#quest .quest-choice.right{border-color:#69a987;background:#e2f1e2;opacity:1}
#quest .quest-choice:disabled{cursor:default;opacity:1}
#quest .quest-choice .label{font-size:13px;font-weight:800;color:#5f7d67;line-height:1.2}
#quest .quest-choices.wide .quest-choice{width:calc((100% - 24px) / 3);max-width:236px;padding:6px}
#quest .quest-choices.wide .quest-choice svg,#quest .quest-opposites .quest-choice svg{height:auto}
#quest .quest-opposites .quest-choice{max-width:160px;padding:6px}
#quest .quest-choices.objects.four .quest-choice{width:calc((100% - 36px) / 4)}
#quest .quest-wrong .quest-choices,#quest .quest-wrong .quest-scene{animation:neighbour-wobble .5s ease}
@keyframes quest-pulse{50%{transform:scale(1.1);box-shadow:0 0 0 6px #b9d59a55}}
@keyframes quest-dash{to{stroke-dashoffset:-32}}

/* Chinese island: quiet jungle surroundings, the counterpart of body.ocean-depth */
body.jungle-depth{background:#3f5d35}
body.jungle-depth .viewport{background:linear-gradient(180deg,#f3f7e8 0%,#fafbf1 42%,#eef4e2 100%);isolation:isolate}
body.jungle-depth .topbar{background:#f3f7ea;border-bottom-color:#d6e3c4}
.jungle-ornaments{display:none;position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;border-radius:inherit}
body.jungle-depth .jungle-ornaments{display:block}
.jungle-ground{position:absolute;bottom:0;left:0;width:100%;height:90px;opacity:.55}
.jungle-drifter{position:absolute;display:block;width:86px;height:70px;opacity:.2;animation:deep-drift 10s ease-in-out infinite}
.jungle-drifter svg{width:100%;height:100%}
.jungle-drifter.ptero{top:112px;right:18px}
.jungle-drifter.leaf{left:10px;bottom:140px;width:46px;height:46px;animation-delay:-5s}
body.jungle-depth #quest .board,body.jungle-depth .zl-card{background:linear-gradient(150deg,#f5f9eb,#e9f0dc);border-color:#cddcbc;box-shadow:0 8px 22px #4a6b3a0a}
body.jungle-depth #quest .reward-side{background:linear-gradient(#e6edd4,#f6f0da);border:1px solid #d3dfbd}
body.jungle-depth #quest .stage-tile{background:linear-gradient(160deg,#fffdf4,#eef3e2);border-color:#d3dfc4}
body.jungle-depth #quest .stage-number{background:#dfe9c8;color:#4f7a3c;border:2px solid #c3d4a4;box-shadow:0 3px 0 #c9d8ad}
body.jungle-depth #quest .progress .done{background:#7fa25f;border-color:#7fa25f}
body.jungle-depth #quest .eyebrow{color:#5f8a4c}

@media(max-width:700px){
  #quest .quest-choices{gap:10px}
  #quest .quest-choice,#quest .quest-opposites .quest-choice{width:calc((100% - 20px) / 3);min-width:0;min-height:84px;padding:5px}
  #quest .quest-choice svg{height:62px}
  #quest .quest-choices.objects.four .quest-choice{width:calc((100% - 30px) / 4);min-height:76px}
  #quest .quest-choices.objects.four .quest-choice svg{height:48px}
  #quest .quest-choices.wide .quest-choice{width:calc((100% - 10px) / 2);max-width:none}
  #quest .quest-speaker{width:42px;height:42px;font-size:20px}
  #quest .quest-title-row{gap:8px}
  .jungle-drifter{width:52px;opacity:.13}
  .jungle-drifter.ptero{right:3px;top:90px}
  .jungle-ground{height:64px}
}
@media(prefers-reduced-motion:reduce){#quest .quest-speaker.playing,#quest .quest-scene.holding .zone-hit,.jungle-drifter,#quest .quest-wrong .quest-choices,#quest .quest-wrong .quest-scene{animation:none!important}}

/* ===== Five-question stages in the original games (2026-09-17) ===== */
.round-dots{display:flex;justify-content:center;gap:9px;margin:4px 0 14px}
.round-dots span{display:grid;place-items:center;width:30px;height:30px;border:1px solid #d3dfd1;border-radius:50%;background:#fff;font-size:13px;font-weight:800;color:#87a08c}
.round-dots .current{background:#f7d581;color:#4f5c37;border-color:#d5ad56}
.round-dots .done{background:#75a790;color:#fff;border-color:#75a790}
.round-dots-host{position:relative;z-index:2;flex:0 0 100%}
#egg.play,#feed.play,#line.play{flex-wrap:wrap;align-content:flex-start}
body.jungle-depth .round-dots .done{background:#7fa25f;border-color:#7fa25f}
body.jungle-depth #zlisten .stage-tile{background:linear-gradient(160deg,#fffdf4,#eef3e2);border-color:#d3dfc4}
body.jungle-depth #zlisten .stage-number{background:#dfe9c8;color:#4f7a3c;border:2px solid #c3d4a4;box-shadow:0 3px 0 #c9d8ad}
:is(#levels,#block,#zlisten) .stage-tile{font:inherit;color:inherit;cursor:pointer}
@media(max-width:700px){.round-dots{gap:6px;margin:0 0 10px}.round-dots span{width:26px;height:26px;font-size:12px}.zl-opts.four{display:grid;grid-template-columns:1fr 1fr;justify-items:stretch}.zl-opts.four .zl-opt{width:auto}}

/* ===== iPad landscape (2026-09-17): play surfaces go side by side so every question fits one screen =====
   Applies to landscape screens ≥1000px wide (iPad mini 1133×744 … Pro 13" 1376×1032, desktop windows).
   Portrait and phones keep the vertical layout above. No scaling tricks — ordinary grid/flex only. */
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 600px){
  /* chrome: slimmer top bar, and the page is exactly one screen tall (no stray scroll) */
  .topbar,body.dino .topbar,body.hubtheme .topbar{min-height:60px;padding:8px 24px}
  .tb-btn,.tb-btn.small{width:40px;height:40px}
  .viewport{min-height:calc(100dvh - 61px);margin-bottom:0;padding:0 28px 14px}   /* 60px bar + 1px border */
  .play{padding:12px 0}
  .hub,.map,.book,.levels,.blockgame,.zgame{padding:16px 8px}
  :is(#math-extra,#quest) #main,#quest .quest-main{padding:14px 0}
  .round-dots{margin:0 0 8px}

  /* island maps: every card in view */
  :is(#map,#zhIsland) .cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:16px}
  :is(#map,#zhIsland) .game-picture{height:132px}
  /* 之前與之後 / 海底寶藏加加樂: the equation + friend must share a 4-column card */
  :is(#map,#zhIsland) .extra-picture{justify-content:space-between;gap:8px;padding:0 10px 0 14px}
  :is(#map,#zhIsland) .extra-equation{font-size:clamp(18px,2.2vw,26px);padding:12px 13px;white-space:nowrap}
  :is(#map,#zhIsland) .extra-picture .scene-creature{position:static;flex:0 0 auto;width:clamp(58px,6vw,74px);height:58px;right:auto;bottom:auto}
  :is(#map,#zhIsland) .card-txt{padding:12px 14px}
  :is(#map,#zhIsland) .card-txt strong{font-size:18px}
  :is(#map,#zhIsland) .card-txt em{font-size:11px;line-height:1.4}
  :is(#map,#zhIsland) .card .go{margin:0 12px 12px 14px;justify-self:start;grid-column:1;grid-row:3;padding:6px 9px}
  .map-h{font-size:28px;margin-bottom:4px}
  .map-lead{margin-top:2px}

  /* stage tiles: compact so ten stages fit on one screen */
  :is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-grid{gap:12px;margin:16px 0}
  :is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-tile{padding:10px 8px;gap:7px}
  :is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-number{width:40px;height:40px;font-size:24px;border-radius:12px}
  :is(#math-extra,#quest,#levels,#block,#zlisten,#workbook) .stage-creature{width:86px;height:66px}

  /* 海龜蛋搵搵樂: eggs left, question + answers right */
  #egg .stage{display:grid;width:min(1060px,100%);grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:"eggs prize" "eggs sign" "eggs bottom";grid-template-rows:auto auto 1fr;align-items:center;column-gap:40px;row-gap:14px;padding:22px 32px}
  #egg .mascot-stage{display:none}
  #eggPrize{grid-area:prize;justify-self:center}
  #egg .sign{grid-area:sign;justify-self:center}
  #eggGrid{grid-area:eggs;align-self:center;justify-self:center}
  #egg .eggs{max-width:420px;grid-template-columns:repeat(3,minmax(0,124px));gap:16px}
  #egg .egg-num{font-size:34px}
  #eggBottom{grid-area:bottom;align-self:start}

  /* 海獅餵食員: bucket | dish, count, buttons | creature */
  #feed .stage{width:min(1100px,100%);grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(150px,.6fr);
    grid-template-areas:"sign sign sign" "basket bowl pair" "basket count pair" "basket btns pair" "note note note";align-items:center;column-gap:26px;row-gap:12px}
  #feed .sign{grid-area:sign}
  #feed .basket-wrap{grid-area:basket;align-self:stretch;display:flex;flex-direction:column;justify-content:center}
  #feed .bowl{grid-area:bowl}
  #feed .feed-count{grid-area:count}
  #feed .feed-btns{grid-area:btns}
  #feed .feed-pair{grid-area:pair}
  #feed .notice{grid-area:note}
  #feed .trike{width:170px;height:160px}

  /* 珊瑚石跳跳: already a wide layout — just tighter */
  #line .stage{width:min(1100px,100%)}

  /* 方塊點點數: trays left, answer panel right */
  #block.block-playing.active{display:grid;grid-template-columns:minmax(0,1fr) 310px;
    grid-template-areas:"back back" "crumb crumb" "dots dots" "card answer";column-gap:24px;row-gap:8px;align-items:start}
  #block.block-playing>.lvl-back{grid-area:back;justify-self:start}
  #block.block-playing>.block-crumb{grid-area:crumb}
  #block.block-playing>.round-dots{grid-area:dots}
  #block.block-playing>.block-card{grid-area:card;padding:18px 22px}
  #block.block-playing>.block-answer{grid-area:answer;align-self:center}
  #block .block-answer .answers{flex-wrap:wrap}

  /* quest games: picture left, choices + confirm right */
  #quest .board{padding:18px 22px}
  #quest .progress{margin-bottom:12px}
  :is(#math-extra,#quest) .play-layout{grid-template-columns:minmax(0,1fr) 160px;gap:16px}
  :is(#math-extra,#quest) .reward-side{padding:18px 12px}
  :is(#math-extra,#quest) .reward-side .art{max-width:120px;margin:14px auto 10px}
  #quest .quest-work{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:22px;align-items:center;margin-top:10px}
  #quest .quest-work.solo{display:block}
  #quest .quest-visual .quest-scene{margin:0}
  #quest .quest-controls .quest-choices{margin:0 auto 4px}
  #quest .quest-controls .quest-choices.objects.four .quest-choice{width:calc((100% - 12px) / 2)}
  #quest .feedback{min-height:32px;padding-top:8px}

  /* 之前與之後 / 海底寶藏加加樂: same layout, less height */
  #math-extra .board{padding:18px 22px}
  #math-extra .progress{margin-bottom:12px}
  #math-extra .numberline{margin:14px 0 8px}
  #math-extra .neighbour-row{max-width:380px;margin:10px auto}
  #math-extra .slot{font-size:38px}
  #math-extra .answers{max-width:none;margin-top:12px}
  #math-extra .equation{margin:10px 0;font-size:34px}
  #math-extra .group{min-height:0;padding:10px 8px}
  #math-extra .token{width:36px;height:36px}
  #math-extra .feedback{min-height:30px;padding-top:8px}

  /* 聽音認字 */
  .zl-card{padding-top:14px;padding-bottom:14px}

  /* book: more stickers per row */
  .book-grid,.book-grid.dino-grid{grid-template-columns:repeat(8,minmax(0,1fr))}
  .tank{height:240px;margin:18px 0 26px}
}
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 600px) and (max-height: 800px){
  /* the shortest iPads (mini 744, classic 768): trim menu headers so the map and stage menus fit */
  :is(#map,#zhIsland) .game-picture{height:112px}
  :is(#map,#zhIsland) .card-txt em{display:none}
  .map-inner .eyebrow{margin-bottom:0}
  .map-h{font-size:24px}
  .lvl-title{margin-bottom:4px}
  #block .block-ladder{margin:6px 0}
  #block .blad{padding-top:6px;padding-bottom:6px}
}

/* ===== Quest games: clearer "what next" after a correct answer + drag & drop (2026-09-17) ===== */
.quest-success{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 16px 16px;border-radius:22px;
  background:linear-gradient(180deg,#eaf6e3,#fdfbf0);border:2px solid #9fcb93;box-shadow:0 6px 0 #d2e6c8;text-align:center;animation:qs-in .45s cubic-bezier(.3,1.4,.6,1)}
.quest-success .qs-tick{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#4d9c6a;color:#fff;font-size:38px;font-weight:900;box-shadow:0 5px 0 #3c7e55}
.quest-success .qs-title{margin:4px 0 0;font-size:24px;font-weight:900;color:#2f6d45}
.quest-success .qs-sub{margin:0 0 8px;font-size:15px;font-weight:700;color:#58795f}
.quest-success .qs-next{min-width:220px;padding:16px 26px;font-size:22px;animation:qs-nudge 1.6s ease-in-out .6s infinite}
.quest-success .qs-more{display:flex;gap:10px;margin-top:6px}
.quest-success .qs-friend{width:150px;height:118px;animation:qs-bounce 1.8s ease-in-out infinite}
.quest-success .qs-friend svg{width:100%;height:100%;overflow:visible}
.quest-success.stage-clear{background:linear-gradient(180deg,#fff4cf,#fdfbf0);border-color:#e3c46a;box-shadow:0 6px 0 #ecdca6}
.quest-success.stage-clear .qs-title{color:#8a6414}
#quest .quest-work.solo .quest-success{max-width:420px;margin:14px auto 0}
@keyframes qs-in{from{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes qs-nudge{0%,70%,100%{transform:translateX(0)}80%{transform:translateX(6px)}90%{transform:translateX(0)}95%{transform:translateX(3px)}}
@keyframes qs-bounce{50%{transform:translateY(-8px)}}

#quest .quest-helpdino .quest-scene,#quest .quest-helpdino .quest-choices{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#quest .quest-helpdino .quest-choice,#quest .quest-helpdino .placed-obj{cursor:grab}
#quest .quest-choice.dragging{opacity:.35}
#quest .placed-obj.dragging{opacity:.3}
#quest .quest-scene [data-zone].drop-over .zone-hit{stroke:#3f8f5c;stroke-width:5;stroke-dasharray:0;fill:#dff3e3a8}
#quest .placed-obj.just-placed{transform-box:fill-box;transform-origin:center;animation:qs-drop .38s cubic-bezier(.3,1.6,.6,1)}
@keyframes qs-drop{0%{transform:scale(.6)}100%{transform:scale(1)}}
.quest-drag-ghost{position:fixed;left:0;top:0;z-index:9999;width:96px;height:86px;margin:-43px 0 0 -48px;pointer-events:none;
  filter:drop-shadow(0 12px 10px rgba(30,50,30,.28));will-change:transform}
.quest-drag-ghost svg{width:100%;height:100%;transform:scale(1.1) rotate(-6deg)}
@media(prefers-reduced-motion:reduce){.quest-success,.quest-success .qs-next,.quest-success .qs-friend,#quest .placed-obj.just-placed{animation:none!important}}

/* 聽音認字: more choices in later stages (3 · 4 · 6 · 8) — even rows, never 5+1 */
.zl-opts.n6,.zl-opts.n8{display:grid;gap:10px;justify-items:stretch;max-width:640px;margin:0 auto}
.zl-opts.n6{grid-template-columns:repeat(3,minmax(0,1fr))}
.zl-opts.n8{grid-template-columns:repeat(4,minmax(0,1fr))}
.zl-opts.n6 .zl-opt,.zl-opts.n8 .zl-opt{min-width:0;max-width:none;width:auto;padding:12px 4px}
@media(max-width:700px){
  .zl-opts.n6,.zl-opts.n8{gap:8px}
  .zl-opts.n8{grid-template-columns:repeat(4,minmax(0,1fr))}
  .zl-opts.n6 .zl-opt,.zl-opts.n8 .zl-opt{font-size:clamp(24px,7vw,34px);padding:10px 2px;border-radius:14px}
}


/* ===== One "well done" card in every game (2026-09-25) =====
   The quest card above is now shared: the workbook games put it in their action area and the
   older games (egg, feed, line, block, 聽音認字) put it where their answer controls were. Its
   buttons are styled here so they look the same outside the quest screen too. */
.quest-success{box-sizing:border-box;color:#254743}
.quest-success .primary{border:0;border-radius:15px;background:#f5cc6d;box-shadow:0 4px 0 #d8ad53;color:#254743;
  font:inherit;font-weight:850;cursor:pointer}
.quest-success .secondary{border:1px solid #d7dfcd;border-radius:14px;background:#fffdf5;color:#254743;
  font:inherit;font-size:13px;font-weight:750;padding:11px 14px;cursor:pointer}
.quest-success .primary:active,.quest-success .secondary:active{transform:translateY(2px)}
.quest-success .qs-next{font-size:22px}
.quest-success.sc-inline{width:100%;max-width:440px;margin:10px auto 0;flex:1 1 100%}
.sc-hidden{display:none!important}
/* workbook: once solved, the answer buttons give way to the card (the board shows the answer) */
#workbook.wb-solved .wb-choices{display:none}
#workbook #wbActions .quest-success.sc-inline{margin-top:4px}
/* older games: the card fills the control column it replaces */
#egg .egg-bottom .quest-success,#block .block-answer .quest-success{max-width:none}
#line .line-controls:has(.quest-success){display:block;width:100%}
#feed .stage > .quest-success{grid-column:1/-1;justify-self:center;max-width:560px}
#zlisten .zl-card .quest-success{max-width:460px}
/* iPad landscape: the stage-clear card lies on its side — friend left, words and buttons right —
   so it fits under any game's board without scrolling. In a narrow column
   (fitSuccessCards() adds .narrow below 330px) it stays upright, which fits there anyway. */
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 600px){
  .quest-success.stage-clear:not(.narrow){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:16px;row-gap:4px;
    align-items:center;justify-items:start;text-align:left;padding:14px 18px}
  .quest-success.stage-clear:not(.narrow) .qs-friend{grid-row:1/span 4;width:120px;height:96px;align-self:center}
  .quest-success.stage-clear:not(.narrow) .qs-title,.quest-success.stage-clear:not(.narrow) .qs-sub{margin:0}
  .quest-success.stage-clear:not(.narrow) .qs-next{min-width:0;width:100%;padding:13px 20px;font-size:20px}
  .quest-success.stage-clear:not(.narrow) .qs-more{margin-top:2px}
  .quest-success:not(.stage-clear){padding:14px 16px 14px}
  .quest-success:not(.stage-clear) .qs-tick{width:54px;height:54px;font-size:32px}
}
/* :is(#math-extra,#quest) p (id specificity) mutes every <p>; keep the card's own colours there */
:is(#math-extra,#quest) .quest-success .qs-title{margin:4px 0 0;color:#2f6d45}
:is(#math-extra,#quest) .quest-success .qs-sub{margin:0 0 8px;color:#58795f}
:is(#math-extra,#quest) .quest-success.stage-clear .qs-title{color:#8a6414}
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 600px){
  :is(#math-extra,#quest) .quest-success.stage-clear:not(.narrow) .qs-title,
  :is(#math-extra,#quest) .quest-success.stage-clear:not(.narrow) .qs-sub{margin:0}
}
:is(#math-extra,#quest) .quest-success .qs-next{min-width:220px;padding:16px 26px;font-size:22px}
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 600px){
  :is(#math-extra,#quest) .quest-success.stage-clear:not(.narrow) .qs-next{min-width:0;width:100%;padding:13px 20px;font-size:20px}
}
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 600px){
  .quest-success.stage-clear:not(.narrow) .qs-friend{width:108px;height:86px}
}
/* shorter landscape iPads (≤ 800px tall): a more compact card so boards keep their room */
@media (orientation: landscape) and (min-width: 1000px) and (max-height: 800px){
  .quest-success{gap:3px}
  .quest-success:not(.stage-clear){padding:10px 14px 12px}
  .quest-success:not(.stage-clear) .qs-tick{width:44px;height:44px;font-size:26px;box-shadow:0 4px 0 #3c7e55}
  .quest-success .qs-title,:is(#math-extra,#quest) .quest-success .qs-title{font-size:21px;margin-top:2px}
  .quest-success .qs-sub,:is(#math-extra,#quest) .quest-success .qs-sub{margin-bottom:4px}
  .quest-success .qs-next,:is(#math-extra,#quest) .quest-success .qs-next{padding:12px 22px;font-size:20px}
  .quest-success.stage-clear:not(.narrow){padding:10px 14px}
  .quest-success.stage-clear:not(.narrow) .qs-friend{width:96px;height:76px}
}
