/* ===== PAGED.JS PRINT SHELL ===== */
/* v1.0.0 — Parallel pipeline for picture book PDF export.           */
/* Does NOT re-layout content. .pb-page blocks are already designed  */
/* by picturebook-engine.js. paged.js provides: @page context,       */
/* page numbers, print dialog.                                       */
/* Does NOT affect web display. Only loaded by paged.js Previewer.   */

/* ── @page: A4 Landscape, zero margin (pb-page has internal margins) ── */
@page {
  size: A4 landscape;
  margin: 0;
}

/* ── Each .pb-page = one physical page, do NOT split ── */
.pb-page {
  break-before: page;
  break-after: page;
  break-inside: avoid;
}

.pb-cover {
  break-before: auto;
}

.pb-back-cover {
  break-after: auto;
}

/* ── Prevent internal splitting of designed blocks ── */
h2,
canvas,
img,
.pb-chart-placeholder {
  break-inside: avoid;
}

/* ── Text: allow widow/orphan control ── */
p {
  widows: 2;
  orphans: 2;
}

/* ── Print color fidelity ── */
.pb-page,
.pb-page * {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}