﻿:root {
  --ink: #1e2a4a;
  --sky-top: #4ec4f5;
  --sky-mid: #8fd9ff;
  --sky-low: #ffe8a3;
  --grass: #5fd08a;
  --grass-deep: #2fa85c;
  --sun: #ffd23f;
  --sun-edge: #ff9f1c;
  --coral: #ff6b5b;
  --coral-deep: #e84a3a;
    --bubblegum: #ff7eb3;
  --cream: #fff9ef;
  --white: #ffffff;
  --shadow: rgba(30, 42, 74, 0.18);
  --font-display: "Baloo 2", "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sky-mid);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

/* --- Sky playground stage --- */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 2.5rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 210, 63, 0.55) 0 8%, transparent 28%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, var(--sky-low) 68%, #b8f0c8 82%, var(--grass) 100%);
}

.stage::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 22%;
  background:
    radial-gradient(ellipse 70% 100% at 20% 100%, var(--grass-deep) 0 40%, transparent 41%),
    radial-gradient(ellipse 80% 120% at 70% 110%, #49c974 0 45%, transparent 46%),
    linear-gradient(180deg, transparent, var(--grass-deep));
  pointer-events: none;
}

/* Sticker-sheet classroom home */
.stage.home-learn {
  background:
    radial-gradient(circle at 10% 12%, rgba(93, 173, 226, 0.45) 0 14%, transparent 38%),
    radial-gradient(circle at 92% 8%, rgba(255, 210, 63, 0.55) 0 12%, transparent 36%),
    radial-gradient(circle at 88% 78%, rgba(126, 217, 87, 0.4) 0 16%, transparent 42%),
    radial-gradient(circle at 8% 82%, rgba(255, 126, 179, 0.4) 0 14%, transparent 40%),
    linear-gradient(165deg, #fff3a8 0%, #ffe29a 35%, #ffd1e8 70%, #c8f0ff 100%);
}
.stage.home-learn::before {
  display: none;
}
.stage.home-learn .sun { display: none; }

.sticker-blob {
  position: absolute;
  border-radius: 60% 40% 55% 45%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  filter: blur(2px);
}
.sticker-blob.b-pink {
  width: 14rem; height: 11rem; left: -4rem; top: -3rem;
  background: #ff7eb3;
}
.sticker-blob.b-blue {
  width: 16rem; height: 12rem; right: -5rem; top: 8%;
  background: #5dade2;
  border-radius: 45% 55% 40% 60%;
}
.sticker-blob.b-green {
  width: 13rem; height: 10rem; left: -3rem; bottom: 4%;
  background: #7ed957;
}
.sticker-blob.b-yellow {
  width: 15rem; height: 12rem; right: -4rem; bottom: -2rem;
  background: #ffd23f;
  border-radius: 50% 40% 60% 45%;
}

.sticker-sheet {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.sticker {
  position: absolute;
  filter: drop-shadow(0 0.35rem 0 rgba(30, 42, 74, 0.14));
  animation: sticker-bob 3.8s ease-in-out infinite;
}
.s-bus { width: clamp(6.5rem, 18vw, 9.5rem); top: 7%; left: 4%; transform: rotate(-8deg); }
.s-board { width: clamp(5rem, 14vw, 7rem); top: 6%; right: 5%; transform: rotate(7deg); animation-delay: -0.7s; }
.s-apple { width: clamp(3.2rem, 9vw, 4.5rem); top: 28%; left: 6%; transform: rotate(-12deg); animation-delay: -1.1s; }
.s-bag { width: clamp(3.6rem, 10vw, 5rem); top: 42%; left: 3%; transform: rotate(8deg); animation-delay: -1.6s; }
.s-globe { width: clamp(4rem, 11vw, 5.5rem); top: 24%; right: 4%; transform: rotate(-6deg); animation-delay: -0.4s; }
.s-books { width: clamp(4.2rem, 12vw, 5.8rem); top: 48%; right: 3%; transform: rotate(10deg); animation-delay: -1.3s; }
.s-pencil { width: clamp(2rem, 6vw, 2.8rem); height: auto; top: 18%; left: 22%; transform: rotate(-18deg); animation-delay: -2s; }
.s-palette { width: clamp(4rem, 11vw, 5.5rem); bottom: 18%; left: 8%; transform: rotate(-14deg); animation-delay: -0.9s; }
.s-scissors { width: clamp(3rem, 8vw, 4rem); bottom: 28%; right: 10%; transform: rotate(16deg); animation-delay: -1.8s; }
.s-clock { width: clamp(3.2rem, 9vw, 4.4rem); top: 58%; left: 18%; transform: rotate(6deg); animation-delay: -2.3s; }
.s-flask { width: clamp(2.6rem, 7vw, 3.5rem); bottom: 22%; right: 20%; transform: rotate(-8deg); animation-delay: -1.5s; }
.s-cap { width: clamp(3.8rem, 10vw, 5.2rem); top: 12%; left: 42%; transform: rotate(4deg); animation-delay: -0.2s; }

.confetti {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  pointer-events: none;
  animation: sticker-bob 3s ease-in-out infinite;
  text-shadow: 0 0.15rem 0 rgba(30, 42, 74, 0.1);
}
.confetti.heart { font-size: clamp(1rem, 3vw, 1.5rem); }
.confetti.star { font-size: clamp(1.1rem, 3.2vw, 1.7rem); }
.confetti.num {
  font-size: clamp(1.3rem, 4vw, 2rem);
  background: #fff;
  border: 0.18rem solid #1e2a4a;
  border-radius: 0.65rem;
  padding: 0.1rem 0.45rem;
  box-shadow: 0 0.22rem 0 rgba(30, 42, 74, 0.12);
}
.confetti.h1 { top: 20%; left: 32%; color: #e84a8a; }
.confetti.h2 { top: 36%; right: 24%; color: #ff6b5b; animation-delay: -1s; }
.confetti.h3 { bottom: 32%; left: 30%; color: #9b59b6; animation-delay: -1.7s; }
.confetti.st1 { top: 14%; right: 28%; color: #f1c40f; animation-delay: -0.5s; }
.confetti.st2 { bottom: 40%; right: 6%; color: #5dade2; animation-delay: -1.4s; }
.confetti.st3 { top: 40%; left: 14%; color: #2ecc71; animation-delay: -2.1s; }
.confetti.nu1 { top: 32%; left: 26%; color: #e74c3c; transform: rotate(-8deg); }
.confetti.nu2 { top: 50%; right: 22%; color: #3498db; transform: rotate(10deg); animation-delay: -0.8s; }
.confetti.nu3 { bottom: 26%; left: 24%; color: #27ae60; transform: rotate(-4deg); animation-delay: -1.5s; }
.confetti.nu4 { top: 22%; right: 18%; color: #e84a8a; transform: rotate(7deg); animation-delay: -2s; }

@keyframes sticker-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -0.45rem; }
}

.sun {
  position: absolute;
  top: 4%;
  right: 6%;
  width: clamp(4.5rem, 16vw, 7.5rem);
  height: clamp(4.5rem, 16vw, 7.5rem);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6b0, var(--sun) 45%, var(--sun-edge));
  box-shadow: 0 0 0 0.55rem rgba(255, 210, 63, 0.35);
  animation: sun-spin 28s linear infinite;
  pointer-events: none;
}

.sun::after {
  content: "";
  position: absolute;
  inset: -28%;
  background:
    conic-gradient(from 0deg, transparent 0 12deg, rgba(255, 210, 63, 0.45) 12deg 18deg, transparent 18deg 42deg);
  border-radius: 50%;
  z-index: -1;
}

.cloud {
  position: absolute;
  background: var(--white);
  border-radius: 999px;
  opacity: 0.92;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud-a {
  width: 5.5rem;
  height: 1.7rem;
  top: 12%;
  left: 6%;
}
.cloud-a::before { width: 2.4rem; height: 2.4rem; left: 0.6rem; top: -1.2rem; }
.cloud-a::after { width: 3rem; height: 3rem; left: 2.2rem; top: -1.6rem; }
.cloud-b {
  width: 4.2rem;
  height: 1.35rem;
  top: 18%;
  left: 58%;
  animation-duration: 22s;
  animation-delay: -4s;
}
.cloud-b::before { width: 1.8rem; height: 1.8rem; left: 0.4rem; top: -0.9rem; }
.cloud-b::after { width: 2.3rem; height: 2.3rem; left: 1.6rem; top: -1.2rem; }

.floaty {
  position: absolute;
  pointer-events: none;
  animation: bob 3.6s ease-in-out infinite;
}
.floaty.balloon {
  width: 2.4rem;
  height: 3rem;
  border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
  top: 28%;
  left: 8%;
  background: var(--bubblegum);
  box-shadow: inset -0.35rem -0.2rem 0 rgba(0, 0, 0, 0.08);
}
.floaty.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 2.2rem;
  background: rgba(30, 42, 74, 0.35);
  transform: translateX(-50%);
}
.floaty.balloon.blue {
  background: #5dade2;
  left: auto;
  right: 10%;
  top: 34%;
  animation-delay: -1.2s;
}
.floaty.star {
  width: 1.6rem;
  height: 1.6rem;
  background: var(--sun);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  top: 42%;
  right: 18%;
  animation-delay: -0.6s;
}

.panel {
  position: relative;
  z-index: 2;
  width: min(36rem, 100%);
  text-align: center;
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 14vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--white);
  text-shadow:
    0 4px 0 #2b6cb0,
    0 8px 0 rgba(30, 42, 74, 0.15);
  animation: brand-pop 1s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
.home-learn .brand {
  color: #fff;
  text-shadow:
    0 3px 0 #e74c3c,
    0 6px 0 rgba(30, 42, 74, 0.18),
    0 0 1rem rgba(255, 255, 255, 0.65);
}
.brand span { color: #ffe566; }
.home-learn .brand span { color: #f1c40f; }

.tagline {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 4.5vw, 1.9rem);
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
}

.hint {
  margin: 0.55rem auto 0;
  max-width: 22rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: rgba(30, 42, 74, 0.78);
}

.ages {
  margin-top: 1.75rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.age-btn {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  width: min(22rem, 100%);
  padding: 1.1rem 1.25rem 1.25rem;
  border: 0.28rem solid #fff;
  border-radius: 1.6rem;
  text-decoration: none;
  background: linear-gradient(145deg, #ff8a70 0%, var(--coral) 45%, var(--coral-deep) 100%);
  color: var(--white);
  box-shadow:
    0 0.55rem 0 #c73b2d,
    0 1.1rem 1.5rem var(--shadow);
  transform: translateY(0) rotate(-1.5deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  animation: wiggle-in 0.9s 0.15s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.age-btn:hover,
.age-btn:focus-visible {
  transform: translateY(-0.2rem) rotate(0deg) scale(1.03);
  filter: brightness(1.05);
  outline: none;
}
.age-btn:active {
  transform: translateY(0.35rem) rotate(-1deg);
  box-shadow:
    0 0.15rem 0 #c73b2d,
    0 0.4rem 0.8rem var(--shadow);
}

.age-nums {
  display: flex;
  gap: 0.35rem;
}
.age-nums b {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 1rem;
  background: var(--white);
  color: var(--coral-deep);
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0.25rem 0 rgba(0, 0, 0, 0.12);
}

.age-copy {
  text-align: left;
}
.age-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
}
.age-copy span {
  display: block;
  margin-top: 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.95;
}

.more-soon {
  margin-top: 1.1rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: rgba(30, 42, 74, 0.55);
  animation: rise 1s 0.35s both;
}

.buddy {
  position: absolute;
  z-index: 1;
  bottom: 6%;
  width: clamp(5.5rem, 22vw, 8.5rem);
  pointer-events: none;
  animation: bob 2.8s ease-in-out infinite;
}
.buddy-left { left: 2%; animation-delay: -0.8s; }
.buddy-right { right: 2%; animation-delay: -1.6s; }
/* AZ Hero owns the home spotlight — tuck the side buddies away */
.home-learn .buddy { display: none; }

/* --- Age page --- */
.age-stage {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 126, 179, 0.45) 0 10%, transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255, 210, 63, 0.5) 0 12%, transparent 30%),
    linear-gradient(165deg, #9be7ff 0%, #c5f5d4 38%, #ffe29a 72%, #ffb4a2 100%);
}

.topbar {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
}

/* Persistent points — jazzy top-right badge with twinkly lights */
.az-score {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.7rem, env(safe-area-inset-right));
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem 0.5rem 0.55rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.95), transparent 42%),
    linear-gradient(135deg, #ffe566 0%, #ffb347 42%, #ff7eb3 100%);
  border: 0.22rem solid #fff;
  box-shadow:
    0 0 0 0.18rem rgba(255, 210, 63, 0.55),
    0 0.4rem 0 rgba(30, 42, 74, 0.16),
    0 0 1.1rem rgba(255, 126, 179, 0.45);
  font-family: var(--font-display);
  color: var(--ink);
  pointer-events: none;
  transform-origin: 90% 20%;
  overflow: visible;
}
.az-score-twinkles {
  position: absolute;
  inset: -0.55rem -0.65rem;
  pointer-events: none;
}
.az-score-twinkles .t {
  position: absolute;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0.35rem 0.12rem currentColor;
  animation: az-twinkle 1.6s ease-in-out infinite;
}
.az-score-twinkles .t::after {
  content: "✦";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.55rem;
  line-height: 1;
  color: inherit;
  text-shadow: 0 0 0.35rem currentColor;
}
.az-score-twinkles .t1  { left: 8%;  top: -2%;  color: #ffd23f; animation-delay: 0s; }
.az-score-twinkles .t2  { left: 28%; top: -18%; color: #fff;    animation-delay: -0.2s; }
.az-score-twinkles .t3  { left: 52%; top: -14%; color: #ff7eb3; animation-delay: -0.45s; }
.az-score-twinkles .t4  { left: 78%; top: -6%;  color: #5dade2; animation-delay: -0.7s; }
.az-score-twinkles .t5  { right: -4%; top: 22%; color: #7ed957; animation-delay: -0.15s; }
.az-score-twinkles .t6  { right: -10%; top: 55%; color: #ffd23f; animation-delay: -0.9s; }
.az-score-twinkles .t7  { right: 6%; bottom: -12%; color: #ff7eb3; animation-delay: -0.35s; }
.az-score-twinkles .t8  { left: 62%; bottom: -18%; color: #fff; animation-delay: -1.1s; }
.az-score-twinkles .t9  { left: 30%; bottom: -10%; color: #5dade2; animation-delay: -0.55s; }
.az-score-twinkles .t10 { left: -6%; bottom: 18%; color: #ff9f1c; animation-delay: -0.8s; }
.az-score-twinkles .t11 { left: -12%; top: 42%; color: #ff7eb3; animation-delay: -1.25s; }
.az-score-twinkles .t12 { left: 4%;  top: 8%;  color: #fff; animation-delay: -1.4s; }

.az-score-star {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff7b0, #ffd23f);
  border: 0.14rem solid #fff;
  box-shadow: 0 0.18rem 0 rgba(30, 42, 74, 0.12);
  color: #e67e22;
  font-size: 1.05rem;
  line-height: 1;
  animation: az-score-star-spin 4.5s linear infinite;
}
.az-score-copy {
  display: grid;
  gap: 0.05rem;
  min-width: 2.6rem;
}
.az-score-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(30, 42, 74, 0.7);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
.az-score-value {
  font-size: clamp(1.35rem, 4.2vw, 1.8rem);
  font-weight: 800;
  line-height: 0.95;
  color: #1e2a4a;
  min-width: 1.5ch;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0.55rem rgba(255, 255, 255, 0.45);
}
.az-score-delta {
  position: absolute;
  left: 50%;
  top: -0.15rem;
  translate: -50% -100%;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #5fd08a;
  border: 0.14rem solid #fff;
  box-shadow: 0 0.2rem 0 rgba(30, 42, 74, 0.12);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  opacity: 0;
}
.az-score-delta.show {
  animation: az-score-delta 1.05s ease forwards;
}
.az-score.is-pop {
  animation: az-score-pop 0.5s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.az-score.is-pop .az-score-twinkles .t {
  animation-duration: 0.55s;
}
.az-score.is-pop .az-score-star {
  animation: az-score-star-burst 0.55s cubic-bezier(0.34, 1.55, 0.64, 1);
}
@keyframes az-score-pop {
  0% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.16) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes az-score-delta {
  0% { opacity: 0; transform: translateY(0.35rem) scale(0.7); }
  18% { opacity: 1; transform: translateY(0) scale(1.12); }
  70% { opacity: 1; transform: translateY(-0.35rem) scale(1); }
  100% { opacity: 0; transform: translateY(-0.85rem) scale(0.9); }
}
@keyframes az-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.55); }
  40% { opacity: 1; transform: scale(1.25); }
  70% { opacity: 0.7; transform: scale(0.9); }
}
@keyframes az-score-star-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes az-score-star-burst {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.35) rotate(25deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 0.18rem solid #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 0.35rem 0 rgba(30, 42, 74, 0.12);
  transition: transform 0.12s ease;
}
.back:hover,
.back:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.age-hero {
  position: relative;
  z-index: 2;
  width: min(42rem, 100%);
  text-align: center;
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.badge-row {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}
.badge-row b {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1.1rem;
  background: var(--white);
  color: #ff5a7a;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 0.35rem 0 rgba(30, 42, 74, 0.1);
  animation: brand-pop 0.8s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.badge-row b:nth-child(2) {
  color: #2f9e6b;
  animation-delay: 0.08s;
}

.age-hero .brand {
  font-size: clamp(2.6rem, 10vw, 4.2rem);
  color: #fff;
  text-shadow:
    0 4px 0 #e85d75,
    0 8px 0 rgba(30, 42, 74, 0.12);
}

.age-hero .tagline {
  color: #5a2a3a;
}

.play-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.35rem, 1.4vw, 0.75rem);
  width: min(46rem, 100%);
  max-width: 100%;
  margin-inline: auto;
}

.play-slot {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: clamp(0.35rem, 1.2vw, 0.7rem);
  border: 0.22rem solid rgba(255, 255, 255, 0.95);
  border-radius: clamp(0.9rem, 2.5vw, 1.35rem);
  background: rgba(255, 255, 255, 0.45);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.72rem, 2.1vw, 1.05rem);
  line-height: 1.15;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0.4rem 0 rgba(30, 42, 74, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  animation: rise 0.9s both;
}
a.play-slot:hover,
a.play-slot:focus-visible {
  transform: translateY(-3px) scale(1.03);
  outline: none;
}
a.play-slot:active {
  transform: translateY(2px);
  box-shadow: 0 0.15rem 0 rgba(30, 42, 74, 0.12);
}
.play-slot:nth-child(1) {
  background: rgba(255, 107, 91, 0.45);
  animation-delay: 0.1s;
}
.play-slot:nth-child(2) {
  background: rgba(95, 208, 138, 0.5);
  animation-delay: 0.18s;
}
.play-slot:nth-child(3) {
  background: rgba(93, 173, 226, 0.45);
  animation-delay: 0.26s;
}
.play-slot:nth-child(4) {
  background: rgba(255, 210, 63, 0.55);
  animation-delay: 0.34s;
}
.play-slot:nth-child(5) {
  background: rgba(255, 126, 179, 0.5);
  animation-delay: 0.42s;
}
.play-slot.is-soon {
  border-style: dashed;
  color: rgba(30, 42, 74, 0.55);
  box-shadow: none;
  pointer-events: none;
}

.shapes {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: end;
}
.shape {
  animation: bob 3s ease-in-out infinite;
}
.shape.circle {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #ff6b5b;
}
.shape.square {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.55rem;
  background: #5fd08a;
  animation-delay: -0.7s;
}
.shape.triangle {
  width: 0;
  height: 0;
  border-left: 1.7rem solid transparent;
  border-right: 1.7rem solid transparent;
  border-bottom: 3rem solid #5dade2;
  background: none;
  animation-delay: -1.4s;
}

.foot-note {
  margin-top: 1.25rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: rgba(90, 42, 58, 0.75);
}

@media (max-width: 720px) {
  .s-clock,
  .s-flask,
  .s-scissors,
  .confetti.nu3,
  .confetti.h3 { display: none; }
  .s-cap { left: 38%; top: 8%; }
}
@media (max-width: 520px) {
  .buddy { display: none; }
  .play-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
  }
  .play-slot {
    border-width: 0.16rem;
    border-radius: 0.75rem;
    box-shadow: 0 0.28rem 0 rgba(30, 42, 74, 0.12);
    font-size: clamp(0.62rem, 2.8vw, 0.78rem);
  }
  .age-btn { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .age-copy { text-align: center; }
  .s-palette,
  .s-books,
  .s-bag,
  .confetti.nu1,
  .confetti.nu2 { display: none; }
  .s-bus { top: 4%; left: 2%; }
  .s-board { top: 4%; right: 2%; }
  .s-pencil { left: 18%; top: 14%; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(1.2rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes brand-pop {
  from { opacity: 0; transform: scale(0.8) rotate(-4deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes wiggle-in {
  from { opacity: 0; transform: translateY(1.4rem) rotate(-8deg) scale(0.9); }
  to { opacity: 1; transform: translateY(0) rotate(-1.5deg) scale(1); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.55rem); }
}
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(1.4rem); }
}
@keyframes sun-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* AZ Hero mascot — lives on every page */
.az-hero {
  position: fixed;
  right: max(0.4rem, env(safe-area-inset-right));
  bottom: max(0.35rem, env(safe-area-inset-bottom));
  z-index: 900;
  width: clamp(5.8rem, 22vw, 8.4rem);
  pointer-events: none;
  display: grid;
  justify-items: center;
  filter: drop-shadow(0 0.35rem 0 rgba(30, 42, 74, 0.12));
  transform-origin: 50% 90%;
  animation: az-hero-idle 2.8s ease-in-out infinite;
}
/* On game pages keep him smaller so he doesn’t cover the board */
body:has(.play-fun) #az-hero:not(.az-hero--home) {
  width: clamp(4.4rem, 16vw, 6.2rem);
  bottom: max(0.25rem, env(safe-area-inset-bottom));
  right: max(0.25rem, env(safe-area-inset-right));
}
/* Homepage: big featured mascot, not a corner watermark */
.az-hero.az-hero--home {
  left: max(0.75rem, 3vw);
  right: auto;
  bottom: max(1.2rem, 6vh);
  width: clamp(10rem, 32vw, 16rem);
  z-index: 5;
  filter: drop-shadow(0 0.55rem 0 rgba(30, 42, 74, 0.16));
}
.az-hero.az-hero--home .az-hero-bubble {
  max-width: 11rem;
  font-size: clamp(1rem, 2.8vw, 1.25rem);
  padding: 0.45rem 0.8rem;
  background: #fff9ef;
}
.az-hero.az-hero--home.is-idle .az-hero-cape {
  transform-origin: 80px 78px;
  animation: az-cape-flap 2.4s ease-in-out infinite;
}
.az-hero-svg { width: 100%; height: auto; overflow: visible; }
.az-hero-bubble {
  order: -1;
  margin: 0 0 0.25rem;
  max-width: 9rem;
  padding: 0.35rem 0.65rem;
  border-radius: 1rem;
  background: #fff;
  border: 0.18rem solid #1e2a4a;
  box-shadow: 0 0.25rem 0 rgba(30, 42, 74, 0.12);
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2.6vw, 1.05rem);
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  line-height: 1.15;
}
.az-hero-bubble[hidden] { display: none !important; }

/* Pose / face swaps */
.az-face-yay,
.az-face-sad,
.az-arm-thumb,
.az-hero-sparkles { display: none; }
.az-hero.is-idle .az-face-idle,
.az-hero.is-idle .az-arm-rest { display: inline; }
.az-hero.is-yay .az-face-yay,
.az-hero.is-yay .az-arm-thumb,
.az-hero.is-yay .az-hero-sparkles,
.az-hero.is-finale .az-face-yay,
.az-hero.is-finale .az-arm-thumb,
.az-hero.is-finale .az-hero-sparkles { display: inline; }
.az-hero.is-yay .az-face-idle,
.az-hero.is-yay .az-arm-rest,
.az-hero.is-finale .az-face-idle,
.az-hero.is-finale .az-arm-rest { display: none; }
.az-hero.is-sad .az-face-sad,
.az-hero.is-sad .az-arm-rest { display: inline; }
.az-hero.is-sad .az-face-idle,
.az-hero.is-sad .az-arm-thumb { display: none; }

.az-hero.is-yay {
  animation: az-hero-yay 0.7s cubic-bezier(0.34, 1.45, 0.64, 1) both,
    az-hero-bounce 0.55s 0.55s ease-in-out 3;
}
.az-hero.is-yay .az-hero-thumb {
  transform-origin: 11px 20px;
  animation: az-thumb-pump 0.45s ease-in-out 4;
}
.az-hero.is-yay .az-hero-cape,
.az-hero.is-finale .az-hero-cape {
  transform-origin: 80px 78px;
  animation: az-cape-flap 0.5s ease-in-out infinite;
}
.az-hero.is-yay .az-hero-sparkles,
.az-hero.is-finale .az-hero-sparkles {
  animation: az-sparkle 0.7s ease-in-out infinite;
}
.az-hero.is-yay .az-hero-bubble {
  animation: az-bubble-pop 0.45s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.az-hero.is-sad {
  animation: az-hero-sad 0.55s ease both;
}
.az-hero.is-sad .az-hero-head {
  transform-origin: 80px 52px;
  animation: az-head-droop 0.7s ease both;
}
.az-hero.is-sad .az-hero-bubble {
  animation: az-bubble-pop 0.4s ease both;
}

.az-hero.is-finale {
  animation: az-hero-finale 0.85s cubic-bezier(0.34, 1.55, 0.64, 1) both,
    az-hero-bounce 0.45s 0.7s ease-in-out 6;
}
.az-hero.is-finale .az-hero-thumb {
  transform-origin: 11px 20px;
  animation: az-thumb-pump 0.35s ease-in-out infinite;
}
.az-hero.is-finale .az-hero-bubble {
  animation: az-bubble-pop 0.45s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
.az-hero.is-finale .az-hero-body {
  transform-origin: 80px 116px;
  animation: az-spin-badge 1.2s ease-in-out 2;
}

@keyframes az-hero-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.35rem); }
}
@keyframes az-hero-yay {
  0% { transform: translateY(0.6rem) scale(0.86) rotate(-4deg); }
  55% { transform: translateY(-0.85rem) scale(1.14) rotate(4deg); }
  100% { transform: translateY(0) scale(1.08) rotate(0deg); }
}
@keyframes az-hero-bounce {
  0%, 100% { transform: translateY(0) scale(1.08); }
  50% { transform: translateY(-0.55rem) scale(1.12); }
}
@keyframes az-hero-sad {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(0.35rem) scale(0.94) rotate(-3deg); }
  100% { transform: translateY(0.2rem) scale(0.96); }
}
@keyframes az-hero-finale {
  0% { transform: translateY(0.8rem) scale(0.8) rotate(-8deg); }
  50% { transform: translateY(-1.1rem) scale(1.22) rotate(6deg); }
  100% { transform: translateY(0) scale(1.12) rotate(0deg); }
}
@keyframes az-thumb-pump {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-12deg); }
}
@keyframes az-cape-flap {
  0%, 100% { transform: skewX(0deg); }
  50% { transform: skewX(-4deg) translateX(-2px); }
}
@keyframes az-sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}
@keyframes az-head-droop {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-6deg) translateY(3px); }
}
@keyframes az-bubble-pop {
  0% { opacity: 0; transform: scale(0.5) translateY(0.4rem); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes az-spin-badge {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.08) rotate(-3deg); }
  70% { transform: scale(1.1) rotate(3deg); }
}

@media (max-width: 720px) {
  .az-hero.az-hero--home {
    left: 50%;
    right: auto;
    bottom: max(0.6rem, env(safe-area-inset-bottom));
    width: clamp(7.5rem, 36vw, 11rem);
    transform: translateX(-50%);
    animation: az-hero-idle-center 2.8s ease-in-out infinite;
  }
  .az-hero.az-hero--home.is-yay,
  .az-hero.az-hero--home.is-finale,
  .az-hero.az-hero--home.is-sad {
    transform: translateX(-50%);
  }
}
@media (max-width: 520px) {
  .az-hero { width: clamp(4.8rem, 28vw, 6.4rem); }
  .az-hero-bubble { max-width: 7.2rem; font-size: 0.8rem; }
  .az-hero.az-hero--home .az-hero-bubble { max-width: 8.5rem; font-size: 0.9rem; }
  .home-learn .panel { padding-bottom: 7.5rem; }
}
@keyframes az-hero-idle-center {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-0.35rem); }
}

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

