/* SparkGlee — games B: spell, rhyme, clock, coins, sight, numberline, fractions, compare.
 * Every rule is scoped under .g-<id>. */

/* ───────────── Spelling Bee ───────────── */
.g-spell.scene {
  display: flex; flex-direction: column; align-items: center; justify-content: space-evenly;
  gap: 10px; padding: 14px 10px; overflow: hidden;
  background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.55), transparent 40%),
    repeating-linear-gradient(60deg, rgba(255,210,63,.18) 0 18px, rgba(255,180,40,.10) 18px 36px),
    linear-gradient(180deg, #fff6d6, #ffe08a);
}
.g-spell .sp-pic {
  position: relative; border: 0; cursor: pointer; font-family: inherit;
  width: clamp(110px, 26vmin, 180px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffe9a8 60%, #ffc94a);
  box-shadow: 0 10px 24px rgba(180,110,0,.3), inset 0 -6px 0 rgba(200,130,0,.25);
  display: grid; place-items: center;
}
.g-spell .sp-emoji { font-size: clamp(64px, 16vmin, 110px); line-height: 1; filter: drop-shadow(0 4px 4px rgba(0,0,0,.18)); }
.g-spell .sp-ear { position: absolute; right: -2px; bottom: 4px; font-size: 24px; background: #fff; border-radius: 50%; padding: 4px; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.g-spell .sp-slots { --n: 3; display: flex; gap: clamp(4px, 1.4vw, 10px); justify-content: center; flex-wrap: nowrap; max-width: 100%; }
.g-spell .sp-slot {
  width: min(64px, calc((100vw - 60px) / var(--n) - 8px)); aspect-ratio: 0.9;
  border-radius: 14px; background: rgba(255,255,255,.65); border: 3px dashed #e0a020;
  display: grid; place-items: center; font-size: clamp(26px, 7vw, 44px); font-weight: 700; color: #7a4a00;
  transition: background .2s, transform .2s;
}
.g-spell .sp-slot.next { border-style: solid; border-color: #ff9a3c; box-shadow: 0 0 0 4px rgba(255,154,60,.25); }
.g-spell .sp-slot.filled { background: linear-gradient(180deg, #fffbe9, #ffe08a); border: 3px solid #f0b030; animation: g-spell-drop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes g-spell-drop { from { transform: translateY(-18px) scale(.7); } to { transform: none; } }
.g-spell .sp-slots.complete .sp-slot { background: linear-gradient(180deg, #d9ffe6, #8ef0b4); border-color: #2fbf71; color: #11673a; animation: g-spell-wave .6s ease both; }
.g-spell .sp-slots.complete .sp-slot:nth-child(2) { animation-delay: .06s; } .g-spell .sp-slots.complete .sp-slot:nth-child(3) { animation-delay: .12s; }
.g-spell .sp-slots.complete .sp-slot:nth-child(4) { animation-delay: .18s; } .g-spell .sp-slots.complete .sp-slot:nth-child(5) { animation-delay: .24s; }
.g-spell .sp-slots.complete .sp-slot:nth-child(6) { animation-delay: .30s; } .g-spell .sp-slots.complete .sp-slot:nth-child(7) { animation-delay: .36s; }
.g-spell .sp-slots.complete .sp-slot:nth-child(8) { animation-delay: .42s; }
@keyframes g-spell-wave { 50% { transform: translateY(-12px); } }
.g-spell .sp-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 2vw, 12px); max-width: 560px; }
.g-spell .sp-tile {
  width: clamp(54px, 15vw, 76px); height: clamp(58px, 16vw, 80px); border: 0; cursor: pointer;
  font-family: inherit; font-size: clamp(28px, 8vw, 42px); font-weight: 700; color: #5a3200;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  background: linear-gradient(180deg, #ffe680, #ffb820 70%, #f09a10);
  filter: drop-shadow(0 5px 0 #c47800) drop-shadow(0 8px 10px rgba(0,0,0,.18));
  transition: transform .15s, opacity .25s;
}
.g-spell .sp-tile:active { transform: translateY(3px) scale(.96); }
.g-spell .sp-tile.used { opacity: .18; transform: scale(.8); pointer-events: none; }
.g-spell .sp-tile.bounce { animation: g-spell-bounce .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes g-spell-bounce { 0% { transform: translateY(0); } 30% { transform: translateY(-16px) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } 80% { transform: translateY(-5px); } 100% { transform: none; } }

/* ───────────── Rhyme Time ───────────── */
.g-rhyme.scene {
  display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 170px;
  background: radial-gradient(circle at 50% 110%, rgba(255,255,255,.5), transparent 55%), linear-gradient(160deg, #ffe0f1, #e4d6ff);
}
.g-rhyme .rh-notes span { position: absolute; bottom: -30px; font-size: 30px; color: #b05cff; opacity: .7; animation: g-rhyme-note 4s linear infinite; }
@keyframes g-rhyme-note { from { transform: translateY(0) rotate(-10deg); opacity: 0; } 15% { opacity: .8; } to { transform: translateY(-260px) rotate(20deg); opacity: 0; } }
.g-rhyme .rh-target {
  position: relative; border: 0; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 34px 14px; border-radius: 30px;
  background: linear-gradient(180deg, #fff, #ffeefa); box-shadow: 0 12px 30px rgba(140,60,200,.28), inset 0 -6px 0 rgba(200,120,255,.2);
}
.g-rhyme .rh-pic { font-size: clamp(70px, 18vmin, 120px); line-height: 1.05; }
.g-rhyme .rh-word { font-size: clamp(30px, 8vw, 46px); font-weight: 700; color: #7a2fd1; letter-spacing: 2px; }
.g-rhyme.choices .choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 6px; min-height: 96px; }
.g-rhyme .rh-opt-pic { font-size: clamp(38px, 10vw, 54px); line-height: 1.1; }
.g-rhyme .rh-opt-word { font-size: clamp(20px, 5vw, 28px); font-weight: 700; }

/* ───────────── Clock Tower ───────────── */
.g-clock.scene {
  display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 200px;
  background: linear-gradient(180deg, #8fd3ff 0%, #c9ecff 70%, #9be38f 70%, #6cc46a 100%);
}
.g-clock .ck-cloud { position: absolute; width: 90px; height: 30px; background: #fff; border-radius: 30px; opacity: .85; animation: g-clock-drift 18s linear infinite; }
.g-clock .ck-cloud::before { content: ''; position: absolute; width: 44px; height: 40px; left: 18px; top: -20px; background: #fff; border-radius: 50%; }
.g-clock .ck-cloud.c1 { top: 12%; left: -100px; }
.g-clock .ck-cloud.c2 { top: 28%; left: -100px; animation-delay: -9s; transform: scale(.7); }
@keyframes g-clock-drift { to { left: 110%; } }
/* The tower is an illustrated picture (prop/clock-tower); the code-drawn ticks, numbers and hands sit exactly on its blank
 * dial (the svg box is placed so its r=96 circle matches the picture's purple rim). */
.g-clock .ck-tower { position: relative; width: min(66vmin, 300px); aspect-ratio: 607 / 700; filter: drop-shadow(0 12px 14px rgba(60,30,0,.25)); }
.g-clock .ck-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.g-clock .ck-face { position: absolute; left: 14.4%; width: 70.2%; top: 24.2%; aspect-ratio: 1; }
.g-clock .ck-svg { width: 100%; height: 100%; display: block; }
.g-clock .ck-num { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 20px; fill: #3b2a7a; }
.g-clock .ck-later {
  position: absolute; right: 6%; top: 10%; padding: 8px 14px; border-radius: 18px;
  background: linear-gradient(180deg, #ffef8a, #ffc93c); color: #6b3e00; font-weight: 700; font-size: clamp(18px, 4.5vw, 26px);
  box-shadow: 0 6px 14px rgba(0,0,0,.2); transform: rotate(6deg);
}
.g-clock .ck-digital {
  font-family: 'Fredoka', monospace; font-variant-numeric: tabular-nums; letter-spacing: 1px;
  display: inline-block; padding: 2px 12px; border-radius: 10px;
  background: #1d1a3a; color: #7dffb0; text-shadow: 0 0 8px rgba(125,255,176,.7);
}

/* ───────────── Coin Count ───────────── */
.g-coins.scene {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; overflow: hidden; padding: 14px 10px;
  background: radial-gradient(ellipse at 50% 100%, #2a8f5a 0 45%, transparent 46%), radial-gradient(circle at 30% 20%, rgba(255,255,255,.5), transparent 40%),
    linear-gradient(180deg, #e9fff2, #b9f0cf);
}
.g-coins .cn-pile { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(6px, 1.8vw, 12px); max-width: 600px; }
.g-coins .cn-coin {
  --s: 1; --d: clamp(46px, 12.5vw, 76px);
  width: calc(var(--d) * var(--s)); height: calc(var(--d) * var(--s)); border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  display: grid; place-items: center; font-family: inherit; position: relative;
  animation: g-coins-drop .5s cubic-bezier(.3,1.6,.5,1) backwards;
  transition: transform .2s;
}
/* coins are illustrated (prop/coin-silver|copper|gold, one AI coin tinted three ways); value labels stay as live text */
.g-coins .cn-coin { background: center / contain no-repeat; filter: drop-shadow(0 4px 3px rgba(0,0,0,.25)); }
.g-coins .cn-face { position: relative; z-index: 1; font-weight: 700; font-size: calc(var(--d) * var(--s) * .3); text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.g-coins .cn-coin.copper { background-image: url(../img/art/props/coin-copper.webp); color: #5a2a0c; }
.g-coins .cn-coin.silver { background-image: url(../img/art/props/coin-silver.webp); color: #2f3946; }
.g-coins .cn-coin.gold { background-image: url(../img/art/props/coin-gold.webp); color: #6b4300; }
.g-coins .cn-coin.twotone { background-image: radial-gradient(circle, #ffd54a 0 30%, #e0a800 31% 33%, transparent 34%), url(../img/art/props/coin-silver.webp); color: #6b4300; }
.g-coins .cn-coin.tapped { transform: translateY(-6px) rotate(-10deg); outline: 4px solid rgba(255,255,255,.85); outline-offset: 2px; }
@keyframes g-coins-drop { from { transform: translateY(-60px) rotateY(180deg); opacity: 0; } to { transform: none; opacity: 1; } }
.g-coins .cn-pile { max-width: 680px; }
.g-coins .cn-run { position: absolute; z-index: 2; top: -14px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 99px; background: #1d7a48; color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; animation: popIn .25s; }
.g-coins .cn-shop { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 18px; }
.g-coins .cn-toy { font-size: clamp(62px, 16vmin, 96px); }
.g-coins .cn-tag {
  position: relative; padding: 10px 18px 10px 26px; font-size: clamp(24px, 6vw, 34px); font-weight: 700; color: #8a1f3a;
  background: linear-gradient(180deg, #fff, #ffe1ea); border-radius: 8px 16px 16px 8px; box-shadow: 0 6px 14px rgba(0,0,0,.18); transform: rotate(-4deg);
}
.g-coins .cn-tag::before { content: ''; position: absolute; left: 8px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #ff8fb0; }
.g-coins .cn-arrow { font-size: 34px; color: #1d7a48; animation: g-coins-nudge 1s ease-in-out infinite; }
@keyframes g-coins-nudge { 50% { transform: translateX(-8px); } }
.g-coins .cn-paid { padding: 10px; border-radius: 20px; background: rgba(255,255,255,.55); }

/* ───────────── Word Splash ───────────── */
.g-sight.scene {
  overflow: hidden; min-height: 240px;
  background: linear-gradient(180deg, #bfefff 0%, #e6f9ff 55%, #59c3f0 56%, #1d8fd6 100%);
}
.g-sight .ws-sun { position: absolute; top: 6px; right: 14px; font-size: 40px; animation: g-sight-spin 12s linear infinite; }
@keyframes g-sight-spin { to { transform: rotate(360deg); } }
.g-sight .ws-water { position: absolute; left: -10%; right: -10%; top: 50%; height: 30px; background: radial-gradient(circle at 15px -6px, transparent 16px, #59c3f0 17px) repeat-x; background-size: 30px 30px; animation: g-sight-wave 3s linear infinite; }
@keyframes g-sight-wave { to { transform: translateX(30px); } }
.g-sight .ws-bubbles i { position: absolute; bottom: -12px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); animation: g-sight-rise 4s ease-in infinite; }
@keyframes g-sight-rise { to { transform: translateY(-140px); opacity: 0; } }
.g-sight .ws-balloon {
  position: absolute; translate: -50% -50%; border: 0; background: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; font-family: inherit; z-index: 1;
}
.g-sight .ws-skin {
  display: grid; place-items: center; min-width: clamp(90px, 25vw, 136px); height: clamp(84px, 22vw, 124px); padding: 0 18px 12%;
  position: relative;
}
/* The balloon picture: round top tapering to the knot at the bottom centre (the knot is part of the picture). */
.g-sight .ws-art { position: absolute; inset: 0; z-index: -1; filter: drop-shadow(0 10px 12px rgba(0,40,90,.25)); }
.g-sight .ws-art svg { display: block; width: 100%; height: 100%; }
.g-sight .ws-word { position: relative; font-size: clamp(26px, 7vw, 40px); font-weight: 700; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.g-sight .ws-word.long { font-size: clamp(22px, 5.6vw, 36px); }
.g-sight .ws-string { width: 2px; height: 30px; margin-top: -2px; background: rgba(255,255,255,.85); border-radius: 1px; }
.g-sight .ws-balloon.popped .ws-skin { animation: g-sight-pop .35s ease-out forwards; }
.g-sight .ws-balloon.popped .ws-string { opacity: 0; transition: opacity .3s; }
@keyframes g-sight-pop { 40% { transform: scale(1.3); } 100% { transform: scale(1.6); opacity: 0; filter: blur(4px); } }

/* ───────────── Frog Hop ───────────── */
.g-numberline.scene {
  display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 180px;
  background: radial-gradient(75% 30% at 50% 100%, #3fa7e0 0 98%, transparent 100%), linear-gradient(180deg, #d8f7ff, #a8e6cf);
}
.g-numberline .nl-pond { width: min(100%, 720px); padding: 0 6px; }
.g-numberline .nl-svg { width: 100%; height: auto; display: block; overflow: visible; }
.g-numberline .nl-lab { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 30px; fill: #fff; paint-order: stroke; stroke: #1b5e8a; stroke-width: 6px; }
.g-numberline .nl-pad { opacity: .9; }
.g-numberline .nl-found { fill: #ffe066; stroke: #c2255c; animation: popIn .4s; transform-box: fill-box; transform-origin: center; }
.g-numberline .nl-frog-emoji { font-size: 46px; }
.g-numberline .nl-reeds { position: absolute; left: 8px; bottom: 6px; font-size: 44px; transform-origin: bottom; animation: g-nl-sway 3s ease-in-out infinite; }
@keyframes g-nl-sway { 50% { transform: rotate(8deg); } }
.g-numberline .nl-fly { position: absolute; right: 10%; top: 10%; font-size: 26px; }

/* ───────────── Pizza Party ───────────── */
.g-fractions.scene {
  display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 190px;
  background: repeating-conic-gradient(from 0deg at 50% 50%, #ffe3e3 0 25%, #fff 0 50%) 0 0 / 56px 56px;
}
.g-fractions .pz-table { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(255,120,80,.18) 100%); pointer-events: none; }
.g-fractions .pz-pizza { position: relative; }
.g-fractions .pz-svg { width: 100%; height: 100%; display: block; }
.g-fractions .pz-big { width: min(62vmin, 280px); aspect-ratio: 1; animation-duration: .6s; }
.g-fractions .pz-big .pz-svg { animation: g-fr-spin .8s cubic-bezier(.3,1.3,.5,1); }
@keyframes g-fr-spin { from { transform: rotate(-120deg) scale(.6); } to { transform: none; } }
.g-fractions .pz-order {
  display: flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fff2d6); box-shadow: 0 10px 24px rgba(160,60,0,.25); transform: rotate(-3deg);
}
.g-fractions .pz-order .pz-frac { font-size: clamp(40px, 10vw, 60px); color: #b3261e; }
.g-fractions .pz-pair { display: flex; align-items: center; gap: clamp(8px, 3vw, 22px); }
.g-fractions .pz-mid { width: min(36vmin, 180px); aspect-ratio: 1; }
.g-fractions .pz-eq { font-size: clamp(40px, 10vw, 60px); font-weight: 700; color: #b3261e; }
.g-fractions .pz-mystery {
  width: min(36vmin, 180px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: 5px dashed #e9a54f; background: rgba(255,255,255,.6); font-size: clamp(50px, 12vw, 80px); font-weight: 700; color: #d98b3a;
}
.g-fractions .pz-frac { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 700; vertical-align: middle; }
.g-fractions .pz-frac .pz-num { padding: 0 .18em .06em; border-bottom: .09em solid currentColor; }
.g-fractions .pz-frac .pz-den { padding-top: .06em; }
.g-fractions.choices .choice .pz-frac { font-size: clamp(28px, 7vw, 40px); }
.g-fractions.pz-pick .choice { padding: 8px; min-height: 0; }
.g-fractions.pz-pick .pz-pizza { width: min(26vw, 150px); aspect-ratio: 1; margin: auto; }

/* ───────────── Gator Chomp ───────────── */
.g-compare.scene {
  display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 180px;
  background: linear-gradient(180deg, #d9f7e5 0%, #b8ecd0 55%, #4aa88a 56%, #2f7f6c 100%);
}
.g-compare .gc-swamp { position: absolute; left: 0; right: 0; bottom: 0; height: 44%; background: repeating-linear-gradient(90deg, transparent 0 40px, rgba(255,255,255,.07) 40px 80px); animation: g-gc-flow 6s linear infinite; }
@keyframes g-gc-flow { to { background-position: 80px 0; } }
.g-compare .gc-lily { position: absolute; font-size: 30px; bottom: 8%; }
.g-compare .gc-lily.l1 { left: 6%; } .g-compare .gc-lily.l2 { right: 7%; bottom: 16%; }
.g-compare .gc-row { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2.5vw, 20px); width: 100%; padding: 0 8px; }
.g-compare .gc-card {
  flex: 0 1 auto; min-width: clamp(96px, 28vw, 170px); padding: 14px 12px; border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: linear-gradient(180deg, #fff, #eefcf3); box-shadow: 0 10px 22px rgba(0,70,40,.25), inset 0 -5px 0 rgba(47,158,79,.18);
}
.g-compare .gc-num { font-size: clamp(34px, 9vw, 60px); font-weight: 700; color: #155e3a; font-variant-numeric: tabular-nums; }
.g-compare .gc-num.neg { color: #1a5fbf; }
.g-compare .gc-frac { display: inline-flex; flex-direction: column; align-items: center; font-size: clamp(32px, 8vw, 52px); font-weight: 700; color: #155e3a; line-height: 1; }
.g-compare .gc-frac span:first-child { padding: 0 .2em .06em; border-bottom: .09em solid currentColor; }
.g-compare .gc-frac span:last-child { padding-top: .06em; }
.g-compare .gc-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.g-compare .gc-dots i { width: clamp(12px, 3.4vw, 18px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe47a, #ffb020); box-shadow: 0 2px 0 #c98200; }
.g-compare .gc-dots { grid-template-columns: repeat(5, auto); justify-content: center; margin-top: 6px; } /* centre short rows (1 dot sat in the corner) */
.g-compare .gc-mid { position: relative; width: clamp(80px, 22vw, 130px); aspect-ratio: 1.4; display: grid; place-items: center; }
.g-compare .gc-q {
  position: absolute; inset: 14% 18%; display: grid; place-items: center; border-radius: 50%;
  font-size: clamp(38px, 10vw, 60px); font-weight: 700; color: #fff; background: radial-gradient(circle at 35% 30%, #7ee8a6, #2f9e4f);
  box-shadow: 0 6px 14px rgba(0,0,0,.2); animation: g-gc-bob 1.6s ease-in-out infinite; transition: opacity .2s;
}
@keyframes g-gc-bob { 50% { transform: translateY(-6px); } }
.g-compare .gc-mouth { position: absolute; inset: 0; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s cubic-bezier(.3,1.6,.5,1); }
.g-compare .gc-gator { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
.g-compare .gc-jaw-up, .g-compare .gc-jaw-low { transform-box: view-box; transform-origin: 30px 40px; transition: transform .25s; }
.g-compare .gc-mid.show .gc-q { opacity: 0; animation: none; }
.g-compare .gc-mid.show .gc-mouth { opacity: 1; transform: none; }
.g-compare .gc-mid.right .gc-mouth { transform: none; }
.g-compare .gc-mid.left .gc-mouth { transform: scaleX(-1); }
.g-compare .gc-mid.right .gc-jaw-up, .g-compare .gc-mid.left .gc-jaw-up { animation: g-gc-up .7s ease forwards; }
.g-compare .gc-mid.right .gc-jaw-low, .g-compare .gc-mid.left .gc-jaw-low { animation: g-gc-low .7s ease forwards; }
@keyframes g-gc-up { 0% { transform: rotate(0); } 30% { transform: rotate(-24deg); } 50% { transform: rotate(0); } 100% { transform: rotate(-22deg); } }
@keyframes g-gc-low { 0% { transform: rotate(0); } 30% { transform: rotate(22deg); } 50% { transform: rotate(0); } 100% { transform: rotate(20deg); } }
.g-compare .gc-mid.equal .gc-mouth { animation: g-gc-chomp .5s ease 2; }
@keyframes g-gc-chomp { 50% { transform: scale(1.12); } }
.g-compare.choices .choice.gc-btn {
  background: linear-gradient(180deg, #6fe39a, #2f9e4f); color: #fff; box-shadow: 0 6px 0 #1d6e35, 0 10px 18px rgba(0,0,0,.2);
  min-height: 84px;
}
.g-compare .gc-sign { font-size: clamp(46px, 12vw, 64px); font-weight: 700; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.2); }

/* Small/short screens */
@media (max-height: 640px) {
  .g-spell .sp-pic { width: 96px; } .g-spell .sp-emoji { font-size: 58px; }
  .g-clock .ck-tower { width: min(52vmin, 250px); }
  .g-fractions .pz-big { width: min(46vmin, 220px); }
}

/* ───────────── Pip's Tricks demos (batch B) — shown inside the trick modal, so scoped by demo class ───────────── */
.g-spell-demo span, .g-rhyme-demo span, .g-compare-demo span {
  display: inline-grid; place-items: center; min-width: 1.6em; padding: 4px 12px; border-radius: 14px;
  background: #fff; color: #2b2d42; font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,.12);
}
.g-spell-demo span.demo-arrow { background: none; box-shadow: none; min-width: 0; padding: 0 2px; }
.g-spell-demo b, .g-rhyme-demo b { color: #ff5c8a; }
.g-rhyme-demo s { opacity: .4; text-decoration-thickness: 3px; }
.g-clock-demo { display: flex; justify-content: center; }
.g-clock-demo .ck-demo-svg { width: min(46vmin, 220px); height: auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
.g-clock-demo-row span { padding: 4px 12px; border-radius: 12px; background: #1d1a3a; color: #7dffb0; font-weight: 800; }
.g-coins-demo { align-items: center; flex-wrap: wrap; }
.cn-demo-coin {
  --s: 1; display: inline-grid; place-items: center; width: calc(54px * var(--s)); height: calc(54px * var(--s)); border-radius: 50%;
  font-size: calc(16px * var(--s)); font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,.25); vertical-align: middle;
}
.cn-demo-coin.copper { background: radial-gradient(circle at 35% 30%, #ffd2a8, #d9814a 55%, #9a4f22); color: #5a2a0c; }
.cn-demo-coin.silver { background: radial-gradient(circle at 35% 30%, #fff, #cfd6de 55%, #8f9aa6); color: #3a4450; }
.cn-demo-coin.gold { background: radial-gradient(circle at 35% 30%, #fff6c2, #ffcf3a 55%, #c98a00); color: #6b4300; }
.cn-demo-coin.twotone { background: radial-gradient(circle at 50% 50%, #ffcf3a 0 48%, #8f9aa6 49% 52%, #e3e8ee 53%, #9aa4ae 100%); color: #6b4300; }
.g-sight-demo b { display: inline-block; padding: 4px 18px; border-radius: 999px; background: #fff; color: #1d3a8a; box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.g-sight-demo b.cover { color: transparent; background: repeating-linear-gradient(45deg, #9fc4ff 0 8px, #c9dcff 8px 16px); }
.g-sight-demo u { color: #ff5c8a; text-decoration-thickness: 3px; }
.g-sight .ws-target, .prompt .ws-target { padding: 0 10px; border-radius: 10px; background: #fff3b0; color: #1d3a8a; }
.g-numberline-demo { display: flex; justify-content: center; }
.g-numberline-demo .nl-demo-svg { width: min(92%, 420px); height: auto; border-radius: 18px; background: linear-gradient(180deg, #bff3df, #7fd3c0); }
.g-fractions-demo { align-items: center; }
.g-fractions-demo .pz-demo { display: inline-block; width: min(30vmin, 150px); }
.trick-step .pz-frac { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 700; vertical-align: middle; }
.trick-step .pz-frac .pz-num { padding: 0 .18em .06em; border-bottom: .09em solid currentColor; }
.trick-step .pz-frac .pz-den { padding-top: .06em; }
.g-fractions-demo .pz-demo svg { width: 100%; height: auto; display: block; }
.g-compare-cols { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-variant-numeric: tabular-nums; }

/* Calm mode: no shaking or wobbling in these games (feedback still shows via colour and the buddy). */
body.a11y-calm .g-spell .shake, body.a11y-calm .g-spell .bounce, body.a11y-calm .g-rhyme .shake, body.a11y-calm .g-clock .shake,
body.a11y-calm .g-coins .shake, body.a11y-calm .g-sight .shake, body.a11y-calm .g-numberline .shake, body.a11y-calm .g-fractions .shake,
body.a11y-calm .g-compare .shake, body.a11y-calm .choices.g-rhyme .shake, body.a11y-calm .choices.g-clock .shake, body.a11y-calm .choices.g-coins .shake,
body.a11y-calm .choices.g-numberline .shake, body.a11y-calm .choices.g-fractions .shake, body.a11y-calm .choices.g-compare .shake,
body.a11y-calm .g-coins .cn-arrow { animation: none !important; }
