/* ============================================================
   Per-book static page (SEO surface) — reuses :root vars from styles.css.
   Intentionally light: no CRT layer, no boot, no app.js → fast paint.
   ============================================================ */
.book-body { padding-bottom: 60px; }
.book-page { max-width: 940px; margin: 0 auto; padding: 28px 20px 0; }

.back-link {
  display: inline-block; font-family: var(--ui); text-transform: uppercase;
  letter-spacing: .12em; font-size: 13px; text-decoration: none; color: var(--brass);
  border-bottom: 1px solid transparent; padding: 4px 0; margin-bottom: 6px;
}
.back-link:hover { border-bottom-color: var(--brass); }
.crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: var(--muted); text-transform: uppercase; margin: 2px 0 22px;
}
.crumb a { color: var(--brass); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* hub pages (setting / series / author + indexes) — reuse .book-page + .related/.rel-list */
.hub-page { max-width: 1020px; }
.hub-intro { font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--ink); max-width: 70ch; margin: 0 0 30px; }
.hub-intro strong { color: var(--bone); }
.rel-by { font-size: 13px; color: var(--muted); }
.rel-more { margin: 12px 0 0; font-family: var(--ui); letter-spacing: .06em; font-size: 13px; }
.rel-more a { color: var(--brass); text-decoration: none; }
.rel-more a:hover { text-decoration: underline; }

/* hero: cover + main */
.book-hero { display: grid; grid-template-columns: 320px 1fr; gap: 34px; align-items: start; }
.book-cover-wrap { position: sticky; top: 18px; }
.book-cover {
  width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; display: block;
  border: 1px solid var(--line); border-radius: 3px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55); background: var(--iron);
}
.cover-fallback {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 20px; font-family: var(--display); font-size: 24px; color: var(--bone-dim);
}

.book-main h1,
.hub-page h1 {
  font-family: var(--display); font-weight: 600; line-height: 1.02;
  font-size: clamp(34px, 5vw, 52px); margin: 4px 0 6px; color: var(--bone);
  letter-spacing: .01em;
}
.byline { font-family: var(--ui); font-size: 17px; color: var(--brass); margin: 0 0 18px; }

dl.facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px;
  margin: 0 0 22px; font-size: 15px;
}
dl.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); align-self: baseline; }
dl.facts dd { margin: 0; color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 8px; }
.buy {
  display: inline-block; font-family: var(--ui); text-transform: uppercase;
  letter-spacing: .1em; font-size: 15px; font-weight: 500; text-decoration: none;
  color: var(--brass); border: 1px solid var(--brass); border-radius: 3px;
  padding: 11px 22px; transition: background .15s, color .15s;
}
.buy:hover { background: var(--brass); color: var(--void); }
.affiliate-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* "My Collection" toggle (mirrors the SPA control: red seal-dot + brass active) */
.collect-btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--ui); text-transform: uppercase; letter-spacing: .1em; font-size: 15px; font-weight: 500;
  color: var(--bone); background: transparent; border: 1px solid var(--brass-lo); border-radius: 3px;
  padding: 11px 20px; transition: border-color .15s, color .15s, background .15s;
}
.collect-btn::before {
  content: ""; width: 13px; height: 13px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 38% 32%, #c23a2d, #6c110c 72%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}
.collect-btn:hover { border-color: var(--crt-dim); color: var(--bone); }
.collect-btn.owned { background: var(--brass); color: var(--void); border-color: var(--brass); font-weight: 600; }
.collect-btn.owned::before { background: radial-gradient(circle at 38% 32%, #ecdcb4, #b9912f 72%); }

/* owned purity seal on the cover (wax + parchment ribbon) — hidden until in collection */
.book-seal { display: none; position: absolute; z-index: 5; top: -18px; right: -16px; width: 86px; height: 86px;
  transform: rotate(-11deg); filter: drop-shadow(0 5px 8px rgba(0,0,0,.6)); pointer-events: none; }
.is-owned .book-seal { display: block; }
.book-seal svg { position: relative; z-index: 2; width: 100%; height: 100%; display: block; }
.book-seal .seal-paper { top: 32px; width: 40px; height: 100px; }
.book-seal .sp-ink { font-size: 5.4px; top: 40%; left: 4px; right: 4px; line-height: 1.55; letter-spacing: .3px; }
.reviews-line { font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.reviews-line a { color: var(--brass); }

/* synopsis */
.synopsis { margin: 38px 0 0; max-width: 70ch; }
.synopsis h2, .related h2 {
  font-family: var(--ui); text-transform: uppercase; letter-spacing: .14em;
  font-size: 14px; color: var(--brass); border-bottom: 1px solid var(--line);
  padding-bottom: 8px; margin: 0 0 14px;
}
.synopsis p { font-family: var(--body); font-size: 17px; line-height: 1.65; color: var(--ink); }
.no-syn { color: var(--muted); }

/* related: series reading order + more by author */
.related { margin: 38px 0 0; }
.rel-list { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 22px; }
.rel-list li { padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.rel-list a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.rel-list a:hover { color: var(--brass); border-bottom-color: var(--brass); }
.rel-pos { font-family: var(--mono); font-size: 12px; color: var(--brass-lo); }
.rel-rating { font-size: 13px; color: var(--muted); }
.rel-cur { color: var(--bone); }
.rel-here { font-family: var(--mono); font-size: 11px; color: var(--copper); letter-spacing: .05em; }

/* footer */
.book-footer { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.book-footer .footer-disclaimer { font-size: 12px; color: var(--muted); line-height: 1.6; }
.book-footer .footer-links { font-family: var(--ui); letter-spacing: .06em; font-size: 13px; }

@media (max-width: 680px) {
  .book-hero { grid-template-columns: 1fr; gap: 22px; }
  .book-cover-wrap { position: relative; max-width: 240px; }
  .rel-list { grid-template-columns: 1fr; }
}

/* audio dramas: square official art (no portrait edition) + format badge */
.cover-wrap { position: relative; }
.book-cover.is-audio { aspect-ratio: 1 / 1; object-fit: contain; background: #0c0a07; }
.fmt-badge {
  position: absolute; top: 9px; left: 9px; z-index: 3; font-family: var(--mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 2px; background: rgba(10,9,6,.85); color: var(--crt);
  border: 1px solid var(--crt-dim); text-shadow: 0 0 6px rgba(95,224,160,.45);
}
