/* Podnebu Books — Celestial Library
   Native to Podnebu's nebula dawn/night palette, frosted glass surfaces,
   show-color ambient glow, tactile hardcover book objects, and subtle
   editorial serif reserved for book titles. */

:root {
  --book-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --book-surface: rgba(255, 255, 255, 0.78);
  --book-surface-strong: #FFFFFF;
  --book-pill-bg: rgba(22, 24, 44, 0.048);
  --book-gold-bg: rgba(227, 164, 46, 0.13);
  --book-shadow: 0 2px 5px rgba(15, 18, 36, 0.08), 0 12px 26px -6px rgba(15, 18, 36, 0.22);
  --book-shadow-lg: 0 4px 10px rgba(15, 18, 36, 0.10), 0 22px 44px -10px rgba(15, 18, 36, 0.30);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --book-surface: rgba(16, 18, 29, 0.76);
    --book-surface-strong: rgba(22, 25, 40, 0.94);
    --book-pill-bg: rgba(255, 255, 255, 0.06);
    --book-gold-bg: rgba(255, 210, 122, 0.13);
    --book-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), 0 16px 32px -6px rgba(0, 0, 0, 0.55);
    --book-shadow-lg: 0 8px 18px rgba(0, 0, 0, 0.45), 0 28px 54px -10px rgba(0, 0, 0, 0.68);
  }
}

:root[data-theme="dark"] {
  --book-surface: rgba(16, 18, 29, 0.76);
  --book-surface-strong: rgba(22, 25, 40, 0.94);
  --book-pill-bg: rgba(255, 255, 255, 0.06);
  --book-gold-bg: rgba(255, 210, 122, 0.13);
  --book-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), 0 16px 32px -6px rgba(0, 0, 0, 0.55);
  --book-shadow-lg: 0 8px 18px rgba(0, 0, 0, 0.45), 0 28px 54px -10px rgba(0, 0, 0, 0.68);
}

body[data-view="books"] .page { max-width: 980px; }
body[data-view="book"] .page { max-width: 920px; }

/* ---------- Tactile Hardcover Book Object ---------- */
.book-cover {
  position: relative;
  display: block;
  flex: none;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 3px 7px 7px 3px;
  background: var(--cover-paper, #262A3E);
  color: var(--cover-ink, #F3EFE8);
  box-shadow: var(--book-shadow);
  container-type: inline-size;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease;
}

/* Realistic spine groove + subtle glossy rim */
.book-cover::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.24) 0%,
      rgba(255, 255, 255, 0.20) 3.4%,
      rgba(0, 0, 0, 0.11) 5.5%,
      transparent 9.5%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, transparent 18%, transparent 88%, rgba(0, 0, 0, 0.12) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  content: "";
  pointer-events: none;
}

.book-cover img {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}

.book-cover img[data-cover-ready] { opacity: 1; }
.book-cover.has-photo .book-cover-type { opacity: 0; }

