:root {
  --navy: #174a7e;
  --navy-deep: #10385f;
  --ink: #17354a;
  --turquoise: #d9f6f3;
  --turquoise-strong: #77ccd0;
  --snow: #f6fbfc;
  --white: #ffffff;
  --honey: #a8612f;
  --honey-deep: #704020;
  --honey-pale: #f1d6b8;
  --line: #bfd9df;
  --surface: #fffdf9;
  --shadow: 0 14px 34px rgba(16, 56, 95, 0.16);
  --radius: 24px;
  --radius-small: 16px;
  font-family: ui-rounded, "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--snow);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--snow);
  font-size: 18px;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

body.game-open {
  overflow: hidden;
  background: var(--navy-deep);
}

body.game-open .skip-link,
body.game-open .app-header,
body.game-open main,
body.game-open .bottom-nav {
  display: none !important;
}

button,
audio,
video {
  font: inherit;
}

button {
  color: inherit;
}

button,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
dialog:focus-visible {
  outline: 4px solid #0b6f9e;
  outline-offset: 3px;
}

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

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  color: var(--white);
  background: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 10px clamp(18px, 4vw, 64px);
  background: #dff4fb;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 4px 8px 4px 2px;
  border: 0;
  border-radius: 14px;
  color: var(--navy);
  background: transparent;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  cursor: pointer;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.preview-mark {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  color: #46697e;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.nav-button,
.parent-button,
.back-button {
  min-height: 48px;
  padding: 10px 15px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}

.nav-button:hover,
.parent-button:hover,
.back-button:hover {
  background: rgba(119, 204, 208, 0.34);
}

.nav-button[aria-current="page"] {
  color: var(--navy-deep);
  background: rgba(119, 204, 208, 0.42);
}

.parent-button {
  border-color: transparent;
  color: var(--navy);
  background: transparent;
}

.parent-button[aria-current="page"] {
  background: rgba(119, 204, 208, 0.42);
}

main {
  overflow: hidden;
}

.screen {
  width: min(100%, 1440px);
  min-height: calc(100dvh - 82px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 72px) clamp(18px, 5vw, 72px) 72px;
}

.home-screen {
  width: 100%;
  max-width: none;
  min-height: 740px;
  padding: 0;
}

.home-scene {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-areas:
    "intro"
    "links";
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 740px;
  overflow: hidden;
  background: var(--snow);
}

.home-scene-image {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 98%); /* taste-skill-ignore */
  mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 98%); /* taste-skill-ignore */
}

.home-intro {
  z-index: 1;
  grid-area: intro;
  padding: clamp(10px, 1.8vw, 18px) 20px 0;
  color: var(--navy);
  text-align: center;
}

.home-intro h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(4.2rem, 7.5vw, 7rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.home-intro-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 5px;
}

.home-intro-row p {
  margin: 0;
  color: var(--navy-deep);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 750;
  line-height: 1.2;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 13px 24px;
  border: 0;
  border-radius: 17px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.primary-button {
  color: var(--white);
  background: var(--navy);
}

.primary-button:hover {
  background: var(--navy-deep);
}

.home-intro .primary-button {
  min-height: 48px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.primary-button:active,
.secondary-button:active,
.quick-link:active,
.stop-button:active,
.scene-card:active,
.coloring-card:active,
.keepsake-card:active {
  transform: translateY(2px);
}

.primary-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen-heading h1,
.listen-card h2,
.dialog-card h2 {
  color: var(--navy);
  letter-spacing: -0.025em;
}

.quick-links {
  z-index: 1;
  grid-area: links;
  align-self: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 26px);
  width: 100%;
  padding: 24px clamp(20px, 4vw, 64px) 22px;
}

.quick-link {
  display: grid;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--navy);
  background: transparent;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.quick-link:hover {
  background: transparent;
}

.quick-link-art {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 5px solid rgba(255, 255, 255, 0.86);
  border-radius: 48% 52% 46% 54% / 42% 45% 55% 58%;
  background: var(--snow);
  box-shadow: 0 10px 22px rgba(16, 56, 95, 0.2); /* taste-skill-ignore */
}

.quick-link-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 220ms ease;
}

.quick-link-art-create img {
  object-position: center 56%;
}

.quick-link-art-album img {
  object-position: center 67%;
}

.quick-link:hover .quick-link-art img {
  transform: scale(1.025);
}

.quick-link:focus-visible {
  outline-offset: 5px;
}

