/* 匯出的紀錄表（A4）。螢幕上是預覽、印出來／存成 PDF 是同一份。
   版面照消防局救護紀錄表：灰底標題列的區塊、細格線的表格、選到的選項 ■ 加框。
   顏色一律寫死：紙是白的，跟 App 的深色模式無關。 */

.print-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 4px 0 10px; }
.print-bar .check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; font-size: 15px; }
.print-bar .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.print-hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; line-height: 1.6; }

.sheet-wrap { padding: 0 0 40px; }
.sheet {
  width: 210mm;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 9mm 8mm;
  background: #fff;
  color: #222;
  font: 8.6pt/1.45 -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  border-radius: 4px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.sh-head { position: relative; text-align: center; margin: 0 0 3mm; }
.sh-head h1 { margin: 0; font-size: 19pt; font-weight: 500; letter-spacing: .04em; white-space: normal; overflow: visible; }
.sh-no { position: absolute; right: 0; bottom: 1mm; font-size: 9.5pt; color: #444; }

.sh-sec { border: 1px solid #cfd6d8; border-radius: 1.6mm; margin: 0 0 2.4mm; overflow: hidden; }
.sh-sec h2 { margin: 0; padding: 1.1mm 2mm; font-size: 10.5pt; font-weight: 500; background: #f2f4f4; border-bottom: 1px solid #cfd6d8; color: #333; }
.sh-keep { break-inside: avoid; }

.sh-t { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sh-t td, .sh-t th { border-right: 1px solid #e0e5e6; border-bottom: 1px solid #e0e5e6; padding: .9mm 1.6mm; vertical-align: top; text-align: left; word-break: break-word; }
.sh-t td:last-child, .sh-t th:last-child { border-right: 0; }
.sh-t tr:last-child td { border-bottom: 0; }
.sh-t tr { break-inside: avoid; }
.sh-t3 td { width: 33.33%; }
/* 53/47：左欄要放得下「疼痛指數 1～10＋無法評估」、右欄要放得下「膚色」七個選項（量過，兩邊都剛好一行） */
.sh-t2 col.c-wide { width: 53%; }
.sh-t2 col.c-narrow { width: 47%; }
.sh-t span.k { color: #555; }
.sh-t b.k { font-weight: 700; color: #222; }

.op { white-space: nowrap; margin-right: .9mm; color: #333; }
.op.on {
  font-weight: 700;
  color: #0b3a6b;
  background: #e8f0fa;
  border: 1px solid #2f6db3;
  border-radius: .6mm;
  padding: 0 .7mm;
}

.sh-vs th { background: #f7f9f9; font-weight: 700; text-align: center; font-size: 8pt; padding: .9mm .6mm; }
.sh-vs td { text-align: center; height: 5.4mm; padding: .7mm .6mm; }
.sh-vs th:nth-child(1) { width: 10%; } .sh-vs th:nth-child(2) { width: 9%; } .sh-vs th:nth-child(3) { width: 10%; }
.sh-vs th:nth-child(4) { width: 9%; } .sh-vs th:nth-child(5) { width: 12%; } .sh-vs th:nth-child(6) { width: 13%; }
.sh-vs th:nth-child(7) { width: 8%; } .sh-vs th:nth-child(8) { width: 8%; } .sh-vs th:nth-child(9) { width: 8%; }
.sh-vs th:nth-child(10) { width: 13%; }

.sh-box { padding: 1.6mm 2mm; }
.sh-note { min-height: 15mm; white-space: pre-wrap; }

.sh-body { display: flex; gap: 4mm; align-items: flex-start; }
.sh-figs { display: flex; gap: 3mm; flex: 0 0 auto; }
.sh-fig { height: 66mm; width: auto; display: block; }
.sh-bodyside { flex: 1; min-width: 0; padding-top: 1mm; }
.sh-burn { font-size: 11pt; margin: 0 0 2.4mm; }
.sh-marks { list-style: none; margin: 0; padding: 0; }
.sh-marks li { margin: 0 0 1.1mm; }
.sh-marks b {
  display: inline-block;
  width: 4.4mm; height: 4.4mm; line-height: 4.4mm;
  border-radius: 50%;
  background: #c2410c; color: #fff;
  text-align: center; font-size: 7.5pt;
  margin-right: 1mm;
}
.sh-muted { color: #888; margin: 0; }

.sh-sign td { vertical-align: middle; }
.sh-sigwrap { display: inline-block; height: 8mm; vertical-align: middle; margin: 0 1.5mm; }
.sh-sigwrap.w34 { width: 34mm; }
.sh-sigwrap.w26 { width: 26mm; }
.sh-sig { width: 100%; height: 100%; display: block; }
.sh-paste { height: 14mm; }

.sh-newpage { margin-top: 12mm; padding-top: 8mm; border-top: 1px dashed #bbb; }
.sh-ecg { height: 48mm; background: #f8f8f8; }

@media print {
  @page { size: A4; margin: 8mm; }
  html, body { background: #fff !important; padding: 0 !important; min-height: 0 !important; }
  /* 列印時只留紀錄表：標題列、提示橫幅、按鈕列、提示文字都收掉 */
  body[data-view="print"] > *:not(#view) { display: none !important; }
  body[data-view="print"] #view { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body[data-view="print"] #view > *:not(.sheet-wrap) { display: none !important; }
  .sheet-wrap { padding: 0; }
  .sheet { width: auto; padding: 0; box-shadow: none; border-radius: 0; margin: 0; zoom: 1 !important; }
  .sh-newpage { break-before: page; margin-top: 0; padding-top: 0; border-top: 0; }
}
