/*
 * Game core — the shared look of every journey, scoped under .gc.
 *
 * Three rows: the top bar, the view (a map or a mission scene), and the
 * action bar pinned to the bottom, so the "go on" button is always on screen
 * and in the same place. Scenes are drawn here (gradients and a few emoji),
 * not pictures: light, themable, nothing to download. A journey sets its
 * palette (--gc-primary, --gc-accent from journey.palette) and may add its
 * own scenes and skins in css/journey-<id>.css; it never edits this file.
 * Every movement stops under prefers-reduced-motion.
 *
 * Sizes use min(vw, vh) so a phone held either way, a tablet and a desktop
 * all get big targets (at least 72 px; most are 96 px and up).
 * Ported from css/forest.css (AF1).
 */
.gc {
  --gc-primary: #40b7c4;
  --gc-accent: #f4c95d;
  --gc-ink: #1e2a4a;
  --gc-focus: #2563eb;
  --gc-go: #16a34a;
  --gc-go-dark: #15803d;
  --gc-soft: #ffffff;
  --gc-target: clamp(72px, 19vmin, 150px);       /* map stops */
  --gc-big: clamp(92px, 28vmin, 180px);          /* answers a child taps */
  --gc-hide: clamp(80px, 22vmin, 150px);         /* hide-and-seek items */
  --gc-guide: clamp(84px, 17vmin, 140px);        /* the guide's width, and its strip */
  --gc-glyph: clamp(44px, 14vmin, 104px);
  position: fixed; inset: 0; z-index: 1200;
  display: grid; grid-template-rows: auto 1fr auto;
  font-family: "Fredoka One", "Inter", system-ui, sans-serif; color: var(--gc-ink);
  background: linear-gradient(color-mix(in srgb, var(--gc-primary) 30%, #fff), #fff 55%, color-mix(in srgb, var(--gc-accent) 45%, #fff));
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.gc *, .gc *::before, .gc *::after { box-sizing: border-box; }
/* :where() keeps this reset at zero specificity, so every button class below wins. */
:where(.gc) button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
.gc button:focus-visible { outline: 5px solid var(--gc-focus); outline-offset: 4px; }
.gc button:disabled { cursor: default; }
.gc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.gc-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
/* Play mode's big view (js/play-mode.js) has no ✕ in the top-right corner
   any more (PMR-1: ⛶ at the bottom-right is the way out), so the bar keeps
   its own padding there. */
.gc-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.92); font-size: 28px;
           display: grid; place-items: center; box-shadow: 0 3px 8px rgba(30,42,74,.15); flex: none; }
.gc-icon[hidden] { display: none; }
.gc-count { margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 22px;
            box-shadow: 0 3px 8px rgba(30,42,74,.12); }
.gc-stars { margin-left: auto; }

/* ── View ────────────────────────────────────────────────────────────── */
.gc-view { position: relative; min-height: 0; overflow: hidden; outline: none; display: flex; flex-direction: column;
           padding-bottom: calc(var(--gc-guide) + 4px); }
.gc[data-screen="title"] .gc-view { padding-bottom: 0; }
/* safe center: content taller than the view starts at the top instead of
   being pushed out past both ends (and behind the top bar) on a phone. */
.gc-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: safe center;
            gap: clamp(10px, 3vmin, 28px); padding: 8px 12px 0; }
.gc-stage-top { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 0; }
.gc-stage-bottom { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }

