:root {
  --ink: #21323a;
  --muted: #5c6b70;
  --teal: #2f9d9a;
  --teal-dark: #187370;
  --mint: #dff5ec;
  --sun: #ffd36d;
  --coral: #ff8a6b;
  --sky: #d9eefb;
  --lilac: #ece7ff;
  --cream: #fffaf0;
  --paper: #ffffff;
  --line: #dce8e7;
  --shadow: 0 18px 45px rgba(33, 50, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fffdf8 0%, #f8fcfb 45%, #ffffff 100%);
  line-height: 1.6;
}

/* Home page background accents: remove this block to remove the child-friendly shapes. */
body[data-page="home"] main {
  position: relative;
}

body[data-page="home"] main::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.08;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%232f9d9a' d='m24 4 5.3 13.1 14.1 1.1-10.8 9.1 3.4 13.8L24 33.7 12 41.1l3.4-13.8L4.6 18.2l14.1-1.1Z'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23ff8a6b' d='M30 6v25.5a8 8 0 1 1-5-7.4V12h14V6Z'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 48'%3E%3Ctext x='4' y='36' fill='%232f9d9a' font-family='Arial,sans-serif' font-size='34' font-weight='800'%3EABC%3C/text%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 48'%3E%3Cpath fill='%23d9eefb' d='M25 40h37a16 16 0 0 0 0-32 22 22 0 0 0-41-2A17 17 0 0 0 25 40Z'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 48'%3E%3Cpath fill='%23ffd36d' d='M8 9h16c5 0 8 3 8 8v24c0-5-3-8-8-8H8Z'/%3E%3Cpath fill='%232f9d9a' d='M32 17c0-5 3-8 8-8h8v24h-8c-5 0-8 3-8 8Z'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 48'%3E%3Cellipse cx='18' cy='28' rx='8' ry='12' fill='%2321323a' transform='rotate(-18 18 28)'/%3E%3Cellipse cx='31' cy='18' rx='8' ry='12' fill='%2321323a' transform='rotate(-18 31 18)'/%3E%3Cellipse cx='48' cy='30' rx='8' ry='12' fill='%2321323a' transform='rotate(18 48 30)'/%3E%3Cellipse cx='59' cy='19' rx='8' ry='12' fill='%2321323a' transform='rotate(18 59 19)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 48'%3E%3Ctext x='5' y='36' fill='%23ff8a6b' font-family='Arial,sans-serif' font-size='34' font-weight='800'%3E123%3C/text%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 30px, 28px, 58px, 72px, 44px, 42px, 54px;
  background-position: 4% 7%, 94% 10%, 6% 37%, 91% 48%, 13% 82%, 84% 78%, 49% 86%;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid rgba(220, 232, 231, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #dff6ef;
  box-shadow: 0 6px 0 var(--sun);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.28);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--mint);
  color: var(--teal-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero,
.page-hero,
.intro-section,
.feature-band,
.split-section,
.content-grid,
.check-section,
.card-grid,
.video-feature,
.category-grid,
.song-grid,
.contact-layout {
  margin: clamp(2.5rem, 7vw, 5rem) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  margin: clamp(0.75rem, 3vw, 1.6rem) 0 clamp(1rem, 3vw, 2rem);
  padding-block: clamp(0.5rem, 2vw, 1.2rem) 0;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.35rem, 6.4vw, 4.45rem);
  line-height: 0.98;
}

h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.55rem, 4vw, 2.55rem);
  line-height: 1.1;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.hero-text,
.page-hero p,
.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  background: var(--teal);
  color: white;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(47, 157, 154, 0.18);
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button.coral {
  background: var(--coral);
  box-shadow: 0 10px 22px rgba(255, 138, 107, 0.22);
}

.button.soft {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(255, 211, 109, 0.22);
}

.button.small {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
}

.hero-art {
  width: 100%;
  border-radius: 32px;
  background: radial-gradient(circle at 20% 15%, #ffffff 0 14%, transparent 15%), linear-gradient(135deg, var(--sky), var(--mint));
  box-shadow: var(--shadow);
  padding: clamp(1rem, 4vw, 2rem);
  max-width: 470px;
  justify-self: end;
}

.hero-art img {
  width: 100%;
}

.intro-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem;
  align-items: start;
  margin-top: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
}

.feature-band,
.category-grid,
.song-grid,
.resources-grid,
.check-grid,
.mini-grid {
  display: grid;
  gap: 1rem;
}

.feature-band {
  grid-template-columns: repeat(3, 1fr);
}

.feature,
.resource-card,
.category-grid article,
.song-card,
.text-panel,
.contact-card,
.folder-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(33, 50, 58, 0.07);
}

.feature {
  padding: 1.35rem;
}

.feature-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin: 0.9rem 0 0.85rem;
  border-radius: 18px;
  background: #fffdf8;
}

.icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: var(--sun);
  font-weight: 900;
}

.split-section,
.content-grid,
.contact-layout,
.video-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.mini-grid {
  grid-template-columns: repeat(2, 1fr);
}

.mini-grid a {
  padding: 1rem;
  border-radius: 18px;
  background: var(--mint);
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.page-hero {
  padding: clamp(2rem, 7vw, 4.5rem);
  border-radius: 32px;
  background: linear-gradient(135deg, var(--mint), var(--sky) 62%, #fff4cf);
}

body[data-page="resources"] main {
  width: 100%;
  margin: 0;
  overflow: hidden;
}

body[data-page="resources"] main::before,
body[data-page="resources"] main::after {
  display: none;
}

body[data-page="resources"] .books-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: min(760px, calc(100vh - 73px));
  margin: 0;
  border-radius: 0;
  padding: clamp(1.5rem, 4vw, 3rem) max(1rem, calc((100vw - 1120px) / 2)) clamp(5rem, 8vw, 6.5rem);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.88) 0%, rgba(255, 253, 248, 0.58) 42%, rgba(255, 253, 248, 0.12) 78%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.18) 0%, rgba(223, 245, 236, 0.14) 100%),
    url("assets/books-library-background.png") center / cover no-repeat;
  box-shadow: none;
}

.books-hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  border-radius: 28px;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 14px 8px 0 rgba(223, 245, 236, 0.78);
  backdrop-filter: blur(4px);
}

body[data-page="resources"] .books-section,
body[data-page="resources"] .parent-conversion-band {
  width: min(1120px, calc(100% - 2rem));
  margin-right: auto;
  margin-left: auto;
}

body[data-page="about"] main {
  width: 100%;
  margin: 0;
  overflow: hidden;
}

body[data-page="about"] .page-hero.compact,
body[data-page="about"] .about-story,
body[data-page="about"] .parent-conversion-band {
  margin-right: auto;
  margin-left: auto;
}

body[data-page="about"] .page-hero.compact {
  display: grid;
  align-items: end;
  width: 100%;
  max-width: none;
  min-height: min(760px, calc(100vh - 73px));
  margin: 0;
  border-radius: 0;
  padding: clamp(1.5rem, 4vw, 3rem) max(1rem, calc((100vw - 1120px) / 2)) clamp(5rem, 8vw, 6.5rem);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.88) 0%, rgba(255, 253, 248, 0.64) 42%, rgba(255, 253, 248, 0.2) 76%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.22) 0%, rgba(217, 238, 251, 0.2) 100%),
    url("assets/about-residential-background.png") center / cover no-repeat;
  box-shadow: none;
}

body[data-page="about"] .about-story {
  width: min(920px, calc(100% - 3rem));
}

.about-story > h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(3rem, 7vw, 5rem);
}

.founder-photo {
  display: block;
  width: 160px;
  height: auto;
  border-radius: 16px;
  margin-bottom: 0.75rem;
}

.about-story-block p,
.about-story-block li {
  font-size: 1.06rem;
}

body[data-page="songs"] main {
  width: 100%;
  margin: 0;
  overflow: hidden;
}

body[data-page="songs"] .songs-hero {
  display: grid;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: none;
  min-height: min(760px, calc(100vh - 73px));
  margin: 0;
  border-radius: 0;
  padding: clamp(1.5rem, 4vw, 3rem) max(1rem, calc((100vw - 1120px) / 2)) clamp(5rem, 8vw, 6.5rem);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.88) 0%, rgba(255, 253, 248, 0.58) 40%, rgba(255, 253, 248, 0.1) 74%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.18) 0%, rgba(255, 211, 109, 0.08) 100%),
    url("assets/songs-hero-background.png") center / cover no-repeat;
  box-shadow: none;
}

.songs-hero-copy {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(0.45rem, 1vw, 0.7rem);
  width: min(820px, 86vw);
  margin: 0 auto;
  border-radius: 22px;
  padding: clamp(1rem, 2.4vw, 1.6rem) clamp(2rem, 6vw, 4rem);
  background: linear-gradient(180deg, #ffffff, #fff7dc);
  box-shadow: 0 12px 0 rgba(255, 211, 109, 0.7), 0 24px 36px rgba(33, 50, 58, 0.11);
  text-align: center;
  backdrop-filter: none;
  transform: rotate(-1.5deg);
}

.songs-hero-copy::before,
.songs-hero-copy::after {
  position: absolute;
  top: 50%;
  z-index: -1;
  width: clamp(70px, 12vw, 118px);
  height: 78%;
  content: "";
  background: #ffd36d;
  border-radius: 12px;
  box-shadow: 0 10px 0 rgba(220, 141, 24, 0.4);
  transform: translateY(-50%);
}

.songs-hero-copy::before {
  left: calc(clamp(70px, 12vw, 118px) * -0.82);
  clip-path: polygon(0 0, 100% 18%, 100% 82%, 0 100%, 24% 50%);
}

.songs-hero-copy::after {
  right: calc(clamp(70px, 12vw, 118px) * -0.82);
  clip-path: polygon(0 18%, 100% 0, 76% 50%, 100% 100%, 0 82%);
}

.songs-hero-copy h1 {
  max-width: min(760px, 100%);
  margin: 0 auto;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 0.98;
}

.songs-hero-copy > p:not(.eyebrow) {
  width: min(660px, 100%);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 850;
}

body[data-page="songs"] .song-grid {
  width: min(1120px, calc(100% - 2rem));
  margin-right: auto;
  margin-left: auto;
}

.books-hero-character {
  position: absolute;
  right: max(1rem, calc((100vw - 1120px) / 2 + 0.5rem));
  bottom: clamp(-6rem, -5vw, -3.25rem);
  z-index: 1;
  width: clamp(430px, 38vw, 650px);
  max-height: 108%;
  object-fit: contain;
  object-position: bottom right;
  filter: drop-shadow(0 18px 24px rgba(33, 50, 58, 0.14));
}

.page-hero.compact {
  max-width: 920px;
}

.patreon-hero {
  background: linear-gradient(135deg, #fff1de, #ffe3dc 55%, var(--mint));
}

.patreon-message {
  margin: clamp(2rem, 6vw, 4rem) 0;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 14px 32px rgba(33, 50, 58, 0.07);
}

.patreon-message p {
  max-width: 850px;
  color: var(--muted);
  font-size: 1.08rem;
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.9rem, 2vw, 1.2rem);
  margin: clamp(2rem, 6vw, 4rem) 0;
  align-items: stretch;
}

.membership-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 14px 32px rgba(33, 50, 58, 0.08);
}

