@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans-latin-ext-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans-latin-ext-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans-latin-ext-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* The theme colours (--green, --paper, --ink, --muted, --gold, --surface)
   are overridden inline from the admin theme settings. */
:root {
  --paper: #faf7f0;
  --surface: #f0f1e8;
  --card: #fffefa;
  --ink: #243d35;
  --muted: #68776e;
  --green: #245744;
  --gold: #d7a349;
  --line: #dde2d6;
  --line-strong: #cbd4c4;
  --blob: #e4e8da;
  --pill: #e2e7d9;
  --danger: #9b2f25;
  --focus: #b17423;
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(20px, 5.6vw, 80px);
  --max: 1280px;
  --shadow-card: 0 1px 2px #1f35291a, 0 16px 32px -20px #1f352973;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  padding-bottom: var(--player-space, 0px);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

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

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

button,
input,
select {
  margin: 0;
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 16px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
}

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

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
}

/* Icons */

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.play-swap {
  display: inline-grid;
  place-items: center;
}

.play-swap .icon {
  grid-area: 1 / 1;
}

.icon-pause,
.is-playing .icon-play {
  display: none;
}

.is-playing .icon-pause {
  display: inline-block;
}

/* Header */

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

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

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-symbol {
  position: relative;
  flex-shrink: 0;
  width: 34px;
  color: var(--green);
  font: italic 400 50px/1 var(--serif);
}

.brand-symbol .icon {
  position: absolute;
  top: -1px;
  right: -9px;
  width: 15px;
  height: 15px;
  color: var(--gold);
}

.brand-text strong {
  display: block;
  font: 700 23px/1.1 var(--serif);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-text small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.header-nav {
  margin-left: auto;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.header-nav .icon {
  width: 16px;
  height: 16px;
}

.header-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.language-switch {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-switch a {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 36px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.language-switch a:hover {
  color: var(--ink);
}

.language-switch [aria-current] {
  background: var(--green);
  color: #fff;
}

.language-switch [aria-current]:hover {
  color: #fff;
}

/* Shared type */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow > span {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.button-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 14px 26px -16px var(--green);
}

.button-primary:hover {
  box-shadow:
    inset 0 0 0 100px #0000001f,
    0 16px 28px -16px var(--green);
}

.button-primary .icon {
  width: 20px;
  height: 20px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
}

.text-link .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}


/* Hero */

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  padding-top: clamp(48px, 7vw, 100px);
  padding-bottom: clamp(56px, 8vw, 112px);
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  max-width: 640px;
  margin: 0 0 24px;
  font: 400 clamp(40px, 5.2vw, 74px) / 1.06 var(--serif);
  letter-spacing: -0.025em;
}

.book-hero h1 {
  font-size: clamp(36px, 4.4vw, 62px);
}

.title-star {
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.16em;
  color: var(--gold);
  stroke-width: 1.3;
  vertical-align: 0.02em;
}

.hero-description {
  max-width: 34em;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 34px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 28px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13.5px;
  list-style: none;
}

.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.hero-meta .icon {
  width: 16px;
  height: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--ink);
}

.back-link .icon {
  width: 18px;
  height: 18px;
}

.edition-picker {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.edition-picker p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.edition-picker div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edition-picker a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}

.edition-picker a:hover {
  border-color: var(--ink);
}

.edition-picker [aria-current] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.noscript-audio {
  width: 100%;
  margin-top: 24px;
}

.hero-art {
  position: relative;
  min-width: 0;
  padding: 18px 20px 0;
  isolation: isolate;
}

.hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -4%;
  right: -3%;
  bottom: 12%;
  left: -3%;
  border-radius: 47% 53% 42% 58% / 52% 45% 55% 48%;
  background: var(--blob);
  transform: rotate(9deg);
}

