/* Child libraries: a shared, responsive layer that leaves home artwork and crop rules alone. */
.child-section-screen {
  --child-ink: var(--ink, #203e4a);
  --child-muted: var(--muted, #617681);
  --child-teal: var(--teal, #087e80);
  --child-deep: var(--deep, #07686c);
  --child-paper: #fffdf6;
  --child-line: #deeaee;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 4px 0 clamp(28px, 4vw, 54px);
  color: var(--child-ink);
}

.child-section-screen .page-heading {
  margin: 8px 0 clamp(18px, 2.6vw, 30px);
}

.child-section-screen .page-heading h1 {
  color: var(--child-deep);
  font: 600 clamp(2rem, 4.5vw, 3.45rem)/1.05 Fredoka, "Trebuchet MS", sans-serif;
  letter-spacing: -.035em;
}

.child-section-screen .page-heading .eyebrow {
  color: var(--child-teal);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .14em;
}

.child-section-screen .page-heading .sub {
  max-width: 680px;
  margin-top: 12px;
  color: var(--child-muted);
  font-size: clamp(.94rem, 1.35vw, 1.06rem);
  line-height: 1.6;
}

.child-section-screen a:focus-visible,
.child-section-screen button:focus-visible {
  outline: 3px solid #d7825a;
  outline-offset: 3px;
}

.child-section-note {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 760px;
  margin: 0 0 22px;
  padding: 12px 15px;
  border: 1px solid #d7e8e1;
  border-radius: 17px 17px 6px 17px;
  background: #edf5eb;
  color: var(--child-muted);
  font-size: .9rem;
  line-height: 1.45;
}

.child-content-entry {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  width: min(100%, 760px);
  min-height: 72px;
  margin: 0 0 22px;
  padding: 12px 16px;
  border: 1px solid #d7e8e1;
  border-radius: 20px;
  background: #edf5eb;
  color: var(--child-deep, #07686c);
  text-decoration: none;
}

.child-content-entry-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  background: #fffdf2;
  color: var(--child-teal, #087e80);
  font-size: 1.45rem;
}

.child-content-entry-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.child-content-entry-copy strong {
  font: 600 1.05rem/1.2 Fredoka, "Trebuchet MS", sans-serif;
}

.child-content-entry-copy small {
  color: var(--child-muted, #617681);
  font-size: .86rem;
  line-height: 1.35;
}

.child-content-entry-arrow {
  justify-self: end;
  font-size: 1.25rem;
}

.child-note-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50% 50% 50% 12px;
  background: #fffdf2;
  color: var(--child-teal);
  font: 600 1rem Fredoka, sans-serif;
}

.child-nav-icon {
  display: block;
  width: 25px;
  height: 25px;
}

.sidebar nav .nav-link[aria-current="page"] {
  color: var(--child-deep);
  background: #e5f1ed;
}

.sidebar nav .nav-link[aria-current="page"] .child-nav-icon-wrap {
  color: var(--child-teal);
}

/* Games */
.game-grid.child-game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.55vw, 20px);
}

.game-grid.child-game-grid .child-game-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  border: 1px solid #dce8e5;
  border-radius: 24px 24px 7px 24px;
  background: var(--child-paper);
  box-shadow: 0 5px 0 #203e4a0a, 0 12px 24px #203e4a08;
  color: var(--child-ink);
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.game-grid.child-game-grid .child-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #203e4a0a, 0 16px 26px #203e4a12;
}

.child-game-art {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(132px, 15vw, 190px);
  overflow: hidden;
  background: var(--card, #e4f4f2);
}

.child-game-art .game-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: normal;
}

.child-game-play,
.child-song-play {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--child-teal);
  color: #fff;
  box-shadow: 0 3px 10px #203e4a26;
}

.child-game-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.child-game-play svg,
.child-song-play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.game-grid.child-game-grid .child-game-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 14px 15px 16px;
}

.child-game-copy .card-kicker {
  margin-bottom: 5px;
  color: var(--child-teal);
  font-size: .65rem;
}

.child-game-copy h2 {
  color: var(--child-ink);
  font: 600 clamp(1.05rem, 1.55vw, 1.38rem)/1.18 Fredoka, "Trebuchet MS", sans-serif;
}

.child-game-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--child-muted);
  font-size: .76rem;
  font-weight: 650;
}

.child-game-status.is-complete {
  color: var(--child-deep);
}

/* Somali learning */
.learn-journey.child-learn-journey { margin: 0; }
.learn-journey-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
}

.learn-journey-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 236px;
  gap: 12px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid #dce8e5;
  border-radius: 23px 23px 7px 23px;
  background: linear-gradient(150deg, #fff 3%, var(--card, #e4f4f2) 100%);
  box-shadow: 0 5px 0 #203e4a08, 0 12px 22px #203e4a08;
  color: var(--child-ink, #203e4a);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.learn-journey-card.learn-category-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  gap: 10px;
  padding: 13px;
}

.learn-category-card .learn-journey-art {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 120px;
  aspect-ratio: 1.55;
}

.learn-category-card .learn-journey-copy {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto minmax(7px, auto) auto;
  grid-template-areas: "title title" "meta meta" "progress progress" "level action";
  align-content: stretch;
  align-items: center;
  gap: 5px;
  padding: 0 5px 3px;
}

.learn-category-card .learn-journey-copy strong {
  grid-area: title;
  min-width: 0;
  max-width: 100%;
  padding-right: 0;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.learn-category-card .learn-journey-level {
  position: static;
  grid-area: level;
  align-self: end;
  justify-self: start;
  top: auto;
  right: auto;
  width: auto;
  height: auto;
  min-height: 25px;
  padding: 3px 8px;
}

.learn-category-card .learn-journey-copy em {
  grid-area: meta;
  margin: 0;
}

.learn-category-card .learn-progress {
  grid-area: progress;
  margin: 2px 0 0;
  background: #dce9e4;
}

.learn-category-card .learn-journey-arrow {
  position: static;
  grid-area: action;
  align-self: end;
  justify-self: end;
  margin: 0;
}

.learn-journey-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #203e4a08, 0 16px 25px #203e4a12;
}

.learn-subcategory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
}

.learn-subcategory-card {
  display: flex;
  min-height: 216px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
}

.learn-subcategory-art {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 120px;
  aspect-ratio: 1.55;
  background: #ffffffa3;
}

