/* What comes out of the printer.
 * ---------------------------------------------------------------------------
 * The page on screen and the page on paper are the same element, so the count
 * in the sidebar is the count in the PDF. Nothing is re-laid out for print:
 * this file only strips the app away from around the paper.
 *
 * MIRRORED FILE. A byte-identical twin lives at
 *   MOFA/tools/screenwriter/print.css
 */

@page {
  size: letter portrait;
  /* The margins live on .page, in inches, where the paginator can see them. */
  margin: 0;
}

@media print {
  html, body {
    height: auto;
    overflow: visible;
    /* The cream is a screen colour. On paper it was a full-page fill on every
       sheet; the page colour is the paper's (task #135, 2026-08-25). */
    background: none;
  }

  .topbar, .sidebar, .editor-pane, .overlay, .hint { display: none !important; }

  #app {
    display: block;
    height: auto;
  }

  .workspace { display: block; }

  .preview-pane {
    display: block !important;
    overflow: visible;
    padding: 0;
    background: none;
  }

  /* Screen zoom must not reach the paper: 12pt Courier is the format. */
  .screenplay { zoom: 1; }

  .screenplay .page {
    width: 8.5in;
    min-height: 11in;
    height: 11in;
    margin: 0;
    box-shadow: none;
    background: none;
    color: #000;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
  }

  .screenplay .page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .screenplay .row.here { background: transparent; }

  /* A page break inside an element would undo the pagination that was just
     measured — every break in this document is one the paginator chose. */
  .screenplay .row, .screenplay .dual { break-inside: avoid; page-break-inside: avoid; }
}
