:root {
  color-scheme: light;
  --paper: #fffaf0;
  --paper-deep: #f3ead8;
  --wine: #963b3b;
  --wine-dark: #752727;
  --ink: #352b20;
  --muted: #6f6253;
  --line: #ded0b7;
  --focus: #1f5f99;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper-deep); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper-deep), var(--paper));
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.page-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 40px rgb(76 53 29 / 12%);
}

.book-header {
  padding: 22px 18px;
  text-align: center;
  color: #fff;
  background: var(--wine-dark);
  border-bottom: 5px solid #c69665;
}

.book-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .06em;
}

.player-card {
  padding: 34px 22px 30px;
  text-align: center;
}

.chapter {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 14px;
  color: var(--wine-dark);
  font-size: 17px;
  font-weight: 700;
  background: #f2e2d2;
  border-radius: 999px;
}

.audio-title {
  min-height: 68px;
  margin: 0 auto;
  max-width: 520px;
  font-size: 22px;
  line-height: 1.55;
  font-weight: 700;
  text-wrap: balance;
}

.page-reference {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.play-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 112px;
  margin: 28px auto 14px;
  padding: 12px;
  color: #fff;
  background: var(--wine);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--wine), 0 10px 22px rgb(117 39 39 / 22%);
  cursor: pointer;
  touch-action: manipulation;
}

.play-button:hover { background: var(--wine-dark); }
.play-button:active { transform: translateY(1px); }
.play-button:focus-visible { outline: 4px solid var(--focus); outline-offset: 7px; }

.play-icon { font-size: 38px; line-height: 1; transform: translateX(2px); }
.play-label { margin-top: 7px; font-size: 17px; font-weight: 700; }

.status {
  min-height: 30px;
  margin: 8px 0 20px;
  color: var(--wine-dark);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 700;
}

.progress-wrap { max-width: 520px; margin: 0 auto; }

.progress {
  width: 100%;
  height: 36px;
  margin: 0;
  accent-color: var(--wine);
  cursor: pointer;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: var(--muted);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.fallback {
  margin: 28px auto 0;
  padding-top: 22px;
  max-width: 520px;
  border-top: 1px solid var(--line);
}

.fallback-label { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.native-player { display: block; width: 100%; min-height: 54px; }

.help-note {
  margin: 26px 0 0;
  padding: 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  background: #f8efdf;
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (min-width: 480px) {
  .book-title { font-size: 22px; }
  .player-card { padding: 42px 42px 36px; }
  .audio-title { font-size: 26px; }
  .play-button { min-width: 124px; min-height: 124px; }
}

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