/* ============================================================
   print.css — 印刷 / PDF保存（A4縦・1セクション＝1ページ）
   印刷ダイアログ: 用紙 A4 ／ 向き 縦 ／ 余白 なし ／
   「背景のグラフィック」オン（黒ベタが出ないと意味が変わる）
   ============================================================ */

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

@media print {
  html, body { background: #fff !important; }
  .topbar, .progress, .ovf { display: none !important; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  .sheet { display: block; padding: 0; gap: 0; }

  .page {
    width: 210mm; height: 297mm;
    max-width: none; min-width: 0; aspect-ratio: auto; margin: 0;
    box-shadow: none !important; overflow: hidden;
    break-inside: avoid; break-after: page;
    page-break-inside: avoid; page-break-after: always;
  }
  .page:last-child { break-after: auto; page-break-after: auto; }

  .box, .note, .pos, .deco, .state, .tl .row, ol.steps > li,
  table.tbl tr, .ph, .plan, .org .oc, .flow .fs { break-inside: avoid; page-break-inside: avoid; }

  /* 黒ベタを確実に出す */
  .page.cover, .page.dark { background: #0b0b0b !important; }
  .state, .note.stop, .box.ink, .ptab, .deco .dh { background: #0b0b0b !important; color: #fff !important; }
  .page.dark .ptab { background: #fff !important; color: #0b0b0b !important; }
  table.tbl thead th { background: #0b0b0b !important; color: #fff !important; }
  table.tbl tbody th, .box.fill, .flow .fs, .pos .ph2, .gantt .bar.soft { background: #f3f3f4 !important; }
  table.tbl tr.hl td, table.tbl tr.hl th { background: #f3f3f4 !important; }
  table.tbl.zebra tbody tr:nth-child(even) td { background: #fafafa !important; }
  .flow .fs.on { background: #0b0b0b !important; color: #fff !important; }
  .tbc { background: #0b0b0b !important; color: #fff !important; }
  .page.dark .tbc { background: #fff !important; color: #0b0b0b !important; }
  .wait { background: #e4e5e7 !important; }
  .st.s2 { background: #f3f3f4 !important; }
  .st.s3 { background: #e4e5e7 !important; }
  .st.s4 { background: #a8a9ad !important; color: #fff !important; }
  .st.s5 { background: #5a5c60 !important; color: #fff !important; }
  .st.s6 { background: #0b0b0b !important; color: #fff !important; }
  .gantt .bar.solid { background: #0b0b0b !important; color: #fff !important; }
  .gantt .bar.mid { background: #a8a9ad !important; color: #fff !important; }
  .pin { background: #0b0b0b !important; color: #fff !important; }
  .pin.o { background: #fff !important; color: #0b0b0b !important; }
  .legend .li .n { background: #0b0b0b !important; color: #fff !important; }
  .legend .li.tbdrow .n { background: #fff !important; color: #0b0b0b !important; }
  ol.steps > li::before { background: #0b0b0b !important; color: #fff !important; }
  .ph .cap { background: #0b0b0b !important; color: #fff !important; }
  .org .oc.top { background: #0b0b0b !important; color: #fff !important; }
  ul.checks > li::before { background: #fff !important; }

  a[href]::after { content: "" !important; }
  a { color: inherit !important; text-decoration: none !important; }
}

@media print {
  .page.cover .tbc { background: #fff !important; color: #0b0b0b !important; }
}