.membership-card.featured-tier {
  border-color: rgba(47, 157, 154, 0.45);
  background: linear-gradient(180deg, #ffffff, var(--mint));
  box-shadow: 0 18px 38px rgba(47, 157, 154, 0.15);
  transform: translateY(-8px);
}

.membership-card.special-tier {
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 211, 109, 0.38) 0 14%, transparent 15%),
    linear-gradient(180deg, #ffffff, #fff7ee);
}

.membership-badge {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 0.9rem;
  border-radius: 16px;
  background: var(--sun);
  color: var(--ink);
  font-weight: 900;
}

.featured-tier .membership-badge {
  background: var(--teal);
  color: white;
}

.special-tier .membership-badge {
  background: var(--coral);
  color: white;
}

.membership-card h2 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.membership-price {
  margin: 0 0 0.8rem;
  color: var(--teal-dark);
  font-size: 1.15rem;
  font-weight: 900;
}

.membership-card p:not(.membership-price) {
  color: var(--muted);
}

.membership-card ul {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}

.membership-card li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--muted);
  font-weight: 700;
}

.membership-card li::before {
  position: absolute;
  top: 0.12rem;
  left: 0;
  display: grid;
  width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  content: "✓";
  border-radius: 50%;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.membership-card .button {
  width: 100%;
  margin-top: auto;
}

.flashcards-page {
  width: 100%;
  margin: 0;
  overflow: hidden;
  position: relative;
  padding-bottom: 1rem;
}

.flashcards-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  width: 100%;
  max-width: none;
  overflow: hidden;
  min-height: clamp(430px, 44vw, 640px);
  margin: 0;
  border-radius: 0;
  padding: clamp(1.5rem, 4vw, 3rem) max(1rem, calc((100vw - 1120px) / 2)) clamp(4rem, 7vw, 5.5rem);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.88) 0%, rgba(255, 253, 248, 0.54) 42%, rgba(255, 253, 248, 0.1) 78%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.18) 0%, rgba(223, 245, 236, 0.18) 100%),
    url("assets/play-background-arcade.png") center / cover no-repeat;
  backdrop-filter: blur(2px);
  color: #ffffff;
  box-shadow: none;
}

.play-hero-text-image,
.play-hero-anda-image {
  position: relative;
  z-index: 1;
  object-fit: contain;
}

.play-hero-text-image {
  justify-self: start;
  width: min(100%, clamp(560px, 54vw, 760px));
  max-height: min(42vw, 530px);
}

.play-hero-anda-image {
  justify-self: end;
  width: min(100%, 610px);
  max-height: min(33vw, 380px);
}

.play-scorebar {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 8;
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(0.9rem, 2vw, 1.3rem) auto clamp(0.65rem, 1.5vw, 1rem);
  pointer-events: none;
}

.my-stars {
  display: grid;
  min-width: 172px;
  gap: 0.16rem;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  padding: 0.82rem 1.05rem;
  background: linear-gradient(135deg, #0b2d57, #2859c9);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 9px 0 #071d39, 0 18px 30px rgba(33, 50, 58, 0.2);
}

.my-stars > span {
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.my-stars strong {
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
}

.flashcards-hero::after {
  display: none;
}

.flashcard-categories {
  display: grid;
  gap: clamp(1rem, 3vw, 1.4rem);
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(1.4rem, 4vw, 2.2rem) auto 0;
  position: relative;
}

.reset-progress {
  justify-self: end;
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reset-progress:hover,
.reset-progress:focus-visible {
  color: var(--teal-dark);
}

.category-tabs {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  overflow-x: auto;
  padding: 0.25rem 0 0.7rem;
  scroll-padding-inline: 1rem;
}

.category-tab {
  display: inline-flex;
  min-width: max-content;
  min-height: 64px;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(47, 157, 154, 0.22);
  border-radius: 22px;
  padding: 0.52rem 0.86rem 0.52rem 1rem;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(220, 232, 231, 0.72), 0 16px 24px rgba(33, 50, 58, 0.07);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
  position: relative;
  overflow: hidden;
}

.category-tab-copy {
  display: grid;
  gap: 0.06rem;
  text-align: left;
  line-height: 1.05;
}

.category-tab-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.category-tab strong {
  display: grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.82rem;
}

.category-tab.is-active {
  border-color: transparent;
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 6px 0 var(--teal-dark), 0 18px 28px rgba(47, 157, 154, 0.18);
  transform: translateY(-2px);
}

.category-tab.is-active strong {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.category-tab.is-active .category-tab-copy small {
  color: rgba(255, 255, 255, 0.78);
}

.category-tab:hover {
  transform: translateY(-2px);
}

.category-tab:active {
  box-shadow: 0 3px 0 rgba(24, 115, 112, 0.24), 0 8px 16px rgba(33, 50, 58, 0.08);
  transform: translateY(3px) scale(0.98);
}

.category-tab:focus-visible {
  outline: 3px solid rgba(255, 211, 109, 0.88);
  outline-offset: 4px;
}

.category-heading {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: clamp(0.8rem, 2vw, 1rem);
  align-items: center;
  border: 1px solid rgba(47, 157, 154, 0.16);
  border-radius: 26px;
  padding: clamp(0.9rem, 2.6vw, 1.2rem);
  background: linear-gradient(135deg, #ffffff, rgba(223, 245, 236, 0.74));
  box-shadow: 0 10px 0 rgba(47, 157, 154, 0.18), 0 18px 32px rgba(33, 50, 58, 0.06);
}

.category-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.category-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

.game-progress-panel .play-progress {
  min-width: 0;
  border-radius: 22px;
  border-color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(135deg, #0b2d57, #2859c9);
  color: #ffffff;
  box-shadow: 0 8px 0 #071d39, 0 16px 28px rgba(33, 50, 58, 0.12);
}

.game-progress-panel .play-progress strong {
  color: #ffffff;
}

.game-progress-panel .play-progress span {
  color: var(--sun);
}

.platform-nudge {
  display: none;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  position: relative;
  border: 2px solid rgba(255, 211, 109, 0.78);
  border-radius: 24px;
  padding: 0.88rem 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 204, 0.96));
  box-shadow: 0 9px 0 rgba(255, 211, 109, 0.44), 0 18px 28px rgba(33, 50, 58, 0.08);
}

.platform-nudge.is-visible {
  display: grid;
  animation: reward-pop 260ms ease both;
}

.platform-nudge-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sun), #ffad2f);
  color: #ffffff;
  font-size: 1.65rem;
  text-shadow: 0 2px 0 rgba(33, 50, 58, 0.14);
  box-shadow: 0 5px 0 #dc8d18;
}

.platform-nudge strong {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.2;
}

.platform-nudge p {
  margin: 0.16rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.platform-nudge-cta {
  min-height: 46px;
  white-space: nowrap;
  box-shadow: 0 6px 0 #d86149, 0 12px 20px rgba(255, 138, 107, 0.18);
}

.platform-nudge-close {
  position: absolute;
  top: 0.42rem;
  right: 0.5rem;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(33, 50, 58, 0.08);
  color: var(--muted);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.platform-nudge-close:hover,
.platform-nudge-close:focus-visible {
  background: var(--ink);
  color: #ffffff;
}

.play-progress strong {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.1;
}

.play-random-main {
  display: inline-flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  background: var(--coral);
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 7px 0 #d86149, 0 14px 24px rgba(255, 138, 107, 0.2);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.play-random-main span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding-left: 0.16rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.play-random-main:hover {
  transform: translateY(-2px);
}

.play-random-main:active {
  box-shadow: 0 3px 0 #d86149, 0 7px 16px rgba(255, 138, 107, 0.18);
  transform: translateY(4px) scale(0.99);
}

.play-random-main:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: clamp(0.9rem, 2vw, 1.2rem);
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(1.4rem, 4vw, 2.4rem) auto clamp(2rem, 6vw, 4rem);
}

.flashcard-grid.is-empty {
  display: block;
}

.flashcard-grid.is-chooser {
  display: block;
}

.flashcard-grid.is-practice {
  display: block;
}

.flashcard-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(47, 157, 154, 0.24);
  border-radius: 18px;
  background: rgba(223, 245, 236, 0.45);
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 900;
  text-align: center;
}

.flashcard-choice-panel {
  display: grid;
  gap: 1rem;
}

.play-progress {
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(47, 157, 154, 0.14);
  border-radius: 18px;
  padding: 0.72rem 0.82rem;
  background: rgba(223, 245, 236, 0.48);
  color: var(--teal-dark);
  font-weight: 900;
}

.play-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(47, 157, 154, 0.12);
}

.play-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--sun));
  transition: width 220ms ease;
}

.subcategory-tabs {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.45rem;
  scroll-padding-inline: 1rem;
}

.subcategory-tab {
  display: inline-grid;
  min-width: max-content;
  grid-template-columns: 1fr auto;
  gap: 0.05rem 0.55rem;
  align-items: center;
  border: 1px solid rgba(47, 157, 154, 0.2);
  border-radius: 14px;
  padding: 0.56rem 0.72rem;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(33, 50, 58, 0.05);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.subcategory-tab small {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.subcategory-tab strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.8rem;
}

.subcategory-tab.is-active {
  border-color: transparent;
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 7px 0 var(--teal-dark), 0 14px 24px rgba(47, 157, 154, 0.14);
  transform: translateY(-1px);
}

.subcategory-tab.is-active small {
  color: rgba(255, 255, 255, 0.78);
}

.subcategory-tab.is-active strong {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.subcategory-tab:active {
  transform: translateY(3px) scale(0.98);
}

.flashcard-choice-actions,
.practice-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.flashcard-choice-actions {
  align-items: end;
}

.flashcard-choice-actions h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}

.flashcard-choice-actions p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.flashcard-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 2vw, 1rem);
}

.flashcard-choice {
  position: relative;
  display: grid;
  min-height: 220px;
  border: 1px solid rgba(220, 232, 231, 0.92);
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 0 rgba(220, 232, 231, 0.72), 0 18px 24px rgba(33, 50, 58, 0.07);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  overflow: hidden;
}

.flashcard-choice::after {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  font-weight: 900;
  opacity: 0;
  transform: scale(0.8);
  content: "✓";
  transition: opacity 140ms ease, transform 140ms ease;
}

.flashcard-choice.is-complete::after {
  opacity: 1;
  transform: scale(1);
}

.flashcard-choice-main {
  display: grid;
  width: 100%;
  min-height: 220px;
  gap: 0.35rem;
  align-content: start;
  border: 0;
  border-radius: 18px;
  padding: 0.75rem 0.75rem 3.7rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.flashcard-choice:hover,
.flashcard-choice:focus-visible {
  border-color: rgba(47, 157, 154, 0.48);
  box-shadow: 0 6px 0 rgba(47, 157, 154, 0.2), 0 18px 32px rgba(47, 157, 154, 0.12);
  transform: translateY(-2px);
}

.flashcard-choice:active {
  box-shadow: 0 3px 0 rgba(47, 157, 154, 0.16), 0 10px 18px rgba(33, 50, 58, 0.08);
  transform: translateY(4px) scale(0.99);
}

.flashcard-choice-main:focus-visible,
.tile-quick-play:focus-visible,
.subcategory-tab:focus-visible,
.play-random-main:focus-visible,
.flashcard-random:focus-visible,
.flashcard-secondary:focus-visible {
  outline: 3px solid rgba(255, 211, 109, 0.88);
  outline-offset: 4px;
}

.flashcard-choice-main img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  object-position: center;
  transition: transform 160ms ease;
}

