.album {
  isolation: isolate;
  --paper-rest: 2deg;
}

.album .snap {
  transform: rotate(var(--paper-rest));
  transform-origin: 50% 76%;
}

.album .paper-front {
  z-index: 2;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.paper-front img {
  -webkit-user-drag: none;
}

.album .paper-held {
  cursor: grabbing;
  box-shadow: 4px 14px 23px #4a281b32, 1px 2px 3px #4a281b24;
  will-change: transform;
}

.album .paper-back {
  position: absolute;
  z-index: 1;
  inset: 0 .3rem .3rem 0;
  pointer-events: none;
}

.paper-back figcaption {
  min-height: 2.75rem;
}

.album .stamp {
  z-index: 3;
}

/* The exiting print may cross the edge of a phone viewport. */
body:has(.paper-front) { overflow-x: clip; }

@media (max-width: 700px) {
  .album { --paper-rest: 1.6deg; }
}
