/* =======================================================================
   BOOKSHELF — /collection/books/
   Favorite Reads as a rating-grouped shelf of faux-3D books; hover to lift
   one off the shelf, click to open a detail popup. Also a List view (numbered
   index + sticky cover rail) toggled from the section header. One system-ui
   type family, one orange accent, star rating.
   ======================================================================= */

/* -----------------------------------------------------------------------
   0. STICKY FIX (mandatory)
   Global styles.css sets html,body{overflow-x:hidden}, which silently
   breaks position:sticky. overflow-x:clip clips identically but keeps
   sticky alive. Scoped to this page so it can never regress other pages.
   The inline <head> script also tags <html> for browsers without :has().
   ----------------------------------------------------------------------- */
html.books-page,
html:has(body.books-page),
body.books-page {
  overflow-x: clip;
}

/* -----------------------------------------------------------------------
   1. FOUNDATIONS
   ----------------------------------------------------------------------- */
:root {
  --bk-ink: #202020;
  --bk-muted: #666666;
  --bk-faint: #8F8F8F;
  --bk-hairline: #eaeaea;
  --bk-rule: #919090;
  --bk-accent: rgba(255, 119, 0, 0.8);
}

.bk-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* A quiet, considered gap between the three movements of the page. */
.books-page .currently-reading,
.books-page .favorite-reads,
.books-page .up-next {
  margin-top: 72px;
}

/* -----------------------------------------------------------------------
   2. SECTION HEADERS — re-skinned running heads (tracked small-caps)
   Reuses the existing .section-title-line + .title-line flex-hairline.
   ----------------------------------------------------------------------- */
.books-page .section-title-line {
  margin-bottom: 28px;
  align-items: center;
}

.books-page .title_left {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 500;
  color: var(--bk-faint);
}

/* -----------------------------------------------------------------------
   3. HEADER + CENSUS MASTHEAD
   ----------------------------------------------------------------------- */
.bk-census {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--bk-faint);
  margin-top: 12px;
  letter-spacing: 0.01em;
}

.bk-census .bk-census-sep {
  color: var(--bk-hairline);
  font-style: normal;
  padding: 0 6px;
}

/* -----------------------------------------------------------------------
   4. PLATE — shared frame for Currently Reading + the Plate Rail.
   Hairline frame + soft mount shadow + 2px radius = the visual rhyme.
   ----------------------------------------------------------------------- */
.bk-plate img {
  display: block;
  border: 1px solid var(--bk-hairline);
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
  background: var(--theme-surface, #fff);
}

/* Flat fallback tile (missing / broken cover) — never a broken-image icon. */
.bk-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  background: var(--theme-soft, #f4f4f4);
  border: 1px solid var(--bk-hairline);
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
  font-size: 13px;
  line-height: 1.35;
  color: var(--bk-ink);
  box-sizing: border-box;
}

/* -----------------------------------------------------------------------
   5. CURRENTLY READING — the featured plate (left-set editorial opener)
   ----------------------------------------------------------------------- */
.bk-featured {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
}

/* The featured book is the SAME faux-3D object as the shelf (spine-shine +
   page-edge thickness), sized up as the opener's hero. */
/* Scoped under .bk-featured so its margin:0 beats the base .bk-book-object
   { margin: 0 auto } (equal specificity, defined later) — otherwise the auto
   side-margins absorb the row's free space and shove the text to the far right. */
.bk-featured .bk-book-object--featured {
  width: 210px;
  height: 315px; /* 2:3 */
  margin: 0;
  /* Self-perspective: the shelf books get perspective from their .bk-book
     parent; this hero book stands alone, so it carries its own — needed for
     the resting tilt and the cursor-tracked tilt to read as real 3D. */
  transform: perspective(900px) rotateY(-18deg);
  will-change: transform;
}

/* Hover interaction is driven by JS (cursor-tracked tilt), not a static
   :hover rule — see initFeaturedTilt() in books.js. */

.bk-featured-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 6px;
}

.bk-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

/* Sanctioned orange role #3: the in-progress status dot. Static, no pulse. */
.bk-dot {
  width: 7px;
  height: 7px;
  background-color: var(--bk-accent);
}