.quick-link-label {
  display: block;
  padding: 7px 4px 0;
  color: var(--navy);
  font-size: clamp(0.95rem, 1.45vw, 1.15rem);
  line-height: 1.15;
  text-wrap: balance;
}

.screen-heading {
  max-width: 900px;
  margin-bottom: 30px;
}

.screen-heading h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.95;
}

.screen-heading > p,
.screen-heading > div > p {
  max-width: 60ch;
  margin: 14px 0 0;
  color: #284a61;
  font-size: 1.14rem;
}

.journey-layout {
  width: min(100%, 780px);
  margin-inline: auto;
}

.map-frame {
  margin: 0;
  border-radius: 28px;
  overflow: hidden;
}

.map-canvas {
  position: relative;
}

.map-canvas img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 19px;
  object-fit: contain;
}

.stop-button {
  position: absolute;
  top: var(--stop-y);
  left: var(--stop-x);
  width: max(48px, 9%);
  min-width: 48px;
  min-height: 48px;
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid rgba(255, 205, 110, 0.82);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stop-button:hover {
  border-color: #ffd982;
  background: rgba(255, 217, 130, 0.18);
}

.stop-button:active {
  transform: translate(-50%, calc(-50% + 2px));
}

.stop-button:focus-visible {
  border-color: var(--navy);
  outline: 4px solid var(--navy-deep);
  outline-offset: 3px;
}

.stop-button[aria-current="true"] {
  border-color: var(--navy);
  box-shadow: 0 0 0 5px rgba(23, 74, 126, 0.34);
}

.stop-button.is-complete {
  border-color: #f5c761;
  background: rgba(255, 248, 229, 0.3);
}

.stop-button.is-complete::after {
  content: "✓";
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 50%;
  color: var(--navy);
  background: var(--honey);
  font-size: 0.75rem;
  font-weight: 900;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  padding-inline: 14px;
  color: var(--navy);
  background: var(--white);
}

.back-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop-heading {
  max-width: 1000px;
}

.stop-progress {
  display: inline-block;
  margin-top: 15px !important;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--navy) !important;
  background: var(--turquoise);
  font-size: 0.88rem !important;
  font-weight: 800;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
}

.scene-card {
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

button.scene-card:hover {
  box-shadow: var(--shadow); /* taste-skill-ignore */
}

.scene-card.is-complete {
  box-shadow: inset 0 0 0 3px rgba(242, 193, 65, 0.75);
}

.scene-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 788;
  object-fit: contain;
  background: var(--turquoise);
}

.scene-card-body {
  display: block;
  padding: 18px 20px 20px;
}

.scene-card-title {
  display: block;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 850;
  line-height: 1.25;
}

.scene-action {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 10px;
  color: var(--honey-deep);
  font-weight: 800;
}

.parent-support {
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  margin-top: 40px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: var(--radius);
  background: var(--white);
}

.home-activity-confirm {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-top: 18px;
}

.home-activity-confirm p {
  margin: 0;
  color: #36576b;
  font-size: 0.92rem;
}

.parent-support-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  align-items: stretch;
  gap: clamp(18px, 3vw, 32px);
}

.parent-support-label {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 850;
}

.parent-support-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.parent-support-tip {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 18px 20px;
  border-radius: 18px;
  color: var(--white);
  background: var(--navy);
  font-size: 1.05rem;
  line-height: 1.4;
}

.parent-support-tip strong,
.parent-support-phrase strong {
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.parent-support-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.76fr) minmax(0, 1.24fr);
  align-items: start;
  gap: clamp(22px, 4vw, 48px);
}

.parent-activity-preview {
  overflow: hidden;
  width: min(100%, 460px);
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
}

.parent-activity-preview img {
  width: 100%;
  height: auto;
}

.parent-activity-preview span {
  display: grid;
  min-height: 52px;
  padding: 10px 16px;
  place-items: center;
  font-weight: 850;
}

.parent-activity-preview:hover span {
  background: var(--navy-deep);
}

.parent-support-copy {
  min-width: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.parent-support-materials,
.parent-support-easier {
  margin: 0;
  line-height: 1.55;
}

.parent-support-steps {
  display: grid;
  gap: 14px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
  counter-reset: home-step;
}

.parent-support-steps li {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 12px 14px 12px 54px;
  border-radius: 14px;
  background: #eef4f8;
  counter-increment: home-step;
}

.parent-support-steps li::before {
  position: absolute;
  top: 12px;
  left: 14px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy);
  font-size: 0.9rem;
  font-weight: 850;
  content: counter(home-step);
}

