/* ==============================
   print.css（ブラウザの印刷UIを尊重する版）
   - @page size / margin なし → Chromeの「向き」「倍率」UIが使えます
   - zoom / transform なし   → Chromeの「倍率」UIが使えます
   ============================== */
@media print {
  /* 画面の色・背景は極力再現（ユーザーが「背景のグラフィックを印刷」をONにすると効果的） */
  html, body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 固定/追従要素は重なり防止のため通常フローに戻す（UIは隠さない） */
  [style*="position:fixed"],
  [style*="position:sticky"],
  .site-header,
  .nav,
  .scroll-nav,
  .sticky,
  .fixed,
  .is-sticky {
    position: static !important;
    top: auto !important;
  }

  /* 途中分割の抑制（読みやすさ確保） */
  h1, h2, h3 { break-after: avoid-page; page-break-after: avoid; }
  p, ul, ol, dl, blockquote, pre,
  table, tr, th, td,
  img, svg, canvas,
  .card, .hero, .diagram-step {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* テーブル：各ページでヘッダー/フッター行を繰り返し */
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }

  /* 動画/音声/埋め込みは紙に出せないので隠す（必要なときは外してください） */
  video, audio, iframe { display: none !important; }

  /* アニメ・トランジションは停止（プレビュー安定化） */
  * { transition: none !important; animation: none !important; }

  /* ユーティリティ */
  .page-break  { break-before: page !important; page-break-before: always !important; }
  .avoid-break { break-inside: avoid !important; page-break-inside: avoid !important; }
}