.bk-kicker-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 500;
  color: var(--bk-faint);
}

.bk-featured-title {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
}

.bk-featured-author {
  font-style: italic;
  font-size: 14px;
  color: var(--bk-faint);
  margin-top: 8px;
}

/* -----------------------------------------------------------------------
   6. FAVORITE READS — a rating-grouped shelf of faux-3D books
   ----------------------------------------------------------------------- */
.bk-shelf {
  margin-top: 4px;
}

.bk-shelf-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 30px;
  row-gap: 20px;
  margin: 20px 0 0;
}

/* --- Tier chapter heads (reuse the section-title-line pattern, smaller) --- */
.bk-tier {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 40px 0 6px;
}

.bk-tier:first-child {
  margin-top: 4px;
}

.bk-tier-label {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 12px;
  font-weight: 600;
  color: var(--bk-accent);
  white-space: nowrap;
}

.bk-tier-count {
  font-size: 11px;
  color: var(--bk-faint);
  font-variant-numeric: tabular-nums;
}

.bk-tier-line {
  flex: 1;
  height: 1.5px;
  background: var(--bk-hairline);
}

/* --- The book button --- */
.bk-book {
  all: unset;
  cursor: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 34px 6px 22px;
  perspective: 720px;
  text-align: center;
}

/* The faux-3D object: cover rotated in Y, a spine-shine down the left edge,
   and a page-block on the right rotated 90deg to fake the book's thickness. */
.bk-book-object {
  position: relative;
  display: block;
  width: min(100%, 150px);
  height: 225px; /* ~2:3 book proportion, so covers crop as little as possible */
  margin: 0 auto 18px;
  transform-style: preserve-3d;
  transform: rotateY(-18deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 8px 13px 18px rgba(32, 32, 32, 0.20);
}

/* Spine highlight/shadow strip down the binding edge. */
.bk-book-object::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 10px;
  z-index: 2;
  background: linear-gradient(90deg, rgba(0,0,0,0.28), transparent 26%, rgba(255,255,255,0.32) 56%, rgba(0,0,0,0.14));
}

.bk-book-object img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  border-radius: 0 2px 2px 0;
}

.bk-book-object .bk-tile {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  border: 0;
  box-shadow: none;
  border-radius: 0 2px 2px 0;
  font-size: 11px;
}

/* Page edges (the book's thickness) on the right side — a proper hardback
   block, not a pamphlet. */
.bk-book-edge {
  position: absolute;
  top: 2px;
  right: -23px;
  width: 24px;
  height: calc(100% - 4px);
  background: repeating-linear-gradient(0deg, #fcfcf6 0 1px, #dcdacb 1px 2px);
  transform-origin: left;
  transform: rotateY(90deg);
  box-shadow: inset -4px 0 #c5bda3;
  z-index: 0;
}

/* Deeper shadow on hover/focus. On hover the cursor-tracked tilt (JS) drives
   the transform; keyboard focus (no pointer) keeps a static lift instead. */
.bk-book:hover .bk-book-object,
.bk-book:focus-visible .bk-book-object {
  box-shadow: 14px 20px 26px rgba(32, 32, 32, 0.22);
}

.bk-book:focus-visible .bk-book-object {
  transform: rotateY(-30deg) rotateZ(-2deg) translateY(-9px);
}

.bk-book:focus-visible {
  outline: none;
}

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

.bk-book-title {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--bk-ink);
  transition: color 0.2s ease;
}

.bk-book:hover .bk-book-title,
.bk-book:focus-visible .bk-book-title {
  color: var(--bk-accent);
}

.bk-book-author {
  font-size: 11px;
  font-style: italic;
  color: var(--bk-faint);
  line-height: 1.3;
}

/* Per-book rating — small stars (the page's rating mark), centred under
   the book in place of the tier headers. */
.bk-book-rating {
  margin-top: 7px;
  gap: 3px;
  justify-content: center;
}

.bk-book-rating svg {
  width: 11px;
  height: 11px;
}

