/* The reading surface remains in normal flow. Safari can use the document
   canvas around the page even when it cannot paint individual rows there. */
.duo-reading-surface { display: contents; }
@media screen and (any-pointer: coarse) and (max-width: 64rem) {
  html, html body { background-color: #10100f; }
  .duo-reading-surface {
    display: flow-root;
    position: relative;
    min-height: calc(100vh - var(--journal-bar-height, 3.75rem));
    min-height: calc(100svh - var(--journal-bar-height, 3.75rem));
    background-color: var(--paper, #fff);
  }
  html.duo-rail-partial {
    direction: ltr;
    overflow-x: hidden;
  }
  html.duo-rail-partial, html.duo-rail-partial body { touch-action: pan-y pinch-zoom; }
  html.duo-rail-partial body { direction: var(--duo-text-direction); }
  html.duo-rail-left { direction: rtl; }
  .duo-rail-partial .duo-reading-surface::after, .duo-rail-cap {
    position: absolute;
    left: 100%;
    width: var(--duo-rail-width);
    pointer-events: none;
    user-select: none;
  }
  .duo-rail-partial .duo-reading-surface::after {
    content: "";
    top: 0;
    bottom: 0;
    background-color: var(--paper, #fff);
  }
  .duo-rail-cap { z-index: 7; }
  .duo-rail-left .duo-reading-surface::after, .duo-rail-left .duo-rail-cap {
    left: auto;
    right: 100%;
  }
}
/* Preserve the existing grid and scroll panes when a browser reports a hinge. */
@media screen and (horizontal-viewport-segments: 2), screen and (vertical-viewport-segments: 2) {
  html, html body { background-color: var(--paper, #fff); }
  .duo-reading-surface { display: contents; }
  .duo-reading-surface > :is(.site-header, .privacy-header) {
    grid-area: navigation; align-self: stretch; min-width: 0; min-height: 0;
    overflow: auto; overscroll-behavior: contain;
  }
}
@media print { .duo-rail-cap { display: none; } }
