/*!
 * 實價速查 PriceCheck — A4 列印樣式
 * public/print.css
 *
 * 掛載方式（index.html 已就位）：
 *   <link rel="stylesheet" href="print.css" media="print">
 *
 * ⚠️ 與 report.js 的合約（動本檔前必讀）
 * ─────────────────────────────────────────────────────────────
 * 1. report.js 在「測量期」會把本檔的 media 由 print 暫時切成 all，
 *    因為它要在螢幕上量到「與列印完全相同」的區塊高度才能自己分頁。
 *    → 所有影響「尺寸」的規則（字級、行高、padding、表格寬）
 *      一律寫在 @media 之外，否則螢幕量到的高度 ≠ 列印高度 → 分頁全歪。
 *    → 只有「把主畫面清空」這種列印專屬行為才寫進 @media print。
 * 2. @media screen 區塊的選擇器與 report.js 的 ensureScreenGuard()
 *    刻意寫成一模一樣，兩份規則不會互相打架。改一邊要改兩邊。
 * 3. 版面寬度硬鎖 700px：report.js 的 PAGE_W_PX = 700。
 *    A4 去掉 12mm × 2 邊界後可用 186mm ≒ 703px，留 3px 捨入餘裕。
 *    .pc-measure（量）與 .pc-page-body（印）必須同寬，否則換行行為不同 → 列高不同。
 * 4. 頁高 1028px = 272mm（297 − 24 邊界 − 1mm 餘裕），對應 report.js 的 PAGE_H_PX。
 *
 * 黑白友善原則（雷射黑白機是本店主力輸出）
 * ─────────────────────────────────────────────────────────────
 * 台屋橘 #E8730C 在黑白機上會變成中階灰、與淺灰底幾乎分不出來。
 * → 任何「靠顏色傳達的資訊」一律再加一層 非顏色 的線索：
 *   字重、框線粗細、實線／虛線、圖形形狀、文字標籤。
 *   橘色只當「彩色印表機的加分項」，不是唯一資訊載體。
 */

/* ═══════════════════════════════════════════════
   0) 紙張
   ═══════════════════════════════════════════════ */
@page {
  size: A4;
  margin: 12mm;
}

/* ═══════════════════════════════════════════════
   1) 螢幕：報表容器預設完全隱藏
   （選擇器與 report.js ensureScreenGuard() 完全一致）
   ═══════════════════════════════════════════════ */
@media screen {
  #pc-report:not(.pc-staging) { display: none !important; }
  #pc-report.pc-staging {
    display: block;
    position: fixed;
    top: 0;
    left: -20000px;
    width: 700px;
    background: #fff;
    z-index: 0;
    pointer-events: none;
  }
}

/* ═══════════════════════════════════════════════
   2) 報表本體（測量期與列印期共用 — 絕不可放進 @media）
   ═══════════════════════════════════════════════ */
#pc-report {
  /* 色票：對齊 DESIGN §6.1，但列印用的是「墨色為主、橘色為輔」 */
  --brand:      #E8730C;
  --brand-deep: #C25A05;
  --brand-soft: #FFF3E8;
  --ink:        #1B2430;
  --ink-2:      #5A6675;
  --ink-3:      #8B95A3;
  --line:       #C9D0D8;
  --line-hard:  #1B2430;
  --zebra:      #F4F6F8;

  box-sizing: border-box;
  width: 700px;
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Noto Sans TC", "Source Han Sans TC", "PingFang TC",
               "Microsoft JhengHei", "Heiti TC", "Segoe UI", sans-serif;
  font-size: 10.5pt;          /* 內文 10.5pt（規格 10~11pt） */
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-align: left;

  /* 底色／底線一定要印出來，否則「本路段」底色、統計表頭全變白 */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
#pc-report *,
#pc-report *::before,
#pc-report *::after {
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* 連結：不印 URL、不印藍色底線（附在不動產說明書裡藍字很突兀） */
#pc-report a,
#pc-report a:visited,
#pc-report a:hover {
  color: inherit;
  text-decoration: none;
}
#pc-report a[href]::after { content: "" !important; }

