/* Dragon's Den Books — visual bookshelf (shelf-v2)
   Drop in beside account.css. Scoped under .ddh-sv2. */

.ddh-sv2 {
  --sv2-ink: #2a2420;
  --sv2-head: #1a1410;
  --sv2-red: #7a1f2b;
  --sv2-gold: #ffd26f;
  --sv2-gold2: #d4b483;
  --sv2-parch: #f7f2e8;
  --sv2-line: #e6dccb;
  --sv2-muted: #6b5e52;
  --sv2-green: #1f5a3a;
  --sv2-wood: #5a3a22;
  --sv2-wood-dark: #3b2416;
  --sv2-wood-deep: #24160e;
  --sv2-shelf: #6a4528;
  --sv2-inch: 28px;
  --sv2-font: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--sv2-font);
  color: var(--sv2-ink);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 64px;
  box-sizing: border-box;
}
.ddh-sv2 *, .ddh-sv2 *::before, .ddh-sv2 *::after { box-sizing: border-box; }
.ddh-sv2 h1, .ddh-sv2 h2, .ddh-sv2 h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  color: var(--sv2-head);
  line-height: 1.15;
  margin: 0;
}
.ddh-sv2 h1 { font-size: clamp(36px, 5vw, 54px); margin: 4px 0 10px; }
.ddh-sv2-kicker {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sv2-gold);
}
.ddh-sv2-lede { margin: 0 0 8px; color: var(--sv2-muted); font-size: 16px; line-height: 1.55; max-width: 46em; }
.ddh-sv2-note { margin: 0 0 18px; color: var(--sv2-muted); font-size: 13px; }
.ddh-sv2-who { margin: 0 0 16px; font-size: 15px; color: var(--sv2-muted); }
.ddh-sv2-who strong { color: inherit; }

/* ---- Tabs (top of the page; nothing important lives below the shelves) ---- */
.ddh-sv2-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px 0 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--sv2-line);
  scrollbar-width: thin;
}
.ddh-sv2-tab {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--sv2-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sv2-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ddh-sv2-tab:hover { border-color: var(--sv2-gold2); }
.ddh-sv2-tab:focus-visible { outline: 2px solid var(--sv2-gold); outline-offset: 2px; }
.ddh-sv2-tab[aria-selected="true"] {
  background: var(--sv2-red);
  color: #fffdf7;
  border-color: var(--sv2-red);
}

/* ---- Filters: All / Read / Want to read, plus Owned only ---- */
.ddh-sv2-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 18px;
}
.ddh-sv2-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.ddh-sv2-chip, .ddh-sv2-owned {
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--sv2-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sv2-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.ddh-sv2-chip:hover, .ddh-sv2-owned:hover { border-color: var(--sv2-gold2); }
.ddh-sv2-chip:focus-visible, .ddh-sv2-owned:focus-visible { outline: 2px solid var(--sv2-gold); outline-offset: 2px; }
.ddh-sv2-chip[aria-pressed="true"] {
  background: var(--sv2-red);
  color: #fffdf7;
  border-color: var(--sv2-red);
}
.ddh-sv2-owned[aria-pressed="true"] {
  background: #7a1f2b;
  color: #fffdf7;
  border-color: #7a1f2b;
}
.ddh-sv2-count { margin-left: auto; font-size: 14px; color: var(--sv2-muted); font-weight: 600; }

/* ---- Panels ---- */
.ddh-sv2-panel[hidden] { display: none !important; }
.ddh-sv2-form {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid var(--sv2-line);
  border-radius: 10px;
  background: var(--sv2-parch);
  max-width: 520px;
}
.ddh-sv2-form h3 { margin: 0 0 4px; font-size: 26px; }
.ddh-sv2-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; color: var(--sv2-muted); }
.ddh-sv2-form input, .ddh-sv2-form select {
  padding: 10px 12px;
  border: 1px solid var(--sv2-line);
  border-radius: 6px;
  font: inherit;
  font-size: 16px;
  color: var(--sv2-ink);
  background: #fff;
}
.ddh-sv2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 11px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--sv2-red);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.ddh-sv2-btn:hover { filter: brightness(1.05); }
.ddh-sv2-btn:focus-visible { outline: 2px solid var(--sv2-gold); outline-offset: 2px; }
.ddh-sv2-btn-gold { background: var(--sv2-gold); color: var(--sv2-head); }
.ddh-sv2-btn-ghost {
  background: #fff;
  color: var(--sv2-ink);
  border: 1px solid var(--sv2-line);
}
.ddh-sv2-empty { margin: 0; padding: 16px; color: var(--sv2-muted); font-size: 15px; }
.ddh-sv2-privacy { margin: 16px 0 0; font-size: 13px; }
.ddh-sv2-privacy a { color: var(--sv2-muted); font-weight: 700; text-decoration: none; }
.ddh-sv2-privacy a:hover { text-decoration: underline; }

