:root {
  color-scheme: dark;
  --bg: #08131f;
  --bg-2: #111f30;
  --card: rgba(15, 29, 45, 0.86);
  --card-strong: rgba(19, 36, 56, 0.97);
  --text: #f6fbff;
  --muted: #bdd0df;
  --line: rgba(255, 255, 255, 0.14);
  --gold: #ffcb3d;
  --pink: #ff5dab;
  --friend-white: #ffffff;
  --friend-pink: #ff5dab;
  --friend-yellow: #ffcb3d;
  --friend-blue: #8eeaff;
  --friend-green: #67f291;
  --friend-red: #ff4b5f;
  --friend-trail: linear-gradient(90deg, rgba(255,255,255,.72), rgba(142,234,255,.68), rgba(255,203,61,.58), rgba(103,242,145,.48));
  --soft-trail: linear-gradient(90deg, transparent, rgba(142,234,255,.52), rgba(255,203,61,.34), transparent);
  --cyan: var(--friend-blue);
  --green: #67f291;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
  --shell: min(1160px, calc(100% - 32px));
  --app-height: 100svh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8ff;
  --bg-2: #eaf1ff;
  --card: rgba(255, 255, 255, 0.86);
  --card-strong: #ffffff;
  --text: #102034;
  --muted: #53647e;
  --line: rgba(16, 32, 52, 0.14);
  --shadow: 0 22px 70px rgba(61, 90, 130, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  max-width: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -6%, rgba(255,255,255,.11), transparent 25rem),
    radial-gradient(circle at 86% 2%, rgba(255,93,171,.11), transparent 28rem),
    radial-gradient(circle at 54% 12%, rgba(255,203,61,.08), transparent 30rem),
    radial-gradient(circle at 14% 72%, rgba(142,234,255,.09), transparent 29rem),
    radial-gradient(circle at 90% 72%, rgba(103,242,145,.065), transparent 27rem),
    linear-gradient(140deg, var(--bg), var(--bg-2));
  color: var(--text);
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(142,234,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142,234,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 18px, rgba(255,203,61,.04) 18px 19px, transparent 19px 44px),
    linear-gradient(0deg, transparent 0 26px, rgba(255,255,255,.026) 26px 27px, transparent 27px 58px);
  opacity: .22;
  mix-blend-mode: screen;
}

img, canvas, svg { max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, .button, .text-button { min-width: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(255,203,61,.78);
  outline-offset: 3px;
}
.skip-link, .sr-only { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 9999; width: auto; height: auto; padding: .75rem 1rem; border-radius: 999px; background: var(--gold); color: #1c1600; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  width: var(--shell);
  margin: 0 auto;
  padding: .74rem 0;
  isolation: isolate;
  backdrop-filter: blur(18px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: .32rem -.85rem;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.1), transparent 38%),
    rgba(7,17,31,.7);
  box-shadow: 0 18px 48px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .68rem;
  min-height: 44px;
  min-width: 0;
  text-decoration: none;
}
.brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  padding: .18rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.24));
}
.brand strong { display: block; letter-spacing: .1em; line-height: 1; }
.brand small { color: var(--muted); letter-spacing: .14em; }

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  justify-self: center;
  min-width: 0;
  gap: .22rem;
  padding: .33rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 12, 23, 0.46);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 28px rgba(0,0,0,.14);
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: .58rem .78rem;
  border-radius: 999px;
  font-weight: 850;
  font-size: .9rem;
  line-height: 1;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.active {
  color: var(--text);
  background: rgba(255,255,255,.1);
  outline: none;
  transform: translateY(-1px);
}
.site-nav a[aria-current="true"] {
  color: #201606;
  background: linear-gradient(135deg, #ffe27a, var(--gold));
  box-shadow: 0 8px 18px rgba(255,203,61,.24);
}
.header-actions { display: flex; align-items: center; justify-self: end; gap: .5rem; min-width: 0; }
.nav-toggle { display: none; }
.icon-button, .passport-chip {
  border: 1px solid var(--line);
  background: rgba(15, 29, 45, 0.82);
  color: var(--text);
  border-radius: 999px;
  padding: .6rem .8rem;
  box-shadow: 0 10px 28px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.06);
}
/* Always-visible way back to the deedz.org home page. */
.home-chip {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .9rem;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(15, 29, 45, 0.82);
  color: var(--text); font-weight: 800; text-decoration: none; white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.06);
}
.home-chip:hover { border-color: var(--accent, #8eeaff); }
.home-chip:focus-visible { outline: 2px solid var(--accent, #8eeaff); outline-offset: 2px; }
html[data-theme="light"] .home-chip { background: rgba(255,255,255,.9); }
@media (max-width: 520px) {
  .home-chip { width: 44px; padding: 0; justify-content: center; }
  .home-chip b { display: none; }
}
.icon-button, .nav-toggle { width: 44px; height: 44px; padding: 0; place-items: center; }
.icon-button { display: inline-grid; }
.passport-chip { display: flex; align-items: center; gap: .45rem; max-width: 12.5rem; min-height: 44px; }
.passport-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.passport-chip small { color: var(--muted); }
.nav-icon, .theme-icon { display: block; position: relative; }
.nav-icon, .nav-icon::before, .nav-icon::after { width: 20px; height: 2px; border-radius: 999px; background: currentColor; }
.nav-icon::before, .nav-icon::after { content: ""; position: absolute; left: 0; }
.nav-icon::before { top: -6px; }
.nav-icon::after { top: 6px; }
[data-nav-toggle][aria-expanded="true"] .nav-icon { background: transparent; }
[data-nav-toggle][aria-expanded="true"] .nav-icon::before { top: 0; transform: rotate(45deg); }
[data-nav-toggle][aria-expanded="true"] .nav-icon::after { top: 0; transform: rotate(-45deg); }
.theme-icon { width: 20px; height: 20px; border-radius: 999px; background: var(--gold); box-shadow: 0 0 0 5px rgba(255,203,61,.18); }
html[data-theme="light"] .theme-icon { background: #24344d; box-shadow: inset -7px -3px 0 #f6f8ff, 0 0 0 5px rgba(36,52,77,.12); }
html[data-theme="light"] .site-header::before {
  border-color: rgba(16,32,52,.12);
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.5) 38%, rgba(255,255,255,.72)),
    rgba(255,255,255,.72);
}
html[data-theme="light"] .site-nav,
html[data-theme="light"] .icon-button,
html[data-theme="light"] .passport-chip {
  background: rgba(255,255,255,.74);
}

.section { width: var(--shell); margin: 0 auto; padding: 5.25rem 0; position: relative; }
.hero { min-height: calc(100vh - 80px); display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center; padding-top: 4rem; }
.eyebrow { color: var(--gold); letter-spacing: .15em; font-size: .78rem; font-weight: 950; text-transform: uppercase; margin: 0 0 .45rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3.2rem, 9vw, 7.6rem); line-height: .9; margin-bottom: 1rem; letter-spacing: 0; }
h1 span { color: var(--friend-blue); text-shadow: 0 0 34px rgba(142,234,255,.18); }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.02; letter-spacing: 0; margin-bottom: .65rem; }
h3 { font-size: 1.35rem; margin-bottom: .45rem; }
p { color: var(--muted); line-height: 1.65; }
.lede { font-size: clamp(1.05rem, 2vw, 1.35rem); max-width: 66ch; }
.motto { margin-top: 1rem; color: var(--text); font-weight: 850; }
.palette-whisper { display: none; }
.palette-whisper span {
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 38px;
  height: 10px;
  padding: 0;
  background: rgba(255,255,255,.22);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.palette-whisper span:nth-child(1) { background: rgba(255,255,255,.86); }
.palette-whisper span:nth-child(2) { background: rgba(255,93,171,.78); }
.palette-whisper span:nth-child(3) { background: rgba(255,203,61,.82); }
.palette-whisper span:nth-child(4) { background: rgba(142,234,255,.72); }
.palette-whisper span:nth-child(5) { background: rgba(103,242,145,.76); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.button, .text-button {
  border: 0;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 46px;
  padding: .8rem 1.05rem;
  transition: transform .2s ease, filter .2s ease, background .2s ease;
}
.button:hover, .text-button:hover { transform: translateY(-2px); filter: brightness(1.07); }
.button.primary { background: linear-gradient(135deg, var(--friend-yellow), var(--friend-pink)); color: #160b14; }
.button.honk { background: linear-gradient(135deg, var(--friend-white), var(--friend-yellow)); color: #211700; }
.button.ghost { background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.button.danger { background: #ff4f6d; color: white; }
.text-button { background: transparent; color: var(--cyan); padding-left: 0; }

.hero-panel, .module-card, .activity-card, .mission-card, .passport-stat, .idea-list article {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.module-card, .activity-card, .hunt-card { contain: layout paint; }
.hero-panel {
  min-height: 460px;
  padding: 1.1rem;
  background:
    linear-gradient(135deg, rgba(142,234,255,.07), rgba(255,255,255,.045), rgba(255,203,61,.045)),
    var(--card);
}
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 3.2rem 1.1rem 1.1rem;
  pointer-events: none;
  border-radius: 20px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(142,234,255,.12) 18% 18.4%, transparent 18.4% 48%, rgba(255,203,61,.1) 48% 48.4%, transparent 48.4%),
    linear-gradient(0deg, transparent 0 34%, rgba(255,255,255,.08) 34% 34.4%, transparent 34.4% 68%, rgba(103,242,145,.09) 68% 68.4%, transparent 68.4%);
  opacity: .34;
  mask-image: linear-gradient(to bottom, transparent, black 22%, transparent 88%);
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel::before, .module-card::before, .mission-card::before, .passport-stat::before, .hunt-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--soft-trail);
  opacity: .5;
}
.terminal-top { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .8rem; font-weight: 900; letter-spacing: .08em; }
.terminal-top span { width: 12px; height: 12px; border-radius: 999px; background: rgba(142,234,255,.32); border: 1px solid rgba(255,255,255,.12); display: inline-block; }
.terminal-top span:nth-child(3) { background: rgba(255,203,61,.34); }
.friend-signal { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: 1rem; }
.friend-signal span {
  min-height: 9px;
  border-radius: 999px;
  background: rgba(142,234,255,.18);
  border: 1px solid rgba(142,234,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.friend-signal span:nth-child(3) { background: rgba(255,203,61,.2); border-color: rgba(255,203,61,.14); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 2rem 0; }
.hero-stats div, .passport-stat { padding: 1rem; background: rgba(255,255,255,.065); border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.hero-stats strong, .passport-stat b { font-size: 2.1rem; display: block; }
.hero-stats small, .passport-stat span, .progress-wrap span { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; }
.mission-card { padding: 1.3rem; background: rgba(255,255,255,.06); }
.mission-card h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
}
.quick-launch { display: grid; gap: .6rem; margin-top: 1rem; padding-right: 3.5rem; }
.quick-launch .eyebrow { margin-bottom: 0; }
.quick-link {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: .7rem;
  min-height: 58px;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  text-decoration: none;
}
.quick-link:hover, .quick-link:focus-visible { background: rgba(255,255,255,.1); outline: none; }
.quick-link .quick-icon { font-size: 1.45rem; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.08); }
.quick-link b { color: var(--text); display: block; }
.quick-link small { color: var(--muted); display: block; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.quick-link .quick-arrow { color: var(--cyan); font-weight: 950; }
.token { border: 2px solid rgba(255,255,255,.25); background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.05)); color: var(--text); border-radius: 999px; width: 52px; height: 52px; display: inline-grid; place-items: center; font-size: 1.45rem; position: absolute; box-shadow: 0 16px 30px rgba(0,0,0,.25); }
.token span { font-size: .75rem; position: absolute; bottom: -2px; right: 3px; background: var(--pink); color: white; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px; }
.token.found { opacity: .48; filter: grayscale(.3); }
.hero-token { right: 1.35rem; bottom: 1.35rem; }
.small-token { right: 1rem; bottom: 1rem; width: 44px; height: 44px; font-size: 1.1rem; }
.footer-token { position: static; margin-bottom: 1rem; }

.passport-strip {
  width: var(--shell);
  margin: -2rem auto 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) 2fr;
  gap: .8rem;
  align-items: stretch;
}
.progress-wrap { padding: 1rem; border: 1px solid var(--line); background: var(--card); border-radius: 18px; }
progress { width: 100%; height: 16px; accent-color: var(--gold); }

.quest-section { padding-top: 3rem; }
.quest-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .85fr) minmax(220px, .65fr);
  gap: 1rem;
  align-items: stretch;
}
.daily-board, .play-next-card, .comeback-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
}
.daily-board::before, .play-next-card::before, .comeback-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,.13), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(255,203,61,.16), transparent 9rem);
}
.daily-board > *, .play-next-card > *, .comeback-card > * { position: relative; z-index: 1; }
.daily-board-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.daily-board-top h3, .play-next-card h3 { font-size: 1.45rem; margin-bottom: .25rem; }
.daily-board-top > span {
  border: 1px solid rgba(255,203,61,.28);
  border-radius: 999px;
  background: rgba(255,203,61,.12);
  color: var(--friend-yellow);
  font-weight: 950;
  padding: .42rem .65rem;
  white-space: nowrap;
}
.quest-list { display: grid; gap: .75rem; }
.quest-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: .75rem;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  padding: .75rem;
}
.quest-row.complete {
  border-color: rgba(103,242,145,.5);
  background: linear-gradient(135deg, rgba(103,242,145,.16), rgba(255,255,255,.055));
}
.quest-check {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--friend-green);
  font-weight: 950;
  font-size: 1.35rem;
}
.quest-row b { display: block; color: var(--text); margin-bottom: .2rem; }
.quest-row small { display: block; color: var(--muted); font-weight: 850; margin-bottom: .35rem; }
.quest-row progress { height: 11px; display: block; }
.play-next-card {
  display: grid;
  align-content: space-between;
  gap: .85rem;
  background:
    linear-gradient(150deg, rgba(142,234,255,.13), rgba(255,93,171,.09), rgba(255,203,61,.1)),
    var(--card);
}
.play-next-card .button { justify-self: start; }
.comeback-card {
  display: grid;
  align-content: center;
  gap: .6rem;
  background:
    linear-gradient(150deg, rgba(103,242,145,.15), rgba(142,234,255,.08), rgba(255,255,255,.045)),
    var(--card);
}
.comeback-card strong {
  display: block;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: .95;
  color: var(--friend-green);
  letter-spacing: 0;
}