.flashcard-choice:hover .flashcard-choice-main img,
.flashcard-choice:focus-within .flashcard-choice-main img {
  transform: translateY(-3px) scale(1.03);
}

.flashcard-choice-main span,
.flashcard-choice-main small {
  overflow-wrap: anywhere;
}

.flashcard-choice-main small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.flashcard-choice-main em {
  justify-self: center;
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
  background: rgba(223, 245, 236, 0.82);
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
}

.tile-quick-play {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  left: 0.7rem;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--teal-dark), 0 8px 18px rgba(47, 157, 154, 0.16);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.tile-quick-play span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding-left: 0.16rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  line-height: 1;
}

.tile-quick-play.is-playing {
  background: var(--coral);
}

.tile-quick-play:active {
  box-shadow: 0 2px 0 var(--teal-dark), 0 5px 12px rgba(47, 157, 154, 0.12);
  transform: translateY(3px) scale(0.98);
}

.tile-quick-play:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.flashcard-random,
.flashcard-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(47, 157, 154, 0.28);
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  background: #ffffff;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(47, 157, 154, 0.18), 0 8px 18px rgba(33, 50, 58, 0.06);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.flashcard-random:active,
.flashcard-secondary:active {
  box-shadow: 0 2px 0 rgba(47, 157, 154, 0.18), 0 5px 12px rgba(33, 50, 58, 0.05);
  transform: translateY(3px) scale(0.98);
}

.flashcard-practice {
  display: grid;
  width: min(520px, 100%);
  gap: 1rem;
  justify-items: stretch;
  margin: 0 auto;
}

.flashcard-progress {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 999px;
  padding: 0.4rem 0.55rem 0.4rem 0.9rem;
  background: rgba(223, 245, 236, 0.72);
  color: var(--teal-dark);
  font-weight: 900;
}

.flashcard-progress strong {
  display: grid;
  min-width: 54px;
  min-height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
}

.practice-card {
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.practice-card.is-complete {
  border-color: rgba(47, 157, 154, 0.58);
  box-shadow: 0 8px 0 rgba(47, 157, 154, 0.18), 0 22px 42px rgba(47, 157, 154, 0.16);
}

.practice-card.is-complete .flashcard-status {
  background: var(--sun);
  color: var(--ink);
}

.flashcard-next {
  display: inline-flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: var(--coral);
  color: #ffffff;
  font: inherit;
  font-size: 1.16rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 7px 0 #d86149, 0 12px 24px rgba(255, 138, 107, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.flashcard-next:active {
  box-shadow: 0 3px 0 #d86149, 0 7px 16px rgba(255, 138, 107, 0.18);
  transform: translateY(4px) scale(0.99);
}

.flashcard-next[hidden] {
  display: none;
}

.flashcard-next:focus-visible {
  outline: 3px solid rgba(255, 211, 109, 0.88);
  outline-offset: 4px;
}

.audio-flashcard {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 360px;
  gap: 1rem;
  align-content: start;
  padding: clamp(1rem, 3vw, 1.3rem);
  border: 1px solid rgba(220, 232, 231, 0.92);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 8px 0 rgba(220, 232, 231, 0.72), 0 18px 32px rgba(33, 50, 58, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.audio-flashcard:hover,
.audio-flashcard:focus-visible,
.audio-flashcard.is-playing {
  border-color: rgba(47, 157, 154, 0.46);
  box-shadow: 0 6px 0 rgba(47, 157, 154, 0.18), 0 18px 38px rgba(47, 157, 154, 0.14);
  transform: translateY(-4px);
}

.audio-flashcard:active {
  transform: translateY(3px) scale(0.99);
}

.audio-flashcard:focus-visible,
.flashcard-play:focus-visible {
  outline: 3px solid rgba(255, 211, 109, 0.88);
  outline-offset: 4px;
}

.flashcard-picture {
  position: relative;
  display: grid;
  min-height: 138px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(220, 232, 231, 0.8);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, var(--mint));
}

.flashcard-picture img {
  width: 100%;
  height: 138px;
  padding: 0.35rem;
  border-radius: 20px;
  object-fit: contain;
  object-position: center;
  transition: transform 170ms ease;
}

.audio-flashcard.is-playing .flashcard-picture img {
  transform: scale(1.035);
}

.wild-animal-card {
  grid-template-rows: auto auto 64px;
}

.wild-animal-card .flashcard-picture {
  min-height: clamp(280px, 34vw, 370px);
  background: #fff;
}

.wild-animal-card .flashcard-picture img {
  height: clamp(280px, 34vw, 370px);
  padding: 0.15rem;
  object-fit: contain;
}

.wild-animal-card .flashcard-copy h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}

.flashcard-copy {
  text-align: center;
}

.flashcard-copy h2 {
  margin-bottom: 0.25rem;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.flashcard-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

.flashcard-status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  margin-top: 0.9rem;
  border-radius: 999px;
  padding: 0.32rem 0.78rem;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 900;
}

.audio-flashcard.is-playing .flashcard-status {
  background: var(--sun);
  color: var(--ink);
}

.flashcard-play {
  display: inline-flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  align-self: end;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 7px 0 var(--teal-dark), 0 10px 22px rgba(47, 157, 154, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.flashcard-play span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding-left: 0.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.55rem;
  line-height: 1;
}

.flashcard-play:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.audio-flashcard.is-playing .flashcard-play {
  background: var(--coral);
  box-shadow: 0 7px 0 #d86149, 0 10px 22px rgba(255, 138, 107, 0.2);
}

.flashcard-play:active {
  box-shadow: 0 3px 0 var(--teal-dark), 0 6px 14px rgba(47, 157, 154, 0.14);
  transform: translateY(4px) scale(0.99);
}

.completion-reward {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 72px;
  height: 72px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6) rotate(-8deg);
}

.completion-reward span {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 211, 109, 0.28);
}

.completion-reward i {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--coral);
}

.completion-reward i:nth-child(2) {
  top: 0;
  left: 27px;
}

.completion-reward i:nth-child(3) {
  right: 4px;
  bottom: 18px;
  background: var(--teal);
}

.completion-reward i:nth-child(4) {
  bottom: 6px;
  left: 8px;
  background: var(--mint);
}

.practice-card.is-complete .completion-reward {
  animation: reward-pop 620ms ease both;
}

.anda-reaction {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  justify-self: center;
  border: 1px solid rgba(47, 157, 154, 0.14);
  border-radius: 999px;
  padding: 0.35rem 0.85rem 0.35rem 0.38rem;
  background: #ffffff;
  color: var(--muted);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(33, 50, 58, 0.06);
  opacity: 0.72;
}

.anda-reaction img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 4px 0 var(--sun);
}

.anda-reaction.is-visible {
  color: var(--teal-dark);
  opacity: 1;
  animation: anda-bob 560ms ease both;
}

.star-burst {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 30;
  width: 110px;
  height: 110px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.star-burst span {
  position: absolute;
  inset: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  font-size: 2.2rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(255, 211, 109, 0.34);
  animation: star-pop 760ms ease both;
}

.star-burst i {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--teal);
  animation: sparkle-fall 760ms ease both;
}

.star-burst i:nth-child(2) {
  top: 12px;
  left: 20px;
  background: var(--coral);
}

.star-burst i:nth-child(3) {
  top: 6px;
  right: 22px;
  background: var(--sun);
}

.star-burst i:nth-child(4) {
  right: 12px;
  bottom: 26px;
}

.star-burst i:nth-child(5) {
  bottom: 12px;
  left: 24px;
  background: var(--coral);
}

.play-celebration {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  pointer-events: none;
}

.play-celebration.is-visible {
  display: grid;
  place-items: center;
}

.play-celebration::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(var(--sun), var(--sun)),
    linear-gradient(var(--teal), var(--teal)),
    linear-gradient(var(--coral), var(--coral)),
    linear-gradient(var(--mint), var(--mint));
  background-repeat: no-repeat;
  background-size: 10px 18px, 12px 12px, 8px 16px, 14px 10px;
  background-position: 18% -5%, 38% -8%, 62% -6%, 82% -5%;
  animation: confetti-fall 1800ms ease-out both;
}

.celebration-card {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: min(320px, calc(100vw - 2rem));
  justify-items: center;
  gap: 0.25rem;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #ffffff, var(--mint));
  color: var(--ink);
  box-shadow: 0 10px 0 var(--teal-dark), 0 22px 42px rgba(33, 50, 58, 0.2);
  animation: reward-pop 720ms ease both;
}

.celebration-card span {
  color: var(--sun);
  font-size: 2.4rem;
  line-height: 1;
  text-shadow: 0 3px 0 #d99523;
}

.celebration-card strong {
  color: var(--teal-dark);
  font-size: 1.35rem;
  text-align: center;
}

.celebration-card small {
  color: var(--coral);
  font-size: 1rem;
  font-weight: 900;
}

