@font-face {
  font-family: 'Fredoka';
  src: url('/assets/fonts/fredoka-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fff8e9;
  --cream-deep: #f9edd3;
  --paper: #fffdf8;
  --ink: #26352f;
  --ink-soft: #5f6f69;
  --ink-faint: #64716b;
  --coral: #f06449;
  --coral-dark: #c04328;
  --coral-soft: #ffe2db;
  --teal: #43bda7;
  --teal-dark: #176f61;
  --teal-soft: #dff7f0;
  --yellow: #ffc83d;
  --yellow-soft: #fff1c7;
  --purple: #8674de;
  --purple-soft: #ede9ff;
  --blue: #4c8ed9;
  --blue-soft: #e2efff;
  --red: #b23d3d;
  --red-soft: #ffe5e5;
  --line: #eadfc9;
  --shadow-sm: 0 4px 0 rgba(92, 74, 45, 0.08), 0 8px 24px rgba(92, 74, 45, 0.05);
  --shadow-md: 0 8px 0 rgba(92, 74, 45, 0.08), 0 22px 55px rgba(92, 74, 45, 0.08);
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --font: 'Fredoka', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --max-width: 1220px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(61, 74, 67, 0.06) 1px, transparent 0),
    radial-gradient(circle at 8% 2%, rgba(255, 203, 76, 0.22), transparent 26rem),
    radial-gradient(circle at 94% 10%, rgba(67, 189, 167, 0.13), transparent 30rem),
    radial-gradient(circle at 58% 100%, rgba(240, 100, 73, 0.07), transparent 38rem);
  background-size: 28px 28px, 100% 100%, 100% 100%, 100% 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--ink);
  background: var(--yellow);
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  font-weight: 600;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 12px 18px;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.noscript-note {
  max-width: 720px;
  margin: 20px auto;
  padding: 16px 20px;
  border: 2px solid #efca8f;
  border-radius: 16px;
  color: #6b4b15;
  background: var(--yellow-soft);
  font-size: 0.95rem;
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: currentColor;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(240, 100, 73, 0.14);
}

/* Top navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(117, 95, 57, 0.09);
  background: rgba(255, 248, 233, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, var(--max-width));
  min-height: 82px;
  margin: 0 auto;
  padding: 12px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #ff8467, var(--coral));
  box-shadow:
    inset 0 -4px 0 rgba(157, 44, 23, 0.24),
    0 5px 0 rgba(157, 44, 23, 0.12);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  transform: rotate(-4deg);
}

.brand-name {
  font-size: 1.36rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.brand-name span {
  color: var(--teal-dark);
  font-weight: 500;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.star-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 3px 0 rgba(92, 74, 45, 0.06);
  font-size: 1rem;
  font-weight: 600;
}

.star-pill .icon {
  color: var(--yellow);
  filter: drop-shadow(0 1px 0 #ca9617);
}

.icon-btn,
.round-btn,
.back-btn,
.modal-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 3px 0 rgba(92, 74, 45, 0.07);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.icon-btn {
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}

.icon-btn:hover,
.round-btn:hover,
.back-btn:hover,
.modal-close:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 rgba(92, 74, 45, 0.07);
}

.icon-btn:active,
.round-btn:active,
.back-btn:active,
.modal-close:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(92, 74, 45, 0.07);
}

.sound-off {
  display: none;
}

.sound-btn[aria-pressed='false'] .sound-on {
  display: none;
}

.sound-btn[aria-pressed='false'] .sound-off {
  display: block;
}

.parent-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 3px 0 rgba(92, 74, 45, 0.06);
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}

.parent-btn:hover {
  border-color: var(--coral);
  transform: translateY(-1px);
}

/* Shared layout and buttons */
main {
  position: relative;
  z-index: 1;
}

.view {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 38px 28px 88px;
  animation: view-in 0.36s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 56px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: var(--coral-dark);
  box-shadow:
    inset 0 -4px 0 rgba(143, 38, 18, 0.24),
    0 8px 22px rgba(240, 100, 73, 0.25);
}

.btn-primary:hover {
  background: #a8341d;
  box-shadow:
    inset 0 -4px 0 rgba(143, 38, 18, 0.2),
    0 12px 28px rgba(240, 100, 73, 0.27);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.85);
  box-shadow: 0 4px 0 rgba(92, 74, 45, 0.06);
}

.btn-ghost:hover {
  border-color: #d9cbb2;
  background: #fff;
}

.btn-soft {
  border-color: transparent;
  color: var(--ink);
  background: #f5ead7;
}

.btn-soft:hover {
  background: #f0e2ca;
}

.btn-danger {
  color: #fff;
  background: var(--red);
  box-shadow: inset 0 -3px 0 rgba(114, 26, 26, 0.24);
}

.btn-danger:hover {
  background: #9f3232;
}

.btn-small {
  min-height: 46px;
  padding: 0 17px;
  border-radius: 14px;
  font-size: 0.91rem;
}

button.btn {
  border: 2px solid transparent;
}

button.btn-ghost {
  border-color: var(--line);
}

