:root {
  --forest-950: #222725;
  --forest-800: #315d58;
  --forest-700: #46766d;
  --forest-100: #e4eee9;
  --ink: #26231f;
  --muted: #716c64;
  --parchment: #fffdf8;
  --parchment-dark: #f4efe6;
  --paper: #fffefa;
  --gold: #c99538;
  --gold-soft: #f6e8c1;
  --coral: #bb5637;
  --night: #172c3e;
  --night-soft: #243f50;
  --sky: #e6f0f3;
  --line: #e1ddd4;
  --shadow: 0 10px 30px rgba(32, 36, 34, 0.05);
  --shadow-card: 0 12px 28px rgba(32, 36, 34, 0.08);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 34px;
  --max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--parchment);
  font: 400 16px/1.6 "DM Sans", Arial, sans-serif;
}

body.menu-open {
  overflow: hidden;
}

.admin-bar .site-header {
  top: 32px;
}

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

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--forest-950);
  color: white;
  border-radius: 10px;
}

.skip-link:focus {
  left: 12px;
}

.container {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--forest-700);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

h1,
h2,
h3,
.logo {
  margin: 0;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  font-weight: 800;
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(2.8rem, 5vw, 4.65rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  line-height: 1.18;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 700;
}

.lead {
  margin: 18px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: white;
  background: var(--forest-800);
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  background: var(--forest-950);
  box-shadow: 0 8px 22px rgba(31, 85, 72, 0.24);
  transform: translateY(-1px);
}

.button.secondary {
  border-color: var(--forest-800);
  color: var(--forest-800);
  background: transparent;
}

.button.secondary:hover {
  color: white;
  background: var(--forest-800);
}

.button.gold {
  color: var(--forest-950);
  background: var(--gold);
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(230, 220, 199, 0.82);
  background: rgba(255, 249, 237, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--forest-950);
  font-size: clamp(1.15rem, 2vw, 1.34rem);
  font-weight: 700;
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-800);
  background: var(--gold-soft);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.primary-nav a {
  color: var(--muted);
  font-weight: 700;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--forest-800);
}

.primary-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px var(--gold);
}

.header-action {
  min-height: 45px;
  padding-inline: 18px;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--forest-800);
  background: var(--paper);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 6vw, 70px) 0 50px;
}

.hero::before {
  position: absolute;
  top: -190px;
  right: -120px;
  width: 570px;
  height: 570px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 189, 85, 0.23), transparent 68%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.03fr 0.86fr;
  align-items: center;
  gap: clamp(34px, 6vw, 76px);
}

.hero h1 span {
  color: var(--forest-700);
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 22px;
  margin: 26px 0 32px;
  color: var(--muted);
  font-weight: 700;
}

.trust-line span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-line svg {
  color: var(--forest-700);
}

.hero-search {
  position: relative;
  max-width: 510px;
  margin-bottom: 23px;
}

.hero-search input {
  width: 100%;
  min-height: 62px;
  padding: 0 145px 0 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.admin-bar .site-header {
  top: 50px;
}

.hero-search svg {
  position: absolute;
  left: 20px;
  top: 21px;
  color: var(--forest-700);
}

.hero-search .button {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 50px;
  padding-inline: 21px;
}

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

.hero-art {
  position: relative;
  padding: 15px;
  border-radius: 40px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 29px;
  object-fit: cover;
}

.floating-note {
  position: absolute;
  left: -26px;
  bottom: 34px;
  max-width: 191px;
  padding: 13px 16px;
  border-radius: 16px;
  color: var(--forest-950);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  font-size: 0.92rem;
  font-weight: 700;
}

.floating-note strong {
  display: block;
  color: var(--forest-700);
  font-size: 1.28rem;
}

.finder {
  padding: 30px 0 48px;
}

.finder-shell {
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: center;
  gap: 26px;
  padding: 27px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.finder-shell h2 {
  font-size: 1.47rem;
}

.finder-options {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.finder-options::-webkit-scrollbar {
  display: none;
}

.finder-pill {
  min-width: 125px;
  min-height: 76px;
  display: grid;
  gap: 1px;
  padding: 13px 17px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--parchment);
  transition: border-color 180ms ease, background 180ms ease;
}

.finder-pill:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.finder-pill strong {
  font-size: 1.05rem;
}

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

.section {
  padding: clamp(46px, 7vw, 78px) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 30px;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--forest-700);
  font-weight: 700;
  white-space: nowrap;
}

.featured {
  background: #fffdf7;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 9px 9px 0 17px;
  border: 1px solid #d4bd92;
  border-radius: 11px 23px 23px 11px;
  background:
    linear-gradient(90deg, #8a5932 0 7px, #b7844b 7px 9px, #faf0d7 9px 100%);
  box-shadow: 0 13px 24px rgba(80, 53, 27, 0.13), 5px 7px 0 #eadabc;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.story-card:hover {
  box-shadow: 0 21px 35px rgba(80, 53, 27, 0.2), 6px 8px 0 #eadabc;
  transform: translateY(-6px) rotate(-0.25deg);
}

.cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 7px 16px 7px 7px;
  background: #ead5ab;
  box-shadow: inset 0 0 0 1px rgba(104, 69, 35, 0.28);
}

.book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 11px;
  background: linear-gradient(90deg, rgba(49, 29, 12, 0.36), rgba(255, 233, 182, 0.28), rgba(58, 37, 15, 0.25));
}

.story-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 4.75;
  display: block;
  object-fit: contain;
  background: #e2ece7;
  filter: saturate(1.06) contrast(1.02);
  transition: transform 400ms ease;
}

.story-card:hover .story-cover {
  transform: scale(1.035);
}

.cover-frame {
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(255, 232, 170, 0.7);
  border-radius: 3px 10px 3px 3px;
  box-shadow: inset 0 0 0 3px rgba(54, 34, 13, 0.12);
  pointer-events: none;
}

.badge {
  position: absolute;
  top: 17px;
  left: 20px;
  z-index: 4;
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  color: #513721;
  background: rgba(255, 241, 201, 0.98);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(43, 29, 16, 0.16);
}

.badge.listen {
  top: auto;
  bottom: 17px;
  left: 20px;
  right: auto;
  color: #fdf3dc;
  background: rgba(31, 85, 72, 0.94);
}

.story-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 15px 17px 14px;
}

.story-kicker {
  margin: 0 0 7px !important;
  color: #9a6c2f !important;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-content h3 {
  margin-bottom: 9px;
  color: #33281d;
  font-size: clamp(1.24rem, 2vw, 1.42rem);
  line-height: 1.2;
}

.story-content .story-description {
  margin: 0 0 18px;
  color: #675845;
  font-size: 0.95rem;
  line-height: 1.56;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 12px 0;
  border-top: 1px dashed #d9c397;
  color: #675845;
  font-size: 0.84rem;
  font-weight: 700;
}

.story-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.save-button {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  color: var(--forest-700);
  background: var(--forest-100);
}

.save-button[aria-pressed="true"] {
  color: white;
  background: var(--forest-700);
}

.story-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 4px;
}

.story-actions .button {
  min-height: 45px;
  padding: 0 13px;
  font-size: 0.91rem;
}

.story-read-button {
  background: #20604f;
}

.story-listen-button .icon {
  width: 17px;
  height: 17px;
}

.worlds {
  background: var(--parchment-dark);
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 13px;
}

.world-card {
  min-height: 129px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px;
  border-radius: 20px;
  background: var(--paper);
  font-weight: 700;
}