/* ---- Library alcove ---- */
.ddh-sv2-library {
  margin: 0 -20px;
  padding: 10px 16px 40px;
  background: transparent;
  min-height: 40vh;
}
.ddh-sv2-library .ddh-sv2-empty { color: #d8cbb8; }

/* ---- Wooden bookcase (one packed case; Black Library stays separate) ---- */
.ddh-sv2-case {
  --case-wood: #5c3a22;
  margin: 0 auto 36px;
  max-width: 1180px;
  padding: 0 14px 16px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.07) 0 2px, transparent 2px 11px),
    linear-gradient(90deg, #2a1810, #6a4328 6%, #5a3820 50%, #6a4328 94%, #2a1810);
  border: 10px solid #2b1810;
  border-image: none;
  box-shadow:
    inset 0 0 0 3px #8a5a32,
    inset 0 0 0 6px #3a2214,
    0 18px 40px rgba(0,0,0,.45);
  border-radius: 2px 2px 6px 6px;
}
.ddh-sv2-case.is-bl {
  --case-wood: #1a1612;
  background:
    repeating-linear-gradient(90deg, rgba(255,210,111,.04) 0 1px, transparent 1px 13px),
    linear-gradient(90deg, #0c0b09, #241c14 8%, #1a1612 50%, #241c14 92%, #0c0b09);
  border-color: #0e0c0a;
  box-shadow:
    inset 0 0 0 3px #b8962e,
    inset 0 0 0 6px #1a1612,
    0 18px 40px rgba(0,0,0,.55);
}
.ddh-sv2-case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 0 -4px 8px;
  padding: 12px 8px 8px;
}
.ddh-sv2-case-head h2 {
  font-size: 30px;
  color: var(--sv2-gold);
  text-shadow: 0 1px 0 rgba(0,0,0,.6);
}
.ddh-sv2-case.is-bl .ddh-sv2-case-head h2 { color: #e8d9a8; }
.ddh-sv2-case-meta { color: #d8c4a4; font-size: 13px; font-weight: 600; }
.ddh-sv2-case-body { position: relative; }

/* A single wooden shelf board */
.ddh-sv2-row {
  position: relative;
  margin: 0 0 4px;
  padding: 0 6px 0;
}
.ddh-sv2-board {
  display: flex;
  align-items: flex-end;
  gap: 0;
  min-height: calc(var(--sv2-inch) * 8.2);
  padding: 8px 8px 0;
  overflow: hidden;
}
.ddh-sv2-lip {
  height: 14px;
  margin: 0 -8px;
  background:
    linear-gradient(180deg, #8a5a32 0%, #5a351c 40%, #3a2010 100%);
  box-shadow: 0 6px 10px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,160,.25);
  border-radius: 0 0 2px 2px;
}
.ddh-sv2-case.is-bl .ddh-sv2-lip {
  background: linear-gradient(180deg, #6a5420 0%, #2a2210 45%, #12100c 100%);
}
.ddh-sv2-row-cap {
  display: block;
  margin: 3px 10px 6px;
  max-width: 90%;
  padding: 0;
  background: transparent;
  color: #e6d2aa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dividers / bookends */
.ddh-sv2-div {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  align-self: stretch;
  width: 18px;
  margin: 0 3px;
  position: relative;
}
.ddh-sv2-div-bar {
  width: 8px;
  height: 72%;
  margin-top: auto;
  background: linear-gradient(90deg, #c4a36a, #8a6a32 50%, #c4a36a);
  border-radius: 1px 1px 0 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3);
}
.ddh-sv2-div[data-kind="author"] { width: 12px; margin: 0 1px; }
.ddh-sv2-div[data-kind="author"] .ddh-sv2-div-bar {
  width: 4px;
  height: 55%;
  background: #3a2214;
  box-shadow: inset 1px 0 0 rgba(255,255,255,.12);
}
.ddh-sv2-div-label {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f3e6c4;
  text-shadow: 0 1px 1px #000;
  pointer-events: none;
  max-height: 70%;
  overflow: hidden;
}
.ddh-sv2-end {
  flex: 0 0 22px;
  height: 70px;
  margin: 0 2px 0 4px;
  border-radius: 2px 2px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.35);
}
.ddh-sv2-end.is-read { background: #18a34a; }
.ddh-sv2-end.is-own { background: #7a1f2b; }
.ddh-sv2-end svg { width: 14px; height: 14px; display: block; }

/* ---- Spines ---- */
.ddh-sv2-spine {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--sw);
  height: var(--sh);
  margin: 0 0 0 -1px;
  padding: 10px 0 8px;
  border: 0;
  border-radius: 1px 1px 0 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.38) 0, rgba(255,255,255,.08) 14%, transparent 36%, transparent 70%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, var(--c2) 0 11px, var(--c1) 14px calc(100% - 16px), var(--c3) calc(100% - 14px));
  color: var(--ct, #f7f2e8);
  cursor: pointer;
  box-shadow: 1px 0 0 rgba(0,0,0,.35);
  font: inherit;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}
.ddh-sv2-spine[data-style="paper"]::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  width: 2px;
  bottom: 0;
  background: repeating-linear-gradient(180deg, #f4efe6 0 1px, #e6dccb 1px 2px);
  opacity: .85;
  pointer-events: none;
}
.ddh-sv2-spine[data-style="cloth"] {
  box-shadow: inset 0 0 0 1px rgba(255, 210, 111, .18), 1px 0 0 rgba(0,0,0,.4);
}
.ddh-sv2-spine:hover,
.ddh-sv2-spine:focus-visible,
.ddh-sv2-spine[aria-expanded="true"] {
  z-index: 4;
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,.35);
  outline: 2px solid var(--sv2-gold);
  outline-offset: 0;
}
@media (prefers-reduced-motion: reduce) {
  .ddh-sv2-spine:hover,
  .ddh-sv2-spine:focus-visible,
  .ddh-sv2-spine[aria-expanded="true"] { transform: none; }
}
.ddh-sv2-spine-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(10px, calc(var(--sw) * 0.62), 15px);
  line-height: 1.05;
  letter-spacing: .04em;
  max-height: 72%;
  overflow: hidden;
  padding: 4px 0;
  pointer-events: none;
}
.ddh-sv2-spine[data-narrow="1"] .ddh-sv2-spine-title {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: .02em;
}
.ddh-sv2-spine-author {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin-top: auto;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .85;
  max-height: 28%;
  overflow: hidden;
  pointer-events: none;
}
.ddh-sv2-spine-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 9px;
  background: linear-gradient(180deg, rgba(255,210,111,.7), rgba(180,140,50,.35));
  pointer-events: none;
}
.ddh-sv2-pips {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  pointer-events: none;
  z-index: 1;
}
.ddh-sv2-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.ddh-sv2-pip-read { background: #18a34a; }
.ddh-sv2-pip-want { background: #d4a017; }
.ddh-sv2-pip-own { background: #f0d0d4; }

/* ---- Instant book popover (not a native title tooltip) ---- */
.ddh-sv2-pop {
  position: fixed;
  z-index: 100020;
  width: min(340px, calc(100vw - 16px));
  padding: 12px;
  background: #fffdf8;
  color: var(--sv2-ink);
  border: 1px solid var(--sv2-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(26, 20, 16, .35);
  font-size: 14px;
  line-height: 1.4;
}
.ddh-sv2-pop[hidden] { display: none !important; }
.ddh-sv2-pop-grid {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.ddh-sv2-pop img {
  width: 92px;
  height: 138px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--sv2-line);
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.ddh-sv2-pop-fb {
  width: 92px;
  height: 138px;
  border-radius: 3px;
  background: linear-gradient(160deg, #2b2440, #7a1f2b);
  color: var(--sv2-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 13px;
}
.ddh-sv2-pop h3 {
  margin: 0 24px 6px 0;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.ddh-sv2-pop-sub { margin: 0 0 6px; color: var(--sv2-muted); font-size: 13px; }
.ddh-sv2-pop-status { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.ddh-sv2-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sv2-parch);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
}
.ddh-sv2-tag.is-read { background: #e7f6ec; color: #146c36; }
.ddh-sv2-tag.is-want { background: #f7efd4; color: #7a5a10; }
.ddh-sv2-tag.is-own { background: #f3e4e6; color: #7a1f2b; }
.ddh-sv2-pop-stock { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--sv2-green); }
.ddh-sv2-pop-stock.is-out { color: var(--sv2-muted); font-weight: 600; }
.ddh-sv2-pop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ddh-sv2-pop-actions .ddh-sv2-btn { padding: 8px 12px; font-size: 13px; }
.ddh-sv2-pop-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--sv2-muted);
  cursor: pointer;
}
.ddh-sv2-pop-close:focus-visible { outline: 2px solid var(--sv2-gold); }

/* ---- Mobile: wrap shelves naturally, no horizontal scroll ---- */
@media (max-width: 720px) {
  .ddh-sv2 { --sv2-inch: 24px; padding: 0 12px 48px; }
  .ddh-sv2-library { margin: 0 -12px; padding: 14px 8px 28px; }
  .ddh-sv2-case { margin-bottom: 22px; padding: 0 0 10px; border-width: 8px; }
  .ddh-sv2-case-body { overflow: visible; }
  .ddh-sv2-board { overflow: hidden; padding-left: 6px; padding-right: 6px; flex-wrap: nowrap; }
  .ddh-sv2-row-cap { display: none; }
  .ddh-sv2-count { margin-left: 0; width: 100%; }
}
@media (min-width: 721px) {
  .ddh-sv2-case-body { overflow: visible; }
}

/* Placeholder while a bookcase is off-screen */
.ddh-sv2-skel {
  height: 280px;
  margin: 0 8px 8px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 18px, transparent 18px 22px);
  border-radius: 2px;
  opacity: .4;
}


/* ========================================================================
   Full Dragon's Hoard page treatment (dark theme + Oak St interior).
   Applied on the standalone prototype (.ddh-sv2-page) and, once wired,
   on the live shelf page (.ddh-shelf-page / body.ddh-page.ddh-shelf-page).
   Background URLs come from --ddh-sv2-bg and --ddh-sv2-bg-mobile so the
   plugin can point at the WordPress media files.
   ======================================================================== */
:root {
  --ddh-sv2-bg: url("https://dragonsdenbooks.com/wp-content/uploads/2026/11/hoard-bg-oak-1920.webp");
  --ddh-sv2-bg-mobile: url("https://dragonsdenbooks.com/wp-content/uploads/2026/11/hoard-bg-oak-900.webp");
}

.ddh-sv2-page,
body.ddh-shelf-page {
  min-height: 100vh;
  background: #120c09;
  color: #f7f2e8;
}
.ddh-sv2-page { margin: 0; }
.ddh-sv2-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #120c09;
  background-image:
    linear-gradient(180deg, rgba(18,12,9,.72) 0%, rgba(18,12,9,.52) 38%, rgba(18,12,9,.7) 100%),
    var(--ddh-sv2-bg);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
@media (max-width: 720px) {
  .ddh-sv2-bg {
    background-image:
      linear-gradient(180deg, rgba(18,12,9,.74) 0%, rgba(18,12,9,.56) 50%, rgba(18,12,9,.75) 100%),
      var(--ddh-sv2-bg-mobile);
  }
}
/* Live WordPress wrapper: same photo treatment behind #main-content. */
body.ddh-shelf-page #main-content,
body.ddh-shelf-page #main-content.ddh-main,
.ddh-shelf-page #main-content {
  background: transparent !important;
  position: relative;
  z-index: 1;
}
body.ddh-shelf-page #main-content::before,
.ddh-sv2-page .ddh-sv2-bg { /* ::before is added by PHP as .ddh-sv2-bg */ }

.ddh-sv2-page > *:not(.ddh-sv2-bg),
body.ddh-shelf-page #main-content > * { position: relative; z-index: 1; }

/* Slim Hoard-style top bar (prototype chrome; live site keeps the Divi bar). */
.ddh-sv2-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 24px;
  background: rgba(18,12,9,.72);
  border-bottom: 1px solid rgba(255,210,111,.28);
  color: #f7f2e8;
  font-size: 14px;
}
.ddh-sv2-top-brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--sv2-gold, #ffd26f);
  text-decoration: none;
}
.ddh-sv2-top-brand:hover { color: #fff8e0; text-decoration: none; }
.ddh-sv2-top-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ddh-sv2-top-links a {
  color: #f7f2e8;
  font-weight: 700;
  text-decoration: none;
}
.ddh-sv2-top-links a:hover { color: var(--sv2-gold, #ffd26f); text-decoration: none; }
.ddh-sv2-top-who { color: #d8cbb8; }

/* Hero — same treatment as .ddh-hub-hero on the Hoard hub. */
.ddh-sv2 .ddh-sv2-hero,
.ddh-sv2-hero {
  position: relative;
  text-align: center;
  margin: 0 -20px 18px;
  padding: 36px 28px 28px;
  background: transparent;
  border-radius: 0 0 12px 12px;
  border-bottom: 4px solid var(--sv2-gold, #ffd26f);
  color: #f7f2e8;
  overflow: hidden;
}
.ddh-sv2-hero h1 { color: var(--sv2-gold, #ffd26f) !important; margin: 4px 0 10px; }
.ddh-sv2-hero .ddh-sv2-lede,
.ddh-sv2-hero .ddh-hero-lede {
  margin: 0 auto 10px;
  max-width: 680px;
  color: #f7f2e8;
  font-size: 16px;
}
.ddh-sv2-hero .ddh-sv2-note { color: #d8cbb8; }
.ddh-sv2-hero .ddh-sv2-who { color: #e8dcc8; }
.ddh-sv2-hero .ddh-sv2-who a { color: var(--sv2-gold, #ffd26f); font-weight: 700; }

/* Tabs and filters on the dark photo: gold-rimmed pills, like the Books to Get control. */
.ddh-sv2-tabs {
  border-bottom-color: rgba(255,210,111,.28);
}
.ddh-sv2-tab,
.ddh-sv2-chip,
.ddh-sv2-owned {
  background: rgba(18,12,9,.55);
  color: var(--sv2-gold, #ffd26f);
  border-color: var(--sv2-gold, #ffd26f);
}
.ddh-sv2-tab:hover,
.ddh-sv2-chip:hover,
.ddh-sv2-owned:hover {
  background: rgba(255,210,111,.14);
  border-color: var(--sv2-gold, #ffd26f);
}
.ddh-sv2-tab[aria-selected="true"],
.ddh-sv2-chip[aria-pressed="true"] {
  background: var(--sv2-gold, #ffd26f);
  color: var(--sv2-head, #1a1410);
  border-color: var(--sv2-gold, #ffd26f);
}
.ddh-sv2-owned[aria-pressed="true"] {
  background: #7a1f2b;
  color: #fffdf7;
  border-color: #ffd26f;
}
.ddh-sv2-count { color: #d8cbb8; }

/* Panels and forms sit on parchment cards, same as Hoard result / magazine cards. */
.ddh-sv2-panel {
  padding: 8px 0 24px;
}
.ddh-sv2-form,
.ddh-sv2-card {
  background: var(--sv2-parch, #f7f2e8);
  color: var(--sv2-ink, #2a2420);
  border: 1px solid var(--sv2-line, #e6dccb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(26,20,16,.18);
}
.ddh-sv2-card { margin: 0 0 18px; padding: 18px 20px; max-width: 640px; }
.ddh-sv2-card h2, .ddh-sv2-form h3, .ddh-sv2-card h3 { color: var(--sv2-head, #1a1410); }
.ddh-sv2-card p, .ddh-sv2-card li, .ddh-sv2-card .ddh-sv2-lede { color: var(--sv2-ink, #2a2420); }
.ddh-sv2-steps { margin: 12px 0 16px; padding: 0; list-style: none; }
.ddh-sv2-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr);
  gap: 10px;
  align-items: start;
  margin: 0 0 12px;
  color: var(--sv2-ink, #2a2420);
  font-size: 15px;
}
.ddh-sv2-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sv2-red, #7a1f2b);
  color: #fffdf7;
  font-weight: 700;
  font-size: 14px;
}
.ddh-sv2-guide-fig {
  margin: 12px 0 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--sv2-line, #e6dccb);
  border-radius: 8px;
}
.ddh-sv2-guide-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #eee;
}
.ddh-sv2-guide-fig figcaption { margin: 6px 0 0; font-size: 13px; color: var(--sv2-muted, #6b5e52); }
.ddh-sv2-privacy, .ddh-sv2-privacy a { color: #d8cbb8; }
.ddh-sv2-privacy a:hover { color: var(--sv2-gold, #ffd26f); }

/* Instant tooltip (same skin as the rest of the Hoard). */
.ddh-tooltip {
  position: fixed;
  z-index: 100000;
  max-width: min(260px, calc(100vw - 16px));
  padding: 8px 12px;
  background: #1a1410;
  color: #f7f2e8;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  pointer-events: none;
}
.ddh-tooltip[hidden] { display: none !important; }
.ddh-tooltip:after {
  content: "";
  position: absolute;
  left: var(--ddh-tip-arrow, 50%);
  width: 0;
  height: 0;
  border: 6px solid transparent;
  transform: translateX(-50%);
}
.ddh-tooltip[data-place="above"]:after { top: 100%; border-top-color: #1a1410; }
.ddh-tooltip[data-place="below"]:after { bottom: 100%; border-bottom-color: #1a1410; }

@media (max-width: 720px) {
  .ddh-sv2-hero { margin: 0 -12px 14px; padding: 24px 16px 20px; }
  .ddh-sv2-hero h1 { font-size: 32px; }
  .ddh-sv2-top { padding: 10px 14px; }
  .ddh-sv2-library { margin: 0 -12px; padding: 8px 0 28px; }
}

.ddh-sv2 a, .ddh-sv2-hero a, .ddh-sv2-top a { color: var(--sv2-gold, #ffd26f); }
.ddh-sv2 a:hover, .ddh-sv2-top a:hover { color: #fff4c8; }


/* Quest bar + Goodreads card inside the visual shelf (1.2.45). */
.ddh-sv2-hero .ddh-quest-bar{margin:18px 0 0;max-width:52rem}
.ddh-sv2-import .ddh-gr-card{margin:0;background:var(--sv2-parch, var(--ddh-parch, #f4ead3));color:var(--sv2-ink, var(--ddh-ink, #2a2218))}
.ddh-acct-guest.ddh-sv2-hero{position:relative;z-index:1;max-width:40rem;padding:28px 0 48px}
.ddh-acct-guest.ddh-sv2-hero .ddh-acct-form,
.ddh-acct-guest.ddh-sv2-hero .ddh-gr-card{background:var(--sv2-parch, var(--ddh-parch, #f4ead3));color:var(--sv2-ink, var(--ddh-ink, #2a2218));padding:16px;border-radius:14px}

/* Genre start marker inside a packed shelf */
.ddh-sv2-genre-mark {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  align-self: stretch;
  width: 22px;
  margin: 0 4px 0 2px;
  position: relative;
}
.ddh-sv2-genre-mark-lab {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f3e6c4;
  text-shadow: 0 1px 1px #000;
  background: rgba(26, 14, 8, .55);
  border: 1px solid rgba(201, 162, 39, .45);
  border-radius: 3px;
  padding: 6px 3px;
  max-height: 85%;
  overflow: hidden;
  pointer-events: none;
}

/* Spine face: colored block now; background-image when spine_url is present */
.ddh-sv2-spine-face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: transparent;
  /* 100% 100% so a pre-rendered or photographed spine is not cropped. */
  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}
.ddh-sv2-spine.has-img {
  background: #1a1410;
}
.ddh-sv2-spine.has-img .ddh-sv2-spine-title,
.ddh-sv2-spine.has-img .ddh-sv2-spine-author,
.ddh-sv2-spine.has-img .ddh-sv2-spine-band,
.ddh-sv2-spine.has-img::after { display: none; }
.ddh-sv2-spine > *:not(.ddh-sv2-spine-face) { position: relative; z-index: 1; }

/* Compact hover tip: title, author, status. Never captures the pointer. */
.ddh-sv2-tip,
.ddh-sv2-page > .ddh-sv2-tip,
body.ddh-shelf-page > .ddh-sv2-tip {
  position: fixed !important;
  z-index: 100025 !important;
  box-sizing: border-box;
  max-width: 220px;
  width: 220px;
  padding: 7px 10px 8px;
  background: #1a1410;
  color: #f7f2e8;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.45);
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
}
.ddh-sv2-tip[hidden] { display: none !important; }
.ddh-sv2-tip-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff8e8;
}
.ddh-sv2-tip-author { margin: 2px 0 0; color: #d8cbb8; font-size: 12px; }
.ddh-sv2-tip-status { margin: 4px 0 0; color: var(--sv2-gold, #e4c56a); font-size: 11px; font-weight: 700; }
.ddh-sv2-tip:after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  transform: translateX(-50%);
}
.ddh-sv2-tip[data-place="above"]:after { top: 100%; border-top-color: #1a1410; }
.ddh-sv2-tip[data-place="below"]:after { bottom: 100%; border-bottom-color: #1a1410; }

/* Click popover stays for actions; keep it from covering a whole shelf row. */
.ddh-sv2-pop { max-width: min(280px, calc(100vw - 16px)); width: auto; }
.ddh-sv2-page > .ddh-sv2-pop,
body.ddh-shelf-page > .ddh-sv2-pop {
  position: fixed !important;
  z-index: 100020 !important;
}


.ddh-sv2-row.is-lazy { min-height: 120px; }
.ddh-sv2-row.is-lazy .ddh-sv2-skel { height: 110px; margin: 0; }

/* Books to Get explainer on the shelf */
.ddh-sv2 .ddh-pile-strip,
.ddh-sv2 .ddh-pile-explainer { margin: 0 0 16px; }
.ddh-sv2-want-all { margin: 12px 0 16px; }

/* v1.2.51: signed-out shelf text on the dark Oak St background.
   Headings, ledes, helper text and links that sit on the photo (not inside
   parchment form cards) use cream or gold so they meet WCAG AA 4.5:1. */
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero{
  color:#f7f2e8;
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > .ddh-kicker{
  color:var(--sv2-gold,#ffd26f);
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > h1{
  color:var(--sv2-gold,#ffd26f);
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > h2{
  color:#fffdf7;
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > .ddh-lede,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > .ddh-acct-google-off{
  color:#f7f2e8;
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > .ddh-acct-privacy,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > .ddh-acct-privacy a{
  color:#f7f2e8;
  font-weight:700;
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > .ddh-acct-privacy a:hover,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > .ddh-acct-privacy a:focus-visible{
  color:#fff4c8;
  text-decoration:underline;
}
/* Parchment cards keep dark ink so labels and helper text stay readable there. */
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-acct-form,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-gr-card{
  color:var(--sv2-ink, var(--ddh-ink, #2a2420));
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-acct-form .ddh-lede,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-gr-card .ddh-lede,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-gr-card h2,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-acct-form label,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-hold-field span{
  color:var(--sv2-ink, var(--ddh-ink, #2a2420));
}
/* Default status flashes without a success/error skin sit on the dark page. */
body.ddh-shelf-page .ddh-acct-flash:not(.is-ok):not(.is-err){
  background:rgba(18,12,9,.72);
  color:#f7f2e8;
  border:1px solid rgba(255,210,111,.35);
}

/* Center the Sign in with Google / Sign in button under the Sign in heading. */
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-acct-signin-actions{
  display:flex;
  justify-content:center;
  margin:0 0 24px;
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero .ddh-acct-signin-actions form.ddh-acct-google{
  margin:0;
}
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > form.ddh-acct-google,
body.ddh-shelf-page .ddh-acct-guest.ddh-sv2-hero > .ddh-btn{
  display:flex;
  justify-content:center;
  width:fit-content;
  margin-left:auto;
  margin-right:auto;
}

