/* SparkGlee — game styles, batch E: recycle, colorlab, feelings, storyline, drumbeat, tangram,
 * wordsabroad, healthyplate, measure, mapquest. Every game rule is scoped under its .g-<id> root;
 * the few shared helpers use the ge- prefix (drag items, their drag ghost, trick demos). */

/* ============================================================ shared */
.ge-drag { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.ge-drag.picked { transform: translateY(-8px) scale(1.08) !important; filter: drop-shadow(0 0 5px #8f84ff) drop-shadow(0 0 10px #6a5cff) drop-shadow(0 10px 12px rgba(43, 27, 79, .3)); z-index: 5; animation: none; }
.ge-drag.dragging { opacity: 1; transform: scale(1.12) rotate(-4deg) !important; filter: drop-shadow(0 14px 18px rgba(43, 27, 79, .35)); animation: none !important; transition: none !important; }
.drag-ghost.ge-drag { position: fixed; z-index: 95; pointer-events: none; margin: 0; transform: translate(-50%, -50%) scale(1.12) rotate(-4deg); opacity: .95;
  filter: drop-shadow(0 14px 18px rgba(43, 27, 79, .35)); animation: none !important; transition: none !important; }
.ge-demo { font-family: var(--font); font-size: clamp(34px, 9vw, 56px); display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; line-height: 1.2; }
.ge-demo b { font-weight: 700; color: #6a5cff; font-size: .75em; }
.ge-dot { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%; font-style: normal; font-size: .7em; color: #2b1b4f;
  box-shadow: inset -6px -8px 0 rgba(0, 0, 0, .12), inset 6px 6px 0 rgba(255, 255, 255, .45), 0 4px 10px rgba(0, 0, 0, .18); border: 2px solid rgba(0, 0, 0, .08); }
.ge-grow { animation: ge-grow 2s ease-in-out infinite; }
@keyframes ge-grow { 50% { transform: scale(1.35); } }
.ge-bars { flex-direction: column; align-items: flex-start; width: 240px; position: relative; }
.ge-bars i { display: block; height: 26px; border-radius: 13px; background: linear-gradient(180deg, #ffd43b, #f08c00); margin: 6px 0; }
.ge-bars i + i { background: linear-gradient(180deg, #74c0fc, #1c7ed6); }
.ge-bars b { position: absolute; right: 0; top: 0; font-size: 34px; }
.ge-compass { position: relative; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, #fff7e0, #f2d49b); box-shadow: inset 0 0 0 6px #c8963e; }
.ge-compass b { position: absolute; font-size: 30px; color: #2b1b4f; }
.ge-compass .n { top: 6px; left: 50%; transform: translateX(-50%); color: #e03131; }
.ge-compass .s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.ge-compass .e { right: 12px; top: 50%; transform: translateY(-50%); }
.ge-compass .w { left: 12px; top: 50%; transform: translateY(-50%); }
.ge-compass i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 54px; }

/* ============================================================ Recycle Rescue */
.scene.g-recycle { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 14px 10px 12px;
  background: linear-gradient(180deg, #bdf0ff 0%, #e6fbff 45%, #9be38f 45%, #5cc46a 100%); }
.g-recycle .rc-sky { position: absolute; inset: 0 0 55% 0; pointer-events: none; }
.g-recycle .rc-cloud { position: absolute; width: 90px; height: 28px; border-radius: 20px; background: #fff; opacity: .85; animation: ge-cloud 22s linear infinite; }
.g-recycle .rc-cloud::before { content: ''; position: absolute; left: 18px; top: -16px; width: 44px; height: 36px; border-radius: 50%; background: #fff; }
.g-recycle .rc-cloud.c1 { top: 10%; left: -20%; }
.g-recycle .rc-cloud.c2 { top: 26%; left: -20%; transform: scale(.7); animation-duration: 30s; animation-delay: -14s; }
@keyframes ge-cloud { to { left: 110%; } }
.g-recycle .rc-belt { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 12px 10px 18px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.0) 0 70%, #6b7489 70% 78%, #3f4659 78%),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(0,0,0,.0) 22px 24px); }
.g-recycle .rc-belt::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 2px; height: 10px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, #2b2f3d 0 10px, #59607a 10px 20px); animation: rc-belt 1.2s linear infinite; }
@keyframes rc-belt { to { background-position: 20px 0; } }
.g-recycle .rc-item { width: 84px; min-height: 92px; padding: 8px 4px 6px; border-radius: 20px; background: linear-gradient(180deg, #fff, #eef2ff);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 6px 0 rgba(43,27,79,.18), 0 10px 18px rgba(43,27,79,.15);
  animation: popIn .45s backwards; transition: transform .15s; position: relative; }
.g-recycle .rc-art { font-size: 42px; line-height: 1; display: grid; place-items: center; height: 48px; }
.g-recycle .rc-art svg { width: 34px; height: 52px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.15)); }
.g-recycle .rc-label { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.05; color: var(--ink-soft); }
.g-recycle .rc-item.rc-in { animation: rc-in .45s ease-in forwards; pointer-events: none; }
@keyframes rc-in { to { transform: translate(var(--fx), var(--fy)) scale(.2) rotate(30deg); opacity: 0; } }
.g-recycle .rc-item.gone { visibility: hidden; }
.g-recycle .rc-bins { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; align-items: end; }
.g-recycle .rc-bin { --bh: 150px; position: relative; padding: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  transition: transform .15s; color: #fff; }
/* each bin is an illustrated picture (prop/bin-*); its sign sits on the bin's front panel (measured from the picture) */
.g-recycle .rc-body { position: relative; width: min(100%, calc(var(--bh) * .63)); aspect-ratio: 303 / 480; display: block; filter: drop-shadow(0 6px 6px rgba(0,0,0,.2)); }
.g-recycle .rc-bin-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.g-recycle .rc-body .rc-icon { position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%); }
.g-recycle .rc-icon { font-size: 34px; line-height: 1; background: rgba(255,255,255,.9); border-radius: 50%; width: min(52px, 72%); aspect-ratio: 1; height: auto; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.g-recycle .rc-name { font-size: clamp(11px, 2.9vw, 15px); font-weight: 700; text-align: center; line-height: 1.05; padding: 3px 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--c2) 78%, #000); box-shadow: 0 2px 0 rgba(0,0,0,.18); max-width: 100%; }
.g-recycle .rc-bin.drop-over, .g-recycle .rc-bin[data-correct].hint { transform: scale(1.06); }
.g-recycle .rc-bin.rc-gulp { animation: rc-gulp .5s; }
@keyframes rc-gulp { 30% { transform: scale(1.12, .9); } 60% { transform: scale(.95, 1.06); } }
.g-recycle.n5 .rc-bin { --bh: 124px; }
.g-recycle.n5 .rc-icon { font-size: 24px; }
.g-recycle.n5 .rc-name { padding: 2px 4px; }
.scene.g-recycle.rc-reuse { justify-content: center; align-items: center; flex: 0 0 auto; min-height: 170px; }
.g-recycle .rc-earth { font-size: 96px; animation: floaty 3s ease-in-out infinite; filter: drop-shadow(0 10px 12px rgba(0,0,0,.2)); }
.g-recycle .rc-r3 { font-weight: 700; font-size: 18px; color: #1d6b3a; background: rgba(255,255,255,.85); border-radius: 18px; padding: 6px 14px; }
.choices.g-recycle .choice { justify-content: flex-start; text-align: left; gap: 12px; }
.choices.g-recycle .rc-ch { font-size: 36px; }

/* ============================================================ Color Lab */
.scene.g-colorlab { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 14px 10px;
  background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.7), transparent 40%), linear-gradient(180deg, #fff3df 0%, #ffe1c4 62%, #c98a55 62%, #a8693a 100%); }
.g-colorlab .cl-bench { display: flex; align-items: center; justify-content: center; gap: 12px; flex: 1; }
.g-colorlab .cl-goal { background: #fff; border-radius: 22px; padding: 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 6px 0 rgba(43,27,79,.12), 0 10px 20px rgba(43,27,79,.12); transform: rotate(-3deg); animation: popIn .5s; }
.g-colorlab .cl-arrow { font-size: 30px; color: #b0703f; font-weight: 700; animation: ge-nudge 1.4s ease-in-out infinite; }
@keyframes ge-nudge { 50% { transform: translateX(-6px); } }
.g-colorlab .cl-blob { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50% 46% 52% 48%; vertical-align: middle;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75) 0 12%, transparent 30%), var(--pc);
  box-shadow: inset -6px -8px 0 rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.18), 0 0 0 3px rgba(255,255,255,.9); color: var(--ink); }
.g-colorlab .cl-blob.big { width: 74px; height: 74px; font-size: 28px; }
.g-colorlab .cl-blob.tiny { width: 22px; height: 22px; font-size: 11px; box-shadow: 0 0 0 2px #fff; }
.g-colorlab .cl-sym { font-size: .85em; line-height: 1; }
.g-colorlab .cl-name { font-weight: 700; font-size: 15px; color: var(--ink); text-transform: capitalize; }
.g-colorlab .cl-bowlwrap { position: relative; display: flex; flex-direction: column; align-items: center; }
/* The bowl is an illustrated picture (prop/mixing-bowl); the paint is an oval laid over the bowl's opening and multiplied
 * onto it, so the bowl's own shading shows through the colour. Percentages are measured from the picture. */
.g-colorlab .cl-bowl { position: relative; width: 168px; aspect-ratio: 640 / 486; height: auto; display: block; filter: drop-shadow(0 8px 8px rgba(0,0,0,.18)); }
.g-colorlab .cl-bowl-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.g-colorlab .cl-bowl-in { position: absolute; left: 10.5%; right: 10.5%; top: 8.4%; height: 24%; border-radius: 50%; overflow: hidden; }
.g-colorlab .cl-paint { position: absolute; inset: 0; background: var(--mix, transparent); transition: background .5s; mix-blend-mode: multiply; }
.g-colorlab .cl-swirl { position: absolute; inset: 8px 30px; border-radius: 50%; border: 4px solid rgba(255,255,255,.35); border-left-color: transparent; border-bottom-color: transparent; opacity: 0; }
.g-colorlab .cl-bowl.full .cl-swirl { opacity: 1; }
.g-colorlab .cl-bowl.stir .cl-swirl { animation: spin 1s ease-out; }
.g-colorlab .cl-drops { position: absolute; left: 0; right: 0; top: 56%; display: flex; justify-content: center; gap: 4px; z-index: 2; }
.g-colorlab .cl-bowl.drop-over { transform: scale(1.07); }
.g-colorlab .cl-bowl.win { animation: correctPop .6s; }
.g-colorlab .cl-bowl.win { filter: drop-shadow(0 0 14px #fff8a8) drop-shadow(0 8px 8px rgba(0,0,0,.18)); }
.g-colorlab .cl-empty { margin-top: 8px; min-height: 44px; padding: 0 18px; border-radius: 99px; background: #fff; color: #7a4a26; font-size: 16px; font-weight: 700; box-shadow: 0 4px 0 rgba(0,0,0,.15); transition: opacity .2s; }
.g-colorlab .cl-bowlwrap:has(.cl-bowl:not(.full)) .cl-empty { visibility: hidden; opacity: 0; } /* only offered once there is paint to tip out */
.g-colorlab .cl-shelf { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 6px 4px 0; }
.g-colorlab .cl-pot { width: 76px; display: flex; flex-direction: column; align-items: center; gap: 3px; animation: popIn .45s backwards; transition: transform .15s, opacity .2s; border-radius: 18px; padding: 4px 0; }
/* The jar is an illustrated picture (prop/paint-jar); the paint fills its glass body, multiplied onto the glass shading. */
.g-colorlab .cl-jar { position: relative; width: 60px; aspect-ratio: 339 / 400; height: auto; filter: drop-shadow(0 5px 5px rgba(0,0,0,.18)); }
.g-colorlab .cl-jar-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.g-colorlab .cl-glob { position: absolute; left: 6%; right: 6%; top: 35%; bottom: 5.5%; border-radius: 24% / 26%; display: grid; place-items: center; color: var(--ink); font-size: 22px; }
.g-colorlab .cl-glob::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--pc); mix-blend-mode: multiply; }
.g-colorlab .cl-glob .cl-sym { position: relative; }
.g-colorlab .cl-pot .cl-name { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.35); font-size: 14px; }
.g-colorlab .cl-pot.used { opacity: .45; transform: scale(.9); }
.g-colorlab.cl-predict, .scene.g-colorlab.cl-predict { justify-content: center; align-items: center; flex: 0 0 auto; min-height: 170px; }
.g-colorlab .cl-eq { display: flex; align-items: center; justify-content: center; gap: 10px; }
.g-colorlab .cl-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.g-colorlab .cl-plus { font-size: 36px; font-weight: 700; color: #a8693a; }
.g-colorlab .cl-q { --pc: #e9e4f5; --ink: #6a5cff; font-size: 34px; font-weight: 700; }
.g-colorlab .cl-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.g-colorlab .cl-opt .cl-name { font-size: 15px; }
.g-colorlab .cl-word { display: inline-block; padding: 0 12px; border-radius: 14px; background: var(--pc); color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), 0 0 0 2px rgba(43,27,79,.12); }

/* ============================================================ Feelings Friends */
.scene.g-feelings { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; min-height: 200px; flex: 0 1 auto;
  background: radial-gradient(circle at 50% 30%, #fff8d6, transparent 60%), linear-gradient(180deg, #ffe58a, #ffc2dc); }
.g-feelings .fe-card { position: relative; background: #fff; border-radius: 28px; padding: 10px 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 8px 0 rgba(43,27,79,.1), 0 14px 26px rgba(43,27,79,.15); }
.g-feelings .fe-scene { font-size: 34px; letter-spacing: 4px; animation: floaty 3s ease-in-out infinite; }
.g-feelings .fe-friend { width: clamp(110px, 32vw, 150px); animation: fe-bob 2.6s ease-in-out infinite; }
.g-feelings .fe-friend svg, .g-feelings .fe-pick svg, .g-feelings .fe-mini svg { width: 100%; height: auto; display: block; }
@keyframes fe-bob { 50% { transform: translateY(-4px) rotate(2deg); } }
.g-feelings .fe-name { font-weight: 700; font-size: 18px; background: #ffe066; border-radius: 12px; padding: 0 12px; margin-top: -4px; }
.g-feelings .fe-name:empty { display: none; }
.g-feelings .fe-big { font-size: 64px; animation: popIn .5s; }
.g-feelings.fe-gallery { min-height: 110px; }
.choices.g-feelings.fe-faces .choice { min-height: 120px; padding: 8px; background: linear-gradient(180deg, #fff, #fff4d6); }
.g-feelings .fe-pick { display: block; width: min(110px, 100%); }
.choices.g-feelings .choice { justify-content: flex-start; text-align: left; gap: 10px; }
.choices.g-feelings.fe-words .choice { justify-content: flex-start; }
.g-feelings .fe-opt { display: flex; align-items: center; gap: 10px; }
.g-feelings .fe-mini { width: 52px; flex: none; }
.g-feelings .fe-word { font-size: clamp(20px, 5vw, 26px); }
.choices.g-feelings .fe-ico { font-size: 34px; flex: none; }
.g-feelings .fe-breathe { position: absolute; inset: 0; background: rgba(255, 248, 214, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: 30px; z-index: 5; animation: fadeIn .4s; }
.g-feelings .fe-balloon { font-size: 70px; transition: transform 1.9s ease-in-out; }
.g-feelings .fe-balloon.in { transform: scale(1.8); }
.g-feelings .fe-balloon.out { transform: scale(.9) translateY(-10px); transition-duration: 1.7s; }
.g-feelings .fe-bword { font-size: 28px; font-weight: 700; color: #b0537a; }

/* ============================================================ Story Train */
.scene.g-storyline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 10px; align-items: start;
  background: linear-gradient(180deg, #c9f2ff 0%, #effcff 55%, #b6eba3 55%, #7cd685 100%); overflow: visible; }
.g-storyline .st-track { position: absolute; left: 0; right: 0; bottom: 10px; height: 10px; background: repeating-linear-gradient(90deg, #8a5a2b 0 8px, transparent 8px 20px), linear-gradient(#999, #999) 0 50% / 100% 3px no-repeat; opacity: .5; }
.g-storyline .st-train { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.g-storyline .st-engine { font-size: 40px; line-height: 1; text-align: left; position: relative; width: max-content; }
.g-storyline .st-car { position: relative; min-height: 76px; border-radius: 16px; border: 3px dashed rgba(255,255,255,.95); background: rgba(255, 92, 168, .22);
  padding: 6px 6px 12px 34px; display: flex; align-items: stretch; transition: transform .15s, background .2s; }
.g-storyline .st-car:nth-child(3n) { background: rgba(77, 155, 255, .22); }
.g-storyline .st-car:nth-child(3n+1) { background: rgba(255, 184, 77, .26); }
.g-storyline .st-num { position: absolute; left: 6px; top: 50%; transform: translateY(-60%); width: 24px; height: 24px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; color: #6a5cff; }
.g-storyline .st-wheel { position: absolute; bottom: -8px; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #fff 0 25%, #444 30%); }
.g-storyline .st-wheel.w1 { left: 22%; } .g-storyline .st-wheel.w2 { right: 18%; }
.g-storyline .st-car.drop-over { transform: scale(1.04); background: rgba(255, 255, 255, .6); }
.g-storyline .st-car.full { border-style: solid; }
.g-storyline .st-car.glow { animation: st-glow .5s; }
@keyframes st-glow { 40% { transform: translateY(-6px) scale(1.04); box-shadow: 0 0 22px #ffe066; } }
.g-storyline .st-tray { display: flex; flex-direction: column; gap: 10px; padding-top: 48px; }
.g-storyline .st-card { background: linear-gradient(180deg, #fff, #f6f1ff); border-radius: 16px; padding: 8px; display: flex; align-items: center; gap: 8px; min-height: 64px;
  box-shadow: 0 5px 0 rgba(43,27,79,.15), 0 8px 14px rgba(43,27,79,.12); animation: popIn .45s backwards; transition: transform .15s; flex: 1; }
.g-storyline .st-pic { font-size: 34px; line-height: 1; flex: none; letter-spacing: -2px; }
.g-storyline .st-cap { font-size: clamp(13px, 3.4vw, 17px); font-weight: 600; line-height: 1.15; }
.g-storyline .st-card.in { box-shadow: none; animation: none; width: 100%; }
.g-storyline.pics { grid-template-columns: 1fr; }
.g-storyline.pics .st-train { flex-direction: row; align-items: flex-end; justify-content: center; flex-wrap: nowrap; gap: 6px; }
.g-storyline.pics .st-engine { font-size: 48px; align-self: flex-end; margin-bottom: 6px; }
.g-storyline.pics .st-car { flex: 1 1 0; max-width: 120px; min-height: 104px; padding: 26px 4px 12px; justify-content: center; }
.g-storyline.pics .st-num { left: 50%; top: 4px; transform: translateX(-50%); width: 22px; height: 22px; font-size: 14px; }
.g-storyline.pics .st-tray { flex-direction: row; justify-content: center; flex-wrap: wrap; padding-top: 6px; }
.g-storyline.pics .st-card { flex: 0 0 auto; width: 96px; height: 96px; justify-content: center; }
.g-storyline.pics .st-card .st-pic { font-size: 36px; text-align: center; }
.g-storyline.pics .st-car .st-card { width: 100%; height: 72px; padding: 4px; }
.g-storyline.pics .st-car .st-card .st-pic { font-size: clamp(18px, 5vw, 28px); white-space: normal; text-align: center; word-break: break-all; letter-spacing: 0; }
.g-storyline.compact { grid-template-columns: 1fr; flex: 0 1 auto; }
.g-storyline.compact .st-tray { display: none; }
.g-storyline.compact .st-car { min-height: 0; padding-top: 3px; padding-bottom: 7px; }
.g-storyline.compact .st-card { min-height: 40px; padding: 4px 8px; }
.g-storyline.compact .st-pic { font-size: 24px; }
.g-storyline.go .st-engine { animation: st-chug .4s ease-in-out infinite; }
@keyframes st-chug { 50% { transform: translateY(-3px); } }
.choices.g-storyline .choice { justify-content: flex-start; text-align: left; }

/* ============================================================ Rhythm Jungle */
.scene.g-drumbeat { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 14px; justify-content: space-between;
  background: radial-gradient(circle at 80% 10%, rgba(255,240,150,.6), transparent 35%), linear-gradient(180deg, #2fb36b 0%, #1f8f55 50%, #8a5a2b 50%, #6b4220 100%); }
.g-drumbeat .db-leaves { position: absolute; left: 0; right: 0; top: 0; height: 26px; pointer-events: none;
  background: radial-gradient(circle at 10px 0, #145f37 18px, transparent 19px) 0 0 / 40px 26px repeat-x; opacity: .8; }
.g-drumbeat .db-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.g-drumbeat .db-pip { width: 68px; height: 68px; }
.g-drumbeat .db-pip.bang { animation: db-bang .2s; }
@keyframes db-bang { 50% { transform: translateY(4px) scale(1.06, .94); } }
.g-drumbeat .db-status { font-size: 22px; font-weight: 700; background: rgba(255,255,255,.92); border-radius: 18px; padding: 6px 16px; }
.g-drumbeat.kid .db-status { background: #ffe066; animation: pulse 1s ease-in-out infinite; }
.g-drumbeat .db-board { background: rgba(255,255,255,.94); border-radius: 22px; padding: 10px 14px 8px; box-shadow: 0 8px 18px rgba(0,0,0,.2); position: relative; z-index: 1; }
.g-drumbeat .db-lane { position: relative; height: 64px; margin: 0 6px; }
.g-drumbeat .db-line { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: #e6e0f5; }
.g-drumbeat .db-bub { position: absolute; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; display: grid; place-items: center; font-size: 26px;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0 14%, transparent 34%), var(--bc, #ff6b6b); box-shadow: 0 4px 0 rgba(0,0,0,.18); transition: transform .12s, opacity .2s; }
.g-drumbeat .db-bub.p0 { --bc: #ff8787; } .g-drumbeat .db-bub.p1 { --bc: #ffc078; } .g-drumbeat .db-bub.p2 { --bc: #c3a6ff; }
.g-drumbeat .db-bub.short { width: 40px; height: 40px; margin: -20px 0 0 -20px; font-size: 20px; }
.g-drumbeat .db-bub.rest { --bc: transparent; box-shadow: none; border: 3px dashed #b8acd9; font-size: 20px; opacity: .8; }
.g-drumbeat .db-bub.hit { transform: scale(1.35); }
.g-drumbeat .db-bub.got { box-shadow: 0 0 0 4px #22c983, 0 4px 0 rgba(0,0,0,.18); }
.g-drumbeat .db-bub.got::after { content: '✓'; position: absolute; right: -6px; top: -8px; width: 20px; height: 20px; border-radius: 50%; background: #22c983; color: #fff; font-size: 13px; display: grid; place-items: center; font-weight: 700; }
.g-drumbeat .db-bub.miss:not(.rest) { opacity: .55; box-shadow: 0 0 0 4px #ff8fa3; }
.g-drumbeat .db-bub.miss:not(.rest)::after { content: '•'; position: absolute; right: -4px; top: -10px; font-size: 22px; color: #e0566e; }
.g-drumbeat .db-bub.hide { opacity: .25; }
.g-drumbeat .db-bub.hide span { visibility: hidden; }
.g-drumbeat .db-bub.hide::before { content: '?'; position: absolute; font-weight: 700; color: #6a5cff; }
.g-drumbeat .db-head { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; left: 0; border-radius: 2px; background: #6a5cff; box-shadow: 0 0 10px #6a5cff; }
.g-drumbeat .db-count { display: flex; justify-content: space-around; margin: 2px 6px 0; }
.g-drumbeat .db-count i { font-style: normal; font-weight: 700; color: #b8acd9; font-size: 18px; transition: transform .1s, color .1s; }
.g-drumbeat .db-count i.on { color: #6a5cff; transform: scale(1.4); }
.g-drumbeat .db-notes { margin: 4px 6px 0 -24px; min-height: 104px; }
.g-drumbeat .db-board.has-staff { padding-left: 36px; }
.g-drumbeat .db-board.has-staff .db-lane { margin-right: 22px; }
.g-drumbeat .db-board.has-staff .db-count { margin-right: 22px; }
.g-drumbeat .db-staff { display: block; overflow: visible; }
.g-drumbeat .db-pads { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 4vw, 26px); position: relative; z-index: 1; }
.g-drumbeat .db-pad { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; touch-action: none; }
.g-drumbeat .db-skin { width: clamp(96px, 27vw, 130px); height: clamp(96px, 27vw, 130px); border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, #fffaf0 0 46%, #f1e3c8 47% 58%, transparent 59%), linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.18), 0 9px 0 rgba(0,0,0,.25), 0 14px 20px rgba(0,0,0,.25); transition: transform .06s; }
.g-drumbeat.n3 .db-skin { width: clamp(84px, 25vw, 116px); height: clamp(84px, 25vw, 116px); }
.g-drumbeat .db-emo { font-size: 40px; }
/* the big drum and the bongo are illustrated pictures (prop/drum, prop/bongo); the clap pad stays a round button */
.g-drumbeat .db-pad.p0 .db-skin, .g-drumbeat .db-pad.p1 .db-skin { border-radius: 30%; box-shadow: none;
  background: url(../img/art/props/drum.webp) center / contain no-repeat; filter: drop-shadow(0 8px 6px rgba(0,0,0,.28)); }
.g-drumbeat .db-pad.p1 .db-skin { background-image: url(../img/art/props/bongo.webp); }
.g-drumbeat .db-pad.p0 .db-emo, .g-drumbeat .db-pad.p1 .db-emo { visibility: hidden; }
.g-drumbeat .db-pad.p0.play .db-skin, .g-drumbeat .db-pad.p1.play .db-skin { box-shadow: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)) brightness(1.08); }
.g-drumbeat .db-pad.p0.due .db-skin, .g-drumbeat .db-pad.p1.due .db-skin,
.g-drumbeat .db-pad.p0.hint .db-skin, .g-drumbeat .db-pad.p1.hint .db-skin { box-shadow: none; filter: drop-shadow(0 0 6px #ffe066) drop-shadow(0 0 14px #ffe066); }
.g-drumbeat .db-name { font-weight: 700; color: #fff; font-size: 15px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.g-drumbeat .db-pad.play .db-skin { transform: translateY(6px) scale(.96); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 3px 0 rgba(0,0,0,.25); }
.g-drumbeat .db-pad.due .db-skin { box-shadow: 0 0 0 6px #ffe066, 0 0 30px #ffe066; }
.g-drumbeat .db-pad.wrongpad { animation: shake .3s; }
.g-drumbeat .db-pad.hint { box-shadow: none !important; }
.g-drumbeat .db-pad.hint .db-skin { box-shadow: 0 0 0 6px #ffe066, 0 0 30px #ffe066; }
.g-drumbeat .db-ripple { position: absolute; left: 50%; top: 40%; width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 50%; border: 4px solid #fff; pointer-events: none; animation: db-rip .5s ease-out forwards; }
@keyframes db-rip { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.g-drumbeat .db-big { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.5); font-size: 90px; font-weight: 700; color: #fff; text-shadow: 0 6px 0 rgba(0,0,0,.25); opacity: 0; pointer-events: none; z-index: 4; }
.g-drumbeat .db-big.show { animation: db-count .5s ease-out; }
@keyframes db-count { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.g-drumbeat.early .db-board { animation: db-early .25s; }
@keyframes db-early { 50% { transform: translateX(3px); } }
.a11y-calm .g-drumbeat .db-ripple, .a11y-calm .g-drumbeat .db-big.show { animation-duration: .9s; }

/* ============================================================ Shape Builder */
.scene.g-tangram { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 10px;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.55), transparent 55%), linear-gradient(180deg, #ffe9c7, #ffc9a8); }
.g-tangram .tg-goal { position: absolute; left: 12px; top: 10px; font-size: 30px; background: #fff; border-radius: 14px; width: 48px; height: 48px; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0,0,0,.1); }
.g-tangram .tg-boardwrap { flex: 1; display: grid; place-items: center; padding: 8px; }
.g-tangram .tg-board { position: relative; }
.g-tangram .tg-shadow { position: absolute; inset: 0; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); transition: opacity .5s; }
.g-tangram .tg-sh, .g-tangram .tg-slot { position: absolute; }
.g-tangram .tg-sh svg, .g-tangram .tg-slot > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(var(--r)); overflow: visible; }
.g-tangram.no-lines .tg-slot > svg { display: none; }
.g-tangram .tg-slot { border-radius: 8px; transition: background .2s; }
.g-tangram .tg-slot.drop-over { background: rgba(255,255,255,.45); }
.g-tangram .tg-slot.hint { border-radius: 14px; }
.g-tangram .tg-tray { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; min-height: 60px; padding: 8px; border-radius: 20px; background: rgba(255,255,255,.4); width: 100%; }
.g-tangram .tg-piece { position: relative; flex: none; animation: popIn .45s backwards; transition: transform .15s; border-radius: 10px; }
.g-tangram .tg-rot { position: absolute; inset: 0; transform: rotate(var(--r)); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.g-tangram .tg-rot svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 5px 0 rgba(0,0,0,.18)); }
.g-tangram .tg-fill { background: none; }
.g-tangram .tg-turn { position: absolute; right: -10px; top: -10px; width: 34px; height: 34px; border-radius: 50%; background: #6a5cff; color: #fff; font-size: 22px; font-weight: 700; display: none; place-items: center; box-shadow: 0 3px 0 rgba(0,0,0,.2); z-index: 2; }
.g-tangram .tg-slot .tg-piece { position: absolute; inset: 0; width: 100%; height: 100%; animation: none; }
.g-tangram .tg-piece.turning { cursor: pointer; z-index: 3; }
.g-tangram .tg-piece.turning .tg-turn { display: grid; animation: pulse 1s ease-in-out infinite; }
.g-tangram .tg-piece.turning .tg-rot svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 5px 0 rgba(0,0,0,.18)); }
.g-tangram .tg-piece.fixed { animation: tg-snap .35s; }
.g-tangram .tg-piece.fixed .tg-rot svg { filter: none; }
@keyframes tg-snap { 50% { transform: scale(1.08); } }
.g-tangram .tg-piece.gone { display: none; }
.g-tangram.complete .tg-shadow { opacity: 0; }
.g-tangram.complete .tg-board { animation: celebrate .8s ease-in-out 2; }
.g-tangram.complete .tg-tray { display: none; }

/* ============================================================ Hello World */
.scene.g-wordsabroad { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px; flex: 0 1 auto; min-height: 200px;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.6), transparent 40%), linear-gradient(160deg, #8fe3ff, #c8f7d8 60%, #ffe0f0); }
.g-wordsabroad .wa-langs { display: flex; gap: 8px; background: rgba(255,255,255,.55); border-radius: 22px; padding: 4px; }
.g-wordsabroad .wa-lang { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 14px; border-radius: 18px; font-weight: 700; font-size: 16px; color: var(--ink-soft); }
.g-wordsabroad .wa-lang.on { background: #fff; color: var(--ink); box-shadow: 0 3px 0 rgba(43,27,79,.15); }
.g-wordsabroad .wa-flag { font-size: 22px; }
.g-wordsabroad .wa-card { position: relative; background: #fff; border-radius: 26px; padding: 14px 70px 14px 24px; min-height: 96px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 7px 0 rgba(43,27,79,.12), 0 12px 24px rgba(43,27,79,.14); animation: popIn .45s; }
.g-wordsabroad .wa-card.pic { padding: 12px 24px; }
.g-wordsabroad .wa-word { font-size: clamp(34px, 9vw, 52px); font-weight: 700; color: #6a5cff; }
.g-wordsabroad .wa-ear { font-size: 56px; animation: wiggle 2s infinite; }
.g-wordsabroad .wa-say { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; font-size: 24px;
  background: linear-gradient(180deg, #8f7bff, #6a5cff); box-shadow: 0 4px 0 #4a3bc7; }
.g-wordsabroad .wa-reveal { font-size: 20px; font-weight: 600; background: #fff7c2; border-radius: 16px; padding: 4px 14px; }
.g-wordsabroad .wa-reveal b { color: #6a5cff; }
.g-wordsabroad .wa-emo { font-size: clamp(44px, 12vw, 64px); line-height: 1; }
.g-wordsabroad .wa-gr { display: flex; flex-direction: column; align-items: center; }
.g-wordsabroad .wa-cap { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.g-wordsabroad .wa-splat { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 46% 54% 50% 50% / 52% 44% 56% 48%; background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.6) 0 12%, transparent 32%), var(--pc);
  box-shadow: inset -6px -8px 0 rgba(0,0,0,.15), 0 0 0 3px #fff, 0 4px 8px rgba(0,0,0,.2); }
.g-wordsabroad .wa-splat b { color: #fff; font-size: 26px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.g-wordsabroad .wa-num { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.g-wordsabroad .wa-num > b { font-size: 40px; color: #ff8a3d; }
.g-wordsabroad .wa-dots { display: grid; grid-template-columns: repeat(5, 10px); gap: 3px; }
.g-wordsabroad .wa-dots i { width: 10px; height: 10px; border-radius: 50%; background: #6a5cff; }
.choices.g-wordsabroad.wa-pics .choice { min-height: 100px; }
.choices.g-wordsabroad.wa-words .choice { font-size: clamp(22px, 6vw, 32px); }
.g-wordsabroad .wa-q { color: #6a5cff; background: #f0ecff; border-radius: 12px; padding: 0 10px; }

/* ============================================================ Healthy Plate */
.scene.g-healthyplate { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px;
  background: linear-gradient(0deg, rgba(255,255,255,.35) 2px, transparent 2px) 0 0 / 36px 36px, linear-gradient(90deg, rgba(255,255,255,.35) 2px, transparent 2px) 0 0 / 36px 36px, linear-gradient(180deg, #d7f5e3, #fff3c4); }
.g-healthyplate .hp-table { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; flex: 0 0 auto; padding: 14px 10px; margin: auto 0; }
.g-healthyplate .hp-mat { position: absolute; inset: 0; border-radius: 26px; background: repeating-linear-gradient(90deg, #ff9aa2 0 14px, #ffb7bd 14px 28px); opacity: .35; }
/* the dish is the illustrated plate (prop/plate); the food-group sections fill its middle as before */
.g-healthyplate .hp-dish { position: relative; width: clamp(220px, 60vw, 310px); aspect-ratio: 1; padding: 7.5%; box-sizing: border-box;
  background: url(../img/art/props/plate.webp) center / 100% 100% no-repeat; filter: drop-shadow(0 12px 12px rgba(0,0,0,.16)); }
.g-healthyplate .hp-plate { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; background: #fff; overflow: hidden; box-shadow: 0 0 0 3px rgba(255,255,255,.9); }
.g-healthyplate .hp-sec { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(180deg, var(--c1), var(--c2)); transition: filter .2s; }
.g-healthyplate .hp-plate .hp-sec { opacity: .92; }
.g-healthyplate .s-vf { left: 0; top: 0; bottom: 0; width: 50%; border-right: 4px solid #fff; padding-left: 12px; }
.g-healthyplate .s-grain { right: 0; top: 0; width: 50%; height: 50%; border-bottom: 4px solid #fff; padding-top: 12px; }
.g-healthyplate .s-protein { right: 0; bottom: 0; width: 50%; height: 50%; padding-bottom: 12px; }
.g-healthyplate .s-grain.two { height: 100%; border-bottom: 0; padding-top: 0; }
.g-healthyplate .hp-cup { position: relative; width: 84px; height: 112px; padding: 4px; /* illustrated cup (prop/cup) */
  background: url(../img/art/props/cup.webp) center / 100% 100% no-repeat; filter: drop-shadow(0 8px 8px rgba(0,0,0,.16)); }
.g-healthyplate .hp-cup.drop-over { outline: none; filter: brightness(1.08) drop-shadow(0 0 10px #fff); }
.g-healthyplate .hp-lab { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.88); border-radius: 10px; padding: 1px 7px; white-space: nowrap; }
.g-healthyplate .hp-lab.hidden { visibility: hidden; }
.g-healthyplate .hp-drop { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 36px; }
.g-healthyplate .hp-sec.drop-over, .g-healthyplate .hp-basket.drop-over { filter: brightness(1.12) saturate(1.2); outline: 4px solid #fff; outline-offset: -6px; }
.g-healthyplate .hp-sec.empty { background: repeating-linear-gradient(45deg, #f4f1fb 0 10px, #e9e4f5 10px 20px); }
.g-healthyplate .hp-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.g-healthyplate .hp-food { width: 78px; min-height: 80px; border-radius: 18px; background: linear-gradient(180deg, #fff, #f3f0ff); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px;
  box-shadow: 0 5px 0 rgba(43,27,79,.15), 0 8px 14px rgba(43,27,79,.12); animation: popIn .45s backwards; transition: transform .15s; }
.g-healthyplate .hp-art { font-size: 38px; line-height: 1; display: grid; place-items: center; }
.g-healthyplate .hp-art svg { width: 34px; height: 40px; }
.g-healthyplate .hp-fname { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-align: center; line-height: 1.05; }
.g-healthyplate .hp-food.placed { width: auto; min-height: 0; background: none; box-shadow: none; padding: 0; animation: popIn .3s; }
.g-healthyplate .hp-food.placed .hp-fname { display: none; }
.g-healthyplate .hp-food.placed .hp-art { font-size: 30px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.2)); }
.g-healthyplate .hp-food.gone { display: none; }
.g-healthyplate .hp-baskets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; flex: 1; }
.g-healthyplate .hp-basket { border-radius: 18px 18px 36px 36px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 130px;
  background: repeating-linear-gradient(45deg, #e8b46a 0 10px, #d79a4a 10px 20px); box-shadow: inset 0 0 0 5px #b97a2e, 0 8px 14px rgba(0,0,0,.18); }
.g-healthyplate .hp-basket.some { background: repeating-linear-gradient(45deg, #ffb3d1 0 10px, #ff8fbd 10px 20px); box-shadow: inset 0 0 0 5px #e0559c, 0 8px 14px rgba(0,0,0,.18); }
.g-healthyplate .hp-basket .hp-lab { font-size: 16px; }
.g-healthyplate .hp-sink { font-size: 60px; }
.g-healthyplate .hp-steps { display: flex; justify-content: center; gap: 6px; width: 100%; }
.g-healthyplate .hp-slot { position: relative; flex: 1; max-width: 90px; min-height: 92px; border-radius: 16px; border: 3px dashed rgba(106, 92, 255, .5); background: rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; }
.g-healthyplate .hp-slot > b { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: #6a5cff; color: #fff; display: grid; place-items: center; font-size: 14px; }
.g-healthyplate .hp-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.g-healthyplate .hp-step { width: 98px; min-height: 92px; border-radius: 18px; background: linear-gradient(180deg, #fff, #e9f7ff); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px;
  box-shadow: 0 5px 0 rgba(43,27,79,.15); animation: popIn .45s backwards; }
.g-healthyplate .hp-step.done { width: 100%; min-height: 0; box-shadow: none; background: none; padding: 2px; animation: popIn .3s; }
.g-healthyplate .hp-step.done .hp-fname { font-size: 10px; }
.g-healthyplate .hp-bubbles { position: absolute; left: 0; right: 0; bottom: 20%; text-align: center; font-size: 40px; animation: hp-bub 1.5s ease-out forwards; pointer-events: none; }
@keyframes hp-bub { from { transform: translateY(40px); opacity: 0; } 50% { opacity: 1; } to { transform: translateY(-120px); opacity: 0; } }
.g-healthyplate .hp-quizart { font-size: 80px; animation: floaty 3s ease-in-out infinite; }
.choices.g-healthyplate .choice { justify-content: flex-start; text-align: left; gap: 10px; }
.choices.g-healthyplate .hp-ch { font-size: 30px; flex: none; }

/* ============================================================ Measure Up */
.scene.g-measure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px 10px; flex: 0 1 auto; min-height: 120px;
  background: linear-gradient(0deg, rgba(77,155,255,.14) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, rgba(77,155,255,.14) 1px, transparent 1px) 0 0 / 20px 20px, #fbfdff; }
.g-measure .ms-thing { position: relative; height: 30px; border-radius: 15px; flex: none; transition: width .3s; }
.g-measure .t-pencil { border-radius: 4px 0 0 4px; background: linear-gradient(180deg, #ffe066 0 33%, #fcc419 33% 66%, #f59f00 66%); margin-right: 0; }
.g-measure .t-pencil::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: linear-gradient(180deg, #ffa8c5, #f06595); border-radius: 4px 0 0 4px; box-shadow: inset -4px 0 0 #ced4da; }
.g-measure .t-pencil::after { content: ''; position: absolute; right: -1px; top: 0; border-style: solid; border-width: 15px 0 15px 22px; border-color: transparent transparent transparent #f1d3a8; transform: translateX(100%); display: none; }
.g-measure .t-crayon { border-radius: 6px; background: linear-gradient(180deg, #74c0fc, #1c7ed6); box-shadow: inset 12px 0 0 rgba(255,255,255,.35), inset -14px 0 0 rgba(0,0,0,.1); }
.g-measure .t-worm { background: radial-gradient(circle at 50% 50%, #94d82d 0 60%, #74b816 61%) 0 0 / 30px 30px repeat-x; }
.g-measure .t-snake { background: repeating-linear-gradient(90deg, #ff922b 0 14px, #ffd43b 14px 28px); border-radius: 15px 6px 6px 15px; }
.g-measure .t-ribbon { height: 22px; border-radius: 3px; background: linear-gradient(180deg, #f783ac, #e64980); }
.g-measure .t-train { border-radius: 6px; background: repeating-linear-gradient(90deg, #4dabf7 0 26px, #fff 26px 30px); }
.g-measure .ms-face { position: absolute; right: 6px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #2b1b4f; display: none; }
.g-measure .t-worm .ms-face, .g-measure .t-snake .ms-face { display: block; }
.choices.g-measure.ms-rows .choice { justify-content: flex-start; min-height: 74px; padding: 10px 16px; }
.g-measure .ms-row { display: flex; align-items: center; border-left: 4px solid #6a5cff; padding-left: 0; }
.choices.g-measure.ms-towers { max-width: 360px; }
.choices.g-measure.ms-towers .choice { align-items: flex-end; min-height: 230px; background: linear-gradient(180deg, #e6f6ff, #fff); }
.g-measure .ms-tower { display: flex; flex-direction: column-reverse; align-items: center; }
.g-measure .ms-tower i { width: 44px; height: 24px; margin-top: 2px; border-radius: 6px; background: linear-gradient(180deg, #ffa94d, #f76707); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); animation: popIn .3s backwards; }
.g-measure .ms-tower i:nth-child(even) { background: linear-gradient(180deg, #74c0fc, #1c7ed6); }
.g-measure .ms-top { font-size: 30px; line-height: 1.1; }
.g-measure .ms-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: #8ce99a; }
.g-measure .ms-bench { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: rgba(255,255,255,.8); border-radius: 18px; box-shadow: 0 4px 10px rgba(0,0,0,.08); max-width: 100%; }
.g-measure .ms-line { display: flex; align-items: center; min-height: 34px; }
.g-measure .ms-blockrow { position: relative; height: calc(var(--u) + 20px); padding: 0; border: 3px dashed #b8acd9; border-radius: 10px; background: rgba(106,92,255,.05); cursor: pointer; }
.g-measure .ms-cube { position: absolute; top: 1px; width: var(--u); height: var(--u); border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(180deg, #b197fc, #7048e8); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.4); animation: popIn .25s; }
.g-measure .ms-cube:nth-child(even) { background: linear-gradient(180deg, #ffc078, #fd7e14); }
.g-measure .ms-ctl { display: flex; align-items: center; gap: 16px; }
.g-measure .ms-count { font-size: 44px; font-weight: 700; color: #6a5cff; min-width: 60px; text-align: center; }
.g-measure .ms-done { min-height: 72px; min-width: 130px; border-radius: 24px; font-size: 26px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #51cf66, #2b9a48); box-shadow: 0 6px 0 #1e7a37; }
.g-measure .ms-done:active { transform: translateY(4px); box-shadow: 0 2px 0 #1e7a37; }
.g-measure .ms-zone { position: relative; height: 62px; border: 3px dashed #b8acd9; border-radius: 12px; display: flex; align-items: center; }
.g-measure .ms-zone:empty::after { content: '← ruler here'; margin-left: 14px; font-size: 18px; font-weight: 700; opacity: .55; } /* text, not native emoji (CSS content is never swapped for our art) */
.g-measure .measured .ms-zone { border-color: transparent; }
.g-measure .ms-zone.drop-over { background: rgba(106,92,255,.12); }
.g-measure .ms-rtray { min-height: 70px; display: flex; justify-content: center; }
.g-measure .ms-ruler { position: relative; height: 56px; border-radius: 8px; flex: none; animation: popIn .4s;
  background: linear-gradient(180deg, #ffe8a3, #f7c948); box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 6px 10px rgba(0,0,0,.18); }
.g-measure .ms-ruler i { position: absolute; top: 0; width: 2px; margin-left: -1px; background: #5c3d0f; }
.g-measure .ms-ruler i.w { height: 18px; }
.g-measure .ms-ruler i.h { height: 10px; opacity: .7; }
.g-measure .ms-ruler i b { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 700; color: #5c3d0f; }
.g-measure .ms-unit { position: absolute; right: 6px; bottom: 3px; font-size: 12px; font-weight: 700; color: #8a6116; }
.g-measure .ms-scale { position: relative; width: min(320px, 92%); height: 200px; }
.g-measure .ms-post { position: absolute; left: 50%; top: 36px; bottom: 16px; width: 12px; margin-left: -6px; background: linear-gradient(90deg, #adb5bd, #868e96); border-radius: 6px; }
.g-measure .ms-base { position: absolute; left: 50%; bottom: 0; width: 120px; margin-left: -60px; height: 20px; border-radius: 12px 12px 6px 6px; background: linear-gradient(180deg, #868e96, #495057); }
.g-measure .ms-beam { position: absolute; left: 48px; right: 48px; top: 30px; height: 12px; border-radius: 6px; background: linear-gradient(180deg, #ffd43b, #f59f00); transition: transform .5s cubic-bezier(.3,1.4,.5,1); z-index: 2; }
.g-measure .ms-beam::after { content: ''; position: absolute; left: 50%; top: -4px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #e67700; }
.g-measure .ms-pan { position: absolute; top: 40px; width: 116px; height: 110px; transition: transform .5s cubic-bezier(.3,1.4,.5,1); display: flex; flex-direction: column; justify-content: flex-end; }
.g-measure .ms-pan.l { left: 0; } .g-measure .ms-pan.r { right: 0; }
.g-measure .ms-pan::before { content: ''; position: absolute; left: 50%; top: -2px; height: 92px; width: 104px; margin-left: -52px;
  background: linear-gradient(to top left, transparent calc(50% - 1.5px), #868e96 calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)) left / 50% 100% no-repeat,
    linear-gradient(to top right, transparent calc(50% - 1.5px), #868e96 calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)) right / 50% 100% no-repeat; }
.g-measure .ms-pan::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; border-radius: 0 0 60px 60px; background: linear-gradient(180deg, #ced4da, #868e96); }
.g-measure .ms-load { position: relative; z-index: 1; display: flex; flex-wrap: wrap-reverse; justify-content: center; align-items: flex-end; gap: 2px; padding: 0 8px 18px; min-height: 40px; }
.g-measure .ms-obj { font-size: 44px; line-height: 1; filter: drop-shadow(0 3px 2px rgba(0,0,0,.2)); }
.g-measure .ms-pan.r.drop-over::after { background: linear-gradient(180deg, #d0bfff, #7950f2); }
.g-measure .ms-weight { width: 48px; height: 48px; border-radius: 10px; background: linear-gradient(180deg, #ffc078, #fd7e14); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 4px 0 rgba(0,0,0,.15); transition: transform .15s; }
.g-measure .ms-load .ms-weight { width: 24px; height: 24px; border-radius: 5px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.g-measure .ms-pile { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 340px; }
.g-measure .ms-read { font-size: 24px; font-weight: 700; }
.g-measure .ms-read b { color: #6a5cff; font-size: 30px; }
.g-measure .ms-scale.even .ms-beam { box-shadow: 0 0 18px #ffe066; }
.g-measure .ms-units { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 10px; }
.g-measure .ms-ubar { height: 34px; border-radius: 6px; position: relative; }
.g-measure .ms-ubar.in { width: 127px; background: linear-gradient(180deg, #ffd43b, #f59f00); }
.g-measure .ms-ubar.cm { width: 50px; background: linear-gradient(180deg, #74c0fc, #1c7ed6); }
.g-measure .ms-ubar span { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-weight: 700; }
.choices.g-measure.ms-ans .choice small { display: inline; font-size: .5em; }
/* compare: answers sit inside the panel; after the right pick, unit cubes / block numbers count it out */
.scene.g-measure.ms-cmp { width: 100%; max-width: 640px; padding: 16px 12px 22px; }
.scene.g-measure.ms-cmp > .choices { width: 100%; }
.g-measure .ms-col { flex-direction: column; align-items: flex-start; gap: 6px; }
.g-measure .ms-strip { display: flex; align-items: center; gap: 0; height: 16px; opacity: 0; transition: opacity .3s; }
.g-measure .ms-strip i { height: 14px; box-sizing: border-box; border: 2px solid #fff; border-radius: 4px; background: #9775fa; flex: none; }
.g-measure .ms-strip i:nth-child(even) { background: #ffa94d; }
.g-measure .ms-strip b { margin-left: 8px; font-size: 20px; color: #6a5cff; }
.g-measure .ms-show .ms-strip { opacity: 1; }
.g-measure .ms-show .ms-strip i { animation: popIn .3s backwards; }
.g-measure .ms-tower i { display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; color: transparent; transition: color .3s; }
.g-measure .ms-show .ms-tower i { color: #fff; }
/* unit sense */
.g-measure .ms-sense { display: flex; align-items: center; gap: 18px; padding: 8px 18px; }
.g-measure .ms-sobj { font-size: clamp(64px, 18vw, 96px); line-height: 1; filter: drop-shadow(0 4px 3px rgba(0,0,0,.2)); }
.g-measure .ms-sq { font-size: clamp(34px, 9vw, 48px); font-weight: 700; color: #2b1b4f; white-space: nowrap; }
.g-measure .ms-sans { display: inline-block; min-width: 1.6em; padding: 0 .3em; border-radius: 14px; background: #fff3bf; color: #6a5cff; }
.g-measure .ms-sans small { font-size: .55em; }

/* ============================================================ Treasure Map */
.scene.g-mapquest { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 10px 8px; flex: 0 1 auto;
  background: linear-gradient(160deg, #3fc5ff, #1b8fd6); }
.g-mapquest .mq-paper { position: relative; padding: 60px 12px 12px 8px; border-radius: 18px; background: radial-gradient(circle at 30% 20%, #fff7df, #f3dca8 70%, #e2bd76);
  box-shadow: inset 0 0 30px rgba(139, 90, 43, .35), 0 10px 20px rgba(0,0,0,.25); transform: rotate(-.6deg); max-width: 100%; }
.g-mapquest .mq-compass { position: absolute; right: 10px; top: 6px; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle, #fff, #f2d49b); box-shadow: 0 0 0 3px #c8963e, 0 4px 8px rgba(0,0,0,.25); z-index: 3; }
.g-mapquest .mq-compass b { position: absolute; font-size: 13px; font-weight: 700; }
.g-mapquest .mq-compass .n { top: 2px; left: 50%; transform: translateX(-50%); color: #e03131; font-size: 16px; }
.g-mapquest .mq-compass .s { bottom: 2px; left: 50%; transform: translateX(-50%); }
.g-mapquest .mq-compass .e { right: 5px; top: 50%; transform: translateY(-50%); }
.g-mapquest .mq-compass .w { left: 5px; top: 50%; transform: translateY(-50%); }
.g-mapquest .mq-compass i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 15px; opacity: .6; }
.g-mapquest .mq-map { --cell: min(calc((100vw - 84px) / var(--n)), 62px); }
.g-mapquest .mq-top { display: flex; padding-left: 0; }
.g-mapquest .mq-top i { width: 22px; flex: none; }
.g-mapquest .mq-top b, .g-mapquest .mq-side b { display: grid; place-items: center; font-weight: 700; color: #8b5a2b; font-size: 15px; }
.g-mapquest .mq-top b { width: var(--cell); height: 22px; }
.g-mapquest .mq-mid { display: flex; }
.g-mapquest .mq-side { display: flex; flex-direction: column; width: 22px; flex: none; }
.g-mapquest .mq-side b { height: var(--cell); }
.g-mapquest .mq-body { position: relative; display: grid; grid-template-columns: repeat(var(--n), var(--cell)); grid-auto-rows: var(--cell); border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 3px #8b5a2b; }
.g-mapquest .mq-cell { position: relative; display: grid; place-items: center; background: #a9e07f; border: 1px solid rgba(80, 120, 40, .35); font-size: calc(var(--cell) * .55); transition: background .15s; }
.g-mapquest .mq-cell.alt { background: #9ad673; }
.g-mapquest .mq-cell:active { background: #fff3b0; }
.g-mapquest .mq-decor { opacity: .45; font-size: .7em; }
.g-mapquest .mq-lm { filter: drop-shadow(0 3px 2px rgba(0,0,0,.25)); line-height: 1; }
.g-mapquest .mq-cell.ring { box-shadow: inset 0 0 0 3px #ff4f6d; }
.g-mapquest .mq-cell.stepped { background: #ffe8a3; }
.g-mapquest .mq-cell.hint { z-index: 2; }
.g-mapquest .mq-token, .g-mapquest .mq-chest, .g-mapquest .mq-trail { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.g-mapquest .mq-token { font-size: calc(var(--cell) * .62); z-index: 4; transition: left .24s, top .24s; filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)); }
.g-mapquest .mq-trail { width: 8px; height: 8px; border-radius: 50%; background: #e03131; opacity: .6; z-index: 3; }
.g-mapquest .mq-chest { font-size: calc(var(--cell) * .8); z-index: 5; animation: revealIn .5s; }
.g-mapquest .mq-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.g-mapquest .mq-chips:empty { display: none; }
.g-mapquest .mq-chip { display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 4px 16px; border-radius: 26px; background: #fff; font-size: 22px; box-shadow: 0 5px 0 rgba(0,0,0,.18); animation: popIn .4s backwards; }
.g-mapquest .mq-chip b { color: #8b5a2b; }
.g-mapquest .mq-chip + .mq-chip { animation-delay: .15s; }
.g-mapquest .mq-scale { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #fff; font-size: 18px; }
.g-mapquest .mq-scale i { width: 26px; height: 26px; background: #a9e07f; border: 2px solid #fff; border-radius: 4px; }
.g-mapquest .mq-coord { color: #8b5a2b; background: #fff3d1; border-radius: 12px; padding: 0 10px; }
.choices.g-mapquest.mq-way .choice { gap: 8px; }
.choices.g-mapquest.mq-way .mq-arr { font-size: 1.3em; line-height: 1; }

/* ============================================================ small screens / calm */
@media (max-width: 380px) {
  .g-recycle .rc-item { width: 74px; min-height: 84px; }
  .g-recycle .rc-art { font-size: 36px; }
  .g-recycle.n5 .rc-name { font-size: 10px; }
  .g-colorlab .cl-pot { width: 62px; }
  .g-colorlab .cl-jar { width: 52px; }
  .g-healthyplate .hp-food { width: 70px; }
}
.a11y-calm .g-recycle .rc-belt::after, .a11y-calm .g-recycle .rc-cloud, .a11y-calm .g-storyline .st-smoke,
.a11y-calm .g-feelings .fe-friend, .a11y-calm .g-feelings .fe-scene, .a11y-calm .g-wordsabroad .wa-ear { animation: none; }
.a11y-motor .g-mapquest .mq-map { --cell: min(calc((100vw - 60px) / var(--n)), 72px); }
.g-storyline.compact .st-wheel, .g-storyline.compact .st-engine { display: none; }
.g-measure .ms-ghost { position: absolute; top: 1px; width: var(--u); height: var(--u); border-radius: 6px; border: 3px dashed #9775fa; color: #9775fa; display: grid; place-items: center; font-weight: 700; font-size: 18px; box-sizing: border-box; animation: pulse 1.2s ease-in-out infinite; }
.g-colorlab .cl-shelf { flex-wrap: nowrap; }
.g-colorlab .cl-pot { width: auto; flex: 1 1 0; max-width: 78px; min-width: 0; }
.g-colorlab .cl-jar { width: min(60px, 100%); }
.g-storyline.caps .st-card { flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px; }
.g-storyline.caps .st-pic { font-size: 26px; }
.g-storyline.caps .st-car .st-card { flex-direction: row; align-items: center; }
.g-storyline.caps.compact .st-car .st-card .st-pic { font-size: 22px; }
.ge-dot { color: rgba(43, 27, 79, .4); }

/* ============================================================ tablets */
@media (min-width: 600px) {
  .scene.g-recycle, .scene.g-colorlab, .scene.g-storyline, .scene.g-drumbeat, .scene.g-tangram, .scene.g-healthyplate { max-width: 720px; margin: 0 auto; }
  .g-recycle .rc-item { width: 112px; min-height: 122px; border-radius: 26px; }
  .g-recycle .rc-art { font-size: 58px; height: 66px; }
  .g-recycle .rc-art svg { width: 46px; height: 68px; }
  .g-recycle .rc-label { font-size: 15px; }
  .g-recycle .rc-bin { --bh: 220px; }
  .g-recycle .rc-icon { width: min(72px, 72%); font-size: 46px; }
  .g-recycle.n5 .rc-bin { --bh: 180px; }
  .g-recycle.n5 .rc-icon { font-size: 34px; }
  .g-recycle .rc-name { font-size: 19px; }
  .g-colorlab .cl-bowl { width: 230px; }
  .g-colorlab .cl-blob.big { width: 110px; height: 110px; font-size: 40px; }
  .g-colorlab .cl-pot { max-width: 120px; }
  .g-colorlab .cl-jar { width: 92px; }
  .g-colorlab .cl-name { font-size: 19px; }
  .g-colorlab .cl-pot .cl-name { font-size: 18px; }
  .g-storyline.pics .st-car { max-width: 150px; min-height: 140px; }
  .g-storyline.pics .st-card { width: 130px; height: 130px; }
  .g-storyline.pics .st-card .st-pic { font-size: 52px; }
  .g-storyline.pics .st-car .st-card { height: 96px; }
  .g-storyline.pics .st-car .st-card .st-pic { font-size: 36px; }
  .g-storyline .st-engine { font-size: 60px; }
  .g-storyline .st-cap { font-size: 20px; }
  .g-storyline.caps .st-pic { font-size: 36px; }
  .g-storyline .st-car { min-height: 96px; }
  .g-healthyplate .hp-dish { width: 370px; }
  .g-healthyplate .hp-cup { width: 110px; height: 146px; }
  .g-healthyplate .hp-food { width: 100px; min-height: 100px; }
  .g-healthyplate .hp-art { font-size: 50px; }
  .g-healthyplate .hp-lab { font-size: 15px; }
  .g-feelings .fe-friend { width: 190px; }
  .g-wordsabroad .wa-card { min-height: 130px; }
  .g-measure .ms-obj { font-size: 56px; }
  .g-mapquest .mq-map { --cell: min(calc((100vw - 120px) / var(--n)), 78px); }
  .g-mapquest .mq-top b, .g-mapquest .mq-side b { font-size: 19px; }
}
.db-demo-staff { background: #fff; border-radius: 18px; padding: 8px 10px 2px; box-shadow: 0 6px 14px rgba(0,0,0,.12); display: inline-block; }
.db-demo-staff svg { display: block; width: min(400px, 72vw); height: auto; }