.hero-book {
  position: relative;
  display: block;
  width: 92%;
  margin: 0 auto;
  overflow: hidden;
  border-left: 6px solid #325245;
  border-radius: 12px;
  box-shadow:
    0 2px 4px #1f35291a,
    0 28px 48px -22px #1f352980;
  transform: rotate(4deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  isolation: isolate;
}


.hero-book img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.cover-play {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fffdf7f0;
  color: var(--green);
  box-shadow: 0 8px 18px -8px #0000008c;
  transition:
    transform 0.25s,
    background-color 0.25s,
    color 0.25s;
}

.cover-play .icon {
  width: 22px;
  height: 22px;
}

.hero-book .cover-play {
  right: 22px;
  bottom: 22px;
  width: 64px;
  height: 64px;
}

.hero-book .cover-play .icon {
  width: 26px;
  height: 26px;
}

.hero-book:hover .cover-play,
.card-cover:hover .cover-play,
.is-playing .cover-play {
  background: var(--green);
  color: #fff;
}


.art-spark {
  position: absolute;
  z-index: 3;
  color: var(--gold);
}

.spark-one {
  top: -20px;
  right: -12px;
  width: 54px;
  height: 54px;
}

.spark-two {
  bottom: 96px;
  left: -18px;
  width: 30px;
  height: 30px;
}

.listening-note {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(88%, 330px);
  /* Sits below the tilted cover so the illustrator's signature stays visible. */
  margin: 20px auto 0;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid #ebebe2;
  border-radius: 16px;
  box-shadow: 0 18px 34px -20px #1f35296b;
}

.listening-note strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.listening-note span:not(.sound-bars) {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}

.sound-bars {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 3px;
  height: 28px;
}

.sound-bars i {
  width: 3px;
  height: 12px;
  border-radius: 3px;
  background: var(--green);
}

.sound-bars i:nth-child(2n) {
  height: 22px;
}

.sound-bars i:nth-child(3) {
  height: 28px;
}

.is-playing .sound-bars i {
  animation: sound-bar 1.1s ease-in-out infinite;
}

.is-playing .sound-bars i:nth-child(2) {
  animation-delay: -0.3s;
}

.is-playing .sound-bars i:nth-child(3) {
  animation-delay: -0.6s;
}

.is-playing .sound-bars i:nth-child(4) {
  animation-delay: -0.15s;
}

.is-playing .sound-bars i:nth-child(5) {
  animation-delay: -0.45s;
}

@keyframes sound-bar {
  0%,
  100% {
    transform: scaleY(0.45);
  }
  50% {
    transform: scaleY(1);
  }
}

.art-caption {
  margin: 22px 0 0;
  color: var(--muted);
  font: italic 15px/1.5 var(--serif);
  text-align: center;
}

/* Library */

.library {
  padding: clamp(56px, 7vw, 96px) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font: 400 clamp(32px, 3.6vw, 48px) / 1.12 var(--serif);
  letter-spacing: -0.02em;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font: 600 13px/1 var(--sans);
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow) {
  max-width: 36em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 36px;
}

.filter-bar button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    color 0.2s;
}

.filter-bar button:hover {
  border-color: var(--ink);
}

.filter-bar button[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 32px;
}

.book-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #dfe4d7;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.card-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}


.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.book-card h3 {
  margin: 12px 0 4px;
  font: 400 24px/1.25 var(--serif);
  letter-spacing: -0.01em;
}

.book-card h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.card-author {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
}

.card-play {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--card);
  color: var(--green);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.card-play .icon {
  width: 18px;
  height: 18px;
}

.card-play:hover,
.card-play.is-playing {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Together */

.together-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 40px clamp(40px, 8vw, 120px);
  padding-top: clamp(64px, 8vw, 110px);
  padding-bottom: clamp(64px, 8vw, 110px);
}

.together .eyebrow {
  color: #85703a;
}

.together h2 {
  max-width: 13em;
  margin: 0 0 20px;
  font: 400 clamp(32px, 3.6vw, 48px) / 1.14 var(--serif);
  letter-spacing: -0.02em;
}

.together-inner > div > p:not(.eyebrow) {
  max-width: 30em;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.benefits article {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.benefits article:last-child {
  border-bottom: 1px solid var(--line);
}

.benefit-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--green);
}

