/* =========================================================
   print.css - 印刷 / PDF保存 用
   画面と同じ DOM をそのまま印刷します。
   「印刷用の別 HTML」は作りません（表示と印刷がズレる原因になるため）。
   ========================================================= */

@page {
  size: A4 portrait;
  margin: 14mm;
}

@media print {
  /* 背景色を確実に出す（ブラウザの「背景のグラフィック」設定に依存させない） */
  html,
  body {
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 画面用の UI はすべて隠す */
  .site-header,
  .site-footer,
  .toolbar,
  .editor,
  .mobile-bar,
  .toast,
  .no-print {
    display: none !important;
  }

  /* 書類だけを紙いっぱいに置く */
  .workspace {
    display: block !important;
    padding: 0 !important;
  }

  .preview {
    position: static !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .sheet {
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 10.5pt;
  }

  /* 表が途中で切れないようにする */
  .sheet__table thead {
    display: table-header-group;
  }

  .sheet__table tr,
  .sheet__totals,
  .sheet__notes {
    break-inside: avoid;
  }

  /* リンクの下線などは不要 */
  a {
    text-decoration: none;
    color: inherit;
  }
}
