/* Keep numbers centered on the actual sheet, clear of the paper edge and text. */
.reader-v2 .book-spread > :is(.left-leaf,.right-leaf) {
  --folio-offset: 0px;
  --folio-inset: calc(11.5cqh + 8px);
}
@media (max-width:700px), (max-height:500px) and (pointer:coarse) {
  #living:not(.opening-volume):has(.reader-v2[data-mode="paged"]:not([hidden])) {
    padding-top: calc(var(--shared-top) + var(--reader-compass-size) + 4px);
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .reader-v2[data-mode="paged"] .book-spread {
    margin-bottom: 4px;
  }
}
@media (min-width:701px) and (max-height:500px) and (pointer:coarse) { .reader-v2[data-mode="paged"] .book-spread { margin-bottom: 12px; } }

/* Open below the tallest header control so the menu cannot steal compass taps. */
@media (max-width:700px), (pointer:coarse) {
  #living .reader-more-panel {
    inset-block-start: calc(max(100%, var(--reader-compass-size)) + 7px);
    max-height: calc(100dvh - var(--shared-top) - max(var(--shared-height), var(--reader-compass-size)) - 7px - max(8px, env(safe-area-inset-bottom, 0px)));
  }
}
