/* Shared mobile A4 preview: fit the whole sheet, never pan horizontally. */
@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .preview,
  .preview-shell,
  .paper-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .paper-wrap {
    width: 100%;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    touch-action: pan-y;
  }

  .paper-wrap > .paper {
    max-width: none !important;
    transform-origin: top left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

@media print {
  .paper-wrap {
    height: auto !important;
    overflow: visible !important;
  }

  .paper-wrap > .paper {
    transform: none !important;
    margin: 0 !important;
  }
}
