/* print.css — print rules for the live app (body.cards-printing) and for print.html (body.print-mode).
 * js/layout/print.js appends the dynamic @page rules to THIS sheet through the CSSOM (no <style> tag
 * under the strict CSP); everything above that is static. */
@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  /* Live app: hide all chrome, keep only the sheets. */
  body.cards-printing .topbar, body.cards-printing .rail, body.cards-printing .rail-toggle,
  body.cards-printing .deck-tabs, body.cards-printing .modal-layer, body.cards-printing .toast-layer,
  body.cards-printing .preview-bar, body.cards-printing .editor-panel { display: none !important; }
  body.cards-printing > :not(#app) { display: none !important; }
  body.cards-printing #app, body.cards-printing .workspace, body.cards-printing .work, body.cards-printing .preview-wrap, body.cards-printing .preview {
    display: block !important; height: auto !important; overflow: visible !important; background: #fff !important; padding: 0 !important; margin: 0 !important; gap: 0 !important;
  }
  /* Force colour/graphics to print. */
  .dcc-page, .dcc-page *, .dcc-card, .dcc-card::before, .dcc-card::after {
    -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important;
  }
  /* 1:1, no preview scaling. */
  .dcc-page-frame { width: auto !important; height: auto !important; overflow: visible !important; --dcc-preview-scale: 1 !important; }
  .dcc-page-frame > .dcc-page { transform: none !important; }
  .dcc-page { box-shadow: none !important; margin: 0 !important; break-after: page !important; page-break-after: always !important; }
  .dcc-page-frame:last-child .dcc-page, body.print-mode .dcc-page:last-child { break-after: auto !important; page-break-after: auto !important; }
}
/* print.html is never shown to a person but may be opened to debug. */
body.print-mode { margin: 0; background: #fff; }
body.print-mode .dcc-page { margin: 0; }
