* { box-sizing: border-box; }
:root { --ink: #3a2a5c; --soft: #7d6f99; --pink: #ff5fa2; --purple: #8a5cff; --line: #eee4fa; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: "Chalkboard SE", "Comic Sans MS", "Comic Neue", "Trebuchet MS", sans-serif;
  color: var(--ink);
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}
body { background: #fff4fb; }
button { font: inherit; color: inherit; touch-action: manipulation; }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
.spacer { flex: 1; }

.btn { font-size: clamp(20px, 4.5vmin, 34px); border: 0; border-radius: 999px; padding: .45em 1.3em; cursor: pointer; background: var(--pink); color: #fff; box-shadow: 0 6px 0 #d23f80; margin: 6px; }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #d23f80; }
.btn.small { font-size: clamp(15px, 2.6vmin, 20px); padding: 10px 20px; background: #efe9ff; color: var(--purple); box-shadow: 0 5px 0 #d2c6ff; }
.btn:disabled { opacity: .4; }
.round { font-size: clamp(24px, 5vmin, 38px); width: clamp(48px, 10vmin, 70px); height: clamp(48px, 10vmin, 70px); border-radius: 50%; border: 0; background: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.08); cursor: pointer; flex: none; padding: 0; }
.chip { background: #fff; border-radius: 999px; padding: 6px 18px 6px 8px; font-size: clamp(18px, 4vmin, 28px); display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 5px 0 rgba(0,0,0,.08); border: 0; white-space: nowrap; }
.chip-face { width: 1.6em; height: 1.6em; display: inline-flex; align-items: center; justify-content: center; }
.chip-face svg { width: 100%; height: 100%; }
.topbar { position: relative; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.avatar-emoji { font-size: 1em; line-height: 1; }

/* ---------- players ---------- */
#players { background: radial-gradient(circle at 15% 15%, #ffd6ec 0, transparent 35%), radial-gradient(circle at 85% 80%, #d9ccff 0, transparent 40%), linear-gradient(#bfe8ff, #fff4fb); overflow-y: auto; }
.players-wrap { margin: auto; padding: 24px 16px; text-align: center; width: 100%; max-width: 1000px; }
.title { color: var(--pink); font-size: clamp(30px, 7vmin, 56px); margin: 0 0 4px; text-shadow: 0 3px 0 #fff; }
.players-wrap h2 { color: var(--purple); font-size: clamp(22px, 5vmin, 38px); margin: 0 0 20px; }
.player-cards { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.player-card { position: relative; background: #fff; border: 4px solid var(--line); border-radius: 30px; width: clamp(150px, 26vmin, 220px); padding: 16px 10px 12px; cursor: pointer; box-shadow: 0 8px 0 #f1dcf0; }
.player-card:active { transform: translateY(4px); box-shadow: 0 4px 0 #f1dcf0; }
.player-face { height: clamp(100px, 18vmin, 150px); font-size: clamp(80px, 15vmin, 130px); display: flex; align-items: center; justify-content: center; }
.player-face svg { height: 100%; }
.player-name { font-size: clamp(20px, 4vmin, 30px); margin-top: 6px; }
.player-card.new { border-style: dashed; background: #fdfaff; color: var(--soft); }
.player-card.new .player-face { font-size: clamp(50px, 9vmin, 80px); }
.player-card .remove { position: absolute; top: -12px; right: -12px; background: #ff5a5a; color: #fff; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.grown-up-row { margin-top: 26px; display: flex; gap: 8px; justify-content: center; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }
.avatar-pick { background: #fdfaff; border: 4px solid var(--line); border-radius: 22px; height: clamp(80px, 15vmin, 120px); font-size: clamp(50px, 10vmin, 80px); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; }
.avatar-pick svg { height: 100%; }
.avatar-pick.on { border-color: var(--pink); background: #fff3a8; transform: scale(1.06); }
.name-row p { margin: 8px 0 4px; font-family: -apple-system, system-ui, sans-serif; font-size: 16px; }
.name-row input { font: inherit; font-size: 28px; padding: 10px 16px; border: 4px solid var(--line); border-radius: 18px; width: min(320px, 70%); text-align: center; outline: none; color: var(--ink); -webkit-user-select: text; user-select: text; }
.name-row input:focus { border-color: var(--purple); }

/* ---------- map ---------- */
#map { background: #bfe8ff; }
#map .topbar { position: absolute; left: 0; right: 0; top: 0; }
#mapScroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
#mapInner { position: relative; width: 100%; }
.zone { position: absolute; left: 0; right: 0; }
.zone.locked { filter: saturate(.35) brightness(.95); }
.decor { position: absolute; font-size: clamp(28px, 6vmin, 50px); transform: translate(-50%, -50%); animation: sway 3s ease-in-out infinite; pointer-events: none; }
@keyframes sway { 0%,100% { rotate: -6deg; } 50% { rotate: 6deg; } }
.zone-sign { position: absolute; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 999px; padding: 8px 24px; font-size: clamp(20px, 4.5vmin, 32px); color: var(--purple); box-shadow: 0 6px 0 rgba(0,0,0,.08); white-space: nowrap; z-index: 2; }
.zone-sign.soon { color: var(--soft); background: #ffffffcc; }
svg.path { position: absolute; left: 0; top: 0; pointer-events: none; }
.road { fill: none; stroke: #ffffffd9; stroke-width: 44; stroke-linecap: round; }
.road-dots { fill: none; stroke: #ffd5ea; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 2 26; }
.node { position: absolute; transform: translate(-50%, -50%); width: 92px; height: 92px; border-radius: 50%; border: 6px solid #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 3; padding: 0; box-shadow: 0 7px 0 rgba(0,0,0,.15); }
.node.big { width: 116px; height: 116px; }
.node-icon { font-size: 44px; line-height: 1; }
.node.big .node-icon { font-size: 56px; }
.node-num { position: absolute; bottom: -14px; background: #fff; color: var(--purple); border-radius: 999px; min-width: 36px; padding: 0 8px; font-size: 20px; box-shadow: 0 3px 0 rgba(0,0,0,.1); }
.node-star { position: absolute; top: -16px; right: -12px; font-size: 32px; }
.node-gift { position: absolute; top: -18px; left: -14px; font-size: 34px; animation: sway 2s ease-in-out infinite; }
.node.done { background: radial-gradient(circle at 35% 30%, #fff6b0, #ffc93d); }
.node.current { background: radial-gradient(circle at 35% 30%, #ffd1e8, #ff5fa2); animation: glow 1.4s ease-in-out infinite; }
.node.locked { background: #d9d4e6; }
.node.locked .node-icon { font-size: 34px; opacity: .7; }
@keyframes glow { 0%,100% { box-shadow: 0 7px 0 rgba(0,0,0,.15), 0 0 0 0 #ff5fa288; } 50% { box-shadow: 0 7px 0 rgba(0,0,0,.15), 0 0 0 18px #ff5fa200; scale: 1.06; } }
.map-avatar { position: absolute; transform: translate(-50%, -50%); width: 80px; height: 96px; font-size: 70px; display: flex; align-items: flex-end; justify-content: center; z-index: 4; pointer-events: none; transition: left 1.2s ease-in-out, top 1.2s ease-in-out; animation: float 1.8s ease-in-out infinite; filter: drop-shadow(0 4px 2px rgba(0,0,0,.15)); }
.map-avatar svg { width: 100%; height: 100%; }
.map-avatar.walking { animation: hopalong .4s ease-in-out infinite; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes hopalong { 0%,100% { translate: 0 0; } 50% { translate: 0 -20px; } }
.shake { animation: shake .4s; }
@keyframes shake { 0%,100% { translate: 0; } 25% { translate: -8px; } 75% { translate: 8px; } }

/* Poppy */
.poppy-svg { overflow: visible; }
.poppy-svg .wing { transform-origin: 50px 52px; animation: flap .25s ease-in-out infinite alternate; }
.poppy-svg .wing.r { animation-delay: .12s; }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.7); } }

/* ---------- playing a level ---------- */
#play { background: #bfe8ff; }
.play-area { position: relative; flex: 1; overflow: hidden; }
.say-line { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); background: #fff; border-radius: 999px; padding: 8px 22px; font-size: clamp(18px, 4vmin, 30px); color: var(--purple); box-shadow: 0 5px 0 rgba(0,0,0,.08); white-space: nowrap; z-index: 5; cursor: pointer; }
.done-top { position: absolute; right: 12px; top: 2px; z-index: 6; margin: 0; }

/* ---------- pop-ups ---------- */
#overlay { position: fixed; inset: 0; background: rgba(255,240,250,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.pop { background: #fff; border-radius: 36px; padding: 24px; text-align: center; max-width: 600px; width: 100%; max-height: 100%; overflow-y: auto; box-shadow: 0 12px 0 #f1dcf0, 0 20px 50px rgba(138,92,255,.25); animation: popin .4s cubic-bezier(.3,1.6,.6,1); }
.pop.wide { max-width: 900px; }
.pop:empty { display: none; }
@keyframes popin { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pop .huge { font-size: clamp(90px, 24vmin, 200px); line-height: 1.1; }
.pop .huge.spin { display: inline-block; animation: arrive 1s ease-out; }
@keyframes arrive { from { transform: scale(0) rotate(-180deg); } to { transform: scale(1); } }
.pop h1 { color: var(--purple); font-size: clamp(26px, 6vmin, 44px); margin: 6px 0; }
.pop p { font-size: clamp(18px, 4vmin, 28px); color: var(--soft); margin: 0 0 14px; }
.poppy-big { height: clamp(140px, 34vmin, 280px); font-size: clamp(110px, 26vmin, 220px); display: flex; justify-content: center; align-items: center; animation: float 1.8s ease-in-out infinite; }
.poppy-big svg { height: 100%; }
.sticker-row { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.zone-badge { font-size: clamp(26px, 5vmin, 40px); width: 1.4em; flex: none; }
.stk { flex: 1; aspect-ratio: 1; font-size: clamp(22px, 5vmin, 44px); background: #fdf6ff; border: 3px dashed #eadcff; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.stk.empty { color: #ddd; font-size: clamp(14px, 3vmin, 22px); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.gallery img { width: 100%; border-radius: 16px; border: 4px solid var(--line); background: #fff; cursor: pointer; }
.gallery img.big { grid-column: 1 / -1; }

.sparkle { position: fixed; font-size: 6vmin; pointer-events: none; z-index: 60; animation: burst .9s ease-out forwards; }
@keyframes burst { from { transform: translate(-50%, -50%) scale(.3); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2); opacity: 0; } }
.confetti { position: fixed; top: -60px; font-size: 6vmin; pointer-events: none; animation: fall linear forwards; z-index: 60; }
@keyframes fall { to { transform: translateY(115vh) rotate(540deg); } }
.hop { animation: hop .5s ease-out 2; }
@keyframes hop { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-35%) scale(1.1); } }
.pulse { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { scale: 1; } 50% { scale: 1.12; } }

/* ---------- 💖 hearts ---------- */
.hearts-stage { position: absolute; inset: 0; }
.hearts-ground { position: absolute; left: -10%; right: -10%; bottom: 0; height: 40%; border-radius: 50% 50% 0 0 / 18% 18% 0 0; }
.hearts-ground span { position: absolute; font-size: 5vmin; }
.rainbow-bg { position: absolute; left: 50%; top: 70%; width: 120vmax; height: 120vmax; transform: translate(-50%, -50%); border-radius: 50%; opacity: .6; pointer-events: none;
  background: radial-gradient(circle, transparent 0 40%, #b98cff 40% 42.5%, #6fa8ff 42.5% 45%, #6fe0a0 45% 47.5%, #ffe36b 47.5% 50%, #ffaa5c 50% 52.5%, #ff6f8f 52.5% 55%, transparent 55%); }
.animal { position: absolute; transform: translate(-50%, -50%); font-size: 12vmin; line-height: 1; cursor: pointer; }
.animal .face { display: inline-block; filter: drop-shadow(0 .6vmin 0 rgba(0,0,0,.12)); }
.animal.hop .face { animation: hop .5s ease-out 2; }
.animal.hop { animation: none; }
.animal.dance .face { animation: dance .6s ease-in-out infinite; }
@keyframes dance { 0%,100% { transform: rotate(-15deg) translateY(0); } 50% { transform: rotate(15deg) translateY(-20%); } }
.bubble { position: absolute; left: 60%; bottom: 85%; font-size: 6vmin; background: #fff; border-radius: 50%; width: 10vmin; height: 10vmin; display: flex; align-items: center; justify-content: center; box-shadow: 0 .5vmin 0 rgba(0,0,0,.1); animation: bubble-in .4s ease-out, bob 1.6s ease-in-out .4s infinite; }
.bubble::after { content: ""; position: absolute; left: 10%; bottom: -8%; width: 2.6vmin; height: 2.6vmin; background: #fff; border-radius: 50%; }
@keyframes bubble-in { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12%); } }
.hero { position: absolute; width: 15vmin; height: 18vmin; font-size: 13vmin; display: flex; align-items: center; justify-content: center; transform: translate(-50%, -50%); transition: left .7s ease-in-out, top .7s ease-in-out; pointer-events: none; z-index: 5; }
.hero > * { animation: float 1.8s ease-in-out infinite; }
.hero svg { width: 100%; height: 100%; }
.hero.left > * { transform: scaleX(-1); }
.heart { position: absolute; transform: translate(-50%, -50%); font-size: 9vmin; z-index: 4; cursor: pointer; transition: left 2s ease-out, top 2s ease-out, opacity .3s; filter: drop-shadow(0 0 1.5vmin #fff); }
.heart > span { display: inline-block; animation: bob 1.4s ease-in-out infinite; }
.heart.got { transition: left .6s ease-in, top .6s ease-in, opacity .6s; left: 50% !important; top: 4% !important; opacity: 0; }
.monkey { position: absolute; left: -15%; top: 30%; font-size: 12vmin; transform: translate(-50%, -50%); transition: left 2s ease-in-out, top 2s ease-in-out; z-index: 4; display: none; cursor: pointer; }
.monkey.holding::after { content: "💖"; position: absolute; font-size: 6vmin; right: -20%; top: 10%; }
.monkey.cheeky { animation: cheeky .4s ease-in-out infinite; }
@keyframes cheeky { 0%,100% { rotate: -8deg; } 50% { rotate: 8deg; } }
.heart-bar { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; background: #fff; border-radius: 999px; padding: 6px 14px; box-shadow: 0 5px 0 rgba(0,0,0,.08); z-index: 6; font-size: clamp(18px, 4vmin, 32px); }
.heart-bar span { opacity: .2; transition: opacity .3s, transform .3s; }
.heart-bar span.on { opacity: 1; transform: scale(1.15); }

/* ---------- 🧩 jigsaw and 🧱 building ---------- */
.puzzle { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3vmin; padding: 64px 16px 16px; }
.board { position: relative; flex: none; background: #ffffffaa; border-radius: 14px; box-shadow: 0 0 0 6px #fff, 0 10px 30px rgba(0,0,0,.12); }
.board .ghost { position: absolute; inset: 0; background-size: 100% 100%; opacity: .22; border-radius: 10px; }
.board .cell { position: absolute; outline: 2px dashed #ffffffcc; outline-offset: -2px; }
.tray { flex: 1; max-width: 46vw; height: 100%; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 12px; overflow: hidden; }
.piece { border-radius: 10px; box-shadow: 0 4px 0 rgba(0,0,0,.15), 0 0 0 3px #fff; cursor: grab; touch-action: none; flex: none; }
.piece.spot { visibility: hidden; }
.piece.dragging { z-index: 70; box-shadow: 0 14px 30px rgba(0,0,0,.25), 0 0 0 4px #fff; cursor: grabbing; }
.board .piece.placed { position: absolute; box-shadow: none; border-radius: 0; cursor: default; }
.board.finished { animation: shine 1.2s ease-in-out 2; }
@keyframes shine { 50% { box-shadow: 0 0 0 6px #fff, 0 0 60px 20px #fff6a8; } }
.block { flex: none; touch-action: none; cursor: grab; filter: drop-shadow(0 4px 0 rgba(0,0,0,.15)); }
.block svg { width: 100%; height: 100%; display: block; overflow: visible; }
.block.spot { visibility: hidden; }
.block.dragging { z-index: 70; filter: drop-shadow(0 12px 12px rgba(0,0,0,.25)); }
.build-board { background: #ffffffbb; border-radius: 24px; box-shadow: 0 0 0 6px #fff; }
.build-board svg { width: 100%; height: 100%; display: block; overflow: visible; }
.slot { fill: #00000014; stroke: #8a7fb0; stroke-width: .6; stroke-dasharray: 2 1.5; }
.slot.want { fill: #ff5fa233; stroke: var(--pink); animation: pulse-slot .8s ease-in-out infinite; }
@keyframes pulse-slot { 50% { fill: #ff5fa266; } }
.filled { stroke: #3a2a5c55; stroke-width: .5; animation: plop .35s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes plop { from { transform: scale(1.25); } to { transform: scale(1); } }
.extra { position: absolute; font-size: 9vmin; pointer-events: none; transform: translate(-50%, -50%); }
.fly-up { animation: flyup 3s ease-in forwards; }
@keyframes flyup { 20% { transform: translateY(2%); } 100% { transform: translateY(-140vh); } }
.rock { animation: rock 1.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes rock { 0%,100% { rotate: -4deg; } 50% { rotate: 4deg; } }

/* ---------- 🖍️ colouring and 🎨 drawing ---------- */
.colour-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2vmin; padding: 60px 12px 12px; }
.colour-pic { height: 100%; max-width: 62vw; aspect-ratio: 1; background: #fff; border-radius: 24px; box-shadow: 0 0 0 6px #fff, 0 10px 30px rgba(0,0,0,.1); }
.colour-pic svg { width: 100%; height: 100%; display: block; border-radius: 24px; }
.colour-pic .r { fill: #fff; stroke: #3a2a5c; stroke-width: 2.6; stroke-linejoin: round; cursor: pointer; transition: fill .2s; }
.colour-pic .ln { fill: none; stroke: #3a2a5c; stroke-width: 2.6; stroke-linecap: round; pointer-events: none; }
.colour-pic .ink { fill: #3a2a5c; pointer-events: none; }
.palette { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6vmin; flex: none; }
.paint { width: clamp(44px, 9vmin, 72px); height: clamp(44px, 9vmin, 72px); border-radius: 50%; border: 5px solid #fff; box-shadow: 0 0 0 2px #ddd, 0 4px 0 rgba(0,0,0,.1); cursor: pointer; padding: 0; }
.paint.on { box-shadow: 0 0 0 5px var(--purple), 0 4px 0 rgba(0,0,0,.1); transform: scale(1.12); }
.side-tools { display: flex; flex-direction: column; gap: 1.4vmin; align-items: center; flex: none; max-height: 100%; overflow-y: auto; padding: 6px; }
.tool { font-size: clamp(24px, 5vmin, 38px); background: #fff; border: 4px solid var(--line); border-radius: 18px; padding: 4px 10px; cursor: pointer; min-width: clamp(56px, 11vmin, 80px); }
.tool.on { border-color: var(--purple); background: #f3eeff; }
.draw-canvas { height: 100%; max-width: 64vw; aspect-ratio: 4 / 3; background: #fff; border-radius: 24px; box-shadow: 0 0 0 6px #fff, 0 10px 30px rgba(0,0,0,.1); touch-action: none; cursor: crosshair; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tool-grid .tool { min-width: 0; padding: 2px 6px; font-size: clamp(22px, 4.4vmin, 34px); }
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.stamps button { font-size: clamp(20px, 4.2vmin, 32px); background: #fff; border: 3px solid var(--line); border-radius: 14px; cursor: pointer; padding: 2px; }
.stamps button.on { border-color: var(--purple); background: #f3eeff; }

/* ---------- 🔢 counting ---------- */
.count-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 60px 12px 12px; gap: 2vmin; }
.field { position: relative; flex: 1; width: min(100%, 900px); background: #ffffffaa; border-radius: 30px; box-shadow: 0 0 0 6px #fff; }
.thing { position: absolute; transform: translate(-50%, -50%); font-size: clamp(50px, 11vmin, 100px); line-height: 1; cursor: pointer; transition: left .6s ease-in-out, top .6s ease-in-out, opacity .4s; }
.thing.counted::after { content: attr(data-n); position: absolute; left: 50%; top: -10%; transform: translate(-50%, -60%); font-size: .45em; background: var(--pink); color: #fff; border-radius: 999px; padding: 0 .4em; }
.numbers { display: flex; flex-wrap: wrap; gap: 1.6vmin; justify-content: center; }
.num { font-size: clamp(30px, 7vmin, 56px); width: clamp(60px, 12vmin, 96px); height: clamp(60px, 12vmin, 96px); border-radius: 24px; border: 0; background: #fff; color: var(--purple); box-shadow: 0 6px 0 #d2c6ff; cursor: pointer; padding: 0; line-height: 1; }
.num small { display: block; font-size: .3em; color: var(--pink); letter-spacing: -1px; }
.num.right { background: #b8f5c8; }
.num.pulse { background: #fff3a8; }
.eater { position: absolute; right: 6%; top: 50%; transform: translate(50%, -50%); font-size: clamp(110px, 26vmin, 220px); line-height: 1; }
.eater.hop { animation: hop .4s ease-out; }
.tummy { position: absolute; right: 6%; top: 18%; transform: translateX(50%); font-size: clamp(30px, 7vmin, 56px); color: var(--pink); background: #fff; border-radius: 999px; padding: 0 .5em; box-shadow: 0 4px 0 rgba(0,0,0,.08); }

/* ---------- 🃏 memory ---------- */
.mem-grid { position: absolute; inset: 64px 16px 16px; margin: auto; display: grid; gap: 2.4vmin; place-content: center; }
.card { perspective: 600px; cursor: pointer; }
.card-in { position: relative; width: 100%; height: 100%; transition: transform .4s; transform-style: preserve-3d; }
.card.up .card-in { transform: rotateY(180deg); }
.card-face { position: absolute; inset: 0; border-radius: 22px; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.card-back { background: repeating-linear-gradient(45deg, #ff9ec7 0 14px, #ffb8d6 14px 28px); border: 5px solid #fff; font-size: 7vmin; }
.card-front { background: #fff; transform: rotateY(180deg); font-size: clamp(50px, 12vmin, 100px); border: 5px solid #fff; }
.card.matched .card-front { background: #fff7c2; border-color: #ffd93d; }

.cloud-status { margin-top: 12px; font-family: -apple-system, system-ui, sans-serif; font-size: 15px; color: var(--soft); min-height: 20px; }
.pop .grown { font-family: -apple-system, system-ui, sans-serif; font-size: 17px; }