/* Home hero */
.view-home {
  padding-top: 18px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  align-items: center;
  gap: clamp(24px, 4vw, 62px);
  min-height: 570px;
  padding: 18px 0 48px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(3.15rem, 6.4vw, 5.65rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.hero-copy h1 .highlight {
  position: relative;
  display: inline-block;
  z-index: 0;
  color: var(--coral-dark);
}

.hero-copy h1 .highlight::after {
  position: absolute;
  right: -0.04em;
  bottom: 0.03em;
  left: -0.04em;
  z-index: -1;
  height: 0.28em;
  border-radius: 0.14em 0.4em 0.18em 0.3em;
  background: var(--yellow);
  content: '';
  opacity: 0.8;
  transform: rotate(-1.8deg);
}

.hero-lead {
  max-width: 570px;
  margin-bottom: 27px;
  color: var(--ink-soft);
  font-size: 1.14rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 27px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  padding: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  list-style: none;
}

.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-row .icon {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
}

.hero-art {
  position: relative;
  min-height: 510px;
  isolation: isolate;
}

.hero-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(41vw, 440px);
  height: min(41vw, 440px);
  border-radius: 44% 56% 48% 52% / 53% 45% 55% 47%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.65), transparent 42%),
    linear-gradient(145deg, #ffe7a3, #ffd46d);
  transform: translate(-50%, -50%) rotate(-8deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 30px 70px rgba(208, 158, 50, 0.15);
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px dashed rgba(101, 83, 45, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  width: min(46vw, 490px);
  height: min(46vw, 490px);
  transform: translate(-50%, -50%);
  animation: orbit-spin 46s linear infinite;
}

.orbit-two {
  width: min(36vw, 380px);
  height: min(36vw, 380px);
  border-color: rgba(255, 255, 255, 0.65);
  transform: translate(-50%, -50%) rotate(35deg);
  animation: orbit-spin-reverse 34s linear infinite;
}

.mascot-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: min(32vw, 355px);
  height: auto;
  transform: translate(-50%, -50%);
  animation: mascot-bob 5s ease-in-out infinite;
}

.hero-bubble {
  position: absolute;
  top: 9%;
  left: 0;
  z-index: 4;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: 18px 18px 18px 5px;
  background: #fff;
  box-shadow: 4px 5px 0 rgba(38, 53, 47, 0.12);
  font-size: 1rem;
  font-weight: 600;
  transform: rotate(-4deg);
  animation: bubble-in 0.7s 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.float-block {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 61px;
  height: 61px;
  place-items: center;
  border-radius: 18px;
  box-shadow:
    inset 0 -5px 0 rgba(63, 42, 16, 0.12),
    0 10px 22px rgba(75, 54, 24, 0.12);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
}

.block-a {
  top: 19%;
  right: 2%;
  color: #fff;
  background: var(--coral);
  transform: rotate(11deg);
  animation: block-float 4.8s 0.4s ease-in-out infinite;
}

.block-b {
  right: 12%;
  bottom: 11%;
  color: #fff;
  background: var(--teal);
  transform: rotate(-9deg);
  animation: block-float 5.4s 0.8s ease-in-out infinite;
}

.block-c {
  bottom: 20%;
  left: 2%;
  color: var(--ink);
  background: var(--yellow);
  transform: rotate(7deg);
  animation: block-float 5s 0.2s ease-in-out infinite;
}

.float-star {
  position: absolute;
  z-index: 3;
  color: var(--coral);
  filter: drop-shadow(0 3px 0 rgba(157, 51, 30, 0.13));
}

.float-star .icon {
  width: 31px;
  height: 31px;
}

.star-one {
  top: 16%;
  left: 8%;
  transform: rotate(-14deg);
  animation: star-twinkle 3.6s ease-in-out infinite;
}

.star-two {
  right: 2%;
  bottom: 33%;
  color: var(--teal);
  transform: rotate(18deg) scale(0.7);
  animation: star-twinkle 4.2s 0.8s ease-in-out infinite;
}

/* Home game cards */
.games-section {
  padding-top: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.section-heading > p {
  max-width: 370px;
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  --card-accent: var(--coral-dark);
  position: relative;
  display: flex;
  min-height: 248px;
  flex-direction: column;
  overflow: hidden;
  padding: 25px 26px 22px;
  border: 2px solid rgba(91, 69, 35, 0.08);
  border-radius: 30px;
  color: var(--ink);
  background: var(--card-bg, #fff);
  box-shadow: 0 7px 0 rgba(92, 74, 45, 0.07);
  text-decoration: none;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.game-card::before {
  position: absolute;
  top: -64px;
  right: -54px;
  width: 220px;
  height: 220px;
  border: 2px dashed rgba(83, 63, 31, 0.12);
  border-radius: 50%;
  content: '';
}

.game-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 44%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.6), transparent 64%);
  content: '';
  pointer-events: none;
}

.game-card:hover {
  box-shadow: 0 12px 0 rgba(92, 74, 45, 0.08);
  transform: translateY(-5px) rotate(-0.25deg);
}

.game-card:active {
  box-shadow: 0 5px 0 rgba(92, 74, 45, 0.08);
  transform: translateY(1px);
}

.game-trace {
  --card-bg: #ffe4dc;
  --card-accent: #b33a22;
}

.game-phonics {
  --card-bg: #dff6ef;
  --card-accent: #176f61;
}

.game-match {
  --card-bg: #fff0bf;
  --card-accent: #8b6110;
}

.game-stickers {
  --card-bg: #ece7ff;
  --card-accent: #5c4bb8;
}

.game-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 55px;
  height: 55px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  color: var(--card-accent);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 4px 0 rgba(91, 69, 35, 0.07);
  font-size: 1.55rem;
}

.game-copy {
  position: relative;
  z-index: 2;
  max-width: 68%;
}

.game-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--card-accent);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.game-copy h3 {
  margin: 0 0 7px;
  font-size: 1.65rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.game-copy p {
  margin: 0;
  color: #56655f;
  font-size: 0.94rem;
  line-height: 1.48;
}

.game-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  margin-top: auto;
}

.game-stat {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  color: #58665f;
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.79rem;
  font-weight: 500;
}

.card-arrow {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 1rem;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.game-card:hover .card-arrow {
  background: var(--card-accent);
  transform: translateX(3px) rotate(-4deg);
}

.card-doodle {
  position: absolute;
  z-index: 1;
  color: var(--card-accent);
  font-weight: 700;
  pointer-events: none;
}

.card-doodle-a {
  top: 31px;
  right: 46px;
  font-size: 9rem;
  line-height: 1;
  opacity: 0.11;
  transform: rotate(7deg);
}

.card-doodle-line {
  top: 53px;
  right: 23px;
  width: 4px;
  height: 113px;
  border-radius: 4px;
  background: repeating-linear-gradient(to bottom, var(--card-accent) 0 7px, transparent 7px 15px);
  opacity: 0.22;
  transform: rotate(18deg);
}

.sound-doodle {
  position: absolute;
  right: 45px;
  bottom: 90px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 82px;
  z-index: 1;
  opacity: 0.28;
  transform: rotate(-5deg);
}

.sound-doodle span {
  width: 9px;
  border-radius: 8px;
  background: var(--card-accent);
}

.sound-doodle span:nth-child(1) {
  height: 26px;
}

.sound-doodle span:nth-child(2) {
  height: 50px;
}

.sound-doodle span:nth-child(3) {
  height: 73px;
}

.sound-doodle span:nth-child(4) {
  height: 40px;
}

.match-doodle {
  position: absolute;
  top: 39px;
  right: 32px;
  z-index: 1;
  width: 145px;
  height: 130px;
  opacity: 0.45;
  transform: rotate(4deg);
}

.mini-card {
  position: absolute;
  display: grid;
  width: 76px;
  height: 94px;
  place-items: center;
  border: 2px solid rgba(139, 98, 12, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 0 rgba(126, 91, 20, 0.09);
  font-size: 2rem;
  font-weight: 700;
}

.mini-card-one {
  top: 0;
  left: 0;
  color: #8b6110;
  transform: rotate(-8deg);
}

.mini-card-two {
  right: 0;
  bottom: 0;
  color: var(--coral-dark);
  transform: rotate(7deg);
}

.sticker-doodle {
  position: absolute;
  top: 45px;
  right: 56px;
  z-index: 1;
  font-size: 6rem;
  opacity: 0.23;
  transform: rotate(10deg);
}

.home-note {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  margin-top: 42px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.7);
}

.note-art {
  display: grid;
  width: 55px;
  height: 55px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  background: var(--teal-soft);
  font-size: 1.6rem;
}

.home-note h2 {
  margin: 0 0 3px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.home-note p {
  max-width: 670px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.91rem;
}

.home-note .btn {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Game view framing */
.view-game {
  padding-top: 30px;
}

.game-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.back-btn {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 16px;
  font-size: 1.2rem;
}

.game-heading {
  min-width: 0;
  flex: 1;
}

.game-heading .eyebrow {
  margin-bottom: 4px;
}

.game-heading h1,
.game-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 2.65rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.game-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.case-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 3px 0 rgba(92, 74, 45, 0.06);
}

.case-option {
  min-width: 52px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.case-option:hover {
  color: var(--ink);
}

.case-option.is-active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.14);
}

.round-pill,
.safe-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.82);
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
}

