.math-play-page {
  --math-play-ink: #162743;
  --math-play-muted: #617087;
  --math-play-line: #dce5ef;
  --math-play-violet: #6554d9;
  --math-play-blue: #2879c7;
  --math-play-mint: #28a38e;
  --math-play-coral: #e56c62;
}

.math-play-page main { overflow: clip; }

.math-play-page .math-play-section-heading,
.math-play-page .math-play-faq-heading {
  max-width: 56rem;
  margin-inline: auto;
  text-align: center;
}

.math-play-page .math-play-section-heading h2,
.math-play-page .math-play-faq-heading h2 {
  margin: 0;
  color: var(--math-play-ink);
}

.math-play-page .math-play-section-heading p {
  max-width: 46rem;
  margin: .75rem auto 0;
  color: var(--math-play-muted);
}

.math-play-hero {
  padding-bottom: clamp(3.5rem,7vw,6.5rem);
  background:
    radial-gradient(circle at 10% 18%,rgba(103,84,217,.10),transparent 24rem),
    radial-gradient(circle at 88% 76%,rgba(40,163,142,.10),transparent 21rem),
    #fbfcff;
}

.math-play-hero-grid {
  display: grid;
  grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr);
  gap: clamp(1.5rem,3vw,3rem);
  align-items: center;
}

.math-play-hero-grid > * { min-width: 0; }
.math-play-hero-copy { text-align: center; }
.math-play-hero-copy h1 { max-width: 14ch; margin-inline: auto; }
.math-play-hero-copy .direct-answer { max-width: 46rem; margin-inline: auto; }
.math-play-page .zv-actions { justify-content: center; }

.math-play-signals {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .75rem;
  max-width: 34rem;
  margin: 1.5rem auto;
}

.math-play-signals span {
  display: flex;
  min-width: 0;
  min-height: 4.4rem;
  gap: .55rem;
  align-items: center;
  justify-content: center;
  padding: .8rem;
  border: 1px solid var(--math-play-line);
  border-radius: 1.2rem;
  background: rgba(255,255,255,.88);
  color: var(--math-play-ink);
  box-shadow: 0 .55rem 1.35rem rgba(28,47,76,.06);
}

.math-play-signals img { width: 2rem; height: 2rem; object-fit: contain; }

