/* Book component (src/book.js). Theme via the custom properties below. */
.book {
  --book-duration: 320ms; /* read by book.js when a transition starts */

  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
:where(.book) { position: relative; } /* zero specificity: the host may position the root itself */
.book.is-dragging { cursor: grabbing; }
.book.is-waiting { cursor: progress; }

.book__stage { position: absolute; }

/* One slot = one spread (or one page on phones), filled by the host with a single canvas sized
   exactly to the slot, so it fades as one texture. No background: nothing can show through at
   the join. Slots keep their own compositor layer for life and neighbours are only made
   invisible (never display:none), so a turn never starts or ends with a re-raster flash. */
.book-slot {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden; /* clips the canvas' sub-pixel overhang row (it is drawn 1:1, never scaled) */
  will-change: opacity;
}
.book-slot[hidden] { display: block; visibility: hidden; }
