/* ============================================================
   THE BOOKSHELF ... kenhellem.com/bookshelf/
   Scoped to .bs-* and .v2-* classes. Uses tokens from /css/style.css.
   v2 design: hero + Essentials forest section + sticky toolbar
   with view switcher + three views (themes / rails / index) + drawer.
   ============================================================ */

/* ============ HERO ============ */
.bs-hero {
  background: var(--linen);
  padding: 128px 0 56px; /* extra top to clear fixed 64px site nav */
}
.bs-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}
.bs-hero h1 { margin-bottom: 20px; }
.bs-hero h1 .bs-accent {
  color: var(--copper);
  font-family: Georgia, serif;
  font-weight: 400;
  font-style: italic;
}
.bs-hero-lede {
  font-size: 17px;
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 14px;
  color: var(--text-warm);
}
.bs-hero-meta {
  display: flex;
  gap: 36px;
  margin-top: 32px;
  font-family: var(--font-display);
  flex-wrap: wrap;
}
.bs-hero-meta-n {
  font-weight: 800;
  font-size: 30px;
  color: var(--forest);
  letter-spacing: -0.5px;
  line-height: 1;
}
.bs-hero-meta-l {
  font-size: 10.5px;
  color: var(--copper);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 800;
  margin-top: 6px;
}
.bs-hero-stack {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 260px;
}

/* ============ ESSENTIALS ... featured forest section ============ */
.v2-fav-section {
  background: var(--forest);
  color: #FAF8F4;
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}
.v2-fav-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 5px;
  background: var(--grad-copper-bold);
}
.v2-fav-eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 16px;
  display: block;
}
.v2-fav-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -1.2px;
  color: #FAF8F4;
  max-width: 720px;
  margin: 0 0 22px;
}
.v2-fav-h em {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: #F0C88A;
}
.v2-fav-lede {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: rgba(250,248,244,0.78);
  max-width: 600px;
  margin: 0 0 48px;
}
.v2-fav-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 16px;
  align-items: end;
}
.v2-fav-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.v2-fav-stars {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--copper);
}
.v2-fav-plinth {
  height: 4px;
  margin-top: 4px;
  background: var(--grad-copper-bold);
  border-radius: 1px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* ============ COVER (face-out, used in Essentials + drawer) ============ */
.v2-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.32s cubic-bezier(.2,.7,.3,1.2), box-shadow 0.32s;
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.35),
    inset 0 0 0 1px rgba(0,0,0,0.06),
    inset 1px 0 0 rgba(255,255,255,0.12);
}
.v2-cover:hover {
  transform: translateY(-10px);
  box-shadow:
    0 24px 48px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(0,0,0,0.06);
}
.v2-cover-inner {
  position: absolute;
  inset: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  overflow: hidden;
}
.v2-cover-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.12;
  letter-spacing: -0.3px;
  text-wrap: balance;
}
.v2-cover.is-serif .v2-cover-title {
  font-family: Georgia, serif;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0;
}
.v2-cover-author {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.3px;
  opacity: 0.78;
  line-height: 1.3;
}
/* Real-image cover: the <img> fits the 2:3 frame fully (contain, not crop). */
.v2-cover-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop in the small Essentials cards */
  display: block;
}
/* In the drawer specifically, show the whole cover (not cropped) since book covers vary. */
.v2-detail-cover-mock.v2-cover-img img {
  object-fit: contain;
  background: rgba(0,0,0,0.06);
}