.world-card .world-icon {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--forest-700);
  background: var(--forest-100);
}

.world-card:nth-child(2) .world-icon {
  color: #945030;
  background: #f9dfcc;
}

.world-card:nth-child(3) .world-icon {
  color: #493e7d;
  background: #e4e1f5;
}

.world-card:nth-child(4) .world-icon {
  color: #aa7420;
  background: var(--gold-soft);
}

.age-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.age-card {
  padding: 31px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.age-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--forest-700);
  font: 800 2.35rem/1 "Nunito", sans-serif;
}

.age-card p {
  margin: 7px 0 0;
  color: var(--muted);
}

.bedtime {
  color: white;
  background: var(--night);
}

.bedtime-inner {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  align-items: center;
  gap: clamp(36px, 7vw, 80px);
}

.bedtime h2 {
  color: white;
}

.bedtime .eyebrow {
  color: #f2d98f;
}

.bedtime p {
  color: #d6dcd9;
}

.bedtime-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
  border-radius: 25px;
  background: var(--night-soft);
}

.bedtime-card img {
  height: 100%;
  min-height: 257px;
  object-fit: cover;
}

.bedtime-card-content {
  padding: 28px;
}

.bedtime-card h3 {
  margin-bottom: 10px;
  color: white;
  font-size: 1.55rem;
}

.bedtime-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 19px 0 22px;
}

.bedtime-tags span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #f6efdd;
  background: rgba(255, 255, 255, 0.09);
  font-weight: 700;
}

.grownups-grid {
  display: grid;
  grid-template-columns: 0.86fr 1fr;
  align-items: center;
  gap: 54px;
}

.trust-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.trust-card {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.trust-card svg {
  margin-bottom: 13px;
  color: var(--forest-700);
}

.trust-card h3 {
  margin-bottom: 7px;
  font-size: 1.12rem;
}

.trust-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  padding: 52px 0 95px;
  color: #cfdbd5;
  background: var(--forest-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
}

.site-footer .logo {
  color: white;
}

.site-footer .logo-mark {
  color: var(--gold);
  background: rgba(239, 189, 85, 0.15);
}

.site-footer p {
  max-width: 310px;
  margin: 17px 0 0;
}

.site-footer h3 {
  margin-bottom: 13px;
  color: white;
  font: 700 1rem/1.4 "DM Sans", sans-serif;
  letter-spacing: 0;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: white;
}

.mobile-nav {
  display: none;
}

/* Browse page */
.page-hero {
  padding: 52px 0 38px;
}

.page-hero h1 {
  font-size: clamp(2.45rem, 5vw, 3.7rem);
}

.library-toolbar {
  position: sticky;
  top: 80px;
  z-index: 10;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  background: rgba(255, 249, 237, 0.96);
  backdrop-filter: blur(12px);
}

.toolbar-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 17px;
  align-items: center;
}

.filter-search {
  position: relative;
}

.filter-search svg {
  position: absolute;
  top: 17px;
  left: 17px;
  color: var(--muted);
}

.filter-search input {
  width: 100%;
  min-height: 54px;
  padding: 0 20px 0 49px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.filter-group {
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.filter-chip {
  min-height: 47px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper);
  font-weight: 700;
  white-space: nowrap;
}

.filter-chip.active,
.filter-chip:hover {
  border-color: var(--forest-800);
  color: white;
  background: var(--forest-800);
}

.library-results {
  padding: 34px 0 76px;
}

.result-count {
  margin: 0 0 25px;
  color: var(--muted);
  font-weight: 700;
}

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

.no-results {
  display: none;
  padding: 55px 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

/* Reading page */
.reader-body {
  background: #fffdf6;
}

.reader-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.reader-controlbar {
  position: sticky;
  top: 80px;
  z-index: 15;
}

.admin-bar .reader-controlbar {
  top: 112px;
}

.reader-header .header-inner {
  min-height: 70px;
}

.reader-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.tool-button {
  min-width: 45px;
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--forest-800);
  background: var(--paper);
  font-weight: 700;
}

.tool-button.active {
  color: white;
  background: var(--night);
}

.reading-progress {
  height: 4px;
  background: var(--parchment-dark);
}

.reading-progress div {
  width: 12%;
  height: 100%;
  background: var(--gold);
  transition: width 100ms linear;
}

.story-article {
  width: min(calc(100% - 42px), 1130px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 64px) 0 80px;
}

.article-heading {
  text-align: center;
}

.article-heading h1 {
  margin: 11px 0 14px;
  font-size: clamp(2.4rem, 6vw, 3.55rem);
}

.article-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 35px;
}

.article-meta span {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--forest-800);
  background: var(--forest-100);
  font-weight: 700;
}

.reading-illustration {
  position: relative;
  max-width: 900px;
  margin: 0 auto 30px;
  padding: 10px;
  border-radius: 28px;
  background: #f3dfaf;
  box-shadow: 0 18px 34px rgba(67, 45, 22, 0.12);
}

.reading-illustration::after {
  position: absolute;
  inset: 19px;
  border: 1px solid rgba(255, 237, 184, 0.65);
  border-radius: 17px;
  content: "";
  pointer-events: none;
}

.reading-cover-image {
  width: 100%;
  height: clamp(290px, 44vw, 470px);
  display: block;
  border-radius: 19px;
  object-fit: contain;
  background: #e2ece7;
}

.audio-story-player {
  max-width: 900px;
  margin: 0 auto 38px;
  padding: clamp(20px, 3vw, 26px);
  border: 1px solid #e1ca9b;
  border-radius: 25px;
  background: linear-gradient(130deg, #fff7e6, #f8eccd);
  box-shadow: 0 10px 24px rgba(74, 52, 26, 0.08);
  scroll-margin-top: 165px;
}

.audio-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 19px;
}

.audio-icon {
  width: 51px;
  height: 51px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f8edd4;
  background: var(--forest-800);
}

.audio-heading h2 {
  margin: 0 0 3px;
  color: #33291e;
  font-size: 1.42rem;
}

.audio-heading p {
  margin: 0;
  color: #71624d;
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.audio-primary,
.audio-control {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  border: 1px solid #d4bd8d;
  border-radius: 999px;
  color: #3d3327;
  background: #fffaf0;
  font-weight: 700;
}

.audio-primary {
  border-color: var(--forest-700);
  color: #fff6df;
  background: var(--forest-700);
}

.audio-primary.active {
  background: var(--night);
}

.audio-speed {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 0 10px 0 16px;
  border: 1px solid #d4bd8d;
  border-radius: 999px;
  color: #61513d;
  background: #fffaf0;
  font-weight: 700;
}

.audio-speed select {
  border: 0;
  color: var(--forest-800);
  background: transparent;
  font: inherit;
}

.audio-progress {
  height: 8px;
  margin: 20px 0 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5d3ab;
}

.audio-progress span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #d9aa45, #28705e);
  transition: width 220ms ease;
}

.audio-status {
  margin: 0;
  color: #71624d;
  font-size: 0.92rem;
}

.article-cover {
  width: 100%;
  max-height: 455px;
  margin-bottom: 41px;
  border-radius: 28px;
  object-fit: cover;
}

.storybook {
  --reader-size: 1.22rem;
  margin-top: 16px;
  scroll-margin-top: 168px;
}

