.reader-notice {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html.js #book .spread[data-slug]:not(.is-active) {
  display: none;
}
#book .book-pages {
  position: relative;
}
.js #book .book-pages {
  touch-action: pan-y pinch-zoom;
}
html:not(.js) .reading-tools .pager {
  display: none;
}
.book-pages {
  scroll-margin-top: 12px;
}
#index-dialog {
  overscroll-behavior: contain;
}
#book-shell {
  position: relative;
}
#book-shell.reader-turning {
  transform-origin: 50% 78%;
  will-change: transform;
}
.reader-desk-shadow {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: auto 1.5% -30px;
  height: 39px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgb(31 39 49 / 35%),
    rgb(31 39 49 / 13%) 43%,
    transparent 73%
  );
}
.reader-grabbing,
.reader-grabbing * {
  cursor: grabbing !important;
  user-select: none;
}
/* Out-of-process embeds can consume the release over their surface. During
   an edge drag the curled print is already the visible face of this player. */
.reader-grabbing iframe {
  visibility: hidden;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .fold-edge:enabled {
    cursor: grab;
  }
}
@media (hover: hover) and (pointer: fine) and (min-width: 701px) {
  .js .book-pages > .spread.is-active:not(:has(.fold-edge)) > .leaf::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    width: min(28px, 2.7vw);
    opacity: 0;
    cursor: grab;
    background: linear-gradient(
        135deg,
        transparent 45%,
        #c9bfa2 50%,
        #f9f3e0 85%
      )
      right bottom / 16px 16px no-repeat;
  }
  .js .book-pages > .spread.is-active > .leaf.right::after {
    right: 0;
  }
  .js .book-pages > .spread.is-active > .leaf.left::after {
    left: 0;
    transform: scaleX(-1);
  }
  .js
    .book-pages
    > .spread.is-active:not(:has(.fold-edge))
    > .leaf:hover::after {
    opacity: 0.8;
  }
  .js .book-pages > .spread:first-of-type > .leaf.left::after,
  .js .book-pages > .spread:last-of-type > .leaf.right::after {
    display: none;
  }
}

/* Temporary page faces stay outside keyboard and screen-reader navigation. */
.turn-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  perspective: 1750px;
  perspective-origin: var(--curl-origin) 49%;
  pointer-events: none;
}
.turn-still, .turn-under, .turn-surface, .turn-band, .turn-face { position: absolute; }
.turn-still, .turn-under { background: var(--paper, #fffcf3); }
.turn-under { z-index: 0; }
.turn-still { z-index: 1; }
.turn-surface {
  z-index: 2;
  inset: 0;
  transform-style: preserve-3d;
}
.turn-band {
  transform-style: preserve-3d;
  will-change: transform;
}
.turn-face {
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--paper, #fffcf3);
}
.turn-front { transform: translateZ(.06px); }
.turn-reverse { transform: rotateY(180deg) translateZ(.06px); }
.turn-crop { position: absolute; top: 0; }
#book .turn-layout { display: block; width: 100%; height: 100%; margin: 0; min-height: 0; background: transparent; }
#book .turn-layout > .leaf { width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; }
.turn-surface-light {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #493e2d, transparent);
  opacity: 0;
}
.turn-forward .turn-front .light-outer, .turn-forward .turn-reverse .light-inner,
.turn-back .turn-front .light-inner, .turn-back .turn-reverse .light-outer { transform: scaleX(-1); }
.turn-spine {
  position: absolute; z-index: 1; top: 0; bottom: 0; width: clamp(28px, 3.4vw, 50px);
  background: linear-gradient(90deg, transparent, #52483316 15%, #3c3b4538 39%,
    #322d3264 48%, #f9f2cc94 52%, #8f7c5740 60%, transparent 94%);
  animation: reader-spine 690ms ease-in-out both;
}
/* The two fore-edge glints use the same clock as the curled sheet; holding the
   paper still holds the specular line in place on both sides of the page. */
.turn-edge-glint {
  position: absolute; top: 0; bottom: 0; right: 0; width: 4px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #fffdf1 47%, #d9b878 71%, #9b814d 100%);
  animation: reader-edge-glint 690ms linear both;
}
.turn-forward .turn-reverse .turn-edge-glint,
.turn-back .turn-front .turn-edge-glint { left: 0; right: auto; transform: scaleX(-1); }
.turn-compact .turn-edge-glint { animation-duration: 590ms; }
@keyframes reader-edge-glint {
  0%, 100% { opacity: 0; }
  18% { opacity: .22; }
  47% { opacity: .86; }
  65% { opacity: .64; }
  87% { opacity: .24; }
}
.turn-compact { overflow: visible; clip-path: inset(-72px -11px -72px -11px); perspective: 2200px; }
.turn-compact .turn-spine { animation-duration: 590ms; }
.turn-paper-back {
  background: #f5efdf;
}
.turn-paper-back .turn-crop { opacity: .085; }
.turn-paper-back .turn-mobile-copy { transform: scaleX(-1); }
#book .turn-mobile-copy { display: flex; flex-direction: column; height: 100%; width: 100%; margin: 0; }
[data-prev][aria-disabled="true"], [data-next][aria-disabled="true"] { cursor: default; }
@keyframes reader-spine {
  0%, 100% { opacity: 0; transform: translateX(-50%) scaleX(.55); }
  45% { opacity: .95; transform: translateX(-50%) scaleX(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .turn-layer {
    display: none;
  }
}
@media print {
  html.js #book .spread[data-slug][hidden] {
    display: block;
    break-before: page;
  }
  .turn-layer,
  .reader-notice {
    display: none;
  }
}