.safe-pill .icon {
  color: var(--teal-dark);
}

/* Trace game */
.trace-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.trace-side {
  position: sticky;
  top: 108px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.word-card {
  --letter-color: var(--coral);
  --letter-soft: var(--coral-soft);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: var(--letter-soft);
  box-shadow: var(--shadow-sm);
  transition: background 0.25s ease;
}

.word-emoji {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 4px 0 rgba(80, 60, 30, 0.06);
  font-size: 2rem;
}

.word-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.word-copy span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 500;
}

.word-copy strong {
  overflow: hidden;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.round-btn {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  font-size: 1.1rem;
}

.progress-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-sm);
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 0.81rem;
  font-weight: 500;
}

.progress-top strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0e6d5;
  box-shadow: inset 0 2px 3px rgba(84, 61, 27, 0.06);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #7bd6bd);
  transition: width 0.2s ease;
}

.progress-card p {
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

#trace-status.is-almost {
  color: var(--coral-dark);
}

.letter-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #f1dfa9;
  border-radius: 20px;
  background: var(--yellow-soft);
}

.mini-sticker {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 14px;
  background: #fff7dc;
  font-size: 1.35rem;
  box-shadow: 0 3px 0 rgba(149, 107, 14, 0.09);
}

.letter-hint p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.sound-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 7px;
  color: var(--ink-faint);
  font-size: 0.77rem;
  line-height: 1.4;
}

.sound-tip .icon {
  margin-top: 1px;
  color: var(--teal-dark);
  font-size: 1rem;
}

.sound-tip p {
  margin: 0;
}

.trace-main {
  min-width: 0;
}

