.book-preview + .book-preview {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.book-preview h2 {
  margin: 0 0 1.25rem;
  color: #604230;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
}

.book-intro {
  max-width: 65ch;
  margin: 0 0 .75rem;
}

.book-spec {
  max-width: 65ch;
  margin: 0 0 1.25rem;
  color: var(--button-red);
  font-size: .875rem;
}

.book-viewer {
  width: min(100%, 62rem);
}

.book-stage {
  display: grid;
  align-items: center;
  justify-items: start;
  aspect-ratio: 4 / 3;
  touch-action: pan-y pinch-zoom;
}

.book-viewer-square .book-stage { aspect-ratio: 2 / 1; }
.book-viewer-single .book-stage { aspect-ratio: 1800 / 1273; }
.book-viewer-single.book-viewer-landscape .book-stage { aspect-ratio: 3 / 2; }

.book-stage figure {
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 .5rem 1.5rem rgb(23 23 20 / 12%);
}

.book-stage .book-cover { width: 50%; }
.book-viewer-single .book-stage .book-cover { width: 100%; }
.book-stage img { width: 100%; }

.book-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem clamp(.45rem, 2vw, 1.35rem);
  margin-top: 1rem;
}

@media (min-width: 761px) {
  .book-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .book-controls button {
    width: min(100%, 8rem);
  }

  .book-controls [data-book-previous] { justify-self: end; }
  .book-controls [data-book-next] { justify-self: start; }
}

@media (min-width: 601px) {
  .book-viewer:not(.book-viewer-single):has(.book-cover:not([hidden])) :is(.book-controls, .book-purchase) { width: 50%; }
}

.book-controls[hidden] { display: none; }
.book-controls button {
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.book-controls button:not([aria-disabled="true"]):hover { color: var(--accent); }
.book-controls button[aria-disabled="true"] { color: var(--muted); cursor: default; }

.book-position {
  min-width: 12ch;
  text-align: center;
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .book-preview h2, .book-intro, .book-spec { text-align: center; }
  .book-viewer { max-width: 22rem; margin-inline: auto; }
  .book-stage { aspect-ratio: 2 / 3; }
  .book-viewer-square .book-stage { aspect-ratio: 1; }
  .book-stage .book-cover { width: 100%; }
  .book-viewer:not(.book-viewer-single) .book-stage figure:not(.book-cover) img { width: 200%; max-width: none; }
  .book-stage figure[data-side="right"] img { transform: translateX(-50%); }
}

.book-purchase {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0 0;
}
