/* A4帳票の共通安全設定。各帳票固有CSSより後に読み込む。 */
.report-top small,
.corrective-report header small { display: none; }

@media print {
  @page { size: A4 portrait; margin: 0; }

  html,
  body {
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.print-layout-active {
    min-width: 210mm !important;
    overflow: visible !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.print-layout-active > #mobileBottomNav,
  body.print-layout-active > .mobile-bottom-nav,
  body.print-layout-active #toast,
  body.print-layout-active .paper-controls,
  body.print-layout-active .report-controls,
  body.print-layout-active .mobile-field-header,
  body.print-layout-active .mobile-detail-actions,
  body.print-layout-active .report-top small,
  body.print-layout-active .paper-head small,
  body.print-layout-active .corrective-report header small {
    display: none !important;
  }

  body.print-layout-active .paper,
  body.print-layout-active .report-sheet,
  body.print-layout-active .progress-paper {
    box-sizing: border-box !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.print-layout-active .billing-batch-paper {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 11mm 12mm 13mm !important;
  }

  body.print-layout-active .report-sheet {
    width: 210mm !important;
    max-width: none !important;
    min-height: 297mm;
    margin: 0 !important;
    padding: 12mm !important;
  }

  body.print-layout-active .report-section { break-inside: auto; }
  body.print-layout-active .report-section:not(.report-photo-section),
  body.print-layout-active .report-photo { break-inside: avoid; }
  body.print-layout-active .report-photo-section {
    break-before: page;
    page-break-before: always;
  }
  body.print-layout-active .report-photo-page {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.print-layout-active .report-photo-page:not(:last-child) {
    break-after: page;
    page-break-after: always;
  }

  body.print-layout-active .reform-paper {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 13mm 12mm 15mm !important;
  }

  body.progress-printing .progress-document { display: block !important; }
  body.progress-printing .progress-paper {
    position: relative;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 11mm 12mm 13mm !important;
    overflow: hidden;
  }
  body.progress-printing .progress-paper:not(:last-child) {
    break-after: page;
    page-break-after: always;
  }
  body.progress-printing .progress-paper:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  body.print-layout-active table thead { display: table-header-group; }
  body.print-layout-active table tr,
  body.print-layout-active figure,
  body.print-layout-active .formal-meta,
  body.print-layout-active .formal-total,
  body.print-layout-active .tax-box,
  body.print-layout-active .doc-footer-note,
  body.print-layout-active .report-sign,
  body.print-layout-active .progress-project,
  body.print-layout-active .progress-work-summary,
  body.print-layout-active .progress-note {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
