:root {
  --warm-white: #fffdfc;
  --navy: #243247;
  --muted: #687487;
  --baby-blue: #ddefff;
  --blue: #9bcbf0;
  --powder-pink: #f8dce7;
  --pink: #e8a7be;
  --lavender: #ede5fa;
  --primary: #336f9e;
  --primary-dark: #24577d;
  --border: #e4e7ec;
  --shadow: 0 22px 60px rgba(36, 50, 71, 0.09);
  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 38px;
  --shell: 1180px;
  --text: 760px;
  --pad: clamp(1rem, 3vw, 2rem);
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--warm-white);
  color: var(--navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

audio {
  display: block;
  width: 100%;
}

a {
  color: var(--primary-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--navy);
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #1f6fa8;
  outline-offset: 4px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.8rem, 7.5vw, 5.3rem);
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.035em;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -0.025em;
}

p,
ul,
ol {
  margin-top: 0;
}

.section-shell,
.site-header__inner,
.site-footer__inner,
.site-footer__note {
  width: min(100% - (2 * var(--pad)), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--navy);
  color: #fff;
  transform: translateY(-160%);
}

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

.site-header {
  position: relative;
  z-index: 30;
  background: rgba(255, 253, 252, 0.96);
}

.site-header__inner {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--navy);
  text-decoration: none;
}

.brand:hover {
  color: var(--navy);
}

.brand__mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid rgba(51, 111, 158, 0.12);
  border-radius: 0.9rem;
  background: linear-gradient(145deg, var(--powder-pink), var(--baby-blue));
  color: var(--primary-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  line-height: 1;
}

.brand__name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.nav-toggle {
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--navy);
  content: "";
}

.nav-toggle__icon {
  position: relative;
}

.nav-toggle__icon::before {
  position: absolute;
  top: -6px;
}

.nav-toggle__icon::after {
  position: absolute;
  top: 6px;
}

.primary-nav {
  display: none;
  position: absolute;
  top: 80px;
  right: var(--pad);
  left: var(--pad);
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.primary-nav.is-open {
  display: block;
}

.primary-nav__list,
.footer-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav__list a {
  display: block;
  padding: 0.8rem 0.85rem;
  border-radius: 0.75rem;
  color: var(--navy);
  font-size: 0.93rem;
  font-weight: 650;
  text-decoration: none;
}

.primary-nav__list a:hover,
.primary-nav__list .current-menu-item > a,
.primary-nav__list .current-menu-ancestor > a {
  background: var(--baby-blue);
}

.primary-nav__list li:last-child a {
  background: var(--navy);
  color: #fff;
}

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  min-height: clamp(620px, 75vh, 780px);
  align-items: center;
  gap: var(--space-5);
  padding-block: clamp(3rem, 7vw, 6rem);
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.hero h1 em,
.jukebox-hero h1 em {
  color: var(--primary);
  font-weight: 400;
}

.hero__intro {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
}

.button-row {
  display: grid;
  width: min(100%, 34rem);
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-block: 1.8rem 1.4rem;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--primary-dark);
  color: #fff;
}

.button--secondary {
  border-color: var(--border);
  background: #fff;
  color: var(--navy);
}

.button--secondary:hover {
  border-color: var(--blue);
  background: var(--baby-blue);
  color: var(--navy);
}

.button--small {
  min-height: 44px;
  padding: 0.65rem 1rem;
}

.quiet-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.quiet-note span {
  color: #bb6f8c;
  font-size: 1.15rem;
}

.hero-art {
  position: relative;
  min-height: clamp(340px, 74vw, 500px);
  overflow: hidden;
  border-radius: 45% 45% 35% 35% / 45% 45% 38% 38%;
  background: radial-gradient(circle at 20% 25%, rgba(255,255,255,.9) 0 7%, transparent 8%), linear-gradient(145deg, var(--baby-blue), #eef5ff 52%, var(--powder-pink));
  box-shadow: 0 28px 70px rgba(167, 185, 220, 0.18);
}

.hero-art__moon {
  position: absolute;
  top: 14%;
  right: 17%;
  width: 4.4rem;
  height: 4.4rem;
  border: 4px solid #6b83a4;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(44deg);
}

.hero-art__cloud {
  position: absolute;
  width: 6rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 8px 14px rgba(86, 104, 133, 0.06));
}

