@layer components {
  .book-hero__cover, [data-gallery-book] { position: relative; min-width: 0; }
  .book-hero__cover.book-3d--ready > img, [data-gallery-book].book-3d--ready > img { opacity: 0; pointer-events: none; }
  .book-3d { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-rows: minmax(0, 1fr); min-width: 0; }
  .book-3d__surface { min-width: 0; min-height: 15rem; cursor: grab; outline: none; touch-action: pan-y; }
  .book-3d.is-dragging .book-3d__surface { cursor: grabbing; }
  .book-3d__surface:focus-visible { outline: 2px solid var(--gold-dark, #9a7435); outline-offset: 3px; }
  .book-3d__canvas { display: block; width: 100%; height: 100%; }
}
@media (max-width: 760px) { .book-3d__surface { min-height: 12rem; } }
@media (prefers-reduced-motion: reduce) {
  .book-3d { display: none !important; }
  .book-hero__cover.book-3d--ready > img, [data-gallery-book].book-3d--ready > img { opacity: 1; }
}