.trace-stage {
  position: relative;
  width: min(100%, 528px);
  aspect-ratio: 5 / 6;
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid #f0e2ca;
  border-radius: 34px;
  background-color: #fffcf5;
  background-image:
    linear-gradient(rgba(223, 203, 168, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 203, 168, 0.24) 1px, transparent 1px);
  background-size: 34px 34px;
  box-shadow:
    0 9px 0 rgba(92, 74, 45, 0.055),
    0 28px 65px rgba(92, 74, 45, 0.07);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.trace-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.trace-svg .guide-track {
  fill: none;
  stroke: #f4ead8;
  stroke-width: 17;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trace-svg .guide-dots {
  fill: none;
  stroke: var(--letter-color, var(--coral));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 0.2 6.2;
  opacity: 0.7;
}

.trace-svg .guide-track.is-complete {
  stroke: #dff7ee;
}

.trace-svg .guide-dots.is-complete {
  stroke: var(--teal-dark);
  opacity: 0.45;
}

.trace-svg .stroke-number circle {
  fill: var(--letter-color, var(--coral));
  stroke: #fffcf5;
  stroke-width: 1.6;
  filter: drop-shadow(0 1.5px 1px rgba(67, 46, 17, 0.15));
}

.trace-svg .stroke-number text {
  fill: #fff;
  font-family: var(--font);
  font-size: 6.4px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.trace-svg .stroke-number.is-next circle {
  animation: number-pulse 1.3s ease-in-out infinite;
}

.trace-svg .stroke-number.is-done {
  opacity: 0.32;
}

.trace-svg .demo-line {
  fill: none;
  stroke: var(--letter-color, var(--coral));
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.26;
}

.trace-svg .demo-dot {
  fill: var(--letter-color, var(--coral));
  stroke: #fff;
  stroke-width: 1.4;
  opacity: 0;
  filter: drop-shadow(0 1px 2px rgba(62, 42, 16, 0.25));
}

.trace-svg.is-demo-running .demo-dot {
  opacity: 1;
}

#trace-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.trace-stage.is-complete #trace-canvas {
  pointer-events: none;
}

.trace-success {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  overflow: auto;
  padding: 24px;
  place-items: center;
  background: rgba(255, 250, 240, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  animation: overlay-in 0.32s ease both;
}

.trace-success .eyebrow {
  justify-content: center;
  margin-bottom: 4px;
}

.trace-success h2 {
  margin: 0 0 7px;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  letter-spacing: -0.035em;
}

.trace-success h2 span {
  color: var(--coral-dark);
}

.trace-success p:not(.eyebrow) {
  max-width: 300px;
  margin: 0 auto 17px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.success-sticker {
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 13px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 25px;
  background: var(--yellow-soft);
  box-shadow:
    0 6px 0 rgba(143, 102, 17, 0.1),
    0 14px 32px rgba(143, 102, 17, 0.12);
  font-size: 2.7rem;
  animation: sticker-pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.success-actions .btn {
  min-height: 47px;
  padding: 0 17px;
  border-radius: 14px;
  font-size: 0.9rem;
}

.success-sparkles span {
  position: absolute;
  color: var(--yellow);
  font-size: 1.5rem;
  animation: sparkle-float 2s ease-in-out infinite;
}

.success-sparkles span:nth-child(1) {
  top: 15%;
  left: 16%;
}

.success-sparkles span:nth-child(2) {
  top: 24%;
  right: 16%;
  color: var(--teal);
  animation-delay: 0.4s;
}

.success-sparkles span:nth-child(3) {
  bottom: 18%;
  left: 22%;
  color: var(--coral);
  animation-delay: 0.8s;
}

.trace-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  width: min(100%, 528px);
  margin: 18px auto 13px;
}

.alphabet-strip {
  display: flex;
  gap: 7px;
  width: min(100%, 650px);
  margin: 0 auto;
  padding: 5px 3px 13px;
  overflow-x: auto;
  scrollbar-color: #d5c5a9 transparent;
  scrollbar-width: thin;
}

.alphabet-strip::-webkit-scrollbar {
  height: 5px;
}

.alphabet-strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d5c5a9;
}

.letter-chip {
  position: relative;
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  place-items: center;
  border: 1px solid #e8dcc5;
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.9);
  font-size: 0.96rem;
  font-weight: 600;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.letter-chip:hover {
  border-color: var(--coral);
  color: var(--ink);
  transform: translateY(-2px);
}

.letter-chip.is-active {
  border-color: var(--ink);
  color: #fff8e9;
  background: var(--ink);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.letter-chip.is-mastered::after {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  content: '';
}

.letter-chip.is-active.is-mastered::after {
  border-color: var(--ink);
}

/* Phonics game */
.phonics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  align-items: start;
  gap: 28px;
  max-width: 1080px;
  margin: 0 auto;
}

.quiz-shell {
  position: relative;
  padding-top: 3px;
}

.quiz-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.quiz-pip {
  width: 31px;
  height: 6px;
  border-radius: 999px;
  background: #eadcc3;
  transition:
    background 0.2s ease,
    width 0.2s ease;
}

.quiz-pip.is-done {
  background: var(--teal);
}

.quiz-pip.is-current {
  width: 47px;
  background: var(--coral);
}

.quiz-card {
  padding: 32px 36px 26px;
  border: 2px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.quiz-card > .eyebrow {
  justify-content: center;
  margin-bottom: 14px;
}

.quiz-emoji-wrap {
  display: grid;
  width: 128px;
  height: 128px;
  margin: 0 auto 13px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 42px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.8), transparent 45%),
    var(--teal-soft);
  box-shadow:
    0 6px 0 rgba(36, 114, 100, 0.07),
    0 16px 34px rgba(36, 114, 100, 0.07);
  animation: emoji-float 4s ease-in-out infinite;
}

.quiz-emoji {
  font-size: 4.4rem;
  line-height: 1;
}

.quiz-card h2 {
  margin: 0 0 11px;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.quiz-card h2 em {
  color: var(--coral-dark);
  font-style: normal;
}

.listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 41px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 0.82rem;
  font-weight: 600;
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.listen-btn:hover {
  background: #d0f3e9;
  transform: translateY(-1px);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  max-width: 475px;
  margin: 23px auto 12px;
}

.choice-btn {
  display: grid;
  min-height: 108px;
  place-items: center;
  border: 2px solid #e7d9bf;
  border-radius: 24px;
  color: var(--ink);
  background: #fffaee;
  box-shadow: 0 6px 0 #e9dcc4;
  font-size: 2.85rem;
  font-weight: 600;
  line-height: 1;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.choice-btn:hover {
  border-color: var(--coral);
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 9px 0 #e9dcc4;
}

.choice-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #e9dcc4;
}

.choice-btn.is-correct {
  border-color: #3eb28f;
  color: #186f59;
  background: #dff8ee;
  box-shadow: 0 6px 0 #a9e2d1;
  animation: correct-pop 0.45s cubic-bezier(0.2, 1.3, 0.4, 1);
}

.choice-btn.is-wrong {
  border-color: #e38c8c;
  color: #b54040;
  background: #ffeaea;
  box-shadow: 0 6px 0 #f1c7c7;
  animation: gentle-shake 0.45s ease;
}

.choice-btn.is-dimmed {
  opacity: 0.42;
}

.quiz-feedback {
  min-height: 1.45em;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
}

.quiz-feedback.is-positive {
  color: var(--teal-dark);
}

.quiz-feedback.is-gentle {
  color: var(--coral-dark);
}

.quiz-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-side-art {
  position: relative;
  width: 142px;
  height: 120px;
  margin: 4px auto 2px;
  border-radius: 42% 42% 48% 48%;
  background: linear-gradient(145deg, #69d4bf, #2daa94);
  box-shadow:
    inset 0 -8px 0 rgba(21, 115, 97, 0.14),
    0 12px 30px rgba(35, 143, 124, 0.15);
}

.side-ear {
  position: absolute;
  top: -17px;
  width: 38px;
  height: 44px;
  border-radius: 8px 50% 8% 50%;
  background: #2daa94;
}

.side-ear-left {
  left: 21px;
  transform: rotate(-19deg);
}

.side-ear-right {
  right: 21px;
  transform: scaleX(-1) rotate(-19deg);
}

.side-face {
  position: absolute;
  top: 40%;
  left: 50%;
  color: #22483f;
  font-size: 1.65rem;
  letter-spacing: -0.05em;
  transform: translate(-50%, -50%);
}

.tip-card {
  padding: 20px;
  border: 1px solid #ecdba9;
  border-radius: 22px;
  background: var(--yellow-soft);
}

.tip-badge {
  display: grid;
  width: 37px;
  height: 37px;
  margin-bottom: 11px;
  place-items: center;
  border-radius: 12px;
  color: #8b6411;
  background: rgba(255, 255, 255, 0.64);
  font-size: 1rem;
}

.tip-card h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.tip-card p {
  margin: 0;
  color: #695b3c;
  font-size: 0.81rem;
  line-height: 1.5;
}

.tip-card strong {
  color: var(--ink);
}

.quiz-score-card {
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.88);
}

.quiz-score-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 500;
}

.quiz-stars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  color: #d9cdb5;
  font-size: 1.35rem;
  line-height: 1;
}

.quiz-star {
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.quiz-star.is-empty {
  opacity: 0.42;
}

.quiz-star.is-earned {
  color: var(--yellow);
  filter: drop-shadow(0 1px 0 #ca9617);
  animation: star-pop 0.35s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.quiz-complete {
  padding: 40px 32px;
  border: 2px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-md);
  text-align: center;
  animation: overlay-in 0.32s ease both;
}

.quiz-complete .eyebrow {
  justify-content: center;
}

.quiz-complete h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: -0.035em;
}

.quiz-complete > p:not(.eyebrow) {
  max-width: 430px;
  margin: 0 auto 17px;
  color: var(--ink-soft);
}

.complete-burst {
  margin-bottom: 6px;
  font-size: 4rem;
  line-height: 1;
  animation: sticker-pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.complete-stars {
  margin-bottom: 20px;
  color: var(--yellow);
  font-size: 1.8rem;
  letter-spacing: 0.15em;
  text-shadow: 0 2px 0 #d5a12c;
}

/* Matching game */
.match-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.hud-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 47px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 3px 0 rgba(92, 74, 45, 0.06);
}

.hud-label {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.hud-pill strong {
  font-size: 1rem;
}

.match-tip {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-align: center;
}

.match-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  width: min(100%, 720px);
  margin: 0 auto;
}

.match-card {
  position: relative;
  aspect-ratio: 0.86;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  perspective: 900px;
}

.match-card-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.3, 1);
  transform-style: preserve-3d;
}

.match-card.is-flipped .match-card-inner,
.match-card.is-matched .match-card-inner {
  transform: rotateY(180deg);
}

.match-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.match-front {
  border: 2px solid rgba(255, 255, 255, 0.65);
  color: #c14f37;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.65), transparent 38%),
    #ffdfd7;
  box-shadow:
    inset 0 -6px 0 rgba(176, 68, 43, 0.08),
    0 6px 0 rgba(133, 83, 36, 0.08);
  font-size: 2.2rem;
  font-weight: 600;
}

.match-front::before {
  content: '?';
  opacity: 0.54;
}

.match-front::after {
  position: absolute;
  width: 62px;
  height: 62px;
  border: 2px dashed currentColor;
  border-radius: 50%;
  content: '';
  opacity: 0.15;
}

.match-card:nth-child(4n + 2) .match-front {
  color: #247d6d;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 38%),
    #d9f5ed;
}