.book-shell {
  position: relative;
  padding: 16px;
  border-radius: 18px 28px 28px 18px;
  background: linear-gradient(100deg, #83623e 0%, #b88951 1.7%, #513923 3%, #79542e 3.5%, #b78951 100%);
  box-shadow: 0 33px 58px rgba(20, 26, 24, 0.23), inset 0 1px rgba(255, 255, 255, 0.28);
}

.book-ribbon {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 46px;
  width: 27px;
  height: 66px;
  background: var(--coral);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.12);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}

.book-spread {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 615px;
  overflow: hidden;
  border-radius: 7px 19px 19px 7px;
  background: #fcf1d8;
}

.book-spread::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 12px);
  z-index: 3;
  width: 24px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(80, 56, 33, 0.18), rgba(255, 252, 241, 0.54), transparent);
}

.book-page {
  position: relative;
  min-width: 0;
  min-height: 615px;
  padding: clamp(37px, 4vw, 48px) clamp(34px, 5vw, 52px) 42px;
  color: #34291d;
  background-color: #fffaf0;
  background-image:
    radial-gradient(circle at 10% 12%, rgba(217, 189, 135, 0.15), transparent 42%),
    repeating-linear-gradient(90deg, rgba(129, 97, 58, 0.025) 0 1px, transparent 1px 4px);
}

.book-page:first-child {
  box-shadow: inset -14px 0 20px rgba(87, 62, 33, 0.07);
}

.book-page:last-child {
  box-shadow: inset 14px 0 20px rgba(87, 62, 33, 0.07);
}

.book-page-body {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 5px;
  font-family: "Lora", Georgia, serif;
  font-size: var(--reader-size);
  line-height: 1.83;
  scrollbar-width: thin;
  scrollbar-color: rgba(121, 84, 46, 0.26) transparent;
}

.book-page-body p {
  margin: 0 0 22px;
}

.book-image-page {
  padding: clamp(22px, 3vw, 30px);
}

.book-image-page .book-page-body {
  height: 100%;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 0 20px;
}

.book-image-page figure,
.book-image-page .wp-block-image,
.book-image-page p {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  margin: 0;
  text-align: center;
}

.book-image-page img {
  width: 100%;
  max-height: 510px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(93, 64, 55, 0.11);
}

.book-image-page figcaption,
.book-image-page .wp-element-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.book-image-page .book-page-number {
  bottom: 13px;
}

.book-page-body p:first-child::first-letter {
  float: left;
  margin: 8px 10px 0 0;
  color: var(--forest-700);
  font: 700 4rem/0.74 "Lora", Georgia, serif;
}

.book-page-number {
  position: absolute;
  bottom: 17px;
  left: 0;
  right: 0;
  color: #927854;
  text-align: center;
  font-family: "Lora", Georgia, serif;
}

.book-cover {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 38px;
  color: #f8f0d7;
  background: var(--forest-950);
}

.book-cover img {
  width: min(100%, 335px);
  height: 350px;
  padding: 9px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255, 247, 241, 0.12);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.book-cover h2 {
  max-width: 390px;
  color: white;
  font-size: clamp(1.6rem, 3vw, 2rem);
  text-align: center;
}

.book-cover p,
.book-inside p,
.book-end p {
  margin: 0;
  color: #cfbd99;
  font-style: italic;
}

.book-inside,
.book-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.book-inside p {
  color: #917959;
  font: 600 1.5rem "Lora", Georgia, serif;
}

.book-end h2 {
  margin-bottom: 15px;
  color: var(--forest-800);
  font-size: 2.3rem;
}

.book-end p {
  color: var(--muted);
}

.book-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 28px 0 48px;
}

.book-button {
  min-width: 145px;
}