@keyframes reward-pop {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }

  52% {
    opacity: 1;
    transform: scale(1.12) rotate(5deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes anda-bob {
  0% {
    transform: translateY(5px);
  }

  55% {
    transform: translateY(-3px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes star-pop {
  0% {
    opacity: 0;
    transform: scale(0.42) rotate(-16deg);
  }

  55% {
    opacity: 1;
    transform: scale(1.12) rotate(8deg);
  }

  100% {
    opacity: 0;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes sparkle-fall {
  0% {
    opacity: 0;
    transform: translateY(-10px) rotate(0deg);
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(42px) rotate(180deg);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    background-position: 18% -5%, 38% -8%, 62% -6%, 82% -5%;
  }

  16% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    background-position: 20% 74%, 36% 86%, 64% 78%, 80% 88%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-tab,
  .subcategory-tab,
  .flashcard-choice,
  .flashcard-choice-main img,
  .tile-quick-play,
  .flashcard-random,
  .flashcard-secondary,
  .play-random-main,
  .audio-flashcard,
  .flashcard-picture img,
  .flashcard-play,
  .flashcard-next,
  .play-progress-track span {
    transition: none;
  }

  .practice-card.is-complete .completion-reward,
  .anda-reaction.is-visible,
  .star-burst span,
  .star-burst i,
  .play-celebration::before,
  .celebration-card {
    animation: none;
  }
}

.icon-water::before {
  width: 72px;
  height: 92px;
  content: "";
  border-radius: 52% 48% 56% 44% / 62% 62% 38% 38%;
  background: linear-gradient(160deg, #8ed8ff, var(--teal));
  transform: rotate(45deg);
  box-shadow: inset 12px 12px 0 rgba(255, 255, 255, 0.32);
}

.icon-cat::before {
  width: 112px;
  height: 92px;
  content: "";
  border-radius: 48% 48% 44% 44%;
  background:
    radial-gradient(circle at 35% 48%, var(--ink) 0 5px, transparent 6px),
    radial-gradient(circle at 65% 48%, var(--ink) 0 5px, transparent 6px),
    radial-gradient(circle at 50% 64%, var(--coral) 0 7px, transparent 8px),
    linear-gradient(135deg, #fff4cf, var(--sun));
  clip-path: polygon(0 22%, 18% 0, 33% 18%, 67% 18%, 82% 0, 100% 22%, 100% 100%, 0 100%);
}

.icon-chair::before {
  width: 106px;
  height: 92px;
  content: "";
  background:
    linear-gradient(var(--teal), var(--teal)) 14px 4px / 78px 48px no-repeat,
    linear-gradient(var(--coral), var(--coral)) 7px 50px / 92px 22px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 18px 70px / 12px 22px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 76px 70px / 12px 22px no-repeat;
  border-radius: 16px;
}

.icon-wave::before {
  width: 92px;
  height: 106px;
  content: "";
  border-radius: 42px 42px 34px 34px;
  background:
    radial-gradient(ellipse at 20% 20%, transparent 0 18px, var(--sun) 19px 27px, transparent 28px),
    radial-gradient(ellipse at 40% 10%, transparent 0 18px, var(--sun) 19px 27px, transparent 28px),
    radial-gradient(ellipse at 60% 14%, transparent 0 18px, var(--sun) 19px 27px, transparent 28px),
    radial-gradient(ellipse at 78% 25%, transparent 0 17px, var(--sun) 18px 26px, transparent 27px),
    linear-gradient(155deg, var(--sun), #ffc45d);
  transform: rotate(-12deg);
}

.icon-speech::before {
  width: 132px;
  height: 88px;
  content: "";
  border-radius: 36px;
  background:
    radial-gradient(circle at 34% 48%, var(--teal) 0 6px, transparent 7px),
    radial-gradient(circle at 50% 48%, var(--teal) 0 6px, transparent 7px),
    radial-gradient(circle at 66% 48%, var(--teal) 0 6px, transparent 7px),
    white;
  box-shadow: 0 10px 0 var(--mint), 0 0 0 4px rgba(47, 157, 154, 0.12);
}

.icon-speech::after {
  position: absolute;
  bottom: 28px;
  left: calc(50% - 42px);
  width: 28px;
  height: 28px;
  content: "";
  background: white;
  transform: rotate(45deg);
}

.flashcard-help {
  margin: clamp(2rem, 6vw, 4rem) 0;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border-radius: 28px;
  background: linear-gradient(135deg, #fffdf8, var(--mint));
  box-shadow: 0 14px 32px rgba(33, 50, 58, 0.07);
}

.flashcard-help p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.1rem;
}

.flashcard-note {
  display: inline-flex;
  margin-bottom: 0;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  background: white;
  color: var(--teal-dark);
  font-weight: 900;
}

.text-panel {
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.about-story {
  display: grid;
  max-width: 920px;
  gap: 1rem;
  margin: clamp(2rem, 6vw, 4rem) 0;
}

.about-story .text-panel {
  background:
    radial-gradient(circle at 96% 0%, rgba(223, 245, 236, 0.58) 0 18%, transparent 19%),
    white;
}

.about-story .text-panel p {
  font-size: 1.06rem;
}

.about-story-block h2 {
  margin-top: clamp(1.3rem, 3vw, 2rem);
}

.about-story-block h2:first-of-type {
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
}

.panel-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 28px;
  background: var(--sky);
}

.check-section {
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 28px;
  background: #f4fbf8;
}

.check-grid {
  grid-template-columns: repeat(4, 1fr);
}

.check-grid span {
  border-radius: 999px;
  padding: 0.72rem 0.9rem;
  background: white;
  border: 1px solid var(--line);
  font-weight: 800;
}

.resources-grid {
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
}

.books-section {
  display: grid;
  gap: 0;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 32px;
  padding: clamp(1rem, 2vw, 1.25rem);
  background: rgba(232, 222, 248, 0.6);
  box-shadow: 0 18px 42px rgba(33, 50, 58, 0.08);
  backdrop-filter: blur(3px);
}

.books-section-heading {
  width: 100%;
  border-radius: 24px 24px 0 0;
  padding: clamp(1rem, 2.5vw, 1.35rem) clamp(1.2rem, 3vw, 2rem);
  background: rgba(244, 238, 252, 0.94);
  border: 1px solid rgba(204, 187, 232, 0.88);
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.books-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.books-section-heading p {
  margin: 0.5rem 0 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.books-section .resources-grid {
  border-radius: 0 0 24px 24px;
  padding: clamp(1rem, 2vw, 1.25rem);
  background: rgba(244, 238, 252, 0.72);
  border: 1px solid rgba(204, 187, 232, 0.88);
  border-top: 0;
}

.book-shop-section {
  gap: 0;
}

.book-shop-section .books-section-heading .eyebrow {
  margin-bottom: 0.25rem;
}

.book-category-group {
  display: grid;
  gap: 0;
}

.book-category-group + .book-category-group {
  margin-top: clamp(1.2rem, 3vw, 2rem);
}

.book-category-group h3 {
  margin: 0;
  padding: 0.95rem clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(204, 187, 232, 0.88);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: rgba(255, 250, 240, 0.92);
  color: var(--ink);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1;
}

.book-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.25rem);
  border-radius: 0 0 24px 24px;
  padding: clamp(1rem, 2vw, 1.25rem);
  background: rgba(244, 238, 252, 0.72);
  border: 1px solid rgba(204, 187, 232, 0.88);
  border-top: 0;
}

.book-product-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: clamp(0.9rem, 2vw, 1.35rem);
  align-items: stretch;
  min-height: 100%;
  padding: clamp(0.85rem, 1.8vw, 1.1rem);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(204, 187, 232, 0.72);
  box-shadow: 0 12px 26px rgba(33, 50, 58, 0.08);
}

.book-product-media {
  display: grid;
  place-items: center;
  height: clamp(330px, 34vw, 620px);
  border-radius: 18px;
  padding: 0.75rem;
  background: linear-gradient(135deg, rgba(223, 245, 236, 0.92), rgba(255, 246, 214, 0.88));
  border: 1px solid rgba(47, 167, 161, 0.18);
}

.book-product-media img.book-cover {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 10px 20px rgba(33, 50, 58, 0.14);
}

.book-product-details {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.book-product-details .book-price-row {
  margin-top: auto;
  align-self: stretch;
}

.book-product-details h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.7vw, 2.15rem);
  line-height: 1;
  align-self: start;
}

.book-product-details p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  font-weight: 750;
  line-height: 1.35;
  align-self: start;
}

.book-interior-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.book-preview-page {
  position: relative;
  display: grid;
  min-height: 104px;
  align-content: end;
  gap: 0.2rem;
  overflow: hidden;
  border-radius: 14px;
  padding: 0.65rem;
  border: 1px solid rgba(33, 50, 58, 0.09);
  color: var(--ink);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.5);
}

.book-preview-page::before,
.book-preview-page::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.book-preview-page::before {
  top: 0.7rem;
  height: 0.72rem;
}

.book-preview-page::after {
  top: 1.8rem;
  width: 58%;
  height: 0.52rem;
}

.book-preview-page strong {
  position: relative;
  z-index: 1;
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-dark);
  font-weight: 950;
}

.book-preview-page em {
  position: relative;
  z-index: 1;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 900;
}

.preview-mint {
  background: #dff5ec;
}

.preview-sun {
  background: #ffe596;
}

.preview-coral {
  background: #ffd3c6;
}

.preview-violet {
  background: #eee5fb;
}

.preview-sky {
  background: #dff4ff;
}

.book-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  align-self: end;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  background: #fff6d6;
  border: 1px solid rgba(255, 207, 92, 0.64);
}

.book-price-row span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.book-price-row strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1;
}

.book-read-button {
  align-self: stretch;
  justify-content: center;
  text-align: center;
}

.book-detail-page {
  width: min(1120px, calc(100% - 2rem));
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.book-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  border-radius: 32px;
  padding: clamp(1.2rem, 3vw, 2rem);
  background:
    linear-gradient(135deg, rgba(223, 245, 236, 0.92), rgba(255, 246, 214, 0.9)),
    url("assets/books-library-background.png") center / cover no-repeat;
  box-shadow: 0 18px 42px rgba(33, 50, 58, 0.08);
}

.book-detail-cover {
  display: grid;
  place-items: center;
  border-radius: 24px;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(47, 167, 161, 0.22);
}

.book-detail-cover img {
  width: min(100%, 430px);
  max-height: 640px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 34px rgba(33, 50, 58, 0.16);
}

.book-detail-copy {
  display: grid;
  gap: 1rem;
  align-content: center;
  border-radius: 26px;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.92);
}

.book-detail-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
}

.book-detail-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.35;
}

.book-preview-section {
  margin-top: clamp(1.25rem, 4vw, 2rem);
  border-radius: 30px;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: rgba(244, 238, 252, 0.72);
  border: 1px solid rgba(204, 187, 232, 0.88);
}

.book-preview-section h2 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.large-previews .book-preview-page {
  min-height: clamp(220px, 28vw, 340px);
  padding: clamp(0.9rem, 2vw, 1.3rem);
  border-radius: 22px;
}

.large-previews .book-preview-page::before {
  top: 1.1rem;
  height: 1.2rem;
}

.large-previews .book-preview-page::after {
  top: 2.9rem;
  height: 0.9rem;
}

.large-previews .book-preview-page strong {
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.35rem;
}

.large-previews .book-preview-page em {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.resource-card,
.song-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.song-card-imibala img.song-cover-full {
  border: 3px solid #ffcf5c;
}

.song-card-loved img.song-cover-full {
  border: 3px solid #ff7f68;
}

.song-card-plate img.song-cover-full {
  border: 3px solid #2fa7a1;
}

.resource-card img,
.song-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
  margin-bottom: 1rem;
  background: var(--sky);
}

.song-card img.song-cover-full {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.resource-card.book-placeholder {
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: clamp(0.9rem, 1.8vw, 1.1rem);
  overflow: hidden;
}

.book-card-title {
  margin: 0;
  min-height: 3.2rem;
  display: grid;
  place-items: center;
  padding: 0.55rem 0.6rem;
  border-radius: 14px 14px 0 0;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(245, 216, 139, 0.72);
  border-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.05;
  text-align: center;
}

.resource-card img.book-cover {
  aspect-ratio: 707 / 1000;
  height: clamp(360px, 42vw, 560px);
  object-fit: contain;
  object-position: center;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.94);
}

.book-cover-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 707 / 1000;
  place-items: center;
  margin-bottom: 0;
  border: 3px dashed rgba(104, 119, 122, 0.26);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(223, 245, 236, 0.92), rgba(255, 250, 240, 0.96)),
    radial-gradient(circle at 76% 18%, rgba(255, 211, 109, 0.42), transparent 24%);
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 900;
}

.square-cover-placeholder {
  aspect-ratio: 1 / 1;
}