.match-card:nth-child(4n + 3) .match-front {
  color: #a27512;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 38%),
    #fff0bf;
}

.match-card:nth-child(4n + 4) .match-front {
  color: #6d5ac6;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 38%),
    #ece7ff;
}

.match-back {
  border: 2px solid #e6d9c1;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 6px 0 rgba(133, 83, 36, 0.08);
  transform: rotateY(180deg);
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  font-weight: 600;
  line-height: 1;
}

.match-card:hover .match-front {
  transform: translateY(-2px);
}

.match-card.is-matched .match-back {
  border-color: #79cfb5;
  color: var(--teal-dark);
  background: #e6fbf3;
  box-shadow: 0 6px 0 rgba(49, 152, 126, 0.12);
  animation: matched-pop 0.4s ease;
}

.match-card.is-matched::after {
  position: absolute;
  top: 6px;
  right: 7px;
  z-index: 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  content: '✓';
  font-size: 0.7rem;
  font-weight: 700;
}

.match-card:disabled {
  cursor: default;
}

.match-complete {
  width: min(100%, 610px);
  padding: 40px 30px;
  margin: 28px auto 0;
  border: 2px solid var(--line);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
  text-align: center;
  animation: overlay-in 0.32s ease both;
}

.match-complete .eyebrow {
  justify-content: center;
}

.match-complete h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.035em;
}

.match-complete p:not(.eyebrow) {
  margin-bottom: 19px;
  color: var(--ink-soft);
}

/* Sticker book */
.sticker-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 28px;
  border: 1px solid #e5d8f8;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.8), transparent 30%),
    var(--purple-soft);
  box-shadow: var(--shadow-sm);
}

.sticker-hero-copy {
  display: flex;
  align-items: center;
  gap: 17px;
}

.sticker-hero-icon {
  display: grid;
  width: 67px;
  height: 67px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 4px 0 rgba(102, 80, 173, 0.08);
  font-size: 2rem;
}

.sticker-hero h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  letter-spacing: -0.025em;
}

.sticker-hero p {
  max-width: 570px;
  margin: 0;
  color: #645b7b;
  font-size: 0.87rem;
  line-height: 1.5;
}

.sticker-progress-wrap {
  width: min(100%, 292px);
  flex: 0 0 auto;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
}

.sticker-progress-wrap .progress-fill {
  background: linear-gradient(90deg, var(--purple), #b3a4f1);
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
  margin-top: 24px;
}

.sticker-card {
  --sticker-color: var(--coral);
  --sticker-soft: var(--coral-soft);
  position: relative;
  display: flex;
  aspect-ratio: 0.83;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  padding: 10px;
  border: 2px solid rgba(92, 74, 45, 0.08);
  border-radius: 22px;
  background: var(--sticker-soft);
  box-shadow: 0 5px 0 rgba(92, 74, 45, 0.055);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.sticker-card::before {
  position: absolute;
  top: -25px;
  right: -25px;
  width: 70px;
  height: 70px;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  content: '';
}

.sticker-card:hover {
  box-shadow: 0 9px 0 rgba(92, 74, 45, 0.06);
  transform: translateY(-3px);
}

.sticker-card:active {
  transform: translateY(1px);
}

.sticker-emoji {
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  line-height: 1;
  filter: drop-shadow(0 3px 1px rgba(92, 66, 29, 0.08));
}

.sticker-word {
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
}

.sticker-letter {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 7px;
  color: var(--sticker-color);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

.sticker-card.is-locked {
  border-color: #e8e1d5;
  background: rgba(244, 239, 229, 0.8);
  box-shadow: none;
  color: #a9a39a;
}

.sticker-card.is-locked .sticker-emoji {
  filter: grayscale(1);
  opacity: 0.18;
}

.sticker-card.is-locked .sticker-word {
  color: #6f6a62;
}

.sticker-card.is-locked .sticker-letter {
  color: #6f6a62;
  background: rgba(255, 255, 255, 0.6);
}

.sticker-lock {
  position: absolute;
  top: 9px;
  right: 9px;
  color: #6f6a62;
  font-size: 0.65rem;
}

.sticker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px 0;
}

.sticker-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* Parent corner */
.parent-intro {
  max-width: 760px;
  margin: -8px 0 24px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 22px;
}

.stat-card {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  padding: 17px;
  border: 1px solid transparent;
  border-radius: 23px;
  box-shadow: 0 4px 0 rgba(92, 74, 45, 0.05);
}

.stat-card strong {
  margin-top: auto;
  font-size: 2.1rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-card > span:last-child {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.79rem;
}

.stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
  font-size: 1.1rem;
}

.stat-coral {
  border-color: #f4c9be;
  background: var(--coral-soft);
}

.stat-teal {
  border-color: #bfe8dd;
  background: var(--teal-soft);
}

.stat-yellow {
  border-color: #f0dc9e;
  background: var(--yellow-soft);
}

.stat-purple {
  border-color: #d9d0f7;
  background: var(--purple-soft);
}

.parent-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  align-items: start;
  gap: 18px;
}

.parent-main,
.parent-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel h2 {
  margin: 0 0 2px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.panel-heading p,
.panel > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.mini-count {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fffaf0;
  font-size: 0.75rem;
  font-weight: 500;
}

.letter-report {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 5px;
}

.report-letter {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #eee4d3;
  border-radius: 8px;
  color: #6f6a62;
  background: #f8f2e6;
  font-size: 0.72rem;
  font-weight: 500;
}

.report-letter.is-done {
  border-color: #bce9dd;
  color: #147663;
  background: #ddf7ef;
}

.report-letter.is-done::after {
  position: absolute;
  content: none;
}

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px dashed #eadfcb;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.activity-list > div:last-child {
  border-bottom: 0;
}

.activity-list strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.settings-panel h2 {
  margin-bottom: 17px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
}

.switch-row > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-row strong {
  font-size: 0.92rem;
}

.switch-row small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

.switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: block;
  width: 50px;
  height: 30px;
  border: 1px solid #d9cdb7;
  border-radius: 999px;
  background: #eae1d2;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(67, 50, 25, 0.18);
  content: '';
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
  border-color: var(--teal-dark);
  background: var(--teal);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
}

.install-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf0;
  text-align: left;
}

.install-row:hover {
  border-color: var(--coral);
}

.install-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--coral);
  font-size: 1.15rem;
  font-weight: 600;
}

.install-row > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.install-row strong {
  font-size: 0.85rem;
}