.math-play-image-slot {
  display: grid;
  width: min(100%,52rem);
  min-width: 0;
  margin: 0 auto;
  justify-self: center;
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
  border-radius: 2rem;
  background:
    radial-gradient(circle at 18% 20%,rgba(73,174,218,.22),transparent 11rem),
    radial-gradient(circle at 80% 82%,rgba(103,84,217,.18),transparent 13rem),
    linear-gradient(145deg,#f9fcff,#f0efff);
}

.math-play-image-slot > div {
  display: grid;
  width: 100%;
  min-height: 100%;
  padding: clamp(1.4rem,4vw,3rem);
  place-items: center;
  align-content: center;
  gap: 1rem;
  text-align: center;
}

.math-play-image-slot-art {
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border-radius: 1.45rem;
  background: rgba(255,255,255,.78);
  box-shadow: 0 .8rem 1.7rem rgba(31,48,79,.09);
}

.math-play-image-slot-art img { width: 2.8rem; height: 2.8rem; object-fit: contain; }
.math-play-image-slot figcaption { display: grid; gap: .45rem; max-width: 39rem; color: var(--math-play-muted); }
.math-play-image-slot figcaption strong { color: var(--math-play-ink); font-size: clamp(1.25rem,2vw,1.65rem); }
.math-play-image-slot picture,
.math-play-image-slot picture img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border: 0;
  outline: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.math-play-start { padding-block: clamp(3.5rem,7vw,6rem); background: #fff; }
.math-play-start-panel {
  padding: clamp(1.2rem,3vw,2.5rem);
  border: 1px solid var(--math-play-line);
  border-radius: 2.2rem;
  background: linear-gradient(145deg,#fff,#f8f7ff);
  box-shadow: 0 1rem 2.8rem rgba(30,49,79,.08);
}

.math-play-start-grid,
.math-play-game-grid,
.math-play-help-grid,
.math-play-meaning-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.math-play-start-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.math-play-help-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.math-play-meaning-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }

.math-play-start-card,
.math-play-game-card,
.math-play-help-grid article,
.math-play-meaning-grid article {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  padding: 1.35rem;
  border: 1px solid var(--math-play-line);
  border-top: .25rem solid var(--math-play-violet);
  border-radius: 1.55rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 .65rem 1.5rem rgba(28,47,77,.06);
}

.math-play-start-card:nth-child(2),
.math-play-help-grid article:nth-child(2),
.math-play-meaning-grid article:nth-child(2) { border-top-color: var(--math-play-mint); }
.math-play-start-card:nth-child(3),
.math-play-help-grid article:nth-child(3),
.math-play-meaning-grid article:nth-child(3) { border-top-color: var(--math-play-blue); }
.math-play-start-card:nth-child(4),
.math-play-meaning-grid article:nth-child(4) { border-top-color: var(--math-play-coral); }

.math-play-page .zv-skill-icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin: 0 auto;
  place-items: center;
  align-self: center;
  border-radius: 1.2rem;
  background: #f2f4ff;
}

.math-play-page .zv-skill-icon img { width: 2.45rem; height: 2.45rem; object-fit: contain; }
.math-play-page .zv-skill-card h3 { margin: 1rem 0 .55rem; color: var(--math-play-ink); }
.math-play-page .zv-skill-card p { margin: 0; color: var(--math-play-muted); }

.math-play-start-note,
.math-play-path-note,
.math-play-help-note {
  max-width: 62rem;
  margin: 1.5rem auto 0;
  padding: 1rem 1.25rem;
  border-radius: 1.2rem;
  background: #eef8f6;
  color: var(--math-play-muted);
  text-align: center;
}

.math-play-divider {
  display: grid;
  grid-template-columns: minmax(1rem,1fr) auto auto auto minmax(1rem,1fr);
  gap: .75rem;
  width: min(68rem,calc(100% - 2rem));
  margin: clamp(2rem,5vw,4rem) auto;
  align-items: center;
}

.math-play-divider::before,
.math-play-divider::after {
  content: "";
  height: .18rem;
  border-radius: 999px;
  background: linear-gradient(90deg,transparent,#28a38e,#2879c7,#6554d9,#e56c62);
}

.math-play-divider::before { grid-column: 1; }
.math-play-divider::after { grid-column: 5; transform: scaleX(-1); }
.math-play-divider span {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border: 1px solid #dfe5ef;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 .8rem 1.5rem rgba(27,46,74,.1);
}
.math-play-divider span:nth-of-type(1) { grid-column: 2; }
.math-play-divider span:nth-of-type(2) { grid-column: 3; transform: translateY(-.35rem); }
.math-play-divider span:nth-of-type(3) { grid-column: 4; }
.math-play-divider img { width: 2.3rem; height: 2.3rem; object-fit: contain; }

.math-play-path { padding-block: clamp(3.5rem,7vw,6rem); background: #f7fbfd; }
.math-play-step-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}
.math-play-step-grid li {
  padding: 1.5rem;
  border: 1px solid var(--math-play-line);
  border-radius: 1.65rem;
  background: #fff;
  box-shadow: 0 .75rem 1.7rem rgba(28,47,77,.06);
}
.math-play-step-grid .zv-skill-step-number {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  background: #e9edff;
  color: var(--math-play-violet);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}
.math-play-step-grid h3 { margin: 0 0 .55rem; color: var(--math-play-ink); }
.math-play-step-grid p { margin: 0; color: var(--math-play-muted); }

.math-play-games { padding-block: clamp(3.5rem,7vw,6rem); background: #f6f5ff; }
.math-play-game-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
.math-play-game-card { grid-column: span 2; }
.math-play-game-card:nth-child(2) { border-top-color: var(--math-play-mint); }
.math-play-game-card:nth-child(3) { border-top-color: var(--math-play-blue); }
.math-play-game-card:nth-child(4) { grid-column: 2 / span 2; border-top-color: var(--math-play-coral); }
.math-play-game-card:nth-child(5) { grid-column: 4 / span 2; border-top-color: var(--math-play-violet); }

.math-play-bridge-media { padding-block: clamp(4rem,8vw,7rem); background: #f7fbfd; }
.math-play-bridge-image-slot { width: min(68rem,100%); }

.math-play-mistakes { padding-block: clamp(3.5rem,7vw,6rem); background: #f7fbfd; }
.math-play-meaning { padding-block: clamp(3.5rem,7vw,6rem); background: #fff; }

.math-play-screen-note {
  max-width: 62rem;
  margin: 2rem auto 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--math-play-line);
  border-radius: 1.4rem;
  background: #eef6ff;
  color: var(--math-play-muted);
  text-align: center;
}
.math-play-screen-note strong { color: var(--math-play-ink); font-size: 1.15rem; }
.math-play-screen-note p { margin: .5rem 0 0; }

.math-play-faq { padding-block: clamp(3.5rem,7vw,6rem); background: #f8f8ff; }
.math-play-faq .faq-grid {
  display: grid;
  grid-template-columns: minmax(15rem,.72fr) minmax(0,1.6fr);
  gap: clamp(1.5rem,4vw,4rem);
  align-items: start;
}
.math-play-faq-heading { position: sticky; top: 8rem; }
.math-play-faq-heading::before { content: none !important; }
.math-play-faq-heading .section-kicker { margin-top: .7rem; }
.math-play-faq .faq-list { display: grid; gap: .75rem; }
.math-play-faq .faq-list details {
  overflow: hidden;
  border: 1px solid #dce3ed;
  border-inline-start: .3rem solid var(--math-play-violet);
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 .5rem 1.2rem rgba(28,47,76,.05);
}
.math-play-faq .faq-list details:nth-child(3n + 2) { border-inline-start-color: var(--math-play-mint); }
.math-play-faq .faq-list details:nth-child(3n) { border-inline-start-color: var(--math-play-coral); }
.math-play-faq .faq-list summary { min-height: 4.3rem; padding: 1rem 1.2rem; color: var(--math-play-ink); font-weight: 800; cursor: pointer; }
.math-play-faq .faq-list details p { margin: 0; padding: 0 1.2rem 1.2rem; color: var(--math-play-muted); }

.math-play-final-cta { text-align: center; }
.math-play-final-cta p { max-width: 50rem; margin-inline: auto; }

@media (max-width: 68rem) {
  .math-play-hero-grid { grid-template-columns: minmax(0,1fr); }
  .math-play-hero-copy { order: 1; }
  .math-play-hero-image-slot { order: 2; width: min(100%,46rem); justify-self: center; }
  .math-play-start-grid,
  .math-play-meaning-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .math-play-game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .math-play-game-card,
  .math-play-game-card:nth-child(4),
  .math-play-game-card:nth-child(5) { grid-column: auto; }
  .math-play-game-card:last-child { grid-column: 1 / -1; width: min(100%,34rem); justify-self: center; }
}

@media (max-width: 52rem) {
  .math-play-hero-image-slot { width: min(100%,30rem); margin-inline: auto; }
  .math-play-image-slot { aspect-ratio: 9 / 16; max-height: 44rem; }
  .math-play-step-grid,
  .math-play-help-grid,
  .math-play-meaning-grid { grid-template-columns: 1fr; }
  .math-play-faq .faq-grid { grid-template-columns: 1fr; }
  .math-play-faq-heading { position: static; }
}

@media (max-width: 36rem) {
  .math-play-signals,
  .math-play-start-grid,
  .math-play-game-grid { grid-template-columns: 1fr; }
  .math-play-signals { max-width: 21rem; }
  .math-play-game-card:last-child { grid-column: auto; width: 100%; }
  .math-play-divider { gap: .45rem; }
  .math-play-divider span { width: 3.35rem; height: 3.35rem; border-radius: 1rem; }
  .math-play-divider img { width: 2rem; height: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .math-play-page *,
  .math-play-page *::before,
  .math-play-page *::after { scroll-behavior: auto !important; }
}
.math-play-image-slot.math-play-image-ready {
  aspect-ratio: auto;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.math-play-image-slot.math-play-image-ready::before,
.math-play-image-slot.math-play-image-ready::after { display: none; }
.math-play-image-ready :where(picture, img) {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  object-fit: contain;
}