/* ============ STICKY TOOLBAR (filters + search) ============ */
.v2-toolbar {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: rgba(250,248,244,0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.v2-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  flex-wrap: wrap;
}
.v2-toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============ TAG PILLS (quick concept filters) ============ */
.bs-tag-pills {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 0 14px;
}
.bs-tag-pills-label {
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-soft, #6a635a);
  margin-right: 4px;
}
.bs-tag-pill {
  appearance: none;
  border: 1px solid rgba(42, 37, 33, 0.16);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink, #2a2521);
  padding: 5px 12px 5px 12px;
  border-radius: var(--r-full, 999px);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.bs-tag-pill:hover {
  background: rgba(212, 148, 79, 0.16);
  border-color: rgba(212, 148, 79, 0.5);
}
.bs-tag-pill:focus-visible {
  outline: 2px solid var(--copper, #d4944f);
  outline-offset: 2px;
}
.bs-tag-pill.is-active {
  background: var(--ink, #2a2521);
  color: #F5EFE6;
  border-color: var(--ink, #2a2521);
}
.bs-tag-pill-count {
  font-size: 11px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}
.bs-tag-pill.is-active .bs-tag-pill-count { opacity: 0.7; }

.v2-viewswitch {
  display: inline-flex;
  background: rgba(0,0,0,0.04);
  border-radius: var(--r-full);
  padding: 4px;
  gap: 2px;
}
.v2-viewswitch button {
  background: transparent;
  border: none;
  padding: 8px 18px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--text-warm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.v2-viewswitch button:hover { color: var(--forest); }
.v2-viewswitch button.is-active {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 2px 6px rgba(43,76,66,0.25);
}

.v2-c-sort {
  font-family: var(--font-body);
  font-size: 12.5px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 14px;
  border-radius: var(--r-full);
  color: var(--text-rich);
  font-weight: 600;
  cursor: pointer;
}

.bs-search { position: relative; display: flex; align-items: center; }
.bs-search input {
  border: 1px solid var(--border);
  background: #fff;
  padding: 9px 14px 9px 36px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-size: 13px;
  width: 220px;
  color: var(--text-rich);
  transition: border 0.2s;
}
.bs-search input:focus { outline: none; border-color: var(--forest); }
.bs-search svg {
  position: absolute;
  left: 14px;
  width: 14px;
  height: 14px;
  color: var(--text-quiet);
  pointer-events: none;
}

/* ============ V2 SPINE ... adaptive treatment ============ */
.v2-spine {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(.2,.7,.3,1.2), box-shadow 0.28s, filter 0.25s;
  flex-shrink: 0;
  border-radius: 1px 1px 0 0;
  box-shadow:
    inset -1px 0 0 rgba(0,0,0,0.22),
    inset 1px 0 0 rgba(255,255,255,0.1),
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 1px 3px rgba(0,0,0,0.18);
  overflow: hidden;
}
.v2-spine.is-pale {
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.08),
    inset -1px 0 0 rgba(0,0,0,0.12),
    inset 1px 0 0 rgba(0,0,0,0.04),
    0 1px 3px rgba(0,0,0,0.14);
}
.v2-spine:hover, .v2-spine:focus-visible {
  outline: none;
  transform: translateY(-12px); z-index: 3;
  box-shadow:
    inset -1px 0 0 rgba(0,0,0,0.22),
    0 16px 28px rgba(42,37,33,0.28),
    0 0 0 1px rgba(212,148,79,0.55);
}
.v2-spine.is-want {
  opacity: 0.42;
  filter: saturate(0.35) brightness(1.08);
}
.v2-spine.is-want .v2-spine-text { opacity: 0.7; }
.v2-spine.is-want::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(0,0,0,0.05) 6px 7px),
    rgba(245, 239, 230, 0.32);
  pointer-events: none;
  z-index: 1;
}
.v2-spine.is-want:hover,
.v2-spine.is-want:focus-visible {
  opacity: 0.85;
  filter: saturate(0.85) brightness(1);
}

.v2-spine-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  max-height: 100%;
  z-index: 3;
  padding: 4px 0;
}
.v2-spine-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -0.1px;
  line-height: 1;
  max-height: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-spine-author {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 8.5px;
  letter-spacing: 0.6px;
  opacity: 0.7;
  text-transform: uppercase;
}
.v2-spine.font-serif .v2-spine-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700; font-style: italic; letter-spacing: 0;
}
.v2-spine.font-serif-bold .v2-spine-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800; letter-spacing: 0;
}
.v2-spine.font-sans-bold .v2-spine-title {
  font-weight: 800; letter-spacing: -0.2px; font-size: 12.5px;
}

/* ============ VIEW SECTION SHARED ============ */
.v2-view-section {
  background: var(--linen);
  padding: 72px 0 96px;
}
.v2-view-intro { margin-bottom: 48px; }
.v2-view-intro h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.8px;
  color: var(--forest);
  margin: 6px 0 12px;
}
.v2-view-intro h2 em {
  font-family: Georgia, serif;
  font-weight: 400;
  font-style: italic;
  color: var(--copper);
}
.v2-view-intro p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-warm);
  max-width: 620px;
  margin: 0;
}