.parent-support-steps strong {
  color: var(--navy);
}

.parent-support-phrase {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  color: var(--navy);
  background: #eef4f8;
}

.parent-support-phrase blockquote {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.45;
}

.parent-support-easier {
  margin-top: 18px;
}

.parent-support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
}

.parent-support-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 4px;
  color: var(--navy);
  font-weight: 850;
  text-underline-offset: 4px;
}

.parent-screen {
  max-width: 1280px;
}

.parent-screen-heading {
  max-width: none;
  margin-bottom: 18px;
}

.parent-screen-heading h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.parent-ebook {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(26px, 5vw, 68px);
  overflow: hidden;
  padding: clamp(26px, 5vw, 58px);
  border-radius: 30px;
  color: var(--white);
  background: var(--navy);
}

.parent-ebook-copy h2,
.parent-section-heading h2,
.parent-guide h2,
.parent-media-card h3 {
  color: var(--navy);
}

.parent-ebook-copy h2 {
  max-width: 14ch;
  margin: 0;
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.parent-title-last {
  white-space: nowrap;
}

.parent-ebook-copy > p {
  max-width: 48ch;
  margin: 24px 0 28px;
  color: #e5f7fc;
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
}

.parent-ebook .primary-button {
  color: var(--navy);
  background: var(--white);
}

.parent-ebook .primary-button:hover {
  background: var(--turquoise);
}

.parent-ebook .secondary-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.parent-ebook .secondary-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.parent-ebook-art {
  align-self: center;
  display: grid;
  align-items: center;
  margin: 0;
}

.parent-ebook-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: contain;
}

.parent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.parent-topics,
.parent-media {
  margin-top: clamp(52px, 8vw, 88px);
}

.parent-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
}

.parent-section-heading h2,
.parent-guide h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.parent-section-heading p,
.parent-guide p,
.parent-media-card > p {
  margin: 0;
  color: #284a61;
}

.parent-topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.parent-topic-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  width: 100%;
  min-height: 168px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.parent-topic-card:hover {
  background: #f8fcfd;
}

.parent-topic-card:active {
  transform: translateY(2px);
}

.parent-topic-card img {
  width: 100%;
  height: 100%;
  min-height: 168px;
  object-fit: cover;
  object-position: center 32%;
  background: var(--honey-pale);
}

.parent-topic-copy {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 18px 20px;
}

.parent-topic-number {
  color: var(--honey-deep);
  font-size: 0.88rem;
  font-weight: 850;
}

.parent-topic-title {
  color: var(--navy);
  font-size: 1.28rem;
  line-height: 1.16;
}

.parent-topic-activity {
  color: #36576b;
  line-height: 1.35;
}

.parent-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: clamp(30px, 5vw, 48px);
  padding: clamp(24px, 4vw, 40px);
  border-radius: 24px;
  background: var(--honey-pale);
}

.parent-guide > div:first-child {
  max-width: 58ch;
}

.parent-guide h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
}

.parent-guide p {
  margin-top: 10px;
}

.parent-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(290px, 0.72fr);
  align-items: start;
  gap: 22px;
}

.parent-media-card {
  padding: clamp(20px, 3.5vw, 32px);
  border-radius: 24px;
  background: var(--white);
}

.parent-media-card h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.parent-media-card > p {
  margin-top: 10px;
}

.parent-media-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 22px;
  border-radius: 16px;
  background: var(--navy-deep);
  object-fit: contain;
}

.parent-media-card audio {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-top: 24px;
}

.media-error {
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--navy-deep);
  background: var(--honey-pale);
  font-weight: 700;
}

.media-error a {
  color: var(--navy-deep);
  font-weight: 850;
  text-underline-offset: 3px;
}

.prototype-details summary {
  min-height: 48px;
  padding: 12px 16px;
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}

.prototype-details {
  margin-top: clamp(38px, 6vw, 64px);
  border-radius: 18px;
  background: #eef4f8;
}

.prototype-details > div {
  max-width: 78ch;
  padding: 0 18px 18px;
  color: #36576b;
}

.prototype-details p {
  margin: 0;
}

.prototype-details ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.library-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: var(--radius);
  color: var(--navy);
  background: var(--honey-pale);
}

.library-callout p {
  margin: 0;
  font-weight: 800;
}

.secondary-button {
  color: var(--white);
  background: var(--navy);
}

.secondary-button:hover {
  background: var(--navy-deep);
}