.resource-card.book-placeholder .book-card-description {
  margin: 0;
  min-height: 8.5rem;
  display: grid;
  place-items: center;
  padding: clamp(0.7rem, 1.8vw, 1rem) 0.7rem;
  border: 1px solid rgba(245, 216, 139, 0.72);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.resource-card img.book-cover {
  border-radius: 0;
  border: 1px solid rgba(245, 216, 139, 0.72);
}

.song-card .button {
  align-self: flex-start;
  margin-top: auto;
  margin-bottom: 0.75rem;
}

.spotify-button {
  background: #1db954;
}

.resource-card p,
.song-card p,
.category-grid p,
.feature p,
.text-panel p,
.contact-card p,
.folder-card p {
  color: var(--muted);
}

.resource-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.resource-card.featured {
  background: #fff7ee;
}

.youtube-frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.youtube-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.category-grid {
  grid-template-columns: repeat(3, 1fr);
}

.category-grid article {
  padding: 1.25rem;
}

.category-grid span {
  color: var(--coral);
  font-weight: 900;
}

.song-grid {
  grid-template-columns: repeat(4, 1fr);
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.platforms a {
  border-radius: 999px;
  padding: 0.45rem 0.62rem;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.83rem;
  font-weight: 900;
  text-decoration: none;
}

.folder-card {
  position: relative;
  padding: 2rem;
  background: #fff7d9;
}

.folder-tab {
  position: absolute;
  top: -18px;
  left: 24px;
  width: 120px;
  height: 36px;
  border-radius: 16px 16px 0 0;
  background: var(--sun);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: white;
  color: var(--ink);
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid var(--mint);
  border-color: var(--teal);
}

.contact-card {
  padding: 1.6rem;
  background: var(--mint);
}

.form-note {
  min-height: 1.5rem;
  margin: 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 5rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  background: var(--ink);
  color: white;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.simple-footer {
  justify-content: center;
  text-align: center;
}

.simple-footer p {
  max-width: none;
}

/* Home scene storytelling layout */
body[data-page="home"] {
  background: linear-gradient(180deg, #fffdf8 0%, #f8fcfb 42%, #fffaf0 100%);
}

body[data-page="home"] main {
  width: 100%;
  overflow: hidden;
}

.home-scene {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: clamp(3rem, 7vw, 6rem) 1rem;
}

.scene-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero-scene {
  min-height: min(760px, calc(100vh - 73px));
  display: grid;
  align-items: end;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem clamp(5rem, 8vw, 6.5rem);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.86) 0%, rgba(255, 253, 248, 0.58) 38%, rgba(255, 253, 248, 0.12) 70%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.28) 0%, rgba(217, 238, 251, 0.18) 100%),
    url("assets/penguitropolis-hero-background.png") center / cover no-repeat;
}

.hero-scene-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: clamp(480px, 64vw, 650px);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}

.hero-scene .hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  align-self: stretch;
  z-index: 4;
  max-width: none;
  margin-bottom: 0;
  pointer-events: none;
}

.hero-scene .hero-copy h1 {
  position: relative;
  max-width: min(720px, 92vw);
  margin: 0 auto;
  border-radius: 18px;
  padding: clamp(1rem, 2vw, 1.35rem) clamp(2rem, 6vw, 4rem);
  background: linear-gradient(180deg, #ffffff, #fff7dc);
  box-shadow: 0 12px 0 rgba(255, 211, 109, 0.7), 0 24px 36px rgba(33, 50, 58, 0.11);
  text-align: center;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 0.98;
  pointer-events: auto;
  transform: rotate(-1.5deg);
}

.hero-scene .hero-copy h1::before,
.hero-scene .hero-copy h1::after {
  position: absolute;
  top: 50%;
  z-index: -1;
  width: clamp(70px, 12vw, 118px);
  height: 78%;
  content: "";
  background: #ffd36d;
  border-radius: 12px;
  box-shadow: 0 10px 0 rgba(220, 141, 24, 0.4);
  transform: translateY(-50%);
}

.hero-scene .hero-copy h1::before {
  left: calc(clamp(70px, 12vw, 118px) * -0.82);
  clip-path: polygon(0 0, 100% 18%, 100% 82%, 0 100%, 24% 50%);
}

.hero-scene .hero-copy h1::after {
  right: calc(clamp(70px, 12vw, 118px) * -0.82);
  clip-path: polygon(0 18%, 100% 0, 76% 50%, 100% 100%, 0 82%);
}

.hero-scene .button-row {
  width: min(760px, 100%);
  justify-content: center;
  align-self: center;
  margin: 0 auto clamp(-4.8rem, -5vw, -3.4rem);
  pointer-events: auto;
}

.hero-banner-scene {
  position: relative;
  min-height: clamp(300px, 42vw, 500px);
  isolation: isolate;
}

.hero-duo {
  position: absolute;
  right: clamp(-3.75rem, -6vw, -1.25rem);
  bottom: clamp(-2.4rem, -3vw, -1.2rem);
  z-index: 2;
  width: min(165%, 760px);
  max-width: none;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 24px rgba(33, 50, 58, 0.14));
}

.hero-anda-solo {
  right: clamp(2rem, 8vw, 8rem);
  bottom: clamp(-1.5rem, -1vw, -0.5rem);
  width: min(52vw, 500px);
}

.hero-sun {
  position: absolute;
  top: 13%;
  right: 10%;
  width: clamp(72px, 8vw, 116px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 211, 109, 0.58);
  box-shadow: 0 0 0 18px rgba(255, 211, 109, 0.12);
  pointer-events: none;
}

.learning-object {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  animation: soft-float 6.5s ease-in-out infinite;
}

.hero-letter {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  color: white;
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(33, 50, 58, 0.1);
}

.hero-letter-a {
  top: 18%;
  left: 10%;
  background: var(--teal);
}

.hero-letter-b {
  top: 28%;
  right: 12%;
  background: var(--coral);
  animation-delay: -2s;
}

.hero-letter-c {
  right: 36%;
  bottom: 22%;
  background: var(--sun);
  color: var(--ink);
  animation-delay: -3.4s;
}

.hero-note {
  color: var(--teal-dark);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  text-shadow: 0 8px 18px rgba(33, 50, 58, 0.08);
}

.note-one {
  top: 10%;
  right: 34%;
  color: var(--coral);
  animation-delay: -1s;
}

.note-two {
  right: 4%;
  bottom: 42%;
  animation-delay: -3s;
}

.hero-book {
  right: 18%;
  bottom: 13%;
  width: 70px;
  height: 52px;
  border-radius: 6px 6px 14px 14px;
  background:
    linear-gradient(90deg, var(--sun) 0 48%, rgba(255, 255, 255, 0.86) 48% 52%, var(--teal) 52% 100%);
  transform: rotate(8deg);
}

.book-two {
  right: auto;
  bottom: 24%;
  left: 12%;
  width: 58px;
  height: 44px;
  background:
    linear-gradient(90deg, var(--coral) 0 48%, rgba(255, 255, 255, 0.86) 48% 52%, var(--sun) 52% 100%);
  transform: rotate(-10deg);
  animation-delay: -1.7s;
}

.platform-scene {
  padding-block: clamp(2.5rem, 6vw, 4.8rem);
  background: linear-gradient(180deg, #fffdf8 0%, rgba(223, 245, 236, 0.72) 100%);
}

.platform-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  border: 1px solid rgba(47, 157, 154, 0.16);
  border-radius: 30px;
  padding: clamp(1rem, 3vw, 1.6rem);
  background:
    radial-gradient(circle at 9% 18%, rgba(255, 211, 109, 0.24), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(217, 238, 251, 0.7));
  box-shadow: 0 12px 0 rgba(47, 157, 154, 0.16), 0 24px 46px rgba(33, 50, 58, 0.08);
}

.platform-preview-copy h2 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1;
}

.platform-preview-copy p {
  max-width: 58ch;
}

.platform-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.platform-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.platform-steps article {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  min-height: 186px;
  border: 1px solid rgba(47, 157, 154, 0.18);
  border-radius: 20px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 7px 0 rgba(220, 232, 231, 0.8), 0 15px 24px rgba(33, 50, 58, 0.05);
}

.platform-steps span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  background: var(--teal);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: 0 5px 0 var(--teal-dark);
}

.platform-steps article:nth-child(2) span {
  background: var(--coral);
  box-shadow: 0 5px 0 #d86149;
}

.platform-steps article:nth-child(3) span {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 5px 0 #dc8d18;
}

.platform-steps strong {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.1;
}

.platform-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.45;
}

.penguitropolis-scene {
  background:
    linear-gradient(180deg, rgba(223, 245, 236, 0.6), rgba(255, 253, 248, 0.96)),
    url("assets/penguitropolis-park-background.png") center / cover no-repeat;
}

.world-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 2vw, 1rem);
}

.world-place-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(220, 232, 231, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 9px 0 rgba(220, 232, 231, 0.82), 0 18px 32px rgba(33, 50, 58, 0.08);
}

.world-place-card img {
  width: 100%;
  height: 164px;
  object-fit: cover;
}

.world-place-card div {
  display: grid;
  gap: 0.38rem;
  padding: 0.9rem;
}

.world-place-card span {
  justify-self: start;
  border-radius: 999px;
  padding: 0.22rem 0.58rem;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.world-place-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.05;
}

.world-place-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.42;
}

.world-place-card a,
.play-world-grid a {
  justify-self: start;
  margin-top: 0.2rem;
  color: var(--teal-dark);
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.make-scene {
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 211, 109, 0.18), transparent 24%),
    linear-gradient(180deg, #fffaf0, rgba(217, 238, 251, 0.62));
}

.make-hub {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}

.make-copy {
  border-radius: 28px;
  padding: clamp(1rem, 3vw, 1.6rem);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 0 rgba(223, 245, 236, 0.88), 0 22px 40px rgba(33, 50, 58, 0.08);
}

.make-copy h2,
.parent-conversion-band h2,
.world-principles h2,
.play-world-links h2 {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1;
}

.make-card-grid,
.activity-hub-grid,
.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.make-card-grid article,
.activity-hub-grid article,
.principle-grid article {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  border: 1px solid rgba(47, 157, 154, 0.16);
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 0 rgba(220, 232, 231, 0.82), 0 16px 28px rgba(33, 50, 58, 0.07);
}

.make-card-grid span,
.activity-hub-grid span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: var(--sun);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 5px 0 #dc8d18;
}

.make-card-grid h3,
.activity-hub-grid h3,
.principle-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.1;
}

.make-card-grid p,
.activity-hub-grid p,
.principle-grid p,
.parent-conversion-band p,
.play-world-links p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.make-library {
  background: rgba(217, 238, 251, 0.56);
}

.activity-hub-grid {
  padding: clamp(1rem, 2vw, 1.25rem);
  border: 1px solid rgba(204, 187, 232, 0.52);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background: rgba(255, 255, 255, 0.56);
}

.activity-hub-grid article .button {
  margin-top: auto;
}

.parent-conversion-band,
.play-world-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 1.6rem);
  align-items: center;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0;
  border: 1px solid rgba(47, 157, 154, 0.18);
  border-radius: 28px;
  padding: clamp(1rem, 3vw, 1.45rem);
  background:
    radial-gradient(circle at 94% 18%, rgba(255, 211, 109, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(223, 245, 236, 0.84));
  box-shadow: 0 10px 0 rgba(47, 157, 154, 0.16), 0 22px 40px rgba(33, 50, 58, 0.08);
}

body[data-page="flashcards"] .play-world-links {
  width: min(1120px, calc(100% - 2rem));
  margin-right: auto;
  margin-left: auto;
}

.play-world-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 0.65rem;
}

.play-world-grid a {
  display: grid;
  min-height: 70px;
  align-content: center;
  border: 1px solid rgba(47, 157, 154, 0.18);
  border-radius: 18px;
  padding: 0.75rem;
  background: #ffffff;
  color: var(--teal-dark);
  box-shadow: 0 6px 0 rgba(220, 232, 231, 0.82);
  text-decoration: none;
}

.play-world-grid strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

.play-world-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.world-principles {
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(2rem, 5vw, 3.5rem) auto;
}

.principle-grid {
  grid-template-columns: repeat(4, 1fr);
}