/* ============ OPTION A ... Themed Bookcases ============ */
.v2-a-section { margin-bottom: 64px; }
.v2-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.v2-section-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--copper);
  display: block;
  margin-bottom: 10px;
}
.v2-section-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.6px;
  color: var(--forest);
  margin: 0;
  line-height: 1;
}
.v2-section-count {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-quiet);
  font-weight: 500;
  white-space: nowrap;
}
.v2-a-bookcase { background: var(--linen); }
.v2-a-shelf-row {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 2px;
  padding: 0 12px;
  min-height: 250px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.v2-a-shelf-row::-webkit-scrollbar { height: 6px; }
.v2-a-shelf-row::-webkit-scrollbar-thumb {
  background: rgba(184,110,48,0.25); border-radius: 3px;
}
.v2-a-shelf-board {
  height: 4px;
  background: linear-gradient(180deg, #D4944F 0%, #8B5520 100%);
  border-radius: 1px;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 6px 16px rgba(42,37,33,0.10);
  margin-bottom: 8px;
}
.v2-a-shelf-board::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 6%; right: 6%;
  height: 12px;
  background: radial-gradient(ellipse at center top, rgba(42,37,33,0.16), transparent 70%);
  pointer-events: none;
}

/* ============ OPTION B ... Reading Rails ============ */
.v2-b-rail {
  margin-bottom: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.v2-b-rail:last-child { border-bottom: none; }
.v2-b-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.v2-b-rail-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
  color: var(--forest);
  margin: 0;
}
.v2-b-rail-title .count {
  color: var(--text-quiet);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0;
  margin-left: 10px;
}
.v2-b-rail-strip {
  display: flex;
  align-items: end;
  gap: 4px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 4px 18px;
  scrollbar-width: thin;
  position: relative;
}
.v2-b-rail-strip::after {
  content: '';
  position: absolute;
  left: 4px; right: 4px;
  bottom: 4px;
  height: 3px;
  background: linear-gradient(180deg, #D4944F 0%, #8B5520 100%);
  border-radius: 1px;
  pointer-events: none;
}
.v2-b-rail-strip::-webkit-scrollbar { height: 6px; }
.v2-b-rail-strip::-webkit-scrollbar-thumb {
  background: rgba(184,110,48,0.25); border-radius: 3px;
}

/* ============ OPTION C ... Index / List ============ */
.v2-c-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.v2-c-controls-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-quiet);
}
.v2-c-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
  margin: 0;
  padding: 0;
}
.v2-c-row {
  display: grid;
  grid-template-columns: 18px 30px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
  transition: background 0.15s;
}
.v2-c-row:hover, .v2-c-row:focus-visible {
  outline: none;
  background: rgba(184,110,48,0.05);
}
.v2-c-row-chip {
  width: 14px;
  height: 22px;
  border-radius: 1px;
  flex-shrink: 0;
  box-shadow: inset -1px 0 0 rgba(0,0,0,0.18), inset 1px 0 0 rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.v2-c-row-chip-accent {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38%;
}
.v2-c-row-stars {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  color: var(--copper);
  letter-spacing: 0.5px;
  text-align: center;
}
.v2-c-row-stars.is-empty { color: var(--text-quiet); opacity: 0.5; }
.v2-c-row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.v2-c-row-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-rich);
  letter-spacing: -0.1px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.v2-c-row-title .fav {
  color: var(--copper);
  margin-right: 6px;
  font-size: 11px;
  vertical-align: 1px;
}
.v2-c-row-author {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--text-quiet);
  margin-top: 1px;
}
.v2-c-row-theme {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-quiet);
  text-align: right;
  white-space: nowrap;
}
.v2-c-group-h {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--copper);
  padding: 24px 0 8px;
  border-bottom: 2px solid var(--copper);
  margin-bottom: 6px;
}

