/* 罰單申訴陳述書產生器專用樣式（版型參考 divorce-agreement.css）；共用元件沿用 site.css */
#tta-form [hidden] { display: none !important; }
.tta-warn { margin: 10px 0; padding: 10px 14px; background: #fff7e6; border-left: 4px solid var(--warn); border-radius: 6px; font-size: 1rem; }
.tta-warnlist { list-style: none; margin: 12px 0 0; padding: 10px 14px; background: #fff7e6; border-left: 4px solid var(--warn); border-radius: 6px; font-size: 1rem; }
.tta-warnlist li + li { margin-top: .35rem; }
.tta-remind { margin: 10px 0; padding: 10px 14px; background: #eef6ff; border-left: 4px solid var(--brand); border-radius: 6px; font-size: 1rem; }
.tta-remind p { margin: 0 0 .4rem; }
.tta-remind p:last-child { margin-bottom: 0; }
.calc .qr-field input[type=text], .calc .qr-field input[type=date], .calc .qr-field input[type=time], .calc .qr-field select { min-width: 0; }
.calc .qr-field input[type=time] { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 400; background: #fff; color: var(--fg); }
.tta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tta-chips .btn { margin: 0; }
.tta-reason { min-height: 180px; }
.tta-ev { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 8px 0; align-items: center; }
.tta-ev input { min-width: 0; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--fg); box-sizing: border-box; }
.tta-ev .btn { margin: 0; white-space: nowrap; }

#tta-pv h2 { margin-top: 1.5rem; }
.tta-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 10px 0; }
.tta-bar .btn { width: 100%; text-align: center; }
.tta-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #e9ecf1; margin: 10px 0; }
.tta-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;
}
.tta-paper p { margin: 0 0 .5em; overflow-wrap: anywhere; }
.tta-title { text-align: center; font-size: 24pt; letter-spacing: .3em; margin: 0 0 .8em; font-weight: 700; }
.tta-h { font-weight: 700; margin-top: .9em !important; break-after: avoid; }
.tta-sub { padding-left: 2em; margin-bottom: .1em !important; }
.tta-gap { margin-top: 1em !important; }
.tta-row { display: grid; grid-template-columns: auto 1fr auto 1fr; column-gap: 3mm; border-bottom: 1px solid #999; padding: 1mm 0; break-inside: avoid; }
.tta-row-full { grid-template-columns: auto 1fr; }
.tta-row-wide { grid-template-columns: auto 1.6fr auto 1fr; }
.tta-lab { font-weight: 700; white-space: nowrap; }
.tta-val { overflow-wrap: anywhere; min-width: 0; }
.tta-sigbox { display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 6mm; margin: 1.2em 0 .8em; break-inside: avoid; }
.tta-sigbox > span:first-child { overflow-wrap: anywhere; max-width: 100%; }
.tta-sigbox .tta-line { flex: 1 1 45mm; border-bottom: 1px solid #000; min-height: 16mm; }
.tta-date { text-align: center; font-size: 14pt; break-inside: avoid; }
.tta-p { orphans: 2; widows: 2; }
.tta-sub { break-inside: avoid; }

@media (max-width: 480px) {
  .tta-bar { grid-template-columns: 1fr; }
  .tta-ev { 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 > #tta-form { display: block !important; border: 0; box-shadow: none; padding: 0; margin: 0; background: none; }
  #tta-form > * { display: none !important; }
  #tta-form > #tta-pv { display: block !important; }
  #tta-pv h2, #tta-pv .tta-bar, #tta-pv .hint, #tta-pv .status { display: none !important; }
  .tta-wrap { border: 0; background: none; overflow: visible; height: auto !important; margin: 0; border-radius: 0; }
  .tta-paper { transform: none !important; width: auto; padding: 0; font-size: 12pt; line-height: 1.6; }
}