.hero-art__cloud::before,
.hero-art__cloud::after {
  position: absolute;
  bottom: 0.4rem;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.hero-art__cloud::before {
  left: 1rem;
  width: 2.6rem;
  height: 2.6rem;
}

.hero-art__cloud::after {
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
}

.hero-art__cloud--one {
  top: 22%;
  left: 10%;
}

.hero-art__cloud--two {
  right: 8%;
  bottom: 20%;
  transform: scale(0.75);
}

.hero-art__star {
  position: absolute;
  color: #c47c9a;
  font-size: 2rem;
}

.hero-art__star--one {
  top: 17%;
  left: 30%;
}

.hero-art__star--two {
  right: 12%;
  bottom: 38%;
  color: #5984a5;
}

.hero-art__card {
  position: absolute;
  top: 45%;
  left: 50%;
  display: grid;
  width: min(54%, 240px);
  min-height: 180px;
  align-content: center;
  padding: 2rem 1.4rem;
  border-left: 2px solid var(--powder-pink);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 44px rgba(72, 86, 112, 0.16);
  text-align: center;
  transform: translate(-50%, -50%) rotate(-2deg);
}

.hero-art__card small,
.hero-art__card strong {
  font-family: Georgia, "Times New Roman", serif;
}

.hero-art__card small {
  font-size: 1rem;
}

.hero-art__card strong {
  font-size: 1.6rem;
}

.section-block {
  padding-block: var(--space-7);
}

.section-heading {
  max-width: 44rem;
  margin-bottom: var(--space-5);
}

.section-heading--center {
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}

.section-heading--split {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.world-grid,
.content-grid,
.choice-grid {
  display: grid;
  gap: 1rem;
}

.world-card,
.notice-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(36, 50, 71, 0.06);
  border-radius: var(--radius-lg);
}

.world-card--adult {
  background: linear-gradient(145deg, #eff7ff, var(--baby-blue));
}

.world-card--child {
  background: linear-gradient(145deg, #fff4f7, var(--powder-pink));
}

.world-card p {
  max-width: 34rem;
  color: #566478;
}

.world-card__icon {
  color: var(--primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 750;
}

.text-link::after {
  margin-left: 0.45rem;
  content: "→";
}

.choice-grid a {
  display: grid;
  min-height: 150px;
  align-content: center;
  gap: 0.35rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.choice-grid a:hover {
  border-color: var(--blue);
  box-shadow: 0 16px 34px rgba(80, 111, 143, 0.09);
  transform: translateY(-2px);
}

.choice-grid a > span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.choice-icon {
  color: var(--primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
}

.content-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.content-card__image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, var(--baby-blue), var(--powder-pink));
}

.content-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.content-card:hover .content-card__image img {
  transform: scale(1.025);
}

.content-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--primary-dark);
  font-size: 4rem;
}

.content-card__body {
  padding: 1.35rem;
}

.content-card__body h3 {
  margin-bottom: 0.45rem;
}

.content-card__body h3 a {
  color: var(--navy);
  text-decoration: none;
}

.content-card__meta {
  margin-bottom: 0.55rem;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-card__excerpt {
  color: var(--muted);
}

.empty-state {
  padding: clamp(1.6rem, 5vw, 3.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(221, 239, 255, 0.55), rgba(248, 220, 231, 0.48));
}

.empty-state > :last-child {
  margin-bottom: 0;
}

.empty-state--large {
  margin-block: clamp(4rem, 12vw, 9rem);
  text-align: center;
}

.page-main {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.archive-hero,
.adult-hero,
.profile-hero,
.standard-page__header {
  max-width: 52rem;
  margin-bottom: clamp(2.4rem, 6vw, 4.5rem);
}

.archive-hero p,
.adult-hero p,
.profile-hero p {
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.filter-bar {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.filter-bar label {
  font-size: 0.82rem;
  font-weight: 750;
}

.filter-bar select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 0.35rem;
  padding: 0.55rem 2rem 0.55rem 0.7rem;
  border: 1px solid #c9ced7;
  border-radius: 0.7rem;
  background: #fff;
}

.filter-reset {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.archive-grid {
  margin-top: 1.5rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
}

.nav-links .current { font-weight: 700; background: #edf3f6; }
.nav-links .dots { border-color: transparent; }

.single-work {
  max-width: var(--text);
  margin-inline: auto;
}

.single-work__header {
  margin-bottom: 2rem;
}

.single-work__intro {
  color: var(--muted);
  font-size: 1.15rem;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.meta-pills li {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--baby-blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.single-work__image {
  margin: 0 0 2rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.audio-panel {
  margin-block: 2rem;
  padding: clamp(1.3rem, 4vw, 2rem);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--baby-blue), var(--lavender));
}

.audio-panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.entry-content {
  font-size: 1.06rem;
}

.entry-content > * {
  max-width: var(--text);
}

.entry-content > .alignwide {
  width: min(100vw - (2 * var(--pad)), var(--shell));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-content h2 {
  margin-top: 1.8em;
}

.entry-content h3 {
  margin-top: 1.5em;
}

.entry-content blockquote {
  margin-inline: 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--blue);
  background: #f6faff;
}

.work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.share-status {
  flex-basis: 100%;
  min-height: 1.5rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.child-zone-seal {
  margin-top: 2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--powder-pink);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9rem;
}

.child-zone-seal span {
  color: #b96f8b;
}

.notice-card {
  background: #fff;
  box-shadow: var(--shadow);
}

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

.family-app {
  display: grid;
  gap: 1.25rem;
}

.family-app__privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border: 1px solid #bedabf;
  border-radius: var(--radius-sm);
  background: #f1faf2;
}

.family-app__privacy > span {
  display: grid;
  flex: 0 0 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 50%;
  background: #dceddd;
  font-size: 1.15rem;
}

.family-app__privacy p,
.family-app__privacy strong {
  display: block;
  margin: 0;
}

.family-app__privacy p {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.family-app__layout {
  display: grid;
  gap: 1.25rem;
}

.family-panel {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 14px 36px rgba(36, 50, 71, 0.06);
}

.family-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.family-panel h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.family-count {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--baby-blue);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 750;
}

.family-empty {
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(221, 239, 255, 0.62), rgba(237, 229, 250, 0.48));
}

.family-empty > :last-child {
  margin-bottom: 0;
}

.family-list {
  display: grid;
  gap: 0.8rem;
}

.family-profile {
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--warm-white);
}

.family-profile__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.family-profile__type,
.family-profile__date,
.family-profile__detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.family-profile h3 {
  margin-bottom: 0.25rem;
  font-size: 1.45rem;
}

.family-profile__countdown {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.family-profile__countdown strong {
  color: var(--primary-dark);
  font-size: 1.35em;
}

.family-profile__remove {
  min-width: 44px;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d7a2a2;
  border-radius: 999px;
  background: #fff;
  color: #823d3d;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.family-type {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 1.2rem;
  padding: 0;
  border: 0;
}

.family-type legend,
.family-field > span {
  width: 100%;
  margin-bottom: 0.4rem;
  font-weight: 750;
}

.family-type label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.family-type input {
  width: 1.15rem;
  height: 1.15rem;
}

.family-field {
  display: grid;
  margin-bottom: 1rem;
}

.family-field small {
  color: var(--muted);
  font-weight: 500;
}

.family-field input {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 1px solid #b9c0ca;
  border-radius: 0.75rem;
  background: #fff;
}

.family-form__help,
.family-form__error,
.family-status {
  min-height: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.family-form__error {
  color: #853838;
  font-weight: 650;
}

.family-backup {
  display: grid;
  gap: 1rem;
}

.family-backup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.family-import {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.family-import:focus-within {
  outline: 3px solid #1f6fa8;
  outline-offset: 4px;
}

.family-import__input {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.button--danger {
  border-color: #c98585;
  background: #fff;
  color: #813535;
}

.button--danger:hover {
  border-color: #984a4a;
  background: #fff3f3;
  color: #6e2929;
}

.family-app[data-storage-unavailable="true"] .family-panel--form,
.family-app[data-storage-unavailable="true"] .family-backup__actions {
  opacity: 0.62;
}

.source-note {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--baby-blue);
}

.jukebox-hero {
  position: relative;
  display: grid;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: clamp(1.7rem, 5vw, 3.5rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, var(--baby-blue), var(--lavender));
}

.jukebox-hero p:last-child {
  color: var(--muted);
}

.record {
  display: grid;
  width: min(62vw, 220px);
  aspect-ratio: 1;
  place-items: center;
  margin-inline: auto;
  border: 1rem double #314057;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #253248 0 8px, #33435b 9px 11px);
  box-shadow: 0 20px 45px rgba(36, 50, 71, 0.18);
}

.record span {
  display: grid;
  width: 34%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.75rem;
  font-weight: 700;
}

.jukebox-layout {
  display: grid;
  gap: 1.25rem;
}

/* Keep empty-player elements hidden despite component display rules. */
[data-jukebox] [hidden] {
  display: none;
}

.now-playing,
.queue-panel {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.now-playing__art {
  display: grid;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  place-items: center;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--powder-pink), var(--baby-blue));
  color: var(--primary-dark);
  font-size: 5rem;
}

.now-playing__art > * {
  grid-area: 1 / 1;
}

.now-playing__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-playing audio {
  width: 100%;
}

.jukebox-controls {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.jukebox-skip-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(max-content, 1fr));
  gap: 0.6rem;
}

.jukebox-control,
.sleep-timer select,
.queue-action {
  min-height: 48px;
  border: 1px solid #c9ced7;
  border-radius: 0.8rem;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
}

.jukebox-control,
.queue-action {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

.jukebox-control {
  white-space: nowrap;
}

.jukebox-control:hover,
.queue-action:hover {
  border-color: var(--primary);
  background: var(--baby-blue);
}

.jukebox-control:disabled,
.queue-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.jukebox-control[data-mode="all"],
.jukebox-control[data-mode="one"] {
  border-color: var(--primary);
  background: var(--baby-blue);
}

.sleep-timer {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.sleep-timer select {
  width: 100%;
  padding-inline: 0.75rem;
}

.jukebox-status {
  min-height: 1.5em;
  margin-block: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.queue-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.queue-heading h2,
.queue-heading p {
  margin-bottom: 0.35rem;
}

.queue-reset {
  flex: 0 0 auto;
}

.queue-source {
  margin: 1.25rem 0 0.65rem;
  padding: 0;
  border: 0;
}

.queue-source legend {
  margin-bottom: 0.55rem;
  color: var(--navy);
  font-weight: 750;
}

.queue-source__choices {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f5f7fa;
}

.queue-source__choices button {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.queue-source__choices button:hover,
.queue-source__choices button:focus-visible {
  background: var(--baby-blue);
}

.queue-source__choices button[aria-pressed="true"] {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 0.35rem 1rem rgba(33, 83, 104, 0.18);
}

.queue-source__choices button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 380px) {
  .queue-source__choices button { padding-inline: .4rem; }
}

.track-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-list li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.35rem;
  border-bottom: 1px solid var(--border);
}

.drag-handle {
  display: grid;
  min-height: 48px;
  place-items: center;
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.2rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.track-list li[draggable="true"] {
  cursor: grab;
}

.track-list li.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.track-list li.is-drop-before {
  box-shadow: inset 0 3px 0 var(--primary);
}

.track-list li.is-drop-after {
  box-shadow: inset 0 -3px 0 var(--primary);
}

.track-list li[aria-current="true"] {
  border-radius: var(--radius-sm);
  background: #f2f8fc;
}

.track-play {
  display: inline-flex;
  min-width: 0;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.track-play span:first-child {
  display: grid;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.8rem;
  background: var(--baby-blue);
  color: var(--primary-dark);
  font-size: 0.75rem;
}

.track-summary {
  display: grid !important;
  min-width: 0;
  overflow-wrap: anywhere;
  width: auto !important;
  height: auto !important;
  justify-items: start;
  gap: 0.15rem;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
}

.track-summary small {
  color: var(--muted);
  font-weight: 500;
}

.queue-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 48px 48px minmax(92px, auto);
  gap: 0.4rem;
  justify-content: end;
}

.queue-action {
  padding-inline: 0.6rem;
}

.queue-action--remove {
  color: #813535;
}

.queue-empty {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--baby-blue);
  text-align: center;
}

.queue-empty p {
  font-weight: 750;
}

.work-byline,
.content-card__artist,
.archive-artist,
.audio-credit {
  color: var(--muted);
  font-weight: 700;
}

.work-byline {
  margin: 0.55rem 0 0;
}

.work-byline a,
.content-card__artist a,
.archive-artist a,
.audio-credit a {
  color: var(--primary-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.content-card__artist {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
}

.archive-artist {
  margin-top: 0.75rem;
}

.audio-credit {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
}

.jukebox-artist-credit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 1.6rem);
  align-items: center;
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  overflow: hidden;
  border: 1px solid rgba(79, 182, 173, 0.24);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 8% 15%, rgba(79, 182, 173, 0.22), transparent 28%),
    linear-gradient(120deg, #0b3544, #152a4a);
  color: #fff;
  box-shadow: 0 1.2rem 3rem rgba(19, 48, 66, 0.12);
}

.jukebox-artist-credit__mark {
  display: grid;
  width: clamp(4.2rem, 9vw, 6.2rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3ca85, #28687a 55%, #102b45 100%);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.3rem);
  text-shadow: 0 0.15rem 0.7rem rgba(0, 0, 0, 0.28);
}

.jukebox-artist-credit .eyebrow {
  color: #f3ca85;
}

.jukebox-artist-credit h2 {
  margin-bottom: 0.45rem;
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.jukebox-artist-credit p:not(.eyebrow) {
  max-width: 52rem;
  color: rgba(255, 255, 255, 0.8);
}

.jukebox-artist-credit .text-link {
  color: #bcece5;
}

.jukebox-artist-credit--compact {
  grid-template-columns: auto minmax(0, 1fr);
  margin: -0.75rem 0 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
}

.jukebox-artist-credit--compact .jukebox-artist-credit__mark {
  width: 3.6rem;
  font-size: 1.9rem;
}

.jukebox-artist-credit--compact h2 {
  margin-bottom: 0.2rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}

.jukebox-artist-credit--compact .eyebrow {
  margin-bottom: 0.15rem;
  font-size: 0.67rem;
}

.work-journey {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--border);
}

.work-journey__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.work-journey__heading h2 {
  margin-bottom: 0;
}

.work-journey__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.work-journey__links a {
  display: grid;
  min-height: 4.5rem;
  align-content: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--navy);
  font-weight: 750;
  text-decoration: none;
}

.work-journey__links a:hover,
.work-journey__links a:focus-visible {
  border-color: var(--primary);
  background: var(--baby-blue);
}

@media (max-width: 619px) {
  .jukebox-artist-credit--compact {
    grid-template-columns: 3.2rem minmax(0, 1fr);
    padding: 0.9rem;
  }

  .jukebox-artist-credit--compact .jukebox-artist-credit__mark {
    width: 3.2rem;
  }

  .work-journey__heading {
    align-items: start;
    flex-direction: column;
  }

  .work-journey__links {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  margin-top: clamp(3rem, 9vw, 7rem);
  padding-block: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.site-footer__inner {
  display: grid;
  gap: 2rem;
}

.brand--footer {
  margin-bottom: 0.7rem;
}

.site-footer p {
  color: var(--muted);
}

.footer-nav {
  display: grid;
  gap: 0.4rem;
}

.footer-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
}

.site-footer__note {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  max-width: 34rem;
  gap: 0.6rem;
}

.search-form label {
  flex: 1 1 12rem;
  min-width: 0;
}

.search-field {
  width: 100%;
  min-height: 48px;
  padding-inline: 0.9rem;
  border: 1px solid #c9ced7;
  border-radius: 999px;
}

.search-submit {
  min-height: 48px;
  padding-inline: 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
}

/* Keep the decorative record from delaying the player on narrow screens. */
@media (max-width: 899px) {
  .jukebox-hero { padding: 1.5rem; gap: 0; }
  .jukebox-hero .record { position: absolute; top: 1.25rem; right: 1.25rem; width: 64px; border-width: 5px; }
  .jukebox-hero .record span { font-size: 0; }
  .jukebox-hero .eyebrow { padding-right: 70px; }
  .jukebox-hero h1 { padding-right: 42px; }
}
.jukebox-timer-status { font-size: .9rem; color: var(--muted); }
.now-playing__art { margin-top: 1.25rem; }

@media (min-width: 620px) {
  .button-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
    align-items: end;
  }

  .site-footer__inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

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

  .jukebox-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .sleep-timer {
    grid-column: 1 / -1;
  }

  .track-list li {
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  }

  .queue-actions {
    grid-column: auto;
  }
}

@media (min-width: 900px) {
  .site-header__inner {
    min-height: 92px;
  }

  .nav-toggle {
    display: none;
  }

  .primary-nav {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .primary-nav__list {
    display: flex;
    align-items: center;
    gap: 0.15rem;
  }

  .primary-nav__list li:last-child a {
    margin-left: 0.35rem;
    padding-inline: 1.2rem;
    border-radius: 999px;
  }

  .hero {
    grid-template-columns: 1.08fr 0.92fr;
    gap: clamp(2rem, 5vw, 5rem);
  }

  .hero-art {
    min-height: 500px;
  }

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

  .choice-grid,
  .choice-grid--age {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .jukebox-hero {
    grid-template-columns: 1fr 0.6fr;
  }

  .jukebox-layout {
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  }

  .family-app__layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
    align-items: start;
  }

  .family-panel--form {
    position: sticky;
    top: 1.5rem;
  }

  .family-backup {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .family-status {
    grid-column: 1 / -1;
  }
}

@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;
  }
}

@media print {
  .site-header,
  .site-footer,
  .work-actions,
  .child-zone-seal,
  .audio-panel audio,
  .quiet-note {
    display: none !important;
  }

  .family-panel--form,
  .family-backup,
  .family-app__privacy,
  .family-profile__remove {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .page-main,
  .single-work {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  h1,
  h2,
  h3 {
    color: #000;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}

@media (max-width: 420px) {
  .nav-toggle__label {
    position: static;
  }

  .section-heading--split {
    display: block;
  }
}

.family-quick-actions { display:flex; flex-wrap:wrap; gap:.75rem; margin:0 0 1.5rem; }
[data-family-fields] { border:0; padding:0; margin:0; min-width:0; }
.family-storage-help { line-height:1.65; margin-block:1rem 1.5rem; }

/* Game print document: A4 297 - 24 mm margins - 10 mm reserve = 263 mm budget.
   Natural flow, 10.5pt body; no fixed heights or clipping. */
.baby-game-print { display: none; }
@page baby-game-sheet { size: A4 portrait; margin: 12mm; }
@media print {
  html:has(body.baby-game-print-ready) { margin: 0 !important; padding: 0 !important; }
  body.baby-game-print-ready { margin: 0 !important; padding: 0 !important; }
  body.baby-game-print-ready > :not(.baby-game-print) { display: none !important; }
  body.baby-game-print-ready > .baby-game-print {
    display: block !important; page: baby-game-sheet;
    width: auto !important; max-width: none !important;
    height: auto !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; overflow: visible !important;
    color: #162d39; background: white; font: 10.5pt/1.4 Arial, sans-serif;
  }
  .baby-game-print, .baby-game-print * { box-sizing: border-box; }
  .baby-game-print h1 { margin: 0 0 2mm; font: bold 24pt/1.1 Georgia, serif; color: #162d39; }
  .baby-game-print h2 { margin: 4mm 0 1mm; font: bold 13pt/1.2 Georgia, serif; break-after: avoid; }
  .baby-game-print p { margin: 0 0 2mm; }
  .baby-game-print ul, .baby-game-print ol { margin: 0 0 3mm; padding-left: 6mm; }
  .baby-game-print li { margin: 0 0 1.5mm; padding: 0; break-inside: avoid; }
  .baby-game-print .baby-game-single__content {
    display: block; width: auto; max-width: none; margin: 0; padding: 0;
    font: inherit; color: inherit;
  }
  .baby-game-print .baby-game-intro { border: 0; margin: 0 0 3mm; padding: 0; }
  .baby-game-print .baby-game-safety {
    display: block !important; break-inside: avoid;
    margin: 4mm 0 0; padding: 3mm 4mm; border: 1pt solid #687d87;
    border-radius: 0; box-shadow: none; background: white; color: inherit;
  }
  .baby-game-print .baby-game-safety h2 { margin-top: 0; }
  .baby-game-print .baby-game-safety p { color: #162d39; font: inherit; }
  .baby-game-print .baby-game-safety .baby-games-eyebrow { display: none; }
  .baby-game-print .baby-game-print__brand { margin: 0 0 3mm; font-weight: bold; letter-spacing: .3pt; }
  .baby-game-print .baby-game-print__meta { margin-bottom: 4mm; font-size: 9pt; }
  .baby-game-print .baby-game-print__source { margin-top: 4mm; font-size: 8.5pt; overflow-wrap: anywhere; }
}

/* Local listening position, batch 5b. */
.listening-position { margin: 1rem 0; padding: 1rem; border: 1px solid #d9e3db; border-radius: 16px; background: #f1f7f1; }
.listening-position h3 { margin: 0 0 .45rem; font-size: 1.2rem; }
.listening-position [data-listening-text] { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.listening-position__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.listening-position__actions button { min-height: 44px; }
.listening-position .listening-position__note { font-size: .85rem; line-height: 1.55; margin: .75rem 0 0; }

/* Print only the selected work. Keep illustrations intact and within an A4 sheet. */
@media print {
  body.single-baby_story > :not(main),
  body.single-baby_song > :not(main),
  .single-work > :not(.single-work__header):not(.single-work__image):not(.entry-content),
  .single-work .baby-favorite,
  .single-work .baby-share {
    display: none !important;
  }

  .single-work__image {
    overflow: visible;
    border-radius: 0;
  }

  figure,
  img {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 160mm !important;
    object-fit: contain;
  }
}

/* Compact the printed introduction before changing story typography or content. */
@media print {
  .single-work__header {
    margin-bottom: 4mm;
  }

  .single-work__header h1 {
    margin-bottom: 2mm;
    font-size: 30pt;
    line-height: 1.15;
  }

  .single-work__header .meta-pills {
    gap: 2mm;
    margin-top: 2mm;
  }

  .single-work__header .meta-pills li {
    padding: 1mm 2mm;
  }

  .single-work__image {
    margin-bottom: 4mm;
  }

  .single-work__image img {
    max-height: 100mm !important;
    margin-inline: auto;
  }
}


/* Alva's portrait keeps Mossa and the whole reference composition visible. */
.alva-portrait{margin:0 0 24px}.alva-portrait img{display:block;width:100%;height:auto;border-radius:20px}.alva-portrait figcaption{font-size:.9rem;color:#53615a;margin-top:8px}
.alva-actions{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0}.alva-story-list{columns:2;column-gap:32px}.alva-story-list li{break-inside:avoid;margin-bottom:12px}.alva-bio{margin:28px 0;border-block:1px solid #ddd9cc;padding:20px 0}.alva-bio summary{cursor:pointer;font-weight:700;padding:8px 0}
@media(max-width:650px){.alva-story-list{columns:1}.alva-actions .button{width:100%;text-align:center}}