.gallery-note,
.sample-notice {
  max-width: 76ch;
  margin: -8px 0 28px;
  padding: 13px 16px;
  border-radius: 14px;
  color: var(--navy-deep);
  background: var(--turquoise);
  font-size: 0.95rem;
  font-weight: 700;
}

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

.coloring-card,
.keepsake-card {
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.coloring-card:hover,
.keepsake-card:hover {
  box-shadow: var(--shadow); /* taste-skill-ignore */
}

.coloring-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: var(--white);
}

.gallery-caption {
  display: block;
  padding: 14px 15px 16px;
  color: var(--navy);
  font-weight: 800;
  line-height: 1.25;
}

.listen-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
}

.story-art {
  margin: 0;
  padding: 10px;
  border-radius: 28px;
  background: var(--honey);
}

.story-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 788;
  border-radius: 19px;
  object-fit: contain;
}

.listen-card {
  padding: clamp(26px, 4vw, 44px);
  border-radius: 28px;
  color: var(--white);
  background: var(--navy);
}

.listen-card h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
}

.listen-card p {
  margin: 16px 0 24px;
  color: #e5f7fc;
  font-size: 1.08rem;
}

.listen-card audio {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-bottom: 22px;
}

.light-button {
  color: var(--navy);
  background: var(--turquoise);
}

.light-button:hover {
  background: var(--white);
}

.album-heading {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.album-welcome {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  align-items: center;
  gap: clamp(22px, 4vw, 46px);
  margin: 0 0 clamp(42px, 7vw, 72px);
  padding: clamp(18px, 3vw, 30px);
  border-radius: 28px;
  color: var(--white);
  background: var(--navy);
}

.album-welcome img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 19px;
  object-fit: cover;
}

.album-welcome figcaption {
  display: grid;
  gap: 10px;
}

.album-welcome strong {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.album-welcome span {
  max-width: 48ch;
  color: #e5f7fc;
  font-size: 1.05rem;
}

.sample-label {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--honey-deep);
  background: var(--honey-pale);
  font-size: 0.9rem;
  font-weight: 850;
}

.album-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
}

.album-grid .keepsake-card:first-child {
  grid-column: 1 / -1;
}

.keepsake-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: var(--turquoise);
}

.keepsake-card.portrait img {
  aspect-ratio: 2 / 3;
  background: var(--white);
}

.keepsake-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 17px 16px;
  color: var(--navy);
  font-weight: 800;
}

.keepsake-caption span:last-child {
  color: var(--honey-deep);
  font-size: 0.82rem;
}

.earned-awards-section {
  margin-top: clamp(42px, 7vw, 72px);
  padding-top: clamp(26px, 4vw, 42px);
  border-top: 2px solid var(--line);
}

.earned-empty {
  max-width: 72ch;
  margin: 0;
  padding: 22px;
  border-radius: 18px;
  color: #36576b;
  background: var(--white);
  font-weight: 700;
}

.earned-stops {
  display: grid;
  gap: 34px;
}

.earned-stop-group {
  display: grid;
  gap: 14px;
}

.earned-stop-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.earned-stop-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
}

.earned-stop-heading span {
  color: var(--honey-deep);
  font-size: 0.85rem;
  font-weight: 850;
}

.earned-award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 18px;
}

.earned-keepsake {
  display: flex;
  flex-direction: column;
}

.keepsake-preview {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.earned-keepsake .keepsake-preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--turquoise);
}

.sticker-grid .earned-keepsake .keepsake-preview img {
  aspect-ratio: 2 / 3;
  background: var(--white);
}

.award-download {
  align-self: flex-start;
  margin: 0 17px 17px;
  color: var(--navy);
  font-weight: 850;
  text-underline-offset: 3px;
}

.final-awards-section {
  border-top-color: rgba(242, 193, 65, 0.85);
}

.progress-alert {
  position: relative;
  z-index: 20;
  display: flex;
  width: min(760px, calc(100% - 24px));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px auto 0;
  padding: 13px 14px 13px 18px;
  border: 2px solid #9c3f31;
  border-radius: 16px;
  color: #54251e;
  background: #fff2ed;
  box-shadow: var(--shadow); /* taste-skill-ignore */
}

.progress-alert[hidden] {
  display: none;
}

.progress-alert p {
  margin: 0;
  font-weight: 750;
}

body.game-open .progress-alert {
  position: fixed;
  z-index: 130;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  left: 12px;
  margin: 0 auto;
}

