/* Native HTML/CSS product scene. Cover and page artwork are the actual book exports. */
/* Book I now uses its actual 6 x 9 inch, 80-puzzle front cover. */
body.home-page #books .showcase-book,
body .chooser .chooser-cover img[src*="book-01-city-full-of-secrets-cover.webp"] {
  aspect-ratio: 2 / 3;
}
.physical-book-scene {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1.43;
  margin: 0 auto;
  overflow: visible;
  perspective: 1400px;
  perspective-origin: 50% 35%;
}
.physical-book-scene *,
.physical-book-scene *::before,
.physical-book-scene *::after { box-sizing: border-box; }
.physical-book-scene img { display: block; width: 100%; height: 100%; margin: 0; }
.physical-book-light {
  position: absolute;
  z-index: -3;
  inset: -7% -2% -3%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 45% 44%, #fff5caab 0%, #fff5ca45 35%, #e4d1ef33 55%, transparent 73%);
  pointer-events: none;
}
.physical-book-surface {
  position: absolute;
  z-index: -2;
  left: 7%;
  right: 3%;
  bottom: 5%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #3825443b, #38254416 42%, transparent 72%);
  filter: blur(9px);
  transform: rotate(-2deg);
  pointer-events: none;
}

/* The open volume sits further back and rests on a visible block of leaves. */
.physical-spread {
  position: absolute;
  z-index: 1;
  width: 59.5%;
  aspect-ratio: 1.4;
  top: 30%;
  left: 36%;
  display: flex;
  transform: rotate(9deg) rotateX(8deg) rotateY(-8deg);
  transform-style: preserve-3d;
  border-radius: 1px 7px 7px 2px;
  background: #e9d5b1;
  box-shadow: 1px 5px 2px #4f3c2d18, 7px 15px 16px #38254423, 15px 24px 28px #38254419;
}
.physical-spread-block {
  position: absolute;
  z-index: -1;
  inset: 0 -0.6% -3.1% 0;
  border: 1px solid #bba17d;
  border-radius: 2px 7px 6px 2px;
  background: repeating-linear-gradient(0deg, #c9b592 0px, #c9b592 1px, #f5e7c8 1px, #f5e7c8 2.5px);
  box-shadow: 0 2px 0 #9b845f;
}
.physical-spread-leaf {
  position: relative;
  width: 50%;
  height: 100%;
  overflow: hidden;
  background: #fffcf1;
  border: 1px solid #d9c5a2;
}
.physical-spread-leaf img { object-fit: fill; }
.physical-spread-leaf-left {
  border-radius: 5px 1px 0 5px;
  transform-origin: right center;
  transform: rotateY(5deg);
  box-shadow: inset -9px 0 9px #5b413917;
}
.physical-spread-leaf-right {
  border-left: 0;
  border-radius: 1px 6px 6px 0;
  transform-origin: left center;
  transform: rotateY(-5deg);
}
.physical-spread-leaf::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 65%, #624b3c08 85%, #624b3c22 100%);
}
.physical-spread-leaf-right::after { background: linear-gradient(90deg, #624b3c27, #624b3c08 12%, transparent 30%, #fff7dc1a); }
.physical-spread-crease {
  position: absolute;
  z-index: 2;
  left: 49.5%;
  top: 0;
  height: 100%;
  width: 1.2%;
  background: linear-gradient(90deg, #8b74553d, #6e543d55 48%, #fffbed75 64%, transparent);
  pointer-events: none;
}

/* Front cover, softly rounded spine and cream page block form a single solid book. */
.physical-closed-book {
  position: absolute;
  z-index: 3;
  left: 10.5%;
  top: 10.5%;
  width: 35.7%;
  aspect-ratio: 700 / 1050;
  transform: rotate(-11deg) rotateY(-15deg) rotateX(4deg);
  transform-style: preserve-3d;
  filter: drop-shadow(7px 13px 9px #29163830);
}
.physical-book-back {
  position: absolute;
  z-index: -3;
  inset: 0 -3.8% -2.9% 1%;
  border-radius: 4px 4px 6px 4px;
  background: #024a42;
  box-shadow: 1px 2px 1px #002c2b;
}
.physical-book-pages {
  position: absolute;
  z-index: -2;
  inset: 1.3% -2.3% -2.1% 2%;
  border: 1px solid #bdad8f;
  border-radius: 1px 4px 5px 1px;
  background: repeating-linear-gradient(0deg, #caba9d 0px, #caba9d 0.7px, #fff5df 0.7px, #fff5df 2px);
  box-shadow: inset -2px 0 2px #ad997b55, inset 0 -2px 1px #d4c4a5;
}
.physical-book-spine {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: -3.5%;
  width: 6.3%;
  border-radius: 6px 0 0 5px;
  background: linear-gradient(90deg, #023c38 0%, #087169 26%, #118278 50%, #035950 83%, #033f3b 100%);
  box-shadow: inset 1px 0 1px #abede344, -1px 0 1px #023730;
  transform: translateZ(1px);
  pointer-events: none;
}
.physical-book-front {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 2px 4px 4px 2px;
  background: #056d63;
  box-shadow: inset 0 0 0 1px #003e3470, 1px 2px 2px #1b362441;
}
.physical-book-front img { object-fit: fill; }
.physical-book-front::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #001f2826 0%, transparent 4%, #fff8de20 5.1%, transparent 7%, transparent 75%, #ffffff08 100%), linear-gradient(145deg, #fff9de19, transparent 48%, #001b2d0c);
  box-shadow: inset 0 1px 1px #ffffd54d, inset -1px 0 1px #001d3152;
  pointer-events: none;
}

@media (max-width: 600px) {
  .physical-book-scene { max-width: 490px; aspect-ratio: 1.38; }
  .physical-closed-book { top: 10%; left: 10%; width: 37%; }
  .physical-spread { width: 60%; left: 36%; top: 32%; }
  .physical-book-surface { bottom: 5%; }
}
@media (prefers-contrast: more) {
  .physical-spread-leaf { border-color: #8c775b; }
  .physical-book-front { outline: 1px solid #034b44; }
}
