@charset "utf-8";

/* ===========================================================
   print_base.css  （印刷専用 基本ルール・最終安定版）
   =========================================================== */

@media print {

  /* -----------------------------
     ページ設定（A4縦・横対応）
     ----------------------------- */
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

/* 横向き印刷対応（bodyに.landscapeが付いた場合） */
 /*    
  body.landscape {
    transform-origin: left top;
    transform: scale(0.93); /* 横印刷時に少し縮小（A4枠に確実に収まる） */
  }
 */
  /* -----------------------------
     基本初期化
     ----------------------------- */
  body {
    width: 100% !important;
    margin: 0 auto !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    transform-origin: top center;
  }

  /* ==========================================================
     端末別縮小倍率
     ==========================================================*/

/* これは各ページ側で管理すべきである
  body.pc { transform: scale(1.00); }
  body.ipad { transform: scale(0.92); }
  body.androidタブレット { transform: scale(0.90); }
  body.iphone, body.androidスマホ { transform: scale(0.80); } 
*/

  /* -----------------------------
     device別のtd文字サイズ調整
     ----------------------------- */
  body.pc td {
    font-size: 10pt !important; /* 14pt PCは標準（大きめ） */
    line-height: 1.4;  /* 1.4 */
  }

  body.ipad td {
    font-size: 10pt !important; /* 13pt iPadはやや小さめ */
    line-height: 1.35;
  }

  body.androidタブレット td {
    font-size: 12pt !important; /* 12pt Androidタブレット */
    line-height: 1.3;
  }

  body.iphone td,
  body.androidスマホ td {
    font-size: 11pt !important; /* 11pt スマホ系はやや縮小 */
    line-height: 1.25;
  }

  /* 見出しセルだけ大きくしたい場合 */
  body.pc td.header2,
  body.ipad td.header2,
  body.androidタブレット td.header2,
  body.iphone td.header2,
  body.androidスマホ td.header2 {
    font-weight: bold;
    font-size: 1.2em !important; /* 各基準に対する倍率 */
  }
    
  /* -----------------------------
     テーブル中央寄せ
     ----------------------------- */
  table {
    margin-left: auto !important;
    margin-right: auto !important;
    display: table !important;
    text-align: center;
  }

  .center-wrapper {
    width: fit-content;
    margin: 0 auto;
  }

  /* -----------------------------
     改ページ禁止
     ----------------------------- */
  .no-break, .no-break * {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .page-break {
    page-break-after: always;
  }

  /* -----------------------------
     不要要素の非表示
     ----------------------------- */
  .no-print, header, footer, nav,
  .btn, .button, .menu, .header, .footer,
  .ad, .ads {
    display: none !important;
  }

  /* -----------------------------
     ページ分割防止（表・画像）
     ----------------------------- */
  img, table, tr, td, div, section, article {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* -----------------------------
     画像・表サイズ調整
     ----------------------------- */
  img, table {
    max-height: 95vh !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
    margin: 0 auto;
  }

  .pic100, .pic90 {
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .pic100 { width: 100%; }
  .pic90  { width: 90%; }

  /* -----------------------------
     背景印刷は軽量化モード
     ----------------------------- */
  * {
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }
}

  /* 
@media print and (orientation: landscape) {
  @page {
    size: A4 landscape;
  }
}
 */