.hero-crayon {
  bottom: 10%;
  left: 4%;
  width: 12px;
  height: 82px;
  border-radius: 10px;
  background: var(--coral);
  transform: rotate(-22deg);
  box-shadow: inset 0 10px 0 rgba(255, 255, 255, 0.5);
}

.crayon-two {
  bottom: 8%;
  left: 11%;
  background: var(--teal);
  transform: rotate(-10deg);
  animation-delay: -2.4s;
}

.shape-circle {
  top: 43%;
  left: 2%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sun);
}

.shape-triangle {
  top: 54%;
  right: 9%;
  width: 0;
  height: 0;
  border-right: 18px solid transparent;
  border-bottom: 32px solid var(--teal);
  border-left: 18px solid transparent;
  opacity: 0.78;
}

.shape-square {
  top: 46%;
  right: 34%;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--lilac);
  transform: rotate(14deg);
}

.scene-cloud,
.footer-cloud {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 34px 6px 0 rgba(223, 245, 236, 0.88), 76px 0 0 rgba(255, 255, 255, 0.78);
}

.cloud-one {
  top: 12%;
  left: 7%;
  width: 98px;
  height: 30px;
}

.cloud-two {
  top: 22%;
  right: 12%;
  width: 74px;
  height: 24px;
}

.scene-hill {
  position: absolute;
  bottom: -9vw;
  width: 58vw;
  height: 18vw;
  min-height: 150px;
  border-radius: 50% 50% 0 0;
  background: var(--mint);
  opacity: 0.9;
}

.hill-left {
  left: -16vw;
}

.hill-right {
  right: -13vw;
  background: #fff4cf;
}

.tiny-house {
  position: absolute;
  bottom: clamp(2.2rem, 6vw, 5rem);
  width: 58px;
  height: 48px;
  border-radius: 8px 8px 4px 4px;
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(47, 157, 154, 0.3);
}

.tiny-house::before {
  position: absolute;
  top: -22px;
  left: 6px;
  width: 42px;
  height: 42px;
  content: "";
  background: var(--coral);
  transform: rotate(45deg);
  border-radius: 6px;
}

.tiny-house span {
  position: absolute;
  z-index: 1;
  right: 9px;
  bottom: 0;
  width: 14px;
  height: 24px;
  border-radius: 8px 8px 0 0;
  background: var(--teal);
}

.house-one {
  left: 58%;
}

.house-two {
  left: 66%;
  transform: scale(0.78);
}

.floating-shape {
  position: absolute;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 900;
  color: white;
  animation: soft-float 6s ease-in-out infinite;
}

.letter-a {
  top: 24%;
  left: 38%;
  background: var(--teal);
}

.letter-b {
  top: 66%;
  right: 12%;
  background: var(--coral);
  animation-delay: -2s;
}

.fruit-dot {
  top: 33%;
  right: 7%;
  background: var(--sun);
}

.triangle-dot {
  bottom: 19%;
  left: 44%;
  width: 0;
  height: 0;
  border-right: 20px solid transparent;
  border-bottom: 34px solid var(--coral);
  border-left: 20px solid transparent;
  border-radius: 0;
}

@keyframes soft-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.meet-scene {
  background: linear-gradient(135deg, #fffdf4 0%, #fff4c9 58%, #fff9e7 100%);
}

.meet-grid {
  display: grid;
  grid-template-columns: 0.82fr 1fr 0.78fr;
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: center;
}

.meet-character,
.quick-facts,
.learning-card,
.featured-scene,
.activity-table article,
.character-cards article {
  border: 1px solid rgba(220, 232, 231, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.meet-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  transform: rotate(-2deg);
}

.meet-character img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 22px;
}

.meet-read-more {
  width: fit-content;
  min-width: 160px;
  text-align: center;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 22px;
  background: white;
}

.scene-subtitle {
  color: var(--teal-dark);
  font-weight: 900;
}

.meet-copy p:not(.eyebrow):not(.scene-subtitle) {
  color: var(--muted);
  font-size: 1.05rem;
}

.quick-facts {
  padding: 1.35rem;
  transform: rotate(2deg);
}

.quick-facts h3 {
  font-size: 1.45rem;
}

.quick-facts dl,
.quick-facts dd {
  margin: 0;
}

.quick-facts div {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.quick-facts dt {
  color: var(--teal-dark);
  font-weight: 900;
}

.quick-facts dd {
  color: var(--muted);
}

.learning-scene {
  background: #fffdf8;
}

.learning-scene .scene-inner {
  padding: clamp(1.35rem, 4vw, 2.6rem);
  border-radius: clamp(30px, 5vw, 48px);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(135deg, #ffd36d 0%, #ffc45d 58%, #ffb565 100%);
  box-shadow: 0 22px 48px rgba(255, 181, 101, 0.24);
}

.learning-scene .cloud-heading {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 18px 9px 0 rgba(255, 250, 240, 0.42);
}

body[data-page="home"] .learning-scene {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  background:
    linear-gradient(180deg, #fffdf8 0%, #e8f6fb 42%, #fff4cf 100%);
}

body[data-page="home"] .learning-scene .scene-inner {
  width: min(1180px, 100%);
  padding: 0;
  border: 1px solid rgba(220, 232, 231, 0.9);
  border-radius: clamp(28px, 5vw, 52px);
  background: #d9eefb;
  box-shadow: 0 24px 54px rgba(33, 50, 58, 0.14);
}

body[data-page="home"] .learning-scene .scene-inner::before {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.1;
  content: "";
  background: url("assets/anda-beach-unonkala.png") center / cover no-repeat;
}

body[data-page="home"] .learning-scene .cloud-heading,
body[data-page="home"] .learning-scene .learning-cards {
  display: none;
}

.cloud-heading {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto clamp(1.5rem, 4vw, 2.4rem);
  padding: 1rem clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  border-radius: 999px;
  background: white;
  box-shadow: 28px 10px 0 var(--mint);
}

.cloud-heading .eyebrow {
  margin-bottom: 0.25rem;
}

.cloud-heading h2 {
  margin: 0;
}

.learning-cards,
.character-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.learning-card {
  overflow: hidden;
  padding: 1rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.learning-card:hover,
.activity-table article:hover,
.character-cards article:hover,
.scene-thumb:hover {
  transform: translateY(-4px);
}

.learning-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin: 0.8rem 0;
  border-radius: 22px;
  background: #fffdf8;
}

.learning-card div {
  display: grid;
  gap: 0.8rem;
  padding: 0;
}

.learning-card h3 {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  margin: 0 auto;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: var(--teal);
  color: white;
  font-size: 1rem;
  text-align: center;
}

.learning-card p {
  margin: 0;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: rgba(223, 245, 236, 0.62);
}

.learning-card p,
.activity-table p,
.character-cards p,
.featured-scene p {
  color: var(--muted);
}

.beach-scene {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  background:
    linear-gradient(180deg, #fffdf8 0%, #e8f6fb 42%, #fff4cf 100%);
}

.beach-scene .scene-inner {
  width: min(1180px, 100%);
}

.beach-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(220, 232, 231, 0.9);
  border-radius: clamp(28px, 5vw, 52px);
  background: #d9eefb;
  box-shadow: 0 24px 54px rgba(33, 50, 58, 0.14);
}

.beach-banner::before,
.beach-banner::after {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  content: "";
}

.beach-banner::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(90deg, rgba(255, 250, 240, 0.2), transparent 30%, rgba(255, 250, 240, 0.14));
}

.beach-banner::after {
  right: -6%;
  bottom: -14%;
  left: -6%;
  height: 24%;
  border-radius: 50% 50% 0 0;
  background: rgba(255, 250, 240, 0.62);
  box-shadow: 0 -18px 42px rgba(255, 250, 240, 0.28);
}

.beach-banner img {
  width: 100%;
  aspect-ratio: 16 / 8.1;
  object-fit: cover;
  object-position: center;
}

.world-scene {
  background: linear-gradient(180deg, var(--sky), var(--mint));
}

.video-scene {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.video-scene .scene-inner {
  width: min(1180px, 100%);
}

.featured-video-frame {
  overflow: hidden;
  border: 1px solid rgba(220, 232, 231, 0.92);
  border-radius: clamp(28px, 5vw, 52px);
  background: white;
  box-shadow: 0 24px 54px rgba(33, 50, 58, 0.14);
}

.featured-video-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.world-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: stretch;
}

.featured-scene {
  overflow: hidden;
}

.featured-scene img {
  width: 100%;
  height: clamp(260px, 42vw, 520px);
  object-fit: contain;
  background: white;
}

.featured-scene-copy {
  padding: 1.1rem 1.35rem 1.35rem;
}

.scene-thumbs {
  display: grid;
  gap: 0.75rem;
}

.scene-thumb {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: white;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 900;
  text-align: left;
  box-shadow: 0 10px 18px rgba(33, 50, 58, 0.06);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.scene-thumb.is-active {
  background: var(--sun);
  color: var(--ink);
}

.activity-scene {
  background:
    linear-gradient(90deg, rgba(255, 211, 109, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, #fffaf0, #fffdf8);
  background-size: 48px 48px, auto;
}

.activity-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.activity-table article {
  min-height: 180px;
  padding: 1.2rem;
  transition: transform 180ms ease;
}

.activity-table span {
  display: inline-flex;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.85rem;
  font-weight: 900;
}

.classroom-scene {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  background:
    linear-gradient(180deg, var(--mint) 0%, #fffaf0 48%, #eefaf4 100%);
}

.classroom-scene .scene-inner {
  width: min(1180px, 100%);
}

.classroom-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(220, 232, 231, 0.92);
  border-radius: clamp(28px, 5vw, 52px);
  background: #fffaf0;
  box-shadow: 0 24px 54px rgba(33, 50, 58, 0.14);
}

.classroom-banner::before,
.classroom-banner::after {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  content: "";
}

.classroom-banner::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(90deg, rgba(223, 245, 236, 0.18), transparent 32%, rgba(255, 250, 240, 0.14));
}

.classroom-banner::after {
  right: -6%;
  bottom: -14%;
  left: -6%;
  height: 22%;
  border-radius: 50% 50% 0 0;
  background: rgba(255, 250, 240, 0.5);
  box-shadow: 0 -18px 42px rgba(255, 250, 240, 0.22);
}

.classroom-banner img {
  width: 100%;
  aspect-ratio: 16 / 8.1;
  object-fit: cover;
  object-position: center;
}

.family-scene {
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.46), rgba(217, 238, 251, 0.38)),
    url("assets/family-yard-background.png") center / cover no-repeat;
}

.family-scene::before {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.22);
  content: "";
}

.family-scene::after {
  content: none;
}

.family-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 1440px);
  min-height: clamp(620px, 58vw, 820px);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) clamp(3.5rem, 8vw, 6rem);
}

.family-cloud-heading {
  width: min(660px, 88vw);
  margin: 0 auto clamp(2.5rem, 8vw, 6rem);
  border-radius: 999px;
  padding: clamp(1rem, 2vw, 1.35rem) clamp(1.5rem, 4vw, 3rem);
  background: white;
  box-shadow: 22px 10px 0 rgba(223, 245, 236, 0.88);
  text-align: center;
}

.family-cloud-heading h2 {
  margin: 0;
  color: #4f4c86;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  white-space: nowrap;
}

.family-cloud-heading p {
  margin: 0.45rem 0 0;
  color: #4f4c86;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 900;
}

.community-scene .cloud-heading {
  text-align: center;
}