.arcade-section { padding-top: 4rem; }
.arcade-console {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(280px, .72fr);
  grid-template-areas:
    "marquee scoreboard"
    "cabinets cabinets";
  gap: 1rem;
  align-items: stretch;
}
.arcade-marquee,
.arcade-scoreboard,
.arcade-cabinet {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.arcade-marquee::before,
.arcade-scoreboard::before,
.arcade-cabinet::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--friend-trail);
  opacity: .58;
}
.arcade-marquee {
  grid-area: marquee;
  min-height: 320px;
  display: grid;
  align-content: end;
  gap: .85rem;
  padding: 1.3rem;
  background:
    linear-gradient(135deg, rgba(255,203,61,.2), rgba(255,93,171,.12) 42%, rgba(142,234,255,.11)),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035)),
    var(--card);
}
.arcade-marquee::after {
  content: "";
  position: absolute;
  inset: 4.1rem 1.3rem 1.3rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255,255,255,.12) 12% 12.5%, transparent 12.5% 34%, rgba(255,203,61,.14) 34% 34.5%, transparent 34.5% 64%, rgba(142,234,255,.13) 64% 64.5%, transparent 64.5%),
    linear-gradient(0deg, rgba(0,0,0,.12), transparent 44%, rgba(255,255,255,.06));
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 78%, transparent);
}
.arcade-marquee > *,
.arcade-scoreboard > *,
.arcade-cabinet > * {
  position: relative;
  z-index: 1;
}
.arcade-lights {
  position: absolute;
  inset: 1.05rem 1.3rem auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .45rem;
}
.arcade-lights span {
  height: 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 6px;
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  animation: arcade-light-chase 1.8s ease-in-out infinite alternate;
}
.arcade-lights span:nth-child(2n) { background: rgba(255,203,61,.52); animation-delay: .15s; }
.arcade-lights span:nth-child(3n) { background: rgba(255,93,171,.5); animation-delay: .3s; }
.arcade-lights span:nth-child(4n) { background: rgba(142,234,255,.5); animation-delay: .45s; }
.arcade-marquee h3 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: .98;
  margin-bottom: .1rem;
}
.arcade-marquee p:not(.eyebrow) {
  max-width: 48rem;
  color: var(--text);
  font-weight: 850;
}
.arcade-cabinets {
  grid-area: cabinets;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.arcade-cabinet {
  --vibe-accent: var(--friend-white);
  --vibe-ink: #102034;
  --vibe-glow: rgba(255,255,255,.095);
  --vibe-border: rgba(255,255,255,.24);
  min-height: 286px;
  display: grid;
  grid-template-rows: auto minmax(96px, 1fr) auto auto auto;
  gap: .72rem;
  padding: 1rem;
  border-color: var(--vibe-border);
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.14), rgba(255,255,255,.045)),
    linear-gradient(145deg, var(--vibe-glow), rgba(255,255,255,.05), var(--card));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.arcade-cabinet.vibe-goose { --vibe-accent: var(--friend-white); --vibe-ink: #102034; --vibe-glow: rgba(255,255,255,.105); --vibe-border: rgba(255,255,255,.3); }
.arcade-cabinet.vibe-sweet { --vibe-accent: var(--friend-pink); --vibe-ink: #210817; --vibe-glow: rgba(255,93,171,.13); --vibe-border: rgba(255,93,171,.28); }
.arcade-cabinet.vibe-crumb { --vibe-accent: var(--friend-yellow); --vibe-ink: #201606; --vibe-glow: rgba(255,203,61,.13); --vibe-border: rgba(255,203,61,.3); }
.arcade-cabinet.vibe-silly-blue { --vibe-accent: var(--friend-blue); --vibe-ink: #062035; --vibe-glow: rgba(142,234,255,.11); --vibe-border: rgba(142,234,255,.26); }
.arcade-cabinet.vibe-spark { --vibe-accent: var(--friend-pink); --vibe-ink: #210817; --vibe-glow: rgba(255,93,171,.1); --vibe-border: rgba(255,93,171,.24); }
.arcade-cabinet.vibe-pond { --vibe-accent: var(--friend-green); --vibe-ink: #082514; --vibe-glow: rgba(103,242,145,.09); --vibe-border: rgba(103,242,145,.24); }
.arcade-cabinet.vibe-sky { --vibe-accent: var(--friend-blue); --vibe-ink: #082239; --vibe-glow: rgba(142,234,255,.1); --vibe-border: rgba(142,234,255,.25); }
.arcade-cabinet.vibe-maker { --vibe-accent: var(--friend-pink); --vibe-ink: #2a0a1c; --vibe-glow: rgba(255,93,171,.1); --vibe-border: rgba(255,93,171,.25); }
.arcade-cabinet.vibe-keen { --vibe-accent: var(--friend-green); --vibe-ink: #052314; --vibe-glow: rgba(103,242,145,.12); --vibe-border: rgba(103,242,145,.28); }
.arcade-cabinet:hover,
.arcade-cabinet:focus-visible {
  transform: translateY(-4px);
  border-color: var(--vibe-accent);
  box-shadow: 0 30px 90px rgba(0,0,0,.42), 0 0 0 1px color-mix(in srgb, var(--vibe-accent) 48%, transparent);
  outline: none;
}
.cabinet-rank {
  justify-self: end;
  color: var(--vibe-accent);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .1em;
}
.cabinet-screen {
  display: grid;
  place-items: center;
  min-height: 104px;
  border: 1px solid color-mix(in srgb, var(--vibe-accent) 34%, transparent);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.16), rgba(0,0,0,.12)),
    linear-gradient(180deg, rgba(0,0,0,.18), rgba(255,255,255,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.cabinet-screen span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: var(--vibe-accent);
  color: var(--vibe-ink);
  font-size: 2.35rem;
  box-shadow: 0 18px 34px rgba(0,0,0,.22);
}
.arcade-cabinet .category {
  justify-self: start;
  color: var(--vibe-ink);
  background: var(--vibe-accent);
  border-radius: 999px;
  padding: .28rem .52rem;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.arcade-cabinet b {
  color: var(--text);
  font-size: 1.22rem;
  line-height: 1.12;
}
.arcade-cabinet small {
  color: var(--muted);
  line-height: 1.35;
  font-weight: 800;
}
.cabinet-cta {
  margin-top: auto;
  color: var(--vibe-accent);
  font-weight: 950;
}
.arcade-scoreboard {
  grid-area: scoreboard;
  display: grid;
  align-content: start;
  gap: .9rem;
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(103,242,145,.12), rgba(142,234,255,.08), rgba(255,255,255,.04)),
    var(--card);
}
.arcade-score-top strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: .96;
  color: var(--friend-green);
}
.arcade-ticket-meter,
.arcade-next-prize {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  padding: .85rem;
}
.arcade-ticket-meter span,
.arcade-next-prize span {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .45rem;
}
.arcade-score-list {
  display: grid;
  gap: .5rem;
}
.arcade-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  min-height: 48px;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0,0,0,.12);
  text-decoration: none;
}
.arcade-score-row:hover,
.arcade-score-row:focus-visible {
  border-color: rgba(255,203,61,.48);
  background: rgba(255,203,61,.1);
  outline: none;
}
.arcade-score-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 900;
}
.arcade-score-row b {
  color: var(--friend-yellow);
  white-space: nowrap;
}
.arcade-score-row small {
  color: var(--muted);
  font-size: .75rem;
}
.arcade-next-prize b {
  display: block;
  color: var(--text);
  line-height: 1.35;
}

.legends-section { padding-top: 4.2rem; }
.legends-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}
.global-honk-card, .legend-card, .legend-sign-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
}
.global-honk-card::before, .legend-card::before, .legend-sign-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.11), transparent 38%, rgba(57,215,255,.08));
}
.global-honk-card {
  min-height: 360px;
  grid-row: span 2;
  display: grid;
  align-content: center;
  gap: 1rem;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.22), transparent 9rem),
    radial-gradient(circle at 84% 26%, rgba(255,93,171,.2), transparent 10rem),
    linear-gradient(150deg, rgba(255,203,61,.18), rgba(14,31,56,.86) 52%, rgba(57,215,255,.12));
}
.global-honk-card strong {
  display: block;
  font-size: clamp(3.25rem, 8vw, 6.2rem);
  line-height: .92;
  letter-spacing: 0;
  color: var(--friend-yellow);
  text-shadow: 0 14px 42px rgba(255,203,61,.22);
  overflow-wrap: anywhere;
}
.global-honk-card span { color: var(--muted); font-weight: 900; }
.global-honk-card .button { justify-self: start; }
.global-stat-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.global-stat-grid span {
  display: grid;
  gap: .12rem;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.065);
}
.global-stat-grid b {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
}
.global-stat-grid small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}
.top-games {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .45rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0,0,0,.16);
}
.top-games > span {
  color: var(--gold);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.top-games ol {
  display: grid;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.top-games li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 850;
}
.top-games b {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-games small {
  color: var(--gold);
  font-weight: 950;
  white-space: nowrap;
}
.legend-card-title {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .85rem;
}
.legend-card-title h3 { margin: .1rem 0 0; font-size: 1.35rem; }
.legend-card-title > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .55rem;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}
.legend-list {
  position: relative;
  z-index: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .55rem;
}
.legend-row {
  --legend-color: var(--friend-white);
  --legend-soft: rgba(255,255,255,.08);
  min-height: 56px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: .65rem;
  border: 1px solid color-mix(in srgb, var(--legend-color) 35%, transparent);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--legend-soft), rgba(255,255,255,.045));
  padding: .7rem;
}
.legend-row b { display: block; overflow-wrap: anywhere; }
.legend-row small { display: block; color: var(--muted); font-weight: 850; margin-top: .1rem; }
.legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--legend-color);
  box-shadow: 0 0 22px color-mix(in srgb, var(--legend-color) 55%, transparent);
}
.legend-white { --legend-color: var(--friend-white); --legend-soft: rgba(255,255,255,.12); }
.legend-pink { --legend-color: var(--friend-pink); --legend-soft: rgba(255,93,171,.14); }
.legend-yellow { --legend-color: var(--friend-yellow); --legend-soft: rgba(255,203,61,.14); }
.legend-blue { --legend-color: var(--friend-blue); --legend-soft: rgba(142,234,255,.13); }
.legend-green { --legend-color: var(--friend-green); --legend-soft: rgba(103,242,145,.13); }
.legend-red { --legend-color: var(--friend-red); --legend-soft: rgba(255,75,95,.14); }
.legend-empty { color: var(--muted); font-weight: 850; padding: .8rem; border: 1px dashed var(--line); border-radius: 16px; }
.legend-sign-card { grid-column: span 2; }
.legend-progress {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem;
  margin-bottom: .8rem;
}
.legend-progress div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  padding: .85rem;
}
.legend-progress span { color: var(--muted); font-size: .78rem; font-weight: 950; text-transform: uppercase; letter-spacing: .08em; }
.legend-progress b { display: block; margin-top: .15rem; font-size: 1.45rem; }
.legend-progress.complete div { border-color: rgba(103,242,145,.55); background: rgba(103,242,145,.12); }
.legend-eligibility {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 850;
  margin: 0 0 .85rem;
}
.legend-sign-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: .9rem;
}
.legend-sign-card .button { position: relative; z-index: 1; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.section-heading { max-width: 760px; margin-bottom: 1.5rem; }
.section-heading::after {
  content: "";
  display: block;
  width: min(320px, 70%);
  height: 5px;
  margin-top: 1rem;
  border-radius: 999px;
  background: var(--soft-trail);
  box-shadow: 0 0 28px rgba(142,234,255,.14);
}
.themed-section { padding-left: max(0px, calc((100vw - var(--shell)) / 2)); padding-right: max(0px, calc((100vw - var(--shell)) / 2)); width: 100%; background: rgba(255,255,255,.035); border-block: 1px solid var(--line); }
.themed-section { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(142,234,255,.03), rgba(255,203,61,.025)); }
.themed-section > * { width: var(--shell); margin-left: auto; margin-right: auto; }
.activity-tools { display: grid; grid-template-columns: minmax(220px, 320px) 1fr auto; gap: .75rem; align-items: center; margin-bottom: 1.1rem; }
.activity-search input { min-height: 48px; border-radius: 999px; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; }
.filter { border: 1px solid var(--line); border-radius: 999px; padding: .65rem .95rem; background: rgba(255,255,255,.06); color: var(--muted); font-weight: 900; }
.filter.active, .filter[aria-pressed="true"] { background: var(--gold); color: #201606; }
.result-count { margin: 0; color: var(--muted); font-weight: 900; white-space: nowrap; }
.activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.activity-card {
  --vibe-accent: var(--friend-white);
  --vibe-ink: #102034;
  --vibe-glow: rgba(255,255,255,.095);
  --vibe-border: rgba(255,255,255,.24);
  --vibe-ring: rgba(255,255,255,.34);
  padding: 1.1rem;
  text-decoration: none;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  border-color: var(--vibe-border);
  background: linear-gradient(145deg, var(--vibe-glow), rgba(255,255,255,.055), var(--card));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.activity-card::before { background: var(--vibe-accent); opacity: .42; height: 2px; }
.activity-card.vibe-goose { --vibe-accent: var(--friend-white); --vibe-ink: #102034; --vibe-glow: rgba(255,255,255,.105); --vibe-border: rgba(255,255,255,.3); --vibe-ring: rgba(255,255,255,.38); }
.activity-card.vibe-sweet { --vibe-accent: var(--friend-pink); --vibe-ink: #210817; --vibe-glow: rgba(255,93,171,.13); --vibe-border: rgba(255,93,171,.28); --vibe-ring: rgba(255,93,171,.38); }
.activity-card.vibe-crumb { --vibe-accent: var(--friend-yellow); --vibe-ink: #201606; --vibe-glow: rgba(255,203,61,.13); --vibe-border: rgba(255,203,61,.3); --vibe-ring: rgba(255,203,61,.38); }
.activity-card.vibe-silly-blue { --vibe-accent: var(--friend-blue); --vibe-ink: #062035; --vibe-glow: rgba(142,234,255,.11); --vibe-border: rgba(142,234,255,.26); --vibe-ring: rgba(142,234,255,.32); }
.activity-card.vibe-spark { --vibe-accent: var(--friend-pink); --vibe-ink: #210817; --vibe-glow: rgba(255,93,171,.1); --vibe-border: rgba(255,93,171,.24); --vibe-ring: rgba(255,93,171,.3); }
.activity-card.vibe-pond { --vibe-accent: var(--friend-green); --vibe-ink: #082514; --vibe-glow: rgba(103,242,145,.09); --vibe-border: rgba(103,242,145,.24); --vibe-ring: rgba(103,242,145,.3); }
.activity-card.vibe-sky { --vibe-accent: var(--friend-blue); --vibe-ink: #082239; --vibe-glow: rgba(142,234,255,.1); --vibe-border: rgba(142,234,255,.25); --vibe-ring: rgba(142,234,255,.31); }
.activity-card.vibe-maker { --vibe-accent: var(--friend-pink); --vibe-ink: #2a0a1c; --vibe-glow: rgba(255,93,171,.1); --vibe-border: rgba(255,93,171,.25); --vibe-ring: rgba(255,93,171,.32); }
.activity-card.vibe-keen { --vibe-accent: var(--friend-green); --vibe-ink: #052314; --vibe-glow: rgba(103,242,145,.12); --vibe-border: rgba(103,242,145,.28); --vibe-ring: rgba(103,242,145,.36); }
.activity-card:hover {
  transform: translateY(-5px);
  border-color: var(--vibe-accent);
  box-shadow: 0 30px 90px rgba(0,0,0,.42), 0 0 0 1px var(--vibe-ring);
}
.activity-card .icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--vibe-border);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  font-size: 2.15rem;
}
.activity-card .category { align-self: flex-start; font-size: .75rem; font-weight: 950; text-transform: uppercase; letter-spacing: .1em; color: var(--vibe-ink); background: var(--vibe-accent); padding: .28rem .5rem; border-radius: 999px; }
.activity-card .open { margin-top: auto; color: var(--vibe-accent); font-weight: 950; }
.empty-state { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 20px; padding: 1.4rem; color: var(--muted); background: rgba(255,255,255,.045); font-weight: 850; }

.module-grid { display: grid; gap: 1rem; min-width: 0; }
.module-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.module-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wide-card { grid-column: 1 / -1; }
.module-card { min-width: 0; padding: 1.15rem; min-height: 260px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.module-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.24); box-shadow: 0 30px 90px rgba(0,0,0,.42); }
.module-title { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: .8rem; }
.module-title > span { font-size: 2rem; width: 52px; height: 52px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,93,171,.12), rgba(255,203,61,.14)); border: 1px solid var(--line); border-radius: 16px; flex: 0 0 auto; }
.module-title b { margin-left: auto; color: var(--gold); white-space: nowrap; }
.play-field, .reactor, .chorus-panel, .sort-panel, .treasure-panel, .stack-panel, .pond-panel, .cloud-panel, .nameplate-preview, .story-output, .bot-output, .maze-wrap { min-height: 220px; border: 1px solid var(--line); border-radius: 20px; background: rgba(0,0,0,.18); margin: 1rem 0; position: relative; overflow: hidden; }
.crumb-field { height: 260px; }
.bubble-field {
  height: 260px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.22), transparent 8rem),
    radial-gradient(circle at 76% 24%, rgba(255,93,171,.2), transparent 9rem),
    radial-gradient(circle at 78% 76%, rgba(255,203,61,.18), transparent 10rem),
    rgba(0,0,0,.18);
}
.moving-target { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; border: 0; border-radius: 999px; background: var(--gold); box-shadow: 0 0 30px rgba(255,203,61,.35); font-size: 1.7rem; transform: translate(-50%, -50%); z-index: 2; }
.bubble-target {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 999px;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.95), rgba(255,93,171,.28) 42%, rgba(255,203,61,.35));
  box-shadow: 0 0 28px rgba(255,93,171,.32), inset 0 -10px 20px rgba(255,255,255,.2);
  font-size: 1.6rem;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: filter .12s ease;
}
.bubble-target.pop {
  animation: bubble-target-pop .18s ease-out both;
  filter: brightness(1.2) saturate(1.35);
}
.bubble-pop-burst {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(255,255,255,.92) 0 9%, transparent 10%),
    radial-gradient(circle at 18% 24%, rgba(142,234,255,.9) 0 4px, transparent 5px),
    radial-gradient(circle at 80% 30%, rgba(255,203,61,.88) 0 5px, transparent 6px),
    radial-gradient(circle at 68% 82%, rgba(255,93,171,.84) 0 4px, transparent 5px),
    radial-gradient(circle at 28% 78%, rgba(255,255,255,.88) 0 3px, transparent 4px);
  border: 2px solid rgba(255,255,255,.72);
  box-shadow: 0 0 26px rgba(142,234,255,.45), 0 0 36px rgba(255,93,171,.25);
  animation: bubble-pop-burst .5s ease-out forwards;
}
.chorus-panel, .sort-panel, .treasure-panel, .stack-panel, .pond-panel, .cloud-panel, .groove-panel {
  padding: 1rem;
  display: grid;
  align-content: center;
  gap: .85rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,93,171,.08), rgba(255,203,61,.08)),
    rgba(0,0,0,.18);
}
.chorus-watch, .sort-current {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.065);
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 950;
  text-align: center;
}
.sort-current span { display: block; font-size: 2.3rem; line-height: 1; }
.sort-current b { display: block; margin-top: .35rem; }
.chorus-pips {
  min-height: 58px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .45rem;
}
.chorus-pips span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  font-weight: 950;
}
.chorus-pips span.white { background: rgba(255,255,255,.92); color: #102034; }
.chorus-pips span.pink { background: rgba(255,93,171,.88); color: #210817; }
.chorus-pips span.yellow { background: rgba(255,203,61,.92); color: #201606; }
.chorus-pips span.blue { background: rgba(142,234,255,.9); color: #062035; }
.chorus-pips span.green { background: rgba(103,242,145,.9); color: #052314; }
.chorus-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: .65rem;
}
.sort-bins {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: .65rem;
}
.chorus-buttons button, .sort-bins button, .treasure-tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 950;
  min-height: 58px;
}
.chorus-buttons button span {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto .35rem;
  border-radius: 999px;
}
.chorus-buttons [data-chorus-color="white"] span { background: var(--friend-white); }
.chorus-buttons [data-chorus-color="pink"] span { background: var(--friend-pink); }
.chorus-buttons [data-chorus-color="yellow"] span { background: var(--friend-yellow); }
.chorus-buttons [data-chorus-color="blue"] span { background: var(--friend-blue); }
.chorus-buttons [data-chorus-color="green"] span { background: var(--friend-green); }
.sort-bins button { display: grid; place-items: center; gap: .25rem; padding: .75rem; }
.sort-bins span { font-size: 1.7rem; }
.treasure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
}
.treasure-tile {
  min-height: 68px;
  font-size: 1.7rem;
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
}
.treasure-tile.open { background: rgba(255,255,255,.13); }
.treasure-tile.treasure { background: linear-gradient(145deg, rgba(255,255,255,.25), rgba(255,93,171,.18), rgba(255,203,61,.24)); border-color: rgba(255,203,61,.58); }
.treasure-tile:disabled { cursor: default; opacity: .9; }
.stack-panel { gap: .75rem; }
.stack-lane {
  position: relative;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,93,171,.08), rgba(255,203,61,.08));
  overflow: hidden;
}
.stack-lane::before {
  content: "";
  position: absolute;
  left: 41%;
  right: 41%;
  top: 0;
  bottom: 0;
  background: rgba(255,203,61,.18);
  border-inline: 1px solid rgba(255,203,61,.36);
}
.stack-basket {
  position: absolute;
  left: 50%;
  bottom: .45rem;
  transform: translateX(-50%);
  font-size: 2rem;
  z-index: 1;
}
.stack-marker {
  position: absolute;
  left: 0%;
  top: .55rem;
  transform: translateX(-50%);
  font-size: 2rem;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.26));
}
.stack-tower {
  min-height: 66px;
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: center;
  align-content: flex-end;
  gap: .18rem;
}
.stack-tower span {
  display: inline-block;
  transform: translateX(var(--stack-offset));
  font-size: 1.55rem;
}
.pond-path {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .45rem;
}
.pond-path span {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  font-weight: 950;
}
.pond-path span.safe { background: rgba(103,242,145,.22); border-color: rgba(103,242,145,.58); }
.pond-path span.splash { background: rgba(57,215,255,.16); border-color: rgba(57,215,255,.5); }
.pond-choices, .cloud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: .65rem;
}
.pond-choices button, .cloud-grid button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 950;
}
.cloud-target {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  font-weight: 950;
  color: var(--text);
  text-align: center;
}
.cloud-grid button { font-size: 2rem; }
.glide-field, .signal-panel, .comet-panel, .egg-panel {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0,0,0,.18);
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}
.glide-field {
  height: 270px;
  touch-action: none;
  user-select: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.2), transparent 8rem),
    radial-gradient(circle at 78% 26%, rgba(103,242,145,.16), transparent 9rem),
    linear-gradient(180deg, rgba(142,234,255,.16), rgba(57,215,255,.08), rgba(255,203,61,.12)),
    rgba(0,0,0,.18);
}
.glide-field::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4.2rem;
  height: 1px;
  background: rgba(255,255,255,.18);
}
.glide-goose, .glide-crumb {
  position: absolute;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  z-index: 2;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.28));
}
.glide-goose {
  left: 50%;
  bottom: 1.1rem;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  font-size: 2rem;
}
.glide-crumb {
  left: 50%;
  top: 8%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255,203,61,.24);
  border: 1px solid rgba(255,203,61,.45);
  font-size: 1.55rem;
}
.signal-panel, .comet-panel, .egg-panel {
  display: grid;
  align-content: center;
  gap: .8rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 18% 18%, rgba(103,242,145,.16), transparent 8rem),
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(103,242,145,.08), rgba(255,203,61,.08)),
    rgba(0,0,0,.18);
}
.signal-target {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.075);
  padding: .75rem;
  color: var(--text);
}
.signal-target span { font-size: 2rem; }
.signal-target b { font-size: 1.2rem; }
.signal-target[data-signal="white"] { border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.1); }
.signal-target[data-signal="pink"] { border-color: rgba(255,93,171,.42); background: rgba(255,93,171,.11); }
.signal-target[data-signal="yellow"] { border-color: rgba(255,203,61,.44); background: rgba(255,203,61,.12); }
.signal-target[data-signal="blue"] { border-color: rgba(142,234,255,.42); background: rgba(142,234,255,.11); }
.signal-target[data-signal="green"] { border-color: rgba(103,242,145,.45); background: rgba(103,242,145,.12); }
.signal-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: .65rem;
}
.signal-buttons button, .comet-cell {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 950;
}
.signal-buttons button span {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto .35rem;
  border-radius: 999px;
}
.signal-buttons [data-signal-choice="white"] span { background: var(--friend-white); }
.signal-buttons [data-signal-choice="pink"] span { background: var(--friend-pink); }
.signal-buttons [data-signal-choice="yellow"] span { background: var(--friend-yellow); }
.signal-buttons [data-signal-choice="blue"] span { background: var(--friend-blue); }
.signal-buttons [data-signal-choice="green"] span { background: var(--friend-green); }
.signal-hud, .comet-hud { position: static; pointer-events: auto; justify-content: center; flex-wrap: wrap; }
.comet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
}
.comet-cell {
  min-height: 58px;
  font-size: 1.45rem;
  color: rgba(255,255,255,.42);
}
.comet-cell.target {
  color: #201606;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.95), rgba(255,203,61,.74) 50%, rgba(103,242,145,.32)),
    rgba(255,203,61,.24);
  border-color: rgba(255,203,61,.72);
  box-shadow: 0 0 24px rgba(255,203,61,.28);
}
.egg-panel {
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.18), transparent 8rem),
    radial-gradient(circle at 82% 18%, rgba(255,203,61,.18), transparent 8rem),
    linear-gradient(180deg, rgba(142,234,255,.12), rgba(255,203,61,.09), rgba(255,93,171,.07)),
    rgba(0,0,0,.18);
}
.egg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}
.egg-lane {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  justify-items: center;
  gap: .45rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.065);
  color: var(--text);
  padding: .7rem .45rem;
  box-shadow: inset 0 -28px 54px rgba(255,255,255,.035);
}
.egg-lane.goose {
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.11);
}
.egg-lane.egg {
  border-color: rgba(255,203,61,.64);
  box-shadow: 0 0 28px rgba(255,203,61,.16), inset 0 -28px 54px rgba(255,203,61,.07);
}
.egg-lane.splash {
  border-color: rgba(57,215,255,.58);
  box-shadow: 0 0 26px rgba(57,215,255,.14), inset 0 -28px 54px rgba(57,215,255,.06);
}
.egg-drop {
  min-height: 48px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.26));
}
.egg-goose {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  font-size: 1.9rem;
}
.egg-hud { position: static; pointer-events: auto; justify-content: center; flex-wrap: wrap; }
.game-overlay { position: absolute; inset: 0; display: grid; place-items: center; border: 0; color: var(--text); background: rgba(7,17,31,.72); font-size: 1.6rem; font-weight: 950; z-index: 3; }
.game-overlay.hidden { display: none; }
.hud { display: flex; justify-content: space-between; gap: .7rem; position: absolute; left: .65rem; right: .65rem; top: .65rem; z-index: 4; pointer-events: none; }
.hud span { background: rgba(0,0,0,.3); border: 1px solid var(--line); padding: .35rem .5rem; border-radius: 999px; color: var(--text); font-size: .86rem; font-weight: 900; }
.reactor { display: grid; place-items: center; }
.reactor-core { width: 170px; height: 170px; border-radius: 50%; border: 8px solid rgba(255,255,255,.15); position: relative; display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.05); }
.reactor-core i { position: absolute; inset: auto 0 0 0; height: 0%; background: linear-gradient(0deg, var(--green), var(--cyan)); transition: height .15s linear; }
.reactor-core span { position: relative; z-index: 2; font-size: 3rem; font-weight: 950; text-shadow: 0 4px 16px rgba(0,0,0,.4); }
.groove-panel {
  min-height: 220px;
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(142,234,255,.2), transparent 8rem),
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(142,234,255,.09), rgba(255,93,171,.08)),
    rgba(0,0,0,.18);
}
.groove-lane {
  position: relative;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(142,234,255,.12), rgba(255,93,171,.1));
  overflow: hidden;
}
.groove-zone {
  position: absolute;
  left: 43%;
  right: 43%;
  top: 0;
  bottom: 0;
  background: rgba(255,93,171,.26);
  border-inline: 1px solid rgba(255,255,255,.34);
  box-shadow: 0 0 28px rgba(255,93,171,.24);
}
.groove-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.16);
  font-size: 1.7rem;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.3));
}
.groove-hud {
  position: static;
  pointer-events: auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 1rem 0; }
