/* 本票產生器專用樣式；共用元件（.tool .calc .qr-field .calc-radios .btn）沿用 site.css */
#pn-form [hidden], #pn-pv [hidden] { display: none !important; }
.pn-check { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.pn-check input { width: 22px; height: 22px; flex: none; }
.pn-cn { margin: 2px 0 8px; font-weight: 700; color: var(--brand-dark); min-height: 1.5em; overflow-wrap: anywhere; }
.pn-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; }
.pn-warn li + li { margin-top: .35rem; }
.calc .qr-field input[type=text], .calc .qr-field input[type=date] { min-width: 0; }

#pn-pv h2 { margin-top: 1.5rem; }
.pn-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.pn-bar .btn { width: 100%; text-align: center; }
.pn-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #e9ecf1; margin: 10px 0; }
.pn-paper {
  width: 210mm; min-height: 148mm; padding: 18mm 22mm; background: #fff; color: #000; transform-origin: 0 0; box-sizing: border-box;
  font-family: "標楷體", "DFKai-SB", "BiauKai", "Noto Serif TC", "PMingLiU", serif; font-size: 14pt; line-height: 1.8;
}
.pn-title { text-align: center; font-size: 30pt; font-weight: 700; margin: 0 0 .5em; letter-spacing: .3em; }
.pn-tbl { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.pn-tbl th, .pn-tbl td { border: .3mm solid #000; padding: 2mm 3mm; text-align: left; vertical-align: middle; font-weight: 400; overflow-wrap: anywhere; }
.pn-tbl th { width: 28mm; white-space: nowrap; text-align: center; background: #f3f3f3; }
.pn-line { display: inline-block; border-bottom: .3mm solid #000; vertical-align: bottom; }
.pn-gap { display: inline-block; border-bottom: .3mm solid #000; }
.pn-body { margin: 0 0 .6em; overflow-wrap: anywhere; }
.pn-sign { margin-top: 1.4em; }
.pn-sign p { margin: 0 0 .5em; }
.pn-sl { display: inline-block; min-width: 7em; }
.pn-signline { min-width: 14em; height: 1.6em; }
.pn-tbl, .pn-sign, .pn-body { break-inside: avoid; }

@media (max-width: 480px) {
  .pn-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 > #pn-pv { display: block !important; }
  #pn-pv h2, #pn-pv .pn-bar, #pn-pv .hint, #pn-pv .status { display: none !important; }
  .pn-wrap { border: 0; background: none; overflow: visible; height: auto !important; margin: 0; border-radius: 0; }
  .pn-paper { transform: none !important; width: auto; min-height: 0; padding: 0; }
}