/* ============ DETAIL DRAWER ============ */
.v2-detail-backdrop {
  position: fixed; inset: 0;
  background: rgba(42,37,33,0.45);
  backdrop-filter: blur(3px);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.v2-detail-backdrop.is-open { opacity: 1; pointer-events: auto; }
.v2-detail {
  position: fixed; top: 0; bottom: 0;
  right: -600px;
  width: 600px;
  max-width: 100vw;
  background: var(--linen);
  z-index: 201;
  transition: right 0.42s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -24px 0 60px rgba(42,37,33,0.22);
}
.v2-detail.is-open { right: 0; }
.v2-detail-close {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
  color: var(--text-rich);
}
.v2-detail-close:hover {
  background: var(--forest); color: #fff; border-color: var(--forest);
}
.v2-detail-header {
  position: relative;
  padding: 36px 36px 32px;
  overflow: hidden;
  min-height: 280px;
}
.v2-detail-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 50%, rgba(0,0,0,0.10) 100%);
  pointer-events: none;
}
.v2-detail-header-inner {
  position: relative;
  display: flex;
  justify-content: center;
}
.v2-detail-cover-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.v2-detail-cover-mock {
  width: 130px;
  aspect-ratio: 2 / 3;
  cursor: default;
  box-shadow:
    0 14px 32px rgba(0,0,0,0.42),
    inset 0 0 0 1px rgba(0,0,0,0.06),
    inset 1px 0 0 rgba(255,255,255,0.12);
}
.v2-detail-cover-mock:hover { transform: none; }
.v2-detail-cover-hint {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.65;
}
.v2-detail-body {
  padding: 28px 36px 36px;
  overflow-y: auto;
}
.v2-detail-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.v2-detail-chip {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--r-full);
}
.v2-detail-chip-theme { background: rgba(43,76,66,0.1); color: var(--forest); }
.v2-detail-chip-fav { background: var(--copper); color: #2A2521; }
.v2-detail-chip-want { background: rgba(184,110,48,0.12); color: var(--copper); }
.v2-detail-marked {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--copper);
  margin: -6px 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.v2-detail-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
  color: var(--text-rich);
  text-wrap: balance;
}
.v2-detail-author {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text-warm);
  margin-bottom: 20px;
}
.v2-detail-meta-row {
  display: flex;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.v2-detail-meta-l {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-quiet);
  margin-bottom: 4px;
}
.v2-detail-meta-stars {
  font-size: 18px;
  color: var(--copper);
  letter-spacing: 2px;
}
.v2-detail-meta-status {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-rich);
}
.v2-detail-notes-label,
.v2-detail-section-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 10px;
}
.v2-detail-notes {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-warm);
  margin: 0;
  font-style: italic;
}
.v2-detail-section { margin-bottom: 24px; }
.v2-detail-section:last-child { margin-bottom: 0; }
.v2-detail-body-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-warm);
  margin: 0;
}
.v2-detail-takeaway {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  position: relative;
}
.v2-detail-takeaway::before {
  content: '';
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  background: var(--copper);
  border-radius: 0 2px 2px 0;
}
.v2-detail-takeaway p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-rich);
  margin: 0;
  font-weight: 500;
}
.v2-detail-quote {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: var(--forest);
  border-left: 3px solid var(--copper);
  padding: 6px 0 6px 16px;
  margin: 0;
}

/* ============ LINK CARDS (blog posts + 50 Lunches episodes) ============ */
.v2-detail-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.v2-detail-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: border 0.15s, transform 0.15s;
}
.v2-detail-link:hover {
  border-color: var(--copper);
  transform: translateY(-1px);
}
.v2-detail-link-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.v2-detail-link-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.v2-detail-link-kind {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 2px;
}
.v2-detail-link-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-rich);
  line-height: 1.3;
}