.book-button:disabled {
  border-color: var(--line);
  color: #a3998a;
  background: transparent;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.book-restart-button {
  min-width: 120px;
}

.book-status {
  min-width: 130px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.book-source {
  display: none;
}

.book-spread.turn-next {
  animation: page-forward 260ms ease;
}

.book-spread.turn-back {
  animation: page-back 260ms ease;
}

@keyframes page-forward {
  from {
    opacity: 0.74;
    transform: perspective(1000px) rotateY(-2deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes page-back {
  from {
    opacity: 0.74;
    transform: perspective(1000px) rotateY(2deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.story-text {
  font-family: "Lora", Georgia, serif;
  font-size: var(--reader-size, 1.28rem);
  line-height: 1.85;
}

.story-text p {
  margin: 0 0 28px;
}

.story-text p:first-child::first-letter {
  float: left;
  margin: 8px 10px 0 0;
  color: var(--forest-700);
  font: 700 4.4rem/0.75 "Lora", Georgia, serif;
}

.discussion {
  margin-top: 55px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--parchment-dark);
}

.discussion h2 {
  margin-bottom: 16px;
  font-size: 1.6rem;
}

.discussion ul {
  margin: 0;
  padding-left: 23px;
}

body.bedtime-mode {
  color: #ecf0e9;
  background: var(--night);
}

body.bedtime-mode .reader-header {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--night);
}

body.bedtime-mode .reader-header .logo,
body.bedtime-mode .tool-button {
  color: #f5efe0;
}

body.bedtime-mode .tool-button {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--night-soft);
}

body.bedtime-mode .article-meta span,
body.bedtime-mode .discussion,
body.bedtime-mode .audio-story-player {
  color: #ecf0e9;
  background: var(--night-soft);
}

body.bedtime-mode .audio-heading h2,
body.bedtime-mode .audio-status,
body.bedtime-mode .audio-heading p {
  color: #ecf0e9;
}

body.bedtime-mode .audio-control,
body.bedtime-mode .audio-speed {
  border-color: rgba(255, 255, 255, 0.17);
  color: #f4ead2;
  background: rgba(255, 255, 255, 0.05);
}

body.bedtime-mode .audio-speed select {
  color: #f4ead2;
}

body.bedtime-mode .reading-progress {
  background: var(--night-soft);
}

body.bedtime-mode .book-shell {
  background: linear-gradient(100deg, #080f19, #2b3c52 3%, #0e1927 3.6%, #213349 100%);
}

body.bedtime-mode .book-page {
  color: #2f2922;
}

body.bedtime-mode .book-status {
  color: #d6dcd9;
}

@media (max-width: 1100px) {
  .primary-nav,
  .header-action {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .primary-nav.open {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    display: grid;
    gap: 8px;
    padding: 18px 24px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .primary-nav.open a {
    min-height: 51px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 12px;
  }

  .primary-nav.open a[aria-current="page"] {
    box-shadow: none;
    background: var(--forest-100);
  }

  .hero-grid,
  .bedtime-inner,
  .grownups-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 530px;
    margin: 12px auto 0;
  }

  .finder-shell {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .toolbar-grid {
    grid-template-columns: 1fr;
  }

  .book-shell {
    max-width: 720px;
    margin-inline: auto;
  }

  .book-spread {
    display: block;
  }

  .book-spread::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .container {
    width: min(calc(100% - 32px), var(--max));
  }

  .header-inner {
    min-height: 70px;
  }

  .logo span:last-child {
    max-width: 181px;
    line-height: 1.1;
  }

  .hero {
    padding-top: 35px;
  }

  .hero-search input {
    padding-right: 20px;
  }

  .hero-search .button {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  .floating-note {
    left: 13px;
    bottom: 13px;
  }

  .finder {
    padding-top: 9px;
  }

  .finder-shell {
    padding: 23px 18px;
  }

  .section {
    padding: 45px 0;
  }

  .story-grid,
  .library-results .story-grid {
    grid-template-columns: 1fr;
  }

  .story-cover {
    height: auto;
    aspect-ratio: 4 / 4.65;
  }

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

  .age-grid {
    grid-template-columns: 1fr 1fr;
  }

  .age-card {
    padding: 23px 17px;
  }

  .age-card strong {
    font-size: 1.95rem;
  }

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

  .bedtime-card img {
    min-height: 215px;
  }

  .trust-cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 21px;
    background: rgba(255, 254, 250, 0.96);
    box-shadow: var(--shadow-card);
  }

  .mobile-nav a {
    min-height: 53px;
    display: grid;
    place-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .mobile-nav a.active {
    color: var(--forest-700);
  }

  .reader-tools .tool-label {
    display: none;
  }

  .reader-header .container {
    width: calc(100% - 20px);
  }

  .reader-controlbar {
    top: 70px;
  }

  .admin-bar .reader-controlbar {
    top: 116px;
  }

  .reader-header .header-inner {
    gap: 6px;
  }

  .reader-header .logo {
    gap: 0;
  }

  .reader-header .logo span:last-child {
    display: none;
  }

  .reader-tools {
    gap: 4px;
  }

  .reader-tools .tool-button {
    min-width: 43px;
    padding: 0 9px;
  }

  .story-article {
    width: min(calc(100% - 32px), 760px);
  }

  .book-article {
    width: min(calc(100% - 22px), 760px);
  }

  .reading-illustration {
    margin-bottom: 22px;
    padding: 7px;
    border-radius: 18px;
  }

  .reading-cover-image {
    height: 252px;
    border-radius: 13px;
  }

  .reading-illustration::after {
    inset: 13px;
    border-radius: 10px;
  }

  .audio-story-player {
    margin: 0 0 25px;
    padding: 17px 14px;
    border-radius: 18px;
    scroll-margin-top: 146px;
  }

  .audio-heading {
    margin-bottom: 15px;
  }

  .audio-heading h2 {
    font-size: 1.22rem;
  }

  .audio-heading p {
    font-size: 0.91rem;
  }

  .audio-controls {
    display: grid;
    grid-template-columns: 1.15fr 0.9fr 0.9fr;
  }

  .audio-primary,
  .audio-control {
    padding-inline: 10px;
  }

  .audio-speed {
    grid-column: 1 / -1;
    justify-content: space-between;
    margin-left: 0;
  }

  .storybook {
    scroll-margin-top: 146px;
  }

  .book-shell {
    padding: 9px;
    border-radius: 13px 20px 20px 13px;
  }

  .book-ribbon {
    right: 25px;
    width: 22px;
    height: 53px;
  }

  .book-spread {
    display: block;
    min-height: 545px;
  }

  .book-spread::after {
    display: none;
  }

  .book-page {
    min-height: 545px;
    padding: 34px 27px 40px;
    box-shadow: inset 8px 0 18px rgba(87, 62, 33, 0.06), inset -8px 0 18px rgba(87, 62, 33, 0.06) !important;
  }

  .book-page-body {
    max-height: 470px;
    font-size: var(--reader-size, 1.12rem);
    line-height: 1.72;
  }

  .book-image-page {
    padding: 18px 17px;
  }

  .book-image-page img {
    max-height: 468px;
    border-radius: 13px;
  }

  .book-cover img {
    height: 309px;
  }

  .book-navigation {
    flex-wrap: wrap;
    gap: 9px;
    margin: 20px 0 36px;
  }

  .book-button {
    min-width: 0;
    padding-inline: 16px;
    font-size: 0.92rem;
  }

  .book-status {
    order: -1;
    width: 100%;
    min-width: 77px;
    font-size: 0.87rem;
  }

  .book-restart-button {
    min-width: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* Warm digital storybook homepage */
body {
  background-image:
    radial-gradient(circle at 8% 8%, rgba(228, 175, 108, 0.14), transparent 29%),
    radial-gradient(circle at 92% 14%, rgba(92, 153, 163, 0.19), transparent 28%);
}

.site-header {
  top: 18px;
  width: min(calc(100% - 48px), var(--max));
  margin: 18px auto 0;
  border: 1px solid rgba(209, 222, 216, 0.96);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.95);
  box-shadow: var(--shadow);
}

.header-inner {
  min-height: 70px;
  padding-inline: 14px 12px;
  gap: clamp(16px, 2vw, 29px);
}

.logo {
  color: var(--ink);
  font-size: clamp(1.05rem, 1.55vw, 1.22rem);
}

.logo-mark {
  width: 45px;
  height: 45px;
  color: var(--forest-800);
  background: var(--gold-soft);
}

.primary-nav {
  gap: clamp(14px, 2vw, 25px);
}

.primary-nav a {
  font-size: 0.94rem;
  font-weight: 500;
}

.primary-nav a[aria-current="page"] {
  box-shadow: none;
  color: var(--forest-800);
}

.header-action {
  min-height: 47px;
  padding-inline: 22px;
}

.button {
  min-height: 54px;
  background: var(--coral);
  box-shadow: 0 9px 20px rgba(116, 48, 26, 0.2);
}

.button:hover {
  background: #903f26;
  box-shadow: 0 10px 25px rgba(91, 38, 23, 0.28);
}

.button.secondary {
  border-color: #b9d1c8;
  color: var(--forest-800);
  background: var(--paper);
  box-shadow: none;
}

.button.secondary:hover {
  border-color: var(--forest-800);
  background: var(--forest-100);
  color: var(--forest-800);
}

.eyebrow {
  color: var(--forest-800);
}

.eyebrow::before {
  background: var(--gold);
}

.hero {
  padding: clamp(62px, 7vw, 92px) 0 clamp(60px, 8vw, 94px);
}

.hero::before {
  top: -130px;
  right: -80px;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(98, 161, 169, 0.19), transparent 67%);
}

.hero::after {
  position: absolute;
  left: -230px;
  bottom: -180px;
  width: 500px;
  height: 500px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 154, 116, 0.2), transparent 68%);
}

.hero-grid {
  grid-template-columns: minmax(380px, 0.93fr) minmax(420px, 1fr);
  gap: clamp(38px, 6vw, 76px);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 590px;
  font-size: clamp(3rem, 5.3vw, 4.8rem);
}

.hero h1 span {
  display: block;
  color: var(--coral);
}

.hero .lead {
  margin: 22px 0 34px;
  color: var(--muted);
}

.hero .trust-line {
  margin: 32px 0 0;
  font-size: 0.92rem;
  font-weight: 500;
}

.hero .trust-line svg {
  color: var(--forest-800);
}

.hero-book {
  position: relative;
  overflow: visible;
  padding: 14px 14px 18px;
  border: 1px solid rgba(199, 216, 209, 0.9);
  border-radius: 34px;
  background: #e5efec;
  box-shadow: 0 24px 62px rgba(32, 60, 66, 0.14);
}

.hero-book-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  color: var(--muted);
  font-size: 0.93rem;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: #ebbb65;
}

.sparkle {
  color: var(--gold);
  font-size: 1.3rem;
}

.hero-book-spread {
  display: grid;
  grid-template-columns: 0.88fr 1fr;
  overflow: hidden;
  min-height: 418px;
  border-radius: 25px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px #d5e2db, 0 12px 32px rgba(32, 60, 66, 0.08);
}

.hero-book-page {
  position: relative;
  min-width: 0;
}

.hero-book-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(27px, 3.4vw, 39px);
  box-shadow: inset -13px 0 18px rgba(32, 60, 66, 0.06);
}

.hero-book-text h2 {
  margin: 10px 0 17px;
  font-size: clamp(1.65rem, 2.3vw, 2.1rem);
}

.story-label {
  margin: 0;
  color: var(--forest-800);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-book-text > p:not(.story-label) {
  margin: 0 0 25px;
  color: var(--muted);
}

.listen-pill {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border-radius: 999px;
  color: var(--forest-800);
  background: var(--gold-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-book-picture {
  padding: 16px;
  background: linear-gradient(155deg, #e7f1ee, #cde1db);
}

.hero-book-picture img {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  object-fit: cover;
}

.floating-note {
  right: -18px;
  left: auto;
  bottom: 30px;
  padding: 13px 18px;
  border-radius: 18px;
  color: var(--muted);
  background: var(--paper);
}

.floating-note strong {
  color: var(--forest-800);
  font-size: 1.03rem;
}

.featured {
  background: #f8fbf8;
}

.section-header p {
  max-width: 570px;
}

.carousel-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.circle-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--forest-800);
  background: var(--paper);
  transition: background 180ms ease, transform 180ms ease;
}

.circle-button:hover {
  background: var(--gold-soft);
  transform: translateY(-1px);
}

.story-carousel {
  display: grid;
  grid-auto-columns: minmax(252px, 292px);
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding: 5px 4px 28px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #efc9b5 transparent;
}

.story-carousel .story-card {
  scroll-snap-align: start;
}

.story-card {
  overflow: hidden;
  padding: 10px;
  border: 1px solid #d2dfd9;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.story-card:hover {
  box-shadow: 0 20px 42px rgba(32, 60, 66, 0.15);
  transform: translateY(-5px);
}

.cover-wrap {
  border-radius: 21px;
  background: #e2ece7;
  box-shadow: none;
}

.book-spine,
.cover-frame {
  display: none;
}

.story-cover {
  aspect-ratio: 1 / 1.02;
}

.badge {
  top: 13px;
  left: 13px;
  color: var(--forest-950);
  background: rgba(255, 248, 227, 0.97);
  box-shadow: none;
}

.badge.listen {
  bottom: 13px;
  left: 13px;
  color: var(--forest-800);
  background: rgba(255, 248, 227, 0.97);
}

.story-content {
  padding: 17px 10px 10px;
}

.story-kicker {
  color: var(--forest-800) !important;
}

.story-content h3 {
  color: var(--ink);
}

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

.story-meta {
  border-color: var(--line);
  color: var(--muted);
}

.save-button {
  color: var(--forest-800);
  background: var(--gold-soft);
}

.story-read-button {
  background: var(--coral);
}

.worlds {
  background: var(--parchment);
}

.section-header.centered {
  justify-content: center;
  margin-bottom: clamp(29px, 4vw, 42px);
  text-align: center;
}

.section-header.centered .eyebrow {
  justify-content: center;
}

.world-grid {
  gap: 16px;
}

.world-card {
  min-height: 166px;
  padding: 21px 19px;
  border-radius: 27px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.world-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.world-card .world-icon {
  color: var(--forest-800);
  background: var(--gold-soft);
}

.world-card:nth-child(2) .world-icon {
  color: #547087;
  background: var(--sky);
}

.world-card:nth-child(3) .world-icon,
.world-card:nth-child(5) .world-icon {
  color: #55714f;
  background: var(--forest-100);
}

.world-card:nth-child(4) .world-icon,
.world-card:nth-child(6) .world-icon {
  color: var(--forest-800);
  background: var(--gold-soft);
}

.world-card strong {
  display: block;
  margin-top: 18px;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
}

.world-card small {
  color: var(--muted);
  font-weight: 400;
}

.interactive-preview {
  background: #f7fbf9;
}

.preview-grid {
  display: grid;
  grid-template-columns: 0.74fr 1fr;
  align-items: center;
  gap: clamp(35px, 6vw, 78px);
}

.preview-intro .button {
  margin-top: 31px;
}

.preview-book {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 420px;
  overflow: hidden;
  padding: 11px;
  border-radius: 31px;
  background: #79a9a4;
  box-shadow: 0 22px 56px rgba(32, 60, 66, 0.16);
  perspective: 900px;
}

.preview-page {
  min-height: 398px;
  background: #fffdf5;
  transition: transform 420ms ease;
}

.preview-book:hover .art-page,
.preview-book:focus .art-page {
  transform: perspective(900px) rotateY(-3deg);
}

.preview-page.text-page {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 21px;
  padding: clamp(27px, 4vw, 43px);
  border-radius: 20px 0 0 20px;
  box-shadow: inset -16px 0 22px rgba(32, 60, 66, 0.09);
}

.text-page .page-number {
  position: absolute;
  top: 21px;
  left: 26px;
  color: var(--gold);
  font-family: "Nunito", sans-serif;
  font-weight: 800;
}

.text-page p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.75;
}

.preview-page.art-page {
  padding: 14px;
  border-radius: 0 20px 20px 0;
  transform-origin: left center;
}

.art-page img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.audio-experience {
  background: var(--parchment);
}

.audio-grid {
  display: grid;
  grid-template-columns: 0.68fr 1fr;
  align-items: center;
  gap: clamp(40px, 7vw, 90px);
}

.audio-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.audio-features article {
  padding: 23px;
  border-radius: 27px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.audio-features article > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 16px;
  color: var(--forest-800);
  background: var(--gold-soft);
  font-size: 1.25rem;
}

.audio-features article:nth-child(2) > span,
.audio-features article:nth-child(3) > span {
  color: #587688;
  background: var(--sky);
}

.audio-features h3 {
  margin-bottom: 7px;
  font-size: 1.12rem;
}

.audio-features p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.testimonials {
  background: #e8f1ee;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.testimonial-grid blockquote,
.testimonial-grid article {
  margin: 0;
  padding: clamp(24px, 3vw, 31px);
  border-radius: 28px;
  background: var(--parchment);
}

.testimonial-grid blockquote:nth-child(2),
.testimonial-grid article:nth-child(2) {
  background: #dbeaf1;
}

.testimonial-grid blockquote:nth-child(3),
.testimonial-grid article:nth-child(3) {
  background: #dcebe3;
}

.testimonial-grid h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.testimonial-grid blockquote p,
.testimonial-grid article p {
  margin: 0 0 26px;
  color: var(--ink);
  line-height: 1.72;
}

.testimonial-grid footer {
  display: grid;
  gap: 2px;
}

.testimonial-grid strong {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 1.06rem;
}

.testimonial-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.newsletter {
  padding: 0 0 clamp(58px, 8vw, 94px);
  background: #e8f1ee;
}

.newsletter-shell {
  display: grid;
  grid-template-columns: 1fr minmax(330px, 460px);
  align-items: center;
  gap: clamp(35px, 6vw, 74px);
  padding: clamp(34px, 6vw, 62px);
  border-radius: 36px;
  background: var(--parchment-dark);
}

.newsletter-shell h2 {
  margin-bottom: 12px;
}

.newsletter-shell > div > p:last-child {
  margin: 0;
  color: var(--muted);
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.newsletter-form input {
  min-width: 0;
  min-height: 58px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--paper);
}

.newsletter-form input:focus {
  border-color: var(--gold);
  outline: none;
}

.newsletter-form .button {
  min-height: 58px;
  padding-inline: 23px;
}

.form-note,
.form-feedback {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.form-feedback.success {
  color: #316347;
}

.form-feedback.error {
  color: #943f2c;
}

.site-footer {
  padding: clamp(48px, 6vw, 66px) 0 92px;
  color: #d5e2de;
  background: var(--forest-950);
}

.site-footer .logo-mark {
  color: var(--gold-soft);
  background: rgba(250, 233, 189, 0.15);
}

.social-links {
  display: flex;
  gap: 9px;
  margin-top: 22px;
}

.social-links a {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 247, 241, 0.18);
  border-radius: 50%;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.footer-bottom {
  margin-top: 43px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 247, 241, 0.13);
}

.footer-bottom p {
  max-width: none;
  margin: 0;
  font-size: 0.88rem;
}

.menu-backdrop {
  display: none;
}

.library-toolbar {
  background: rgba(238, 244, 239, 0.97);
}

.filter-chip.active,
.filter-chip:hover {
  border-color: var(--forest-800);
  background: var(--forest-800);
}

.reading-illustration,
.audio-story-player {
  border-color: #bed7cf;
  background: #e4f0ec;
}

.book-shell {
  background: linear-gradient(100deg, #bb633d 0%, #df9248 2%, #24505a 3.3%, #316b70 100%);
}

.book-cover {
  background: var(--forest-950);
}

.about-hero,
.about-preview {
  background: var(--paper);
}

.about-author-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.36fr) minmax(0, 0.64fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.about-author-grid.compact {
  align-items: stretch;
}

.author-card,
.author-letter {
  border: 1px solid var(--line);
  background: var(--paper);
}

.author-card {
  position: sticky;
  top: 128px;
  display: grid;
  gap: 14px;
  padding: clamp(24px, 4vw, 36px);
}

.author-card-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid #ead9ac;
  background: var(--gold-soft);
  color: var(--forest-950);
  font: 700 2.2rem/1 "Lora", Georgia, serif;
}

.author-card h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.author-card p {
  margin: 0;
  color: var(--muted);
}

.author-family-note {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.author-family-note strong {
  color: var(--ink);
}

.author-family-note span {
  color: var(--muted);
}

.author-letter {
  padding: clamp(26px, 5vw, 58px);
}

.author-letter h1,
.author-letter h2 {
  margin: 0 0 22px;
  max-width: 760px;
}

.author-letter h1 {
  font-size: clamp(2.35rem, 5vw, 4rem);
}

.author-letter p {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.09rem);
  line-height: 1.85;
}

.author-letter a:not(.button) {
  color: var(--forest-800);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.author-letter .actions {
  gap: 12px;
  margin-top: 18px;
}

.author-letter .button {
  color: #fff;
  font-weight: 800;
}

.author-letter .button.secondary {
  color: var(--ink);
}

.author-letter .button.secondary:hover {
  color: #fff;
}

.author-section {
  padding: clamp(20px, 3.5vw, 30px) 0;
  border-top: 1px solid rgba(201, 149, 56, 0.18);
}

.author-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.author-section h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.author-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 24px;
  padding: 0 0 0 8px;
  list-style: none;
}

.author-list li {
  position: relative;
  padding: 2px 0 2px 26px;
  color: var(--muted);
  line-height: 1.7;
}

.author-list li::before {
  content: "•";
  position: absolute;
  top: 0;
  left: 4px;
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1.5;
}

.trust-list li {
  color: var(--muted);
}

.author-letter blockquote {
  margin: 28px 0;
  padding: 22px clamp(22px, 4vw, 34px);
  border-left: 4px solid var(--gold);
  background: #f6f8f3;
}

.author-letter blockquote p {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(1.25rem, 2.4vw, 1.65rem)/1.45 "Lora", Georgia, serif;
}

.author-hope {
  display: grid;
  gap: 8px;
  margin: 30px 0;
  padding: clamp(22px, 4vw, 34px);
  border: 0;
  background: #f6f0df;
}

.author-hope span {
  color: var(--muted);
  font-weight: 700;
}

.author-hope strong {
  color: var(--ink);
  font: 600 clamp(1.2rem, 2.3vw, 1.55rem)/1.5 "Lora", Georgia, serif;
}

.author-hope p {
  margin-bottom: 0;
}

.author-signature {
  color: var(--ink) !important;
  font-family: "Lora", Georgia, serif;
}

.author-signature strong {
  font-size: 1.35rem;
}

.author-signature span {
  color: var(--muted);
  font-family: "DM Sans", Arial, sans-serif;
}

.preview-letter {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.policy-page {
  background: var(--paper);
}

.policy-shell {
  max-width: 880px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(28px, 5vw, 58px);
}

.policy-shell h1 {
  margin-bottom: 10px;
  font-size: clamp(2.35rem, 5vw, 4rem);
}

.policy-updated {
  margin: 0 0 28px;
  color: var(--muted);
  font-weight: 700;
}

.policy-note {
  margin-bottom: 30px;
  padding: clamp(20px, 4vw, 30px);
  background: #f6f0df;
}

.policy-note p,
.policy-section p,
.policy-section li {
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  line-height: 1.8;
}

.policy-section {
  padding: clamp(20px, 3.5vw, 30px) 0;
  border-top: 1px solid rgba(201, 149, 56, 0.18);
}

.policy-section h2 {
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.policy-section p {
  margin: 0 0 1rem;
}

.policy-section ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 20px;
  padding-left: 24px;
}

@media (max-width: 1100px) {
  .primary-nav {
    gap: 14px;
  }

  .header-inner {
    gap: 15px;
  }
}

@media (max-width: 1100px) {
  .site-header {
    top: 12px;
    width: calc(100% - 32px);
    margin-top: 12px;
  }

  .primary-nav.open {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 45;
    width: min(85vw, 350px);
    align-content: start;
    gap: 6px;
    padding: 90px 25px 28px;
    border: 0;
    border-radius: 30px 0 0 30px;
    background: var(--paper);
    box-shadow: -18px 0 42px rgba(93, 64, 55, 0.14);
  }

  .primary-nav.open a {
    border-radius: 16px;
    font-size: 1rem;
  }

  .primary-nav.open a[aria-current="page"] {
    background: var(--forest-100);
  }

  .menu-toggle {
    border-color: var(--line);
    color: var(--forest-800);
  }

  .menu-backdrop.open {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: block;
    border: 0;
    background: rgba(32, 60, 66, 0.34);
  }

  .menu-toggle {
    z-index: 50;
  }

  .hero-grid,
  .preview-grid,
  .audio-grid,
  .newsletter-shell {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 680px;
  }

  .hero-book {
    max-width: 610px;
  }

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

  .preview-book {
    max-width: 650px;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .about-author-grid {
    grid-template-columns: 1fr;
  }

  .author-card {
    position: static;
  }

}

@media (max-width: 640px) {
  .site-header {
    width: calc(100% - 24px);
    margin-top: 10px;
  }

  .header-inner {
    padding-inline: 10px 8px;
  }

  .logo-mark {
    width: 42px;
    height: 42px;
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 52px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 13.5vw, 3.15rem);
  }

  .hero .actions {
    display: grid;
  }

  .hero .button {
    width: 100%;
  }

  .hero-book {
    padding: 9px 9px 12px;
    border-radius: 26px;
  }

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

  .hero-book-text {
    min-height: 235px;
  }

  .hero-book-picture {
    min-height: 292px;
  }

  .floating-note {
    right: 11px;
    bottom: 17px;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .carousel-actions .text-link {
    margin-left: 7px;
  }

  .story-carousel {
    grid-auto-columns: minmax(258px, calc(100vw - 54px));
  }

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

  .world-card {
    min-height: 159px;
    padding: 17px 14px;
  }

  .world-card strong {
    font-size: 1rem;
  }

  .preview-book {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .preview-page.text-page {
    min-height: 260px;
    border-radius: 18px 18px 0 0;
  }

  .preview-page.art-page {
    min-height: 293px;
    border-radius: 0 0 18px 18px;
  }

  .audio-features article {
    padding: 18px 14px;
  }

  .newsletter-shell {
    padding: 29px 20px;
    border-radius: 29px;
  }

  .newsletter-form {
    grid-template-columns: 1fr;
  }
}

/* Illustrated reading library edition */
body {
  background: var(--parchment);
  background-image: none;
}

h1,
h2,
h3 {
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.logo {
  align-items: center;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-lockup {
  display: grid;
  gap: 3px;
}

.brand-lockup strong {
  font: inherit;
}

.brand-lockup small {
  color: var(--muted);
  font: 500 0.65rem/1.2 "Lora", Georgia, serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-header {
  top: 0;
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 8px solid #131514;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 254, 250, 0.97);
  box-shadow: none;
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  min-height: 102px;
  padding-inline: 0;
}

.logo-mark {
  width: 52px;
  height: 52px;
  border: 1px solid #ead9ac;
  border-radius: 4px;
  color: var(--forest-950);
  background: var(--gold-soft);
}

.primary-nav a {
  color: var(--muted);
  font-weight: 500;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--ink);
}

.header-action {
  min-height: 46px;
}

.button {
  background: var(--coral);
  box-shadow: none;
}

.button:hover {
  background: #95432c;
}

.button.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.button.secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--gold-soft);
}

.eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.hero {
  padding: clamp(60px, 7vw, 92px) 0 clamp(66px, 8vw, 100px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.hero::before,
.hero::after {
  display: none;
}

.hero h1 {
  max-width: 560px;
  font-size: clamp(2.9rem, 5.1vw, 4.55rem);
  line-height: 1.13;
}

.hero h1 span {
  display: inline;
  color: var(--ink);
}

.hero .lead {
  color: var(--muted);
}

.hero .trust-line svg {
  color: var(--forest-700);
}

.hero-book {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: none;
}

.hero-book-toolbar {
  border-bottom: 1px solid var(--line);
}

.window-dots i {
  background: var(--gold);
}

.hero-book-spread {
  border-radius: 0;
  box-shadow: none;
}

.hero-book-text {
  box-shadow: inset -1px 0 var(--line);
}

.story-label {
  color: var(--coral);
}

.listen-pill {
  color: var(--ink);
  background: var(--gold-soft);
}

.hero-book-picture {
  background: #f5f2e9;
}

.floating-note {
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.floating-note strong {
  color: var(--ink);
}

.featured,
.testimonials,
.newsletter {
  background: var(--paper);
}

.section {
  border-bottom: 1px solid var(--line);
}

.circle-button {
  border-radius: 2px;
  color: var(--ink);
}

.circle-button:hover {
  background: var(--gold-soft);
}

.story-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.story-card:hover {
  box-shadow: none;
  transform: none;
}

.cover-wrap {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f3f0e8;
}

.story-cover {
  filter: none;
}

.story-card:hover .story-cover {
  transform: none;
}

.badge,
.badge.listen {
  border-radius: 2px;
  background: var(--gold-soft);
}

.story-content {
  padding: 15px 0 16px;
}

.story-content h3 {
  font-size: 1.26rem;
}

.story-kicker {
  color: var(--muted) !important;
}

.story-meta {
  border-top-style: solid;
}

.save-button {
  border-radius: 2px;
  color: var(--forest-800);
  background: var(--forest-100);
}

.story-actions .button {
  border-radius: 2px;
}

.worlds,
.audio-experience {
  background: #f6f8f3;
}

.world-card,
.audio-features article {
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: none;
}

.world-card:hover {
  box-shadow: none;
}

.world-card .world-icon {
  border-radius: 2px;
}

.interactive-preview {
  background: var(--paper);
}

.preview-book {
  padding: 9px;
  border-radius: 3px;
  background: var(--forest-800);
  box-shadow: none;
}

.preview-page,
.preview-page.text-page,
.preview-page.art-page,
.art-page img {
  border-radius: 0;
}

.testimonial-grid blockquote {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
}

.testimonial-grid blockquote:nth-child(2),
.testimonial-grid blockquote:nth-child(3) {
  background: transparent;
}

.newsletter-shell {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f6f8f3;
}

.newsletter-form input {
  border-color: var(--line);
  border-radius: 2px;
}

.newsletter-form .button {
  border-radius: 2px;
}

.site-footer {
  color: #d3dbd8;
  background: #192322;
}

.site-footer .logo-mark {
  border-color: rgba(246, 232, 193, 0.24);
  color: var(--gold-soft);
}

.site-footer .brand-lockup small {
  color: #aeb8b4;
}

.reader-body {
  background: var(--paper);
}

.reader-header,
.library-toolbar {
  background: rgba(255, 254, 250, 0.97);
}

.reading-illustration,
.audio-story-player {
  border-color: var(--line);
  border-radius: 3px;
  background: #f6f8f3;
}

.book-shell {
  border-radius: 3px;
  background: linear-gradient(100deg, #b25234 0%, #d39039 2%, #203f44 3.3%, #32665f 100%);
}

.book-cover {
  background: var(--forest-950);
}

.article-heading h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 28px);
}

.article-heading h1::before,
.article-heading h1::after {
  content: "";
  display: block;
  width: clamp(26px, 7vw, 48px);
  height: 1px;
  background: var(--gold);
}

@media (max-width: 1100px) {
  .site-header {
    top: 0;
    width: 100%;
    margin-top: 0;
  }

  .header-inner {
    min-height: 86px;
    padding-inline: 16px;
  }

  .primary-nav.open {
    border-radius: 0;
    border-left: 1px solid var(--line);
    background: var(--paper);
  }

  .menu-toggle {
    border-radius: 2px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 84px;
  }

  .logo {
    margin-right: auto;
  }

  .logo-mark {
    width: 45px;
    height: 45px;
  }

  .brand-lockup strong {
    font-size: 0.98rem;
  }

  .brand-lockup small {
    font-size: 0.55rem;
  }

  .hero {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3rem);
  }

  .mobile-nav {
    border-radius: 2px;
    background: var(--forest-950);
  }

  .mobile-nav a {
    color: #cbd6d1;
  }

  .mobile-nav a.active {
    color: var(--gold-soft);
  }

  .story-carousel {
    display: block;
    overflow: visible;
    padding-bottom: 0;
  }

  .story-carousel .story-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .story-carousel .cover-wrap {
    grid-column: 1;
    grid-row: 1;
  }

  .story-carousel .story-cover {
    height: 94px;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .story-carousel .story-content {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }

  .story-carousel .story-content h3 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.42;
  }

  .story-carousel .badge,
  .story-carousel .story-kicker,
  .story-carousel .story-description,
  .story-carousel .story-meta,
  .story-carousel .story-actions,
  .carousel-actions .circle-button {
    display: none;
  }
}

/* Mobile stability fixes */
@media (max-width: 1100px) {
  body.menu-open {
    overflow: hidden;
  }

  .site-header {
    top: 0;
    z-index: 140;
    width: 100%;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: rgba(255, 254, 250, 0.98);
  }

  .header-inner {
    width: min(calc(100% - 28px), var(--max));
    min-height: 74px;
    padding-inline: 0;
    gap: 10px;
  }

  .logo {
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal;
  }

  .logo-mark {
    flex: 0 0 auto;
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-lockup strong,
  .brand-lockup small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-action {
    display: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 170;
    display: grid;
    flex: 0 0 46px;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-left: 4px;
    border-radius: 999px;
    color: var(--ink);
    background: var(--gold-soft);
  }

  .primary-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 160;
    display: none;
    align-content: start;
    width: min(86vw, 360px);
    height: 100dvh;
    max-height: 100dvh;
    gap: 8px;
    margin: 0;
    padding: 92px 22px 28px;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: var(--paper);
    box-shadow: -18px 0 42px rgba(34, 39, 37, 0.14);
    pointer-events: none;
    visibility: hidden;
  }

  .primary-nav.open {
    display: grid;
    pointer-events: auto;
    visibility: visible;
  }

  .primary-nav a,
  .primary-nav.open a {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
  }

  .primary-nav a:hover,
  .primary-nav a:focus,
  .primary-nav a[aria-current="page"],
  .primary-nav.open a[aria-current="page"] {
    color: var(--ink);
    background: var(--gold-soft);
    box-shadow: none;
  }

  .menu-backdrop.open {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(34, 39, 37, 0.38);
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 82px;
  }

  .header-inner {
    min-height: 70px;
  }

  .logo-mark {
    width: 40px;
    height: 40px;
  }

  .brand-lockup strong {
    max-width: 210px;
    font-size: 0.93rem;
  }

  .brand-lockup small {
    max-width: 200px;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
  }

  .hero {
    padding-top: 36px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 11vw, 2.9rem);
  }

  .actions {
    align-items: stretch;
  }

  .actions .button {
    justify-content: center;
    width: 100%;
  }

  .mobile-nav {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 120;
    border-radius: 22px;
    background: rgba(255, 254, 250, 0.97);
  }

  .mobile-nav a,
  .mobile-nav a.active {
    color: var(--ink);
  }
}

/* Comfortable phone reader */
/* Featured carousel whole-card alignment */
.logo-mark {
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.featured .section-header {
  align-items: flex-start;
}

.featured .carousel-actions {
  flex: 0 0 auto;
  padding-top: 34px;
}

.featured .story-carousel {
  grid-auto-columns: calc((100% - 60px) / 4);
  overflow-x: auto;
  overflow-y: visible;
  padding: 5px 2px 30px;
  scroll-padding-inline: 2px;
}

.featured .story-carousel .story-card {
  min-width: 0;
}

@media (max-width: 1180px) {
  .featured .story-carousel {
    grid-auto-columns: calc((100% - 40px) / 3);
  }
}

@media (max-width: 860px) {
  .featured .story-carousel {
    grid-auto-columns: calc((100% - 20px) / 2);
  }
}

@media (max-width: 640px) {
  .featured .carousel-actions {
    padding-top: 0;
  }
}

body.reader-body {
  overflow-x: hidden;
}

body.reader-body .site-header {
  z-index: 140;
}

body.reader-body .reader-controlbar {
  z-index: 130;
}

body.bedtime-mode .book-navigation .button,
body.bedtime-mode .book-navigation .book-button,
body.bedtime-mode .book-navigation .book-restart-button {
  border-color: rgba(244, 234, 210, 0.72);
  color: #fff7df;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

body.bedtime-mode .book-navigation .button:not(.secondary),
body.bedtime-mode .book-navigation .book-button:not(.secondary) {
  border-color: #d98a57;
  color: #fffaf0;
  background: #c75f3a;
}

body.bedtime-mode .book-navigation .button:hover,
body.bedtime-mode .book-navigation .button:focus-visible {
  color: #fffaf0;
  background: #d8794e;
}

body.bedtime-mode .book-navigation .button:disabled,
body.bedtime-mode .book-navigation .book-button:disabled {
  border-color: rgba(244, 234, 210, 0.18);
  color: rgba(244, 234, 210, 0.48);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 1100px) {
  body.reader-body {
    padding-bottom: 0;
  }

  body.reader-body .mobile-nav {
    display: none;
  }

  body.reader-body .reader-header {
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 26px rgba(34, 39, 37, 0.08);
  }

  body.reader-body .reader-controlbar {
    top: 74px;
  }

  .admin-bar.reader-body .reader-controlbar {
    top: 120px;
  }

  body.reader-body .reader-header .header-inner {
    min-height: 64px;
  }

  body.reader-body .book-article {
    padding-top: clamp(24px, 4vw, 38px);
    padding-bottom: 54px;
  }

  body.reader-body .storybook {
    scroll-margin-top: 150px;
  }

  body.reader-body .book-navigation {
    margin-bottom: 20px;
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  body.reader-body .book-article {
    width: min(calc(100% - 40px), 820px);
  }

  body.reader-body .book-shell {
    max-width: 760px;
    padding: 12px;
    border-radius: 14px 22px 22px 14px;
  }

  body.reader-body .book-spread {
    min-height: clamp(520px, 62vh, 620px);
  }

  body.reader-body .book-page {
    min-height: clamp(520px, 62vh, 620px);
  }

  body.reader-body .book-page-body {
    max-height: clamp(430px, 52vh, 520px);
  }

  body.reader-body .book-cover img {
    height: min(330px, 36vh);
  }
}

@media (max-width: 640px) {
  .book-article {
    width: min(calc(100% - 20px), 430px);
    padding-top: 22px;
  }

  .storybook {
    margin-top: 8px;
    scroll-margin-top: 134px;
  }

  .book-shell {
    width: 100%;
    max-width: 100%;
    padding: 7px;
    border-radius: 12px 16px 16px 12px;
    box-shadow: 0 18px 34px rgba(20, 26, 24, 0.16);
  }

  .book-ribbon {
    right: 20px;
    width: 18px;
    height: 44px;
  }

  .book-spread {
    min-height: clamp(390px, 58vh, 470px);
    border-radius: 6px 13px 13px 6px;
  }

  .book-page {
    min-height: clamp(390px, 58vh, 470px);
    padding: 24px 18px 34px;
  }

  .book-page-body {
    max-height: min(382px, 48vh);
    padding-right: 2px;
    font-size: var(--reader-size, 1.05rem);
    line-height: 1.68;
  }

  .book-page-body p {
    margin-bottom: 16px;
  }

  .book-page-body p:first-child::first-letter {
    margin-top: 5px;
    font-size: 3.25rem;
  }

  .book-cover {
    gap: 12px;
    padding: 22px 16px;
  }

  .book-cover img {
    width: min(100%, 250px);
    height: min(230px, 32vh);
    padding: 7px;
    border-radius: 12px;
  }

  .book-cover h2 {
    max-width: 280px;
    font-size: clamp(1.45rem, 7vw, 1.75rem);
    line-height: 1.18;
  }

  .book-cover p,
  .book-inside p,
  .book-end p {
    max-width: 280px;
    text-align: center;
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .book-image-page {
    padding: 14px;
  }

  .book-image-page img {
    max-height: min(330px, 43vh);
  }

  .book-navigation {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
    margin: 14px 0 28px;
  }

  .book-status {
    grid-column: 1 / -1;
    order: -1;
    width: 100%;
    min-width: 0;
    margin-bottom: 2px;
    font-size: 0.95rem;
  }

  .book-button,
  .book-restart-button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding-inline: 8px;
    font-size: 0.82rem;
    white-space: nowrap;
  }
}