.memory-card { min-height: 80px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); color: var(--text); font-size: 2rem; font-weight: 950; }
.memory-card.matched { background: rgba(103,242,145,.23); border-color: rgba(103,242,145,.55); }
.flight-canvas, .draw-canvas { width: 100%; border-radius: 20px; border: 1px solid var(--line); background: rgba(0,0,0,.18); display: block; }
.coloring-card {
  background:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,.12), transparent 9rem),
    radial-gradient(circle at 82% 18%, rgba(255,93,171,.13), transparent 10rem),
    linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,93,171,.055), rgba(142,234,255,.055)),
    var(--card);
}
.coloring-card .draw-canvas {
  background:
    linear-gradient(45deg, rgba(255,203,61,.08) 25%, transparent 25%, transparent 75%, rgba(255,203,61,.08) 75%),
    linear-gradient(45deg, rgba(255,93,171,.06) 25%, #ffffff 25%, #ffffff 75%, rgba(255,93,171,.06) 75%);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.72), 0 24px 58px rgba(0,0,0,.22);
}
.maze-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.18), transparent 8.5rem),
    radial-gradient(circle at 82% 22%, rgba(255,93,171,.22), transparent 9rem),
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,93,171,.08), rgba(255,203,61,.1)),
    rgba(0,0,0,.2);
}
.maze-wrap::before {
  content: "";
  position: absolute;
  inset: .7rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  pointer-events: none;
}
.maze-wrap:focus-visible { outline: 3px solid rgba(255,203,61,.8); outline-offset: 3px; }
.maze {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--maze-size, 7), minmax(0, 1fr));
  gap: clamp(2px, .5vw, 5px);
  width: min(100%, 660px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: clamp(.35rem, 1vw, .75rem);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    rgba(6, 12, 22, .46);
  box-shadow: inset 0 0 28px rgba(0,0,0,.24), 0 20px 55px rgba(0,0,0,.24);
  touch-action: manipulation;
}
.maze-cell {
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: clamp(5px, .75vw, 12px);
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  font-size: clamp(.78rem, 2.5vw, 1.55rem);
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.maze-cell.path { background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.065)); }
.maze-cell.trail { background: linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,203,61,.12)); }
.maze-cell.wall {
  background:
    linear-gradient(145deg, rgba(255,93,171,.68), rgba(255,203,61,.22)),
    rgba(255,93,171,.35);
  border-color: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 -10px 18px rgba(0,0,0,.14);
  cursor: not-allowed;
}
.maze-cell.goal {
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.82), rgba(255,203,61,.52) 42%, rgba(255,203,61,.2) 68%),
    rgba(255,203,61,.2);
  border-color: rgba(255,203,61,.7);
  box-shadow: 0 0 22px rgba(255,203,61,.22);
}
.maze-cell.player {
  background:
    radial-gradient(circle at 46% 38%, rgba(255,255,255,.78), rgba(255,93,171,.24) 56%, rgba(255,203,61,.25)),
    rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.62);
  box-shadow: 0 0 24px rgba(255,255,255,.18), 0 0 28px rgba(255,93,171,.18);
}
.maze-goose { display: inline-block; transform: scaleX(-1); filter: drop-shadow(0 3px 6px rgba(0,0,0,.28)); }
.maze-goal { display: inline-block; animation: maze-shine 1.4s ease-in-out infinite alternate; }
.maze-dot { color: rgba(255,255,255,.48); font-weight: 950; }
.maze-side {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .8rem;
  align-content: center;
}
.maze-badge, .maze-status {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0,0,0,.22);
  padding: .75rem;
}
.maze-badge { display: flex; align-items: center; gap: .55rem; color: var(--text); }
.maze-badge span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,203,61,.18); }
.maze-badge b { font-size: .9rem; line-height: 1.2; }
.maze-status { min-height: 5rem; margin: 0; color: var(--text); font-weight: 850; line-height: 1.45; }
.maze-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; place-self: center; width: 164px; }
.maze-controls button { min-width: 48px; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.1); color: var(--text); font-weight: 950; font-size: 1.15rem; box-shadow: 0 10px 22px rgba(0,0,0,.16); }
.maze-controls button:hover, .maze-controls button:focus-visible { background: rgba(255,203,61,.22); border-color: rgba(255,203,61,.58); outline: none; }
.maze-controls button:first-child { grid-column: 2; }
.maze-controls button:nth-child(2) { grid-column: 1; }
.maze-controls button:nth-child(3) { grid-column: 3; }
.maze-controls button:nth-child(4) { grid-column: 2; }
/* ---------- Game picker (3D cover carousel at the top of the Game Zone; js/085-game-picker.js) ---------- */
.game-picker {
  margin: 0 0 1.2rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #07060f 0%, #120c24 62%, #1a1530 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.picker-stage {
  position: relative;
  height: 420px;
  perspective: 1100px;
  perspective-origin: 50% 40%;
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
}
.picker-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); }
.picker-floor {
  position: absolute; left: 50%; bottom: 26px; width: min(760px, 92%); height: 110px; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 170, 61, .22), rgba(26, 21, 48, .9) 60%, transparent 72%);
  border: 1px solid rgba(255, 255, 255, .06);
}
.picker-floor::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 250px; height: 60px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 3px solid rgba(255, 170, 61, .75); box-shadow: 0 0 30px rgba(255, 170, 61, .45);
}
.picker-track {
  position: absolute; left: 50%; top: 34px; width: 0; height: 0;
  transform-style: preserve-3d;
}
.picker-card {
  position: absolute; left: 0; top: 0;
  width: 232px; aspect-ratio: 300 / 360;
  padding: 0; border: 0; background: none; cursor: pointer;
  transform-style: preserve-3d; /* no filter on this box: a filter would flatten the cartridge spin */
  transition: transform .45s cubic-bezier(.25, 1, .5, 1), opacity .45s ease;
  will-change: transform;
}
/* Two-sided cartridge: front label and back sticker. */
.cart { position: absolute; inset: 0; display: block; transform-style: preserve-3d; }
.cart-face { position: absolute; inset: 0; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cart-face svg { display: block; width: 100%; height: 100%; filter: brightness(.55) saturate(.8) drop-shadow(0 18px 22px rgba(0, 0, 0, .55)); transition: filter .45s ease; }
.cart-face.back { transform: rotateY(180deg); }
.picker-card.is-picked .cart-face svg { filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .6)); }
.picker-card.is-picked .cart-face.front svg {
  filter: drop-shadow(0 0 2px #ffe27a) drop-shadow(0 0 18px rgba(255, 190, 70, .55)) drop-shadow(0 22px 26px rgba(0, 0, 0, .6));
}
/* The picked cartridge spins once (showing its back), then sways gently. */
.picker-card.is-picked .cart { animation: cart-sway 5s ease-in-out infinite; }
.picker-card.is-picked .cart.spin { animation: cart-spin 1.4s cubic-bezier(.45, .05, .25, 1), cart-sway 5s ease-in-out 1.4s infinite; }
@keyframes cart-spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@keyframes cart-sway { 0%, 100% { transform: rotateY(-9deg) translateY(0); } 50% { transform: rotateY(9deg) translateY(-6px); } }
.picker-card:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.picker-arrow {
  position: absolute; top: 44%; transform: translateY(-50%); z-index: 20;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.9rem; line-height: 1; color: #fff; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(12, 16, 36, .82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}
.picker-arrow.prev { left: 16px; }
.picker-arrow.next { right: 16px; }
.picker-arrow:hover { background: rgba(40, 46, 90, .95); }
.picker-arrow:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.picker-details { border-top: 1px solid rgba(255, 255, 255, .08); background: #1b1d2c; }
.picker-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.picker-stats span { display: grid; gap: .15rem; padding: .85rem .5rem; }
.picker-stats small { color: #9aa4c7; font-size: .85rem; }
.picker-stats b { color: #fff; font-size: 1.05rem; }
.picker-info { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem 1.15rem; }
.picker-info h3 { margin: 0; color: #fff; font-size: 1.25rem; }
.picker-info p { margin: .2rem 0 0; color: #9aa4c7; }
.picker-actions { display: flex; gap: .5rem; flex: none; }
.picker-actions .button { min-height: 44px; }

/* Only the picked game's card shows below the picker. */
.game-stage-grid { grid-template-columns: minmax(0, 1fr); }
.game-stage-grid > .picker-hidden { display: none !important; }
.game-stage-grid > article { scroll-margin-top: 90px; }

@media (max-width: 700px) {
  .picker-stage { height: 318px; }
  .picker-track { top: 26px; }
  .picker-card { width: 168px; }
  .picker-floor { height: 80px; bottom: 18px; }
  .picker-floor::after { width: 180px; height: 44px; }
  .picker-arrow { width: 42px; height: 42px; font-size: 1.5rem; top: 42%; }
  .picker-arrow.prev { left: 8px; }
  .picker-arrow.next { right: 8px; }
  .picker-stats span { padding: .6rem .3rem; }
  .picker-stats b { font-size: .92rem; }
  .picker-info { flex-direction: column; align-items: stretch; padding: .85rem; }
  .picker-actions .button { flex: 1; padding-inline: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .picker-card { transition: opacity .2s ease; }
  .picker-card.is-picked .cart, .picker-card.is-picked .cart.spin { animation: none; }
}
.form-grid, .tool-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
label { color: var(--muted); font-weight: 850; display: grid; gap: .35rem; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.08); color: var(--text); padding: .75rem .85rem; }
input[type="color"] { min-height: 45px; padding: .2rem; }
.kindness-preview {
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0,0,0,.18);
  margin: 1rem 0;
  padding: 1rem;
  overflow: hidden;
}
.kindness-card-art {
  width: min(100%, 560px);
  min-height: 230px;
  display: grid;
  align-content: center;
  gap: .7rem;
  padding: 1.4rem;
  border-radius: 22px;
  color: #102034;
  background: linear-gradient(145deg, var(--card-color, var(--friend-pink)), #ffffff 64%, rgba(255,203,61,.58));
  border: 4px solid rgba(16,32,52,.16);
  box-shadow: 0 22px 44px rgba(0,0,0,.22);
}
.kindness-card-art .badge { font-size: 2.4rem; }
.kindness-card-art b { font-size: clamp(1.4rem, 4vw, 2.3rem); line-height: 1; }
.kindness-card-art p { color: #24344d; font-size: 1.08rem; margin: 0; }
.story-output, .bot-output { padding: 1rem; color: var(--text); font-weight: 750; display: grid; align-content: center; }
.joke-bot-card {
  background:
    radial-gradient(circle at 14% 16%, rgba(142,234,255,.13), transparent 8rem),
    radial-gradient(circle at 88% 18%, rgba(255,203,61,.11), transparent 9rem),
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(142,234,255,.07), rgba(255,93,171,.045)),
    var(--card);
}
.joke-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .9rem;
}
.joke-prompt {
  border: 1px solid rgba(142,234,255,.26);
  border-radius: 999px;
  background: rgba(142,234,255,.09);
  color: var(--text);
  min-height: 40px;
  padding: .48rem .75rem;
  font-weight: 950;
}
.joke-prompt:hover, .joke-prompt:focus-visible {
  border-color: rgba(255,203,61,.58);
  background: rgba(255,203,61,.14);
}
.joke-input-wrap { display: block; }
.joke-input-wrap .wide-input { margin: .85rem 0; }
.joke-output {
  min-height: 250px;
  align-content: start;
  gap: .7rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(142,234,255,.08), rgba(255,203,61,.07)),
    rgba(0,0,0,.18);
  border-color: rgba(142,234,255,.22);
}
.bot-kicker {
  width: fit-content;
  padding: .34rem .6rem;
  border-radius: 999px;
  background: rgba(142,234,255,.13);
  border: 1px solid rgba(142,234,255,.32);
  color: var(--friend-blue);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.joke-output h4 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.08;
}
.joke-output p {
  margin: 0;
  color: rgba(247,250,255,.88);
  line-height: 1.55;
}
.story-builder-card {
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.13), transparent 8rem),
    radial-gradient(circle at 88% 14%, rgba(255,203,61,.16), transparent 10rem),
    linear-gradient(145deg, rgba(255,255,255,.08), rgba(83,193,255,.08), rgba(255,93,171,.07)),
    var(--card);
}
.story-inputs label {
  min-width: 0;
}
.story-paper {
  min-height: 300px;
  align-content: start;
  gap: .72rem;
  padding: clamp(1rem, 2.6vw, 1.45rem);
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,203,61,.08), rgba(103,242,145,.06)),
    rgba(0,0,0,.16);
  border-color: rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.story-paper::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 15px;
  pointer-events: none;
}
.story-kicker {
  width: fit-content;
  padding: .34rem .58rem;
  border-radius: 999px;
  background: rgba(255,203,61,.16);
  border: 1px solid rgba(255,203,61,.34);
  color: var(--gold);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.story-paper h4 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  line-height: 1.05;
}
.story-paper p {
  margin: 0;
  color: rgba(247,250,255,.88);
  font-weight: 750;
  line-height: 1.62;
}
.draw-canvas { touch-action: none; }
.choice-grid { display: grid; gap: .55rem; margin: 1rem 0; }
.choice-grid button, .orbit-list select, .sound-button, .piano-controls select { border: 1px solid var(--line); border-radius: 16px; padding: .75rem; background: rgba(255,255,255,.08); color: var(--text); font-weight: 900; }
.choice-grid button.correct { background: rgba(103,242,145,.22); border-color: var(--green); }
.choice-grid button.wrong { background: rgba(255,93,171,.18); border-color: var(--pink); }
.result { min-height: 1.4rem; color: var(--gold); font-weight: 900; }
.orbit-list { display: grid; gap: .7rem; margin: 1rem 0; }
.orbit-row { display: grid; gap: .35rem; }
.pattern-sequence { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: 2rem; margin: 1rem 0; }
.pattern-sequence span { border: 1px solid var(--line); border-radius: 14px; min-width: 50px; min-height: 50px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.math-crumbs { min-height: 74px; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .8rem 0; }
.math-crumbs span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,203,61,.16); border: 1px solid rgba(255,203,61,.35); font-size: 1.4rem; }
.sound-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-top: 1rem; }
.sound-button { min-height: 82px; font-size: 1.15rem; }
.piano-card { overflow: visible; }
.piano-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
  margin: 1rem 0;
}
.piano-controls label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-weight: 900;
}
.piano-controls select { min-height: 44px; color: var(--text); }
.piano-controls input[type="range"] { accent-color: var(--gold); max-width: 150px; }
.piano-loop {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  margin: -.15rem 0 1rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
}
.piano-loop .button-row { gap: .5rem; }
.piano-loop .button { padding: .62rem .82rem; }
.piano-loop-status {
  min-height: 0;
  margin: 0;
  color: var(--gold);
  font-weight: 900;
}
.toggle-row {
  min-height: 44px;
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}
.toggle-row input { accent-color: var(--gold); }
.piano-stage {
  margin: 1rem 0;
  padding: clamp(.7rem, 2vw, 1rem);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 22% 0%, rgba(255,203,61,.16), transparent 12rem),
    radial-gradient(circle at 84% 12%, rgba(255,93,171,.13), transparent 13rem),
    rgba(0,0,0,.2);
  overflow-x: hidden;
  overscroll-behavior-x: contain;
}
.piano-keys {
  --piano-pad: .35rem;
  --white-key: calc((100% - (var(--piano-pad) * 2)) / var(--white-count, 15));
  position: relative;
  width: 100%;
  min-width: 0;
  height: clamp(168px, 24vw, 232px);
  padding: var(--piano-pad);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.18));
  overflow: hidden;
}
.piano-key {
  border: 1px solid rgba(16,32,52,.24);
  font-weight: 950;
  transition: transform .08s ease, box-shadow .08s ease, background .08s ease;
  touch-action: manipulation;
}
.piano-key b, .piano-key small { pointer-events: none; }
.piano-key small { display: none; }
.piano-key.white {
  position: absolute;
  top: var(--piano-pad);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: .25rem;
  min-width: 0;
  width: var(--white-key);
  height: calc(100% - (var(--piano-pad) * 2));
  padding: 0 .12rem .7rem;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #fff, #eaf1ff 72%, #cfd8e8);
  color: #102034;
  box-shadow: inset 0 -10px 16px rgba(16,32,52,.12);
}
.piano-key.black {
  position: absolute;
  z-index: 2;
  top: var(--piano-pad);
  width: calc(var(--white-key) * .62);
  height: 58%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: .16rem;
  padding: 0 .1rem .55rem;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #29374d, #07111f 82%);
  color: #f6fbff;
  box-shadow: 0 10px 20px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.14);
}
.piano-key.next-note {
  outline: 3px solid rgba(255,203,61,.82);
  outline-offset: -4px;
  box-shadow: 0 0 0 5px rgba(255,203,61,.16), 0 0 26px rgba(255,203,61,.34);
}
.piano-key small {
  color: inherit;
  opacity: .62;
  font-size: .72rem;
}
.piano-key b { font-size: clamp(.68rem, 1.2vw, .92rem); }
.piano-key.active,
.piano-key:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 3px rgba(255,203,61,.22), inset 0 -5px 12px rgba(255,203,61,.22);
}
.piano-key.black.active,
.piano-key.black:active {
  box-shadow: 0 4px 14px rgba(0,0,0,.34), 0 0 0 3px rgba(255,203,61,.24);
}
.black-1 { left: calc(var(--white-key) * .75); }
.black-2 { left: calc(var(--white-key) * 1.75); }
.black-4 { left: calc(var(--white-key) * 3.75); }
.black-5 { left: calc(var(--white-key) * 4.75); }
.black-6 { left: calc(var(--white-key) * 5.75); }
.piano-learn {
  display: grid;
  gap: .75rem;
  margin: 1rem 0 .25rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
}
.piano-learn label {
  display: grid;
  gap: .35rem;
  color: var(--muted);
  font-weight: 900;
}
.piano-song-info {
  min-height: 0;
  margin: -.25rem 0 0;
  color: var(--gold);
  font-weight: 900;
}
.piano-learn select {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .7rem;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 900;
}
.piano-song-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  min-height: 36px;
  max-height: 124px;
  overflow: auto;
  padding-right: .2rem;
}
.piano-song-strip span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 32px;
  padding: .25rem .45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: var(--muted);
  font-weight: 950;
}
.piano-song-strip span.active {
  color: #201606;
  border-color: rgba(255,203,61,.7);
  background: var(--gold);
}
.wide-input { margin: 1rem 0; }
.hunt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.hunt-card { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 1rem; min-height: 190px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hunt-card .big { font-size: 2.4rem; display: block; margin-bottom: .4rem; }
.hunt-card.locked .big { filter: grayscale(1); opacity: .42; }
.hunt-card.found { border-color: rgba(103,242,145,.55); }
/* Sticker album (arcade home): progress, stickers you have, next to earn, and "Show all" */
.sticker-album { display: grid; gap: .9rem; }
.album-summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .6rem 1.2rem;
  padding: 1rem 1.1rem; border: 1px solid rgba(255,203,61,.3); border-radius: 20px; box-shadow: var(--shadow);
  background: linear-gradient(135deg, rgba(255,203,61,.13), rgba(255,93,171,.07), rgba(142,234,255,.06)), var(--card);
}
.album-count { display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; }
.album-count b { font-size: 2.2rem; line-height: 1; color: var(--gold); }
.album-count span { font-weight: 850; color: var(--muted); }
.album-count small { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.album-summary progress { width: 100%; height: 12px; accent-color: var(--gold); }
.album-shelf { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; min-height: 2.1rem; }
.album-shelf span {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 12px;
  background: rgba(255,203,61,.12); font-size: 1.2rem;
}
.album-shelf small { color: var(--muted); font-weight: 750; }
.album-heading { margin: .2rem 0 0; font-size: 1rem; }
.album-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.album-tile {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: .7rem;
  padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
}
.album-tile.earned { border-color: rgba(255,203,61,.45); }
.album-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: rgba(255,255,255,.07); font-size: 1.35rem; }
.album-tile:not(.earned) .album-icon { filter: grayscale(1); opacity: .5; }
.album-tile b { display: block; font-size: .95rem; line-height: 1.15; }
.album-tile small { display: block; margin-top: .15rem; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.album-check { color: var(--gold); font-weight: 900; }
.album-play {
  padding: .35rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 850; text-decoration: none;
  color: #1b1003; background: linear-gradient(135deg, #ffcb3d, #ff9a3d);
}
.album-play:focus-visible, .album-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.album-toggle { justify-self: start; }
.album-done { margin: 0; font-weight: 800; }
@media (max-width: 700px) {
  .album-summary { grid-template-columns: minmax(0, 1fr); padding: .8rem; }
  .album-list { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
  .album-tile { padding: .55rem .6rem; }
  .album-toggle { justify-self: stretch; }
}
.family-section .idea-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.idea-list article { padding: 1rem; }
.idea-list b { display: block; color: var(--gold); margin-bottom: .45rem; }
.idea-list span { color: var(--muted); line-height: 1.55; }
.site-footer { width: var(--shell); margin: 0 auto; padding: 3rem 0 5rem; color: var(--muted); text-align: center; }
.passport-dialog {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  width: min(1120px, calc(100% - 2rem));
  max-height: min(92vh, 920px);
  overflow: auto;
  padding: clamp(1rem, 2vw, 1.35rem);
}
.passport-dialog::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(8px); }
.passport-panel { position: relative; display: grid; gap: 1rem; }
.dialog-close { position: absolute; right: 0; top: 0; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text); }
.character-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.character-option {
  --character-accent: var(--friend-white);
  text-align: left;
  display: flex;
  gap: .7rem;
  border: 1px solid color-mix(in srgb, var(--character-accent) 24%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--character-accent) 10%, transparent), rgba(255,255,255,.055)),
    rgba(255,255,255,.05);
  color: var(--text);
  padding: .75rem;
  border-radius: 16px;
}
.character-option span { font-size: 2rem; }
.character-option[data-character="deedz"] { --character-accent: var(--friend-white); }
.character-option[data-character="sweet"], .character-option[data-character="spark"], .character-option[data-character="artist"] { --character-accent: var(--friend-pink); }
.character-option[data-character="crumb"] { --character-accent: var(--friend-yellow); }
.character-option[data-character="silly"], .character-option[data-character="astro"] { --character-accent: var(--friend-blue); }
.character-option[data-character="keen"] { --character-accent: var(--friend-green); }
.character-option[data-character="mg"] { --character-accent: var(--friend-red); }
.character-option.active {
  border-color: color-mix(in srgb, var(--character-accent) 68%, white);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--character-accent) 20%, transparent), rgba(255,255,255,.08)),
    rgba(255,255,255,.06);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--character-accent) 28%, transparent), 0 16px 34px rgba(0,0,0,.18);
}
.character-copy {
  display: grid;
  gap: .18rem;
}
.character-copy strong {
  line-height: 1.1;
}
.character-copy small {
  display: block;
  line-height: 1.2;
}
.character-option small, .character-option p { color: var(--muted); margin: 0; }
.passport-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.passport-legends {
  margin-top: .35rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}