/* 測量容器：只在螢幕測量期存在，寬度必須等於 .pc-page-body */
#pc-report .pc-measure {
  width: 700px;
  padding: 0;
  margin: 0;
}

/* ── 頁 ───────────────────────────────────────── */
.pc-page {
  width: 700px;
  height: 1028px;              /* = 272mm，與 report.js PAGE_H_PX 對齊 */
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  background: #fff;
  position: relative;
  /* 刻意不用 overflow:hidden：萬一測量誤差溢出，寧可多吐半頁也不要「無聲吃掉一列資料」 */
  overflow: visible;
  break-after: page;
  page-break-after: always;
  break-inside: avoid;
}
.pc-page:last-child {
  break-after: auto;
  page-break-after: auto;
}
.pc-page-body {
  flex: 1 1 auto;
  min-height: 0;
  width: 700px;
}

/* 跑馬頁首（第 2 頁起） */
.pc-page-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 8pt;
  color: var(--ink-2);
  padding: 0 0 4px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line);
}
.pc-page-head span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-page-head span:last-child { white-space: nowrap; }

/* 頁尾：資料來源 + 免責 + 匯瀚署名 + 頁碼 */
.pc-page-foot {
  margin-top: auto;
  padding-top: 5px;
  border-top: 1px solid var(--line-hard);
  font-size: 7.5pt;
  line-height: 1.45;
  color: var(--ink-2);
}
.pc-foot-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.pc-foot-row2 { margin-top: 1px; }
.pc-page-foot .pc-src { font-weight: 600; color: var(--ink); }
.pc-page-foot .pc-pgno {
  white-space: nowrap;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pc-page-foot .pc-disc-mini { color: var(--ink-2); }
/* 匯瀚刻意淡化：11px 以下、灰、無連結色（DESIGN §6.1） */
.pc-page-foot .pc-tech {
  white-space: nowrap;
  font-size: 7pt;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* ── 通用區塊 ─────────────────────────────────── */
.pc-block {
  margin: 0 0 10px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.pc-block:last-child { margin-bottom: 0; }

.pc-sec-title {
  font-size: 11.5pt;
  font-weight: 800;
  color: var(--ink);
  margin: 2px 0 6px;
  padding: 0 0 3px 8px;
  border-left: 4px solid var(--ink);   /* 黑白機：靠粗直條，不靠橘色 */
  border-bottom: 1.5px solid var(--ink);
  letter-spacing: 0.03em;
}
.pc-sub-title {
  font-size: 10pt;
  font-weight: 700;
  margin: 4px 0 4px;
  padding-left: 6px;
  border-left: 3px solid var(--ink-2);
}
.pc-note {
  font-size: 8pt;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 4px 0 0;
}
.pc-note-inline { font-size: 8pt; color: var(--ink-2); }
.pc-warn {
  font-size: 8.5pt;
  font-weight: 700;
  color: var(--ink);
  margin: 5px 0 0;
  padding: 4px 7px;
  border: 1.5px solid var(--ink);      /* 警語靠實框，黑白機也跳得出來 */
  background: var(--brand-soft);
}

/* ── ① 頁首 ───────────────────────────────────── */
.pc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 0 0 8px;
  margin-bottom: 12px;
  border-bottom: 2.5px solid var(--ink);
}
.pc-head-l { min-width: 0; }
.pc-store {
  font-size: 13pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
  line-height: 1.25;
}
.pc-doctitle {
  font-size: 15pt;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-top: 2px;
  color: var(--ink);
}
.pc-agent {
  font-size: 9pt;
  color: var(--ink-2);
  margin-top: 3px;
}
.pc-head-r {
  text-align: right;
  white-space: nowrap;
  flex: 0 0 auto;
  padding-top: 2px;
}
.pc-kv-lab {
  font-size: 7.5pt;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
.pc-kv-val {
  font-size: 9pt;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* 模式標記（🏠建物 / 🟩土地 / 🅿️車位）
   黑白友善：emoji 不一定印得出來 → 一定同時有文字，外加框線與底色區分 */
.pc-modeline {
  margin-top: 5px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}
.pc-mode-badge {
  display: inline-block;
  font-size: 9pt;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 8px;
  border: 1.5px solid var(--ink);
  background: #fff;
  white-space: nowrap;
}
.pc-mode-building { background: var(--brand-soft); }
.pc-mode-land     { border-style: double; border-width: 3px; }  /* 雙線＝土地 */
.pc-mode-parking  { border-style: dashed; }                     /* 虛線＝車位 */
.pc-mode-desc {
  font-size: 8pt;
  color: var(--ink-2);
}

/* ── 表格通用 ─────────────────────────────────── */
.pc-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;                    /* 表格 9pt */
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.pc-tbl th,
.pc-tbl td {
  border: 0.75px solid var(--line);
  padding: 3px 5px;
  vertical-align: middle;
  word-break: break-word;
}
.pc-tbl th {
  background: var(--zebra);
  font-weight: 700;
  color: var(--ink);
  text-align: left;
}
/* 跨頁時表頭重複 + 整列不可被切斷 */
.pc-tbl thead { display: table-header-group; }
.pc-tbl tfoot { display: table-footer-group; }
.pc-tbl tr,
.pc-tbl th,
.pc-tbl td {
  break-inside: avoid;
  page-break-inside: avoid;
}
.pc-th-sub {
  display: block;
  font-size: 7pt;
  font-weight: 500;
  color: var(--ink-2);
}

/* key-value 表（查詢條件 / 採用方法） */
.pc-kv th {
  width: 15%;
  white-space: nowrap;
  font-size: 8.5pt;
}
.pc-kv td {
  width: 35%;
  font-size: 8.5pt;
}
.pc-kv .pc-blank {
  border-left-color: var(--line);
  background: #fff;
}

/* 排除條件列 */
.pc-exclude {
  margin-top: 6px;
  padding: 4px 7px;
  font-size: 8.5pt;
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  background: var(--zebra);
}
.pc-exclude b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pc-exclude-tag {
  display: inline-block;
  font-weight: 800;
  font-size: 8pt;
  padding: 0 6px;
  margin-right: 6px;
  border: 1px solid var(--ink);
  background: #fff;
}

/* ── ③ 統計摘要 ───────────────────────────────── */
.pc-stats { margin-top: 2px; }
.pc-stats .pc-stats-h th {
  text-align: center;
  font-size: 8pt;
  font-weight: 700;
  background: var(--zebra);
  padding: 2px 4px;
}
.pc-stats .pc-stats-v td {
  text-align: center;
  font-size: 11pt;
  font-weight: 800;
  padding: 4px;
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
}

/* 分組統計（土地依使用分區 / 車位依類別）*/
.pc-grp { margin-top: 2px; }
.pc-grp th { text-align: center; font-size: 8pt; }
.pc-grp td { font-size: 8.5pt; }
.pc-grp td.c-num { text-align: right; white-space: nowrap; }
.pc-grp .pc-grp-name {
  font-weight: 700;
  border-left: 3px solid var(--ink);
}
.pc-grp .pc-grp-thin { color: var(--ink-2); }
.pc-grp tr.pc-grp-few td {
  /* 樣本 < 3 的組：斜體 + 虛線底，明示「不足以代表行情」 */
  font-style: italic;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--ink-2);
}

/* ── ② 地圖 ───────────────────────────────────── */
.pc-map-block { break-inside: avoid; page-break-inside: avoid; }
.pc-map {
  width: 100%;
  border: 1.25px solid var(--ink);
  background: #fff;
  overflow: hidden;
  position: relative;
}
.pc-map .leaflet-container {
  background: #fff;
  font-family: inherit;
}
.pc-map .leaflet-control-container,
.pc-map .leaflet-control-attribution { display: none !important; }
.pc-map img { max-width: none; }

.pc-map-fallback {
  border: 1.25px dashed var(--ink-2);
  padding: 18px 12px;
  text-align: center;
  font-size: 9.5pt;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--zebra);
}

/* 地圖標記 —— 形狀本身就是資訊，黑白列印照樣分得出來 */
.pc-pin-wrap { background: none !important; border: 0 !important; }
.pc-pin {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 7.5pt;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ink);
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px var(--ink);
}
/* ● 實心圓 = 門牌精確 */
.pc-pin-rooftop { background: var(--ink); color: #fff; }
/* ○ 空心圓 = 路段內插 */
.pc-pin-road {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: none;
}
/* ◌ 虛線圓 = 行政區概位 */
.pc-pin-district {
  background: #fff;
  color: var(--ink-2);
  border: 1.5px dashed var(--ink-2);
  box-shadow: none;
}
/* ⬛ 方框叢集 = 土地段中心概位（DESIGN §3.0.5） */
.pc-pin-section {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 2px;
  box-shadow: 1px 1px 0 var(--ink);
}
/* ★ 本案 */
.pc-pin-subject {
  background: var(--brand);
  color: #fff;
  border: 1.5px solid var(--ink);
  box-shadow: 0 0 0 1.5px #fff;
  font-size: 10pt;
}
/* 筆數多時退化成小點，不標號 */
.pc-pin-dot { font-size: 0; border-width: 1px; }
/* 段名標籤（叢集少於門檻時才出現） */
.pc-pin-lab {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 2px;
  white-space: nowrap;
  font-size: 6.5pt;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 0.5px solid var(--ink-2);
  padding: 0 3px;
  line-height: 1.35;
}

/* 圖例（必印，DESIGN §5） */
.pc-legend {
  margin-top: 4px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: var(--zebra);
  font-size: 7.5pt;
  line-height: 1.7;
  color: var(--ink);
}
.pc-lg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 10px;
  white-space: nowrap;
}
.pc-lg-ic {
  display: inline-flex;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  font-size: 6pt;
}
.pc-lg-circle {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 1.25px dashed var(--brand-deep);
  border-radius: 50%;
  background: transparent;
}
.pc-lg-sep {
  font-weight: 800;
  margin-left: 2px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.pc-lg-src { color: var(--ink-2); }
.pc-legend-note {
  margin-top: 2px;
  padding-top: 2px;
  border-top: 1px dotted var(--line);
  color: var(--ink-2);
  white-space: normal;
  line-height: 1.5;
}

/* ── ④ 成交明細 ───────────────────────────────── */
.pc-caption { margin-bottom: 4px; }
.pc-detail {
  table-layout: fixed;
  font-size: 8.5pt;   /* 刻意小於通用 9pt：10 欄擠在 186mm 內，9pt 會整表換行 */
}
.pc-detail th {
  text-align: center;
  font-size: 8pt;
  padding: 3px 3px;
  border-top: 1.25px solid var(--ink);
  border-bottom: 1.25px solid var(--ink);
}
.pc-detail td {
  padding: 2.5px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-detail tbody tr:nth-child(even) td { background: var(--zebra); }
.pc-detail .c-idx  { text-align: center; color: var(--ink-2); }
.pc-detail .c-date { text-align: center; }
.pc-detail .c-num  { text-align: right; }
.pc-detail .c-fl   { text-align: center; }
.pc-detail .c-kind,
.pc-detail .c-zone,
.pc-detail .c-use,
.pc-detail .c-ptype { text-align: left; }
.pc-detail .c-addr {
  white-space: normal;
  word-break: break-all;
  line-height: 1.35;
}

/* 「本路段」列：底色 + 左粗邊 + 粗體序號 —— 黑白機靠後兩者也認得出來 */
.pc-detail tbody tr.pc-onroad td { background: var(--brand-soft); }
.pc-detail tbody tr.pc-onroad td:first-child {
  border-left: 3px solid var(--ink);
  font-weight: 800;
  color: var(--ink);
}
.pc-detail tbody tr.pc-onroad td { font-weight: 600; }

/* 欄寬：table-layout:fixed → 用 nth-child 定死，量與印才會一致 */
/* 建物 10 欄 */
.pc-detail-building th:nth-child(1),  .pc-detail-building td:nth-child(1)  { width: 4%; }
.pc-detail-building th:nth-child(2),  .pc-detail-building td:nth-child(2)  { width: 9.5%; }
.pc-detail-building th:nth-child(3),  .pc-detail-building td:nth-child(3)  { width: 27.5%; }
.pc-detail-building th:nth-child(4),  .pc-detail-building td:nth-child(4)  { width: 9%; }
.pc-detail-building th:nth-child(5),  .pc-detail-building td:nth-child(5)  { width: 8.5%; }
.pc-detail-building th:nth-child(6),  .pc-detail-building td:nth-child(6)  { width: 8.5%; }
.pc-detail-building th:nth-child(7),  .pc-detail-building td:nth-child(7)  { width: 7.5%; }
.pc-detail-building th:nth-child(8),  .pc-detail-building td:nth-child(8)  { width: 8.5%; }
.pc-detail-building th:nth-child(9),  .pc-detail-building td:nth-child(9)  { width: 8.5%; }
.pc-detail-building th:nth-child(10), .pc-detail-building td:nth-child(10) { width: 8.5%; }
/* 土地 9 欄：使用分區 / 使用編定 是主角，給足寬度 */
.pc-detail-land th:nth-child(1), .pc-detail-land td:nth-child(1) { width: 4%; }
.pc-detail-land th:nth-child(2), .pc-detail-land td:nth-child(2) { width: 9.5%; }
.pc-detail-land th:nth-child(3), .pc-detail-land td:nth-child(3) { width: 24%; }
.pc-detail-land th:nth-child(4), .pc-detail-land td:nth-child(4) { width: 13.5%; }
.pc-detail-land th:nth-child(5), .pc-detail-land td:nth-child(5) { width: 13.5%; }
.pc-detail-land th:nth-child(6), .pc-detail-land td:nth-child(6) { width: 9%; }
.pc-detail-land th:nth-child(7), .pc-detail-land td:nth-child(7) { width: 9%; }
.pc-detail-land th:nth-child(8), .pc-detail-land td:nth-child(8) { width: 10%; }
.pc-detail-land th:nth-child(9), .pc-detail-land td:nth-child(9) { width: 7.5%; }
.pc-detail-land .c-zone,
.pc-detail-land .c-use {
  white-space: normal;
  word-break: break-all;
  line-height: 1.3;
  font-size: 8pt;
}
/* 車位 8 欄 */
.pc-detail-parking th:nth-child(1), .pc-detail-parking td:nth-child(1) { width: 4.5%; }
.pc-detail-parking th:nth-child(2), .pc-detail-parking td:nth-child(2) { width: 10%; }
.pc-detail-parking th:nth-child(3), .pc-detail-parking td:nth-child(3) { width: 30%; }
.pc-detail-parking th:nth-child(4), .pc-detail-parking td:nth-child(4) { width: 14%; }
.pc-detail-parking th:nth-child(5), .pc-detail-parking td:nth-child(5) { width: 9.5%; }
.pc-detail-parking th:nth-child(6), .pc-detail-parking td:nth-child(6) { width: 10%; }
.pc-detail-parking th:nth-child(7), .pc-detail-parking td:nth-child(7) { width: 11%; }
.pc-detail-parking th:nth-child(8), .pc-detail-parking td:nth-child(8) { width: 11%; }

/* ── ⑤ 估價 ───────────────────────────────────── */
.pc-subject {
  font-size: 8.5pt;
  color: var(--ink);
  padding: 4px 7px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  background: var(--zebra);
}
.pc-ranges {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.pc-range {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 8px;
  background: #fff;
  text-align: center;
}
/* 三張卡用「框線語彙」區分，不靠顏色：細實線 / 粗實線 / 虛線 */
.pc-range-a { border: 1px solid var(--ink); }
.pc-range-b { border: 2.5px solid var(--ink); background: var(--brand-soft); }
.pc-range-c { border: 1.5px dashed var(--ink); }
.pc-range-t {
  font-size: 9pt;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.pc-range-b .pc-range-t { border-bottom-color: var(--ink); }
.pc-range-sub {
  font-size: 7pt;
  color: var(--ink-2);
  margin: 2px 0 3px;
}
.pc-range-v {
  font-size: 12pt;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.pc-range-u { font-size: 8pt; font-weight: 600; }
.pc-range-mid {
  font-size: 7.5pt;
  color: var(--ink-2);
  margin-top: 1px;
  white-space: nowrap;
}
.pc-range-na {
  font-size: 9.5pt;
  font-weight: 800;
  color: var(--ink-2);
  padding: 4px 0 2px;
}

/* 信心度：文字 + 框線粗細 + ▮ 條，三重保險 */
.pc-conf {
  margin-top: 6px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: var(--zebra);
  font-size: 8.5pt;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}
.pc-conf-lab {
  font-weight: 800;
  padding-right: 7px;
  border-right: 1px solid var(--line);
}
.pc-conf-lv {
  font-weight: 800;
  padding: 0 7px;
  background: #fff;
  white-space: nowrap;
}
.pc-conf-hi  { border: 2px solid var(--ink); }
.pc-conf-hi::after  { content: " \25AE\25AE\25AE"; }
.pc-conf-mid { border: 1.5px solid var(--ink-2); }
.pc-conf-mid::after { content: " \25AE\25AE\25AF"; }
.pc-conf-low { border: 1.5px dashed var(--ink-2); color: var(--ink-2); }
.pc-conf-low::after { content: " \25AE\25AF\25AF"; }
.pc-conf-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-conf-why { font-size: 8pt; color: var(--ink-2); }

/* 調整因子 */
.pc-adj th { text-align: center; font-size: 8pt; }
.pc-adj td { font-size: 8.5pt; }
.pc-adj td.c-num { text-align: right; white-space: nowrap; font-weight: 700; }
.pc-adj .pc-up::before { content: "\25B2 "; font-size: 6.5pt; }   /* ▲ */
.pc-adj .pc-dn::before { content: "\25BC "; font-size: 6.5pt; }   /* ▼ */

/* AI 敘述 */
.pc-narr p {
  margin: 0 0 4px;
  font-size: 9.5pt;
  line-height: 1.65;
  text-align: justify;
}

/* ── ⑥ 免責 ───────────────────────────────────── */
.pc-disc-block { break-inside: auto; page-break-inside: auto; }
.pc-disc {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 8pt;
  line-height: 1.6;
  color: var(--ink-2);
}
.pc-disc li {
  margin-bottom: 3px;
  break-inside: avoid;
  page-break-inside: avoid;
}
/* 土地的臨路警語等「必讀條款」：加粗 + 墨色 + 左粗邊，不能只靠顏色 */
.pc-disc li.pc-disc-key {
  color: var(--ink);
  font-weight: 700;
  padding: 2px 6px;
  margin-left: -6px;
  border-left: 3px solid var(--ink);
  background: var(--brand-soft);
}
.pc-sign {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
  padding-top: 5px;
  border-top: 1px solid var(--ink);
  font-size: 8.5pt;
  color: var(--ink);
}
.pc-sign-l { font-weight: 700; }
.pc-sign-r { white-space: nowrap; color: var(--ink-2); }

/* ═══════════════════════════════════════════════
   3) 只在列印時生效：把主畫面清空，只留報表
   ═══════════════════════════════════════════════ */
@media print {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* body 直屬層全部關掉…（report.js 保證 #pc-report 掛在 body 直屬層） */
  body > * { display: none !important; }
  /* …只留報表；id 選擇器特異性高於上面那條，順序不會出錯 */
  body > #pc-report,
  body > #pc-report.pc-staging {
    display: block !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto !important;
    pointer-events: auto !important;
    visibility: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  /* 常見的浮動 UI 保險（app.js 若把 modal/toast 掛在 body 以外的地方） */
  .toast, .modal, .backdrop, .drawer,
  #filterBackdrop, #agentBackdrop, #agentModal { display: none !important; }

  /* 測量容器只在螢幕期出現；真的殘留也不印 */
  #pc-report .pc-measure { display: none !important; }

  /* 孤兒行控制：段落頭尾至少留 2 行 */
  #pc-report p, #pc-report li {
    orphans: 2;
    widows: 2;
  }
}
