/* ============================================================
 * 印刷用スタイル
 * A4縦・1日ぶんで1ページに収まるようにする。
 * 入力欄・ボタン・ヘッダー等は印刷しない。
 * ============================================================ */

@page {
  size: A4 portrait;
  margin: 12mm 12mm 10mm;
}

@media print {
  html { font-size: 12.5px; }
  body { background: #fff; padding: 0; }

  .site-header,
  .site-nav,
  .notice-bar,
  .site-footer,
  .no-print,
  .btn,
  .btn-row,
  .swap-hint,
  .flash,
  .manual-check,
  #input-pane { display: none !important; }

  .wrap { max-width: none; padding: 0; margin: 0; }
  .layout { display: block; margin: 0; }

  #sheets { display: block; }

  .sheet {
    overflow: visible;
    border: none; border-radius: 0; padding: 0; margin: 0;
    page-break-after: always; break-after: page;
  }
  .sheet:last-child { page-break-after: auto; break-after: auto; }

  .sheet-head { border-bottom: 2px solid #000; }
  .sheet-title { font-size: 15pt; }
  .sheet-meta { color: #000; font-size: 10pt; }

  .front-mark { background: #ddd !important; margin: 4mm 0 2mm; }

  .bus {
    gap: 1.2mm;
    grid-template-columns: 30mm 30mm 14mm 30mm 30mm;
    grid-auto-rows: 13mm;
    justify-content: center;
  }

  .seat {
    min-height: 0; height: 100%; padding: 3.2mm .5mm .5mm;
    font-size: 7.6pt; line-height: 1.15;
    border: .25mm solid #666;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* 男女の印は右下すみ。ラベルと重ならないので、どの席でも読めます */
  .seat .seat-mark {
    right: .6mm; bottom: .2mm; font-size: 7.6pt;
    background: rgba(255, 255, 255, .8) !important; padding: 0 .3mm;
  }
  .seat.is-empty .seat-mark { background: none !important; }
  .row-no { font-size: 5.6pt; }

  .seat.g0 { background-color: #fff6cf !important; --stripe: #ffdf6e; }
  .seat.g1 { background-color: #e2effc !important; --stripe: #a9d2f7; }
  .seat.g2 { background-color: #fde8ed !important; --stripe: #ffbccb; }
  .seat.g3 { background-color: #e6f6e6 !important; --stripe: #b0e6b0; }
  .seat.g4 { background-color: #f0e8ff !important; --stripe: #d2bcfa; }
  .seat.g5 { background-color: #ffeedd !important; --stripe: #ffc994; }
  .seat.g6 { background-color: #ddf5f1 !important; --stripe: #a3e3d9; }
  .seat.g7 { background-color: #f1e7dc !important; --stripe: #d8bfa5; }
  .seat.g8 { background-color: #eef3d4 !important; --stripe: #d2e08c; }
  .seat.g9 { background-color: #fbe6f6 !important; --stripe: #eebbe3; }

  /* 前席オプションの斜めストライプ。白黒印刷でも濃淡の縞で見分けられます */
  .seat.is-front-opt,
  .legend .is-front-opt {
    background-image: repeating-linear-gradient(
      45deg,
      var(--stripe) 0, var(--stripe) .9mm,
      rgba(255, 255, 255, 0) .9mm, rgba(255, 255, 255, 0) 2mm
    ) !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  .seat.is-crew {
    background: #d8d8d8 !important; border-style: dashed !important; color: #333;
  }

  /* グループを囲む枠。白黒印刷でも見分けられるよう線の種類を変える */
  .blk {
    margin: -.7mm; border-radius: 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .blk.bt { border-top-width: .7mm; }
  .blk.br { border-right-width: .7mm; }
  .blk.bb { border-bottom-width: .7mm; }
  .blk.bl { border-left-width: .7mm; }

  /* 分かれてしまったグループは、印刷でも赤い太枠で目立たせる */
  .blk.is-split { border-color: #c00000 !important; border-style: solid !important; }
  .blk.is-split.bt { border-top-width: 1.4mm !important; }
  .blk.is-split.br { border-right-width: 1.4mm !important; }
  .blk.is-split.bb { border-bottom-width: 1.4mm !important; }
  .blk.is-split.bl { border-left-width: 1.4mm !important; }
  .block-label.is-split {
    background: #ffe8e6 !important; color: #a00000 !important;
    box-shadow: 0 0 0 .3mm #c00000; white-space: normal;
  }
  .block-split-mark { font-size: 6.6pt; }

  /* グループ枠は全色とも実線・同じ太さ。区別は色でつけます
     （線の種類を変えると、かえって分かりにくいという現場の声のため） */
  .blk.c0 { border-color: #8a6d00 !important; }
  .blk.c1 { border-color: #23527c !important; }
  .blk.c2 { border-color: #96324a !important; }
  .blk.c3 { border-color: #2c6b2c !important; }
  .blk.c4 { border-color: #5b3e93 !important; }
  .blk.c5 { border-color: #94540f !important; }
  .blk.c6 { border-color: #12645a !important; }
  .blk.c7 { border-color: #6d452c !important; }
  .blk.c8 { border-color: #566218 !important; }
  .blk.c9 { border-color: #832e76 !important; }

  .block-label {
    background: rgba(255, 255, 255, .8) !important;
    font-size: 8.4pt; padding: 0 .8mm;
  }
  .block-count { font-size: 9pt; }
  .blk-label-wrap.is-narrow { padding-bottom: 3.4mm; }
  .block-label.is-narrow { font-size: 7pt; line-height: 1.1; overflow: visible; }
  .block-label.is-narrow.is-long { font-size: 6.2pt; }
  .block-label.is-narrow .block-name {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  }
  .block-label.is-narrow.has-count .block-name { -webkit-line-clamp: 2; }
  .block-label.is-narrow .block-count { font-size: 7pt; }
  .blk-free { border: .7mm dashed #555 !important; margin: -.7mm; }
  .blk-free .block-label { font-size: 10pt; }

  /* 男女がとなり合っている席。分割（赤の実線）とは線の種類で区別できます */
  .seat.is-mixed {
    border: .8mm dashed #b35a00 !important;
    box-shadow: none !important;
  }
  .seat .seat-warn {
    left: .5mm; bottom: .2mm; font-size: 6pt; padding: 0 .3mm;
    background: #b35a00 !important; color: #fff !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  .legend { font-size: 7.5pt; margin-top: 2mm; }
  .legend .lg-plain { background-color: #fff !important; --stripe: #b9c2c8; }
  .legend span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .print-note { display: block !important; font-size: 8pt; margin-top: 3mm; color: #333; }
  a { text-decoration: none; color: #000; }
}

.print-note { display: none; }
