:root {
  --bg: #f2ede2;
  --bg-accent: #d4c6ad;
  --surface: rgba(255, 250, 241, 0.88);
  --surface-strong: #fffaf1;
  --line: rgba(72, 52, 31, 0.14);
  --text: #2f2418;
  --muted: #6f5d48;
  --accent: #9f3f24;
  --accent-soft: #e7c8ab;
  --shadow: 0 24px 60px rgba(67, 50, 32, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --content-width: 1180px;
  --font-display: "Baskerville", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 30%),
    linear-gradient(135deg, #f6f0e5 0%, #e8ddca 48%, #d7c4ae 100%);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  margin: 0;
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.45;
}

body::before {
  top: 4rem;
  right: 6vw;
  width: 18rem;
  height: 18rem;
  background: rgba(194, 114, 65, 0.22);
}

body::after {
  bottom: 3rem;
  left: 4vw;
  width: 15rem;
  height: 15rem;
  background: rgba(114, 80, 39, 0.15);
}

.page-shell {
  width: min(var(--content-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(255, 251, 244, 0.96), rgba(250, 241, 228, 0.88));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-art {
  padding: 1rem;
  border-radius: calc(var(--radius-xl) - 8px);
  background: linear-gradient(180deg, rgba(238, 221, 196, 0.65), rgba(255, 252, 247, 0.95));
}

.hero-art img {
  width: 100%;
  height: auto;
  display: block;
}

.eyebrow,
.section-kicker,
.label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
}

.hero-copy h1,
.section-head h2,
.now-playing h3 {
  font-family: var(--font-display);
  line-height: 1.05;
}

.hero-copy h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.summary {
  margin: 0 0 1rem;
  max-width: 60ch;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.meta-strip span {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(159, 63, 36, 0.08);
  border: 1px solid rgba(159, 63, 36, 0.12);
  color: var(--text);
  font-size: 0.95rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.player-card,
.chapters-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.section-head {
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
}

.now-playing {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.96), rgba(240, 228, 207, 0.78));
  border: 1px solid rgba(89, 67, 44, 0.12);
  margin-bottom: 1rem;
}

.now-playing h3 {
  margin: 0.4rem 0 0.35rem;
  font-size: 1.7rem;
}

.muted,
.status,
.chapter-meta {
  color: var(--muted);
}

.audio-player {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(77, 56, 34, 0.08);
}

#audio-player {
  display: none;
}

.audio-topline,
.transport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

button {
  appearance: none;
  border: 1px solid rgba(159, 63, 36, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff9f0, #f2ddc4);
  color: var(--text);
  padding: 0.8rem 1.1rem;
  font: inherit;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(89, 67, 44, 0.12);
  border-color: rgba(159, 63, 36, 0.32);
}

button:disabled {
  cursor: not-allowed;
  transform: none;
  opacity: 0.55;
  box-shadow: none;
}

.play-toggle,
.transport-button {
  padding: 0.72rem 1rem;
}

.play-toggle {
  min-width: 7.25rem;
  font-weight: 600;
}

.transport-button {
  padding: 0.55rem 0.95rem;
}

.time-readout {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.seek-slider {
  width: 100%;
  margin: 0.95rem 0;
}

.seek-slider::-webkit-slider-runnable-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(77, 56, 34, 0.16);
}

.seek-slider::-webkit-slider-thumb {
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin-top: -0.275rem;
  border-radius: 50%;
  background: var(--accent);
}

.seek-slider::-moz-range-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(77, 56, 34, 0.16);
}

.seek-slider::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

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

.status {
  margin-top: 0.85rem;
  min-height: 1.5rem;
  font-size: 0.95rem;
}

.chapters-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.chapter-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.9);
  overflow: hidden;
}

.chapter-button {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.chapter-button.active {
  background: linear-gradient(90deg, rgba(159, 63, 36, 0.12), rgba(159, 63, 36, 0.03));
}

.chapter-index {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}

.chapter-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.3rem;
}

.chapter-meta {
  font-size: 0.94rem;
}

.chapter-arrow {
  font-size: 1.4rem;
  color: var(--accent);
}

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 280px;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(var(--content-width), calc(100% - 1rem));
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .hero,
  .player-card,
  .chapters-card {
    padding: 1.1rem;
    border-radius: 22px;
  }

  .hero-copy h1 {
    font-size: 2.35rem;
  }

  .player-actions {
    flex-direction: column;
  }

  .audio-topline,
  .transport-row {
    flex-wrap: wrap;
  }

  .chapter-button {
    align-items: flex-start;
  }
}