/* Hanging drop-quotation mark in the left gutter. */
.bk-dquote {
  position: absolute;
  left: -26px;
  top: 8px;
  font-size: 40px;
  line-height: 1;
  color: var(--bk-hairline);
  pointer-events: none;
}

/* --- Star rating — Plate Rail caption (.bk-rating--cap). Five copies of the
   site's own logo mark; the first n are filled orange, the rest are outlines.
   A personal, on-brand score glyph rather than a generic star or bar. --- */
.bk-rating {
  display: inline-flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
}

.bk-star {
  display: block;
  overflow: visible;
}

/* Empty star: rounded outline, visible on white. */
.bk-star path {
  fill: none;
  stroke: #cfcfcf;
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

/* Filled star: solid orange — the score. */
.bk-star.on path {
  fill: var(--bk-accent);
  stroke: var(--bk-accent);
}

/* -----------------------------------------------------------------------
   6b. VIEW SWITCH + LIST VIEW (the numbered index + sticky cover rail)
   The section header carries a Books / List toggle; each panel is one view.
   ----------------------------------------------------------------------- */
[data-view-panel][hidden] {
  display: none !important;
}

.bk-viewswitch {
  display: inline-flex;
  gap: 2px;
  flex: none;
  align-self: center;
}

.bk-viewswitch button {
  all: unset;
  cursor: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bk-faint);
  transition: color 0.2s ease, background 0.2s ease;
}

.bk-viewswitch button:hover {
  color: var(--bk-ink);
}

.bk-viewswitch button.is-active {
  color: var(--bk-accent);
  background: rgba(255, 119, 0, 0.10);
}

.bk-vs-icon {
  font-size: 12px;
  line-height: 1;
}

/* --- the two-column spread (index + sticky rail) --- */
.bk-spread {
  display: grid;
  grid-template-columns: minmax(0, 520px) 1fr;
  column-gap: 48px;
  align-items: start;
}

.bk-index {
  max-width: 520px;
}

.bk-entry {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bk-hairline);
  outline: none;
}

.bk-title:focus-visible {
  background-size: 100% 100%;
  color: #fff;
  outline: none;
}

.bk-folio {
  font-size: 12px;
  color: var(--bk-faint);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.bk-entry.is-active .bk-folio {
  color: var(--bk-accent);
}

.bk-thumb-wrap {
  display: none;
}

.bk-body {
  min-width: 0;
}

.bk-titlerow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bk-titlewrap {
  min-width: 0;
}

.bk-title {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.35;
}

.bk-author {
  display: block;
  font-size: 13px;
  font-style: italic;
  color: var(--bk-faint);
  margin-top: 2px;
}

.bk-qtoggle {
  all: unset;
  cursor: none;
  flex: none;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bk-faint);
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.bk-qtoggle:hover,
.bk-entry.has-quote:hover .bk-qtoggle {
  color: var(--bk-accent);
}

.bk-qtoggle[aria-expanded="true"] {
  transform: rotate(45deg);
  color: var(--bk-ink);
}

.bk-quote {
  position: relative;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--bk-muted);
  max-width: 52ch;
  padding-left: 4px;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}

.bk-quote.open {
  max-height: 600px;
  opacity: 1;
  padding: 16px 0 16px 4px;
}

/* --- the sticky cover rail --- */
.bk-rail-col {
  align-self: stretch;
  padding-top: 4px;
}

.bk-plate--rail {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 96px);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The rail cover is the SAME 3D book object as the shelf/hero, sized for the
   rail column (self-perspective since it stands alone). */
.bk-plate--rail .bk-book-object--rail {
  width: 190px;
  height: 285px; /* 2:3 */
  margin: 0;
  transform: perspective(850px) rotateY(-18deg);
}