.passport-legends-tab {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,203,61,.08), rgba(103,242,145,.06)),
    rgba(255,255,255,.045);
  box-shadow: 0 14px 34px rgba(0,0,0,.16);
}
.passport-legends-tab::-webkit-details-marker { display: none; }
.passport-legends-tab .eyebrow { display: block; margin-bottom: .18rem; }
.passport-legends-title {
  display: block;
  color: var(--text);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.05;
  font-weight: 950;
}
.passport-legends-cue {
  flex: 0 0 auto;
  min-width: 76px;
  text-align: center;
  border: 1px solid rgba(255,203,61,.4);
  border-radius: 999px;
  padding: .48rem .72rem;
  color: var(--gold);
  background: rgba(255,203,61,.12);
  font-weight: 950;
}
.passport-legends[open] .passport-legends-cue::before { content: "Close"; }
.passport-legends:not([open]) .passport-legends-cue::before { content: "Open"; }
.passport-legends-cue { font-size: 0; }
.passport-legends-cue::before { font-size: .85rem; }
.passport-legends-heading {
  margin: .95rem 0 1rem;
}
.passport-legends-heading p {
  max-width: 48ch;
  margin: 0;
  font-weight: 800;
}
.passport-legends-grid {
  grid-template-columns: 1.05fr 1fr 1fr;
}
.passport-legends .global-honk-card {
  min-height: 300px;
}
.passport-legends .legend-list {
  max-height: 280px;
  overflow: auto;
  padding-right: .2rem;
}
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 130%); z-index: 50; max-width: min(540px, calc(100% - 2rem)); background: #101522; color: white; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: .85rem 1.15rem; box-shadow: var(--shadow); transition: transform .25s ease; font-weight: 900; text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -1rem; width: 10px; height: 18px; border-radius: 3px; animation: fall 1.8s linear forwards; }
.card-honked { animation: card-honk-pulse .42s ease-out; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@keyframes maze-shine { to { transform: scale(1.12) rotate(7deg); filter: drop-shadow(0 0 10px rgba(255,203,61,.8)); } }
@keyframes bubble-target-pop {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(.35); opacity: .2; }
}
@keyframes bubble-pop-burst {
  0% { transform: translate(-50%, -50%) scale(.35); opacity: .95; }
  65% { opacity: .9; }
  100% { transform: translate(-50%, -50%) scale(1.75); opacity: 0; }
}
@keyframes arcade-light-chase {
  0% { filter: brightness(.78); opacity: .72; }
  100% { filter: brightness(1.34); opacity: 1; }
}
@keyframes card-honk-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(.985); box-shadow: 0 0 0 4px rgba(255,203,61,.24), var(--shadow); }
  100% { transform: scale(1); }
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand actions"
      "nav nav";
    gap: .68rem;
  }
  .site-header::before {
    inset: .25rem -.65rem;
    border-radius: 24px;
  }
  .brand { grid-area: brand; }
  .header-actions { grid-area: actions; }
  .nav-toggle { display: none; }
  .site-nav {
    grid-area: nav;
    display: flex;
    justify-content: center;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .header-actions { justify-self: end; align-self: center; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .activity-tools { grid-template-columns: 1fr; align-items: stretch; }
  .result-count { white-space: normal; }
  .arcade-console {
    grid-template-columns: 1fr;
    grid-template-areas:
      "marquee"
      "scoreboard"
      "cabinets";
  }
  .arcade-cabinets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hunt-grid, .module-grid.three, .family-section .idea-list, .quest-dashboard { grid-template-columns: repeat(2, 1fr); }
  .daily-board { grid-column: 1 / -1; }
  .legends-grid { grid-template-columns: repeat(2, 1fr); }
  .global-honk-card { grid-row: auto; }
  .legend-sign-card { grid-column: 1 / -1; }
  .module-grid.two { grid-template-columns: 1fr; }
  .passport-strip { grid-template-columns: repeat(2, 1fr); }
  .progress-wrap { grid-column: 1 / -1; }
}

@media (max-width: 640px), (max-height: 520px) and (orientation: landscape) {
  :root {
    --shell: min(100% - 22px, 1160px);
    --mobile-header: 76px;
    --mobile-card-min: calc(var(--app-height, 100svh) - 190px);
    --mobile-card-height: min(620px, calc(var(--app-height, 100svh) - 128px));
  }
  html,
  body {
    min-height: 100%;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  html {
    scroll-padding-top: .35rem;
    scroll-snap-type: y proximity;
  }
  html.keyboard-open {
    scroll-snap-type: none;
  }
  body {
    min-height: var(--app-height, 100svh);
  }
  #main {
    height: auto;
    margin-top: 0;
    overflow-x: hidden;
    overflow-y: visible;
    scroll-snap-type: none;
  }
  main > .section,
  .passport-strip,
  main > .site-footer {
    height: auto;
    min-height: min(760px, var(--app-height, 100svh));
    max-height: none;
    overflow: visible;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    scroll-margin-top: .35rem;
  }
  html.keyboard-open main > .section,
  html.keyboard-open .passport-strip,
  html.keyboard-open main > .site-footer {
    scroll-snap-align: none;
  }
  .section {
    display: flex;
    flex-direction: column;
    gap: .62rem;
    min-width: 0;
    padding: .72rem 0;
  }
  main > .section.section-hint-collapsed {
    --mobile-card-height: min(690px, calc(var(--app-height, 100svh) - 58px));
    gap: .28rem;
    padding-top: .18rem;
  }
  main > .site-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .72rem;
    width: var(--shell);
    margin: 0 auto;
    padding: 1rem;
    overflow: hidden;
    min-height: min(520px, calc(var(--app-height, 100svh) - 24px));
    border: 1px solid rgba(255,203,61,.2);
    border-radius: 24px;
    background:
      radial-gradient(circle at 16% 12%, rgba(255,203,61,.14), transparent 8rem),
      radial-gradient(circle at 84% 18%, rgba(142,234,255,.12), transparent 9rem),
      linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,93,171,.045), rgba(255,203,61,.04)),
      var(--card);
    box-shadow: 0 22px 70px rgba(0,0,0,.28);
    text-align: center;
  }
  main > .site-footer .footer-token {
    width: 54px;
    height: 54px;
    margin: 0 0 .2rem;
    font-size: 1.35rem;
  }
  main > .site-footer p {
    max-width: 30rem;
    margin: 0;
    line-height: 1.35;
  }
  main > .site-footer p:first-of-type {
    color: var(--text);
    font-size: clamp(1.12rem, 5vw, 1.55rem);
    font-weight: 950;
  }
  main > .site-footer p:last-child {
    color: var(--muted);
    font-size: .84rem;
  }
  .themed-section {
    padding-left: max(0px, calc((100vw - var(--shell)) / 2));
    padding-right: max(0px, calc((100vw - var(--shell)) / 2));
  }
  .themed-section > * {
    width: var(--shell);
  }
  .hero {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    min-height: auto;
    padding-top: 1rem;
    gap: 1rem;
    overflow-y: visible;
  }
  .hero-panel {
    min-height: min(340px, 42svh);
    max-height: none;
    overflow-y: visible;
    scroll-snap-align: start;
    scroll-margin-top: .35rem;
  }
  .arcade-section { padding-top: .72rem; }
  .arcade-console { gap: .72rem; }
  .arcade-marquee {
    min-height: 270px;
    padding: 1rem;
  }
  .arcade-marquee::after {
    inset: 3.55rem 1rem 1rem;
    border-radius: 16px;
  }
  .arcade-lights {
    inset: .82rem 1rem auto;
    gap: .32rem;
  }
  .arcade-lights span { height: 10px; }
  .arcade-marquee h3 {
    font-size: clamp(1.8rem, 10vw, 2.65rem);
  }
  .arcade-cabinets {
    grid-template-columns: 1fr;
    gap: .72rem;
  }
  .arcade-cabinet {
    min-height: 236px;
    grid-template-rows: auto minmax(84px, 1fr) auto auto auto;
    padding: .86rem;
  }
  .cabinet-screen { min-height: 90px; }
  .cabinet-screen span {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
  .arcade-scoreboard { padding: .86rem; }
  .arcade-score-row {
    grid-template-columns: minmax(0, 1fr);
    gap: .2rem;
    align-items: start;
  }
  h1 { font-size: clamp(2.45rem, 14vw, 3.8rem); line-height: .96; letter-spacing: 0; }
  h2 { font-size: clamp(1.45rem, 8.4vw, 2.12rem); }
  h3 { line-height: 1.12; }
  .section-heading {
    flex: 0 0 auto;
    max-width: 100%;
    margin-bottom: 0;
    cursor: pointer;
    overflow: hidden;
  }
  .section-heading::after {
    width: min(150px, 48%);
    height: 2px;
    margin-top: .4rem;
  }
  .section-heading h2 {
    max-height: 5.4rem;
    overflow: hidden;
    margin-bottom: .18rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .32s ease, max-height .32s ease, margin .32s ease, transform .32s ease;
  }
  .section-heading .eyebrow {
    max-height: 1.2rem;
    overflow: hidden;
    margin-bottom: .25rem;
    font-size: .72rem;
    opacity: 1;
    transition: opacity .32s ease, max-height .32s ease, margin .32s ease;
  }
  .section-heading p:not(.eyebrow) {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 1.4rem;
    font-size: .82rem;
    line-height: 1.22;
    margin-bottom: 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .32s ease, max-height .32s ease, margin .32s ease, transform .32s ease;
  }
  .section-heading.hint-hidden p:not(.eyebrow) {
    max-height: 0;
    margin-top: -.08rem;
    opacity: 0;
    transform: translateY(-.25rem);
    pointer-events: none;
  }
  .section-heading.hint-hidden h2 {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(-.25rem);
    pointer-events: none;
  }
  .section-heading.hint-hidden .eyebrow {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
  }
  .section-heading.hint-hidden::after {
    width: 44px;
    margin-top: 0;
    opacity: .58;
  }
  main > .section.section-hint-collapsed .section-heading {
    max-height: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }
  main > .section.section-hint-collapsed .section-heading::after {
    display: none;
  }
  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    transform: none;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand actions toggle"
      "nav nav nav";
    gap: .55rem;
    padding: .55rem 0;
    width: var(--shell);
    z-index: 80;
  }
  .site-header::before { inset: .18rem -.42rem; border-radius: 22px; }
  .brand { gap: .5rem; }
  .brand img { width: 40px; height: 40px; padding: .12rem; }
  .brand strong { font-size: .98rem; }
  .brand small { font-size: .72rem; }
  .nav-toggle {
    grid-area: toggle;
    display: inline-grid;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 29, 45, 0.82);
    color: var(--text);
    box-shadow: 0 10px 28px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.06);
  }
  html[data-theme="light"] .nav-toggle { background: rgba(255,255,255,.74); }
  .site-nav {
    display: none;
    grid-area: nav;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: .45rem;
    width: 100%;
    margin-top: .05rem;
    padding: .6rem;
    overflow: visible;
    border-radius: 18px;
    background: rgba(7,17,31,.88);
    box-shadow: 0 18px 42px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
  }
  html[data-theme="light"] .site-nav { background: rgba(255,255,255,.94); }
  .site-nav.open { display: grid; }
  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .72rem .55rem;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.045);
    text-align: center;
  }
  html[data-theme="light"] .site-nav a {
    border-color: rgba(16,32,52,.08);
    background: rgba(16,32,52,.035);
  }
  .icon-button, .nav-toggle { width: 44px; height: 44px; }
  .passport-chip { min-height: 44px; }
  .button-row { align-items: stretch; }
  .button-row .button { flex: 1 1 100%; }
  .hero-copy .button-row .button { justify-content: center; }
  .module-card > .button,
  .module-card > .button-row .button {
    min-height: 44px;
    padding: .54rem .66rem;
    font-size: .74rem;
    line-height: 1;
  }
  .module-card > .button-row .button {
    flex: 1 1 0;
  }
  .module-card > [data-start-crumb],
  .module-card > [data-start-bubble],
  .module-card > [data-start-glide] {
    display: none;
  }
  .module-title {
    flex-wrap: nowrap;
    align-items: center;
    gap: .55rem;
  }
  .module-title > span {
    width: 42px;
    height: 42px;
    font-size: 1.48rem;
    border-radius: 14px;
  }
  .module-title h3 {
    font-size: 1.08rem;
  }
  .module-title b {
    width: auto;
    margin-left: auto;
    font-size: .68rem;
  }
  .hero-stats, .legend-progress, .legend-sign-form, .form-grid, .tool-row, .maker-settings, .maker-preview-grid, .character-grid { grid-template-columns: 1fr; }
  .activity-grid,
  .module-grid.two,
  .module-grid.three,
  .passport-strip,
  .quest-dashboard,
  .hunt-grid,
  .legends-grid,
  .family-section .idea-list {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    padding: .1rem 0 .7rem;
    touch-action: pan-x pan-y pinch-zoom;
  }
  .activity-tools {
    position: relative;
    flex: 0 0 auto;
    margin-bottom: 0;
    gap: .32rem;
  }
  .activity-search input {
    min-height: 44px;
    padding-block: .62rem;
    border-radius: 14px;
    font-size: .9rem;
  }
  .filters {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    gap: .4rem;
    padding-inline: .08rem;
    padding-bottom: .18rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filters::before,
  .filters::after {
    position: sticky;
    z-index: 2;
    top: 0;
    display: grid;
    place-items: center;
    flex: 0 0 1.05rem;
    width: 1.05rem;
    min-height: 30px;
    color: rgba(247,250,255,.58);
    font-size: .74rem;
    font-weight: 950;
    pointer-events: none;
  }
  .filters::before,
  .filters::after {
    content: none;
    display: none;
  }
  .filters::before {
    content: "<";
    left: 0;
    margin-left: -1.45rem;
    border-left: 1px solid rgba(255,203,61,.28);
  }
  .filters::after {
    content: ">";
    right: 0;
    margin-right: -1.45rem;
    border-right: 1px solid rgba(255,203,61,.28);
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter {
    flex: 0 0 auto;
    min-height: 44px;
    padding: .55rem .72rem;
    font-size: .78rem;
    white-space: nowrap;
  }
  .result-count {
    display: none;
  }
  .activity-grid,
  .module-grid.two,
  .module-grid.three,
  .quest-dashboard,
  .hunt-grid,
  .legends-grid,
  .family-section .idea-list {
    flex: 1 1 0;
    height: auto;
  }
  .passport-strip {
    width: var(--shell);
    margin: .75rem auto 1.25rem;
    padding: 1rem 0;
    align-items: stretch;
  }
  .activity-grid::-webkit-scrollbar,
  .module-grid.two::-webkit-scrollbar,
  .module-grid.three::-webkit-scrollbar,
  .passport-strip::-webkit-scrollbar,
  .quest-dashboard::-webkit-scrollbar,
  .hunt-grid::-webkit-scrollbar,
  .legends-grid::-webkit-scrollbar,
  .family-section .idea-list::-webkit-scrollbar {
    display: none;
  }
  .swipe-meter {
    display: flex;
    align-items: center;
    gap: .52rem;
    min-height: 16px;
    margin: -.08rem 0 -.08rem;
    color: var(--muted);
    font-weight: 950;
  }
  .swipe-meter::after {
    content: none;
    display: none;
  }
  .swipe-toggle {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    background: rgba(255,255,255,.055);
    color: rgba(247,250,255,.72);
    font: inherit;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .12em;
    line-height: 1;
    padding: .18rem .35rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  }
  .swipe-toggle:active {
    transform: translateY(1px);
  }
  .swipe-toggle[aria-expanded="false"] {
    color: var(--gold);
    border-color: rgba(255,203,61,.26);
    background: rgba(255,203,61,.08);
  }
  .swipe-edge {
    flex: 0 0 20px;
    min-height: 22px;
    display: grid;
    place-items: center;
    border-color: rgba(255,203,61,.22);
    color: rgba(247,250,255,.58);
    font-size: .66rem;
    line-height: 1;
    pointer-events: none;
  }
  .swipe-edge-left {
    border-left: 1px solid rgba(255,203,61,.26);
    border-radius: 999px 0 0 999px;
  }
  .swipe-edge-right {
    border-right: 1px solid rgba(255,203,61,.26);
    border-radius: 0 999px 999px 0;
  }
  .swipe-track {
    position: relative;
    flex: 1 1 auto;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  }
  .swipe-track::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--swipe-progress, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--friend-blue), var(--gold), var(--friend-pink));
    transition: width .22s ease;
  }
  .swipe-meter.is-wrapping .swipe-track::before {
    transition: none;
  }
  .swipe-meter small {
    display: none;
  }
  .swipe-meter[hidden],
  .swipe-meter[hidden] .swipe-toggle { display: none; }
  .activity-card,
  .module-card,
  .passport-stat,
  .progress-wrap,
  .daily-board,
  .play-next-card,
  .comeback-card,
  .hunt-card,
  .global-honk-card,
  .legend-card,
  .legend-sign-card,
  .family-section .idea-list article {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    height: var(--mobile-card-height);
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: contain;
  }
  .module-card {
    display: flex;
    flex-direction: column;
    gap: .48rem;
    padding: .75rem;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 22px;
    background:
      linear-gradient(145deg, rgba(255,255,255,.075), rgba(142,234,255,.045), rgba(255,203,61,.04)),
      var(--card);
  }
  #games.section-hint-collapsed .module-card {
    gap: .36rem;
    padding: .66rem;
  }
  #games.section-hint-collapsed .module-card > p:not(.result):not(.piano-loop-status):not(.piano-song-info) {
    display: none;
  }
  .activity-card.is-active,
  .module-card.is-active,
  .daily-board.is-active,
  .play-next-card.is-active,
  .comeback-card.is-active,
  .hunt-card.is-active,
  .legend-card.is-active,
  .legend-sign-card.is-active,
  .family-section .idea-list article.is-active {
    border-color: rgba(255,203,61,.34);
    box-shadow: 0 20px 54px rgba(0,0,0,.24), 0 0 0 1px rgba(255,203,61,.14);
  }
  .module-card > .module-title {
    flex: 0 0 auto;
    margin-bottom: 0;
  }
  .module-card > p:not(.result):not(.piano-loop-status):not(.piano-song-info) {
    flex: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: .78rem;
    line-height: 1.18;
  }
  .module-card > .button,
  .module-card > .button-row,
  .module-card > .result {
    flex: 0 0 auto;
    margin-block: 0;
  }
  .module-card > .button-row {
    gap: .4rem;
  }
  .module-card > .play-field,
  .module-card > .reactor,
  .module-card > .chorus-panel,
  .module-card > .sort-panel,
  .module-card > .treasure-panel,
  .module-card > .stack-panel,
  .module-card > .pond-panel,
  .module-card > .cloud-panel,
  .module-card > .glide-field,
  .module-card > .signal-panel,
  .module-card > .comet-panel,
  .module-card > .egg-panel,
  .module-card > .groove-panel,
  .module-card > .memory-grid,
  .module-card > .flight-canvas,
  .module-card > .draw-canvas,
  .module-card > .maze-wrap,
  .module-card > .story-output,
  .module-card > .bot-output,
  .module-card > .kindness-preview,
  .module-card > .piano-stage {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    margin: .05rem 0;
  }
  .module-card > .form-grid,
  .module-card > .tool-row,
  .module-card > .maker-settings,
  .module-card > .maker-preview-grid,
  .module-card > .piano-controls,
  .module-card > .piano-loop,
  .module-card > .piano-learn,
  .module-card > .joke-prompt-row,
  .module-card > .joke-input-wrap,
  .module-card > .sound-grid,
  .module-card > .choice-grid,
  .module-card > .orbit-list,
  .module-card > .pattern-sequence,
  .module-card > .math-crumbs {
    flex: 0 0 auto;
    margin-block: 0;
    min-height: 0;
  }
  .module-card > .chorus-panel,
  .module-card > .sort-panel,
  .module-card > .treasure-panel,
  .module-card > .stack-panel,
  .module-card > .pond-panel,
  .module-card > .cloud-panel,
  .module-card > .signal-panel,
  .module-card > .comet-panel,
  .module-card > .egg-panel,
  .module-card > .groove-panel,
  .module-card > .maze-wrap,
  .module-card > .story-output,
  .module-card > .bot-output,
  .module-card > .kindness-preview {
    overflow: hidden;
  }
  .module-card.maker-card,
  .module-card.coloring-card,
  .module-card.story-builder-card,
  .module-card.joke-bot-card {
    height: var(--mobile-card-height);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .module-card.piano-card {
    height: var(--mobile-card-height);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .module-card.maker-card > p,
  .module-card.coloring-card > p,
  .module-card.story-builder-card > p,
  .module-card.joke-bot-card > p,
  .module-card.piano-card > p {
    display: none;
  }
  .module-card.maker-card > .maker-preview-grid,
  .module-card.coloring-card > .draw-canvas,
  .module-card.story-builder-card > .story-output,
  .module-card.joke-bot-card > .bot-output,
  .module-card.piano-card > .piano-stage {
    flex: 1 1 auto;
    min-height: min(230px, 34svh);
  }
  .form-grid,
  .tool-row,
  .maker-settings,
  .maker-preview-grid {
    gap: .42rem;
  }
  .module-card.maker-card .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 0 0 auto;
  }
  .module-card.maker-card .maker-advanced,
  .module-card.maker-card .model-preview-panel {
    display: none;
  }
  .module-card.maker-card .maker-preview-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  .module-card.maker-card .nameplate-preview {
    height: 100%;
    min-height: 0;
    padding: .42rem;
  }
  .module-card.maker-card .nameplate-preview svg {
    max-height: 100%;
  }
  .module-card.maker-card .button-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .3rem;
    flex: 0 0 auto;
  }
  .module-card.maker-card .button {
    min-height: 44px;
    padding: .34rem .38rem;
    font-size: .62rem;
  }
  label {
    gap: .18rem;
    font-size: .72rem;
  }
  input,
  select,
  .maker-select,
  .choice-grid button,
  .orbit-list select,
  .sound-button,
  .piano-controls select {
    min-height: 44px;
    padding: .42rem .58rem;
    border-radius: 12px;
    font-size: .82rem;
  }
  .maker-advanced {
    margin-top: .35rem;
    border-radius: 14px;
  }
  .maker-advanced summary {
    padding: .48rem .62rem;
    font-size: .78rem;
  }
  .maker-preview-grid {
    grid-template-columns: 1fr;
    margin: .38rem 0;
  }
  .model-preview-panel {
    min-height: 0;
  }
  .model-preview-head,
  .model-stats {
    padding: .45rem;
  }
  .model-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .model-stats span {
    padding: .38rem;
    font-size: .68rem;
  }
  .tool-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .story-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-inputs label:last-child {
    grid-column: 1 / -1;
  }
  .story-paper,
  .joke-output {
    padding: .72rem;
    gap: .45rem;
  }
  .story-paper p,
  .joke-output p {
    line-height: 1.38;
  }
  .joke-prompt-row {
    gap: .35rem;
    margin-top: 0;
  }
  .joke-prompt {
    min-height: 44px;
    padding: .34rem .5rem;
    font-size: .72rem;
  }
  .joke-input-wrap .wide-input {
    margin: .35rem 0;
  }
  .choice-grid,
  .orbit-list,
  .pattern-sequence,
  .math-crumbs,
  .sound-grid,
  .piano-controls {
    margin: .35rem 0;
  }
  .choice-grid,
  .orbit-list,
  .sound-grid {
    gap: .4rem;
  }
  .sound-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sound-button {
    min-height: 58px;
  }
  .result {
    min-height: 1rem;
    font-size: .78rem;
    line-height: 1.2;
    margin: 0;
  }
  .piano-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .24rem;
  }
  .piano-card,
  .piano-card * {
    overscroll-behavior: contain;
  }
  .piano-controls label,
  .piano-loop,
  .piano-learn {
    font-size: .68rem;
  }
  .piano-controls label {
    display: grid;
    gap: .12rem;
  }
  .piano-controls label span {
    display: none;
  }
  .piano-controls input[type="range"] {
    max-width: 100%;
  }
  .piano-loop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .22rem;
    margin: 0;
    padding: .28rem;
    border-radius: 14px;
  }
  .piano-loop .button-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .25rem;
  }
  .piano-loop .button {
    min-height: 44px;
    padding: .28rem .32rem;
    font-size: .64rem;
  }
  .piano-loop-status {
    display: none;
  }
  .piano-stage {
    flex: 0 0 auto;
    margin: .08rem 0;
    padding: .32rem;
  }
  .piano-learn {
    flex: 0 0 auto;
    gap: .24rem;
    margin: 0;
    padding: .32rem;
    border-radius: 14px;
  }
  .piano-song-info {
    display: none;
  }
  .piano-song-strip {
    display: none;
  }
  .piano-song-strip span {
    min-width: 34px;
    min-height: 26px;
    font-size: .68rem;
  }
  .piano-keys {
    height: 122px;
  }
  .activity-card,
  .passport-stat,
  .progress-wrap,
  .play-next-card,
  .comeback-card,
  .hunt-card,
  .family-section .idea-list article {
    display: flex;
    flex-direction: column;
  }
  .activity-card {
    gap: .52rem;
    padding: .85rem;
  }
  .activity-card .icon {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    border-radius: 14px;
  }
  .activity-card .category {
    font-size: .64rem;
    padding: .22rem .42rem;
  }
  .activity-card h3,
  .hunt-card h3 {
    font-size: 1.08rem;
    line-height: 1.08;
    margin: 0;
  }
  .daily-board,
  .global-honk-card,
  .legend-card,
  .legend-sign-card {
    min-height: 0;
  }
  .activity-card,
  .passport-stat,
  .progress-wrap,
  .play-next-card,
  .comeback-card,
  .hunt-card,
  .family-section .idea-list article {
    justify-content: flex-start;
  }
  .wide-card,
  .daily-board,
  .legend-sign-card,
  .progress-wrap {
    grid-column: auto;
  }
  .daily-board-top { display: grid; }
  .daily-board-top > span { justify-self: start; white-space: normal; }
  .quest-row { grid-template-columns: 36px 1fr; min-height: 74px; padding: .65rem; }
  .quest-check { width: 36px; height: 36px; border-radius: 12px; }
  .model-stats { grid-template-columns: repeat(2, 1fr); }
  .passport-chip { max-width: 5.6rem; }
  .passport-chip b { display: none; }
  .passport-dialog { width: calc(100% - 1rem); max-height: 94vh; padding: .85rem; border-radius: 22px; }
  .passport-legends-heading { display: grid; align-items: start; }
  .passport-legends .global-honk-card { min-height: 240px; }
  .passport-legends .legend-list { max-height: none; overflow: visible; padding-right: 0; }
  .quick-launch { padding-right: 0; }
  .quick-link { grid-template-columns: 38px 1fr; }
  .quick-link .quick-arrow { display: none; }
  .activity-card,
  .hunt-card,
  .family-section .idea-list article {
    min-height: 0;
    height: var(--mobile-card-height);
  }
  .activity-card p,
  .hunt-card p,
  .family-section .idea-list article p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .8rem;
    line-height: 1.24;
  }
  .hunt-card,
  .family-section .idea-list article {
    gap: .55rem;
    padding: .85rem;
  }
  .hunt-card .big {
    font-size: 1.55rem;
    margin-bottom: 0;
  }
  .activity-grid.collection-list,
  .hunt-grid.collection-list {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-columns: auto;
    align-content: start;
    gap: .46rem;
    height: var(--mobile-card-height);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-snap-type: none;
    padding: .05rem .08rem .45rem;
  }
  .activity-grid.collection-list .activity-card,
  .hunt-grid.collection-list .hunt-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    width: 100%;
    height: auto;
    min-height: 68px;
    padding: .58rem;
    border-radius: 16px;
    scroll-snap-align: none;
  }
  .activity-grid.collection-list .activity-card {
    grid-template-rows: auto auto;
  }
  .activity-grid.collection-list .icon,
  .hunt-grid.collection-list .big {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    margin: 0;
    border-radius: 13px;
    background: rgba(255,255,255,.07);
    font-size: 1.18rem;
  }
  .activity-grid.collection-list .icon {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .activity-grid.collection-list .category {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    white-space: nowrap;
    font-size: .54rem;
    padding: .18rem .32rem;
  }
  .activity-grid.collection-list h3 {
    grid-column: 2;
    grid-row: 1;
    font-size: .88rem;
    line-height: 1.05;
    margin: 0;
  }
  .activity-grid.collection-list p {
    grid-column: 2 / 4;
    grid-row: 2;
    -webkit-line-clamp: 2;
    margin: 0;
    font-size: .68rem;
    line-height: 1.15;
  }
  .activity-grid.collection-list .open {
    display: none;
  }
  .hunt-grid.collection-list h3 {
    font-size: .86rem;
    line-height: 1.05;
    margin: 0 0 .12rem;
  }
  .hunt-grid.collection-list p {
    -webkit-line-clamp: 2;
    margin: 0;
    font-size: .68rem;
    line-height: 1.15;
  }
  .hunt-grid.collection-list b {
    justify-self: end;
    align-self: start;
    padding: .18rem .34rem;
    border-radius: 999px;
    background: rgba(255,203,61,.12);
    color: var(--gold);
    font-size: .56rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
  }
  .passport-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    gap: .75rem;
    overflow: hidden;
    min-height: auto;
  }
  .passport-strip::before {
    content: "Goose Passport";
    grid-column: 1 / -1;
    color: var(--gold);
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
  }
  .passport-strip .passport-stat,
  .passport-strip .progress-wrap {
    flex: initial;
    width: auto;
    max-width: none;
    height: auto;
    min-height: 0;
    overflow: hidden;
    scroll-snap-align: none;
    display: grid;
    align-content: center;
  }
  .passport-strip .passport-stat {
    min-height: 112px;
    padding: .9rem;
    text-align: left;
  }
  .passport-strip .passport-stat b {
    font-size: clamp(1.85rem, 12vw, 3rem);
    line-height: 1;
  }
  .passport-strip .progress-wrap {
    grid-column: 1 / -1;
    min-height: 110px;
    gap: .7rem;
    padding: 1rem;
  }
  .passport-strip progress {
    height: 18px;
  }
  .filters { gap: .38rem; }
  .play-field, .reactor, .chorus-panel, .sort-panel, .treasure-panel, .stack-panel, .pond-panel, .cloud-panel, .nameplate-preview, .story-output, .bot-output, .maze-wrap { min-height: 0; max-width: 100%; border-radius: 18px; }
  .crumb-field, .bubble-field { height: auto; min-height: 0; }
  .hud { flex-wrap: wrap; justify-content: center; gap: .45rem; }
  .hud span { font-size: .8rem; padding: .3rem .45rem; }
  .game-overlay { padding: 1rem; text-align: center; font-size: 1.25rem; }
  .chorus-buttons, .sort-bins, .pond-choices, .cloud-grid, .signal-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glide-field { height: auto; min-height: 0; }
  .egg-lane { min-height: 128px; }
  .pond-path { grid-template-columns: repeat(3, 1fr); }
  .treasure-tile { min-height: 58px; }
  .maze-wrap { grid-template-columns: 1fr; padding: .8rem; }
  .maze-side { align-content: stretch; }
  .maze-badge, .maze-status { padding: .65rem; }
  .maze-status { min-height: auto; }
  .memory-grid { grid-template-columns: repeat(3, 1fr); align-content: stretch; }
  .memory-card { min-height: 0; }
  .flight-canvas, .draw-canvas { width: 100%; max-width: 100%; min-height: 0; border-radius: 18px; }
  .model-preview-head { display: grid; align-items: start; }
  .model-preview-head span { white-space: normal; }
  .kindness-preview, .joke-output, .story-paper { min-height: 0; }
  .sound-grid { grid-template-columns: 1fr; }
  .piano-stage { overflow-x: hidden; }
  .piano-keys {
    --white-key: calc((100% - (var(--piano-pad) * 2)) / var(--white-count, 15));
    width: 100%;
    min-width: 0;
    height: 132px;
  }
  .toast { border-radius: 18px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --shell: min(100% - 18px, 1160px);
    --mobile-header: 48px;
    --mobile-card-height: calc(var(--app-height, 100svh) - 54px);
  }
  html {
    scroll-padding-top: .2rem;
  }
  main > .section,
  .passport-strip,
  main > .site-footer {
    min-height: var(--app-height, 100svh);
    scroll-margin-top: .2rem;
  }
  main > .site-footer {
    min-height: calc(var(--app-height, 100svh) - 18px);
    padding: .72rem;
    gap: .45rem;
    border-radius: 18px;
  }
  main > .site-footer .footer-token {
    width: 42px;
    height: 42px;
    font-size: 1.08rem;
  }
  main > .site-footer p:first-of-type {
    font-size: clamp(.95rem, 3.6vw, 1.25rem);
  }
  main > .site-footer p:last-child {
    font-size: .72rem;
  }
  .section {
    gap: .34rem;
    padding: .38rem 0;
  }
  main > .section.section-hint-collapsed {
    --mobile-card-height: calc(var(--app-height, 100svh) - 34px);
    gap: .16rem;
    padding-top: .1rem;
  }
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand actions toggle";
    gap: .34rem;
    padding: .22rem 0;
  }
  .site-header::before {
    inset: .08rem -.34rem;
    border-radius: 16px;
  }
  .brand {
    gap: .36rem;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .brand strong {
    font-size: .82rem;
    letter-spacing: .06em;
  }
  .brand small,
  .passport-chip b,
  .passport-chip small {
    display: none;
  }
  .passport-chip,
  .icon-button,
  .nav-toggle {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: .28rem;
  }
  .passport-chip {
    justify-content: center;
    max-width: 44px;
  }
  .site-nav.open {
    position: absolute;
    top: calc(100% + .2rem);
    right: 0;
    left: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: .42rem;
  }
  .site-nav a {
    min-height: 44px;
    padding: .45rem .35rem;
    font-size: .76rem;
  }
  .section-heading::after {
    width: 36px;
  }
  .section-heading h2 {
    font-size: clamp(1.1rem, 5vw, 1.55rem);
    line-height: 1.02;
  }
  .section-heading .eyebrow,
  .section-heading p:not(.eyebrow) {
    font-size: .66rem;
  }
  .swipe-meter {
    min-height: 10px;
    margin: -.12rem 0;
  }
  .swipe-track {
    height: 4px;
  }
  .swipe-meter::after {
    font-size: .58rem;
  }
  .module-card {
    gap: .34rem;
    padding: .52rem;
    border-radius: 16px;
  }
  .module-title {
    gap: .38rem;
  }
  .module-title > span {
    width: 32px;
    height: 32px;
    font-size: 1.18rem;
    border-radius: 11px;
  }
  .module-title h3 {
    font-size: .92rem;
  }
  .module-title .eyebrow,
  .module-title b {
    font-size: .58rem;
  }
  .module-card > p:not(.result):not(.piano-loop-status):not(.piano-song-info) {
    display: none;
  }
  .module-card > .button,
  .module-card > .button-row .button {
    min-height: 28px;
    padding: .3rem .42rem;
    font-size: .66rem;
  }
  .hud span {
    font-size: .66rem;
    padding: .22rem .34rem;
  }
  .game-overlay {
    font-size: 1rem;
  }
  .activity-grid.collection-list,
  .hunt-grid.collection-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-columns: auto;
    gap: .38rem;
    padding-bottom: .32rem;
  }
  .activity-grid.collection-list .activity-card,
  .hunt-grid.collection-list .hunt-card {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 54px;
    gap: .42rem;
    padding: .42rem;
    border-radius: 14px;
  }
  .activity-grid.collection-list .icon,
  .hunt-grid.collection-list .big {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    border-radius: 11px;
  }
  .activity-grid.collection-list h3 {
    font-size: .74rem;
  }
  .activity-grid.collection-list p {
    -webkit-line-clamp: 1;
    font-size: .58rem;
  }
  .activity-grid.collection-list .category {
    font-size: .46rem;
    padding: .14rem .24rem;
  }
  .hunt-grid.collection-list h3 {
    font-size: .72rem;
  }
  .hunt-grid.collection-list p {
    -webkit-line-clamp: 1;
    font-size: .58rem;
  }
  .hunt-grid.collection-list b {
    font-size: .48rem;
    padding: .15rem .28rem;
  }
  .piano-card {
    gap: .26rem;
  }
  .piano-controls {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .22rem;
    margin: 0;
  }
  .piano-controls label span,
  .piano-loop-status,
  .piano-song-strip,
  .piano-card > .result {
    display: none;
  }
  .piano-controls select,
  .piano-controls input,
  .piano-learn select {
    min-height: 28px;
    padding: .28rem .34rem;
    font-size: .66rem;
  }
  .toggle-row {
    min-height: 28px;
    padding: .28rem .38rem;
  }
  .piano-loop {
    grid-template-columns: 1fr auto;
    padding: .28rem;
  }
  .piano-loop .button {
    min-height: 26px;
    padding: .26rem .28rem;
    font-size: .62rem;
  }
  .piano-stage {
    padding: .3rem;
    margin: 0;
  }
  .piano-keys {
    height: 94px;
  }
  .piano-learn {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: .28rem;
  }
  .piano-learn label {
    min-width: 0;
  }
  .piano-learn .button-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    gap: .22rem;
  }
}