.community-scene .cloud-heading h2 {
  margin: 0;
}

.community-scene .cloud-heading p {
  margin: 0.45rem 0 0;
  color: #4f4c86;
  font-weight: 900;
}

.family-lineup {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(0.7rem, 1.5vw, 1rem);
}

.family-member {
  display: grid;
  align-content: start;
  overflow: hidden;
  height: 100%;
  min-height: 330px;
  border: 1px solid rgba(220, 232, 231, 0.9);
  border-radius: 28px;
  background: rgba(245, 238, 255, 0.92);
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.character-card-link {
  display: grid;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.character-cards article {
  background: rgba(245, 238, 255, 0.92);
}

.family-member img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.72);
}

.family-member img.family-child {
  object-position: bottom center;
}

.family-member img.family-child-langa {
  padding: 42% 29% 0;
}

.family-member img.family-child-anda {
  padding: 31% 22% 0;
}

.family-member h3 {
  margin: 0;
  padding: 0.8rem 0.7rem 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}

.family-member p {
  margin: 0;
  padding: 0.75rem 0.7rem 1.1rem;
  color: var(--muted);
  font-size: clamp(0.86rem, 1vw, 1rem);
  line-height: 1.45;
}

.family-member .character-card-link > span,
.character-cards .character-card-link > span {
  justify-self: center;
  margin: auto 0 1rem;
  border-radius: 999px;
  padding: 0.36rem 0.75rem;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.84rem;
  font-weight: 900;
}

.family-member:hover,
.character-cards article:hover {
  transform: translateY(-3px);
}

.character-card-link:focus-visible {
  outline: 4px solid rgba(255, 211, 109, 0.9);
  outline-offset: 5px;
  border-radius: 24px;
}

.community-scene {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.46), rgba(217, 238, 251, 0.32)),
    url("assets/penguitropolis-park-background.png") center / cover no-repeat;
}

.community-scene .scene-inner {
  width: min(1360px, 100%);
}

.character-cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.5vw, 1rem);
}

.character-cards article {
  display: grid;
  align-content: start;
  overflow: hidden;
  min-height: 330px;
  text-align: center;
  transition: transform 180ms ease;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
}

.character-cards img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.86);
}

.character-cards h3,
.character-cards p {
  padding-inline: 0.7rem;
}

.character-cards p {
  font-size: clamp(0.86rem, 1vw, 1rem);
  line-height: 1.45;
  padding-bottom: 1.1rem;
}

.character-placeholder {
  border-style: dashed;
}

.character-placeholder-image {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 211, 109, 0.34), transparent 34%),
    rgba(255, 255, 255, 0.72);
  color: rgba(24, 115, 112, 0.52);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
}

.character-placeholder h3,
.character-placeholder p {
  color: rgba(33, 50, 58, 0.62);
}

.character-profile-main {
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(1.5rem, 5vw, 3rem) auto clamp(2rem, 5vw, 3.5rem);
  border-radius: clamp(28px, 5vw, 44px);
  padding: clamp(1rem, 4vw, 2rem);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 0 rgba(47, 157, 154, 0.18), 0 24px 48px rgba(33, 50, 58, 0.1);
  backdrop-filter: blur(3px);
}

.character-profile-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: center;
  margin: 0;
  padding: 0 0 clamp(1rem, 3vw, 1.7rem);
}

.character-portrait-panel {
  display: grid;
  min-height: clamp(360px, 48vw, 560px);
  place-items: end center;
  overflow: hidden;
  border: 1px solid rgba(220, 232, 231, 0.9);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(217, 238, 251, 0.58), rgba(255, 250, 240, 0.92)),
    url("assets/penguitropolis-park-background.png") center / cover no-repeat;
}

.character-portrait-panel img {
  width: min(92%, 420px);
  max-height: 520px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 16px 20px rgba(33, 50, 58, 0.16));
}

.character-profile-copy {
  display: grid;
  gap: 0.95rem;
}

.character-profile-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.95;
}

.character-profile-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  font-weight: 750;
}

.profile-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.profile-fact-grid div {
  border-radius: 18px;
  padding: 0.75rem;
  background: rgba(245, 238, 255, 0.94);
  box-shadow: 0 6px 0 rgba(212, 199, 238, 0.72);
}

.profile-fact-grid dt,
.profile-fact-grid dd {
  margin: 0;
}

.profile-fact-grid dt {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-fact-grid dd {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.character-story-card {
  margin: 0;
  border-top: 0;
  border-radius: 0;
  padding: clamp(0.6rem, 2vw, 1.1rem) 0 0;
  background: transparent;
  box-shadow: none;
}

.character-story-card--wide {
  max-width: 920px;
  margin-inline: auto;
}

.character-story-card h2 {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
}

.character-story-card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-weight: 750;
}

body.anda-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.88) 44%, rgba(255, 255, 255, 0.94)),
    url("assets/anda-profile-park-background.png") center top / cover fixed no-repeat;
}

body.langa-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.66), rgba(255, 253, 248, 0.88) 44%, rgba(255, 255, 255, 0.94)),
    url("assets/penguitropolis-park-background.png") center top / cover fixed no-repeat;
}

body.mama-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.7), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/penguitropolis-neighbourhood.png") center top / cover fixed no-repeat;
}

body.tata-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/penguitropolis-neighbourhood.png") center top / cover fixed no-repeat;
}

body.makhulu-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.7), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/penguitropolis-neighbourhood.png") center top / cover fixed no-repeat;
}

body.tatomkhulu-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/penguitropolis-neighbourhood.png") center top / cover fixed no-repeat;
}

body.fozia-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/family-yard-background.png") center top / cover fixed no-repeat;
}

body.kwanele-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/family-yard-background.png") center top / cover fixed no-repeat;
}

body.zafika-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/family-yard-background.png") center top / cover fixed no-repeat;
}

body.lerato-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/family-yard-background.png") center top / cover fixed no-repeat;
}

body.nate-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/family-yard-background.png") center top / cover fixed no-repeat;
}

body.sinobia-profile-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(255, 253, 248, 0.9) 44%, rgba(255, 255, 255, 0.95)),
    url("assets/family-yard-background.png") center top / cover fixed no-repeat;
}

body.anda-profile-page .character-profile-main,
body.langa-profile-page .character-profile-main,
body.mama-profile-page .character-profile-main,
body.tata-profile-page .character-profile-main,
body.makhulu-profile-page .character-profile-main,
body.tatomkhulu-profile-page .character-profile-main,
body.fozia-profile-page .character-profile-main,
body.kwanele-profile-page .character-profile-main,
body.zafika-profile-page .character-profile-main,
body.lerato-profile-page .character-profile-main,
body.nate-profile-page .character-profile-main,
body.sinobia-profile-page .character-profile-main {
  width: min(1180px, calc(100% - 2rem));
}

.anda-profile-hero,
.langa-profile-hero,
.mama-profile-hero,
.tata-profile-hero,
.makhulu-profile-hero,
.tatomkhulu-profile-hero,
.fozia-profile-hero,
.kwanele-profile-hero,
.zafika-profile-hero,
.lerato-profile-hero,
.nate-profile-hero,
.sinobia-profile-hero {
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  overflow: hidden;
  background: transparent;
  backdrop-filter: none;
}

.anda-hero-portrait,
.langa-hero-portrait,
.mama-hero-portrait,
.tata-hero-portrait,
.makhulu-hero-portrait,
.tatomkhulu-hero-portrait,
.fozia-hero-portrait,
.kwanele-hero-portrait,
.zafika-hero-portrait,
.lerato-hero-portrait,
.nate-hero-portrait,
.sinobia-hero-portrait {
  display: grid;
  min-height: clamp(420px, 54vw, 680px);
  place-items: end center;
}

.anda-hero-portrait img,
.langa-hero-portrait img,
.mama-hero-portrait img,
.tata-hero-portrait img,
.makhulu-hero-portrait img,
.tatomkhulu-hero-portrait img,
.fozia-hero-portrait img,
.kwanele-hero-portrait img,
.zafika-hero-portrait img,
.lerato-hero-portrait img,
.nate-hero-portrait img,
.sinobia-hero-portrait img {
  width: min(100%, 500px);
  max-height: 660px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 18px 22px rgba(33, 50, 58, 0.18));
}

.anda-profile-page .character-profile-copy h1,
.langa-profile-page .character-profile-copy h1,
.mama-profile-page .character-profile-copy h1,
.tata-profile-page .character-profile-copy h1,
.makhulu-profile-page .character-profile-copy h1,
.tatomkhulu-profile-page .character-profile-copy h1,
.fozia-profile-page .character-profile-copy h1,
.kwanele-profile-page .character-profile-copy h1,
.zafika-profile-page .character-profile-copy h1,
.lerato-profile-page .character-profile-copy h1,
.nate-profile-page .character-profile-copy h1,
.sinobia-profile-page .character-profile-copy h1 {
  max-width: 720px;
}

.anda-storybook,
.langa-storybook,
.mama-storybook,
.tata-storybook,
.makhulu-storybook,
.tatomkhulu-storybook,
.fozia-storybook,
.kwanele-storybook,
.zafika-storybook,
.lerato-storybook,
.nate-storybook,
.sinobia-storybook {
  max-width: 980px;
  overflow: auto;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  backdrop-filter: none;
}

.anda-storybook::after,
.langa-storybook::after,
.mama-storybook::after,
.tata-storybook::after,
.makhulu-storybook::after,
.tatomkhulu-storybook::after,
.fozia-storybook::after,
.kwanele-storybook::after,
.zafika-storybook::after,
.lerato-storybook::after,
.nate-storybook::after,
.sinobia-storybook::after {
  display: block;
  clear: both;
  content: "";
}

.anda-storybook h2,
.langa-storybook h2,
.mama-storybook h2,
.tata-storybook h2,
.makhulu-storybook h2,
.tatomkhulu-storybook h2,
.fozia-storybook h2,
.kwanele-storybook h2,
.zafika-storybook h2,
.lerato-storybook h2,
.nate-storybook h2,
.sinobia-storybook h2 {
  margin-bottom: 1rem;
}

.anda-storybook p,
.langa-storybook p,
.mama-storybook p,
.tata-storybook p,
.makhulu-storybook p,
.tatomkhulu-storybook p,
.fozia-storybook p,
.kwanele-storybook p,
.zafika-storybook p,
.lerato-storybook p,
.nate-storybook p,
.sinobia-storybook p {
  color: var(--ink);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.72;
}

.story-illustration {
  width: min(42%, 310px);
  height: auto;
  margin: 0.15rem 0 1rem;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(33, 50, 58, 0.14));
}

.story-illustration--left {
  float: left;
  margin-right: clamp(1rem, 3vw, 1.55rem);
}

.story-illustration--right {
  float: right;
  margin-left: clamp(1rem, 3vw, 1.55rem);
}

.story-illustration--name {
  width: min(46%, 360px);
}

.story-illustration--wide {
  width: min(48%, 390px);
}

.story-illustration--center {
  display: block;
  float: none;
  clear: both;
  width: min(64%, 520px);
  margin: 1.15rem auto 1.45rem;
}

.story-clear-paragraph {
  clear: both;
  padding-top: 0.35rem;
}

.story-final-paragraph {
  clear: both;
  padding-top: 0.45rem;
}

.anda-story-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 2vw, 1rem);
  margin: 0 0 clamp(1.5rem, 4vw, 2.4rem);
}