.install-row small {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.privacy-panel {
  position: relative;
  padding-left: 66px;
}

.privacy-icon {
  position: absolute;
  top: 22px;
  left: 22px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 0.95rem;
}

.privacy-panel h2 {
  margin-bottom: 5px;
}

.privacy-panel a,
.parent-footnote a {
  color: var(--teal-dark);
  font-weight: 500;
}

.danger-panel {
  border-color: #f1d0d0;
}

.danger-panel h2 {
  margin-bottom: 5px;
}

.danger-panel .btn {
  margin-top: 13px;
}

.parent-footnote {
  margin: 1px 2px 0;
  color: var(--ink-faint);
  font-size: 0.75rem;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(117, 95, 57, 0.12);
  background: rgba(255, 248, 233, 0.6);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(100%, var(--max-width));
  min-height: 104px;
  margin: 0 auto;
  padding: 22px 28px;
}

.brand-footer .brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  font-size: 0.84rem;
}

.brand-footer .brand-name {
  font-size: 1.05rem;
}

.footer-inner > p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.footer-inner nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.footer-inner nav a,
.footer-inner nav button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  text-decoration: none;
}

.footer-inner nav a:hover,
.footer-inner nav button:hover {
  color: var(--coral-dark);
  text-decoration: underline;
}

/* Toast, modals, confetti */
.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(90vw, 460px);
  min-height: 54px;
  padding: 10px 19px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 32px rgba(34, 48, 43, 0.25);
  font-size: 0.89rem;
  transform: translateX(-50%);
  animation: toast-in 0.3s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}

.toast-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  font-size: 1rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(27, 40, 36, 0.52);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fade-in 0.2s ease both;
}

.modal {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100vh - 40px);
  padding: 32px;
  overflow-y: auto;
  border: 1px solid #efe4d1;
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(19, 31, 27, 0.3);
  text-align: center;
  animation: modal-in 0.3s cubic-bezier(0.2, 1.1, 0.4, 1) both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 39px;
  height: 39px;
  border-radius: 13px;
  font-size: 1rem;
}

.gate-icon {
  display: grid;
  width: 61px;
  height: 61px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 20px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 1.4rem;
}

.danger-icon {
  color: var(--red);
  background: var(--red-soft);
  font-size: 1.75rem;
}

.modal .eyebrow {
  justify-content: center;
  margin-bottom: 3px;
}

.modal h2 {
  margin-bottom: 8px;
  font-size: 1.8rem;
  letter-spacing: -0.035em;
}

