/* 글꼴: Pretendard Variable (SIL OFL 1.1, assets/fonts/pretendard) — 필요한 글자 조각만 내려받는 동적 서브셋 */
@import url("/assets/fonts/pretendard/pretendardvariable-dynamic-subset.css");

:root {
  /* Canva 디자인 시안(ID DAHbhGTDh80, 홈페이지 디자인 시안)에서 추출한 색 (2026-11-21) */
  --bg: #f7f9fd;
  --surface: #ffffff;
  --text: #1e2a5a;          /* 제목·본문 남색 (시안 #253162 계열) */
  --muted: #56608a;         /* 보조 문구 (시안 #5c6589 계열, 대비 6:1 이상) */
  --border: #e2e7f2;
  --brand: #2563e2;         /* 시안 주 색: 버튼·검색창·대표 카드 */
  --brand-strong: #1c4fc4;
  --brand-soft: #eaf1fd;    /* 시안 연한 파랑 #eff4fd·#e7eefc */
  --navy: #172149;          /* 시안 바닥글 */
  --range: #f2b632;
  --range-soft: #fdf3d8;
  --sun: #c0392b;
  --sat: #2463a6;
  --error: #c02a1e;
  --error-soft: #fdecea;
  --focus: #1c4fc4;
  --radius: 14px;
  --shadow: 0 6px 24px rgb(30 42 90 / 0.07);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1430;
    --surface: #161f46;
    --text: #e7ebf7;
    --muted: #aab3d1;
    --border: #2b376a;
    --brand: #7aa5ff;
    --brand-strong: #a4c1ff;
    --brand-soft: #1d2b5c;
    --navy: #0a0f26;
    --range: #d9a92e;
    --range-soft: #3a3220;
    --sun: #ff8a7a;
    --sat: #7fb4ff;
    --error: #ff8a7a;
    --error-soft: #3d1f1c;
    --focus: #a4c1ff;
    --shadow: none;
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: var(--brand); }
a:hover { color: var(--brand-strong); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -48px;
  padding: 8px 12px; background: var(--surface); color: var(--text);
  border: 2px solid var(--focus); border-radius: 8px; z-index: 10;
}
.skip-link:focus { top: 8px; }

/* header / footer */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; min-height: 56px; }
.brand {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--brand); text-decoration: none;
}
.site-footer {
  margin-top: 48px; padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.875rem;
}
.site-footer p { margin: 0 0 6px; }

/* breadcrumb */
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin: 16px 0 0; padding: 0; font-size: 0.9rem; color: var(--muted);
}
.breadcrumb a { display: inline-block; padding: 6px 0; }

/* hero */
.hero { padding: 20px 0 8px; }
.hero h1 { margin: 0 0 8px; font-size: 1.75rem; line-height: 1.3; letter-spacing: -0.02em; }
.lead { margin: 0; color: var(--muted); font-size: 1.05rem; }

.section-title { font-size: 1.1rem; margin: 24px 0 12px; }

/* cards */
.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card {
  display: grid; gap: 6px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgb(0 0 0 / .06); color: var(--text); }
.card-tag {
  justify-self: start; font-size: 0.78rem; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 2px 8px; border-radius: 999px;
}
.card-title { font-size: 1.25rem; font-weight: 800; }
.card-desc { color: var(--muted); }
.card-cta { color: var(--brand); font-weight: 700; margin-top: 4px; }

/* panels / form */
.panel {
  margin-top: 20px; padding: 20px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.panel-title { margin: 0 0 12px; font-size: 1.15rem; }
.panel-title:focus { outline: none; }

.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
fieldset.field { margin-bottom: 20px; }
legend, .field > label { display: block; font-weight: 700; margin-bottom: 6px; padding: 0; }
.unit { font-weight: 400; color: var(--muted); }
.hint { margin: 0 0 8px; font-size: 0.875rem; color: var(--muted); }
.field > .hint:last-child { margin-bottom: 0; }
.preview { margin: 6px 0 0; font-size: 0.875rem; color: var(--brand); min-height: 0; }
.preview:empty { display: none; }

input[type="text"], input[type="date"], select {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
}
input[type="text"] { font-variant-numeric: tabular-nums; }
input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }

.error {
  margin: 6px 0 0; padding: 8px 10px; font-size: 0.875rem; font-weight: 600;
  color: var(--error); background: var(--error-soft); border-radius: 8px;
}
.error::before { content: "⚠ "; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row.dates { grid-template-columns: 1fr; gap: 0; }
@media (min-width: 560px) { .row.dates { grid-template-columns: 1fr 1fr; gap: 12px; } }
.sub-field label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 4px; }

.choices { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .choices { grid-template-columns: repeat(3, 1fr); } }
.choice {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }

/* schedule calendar */
.schedule-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.calendar-head, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-head { margin-bottom: 4px; font-size: 0.8rem; color: var(--muted); text-align: center; }
.calendar-head .sun { color: var(--sun); }
.calendar-head .sat { color: var(--sat); }

.day { position: relative; display: block; min-height: 44px; cursor: pointer; }
.day-blank { cursor: default; }
.day input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.day-num {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 44px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted);
  transition: background .1s, color .1s;
}
.day.sun .day-num { color: var(--sun); }
.day.sat .day-num { color: var(--sat); }
.day input:checked + .day-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.day.in-range .day-num { box-shadow: inset 0 0 0 3px var(--range); }
.day.in-range input:not(:checked) + .day-num { background: var(--range-soft); }
.day input:focus-visible + .day-num { outline: 3px solid var(--focus); outline-offset: 2px; }

.legend-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; }
.swatch-on { background: var(--brand); }
.swatch-range { background: var(--range-soft); box-shadow: inset 0 0 0 3px var(--range); }
.schedule-summary { margin: 6px 0 0; font-size: 0.9rem; font-weight: 600; }