/* The cover wipes in each time it changes (setPlate toggles .active). */
.bk-plate--rail .bk-book-object--rail img {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.2s, clip-path 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.bk-plate--rail .bk-book-object--rail img.active {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.bk-plate-cap {
  margin-top: 18px;
  max-width: 220px;
  text-align: center;
}

.bk-plate-title {
  display: block;
  font-size: 14px;
  color: var(--bk-ink);
  line-height: 1.3;
}

.bk-plate-author {
  display: block;
  font-size: 12px;
  font-style: italic;
  color: var(--bk-faint);
  margin-top: 2px;
}

.bk-rating--cap {
  margin-top: 10px;
  justify-content: center;
}

/* -----------------------------------------------------------------------
   7. THE DETAIL POPUP — native <dialog> modal opened by clicking a book
   ----------------------------------------------------------------------- */
.bk-detail {
  width: min(760px, calc(100% - 32px));
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--bk-hairline);
  border-radius: 10px;
  background: var(--theme-surface, #fff);
  color: var(--bk-ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
  overflow: auto;
  overscroll-behavior: contain;
}

.bk-detail::backdrop {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.bk-detail[open] {
  animation: bk-detail-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes bk-detail-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bk-detail-close {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 18px 18px 0 auto;
  padding: 6px;
  font-size: 11px;
  color: var(--bk-faint);
  transition: color 0.2s ease;
}

.bk-detail-close:hover,
.bk-detail-close:focus-visible {
  color: var(--bk-accent);
}

.bk-detail-book {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 6px 40px 44px;
}

.bk-detail-cover {
  perspective: 900px;
  align-self: start;
  padding-top: 10px;
  display: flex;
  justify-content: center;
}

.bk-book-object--lg {
  width: 200px;
  height: 292px;
  margin: 0;
}

.bk-detail-text {
  min-width: 0;
  padding-top: 6px;
}

.bk-detail-text .bk-kicker-label {
  display: block;
  margin-bottom: 12px;
}

.bk-detail-title {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.bk-detail-author {
  display: block;
  font-size: 14px;
  font-style: italic;
  color: var(--bk-faint);
}

.bk-detail-rating {
  gap: 5px;
  justify-content: flex-start;
  margin-top: 18px;
}

.bk-detail-score {
  margin-left: 8px;
  font-size: 12px;
  color: var(--bk-faint);
}

.bk-detail-quote {
  position: relative;
  margin: 24px 0 0;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bk-muted);
  max-width: 52ch;
}

.bk-detail-quote .bk-dquote {
  left: -2px;
  top: -6px;
  font-size: 42px;
  color: var(--bk-hairline);
}

.bk-detail-noquote {
  margin: 24px 0 0;
  font-size: 14px;
  font-style: italic;
  color: var(--bk-faint);
}

.bk-detail-link {
  display: inline-block;
  margin-top: 26px;
  padding-bottom: 2px;
  font-size: 13px;
  color: var(--bk-ink);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid var(--bk-accent);
  transition: color 0.2s ease;
}

.bk-detail-link:hover,
.bk-detail-link:focus-visible {
  color: var(--bk-accent);
}

/* -----------------------------------------------------------------------
   8. UP NEXT — the printed back-index
   ----------------------------------------------------------------------- */
.bk-upnext-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  max-width: 900px;
  margin: -14px auto 24px;
  flex-wrap: wrap;
}

.bk-upnext-count {
  font-size: 13px;
  font-style: italic;
  color: var(--bk-faint);
  font-variant-numeric: tabular-nums;
}

/* The quiet filter — unboxed, a single hairline bottom rule, orange caret. */
.bk-filter {
  all: unset;
  cursor: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--bk-ink);
  padding: 2px 0;
  min-width: 160px;
  border-bottom: 1px solid var(--bk-hairline);
  caret-color: var(--bk-accent);
  transition: border-color 0.2s ease;
}

.bk-filter::placeholder {
  color: var(--bk-faint);
}

.bk-filter:focus {
  border-bottom-color: var(--bk-faint);
}

.bk-upnext-index {
  column-count: 3;
  column-gap: 40px;
  column-fill: balance;
  max-width: 900px;
  margin: 0 auto;
}

/* Illuminated index letters: a large initial (same system-ui as the page)
   led by a small orange dot and trailed by a hairline rule, so each letter
   reads as a considered chapter mark in a printed back-index — not a stray
   grey glyph. Distinct from the uppercase-orange rating tiers above. */
.bk-upnext-anchor {
  break-inside: avoid;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 30px;
  font-weight: 500;
  color: var(--bk-ink);
  line-height: 1;
  margin: 26px 0 12px;
}

.bk-upnext-anchor::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--bk-accent);
  border-radius: 50%;
}

.bk-upnext-anchor::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bk-hairline);
}