.learn-subcategory-card .learn-journey-copy { padding: 0 4px 3px; }
.learn-subcategory-card .learn-journey-copy strong { padding-right: 28px; }
.learn-subcategory-card .learn-journey-arrow { bottom: 14px; }
.learn-subcategory-card:disabled {
  appearance: none;
  width: 100%;
  color: var(--child-ink, #203e4a);
  font: inherit;
  text-align: left;
  cursor: not-allowed;
}
.learn-subcategory-card:disabled:hover {
  transform: none;
  box-shadow: 0 5px 0 #203e4a08, 0 12px 22px #203e4a08;
}
.learn-subcategory-coming-soon {
  color: var(--child-muted, #617681);
  font-size: .78rem;
  font-weight: 750;
}

.learn-subcategory-art > img,
.learn-subcategory-art > picture,
.learn-subcategory-art > svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.learn-subcategory-count {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 7px;
  padding: 4px 9px;
  border: 1px solid #d6e7df;
  border-radius: 999px;
  background: #fffdf2d9;
  color: var(--child-teal, #087e80);
  font-size: .72rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
}

.learn-journey-art {
  position: relative;
  display: grid;
  min-width: 0;
  height: 130px;
  place-items: center;
  overflow: hidden;
  border-radius: 17px 17px 5px 17px;
  background: #ffffff85;
  background-image: radial-gradient(ellipse at 50% 45%, #fffdf2b8 0, #fffdf25c 30%, transparent 72%);
}

.learn-journey-art .learn-journey-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.learn-journey-art .learn-journey-image[data-image-placeholder],
.learn-content-art .learn-content-image[data-image-placeholder] {
  opacity: 0;
  transition: opacity 120ms ease-out;
}

.learn-journey-art .learn-journey-image[data-image-placeholder][data-image-ready="true"],
.learn-content-art .learn-content-image[data-image-placeholder][data-image-ready="true"] {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .learn-journey-art .learn-journey-image[data-image-placeholder],
  .learn-content-art .learn-content-image[data-image-placeholder] {
    transition: none;
  }
}
.learn-journey-level {
  top: 20px;
  right: 20px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  padding: 0;
  background: #fffdf2;
  color: var(--child-deep, #07686c);
  font: 600 .77rem Fredoka, sans-serif;
  box-shadow: 0 2px 7px #203e4a14;
}

.learn-journey-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1px 5px 3px;
}

.learn-journey-copy strong {
  display: block;
  padding-right: 16px;
  color: var(--child-ink, #203e4a);
  font: 600 clamp(1rem, 1.3vw, 1.22rem)/1.15 Fredoka, "Trebuchet MS", sans-serif;
  overflow-wrap: anywhere;
}

.learn-journey-copy em {
  margin-top: 5px;
  color: var(--child-muted, #617681);
  font-size: .73rem;
  font-style: normal;
}

.learn-progress,
.child-book-progress {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #ffffffa8;
}

.learn-progress > span,
.child-book-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67bba0, var(--child-teal, #087e80));
  transition: width .2s ease;
}

.learn-journey-arrow {
  right: 15px;
  bottom: 17px;
  width: 27px;
  height: 27px;
  background: #ffffffb8;
  color: var(--child-teal, #087e80);
}

.learn-category-content {
  display: grid;
  gap: 24px;
}

.learn-content-section {
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid #e0e9e5;
  border-radius: 22px 22px 7px 22px;
  background: #ffffffb8;
}

.learn-content-section > h2 {
  margin: 0 0 13px;
  color: var(--child-deep, #07686c);
  font: 600 1.35rem Fredoka, sans-serif;
}

.learn-content-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.learn-content-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 190px;
  padding: 10px;
  border: 1px solid #dce8e5;
  border-radius: 19px 19px 6px 19px;
  background: #fffdf6;
  color: var(--child-ink, #203e4a);
  text-align: left;
  box-shadow: 0 4px 0 #203e4a08;
}

.learn-content-open {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.learn-content-open:focus-visible {
  border-radius: 14px;
  outline: 3px solid #7653b5;
  outline-offset: 3px;
}

.learn-content-replay-button {
  align-self: center;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 12px 0;
  border: 0;
  background: transparent;
  color: var(--child-teal, #087e80);
  font: 700 .78rem/1.25 Fredoka, sans-serif;
  cursor: pointer;
}

.learn-content-replay-button:hover {
  text-decoration: underline;
}

.learn-content-card.is-known { border-color: #9fc8b5; }

.learn-content-art {
  display: grid;
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: #e6f0e8;
}

.learn-content-art .emoji {
  font-size: 3.65rem;
  line-height: 1;
}

.learn-content-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.learn-content-card strong {
  margin-top: 10px;
  font: 500 1.05rem/1.25 Fredoka, sans-serif;
  overflow-wrap: anywhere;
}

.learn-content-replay {
  margin-top: auto;
  padding-top: 10px;
  color: var(--child-teal, #087e80);
  font-size: .73rem;
  font-weight: 700;
}

.color-disc.learn-content-image,
.color-disc.learn-journey-image,
.color-disc.learn-card-image,
.color-disc.learn-option-art {
  display: block;
  width: min(72%, 90px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--swatch, #ffd765);
  box-shadow: inset 0 0 0 5px #ffffff73, 0 3px 10px #203e4a13;
}

.learn-card-art,
.learn-hero {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.learn-card-art { width: 100%; height: 100%; }
.learn-card-image { width: 100%; height: 100%; object-fit: cover; }
.learn-hero { min-height: 220px; border-radius: 22px; background: #e4f4f2; }
.learn-hero-image { width: min(100%, 520px); max-height: 340px; object-fit: contain; }

.learn-option-art {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 9px;
  object-fit: cover;
  border-radius: 18px 18px 5px 18px;
  background: #e4f4f2;
}

.learn-option .color-disc.learn-option-art {
  width: 70px;
  height: 70px;
  border-radius: 50%;
}

.peek-cover {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, #f2dfad, #f2dfad 13px, #f8ebc8 13px, #f8ebc8 26px);
  color: #775b2a;
  font: 600 1.2rem Fredoka, sans-serif;
}

.peek-art { width: 100%; height: 100%; object-fit: cover; }

/* Picture books and resumable reader */
.book-shelf.child-book-shelf {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(15px, 2vw, 23px);
  margin: 0;
  padding: 0 0 15px;
  border: 0;
}

.child-book-card {
  overflow: hidden;
  border: 1px solid #dce8e5;
  border-radius: 23px 23px 7px 23px;
  background: #fffdf6;
  box-shadow: 0 7px 20px #203e4a0c;
}

.book-cover.child-book-cover {
  position: relative;
  display: block;
  height: clamp(210px, 24vw, 300px);
  overflow: hidden;
  background: #e5f0e8;
}

.child-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.child-book-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, #173b356e);
  content: "";
  pointer-events: none;
}

.child-book-cover-title {
  position: absolute;
  z-index: 1;
  right: 15px;
  bottom: 15px;
  left: 15px;
  padding: 10px 12px;
  border-radius: 4px 14px 14px 14px;
  background: #fffdf2ed;
  color: var(--child-deep, #07686c);
  font: 600 1.12rem/1.2 Fredoka, sans-serif;
}

.book-card-copy.child-book-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 17px;
}

.child-book-copy h2 {
  color: var(--child-ink, #203e4a);
  font: 600 1.35rem/1.15 Fredoka, sans-serif;
}

.child-book-copy p {
  margin-top: 8px;
  color: var(--child-muted, #617681);
  font-size: .88rem;
  line-height: 1.5;
}

.child-book-meta {
  width: 100%;
  margin-top: auto;
  padding-top: 14px;
  color: var(--child-muted, #617681);
  font-size: .77rem;
  font-weight: 700;
}

.child-book-progress {
  margin: 8px 0 0;
  background: #e7eeeb;
}

.child-book-action {
  min-height: 47px;
  margin-top: 15px;
  box-shadow: 0 4px 0 var(--child-deep, #07686c);
}

.child-book-empty {
  grid-column: 1 / -1;
  max-width: 640px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid #deeaee;
  border-radius: 23px;
  background: #fff;
  text-align: center;
}

.child-book-empty-mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 20px 20px 5px 20px;
  background: #e5f1ed;
  color: var(--child-teal, #087e80);
}

.child-book-empty-mark svg {
  width: 38px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.child-book-reader .book-reader-bottom {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto;
  align-items: center;
  gap: 15px;
}

.book-reader-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #dfe9e6;
}

.book-reader-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67bba0, var(--child-teal, #087e80));
  transition: width .2s ease;
}

/* Children's songs */
.child-music-feature {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 0 0 27px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid #125e61;
  border-radius: 23px 23px 7px 23px;
  background: linear-gradient(110deg, #07686c, #118481);
  color: #fff;
}

.child-music-feature h2 {
  font: 600 clamp(1.2rem, 2vw, 1.55rem)/1.2 Fredoka, sans-serif;
}

.child-music-feature p {
  max-width: 700px;
  margin-top: 6px;
  color: #e5f3ed;
  font-size: .91rem;
}

.child-music-mark {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px 18px 5px 18px;
  background: #ffdf77;
  color: #075c5d;
}

.child-music-mark svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.child-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 13px;
}

.child-section-title h2 {
  color: var(--child-deep, #07686c);
  font: 600 1.45rem Fredoka, sans-serif;
}

.child-section-title > span {
  color: var(--child-muted, #617681);
  font-size: .8rem;
}

.song-grid.child-song-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.song-card.child-song-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 38px;
  align-items: center;
  min-width: 0;
  min-height: 136px;
  gap: 14px;
  padding: 11px;
  border: 1px solid #dce8e5;
  border-radius: 21px 21px 6px 21px;
  background: #fffdf6;
  color: var(--child-ink, #203e4a);
  text-align: left;
  box-shadow: 0 4px 0 #203e4a08;
  transition: transform .18s ease, box-shadow .18s ease;
}

.song-card.child-song-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px #203e4a12;
}

.song-card-art.child-song-art {
  width: 120px;
  height: 112px;
  overflow: hidden;
  border-radius: 15px 15px 4px 15px;
  background: var(--card, #e4f4f2);
}

.child-song-art .song-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-card-copy.child-song-copy { min-width: 0; }
.child-song-copy .card-kicker { margin-bottom: 4px; color: var(--child-teal, #087e80); }
.child-song-copy strong {
  display: block;
  color: var(--child-ink, #203e4a);
  font: 600 1.13rem/1.17 Fredoka, sans-serif;
  overflow-wrap: anywhere;
}

.child-song-copy .song-creator,
.child-song-copy small {
  display: block;
  margin-top: 4px;
  color: var(--child-muted, #617681);
  font-size: .75rem;
  line-height: 1.35;
}

.child-song-play {
  width: 35px;
  height: 35px;
  border: 0;
}

.external-note.child-song-note {
  margin: 12px 0 29px;
  color: var(--child-muted, #617681);
  font-size: .78rem;
}

.child-chant-section { margin-top: 12px; }
.chant-grid.child-chant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.chant-card.child-chant-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 13px;
  border: 1px solid #dce8e5;
  border-radius: 20px 20px 6px 20px;
  background: #fffdf6;
  color: var(--child-ink, #203e4a);
  text-align: left;
}

.chant-card-art {
  display: block;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border-radius: 50% 50% 50% 14px;
  background: #e4f4f2;
}

.chant-card-image,
.chant-reader-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chant-card-copy { min-width: 0; }
.chant-card-copy h3 {
  color: var(--child-deep, #07686c);
  font: 600 1.08rem/1.2 Fredoka, sans-serif;
}

.chant-card-copy p {
  margin-top: 3px;
  color: var(--child-muted, #617681);
  font-size: .85rem;
}

.chant-card-copy b {
  display: inline-block;
  margin-top: 8px;
  color: var(--child-teal, #087e80);
  font-size: .75rem;
}

.chant-reader.child-chant-reader {
  display: grid;
  grid-template-columns: minmax(150px, .65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 20px;
  max-width: 950px;
  padding: clamp(17px, 3vw, 30px);
  border: 1px solid #dce8e5;
  border-radius: 25px 25px 7px 25px;
  background: #fffdf6;
  box-shadow: 0 10px 26px #203e4a0b;
}

.child-chant-reader .chant-mascot {
  display: block;
  width: min(100%, 230px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50% 50% 50% 16px;
  background: #e4f4f2;
}

.child-chant-reader .chant-lines,
.child-chant-reader .center,
.child-chant-reader .gentle-note { grid-column: 2; }

.child-chant-reader .chant-lines > div {
  padding: 11px 13px;
  border-bottom: 1px solid #e7eeeb;
  font-size: 1rem;
}

.child-chant-reader .chant-lines > div.singing {
  border-radius: 12px;
  background: #edf5eb;
}

.song-player-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
}

#dialog #video-host {
  width: 100%;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 15px;
  background: #102f3a;
}

#dialog .song-player-embed,
#dialog .song-player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #102f3a;
}

.song-player-navigation button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #d8e6e2;
  border-radius: 999px;
  background: #edf5eb;
  color: var(--child-deep, #07686c);
  font-weight: 700;
}

.song-player-navigation button:disabled { opacity: .45; }
.song-player-navigation .song-player-back {
  border-color: transparent;
  background: transparent;
  color: var(--child-muted, #617681);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 1120px) {
  .song-grid.child-song-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .game-grid.child-game-grid,
  .learn-journey-grid,
  .learn-subcategory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .learn-content-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-shelf.child-book-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .game-grid.child-game-grid,
  .learn-journey-grid,
  .learn-subcategory-grid,
  .learn-content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-grid.child-game-grid { gap: 11px; }
  .child-game-art { height: clamp(112px, 34vw, 155px); }
  .game-grid.child-game-grid .child-game-copy { padding: 11px 12px 13px; }
  .child-game-copy h2 { font-size: 1.05rem; }
  .child-game-status { font-size: .69rem; }
  .learn-journey-card { min-height: 205px; padding: 10px; gap: 9px; }
  .learn-subcategory-card { min-height: 190px; }
  .learn-journey-art { height: 108px; }
  .learn-journey-level { top: 16px; right: 16px; }
  .learn-content-card { min-height: 166px; padding: 8px; }
  .song-grid.child-song-grid { grid-template-columns: 1fr; }
  .chant-grid.child-chant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chant-card.child-chant-card { grid-template-columns: 58px minmax(0, 1fr); gap: 9px; padding: 10px; }
  .chant-card-art { width: 58px; height: 58px; }
  .chant-card-copy h3 { font-size: .98rem; }
  .chant-card-copy b { font-size: .68rem; }
  .chant-reader.child-chant-reader { grid-template-columns: 1fr; justify-items: center; }
  .child-chant-reader .chant-mascot { width: min(58vw, 210px); }
  .child-chant-reader .chant-lines,
  .child-chant-reader .center,
  .child-chant-reader .gentle-note { grid-column: 1; width: 100%; }
}

/* V4: the Development Food overview becomes a complete market booth. */
.food-market-development-overview {
  --market-ink: #164a50;
  --market-cream: #fffbf1;
  --market-coral: #eb675d;
  --market-teal: #137c78;
  --market-gold: #e5ad48;
  --child-ink: var(--market-ink);
  --child-muted: #587074;
  --child-teal: var(--market-teal);
  --child-deep: var(--market-ink);
  max-width: 1120px;
  padding-bottom: clamp(22px, 2.6vw, 36px);
  color: var(--market-ink);
  background-color: var(--market-cream);
  background-image: url("/assets/market-v4/background-market-mobile_1x.webp");
  background-image: image-set(
    url("/assets/market-v4/background-market-mobile_1x.webp") 1x,
    url("/assets/market-v4/background-market-mobile_2x.webp") 2x
  );
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
}

.food-market-development-overview > .back {
  min-height: 44px;
  margin-bottom: 8px;
}

.food-market-development-overview > .page-heading {
  margin: 0 0 16px;
}

.food-market-development-overview > .page-heading .eyebrow {
  color: var(--child-teal);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.food-market-development-overview > .page-heading h1 {
  color: var(--child-ink);
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.food-market-development-overview .learn-content-section.learn-subcategories {
  position: relative;
  isolation: isolate;
  margin: 30px auto 0;
  padding: clamp(52px, 15vw, 64px) clamp(8px, 2vw, 14px) 38px;
  border: 3px solid #eab97d;
  border-radius: 28px;
  background: linear-gradient(180deg, #fffdf5 0%, #fff8e9 100%);
  box-shadow: 0 8px 0 #dbb277, 0 18px 34px #9e794c29;
}

.food-market-development-overview .learn-content-section.learn-subcategories::before {
  position: absolute;
  z-index: 0;
  inset: 27px 5px 14px;
  border-right: 9px solid #d59b633d;
  border-left: 9px solid #d59b633d;
  border-radius: 16px;
  content: "";
  pointer-events: none;
}

.food-market-development-overview .learn-subcategories > h2 {
  margin: 0;
}

.food-market-development-overview .learn-subcategory-grid {
  position: relative;
  z-index: 1;
  gap: 12px;
}

.food-market-development-overview .learn-subcategory-card {
  min-height: 198px;
  gap: 10px;
  padding: 9px;
  border: 2px solid #fff9ed;
  border-radius: 24px;
  background: var(--market-card-surface, var(--card, #f6fbf9));
  box-shadow: 0 4px 0 #41645a10, 0 8px 16px #36544819;
  transition: transform .18s ease, box-shadow .18s ease;
}

.food-market-development-overview [data-learn-subcategory="learn-subcategory-d5d98f1e-3122-49a8-a742-af61bd08f330"] { --market-card-surface: #daf2d6; }
.food-market-development-overview [data-learn-subcategory="learn-subcategory-e5fbbf2f-c2e7-47fc-8e89-a942189627df"] { --market-card-surface: #ffe7ba; }
.food-market-development-overview [data-learn-subcategory="learn-subcategory-4cd81bcb-9d5f-4ba1-af6a-781bfacde07d"] { --market-card-surface: #eee5fc; }
.food-market-development-overview [data-learn-subcategory="learn-subcategory-8b6af2cf-742c-48c8-9526-8a79332c920a"] { --market-card-surface: #dceffd; }
.food-market-development-overview [data-learn-subcategory="learn-subcategory-08255abb-6d5d-406d-896f-fd389f45903c"] { --market-card-surface: #ffe4d5; }
.food-market-development-overview [data-learn-subcategory="learn-subcategory-f99bfb10-f8d7-4cae-a739-a39f986db27e"] { --market-card-surface: #ffe0ed; }
.food-market-development-overview [data-learn-subcategory="learn-subcategory-46edce7d-c76c-4cc3-8bd8-a07fa66c332b"] { --market-card-surface: #ddf4ef; }

.food-market-development-overview .learn-subcategory-card:not(:disabled) {
  border-color: var(--market-gold);
  box-shadow: inset 0 0 0 1px #fff8d4, 0 5px 0 #c58d401c, 0 8px 16px #3654481c;
}

.food-market-development-overview .learn-subcategory-card:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px #fff8d4, 0 6px 0 #d1a04e42, 0 8px 16px #36544820;
}

.food-market-development-overview .learn-subcategory-card:disabled {
  opacity: 1;
  cursor: default;
}

.food-market-development-overview .learn-subcategory-card:disabled:hover {
  transform: none;
  box-shadow: 0 4px 0 #41645a10, 0 8px 16px #36544819;
}

.food-market-development-overview .learn-subcategory-art {
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 17px;
  background: #fff9f0;
}

.food-market-development-overview .learn-subcategory-art > img.learn-market-v2-image {
  object-fit: cover;
}

.food-market-development-overview .learn-subcategory-card .learn-journey-copy {
  gap: 3px;
  padding: 0 2px 3px;
}

.food-market-development-overview .learn-subcategory-card .learn-journey-copy strong {
  padding-right: 0;
  color: var(--market-ink);
  font-size: clamp(.875rem, 1.35vw, 1.2rem);
  font-weight: 850;
  line-height: 1.13;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.food-market-development-overview .learn-subcategory-count {
  min-height: 25px;
  margin-top: 7px;
  padding: 5px 9px;
  border-color: #e7d7b5;
  background: #fffdf4;
  color: #27525b;
  font-size: clamp(.65rem, 2.8vw, .8125rem);
  font-weight: 850;
}

.food-market-development-overview .learn-subcategory-card .learn-journey-arrow {
  right: 11px;
  bottom: 9px;
  width: 44px;
  height: 44px;
  background: #fff;
  color: var(--child-teal);
  box-shadow: 0 3px 6px #284a4740;
}

.food-market-v4-awning {
  position: absolute;
  z-index: 2;
  display: block;
  width: calc(100% + 16px);
  max-width: none;
  height: auto;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  object-fit: fill;
  pointer-events: none;
}

/* V3 backdrop remains on the other Food learning screens; V4 replaces it on the overview. */
.food-market-word-focus-screen,
.food-market-word-list,
.food-picture-quiz-screen {
  background-color: #f7fafb;
  background-image: url("/assets/market-v3/market-soft-desktop_small.webp");
  background-image: image-set(
    url("/assets/market-v3/market-soft-desktop_small.webp") 1x,
    url("/assets/market-v3/market-soft-desktop.webp") 2x
  );
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (min-width: 701px) {
  .food-market-development-overview {
    background-color: var(--market-cream);
    background-image: url("/assets/market-v4/background-market-desktop_1x.webp");
    background-image: image-set(
      url("/assets/market-v4/background-market-desktop_1x.webp") 1x,
      url("/assets/market-v4/background-market-desktop_2x.webp") 2x
    );
    background-size: cover;
  }

  .food-market-development-overview .learn-content-section.learn-subcategories {
    padding: 96px clamp(18px, 3vw, 30px) 58px;
  }

  .food-market-development-overview .learn-subcategory-grid {
    gap: 18px;
  }

  .food-market-development-overview .learn-subcategory-card {
    min-height: 245px;
    padding: 14px;
  }

  .food-market-v4-awning {
    top: -42px;
    width: min(calc(100% + 22px), 680px);
  }
}

@media (min-width: 701px) and (max-width: 1050px) {
  .food-market-development-overview {
    box-sizing: border-box;
    width: calc(100% + 44px);
    margin-left: -22px;
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (min-width: 1100px) {
  .food-market-development-overview .learn-content-section.learn-subcategories {
    padding-top: 150px;
    padding-bottom: 62px;
  }

  .food-market-development-overview .learn-subcategory-grid {
    gap: 21px;
  }

  .food-market-development-overview .learn-subcategory-card {
    min-height: 275px;
    padding: 15px;
  }

  .food-market-v4-awning {
    top: -50px;
    width: min(calc(100% + 22px), 980px);
  }
}

@media (max-width: 700px) {
  .food-market-word-focus-screen,
  .food-market-word-list,
  .food-picture-quiz-screen {
    background-image: url("/assets/market-v3/market-soft-mobile_small.webp");
    background-image: image-set(
      url("/assets/market-v3/market-soft-mobile_small.webp") 1x,
      url("/assets/market-v3/market-soft-mobile.webp") 2x
    );
  }
}

@media (min-width: 360px) {
  .food-market-development-overview .learn-content-section.learn-subcategories::after {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: -22px;
    display: block;
    width: clamp(68px, 20vw, 88px);
    aspect-ratio: 9 / 7;
    background-image: url("/assets/market-v4/market-fruit-crate_1x.webp");
    background-image: image-set(
      url("/assets/market-v4/market-fruit-crate_1x.webp") 1x,
      url("/assets/market-v4/market-fruit-crate_2x.webp") 2x
    );
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
    pointer-events: none;
  }
}

@media (max-width: 700px) {
  .food-market-development-overview {
    box-sizing: border-box;
    width: calc(100% + 28px);
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .food-market-development-overview > .back {
    margin-bottom: 8px;
  }

  .food-market-development-overview > .page-heading {
    margin-bottom: 14px;
  }

  .food-market-development-overview > .page-heading h1 {
    font-size: clamp(1.75rem, 7vw, 2rem);
  }

  .food-market-development-overview .learn-subcategory-card {
    min-height: 190px;
    padding: 10px;
  }

  .food-market-development-overview .learn-subcategory-card .learn-journey-copy strong {
    font-size: 1rem;
  }
}

@media (max-width: 359px) {
  .food-market-development-overview .learn-content-section.learn-subcategories {
    padding-right: 8px;
    padding-bottom: 36px;
    padding-left: 8px;
    border-radius: 22px;
  }

  .food-market-development-overview .learn-content-section.learn-subcategories::after {
    display: none;
  }

  .food-market-development-overview .learn-subcategory-grid {
    gap: 8px;
  }

  .food-market-development-overview .learn-subcategory-card {
    min-height: 183px;
    padding: 7px;
    border-radius: 19px;
  }

  .food-market-development-overview .learn-subcategory-art {
    border-radius: 13px;
  }

  .food-market-v4-awning {
    top: -30px;
  }
}

@media (max-width: 460px) {
  .child-section-screen .page-heading { margin-bottom: 17px; }
  .child-section-screen .page-heading h1 { font-size: clamp(1.9rem, 9vw, 2.55rem); }
  .food-market-development-overview > .page-heading h1 { font-size: clamp(1.5rem, 7vw, 1.85rem); }
  .child-section-note { align-items: flex-start; font-size: .81rem; }
  .child-content-entry { gap: 9px; min-height: 68px; padding: 10px 12px; }
  .child-content-entry-copy strong { font-size: 1rem; }
  .child-content-entry-copy small { font-size: .78rem; }
  .learn-journey-copy strong { font-size: .98rem; }
  .learn-journey-copy em { font-size: .68rem; }
  .book-shelf.child-book-shelf { grid-template-columns: 1fr; }
  .book-cover.child-book-cover { height: 245px; }
  .child-book-card { display: grid; grid-template-columns: minmax(105px, .72fr) 1fr; }
  .book-card-copy.child-book-copy { padding: 13px; }
  .child-book-copy h2 { font-size: 1.11rem; }
  .child-book-copy p { font-size: .78rem; }
  .child-book-action { min-height: 42px; padding: 9px 12px; font-size: .82rem; }
  .child-music-feature { align-items: flex-start; gap: 11px; padding: 16px; }
  .child-music-mark { flex-basis: 43px; width: 43px; height: 43px; border-radius: 14px 14px 4px 14px; }
  .child-music-mark svg { width: 24px; }
  .child-music-feature p { font-size: .82rem; }
  .song-card.child-song-card { grid-template-columns: 83px minmax(0, 1fr) 34px; min-height: 105px; gap: 10px; padding: 8px; }
  .song-card-art.child-song-art { width: 83px; height: 88px; }
  .child-song-copy strong { font-size: 1rem; }
  .child-song-copy small { display: none; }
  .child-section-title h2 { font-size: 1.23rem; }
  .child-section-title > span { font-size: .7rem; }
  .chant-grid.child-chant-grid { grid-template-columns: 1fr; }
  .chant-card.child-chant-card { grid-template-columns: 66px minmax(0, 1fr); }
  .chant-card-art { width: 66px; height: 66px; }
  .child-book-reader .book-reader-bottom { grid-template-columns: minmax(60px, 1fr) auto; gap: 10px; }
  .song-player-navigation { gap: 5px; }
  .song-player-navigation button { padding: 8px 10px; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  .child-game-card,
  .learn-journey-card,
  .song-card.child-song-card,
  .learn-progress > span,
  .child-book-progress > span,
  .book-reader-progress > span { transition: none; }
  .child-game-card:hover,
  .learn-journey-card:hover,
  .song-card.child-song-card:hover { transform: none; }
}

/* Leg overview: keep the approved card treatment isolated from active games and other areas. */
.child-section-games .page-heading {
  margin: 2px 0 14px;
}

.child-section-games .page-heading h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.65rem);
  line-height: 1.08;
}

.child-section-games .page-heading .sub {
  max-width: 58ch;
  margin-top: 6px;
  font-size: clamp(.88rem, 1.1vw, .98rem);
  line-height: 1.45;
}

.child-section-games .child-section-note {
  margin-bottom: 15px;
  padding: 9px 12px;
  border-color: #dfe8d7;
  border-radius: 16px;
  background: #eef4e8;
  font-size: .84rem;
  line-height: 1.35;
}

.child-section-games .child-note-mark {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  color: #527966;
}

.child-section-games .game-grid.child-game-grid {
  align-items: stretch;
  gap: clamp(11px, 1.4vw, 18px);
}

.child-section-games .game-grid.child-game-grid .child-game-card {
  min-width: 0;
  min-height: 100%;
  border-color: #e8e2d6;
  border-radius: 22px;
  background: #fffdf7;
  box-shadow: 0 3px 0 #24455308, 0 8px 20px #203e4a0c;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.child-section-games .game-grid.child-game-grid .child-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #24455308, 0 12px 22px #203e4a12;
}

.child-section-games .child-game-art {
  height: clamp(140px, 14vw, 178px);
}

.child-section-games .child-game-play {
  width: 40px;
  height: 40px;
  border-color: #fffdf7;
  background: #527966;
}

.child-section-games .game-grid.child-game-grid .child-game-copy {
  gap: 0;
  padding: 13px 14px 15px;
}

.child-section-games .child-game-copy h2 {
  min-width: 0;
  font-size: clamp(1.03rem, 1.35vw, 1.2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.child-section-games .child-game-status {
  max-width: 100%;
  padding-top: 10px;
  color: #5c7065;
  font-size: .75rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.child-section-games .child-game-status.is-complete {
  color: #345846;
}

.child-section-games .child-game-card:active {
  transform: translateY(0);
}

@media (max-width: 1050px) and (min-width: 701px) {
  .child-section-games .child-game-art {
    height: clamp(132px, 17vw, 160px);
  }
}

@media (max-width: 700px) {
  .child-section-games .game-grid.child-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .child-section-games .child-game-art {
    height: clamp(112px, 35vw, 148px);
  }

  .child-section-games .game-grid.child-game-grid .child-game-copy {
    padding: 11px 11px 13px;
  }

  .child-section-games .child-game-copy h2 {
    font-size: clamp(1rem, 4.1vw, 1.12rem);
  }

  .child-section-games .child-game-status {
    padding-top: 9px;
    font-size: .7rem;
  }
}

@media (max-width: 360px) {
  .child-section-games .page-heading {
    margin-bottom: 11px;
  }

  .child-section-games .page-heading h1 {
    font-size: clamp(1.75rem, 8vw, 2rem);
  }

  .child-section-games .page-heading .sub {
    font-size: .85rem;
  }

  .child-section-games .child-section-note {
    gap: 8px;
    margin-bottom: 11px;
    padding: 8px 9px;
    font-size: .77rem;
  }

  .child-section-games .child-note-mark {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .child-section-games .game-grid.child-game-grid {
    gap: 8px;
  }

  .child-section-games .child-game-art {
    height: clamp(105px, 34vw, 122px);
  }

  .child-section-games .game-grid.child-game-grid .child-game-copy {
    padding: 10px 9px 12px;
  }

  .child-section-games .child-game-copy h2 {
    font-size: .98rem;
  }

  .child-section-games .child-game-status {
    font-size: .66rem;
  }

  .child-section-games .child-game-play {
    right: 8px;
    bottom: 8px;
    width: 36px;
    height: 36px;
  }
}

/* Match the approved homepage palette on the game list only. */
body.game-overview-route {
  --ink: #2f453a;
  --muted: #68776e;
  --teal: #527966;
  --deep: #345846;
  --paper: #faf8f2;
  background: #faf8f2;
}

body.game-overview-route .main-shell {
  background: #faf8f2;
}

.child-section-games .game-overview-heading {
  margin: 2px 0 12px;
}

.child-section-games .game-overview-heading h1 {
  margin: 0;
  color: #345846;
  font: 600 clamp(1.2rem, 2vw, 1.45rem)/1.2 Fredoka, "Trebuchet MS", sans-serif;
}

.child-section-games .game-grid.child-game-grid {
  gap: clamp(12px, 1.4vw, 20px);
}

.child-section-games .child-game-card:nth-child(4n + 1) {
  --game-tint: #e5eedf;
  --game-arrow: #527966;
}

.child-section-games .child-game-card:nth-child(4n + 2) {
  --game-tint: #fff0c8;
  --game-arrow: #a47a22;
}

.child-section-games .child-game-card:nth-child(4n + 3) {
  --game-tint: #e2eff7;
  --game-arrow: #4f87a2;
}

.child-section-games .child-game-card:nth-child(4n) {
  --game-tint: #f5e2e2;
  --game-arrow: #aa6268;
}

.child-section-games .game-grid.child-game-grid .child-game-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #23434a12;
  border-radius: 25px;
  background: var(--game-tint, #e5eedf);
  box-shadow: 0 7px 18px #203e4a0d;
  color: #2f453a;
}

.child-section-games .game-grid.child-game-grid .child-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px #203e4a16;
}

.child-section-games .child-game-art {
  background: var(--card, var(--game-tint));
}

.child-section-games .game-grid.child-game-grid .child-game-copy {
  position: relative;
  min-height: 68px;
  padding: 13px 58px 14px 15px;
  background: var(--game-tint);
}

.child-section-games .child-game-copy h2 {
  color: #2f453a;
  font: 600 clamp(1.02rem, 1.35vw, 1.22rem)/1.18 Fredoka, "Trebuchet MS", sans-serif;
  overflow-wrap: anywhere;
}

.child-section-games .child-game-status.is-complete {
  display: inline-flex;
  margin-top: 6px;
  padding: 0;
  color: #345846;
  font-size: .72rem;
  line-height: 1.2;
}

.child-section-games .child-game-arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--game-arrow, #527966);
  color: #fff;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1;
}

@media (min-width: 701px) and (max-width: 1050px) {
  .child-section-games .game-grid.child-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .child-section-games .game-overview-heading {
    margin-bottom: 10px;
  }

  .child-section-games .game-grid.child-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .child-section-games .game-grid.child-game-grid .child-game-copy {
    min-height: 63px;
    padding: 11px 52px 12px 12px;
  }

  .child-section-games .child-game-copy h2 {
    font-size: clamp(.98rem, 4vw, 1.08rem);
  }

  .child-section-games .child-game-arrow {
    right: 9px;
    bottom: 9px;
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 360px) {
  .child-section-games .game-overview-heading {
    margin: 0 0 8px;
  }

  .child-section-games .game-grid.child-game-grid {
    gap: 8px;
  }

  .child-section-games .child-game-art {
    height: 102px;
  }

  .child-section-games .game-grid.child-game-grid .child-game-copy {
    min-height: 59px;
    padding: 10px 47px 11px 10px;
  }

  .child-section-games .child-game-copy h2 {
    font-size: .86rem;
  }

  .child-section-games .child-game-arrow {
    right: 7px;
    bottom: 7px;
    width: 34px;
    height: 34px;
  }
}

/* Lyt & find only: picture-first play surface, independent of every other mechanic. */
body.listen-game-route {
  background-color: #fffaf0;
}

.playground.listen-game {
  max-width: 1120px;
  margin: 0 auto;
  overflow: hidden;
  border-color: #e8e2d3;
  border-radius: 26px;
  background: #fffaf0;
  box-shadow: 0 5px 0 #6957350a;
}

.listen-game-head {
  margin-bottom: 8px;
}

.listen-game-head .back {
  min-height: 44px;
  margin: 0;
  padding: 7px 12px 7px 0;
  color: #426c66;
}

.listen-game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 112px;
  padding: 17px clamp(16px, 3vw, 32px);
  background: #f4ecd9;
}

.listen-game-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.listen-game-top h1 {
  margin: 0;
  color: #294f50;
  font: 600 clamp(1.45rem, 3vw, 2.05rem)/1.08 Fredoka, "Trebuchet MS", sans-serif;
  letter-spacing: -.025em;
}

.listen-game-heading p {
  margin: 7px 0 0;
  color: #58736b;
  font-size: clamp(.78rem, 1.5vw, .94rem);
  font-weight: 550;
  line-height: 1.3;
}

.listen-game .listen-replay {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 88px;
  min-width: 88px;
  min-height: 78px;
  padding: 9px 11px;
  border: 1px solid #d8e6dc;
  border-radius: 22px;
  background: #fffdf7;
  color: #176f6d;
  box-shadow: 0 3px 0 #2445530b;
}

.listen-replay span:first-child {
  font-size: 1.8rem;
  line-height: 1;
}

.listen-replay span:last-child {
  font: 600 .78rem/1.1 Fredoka, "Trebuchet MS", sans-serif;
}

.listen-start-control {
  display: grid;
  flex: 0 0 auto;
  justify-items: center;
  gap: 5px;
}

.listen-audio-status {
  max-width: 116px;
  color: #68776e;
  font-size: .68rem;
  line-height: 1.2;
  text-align: center;
}

.listen-topic-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 11px clamp(14px, 2.5vw, 28px) 0;
  overflow: visible;
}

.listen-topic-pills button {
  display: grid;
  grid-template-rows: 22px auto;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 59px;
  padding: 5px 4px;
  border: 1px solid #e3e7dc;
  border-radius: 14px;
  background: var(--listen-topic-color, #fffdf7);
  color: #516c67;
  font-size: clamp(.66rem, .88vw, .76rem);
  font-weight: 650;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

.listen-topic-pills button > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listen-topic-pills button[aria-pressed="true"] {
  border-color: #84b6a5;
  background: #e8f1e7;
  color: #216b66;
  box-shadow: inset 0 0 0 1px #84b6a5;
}

.listen-session-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 1050px;
  margin: 10px auto 0;
  padding: 0 clamp(14px, 2.5vw, 28px);
  color: #55716b;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.listen-session-progress .listen-progress-track {
  display: block;
  width: 100%;
  height: 11px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8e7d8;
}

.listen-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #78b69d;
  transition: width .22s ease;
}

.listen-game .listen-game-body {
  padding: 12px clamp(14px, 2.5vw, 28px) 21px;
}

.listen-answer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(11px, 2vw, 19px);
  max-width: 1040px;
}

.listen-answer-grid.listen-answer-count-2,
.listen-answer-grid.listen-answer-count-3,
.listen-answer-grid.listen-answer-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.listen-game .listen-answer-card {
  min-height: 188px;
  padding: 11px;
  border: 2px solid transparent;
  border-radius: 22px;
  background: #eaf2e9;
  box-shadow: 0 3px 0 #405b4a0b;
}

.listen-answer-card:nth-child(4n + 2) { background: #f4eee0; }
.listen-answer-card:nth-child(4n + 3) { background: #e9f0f3; }
.listen-answer-card:nth-child(4n + 4) { background: #f5e9e5; }

.listen-game .listen-answer-card > span:first-child {
  display: grid;
  width: 100%;
  height: clamp(138px, 24vw, 245px);
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: #fffdf7a8;
}

.listen-game .listen-answer-card .emoji {
  font-size: clamp(3.2rem, 8vw, 5.7rem);
}

.listen-game .listen-answer-card b {
  margin-top: 9px;
  color: #256c65;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.listen-game .listen-answer-card.correct {
  border-color: #74b498;
  background: #e1f0e5;
}

.listen-game .listen-answer-card:disabled {
  opacity: 1;
}

.listen-game .listen-answer-card:disabled:not(.correct) {
  filter: saturate(.76);
  opacity: .72;
}

.listen-game .listen-answer-card:focus-visible,
.listen-topic-pills button:focus-visible,
.listen-game .listen-replay:focus-visible,
.listen-game-head .back:focus-visible {
  outline: 3px solid #c7764e;
  outline-offset: 3px;
}

.listen-game-feedback {
  min-height: 0;
  padding: 0 18px 18px;
}

.listen-game-feedback p {
  color: #39756b;
  font-size: 1rem;
  font-weight: 650;
}

@media (min-width: 1100px) {
  .listen-answer-grid.listen-answer-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listen-answer-grid.listen-answer-count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .listen-topic-pills { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .listen-game .listen-answer-card { min-height: 270px; }
}

@media (min-width: 620px) and (max-width: 1099px) {
  .listen-answer-grid.listen-answer-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listen-answer-grid.listen-answer-count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listen-topic-pills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .listen-game .listen-answer-card { min-height: 235px; }
}

@media (max-width: 520px) {
  .playground.listen-game { border-radius: 20px; }
  .listen-game-top { min-height: 96px; gap: 10px; padding: 12px 13px; }
  .listen-game .listen-replay { width: 72px; min-width: 72px; min-height: 70px; padding: 8px; border-radius: 18px; }
  .listen-replay span:first-child { font-size: 1.6rem; }
  .listen-replay span:last-child { font-size: .71rem; }
  .listen-topic-pills {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 9px 11px 0;
  }
  .listen-topic-pills button { min-height: 56px; padding: 4px 2px; font-size: .7rem; }
  .listen-session-progress { margin-top: 8px; padding: 0 13px; }
  .listen-game .listen-game-body { padding: 10px 11px 16px; }
  .listen-answer-grid { gap: 9px; }
  .listen-game .listen-answer-card { min-height: 160px; padding: 7px; border-radius: 17px; }
  .listen-game .listen-answer-card > span:first-child { height: clamp(138px, 38vw, 174px); border-radius: 12px; }
  .listen-game .listen-answer-card b { margin-top: 7px; }
}

/* Phase 2A: keep Listen text quiet and give every answer picture two roomy columns. */
body.listen-game-route .listen-game-top {
  min-height: 54px;
  padding-block: 0;
}

body.listen-game-route .listen-game-heading h1,
body.listen-game-route .listen-game-heading p {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body.listen-game-route .listen-game .listen-answer-card b {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.listen-game .listen-answer-grid.listen-answer-count-2,
.listen-game .listen-answer-grid.listen-answer-count-3,
.listen-game .listen-answer-grid.listen-answer-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.listen-game .listen-answer-card {
  position: relative;
  overflow: visible;
}

.listen-game .listen-answer-card.listen-answer-correct {
  z-index: 1;
  border-color: #74b498;
  box-shadow: 0 0 0 4px #80c49a38, 0 10px 26px #62a97a33;
  animation: listen-answer-bounce .38s cubic-bezier(.2,.9,.3,1.25) both;
}

.listen-game .listen-answer-card.listen-color-answer-card.listen-answer-correct {
  animation: none;
}

.listen-game .listen-answer-card.listen-number-answer-card.listen-answer-correct {
  animation: none;
}

.listen-game .listen-answer-card.listen-answer-correct::after {
  position: absolute;
  top: -14px;
  right: -7px;
  color: #f4bd48;
  content: "✦";
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px #8e641a38);
  animation: listen-star-pop .48s ease-out both;
}

.listen-game .listen-answer-card .listen-number-art-stage {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  place-items: center;
}

.listen-game .listen-answer-card .listen-number-art-motion {
  display: grid;
  width: 82%;
  height: 82%;
  min-width: 0;
  min-height: 0;
  place-items: center;
  transform-origin: center;
}

.listen-game .listen-answer-card.listen-number-answer-card.listen-answer-correct .listen-number-art-motion {
  animation: listen-number-answer-pop 1s cubic-bezier(.2,.72,.28,1) both;
}

.listen-game .listen-answer-card.listen-number-answer-card .listen-number-art-motion.listen-number-art-idle {
  animation: listen-number-art-idle 3.8s ease-in-out infinite;
  will-change: transform;
}

.listen-game .listen-answer-card.listen-number-answer-card .listen-number-art-motion.listen-number-art-idle-phase-a {
  animation-delay: -1.9s;
}

@keyframes listen-number-art-idle {
  0%, 100% { transform: translate3d(0, -6px, 0) rotate(-1deg) scale(1); }
  50% { transform: translate3d(0, 6px, 0) rotate(1deg) scale(1.01); }
}

.listen-game .listen-answer-card .listen-number-sparkles {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.listen-game .listen-answer-card .listen-number-sparkles i {
  position: absolute;
  display: block;
  color: #d9a62c;
  font-size: clamp(10px, 1.4vw, 15px);
  font-style: normal;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 1px 2px #9d762a36;
  animation: listen-number-sparkle .82s ease-out both;
}

.listen-game .listen-answer-card .listen-number-sparkles i:nth-child(1) {
  top: 2%;
  left: 50%;
  margin-left: -.5em;
  animation-delay: .08s;
}

.listen-game .listen-answer-card .listen-number-sparkles i:nth-child(2) {
  top: 44%;
  left: 0;
  animation-delay: .16s;
}

.listen-game .listen-answer-card .listen-number-sparkles i:nth-child(3) {
  top: 32%;
  right: 0;
  animation-delay: .24s;
}

@keyframes listen-number-answer-pop {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  15% { transform: translate3d(0, 2px, 0) scale(.94,.9); }
  34% { transform: translate3d(0, -3px, 0) scale(1.1); }
  54% { transform: translate3d(0, -1px, 0) scale(1.2); }
  68% { transform: translate3d(0, 0, 0) scale(1.12); }
  78% { transform: translate3d(0, 1px, 0) scale(.99,1.015); }
}

@keyframes listen-number-sparkle {
  0% { opacity: 0; transform: translateY(3px) scale(.4); }
  28% { opacity: 1; transform: translateY(0) scale(1.08); }
  68% { opacity: .9; transform: translateY(-1px) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(.85); }
}

/* Keep animal motion inside its image area; the CMS image keeps its saved art. */
.listen-game .listen-answer-card .listen-animal-art-stage {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
}

.listen-game .listen-answer-card .listen-animal-art-motion {
  position: relative;
  z-index: 1;
  display: grid;
  width: 82%;
  height: 86%;
  min-width: 0;
  min-height: 0;
  place-items: center;
  transform-origin: center;
}

.listen-game .listen-answer-card .listen-animal-art-motion > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center !important;
}

.listen-game .listen-answer-card .listen-animal-art-motion.listen-animal-art-idle {
  animation: listen-animal-art-idle 4.2s ease-in-out infinite;
  will-change: transform;
}

.listen-game .listen-answer-card .listen-animal-art-motion.listen-animal-art-idle-phase-a {
  animation-delay: -2.1s;
}

.listen-game .listen-answer-card.listen-animal-answer-card.listen-answer-correct {
  animation: none;
}

.listen-game .listen-answer-card.listen-animal-answer-card.listen-answer-correct .listen-animal-art-motion {
  animation: listen-animal-happy-hop 1.12s cubic-bezier(.2,.76,.3,1) both;
}

.listen-game .listen-answer-card .listen-animal-celebration {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.listen-game .listen-answer-card .listen-animal-celebration i {
  position: absolute;
  display: block;
  font-style: normal;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.listen-game .listen-answer-card .listen-animal-celebration .paw {
  color: #b87b59;
  font-size: clamp(15px, 2.1vw, 22px);
  text-shadow: 0 1px 2px #fff8;
  animation: listen-animal-paw-burst .92s cubic-bezier(.18,.72,.28,1) both;
}

.listen-game .listen-answer-card .listen-animal-celebration .paw:nth-child(1) {
  top: 14%;
  left: 8%;
}

.listen-game .listen-answer-card .listen-animal-celebration .paw:nth-child(3) {
  top: 43%;
  right: 6%;
  animation-delay: .1s;
}

.listen-game .listen-answer-card .listen-animal-celebration .paw:nth-child(5) {
  bottom: 7%;
  left: 18%;
  animation-delay: .2s;
}

.listen-game .listen-answer-card .listen-animal-celebration .star {
  color: #e7b53d;
  font-size: clamp(13px, 1.8vw, 19px);
  text-shadow: 0 1px 2px #8e641a38;
  animation: listen-animal-star-burst .76s ease-out both;
}

.listen-game .listen-answer-card .listen-animal-celebration .star:nth-child(2) {
  top: 7%;
  right: 18%;
  animation-delay: .04s;
}

.listen-game .listen-answer-card .listen-animal-celebration .star:nth-child(4) {
  right: 17%;
  bottom: 10%;
  animation-delay: .14s;
}

.listen-game .listen-answer-card.listen-animal-answer-card.listen-answer-wrong {
  animation: none;
}

.listen-game .listen-answer-card.listen-animal-answer-card.listen-answer-wrong .listen-animal-art-motion {
  animation: listen-animal-gentle-shake .3s ease-in-out both;
}

@keyframes listen-animal-art-idle {
  0%, 100% { transform: translate3d(0, 4px, 0) rotate(-1.2deg); }
  25% { transform: translate3d(1px, 0, 0) rotate(-.3deg); }
  50% { transform: translate3d(0, -5px, 0) rotate(1.4deg); }
  75% { transform: translate3d(-1px, -1px, 0) rotate(.2deg); }
}

@keyframes listen-animal-happy-hop {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  14% { transform: translate3d(0, 2px, 0) scale(.96,.94); }
  36% { transform: translate3d(0, -13px, 0) scale(1.06,1.08); }
  53% { transform: translate3d(0, -16px, 0) scale(1.04,1.06); }
  70% { transform: translate3d(0, -4px, 0) scale(1.02); }
  84% { transform: translate3d(0, 2px, 0) scale(.99,1.01); }
}

@keyframes listen-animal-paw-burst {
  0% { opacity: 0; transform: translate3d(0, 4px, 0) scale(.55) rotate(-12deg); }
  28% { opacity: 1; transform: translate3d(-2px, -3px, 0) scale(1) rotate(2deg); }
  68% { opacity: .9; transform: translate3d(2px, -8px, 0) scale(1.04) rotate(10deg); }
  100% { opacity: 0; transform: translate3d(5px, -13px, 0) scale(.82) rotate(16deg); }
}

@keyframes listen-animal-star-burst {
  0% { opacity: 0; transform: scale(.35) rotate(-24deg); }
  34% { opacity: 1; transform: scale(1.12) rotate(8deg); }
  100% { opacity: 0; transform: scale(.84) rotate(24deg); }
}

@keyframes listen-animal-gentle-shake {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  35% { transform: translate3d(-2px, 0, 0) rotate(-.6deg); }
  70% { transform: translate3d(2px, 0, 0) rotate(.6deg); }
}

.listen-game .listen-answer-card .listen-color-balloon-stage {
  overflow: hidden;
  background: #fffdf7a8;
}

.listen-game .listen-answer-card .listen-color-balloon {
  position: relative;
  display: block;
  width: clamp(104px, 58%, 168px);
  height: 92%;
  isolation: isolate;
  animation: listen-color-balloon-float 5.6s ease-in-out infinite;
  transform-origin: 50% 55%;
  will-change: transform;
}

.listen-game .listen-answer-card:nth-child(even) .listen-color-balloon {
  animation-delay: -2.8s;
}

.listen-game .listen-answer-card .listen-color-balloon.listen-color-balloon-idle-paused {
  animation-play-state: paused;
}

.listen-game .listen-answer-card .listen-color-balloon-core {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.listen-game .listen-answer-card .listen-color-balloon-body {
  position: absolute;
  inset: 0 0 18%;
  border: 2px solid #ffffffd9;
  border-radius: 49% 49% 46% 46% / 43% 43% 57% 57%;
  background:
    radial-gradient(ellipse at 31% 23%, #fff 0 3%, #ffffffa8 5%, #ffffff38 12%, transparent 25%),
    linear-gradient(132deg, #ffffff38 0%, transparent 43%, #102d3a28 100%),
    var(--listen-balloon-color, #ef5350);
  box-shadow: inset -9px -12px 18px #18354628, 0 8px 13px #203e4a30;
}

.listen-game .listen-answer-card .listen-color-balloon-white .listen-color-balloon-body {
  border: 2px solid #435560;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #435560, inset -9px -12px 18px #43556030, 0 8px 13px #203e4a30;
}

.listen-game .listen-answer-card .listen-color-balloon-black .listen-color-balloon-body {
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #263b49, inset -9px -12px 18px #0008, 0 8px 13px #203e4a38;
}

.listen-game .listen-answer-card .listen-color-balloon-knot {
  position: absolute;
  top: 80%;
  left: calc(50% - 7px);
  width: 0;
  height: 0;
  border-top: 12px solid var(--listen-balloon-color, #ef5350);
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
  filter: drop-shadow(0 1px 1px #203e4a45);
}

.listen-game .listen-answer-card .listen-color-balloon-string {
  position: absolute;
  top: 87%;
  left: calc(50% - 1px);
  width: 2px;
  height: 12%;
  border-radius: 2px;
  background: #53636b;
  opacity: .72;
}

.listen-game .listen-answer-card .listen-color-balloon.listen-color-balloon-white .listen-color-balloon-string {
  background: #435560;
  opacity: 1;
}

.listen-game .listen-answer-card .listen-color-balloon.listen-color-balloon-black .listen-color-balloon-string {
  background: #263b49;
  opacity: 1;
}

.listen-game .listen-answer-card.listen-answer-correct .listen-color-balloon-core {
  animation: listen-color-balloon-pop .96s cubic-bezier(.2,.75,.25,1) both;
}

.listen-game .listen-answer-card .listen-color-burst {
  position: absolute;
  z-index: 2;
  inset: 8px;
  overflow: hidden;
  border-radius: 18px;
  pointer-events: none;
}

.listen-game .listen-answer-card .listen-color-burst i {
  --listen-confetti-x: -24px;
  --listen-confetti-y: -26px;
  --listen-confetti-tilt: -18deg;
  --listen-confetti-color: #ed7c85;
  position: absolute;
  display: block;
  width: 12px;
  height: 15px;
  border: 1px solid #ffffffd9;
  border-radius: 49% 49% 46% 46% / 43% 43% 57% 57%;
  background: radial-gradient(ellipse at 30% 24%, #ffffffc7, transparent 48%), var(--listen-confetti-color);
  opacity: 0;
  pointer-events: none;
  animation: listen-color-burst-fragment .78s cubic-bezier(.2,.7,.35,1) both;
}

/* Six local mini-balloons; their knots travel and fade with the bubbles. */
.listen-game .listen-answer-card .listen-color-burst i::after {
  position: absolute;
  top: 100%;
  left: calc(50% - 2px);
  width: 0;
  height: 0;
  border-right: 2px solid transparent;
  border-bottom: 3px solid var(--listen-confetti-color);
  border-left: 2px solid transparent;
  content: "";
  pointer-events: none;
}

.listen-game .listen-answer-card .listen-color-burst i:nth-child(1) {
  top: 22%;
  left: 17%;
}

.listen-game .listen-answer-card .listen-color-burst i:nth-child(2) {
  --listen-confetti-x: 24px;
  --listen-confetti-y: -28px;
  --listen-confetti-tilt: 20deg;
  --listen-confetti-color: #f4bd48;
  top: 19%;
  right: 18%;
  animation-delay: .08s;
}

.listen-game .listen-answer-card .listen-color-burst i:nth-child(3) {
  --listen-confetti-x: -22px;
  --listen-confetti-y: 12px;
  --listen-confetti-tilt: -26deg;
  --listen-confetti-color: #65bfa0;
  top: 54%;
  left: 14%;
  animation-delay: .04s;
}

.listen-game .listen-answer-card .listen-color-burst i:nth-child(4) {
  --listen-confetti-x: 22px;
  --listen-confetti-y: 14px;
  --listen-confetti-tilt: 26deg;
  --listen-confetti-color: #a78bda;
  top: 52%;
  right: 14%;
  animation-delay: .12s;
}

.listen-game .listen-answer-card .listen-color-burst i:nth-child(5) {
  --listen-confetti-x: -7px;
  --listen-confetti-y: -34px;
  --listen-confetti-tilt: -12deg;
  --listen-confetti-color: #68b6d4;
  top: 15%;
  left: 42%;
  animation-delay: .16s;
}

.listen-game .listen-answer-card .listen-color-burst i:nth-child(6) {
  --listen-confetti-x: 9px;
  --listen-confetti-y: 25px;
  --listen-confetti-tilt: 14deg;
  --listen-confetti-color: #edaa67;
  top: 65%;
  right: 37%;
  animation-delay: .2s;
}

.listen-game .listen-answer-card.listen-answer-wrong {
  border-color: #e6a7a0;
  box-shadow: 0 0 0 3px #eabbb342;
  animation: listen-answer-gentle-wiggle .32s ease-in-out both;
}

.listen-game-feedback {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;
}

.listen-game-feedback.is-visible {
  min-height: clamp(92px, 18vw, 112px);
  margin: 4px 0 8px;
}

.listen-feedback-face {
  display: block;
  width: clamp(80px, 16vw, 100px);
  height: clamp(80px, 16vw, 100px);
  object-fit: contain;
  animation: listen-face-pop .34s cubic-bezier(.2,.9,.3,1.2) both;
}

.listen-feedback-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@keyframes listen-answer-bounce {
  0% { transform: scale(1); }
  48% { transform: scale(1.025) translateY(-4px); }
  100% { transform: scale(1); }
}

@keyframes listen-star-pop {
  0% { opacity: 0; transform: scale(.3) rotate(-25deg); }
  65% { opacity: 1; transform: scale(1.12) rotate(9deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes listen-color-balloon-float {
  0%, 100% { transform: translate3d(0, 3px, 0) rotate(-.8deg); }
  24% { transform: translate3d(1px, 0, 0) rotate(-.2deg); }
  52% { transform: translate3d(1px, -4px, 0) rotate(.9deg); }
  77% { transform: translate3d(0, -1px, 0) rotate(.3deg); }
}

@keyframes listen-color-balloon-pop {
  0%, 100% { opacity: 1; transform: scale(1); }
  16% { opacity: 1; transform: scale(.84,.9); }
  27% { opacity: 1; transform: scale(.86,.92); }
  48% { opacity: 1; transform: scale(1.08,.9); }
  64% { opacity: 1; transform: scale(.97,1.08); }
  80% { opacity: 1; transform: scale(1.035,.985); }
}

@keyframes listen-color-burst-fragment {
  0% { opacity: 0; transform: translate3d(0, 6px, 0) scale(.35) rotate(0); }
  25% { opacity: 1; transform: translate3d(calc(var(--listen-confetti-x) * .35), calc(var(--listen-confetti-y) * .35), 0) scale(1.08) rotate(0); }
  58% { opacity: .88; transform: translate3d(calc(var(--listen-confetti-x) * .72), calc(var(--listen-confetti-y) * .72), 0) scale(1) rotate(var(--listen-confetti-tilt)); }
  100% { opacity: 0; transform: translate3d(var(--listen-confetti-x), var(--listen-confetti-y), 0) scale(.7) rotate(var(--listen-confetti-tilt)); }
}

@keyframes listen-answer-gentle-wiggle {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  65% { transform: translateX(3px); }
}

@keyframes listen-face-pop {
  0% { opacity: .45; transform: scale(.82); }
  72% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 520px) {
  body.listen-game-route .listen-game-top {
    min-height: 54px;
    padding: 0 11px;
  }

  .listen-game .listen-answer-grid {
    gap: 10px;
  }

  .listen-game .listen-answer-card {
    min-height: 0;
    padding: 7px;
  }

  body.game-focus-route #main .listen-game .listen-answer-card > span:first-child {
    min-height: clamp(188px, 34dvh, 310px);
  }

  .listen-game-feedback.is-visible {
    min-height: clamp(92px, 18vw, 112px);
    margin: 4px 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .listen-game .listen-answer-card.listen-answer-correct,
  .listen-game .listen-answer-card.listen-answer-correct::after,
  .listen-game .listen-answer-card .listen-color-balloon,
  .listen-game .listen-answer-card.listen-answer-correct .listen-color-balloon-core,
  .listen-game .listen-answer-card .listen-color-burst i,
  .listen-game .listen-answer-card.listen-animal-answer-card .listen-animal-art-motion,
  .listen-game .listen-answer-card.listen-animal-answer-card.listen-answer-correct .listen-animal-art-motion,
  .listen-game .listen-answer-card.listen-animal-answer-card.listen-answer-wrong .listen-animal-art-motion,
  .listen-game .listen-answer-card .listen-animal-celebration i,
  .listen-game .listen-answer-card.listen-answer-wrong,
  .listen-feedback-face {
    animation: none;
  }

  .listen-game .listen-answer-card .listen-color-balloon {
    will-change: auto;
  }

  .listen-game .listen-answer-card .listen-color-burst {
    display: none;
  }

  .listen-game .listen-answer-card .listen-animal-celebration {
    display: none;
  }

  .listen-game .listen-answer-card .listen-animal-art-motion {
    will-change: auto;
    transform: none;
  }

  .listen-game .listen-answer-card.listen-number-answer-card.listen-answer-correct .listen-number-art-motion {
    animation: none;
    transform: none;
  }

  .listen-game .listen-answer-card .listen-number-sparkles i {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 359px) {
  .listen-game-top { gap: 7px; }
  .listen-game-top h1 { font-size: 1.35rem; }
  .listen-game .listen-replay { width: 64px; min-width: 64px; min-height: 64px; gap: 3px; padding: 6px; }
  .listen-replay span:last-child { font-size: .66rem; }
  .listen-topic-pills { padding-inline: 9px; gap: 5px; }
  .listen-topic-pills button { font-size: .64rem; }
  .listen-game .listen-answer-card { min-height: 152px; }
  .listen-game .listen-answer-card > span:first-child { height: 136px; }
}

@media (orientation: landscape) and (max-height: 620px) and (min-width: 700px) {
  .listen-game-top { min-height: 82px; padding-block: 9px; }
  .listen-game .listen-replay { min-height: 66px; }
  .listen-topic-pills { padding-top: 8px; }
  .listen-topic-pills button { min-height: 54px; }
  .listen-game .listen-game-body { padding-top: 12px; padding-bottom: 12px; }
  .listen-game .listen-answer-card { min-height: 190px; }
  .listen-game .listen-answer-card > span:first-child { height: 168px; }
}

@media (prefers-reduced-motion: reduce) {
  .listen-progress-track > span,
  .listen-game .listen-answer-card { transition: none; }
  .listen-game .listen-answer-card:hover { transform: none; }

  .listen-game .listen-answer-card.listen-number-answer-card .listen-number-art-motion.listen-number-art-idle {
    animation: none;
    transform: none;
    will-change: auto;
  }
}

/* Shared game-focus shell: same play routes, with the overview as the one clear exit. */
body.game-focus-route {
  background: var(--paper, #f7fafc);
}

body.game-focus-route .main-shell {
  width: min(100%, 1700px);
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3.2vw, 48px);
}

body.game-focus-route .game-focus-top {
  min-height: 76px;
  height: auto;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 0;
}

body.game-focus-route .game-focus-top .mobile-logo,
body.game-focus-route .game-focus-top .welcome-label,
body.game-focus-route footer {
  display: none;
}

body.game-focus-route .gentle-note {
  display: none;
}

body.game-focus-route .top-actions {
  width: 100%;
  justify-content: flex-end;
  gap: clamp(7px, 1.2vw, 13px);
}

.game-overview-exit {
  display: inline-flex;
  min-width: 44px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-right: auto;
  padding: 8px 17px;
  border: 1px solid #d4e2d9;
  border-radius: 17px 17px 6px 17px;
  background: #edf5eb;
  box-shadow: 0 3px 0 #203e4a0c;
  color: #345846;
  font: 600 1rem/1.1 Fredoka, "Trebuchet MS", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.game-overview-exit > span:first-child {
  font: 700 1.35rem/1 "DM Sans", sans-serif;
}

body.game-focus-route .language-picker select,
body.game-focus-route .sound-toggle {
  min-width: 44px;
  min-height: 48px;
}

body.game-focus-route #main button,
body.game-focus-route #main a[href] {
  min-width: 44px;
  min-height: 44px;
}

/* All game views already share this template link; the shell exit replaces duplicates. */
body.game-focus-route .game-head a.back {
  display: none;
}

body.game-focus-route .game-head [data-market-departments] {
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 460px) {
  body.game-focus-route .main-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  body.game-focus-route .game-focus-top {
    min-height: 70px;
    padding: 8px 0;
  }

  body.game-focus-route .top-actions {
    gap: 6px;
  }

  .game-overview-exit {
    min-height: 48px;
    gap: 6px;
    padding: 7px 10px;
    font-size: .9rem;
  }

  body.game-focus-route .language-picker > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Final focus-mode cascade: reserve room for every header control, then let play fill it. */
body.game-focus-route .main-shell {
  width: 100%;
  max-width: 1700px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(4px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

body.game-focus-route .game-focus-top {
  min-height: 58px;
  height: auto;
  padding: 3px 0 7px;
}

body.game-focus-route .game-focus-top .top-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 6px;
}

body.game-focus-route .game-overview-exit {
  justify-self: start;
  max-width: none;
  min-width: 44px;
  min-height: 48px;
  margin-right: 0;
  overflow: visible;
  padding: 7px 10px;
}

body.game-focus-route .game-focus-top .language-picker {
  display: block;
  min-width: 0;
}

body.game-focus-route .game-focus-top .language-picker select {
  display: block;
  width: 94px;
  min-width: 44px;
  min-height: 48px;
}

body.game-focus-route .game-focus-top .sound-toggle {
  display: inline-grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 48px;
  min-height: 48px;
  justify-self: end;
}

body.game-focus-route #main {
  width: 100%;
  max-width: 1380px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 0 10px;
}

body.game-focus-route #main .playground,
body.game-focus-route #main .feed-game-screen,
body.game-focus-route #main .market-category-picker {
  width: 100%;
  max-width: 1380px;
  min-width: 0;
  min-height: max(410px, calc(100vh - 80px));
  min-height: max(410px, calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  margin: 0 auto;
}

body.game-focus-route #main .market-category-picker {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(12px, 3vh, 32px) clamp(8px, 2vw, 20px) max(28px, env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

body.game-focus-route #main .market-category-grid {
  width: 100%;
  max-width: 1020px;
  margin: clamp(14px, 2.5vh, 26px) auto 0;
}

body.game-focus-route #main .market-category-card {
  min-height: clamp(150px, 18vh, 190px);
}

body.game-focus-route #main .game-feedback,
body.game-focus-route #main .listen-game-feedback,
body.game-focus-route #main .feed-game-feedback {
  overflow-wrap: anywhere;
}

body.game-focus-route #main .playground:not(.listen-game) {
  display: flex;
  flex-direction: column;
}

body.game-focus-route #main .playground:not(.listen-game) > .game-body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: clamp(12px, 2.5vh, 24px);
}

body.game-focus-route #main .playground:not(.listen-game) .answer-grid,
body.game-focus-route #main .playground:not(.listen-game) .memory-board,
body.game-focus-route #main .playground:not(.listen-game) .hide-board,
body.game-focus-route #main .playground:not(.listen-game) .number-path,
body.game-focus-route #main .playground:not(.listen-game) .pair-board,
body.game-focus-route #main .playground:not(.listen-game) .bubble-board {
  flex: 1 0 auto;
  align-content: center;
}

body.game-focus-route #main .playground:not(.listen-game) .answer-card > span:first-child {
  height: clamp(130px, 25dvh, 300px);
}

body.game-focus-route #main .listen-game {
  display: flex;
  flex-direction: column;
}

body.game-focus-route #main .listen-session-progress {
  width: min(100%, 1050px);
  align-self: center;
}

body.game-focus-route #main .listen-game .listen-game-body {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-height: 0;
}

body.game-focus-route #main .listen-game .listen-answer-grid {
  display: grid;
  flex: 1 0 auto;
  grid-auto-rows: minmax(170px, 1fr);
  align-content: stretch;
  width: 100%;
  min-width: 0;
}

body.game-focus-route #main .listen-game .listen-answer-card {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

body.game-focus-route #main .listen-game .listen-answer-card > span:first-child {
  flex: 1 0 auto;
  height: auto;
  min-height: clamp(170px, 34dvh, 360px);
}

body.game-focus-route #main .listen-game .listen-answer-card > span:first-child img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}

body.game-focus-route #toast {
  top: calc(env(safe-area-inset-top) + 62px);
  bottom: auto;
}

body.game-focus-route:has(#toast.visible) #main {
  margin-top: 58px;
}

body.memory-game-route.game-focus-route:has(#toast.visible) #main {
  margin-top: 0;
}

@media (min-width: 701px) {
  body.game-focus-route .main-shell {
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
  }

  body.game-focus-route #main .playground,
  body.game-focus-route #main .feed-game-screen,
  body.game-focus-route #main .market-category-picker {
    min-height: max(520px, calc(100vh - 90px));
    min-height: max(520px, calc(100dvh - 90px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  }
}

@media (max-width: 700px) {
  body.game-focus-route .main-shell {
    padding-right: max(8px, env(safe-area-inset-right));
    padding-left: max(8px, env(safe-area-inset-left));
  }

  body.game-focus-route .game-focus-top .top-actions {
    grid-template-columns: minmax(0, 1fr) 82px 44px;
    gap: 5px;
  }

  body.game-focus-route .game-focus-top .language-picker select {
    width: 82px;
    padding-right: 22px;
    padding-left: 7px;
  }

  body.game-focus-route #main .market-category-card {
    min-height: clamp(126px, 17vh, 170px);
    padding: 12px 7px;
  }

  body.game-focus-route #main .playground,
  body.game-focus-route #main .feed-game-screen,
  body.game-focus-route #main .market-category-picker {
    min-height: max(410px, calc(100vh - 76px));
    min-height: max(410px, calc(100dvh - 76px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  }

  body.game-focus-route #main .market-category-picker {
    padding-bottom: max(88px, calc(68px + env(safe-area-inset-bottom)));
  }
}

@media (max-width: 359px) {
  body.game-focus-route .game-focus-top .top-actions {
    grid-template-columns: minmax(0, 1fr) 76px 44px;
    gap: 4px;
  }

  body.game-focus-route .game-focus-top .language-picker select {
    width: 76px;
  }

  body.game-focus-route .game-overview-exit {
    max-width: 100%;
    padding-right: 7px;
    padding-left: 7px;
    font-size: .82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.game-focus-route #main * {
    scroll-behavior: auto;
  }
}

/* Market and feeding board growth overrides follow the focus-shell cascade. */
body.game-focus-route #main .market-scene {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: clamp(7px, 1.2vh, 13px);
  width: 100%;
  max-width: 1380px;
  min-width: 0;
  min-height: clamp(460px, 72dvh, 900px);
  margin: 0 auto;
}

body.game-focus-route #main .market-scene .market-banner {
  flex: 0 0 auto;
  width: 100%;
}

body.game-focus-route #main .market-scene .market-request-list {
  display: grid;
  flex: 0 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 1100px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  margin: 0 auto;
}

body.game-focus-route #main .market-scene .market-request-card {
  min-height: clamp(60px, 9dvh, 76px);
}

body.game-focus-route #main .market-scene .food-shelf {
  flex: 1 0 auto;
  align-content: stretch;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  grid-auto-rows: minmax(150px, 1fr);
  min-width: 0;
}

body.game-focus-route #main .market-scene .food-shelf > button {
  min-width: 0;
  min-height: 150px;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

body.game-focus-route #main .market-scene .food-shelf > button > .market-choice-art {
  flex: 0 0 auto;
  width: clamp(76px, 11vw, 140px);
  height: clamp(76px, 11vw, 140px);
}

body.game-focus-route #main .market-scene .market-basket {
  flex: 0 0 auto;
  min-width: 0;
  margin-top: 0;
}

body.game-focus-route #main .feed-game-screen {
  display: flex;
  flex-direction: column;
}

body.game-focus-route #main .feed-game-screen .feed-game-body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-height: 0;
}

body.game-focus-route #main .feed-game-screen .feed-stage {
  flex: 1 0 auto;
  min-height: clamp(240px, 38dvh, 430px);
}

body.game-focus-route #main .feed-game-screen .feed-camel-card,
body.game-focus-route #main .feed-game-screen .feed-tray {
  min-height: clamp(220px, 34dvh, 380px);
}

body.game-focus-route #main .feed-game-screen .feed-camel-image {
  min-height: inherit;
}

@media (max-width: 700px) {
  body.game-focus-route #main .market-scene {
    min-height: clamp(440px, 72dvh, 760px);
  }

  body.game-focus-route #main .market-scene .food-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(132px, 1fr);
  }

  body.game-focus-route #main .market-scene .food-shelf > button {
    min-height: 132px;
  }

  body.game-focus-route #main .market-scene .food-shelf > button > .market-choice-art {
    width: clamp(70px, 22vw, 112px);
    height: clamp(70px, 22vw, 112px);
  }

  body.game-focus-route #main .market-scene .food-shelf > button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(100%, 220px);
    justify-self: center;
  }

  body.game-focus-route #main .feed-game-screen .feed-stage {
    min-height: clamp(220px, 34dvh, 340px);
  }

  body.game-focus-route #main .feed-game-screen .feed-camel-card,
  body.game-focus-route #main .feed-game-screen .feed-tray {
    min-height: clamp(190px, 30dvh, 300px);
  }
}

/* Focus-game refinements: larger touch content without changing card counts or mechanics. */
body.game-focus-route #main .listen-game .listen-answer-card .emoji {
  font-size: clamp(5rem, 16vw, 7rem);
  line-height: 1;
}

body.game-focus-route #main .bubble-board {
  width: 100%;
  max-width: 760px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  padding: 8px 0;
  flex: 1 0 auto;
  align-content: center;
}

body.game-focus-route #main .bubble-board .bubble {
  width: min(100%, clamp(128px, 17vw, 220px));
  max-width: none;
}

body.game-focus-route #main .memory-board {
  width: 100%;
  max-width: 1180px;
  gap: clamp(8px, 1.2vw, 16px);
}

body.game-focus-route #main .memory-tile {
  min-height: clamp(96px, 15dvh, 158px);
  padding: clamp(5px, 1vw, 12px);
}

body.game-focus-route #main .memory-tile img {
  height: clamp(52px, 8dvh, 80px);
  max-width: 100%;
}

body.game-focus-route #main .game-head [data-market-departments] {
  min-height: 44px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid #d7e3dd;
  border-radius: 14px;
  background: #f4f7f5;
  color: #526a61;
  font-size: .88rem;
  font-weight: 600;
}

body.game-focus-route #main .market-scene .market-banner {
  display: flex;
  height: auto;
  min-height: 96px;
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
  padding: 10px 14px;
  overflow: visible;
  border-radius: 20px;
  background: #fff7e8;
}

body.game-focus-route #main .market-scene .market-banner-art {
  display: grid;
  width: clamp(64px, 8vw, 92px);
  height: clamp(64px, 8vw, 92px);
  flex: 0 0 auto;
  place-items: center;
}

body.game-focus-route #main .market-scene .market-banner-art img,
body.game-focus-route #main .market-scene .market-banner-art .market-category-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.game-focus-route #main .market-scene .market-banner > div {
  position: static;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

body.game-focus-route #main .market-scene .market-banner h2 {
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  line-height: 1.15;
}

body.game-focus-route #main .market-scene .market-banner p {
  margin-top: 4px;
}

body.game-focus-route #main .market-scene .market-request-list {
  display: grid;
  gap: 8px;
}

@media (max-width: 700px) {
  body.game-focus-route #main .bubble-board {
    max-width: min(100%, 480px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 3vw, 20px);
  }

  body.game-focus-route #main .bubble-board .bubble {
    width: min(100%, clamp(116px, 34vw, 168px));
  }

  body.game-focus-route #main .memory-board {
    gap: clamp(7px, 2vw, 11px);
  }
}

@media (max-width: 359px) {
  body.game-focus-route #main .memory-board {
    gap: 6px;
  }
}

/* Final Listen sizing: keep the face and category row reachable below the pictures. */
body.listen-game-route .listen-game .listen-replay {
  width: 64px;
  min-width: 64px;
  height: 60px;
  min-height: 60px;
  padding: 5px;
  border-radius: 18px;
}

body.listen-game-route .listen-game .listen-replay span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body.game-focus-route #main .listen-game .listen-game-body {
  flex: 0 0 auto;
  justify-content: flex-start;
}

body.game-focus-route #main .playground.listen-game {
  min-height: auto;
}

body.game-focus-route #main .listen-game .listen-answer-grid {
  flex: 0 0 auto;
  grid-auto-rows: auto;
  align-content: center;
}

body.game-focus-route #main .listen-game .listen-answer-card {
  min-height: 0;
}

body.game-focus-route #main .listen-game .listen-answer-card > span:first-child {
  flex: 0 0 auto;
  width: 100%;
  height: clamp(220px, 34dvh, 360px);
  min-height: clamp(220px, 34dvh, 360px);
  max-height: 360px;
}

@media (max-width: 520px) {
  body.game-focus-route #main .listen-game .listen-answer-card > span:first-child {
    height: clamp(200px, 30dvh, 260px);
    min-height: clamp(200px, 30dvh, 260px);
  }
}

/* Phase 2B: visual-only controls and progress for the text-light Listen route. */
body.listen-game-route .listen-sr-only,
body.listen-game-route .listen-session-progress,
body.listen-game-route .listen-session-progress > b,
body.listen-game-route .listen-audio-status,
body.listen-game-route .listen-topic-label,
body.listen-game-route .game-overview-exit > span:not(:first-child),
body.listen-game-route .game-focus-top .language-picker > span,
body.listen-game-route .listen-completion .journey-continue > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body.listen-game-route .game-overview-exit {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  justify-self: start;
  margin-right: 0;
  padding: 0;
  border-radius: 50%;
}

body.listen-game-route .game-focus-top .language-picker {
  position: relative;
  display: grid;
  width: 48px;
  min-width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line, #d8e6dc);
  border-radius: 14px;
  background: #fff;
  color: var(--ink, #294f50);
}

body.listen-game-route .game-focus-top .language-picker::after {
  position: absolute;
  color: inherit;
  content: "文A";
  font: 750 1rem/1 system-ui, sans-serif;
  pointer-events: none;
}

body.listen-game-route .game-focus-top .language-picker:focus-within {
  outline: 3px solid #c7764e;
  outline-offset: 2px;
}

body.listen-game-route .game-focus-top .language-picker select {
  position: absolute;
  inset: 0;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

body.listen-game-route .listen-topic-pills {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.listen-game-route .listen-topic-pills button {
  grid-template-rows: 1fr;
  min-height: 48px;
}

body.listen-game-route .listen-start {
  position: relative;
}

body.listen-game-route .listen-start::after {
  position: absolute;
  right: 8px;
  bottom: 6px;
  color: #176f6d;
  content: "▶";
  font-size: .65rem;
  line-height: 1;
  pointer-events: none;
}

body.listen-game-route #main .listen-game .listen-game-body {
  padding-top: 0;
}

body.listen-game-route #main .listen-play-controls {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}

.listen-completion {
  display: grid;
  width: min(100%, 640px);
  justify-items: center;
  align-content: center;
  gap: clamp(16px, 3vh, 26px);
  margin: 0 auto;
  padding: clamp(18px, 4vh, 42px) 16px;
  text-align: center;
}

.listen-completion-art {
  position: relative;
  display: grid;
  width: clamp(170px, 42vw, 280px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #f0e3b8;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7d9 0 48%, #fffdf4 72%);
}

.listen-completion-art img {
  display: block;
  width: clamp(125px, 28vw, 190px);
  height: clamp(125px, 28vw, 190px);
  object-fit: contain;
}

.listen-completion-sparkle {
  position: absolute;
  color: #e9b749;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1;
}

.listen-completion-sparkle-one { top: 10%; left: 16%; }
.listen-completion-sparkle-two { top: 20%; right: 9%; color: #83b7a2; }
.listen-completion-sparkle-three { right: 16%; bottom: 12%; color: #e78f78; }
.listen-completion-sparkle-four { bottom: 18%; left: 8%; }

.listen-completion-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.listen-completion-action {
  display: grid;
  width: 68px;
  min-width: 68px;
  height: 68px;
  min-height: 68px;
  place-items: center;
  border: 2px solid #d9e5d9;
  color: #28675e;
  font: 700 2rem/1 system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 4px 0 #284a3614;
}

.listen-completion-replay {
  border-radius: 50%;
  background: #e3f1e5;
}

.listen-completion-games {
  border-radius: 20px 20px 7px 20px;
  background: #fff5db;
}

.listen-completion .journey-continue {
  justify-content: center;
  padding: 0;
}

.listen-completion .journey-continue > .btn {
  position: relative;
  width: 60px;
  min-width: 60px;
  height: 60px;
  min-height: 60px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
}

.listen-completion .journey-continue > .btn::after {
  color: currentColor;
  content: "→";
  font-size: 1.7rem;
}

@media (prefers-reduced-motion: reduce) {
  .listen-completion-art img {
    animation: none;
  }
}

/* Static safari atmosphere, isolated to Listen & find → Animals. */
body.listen-game-route.listen-animal-scene {
  position: relative;
  isolation: isolate;
  background-color: #fff7e8;
  background-image:
    radial-gradient(circle 1.7rem at calc(100% - 54px) 70px, #fde8ae 0 76%, transparent 81%),
    radial-gradient(ellipse 76px 25px at 7% 72px, #ffffffad 0 52%, transparent 77%),
    radial-gradient(ellipse 54px 18px at 18% 89px, #ffffff8a 0 52%, transparent 77%),
    linear-gradient(155deg, #fffbf2 0%, #fff7e8 52%, #fbe8d1 100%);
}

body.listen-game-route.listen-animal-scene::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .46;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 240'%3E%3Cpath d='M12 232C22 172 39 99 88 10' fill='none' stroke='%23BFD5A2' stroke-width='3' stroke-linecap='round'/%3E%3Cellipse cx='24' cy='177' rx='8' ry='17' transform='rotate(-48 24 177)' fill='%23DAE9C3'/%3E%3Cellipse cx='19' cy='146' rx='8' ry='16' transform='rotate(42 19 146)' fill='%23BFD5A2'/%3E%3Cellipse cx='42' cy='119' rx='8' ry='17' transform='rotate(-43 42 119)' fill='%23DAE9C3'/%3E%3Cellipse cx='38' cy='89' rx='8' ry='16' transform='rotate(40 38 89)' fill='%23BFD5A2'/%3E%3Cellipse cx='64' cy='61' rx='8' ry='17' transform='rotate(-42 64 61)' fill='%23DAE9C3'/%3E%3Cellipse cx='60' cy='34' rx='7' ry='15' transform='rotate(40 60 34)' fill='%23BFD5A2'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 240'%3E%3Cpath d='M88 232C78 172 61 99 12 10' fill='none' stroke='%23BFD5A2' stroke-width='3' stroke-linecap='round'/%3E%3Cellipse cx='76' cy='177' rx='8' ry='17' transform='rotate(48 76 177)' fill='%23DAE9C3'/%3E%3Cellipse cx='81' cy='146' rx='8' ry='16' transform='rotate(-42 81 146)' fill='%23BFD5A2'/%3E%3Cellipse cx='58' cy='119' rx='8' ry='17' transform='rotate(43 58 119)' fill='%23DAE9C3'/%3E%3Cellipse cx='62' cy='89' rx='8' ry='16' transform='rotate(-40 62 89)' fill='%23BFD5A2'/%3E%3Cellipse cx='36' cy='61' rx='8' ry='17' transform='rotate(42 36 61)' fill='%23DAE9C3'/%3E%3Cellipse cx='40' cy='34' rx='7' ry='15' transform='rotate(-40 40 34)' fill='%23BFD5A2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: clamp(48px, 7vw, 92px) 220px, clamp(48px, 7vw, 92px) 220px;
  background-position: left 0 top 24%, right 0 top 29%;
}

body.listen-game-route.listen-animal-scene::after {
  position: fixed;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(112px, 20vh, 210px);
  content: "";
  pointer-events: none;
  opacity: .64;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 220' preserveAspectRatio='none'%3E%3Cpath d='M0 94C170 28 320 65 500 117c190 55 334 35 493-22 178-64 302-45 447 1v124H0Z' fill='%23DAE9C3'/%3E%3Cpath d='M0 147c183-62 353-25 523 17 181 44 329 15 488-27 167-44 296-20 429 19v64H0Z' fill='%23BFD5A2'/%3E%3Cpath d='M263 168v-18m-8 8c-10-12-20 0-8 7m16-8c10-12 20 0 8 7' fill='none' stroke='%23A9C28C' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='263' cy='149' r='4' fill='%23FFFBF2'/%3E%3Ccircle cx='263' cy='149' r='1.5' fill='%23FDE8AE'/%3E%3Cpath d='M1038 177v-17m-8 7c-10-12-20 0-8 7m16-8c10-12 20 0 8 7' fill='none' stroke='%23A9C28C' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='1038' cy='160' r='4' fill='%23FFFBF2'/%3E%3Ccircle cx='1038' cy='160' r='1.5' fill='%23FDE8AE'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}

body.listen-game-route.listen-animal-scene #main .playground.listen-game {
  position: relative;
  isolation: isolate;
  border-color: #eadfc8;
  background: linear-gradient(145deg, #fffbf2 0%, #fff7e8 72%, #fff9ef 100%);
  box-shadow: 0 5px 0 #6957350a, 0 14px 30px #77613b12;
}

body.listen-game-route.listen-animal-scene #main .playground.listen-game::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .48;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23b8a17e' fill-opacity='.23'%3E%3Cellipse cx='17' cy='15' rx='5' ry='7' transform='rotate(-24 17 15)'/%3E%3Cellipse cx='30' cy='10' rx='5' ry='7'/%3E%3Cellipse cx='43' cy='15' rx='5' ry='7' transform='rotate(24 43 15)'/%3E%3Cellipse cx='52' cy='25' rx='4.5' ry='6' transform='rotate(38 52 25)'/%3E%3Cpath d='M32 24c-10 0-18 8-18 18 0 7 5 11 11 9 3-1 5-2 7-2s4 1 7 2c6 2 11-2 11-9 0-10-8-18-18-18Z'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23b8a17e' fill-opacity='.23'%3E%3Cellipse cx='17' cy='15' rx='5' ry='7' transform='rotate(-24 17 15)'/%3E%3Cellipse cx='30' cy='10' rx='5' ry='7'/%3E%3Cellipse cx='43' cy='15' rx='5' ry='7' transform='rotate(24 43 15)'/%3E%3Cellipse cx='52' cy='25' rx='4.5' ry='6' transform='rotate(38 52 25)'/%3E%3Cpath d='M32 24c-10 0-18 8-18 18 0 7 5 11 11 9 3-1 5-2 7-2s4 1 7 2c6 2 11-2 11-9 0-10-8-18-18-18Z'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse at left top, #dae9c34d 0, transparent 72%),
    radial-gradient(ellipse at right bottom, #fbe8d14d 0, transparent 72%);
  background-repeat: no-repeat;
  background-size: 42px 42px, 42px 42px, 165px 100px, 165px 100px;
  background-position: 17% 39%, 83% 66%, left top, right bottom;
}

/* A verified Admin image replaces only this route's decorative safari layers. */
body.listen-game-route.listen-animal-scene.listen-animal-image-active::before {
  opacity: 1;
  background: var(--listen-animal-background-image) no-repeat var(--listen-animal-background-position, center center) / var(--listen-animal-background-fit, cover);
}

body.listen-game-route.listen-animal-scene.listen-animal-image-active::after,
body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game::before {
  display: none;
}

@media (min-width: 900px) {
  body.listen-game-route.listen-animal-scene::before {
    opacity: .38;
    background-size: clamp(76px, 8vw, 120px) 290px, clamp(76px, 8vw, 120px) 290px;
    background-position: left 4px top 19%, right 4px top 23%;
  }
}

@media (max-width: 520px) {
  body.listen-game-route.listen-animal-scene::before {
    opacity: .23;
    background-size: 46px 170px, 46px 170px;
    background-position: left -8px top 25%, right -8px top 30%;
  }

  body.listen-game-route.listen-animal-scene::after {
    height: clamp(94px, 16vh, 145px);
    opacity: .52;
  }

  body.listen-game-route.listen-animal-scene #main .playground.listen-game::before {
    opacity: .34;
    background-size: 34px 34px, 34px 34px, 120px 76px, 120px 76px;
  }
}

/* Listen topics: CMS artwork first, with an always-available inline illustration behind it. */
body.listen-game-route .listen-topic-pills {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 10px);
  padding: clamp(11px, 1.6vh, 16px) clamp(8px, 2vw, 22px) 0;
  overflow: visible;
}

body.listen-game-route .listen-topic-pills button {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  min-width: 0;
  min-height: clamp(72px, 9vh, 88px);
  padding: 6px 3px;
  overflow: visible;
}

body.listen-game-route .listen-topic-art {
  position: relative;
  display: grid;
  width: min(100%, 58px);
  height: 44px;
  min-width: 0;
  place-items: center;
  justify-self: center;
  pointer-events: none;
}

body.listen-game-route .listen-topic-art svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

body.listen-game-route .listen-topic-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: auto;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity .16s ease;
}

body.listen-game-route .listen-topic-art.is-media-loaded img {
  opacity: 1;
}

body.listen-game-route .listen-topic-art.is-media-loaded svg {
  opacity: 0;
}

/* Only the Animals scene uses the spare viewport height; leave the lower landscape visible. */
body.listen-game-route.listen-animal-scene #main .playground.listen-game {
  --listen-animal-scenery-clearance: clamp(56px, 12dvh, 104px);
  display: flex;
  min-height: max(410px, calc(100dvh - 58px - var(--listen-animal-scenery-clearance) - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  flex-direction: column;
  gap: clamp(5px, 1.1vh, 10px);
  padding: clamp(10px, 2vh, 18px) clamp(8px, 2vw, 22px) clamp(10px, 1.8vh, 16px);
}

body.listen-game-route.listen-animal-scene #main .listen-game .listen-game-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  gap: clamp(5px, 1vh, 12px);
  padding: 0;
}

body.listen-game-route.listen-animal-scene #main .listen-game .listen-answer-card > span:first-child {
  height: clamp(220px, 30dvh, 300px);
  min-height: clamp(220px, 30dvh, 300px);
  max-height: 300px;
}

body.listen-game-route.listen-animal-scene #main .listen-game .listen-answer-card > span:first-child img {
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}

body.listen-game-route.listen-animal-scene #main .listen-game .listen-topic-pills {
  flex: 0 0 auto;
  padding: clamp(8px, 1.2vh, 14px) clamp(2px, 1vw, 10px) 0;
}

@media (max-width: 520px) {
  body.listen-game-route .listen-topic-art {
    width: min(100%, 52px);
    height: 40px;
  }
}

@media (max-width: 360px) {
  body.listen-game-route .listen-topic-art {
    width: min(100%, 46px);
    height: 36px;
  }
}

@media (max-width: 520px) and (max-height: 640px) {
  body.listen-game-route .listen-topic-pills button {
    min-height: 64px;
    padding-block: 4px;
  }

  body.listen-game-route.listen-animal-scene #main .playground.listen-game {
    --listen-animal-scenery-clearance: clamp(34px, 7dvh, 44px);
    min-height: max(360px, calc(100dvh - 58px - var(--listen-animal-scenery-clearance) - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  }

  body.listen-game-route.listen-animal-scene #main .listen-game .listen-answer-card > span:first-child {
    height: clamp(136px, 26dvh, 160px);
    min-height: clamp(136px, 26dvh, 160px);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.listen-game-route .listen-topic-art img {
    transition: none;
  }
}

/* The verified Admin Safari backdrop should remain visible beneath every choice surface. */
body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game {
  border-color: rgba(255, 255, 255, .24);
  background: transparent;
  box-shadow: none;
}

body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-answer-card {
  border: 2px solid rgba(255, 255, 255, .9);
  background: transparent;
  box-shadow: 0 1px 5px rgba(35, 54, 42, .14);
}

body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-answer-card > span:first-child {
  background: transparent;
}

body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-animal-art-stage,
body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-animal-art-motion,
body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-animal-art-motion > img {
  background: transparent;
}

body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-answer-card.listen-answer-correct {
  border-color: #74b498;
  background: transparent;
  box-shadow: 0 0 0 4px #80c49a38, 0 10px 26px #62a97a33;
}

body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-answer-card.listen-answer-wrong {
  border-color: #e6a7a0;
  background: transparent;
  box-shadow: 0 0 0 3px #eabbb342;
}

body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-topic-pills button {
  border: 2px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 1px rgba(36, 59, 48, .16), 0 2px 5px rgba(36, 59, 48, .1);
}

body.listen-game-route.listen-animal-scene.listen-animal-image-active #main .playground.listen-game .listen-topic-pills button[aria-pressed="true"] {
  border-color: #5cae96;
  background: rgba(117, 190, 164, .1);
  box-shadow: 0 0 0 1px rgba(38, 107, 98, .24), 0 2px 5px rgba(36, 59, 48, .1);
}

/* Listen topics use the same transparent, outlined surface only after their own image loads. */
body.listen-game-route.listen-topic-scene:not(.listen-animal-scene) {
  position: relative;
  isolation: isolate;
  background-color: #fff7e8;
  background-image: linear-gradient(155deg, #fffbf2 0%, #fff7e8 52%, #fbe8d1 100%);
}

body.listen-game-route.listen-topic-scene:not(.listen-animal-scene)::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image: var(--listen-topic-background-image, none);
  background-repeat: no-repeat;
  background-size: var(--listen-topic-background-fit, cover);
  background-position: var(--listen-topic-background-position, center);
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active #main .playground.listen-game {
  border-color: rgba(255, 255, 255, .24);
  background: transparent;
  box-shadow: none;
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active #main .playground.listen-game .listen-answer-card {
  border: 2px solid rgba(255, 255, 255, .9);
  background: transparent;
  box-shadow: 0 1px 5px rgba(35, 54, 42, .14);
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active #main .playground.listen-game .listen-answer-card > span:first-child,
body.listen-game-route.listen-topic-scene.listen-topic-image-active #main .playground.listen-game .listen-color-balloon-stage {
  background: transparent;
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active #main .playground.listen-game .listen-answer-card.listen-answer-correct {
  border-color: #74b498;
  background: transparent;
  box-shadow: 0 0 0 4px #80c49a38, 0 10px 26px #62a97a33;
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active #main .playground.listen-game .listen-answer-card.listen-answer-wrong {
  border-color: #e6a7a0;
  background: transparent;
  box-shadow: 0 0 0 3px #eabbb342;
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active #main .playground.listen-game .listen-topic-pills button {
  border-color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .28);
  color: #31534d;
  text-shadow: 0 1px 2px #fff, 0 -1px 2px #fff, 1px 0 2px #fff, -1px 0 2px #fff;
  box-shadow: 0 0 0 1px rgba(36, 59, 48, .16), 0 2px 5px rgba(36, 59, 48, .1);
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active #main .playground.listen-game .listen-topic-pills button[aria-pressed="true"] {
  border-color: #5cae96;
  background: rgba(117, 190, 164, .3);
  box-shadow: 0 0 0 1px rgba(38, 107, 98, .24), 0 2px 5px rgba(36, 59, 48, .1);
}

/* Match Animals' vertical balance for image-backed topics without changing Animals itself. */
body.listen-game-route.listen-topic-scene.listen-topic-image-active:not(.listen-animal-scene) #main .playground.listen-game {
  --listen-topic-scenery-clearance: clamp(56px, 12dvh, 104px);
  display: flex;
  min-height: max(410px, calc(100dvh - 58px - var(--listen-topic-scenery-clearance) - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  flex-direction: column;
  gap: clamp(5px, 1.1vh, 10px);
  padding: clamp(10px, 2vh, 18px) clamp(8px, 2vw, 22px) clamp(10px, 1.8vh, 16px);
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active:not(.listen-animal-scene) #main .listen-game .listen-game-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  gap: clamp(5px, 1vh, 12px);
  padding: 0;
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active:not(.listen-animal-scene) #main .listen-game .listen-answer-card > span:first-child {
  height: clamp(220px, 30dvh, 300px);
  min-height: clamp(220px, 30dvh, 300px);
  max-height: 300px;
}

body.listen-game-route.listen-topic-scene.listen-topic-image-active:not(.listen-animal-scene) #main .listen-game .listen-topic-pills {
  flex: 0 0 auto;
  padding: clamp(8px, 1.2vh, 14px) clamp(2px, 1vw, 10px) 0;
}

@media (max-width: 520px) and (max-height: 640px) {
  body.listen-game-route.listen-topic-scene.listen-topic-image-active:not(.listen-animal-scene) #main .playground.listen-game {
    --listen-topic-scenery-clearance: clamp(34px, 7dvh, 44px);
    min-height: max(360px, calc(100dvh - 58px - var(--listen-topic-scenery-clearance) - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  }

  body.listen-game-route.listen-topic-scene.listen-topic-image-active:not(.listen-animal-scene) #main .listen-game .listen-answer-card > span:first-child {
    height: clamp(136px, 26dvh, 160px);
    min-height: clamp(136px, 26dvh, 160px);
  }
}
