/* v5.3 — a single warm library spotlight, not an animated neon pulse. */
.shelf-grid[data-ryu-light="subtle"] {
  --ryu-other-book-dim: .89;
  --ryu-spotlight-opacity: .56;
  --ryu-spine-warmth: .15;
}
.shelf-grid[data-ryu-light="balanced"] {
  --ryu-other-book-dim: .84;
  --ryu-spotlight-opacity: .77;
  --ryu-spine-warmth: .23;
}
.shelf-grid[data-ryu-light="dramatic"] {
  --ryu-other-book-dim: .73;
  --ryu-spotlight-opacity: .97;
  --ryu-spine-warmth: .34;
}
.shelf-grid .bookcase-frame .book-slot {
  position: relative;
  overflow: visible;
}
/* No additional pointer targets: tapping even the light cone counts as empty shelf. */
.shelf-grid .bookcase-frame .book-slot::before {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 50%; top: -6px; bottom: 0;
  width: clamp(88px, 13vw, 132px);
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 60% 48% at 50% 88%, rgba(249, 209, 148, .27), transparent 100%),
    linear-gradient(180deg, rgba(255, 221, 154, .29), rgba(243, 201, 129, .10) 38%, rgba(255, 204, 136, 0) 95%);
  clip-path: polygon(43% 0,57% 0,100% 100%,0 100%);
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 0;
}
.shelf-grid .bookcase-frame.ryu-spotlight-active .book-slot.ryu-spotlight-slot {
  z-index: 7;
}
.shelf-grid .bookcase-frame.ryu-spotlight-active .book-slot.ryu-spotlight-slot::before {
  opacity: var(--ryu-spotlight-opacity);
}
/* A lit shelf follows the actual selected slot, not a fixed shelf-center lamp. */
.shelf-grid .bookcase-frame.ryu-spotlight-active .shelf-unit.ryu-shelf-lit {
  background:
    radial-gradient(ellipse at 50% 90%,rgba(200,157,104,.13),transparent 75%),
    repeating-linear-gradient(90deg,rgba(0,0,0,.015) 0 8px,rgba(255,255,255,.009) 8px 12px),
    linear-gradient(#211912,#32251b);
}
.shelf-grid .bookcase-frame .spine {
  position: relative;
  z-index: 1;
}
.shelf-grid .bookcase-frame.ryu-spotlight-active .spine:not(.pulled) {
  filter: brightness(var(--ryu-other-book-dim)) !important;
  transition: filter .35s ease, transform .32s cubic-bezier(.2,.75,.2,1), box-shadow .3s ease;
}
/* Transparent highlight overlay, drawn above the image without altering source pixels. */
.shelf-grid .bookcase-frame .spine .ryu-spotlight-face {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,rgba(255,226,167,.38),rgba(255,221,156,.08) 38%,transparent 77%);
  opacity: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity .35s ease;
}
.shelf-grid .bookcase-frame.ryu-spotlight-active .spine.pulled .ryu-spotlight-face {
  opacity: var(--ryu-spine-warmth);
}
/* Keep prior gold outline and pull-out; selection feedback is more than color. */
.shelf-grid .bookcase-frame.ryu-spotlight-active .spine.pulled {
  filter: brightness(1.075) !important;
}
@media(max-width:690px) {
  .shelf-grid .bookcase-frame .book-slot::before {width: 94px;}
  .shelf-grid .bookcase-frame.ryu-spotlight-active .spine:not(.pulled) { transition-duration: .28s; }
}
@media (prefers-reduced-motion: reduce) {
  .shelf-grid .bookcase-frame .book-slot::before,
  .shelf-grid .bookcase-frame .spine .ryu-spotlight-face,
  .shelf-grid .bookcase-frame.ryu-spotlight-active .spine:not(.pulled) { transition: none !important; }
}
