html:has(.garden-home, .challenge-page) { background: #e8f3e8; }
.garden-home, .challenge-page {
  --garden-ink: #24443a;
  --garden-primary: #276a52;
  --garden-shadow: #194836;
  --garden-lavender: #f0e8fb;
}
.garden-home .sky, .challenge-page .sky {
  background:
    radial-gradient(circle, #a8cbb67f 1px, transparent 1.6px) 8px 9px / 27px 27px,
    radial-gradient(ellipse at 65% 9%, #fffcf2 4%, #f2f9ee 60%, #e4f2e8 100%);
}
.garden-home .sky-spark, .challenge-page .sky-spark { background: #a6cdb7; }
.garden-home .sky-spark:nth-child(2), .challenge-page .sky-spark:nth-child(2) { background: #bea8ef; }
.garden-home .sky-spark:nth-child(3), .challenge-page .sky-spark:nth-child(3) { background: #f1c264; }
.garden-home .brand, .challenge-page .brand { color: var(--garden-ink); text-decoration: none; }
.garden-masthead { margin-bottom: 24px; }
.brand-caption { display: grid; gap: 3px; line-height: 1.2; }
.brand-version { color: #496a5a; font-size: .8rem; font-weight: 650; }
.garden-entry {
  padding: 16px;
  border: 1px solid #cfdfd0;
  border-radius: 33px;
  background: #fff;
  box-shadow: 0 16px 48px #496a5420, 0 5px 0 #d3e7d7;
}
.garden-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: 465px;
  overflow: hidden;
  border-radius: 23px;
  background: radial-gradient(ellipse at 95% 10%, #f7f9e2, #edf6e2 47%, #e7f3e6 100%);
}
.garden-copy {
  z-index: 1;
  align-self: center;
  padding: clamp(23px, 5vw, 66px) clamp(20px, 5vw, 63px) clamp(23px, 5vw, 66px) 0;
  color: var(--garden-ink);
}
.garden-copy .garden-age { margin-bottom: 12px; color: #4b6b50; font-weight: 810; }
.garden-copy h1 { font-size: clamp(2.55rem, 6vw, 5rem); font-weight: 940; line-height: 1.19; }
.garden-copy p:not(.garden-age) { margin-top: 17px; color: #39594c; font-size: clamp(.96rem, 2vw, 1.15rem); font-weight: 610; }
.garden-actions, .finish-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 23px; }
.garden-start, .garden-warmup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 13px;
  font-weight: 830;
  text-decoration: none;
}
.garden-start {
  gap: 13px;
  min-width: 148px;
  color: #fff;
  background: var(--garden-primary);
  box-shadow: 0 4px 0 var(--garden-shadow);
}
.garden-start span {
  display: grid;
  width: 27px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: #ffffff31;
  font: 700 1.2rem/1 Arial, sans-serif;
}
.garden-start:hover { background: #347d62; }
.garden-start--warmup {
  --garden-primary: #285f9e;
  --garden-shadow: #1d487a;
}
.garden-start--warmup:hover { background: #316ba9; }
.garden-start--support {
  --garden-primary: #7a3e76;
  --garden-shadow: #572854;
  font-weight: 880;
}
.garden-start--support:hover { background: #8b4987; }
.garden-warmup { min-height: 43px; border: 1px solid #c8dccb; color: #365648; background: #ffffffb8; }
.garden-warmup:hover { background: #fff; }
.garden-picture { position: relative; display: grid; min-width: 0; isolation: isolate; place-items: center; }
.garden-orbit {
  position: absolute;
  z-index: -1;
  width: min(72%, 330px);
  aspect-ratio: 1;
  border: 1px solid #dfccac91;
  border-radius: 50%;
  background: radial-gradient(circle at 31% 22%, #fff6dd, #fbe6bf 76%);
  box-shadow: 0 0 0 13px #fff7d698, 0 0 0 14px #e3d3a83e;
}
.garden-picture img { width: min(95%, 472px); transform: translateY(5%); }
.garden-spark { position: absolute; width: 22px; aspect-ratio: 1; background: #c2a9ee; clip-path: var(--spark-shape); }
.garden-spark:nth-of-type(1) { top: 21%; right: 15%; }
.garden-spark:nth-of-type(2) { bottom: 22%; left: 9%; width: 16px; background: #85bfa3; }
.garden-spark:nth-of-type(3) { top: 16%; left: 16%; width: 13px; background: #e6aa42; }

.support-page .layout { max-width: 850px; }
.support-welcome { background: radial-gradient(ellipse at 93% 8%, #fff5e7, #f7edf9 57%, #efe6f5); }
.support-welcome h1 { font-size: clamp(1.8rem, 5vw, 3.1rem); }
.support-status { line-height: 1.65; overflow-wrap: anywhere; }

.challenge-page .layout { width: min(960px, calc(100% - 48px)); }
.challenge-progress { min-height: 43px; gap: 8px; color: #523b1e; font-size: .84rem; font-weight: 850; }
.challenge-star { display: block; width: 23px; aspect-ratio: 1; background: linear-gradient(140deg, #ffe285, #eea222); clip-path: var(--star-shape); }
.progress-track { display: block; width: 66px; height: 7px; overflow: hidden; border-radius: 8px; background: #dcece1; }
.progress-track::before { display: block; width: var(--completion, 0%); height: 100%; border-radius: inherit; background: #369067; content: ''; }
.challenge-game { padding: clamp(12px, 2vw, 20px); border-color: #d8e8da; box-shadow: 0 13px 47px #345d4321, 0 5px 0 #d6e9da; }
.challenge-intro { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 1fr); gap: 9px; }
.challenge-heading {
  display: grid;
  align-content: center;
  min-height: 124px;
  padding: 15px 21px;
  border: 1px solid #daebd9;
  border-radius: 20px;
  background: radial-gradient(ellipse at 14% 4%, #f4faeb, #e7f5e7 70%);
}
.challenge-heading .step { margin-bottom: 3px; color: #356849; }
.challenge-heading h1 { margin-bottom: 4px; color: #253d38; font-size: clamp(1.33rem, 3.35vw, 2.12rem); font-weight: 920; line-height: 1.39; }
.challenge-heading .instruction { color: #355747; }
.challenge-mascot {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: stretch;
  padding-block-end: 6px;
  overflow: hidden;
  border: 1px solid #e6dcf4;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 55%, #f9f2ff, var(--garden-lavender) 68%);
}
.challenge-mascot .mascot-glow { width: min(62%, 94px); }
.challenge-mascot .mascot { width: min(99%, 165px); }
.challenge-mascot .heart-meter {
  --heart-size: clamp(10px, 2.45vw, 18px);
  gap: clamp(2px, .48vw, 4px);
  padding-inline: clamp(4px, .75vw, 7px);
}
.challenge-mascot .heart-meter--two-rows {
  display: grid;
  grid-template-columns: repeat(5, var(--heart-size));
  border-radius: 12px;
}
.challenge-sample {
  display: grid;
  min-height: 100px;
  min-width: 0;
  margin-top: 11px;
  padding: 10px 8px;
  place-items: center;
  border: 1px solid #dee8f5;
  border-radius: 17px;
  background: radial-gradient(circle at 50% 1%, #fcfdff, #edf5ff 82%);
}
.puzzle-board { margin-top: 12px; padding: 8px 0 0; }
.challenge-game .choices-title { margin-top: 10px; margin-bottom: 9px; }
.challenge-choice { min-height: clamp(96px, 15vh, 151px); }
.challenge-choice:nth-child(1) { --tile: #fff1d5; --tile-border: #efd8a3; --tile-shadow: #e8d099; --halo: #ffe8b4; }
.challenge-choice:nth-child(2) { --tile: #e9f8ef; --tile-border: #c3e4d0; --tile-shadow: #b8dfc8; --halo: #d4efdf; }
.challenge-choice:nth-child(3) { --tile: #f4edff; --tile-border: #decef5; --tile-shadow: #d5c5f1; --halo: #eadcfb; }
.challenge-choice:nth-child(4) { --tile: #ffeff1; --tile-border: #f4cbd2; --tile-shadow: #ecc4cd; --halo: #ffdde7; }
.challenge-choice::before { opacity: .36; }
.challenge-choice .art { height: clamp(68px, 12vh, 107px); }
.challenge-game .game-footer { margin-top: 18px; padding-top: 12px; }
.challenge-game .finish-actions { justify-content: center; margin-top: 6px; }
.challenge-game .finish-actions .next-button { margin-top: 0; }

.is-exam .choice:is(.is-correct, .is-wrong) .choice-mark {
  inset: 50% auto auto 50%;
  width: clamp(36px, 6vw, 53px);
  height: clamp(36px, 6vw, 53px);
  translate: -50% -50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px #20394e52;
  font-size: clamp(23px, 4vw, 36px);
  animation: answer-bounce 500ms ease-out both;
}

.answer-badge {
  position: fixed;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #22825b;
  box-shadow: 0 4px 14px #20394e52;
  color: #fff;
  font: 800 31px/1 system-ui, sans-serif;
  pointer-events: none;
  animation: answer-bounce 500ms ease-out both;
}

.answer-badge[data-reaction='wrong'] { background: #b6546c; }
.answer-shake { animation: answer-shake 360ms ease-out; }
#mascot[data-reaction='correct'] { animation: owl-hop 660ms ease-out; }
#mascot[data-reaction='wrong'] { animation: owl-nod 570ms ease-out; }
.is-exam #next-step:not(:disabled) .next-icon { animation: answer-bounce 480ms ease-out both; }

@keyframes answer-bounce {
  0% { scale: .45; opacity: .4; }
  55% { scale: 1.16; opacity: 1; }
  100% { scale: 1; opacity: 1; }
}

@keyframes answer-shake {
  20%, 60% { translate: 5px 0; }
  40%, 80% { translate: -5px 0; }
}

@keyframes owl-hop {
  30% { translate: 0 -12%; rotate: -8deg; }
  62% { translate: 0 -5%; rotate: 6deg; }
}

@keyframes owl-nod {
  42% { translate: 0 7%; rotate: -7deg; }
  73% { rotate: 4deg; }
}

@media (prefers-reduced-motion: reduce) {
  .answer-badge,
  .answer-shake,
  .is-exam .choice:is(.is-correct, .is-wrong) .choice-mark,
  #mascot[data-reaction],
  .is-exam #next-step:not(:disabled) .next-icon { animation: none; }
}

@media (max-width: 650px) {
  .garden-entry { padding: 11px; border-radius: 25px; }
  .garden-welcome { min-height: 340px; border-radius: 17px; }
  .garden-copy { padding-inline-start: 20px; }
  .garden-copy h1 { font-size: clamp(1.95rem, 7.2vw, 3rem); }
  .garden-actions { gap: 9px; margin-top: 15px; }
  .garden-start, .garden-warmup { min-height: 44px; font-size: .86rem; }
  .challenge-page .layout { width: calc(100% - 24px); }
  .challenge-heading { min-height: 108px; padding: 11px 12px; }
  .challenge-heading, .challenge-mascot { border-radius: 14px; }
}
@media (max-width: 470px) {
  .garden-masthead { margin-bottom: 14px; }
  .garden-welcome { grid-template-columns: 1fr; min-height: 0; }
  .garden-copy { padding: 20px 19px 0; }
  .garden-copy .garden-age { margin-bottom: 5px; font-size: .83rem; }
  .garden-copy h1 br { display: none; }
  .garden-copy h1 { font-size: clamp(1.72rem, 7.8vw, 2.25rem); }
  .garden-copy p:not(.garden-age) { margin-top: 8px; }
  .garden-picture { height: 197px; }
  .garden-orbit { width: 146px; }
  .garden-picture img { width: 236px; }
  .garden-spark:nth-of-type(1) { right: 20%; }
  .garden-spark:nth-of-type(2) { left: 18%; }
  .garden-spark:nth-of-type(3) { left: 22%; }
  .challenge-progress { min-height: 34px; gap: 5px; }
  .challenge-star { width: 17px; }
  .progress-track { width: 38px; height: 5px; }
  .challenge-intro { grid-template-columns: minmax(0, 1fr) 70px; gap: 6px; }
  .challenge-mascot .heart-meter { --heart-size: 10px; gap: 2px; padding: 4px 3px; }
  .challenge-heading .step { font-size: .69rem; }
  .challenge-heading h1 { font-size: clamp(1.1rem, 5vw, 1.33rem); }
  .challenge-heading .instruction { font-size: .79rem; line-height: 1.48; }
  .challenge-sample { min-height: 74px; padding-inline: 4px; }
  .challenge-choice { min-height: 82px; }
  .challenge-choice .art { height: clamp(56px, 17vw, 76px); }
}

.garden-topics { scroll-margin-top: 16px; padding: 22px 8px 8px; }
.garden-topics h2 { margin-bottom: 11px; color: var(--garden-ink); font-size: 1.25rem; font-weight: 880; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.garden-topics .topic-grid { margin: 0; padding: 0; list-style: none; }
.topic-card {
  --topic-bg: #f1f8ed;
  --topic-border: #d3e5d4;
  --icon-bg: #dcefdc;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--topic-border);
  border-radius: 16px;
  background: var(--topic-bg);
  color: #28473c;
  text-decoration: none;
}
a.topic-card:hover { box-shadow: inset 0 0 0 2px var(--topic-border); }
.topic-card--did-you-know { --topic-bg: #e8f6f4; --topic-border: #c8e7e2; --icon-bg: #cdeee8; }
.topic-card--hidden-objects { --topic-bg: #fff2db; --topic-border: #efdcad; --icon-bg: #ffe4a8; }
.topic-card--sounds { --topic-bg: #f4eefc; --topic-border: #e5d7f3; --icon-bg: #ecdbfb; }
.topic-card--change { --topic-bg: #fff1f1; --topic-border: #efd8dc; --icon-bg: #fbe0e5; }
.topic-card--maps { --topic-bg: #eef7fc; --topic-border: #d6e8f3; --icon-bg: #dbeefa; }
.topic-card--science { --topic-bg: #edf8f5; --topic-border: #d3e9e0; --icon-bg: #d8f0e9; }
.topic-card--detective { --topic-bg: #f9f2e7; --topic-border: #ecdfc8; --icon-bg: #f5e4c9; }
.topic-card--clocks { --topic-bg: #fff3e7; --topic-border: #f2dfcb; --icon-bg: #ffebd5; }
.topic-card--shapes { --topic-bg: #eaf7fa; --topic-border: #cde7ed; --icon-bg: #cdeef4; }
.topic-card--numbers { --topic-bg: #f1edfc; --topic-border: #e2d8f5; --icon-bg: #e9dcff; }
.topic-card--animals { --topic-bg: #fff6e6; --topic-border: #f2e2be; --icon-bg: #ffedc8; }
.topic-card--people { --topic-bg: #eef6fa; --topic-border: #d7e8f1; --icon-bg: #ddedf7; }
.topic-card--puzzles { --topic-bg: #fff0f2; --topic-border: #f2d9df; --icon-bg: #fbe0e5; }
.topic-icon {
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 13px;
  background: var(--icon-bg);
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1;
}
.topic-copy { display: grid; line-height: 1.5; }
.topic-copy strong { font-weight: 870; }
.topic-copy > span, .topic-count { color: #425f54; font-size: .82rem; }
.topic-count { font-weight: 750; white-space: nowrap; }
@media (min-width: 651px) { .garden-welcome { min-height: 385px; } }
@media (max-width: 650px) {
  .topic-grid { grid-template-columns: 1fr; }
  .garden-topics { padding-top: 15px; }
  .topic-card { min-height: 65px; }
}
@media (max-width: 420px) {
  .topic-card { gap: 7px; padding: 7px; }
  .topic-copy > span, .topic-count { font-size: .74rem; }
}