.anda-story-gallery figure {
  display: grid;
  align-content: space-between;
  min-height: 260px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(220, 232, 231, 0.9);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 211, 109, 0.18), transparent 28%),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 0 rgba(220, 232, 231, 0.82), 0 18px 28px rgba(33, 50, 58, 0.07);
}

.anda-story-gallery img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  object-position: center bottom;
  padding: 0.6rem 0.6rem 0;
}

.anda-story-gallery figcaption {
  min-height: 76px;
  padding: 0.75rem;
  background: rgba(223, 245, 236, 0.74);
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.home-footer-scene {
  position: relative;
  display: block;
  overflow: hidden;
  margin-top: 0;
  padding: 8rem 1rem 2.4rem;
  background: var(--ink);
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1120px, 100%);
  margin: 0 auto;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-inner strong {
  color: white;
  font-size: 1.45rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-links a {
  border-radius: 999px;
  padding: 0.62rem 0.9rem;
  background: var(--sky);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.footer-hills {
  position: absolute;
  top: -70px;
  right: -8vw;
  left: -8vw;
  height: 170px;
  border-radius: 0 0 50% 50%;
  background: var(--mint);
}

.footer-cloud {
  top: 2.1rem;
  left: 9%;
  width: 80px;
  height: 28px;
}

.footer-house {
  position: absolute;
  top: 2.2rem;
  right: 14%;
  width: 70px;
  height: 54px;
  border-radius: 9px;
  background: white;
}

.footer-house::before {
  position: absolute;
  top: -25px;
  left: 11px;
  width: 48px;
  height: 48px;
  content: "";
  border-radius: 7px;
  background: var(--coral);
  transform: rotate(45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .flashcards-hero,
  .category-heading,
  .intro-section,
  .split-section,
  .content-grid,
  .contact-layout,
  .video-feature,
  body[data-page="resources"] .page-hero {
    grid-template-columns: 1fr;
  }

  .feature-band,
  .resources-grid,
  .book-product-grid,
  .flashcard-grid,
  .flashcard-choice-grid,
  .membership-grid,
  .category-grid,
  .song-grid,
  .check-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .membership-card.featured-tier {
    transform: none;
  }

  .hero-scene-grid,
  .meet-grid,
  .make-hub,
  .platform-preview,
  .parent-conversion-band,
  .play-world-links,
  .character-profile-hero,
  .world-gallery {
    grid-template-columns: 1fr;
  }

  .hero-banner-scene {
    min-height: 330px;
  }

  body[data-page="resources"] .books-hero {
    align-items: end;
    min-height: 720px;
    padding-bottom: clamp(13rem, 38vw, 19rem);
  }

  .books-hero-character {
    right: 50%;
    width: clamp(300px, 68vw, 430px);
    max-height: 48%;
    transform: translateX(50%);
  }

  .meet-character,
  .quick-facts {
    transform: none;
  }

  .learning-cards,
  .activity-table,
  .world-hub-grid,
  .platform-steps,
  .make-card-grid,
  .activity-hub-grid,
  .principle-grid,
  .anda-story-gallery,
  .profile-fact-grid,
  .character-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .family-lineup {
    grid-template-columns: repeat(3, 1fr);
  }

  .flashcards-hero {
    min-height: clamp(260px, 48vw, 440px);
  }

  .play-hero-text-image {
    width: min(100%, 620px);
    max-height: min(44vw, 430px);
  }

  .category-heading {
    align-items: stretch;
  }

  .play-random-main {
    width: 100%;
  }

  .play-scorebar {
    justify-content: flex-end;
  }

  .platform-nudge {
    grid-template-columns: auto minmax(0, 1fr);
    padding-right: 2.55rem;
  }

  .platform-nudge-cta {
    grid-column: 1 / -1;
    width: 100%;
  }

  .scene-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-detail-hero {
    grid-template-columns: 1fr;
  }

  .book-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 1.2rem, 1120px);
  }

  .site-header {
    padding-inline: 0.75rem;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .hero-art,
  .page-hero,
  .intro-section,
  .check-section {
    border-radius: 22px;
  }

  .button-row,
  .button {
    width: 100%;
  }

  .hero-scene .button-row {
    width: auto;
    justify-content: center;
  }

  .hero-scene .button {
    width: auto;
  }

  body[data-page="resources"] .books-hero {
    min-height: 680px;
    padding-bottom: clamp(12rem, 54vw, 17rem);
  }

  .books-hero-character {
    width: clamp(260px, 84vw, 360px);
    max-height: 42%;
  }

  .feature-band,
  .resources-grid,
  .book-product-grid,
  .flashcard-grid,
  .flashcard-choice-grid,
  .membership-grid,
  .category-grid,
  .song-grid,
  .check-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .flashcards-page {
    width: 100%;
  }

  .flashcards-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: clamp(2rem, 7vw, 3rem);
  }

  .play-hero-text-image {
    justify-self: center;
    width: min(100%, 560px);
    max-height: none;
  }

  .book-product-card {
    grid-template-columns: 1fr;
  }

  .book-product-grid,
  .large-previews {
    grid-template-columns: 1fr;
  }

  .book-product-media img.book-cover {
    max-height: 360px;
  }

  .category-tab {
    min-height: 58px;
    border-radius: 18px;
  }

  .category-heading {
    border-radius: 22px;
  }

  .play-random-main {
    min-height: 56px;
  }

  .play-scorebar {
    margin-top: 0.75rem;
  }

  .my-stars {
    min-width: 146px;
    border-radius: 22px;
    padding: 0.7rem 0.85rem;
  }

  .my-stars strong {
    font-size: 1.65rem;
  }

  .audio-flashcard {
    min-height: 330px;
  }

  .flashcard-picture {
    min-height: 124px;
  }

  .flashcard-picture img {
    height: 124px;
  }

  .home-scene {
    padding: 2.5rem 0.7rem;
  }

  .hero-scene {
    min-height: auto;
    padding-bottom: 4.8rem;
  }

  .hero-banner-scene {
    min-height: 250px;
  }

  .hero-letter,
  .hero-book,
  .book-two,
  .hero-crayon,
  .shape-square {
    transform: scale(0.86);
  }

  .hero-letter-a {
    top: 12%;
    left: 12%;
  }

  .hero-letter-b {
    right: 8%;
  }

  .note-one {
    top: 5%;
    right: 38%;
  }

  .note-two {
    right: 8%;
    bottom: 36%;
  }

  .cloud-heading {
    width: 100%;
    border-radius: 28px;
    box-shadow: 14px 8px 0 var(--mint);
  }

  .learning-cards,
  .activity-table,
  .family-lineup,
  .world-hub-grid,
  .platform-steps,
  .make-card-grid,
  .activity-hub-grid,
  .principle-grid,
  .anda-story-gallery,
  .profile-fact-grid,
  .character-cards,
  .scene-thumbs {
    grid-template-columns: 1fr;
  }

  .play-world-grid {
    grid-template-columns: 1fr;
  }

  .story-illustration,
  .story-illustration--name,
  .story-illustration--wide {
    float: none;
    width: min(100%, 360px);
    margin: 0.4rem auto 1rem;
  }

  .world-gallery {
    gap: 0.8rem;
  }

  .footer-inner {
    display: grid;
  }

  .site-footer {
    display: grid;
  }
}

/* Keep the complete family visible across screen sizes. */
body[data-page="about"] .about-family-hero {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.culture-reading-guide,
.culture-preview-section {
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}
.culture-reading-guide {
  max-width: 850px;
}
.culture-reading-guide ul {
  padding-left: 1.3rem;
}
.culture-reading-guide li {
  margin-bottom: 1rem;
  line-height: 1.65;
}
.culture-preview-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
}
.culture-preview-gallery figure { margin: 0; }
.culture-preview-gallery a { display: block; border-radius: 12px; }
.culture-preview-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #dce9e6;
  box-shadow: 0 8px 22px rgba(33, 50, 58, 0.08);
}
.culture-preview-gallery figcaption {
  text-align: center;
  padding-top: 0.65rem;
  font-weight: 700;
  color: var(--teal-dark);
}
@media (max-width: 650px) {
  .culture-preview-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.imibala-preview-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 960px;
}
@media (max-width: 550px) {
  .imibala-preview-gallery { grid-template-columns: 1fr; }
}

.rainbow-preview-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 960px;
}
@media (max-width: 650px) {
  .rainbow-preview-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .rainbow-preview-gallery { grid-template-columns: 1fr; }
}

/* Featured culture book on the home page. */
.culture-book-scene { padding: clamp(2.5rem, 6vw, 5rem) 1.25rem; background: linear-gradient(180deg, #dff5ee, #fffaf0); }
.culture-book-feature { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 480px); align-items: center; justify-content: center; gap: clamp(2rem, 6vw, 5rem); }
.culture-book-feature-cover { display: block; width: 100%; }
.culture-book-feature-cover img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 18px 40px #173d3526; }
.culture-book-feature-copy h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.15; margin: 0 0 1rem; }
.culture-book-feature-copy p { line-height: 1.65; }
.culture-book-feature-price { font-size: 1.75rem; font-weight: 800; margin: 1.25rem 0; }
.culture-book-feature-copy .culture-book-order-note { font-size: .9rem; margin-top: .75rem; }
@media (max-width: 650px) {
  .culture-book-feature { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .culture-book-feature-cover { max-width: 320px; margin-inline: auto; }
}

/* Full book spread featured against the Books library backdrop. */
body[data-page="resources"] .books-mockup-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: clamp(1.5rem, 4vw, 3.5rem) 1rem;
}
.books-hero-mockup { display: block; width: min(1120px, 100%); }
.books-hero-mockup img { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 24px rgba(33, 50, 58, .2)); }

.books-mockup-pair {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(.5rem, 2vw, 2rem);
  width: min(1400px, 100%);
}
.books-mockup-pair a { display: block; width: 100%; min-width: 0; }
.books-mockup-pair img { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 24px rgba(33, 50, 58, .2)); }

/* Close the transparent space between the two book mockups. */
.books-mockup-pair { gap: 0; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); }
.books-mockup-pair .books-hero-mockup { width: 117%; margin-left: -14%; }

/* Shared encouragement for every completed learning card, including replays. */
.card-encouragement {
  position: fixed; right: clamp(12px, 3vw, 40px); bottom: 20px; z-index: 1000;
  display: grid; justify-items: center; gap: 6px; pointer-events: none;
  animation: encouragement-appear .25s ease-out;
}
.card-encouragement img { width: clamp(100px, 16vw, 200px); height: auto; max-height: 30vh; object-fit: contain; filter: drop-shadow(0 5px 10px #21323a26); }
.card-encouragement strong { border-radius: 999px; background: #dff5ec; color: #187370; padding: 8px 20px; box-shadow: 0 4px 16px #21323a20; }
@keyframes encouragement-appear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media(prefers-reduced-motion:reduce) { .card-encouragement { animation: none; } }

.greeting-audience { display: block; margin-top: .35rem; font-size: .9rem; font-weight: 500; }

/* Reader covers retain their landscape and square formats. */
.readers-group .book-product-media { height: auto; aspect-ratio: 1; padding: .5rem; }
.readers-group .book-product-media img.book-cover { width: 100%; height: 100%; object-fit: contain; box-shadow: none; }

/* Seasons stays after all other readers, including future additions. */
.readers-group .reader-seasons-last { order: 1; }