.modal-lead {
  margin-bottom: 19px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

.modal-lead strong {
  color: var(--ink);
  font-size: 1.15rem;
}

.gate-form {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 9px;
}

.gate-form input {
  width: 96px;
  min-height: 54px;
  padding: 0 12px;
  border: 2px solid #e4d6bf;
  border-radius: 15px;
  color: var(--ink);
  background: #fffaf0;
  font-size: 1.45rem;
  font-weight: 600;
  text-align: center;
}

.gate-form input:focus {
  border-color: var(--teal);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(67, 189, 167, 0.17);
}

.gate-form .btn {
  min-height: 54px;
  border-radius: 15px;
}

.gate-form.is-wrong {
  animation: gentle-shake 0.4s ease;
}

.modal-error {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: var(--red);
  font-size: 0.83rem;
  font-weight: 500;
}

.gate-hint {
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 0.75rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}

.modal-actions .btn {
  min-height: 48px;
  padding: 0 18px;
  font-size: 0.9rem;
}

body.modal-open {
  overflow: hidden;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -10vh;
  left: var(--x, 50%);
  width: var(--w, 9px);
  height: var(--h, 15px);
  border-radius: 2px;
  background: var(--color, var(--coral));
  opacity: 0.95;
  animation: confetti-fall var(--duration, 2.6s) var(--delay, 0s) cubic-bezier(0.15, 0.55, 0.45, 1) forwards;
}

/* Simple content pages */
.content-page {
  max-width: 840px;
  margin: 0 auto;
  padding: 54px 28px 90px;
  animation: view-in 0.36s ease both;
}

.content-page h1 {
  margin-bottom: 14px;
  font-size: clamp(2.6rem, 5vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.content-page .lead {
  margin-bottom: 32px;
  color: var(--ink-soft);
  font-size: 1.13rem;
  line-height: 1.65;
}

.content-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.content-card + .content-card {
  margin-top: 18px;
}

.content-card h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.content-card h2:not(:first-child) {
  margin-top: 28px;
}

.content-card p,
.content-card li {
  color: var(--ink-soft);
  line-height: 1.65;
}

.content-card ul,
.content-card ol {
  padding-left: 20px;
}

.content-page h1,
.content-page h2,
.content-page h3 {
  scroll-margin-top: 110px;
}

.content-card a {
  color: var(--teal-dark);
  font-weight: 500;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.feature-list li {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf0;
}

.feature-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* Homepage learning hub */
.learning-hub {
  padding-top: 38px;
  margin-top: 48px;
  border-top: 1px dashed #dfd0b6;
}

.hub-intro {
  max-width: 870px;
  margin: -4px 0 22px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.65;
}

.hub-intro a {
  color: var(--teal-dark);
  font-weight: 500;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.guide-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 4px 0 rgba(92, 74, 45, 0.05);
  text-decoration: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.guide-card:hover {
  border-color: #b8ded5;
  box-shadow: 0 8px 0 rgba(92, 74, 45, 0.06);
  transform: translateY(-3px);
}

.guide-card-kicker {
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.guide-card h3 {
  margin: 0 0 7px;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.guide-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.guide-card-link {
  margin-top: auto;
  padding-top: 16px;
  color: var(--coral-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Editorial guide components */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 23px;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.breadcrumbs a {
  color: var(--teal-dark);
  font-weight: 500;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .crumbs-separator {
  color: #b5aa98;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  margin: -17px 0 27px;
  color: var(--ink-faint);
  font-size: 0.79rem;
}

.guide-meta span + span::before {
  margin-right: 13px;
  color: #c1b6a5;
  content: '·';
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 12px 14px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.7);
}

.toc a {
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
}

.toc a:hover {
  background: var(--teal-soft);
}

.content-card h3 {
  margin: 25px 0 6px;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.content-card p + h3,
.content-card ul + h3,
.content-card .article-takeaway + h3 {
  margin-top: 27px;
}

.content-card ul li {
  margin-bottom: 7px;
}

.content-card li:last-child {
  margin-bottom: 0;
}

.article-takeaway {
  padding: 17px 20px;
  margin: 20px 0;
  border-left: 4px solid var(--yellow);
  border-radius: 0 15px 15px 0;
  color: #5f4b22;
  background: var(--yellow-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-takeaway strong {
  color: var(--ink);
}

.faq-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 16px 30px 16px 3px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  top: 14px;
  right: 4px;
  color: var(--teal-dark);
  content: '+';
  font-size: 1.3rem;
  font-weight: 500;
  transition: transform 0.18s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 0.91rem;
  line-height: 1.65;
}

.guide-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 23px;
  margin-top: 24px;
  border: 1px solid #bce5db;
  border-radius: 21px;
  background: var(--teal-soft);
}

.guide-cta h2,
.guide-cta h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.guide-cta p {
  max-width: 570px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.55;
}

.guide-cta .btn {
  flex: 0 0 auto;
}

.related-guides {
  padding: 25px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: rgba(255, 253, 248, 0.82);
}

.related-guides h2 {
  margin-bottom: 4px;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.related-guides > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.related-card {
  display: block;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf0;
  text-decoration: none;
  transition: border-color 0.18s ease;
}

.related-card:hover {
  border-color: #a6d9cc;
}

.related-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
}

.related-card span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

/* Printable alphabet chart */
.alphabet-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.chart-letter-card {
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  text-align: center;
  break-inside: avoid;
}

.chart-letter-pair {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.chart-letter-pair span:last-child {
  color: var(--coral-dark);
  font-size: 1.55rem;
}

.chart-letter-emoji {
  margin-top: 5px;
  font-size: 1.4rem;
  line-height: 1.2;
}

.chart-letter-word {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.25;
}

.print-note {
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.6;
}

.print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 4px;
}

@media (max-width: 1000px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .learning-hub {
    padding-top: 30px;
    margin-top: 34px;
  }

  .guide-grid,
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-card {
    min-height: 0;
  }

  .guide-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .alphabet-chart {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 470px) {
  .alphabet-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media print {
  body {
    background: #fff;
    background-image: none;
    color: #111;
  }

  .topbar,
  .site-footer,
  .breadcrumbs,
  .toc,
  .print-actions,
  .guide-cta,
  .related-guides,
  .page-actions,
  .guide-meta,
  .skip-link {
    display: none !important;
  }

  .content-page {
    max-width: none;
    padding: 0;
  }

  .content-page h1 {
    font-size: 30pt;
  }

  .content-card {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: #fff;
  }

  .alphabet-chart {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6mm;
  }

  .chart-letter-card {
    border: 1px solid #888;
    box-shadow: none;
  }

  .chart-letter-pair span:last-child {
    color: #333;
  }
}

/* Motion */
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes overlay-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes mascot-bob {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0) rotate(-1deg);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-12px) rotate(1deg);
  }
}

@keyframes emoji-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-6px) rotate(1deg);
  }
}

@keyframes block-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0.65;
    scale: 0.9;
  }
  50% {
    opacity: 1;
    scale: 1.1;
  }
}

@keyframes orbit-spin {
  from {
    transform: translate(-50%, -50%) rotate(0);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes orbit-spin-reverse {
  from {
    transform: translate(-50%, -50%) rotate(35deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(-325deg);
  }
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: rotate(-7deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(-4deg) scale(1);
  }
}

@keyframes number-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(240, 100, 73, 0));
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(240, 100, 73, 0.55));
  }
}

@keyframes sticker-pop {
  0% {
    opacity: 0;
    transform: scale(0.55) rotate(-12deg);
  }
  70% {
    transform: scale(1.08) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes sparkle-float {
  0%,
  100% {
    opacity: 0.4;
    transform: translateY(0) rotate(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-8px) rotate(20deg);
  }
}

@keyframes correct-pop {
  0% {
    transform: scale(0.94);
  }
  55% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes gentle-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px) rotate(-1deg);
  }
  40% {
    transform: translateX(5px) rotate(1deg);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}

@keyframes star-pop {
  0% {
    transform: scale(0.4) rotate(-25deg);
  }
  70% {
    transform: scale(1.25) rotate(8deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes matched-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0px), 112vh, 0) rotate(var(--spin, 540deg));
  }
}

/* Responsive layout */
@media (max-width: 1120px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(370px, 0.92fr);
    min-height: 530px;
  }

  .hero-art {
    min-height: 470px;
  }

  .mascot-svg {
    width: min(32vw, 330px);
  }

  .trace-layout {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 22px;
  }

  .phonics-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 22px;
  }

  .sticker-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 961px) {
  .trace-stage {
    width: min(100%, 528px, calc(83.33vh - 283px));
  }
}

@media (max-width: 960px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
    text-align: center;
  }

  .hero-copy {
    max-width: 760px;
    margin: 0 auto;
  }

  .hero-copy .eyebrow,
  .hero-actions,
  .trust-row {
    justify-content: center;
  }

  .hero-copy h1 {
    font-size: clamp(3.4rem, 9vw, 5.1rem);
  }

  .hero-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-art {
    width: min(100%, 530px);
    min-height: 450px;
    margin: 0 auto;
  }

  .hero-halo {
    width: 390px;
    height: 390px;
  }

  .orbit-one {
    width: 435px;
    height: 435px;
  }

  .orbit-two {
    width: 340px;
    height: 340px;
  }

  .mascot-svg {
    width: 315px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading > p {
    max-width: 300px;
    padding-top: 6px;
  }

  .trace-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .trace-side {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 11px;
    width: min(100%, 650px);
    margin: 0 auto;
  }

  .letter-hint {
    grid-column: 1 / -1;
  }

  .sound-tip {
    display: none;
  }

  .phrase-note {
    display: none;
  }

  .trace-main {
    margin-top: 4px;
  }

  .phonics-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 680px;
  }

  .quiz-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .quiz-side-art {
    display: none;
  }

  .parent-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .parent-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .parent-side .settings-panel {
    grid-row: span 2;
  }

  .parent-footnote {
    grid-column: 1 / -1;
  }

  .sticker-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .sticker-progress-wrap {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .topbar-inner {
    min-height: 72px;
    padding: 10px 17px;
  }

  .view {
    padding: 28px 17px 68px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 0.98rem;
  }

  .brand-name {
    font-size: 1.19rem;
  }

  .star-pill {
    padding: 0 11px;
  }

  .parent-btn {
    padding: 0 12px;
  }

  .parent-btn span {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(2.85rem, 12vw, 4.2rem);
  }

  .hero-lead {
    font-size: 1.03rem;
  }

  .hero-art {
    min-height: 405px;
  }

  .hero-halo {
    width: 330px;
    height: 330px;
  }

  .orbit-one {
    width: min(52vw, 370px);
    height: min(52vw, 370px);
  }

  .orbit-two {
    width: min(40vw, 285px);
    height: min(40vw, 285px);
  }

  .mascot-svg {
    width: 272px;
  }

  .float-block {
    width: 53px;
    height: 53px;
    border-radius: 16px;
    font-size: 1.55rem;
  }

  .block-a {
    right: 1%;
  }

  .block-b {
    right: 7%;
  }

  .block-c {
    left: 1%;
  }

  .hero-bubble {
    left: 4%;
    padding: 9px 13px;
    font-size: 0.88rem;
  }

  .float-star .icon {
    width: 25px;
    height: 25px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    max-width: 490px;
    padding-top: 8px;
  }

  .game-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-card {
    min-height: 220px;
  }

  .game-copy {
    max-width: 70%;
  }

  .home-note {
    flex-wrap: wrap;
    padding: 20px;
  }

  .home-note .btn {
    margin-left: 0;
  }

  .game-header {
    flex-wrap: wrap;
    gap: 11px;
    margin-bottom: 22px;
  }

  .back-btn {
    width: 45px;
    height: 45px;
    border-radius: 14px;
  }

  .game-heading {
    flex-basis: calc(100% - 58px);
  }

  .game-header-actions {
    flex-basis: 100%;
    justify-content: flex-end;
  }

  .case-switch {
    margin-right: auto;
  }

  .trace-stage {
    border-radius: 27px;
  }

  .trace-side {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 9px;
  }

  .letter-hint,
  .sound-tip {
    display: none;
  }

  .trace-controls {
    margin-top: 15px;
  }

  .trace-controls .btn {
    flex: 1;
    min-width: 95px;
    padding: 0 11px;
  }

  .alphabet-strip {
    margin-top: 2px;
  }

  .quiz-card {
    padding: 26px 18px 21px;
    border-radius: 28px;
  }

  .quiz-emoji-wrap {
    width: 105px;
    height: 105px;
    border-radius: 34px;
  }

  .quiz-emoji {
    font-size: 3.6rem;
  }

  .choice-grid {
    gap: 9px;
  }

  .choice-btn {
    min-height: 89px;
    border-radius: 19px;
    font-size: 2.35rem;
  }

  .quiz-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-complete {
    padding: 29px 20px;
    border-radius: 28px;
  }

  .match-board {
    gap: 9px;
  }

  .match-face {
    border-radius: 17px;
  }

  .match-front {
    font-size: 1.8rem;
  }

  .match-front::after {
    width: 48px;
    height: 48px;
  }

  .match-back {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .match-card.is-matched::after {
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
  }

  .match-complete {
    padding: 29px 20px;
  }

  .sticker-hero {
    padding: 20px;
    border-radius: 24px;
  }

  .sticker-hero-icon {
    width: 53px;
    height: 53px;
    border-radius: 17px;
    font-size: 1.6rem;
  }

  .sticker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
  }

  .sticker-card {
    border-radius: 17px;
  }

  .sticker-word {
    font-size: 0.68rem;
  }

  .sticker-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parent-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .parent-side .settings-panel {
    grid-row: auto;
  }

  .letter-report {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }

  .footer-inner {
    flex-wrap: wrap;
    gap: 15px;
    padding: 22px 17px;
  }

  .footer-inner > p {
    order: 3;
    flex-basis: 100%;
  }

  .footer-inner nav {
    gap: 15px;
  }

  .content-page {
    padding: 36px 17px 70px;
  }

  .content-card {
    padding: 22px;
    border-radius: 22px;
  }

  .feature-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal {
    padding: 28px 20px;
    border-radius: 25px;
  }

  .gate-form input {
    width: 88px;
  }
}

@media (max-width: 470px) {
  .top-actions {
    gap: 7px;
  }

  .star-pill {
    min-height: 40px;
    font-size: 0.9rem;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .parent-btn {
    min-height: 40px;
    padding: 0 10px;
  }

  .brand-name span {
    display: none;
  }
  .hero-art {
    min-height: 355px;
  }

  .hero-halo {
    width: 275px;
    height: 275px;
  }

  .orbit-one {
    width: min(52vw, 310px);
    height: min(52vw, 310px);
  }

  .orbit-two {
    width: min(40vw, 240px);
    height: min(40vw, 240px);
  }

  .mascot-svg {
    width: 235px;
  }

  .float-block {
    width: 45px;
    height: 45px;
    border-radius: 13px;
    font-size: 1.25rem;
  }

  .float-star .icon {
    width: 21px;
    height: 21px;
  }

  .hero-bubble {
    top: 4%;
    font-size: 0.8rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 52px;
  }

  .trust-row {
    gap: 7px 13px;
    font-size: 0.8rem;
  }

  .game-copy {
    max-width: 73%;
  }

  .game-copy h3 {
    font-size: 1.47rem;
  }

  .game-copy p {
    font-size: 0.87rem;
  }

  .match-doodle {
    right: 16px;
    transform: scale(0.82) rotate(4deg);
    transform-origin: top right;
  }

  .sound-doodle {
    right: 25px;
    transform: scale(0.85) rotate(-5deg);
  }

  .sticker-doodle {
    right: 27px;
    font-size: 5rem;
  }

  .game-header-actions {
    justify-content: flex-start;
  }

  .case-switch {
    margin-right: auto;
  }

  .game-header-actions .btn span {
    display: none;
  }

  .trace-side {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .word-card {
    padding: 12px;
  }

  .word-emoji {
    width: 53px;
    height: 53px;
    border-radius: 17px;
    font-size: 1.7rem;
  }

  .word-copy strong {
    font-size: 1.12rem;
  }

  .progress-card {
    padding: 15px;
  }

  .trace-stage {
    border-radius: 23px;
  }

  .trace-success {
    padding: 17px;
  }

  .success-sticker {
    width: 62px;
    height: 62px;
    margin-bottom: 8px;
    border-radius: 19px;
    font-size: 2.2rem;
  }

  .trace-success h2 {
    font-size: 1.7rem;
  }

  .trace-success p:not(.eyebrow) {
    margin-bottom: 12px;
    font-size: 0.82rem;
  }

  .success-actions {
    width: 100%;
    flex-direction: column;
  }

  .success-actions .btn {
    width: 100%;
  }

  .trace-controls .btn span {
    display: none;
  }

  .trace-controls .btn {
    min-width: 0;
    flex: 1;
  }

  .letter-chip {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
  }

  .quiz-card > .eyebrow {
    font-size: 0.7rem;
  }

  .quiz-card h2 {
    font-size: 1.48rem;
  }

  .listen-btn {
    font-size: 0.77rem;
  }

  .choice-grid {
    margin-top: 17px;
  }

  .choice-btn {
    min-height: 78px;
    font-size: 2rem;
  }

  .quiz-feedback {
    font-size: 0.8rem;
  }

  .quiz-complete {
    padding: 25px 16px;
  }

  .quiz-complete h2,
  .match-complete h2 {
    font-size: 1.75rem;
  }

  .match-board {
    gap: 7px;
  }

  .match-card {
    border-radius: 16px;
  }

  .match-face {
    border-radius: 13px;
  }

  .match-card.is-matched::after {
    display: none;
  }

  .hud-pill {
    min-height: 42px;
    padding: 0 12px;
  }

  .sticker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sticker-hero h2 {
    font-size: 1.2rem;
  }

  .sticker-hero-copy {
    align-items: flex-start;
  }

  .letter-report {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .panel {
    padding: 18px;
  }

  .parent-intro {
    font-size: 0.92rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner nav {
    flex-wrap: wrap;
    margin-left: 0;
  }

  .toast {
    width: calc(100vw - 32px);
    border-radius: 18px;
  }
}

@media (max-width: 360px) {
  .topbar-inner {
    gap: 10px;
  }

  .brand-name {
    display: none;
  }

  .star-pill {
    padding: 0 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mascot-svg,
  .block-a,
  .block-b,
  .block-c,
  .orbit {
    animation: none !important;
  }
}