/* buttons */
.btn {
  font: inherit; cursor: pointer; border-radius: 10px; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn-ghost { font-size: 0.875rem; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary {
  width: 100%; min-height: 52px; font-size: 1.05rem; font-weight: 800;
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary,
  :root:not([data-theme="light"]) .day input:checked + .day-num { color: #0d1a15; }
}
.actions { margin-top: 8px; }

/* result table */
.result-meta { margin: 0 0 12px; font-size: 0.9rem; color: var(--muted); }
.compare { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.compare th, .compare td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.compare thead th { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.compare td.amount { font-weight: 800; text-align: right; white-space: nowrap; }
.compare thead th:last-child { text-align: right; }
.compare tr.unavailable td.amount { white-space: normal; color: var(--error); font-weight: 700; font-size: 0.9rem; }
.diff { margin: 14px 0 0; padding: 12px; border-radius: 10px; background: var(--brand-soft); }
.diff-label { font-weight: 700; margin-right: 6px; }

@media (max-width: 599px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; margin-bottom: 10px; }
  .compare tbody th { border-bottom: 1px solid var(--border); padding: 10px 0; font-size: 1rem; }
  .compare td { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
  .compare td:last-child { border-bottom: 0; }
  .compare td::before { content: attr(data-label); color: var(--muted); font-weight: 600; flex: none; }
  .compare td[data-col="formula"] { text-align: right; }
  .compare td.amount { font-size: 1.1rem; }
  .compare tr.unavailable td.amount { text-align: right; }
}

/* notices & content */
.notice {
  margin-top: 20px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  font-size: 0.925rem;
}
.notice p { margin: 0 0 8px; }
.notice p:last-child { margin-bottom: 0; }
.disclaimer { font-weight: 700; }
.notice-warn { border-left-color: var(--error); }

.content { margin-top: 32px; }
.content h2 { font-size: 1.25rem; margin: 0 0 12px; }
.content h3 { font-size: 1.02rem; margin: 20px 0 6px; }
.content p, .content li { color: var(--text); }
.content ul { padding-left: 20px; margin: 0 0 12px; }
.content li { margin-bottom: 6px; }
.checked-date { font-size: 0.9rem; color: var(--muted) !important; }
.faq h3::before { content: "Q. "; color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- 주휴수당 계산기 ---------- */
.req, .opt { font-size: 0.75rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; margin-left: 4px; }
.req { color: var(--error); background: var(--error-soft); }
.opt { color: var(--muted); background: var(--bg); border: 1px solid var(--border); }
.muted { color: var(--muted); font-size: 0.85em; }
.section-gap { margin-top: 28px; }
.choices-2 { grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) { .choices-2 { grid-template-columns: 1fr 1fr; } }
.scope-note { margin-top: 8px; }
.notice.guide { margin: 0 0 12px; border-left-color: var(--range); }
.week-rule { font-size: 0.9rem; font-weight: 600; margin: 0 0 12px; }

.advanced { margin: 0 0 16px; }
.advanced summary { cursor: pointer; font-weight: 700; padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.weekday-picks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekday-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.weekday-pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }

.week-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 8px; }
.week-tab {
  flex: none; display: grid; gap: 0; text-align: left; min-width: 72px; min-height: 52px;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; cursor: pointer;
}
.week-tab[aria-current="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.tab-week { font-weight: 800; font-size: 0.9rem; }
.tab-range { font-size: 0.75rem; color: var(--muted); }
.tab-state { font-size: 0.72rem; color: var(--error); font-weight: 700; }
.tab-state.is-done { color: var(--brand); }

.week-panel { border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.week-title { margin: 0 0 8px; font-size: 1rem; }
.week-title:focus { outline: none; }
.day-list { display: grid; gap: 8px; }
.day-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 6px 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.day-row:last-child { border-bottom: 0; }
.day-row.day-off { color: var(--muted); }
.day-label { font-weight: 700; font-variant-numeric: tabular-nums; }
.time-inputs { display: flex; align-items: center; gap: 6px; }
.time-inputs input { width: 56px; min-height: 44px; text-align: center; padding: 8px 4px; }
.att { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.att-opt { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 0.9rem; }
.att-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.att-opt input { margin: 0; width: 18px; height: 18px; accent-color: var(--brand); }
.day-error { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .day-row { grid-template-columns: 72px auto 1fr; }
  .att { grid-column: auto; }
}
.week-foot { margin-top: 10px; display: grid; gap: 8px; }
.week-sum { margin: 0; font-weight: 700; }
.week-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.week-actions [aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.week-nav button:disabled { opacity: .45; cursor: default; }
.week-progress { font-size: 0.875rem; color: var(--muted); }

.result-summary { font-weight: 700; margin: 0 0 12px; }
.needs { padding: 12px; border-radius: 10px; background: var(--error-soft); margin-bottom: 12px; }
.needs h3 { margin: 0 0 6px; font-size: 0.95rem; }
.needs ul { margin: 0; padding: 0; list-style: none; }
.needs li { margin: 2px 0; }
.link-btn { background: none; border: 0; padding: 6px 0; min-height: 40px; color: var(--brand); text-decoration: underline; font: inherit; cursor: pointer; text-align: left; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 800; font-size: 0.85rem; white-space: nowrap; }
.badge-eligible { background: var(--brand); color: #fff; }
.badge-ineligible { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.badge-insufficient { background: var(--range-soft); color: var(--text); border: 1px solid var(--range); }
.confirm { color: var(--error); }
.rule-ref { font-size: 0.8rem; color: var(--muted); }
.result-disclaimer { margin: 14px 0 0; padding: 12px; border-radius: 10px; background: var(--brand-soft); }
.basis { margin-top: 12px; }
.basis summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.basis ul { padding-left: 18px; font-size: 0.9rem; }
.rule-list li { margin-bottom: 6px; }
/* 판정표: 모든 너비에서 주차별 카드. 제목줄 = 주차 · 판정 배지 · 예상액, 그 아래 판정 이유, 마지막에 기간·시간 */
.whp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.whp-table, .whp-table tbody { display: block; width: 100%; }
.whp-table tr {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 10px;
  border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px 8px; margin-bottom: 12px; background: var(--surface);
}
.whp-table tr.st-eligible { border-left: 4px solid var(--brand); }
.whp-table tr.st-insufficient { border-left: 4px solid var(--range); }
.whp-table th, .whp-table td { display: block; padding: 0; border: 0; text-align: left; }
.whp-table tbody th { grid-column: 1; grid-row: 1; padding: 12px 0; font-size: 1.05rem; white-space: nowrap; }
.whp-table td[data-col="status"] { grid-column: 2; grid-row: 1; }
.whp-table td.amount.has-amount { grid-column: 3; grid-row: 1; text-align: right; }
.whp-table td.amount.has-amount .amount-value { font-size: 1.2rem; font-weight: 800; }
.whp-table td.amount.has-amount .muted { display: block; font-size: 0.78rem; }
.whp-table td[data-col="reason"], .whp-table td[data-col="range"], .whp-table td[data-col="window"],
.whp-table td[data-col="applied"], .whp-table td.amount:not(.has-amount) {
  grid-column: 1 / -1; display: grid; grid-template-columns: 88px 1fr; gap: 2px 12px;
  padding: 8px 0; border-top: 1px dashed var(--border); font-size: 0.92rem;
}
.whp-table td[data-col="reason"] { border-top: 1px solid var(--border); font-size: 0.95rem; }
.whp-table td[data-col="reason"]::before, .whp-table td[data-col="range"]::before, .whp-table td[data-col="window"]::before,
.whp-table td[data-col="applied"]::before, .whp-table td.amount:not(.has-amount)::before {
  content: attr(data-label); color: var(--muted); font-weight: 600;
}
.whp-table td.amount:not(.has-amount) .cell-v { color: var(--muted); }
.whp-table .cell-v { min-width: 0; }
.whp-table td[data-col="status"]::before, .whp-table td.amount.has-amount::before { content: none !important; }
@media (max-width: 599px) {
  .whp-table td[data-col="reason"], .whp-table td[data-col="range"], .whp-table td[data-col="window"],
  .whp-table td[data-col="applied"], .whp-table td.amount:not(.has-amount) { grid-template-columns: 76px 1fr; }
  .whp-table tr { grid-template-columns: auto 1fr; }
  .whp-table td.amount.has-amount { grid-column: 1 / -1; grid-row: 2; text-align: left; padding: 0 0 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .whp-table td.amount.has-amount .muted { display: inline; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-eligible { color: #0d1a15; }
}

/* ---------- 접이식 영역: 적용 기준 및 공식 출처 · 자주 묻는 질문 ---------- */
:is(.basis-fold, .faq-fold) { margin-top: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
:is(.basis-fold, .faq-fold) > .fold-summary {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 16px;
  cursor: pointer; list-style: none; border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
:is(.basis-fold, .faq-fold) > .fold-summary::-webkit-details-marker { display: none; }
:is(.basis-fold, .faq-fold) > .fold-summary::before {
  content: ""; flex: none; width: 0; height: 0;
  border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent var(--brand);
  transition: transform .15s;
}
:is(.basis-fold, .faq-fold)[open] > .fold-summary::before { transform: rotate(90deg); }
:is(.basis-fold, .faq-fold) > .fold-summary h2 { margin: 0; font-size: 1.1rem; }
@media (hover: hover) {
  :is(.basis-fold, .faq-fold) > .fold-summary:hover { background: var(--brand-soft); }
}
:is(.basis-fold, .faq-fold)[open] > .fold-summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
:is(.basis-fold, .faq-fold) > .fold-body { padding: 4px 16px 16px; }
.basis-fold .basis-result { margin: 12px 0 4px; padding: 12px; border-radius: 10px; background: var(--brand-soft); font-size: 0.9rem; }
.basis-fold .basis-result h3 { margin: 0 0 6px; font-size: 0.95rem; }
.basis-fold .basis-result ul { padding-left: 18px; }

/* ---------- 9차 디자인 정리 (UI 검수 반영) ---------- */
/* 단계 제목: 세 페이지 공통 */
.panel-title { display: flex; align-items: center; gap: 8px; }
.step {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 0.85rem; font-weight: 800;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step { color: #0d1a15; } }

/* 라벨 → 입력 → 오류 → 힌트: 오류를 입력 바로 아래에 */
.field > input + .error, .field > select + .error, .field > input + .preview { margin-top: 6px; }
.field > .error + .hint, .field > .preview + .hint, .field > .error + .preview { margin-top: 6px; }
.field > input ~ .hint, .field > select ~ .hint { margin: 6px 0 0; }

/* 계산 버튼: 모바일에서 폼을 보는 동안 화면 아래에 고정 */
.actions-sticky { position: sticky; bottom: 0; z-index: 5; margin: 8px -16px -20px; padding: 10px 16px 12px; background: linear-gradient(to top, var(--surface) 80%, transparent); border-radius: 0 0 var(--radius) var(--radius); }
@media (min-width: 600px) { .actions-sticky { position: static; background: none; margin: 8px 0 0; padding: 0; } }

/* 모바일에서 2열 행을 1열로 (좁은 날짜 입력 잘림 방지) */
@media (max-width: 559px) { .row.row-stack { grid-template-columns: 1fr; gap: 0; } }

/* 데스크톱: 짧은 입력은 너무 길게 늘이지 않음 */
@media (min-width: 600px) {
  #salary, #wage, #employment-type, .field > input[type="date"] { max-width: 360px; }
}

/* 근무표 입력 안내: 한 줄 요약 + 자세히 */
.guide-more summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: 0.875rem; min-height: 36px; display: flex; align-items: center; }
.guide-more p { margin: 4px 0 0; }

/* 주차 탭: 4주는 360px 안에 같은 폭으로, 그 이상은 가로 스크롤 */
.week-tab { flex: 1 0 68px; min-width: 68px; }
.week-tabs { scrollbar-width: thin; }

/* 날짜 라벨이 두 줄로 갈라지지 않게 */
.day-row { grid-template-columns: 78px 1fr; }
.day-label { white-space: nowrap; }
@media (min-width: 600px) { .day-row { grid-template-columns: 84px auto 1fr; } }

/* 월급 결과: 예상액 먼저 크게, 바로 아래 차액, 그다음 계산 내역 */
.headline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
.stat { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.stat-label { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stat-value.stat-note { font-size: 0.9rem; color: var(--error); font-weight: 700; }
.result .diff { margin: 0 0 16px; font-size: 1rem; }
.table-title { margin: 0 0 6px; font-size: 0.95rem; color: var(--muted); }
@media (max-width: 359px) { .headline { grid-template-columns: 1fr; } }
/* 모바일 계산 내역 카드: 기준 → 예상액 → 적용 일수·산식 */
@media (max-width: 599px) {
  .compare:not(.whp-table) tr { display: flex; flex-direction: column; }
  .compare:not(.whp-table) th { order: 0; }
  .compare:not(.whp-table) td.amount { order: 1; font-size: 1.15rem; }
  .compare:not(.whp-table) td:not(.amount) { order: 2; }
}

/* 홈: 데스크톱에서 카드 2열 */
@media (min-width: 720px) { .card-list { grid-template-columns: 1fr 1fr; } .card { height: 100%; align-content: start; } }
.card-situation { font-size: 0.9rem; color: var(--text); margin: 2px 0 0; padding-left: 0; list-style: none; display: grid; gap: 2px; }
.card-situation li::before { content: "✓ "; color: var(--brand); font-weight: 800; }
/* 주휴 판정표의 예상액 산식은 줄바꿈 허용 (.compare td.amount 의 nowrap 무효화) */
.whp-table td.amount { white-space: normal; min-width: 0; }
.whp-table td.amount .muted { overflow-wrap: anywhere; }
/* 예상액 숫자가 '원'에서 줄바꿈되지 않게, 좁은 화면에서는 글자 크기를 줄임 */
.stat-value { white-space: nowrap; font-size: clamp(1.05rem, 4.6vw, 1.35rem); overflow-wrap: normal; }
.stat-value.stat-note { white-space: normal; }
/* 판정표 카드 다듬기: 주차 제목 아래 잔선 제거, 라벨 한 줄, 금액이 없는 비대상 주는 예상액 줄 숨김 */
.whp-table tbody th { border-bottom: 0 !important; }
.whp-table td::before { white-space: nowrap; text-align: left; }
.whp-table td { justify-content: initial; }
.whp-table tr:not(.st-eligible) td.amount:not(.has-amount) { display: none; }
/* 재검수(2차) 반영 */
.tab-range { white-space: nowrap; font-size: 0.72rem; }                          /* N1 */
.guide-more summary { min-height: 44px; }                                          /* N2 */
.stat-value { font-size: clamp(1.25rem, 5.4vw, 1.45rem); }                         /* N3 */
@media (max-width: 599px) { .compare:not(.whp-table) td.amount { font-size: 1.05rem; } }
#result-title { scroll-margin-top: 16px; }                                         /* N4 */
.result-basis-note { margin: -6px 0 12px; }

/* 자주 묻는 질문 접이식: 적용 기준 영역과 간격 */
.faq-fold { margin-top: 12px; }
.faq-fold .fold-body > h3:first-of-type { margin-top: 12px; }

/* ---------- 홈: 계산기 10종 목록 (검색·분야별 보기·대표 계산기) ---------- */
/* 디자인 토큰(:root 변수)은 Canva 디자인 자료를 받으면 한곳에서 교체한다 */
.container-wide { max-width: 1160px; }
.catalog-tools { display: grid; gap: 12px; margin-bottom: 16px; }
.search-field { margin: 0; }
.search-field input[type="search"] {
  width: 100%; max-width: 520px; min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 0.9rem; font-weight: 700; min-height: 44px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: #0d1a15; } }
.calc-count { margin: 0; font-size: 0.9rem; color: var(--muted); }

.calc-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }   /* 태블릿 2열 */
@media (min-width: 1024px) { .calc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }  /* PC 3열 */
.calc-item { display: flex; min-width: 0; }
.calc-item[hidden] { display: none; }
.calc-item > .card { width: 100%; height: auto; align-content: start; }
@media (min-width: 640px) { .calc-item.is-featured { grid-column: span 2; } }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.card-cat, .status { font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.card-cat { color: var(--muted); background: var(--bg); border: 1px solid var(--border); }
.status-live { color: var(--brand); background: var(--brand-soft); }
.status-soon { color: var(--text); background: var(--range-soft); border: 1px solid var(--range); }
h3.card-title { margin: 0; font-size: 1.15rem; line-height: 1.4; }
.card-featured { border: 2px solid var(--brand); background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); padding: 24px; }
.card-featured h3.card-title { font-size: 1.4rem; }
.card-featured .card-tag { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-featured .card-tag { color: #0d1a15; } }
.card-soon { cursor: default; background: var(--bg); border-style: dashed; }
.card-soon:hover { border-color: var(--border); box-shadow: none; }
.card-soon .card-title { color: var(--muted); }
.card-soon-note { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.no-results { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.catalog + .basis-fold { margin-top: 32px; }
/* 홈 디자인 검토 반영 */
.search-field input::placeholder { color: var(--muted); opacity: 1; }                    /* 다크 모드 대비 */
.card-cat, .status, .card-tag { font-size: 0.8125rem; }                                   /* 13px */
.card-featured { display: flex; flex-direction: column; gap: 6px; }
.card-featured .card-cta { margin-top: auto; padding-top: 8px; }
.hero .lead { max-width: 44em; }
/* 전체 초기화 버튼: 계산 버튼 옆(보조 버튼) */
.actions { display: flex; gap: 10px; align-items: stretch; }
.actions .btn-primary { flex: 1 1 auto; }
.btn-reset { flex: 0 0 auto; min-height: 52px; padding: 8px 16px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.btn-reset:hover { color: var(--error); border-color: var(--error); }

/* =========================================================
   Canva 디자인 시안 반영 (DAHbhGTDh80) — 공통 머리글·바닥글·홈
   ========================================================= */
body { background: var(--bg); }
a { color: var(--brand); }
.panel, .notice, .basis-fold, .faq-fold { border-color: var(--border); box-shadow: var(--shadow); }

/* 머리글: 로고 · 메뉴 · 계산 시작 */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 24px; min-height: 64px; }
.brand { font-size: 1.35rem; font-weight: 900; letter-spacing: -0.03em; color: var(--text); }
.brand-dot { color: var(--brand); }
.main-nav ul { list-style: none; display: flex; justify-content: center; gap: 4px 28px; margin: 0; padding: 0; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; color: var(--text); font-weight: 700; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { color: var(--brand); }
.header-cta.btn { width: auto; min-height: 42px; padding: 8px 18px; font-size: 0.95rem; text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 899px) {
  .header-inner { grid-template-columns: 1fr auto; padding-top: 6px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .main-nav ul { justify-content: flex-start; gap: 4px 18px; }
  .main-nav a { font-size: 0.9rem; }
}
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 10px; }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary, :root:not([data-theme="light"]) .btn-primary:hover { color: #0b1230; }
}

/* 바닥글: 남색 띠 */
.site-footer { margin-top: 56px; padding: 28px 0 36px; background: var(--navy); color: #c9d0ea; border-top: 0; }
.site-footer a { color: #fff; }
.footer-brand { font-size: 1.25rem; font-weight: 900; color: #fff; margin: 0 0 8px; letter-spacing: -0.03em; }
.footer-brand span { color: #7aa5ff; }

/* 홈 히어로 */
.home-hero { display: grid; gap: 28px; padding: 32px 0 12px; align-items: center; }
@media (min-width: 1024px) { .home-hero { grid-template-columns: 1.15fr 1fr; gap: 48px; padding-top: 48px; } }
.eyebrow { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 0.85rem; }
.home-hero h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.2; letter-spacing: -0.04em; font-weight: 900; color: var(--text); }
.home-hero h1 .hl { color: var(--brand); }
.home-hero .lead { color: var(--muted); max-width: 40em; }
.search-hero { position: relative; margin: 20px 0 14px; max-width: 620px; }
.search-hero input[type="search"] {
  width: 100%; min-height: 56px; padding: 12px 18px 12px 50px; font: inherit; font-weight: 600;
  color: #fff; background: var(--brand); border: 2px solid var(--brand); border-radius: 12px; box-shadow: 0 8px 22px rgb(37 99 226 / 0.25);
}
.search-hero input[type="search"]::placeholder { color: rgb(255 255 255 / 0.88); opacity: 1; }
.search-hero input[type="search"]:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.search-icon { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: #fff; pointer-events: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .search-hero input[type="search"] { color: #0b1230; }
  :root:not([data-theme="light"]) .search-hero input[type="search"]::placeholder { color: #1d2b5c; }
  :root:not([data-theme="light"]) .search-icon { color: #0b1230; }
}
.hero-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; color: var(--text); font-weight: 700; }
.stat-label-sm { flex-basis: 100%; color: var(--brand); font-size: 0.85rem; font-weight: 800; }
.stat-num { font-size: 3rem; line-height: 1; font-weight: 900; color: var(--brand); letter-spacing: -0.04em; }
.stat-sub { flex-basis: 100%; font-size: 0.85rem; color: var(--muted); font-weight: 600; }

/* 히어로 오른쪽: 대표 계산기 미리보기 */
.hero-preview { position: relative; }
.hero-preview::before { content: ""; position: absolute; inset: -6% -10% -10% 4%; border-radius: 50%; background: var(--brand-soft); z-index: 0; }
.preview-card { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: 0 16px 40px rgb(30 42 90 / 0.10); }
.preview-title { margin: 0 0 14px; font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.preview-grid { display: grid; gap: 14px; }
@media (min-width: 480px) { .preview-grid { grid-template-columns: 1fr 1fr; } }
.preview-sub { margin: 0 0 8px; font-size: 0.85rem; font-weight: 800; color: var(--text); }
.preview-fields { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.preview-fields li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.85rem; color: var(--muted); background: var(--surface); }
.preview-result { padding: 14px; border-radius: 10px; background: var(--brand-soft); text-align: center; display: grid; align-content: center; gap: 6px; }
.preview-amount { margin: 0; color: var(--brand); font-weight: 800; }
.preview-amount strong { font-size: 0.85rem; color: var(--text); }
.preview-note { margin: 0; font-size: 0.8rem; color: var(--muted); }
.preview-btn.btn { margin-top: 16px; width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 800; }

/* 계산기 목록 */
.catalog { margin-top: 36px; scroll-margin-top: 120px; }
.section-title { font-size: clamp(1.25rem, 3.6vw, 1.6rem); font-weight: 900; letter-spacing: -0.03em; margin: 0 0 6px; color: var(--text); }
.section-desc { margin: 0 0 16px; color: var(--muted); }
.catalog .chips { margin-bottom: 10px; }
.catalog .calc-count { margin-bottom: 14px; }
.calc-grid { gap: 18px; }
.card { border-radius: 16px; border-color: var(--border); box-shadow: var(--shadow); gap: 8px; }
.card:hover { border-color: var(--brand); box-shadow: 0 10px 28px rgb(37 99 226 / 0.12); }
.card-badges { align-items: center; }
.card-no {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 8px;
  border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-weight: 900; font-size: 0.9rem;
}
.card-cat { background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
h3.card-title { font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.card-cta { color: var(--brand); font-weight: 800; margin-top: auto; padding-top: 6px; }
.calc-item > .card { display: flex; flex-direction: column; }
/* 대표 계산기: 파란 카드 */
.card-featured { background: var(--brand); border: 0; color: #fff; padding: 26px; }
.card-featured:hover { background: var(--brand-strong); color: #fff; }
.card-featured h3.card-title { color: #fff; font-size: clamp(1.3rem, 3.4vw, 1.6rem); }
.card-featured .card-desc { color: rgb(255 255 255 / 0.92); }
.card-featured .card-no { background: #fff; color: var(--brand); }
.card-featured .card-cat { background: transparent; border-color: rgb(255 255 255 / 0.6); color: #fff; }
.card-featured .status-live { background: rgb(255 255 255 / 0.18); color: #fff; }
.card-featured .card-tag { background: #fff; color: var(--brand); }
.card-featured .card-cta { align-self: flex-start; margin-top: auto; padding: 10px 22px; border: 1.5px solid rgb(255 255 255 / 0.85); border-radius: 999px; color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card-featured, :root:not([data-theme="light"]) .card-featured h3.card-title,
  :root:not([data-theme="light"]) .card-featured .card-desc, :root:not([data-theme="light"]) .card-featured .card-cat,
  :root:not([data-theme="light"]) .card-featured .status-live, :root:not([data-theme="light"]) .card-featured .card-cta { color: #0b1230; border-color: rgb(11 18 48 / 0.5); }
  :root:not([data-theme="light"]) .card-featured .card-no, :root:not([data-theme="light"]) .card-featured .card-tag { background: #0b1230; color: var(--brand); }
}
.card-soon { background: var(--surface); border-style: dashed; box-shadow: none; }
.card-soon .card-no { background: var(--bg); color: var(--muted); }
.card-soon .card-title { color: var(--muted); }

/* 홈 하단: 적용 기준 + 자주 묻는 질문 */
.home-bottom { display: grid; gap: 24px; margin-top: 40px; align-items: start; }
@media (min-width: 1024px) { .home-bottom { grid-template-columns: 1fr 1fr; gap: 32px; } }
.home-bottom .basis-fold { margin-top: 0; }
.home-faq h2 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 900; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-top: 10px; }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 12px 16px; font-weight: 700;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font-size: 1.4rem; font-weight: 400; color: var(--brand); line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 16px 14px; color: var(--muted); }

/* 계산기 페이지: 시안 색과 맞춘 제목·단계 */
.hero h1 { font-weight: 900; letter-spacing: -0.03em; }
.step { background: var(--brand); }
/* 히어로 장식 원이 모바일에서 화면 밖으로 넘치지 않게 */
.home-hero { overflow-x: clip; }
.hero-preview::before { inset: -6% -4% -8% 4%; }
/* 머리글 배치: 이전 .site-header .container{display:flex} 규칙보다 우선 */
.site-header .header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 24px; min-height: 64px; }
.brand, .header-cta.btn { white-space: nowrap; }
@media (max-width: 899px) {
  .site-header .header-inner { grid-template-columns: 1fr auto; min-height: 0; padding-top: 10px; padding-bottom: 2px; }
}

/* =========================================================
   확정 Canva 시안 (DAHbhUUGboY) — 2열 가로형 컬러 카드 홈
   ========================================================= */
/* 머리글: 로고 마크 + 이름, 오른쪽 메뉴 3개 */
.site-header .header-inner { grid-template-columns: auto 1fr; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: var(--brand) url("/assets/favicon.svg") center / 100% 100% no-repeat;
  box-shadow: 0 4px 12px rgb(37 99 226 / 0.3);
}
.main-nav ul { justify-content: flex-end; gap: 6px 10px; }
.main-nav a { padding: 0 14px; border-radius: 999px; }
.main-nav a[aria-current="true"] { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 899px) {
  .site-header .header-inner { grid-template-columns: 1fr; }
  .main-nav ul { justify-content: flex-start; gap: 4px 6px; }
  .main-nav a { padding: 0 12px; }
}

/* 가운데 정렬 히어로 */
.home-hero-center { display: block; text-align: center; padding: 48px 0 20px; overflow: visible; }
.home-hero-center h1 { font-size: clamp(2rem, 7vw, 3.4rem); margin-bottom: 10px; }
.home-hero-center .lead { margin: 0 auto; max-width: none; font-size: clamp(1rem, 2.6vw, 1.2rem); color: var(--text); opacity: .85; }

/* 검색·분야 (시안에는 없지만 기존 기능 유지, 작게) */
.catalog { margin-top: 20px; }
.catalog-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 8px; }
.search-compact { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-compact input[type="search"] {
  width: 100%; min-height: 46px; padding: 10px 14px 10px 42px; font: inherit;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.search-compact input::placeholder { color: var(--muted); opacity: 1; }
.search-compact .search-icon { left: 14px; width: 20px; height: 20px; color: var(--muted); }
.catalog .chips { margin: 0; }

/* 2열 가로형 카드 (PC 2열, 모바일 1열) */
.calc-grid.calc-grid-2 { grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 720px) { .calc-grid.calc-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.calc-grid-2 .calc-item.is-featured { grid-column: auto; }
.calc-card {
  --tone: #102fa8;
  display: flex; flex-direction: column; gap: 10px; width: 100%; min-height: 220px; padding: 22px 24px;
  border: 0; border-radius: 18px; background: var(--tone); color: #fff; text-decoration: none;
  box-shadow: 0 10px 26px rgb(16 47 168 / 0.18); transition: transform .15s, box-shadow .15s, filter .15s;
}
.calc-card.tone-c1 { --tone: #102fa8; }
.calc-card.tone-c2 { --tone: #075cf5; }
.calc-card.tone-c3 { --tone: #3036b7; }
.calc-card.tone-c4 { --tone: #5635ed; }
a.calc-card:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px rgb(16 47 168 / 0.26); filter: brightness(1.05); }
a.calc-card:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.calc-card .card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.calc-card .card-no { background: #fff; color: var(--tone); min-width: 30px; height: 28px; border-radius: 7px; font-weight: 900; }
.calc-card .card-cat { background: transparent; border: 1.5px solid rgb(255 255 255 / 0.75); color: #fff; }
.calc-card .status-live { background: rgb(255 255 255 / 0.2); color: #fff; border: 0; }
.calc-card .status-soon { background: transparent; color: #fff; border: 1.5px dashed rgb(255 255 255 / 0.8); }
.calc-card .card-tag { background: #fff; color: var(--tone); font-weight: 800; }
.calc-card h3.card-title { margin: 2px 0 0; color: #fff; font-size: clamp(1.25rem, 3.2vw, 1.55rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.3; }
.calc-card .card-desc { color: #fff; opacity: .95; font-size: 0.98rem; }
.calc-card .card-btn {
  align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; min-height: 46px;
  padding: 10px 24px; border: 2px solid #fff; border-radius: 999px; color: #fff; font-weight: 800; background: transparent;
}
a.calc-card:hover .card-btn { background: #fff; color: var(--tone); }
.calc-card .card-btn-soon { border-style: dashed; font-weight: 700; font-size: 0.9rem; opacity: .95; }
.calc-card.card-soon { cursor: default; box-shadow: 0 10px 26px rgb(16 47 168 / 0.12); }
/* 다크 모드에서도 카드 색과 흰 글자는 그대로 (이전 다크 규칙 무효화) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .calc-card, :root:not([data-theme="light"]) .calc-card .card-title,
  :root:not([data-theme="light"]) .calc-card .card-desc, :root:not([data-theme="light"]) .calc-card .card-btn { color: #fff; }
}

/* 최종 Canva 시안 (DAHbhmeHIkE): 분야 색상 체계 — 노동·급여 / 세금·보험 / 주거·부동산 */
:root {
  --cat-labor: #1554d6;  --cat-labor-bg: #e3eeff;  --cat-labor-line: #b9d0fb;
  --cat-tax: #6728cd;    --cat-tax-bg: #f0e8ff;    --cat-tax-line: #d6c2f7;
  /* 지정색 #008B55는 연녹 배경에서 대비 3.94:1이라 작은 글자 기준(4.5:1) 미달 → 같은 계열 #007A4B(4.89:1)로 보정 */
  --cat-realty: #007a4b; --cat-realty-bg: #e1f9ef; --cat-realty-line: #a9e6cc;
}
.home-hero-center { padding: 36px 0 12px; }
.catalog { margin-top: 12px; }

/* 캡슐형 분야 버튼: PC 가로 배열, 모바일 줄바꿈 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { --c: var(--text); --c-bg: var(--surface); --c-line: var(--border);
  min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--c-line);
  background: #fff; color: var(--c); font-weight: 800; }
.chip-all { --c: #1e2a5a; --c-bg: #eaf1fd; --c-line: #cfd8ea; }
.chip-labor { --c: var(--cat-labor); --c-bg: var(--cat-labor-bg); --c-line: var(--cat-labor-line); }
.chip-tax { --c: var(--cat-tax); --c-bg: var(--cat-tax-bg); --c-line: var(--cat-tax-line); }
.chip-realty { --c: var(--cat-realty); --c-bg: var(--cat-realty-bg); --c-line: var(--cat-realty-line); }
.chip:hover { background: var(--c-bg); }
.chip[aria-pressed="true"] { background: var(--c-bg); border: 2px solid var(--c); color: var(--c); box-shadow: 0 2px 8px rgb(30 42 90 / 0.12); padding: 7.5px 17.5px; }
.chip:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip, :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: var(--c); }
}

/* 카드 안 분야 배지: 분야 색상 */
.calc-card .card-cat { border: 1.5px solid transparent; font-weight: 800; }
.calc-card .card-cat.cat-labor { background: var(--cat-labor-bg); color: var(--cat-labor); border-color: var(--cat-labor-line); }
.calc-card .card-cat.cat-tax { background: var(--cat-tax-bg); color: var(--cat-tax); border-color: var(--cat-tax-line); }
.calc-card .card-cat.cat-realty { background: var(--cat-realty-bg); color: var(--cat-realty); border-color: var(--cat-realty-line); }

/* 카드 크기·높이 통일: 모든 행을 같은 높이로 */
.calc-grid.calc-grid-2 { grid-auto-rows: 1fr; }
.calc-grid-2 .calc-item > .calc-card { flex: 1; min-height: 200px; }

/* ===== 계산기 공통 화면 (scripts/gen-calculators.js 페이지) ===== */
.calc-hero { padding-bottom: 4px; }
.calc-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.cat-badge, .basis-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 800; border: 1.5px solid; }
.cat-badge.cat-labor { color: var(--cat-labor); background: var(--cat-labor-bg); border-color: var(--cat-labor-line); }
.cat-badge.cat-tax { color: var(--cat-tax); background: var(--cat-tax-bg); border-color: var(--cat-tax-line); }
.cat-badge.cat-realty { color: var(--cat-realty); background: var(--cat-realty-bg); border-color: var(--cat-realty-line); }
.basis-badge { color: var(--text); background: #fff; border-color: var(--border); font-weight: 700; }
.calc-page .panel, .calc-page .content { background: #fff; color: #1e2a5a; }
.field .opt { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.field input[type="text"], .field input[type="date"], .field select { width: 100%; max-width: 420px; }
.result-stats { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 0 0 18px; }
@media (min-width: 600px) { .result-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.result-stats .stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.result-stats .stat-main { background: var(--brand-soft); border-color: var(--brand); }
.result-stats .stat-label { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.result-stats .stat-value { font-size: 1.25rem; font-weight: 900; color: #1e2a5a; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-stats .stat-main .stat-value { font-size: 1.5rem; color: var(--brand-strong); }
.table-scroll { overflow-x: auto; margin: 0 0 14px; -webkit-overflow-scrolling: touch; }
.detail-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.detail-table th, .detail-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.detail-table th[scope="row"], .detail-table thead th:first-child { text-align: left; }
.detail-table thead th { font-size: 0.8rem; color: var(--muted); }
.detail-table td:nth-child(2), .detail-table td:nth-child(3) { white-space: normal; }
.detail-table tfoot th, .detail-table tfoot td { font-weight: 900; border-top: 2px solid #1e2a5a; border-bottom: 0; }
@media (max-width: 599px) {
  .detail-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .detail-table, .detail-table tbody, .detail-table tfoot, .detail-table tr, .detail-table th, .detail-table td { display: block; width: 100%; }
  .detail-table tr { border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; margin-bottom: 8px; }
  .detail-table th[scope="row"] { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .detail-table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); white-space: normal; text-align: right; }
  .detail-table td:last-child { border-bottom: 0; }
  .detail-table td::before { content: attr(data-label); color: var(--muted); font-weight: 600; text-align: left; flex: none; }
  .detail-table td:empty { display: none; }
  .detail-table tfoot th, .detail-table tfoot td { border-top: 0; }
}
.schedule-fold { margin: 0 0 14px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; }
.schedule-fold > summary { min-height: 44px; display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.schedule-fold .table-scroll { max-height: 420px; overflow: auto; }
.kv-list { margin: 0 0 16px; padding: 0; }
.kv-list .kv { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kv-list dt { font-weight: 700; color: var(--muted); }
.kv-list dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.formula-list { margin: 0 0 16px; padding-left: 20px; }
.formula-list li { margin-bottom: 6px; font-family: inherit; }
.caution ul { margin: 0 0 12px; padding-left: 20px; color: #1e2a5a; }
.caution li { margin-bottom: 6px; }
.howto ol { padding-left: 20px; }
.howto li { margin-bottom: 8px; }
.example { padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.example-case { margin: 0 0 8px; }
.example-steps { margin: 8px 0 0; padding-left: 20px; font-size: 0.92rem; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .related-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.related-link { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: #1e2a5a; text-decoration: none; }
.related-link:hover { border-color: var(--brand); }
.related-link:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.related-link span:last-child { font-size: 0.9rem; color: var(--muted); }
.related-cat { align-self: flex-start; font-size: 0.78rem; font-weight: 800; padding: 1px 10px; border-radius: 999px; }
.related-link.cat-labor .related-cat { color: var(--cat-labor); background: var(--cat-labor-bg); }
.related-link.cat-tax .related-cat { color: var(--cat-tax); background: var(--cat-tax-bg); }
.related-link.cat-realty .related-cat { color: var(--cat-realty); background: var(--cat-realty-bg); }

/* ===== 공통 아코디언: 계산 방법 · 실제 예제 · 공식출처 (모든 계산기) =====
   <details class="basis-fold info-fold"> + <summary class="fold-summary"><h2>…</h2><span class="fold-icon"></span></summary>
   네이티브 details/summary 라 키보드(Enter·Space)·터치·화면 낭독기(펼침/접힘 상태)를 기본 지원한다. */
.info-fold > .fold-summary { justify-content: space-between; min-height: 56px; }
.info-fold > .fold-summary::before { content: none; display: none; }
.info-fold > .fold-summary h2 { flex: 1 1 auto; }
.info-fold .fold-icon {
  flex: none; width: 11px; height: 11px; margin: 0 6px 4px 12px;
  border-right: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
  transform: rotate(45deg); transition: transform .2s ease;
}
.info-fold[open] > .fold-summary .fold-icon { transform: rotate(-135deg); margin-bottom: -4px; }
.info-fold > .fold-summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .info-fold .fold-icon { transition: none; } }
.info-fold .fold-body > section + section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.info-fold .fold-body h3 { margin: 16px 0 8px; font-size: 1.05rem; }
.info-fold .fold-body h4 { margin: 14px 0 8px; font-size: 0.98rem; }

/* ===== UI UX Pro Max 점검 반영 (2026-11-21) ===== */
/* 1) 포커스된 칸이 고정 영역에 가려지지 않게 (WCAG 2.4.11): 고정 헤더·하단 버튼 높이만큼 스크롤 여백 */
html { scroll-padding-top: 84px; }
@media (max-width: 899px) {
  /* 2) 태블릿·모바일에서는 두 줄 머리글(약 98px)을 고정하지 않아 화면을 넓게 쓴다 */
  .site-header { position: static; }
  html { scroll-padding-top: 16px; }
}
@media (max-width: 599px) {
  html { scroll-padding-bottom: 96px; } /* 하단 고정 계산하기 버튼 바(약 74px) */
}
/* 3) 오류 요약 상자 */
.error-summary { margin: 0 0 18px; padding: 14px 16px; border: 2px solid var(--error); border-radius: 12px; background: var(--error-soft); }
.error-summary:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.error-summary-title { margin: 0 0 6px; font-weight: 800; color: var(--error); }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary li { margin: 4px 0; }
.error-summary a { color: var(--error); font-weight: 700; text-decoration: underline; display: inline-block; min-height: 24px; padding: 2px 0; }
/* 4) 터치 영역 44px: 로고·이동 경로 링크 */
.brand { min-height: 44px; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }

/* ===== Taste skill 검토 반영 (2026-11-21) ===== */
/* 건너뛰기 링크가 고정 헤더(z-index 20) 위에 보이도록 */
.skip-link { z-index: 40; }
/* 검색창 이름표를 화면에 표시 */
.search-compact .search-label { display: block; margin: 0 0 6px; font-size: 0.9rem; font-weight: 700; color: var(--text); }
.search-compact .search-icon { top: auto; bottom: 13px; transform: none; }
/* 제목 크기 순서: 홈 아래쪽 소제목(h2)이 카드 제목(h3)보다 크게 */
.home-bottom h2, .home-bottom .fold-summary h2 { font-size: 1.75rem; }
/* 배경이 바뀌는 경계에 여백 */
.catalog { padding-bottom: 32px; }
.home-bottom { padding-bottom: 32px; }
/* 바닥글 링크 터치 영역 */
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
/* 홈 제목 줄 균형 (모바일에서 "30종"만 다음 줄로 떨어지지 않게) */
.home-hero-center h1 { text-wrap: balance; word-break: keep-all; }

/* ===== '세전 월급' 자동 계산 도우미 ===== */
.input-with-action { display: flex; gap: 8px; align-items: stretch; max-width: 520px; }
.input-with-action input { flex: 1 1 auto; min-width: 0; max-width: none; }
.input-with-action .helper-toggle { flex: none; min-height: 48px; padding: 0 16px; white-space: nowrap; }
.pay-helper { margin: 12px 0 0; padding: 16px; border: 1.5px solid var(--brand); border-radius: 12px; background: var(--brand-soft); }
.pay-helper-title { margin: 0 0 10px; font-weight: 800; }
.pay-helper .helper-field { margin-bottom: 14px; }
.pay-helper .helper-field input[type="text"] { width: 100%; max-width: 420px; background: #fff; }
.pay-helper-result:not(:empty) { margin: 4px 0 12px; padding: 10px 14px; border-radius: 10px; background: #fff; }
.pay-helper-result .kv-list { margin: 0; }
.pay-helper-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-helper-actions .btn { min-height: 48px; }
@media (max-width: 599px) {
  .pay-helper { padding: 14px 12px; }
  .pay-helper-actions .btn-primary { flex: 1 1 100%; }
}

/* ===== 계산기 상단 홈 버튼 (이동 경로 대신) ===== */
.home-nav { margin: 16px 0 4px; }
.home-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--border); border-radius: 999px; background: #fff;
  color: var(--brand-strong); font-weight: 800; text-decoration: none;
}
.home-btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.home-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ===== 생활계산서 상단 메뉴 (분야 드롭다운 · 모바일 햄버거) ===== */
.site-header .header-inner { display: flex; align-items: center; gap: 12px 20px; min-height: 64px; flex-wrap: wrap; }
.site-header .brand { flex: none; }
.site-header .main-nav { margin-left: auto; }
.site-header .nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-header .nav-list > li { position: relative; }
.site-header .nav-list > li > a, .site-header .nav-cat {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px;
  background: none; color: var(--text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.site-header .nav-list > li > a:hover { background: var(--brand-soft); }
.site-header .nav-list > li > a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.site-header .cat-labor > .nav-cat { color: var(--cat-labor); }
.site-header .cat-tax > .nav-cat { color: var(--cat-tax); }
.site-header .cat-realty > .nav-cat { color: var(--cat-realty); }
.site-header .cat-labor.is-open > .nav-cat, .site-header .cat-labor.is-current > .nav-cat { background: var(--cat-labor-bg); }
.site-header .cat-tax.is-open > .nav-cat, .site-header .cat-tax.is-current > .nav-cat { background: var(--cat-tax-bg); }
.site-header .cat-realty.is-open > .nav-cat, .site-header .cat-realty.is-current > .nav-cat { background: var(--cat-realty-bg); }
.site-header .nav-cat:focus-visible, .site-header .nav-list a:focus-visible, .site-header .nav-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.nav-caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.has-menu.is-open .nav-caret { transform: rotate(-135deg) translateY(-1px); }
.nav-panel {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 400px; padding: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px rgb(30 42 90 / 0.16);
}
.cat-tax .nav-panel { left: 50%; transform: translateX(-50%); }
.cat-realty .nav-panel { left: auto; right: 0; }
.has-menu.is-open .nav-panel { display: block; }
.nav-panel-title { margin: 0 0 6px 6px; font-size: 0.85rem; font-weight: 800; color: var(--muted); }
.nav-panel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.nav-panel a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--text); font-weight: 600; text-decoration: none; }
.cat-labor .nav-panel a:hover { background: var(--cat-labor-bg); color: var(--cat-labor); }
.cat-tax .nav-panel a:hover { background: var(--cat-tax-bg); color: var(--cat-tax); }
.cat-realty .nav-panel a:hover { background: var(--cat-realty-bg); color: var(--cat-realty); }
.nav-panel .nav-panel-all { margin-top: 8px; justify-content: center; border: 1.5px solid var(--border); font-weight: 800; }
.nav-toggle { display: none; }
@media (max-width: 899px) {
  .site-header .header-inner { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 48px; height: 48px;
    border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: transform .15s, opacity .15s; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-header .main-nav { display: none; width: 100%; margin: 0; }
  .site-header.nav-open .main-nav { display: block; }
  .site-header .nav-list { flex-direction: column; align-items: stretch; gap: 2px; padding: 4px 0 8px; }
  .site-header .nav-list > li > a, .site-header .nav-cat { width: 100%; justify-content: space-between; min-height: 48px; border-radius: 10px; }
  .nav-panel, .cat-tax .nav-panel, .cat-realty .nav-panel { position: static; transform: none; width: auto; margin: 2px 0 6px; padding: 8px; box-shadow: none; border: 0; }
  .cat-labor .nav-panel { background: var(--cat-labor-bg); }
  .cat-tax .nav-panel { background: var(--cat-tax-bg); }
  .cat-realty .nav-panel { background: var(--cat-realty-bg); }
  .nav-panel-title { display: none; }
  .nav-panel .nav-panel-all { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { .nav-caret, .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none; } }

/* ===== 홈: 소개·많이 찾는 계산기·전체 계산기 ===== */
.home-hero-center { padding: 32px 0 8px; }
.home-hero-center h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
.section-title { margin: 0 0 14px; font-size: clamp(1.3rem, 3.4vw, 1.6rem); font-weight: 900; letter-spacing: -0.02em; color: var(--text); }
.section-count { color: var(--brand); }
.top-calcs { margin: 20px 0 40px; }
.top-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.top-item { display: flex; }
.top-card {
  --c: var(--brand); --c-bg: var(--brand-soft);
  flex: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px 16px; padding: 18px 20px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 16px; color: var(--text); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.top-item.cat-labor .top-card { --c: var(--cat-labor); --c-bg: var(--cat-labor-bg); }
.top-item.cat-tax .top-card { --c: var(--cat-tax); --c-bg: var(--cat-tax-bg); }
.top-item.cat-realty .top-card { --c: var(--cat-realty); --c-bg: var(--cat-realty-bg); }
.top-card:hover { border-color: var(--c); box-shadow: 0 10px 24px rgb(30 42 90 / 0.1); transform: translateY(-2px); }
.top-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.top-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--c-bg); color: var(--c); }
.top-icon svg { width: 28px; height: 28px; }
.top-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.top-cat { font-size: 0.8rem; font-weight: 800; color: var(--c); }
.top-card h3.top-title { margin: 0; font-size: 1.15rem; font-weight: 900; color: var(--c); }
.top-desc { font-size: 0.92rem; color: var(--muted); }
.top-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 800; white-space: nowrap; }
@media (max-width: 479px) {
  .top-card { grid-template-columns: auto 1fr; }
  .top-btn { grid-column: 1 / -1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .top-card { transition: none; } .top-card:hover { transform: none; } }

/* ===== 계산기 상세: 왼쪽 목록(PC) · 현재 위치 · 모바일 선택 메뉴 ===== */
.calc-shell { display: block; }
.calc-main { min-width: 0; }
.calc-sidebar { display: none; }
.breadcrumb { margin: 16px 0 4px; font-size: .9rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 2px; color: var(--brand); font-weight: 700; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 700; }
.side-list, .side-other { margin: 0; padding: 0; list-style: none; }
.side-list a, .side-other a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.35; }
.side-list a:hover { background: var(--c-bg); color: var(--c); }
.side-list a[aria-current="page"] { background: var(--c); color: #fff; font-weight: 800; }
.side-other-title { margin: 16px 0 4px; padding: 0 12px; font-size: .85rem; font-weight: 800; color: var(--muted); }
.side-other a { font-weight: 700; }
.side-other .cat-labor { color: var(--cat-labor); }
.side-other .cat-tax { color: var(--cat-tax); }
.side-other .cat-realty { color: var(--cat-realty); }
.side-other a:hover { background: var(--surface); }
.calc-sidebar.cat-labor, .calc-switcher.cat-labor { --c: var(--cat-labor); --c-bg: var(--cat-labor-bg); --c-line: var(--cat-labor-line); }
.calc-sidebar.cat-tax, .calc-switcher.cat-tax { --c: var(--cat-tax); --c-bg: var(--cat-tax-bg); --c-line: var(--cat-tax-line); }
.calc-sidebar.cat-realty, .calc-switcher.cat-realty { --c: var(--cat-realty); --c-bg: var(--cat-realty-bg); --c-line: var(--cat-realty-line); }
.side-list a:focus-visible, .side-other a:focus-visible, .breadcrumb a:focus-visible, .calc-switcher summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* 모바일·태블릿: 상단 선택 메뉴 */
.calc-switcher { margin: 8px 0 4px; border: 1.5px solid var(--c-line); border-radius: 12px; background: var(--c-bg); }
.calc-switcher summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 10px 14px; cursor: pointer; list-style: none; color: var(--c); font-weight: 800; }
.calc-switcher summary::-webkit-details-marker { display: none; }
.calc-switcher summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; flex: none; }
.calc-switcher[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.calc-switcher-body { padding: 4px 8px 10px; background: #fff; border-radius: 0 0 10px 10px; }

@media (min-width: 900px) {
  .calc-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
  .calc-main { max-width: 820px; }
  .calc-sidebar { display: block; position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; margin-top: 20px; padding: 14px 8px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
  .side-cat { margin: 0 0 8px; padding: 6px 12px; border-radius: 10px; background: var(--c-bg); color: var(--c); font-weight: 900; }
  .calc-switcher { display: none; }
}
@media (prefers-reduced-motion: reduce) { .calc-switcher summary::after { transition: none; } }

/* ===== 상단 메뉴 펼침: 항목별 카드(분야 색 아이콘 · 이름 · 한 줄 설명) ===== */
.has-menu.cat-labor { --c: var(--cat-labor); --c-bg: var(--cat-labor-bg); --c-line: var(--cat-labor-line); }
.has-menu.cat-tax { --c: var(--cat-tax); --c-bg: var(--cat-tax-bg); --c-line: var(--cat-tax-line); }
.has-menu.cat-realty { --c: var(--cat-realty); --c-bg: var(--cat-realty-bg); --c-line: var(--cat-realty-line); }
.nav-panel { width: 620px; padding: 16px; border-top: 4px solid var(--c); }
.nav-panel-title { color: var(--c); }
.nav-panel ul { gap: 8px; }
.nav-panel ul a, .cat-labor .nav-panel ul a, .cat-tax .nav-panel ul a, .cat-realty .nav-panel ul a {
  align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.nav-panel ul a:hover { border-color: var(--c-line); background: var(--c-bg); color: var(--text); transform: translateY(-1px); }
.nav-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--c-bg); color: var(--c); }
.nav-panel ul a:hover .nav-ico { background: var(--c); color: #fff; }
.nav-txt { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.nav-name { font-weight: 800; color: var(--text); line-height: 1.3; }
.nav-panel ul a:hover .nav-name { color: var(--c); }
.nav-desc { font-size: .8rem; font-weight: 500; color: var(--muted); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.nav-panel .nav-panel-all { color: var(--c); border-color: var(--c-line); }
.nav-panel .nav-panel-all:hover { background: var(--c-bg); }
@media (max-width: 899px) {
  .nav-panel { border-top: 0; }
  .nav-panel ul { grid-template-columns: 1fr; gap: 6px; }
  .nav-panel ul a { min-height: 56px; }
}
@media (min-width: 900px) and (max-width: 1100px) { .nav-panel { width: 540px; } }
@media (prefers-reduced-motion: reduce) { .nav-panel ul a { transition: none; } .nav-panel ul a:hover { transform: none; } }
@media (min-width: 900px) and (max-width: 1100px) { .cat-labor .nav-panel { left: 50%; transform: translateX(-50%); } }
.nav-panel ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nav-panel ul li { min-width: 0; }
.nav-panel ul a { width: 100%; box-sizing: border-box; }
@media (max-width: 899px) { .nav-panel ul { grid-template-columns: minmax(0, 1fr); } }
.nav-desc { -webkit-line-clamp: 2; word-break: keep-all; overflow-wrap: anywhere; }
.main-nav .nav-panel ul a { white-space: normal; }

/* ===== Impeccable 홈 검토 반영 (2026-11-22) ===== */
.breadcrumb a { min-height: 44px; }

/* 맨 위 검색: 소개 바로 아래, 입력 즉시 바로가기 목록 */
.hero-search { position: relative; max-width: 560px; margin: 24px auto 0; text-align: left; }
.hero-search .search-compact { max-width: none; }
.hero-search .search-label { text-align: center; font-size: 1rem; margin-bottom: 8px; }
.hero-search .search-compact input[type="search"] { min-height: 56px; padding-left: 48px; font-size: 1.05rem; border: 2px solid var(--border); box-shadow: 0 6px 20px rgb(30 42 90 / 0.08); }
.hero-search .search-compact input[type="search"]:focus { border-color: var(--brand); outline: 3px solid var(--focus); outline-offset: 2px; }
.hero-search .search-compact .search-icon { left: 18px; bottom: 18px; }
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% - 26px); z-index: 15; margin: 0; padding: 8px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 40px rgb(30 42 90 / 0.18);
}
.search-suggest[hidden] { display: none; }
.suggest-item a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.suggest-item a:hover, .suggest-item a:focus-visible { background: var(--c-bg); outline: none; }
.suggest-item a:focus-visible { box-shadow: inset 0 0 0 2px var(--c); }
.suggest-item .card-ico { width: 36px; height: 36px; border-radius: 9px; }
.suggest-item .card-ico svg { width: 20px; height: 20px; }
.suggest-name { flex: 1; min-width: 0; font-weight: 800; }
.suggest-cat { flex: none; font-size: .8rem; font-weight: 800; color: var(--c); }
.suggest-more a { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 4px; border-top: 1px solid var(--border); color: var(--brand); font-weight: 800; text-decoration: none; }
.suggest-none { padding: 12px; color: var(--muted); }
.search-privacy { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: .88rem; color: var(--muted); }
.search-privacy svg { flex: none; color: var(--cat-realty); }

/* 분야 색 공통 변수 */
.cat-labor { --c: var(--cat-labor); --c-bg: var(--cat-labor-bg); --c-line: var(--cat-labor-line); }
.cat-tax { --c: var(--cat-tax); --c-bg: var(--cat-tax-bg); --c-line: var(--cat-tax-line); }
.cat-realty { --c: var(--cat-realty); --c-bg: var(--cat-realty-bg); --c-line: var(--cat-realty-line); }

/* 전체 계산기 카드: 흰 바탕 + 분야 색 아이콘·버튼 (차분하게, 위 '많이 찾는 계산기'보다 한 단계 아래) */
.calc-grid.calc-grid-2 { gap: 12px; grid-auto-rows: auto; }
.calc-grid-2 .calc-item > .calc-card, .calc-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; min-height: 0; padding: 16px 18px;
  background: var(--surface); color: var(--text); border: 1.5px solid var(--border); border-radius: 14px; box-shadow: none; filter: none;
  transition: border-color .15s, background-color .15s, transform .15s;
}
a.calc-card:hover { color: var(--text); background: var(--surface); border-color: var(--c); box-shadow: 0 8px 20px rgb(30 42 90 / 0.08); filter: none; transform: translateY(-1px); }
a.calc-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-ico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--c-bg); color: var(--c); }
.card-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.calc-card .card-cat, .calc-card .card-cat.cat-labor, .calc-card .card-cat.cat-tax, .calc-card .card-cat.cat-realty {
  display: inline; padding: 0; border: 0; background: none; color: var(--c); font-size: .8rem; font-weight: 800;
}
.calc-card h3.card-title { margin: 0; color: var(--text); font-size: 1.08rem; font-weight: 800; letter-spacing: -0.02em; }
a.calc-card:hover h3.card-title { color: var(--c); }
.calc-card .card-desc { color: var(--muted); opacity: 1; font-size: .9rem; line-height: 1.45; }
.calc-card .card-btn, a.calc-card:hover .card-btn {
  align-self: center; margin: 0; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--c-line); border-radius: 999px;
  background: var(--surface); color: var(--c); font-size: .9rem; white-space: nowrap;
}
a.calc-card:hover .card-btn { background: var(--c); border-color: var(--c); color: #fff; }
.calc-card .status-soon { margin-left: 6px; padding: 1px 8px; border: 1.5px dashed var(--border); border-radius: 999px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.calc-card.card-soon { background: var(--bg); }
@media (max-width: 599px) {
  .calc-grid-2 .calc-item > .calc-card, .calc-card { grid-template-columns: auto minmax(0, 1fr); padding: 12px 14px; gap: 2px 12px; }
  .calc-card .card-btn { display: none; }
  .card-ico { width: 40px; height: 40px; }
  .calc-card .card-desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: .85rem; }
  .calc-card .card-btn-soon { display: block; grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .calc-card { transition: none; } a.calc-card:hover { transform: none; } }

/* 많이 찾는 계산기: 작은 화면에서는 2열 타일 (아이콘·분야·이름) */
@media (max-width: 479px) {
  .top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .top-card { grid-template-columns: 1fr; align-content: start; gap: 8px; padding: 14px; }
  .top-icon { width: 44px; height: 44px; }
  .top-card h3.top-title { font-size: 1rem; word-break: keep-all; }
  .top-desc, .top-btn { display: none; }
}

/* 분야 버튼: 선택된 분야는 분야 색으로 채움 */
.chip[aria-pressed="true"], .chip-all[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.chip-all { --c: #1e2a5a; }

/* 결과 없음: 다른 분야 안내 */
.no-results { display: grid; justify-items: center; gap: 10px; }
.no-results p { margin: 0; }

/* 상단 메뉴 펼침: 둥근 상자 위 색 띠 대신 분야 이름표 */
.nav-panel { border-top: 1px solid var(--border); }
.nav-panel-title { display: inline-flex; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px; background: var(--c-bg); color: var(--c); }

/* ===== 다크 모드: 분야 색을 어두운 바탕용으로, 흰 고정 배경 제거 ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cat-labor: #8fb4ff; --cat-labor-bg: #1b2a57; --cat-labor-line: #34509a;
    --cat-tax: #c4a6ff;   --cat-tax-bg: #2a1f55;   --cat-tax-line: #5a43a0;
    --cat-realty: #5fd6a6; --cat-realty-bg: #10352b; --cat-realty-line: #2a7a5e;
  }
  :root:not([data-theme="light"]) .nav-toggle { background: var(--surface); border-color: var(--border); }
  :root:not([data-theme="light"]) .nav-toggle-bars, :root:not([data-theme="light"]) .nav-toggle-bars::before, :root:not([data-theme="light"]) .nav-toggle-bars::after { background: var(--text); }
  :root:not([data-theme="light"]) .nav-open .nav-toggle-bars { background: transparent; }
  :root:not([data-theme="light"]) .top-card, :root:not([data-theme="light"]) .nav-panel,
  :root:not([data-theme="light"]) .nav-panel ul a, :root:not([data-theme="light"]) .nav-panel .nav-panel-all,
  :root:not([data-theme="light"]) .calc-sidebar, :root:not([data-theme="light"]) .calc-switcher-body,
  :root:not([data-theme="light"]) .chip, :root:not([data-theme="light"]) .basis-badge { background: var(--surface); }
  :root:not([data-theme="light"]) .chip[aria-pressed="true"] { background: var(--c); color: #0e1430; }
  :root:not([data-theme="light"]) .chip-all { --c: #e7ebf7; }
  :root:not([data-theme="light"]) .top-btn, :root:not([data-theme="light"]) a.calc-card:hover .card-btn,
  :root:not([data-theme="light"]) .side-list a[aria-current="page"], :root:not([data-theme="light"]) .nav-panel ul a:hover .nav-ico { color: #0e1430; }
  :root:not([data-theme="light"]) .calc-card, :root:not([data-theme="light"]) .calc-card .card-title { color: var(--text); }
  :root:not([data-theme="light"]) .calc-card .card-desc { color: var(--muted); }
  :root:not([data-theme="light"]) .calc-card .card-btn { color: var(--c); }
}
.no-results[hidden] { display: none; }
.search-suggest { top: calc(100% + 6px); }

/* ===== Impeccable 계산기 페이지 검토 반영 (2026-11-22) ===== */
/* 결과 맨 위: 핵심 답을 크게 */
.result-hero { margin: 4px 0 16px; padding: 20px 20px 16px; border-radius: 16px; background: var(--brand-soft); border: 1.5px solid #c9d8fb; }
.calc-page.cat-labor .result-hero, .result-hero { --hero-c: var(--brand); }
.hero-label { margin: 0; font-size: 1rem; font-weight: 800; color: var(--text); }
.hero-value { margin: 4px 0 6px; font-size: clamp(2rem, 8vw, 2.6rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.15; color: var(--brand-strong, #1c4fc4); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hero-basis { margin: 0; font-size: .85rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-actions .btn { min-height: 44px; background: #fff; font-weight: 700; }
.copy-status { margin: 8px 0 0; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.copy-status:empty { display: none; }
.result-stats .stat-main { background: #fff; border-color: var(--border); }
.result-stats .stat .stat-value, .result-stats .stat-main .stat-value { font-size: 1.15rem; }
/* 입력이 바뀐 뒤의 예전 결과 */
.stale-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #fff6e0; border: 1.5px solid #e9c46a; }
.stale-bar[hidden] { display: none; }
.stale-bar p { margin: 0; font-weight: 700; color: #5b4300; }
.result.is-stale #result-body { opacity: .45; filter: grayscale(.6); transition: opacity .2s; }
@media (prefers-reduced-motion: reduce) { .result.is-stale #result-body { transition: none; } }
/* 빠른 금액 버튼 */
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.quick-btn { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.quick-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.quick-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 자동 계산 도우미: 열려 있는 동안 아래 고정 버튼 숨김, 넣기 버튼을 도우미 안 아래에 고정 */
form.helper-open .actions-sticky { display: none; }
.pay-helper .pay-helper-actions { position: sticky; bottom: 0; z-index: 4; margin: 12px -14px -14px; padding: 10px 14px; background: inherit; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.helper-more { margin-top: 8px; border: 1px dashed var(--border); border-radius: 10px; }
.helper-more > summary { display: flex; align-items: center; min-height: 44px; padding: 0 12px; cursor: pointer; font-weight: 700; color: var(--brand); }
.helper-more[open] > summary { border-bottom: 1px dashed var(--border); }
.helper-more > .helper-field { padding: 0 12px; }
/* 안내 상자: 둥근 상자 왼쪽 두꺼운 띠 대신 옅은 바탕 */
.notice { border-left: 1px solid var(--border); background: var(--brand-soft); }
.notice-warn { border-color: #f3c3bd; background: var(--error-soft); }
/* 관련 계산기: 제목과 같은 선에 정렬, 띠 배경 제거 */
.calc-page .content.related, .content.related { background: transparent; border: 0; padding: 0; box-shadow: none; }
.content .related-list { padding: 0; }
/* 접기 메뉴 화살표 통일 (자주 묻는 질문도 오른쪽 꺾쇠) */
.faq-fold > .fold-summary { justify-content: space-between; min-height: 56px; }
.faq-fold > .fold-summary::before { content: none; display: none; }
.faq-fold > .fold-summary::after { content: ""; flex: none; width: 11px; height: 11px; margin: 0 6px 4px 12px; border-right: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(45deg); transition: transform .2s ease; }
.faq-fold[open] > .fold-summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
@media (prefers-reduced-motion: reduce) { .faq-fold > .fold-summary::after { transition: none; } }
/* 출처 링크·현재 위치 '홈' 터치 영역 */
.sources a { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb #home-link { padding: 0 8px; margin: 0 -8px; }

/* ===== Impeccable 홈 재검토 반영 (2026-11-22) ===== */
/* 전체 계산기 카드: 버튼 대신 카드 전체가 링크, 오른쪽 꺾쇠 */
.card-go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; color: var(--muted); transition: background-color .15s, color .15s, transform .15s; }
a.calc-card:hover .card-go, a.calc-card:focus-visible .card-go { background: var(--c); color: #fff; transform: translateX(2px); }
@media (max-width: 599px) { .card-go { display: none; } }
@media (prefers-reduced-motion: reduce) { .card-go { transition: none; } a.calc-card:hover .card-go { transform: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a.calc-card:hover .card-go { color: #0e1430; } }
/* 모바일 분야별 더 보기 */
.more-item { list-style: none; }
.more-btn { width: 100%; min-height: 48px; border: 1.5px dashed var(--c-line); border-radius: 12px; background: var(--c-bg); color: var(--c); font: inherit; font-weight: 800; cursor: pointer; }
.more-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 검색어 표시 (위 검색과 아래 목록 연결) */
.active-query { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.active-query[hidden] { display: none; }
.query-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--brand); border-radius: 999px; background: var(--brand-soft); color: var(--brand); font: inherit; font-weight: 800; cursor: pointer; }
.query-tag:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 결과 없을 때 분야 링크 */
.suggest-none { line-height: 1.6; }
.suggest-cat-link { display: inline-flex; align-items: center; min-height: 44px; margin: 0 4px; padding: 0 12px; border-radius: 999px; background: var(--c-bg); color: var(--c); font-weight: 800; text-decoration: none; }
/* 아래쪽: 한 줄로 (이용 가이드가 혼자 비어 보이지 않게) */
@media (min-width: 1024px) { .home-bottom { grid-template-columns: 1fr; max-width: 860px; margin-left: auto; margin-right: auto; } }
.org-sources { margin-top: 8px; }
.basis-fold .fold-body li a { display: inline-flex; align-items: center; min-height: 44px; }
/* 상단 메뉴 '홈' 최소 폭, 비전송 안내 줄바꿈 균형 */
.site-header .nav-list > li > a { min-width: 44px; justify-content: center; }
.search-privacy { text-wrap: balance; text-align: center; }

/* 로고: 그라데이션 육각형 (사용자 제공 이미지) */
.brand-mark { background: url("/assets/icons/logo-mark.png") center / contain no-repeat; border-radius: 0; box-shadow: none; width: 36px; height: 36px; }
