/* 切結書範本頁專用樣式（版型沿用 iou-template.css）；共用元件（.tool .calc .qr-field .calc-radios .btn）沿用 site.css */
#af-form [hidden], #af-pv [hidden] { display: none !important; }
.af-sub { font-size: 1rem; margin: 14px 0 0; color: var(--brand-dark); }
.af-cn { margin: 2px 0 8px; font-weight: 700; color: var(--brand-dark); min-height: 1.5em; overflow-wrap: anywhere; }
.af-check { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.af-check input { width: 22px; height: 22px; flex: none; }
.af-warn { list-style: none; margin: 12px 0 0; padding: 10px 14px; background: #fff7e6; border-left: 4px solid var(--warn); border-radius: 6px; font-size: 1rem; }
.af-warn li + li { margin-top: .35rem; }
.calc .qr-field input[type=text] { min-width: 0; }
.calc .qr-field input[type=date] { min-width: 0; }

#af-pv h2 { margin-top: 1.5rem; }
.pv-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.pv-bar .btn { width: 100%; text-align: center; }
.pv-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #e9ecf1; margin: 10px 0; }
.pv-paper {
  width: 210mm; padding: 18mm 20mm; background: #fff; color: #000; transform-origin: 0 0;
  font-family: "標楷體", "DFKai-SB", "BiauKai", "Noto Serif TC", "PMingLiU", serif; font-size: 13pt; line-height: 1.7;
  box-sizing: border-box;
}
.pv-paper p { margin: 0 0 .5em; overflow-wrap: anywhere; }
.pv-title { text-align: center; font-size: 24pt; letter-spacing: .3em; margin: 0 0 .8em; font-weight: 700; }
.pv-gap { height: .8em; }
.pv-sig { font-weight: 700; margin-top: .4em; }
.pv-sub { padding-left: 2em; margin-bottom: .1em; }
.pv-date { text-align: center; font-size: 14pt; }
.pv-finger { display: inline-block; width: 22mm; height: 22mm; margin-left: 1em; border: 1px dashed #666; vertical-align: top; font-size: 9pt; font-weight: 400; color: #777; text-align: center; line-height: 1.2; padding-top: 16mm; box-sizing: border-box; }
.pv-sig, .pv-sub, .pv-date, .pv-gap { break-inside: avoid; }
.pv-sig, .pv-sub, .pv-gap, .pv-cap, .pv-box { break-after: avoid; }

@media (max-width: 480px) {
  .pv-bar { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 16mm 18mm; }
  html, body { background: #fff; }
  .site-header, .site-footer { display: none !important; }
  main.wrap { max-width: none; padding: 0; margin: 0; }
  main.wrap > * { display: none !important; }
  main.wrap > #af-pv { display: block !important; }
  #af-pv h2, #af-pv .pv-bar, #af-pv .pv-hint, #af-pv .status { display: none !important; }
  .pv-wrap { border: 0; background: none; overflow: visible; height: auto !important; margin: 0; border-radius: 0; }
  .pv-paper { transform: none !important; width: auto; padding: 0; font-size: 12pt; line-height: 1.6; }
}

.pv-box { display: flex; gap: 6mm; margin: .6em 0; }
.pv-box span { flex: 1; min-height: 42mm; border: 1px dashed #666; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 10pt; color: #777; padding: 2mm; box-sizing: border-box; }
.pv-cap { font-size: 10pt; color: #555; margin: 0 0 .3em; }
.pv-box, .pv-cap { break-inside: avoid; }
.af-sample { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.af-sample .btn { white-space: nowrap; }
@media (max-width: 480px) { .af-sample { grid-template-columns: 1fr; } }
.pv-box span:only-child { flex: 0 0 82mm; }
.pv-keep { break-after: avoid; }
