/* 薪資單產生器（kit.css 之上只加這一站的東西）：左邊三段可增刪的表單，右邊勞動部參考例二的明細表 */
.ps-box { border: 0; margin: 0 0 var(--s3); padding: 0; min-width: 0; }
.ps-box legend { font: 900 1.1rem/1.4 var(--font-head); color: var(--ink); margin: 0 0 6px; padding: 0; }
.ps-box legend small { font: 700 .9rem var(--font-num); color: var(--ink-soft); }
.ps-box > .hint { display: block; margin: 0 0 10px; }
.ps-box > .hint a { color: var(--accent); }
.ps-rows { display: grid; gap: 8px; }
.ps-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.ps-row input { min-height: 48px; font-size: 16px; width: 100%; }
.ps-label { font-weight: 700; }
.ps-del { width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font-size: 1rem; cursor: pointer; }
.ps-del:hover, .ps-del:focus-visible { background: var(--accent-soft); color: var(--ink); }
.ps-add { margin-top: 10px; min-height: 44px; }
.ps-box .err:not(:empty) { display: block; margin-top: 6px; }
#ins-auto[hidden] { display: none; }

/* 明細表 */
.ps-paper { margin-top: 0; }
.pd { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s3); }
.kit-example .pd { box-shadow: none; padding: 0; background: transparent; }
.pd-head { border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 12px; }
.pd-co { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.pd-title { margin: 2px 0 8px; font: 900 1.25rem/1.35 var(--font-head); color: var(--ink); letter-spacing: .04em; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; font-size: .92rem; }
.pd-meta div { display: flex; gap: 6px; }
.pd-meta dt { color: var(--ink-soft); }
.pd-meta dd { margin: 0; font-weight: 700; }
.pd-body { display: grid; gap: 12px; }
.pd-sec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.pd-sec caption { text-align: left; font: 800 .92rem var(--font-body); color: var(--band); padding: 0 0 4px; }
.pd-sec th, .pd-sec td { padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; vertical-align: top; }
.pd-sec td { text-align: right; font: 600 1rem var(--font-num); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; padding-left: 12px; }
.pd-sec th small { display: block; font-size: .875rem; color: var(--ink-soft); }
.pd-sec tr.none th, .pd-sec tr.none td { color: var(--ink-soft); }
.pd-sec tfoot th, .pd-sec tfoot td { border-bottom: 0; font-weight: 700; }
.pd-net { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 2px solid var(--ink); margin: 12px 0 4px; padding-top: 10px; }
.pd-net span { font-weight: 800; }
.pd-net b { font: 800 1.6rem/1 var(--font-num); font-variant-numeric: lining-nums tabular-nums; }
.pd-net b small { font: 700 .9rem var(--font-body); }
.pd-sum, .pd-note, .pd-foot { margin: 4px 0 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.6; }
.pd-free { display: block; color: #4A5868; }
.ps-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: var(--s2); }
.ps-errs:empty { display: none; }
.ps-note { font-size: .88rem; color: var(--ink-soft); line-height: 1.7; max-width: var(--wrap); }
.ps-note p { max-width: 72ch; margin: 0; }
.ps-note a { color: var(--accent); }

/* 付費：名冊與清冊 */
.ps-pro { margin-top: var(--s3); background: var(--accent-soft); border-radius: var(--radius); padding: var(--s3); }
.ps-pro h2 { font: 900 1.15rem var(--font-head); margin: 0 0 6px; }
.ps-months, .ps-people { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.ps-months > li { background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; }
.ps-months .t { margin: 0 0 6px; font-weight: 800; }
.ps-months .t small { margin-left: 8px; font-weight: 400; color: var(--ink-soft); }
.ps-months .b, .ps-people li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ps-people li { border-top: 1px solid var(--line); padding-top: 8px; }
.ps-people li > span:first-child { font-weight: 700; min-width: 5em; }
.ps-people .v { font: 600 1rem var(--font-num); margin-right: auto; }
.ps-pro .btn { min-height: 44px; padding: 0 12px; font-size: .9rem; }

@media (max-width: 420px) { .ps-row { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) 36px; } .ps-actions { grid-template-columns: 1fr; } }

@media print {
  @page { size: A4; margin: 14mm; }
  .ps-top, .ps-form, .ps-note, .kit-related, .kit-faq, .kit-plans { display: none !important; }
  main > .ps-grid { display: block !important; padding: 0; max-width: none; }   /* 蓋過 kit 桌機兩欄（min-width: 960 在寬螢幕列印時仍成立） */
  .ps-out { position: static; padding: 0; margin: 0; max-width: none; }
  .pd { box-shadow: none; border-radius: 0; padding: 0; font-size: 11pt; }
  .pd-sec tr { break-inside: avoid; }
  /* 整月一次列印：只印 #ps-batch，一人一頁 */
  body.ps-printing-batch main, body.ps-printing-batch .kit-head, body.ps-printing-batch .kit-foot { display: none !important; }
  #ps-batch .pd { break-after: page; }
  #ps-batch .pd:last-child { break-after: auto; }
}
#ps-batch { display: none; }
@media print { body.ps-printing-batch #ps-batch { display: block; } }
.ps-form .seg label small { display: block; font-weight: 400; font-size: .875rem; }   /* 「自動算／照 2026 級距表」換行 */
