#book-slideshow {
  margin: 2rem 0;
}

.book-slide-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media only screen and (max-width: 768px) {
  .book-slide-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .book-slide-link:first-of-type {
    display: none;
  }
}

#book-slideshow figure {
  margin: 0;
  min-width: 0;
}

.book-slide-link {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 2100 / 3000;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.book-slide-error {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  text-align: center;
}

.book-slide-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  background: #fff;
}

.book-slide-image[hidden] {
  display: none;
}

.book-slide-outgoing {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#book-slideshow figcaption {
  grid-column: 1 / -1;
  min-height: 3em;
}

#book-slide-controls:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.book-slide-control-group {
  display: flex;
  gap: 1rem;
}

#book-slide-controls button {
  min-height: 44px;
  padding: 0.7rem 1.6rem;
  border: 1px solid #1f5a85;
  border-radius: 999px;
  background: #1f5a85;
  color: #fff;
  font: inherit;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
}

#book-slide-controls button:not([aria-disabled="true"]):hover {
  background: #174563;
  border-color: #174563;
}

#book-slide-controls button:not([aria-disabled="true"]):active {
  background: #0d344f;
  border-color: #0d344f;
}

#book-slide-controls button[aria-disabled="true"] {
  background: #e4ebf1;
  border-color: #e4ebf1;
  color: #526575;
  cursor: default;
}

#book-slideshow:focus-visible,
#book-slideshow a:focus-visible,
#book-slide-controls button:focus-visible {
  outline: 3px solid #1565c0;
  outline-offset: 3px;
}

#launch-week-sales {
  position: relative;
  height: 400px;
  margin: 2rem 0;
}
