/* hwp2pdf: page-specific styles (screen + print) */
.drop { margin-top: .75rem; padding: 1.25rem; text-align: center; color: var(--muted); font-size: .9rem; border: 2px dashed var(--line); border-radius: 8px; }
.drop.over { border-color: var(--accent); color: var(--accent); }
.pages { display: grid; gap: 1rem; justify-items: center; }
.pg { background: #fff; border: 1px solid var(--line); border-radius: 4px; width: 100%; max-width: 794px; overflow: hidden; }
.pg.land { max-width: 1123px; }
.pg svg { display: block; width: 100%; height: auto; }
.pg-no { font-size: .75rem; color: var(--muted); text-align: center; margin: .25rem 0 0; }
.pgwrap { width: 100%; display: flex; flex-direction: column; align-items: center; }
.pgwrap .pg + .pg-no { margin-top: .35rem; }

/* Fallback page size; per-size named @page rules are added from app.js (CSSOM). */
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; margin: 0; padding: 0; display: block; }
  .site-header, .site-footer, main > .panel:not(#pages-panel), #pages-panel h2, .pg-no { display: none !important; }
  main, #pages-panel, .pages, .pgwrap { display: block; margin: 0; padding: 0; border: 0; background: none; max-width: none; width: auto; min-height: 0; }
  .pg { border: 0; border-radius: 0; margin: 0; max-width: none; width: 210mm; height: 297mm; overflow: hidden; break-after: page; break-inside: avoid; }
  .pg.sized { width: var(--pw); height: var(--ph); }
  .pgwrap:last-child .pg { break-after: auto; }
  .pg svg { width: 100%; height: 100%; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
[hidden] { display: none !important; }