/* ============ EMPTY STATE ============ */
.v2-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-quiet);
  font-style: italic;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .v2-fav-row { grid-template-columns: repeat(5, 1fr); row-gap: 24px; }
  .v2-c-list { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 900px) {
  .bs-hero { padding: 104px 0 40px; }
  .bs-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .bs-hero-stack { height: 200px; overflow-x: auto; justify-content: flex-start; }
  .v2-toolbar-inner { flex-direction: column; align-items: stretch; }
  .v2-toolbar-right { justify-content: flex-start; }
  .bs-search input { width: 100%; }
  .v2-detail { width: 100vw; right: -100vw; }
  .v2-detail.is-open { right: 0; }
  .v2-detail-body { padding: 24px; }
  .v2-detail-header { padding: 28px 24px 20px; }

  /* Mobile: Essentials becomes a horizontal scroll rail with smaller covers */
  .v2-fav-row {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: visible;
    gap: 12px;
    padding: 4px 0 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .v2-fav-row::-webkit-scrollbar { height: 4px; }
  .v2-fav-row::-webkit-scrollbar-thumb {
    background: rgba(212,148,79,0.35); border-radius: 2px;
  }
  .v2-fav-card {
    flex: 0 0 auto;
    width: 110px;
    scroll-snap-align: start;
  }
  .v2-fav-section { padding: 56px 0 64px; }
}
@media (max-width: 540px) {
  .v2-fav-h { font-size: 32px; }
  .v2-viewswitch button { padding: 8px 12px; font-size: 11px; }
}

/* ============ BS-OWN ... Ken's own book, pinned under the hero ============ */
.bs-own { background: var(--linen); padding: 0 0 64px; overflow: visible; }
.bs-own-card {
  display: grid; grid-template-columns: 150px 1fr; gap: 40px; align-items: center;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 32px 40px; box-shadow: 0 10px 30px -18px rgba(42,37,33,0.35);
}
.bs-own-cover { display: block; transform: rotate(-2deg); transition: transform 0.25s ease; }
.bs-own-cover:hover { transform: rotate(0deg) translateY(-3px); }
.bs-own-cover img { width: 100%; height: auto; display: block; border-radius: 3px;
  box-shadow: 0 2px 4px rgba(42,37,33,0.12), 0 14px 30px -12px rgba(42,37,33,0.45); }
.bs-own .label { margin-bottom: 8px; }
.bs-own h2 { font-size: clamp(24px, 3vw, 32px); color: var(--text-rich); }
.bs-own h2 em { color: var(--copper); font-family: Georgia, serif; font-weight: 400; font-style: italic; }
.bs-own-text p { font-size: 16px; line-height: 1.7; color: var(--text-warm); max-width: 620px; margin-top: 12px; }
.bs-own-text p.bs-own-meta { font-family: var(--font-display); font-size: 11px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase; color: var(--forest); margin-top: 14px; }
.bs-own-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
@media (max-width: 700px) {
  .bs-own { padding-bottom: 48px; }
  .bs-own-card { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .bs-own-cover { width: 120px; }
  .bs-own-actions .btn { flex: 1 1 auto; }
}


@media (prefers-reduced-motion: reduce) { .bs-own-cover { transition: none; } }

/* The closed book drawer sits just off-screen; without this its shadow darkens the right edge of every section. */
.v2-detail:not(.is-open) { box-shadow: none; }

/* ============================================================
   BOOK PAIRINGS ... "If you enjoyed..." slider (/bookshelf/ only, script /js/pairings.js)
   ============================================================ */
.bs-pairings { background: var(--sand); padding: 88px 0 80px; border-top: 1px solid var(--border); }
.bs-pairings .pr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.bs-pairings h2 { color: var(--text-rich); max-width: 24ch; }
.bs-pairings h2 em { color: var(--copper); font-family: Georgia, serif; font-weight: 400; font-style: italic; }
.bs-pairings .pr-lede { font-size: 16px; line-height: 1.7; color: var(--text-warm); margin-top: 12px; }
.bs-pairings .pr-arrows { display: flex; gap: 10px; flex: none; }
.bs-pairings .pr-arrow { width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--forest);
  background: transparent; color: var(--forest); font-size: 20px; line-height: 1; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease; }
.bs-pairings .pr-arrow:hover:not(:disabled) { background: var(--forest); color: var(--white); }
.bs-pairings .pr-arrow:disabled { opacity: 0.3; cursor: default; }
.bs-pairings .pr-track { list-style: none; margin: 28px -16px -14px; padding: 12px 16px 40px; scroll-padding-inline: 16px;
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.bs-pairings .pr-track::-webkit-scrollbar { display: none; }
.bs-pairings .pr-track:focus-visible { outline: 2px solid var(--forest); outline-offset: 6px; }
.bs-pairings .pr-card { scroll-snap-align: start; margin: 0; }
.bs-pairings .pr-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--r-md); background: var(--linen);
  box-shadow: 0 1px 2px rgba(42,37,33,0.08), 0 14px 34px -14px rgba(42,37,33,0.32); }
.bs-pairings .pr-dots { display: none; justify-content: center; gap: 10px; margin-top: 6px; }
.bs-pairings .pr-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: rgba(42,37,33,0.22); cursor: pointer; }
.bs-pairings .pr-dot[aria-selected="true"] { background: var(--copper); width: 26px; border-radius: 5px; }
.bs-pairings .pr-cta { display: flex; justify-content: center; margin-top: 30px; }
@media (max-width: 1000px) { .bs-pairings .pr-track { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 760px) {
  .bs-pairings { padding: 64px 0 56px; }
  .bs-pairings .pr-arrows { display: none; }
  .bs-pairings .pr-track { grid-auto-columns: 84%; gap: 14px; margin: 18px -24px -14px; padding: 12px 24px 36px; scroll-padding-inline: 24px; }
  .bs-pairings .pr-dots { display: flex; }
  .bs-pairings .pr-cta .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .bs-pairings .pr-track { scroll-behavior: auto; } }
