/* 存證信函產生器專用樣式；版面尺寸量自中華郵政官方「存證信函格式」PDF（A4，格寬約 8.36mm、行高 12mm） */
#ll-form [hidden], #ll-pv [hidden] { display: none !important; }
.ll-sub { font-size: 1rem; margin: 14px 0 0; color: var(--brand-dark); }
.ll-check { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.ll-check input { width: 22px; height: 22px; flex: none; }
.ll-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; }
.ll-warn li + li { margin-top: .35rem; }
.ll-tpl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.ll-tpl .btn { width: 100%; text-align: center; }
.ll-tpl-note ul { margin: .3rem 0 0 1.2rem; padding: 0; }
.ll-fixgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 8px; }
.ll-fixgrid > * { min-width: 0; }
.calc .qr-field input[type=text], .calc .qr-field textarea { min-width: 0; }
#ll-text { min-height: 180px; }
.ll-half { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: #f8fafc; margin: 8px 0; }

#ll-pv h2 { margin-top: 1.5rem; }
.ll-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.ll-bar .btn { width: 100%; text-align: center; }
.ll-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #e9ecf1; margin: 10px 0; }
.ll-paper { transform-origin: 0 0; }
#ll-print { display: none; }

/* ---------- 官方用紙版面（單位 mm） ---------- */
.ll-sheet {
  position: relative; width: 210mm; height: 297mm; background: #fff; color: #000; overflow: hidden; box-sizing: border-box;
  font-family: "標楷體", "DFKai-SB", "BiauKai", "Noto Serif TC", "PMingLiU", serif; font-size: 10pt; line-height: 1.25;
}
.ll-paper .ll-sheet { margin-bottom: 8mm; }
.ll-paper .ll-sheet:last-child { margin-bottom: 0; }
.ll-sheet * { box-sizing: border-box; }
.ll-sheet p { margin: 0; }
.ll-t { position: absolute; white-space: nowrap; line-height: 1; }
.ll-v { overflow: hidden; }
.ll-k { line-height: 1; }
.ll-sl { text-decoration: none; display: inline-block; text-align: center; border-bottom: .2mm solid #000; line-height: 1.1; }
.ll-ln { position: absolute; background: #000; }
.ll-circ { position: absolute; border: .26mm dotted #555; border-radius: 50%; box-sizing: border-box; }
.ll-seam { width: 22.2mm; height: 24.8mm; }
.ll-head { position: absolute; left: 22.6mm; top: 27.4mm; width: 176.3mm; height: 50.9mm; border: .35mm solid #000; display: flex; }
.ll-head-l { width: 56.4mm; border-right: .35mm solid #000; }

.ll-grid { position: absolute; left: 22.6mm; top: 78.3mm; width: 176.3mm; border-collapse: collapse; table-layout: fixed; }
.ll-grid col { width: 8.355mm; }
.ll-grid col.c0 { width: 9.1mm; }
.ll-grid th, .ll-grid td { border: .3mm solid #000; padding: 0; height: 12mm; text-align: center; vertical-align: middle; font-weight: 400; overflow: hidden; }
.ll-grid td { font-size: 18pt; line-height: 1; }
.ll-grid thead th { font-size: 8.5pt; font-family: Arial, "Noto Sans TC", sans-serif; }
.ll-grid tbody th { font-size: 8.5pt; }
.ll-diag { position: relative; background: linear-gradient(to top right, transparent calc(50% - .2mm), #000 calc(50% - .2mm), #000 calc(50% + .2mm), transparent calc(50% + .2mm)); }
.ll-diag b { position: absolute; right: 1mm; top: .8mm; font-weight: 400; }
.ll-diag s { position: absolute; left: 1mm; bottom: .8mm; text-decoration: none; }

@media (max-width: 480px) {
  .ll-bar, .ll-tpl { grid-template-columns: 1fr; }
  .ll-fixgrid { grid-template-columns: 1fr 1fr; }
}

@media print {
  @page { size: A4; margin: 0; }
  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 > #ll-print { display: block !important; }
  #ll-print .ll-sheet { page-break-after: always; break-after: page; margin: 0; }
  #ll-print .ll-sheet:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.ll-format-note { margin: 10px 0; padding: 10px 14px; background: #fff7e6; border-left: 4px solid var(--warn); border-radius: 6px; font-size: 1rem; }
.ll-sl:empty { border-bottom: 0; }