.benefit-icon .icon {
  width: 22px;
  height: 22px;
}

.benefits h3 {
  margin: 2px 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.benefits p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 40px;
  padding-top: 44px;
  padding-bottom: 32px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 26px/1.1 var(--serif);
}

.footer-brand .icon {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  font-size: 14px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer nav a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.site-footer small {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

/* Legal and 404 */

.legal-page {
  min-height: 60vh;
  padding: clamp(48px, 7vw, 88px) 0;
}

.legal-content {
  max-width: calc(780px + 2 * var(--gutter));
}

.legal-content h1 {
  margin: 0 0 24px;
  font: 400 clamp(34px, 4vw, 50px) / 1.12 var(--serif);
  letter-spacing: -0.02em;
}

.rich-text {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.8;
}

/* Audio player */

.audio-player {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1.6fr) minmax(0, 1fr) auto;
  grid-template-areas: "book main options close";
  align-items: center;
  gap: 10px 28px;
  padding: 14px max(24px, 3vw, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(24px, 3vw, env(safe-area-inset-left));
  background: var(--card);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -14px 34px -22px #1f352959;
}

.player-book {
  grid-area: book;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.player-book img {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px -4px #1f352966;
}

.player-book div {
  min-width: 0;
}

.player-book strong {
  display: block;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-book span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.player-main {
  grid-area: main;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.icon-button {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 0.2s;
}

.icon-button:hover {
  background: #1f35290f;
}

.icon-button .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
}

.player-play {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 20px -12px var(--green);
  transition: transform 0.2s;
}


.player-play .icon {
  width: 22px;
  height: 22px;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.timeline span {
  min-width: 38px;
}

.timeline span:first-child {
  text-align: right;
}

.timeline input {
  flex: 1;
  min-width: 0;
}

.player-options {
  grid-area: options;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.select-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-pill select {
  min-height: 40px;
  max-width: 150px;
  padding: 0 34px 0 14px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.select-pill .icon {
  position: absolute;
  right: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.speed-button {
  min-width: 54px;
  min-height: 40px;
  padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.select-pill select:hover,
.speed-button:hover {
  border-color: var(--ink);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 124px;
  color: var(--muted);
}

.volume-control input {
  flex: 1;
  min-width: 0;
}

.player-close {
  grid-area: close;
}

.player-close .icon {
  width: 22px;
  height: 22px;
}

.player-error {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

/* Range inputs: thin track, filled up to --fill, round thumb. */
input[type="range"] {
  --fill: 0%;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--green) var(--fill), #d6ddd0 var(--fill));
}

input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 1px 4px #0000004d;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: #d6ddd0;
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--green);
}

input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 1px 4px #0000004d;
}

input[type="range"]:focus-visible {
  outline-offset: 2px;
}

/* Responsive */

@media (min-width: 1600px) {
  :root {
    --max: 1360px;
  }
}

@media (max-width: 1100px) {
  .audio-player {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 1.5fr) auto auto;
    gap: 10px 20px;
  }

  .volume-control {
    display: none;
  }

  .book-grid {
    gap: 40px 24px;
  }

  .book-card h3 {
    font-size: 22px;
  }
}

@media (max-width: 900px) {
  .header-inner {
    min-height: 80px;
    gap: 20px;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-book .cover-play {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }

  .listening-note {
    padding: 14px 16px;
  }

  .audio-player {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "book options close"
      "main main main";
    padding-top: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .player-main {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .player-controls {
    gap: 6px;
  }

  .timeline {
    flex: 1;
  }
}

@media (max-width: 720px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .hero-art {
    width: 88%;
    max-width: 380px;
    margin: 0 auto;
    padding-top: 12px;
  }

  .book-hero .hero-inner {
    padding-top: 28px;
    gap: 36px;
  }

  .book-hero .hero-art {
    grid-row: 1;
    max-width: 290px;
  }

  .book-hero .listening-note,
  .book-hero .art-caption {
    display: none;
  }

  .book-hero .hero-book {
    transform: rotate(3deg);
  }

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

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

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

@media (max-width: 600px) {
  .header-inner {
    gap: 12px;
    min-height: 72px;
  }

  .wordmark {
    gap: 9px;
  }

  .brand-symbol {
    width: 29px;
    font-size: 42px;
  }

  .brand-symbol .icon {
    right: -8px;
    width: 13px;
    height: 13px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .brand-text small {
    font-size: 9px;
    letter-spacing: 0.18em;
  }

  .header-nav {
    display: none;
  }

  .language-switch {
    margin-left: auto;
    padding: 3px;
  }

  .language-switch a {
    min-width: 40px;
    min-height: 36px;
    font-size: 12px;
  }

  .hero-inner {
    padding-top: 36px;
    padding-bottom: 56px;
  }

  .hero .eyebrow {
    margin-bottom: 16px;
  }

  .hero h1 {
    font-size: clamp(36px, 10.4vw, 52px);
    letter-spacing: -0.02em;
  }

  .book-hero h1 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .hero-actions {
    margin-top: 28px;
    gap: 10px 22px;
  }

  .hero-meta {
    font-size: 13px;
  }

  .spark-one {
    top: -16px;
    right: -8px;
    width: 42px;
    height: 42px;
  }

  .spark-two {
    left: -12px;
    width: 24px;
    height: 24px;
  }

  .listening-note {
    width: 92%;
    gap: 12px;
    padding: 12px 14px;
  }

  .listening-note strong {
    font-size: 13px;
  }

  .listening-note span:not(.sound-bars) {
    font-size: 12px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 24px;
  }

  .filter-bar {
    flex-wrap: nowrap;
    margin: 22px calc(-1 * var(--gutter)) 28px;
    padding: 2px var(--gutter);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-bar button {
    flex-shrink: 0;
  }

  .filter-bar button {
    min-height: 40px;
    padding: 0 15px;
    font-size: 13.5px;
  }

  .book-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .book-card h3 {
    font-size: 26px;
  }

  .card-author {
    margin-bottom: 16px;
  }

  .together h2 {
    font-size: 34px;
  }

  .footer-inner {
    padding-top: 36px;
    padding-bottom: 28px;
  }

  .site-footer nav {
    flex-direction: column;
    gap: 0;
  }

  .audio-player {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "book book close"
      "timeline timeline timeline"
      "controls options options";
    gap: 6px 8px;
    padding: 12px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .player-main {
    display: contents;
  }

  .player-controls {
    grid-area: controls;
  }

  .timeline {
    grid-area: timeline;
  }

  .player-book img {
    width: 46px;
    height: 46px;
    border-radius: 8px;
  }

  .player-controls {
    justify-content: flex-start;
    gap: 2px;
    margin-left: -6px;
  }

  .player-play {
    width: 46px;
    height: 46px;
  }

  .timeline {
    gap: 10px;
  }

  .timeline span {
    min-width: 34px;
    font-size: 11.5px;
  }

  .player-options {
    gap: 8px;
  }

  .select-pill select {
    max-width: 130px;
    font-size: 16px;
  }

  .speed-button {
    min-width: 48px;
  }

  .player-close {
    justify-self: end;
    margin-right: -8px;
  }
}

@media (max-width: 360px) {
  .brand-text small {
    display: none;
  }

  .select-pill select {
    max-width: 112px;
    padding-left: 12px;
    font-size: 15px;
  }

  .player-controls .icon-button {
    width: 40px;
  }
}

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

  .text-link:hover .icon {
    transform: translate(2px, -2px);
  }

  .hero .hero-book:hover {
    transform: rotate(2deg) translateY(-4px);
  }

  .hero-book:hover .cover-play,
  .card-cover:hover .cover-play {
    transform: scale(1.07);
  }

  .card-cover:hover img {
    transform: scale(1.04);
  }

  .player-play:hover {
    transform: scale(1.05);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