/* Collector's clothbound typographic fallback */
.book-cover-type {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15% 13% 13% 16%;
  background:
    radial-gradient(85% 65% at 85% 12%, color-mix(in srgb, var(--cover-foil, #FFD27A) 22%, transparent), transparent 72%),
    var(--cover-paper, #262A3E);
  transition: opacity 200ms ease;
}

.book-cover-type::before {
  position: absolute;
  inset: 7% 7% 7% 10%;
  border: 1px solid color-mix(in srgb, var(--cover-foil, #FFD27A) 34%, transparent);
  border-radius: 1px 3px 3px 1px;
  content: "";
  pointer-events: none;
}

.book-cover-cat {
  font-style: normal;
  font-size: clamp(7px, 7.5cqi, 11px);
  letter-spacing: 0.14em;
  color: var(--cover-foil, #FFD27A);
  opacity: 0.88;
}

.book-cover-title {
  margin: auto 0;
  font-family: var(--book-serif);
  font-size: clamp(11px, 14.5cqi, 24px);
  font-weight: 700;
  line-height: 1.26;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
}

.book-cover-author {
  font-size: clamp(7px, 7.8cqi, 12px);
  color: color-mix(in srgb, var(--cover-ink, #F3EFE8) 74%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Shared Pills & Micro Badges ---------- */
.book-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--book-pill-bg);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}

.book-audio-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--book-gold-bg);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.book-rating {
  font-size: 11px;
  color: var(--text-3);
}

.book-rating-mini {
  font-size: 11px;
  color: var(--text-3);
}

.book-play-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 180ms ease, background 180ms ease;
}

.book-play-circle .i-pause,
.is-playing .book-play-circle .i-play,
.book-play-ghost .i-pause,
.is-playing .book-play-ghost .i-play { display: none; }
.is-playing .book-play-circle .i-pause,
.is-playing .book-play-ghost .i-pause { display: block; }

/* ---------- Bookshelf Header ---------- */
.book-shelf { margin-top: 40px; }

.book-kicker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--book-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 12px;
  color: var(--text-2);
}

.book-kicker .sep { color: var(--text-4); }

.book-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-line);
  box-shadow: 0 0 8px var(--accent-line);
}

.book-shelf-head h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.book-shelf-sub {
  margin: 14px 0 0;
  max-width: 38em;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
}

/* ---------- Curated Spotlight Row (有声书桌) ---------- */
.shelf-spotlight-wrap { margin-top: 44px; }

.shelf-spotlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.shelf-spot {
  --ring: var(--raised);
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--book-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 200ms ease, transform 220ms ease, background 200ms ease;
}

.shelf-spot::before {
  content: "";
  position: absolute;
  right: -32px;
  top: -48px;
  width: 170px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  opacity: 0.20;
  mix-blend-mode: var(--blend);
  pointer-events: none;
  transition: opacity 220ms ease;
}

.shelf-spot:hover {
  border-color: var(--line-strong);
  background: var(--book-surface-strong);
  transform: translateY(-2px);
}

.shelf-spot:hover::before { opacity: 0.34; }
.shelf-spot:hover .book-cover { transform: translateY(-2px); }

.shelf-spot-art { width: 74px; align-self: start; }

.shelf-spot-body {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.shelf-spot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shelf-spot-body h3 {
  margin: 8px 0 0;
  font-family: var(--book-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shelf-spot-author {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-spot-quote {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shelf-spot-ts {
  color: var(--accent-ink);
  font-size: 11px;
  margin-right: 4px;
}

.shelf-spot-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shelf-spot-stat {
  font-size: 12px;
  color: var(--text-3);
  margin-right: auto;
  white-space: nowrap;
}

.shelf-spot-stat b { color: var(--text-2); font-weight: 600; }

/* ---------- Filter & Sort Controls ---------- */
.shelf-catalog { margin-top: 48px; }

.book-shelf-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.book-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.book-categories button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--book-surface);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.book-categories button small {
  font-size: 11px;
  color: var(--text-3);
}

.book-categories button:hover {
  border-color: var(--line-strong);
  background: var(--book-surface-strong);
  color: var(--text);
}

.book-categories button[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.book-categories button[aria-pressed="true"] small {
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}

.book-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.book-filter-search {
  position: relative;
  flex: 1 1 240px;
  max-width: 340px;
}

.book-filter-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.book-filter-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--raised);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}

.book-filter-search input::placeholder { color: var(--text-3); }
.book-filter-search input:focus { border-color: var(--accent-line); outline: none; }

.book-sort-group {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--book-surface);
  gap: 2px;
}

.book-sort-group button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.book-sort-group button:hover { color: var(--text); }
.book-sort-group button[aria-pressed="true"] {
  background: var(--press);
  color: var(--text);
  font-weight: 500;
}

.book-shelf-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 22px;
  font-size: 12px;
  color: var(--text-2);
}

/* ---------- Bookshelf Grid ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-grid > li { min-width: 0; }

.book-card {
  --ring: var(--raised);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 16px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--book-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 200ms ease, transform 220ms ease, background 200ms ease, box-shadow 220ms ease;
}

.book-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -36px;
  width: 200px;
  height: 140px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  opacity: 0.14;
  mix-blend-mode: var(--blend);
  pointer-events: none;
  transition: opacity 260ms ease;
}

.book-card:hover {
  border-color: var(--line-strong);
  background: var(--book-surface-strong);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.book-card:hover::before { opacity: 0.30; }

.book-card-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 4px 8px 16px;
}

.book-card-art {
  width: min(100%, 138px);
}

.book-card:hover .book-cover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--book-shadow-lg);
}

.book-card-info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.book-card-title {
  font-family: var(--book-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-author {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-card-author .sep { color: var(--text-4); }

.book-card-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.book-card-shows {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-3);
}

.book-card-shows b { color: var(--text-2); font-weight: 600; }

.book-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--text-2);
}

.book-empty p { margin: 0 0 14px; }

/* ---------- Homepage Recent Books Block ---------- */
.book-recent-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-recent-list > li { min-width: 0; }

.book-recent-card {
  --ring: var(--raised);
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--raised);
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 200ms ease, transform 200ms ease;
}

.book-recent-card::before {
  content: "";
  position: absolute;
  right: -36px;
  top: -48px;
  width: 150px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  opacity: 0.18;
  mix-blend-mode: var(--blend);
  pointer-events: none;
}

.book-recent-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.book-recent-card:hover .book-cover { transform: translateY(-2px); }

.book-recent-art { width: 52px; }
.book-recent-art .book-cover-type { padding: 14% 10%; }
.book-recent-art .book-cover-cat,
.book-recent-art .book-cover-author { display: none; }

.book-recent-info {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.book-recent-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.book-recent-top .logo { border-radius: 5px; }
.book-recent-show { color: var(--text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-recent-top .sep { color: var(--text-4); }

.book-recent-title {
  font-family: var(--book-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-recent-meta {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Search Match Banner ---------- */
.book-match {
  --ring: var(--raised);
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--raised);
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 200ms ease, transform 200ms ease;
}

.book-match::before {
  content: "";
  position: absolute;
  left: -20px;
  top: -40px;
  width: 220px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  opacity: 0.20;
  mix-blend-mode: var(--blend);
  pointer-events: none;
}

.book-match:hover {
  border-color: var(--accent-line);
  transform: translateY(-1px);
}

.book-match-art { position: relative; width: 48px; }
.book-match-art .book-cover-cat,
.book-match-art .book-cover-author { display: none; }

.book-match-main {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-match-eyebrow { font-size: 11px; color: var(--accent-ink); font-weight: 500; }
.book-match-main strong { font-family: var(--book-serif); font-size: 18px; font-weight: 700; line-height: 1.3; }
.book-match-sub { font-size: 12px; color: var(--text-2); }

.book-match-side {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.book-match-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Book Detail Hero ---------- */
.book-detail { margin-top: 24px; }

.book-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.book-back:hover { background: var(--hover); color: var(--text); }

.book-detail-head {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  align-items: start;
  gap: 44px;
  margin-top: 28px;
}

.book-detail-stage {
  position: relative;
  width: 184px;
}

.book-detail-stage .neb-cloud {
  top: 50%;
  --sz: 290px;
}

.book-detail-stage .book-cover {
  position: relative;
  z-index: 1;
  box-shadow: var(--book-shadow-lg);
}

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

.book-detail-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.book-meta-year {
  font-size: 12px;
  color: var(--text-3);
}

.book-douban-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--book-surface);
  color: var(--text-2);
  font-size: 12px;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.book-douban-badge b { color: var(--text); font-weight: 600; }
.book-douban-badge:hover { border-color: var(--accent-line); color: var(--text); }

.book-detail-info h1 {
  margin: 12px 0 0;
  font-family: var(--book-serif);
  font-size: clamp(34px, 4.8vw, 50px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.book-detail-author {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--text-2);
}

.book-summary {
  margin: 16px 0 0;
  max-width: 38em;
  font-size: 16px;
  line-height: 1.78;
  color: var(--text);
}

.book-stats-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-2);
}

.book-stats-bar b { color: var(--text); font-weight: 600; }
.book-stats-bar .sep { color: var(--text-4); }
.book-stat-gold { color: var(--accent-ink); }
.book-stat-gold b { color: var(--accent-ink); }

/* Featured quick-listen bar */
.book-featured {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 10px 16px 10px 10px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--raised);
  box-shadow: var(--shadow);
  transition: border-color 200ms ease;
}

.book-featured.is-current { border-color: var(--accent-line); }

.book-featured-play {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  min-height: 42px;
  padding: 5px 15px 5px 6px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.book-featured-play .book-play-circle {
  background: color-mix(in srgb, var(--bg) 16%, transparent);
  color: var(--bg);
}

.book-featured-play:hover { transform: scale(1.02); }
.book-featured-play b { font-weight: 600; margin-left: 2px; }

.book-featured-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-featured-show {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.book-featured-show .logo { border-radius: 5px; }
.book-featured-show .sep { color: var(--text-4); }

.book-featured-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-detail-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.book-read {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.book-read-label {
  font-size: 12px;
  color: var(--text-3);
  margin-right: 2px;
}

.book-read .chip {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
  color: var(--text-2);
}

.book-read .chip:hover { color: var(--text); }

.book-segments-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
}

.book-segments-link:hover { color: var(--accent-ink); }

/* ---------- Book Timeline ---------- */
.book-timeline {
  margin-top: 48px;
  padding: 20px 22px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--book-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.book-tl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.book-tl-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.book-tl-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.book-tl-key i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-line);
  box-shadow: 0 0 0 2px var(--book-gold-bg);
}

.book-timeline .tl-dot.is-timed {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-line);
}

.book-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--book-surface);
  font-size: 13px;
  color: var(--text-2);
}

.book-filter-banner b { color: var(--text); }

/* ---------- Mentions Tier 1: Timed Clips ---------- */
.book-mentions-section { margin-top: 44px; }

.book-clip-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-clip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--raised);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 200ms ease, transform 200ms ease;
}

.book-clip::before {
  content: "";
  position: absolute;
  right: -36px;
  top: -54px;
  width: 180px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  opacity: 0.16;
  mix-blend-mode: var(--blend);
  pointer-events: none;
}

.book-clip:hover { border-color: var(--line-strong); }

.book-clip.is-current {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 1px var(--accent-line), var(--shadow);
}

.book-clip-main {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.book-mention-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 12px;
  color: var(--text-3);
}

.book-show-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.book-show-link .logo { border-radius: 6px; }
.book-show-link:hover b { text-decoration: underline; text-underline-offset: 3px; }
.book-mention-top .sep { color: var(--text-4); }

.book-speaker-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--book-pill-bg);
  color: var(--text-2);
  font-size: 11px;
}

.book-clip-quote {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.book-clip-ep {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-clip-ep a {
  color: var(--text-2);
  text-decoration: none;
}

.book-clip-ep a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

.book-clip-side { position: relative; }

.book-play-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 14px 4px 5px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--book-surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 180ms ease, background 180ms ease, transform 160ms ease;
}

.book-play-pill:hover {
  border-color: var(--accent-line);
  background: var(--book-surface-strong);
  transform: scale(1.02);
}

.book-clip.is-current .book-play-pill {
  border-color: var(--accent-line);
  background: var(--book-gold-bg);
  color: var(--accent-ink);
}

.book-clip.is-current .book-play-circle {
  background: var(--accent-line);
  color: var(--on-accent);
}

.book-ts-static {
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- Mentions Tier 2: Untimed Episodes ---------- */
.book-note-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.book-note-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.book-note-row::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}

.book-note-row.is-current::before { background: var(--accent-line); }

.book-note-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.book-note-ep {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.book-note-ep a { text-decoration: none; }
.book-note-ep a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

.book-note-excerpt {
  margin: 2px 0 0;
  padding-left: 11px;
  border-left: 2px solid var(--line-strong);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.book-play-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.book-play-ghost:hover {
  background: var(--hover);
  color: var(--text);
}

.book-note-row.is-current .book-play-ghost {
  border-color: var(--accent-line);
  background: var(--book-gold-bg);
  color: var(--accent-ink);
}

/* Co-mentioned books */
.book-related {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

.book-mini-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--book-pill-bg);
  color: var(--text-2);
  font-size: 12px;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.book-mini-chip:hover {
  border-color: var(--accent-line);
  color: var(--accent-ink);
}

/* ---------- Discovery Footer (Same Author / Co-mentioned) ---------- */
.book-discover {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.book-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-mini-grid > li { min-width: 0; }

.book-mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--book-surface);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.book-mini-card:hover {
  border-color: var(--line-strong);
  background: var(--book-surface-strong);
  transform: translateY(-2px);
}

.book-mini-art { width: 48px; }
.book-mini-art .book-cover-cat,
.book-mini-art .book-cover-author { display: none; }

.book-mini-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-mini-body strong {
  font-family: var(--book-serif);
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-mini-body small {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-mini-meta {
  font-size: 11px;
  color: var(--accent-ink);
  margin-top: 2px;
}

/* ---------- Episode Page (Unified Nebula Style) ---------- */
.book-episode-head { margin-top: 24px; }

.book-episode-show {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.book-episode-show:hover { color: var(--text); }

.book-episode-head h1 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.book-episode-meta {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
}

.book-episode-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.book-episode-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.book-episode-play:hover { opacity: 0.9; }

.book-episode-section { margin-top: 48px; }

.book-episode-notes {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-episode-notes blockquote {
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--book-surface);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .shelf-spotlights { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .book-shelf { margin-top: 24px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .book-card { padding: 14px 12px 12px; border-radius: 16px; }
  .book-card-stage { padding: 2px 4px 12px; }
  .book-card-art { width: min(100%, 124px); }
  .book-card-title { font-size: 15px; }
  .book-recent-list { grid-template-columns: 1fr; }
  .book-match { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .book-match-side { grid-column: 1 / -1; justify-content: space-between; }

  .book-detail-head {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 20px;
  }
  .book-detail-stage { width: 144px; margin: 0 auto; }
  .book-detail-stage .neb-cloud { --sz: 230px; }
  .book-detail-info h1 { font-size: clamp(28px, 8vw, 38px); }
  .book-featured { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .book-featured-play { justify-content: center; }
  .book-timeline { padding: 16px; }
  .book-clip { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .book-note-row { grid-template-columns: 1fr; gap: 10px; }
  .book-note-row::before { left: -8px; }
  .book-mini-grid { grid-template-columns: 1fr; }
  .book-filter-search { max-width: none; }
}