.bk-upnext-anchor:first-child {
  margin-top: 0;
}

.bk-upnext-item {
  break-inside: avoid;
  margin: 0 0 4px;
  line-height: 1.5;
}

/* Quiet link: plain muted text, no standing underline. The orange arrives
   only on hover — 174 titles stay calm, but every one is still a live link. */
.bk-un-link {
  font-size: 13px;
  color: var(--bk-muted);
  text-decoration: none;
  cursor: none;
  background: none;
  transition: color 0.2s ease;
}

.bk-un-link:hover,
.bk-un-link:focus-visible {
  color: var(--bk-accent);
  outline: none;
}

/* --- Colophon endnote --- */
.bk-asterism {
  text-align: center;
  color: var(--bk-faint);
  font-size: 14px;
  margin: 48px 0 18px;
  letter-spacing: 0.3em;
}

/* -----------------------------------------------------------------------
   9. cursor:none COMPLIANCE — every interactive element keeps the custom
   cursor. (Blanket rule; each element also sets it individually above.)
   ----------------------------------------------------------------------- */
.books-page a,
.books-page button,
.books-page input,
.books-page [tabindex] {
  cursor: none;
}

/* -----------------------------------------------------------------------
   10. RESPONSIVE
   ----------------------------------------------------------------------- */
@media (max-width: 820px) {
  .bk-shelf-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 26px;
  }

  .bk-detail-book {
    grid-template-columns: 180px 1fr;
    gap: 30px;
    padding: 4px 30px 36px;
  }

  .bk-book-object--lg {
    width: 168px;
    height: 244px;
  }

  /* List view: single column, drop the sticky rail, show inline thumbnails. */
  .bk-spread {
    grid-template-columns: 1fr;
  }

  .bk-rail-col {
    display: none;
  }

  .bk-entry {
    align-items: start;
  }

  .bk-folio {
    padding-top: 2px;
  }

  .bk-thumb-wrap {
    display: block;
    flex: none;
    width: 44px;
  }

  .bk-thumb-wrap img,
  .bk-thumb-wrap .bk-tile {
    width: 44px;
    height: 66px;
    object-fit: cover;
    border: 1px solid var(--bk-hairline);
    border-radius: 2px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    box-sizing: border-box;
  }

  .bk-thumb-wrap .bk-tile {
    font-size: 9px;
    padding: 4px;
    line-height: 1.2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.10);
  }

  .bk-upnext-index {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .bk-shelf-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
  }

  /* Cover above text in the popup on small screens. */
  .bk-detail-book {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 4px 22px 30px;
  }

  .bk-detail-cover {
    justify-self: center;
  }

  .bk-detail-rating {
    justify-content: center;
  }

  .bk-detail-text {
    text-align: center;
  }

  .bk-detail-quote {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .bk-featured {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bk-featured-text {
    align-items: center;
  }

  .bk-book-object--lg {
    width: 150px;
    height: 218px;
  }

  .bk-book-object--featured {
    width: 168px;
    height: 252px;
  }

  .bk-upnext-index {
    column-count: 1;
  }

  .bk-upnext-head {
    flex-direction: column;
    gap: 8px;
  }

  .bk-filter {
    width: 100%;
  }
}

/* -----------------------------------------------------------------------
   11. REDUCED MOTION — every new animated surface no-ops.
   ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bk-book-object,
  .bk-book-title,
  .bk-star path,
  .bk-detail[open],
  .bk-plate--rail img,
  .bk-quote {
    transition: none !important;
    animation: none !important;
  }

  /* Keep the resting 3D tilt; skip the hover lift/rotate motion. */
  .bk-book:hover .bk-book-object,
  .bk-book:focus-visible .bk-book-object {
    transform: rotateY(-18deg);
  }

  .bk-plate--rail img {
    clip-path: inset(0 0 0 0) !important;
    opacity: 1 !important;
  }
}
