:root {
  --ink: #18322d;
  --muted: #68736c;
  --paper: #f5f0e5;
  --cream: #fffaf0;
  --leaf: #275d50;
  --leaf-deep: #183f36;
  --leaf-pale: #dce8dc;
  --coral: #ed775f;
  --line: rgba(24, 50, 45, 0.14);
  --shadow: 0 24px 70px rgba(31, 54, 47, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(237,119,95,.38); outline-offset: 3px; }

.hero-shell {
  position: relative;
  min-height: 700px;
  padding: 0 6vw 76px;
  overflow: hidden;
  background:
    radial-gradient(circle at 79% 5%, rgba(237,119,95,.16), transparent 25%),
    radial-gradient(circle at 2% 96%, rgba(39,93,80,.13), transparent 31%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}
.hero-shell::before {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -145px;
  top: 225px;
  border: 1px solid rgba(39,93,80,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(39,93,80,.025), 0 0 0 90px rgba(39,93,80,.018);
}
.topbar {
  position: relative;
  z-index: 5;
  height: 88px;
  max-width: 1180px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand, .library-link { color: var(--ink); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .08em; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--leaf);
  color: white;
  font-family: Georgia, serif;
  font-size: 18px;
}
.library-link { padding-bottom: 4px; border-bottom: 1px solid var(--ink); font-size: 14px; }
.hero {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 104px;
  align-items: center;
}
.cover-wrap { position: relative; width: 310px; height: 440px; }
.cover-card {
  position: relative;
  z-index: 2;
  width: 292px;
  height: 408px;
  overflow: hidden;
  border-radius: 4px 11px 11px 4px;
  box-shadow: inset 9px 0 rgba(0,0,0,.08), var(--shadow);
  transform: rotate(-2.1deg);
  background: #62c3c3;
}
.cover-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-card::after { content: ""; position: absolute; inset: 0; box-shadow: inset 8px 0 12px rgba(0,0,0,.1); pointer-events: none; }
.cover-shadow { position: absolute; inset: 27px 0 0 30px; border: 1px solid rgba(24,50,45,.24); border-radius: 4px 14px 14px 4px; }
.recording-stamp {
  position: absolute;
  z-index: 3;
  right: -14px;
  bottom: 5px;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--cream);
  background: var(--coral);
  color: white;
  text-align: center;
  font: 700 13px/1.25 "Songti SC", STSong, serif;
  letter-spacing: .13em;
  box-shadow: 0 8px 22px rgba(100,47,37,.23);
}
.eyebrow { margin: 0 0 18px; color: var(--coral); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.hero-copy h1 { margin: 0; font: 700 clamp(52px,7vw,82px)/1.06 "Songti SC", STSong, serif; letter-spacing: .06em; }
.subtitle { margin: 18px 0 28px; color: var(--leaf); font-size: 18px; }
.description { max-width: 590px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 31px 0; color: var(--muted); font-size: 13px; }
.stats strong { color: var(--ink); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.primary-play, .resume-button {
  min-height: 54px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-play {
  border: 0;
  padding: 11px 26px 11px 13px;
  display: inline-flex;
  gap: 13px;
  align-items: center;
  background: var(--coral);
  color: white;
  box-shadow: 0 10px 28px rgba(237,119,95,.27);
}
.primary-play:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(237,119,95,.34); }
.play-symbol { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.2); font-size: 11px; padding-left: 2px; }
.resume-button { padding: 0 22px; border: 1px solid var(--line); background: rgba(255,255,255,.45); color: var(--leaf); }
.resume-button:hover { background: white; }

.chapter-section { max-width: 1080px; margin: auto; padding: 84px 24px 130px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 31px; }
.section-heading h2 { margin: 0; font: 700 34px/1.25 "Songti SC", STSong, serif; }
.section-heading > p { margin: 0 0 3px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.local-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #72a67f; }
.chapter-list { border-top: 1px solid var(--line); }
.chapter {
  position: relative;
  min-height: 100px;
  padding: 17px 16px;
  display: grid;
  grid-template-columns: 48px 42px 1fr auto;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: background .2s ease, transform .2s ease;
}
.chapter:hover { background: rgba(255,255,255,.42); }
.chapter.active { background: rgba(255,255,255,.68); }
.chapter.active::before { content: ""; position: absolute; inset: 15px auto 15px 0; width: 3px; border-radius: 5px; background: var(--coral); }
.chapter-number { color: var(--muted); font: italic 16px Georgia, serif; }
.row-play {
  width: 38px;
  height: 38px;
  padding: 0 0 0 3px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--leaf);
  font-size: 10px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.row-play:hover { transform: scale(1.06); background: var(--leaf-pale); }
.chapter.active .row-play { background: var(--leaf); border-color: var(--leaf); color: white; }
.chapter-copy { min-width: 0; }
.chapter-copy p { margin: 0 0 5px; color: var(--coral); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.chapter-copy h3 { overflow: hidden; margin: 0; font: 600 19px/1.4 "Songti SC", STSong, serif; text-overflow: ellipsis; white-space: nowrap; }
.chapter time { color: var(--muted); font: 13px Georgia, serif; }
.mini-progress { height: 2px; margin-top: 9px; overflow: hidden; background: rgba(39,93,80,.08); border-radius: 2px; }
.mini-progress i { display: block; width: 0; height: 100%; background: var(--coral); transition: width .25s ease; }
.chapter.completed .chapter-status { color: #528061; }
.chapter.completed .chapter-number::after { content: " ✓"; color: #528061; font-family: sans-serif; }

.closing-note {
  padding: 88px 24px 178px;
  border-top: 1px solid var(--line);
  background: var(--leaf-deep);
  color: var(--cream);
  text-align: center;
}
.closing-leaf { display: block; color: var(--coral); font-size: 42px; transform: rotate(24deg); }
.closing-note p { margin: 10px auto 24px; font: 500 clamp(20px,3vw,29px)/1.8 "Songti SC", STSong, serif; letter-spacing: .03em; }
.closing-note small { color: rgba(255,250,240,.58); letter-spacing: .12em; }

.player {
  position: fixed;
  z-index: 20;
  left: 22px;
  right: 22px;
  bottom: 18px;
  min-height: 92px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(360px, 1.6fr) 120px;
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(20,51,43,.96);
  color: white;
  box-shadow: 0 20px 60px rgba(12,30,25,.34);
  backdrop-filter: blur(18px);
  transform: translateY(calc(100% + 35px));
  opacity: 0;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
.player.visible { transform: translateY(0); opacity: 1; }
.now-playing { min-width: 0; display: flex; align-items: center; gap: 13px; }
.player-number { flex: 0 0 auto; width: 47px; height: 47px; display: grid; place-items: center; border-radius: 10px; background: var(--coral); font: italic 16px Georgia, serif; }
.now-playing div { min-width: 0; }
.now-playing p { margin: 0 0 4px; color: rgba(255,255,255,.54); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.now-playing h2 { overflow: hidden; margin: 0; font: 600 15px/1.4 "Songti SC", STSong, serif; text-overflow: ellipsis; white-space: nowrap; }
.transport { min-width: 0; }
.transport-buttons { display: flex; justify-content: center; align-items: center; gap: 18px; }
.transport-buttons button, .player-options button { border: 0; background: transparent; color: white; }
.transport-buttons > button:not(.main-toggle) { color: rgba(255,255,255,.72); font-size: 11px; }
.transport-buttons .main-toggle { width: 40px; height: 40px; padding: 0 0 0 2px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--leaf-deep); font-size: 11px; }
.timeline { margin-top: 5px; display: grid; grid-template-columns: 40px 1fr 40px; gap: 9px; align-items: center; color: rgba(255,255,255,.55); font: 10px Georgia, serif; }
.timeline span:last-child { text-align: right; }
input[type="range"] { width: 100%; height: 3px; margin: 0; accent-color: var(--coral); cursor: pointer; }
.player-options { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.player-options button { min-width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; font-size: 11px; }
.player-spacer { height: 0; }
noscript { position: fixed; inset: auto 16px 16px; z-index: 30; padding: 12px 16px; border-radius: 8px; background: #6b2d24; color: white; }

/* Library */
.library-page {
  background:
    radial-gradient(circle at 90% 8%, rgba(237,119,95,.09), transparent 27%),
    var(--paper);
}
.library-hero {
  min-height: 450px;
  padding: 0 6vw 74px;
  background:
    radial-gradient(circle at 76% 18%, rgba(237,119,95,.18), transparent 24%),
    radial-gradient(circle at 7% 110%, rgba(255,250,240,.10), transparent 34%),
    var(--leaf-deep);
  color: var(--cream);
}
.library-hero .brand { color: var(--cream); }
.library-hero .brand-mark { background: var(--coral); }
.library-kicker { color: rgba(255,250,240,.52); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.library-intro { max-width: 1080px; margin: 62px auto 0; }
.library-intro h1 { margin: 0; font: 700 clamp(48px,7vw,78px)/1.22 "Songti SC", STSong, serif; letter-spacing: .04em; }
.library-intro > p:last-child { max-width: 620px; margin: 27px 0 0; color: rgba(255,250,240,.66); font-size: 15px; line-height: 1.9; }
.library-shelf { max-width: 1120px; margin: auto; padding: 82px 24px 120px; }
.shelf-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.shelf-heading h2 { margin: 0; font: 700 38px/1.2 "Songti SC", STSong, serif; }
.shelf-heading > p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.book-tile {
  min-height: 400px;
  padding: 32px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 34px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,250,240,.76);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 18px 55px rgba(31,54,47,.07);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.book-tile:hover { transform: translateY(-5px); border-color: rgba(39,93,80,.28); box-shadow: var(--shadow); }
.tile-cover {
  position: relative;
  display: block;
  width: 200px;
  height: 286px;
  overflow: hidden;
  border-radius: 4px 10px 10px 4px;
  box-shadow: inset 7px 0 rgba(0,0,0,.08), 0 16px 35px rgba(40,45,42,.20);
  transform: rotate(-1.5deg);
}
.tile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(24,63,54,.92);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.wish-tile { background: linear-gradient(145deg, rgba(255,250,240,.88), rgba(244,224,214,.72)); }
.wish-tile .tile-badge { background: rgba(99,45,67,.92); }
.cover-title {
  position: absolute;
  z-index: 2;
  top: 33px;
  left: 21px;
  right: 21px;
  color: #54283a;
  text-align: center;
  text-shadow: 0 1px rgba(255,255,255,.45);
  font: 700 23px/1.5 "Songti SC", STSong, serif;
  letter-spacing: .06em;
}
.tile-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.tile-copy small { color: var(--coral); font: 700 10px/1.4 Georgia, serif; letter-spacing: .15em; }
.tile-copy strong { margin-top: 15px; font: 700 clamp(27px,3vw,39px)/1.35 "Songti SC", STSong, serif; letter-spacing: .04em; }
.tile-copy > span { margin-top: 15px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.tile-copy em { margin-top: 34px; color: var(--leaf); font-size: 12px; font-style: normal; font-weight: 700; }
.tile-copy b { display: inline-block; margin-left: 10px; font-size: 18px; transition: transform .2s ease; }
.book-tile:hover .tile-copy b { transform: translateX(5px); }
.library-footer { padding: 58px 24px 70px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.library-footer span { display: block; color: var(--coral); font-size: 36px; transform: rotate(24deg); }
.library-footer p { margin: 7px 0 0; font-size: 12px; letter-spacing: .12em; }

/* The second book keeps the same listening interaction with its own palette. */
.wish-book {
  --ink: #3f2731;
  --muted: #78696d;
  --paper: #f4e9df;
  --cream: #fff7ed;
  --leaf: #704056;
  --leaf-deep: #4d2838;
  --leaf-pale: #ead7dd;
  --coral: #d76f61;
  --line: rgba(79, 40, 56, .14);
}
.wish-book .hero-shell {
  background:
    radial-gradient(circle at 79% 5%, rgba(111,64,86,.13), transparent 27%),
    radial-gradient(circle at 2% 96%, rgba(215,111,97,.12), transparent 31%),
    var(--cream);
}
.wish-book .hero-copy h1 { font-size: clamp(45px,5.7vw,70px); line-height: 1.25; }
.wish-hero-cover { background: #eab6a6; }
.hero-cover-title {
  position: absolute;
  z-index: 3;
  top: 42px;
  left: 28px;
  right: 22px;
  color: #54283a;
  text-align: center;
  text-shadow: 0 1px rgba(255,255,255,.55);
  font: 700 31px/1.48 "Songti SC", STSong, serif;
  letter-spacing: .07em;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 300px 1fr; gap: 54px; }
  .cover-wrap { width: 275px; height: 400px; }
  .cover-card { width: 258px; height: 361px; }
  .player { grid-template-columns: minmax(180px,.9fr) minmax(300px,1.6fr) 80px; gap: 14px; }
  .book-tile { grid-template-columns: 160px 1fr; padding: 26px; gap: 25px; }
  .tile-cover { width: 154px; height: 220px; }
  .cover-title { top: 25px; left: 15px; right: 15px; font-size: 18px; }
}

@media (max-width: 720px) {
  .hero-shell { min-height: 0; padding: 0 22px 58px; }
  .topbar { height: 72px; }
  .brand { font-size: 14px; }
  .library-link { font-size: 12px; }
  .hero { margin-top: 26px; grid-template-columns: 1fr; gap: 44px; }
  .cover-wrap { width: 232px; height: 326px; margin: auto; }
  .cover-card { width: 220px; height: 299px; }
  .recording-stamp { right: -9px; width: 63px; height: 63px; font-size: 11px; }
  .hero-copy { text-align: center; }
  .hero-copy h1 { font-size: 50px; }
  .description { text-align: left; }
  .stats, .hero-actions { justify-content: center; }
  .chapter-section { padding: 68px 18px 110px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 11px; }
  .section-heading h2 { font-size: 29px; }
  .chapter { min-height: 91px; grid-template-columns: 29px 36px 1fr auto; gap: 9px; padding-inline: 4px; }
  .chapter-copy h3 { font-size: 16px; }
  .row-play { width: 35px; height: 35px; }
  .player { left: 9px; right: 9px; bottom: 8px; min-height: 142px; padding: 12px 14px; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 9px 10px; border-radius: 15px; }
  .now-playing { grid-column: 1; }
  .player-number { width: 39px; height: 39px; }
  .player-options { grid-column: 2; grid-row: 1; }
  .transport { grid-column: 1 / -1; grid-row: 2; }
  .player-options #mute-button { display: none; }
  .closing-note { padding-bottom: 205px; }
  .library-hero { min-height: 405px; padding: 0 22px 58px; }
  .library-intro { margin-top: 45px; }
  .library-intro h1 { font-size: 47px; }
  .library-kicker { display: none; }
  .library-shelf { padding: 62px 16px 82px; }
  .shelf-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .book-grid { grid-template-columns: 1fr; gap: 18px; }
  .book-tile { min-height: 0; padding: 21px; grid-template-columns: 119px 1fr; gap: 20px; border-radius: 16px; }
  .tile-cover { width: 116px; height: 166px; }
  .tile-copy small { font-size: 8px; }
  .tile-copy strong { margin-top: 9px; font-size: 23px; }
  .tile-copy > span { margin-top: 9px; font-size: 11px; }
  .tile-copy em { margin-top: 18px; font-size: 10px; }
  .cover-title { top: 17px; left: 10px; right: 10px; font-size: 14px; }
  .hero-cover-title { top: 32px; left: 20px; right: 16px; font-size: 24px; }
  .wish-book .hero-copy h1 { font-size: 39px; }
}

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