/* 급여 계산기. 사이트(home.css) · 채틀라이저(단계 · 표) 모양 위에 이 페이지에만 있는 것 */
.hero.tabhero:has(.herostats) { grid-template-columns: minmax(0, 1fr) auto; }
.herostats { grid-template-columns: 6em auto; }
#tabs { margin-top: 32px; }
.bigtabs.small { font-size: 15px; gap: 8px 18px; }
.money { display: flex; align-items: center; gap: 10px; margin-top: 14px; max-width: 360px; }
.money input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--card); color: var(--ink); font: 600 20px/1 var(--font); font-variant-numeric: tabular-nums; text-align: right; }
.money span { color: var(--muted); font-size: 15px; white-space: nowrap; }
.money input:focus, .nums select:focus, .nums input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.quick { font-size: 14px !important; color: var(--faint) !important; }
.nums { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; }
.nums label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.nums select, .nums input { height: 40px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--card); color: var(--ink); font: 500 15px var(--font); }
.nums input.pct { width: 80px; text-align: right; }
.nums input.wide { width: 150px; text-align: right; }
.nums select { max-width: 100%; }
.step .nums + p { margin-top: 10px; }
#c-extra .nums { margin-top: 14px; }

/* 수당 줄 */
.adds { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.adds:empty { display: none; }
.addrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.addrow input, .addrow select { height: 38px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--card); color: var(--ink); font: 500 15px var(--font); }
.addrow input:focus, .addrow select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.addrow input.anm { flex: 1 1 140px; min-width: 0; }
.addrow .anm.fixed { flex: 1 1 140px; font-weight: 600; font-size: 15px; }
.addrow .am, .addrow .apn { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.addrow .am input { width: 130px; text-align: right; font-variant-numeric: tabular-nums; }
.addrow .apn input { width: 70px; text-align: right; }
.addrow output { min-width: 96px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.addrow .del { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--faint); font-size: 20px; cursor: pointer; }
.addrow .del:hover { color: #ef9a9a; background: var(--card); }
.addrow .ah { flex-basis: 100%; color: var(--faint); font-size: 12.5px; }
.addbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.addbar .nums { margin: 0; }
.addbtn { height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 8px; cursor: pointer; font-family: inherit; }
@media (max-width: 680px) { .addrow input.anm, .addrow .anm.fixed { flex-basis: 100%; } }

/* 결과 */
.res { margin: 8px 0 0; padding: 28px 0 8px; position: relative; }
.res::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--fade-line); }
.big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.big .lb { color: var(--muted); font-size: 15px; }
.big strong { font-size: clamp(34px, 5vw, 46px); font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; color: var(--accent); }
.big small { color: var(--faint); font-size: 15px; }
/* 공제 전 → 공제 후 */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); }
.duo .dpre, .duo .dpost { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.duo .dpre { background: #1f2a23; }
.duo .dpre .lb { color: #8fdcae; }
.duo .dpost { background: var(--accent-soft); }
.duo .lb { color: var(--muted); font-size: 15px; font-weight: 600; }
.duo .dpost .lb { color: var(--accent-ink); }
.duo strong { font-size: clamp(28px, 4.2vw, 42px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.duo strong em { font-style: normal; font-size: .5em; font-weight: 600; margin-left: 3px; }
.duo .dpre strong { color: #8fdcae; }
.duo .dpost strong { color: var(--accent); }
.duo small { color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
.duo .cut { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 18px; background: var(--card); border-inline: 1px solid var(--line2); text-align: center; white-space: nowrap; }
.duo .cut span { color: #e07a7a; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.duo .cut b { color: var(--faint); font-size: 13px; font-weight: 500; }
.duo .cut::before { content: "→"; color: var(--faint); font-size: 22px; line-height: 1; margin-bottom: 4px; }
.res .tbl tr.rpre td { font-weight: 700; font-size: 16px; color: var(--ink); background: var(--surface); }
.res .tbl tr.rpost td { font-weight: 800; font-size: 17px; color: var(--accent); background: var(--accent-soft); border-bottom: 0; }
.res .tbl td:nth-child(4):not(:last-child), .res .tbl thead th:nth-child(4) { color: var(--accent); font-weight: 700; }
.res .tbl td:nth-child(2):not(:last-child), .res .tbl thead th:nth-child(2) { color: #8fdcae; }
.res .tbl td:nth-child(3):not(:last-child), .res .tbl thead th:nth-child(3) { color: #ef9a9a; }
@media (max-width: 680px) {
  .duo { grid-template-columns: minmax(0, 1fr); }
  .duo .cut { flex-direction: row; gap: 10px; padding: 10px 18px; border-inline: 0; border-block: 1px solid var(--line2); }
  .duo .cut::before { content: "↓"; margin: 0; font-size: 18px; }
}
/* 명세: 지급 내역 | 공제 내역 → 공제 후 */
.slip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.slip section { display: flex; flex-direction: column; border-radius: 14px; padding: 18px 20px 14px; background: var(--card); border: 1px solid var(--line2); border-top-width: 4px; }
.slip .sp { border-top-color: #6fcf97; }
.slip .sp h4 { color: #8fdcae; }
.slip .sp li b::before { content: "+ "; }
.slip .sp .tot { color: #8fdcae; }
.slip .sc { border-top-color: #e07a7a; }
.slip h4 { margin: 0 0 8px; font-size: 16px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.slip h4 small { color: var(--faint); font-size: 13px; font-weight: 500; }
.slip .sc h4 { color: #ef9a9a; }
.slip ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.slip li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line2); font-size: 15px; }
.slip li span { min-width: 0; }
.slip li em { font-style: normal; margin-left: 6px; color: var(--faint); font-size: 12.5px; }
.slip li b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slip .sc li b::before { content: "- "; }
.slip .tot { display: flex; align-items: baseline; margin: 10px 0 0; padding-top: 10px; border-top: 2px solid var(--line2); font-size: 16px; font-weight: 700; }
.slip .tot b { margin-left: auto; font-variant-numeric: tabular-nums; }
.slip .sc .tot { color: #ef9a9a; }
.slip .net { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; padding: 16px 20px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent); }
.slip .net span { font-size: 16px; font-weight: 700; color: var(--accent-ink); }
.slip .net small { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.slip .net b { margin-left: auto; font-size: 24px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
@media (max-width: 680px) { .slip { grid-template-columns: minmax(0, 1fr); } }
.subs { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 8px; color: var(--muted); font-size: 15px; }
.subs b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.res h3 { margin: 32px 0 0; font-size: 17px; font-weight: 600; }
.res .tbl td, .res .tbl th { font-variant-numeric: tabular-nums; }
.res .tbl td.n, .res .tbl th.n { text-align: right; }
.res .tbl td:first-child { font-weight: 500; }
.res .tbl tr.sum td { font-weight: 700; border-bottom: 0; }
.res .tbl tr.minus td.n { color: var(--muted); }
.res .tbl tr.hl td { background: var(--accent-soft); }
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-top: 18px; background: var(--surface); }
.bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); vertical-align: -1px; }
.note { margin-top: 14px; color: var(--faint); font-size: 13.5px; line-height: 1.65; }
.due { margin-top: 18px; padding: 18px 20px; border-radius: 12px; background: var(--surface); }
.due strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.due p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }

/* 봉급표 */
.paytbl { margin-top: 8px; padding-bottom: 8px; }
.paytbl .tbl { font-size: 14px; }
.paytbl .tbl th, .paytbl .tbl td { padding: 9px 10px; text-align: right; font-variant-numeric: tabular-nums; }
.paytbl .tbl th:first-child, .paytbl .tbl td:first-child { text-align: left; position: sticky; left: 0; background: var(--bg); }
.paytbl .tbl td i { display: block; font-style: normal; font-size: 12px; color: var(--accent); }
.paytbl .tbl td.sel { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.step { grid-template-columns: minmax(0, 1fr); gap: 0; }   /* 번호 칸 없이 */
.paybox { margin: 8px 0 4px; padding: 0 18px; border-radius: 12px; background: var(--surface); scroll-margin-top: 72px; }
.paybox summary { display: flex; align-items: center; gap: 10px; padding: 16px 0; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600; }
.paybox summary::-webkit-details-marker { display: none; }
.paybox summary::after { content: "펼치기"; margin-left: auto; color: var(--faint); font-size: 14px; font-weight: 500; }
.paybox[open] summary::after { content: "접기"; }
.paybox[open] { padding-bottom: 12px; }
.paybox .paytbl .tbl th:first-child, .paybox .paytbl .tbl td:first-child { background: var(--surface); }
.paybox > p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.paybox > p:empty { display: none; }
.paybox .bigtabs { margin: 14px 0 0; }
.empty { padding: 28px 0; color: var(--muted); }

/* 계산 기준 */
.basis { margin-top: 24px; padding: 28px 0 0; position: relative; color: var(--muted); font-size: 14px; line-height: 1.7; }
.basis::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--fade-line); }
.basis h2 { margin: 0 0 8px; color: var(--ink); font-size: 17px; font-weight: 600; }
.basis ul { margin: 0; padding-left: 18px; }
.basis a { color: var(--accent-ink); }

@media (max-width: 760px) {
  .hero.tabhero:has(.herostats) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .nums { gap: 10px 16px; }
  .res .tbl { font-size: 14px; }
}
