/* ============ Glimmer Grove ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg1: #1a1038; --bg2: #2a1a55; --bg3: #10233d;
  --card: rgba(255,255,255,.08);
  --card2: rgba(255,255,255,.13);
  --ink: #f4efff;
  --ink-dim: #b9aee0;
  --pink: #ff8fd8; --gold: #ffd166; --teal: #4fd8c8; --purple: #b388ff; --mint: #7fd8a8;
  --shadow: 0 10px 34px rgba(0,0,0,.45);
  --round: 22px;
  font-size: 16px;
}
html, body { height: 100%; }
body {
  font-family: "Baloo 2", "Comic Sans MS", "Chalkboard SE", ui-rounded, "Arial Rounded MT Bold", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 70% -10%, #4a2a7a 0%, transparent 55%),
              radial-gradient(900px 600px at 10% 110%, #123f4f 0%, transparent 55%),
              linear-gradient(160deg, var(--bg1), var(--bg2) 55%, var(--bg3));
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}
button { font-family: inherit; cursor: pointer; }

/* twinkling star field */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 12% 20%, #fff9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 34% 8%, #fff7 50%, transparent 51%),
    radial-gradient(2px 2px at 58% 30%, #ffd16688 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 12%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 90% 40%, #ff8fd877 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 60%, #fff6 50%, transparent 51%),
    radial-gradient(2px 2px at 45% 80%, #b388ff66 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 70%, #fff7 50%, transparent 51%),
    radial-gradient(2px 2px at 85% 88%, #4fd8c866 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }

/* region tints */
body[data-theme="hollow"]  { --bg1:#241338; --bg2:#3b2158; --bg3:#1b3a2e; }
body[data-theme="treetop"] { --bg1:#0f2b28; --bg2:#174a3c; --bg3:#1a1038; }
body[data-theme="burrow"]  { --bg1:#2b1a12; --bg2:#3d2417; --bg3:#241338; }
body[data-theme="rainbow"] { --bg1:#20104a; --bg2:#43206e; --bg3:#123f4f; }
body[data-theme="potion"]  { --bg1:#1c1040; --bg2:#341d5e; --bg3:#0f3838; }
body[data-theme="race"]    { --bg1:#102b1c; --bg2:#1c4a2e; --bg3:#1a1038; }

/* ---------- screens ---------- */
.gg-screen { display: none; position: relative; z-index: 1; min-height: 100vh; padding: 18px clamp(12px, 3vw, 40px); flex-direction: column; }
.gg-screen.gg-active { display: flex; }

.gg-topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gg-topbar h1, .gg-topbar h2 { font-size: clamp(1.3rem, 3vw, 2rem); text-shadow: 0 2px 12px #0008; }
.gg-spacer { flex: 1; }

.gg-btn {
  border: 0; border-radius: 999px; padding: 12px 26px;
  font-size: 1.05rem; font-weight: 700; color: #2a1a55;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 6px 0 #a55a92, var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.gg-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #a55a92; }
.gg-btn:disabled { filter: grayscale(.8); opacity: .5; cursor: not-allowed; }
.gg-btn-ghost {
  background: var(--card2); color: var(--ink);
  box-shadow: inset 0 0 0 2px #ffffff2e, var(--shadow);
}
.gg-btn-big { font-size: 1.5rem; padding: 18px 44px; }
.gg-btn-sm { padding: 8px 16px; font-size: .92rem; }

.gg-vobtn {
  border: 0; background: var(--card2); color: var(--ink);
  border-radius: 50%; width: 42px; height: 42px; font-size: 1.15rem;
  box-shadow: inset 0 0 0 2px #ffffff2e;
  flex: 0 0 auto;
  transition: transform .12s;
}
.gg-vobtn:hover { transform: scale(1.12); }

.gg-card {
  background: var(--card); border-radius: var(--round);
  box-shadow: var(--shadow); border: 1px solid #ffffff1c;
  padding: 18px;
}
.gg-hidden { display: none !important; }

/* ---------- title ---------- */
#screen-title { align-items: center; justify-content: center; text-align: center; gap: 20px; }
.gg-logo { font-size: clamp(2.6rem, 8vw, 5rem); line-height: 1.05; font-weight: 800;
  background: linear-gradient(120deg, var(--gold), var(--pink) 45%, var(--purple) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px #ff8fd855);
}
.gg-tagline { color: var(--ink-dim); font-size: 1.2rem; max-width: 560px; }
.gg-title-critters { font-size: 2.2rem; letter-spacing: 12px; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-8px);} }
.gg-title-buttons { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.gg-teacher-link {
  position: fixed; bottom: 10px; right: 14px; z-index: 5;
  font-size: .8rem; color: var(--ink-dim); text-decoration: none;
  background: #00000042; padding: 6px 12px; border-radius: 999px;
}
.gg-teacher-link:hover { color: var(--ink); }
#btn-mute { position: fixed; bottom: 10px; left: 14px; z-index: 5; }

/* ---------- intro ---------- */
#screen-intro { align-items: center; justify-content: center; }
.gg-intro-card { max-width: 640px; text-align: center; display: flex; flex-direction: column; gap: 18px; align-items: center; padding: 34px; }
#intro-who { font-size: 4rem; animation: bob 3s ease-in-out infinite; }
#intro-text { font-size: 1.25rem; line-height: 1.55; }

/* ---------- roster ---------- */
#screen-roster { align-items: center; gap: 18px; }
#roster-list { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 900px; }
.gg-roster-card { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 150px; border: 1px solid #ffffff1c; transition: transform .15s; }
.gg-roster-card:hover { transform: scale(1.06); }
.gg-roster-av { font-size: 2.6rem; }
.gg-roster-name { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.gg-roster-pts { color: var(--gold); font-size: .9rem; }
.gg-roster-new { display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: 560px; }
#roster-avatars { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gg-avatar { font-size: 1.7rem; background: var(--card); border: 2px solid transparent; border-radius: 14px; padding: 8px 10px; transition: transform .12s; }
.gg-avatar:hover { transform: scale(1.15); }
.gg-avatar-sel { border-color: var(--gold); background: var(--card2); box-shadow: 0 0 14px #ffd16688; }
#roster-name {
  font-family: inherit; font-size: 1.2rem; padding: 12px 18px; border-radius: 999px;
  border: 2px solid #ffffff33; background: #00000038; color: var(--ink); text-align: center; outline: none; width: 260px;
}
#roster-name:focus { border-color: var(--pink); }

/* ---------- map ---------- */
#map-player { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.gg-map-av { font-size: 1.7rem; }
.gg-map-pts { color: var(--gold); font-weight: 800; }
.gg-egg-wrap { display: flex; align-items: center; gap: 10px; }
#map-egg { font-size: 1.7rem; }
.gg-egg-wiggle { animation: wiggle .6s ease-in-out infinite; display: inline-block; }
@keyframes wiggle { 0%,100% { transform: rotate(-8deg);} 50% { transform: rotate(8deg);} }
.gg-meter { width: 140px; height: 14px; background: #00000055; border-radius: 999px; overflow: hidden; border: 1px solid #ffffff2a; }
.gg-meter > div { height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 999px; transition: width .6s; }

#map-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 12px 0 16px; }
.gg-region { border-radius: var(--round); padding: 16px; box-shadow: var(--shadow); border: 1px solid #ffffff22; }
.gg-region-hollow  { background: linear-gradient(150deg, #3b2158cc, #1b3a2ecc); }
.gg-region-treetop { background: linear-gradient(150deg, #174a3ccc, #0f2b28cc); }
.gg-region-burrow  { background: linear-gradient(150deg, #3d2417cc, #2b1a12cc); }
.gg-region-rainbow { background: linear-gradient(150deg, #43206ecc, #7a3a8acc); }
.gg-region-locked { filter: grayscale(.75) brightness(.7); }
.gg-region-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.gg-region-emoji { font-size: 1.8rem; }
.gg-region-name { font-weight: 800; font-size: 1.15rem; flex: 1; }
.gg-region-stars { color: var(--gold); font-size: .95rem; }
.gg-region-lessons { display: flex; flex-direction: column; gap: 8px; }
.gg-lesson {
  display: flex; align-items: center; gap: 10px; border: 0; text-align: left;
  background: #ffffff14; border-radius: 14px; padding: 10px 14px; color: var(--ink);
  font-size: 1rem; transition: transform .12s, background .12s;
}
.gg-lesson:hover:not(:disabled) { transform: translateX(6px); background: #ffffff24; }
.gg-lesson-locked { opacity: .45; }
.gg-lesson-n {
  background: var(--purple); color: #1a1038; font-weight: 800;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
}
.gg-lesson-t { flex: 1; font-weight: 700; }
.gg-lesson-stars { color: var(--gold); letter-spacing: 2px; }
.gg-star-dim { color: #ffffff2c; }
.gg-lock { font-size: .95rem; }

.gg-map-games { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
#map-games-hint { color: var(--ink-dim); font-size: .95rem; width: 100%; }
.gg-map-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- keyboard guide ---------- */
.gg-kbwrap { display: flex; align-items: flex-end; justify-content: center; gap: clamp(6px, 2vw, 26px); }
.gg-keyboard { display: flex; flex-direction: column; gap: 6px; }
.gg-kbrow { display: flex; gap: 6px; justify-content: center; }
.gg-kbrow-1 { padding-left: 12px; }
.gg-kbrow-2 { padding-left: 26px; }
.gg-key {
  width: clamp(30px, 4.4vw, 52px); height: clamp(30px, 4.4vw, 52px);
  border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; font-size: clamp(.8rem, 1.6vw, 1.1rem);
  background: #00000048; color: var(--ink-dim);
  border-bottom: 3px solid var(--fc, #666);
  box-shadow: inset 0 0 0 1px #ffffff14;
  transition: transform .1s, background .1s;
}
.gg-key-home { background: #ffffff12; color: var(--ink); }
.gg-key-anchor::after { content: "•"; position: relative; top: -4px; margin-left: 2px; color: var(--gold); }
.gg-key-next {
  background: var(--fc); color: #1a1038; transform: scale(1.18);
  box-shadow: 0 0 22px var(--fc), inset 0 0 0 1px #ffffff40;
  animation: pulse .8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1.14);} 50% { transform: scale(1.24);} }
.gg-key-hit { background: var(--mint); color: #10331e; }
.gg-key-miss { background: #ff6b81; color: #40101a; animation: shake .2s; }
.gg-key-wide { width: clamp(54px, 8vw, 92px); font-size: .78rem; }
.gg-key-space { width: clamp(120px, 22vw, 300px); }
.gg-hand { width: clamp(64px, 9vw, 120px); height: auto; }
.gg-finger { fill: #ffffff22; transition: fill .15s; }
.gg-palm { fill: #ffffff2e; }
.gg-finger-lit { filter: drop-shadow(0 0 8px currentColor); animation: pulse .8s ease-in-out infinite; transform-origin: center bottom; }

/* ---------- lesson ---------- */
#screen-lesson { gap: 8px; }
.gg-lesson-hud { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; color: var(--ink-dim); }
.gg-lesson-hud b { color: var(--ink); font-size: 1.15rem; }
.gg-progressbar { flex: 1; min-width: 120px; height: 12px; background: #00000055; border-radius: 999px; overflow: hidden; }
#lesson-progress { height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .4s; }
#lesson-prompt {
  text-align: center; font-size: clamp(2.2rem, 7vw, 4.4rem); letter-spacing: .35em;
  min-height: 1.5em; margin: clamp(4px, 2vh, 20px) 0; font-weight: 800;
}
.gg-ch { color: #ffffff3a; transition: color .1s; }
.gg-ch-done { color: var(--mint); text-shadow: 0 0 16px #7fd8a877; }
.gg-ch-cur { color: var(--gold); text-shadow: 0 0 20px #ffd166aa; animation: pulse .8s infinite; display: inline-block; }
#lesson-finger { text-align: center; font-size: 1.15rem; color: var(--pink); min-height: 1.6em; font-weight: 700; }
.gg-shake { animation: shake .25s; }
@keyframes shake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-8px);} 75% { transform: translateX(8px);} }
#lesson-kb { margin-top: auto; padding-bottom: 8px; }

/* ---------- potion ---------- */
#screen-potion { gap: 6px; }
.gg-potion-hud { display: flex; gap: 20px; align-items: center; font-size: 1.15rem; flex-wrap: wrap; }
.gg-potion-hud b { color: var(--gold); font-size: 1.4rem; }
#potion-pu { font-size: 1.5rem; min-width: 60px; }
.gg-pu { margin-right: 6px; animation: bob 1.2s ease-in-out infinite; display: inline-block; }
#potion-field { position: relative; flex: 1; overflow: hidden; border-radius: var(--round); background: #00000026; min-height: 340px; }
.gg-ingredient {
  position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px;
  will-change: transform;
}
.gg-ing-emoji { font-size: 2rem; filter: drop-shadow(0 4px 10px #0008); }
.gg-ing-word { background: #000000b0; padding: 4px 12px; border-radius: 999px; font-size: 1.25rem; font-weight: 800; letter-spacing: 2px; }
.gg-ing-word span { color: #fff; }
.gg-ing-word .gg-ch-done { color: var(--mint); }
.gg-ing-target .gg-ing-word { box-shadow: 0 0 0 3px var(--gold), 0 0 22px #ffd166aa; }
.gg-ing-zap { animation: zap .5s forwards; }
@keyframes zap { to { transform: translateY(60vh) scale(.2); opacity: 0; } }
.gg-ing-splash { animation: splash .4s forwards; }
@keyframes splash { to { transform: scale(1.6); opacity: 0; filter: hue-rotate(90deg);} }
#potion-cauldron { text-align: center; font-size: clamp(3rem, 9vw, 5rem); margin-top: -14px; transition: transform .15s; }
.gg-cauldron-pop { animation: cpop .35s; }
@keyframes cpop { 50% { transform: scale(1.18);} }
.gg-cauldron-bad { animation: shake .4s; filter: hue-rotate(120deg); }
.gg-float-pts { position: absolute; color: var(--gold); font-weight: 800; font-size: 1.3rem; animation: floatup .7s forwards; pointer-events: none; }
@keyframes floatup { to { transform: translateY(-60px); opacity: 0; } }

/* ---------- race / duel ---------- */
#screen-race, #screen-duel { gap: 14px; }
.gg-track { display: flex; flex-direction: column; gap: 14px; }
.gg-lane { display: flex; align-items: center; gap: 10px; }
.gg-lane-avatar { font-size: 2rem; width: 46px; text-align: center; }
.gg-lane-name { width: 110px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-lane-bar { flex: 1; height: 26px; background: #00000048; border-radius: 999px; overflow: hidden; border: 1px solid #ffffff22; position: relative; }
.gg-lane-bar > div { height: 100%; border-radius: 999px; transition: width .3s; }
#race-you-fill { background: linear-gradient(90deg, var(--teal), var(--gold)); }
#race-ghost-fill { background: linear-gradient(90deg, #8888aa, #ccccdd); opacity: .75; }
.gg-bigword { text-align: center; font-size: clamp(2.4rem, 8vw, 4.6rem); letter-spacing: .3em; font-weight: 800; min-height: 1.4em; margin: clamp(8px, 4vh, 30px) 0; }
.gg-race-hud { display: flex; gap: 24px; justify-content: center; font-size: 1.2rem; flex-wrap: wrap; }
.gg-race-hud b { color: var(--gold); font-size: 1.5rem; }
.gg-duel-scores { display: flex; gap: 30px; justify-content: center; font-size: 1.3rem; }
.gg-duel-scores b { color: var(--gold); font-size: 1.7rem; }
#duel-turn { text-align: center; font-size: 1.2rem; color: var(--pink); font-weight: 700; }
#duel-handoff { position: fixed; inset: 0; background: #1a1038ee; z-index: 30; display: grid; place-items: center; }
.gg-handoff-card { text-align: center; display: flex; flex-direction: column; gap: 14px; padding: 40px; }
#duel-handoff-title { font-size: 1.8rem; }
#duel-handoff-sub { color: var(--gold); font-size: 1.2rem; animation: pulse 1s infinite; }

/* ---------- generated art ---------- */
.gg-art { display: block; object-fit: contain; image-rendering: auto; }
.gg-critter .gg-critter-emoji.gg-art,
.gg-critter img.gg-critter-emoji { width: 84px; height: 84px; margin: 0 auto; filter: drop-shadow(0 4px 10px #0007); }
.gg-rarity-legendary img.gg-critter-emoji { filter: drop-shadow(0 0 12px #ffd166aa) drop-shadow(0 4px 10px #0007); }
.gg-rarity-rare img.gg-critter-emoji { filter: drop-shadow(0 0 9px #7fb2ff88) drop-shadow(0 4px 10px #0007); }
.gg-egg-img { width: 1.7rem; height: 1.7rem; }
.gg-hatch-eggimg { width: 150px; height: 150px; }
.gg-hatch-critterimg { width: 260px; height: 260px; margin: -20px auto -10px; filter: drop-shadow(0 0 30px #ffd166aa) drop-shadow(0 8px 18px #0009); }
.gg-lane-critterimg { width: 46px; height: 46px; display: inline-block; vertical-align: middle; }

/* ---------- dex / badges / board ---------- */
#dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gg-critter { background: var(--card); border-radius: 16px; padding: 14px 8px; text-align: center; display: flex; flex-direction: column; gap: 4px; border: 1px solid #ffffff1c; }
.gg-critter-emoji { font-size: 2.4rem; }
.gg-critter-name { font-weight: 800; }
.gg-critter-rarity { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.gg-critter-fact { font-size: .78rem; color: var(--ink-dim); line-height: 1.3; }
.gg-critter-unknown { opacity: .45; filter: grayscale(1); }

#badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gg-badge { background: var(--card); border-radius: 16px; padding: 16px 12px; text-align: center; display: flex; flex-direction: column; gap: 6px; opacity: .4; filter: grayscale(1); border: 1px solid #ffffff1c; }
.gg-badge-got { opacity: 1; filter: none; box-shadow: 0 0 22px #ffd16633; border-color: #ffd16666; }
.gg-badge-emoji { font-size: 2.2rem; }
.gg-badge-name { font-weight: 800; }
.gg-badge-desc { font-size: .82rem; color: var(--ink-dim); }

.gg-board-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.gg-board-table th { color: var(--ink-dim); text-align: left; padding: 8px 12px; font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; }
.gg-board-table td { background: var(--card); padding: 12px; }
.gg-board-table tr td:first-child { border-radius: 12px 0 0 12px; font-size: 1.2rem; }
.gg-board-table tr td:last-child { border-radius: 0 12px 12px 0; }
.gg-board-table tbody tr { transition: transform .1s; }

/* ---------- results overlay ---------- */
#results, #hatch { position: fixed; inset: 0; background: #120a28e6; z-index: 40; display: grid; place-items: center; padding: 16px; }
.gg-res-card { max-width: 520px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 14px; padding: 30px; background: linear-gradient(160deg, #2a1a55f2, #1b3a2ef2); }
#res-title { font-size: 1.9rem; }
#res-subtitle { color: var(--pink); font-size: 1.15rem; font-weight: 700; }
#res-stars { font-size: 3.4rem; letter-spacing: 10px; min-height: 1em; }
.gg-res-star { color: #ffffff22; display: inline-block; }
.gg-res-star-on { color: var(--gold); animation: starpop .5s backwards; text-shadow: 0 0 24px #ffd166aa; }
@keyframes starpop { from { transform: scale(0) rotate(-120deg); } 70% { transform: scale(1.4);} to { transform: scale(1); } }
#res-stats { display: flex; flex-direction: column; gap: 8px; }
.gg-res-stat { display: flex; justify-content: space-between; background: #00000032; padding: 10px 18px; border-radius: 12px; font-size: 1.05rem; }
.gg-res-stat b { color: var(--gold); }
.gg-res-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.gg-res-egg { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--ink-dim); font-size: .95rem; }

/* ---------- hatch ---------- */
.gg-hatch-card { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 40px; }
#hatch-egg { font-size: 5rem; animation: wiggle .5s ease-in-out infinite; }
#hatch-emoji { font-size: 5.5rem; animation: starpop .6s backwards; }
#hatch-name { font-size: 1.8rem; font-weight: 800; }
#hatch-rarity { font-weight: 800; text-transform: uppercase; letter-spacing: 2px; }
#hatch-fact { color: var(--ink-dim); max-width: 380px; }

/* ---------- toasts & fx ---------- */
.gg-toast {
  position: fixed; top: 18px; right: -340px; z-index: 60;
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(135deg, #43206e, #2a1a55); border: 1px solid #ffd16688;
  padding: 14px 20px; border-radius: 16px; box-shadow: var(--shadow);
  transition: right .45s cubic-bezier(.2, 1.4, .4, 1); max-width: 300px;
}
.gg-toast-in { right: 18px; }
.gg-toast-emoji { font-size: 2rem; }
.gg-pu-flash, .gg-streak-pop {
  position: fixed; top: 30%; left: 50%; transform: translateX(-50%);
  z-index: 55; font-size: 1.9rem; font-weight: 800; color: var(--gold);
  text-shadow: 0 0 24px #ffd166cc, 0 2px 8px #000;
  animation: popfade 1.1s forwards; pointer-events: none; white-space: nowrap;
}
@keyframes popfade { 0% { transform: translateX(-50%) scale(.4); opacity: 0;} 20% { transform: translateX(-50%) scale(1.15); opacity: 1;} 80% { opacity: 1;} 100% { transform: translateX(-50%) scale(1) translateY(-40px); opacity: 0;} }
.gg-spark { position: fixed; z-index: 50; pointer-events: none; animation: sparkfly .9s forwards; font-size: 1.1rem; }
@keyframes sparkfly { to { transform: translate(var(--dx, 20px), -80px) scale(.4); opacity: 0; } }
.gg-confetti { position: fixed; top: -30px; z-index: 45; pointer-events: none; animation: confall 2.6s linear forwards; }
@keyframes confall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- small screens (11" CB / iPad) ---------- */
@media (max-height: 720px) {
  #lesson-prompt { margin: 2px 0; }
  .gg-hand { width: 58px; }
  .gg-key { width: 34px; height: 34px; }
}
@media (max-width: 700px) {
  .gg-hand { display: none; }
  .gg-lane-name { width: 70px; font-size: .85rem; }
}