.parent-storage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  align-items: start;
  gap: clamp(22px, 4vw, 48px);
  margin-top: clamp(28px, 4vw, 42px);
  padding: clamp(22px, 4vw, 38px);
  border-radius: 28px;
  color: var(--navy);
  background: var(--white);
}

.parent-storage h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.parent-storage p {
  margin: 10px 0 0;
  color: #36576b;
}

.parent-storage-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
}

#offlineManager .ib-offline__button {
  min-height: 44px;
}

.bottom-nav {
  display: none;
}

.game-screen {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  color: var(--ink);
  background: var(--navy-deep);
}

.game-bar {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  gap: 16px;
  padding:
    max(8px, env(safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right, 0px))
    8px
    max(12px, env(safe-area-inset-left, 0px));
  color: var(--white);
  background: var(--navy-deep);
}

.game-back {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 48px;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 13px;
  color: var(--white);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.game-back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.game-back:focus-visible {
  outline-color: var(--turquoise);
}

.game-back svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-title {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(0.92rem, 2vw, 1.15rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-progress-status {
  min-width: 0;
  max-width: 44ch;
  margin: 0 0 0 auto;
  overflow: hidden;
  color: #dff6fb;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
}

.game-frame-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
}

.game-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--white);
}

.game-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  margin: 0;
  place-items: center;
  color: var(--navy);
  background: var(--surface);
  font-size: 1.1rem;
  font-weight: 800;
}

.game-error {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  color: var(--navy-deep);
  background: var(--surface);
  text-align: center;
}

.game-error h2 {
  max-width: 18ch;
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.05;
}

.game-error p {
  max-width: 54ch;
  margin: 0;
}

