.page-grid .book-cover-pair {
  --book-cover-gap: clamp(30px, 3.2vw, 48px);
}

.page-grid .book-cover-pair > .cover {
  /* Match the 7:10 image frame used by the R50 book page. */
  aspect-ratio: 7 / 10;
}

.page-grid .book-cover-pair > .cover + .cover {
  margin-top: var(--book-cover-gap);
}

@media (min-width: 1021px) and (hover: hover) and (pointer: fine) {
  .page-grid .book-cover-pair {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: var(--book-cover-gap);
  }

  .page-grid .book-cover-pair > .cover {
    flex: none;
    margin-block: 0;
  }

  .page-grid .book-cover-pair > .cover + .cover {
    /* Use spare space in the existing row, which ends at the contact button. */
    margin-top: auto;
  }
}

/* Keep just the front cover in the phone layout, including landscape touch screens. */
@media (max-width: 640px),
       (max-width: 1020px) and (max-height: 640px) and (hover: none) and (pointer: coarse) {
  .page-grid .book-cover-pair > .cover + .cover {
    display: none;
  }
}
