/* Photo relief is shared by every public page and remains visible without motion. */
body :is(#mainContent, main) .image-depth {
  --image-depth: 12px;
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: min(100%, var(--image-max-width, 100%));
  min-width: 0;
  margin: 0 auto;
  padding: 10px 18px 18px 6px;
  perspective: 1400px;
  overflow: visible;
}
body :is(#mainContent, main) .image-depth-object {
  display: block;
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--image-rx, 2deg)) rotateY(var(--image-ry, -12deg));
  transition: transform .3s ease;
}
body :is(#mainContent, main) .image-depth-front {
  display: block;
  position: relative;
  transform: translateZ(calc(var(--image-depth) / 2));
  background: #f6efdf;
  outline: 1px solid #b69963;
  box-shadow: 10px 16px 24px #30271f30;
}
body :is(#mainContent, main) .image-depth-front > img {
  position: static !important;
  display: block !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  animation: none !important;
  filter: none !important;
  box-shadow: none !important;
  object-fit: contain !important;
  image-rendering: auto;
}
body :is(#mainContent, main) .image-depth-object::before,
body :is(#mainContent, main) .image-depth-object::after {
  content: '';
  position: absolute;
  pointer-events: none;
  background: linear-gradient(90deg, #80633b, #d7bc83 45%, #a88952);
}
body :is(#mainContent, main) .image-depth-object::after {
  top: 0;
  bottom: 0;
  left: 100%;
  width: var(--image-depth);
  transform-origin: left center;
  transform: translateZ(calc(var(--image-depth) / 2)) rotateY(90deg);
}
body :is(#mainContent, main) .image-depth-object::before {
  top: 100%;
  left: 0;
  right: 0;
  height: var(--image-depth);
  transform-origin: center top;
  transform: translateZ(calc(var(--image-depth) / 2)) rotateX(-90deg);
}
body :is(#mainContent, main) .image-depth--book { --image-depth: 20px; }
body :is(#mainContent, main) .image-depth--book .image-depth-object { --image-ry: -18deg; }
body :is(#mainContent, main) .image-depth--book .image-depth-object::after {
  background: repeating-linear-gradient(0deg, #e4dbc8 0 1px, #fffaf0 1px 3px);
  border-right: 2px solid #7e694e;
}
body :is(#mainContent, main) .image-depth--book .image-depth-front {
  outline-color: #a99c83;
}
body :is(#mainContent, main) .image-depth-front--crop > .catalogue-cover-crop {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  max-width: none;
  aspect-ratio: var(--image-ratio, var(--shot-ratio));
  box-shadow: none;
}
/* Covers stay within the existing reserved slot; captions remain outside the volume. */
body :is(#mainContent, main) .catalogue-cover { overflow: visible; }
body :is(#mainContent, main) .catalogue-cover > .image-depth {
  --image-slot-height: 390px;
  max-width: min(100%, var(--image-max-width, 100%), calc((var(--image-slot-height) - 28px) * var(--image-ratio, .667) + 24px));
  flex-shrink: 1;
}
body :is(#mainContent, main) .book-detail-grid > .catalogue-cover > .image-depth { --image-slot-height: 580px; }
body :is(#mainContent, main) .manga-cover-grid .catalogue-cover > .image-depth { --image-slot-height: 380px; }
body :is(#mainContent, main) .audio-hero-cover > .image-depth { padding: 4px 12px 10px 4px; }
body :is(#mainContent, main) .book-author-strip > .image-depth { max-width: 344px; }
/* Keep the restored opening collage, and give its frames a visible resting angle. */
body :is(#mainContent, main) .photo-object:not(.is-manual) {
  animation: none !important;
  transform: rotateX(2deg) rotateY(-10deg) !important;
  will-change: auto;
}
body :is(#mainContent, main) .photo-object.is-pointing {
  transform: rotateX(var(--photo-rx)) rotateY(calc(-10deg + var(--photo-ry))) !important;
}
body :is(#mainContent, main) .hero-composition .composition-main .photo-object { transform: rotateY(-3deg) !important; }
body :is(#mainContent, main) .photo-front img { filter: none; image-rendering: auto; }
body :is(#mainContent, main) :is(.book-solid,.release-solid,.audio-book-solid,.book-motion-object,.cover-book) {
  transform: rotateX(3deg) rotateY(-18deg) !important;
  transform-style: preserve-3d;
}
@media (max-width: 700px) {
  body :is(#mainContent, main) .catalogue-cover > .image-depth { --image-slot-height: 420px; }
  body :is(#mainContent, main) .book-detail-grid > .catalogue-cover > .image-depth { --image-slot-height: 440px; }
}
@media (max-width: 600px) {
  body :is(#mainContent, main) .book-author-strip > .image-depth { max-width: 284px; }
}
@media (max-width: 380px) {
  body :is(#mainContent, main) .catalogue-cover > .image-depth { --image-slot-height: 350px; }
}
@media (prefers-reduced-motion: reduce) {
  body :is(#mainContent, main) .image-depth-object { transition: none; }
}