.game-error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.modal {
  width: min(920px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: transparent;
  box-shadow: var(--shadow); /* taste-skill-ignore */
}

.modal::backdrop {
  background: rgba(8, 33, 52, 0.78);
}

.dialog-card {
  position: relative;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 26px;
  background: var(--surface);
}

.dialog-card h2 {
  max-width: calc(100% - 70px);
  margin: 0 0 20px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.dialog-card > img {
  width: 100%;
  max-height: 67dvh;
  object-fit: contain;
  border-radius: 17px;
  background: var(--turquoise);
}

.dialog-card > p {
  max-width: 68ch;
}

.dialog-card > .primary-button {
  margin-top: 18px;
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--navy-deep);
}

.dialog-close svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.story-dialog {
  width: min(880px, calc(100% - 28px));
}

.story-paper {
  max-width: 70ch;
  padding: 4px 0 12px;
  color: #183a50;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.08rem;
  line-height: 1.7;
}

.story-paper h3 {
  margin: 30px 0 4px;
  color: var(--honey-deep);
  font-size: 0.96rem;
}

.story-paper p {
  margin: 0 0 1em;
}

@media (max-width: 1120px) {
  .app-header {
    gap: 10px;
    padding-inline: 20px;
  }

  .desktop-nav {
    gap: 2px;
  }

  .nav-button {
    padding-inline: 9px;
    font-size: 0.92rem;
  }
}

@media (max-width: 980px) {
  body {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .app-header {
    grid-template-columns: auto 1fr auto;
    min-height: 76px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .preview-mark {
    justify-self: center;
  }

  .desktop-nav {
    display: none;
  }

  .parent-button {
    padding-inline: 12px;
  }

  .screen {
    min-height: calc(100dvh - 76px - 84px);
  }

  .bottom-nav {
    position: fixed;
    z-index: 25;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 8px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    background: var(--white);
    box-shadow: 0 -5px 0 rgba(23, 74, 126, 0.08); /* taste-skill-ignore */
  }

  .bottom-nav .nav-button {
    min-height: 62px;
    padding: 8px 6px;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  body:has(.home-screen:not([hidden])) {
    padding-bottom: 0;
  }

  body:has(.home-screen:not([hidden])) .bottom-nav {
    display: none;
  }

  .listen-layout {
    grid-template-columns: 1fr;
  }

  .quick-links {
    padding-inline: clamp(20px, 4vw, 40px);
  }

  .listen-layout {
    gap: 20px;
  }

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

@media (max-width: 680px) {
  body {
    font-size: 17px;
  }

  .app-header {
    gap: 8px;
    padding-inline: 12px;
  }

  .brand {
    min-height: 48px;
    font-size: 1.15rem;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .preview-mark {
    justify-self: end;
    font-size: 0.7rem;
  }

  .parent-button {
    min-height: 48px;
    padding: 7px 8px;
    font-size: 0.78rem;
  }

  .game-bar {
    gap: 10px;
  }

  .game-back {
    padding-inline: 10px;
    font-size: 0.9rem;
  }

  .game-title {
    font-size: 0.88rem;
  }

  .game-error-actions {
    width: 100%;
  }

  .game-error-actions > * {
    width: 100%;
  }

  .screen {
    padding: 24px 14px 52px;
  }

  .home-screen {
    min-height: 0;
    padding: 0;
  }

  .home-scene {
    grid-template-areas:
      "intro"
      "art"
      "links";
    grid-template-rows: auto auto auto;
    min-height: 0;
  }

  .home-scene-image {
    position: relative;
    inset: auto;
    grid-area: art;
    height: clamp(320px, 78vw, 440px);
    object-position: center 42%;
  }

  .home-intro {
    padding: 13px 16px 8px;
  }

  .home-intro h1 {
    font-size: clamp(4.2rem, 17vw, 5.6rem);
  }

  .home-intro-row {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .home-intro-row p {
    font-size: 1rem;
  }

  .home-intro .primary-button {
    width: auto;
    min-height: 48px;
    padding: 8px 16px;
    font-size: 0.95rem;
  }

  .quick-links {
    grid-template-columns: 1fr 1fr;
    gap: 18px 12px;
    padding: 18px 14px 30px;
  }

  .quick-link {
    min-height: 48px;
  }

  .quick-link-label {
    font-size: 1rem;
  }

  .screen-heading {
    margin-bottom: 24px;
  }

  .screen-heading h1 {
    font-size: clamp(2.7rem, 14vw, 4.2rem);
  }

  .screen-heading > p,
  .screen-heading > div > p {
    font-size: 1rem;
  }

  .scene-grid,
  .coloring-grid,
  .album-grid {
    grid-template-columns: 1fr;
  }

  .parent-support-heading,
  .parent-support-layout {
    grid-template-columns: 1fr;
  }

  .parent-ebook {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.68fr);
  }

  .parent-topic-list {
    grid-template-columns: 1fr;
  }

  .parent-activity-preview {
    width: 100%;
  }

  .parent-support-tip {
    padding: 16px 18px;
  }

  .album-grid .keepsake-card:first-child {
    grid-column: auto;
  }

  .library-callout {
    display: grid;
    padding: 18px;
  }

  .secondary-button {
    width: 100%;
  }

  .coloring-grid {
    gap: 14px;
  }

  .coloring-card img {
    aspect-ratio: 1 / 1.15;
  }

  .listen-card {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .parent-ebook {
    grid-template-columns: 1fr;
    padding: 26px 20px 20px;
  }

  .parent-ebook-copy {
    order: 2;
  }

  .parent-ebook-copy h2 {
    font-size: clamp(2.15rem, 10vw, 3.2rem);
  }

  .parent-ebook-art {
    order: 1;
    justify-self: center;
    width: min(100%, 360px);
  }

  .parent-section-heading,
  .parent-media-grid {
    grid-template-columns: 1fr;
  }

  .parent-actions > *,
  .parent-guide {
    width: 100%;
  }

  .parent-guide {
    display: grid;
    align-items: start;
  }

  .parent-storage {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .parent-topic-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 148px;
    border-radius: 18px;
  }

  .parent-topic-card img {
    min-height: 148px;
  }

  .parent-topic-copy {
    padding: 16px;
  }

  .parent-topic-title {
    font-size: 1.2rem;
  }

  .listen-card h2 {
    font-size: 2.2rem;
  }

  .album-heading {
    display: grid;
    align-items: start;
  }

  .album-welcome {
    grid-template-columns: 1fr;
  }

  .earned-stop-heading {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .progress-alert {
    align-items: stretch;
    flex-direction: column;
  }

  .game-progress-status {
    max-width: 14ch;
    font-size: 0.72rem;
  }

  .sample-label {
    justify-self: start;
  }

  .dialog-card {
    padding: 22px 16px 18px;
  }

  .dialog-card h2 {
    max-width: calc(100% - 56px);
  }

  .dialog-close {
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 430px) {
  .brand span {
    display: none;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .app-header {
    min-height: 64px;
  }

  .screen {
    min-height: auto;
    padding-top: 18px;
  }

  .home-scene {
    min-height: 620px;
  }

  .home-intro h1 {
    font-size: 4rem;
  }

  .quick-links {
    padding-block: 16px 14px;
  }

  .bottom-nav .nav-button {
    min-height: 54px;
  }

  .game-bar {
    min-height: 56px;
    padding-block: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