@media (max-width: 420px) {
  .brand strong { letter-spacing: .06em; }
  .brand small { display: none; }
  .site-header { gap: .5rem; }
  .passport-chip, .icon-button, .nav-toggle { width: 44px; height: 44px; min-height: 44px; }
  .passport-chip { padding-inline: .65rem; max-width: none; }
  .passport-chip small { display: none; }
  .hero-stats div, .passport-stat { padding: .85rem; }
  .hero-stats strong, .passport-stat b { font-size: 1.75rem; }
  .module-card { padding: .72rem; }
  .module-title > span { width: 40px; height: 40px; font-size: 1.42rem; }
  .module-title h3 { font-size: 1.02rem; }
  .daily-board, .play-next-card, .comeback-card { padding: 1rem; border-radius: 18px; }
  .filters { grid-template-columns: none; }
  .chorus-buttons, .sort-bins, .pond-choices, .cloud-grid, .signal-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-card { min-height: 54px; }
  .model-stats { grid-template-columns: 1fr; }
  .chorus-pips span { width: 40px; height: 40px; }
  .treasure-grid { gap: .4rem; }
  .treasure-tile { min-height: 52px; font-size: 1.35rem; }
  .stack-lane { min-height: 76px; }
  .pond-path span { min-height: 40px; }
  .math-crumbs span { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
/* ---------- Game polish (loads last, so it wins over earlier parts) ---------- */

/* PC: the picked game sits in a comfortable centred card with roomy play areas, not a 1,100px-wide strip. */
@media (min-width: 701px) {
  .game-stage-grid > article { width: 100%; max-width: 900px; margin-inline: auto; }
  .game-stage-grid .play-field,
  .game-stage-grid .glide-field { min-height: 320px; }
  .game-stage-grid .reactor { min-height: 280px; }
}

/* Feather Flight's canvas keeps its 2:1 shape (it was stretched on phones). */
.flight-canvas,
.module-card > .flight-canvas { aspect-ratio: 640 / 320; height: auto !important; flex: 0 0 auto !important; cursor: pointer; }

/* Keyboard hints only on screens with a mouse. */
.keys-hint { margin: .15rem 0 .35rem; font-size: .8rem; font-weight: 700; color: var(--muted); opacity: .85; }
@media (hover: none), (pointer: coarse) { .keys-hint { display: none; } }
.key-pressed { transform: scale(.94); filter: brightness(1.25); }

/* Phones: messages show at the top so they never cover game buttons at the bottom. */
@media (max-width: 700px) {
  .toast { top: calc(env(safe-area-inset-top, 0px) + .75rem); bottom: auto; transform: translate(-50%, -160%); }
  .toast.show { transform: translate(-50%, 0); }
}
/* ---------- Arcade pages: the home (data-route="hub") vs one activity per page (data-route="<id>") ---------- */

/* Home: the picker, passport strip, quests, hunt and stickers. The old one-long-page sections are hidden. */
html[data-route="hub"] #top,
html[data-route="hub"] #arcade,
html[data-route="hub"] #activities,
html[data-route="hub"] #games,
html[data-route="hub"] #create,
html[data-route="hub"] #learn,
html[data-route="hub"] #silly,
html[data-route="hub"] #family,
html[data-route="hub"] [data-route-bar] { display: none !important; }

/* Activity pages: only the route bar, this activity and the footer. */
html:not([data-route="hub"]) main > section:not(.route-section),
html:not([data-route="hub"]) .passport-strip,
html:not([data-route="hub"]) .route-section > .section-heading,
html:not([data-route="hub"]) .route-section article[id]:not(.route-article) { display: none !important; }
html:not([data-route="hub"]) .route-section { padding-top: .5rem; }
html:not([data-route="hub"]) .route-section .module-grid { grid-template-columns: minmax(0, 1fr); }
html:not([data-route="hub"]) .route-article { width: 100%; max-width: 920px; margin-inline: auto; }
html:not([data-route="hub"]) .route-article.reveal { opacity: 1; transform: none; }

/* Home heading above the picker */
.picker-section { padding-top: clamp(1rem, 3vw, 2rem); }
.picker-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.picker-heading h1 { margin: .2rem 0 .4rem; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -.03em; }
.picker-heading h1 span { background: linear-gradient(90deg, #ffcb3d, #ff5dab); -webkit-background-clip: text; background-clip: text; color: transparent; }
.picker-heading .lede { margin: 0; max-width: 620px; color: var(--muted); }
.picker-heading-actions { display: flex; gap: .5rem; flex: none; }
.picker-filters { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; }
.picker-filters button {
  min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 850;
  color: var(--text); border: 1px solid var(--line); background: rgba(255, 255, 255, .05);
}
.picker-filters button[aria-pressed="true"] { color: #1b1003; border-color: transparent; background: linear-gradient(135deg, #ffcb3d, #ff9a3d); }
.picker-filters button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* The bar at the top of every activity page */
.route-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  width: min(920px, 100%); margin: 1rem auto .25rem; padding: .55rem .6rem;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .05);
}
.route-bar .button { min-height: 42px; }
.route-title { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.route-title > span { font-size: 1.6rem; }
.route-title small { display: block; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.route-title b { display: block; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-steps { display: flex; gap: .4rem; }

/* The Golden Crumb now hides on the quest board */
.quest-section { position: relative; }
.quest-token { position: absolute; right: 14px; bottom: 10px; }

@media (max-width: 700px) {
  .picker-heading { flex-direction: column; align-items: stretch; }
  .picker-heading-actions .button { flex: 1; }
  .picker-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .picker-filters::-webkit-scrollbar { display: none; }
  .picker-filters button { flex: none; }
  .route-bar { border-radius: 20px; padding: .45rem; margin-top: .6rem; }
  .route-bar .route-back { padding-inline: .8rem; }
  .route-title { display: none; }
  .route-steps .button span { display: none; }
}

/* The swipe meter (and its "hide intro" <> toggle) is a phone-layout control. Hidden whenever the arcade isn't in
   its phone layout: the opposite of isMobilePane() (max-width 640px, or a short landscape screen). */
@media (min-width: 641px) and (min-height: 521px), (min-width: 641px) and (orientation: portrait) {
  .swipe-meter { display: none !important; }
}
/* ---------- Arcade fun: shared game fx (js/087-game-fx.js) and a themed scene for every game ---------- */
/* Loads last. Scenes are drawn with gradients and small inline SVGs (data: URIs are allowed by the site's CSP). */

/* ===== FX layer: floating text, particles, rings, combo badge ===== */
.module-card { position: relative; }
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; border-radius: inherit; }
.fx-float {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-weight: 950; font-size: 1.25rem; color: #fff; letter-spacing: .02em;
  text-shadow: 0 2px 0 #b8741a, 0 4px 14px rgba(0,0,0,.45);
  animation: fx-float .9s cubic-bezier(.2, .9, .3, 1) forwards;
}
.fx-float.big { font-size: 1.9rem; color: #ffe27a; text-shadow: 0 3px 0 #b8541a, 0 0 22px rgba(255,190,70,.7); }
.fx-float.bad { color: #ff8fa3; text-shadow: 0 2px 0 #7a1030, 0 4px 14px rgba(0,0,0,.45); }
.fx-float.dim { font-size: .95rem; color: rgba(255,255,255,.85); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
@keyframes fx-float {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); }
  18% { opacity: 1; transform: translate(-50%, -70%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(1); }
}
.fx-piece {
  position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 3px;
  background: var(--c); box-shadow: 0 0 8px var(--c);
  animation: fx-piece .7s cubic-bezier(.15, .8, .3, 1) forwards;
}
.fx-piece.emoji { width: auto; height: auto; margin: -.6rem 0 0 -.6rem; background: none; box-shadow: none; font-size: 1.1rem; font-style: normal; }
@keyframes fx-piece {
  0% { transform: translate(0, 0) scale(1) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 24px)) scale(.3) rotate(220deg); opacity: 0; }
}
.fx-ring {
  position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 3px solid var(--c); animation: fx-ring .55s ease-out forwards;
}
@keyframes fx-ring { from { transform: scale(.4); opacity: .95; } to { transform: scale(5); opacity: 0; } }
.fx-combo {
  position: absolute; transform: translate(-50%, 0); padding: .3rem .8rem; border-radius: 999px;
  font-weight: 950; font-size: .95rem; letter-spacing: .08em; color: #1b1003; white-space: nowrap;
  background: linear-gradient(135deg, #ffe27a, #ff9a3d); box-shadow: 0 6px 18px rgba(255,150,40,.45);
  opacity: 0;
}
.fx-combo.show { animation: fx-combo 1.2s ease forwards; }
.fx-combo.hot { background: linear-gradient(135deg, #ffcb3d, #ff4f6d); color: #fff; box-shadow: 0 0 22px rgba(255,79,109,.7); }
@keyframes fx-combo {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, 0) scale(1.18); }
  30% { transform: translate(-50%, 0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -6px) scale(1); }
}
.fx-shake { animation: fx-shake .34s cubic-bezier(.36, .07, .19, .97); }
@keyframes fx-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.fx-flash-good { box-shadow: inset 0 0 0 3px rgba(255,226,122,.9), 0 0 40px rgba(255,190,70,.45) !important; transition: box-shadow .1s; }
.fx-flash-bad { box-shadow: inset 0 0 0 3px rgba(255,79,109,.9), 0 0 32px rgba(255,79,109,.35) !important; transition: box-shadow .1s; }
.fx-bump { display: inline-block; animation: fx-bump .3s ease; }
@keyframes fx-bump { 40% { transform: scale(1.45); color: #ffe27a; } }
.fx-hurry { color: #fff !important; background: rgba(255,79,109,.75) !important; border-color: #ff4f6d !important; animation: fx-hurry .5s ease-in-out infinite alternate; }
@keyframes fx-hurry { to { transform: scale(1.08); box-shadow: 0 0 16px rgba(255,79,109,.7); } }

/* ===== 3-2-1-GO ===== */
.fx-countdown { position: absolute; display: grid; place-items: center; background: rgba(8,6,24,.55); border-radius: 20px; backdrop-filter: blur(2px); }
.fx-countdown b {
  font-size: clamp(4rem, 14vw, 7rem); font-weight: 950; line-height: 1; color: #fff;
  text-shadow: 0 6px 0 #d9467f, 0 0 40px rgba(255,93,171,.8);
  animation: fx-count .43s cubic-bezier(.2, 1.4, .4, 1) both;
}
.fx-countdown b.go { color: #ffe27a; text-shadow: 0 6px 0 #b8541a, 0 0 50px rgba(255,190,70,.9); }
@keyframes fx-count { 0% { transform: scale(2.2); opacity: 0; } 60% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1); } }

/* ===== End-of-round card ===== */
.fx-result {
  position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 1rem;
  background: rgba(8,6,24,.62); backdrop-filter: blur(3px); border-radius: inherit;
  animation: fx-fade .25s ease both;
}
@keyframes fx-fade { from { opacity: 0; } }
.fx-result-card {
  width: min(360px, 100%); text-align: center; padding: 1.2rem 1.2rem 1rem; border-radius: 26px;
  background: linear-gradient(160deg, #2a1f5c, #1a1433 60%, #241638);
  border: 2px solid rgba(255,203,61,.55);
  box-shadow: 0 0 0 6px rgba(255,203,61,.08), 0 24px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
  animation: fx-card-in .45s cubic-bezier(.2, 1.3, .4, 1) both;
}
.fx-result.new-best .fx-result-card { border-color: #ffe27a; box-shadow: 0 0 0 6px rgba(255,226,122,.15), 0 0 60px rgba(255,190,70,.45), 0 24px 60px rgba(0,0,0,.55); }
@keyframes fx-card-in { from { transform: scale(.7) translateY(20px); opacity: 0; } }
.fx-result-kicker { margin: 0; font-size: .8rem; font-weight: 950; letter-spacing: .22em; color: #9aa4c7; }
.fx-result.new-best .fx-result-kicker { color: #ffe27a; font-size: 1rem; animation: fx-kicker .5s ease-in-out infinite alternate; }
@keyframes fx-kicker { to { transform: scale(1.08); text-shadow: 0 0 16px rgba(255,190,70,.9); } }
.fx-stars { display: flex; justify-content: center; gap: .4rem; margin: .5rem 0 .2rem; }
.fx-stars span { font-size: 2.6rem; line-height: 1; color: rgba(255,255,255,.14); text-shadow: none; }
.fx-stars span.on { color: #ffcb3d; text-shadow: 0 0 18px rgba(255,190,70,.8), 0 3px 0 #b8741a; animation: fx-star .45s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--star-delay, 0ms) + var(--i) * 260ms); }
.fx-stars span:nth-child(2) { font-size: 3.2rem; transform: translateY(-6px); }
.fx-stars span:nth-child(2).on { animation-name: fx-star-mid; }
@keyframes fx-star { 0% { transform: scale(0) rotate(-90deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes fx-star-mid { 0% { transform: translateY(-6px) scale(0) rotate(-90deg); opacity: 0; } 100% { transform: translateY(-6px) scale(1) rotate(0); opacity: 1; } }
.fx-result-score { display: flex; align-items: baseline; justify-content: center; gap: .35rem; margin: .1rem 0 0; color: #fff; }
.fx-result-score b { font-size: 3.4rem; line-height: 1; font-weight: 950; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.fx-result-score small { font-size: 1.2rem; color: #9aa4c7; font-weight: 900; }
.fx-result-score em { font-style: normal; font-weight: 850; color: #c9cff0; }
.fx-result-line { margin: .5rem 0 0; font-weight: 850; color: #ffe27a; }
.fx-result-best { margin: .25rem 0 .9rem; color: #9aa4c7; font-size: .9rem; }
.fx-result-actions { display: flex; gap: .5rem; justify-content: center; }
.fx-result-actions .button { min-height: 46px; }
.fx-result-actions .button.primary { animation: fx-breathe 1.4s ease-in-out infinite; }
@keyframes fx-breathe { 50% { box-shadow: 0 0 0 4px rgba(255,203,61,.35), 0 0 26px rgba(255,150,120,.65); filter: brightness(1.08); } }

/* ===== Arcade cabinet feel on every game page ===== */
html:not([data-route="hub"]) .route-article.module-card {
  border: 2px solid rgba(255,203,61,.28);
  box-shadow: 0 0 0 1px rgba(255,93,171,.18), 0 0 40px rgba(123,77,255,.18), 0 28px 60px rgba(0,0,0,.4);
  background: linear-gradient(180deg, rgba(40,28,82,.55), rgba(14,18,34,.9) 180px), var(--card);
}
html:not([data-route="hub"]) .route-article > .module-title h3 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); letter-spacing: -.01em; }
html:not([data-route="hub"]) .route-article > .module-title > span { box-shadow: 0 0 22px rgba(255,190,70,.35); }
.module-card:not(.fx-playing) > .button.primary[data-start-crumb],
.module-card:not(.fx-playing) > .button.primary[data-start-bubble],
.module-card:not(.fx-playing) > .button.primary[data-start-glide],
.module-card:not(.fx-playing) > .button.primary[data-start-chorus],
.module-card:not(.fx-playing) > .button.primary[data-start-sort],
.module-card:not(.fx-playing) > .button.primary[data-start-treasure],
.module-card:not(.fx-playing) > .button.primary[data-start-pond],
.module-card:not(.fx-playing) > .button.primary[data-start-cloud],
.module-card:not(.fx-playing) > .button.primary[data-start-signal],
.module-card:not(.fx-playing) > .button.primary[data-start-comet],
.module-card:not(.fx-playing) > .button.primary[data-start-egg],
.module-card:not(.fx-playing) .button-row > .button.primary { animation: fx-breathe 1.8s ease-in-out infinite; }
.game-overlay {
  font-size: clamp(1.3rem, 4vw, 2rem); letter-spacing: .06em; text-transform: uppercase;
  color: #ffe27a; text-shadow: 0 3px 0 #b8541a, 0 0 24px rgba(255,190,70,.6);
  background: radial-gradient(circle, rgba(20,10,50,.55), rgba(8,6,24,.8));
}
.game-overlay:not(.hidden) { animation: fx-blink 1.1s steps(2, jump-none) infinite; }
@keyframes fx-blink { 50% { color: #fff; } }
.hud span { background: rgba(10,8,30,.72); border-color: rgba(255,255,255,.2); backdrop-filter: blur(3px); font-size: .92rem; }
.hud b { display: inline-block; min-width: 1.4ch; color: #ffe27a; }

/* Readable result lines on the colourful scenes. */
.chorus-panel .result, .sort-panel .result, .treasure-panel .result, .stack-panel .result, .pond-panel .result,
.cloud-panel .result, .signal-panel .result, .comet-panel .result, .egg-panel .result, .groove-panel .result {
  justify-self: center; margin: 0; padding: .35rem .85rem; border-radius: 999px; text-align: center;
  background: rgba(10,8,30,.7); color: #fff; font-weight: 850;
}
.chorus-panel .result:empty, .sort-panel .result:empty { display: none; }

/* ===== Crumb Catch: a sunny picnic meadow ===== */
#crumb-catch .crumb-field {
  background:
    radial-gradient(circle at 84% 18%, #fff7c2 0 26px, rgba(255,230,120,.6) 27px 40px, transparent 70px),
    radial-gradient(ellipse 80px 22px at 22% 20%, rgba(255,255,255,.95) 60%, transparent 62%),
    radial-gradient(ellipse 60px 18px at 30% 15%, rgba(255,255,255,.9) 60%, transparent 62%),
    radial-gradient(ellipse 90px 24px at 60% 30%, rgba(255,255,255,.75) 60%, transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70 Q120 20 260 60 T520 50 T800 55 V120 H0Z' fill='%2366c95a'/%3E%3Cpath d='M0 95 Q160 60 330 90 T640 80 T800 88 V120 H0Z' fill='%234aa845'/%3E%3C/svg%3E") bottom / 100% 45% no-repeat,
    linear-gradient(180deg, #58c6ff 0%, #a4e4ff 58%, #d7f5ff 100%);
  border-color: rgba(255,255,255,.35);
}
.moving-target {
  width: 64px; height: 64px; font-size: 2rem; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff5c4, #ffcb3d 45%, #e8921f);
  box-shadow: 0 0 0 4px rgba(255,255,255,.55), 0 0 26px rgba(255,203,61,.8), 0 10px 18px rgba(0,0,0,.25);
  transition: left .18s ease, top .18s ease;
  animation: fx-wobble 1s ease-in-out infinite;
}
.moving-target.spawn { animation: fx-spawn .28s cubic-bezier(.2, 1.6, .4, 1), fx-wobble 1s ease-in-out .28s infinite; }
.moving-target.golden { background: radial-gradient(circle at 35% 30%, #fff, #ffe27a 40%, #ff9a3d); box-shadow: 0 0 0 4px #fff, 0 0 40px 8px rgba(255,226,122,.95); }
@keyframes fx-wobble { 0%, 100% { transform: translate(-50%, -50%) rotate(-8deg); } 50% { transform: translate(-50%, -56%) rotate(8deg); } }
@keyframes fx-spawn { from { transform: translate(-50%, -50%) scale(0); } to { transform: translate(-50%, -50%) scale(1); } }

/* ===== Bubble Pop: underwater with light rays and rising fizz ===== */
#bubble-pop .bubble-field {
  background:
    repeating-linear-gradient(100deg, rgba(255,255,255,.07) 0 26px, transparent 26px 90px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 120' preserveAspectRatio='none'%3E%3Cpath d='M40 120 C30 80 60 60 45 20 M70 120 C80 90 55 60 75 30 M690 120 C700 70 670 60 690 10 M720 120 C715 90 740 70 725 40' stroke='%2333c28a' stroke-width='10' fill='none' stroke-linecap='round'/%3E%3Cpath d='M0 105 Q200 90 400 104 T800 100 V120 H0Z' fill='%23e8c98a'/%3E%3C/svg%3E") bottom / 100% 40% no-repeat,
    linear-gradient(180deg, #1a8fd8 0%, #0b5aa8 55%, #073a78 100%);
  border-color: rgba(142,234,255,.45);
}
#bubble-pop .bubble-field::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.55) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(255,255,255,.4) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(255,255,255,.35) 0 4px, transparent 5px);
  background-size: 120px 140px, 90px 110px, 170px 190px;
  background-position: 10px 0, 50px 30px, 90px 60px;
  animation: fx-fizz 6s linear infinite;
}
@keyframes fx-fizz { to { background-position: 10px -140px, 50px -80px, 90px -130px; } }
.bubble-target { width: 70px; height: 70px; cursor: pointer; font-size: 1.8rem; border: 2px solid rgba(255,255,255,.75); animation: fx-sway 1.6s ease-in-out infinite; }
.bubble-target.rainbow {
  background: radial-gradient(circle at 34% 28%, #fff, transparent 35%), conic-gradient(#ff5dab, #ffcb3d, #67f291, #8eeaff, #c79bff, #ff5dab);
  box-shadow: 0 0 30px rgba(255,255,255,.8);
}
@keyframes fx-sway { 0%, 100% { margin-left: -8px; } 50% { margin-left: 8px; } }

/* ===== Crumb Glide: a pond at dusk ===== */
#crumb-glide .glide-field {
  background:
    radial-gradient(circle at 18% 16%, #fff1c8 0 18px, transparent 60px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 2px, transparent 2px 22px) bottom / 100% 40% no-repeat,
    linear-gradient(180deg, #3a2a7a 0%, #b45bb0 42%, #ff9f7a 60%, #2b8fb3 61%, #1c6a8f 100%);
  border-color: rgba(255,190,150,.45);
}
#crumb-glide .glide-field::before { background: rgba(255,255,255,.35); height: 2px; }
.glide-goose { background: radial-gradient(circle, #6fe0a5, #2f9e6b 70%); border: 2px solid rgba(255,255,255,.6); box-shadow: 0 0 0 6px rgba(255,255,255,.12); }
.glide-goose { transition: left .06s linear; }
.glide-crumb { background: radial-gradient(circle at 35% 30%, #fff5c4, #ffcb3d 55%, #e8921f); border: 2px solid rgba(255,255,255,.6); animation: fx-spin 1.2s linear infinite; }
@keyframes fx-spin { from { rotate: 0deg; } to { rotate: 360deg; } }

/* ===== Signal Chorus + Signal Sprint: a neon arcade console with big 3D buttons ===== */
#color-chorus .chorus-panel, #signal-sprint .signal-panel {
  background:
    radial-gradient(circle at 50% -20%, rgba(199,155,255,.35), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, #1b1240, #0d0a24);
  border-color: rgba(199,155,255,.35);
}
.chorus-watch { background: rgba(0,0,0,.35); border-color: rgba(199,155,255,.45); color: #fff; text-shadow: 0 0 14px rgba(199,155,255,.8); letter-spacing: .04em; }
.chorus-pips span { transition: transform .15s ease; }
.chorus-pips span.current { transform: scale(1.18); box-shadow: 0 0 18px rgba(255,255,255,.6); }
.chorus-buttons button, .signal-buttons button {
  position: relative; min-height: 84px; border: 0; border-radius: 22px; color: #1a1030; font-weight: 950;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.6), transparent 55%), var(--b);
  box-shadow: 0 7px 0 rgba(0,0,0,.35), inset 0 -6px 0 rgba(0,0,0,.18), 0 0 0 rgba(255,255,255,0);
  transition: transform .08s ease, box-shadow .12s ease, filter .12s ease;
  filter: saturate(.85) brightness(.9);
}
.chorus-buttons button span, .signal-buttons button span { display: none; }
.chorus-buttons button:active, .signal-buttons button:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 -3px 0 rgba(0,0,0,.18); }
.chorus-buttons button.lit { filter: saturate(1.3) brightness(1.2); transform: translateY(3px) scale(1.04); box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 34px 6px var(--b); }
.chorus-showing .chorus-buttons button { pointer-events: none; }
.chorus-buttons button, .signal-buttons button { --b: #f4f1ff; }
.chorus-buttons [data-chorus-color="pink"], .signal-buttons [data-signal-choice="pink"] { --b: #ff5dab; }
.chorus-buttons [data-chorus-color="yellow"], .signal-buttons [data-signal-choice="yellow"] { --b: #ffcb3d; }
.chorus-buttons [data-chorus-color="blue"], .signal-buttons [data-signal-choice="blue"] { --b: #5ab8ff; }
.chorus-buttons [data-chorus-color="green"], .signal-buttons [data-signal-choice="green"] { --b: #67f291; }
.signal-buttons button:hover, .chorus-buttons button:hover { filter: saturate(1.1) brightness(1); }
.signal-target { min-height: 96px; background: rgba(0,0,0,.4) !important; border-width: 2px; box-shadow: 0 0 30px rgba(199,155,255,.2); }
.signal-target span { font-size: 2.8rem; }
.signal-target b { font-size: 1.6rem; color: #fff; text-shadow: 0 0 16px currentColor; }
.signal-target.flip-in { animation: fx-flip-in .22s ease both; }
@keyframes fx-flip-in { from { transform: rotateX(90deg) scale(.9); opacity: .2; } }

/* ===== Sticker Sort: colourful baskets ===== */
#sticker-sort .sort-panel {
  background:
    radial-gradient(circle at 20% 0%, rgba(255,93,171,.3), transparent 50%),
    radial-gradient(circle at 80% 0%, rgba(90,184,255,.3), transparent 50%),
    linear-gradient(180deg, #2a1650, #160e30);
}
.sort-current { min-height: 110px; background: rgba(255,255,255,.1); border: 2px dashed rgba(255,255,255,.35); }
.sort-current span { font-size: 3rem; animation: fx-drop-in .35s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes fx-drop-in { from { transform: translateY(-40px) scale(.5); opacity: 0; } }
.sort-bins button {
  min-height: 96px; border: 0; color: #1a1030; font-weight: 950;
  background: linear-gradient(180deg, color-mix(in srgb, var(--b) 85%, #fff), var(--b));
  box-shadow: 0 6px 0 rgba(0,0,0,.3), inset 0 -8px 0 rgba(0,0,0,.12);
  clip-path: polygon(0 12%, 100% 12%, 92% 100%, 8% 100%);
  border-radius: 10px; padding-top: 1.1rem;
  transition: transform .08s ease;
}
.sort-bins button:active { transform: translateY(4px); }
.sort-bins button { --b: #e9e4ff; }
.sort-bins [data-sort-bin="pink"] { --b: #ff7ac1; }
.sort-bins [data-sort-bin="yellow"] { --b: #ffcb3d; }
.sort-bins [data-sort-bin="green"] { --b: #67f291; }

/* ===== Treasure Tiles: sand mounds on a beach that flip open ===== */
#treasure-tiles .treasure-panel {
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.35), transparent 30%),
    linear-gradient(180deg, #f4d69a, #e3b86a);
  border-color: rgba(255,255,255,.4);
}
.treasure-tile {
  min-height: 76px; border: 0; border-radius: 16px; font-size: 2rem; color: #7a4b09;
  background: radial-gradient(ellipse at 50% 30%, #ffe9b8, #d9a55a 70%);
  box-shadow: 0 6px 0 #a8742f, inset 0 -6px 0 rgba(0,0,0,.08);
  transition: transform .1s ease;
}
.treasure-tile:not(:disabled):hover { transform: translateY(-3px); }
.treasure-tile.open { background: radial-gradient(ellipse at 50% 40%, #fff3d6, #e9c78b 75%); box-shadow: inset 0 4px 10px rgba(122,75,9,.3); color: rgba(122,75,9,.5); }
.treasure-tile.treasure { background: radial-gradient(circle at 50% 45%, #fffbe0, #ffd65a 55%, #e89b1f); box-shadow: 0 0 22px rgba(255,203,61,.9), inset 0 -4px 0 rgba(0,0,0,.1); color: #000; }
.treasure-tile.missed { opacity: .55; filter: grayscale(.4); box-shadow: inset 0 0 0 3px rgba(255,255,255,.7); }
.treasure-tile.just-flipped { animation: fx-flip .38s ease both; }
@keyframes fx-flip { 0% { transform: rotateY(90deg) scale(.9); } 70% { transform: rotateY(-10deg) scale(1.08); } 100% { transform: none; } }
#treasure-tiles .treasure-panel .result { background: rgba(80,45,5,.8); }

/* ===== Snack Stack: a picnic conveyor ===== */
#snack-stack .stack-panel {
  background:
    repeating-linear-gradient(45deg, rgba(255,90,90,.18) 0 20px, rgba(255,255,255,.1) 20px 40px),
    linear-gradient(180deg, #ffe7c2, #f5c48a);
  border-color: rgba(255,255,255,.4);
}
.stack-lane {
  min-height: 110px; background: repeating-linear-gradient(90deg, #3a3f55 0 18px, #2b2f42 18px 36px); border: 3px solid #1d2030;
  animation: fx-belt 1s linear infinite;
}
@keyframes fx-belt { to { background-position: 36px 0; } }
.stack-lane::before { background: rgba(103,242,145,.28); border-inline: 2px dashed rgba(103,242,145,.9); }
.stack-basket { font-size: 2.6rem; }
.stack-marker { font-size: 2.4rem; transition: top .3s cubic-bezier(.5, 0, 1, .6), opacity .3s; }
.stack-marker.drop-in { top: 55%; }
.stack-marker.drop-miss { top: 110%; opacity: 0; }
.stack-tower { min-height: 90px; padding: .4rem; border-radius: 14px; background: rgba(255,255,255,.35); }
.stack-tower span { font-size: 1.9rem; }
.stack-tower span.landed { animation: fx-land .35s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes fx-land { from { transform: translate(var(--stack-offset), -30px) scale(1.3); } to { transform: translateX(var(--stack-offset)); } }

/* ===== Pond Hop: lily pads on the water ===== */
#pond-hop .pond-panel {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,255,255,.18), transparent 40%),
    repeating-radial-gradient(circle at 70% 60%, rgba(255,255,255,.08) 0 3px, transparent 3px 26px),
    linear-gradient(180deg, #2fb6c9, #16788f);
  border-color: rgba(142,234,255,.45);
}
.pond-path span { border: 0; background: rgba(255,255,255,.15); font-size: 1.4rem; }
.pond-path span.safe { background: radial-gradient(circle, #8ef0a8, #2f9e6b); }
.pond-path span.splash { background: radial-gradient(circle, #cff6ff, #39a6d7); }
.pond-choices button {
  min-height: 92px; border: 0; border-radius: 50%; aspect-ratio: 1.6; color: #0f3d24; font-weight: 950; font-size: 1.05rem;
  background: radial-gradient(circle at 40% 35%, #b6ffc9, #3ec97a 60%, #238a52);
  clip-path: polygon(62% 50%, 100% 42%, 100% 0, 0 0, 0 100%, 100% 100%, 100% 58%);
  padding-right: 14%;
  box-shadow: 0 8px 0 rgba(0,0,0,.2);
  transition: transform .12s ease;
}
.pond-choices button:hover { transform: scale(1.05) rotate(-3deg); }
.pond-choices button.hop-safe { animation: fx-hop .5s ease; }
.pond-choices button.hop-splash { animation: fx-sink .6s ease; }
@keyframes fx-hop { 40% { transform: translateY(-14px) scale(1.08); } }
@keyframes fx-sink { 50% { transform: translateY(10px) scale(.85); filter: brightness(.6) hue-rotate(60deg); } }

/* ===== Cloud Scout: a bright sky with drifting clouds ===== */
#cloud-scout .cloud-panel {
  background:
    radial-gradient(ellipse 70px 22px at 12% 22%, rgba(255,255,255,.9) 60%, transparent 62%),
    radial-gradient(ellipse 90px 26px at 80% 14%, rgba(255,255,255,.85) 60%, transparent 62%),
    linear-gradient(180deg, #3aa8ff, #9fdcff);
  background-size: 200% 100%, 200% 100%, 100% 100%;
  animation: fx-drift 18s linear infinite;
  border-color: rgba(255,255,255,.5);
}
@keyframes fx-drift { to { background-position: -200% 0, 200% 0, 0 0; } }
.cloud-target { background: #f4faff; color: #1b3a66; font-size: 1.2rem; border: 0; box-shadow: 0 6px 18px rgba(0,40,90,.25); }
.cloud-grid button {
  min-height: 84px; border: 0; font-size: 2.3rem; border-radius: 40px;
  background: radial-gradient(circle at 30% 40%, #fff 40%, transparent 41%), radial-gradient(circle at 65% 35%, #fff 45%, transparent 46%), #f1f8ff;
  box-shadow: 0 8px 18px rgba(0,40,90,.25);
  transition: transform .12s ease;
}
.cloud-grid button:hover { transform: translateY(-4px); }
.cloud-grid button.reveal-answer { box-shadow: 0 0 0 4px #ffcb3d, 0 0 26px rgba(255,203,61,.9); }

/* ===== Comet Tap: deep space ===== */
#comet-tap .comet-panel {
  background:
    radial-gradient(1px 1px at 12% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent),
    radial-gradient(1px 1px at 75% 30%, #fff, transparent), radial-gradient(2px 2px at 88% 80%, #fff, transparent),
    radial-gradient(1px 1px at 55% 10%, #fff, transparent), radial-gradient(1.5px 1.5px at 25% 90%, #fff, transparent),
    radial-gradient(circle at 80% 20%, rgba(199,155,255,.35), transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(255,93,171,.25), transparent 45%),
    linear-gradient(180deg, #0b0725, #150a3a);
  border-color: rgba(199,155,255,.4);
}
.comet-cell { min-height: 70px; background: rgba(255,255,255,.04); border: 1px solid rgba(199,155,255,.18); color: rgba(255,255,255,.15); }
.comet-cell.target {
  font-size: 2.2rem; border-color: #ffe27a;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0 12%, rgba(255,203,61,.7) 30%, rgba(199,155,255,.25) 65%, transparent 72%);
  box-shadow: 0 0 30px rgba(255,226,122,.8), inset 0 0 20px rgba(255,255,255,.4);
  animation: fx-comet .6s ease-in-out infinite alternate;
}
@keyframes fx-comet { to { transform: scale(1.08); box-shadow: 0 0 44px rgba(255,226,122,1), inset 0 0 20px rgba(255,255,255,.5); } }

#comet-tap .comet-panel:has(> .hud), #egg-guard .egg-panel { padding-top: 3.2rem; }

/* ===== Honk Reactor: a glowing core that charges up ===== */
#honk-reactor .reactor {
  --charge: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(103,242,145, calc(.15 + var(--charge) * .45)), transparent 55%),
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.04) 0 10deg, transparent 10deg 20deg),
    linear-gradient(180deg, #0a1a2a, #06101c);
  border-color: rgba(103,242,145,.35);
}
.reactor-core {
  width: 190px; height: 190px; border: 10px solid rgba(142,234,255,.35);
  box-shadow: 0 0 calc(20px + var(--charge, 0) * 60px) rgba(103,242,145, calc(.3 + var(--charge, 0) * .6)), inset 0 0 30px rgba(0,0,0,.5);
}
.reactor-core::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 4px dashed rgba(142,234,255,.55); animation: fx-spin calc(6s - var(--charge, 0) * 5s) linear infinite;
}
.reactor.overdrive .reactor-core { animation: fx-hurry .18s ease-in-out infinite alternate; border-color: #ffcb3d; }
.reactor.overdrive .reactor-core i { background: linear-gradient(0deg, #ff9a3d, #ffe27a); }

/* ===== Honk Beat: a stage with a rhythm track ===== */
#honk-beat .groove-panel {
  background:
    radial-gradient(ellipse 30% 90% at 18% 0%, rgba(255,93,171,.35), transparent 70%),
    radial-gradient(ellipse 30% 90% at 82% 0%, rgba(90,184,255,.35), transparent 70%),
    radial-gradient(ellipse 60% 30% at 50% 100%, rgba(255,203,61,.18), transparent 70%),
    linear-gradient(180deg, #1a0f35, #0b0820);
  border: 1px solid rgba(255,93,171,.35); border-radius: 20px; overflow: hidden; margin: 1rem 0;
}
.groove-lane { min-height: 100px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, transparent 2px 10%), linear-gradient(90deg, #22164a, #2d1a5c, #22164a); border: 2px solid rgba(255,255,255,.18); }
.groove-zone { background: linear-gradient(90deg, rgba(255,93,171,.25), rgba(255,226,122,.55), rgba(255,93,171,.25)); box-shadow: 0 0 30px rgba(255,190,70,.4); transition: box-shadow .1s; }
.groove-zone.hit { box-shadow: 0 0 60px 10px rgba(255,226,122,.9); }
.groove-marker { width: 56px; height: 56px; background: radial-gradient(circle, #fff, #ffcb3d 60%); border: 3px solid #fff; box-shadow: 0 0 22px rgba(255,203,61,.8); font-size: 1.9rem; }

/* ===== Memory Match: two-sided cards that flip in 3D ===== */
.memory-grid { perspective: 900px; }
.memory-card { position: relative; min-height: 92px; padding: 0; border: 0; background: none; font-size: 2.2rem; }
.memory-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .35s ease; }
.memory-card.face-up .memory-inner { transform: rotateY(180deg); }
.memory-card.flipping .memory-inner { animation: fx-card-flip .35s ease both; }
@keyframes fx-card-flip { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
.memory-back, .memory-front { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.memory-back {
  font-size: 2.1rem; color: rgba(255,255,255,.9);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 8px, transparent 8px 16px), linear-gradient(135deg, #7b4dff, #d9467f);
  border: 3px solid rgba(255,255,255,.5); box-shadow: 0 6px 0 rgba(0,0,0,.3);
}
.memory-front { transform: rotateY(180deg); background: linear-gradient(145deg, #fffdf2, #ffe9b8); border: 3px solid #ffcb3d; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.memory-card.matched .memory-front { background: linear-gradient(145deg, #e6ffe9, #9ff0b5); border-color: #67f291; box-shadow: 0 0 18px rgba(103,242,145,.6); }
.memory-card:not(.face-up):hover .memory-inner { transform: translateY(-3px) rotateY(8deg); }

/* ===== Golden Egg Guard: a farm at sunset with a nest in each lane ===== */
#egg-guard .egg-panel {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 120' preserveAspectRatio='none'%3E%3Cpath d='M0 80 Q200 40 400 70 T800 60 V120 H0Z' fill='%23a3662b'/%3E%3Cpath d='M0 100 Q220 80 420 96 T800 92 V120 H0Z' fill='%23d9a14a'/%3E%3C/svg%3E") bottom / 100% 35% no-repeat,
    linear-gradient(180deg, #ff9a6b 0%, #ffcf7a 55%, #ffe3a3 100%);
  border-color: rgba(255,255,255,.4);
}
.egg-lane { min-height: 190px; overflow: hidden; background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.35); color: #3a2206; }
.egg-lane.goose { background: rgba(255,255,255,.32); border-color: #fff; }
.egg-lane.egg { border-color: #ffcb3d; box-shadow: 0 0 22px rgba(255,203,61,.7); }
.egg-lane.splash { border-color: #39a6d7; box-shadow: 0 0 22px rgba(57,166,215,.6); }
.egg-drop { font-size: 2.4rem; }
.egg-lane.egg .egg-drop, .egg-lane.splash .egg-drop { animation: fx-fall var(--fall, 900ms) cubic-bezier(.5, 0, 1, 1) forwards; }
@keyframes fx-fall { from { transform: translateY(-50px); } to { transform: translateY(70px); } }
.egg-goose { width: 62px; height: 62px; font-size: 2.2rem; background: radial-gradient(circle at 50% 65%, #b77a2c 0 45%, #8a5518 46% 60%, transparent 61%); border: 0; }
.egg-goose:empty { background: radial-gradient(circle at 50% 65%, rgba(183,122,44,.45) 0 45%, rgba(138,85,24,.45) 46% 60%, transparent 61%); }
.egg-lane.goose .egg-goose { animation: fx-hop .3s ease; }

/* ===== Phones ===== */
@media (max-width: 700px) {
  .fx-float { font-size: 1.05rem; }
  .fx-float.big { font-size: 1.45rem; }
  .fx-result-score b { font-size: 2.8rem; }
  .chorus-buttons button, .signal-buttons button { min-height: 64px; border-radius: 16px; }
  .sort-bins button { min-height: 78px; }
  .pond-choices button { min-height: 74px; }
  .cloud-grid button { min-height: 66px; font-size: 1.9rem; }
  .egg-lane { min-height: 150px; }
  .memory-card { min-height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .moving-target, .bubble-target, .glide-crumb, .stack-lane, .comet-cell.target, .reactor-core::before,
  #bubble-pop .bubble-field::before, #cloud-scout .cloud-panel, .game-overlay:not(.hidden),
  .module-card .button.primary, .fx-result-actions .button.primary { animation: none !important; }
  .fx-float { animation: fx-fade-away .9s ease forwards; }
  .fx-countdown b { animation: none; }
  @keyframes fx-fade-away { 0%, 60% { opacity: 1; transform: translate(-50%, -60%); } 100% { opacity: 0; transform: translate(-50%, -60%); } }
}

/* ===== The cartridge wheel (arcade home): stars, sweeping spotlights, a neon floor, and spin effects ===== */
.picker-track.spinning .picker-card { transition: none; }
/* While the wheel moves, cartridges lean into the turn and blur with speed (set by spinPickerTo). */
.picker-track.spinning .cart { transform: rotateY(var(--spin-lean, 0deg)); }
.picker-track.spinning .cart-face svg { filter: blur(var(--spin-blur, 0px)) brightness(.88) drop-shadow(0 18px 22px rgba(0, 0, 0, .55)); transition: none; }
.picker-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1px 1px at 8% 14%, #fff, transparent), radial-gradient(1.5px 1.5px at 22% 38%, #fff, transparent),
    radial-gradient(1px 1px at 36% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 64% 22%, #fff, transparent),
    radial-gradient(1px 1px at 78% 10%, #fff, transparent), radial-gradient(2px 2px at 91% 30%, #fff, transparent),
    radial-gradient(1px 1px at 52% 42%, #fff, transparent), radial-gradient(1.5px 1.5px at 12% 56%, #fff, transparent);
  animation: fx-twinkle 3s ease-in-out infinite alternate;
}
@keyframes fx-twinkle { from { opacity: .45; } to { opacity: 1; } }
.picker-stage::after {
  content: ""; position: absolute; inset: -20% -10% 0; pointer-events: none; mix-blend-mode: screen;
  background:
    conic-gradient(from 168deg at 20% 0%, transparent 0 5deg, rgba(255,93,171,.2) 11deg 15deg, transparent 21deg),
    conic-gradient(from 170deg at 80% 0%, transparent 0 5deg, rgba(90,184,255,.2) 11deg 15deg, transparent 21deg);
  transform-origin: 50% 0;
  animation: fx-spotlights 7s ease-in-out infinite alternate;
}
@keyframes fx-spotlights { from { transform: skewX(-8deg); } to { transform: skewX(8deg); } }
.picker-stage.is-spinning::after { animation-duration: .6s; }
.picker-floor {
  background:
    repeating-linear-gradient(90deg, rgba(255,93,171,.35) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(0deg, rgba(255,93,171,.3) 0 1px, transparent 1px 16px),
    radial-gradient(ellipse at center, rgba(255,170,61,.28), rgba(26,21,48,.9) 60%, transparent 72%);
  -webkit-mask: radial-gradient(ellipse at center, #000 45%, transparent 72%);
  mask: radial-gradient(ellipse at center, #000 45%, transparent 72%);
}
.picker-floor::after { animation: fx-floor-glow 2.4s ease-in-out infinite alternate; }
@keyframes fx-floor-glow { to { box-shadow: 0 0 50px rgba(255,170,61,.8); border-color: #ffe27a; } }
.picker-stage.is-spinning .picker-floor::after { animation-duration: .25s; }
.picker-stage.is-spinning .cart-face svg { filter: brightness(.9) saturate(1.1) drop-shadow(0 18px 22px rgba(0,0,0,.55)); }
.picker-spin { font-weight: 950; }
.picker-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) {
  .picker-stage::before, .picker-stage::after, .picker-floor::after { animation: none; }
}

/* Pond Hop keeps Left / Middle / Right in one row on every screen. */
#pond-hop .pond-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) {
  .pond-choices button { min-height: 70px; aspect-ratio: 1.3; font-size: .9rem; padding-right: 0; clip-path: none; }
}

/* ===== Your goose: hat and glow (js/088-goose-shop.js sets --goose-hat and --goose-glow on <html>) ===== */
:root { --goose-hat: ""; --goose-glow: #ffffff; }
.player-goose::after {
  content: var(--goose-hat); position: absolute; left: 50%; top: 0; pointer-events: none;
  transform: translate(-45%, -58%) rotate(-10deg); font-size: .66em; line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}
.egg-goose .player-goose, .maze-goose.player-goose, .shop-goose .player-goose { position: relative; display: inline-block; }
.maze-goose.player-goose::after { transform: translate(-55%, -62%) rotate(10deg) scaleX(-1); }
.glide-goose.player-goose, .groove-marker.player-goose { box-shadow: 0 0 0 4px var(--goose-glow), 0 0 22px var(--goose-glow); }
.egg-goose .player-goose { filter: drop-shadow(0 0 6px var(--goose-glow)); }
.maze-goose.player-goose { filter: drop-shadow(0 0 2px var(--goose-glow)); }
.passport-chip { position: relative; }
.chip-hat { position: absolute; left: .55rem; top: -.35rem; font-size: .8rem; font-style: normal; transform: rotate(-10deg); pointer-events: none; }

/* ===== Goose Shop (in the Passport) ===== */
.passport-intro { margin: -.2rem 0 .6rem; color: var(--muted); }
.goose-shop { margin: 1rem 0; padding: 1rem; border-radius: 22px; scroll-margin-top: 1rem;
  border: 1px solid rgba(255,203,61,.35); background: linear-gradient(160deg, rgba(255,203,61,.1), rgba(255,93,171,.07)), rgba(0,0,0,.15); }
.shop-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; margin-bottom: .9rem; }
.shop-head h3 { margin: .1rem 0 .25rem; }
.shop-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .9rem; }
.shop-goose { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 22px; font-size: 2.6rem;
  background: radial-gradient(circle, rgba(255,255,255,.15), transparent 70%); box-shadow: 0 0 0 3px var(--goose-glow), 0 0 26px var(--goose-glow); }
.shop-wallet { text-align: right; }
.shop-wallet b { display: block; font-size: 1.5rem; color: var(--gold); }
.shop-wallet small { color: var(--muted); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.shop-item {
  display: grid; justify-items: center; gap: .15rem; padding: .7rem .5rem; border-radius: 18px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); font: inherit; text-align: center;
  transition: transform .12s ease, border-color .12s ease;
}
.shop-item:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(255,203,61,.6); }
.shop-icon { font-size: 2rem; line-height: 1.1; }
.shop-item b { font-size: .9rem; }
.shop-item small { color: var(--muted); font-size: .72rem; }
.shop-action { margin-top: .25rem; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 900; color: #1b1003; background: linear-gradient(135deg, #ffe27a, #ff9a3d); }
.shop-item.owned .shop-action { background: rgba(255,255,255,.14); color: var(--text); }
.shop-item.wearing { border-color: #67f291; box-shadow: 0 0 0 2px rgba(103,242,145,.5), 0 0 18px rgba(103,242,145,.3); }
.shop-item.wearing .shop-action { background: #67f291; color: #052314; }
.shop-item.short .shop-action { background: rgba(255,255,255,.1); color: var(--muted); }
.shop-item.locked { opacity: .5; cursor: not-allowed; }
.shop-item.locked .shop-icon { filter: grayscale(1); }
.shop-item.locked .shop-action { background: rgba(255,255,255,.08); color: var(--muted); }
.shop-note { margin: .7rem 0 0; font-weight: 800; color: var(--gold); }
.passport-shop-link { font: inherit; color: inherit; text-align: inherit; cursor: pointer; border: inherit; }
.passport-shop-link:hover { border-color: rgba(255,203,61,.6); }
@media (max-width: 700px) {
  .shop-head { grid-template-columns: auto minmax(0, 1fr); }
  .shop-wallet { grid-column: 1 / -1; text-align: left; display: flex; gap: .5rem; align-items: baseline; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
