/* =========================
   Print base
========================= */
@media print {

  /* ブラウザの印刷用余白（対応ブラウザのみ） */
  @page {
    size: A4;
    /* A4 / Letter / など */
    margin: 12mm;
    /* 余白。紙面を広く使うなら 8〜10mm もあり */
  }

  /* 画面用UIを消す（例） */
  .no-print,
  nav,
  .site-header,
  .site-footer,
  .breadcrumb,
  .icon {
    display: none !important;
  }

  /* 印刷向けの基本調整 */
  html,
  body,
  body>* {
    background: #fff !important;
    color: #000 !important;
  }

  /* 印刷で崩れがちな色を安定させる（任意） */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* リンクは印刷で見えるように（任意：URL表示） */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 90%;
    word-break: break-all;
  }

  .webpage-header,
  .webpage-contents,
  .index-contents,
  .entry-header,
  .index-header {
    margin: 0;
    padding: 0;
  }

  /* コンテナ幅を紙面に合わせる */
  .container {
    width: auto !important;
    max-width: none !important;
  }

  /* フォントと行間（読みやすさ） */
  body {
    font-size: 10.5pt;
    line-height: 1.5;
  }

  h1 {
    font-size: 16pt;
    margin: 0 0 6mm;
  }

  h2 {
    font-size: 13pt !important;
    margin: 0 0 4mm !important;
  }

  h3 {
    font-size: 12pt !important;
    margin: 0 0 3mm !important;
  }

  /* 画像：はみ出し防止 */
  img,
  svg,
  video {
    max-width: 100% !important;
    height: auto !important;
  }

  /* =========================
     Page break controls
  ========================= */

  /* 見出し直後に改ページが来ないように */
  h1,
  h2,
  h3,
  h4 {
    break-after: avoid;
    page-break-after: avoid;
    background: #fff !important;
    color: #000 !important;
  }

  ul,
  ol {
    margin: 0 0 6mm !important;
  }

  /* =========================
     Tables (重要)
  ========================= */
  table {
    width: 100% !important;
    border-collapse: collapse;
  }

  th,
  td {
    border: 1px solid #999;
    padding: 2.5mm 3mm;
    vertical-align: top;
  }


}