/* Default scenes. A journey adds its own: .gc[data-theme="reef"] { … } */
.gc[data-theme="meadow"] { background: radial-gradient(circle at 80% 12%, #fff6b0 0 8%, transparent 9%), linear-gradient(#bde6ff, #e9fbd9 60%, #a7dd84); }
.gc[data-theme="river"]  { background: linear-gradient(#c7ecff 0 38%, #7cc8f0 38% 72%, #9bd67a 72%); }
.gc[data-theme="grove"]  { background: radial-gradient(circle at 15% 85%, #7cc56b 0 18%, transparent 19%), radial-gradient(circle at 88% 80%, #69b85a 0 16%, transparent 17%), linear-gradient(#d8f5c4, #a8dc8a); }
.gc[data-theme="cave"]   { background: radial-gradient(ellipse at 50% 110%, #3b2a63 0 45%, transparent 46%), linear-gradient(#2a1e46, #1a1430); color: #fff; transition: background 1.2s; }
.gc[data-theme="cave"].gc-bright { background: radial-gradient(ellipse at 50% 40%, #fff7c2 0 25%, #c9b6ff 60%, #7b62c9); color: var(--gc-ink); }
.gc[data-theme="tree"]   { background: radial-gradient(circle at 50% 30%, #ffe9a8 0 22%, transparent 23%), linear-gradient(#fff1c9, #c7e7a0); }
.gc[data-theme="beach"]  { background: radial-gradient(circle at 82% 14%, #fff6b0 0 7%, transparent 8%), linear-gradient(#bfeaff 0 42%, #5fc3d6 42% 60%, #f7e2a8 60%); }
.gc[data-theme="sea"]    { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.35) 0 3%, transparent 4%), radial-gradient(circle at 70% 35%, rgba(255,255,255,.3) 0 2%, transparent 3%), linear-gradient(#5cc6e8, #1f7fb6 70%, #e8d7a0 70%); }
.gc[data-theme="night"]  { background: radial-gradient(circle at 15% 20%, #fff 0 .4%, transparent .6%), radial-gradient(circle at 65% 12%, #fff 0 .5%, transparent .7%), radial-gradient(circle at 85% 40%, #fff 0 .4%, transparent .6%), linear-gradient(#1b2350, #3b3f8f); color: #fff; }
.gc[data-theme="home"]   { background: linear-gradient(#fdf1e4 0 66%, #e8c9a6 66%); }

/* ── Title card ──────────────────────────────────────────────────────── */
/* One block in the middle of the screen: words, pictures, guide, button,
   the grown-ups' line. A short landscape phone puts the guide and button
   beside the words. safe center: a block taller than the view starts at the
   top instead of going under the bar. */
.gc[data-screen="title"] .gc-view { justify-content: safe center; overflow-y: auto; }
.gc[data-screen="title"] .gc-actions { min-height: 0; padding: 0; }
.gc[data-screen="title"] .gc-guide { display: none; }
.gc-title { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.4vmin, 22px);
            text-align: center; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); }
.gc-title-words { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.4vmin, 20px); }
.gc-title-name { margin: 0; font-size: clamp(40px, 10vmin, 84px); color: color-mix(in srgb, var(--gc-primary) 60%, #000); text-shadow: 0 4px 0 #fff; line-height: 1.05; }
.gc-title-tag { margin: 0; font-size: clamp(18px, 3.6vmin, 28px); color: var(--gc-ink); font-family: Inter, system-ui, sans-serif; font-weight: 700; }
.gc-title-peek { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 1.6vmin, 14px); }
.gc-peek { width: clamp(46px, 10vmin, 76px); aspect-ratio: 1; border-radius: 30%; background: rgba(255,255,255,.92);
           display: grid; place-items: center; box-shadow: 0 4px 0 rgba(30,42,74,.12); }
.gc-peek .gc-glyph { font-size: clamp(26px, 6vmin, 46px); }
.gc-peek .gc-face--pic { width: 84%; height: 84%; }
.gc-title-guide { display: block; width: clamp(110px, 24vmin, 210px); height: auto; filter: drop-shadow(0 6px 6px rgba(0,0,0,.18)); }
/* .gc-title in front: .gc-btn (inline-grid) comes later in this file. */
.gc-title .gc-btn-start { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 36px; white-space: nowrap; font-size: clamp(30px, 6vmin, 42px); }
.gc-title-about { margin: 0; max-width: 34em; font-family: Inter, system-ui, sans-serif; font-size: clamp(13px, 2.2vmin, 16px); line-height: 1.4; color: #475569; }
.gc-title-about strong { color: var(--gc-ink); }
@media (orientation: landscape) and (max-height: 560px) {
  .gc-title { display: grid; grid-template-columns: auto auto; grid-template-areas: "words guide" "words go" "about about";
              align-items: center; justify-items: center; column-gap: clamp(16px, 5vw, 48px); row-gap: 8px; }
  .gc-title-words { grid-area: words; }
  .gc-title-guide { grid-area: guide; width: clamp(90px, 26vh, 150px); }
  .gc-title .gc-btn-start { grid-area: go; height: 84px; }
  .gc-title-about { grid-area: about; }
  .gc-title-name { font-size: clamp(32px, 9vh, 56px); }
}

/* ── Action bar ──────────────────────────────────────────────────────── */
.gc-actions { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 10px 12px 14px; min-height: 92px; }
.gc-btn { min-width: 80px; height: 80px; padding: 0 22px; border-radius: 40px; font-size: 36px; display: inline-grid; place-items: center;
          box-shadow: 0 6px 0 rgba(30,42,74,.18); transition: transform .12s; }
.gc-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(30,42,74,.18); }
.gc-btn-go { background: var(--gc-go); color: #fff; box-shadow: 0 6px 0 var(--gc-go-dark); }
.gc-btn-soft { background: var(--gc-soft); color: var(--gc-ink); }
.gc-btn-big { min-width: 120px; height: 100px; font-size: 48px; border-radius: 50px; }

/* ── The guide ───────────────────────────────────────────────────────── */
.gc-guide { position: absolute; left: max(4px, env(safe-area-inset-left)); bottom: calc(92px + env(safe-area-inset-bottom));
            width: var(--gc-guide); pointer-events: none; z-index: 3; transform-origin: 50% 100%; }
.gc-guide-pic { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 6px rgba(0,0,0,.18)); }
.gc-say { position: absolute; left: 96%; bottom: 30%; width: max-content; max-width: min(64vw, 380px); margin: 0;
          padding: 10px 16px; border-radius: 22px; background: #fff; color: var(--gc-ink); font-size: clamp(18px, 3.4vmin, 26px);
          box-shadow: 0 6px 14px rgba(30,42,74,.18); }
.gc-say::after { content: ""; position: absolute; left: -16px; bottom: 14px; border: 9px solid transparent; border-right-color: #fff; border-left: 0; }
.gc-guide--idle { animation: gc-sway 4s ease-in-out infinite; }
.gc-guide--welcome, .gc-guide--point { animation: gc-hop .45s ease-out; }
.gc-guide--happy { animation: gc-hop .4s ease-out 2; }
.gc-guide--encourage { animation: gc-nod .45s ease-in-out; }
.gc-guide--celebrate { animation: gc-jump .45s ease-out 3; }

/* ── Maps ────────────────────────────────────────────────────────────── */
.gc[data-screen="world"], .gc[data-screen="chapter"] .gc-map { background: transparent; }
.gc[data-screen="world"] { background: linear-gradient(color-mix(in srgb, var(--gc-primary) 35%, #fff), color-mix(in srgb, var(--gc-primary) 55%, #fff) 30%, color-mix(in srgb, var(--gc-accent) 55%, #fff)); }
.gc[data-screen="world"] .gc-actions, .gc[data-screen="chapter"] .gc-actions { min-height: 0; padding: 0; }
.gc[data-screen="world"] .gc-guide, .gc[data-screen="chapter"] .gc-guide { bottom: calc(6px + env(safe-area-inset-bottom)); }
.gc-map-board { position: relative; flex: 1; margin: 0 4vmin 2vmin; }
.gc-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gc-path-edge { fill: none; stroke: #c99c5b; stroke-width: 44; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.gc-path-sand { fill: none; stroke: #f6dca4; stroke-width: 32; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.gc-path-dots { fill: none; stroke: #e2bf7c; stroke-width: 4; stroke-dasharray: 10 14; vector-effect: non-scaling-stroke; }
.gc-stops { list-style: none; margin: 0; padding: 0; }
.gc-stop-li { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gc-stop { position: relative; width: var(--gc-target); height: var(--gc-target); border-radius: 50%; background: #fff;
           display: grid; place-items: center; box-shadow: 0 8px 0 #c99c5b, 0 10px 18px rgba(0,0,0,.18); }
.gc-stop-icon { font-size: calc(var(--gc-target) * .46); line-height: 1; display: grid; place-items: center; }
.gc-stop-star { position: absolute; right: -6px; top: -8px; font-size: calc(var(--gc-target) * .3); }
.gc-stop-lock { position: absolute; right: -4px; bottom: -4px; font-size: calc(var(--gc-target) * .26); }
.gc-stop--locked, .gc-stop--premium { background: #e5e7eb; }
.gc-stop--locked .gc-stop-icon, .gc-stop--premium .gc-stop-icon { filter: grayscale(1); opacity: .45; }
.gc-stop--done { background: #fef9c3; }
.gc-stop--current { background: #fff; animation: gc-glow 1.6s ease-in-out infinite; }
/* A finished chapter brightens its corner of the world. */
.gc-area--bright::before { content: ""; position: absolute; inset: -40%; z-index: -1; border-radius: 50%;
                           background: radial-gradient(circle, rgba(255,247,194,.95), rgba(255,247,194,0) 70%); }
.gc-stop-name { padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.88); color: var(--gc-ink); font-size: clamp(13px, 2.4vmin, 18px); white-space: nowrap; }
.gc-deco { position: absolute; font-size: clamp(30px, 8vmin, 64px); pointer-events: none; }
.gc-deco-1 { left: 4%; top: 60%; } .gc-deco-2 { right: 6%; top: 56%; } .gc-deco-3 { left: 52%; top: 80%; }
.gc-deco-4 { left: 6%; top: 22%; } .gc-deco-5 { right: 22%; top: 6%; } .gc-deco-6 { left: 60%; top: 2%; animation: gc-sway 5s ease-in-out infinite; }
.gc-sign { position: absolute; right: 2%; top: 0; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 32px;
           display: grid; place-items: center; box-shadow: 0 3px 8px rgba(30,42,74,.15); }
.gc-grownups { position: absolute; right: 2%; top: 0; display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 6px 14px;
               border-radius: 999px; background: rgba(255,255,255,.9); color: var(--gc-ink); font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: 15px; }

/* ── Answer pieces ───────────────────────────────────────────────────── */
.gc-choice { position: relative; display: grid; place-items: center; }
.gc-face { pointer-events: none; }
.gc-glyph { font-size: var(--gc-glyph); line-height: 1; }
.gc-face--pic { width: 82%; height: 82%; object-fit: contain; }
.gc-face--swatch { width: 66%; aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 3px rgba(30,42,74,.25); }
.gc-ghost { opacity: .3; filter: grayscale(1); }
.gc-ghost.gc-glyph { -webkit-text-stroke: 2px rgba(30,42,74,.35); }
.gc-row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 4vmin, 40px); }
.gc-pulse { animation: gc-pulse .4s ease-out; }
.gc-wobble { animation: gc-wobble .4s ease-in-out; }
.gc-gone { opacity: 0 !important; transform: scale(.5) !important; transition: opacity .4s, transform .4s; pointer-events: none; }
.gc-pointing { z-index: 2; box-shadow: 0 0 0 8px #fde047, 0 0 28px 10px rgba(253,224,71,.8) !important; }
.gc-pointing::after { content: "👆"; position: absolute; left: 50%; bottom: -46px; font-size: 44px; transform: translateX(-50%); animation: gc-tap 1s ease-in-out infinite; pointer-events: none; }

/* Bubbles */
.gc-bubble { width: var(--gc-big); height: var(--gc-big); border-radius: 50%;
             background: radial-gradient(circle at 32% 28%, #fff 0 10%, rgba(255,255,255,.55) 18%, transparent 40%), var(--b, rgba(147,197,253,.55));
             border: 3px solid rgba(255,255,255,.9); box-shadow: inset -8px -10px 18px rgba(255,255,255,.35), 0 8px 18px rgba(30,42,74,.12);
             animation: gc-bob 3.8s ease-in-out infinite; }
.gc-bubble--0 { --b: rgba(147,197,253,.6); } .gc-bubble--1 { --b: rgba(249,168,212,.6); }
.gc-bubble--2 { --b: rgba(167,243,208,.65); } .gc-bubble--3 { --b: rgba(253,230,138,.65); }
.gc-popped { animation: gc-pop .45s ease-out forwards; }
.gc-spark { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fde047;
            transform: rotate(var(--a)) translateY(0); animation: gc-spark .45s ease-out forwards; }

/* Listen and find: stones (default), shells */
.gc-lights { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; font-size: clamp(26px, 6vmin, 44px); }
.gc-light { filter: grayscale(1) brightness(.5); transition: filter .45s, transform .45s; }
.gc-light--on { filter: none; transform: scale(1.15); }
.gc-listen-round { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 3vmin, 26px); }
.gc-listen { width: 96px; height: 96px; border-radius: 50%; background: #fde047; color: var(--gc-ink); font-size: 44px; padding: 0; box-shadow: 0 6px 0 #ca8a04; }
.gc-rock { width: var(--gc-big); height: var(--gc-big); }
.gc-skin--rock .gc-rock { border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; background: linear-gradient(145deg, #8b7fb8, #574a86); color: #f5f3ff;
                          box-shadow: 0 8px 0 #3b2f66, 0 0 22px rgba(196,181,253,.45); }
.gc-skin--rock .gc-rock .gc-glyph { color: #f5f3ff !important; }
.gc-skin--shell .gc-rock { border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; background: repeating-conic-gradient(from 200deg at 50% 100%, #fde2cf 0 8deg, #f9c4a6 8deg 16deg);
                           border: 4px solid #f2a77f; box-shadow: 0 8px 0 #d98a5f; }
.gc-lit { box-shadow: 0 8px 0 #b45309, 0 0 40px 12px rgba(253,224,71,.8) !important; background: linear-gradient(145deg, #fff7c2, #fbbf24) !important; }
.gc-lit .gc-glyph { color: var(--gc-ink) !important; }

/* Feed the character */
.gc-eater-wrap { display: grid; place-items: center; }
.gc-eater { width: clamp(150px, 34vmin, 290px); height: auto; filter: drop-shadow(0 10px 10px rgba(0,0,0,.15)); }
.gc-chew { animation: gc-chew .3s ease-in-out 3; }
.gc-tray { padding: 10px 16px; border-radius: 30px; background: rgba(255,255,255,.55); }
.gc-food { width: var(--gc-big); height: var(--gc-big); border-radius: 50%; }
.gc-skin--cookie .gc-food { background: radial-gradient(circle at 16% 34%, #8b5a2b 0 4%, transparent 5%), radial-gradient(circle at 84% 30%, #8b5a2b 0 4%, transparent 5%),
                                        radial-gradient(circle at 26% 82%, #8b5a2b 0 4%, transparent 5%), #f2c27b;
                            border: 5px solid #d9a35a; box-shadow: 0 8px 0 #c08a43; }
.gc-skin--plate .gc-food { background: #fff; border: 6px solid #e5e7eb; box-shadow: 0 8px 0 #cbd5e1; }

/* Drag to match */
.gc-stage--match, .gc-stage--order { justify-content: space-evenly; }
.gc-deck { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 22px 26px; }
.gc-skin--plank.gc-deck { background: linear-gradient(#8b5a2b, #8b5a2b) 0 8px / 100% 9px no-repeat, linear-gradient(#8b5a2b, #8b5a2b) 0 calc(100% - 8px) / 100% 9px no-repeat; }
.gc-gap { width: var(--gc-target); height: calc(var(--gc-target) * .92); border-radius: 14px; display: grid; place-items: center;
          border: 4px dashed rgba(30,42,74,.35); background: rgba(255,255,255,.4); }
.gc-gap--filled { border: 4px solid #8b5a2b; background: linear-gradient(#f4d3a1, #deb077); }
.gc-snap { animation: gc-snap .3s ease-out; }
.gc-pieces { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 3vmin, 26px); }
.gc-piece { width: var(--gc-target); height: calc(var(--gc-target) * .92); border-radius: 14px;
            background: linear-gradient(#f4d3a1, #deb077); border: 4px solid #b9844a; box-shadow: 0 7px 0 #9a6a35; }
.gc-skin--card .gc-piece, .gc-skin--card .gc-gap--filled { background: #fff; border-color: var(--gc-primary); box-shadow: 0 7px 0 color-mix(in srgb, var(--gc-primary) 70%, #000); }
.gc-picked { transform: translateY(-10px); box-shadow: 0 0 0 6px var(--gc-focus), 0 12px 0 #9a6a35; }
.gc-placed { visibility: hidden; }
.gc-dragging { z-index: 10; position: relative; transition: none !important; box-shadow: 0 18px 26px rgba(0,0,0,.25); }
.gc-return { transition: transform .3s ease-out; }
.gc-walker { position: absolute; left: 0; bottom: 78%; width: clamp(60px, 13vmin, 110px); height: auto; opacity: 0; pointer-events: none; }
.gc-deck--done .gc-walker { opacity: 1; animation: gc-walk 1.5s ease-in-out forwards; }

/* Hide and seek */
.gc-find { position: relative; width: min(100%, 980px); flex: 1; min-height: 240px; }
.gc-hider { position: absolute; transform: translate(-50%, -50%); width: var(--gc-hide); height: var(--gc-hide); border-radius: 28px;
            background: rgba(255,255,255,.55); box-shadow: 0 6px 14px rgba(30,42,74,.12); }
.gc-hider .gc-face--pic { width: 92%; height: 92%; }
.gc-hider--peek { clip-path: inset(0 0 38% 0 round 28px); }
.gc-found { animation: gc-hop .45s ease-out 2; box-shadow: 0 0 0 8px #fde047, 0 0 30px 10px rgba(253,224,71,.8); }
.gc-scenery { position: absolute; font-size: clamp(44px, 13vmin, 110px); pointer-events: none; z-index: 1; opacity: .95; }
.gc-scenery-1 { left: 6%; top: 40%; } .gc-scenery-2 { left: 44%; top: 8%; } .gc-scenery-3 { right: 4%; top: 44%; }
.gc-scenery-4 { left: 48%; bottom: 2%; } .gc-scenery-5 { left: 24%; top: 4%; }

/* Put in order */
.gc-slots { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 2vmin, 18px); }
.gc-slot { position: relative; width: var(--gc-target); height: var(--gc-target); border-radius: 18px; display: grid; place-items: center;
           border: 4px dashed rgba(30,42,74,.35); background: rgba(255,255,255,.45); }
.gc-slot--next { border-color: var(--gc-primary); background: rgba(255,255,255,.8); animation: gc-glow-soft 1.6s ease-in-out infinite; }
.gc-slot--filled { border: 4px solid var(--gc-primary); background: #fff; }
.gc-slot-num { position: absolute; left: 6px; top: 2px; font-size: 18px; color: color-mix(in srgb, var(--gc-primary) 70%, #000); }
.gc-slot .gc-face--pic { width: 78%; height: 78%; }
.gc-slot .gc-glyph { font-size: calc(var(--gc-target) * .55); }
.gc-card { width: var(--gc-target); height: var(--gc-target); border-radius: 18px; background: #fff; border: 4px solid var(--gc-accent);
           box-shadow: 0 7px 0 color-mix(in srgb, var(--gc-accent) 70%, #000); }
.gc-card .gc-glyph { font-size: calc(var(--gc-target) * .55); }
.gc-slots--done .gc-slot { animation: gc-hop .45s ease-out; }

/* Treasure: the chest and its keys side by side in a short header, so the
   challenge below gets the height (a phone held upright has little to spare). */
.gc-stage--treasure { gap: clamp(6px, 1.6vmin, 14px); }
.gc-chest-row { flex-direction: row; gap: 10px; flex: none; }
.gc-stage--treasure .gc-chest { width: clamp(76px, 15vmin, 150px); }
.gc-stage--treasure .gc-keys { flex-wrap: wrap; max-width: 46vw; }
.gc-chest { width: clamp(120px, 26vmin, 220px); height: auto; filter: drop-shadow(0 10px 10px rgba(0,0,0,.15)); }
.gc-open { animation: gc-open .45s ease-out; }
.gc-keys { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; font-size: clamp(22px, 5vmin, 36px); }
.gc-key { opacity: .25; transition: opacity .4s, transform .4s; }
.gc-key--on { opacity: 1; transform: rotate(-20deg) scale(1.1); }
.gc-mini { padding: 12px; border-radius: 28px; flex: 1; min-height: 0; justify-content: safe center;
           --gc-big: clamp(76px, 22vmin, 150px); --gc-hide: clamp(70px, 19vmin, 130px); --gc-target: clamp(66px, 17vmin, 130px); }
.gc-mini--cave { background: linear-gradient(#2a1e46, #3b2a63); }
.gc-mini--meadow { background: rgba(255,255,255,.4); }
.gc-mini--grove { background: rgba(167,220,138,.55); }
.gc-mini--grove .gc-eater { width: clamp(90px, 18vmin, 170px); }
.gc-mini .gc-find { min-height: min(40vh, 300px); }

/* Sorting (JR-M): baskets on top, pieces below; compare mode: two piles and a chest */
.gc-stage--sort, .gc-stage--count { justify-content: space-evenly; }
.gc-bins { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 2.4vmin, 22px); width: 100%; }
.gc-bin { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
          width: clamp(120px, 24vmin, 210px); min-height: clamp(110px, 22vmin, 190px); padding: 8px 8px 10px; border-radius: 22px;
          background: rgba(255,255,255,.88); border: 4px dashed color-mix(in srgb, var(--gc-primary) 70%, #000);
          box-shadow: 0 7px 0 rgba(30,42,74,.15); color: var(--gc-ink); }
.gc-bins.gc-n4 .gc-bin { width: clamp(84px, 21vmin, 180px); }
.gc-bin-top { display: flex; align-items: center; justify-content: center; gap: 4px; height: clamp(44px, 9vmin, 76px); }
.gc-bin-icon { font-size: clamp(30px, 7vmin, 54px); line-height: 1; }
.gc-bin-top .gc-face--pic { width: clamp(44px, 9vmin, 76px); height: clamp(44px, 9vmin, 76px); }
.gc-bin-top .gc-face--swatch { width: clamp(40px, 8vmin, 64px); }
.gc-bin-top .gc-glyph { font-size: clamp(30px, 7vmin, 54px); }
.gc-bin-name { font-size: clamp(14px, 2.6vmin, 20px); line-height: 1.1; text-align: center; }
.gc-bin-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 24px; }
.gc-bin-mini.gc-face--pic, .gc-basket-mini.gc-face--pic { width: 26px; height: 26px; }
.gc-bin-mini.gc-glyph, .gc-basket-mini.gc-glyph { font-size: 22px; }
.gc-bin-mini.gc-face--swatch, .gc-basket-mini.gc-face--swatch { width: 22px; border-width: 2px; box-shadow: none; }
.gc-bins--done .gc-bin { animation: gc-hop .45s ease-out; }
.gc-sort-tray .gc-card { width: clamp(72px, 16vmin, 130px); height: clamp(72px, 16vmin, 130px); }
.gc-piles { width: 100%; }
.gc-pile { width: clamp(130px, 34vmin, 260px); min-height: clamp(110px, 24vmin, 200px); padding: 10px; border-radius: 26px;
           background: rgba(255,255,255,.8); border: 4px solid var(--gc-accent); box-shadow: 0 7px 0 rgba(30,42,74,.18); }
.gc-pile-in { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 4px; }
.gc-pile-one.gc-glyph { font-size: clamp(24px, 5.4vmin, 40px); }
.gc-pile-one.gc-face--pic { width: clamp(30px, 6vmin, 48px); height: clamp(30px, 6vmin, 48px); }
.gc-counted { filter: drop-shadow(0 0 6px #fde047); }
.gc-pile-num { position: absolute; right: -10px; top: -14px; min-width: 44px; height: 44px; border-radius: 22px; background: #fde047;
               color: var(--gc-ink); font-size: 28px; display: grid; place-items: center; padding: 0 8px; }
.gc-pile--chosen { visibility: hidden; }
.gc-sort-chest { width: clamp(96px, 20vmin, 180px); }

/* Count and collect (JR-M): the number and the basket on top, the objects below */
.gc-count-top { flex-wrap: wrap; gap: clamp(12px, 4vmin, 40px); }
.gc-count-goal { margin: 0; display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 26px; background: rgba(255,255,255,.9);
                 box-shadow: 0 5px 0 rgba(30,42,74,.12); }
.gc-count-goal-n { font-size: clamp(44px, 11vmin, 88px); line-height: 1; color: color-mix(in srgb, var(--gc-primary) 60%, #000); }
.gc-count-goal-face.gc-glyph { font-size: clamp(30px, 7vmin, 56px); }
.gc-count-goal-face.gc-face--pic { width: clamp(40px, 9vmin, 72px); height: clamp(40px, 9vmin, 72px); }
.gc-basket { position: relative; width: clamp(150px, 32vmin, 260px); min-height: clamp(110px, 24vmin, 200px); border-radius: 30px;
             background: rgba(255,255,255,.6); border: 4px solid color-mix(in srgb, var(--gc-accent) 75%, #000);
             display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 6px; }
.gc-basket-look { display: grid; place-items: center; }
.gc-basket-glyph { font-size: clamp(50px, 12vmin, 96px); line-height: 1; }
.gc-basket-pic { width: clamp(60px, 13vmin, 110px); height: auto; }
.gc-basket-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 100%; }
.gc-basket-n { position: absolute; right: -12px; top: -14px; min-width: 48px; height: 48px; border-radius: 24px; padding: 0 8px; background: #fde047;
               color: var(--gc-ink); font-size: 30px; display: grid; place-items: center; box-shadow: 0 4px 0 #ca8a04; }
.gc-basket--over { box-shadow: 0 0 0 8px rgba(253,186,116,.9); }
.gc-basket--full { box-shadow: 0 0 0 8px #fde047, 0 0 28px 10px rgba(253,224,71,.8); }
.gc-count-tray { max-width: min(100%, 760px); gap: clamp(8px, 2vmin, 16px); }
.gc-count-tray .gc-card { width: clamp(72px, 14vmin, 112px); height: clamp(72px, 14vmin, 112px); }
.gc-count-tray .gc-glyph { font-size: clamp(36px, 8vmin, 64px); }
.gc-count-done { font-size: 40px; min-width: 120px; }

/* Memory flip (JR-M): card size set by the mechanic from the space it has (--gc-mem) */
.gc-stage--memory { justify-content: center; }
.gc-memory { --gc-mem: 96px; display: grid; gap: 10px; justify-content: center; align-content: center; }
.gc-mem-card { width: var(--gc-mem); height: var(--gc-mem); border-radius: 18px; background: #fff; border: 4px solid var(--gc-accent);
               box-shadow: 0 6px 0 color-mix(in srgb, var(--gc-accent) 70%, #000); transition: transform .25s; }
.gc-mem-back { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; font-size: calc(var(--gc-mem) * .45);
               background: linear-gradient(145deg, var(--gc-primary), color-mix(in srgb, var(--gc-primary) 60%, #000)); pointer-events: none; }
.gc-mem-front { display: none; place-items: center; width: 100%; height: 100%; pointer-events: none; }
.gc-mem-front .gc-glyph { font-size: calc(var(--gc-mem) * .55); }
.gc-mem--up { transform: rotateY(0) scale(1.02); }
.gc-mem--up .gc-mem-back { display: none; }
.gc-mem--up .gc-mem-front { display: grid; }
.gc-mem--found { border-color: #22c55e; box-shadow: 0 6px 0 #15803d, 0 0 18px 6px rgba(253,224,71,.6); }
.gc-mem-card:disabled { cursor: default; }
.gc-memory--done .gc-mem-card { animation: gc-hop .45s ease-out; }

/* ── Reward ──────────────────────────────────────────────────────────── */
.gc-reward { margin: auto; padding: 22px 28px; border-radius: 30px; background: rgba(255,255,255,.94); color: var(--gc-ink); text-align: center;
             box-shadow: 0 14px 30px rgba(30,42,74,.18); display: flex; flex-direction: column; align-items: center; gap: 10px;
             animation: gc-pop-in .4s ease-out; }
.gc-reward-title { margin: 0; font-size: clamp(30px, 7vmin, 56px); color: color-mix(in srgb, var(--gc-primary) 55%, #000); }
.gc-reward-star { margin: 0; font-size: clamp(28px, 6vmin, 44px); }
.gc-badge-won { margin: 0; display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; background: #fef3c7; font-size: clamp(18px, 3.6vmin, 26px); }
.gc-badge-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 34px;
                 background: radial-gradient(circle, #fff7c2, #fbbf24); border: 4px solid #d97706; }

/* ── Grown-ups preview ───────────────────────────────────────────────── */
.gc-parent { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(30,42,74,.45); padding: 16px; }
.gc-parent-box { max-width: 460px; width: 100%; max-height: 100%; overflow: auto; padding: 22px; border-radius: 24px; background: #fff; color: var(--gc-ink);
                 font-family: Inter, system-ui, sans-serif; user-select: text; -webkit-user-select: text; }
.gc-parent-title { margin: 0 0 10px; font-family: "Fredoka One", system-ui, sans-serif; font-size: 24px; }
.gc-parent-list { margin: 0 0 12px; padding-left: 20px; line-height: 1.5; }
.gc-parent-note { margin: 0 0 14px; color: #475569; font-size: 14px; }
.gc-parent-box .gc-btn { font-size: 20px; height: 56px; }

/* ── Pause ───────────────────────────────────────────────────────────── */
.gc-pause { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(30,42,74,.35); }
.gc-paused * { animation-play-state: paused !important; }

/* ── Phones held upright: smaller answers so four fit on one screen ───── */
@media (max-width: 480px) {
  .gc { --gc-big: clamp(84px, 38vw, 140px); --gc-target: clamp(68px, 21vw, 110px); }
  .gc-count { font-size: 18px; padding: 4px 10px; }
  .gc-icon { width: 50px; height: 50px; font-size: 24px; }
}

/* ── Movement (150-450 ms feedback, gentle, never flashing) ──────────── */
@keyframes gc-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes gc-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(2deg); } }
@keyframes gc-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-14px); } 100% { transform: translateY(0); } }
@keyframes gc-nod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-5deg); } }
@keyframes gc-jump { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-26px) scale(1.04); } }
@keyframes gc-glow { 0%, 100% { box-shadow: 0 8px 0 #c99c5b, 0 0 0 0 rgba(253,224,71,.9); transform: scale(1); }
                     50% { box-shadow: 0 8px 0 #c99c5b, 0 0 0 14px rgba(253,224,71,.35); transform: scale(1.06); } }
@keyframes gc-glow-soft { 0%, 100% { box-shadow: 0 0 0 0 rgba(253,224,71,.8); } 50% { box-shadow: 0 0 0 10px rgba(253,224,71,.3); } }
@keyframes gc-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes gc-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes gc-pop { 0% { transform: scale(1); opacity: 1; } 40% { transform: scale(1.25); } 100% { transform: scale(.2); opacity: 0; } }
@keyframes gc-spark { to { transform: rotate(var(--a)) translateY(-90px) scale(.4); opacity: 0; } }
@keyframes gc-chew { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.06, .94); } }
@keyframes gc-snap { 0% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes gc-walk { 0% { left: 0; } 100% { left: calc(100% - 13vmin); } }
@keyframes gc-open { 0% { transform: scale(1); } 50% { transform: scale(1.15) rotate(-3deg); } 100% { transform: scale(1); } }
@keyframes gc-tap { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }
@keyframes gc-pop-in { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .gc *, .gc *::before, .gc *::after { animation: none !important; transition: none !important; }
}

/* ── Premium chapters (JR-API): "Soon" tag, the wait card ──────────────── */
.gc-stop--soon { background: #ede9fe; }
.gc-stop--soon .gc-stop-icon { opacity: .6; }
.gc-stop-soon { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px;
                background: #7c3aed; color: #fff; font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: 12px; white-space: nowrap; }
.gc[data-screen="wait"] .gc-actions { min-height: 0; padding: 0; }
.gc-wait { margin: auto; max-width: 520px; width: calc(100% - 32px); padding: 24px 20px; border-radius: 28px; background: rgba(255,255,255,.94);
           display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.gc-wait-icon { margin: 0; font-size: clamp(48px, 12vmin, 80px); line-height: 1; }
.gc-wait-title { margin: 0; font-size: clamp(24px, 5vmin, 36px); }
.gc-wait-text { margin: 0; font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: clamp(16px, 3vmin, 20px); color: #334155; }
.gc-wait-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.gc-wait .gc-btn-go { font-size: clamp(18px, 3.4vmin, 24px); }
.gc-wait-spin { width: 44px; height: 44px; border-radius: 50%; border: 6px solid #e2e8f0; border-top-color: var(--gc-primary, #6366f1); animation: gc-spin .9s linear infinite; }
@keyframes gc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gc-wait-spin { animation: none; } }
.gc-parent-offer { display: inline-flex; align-items: center; text-decoration: none; margin: 0 12px 0 0; }

/* ── Who's playing (task MG1): the kid's avatar after 🏠 ───────────────────
   Drawn by js/account/kids.js (FKAccount.kids.cornerChip) for a signed-in
   parent with a chosen kid; shown on the title card and the world map only,
   never during a mission or on a chapter path. Its menu sits on <body>. */
.gc-kid { display: none; overflow: hidden; }
.gc[data-screen="title"] .gc-kid, .gc[data-screen="world"] .gc-kid { display: grid; }
.gc-kid > span { width: 100% !important; height: 100% !important; font-size: 30px !important; }
@media (max-width: 480px) { .gc-kid > span { font-size: 26px !important; } }

/* RV-3: the title's "Let's go!" is this journey's Start, so it looks like
   every game's panda Start button (the decks' #startBtn: emerald-400 to
   cyan-400, rounded-2xl, shadow-lg). The guide waving above it stays. */
.gc-title .gc-btn-start { background: linear-gradient(to right, #34d399, #22d3ee); border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); }
.gc-title .gc-btn-start:active { transform: scale(.95); }
