/* ══════════════════════════════════════════════════════════════
   2026 자동차세 연납·겨울 유류비 계산기 — styles.css
   모바일 퍼스트(375~430px), 데스크톱은 중앙 정렬 카드형
   ══════════════════════════════════════════════════════════════ */

:root {
  --ink: #1b2333;
  --ink-2: #3b465c;
  --ink-3: #6a7488;
  --line: #dbe4ef;
  --line-soft: #e9f0f8;
  --bg: #f4f7fb;
  --bg-2: #e7eef7;
  --card: #ffffff;
  --field: #f2f6fb;
  --brand: #1e2a44;
  --brand-deep: #131c30;
  --on-brand: #ffffff;
  --brand-soft: #e8edf6;
  --gold: #a15c07;
  --gold-soft: #fbeed9;
  --credit: #2563eb;
  --check: #0f7a55;
  --market: #b8860b;
  --refund: #0f7a55;
  --refund-soft: #e5f4ee;
  --due: #b23a2e;
  --due-soft: #fbece9;
  --warn: #9a5b12;
  --warn-soft: #fdf2e0;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(27, 35, 51, 0.05), 0 18px 34px -26px rgba(27, 35, 51, 0.45);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", "맑은 고딕",
    Roboto, "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f8;
    --ink-2: #c7d1e0;
    --ink-3: #93a1b6;
    --line: #2a3548;
    --line-soft: #222c3d;
    --bg: #0a1120;
    --bg-2: #070c15;
    --card: #131d2e;
    --field: #0f1826;
    --brand: #9db6e8;
    --brand-deep: #0a1220;
    --on-brand: #07101d;
    --brand-soft: #1b2a44;
    --gold: #f0b95e;
    --gold-soft: #2c2314;
    --credit: #7aa7ff;
    --check: #57c9a3;
    --market: #e0b95c;
    --refund: #6fd6a8;
    --refund-soft: #12291f;
    --due: #ff9b8c;
    --due-soft: #2c1815;
    --warn: #f0c07a;
    --warn-soft: #2b2113;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 34px -26px rgba(0, 0, 0, 0.9);
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 50% -240px, rgba(30, 42, 68, 0.10), transparent 70%),
    radial-gradient(800px 400px at 100% 10%, rgba(161, 92, 7, 0.08), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

main,
.app-header,
.tabs {
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.ad-slot,
.app-footer {
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

main { padding-bottom: 40px; display: block; }

h1, h2, h3 { margin: 0; line-height: 1.32; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
button, a, summary, label { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); }

.sr-only {
  position: absolute; 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: -999px; top: 0; z-index: 100;
  padding: 12px 18px; background: var(--brand); color: var(--on-brand);
  border-radius: 0 0 12px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

/* ── 헤더 ───────────────────────────────────────────────────── */
.app-header { padding-top: 18px; padding-bottom: 12px; }

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, #26365a, #131c30);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  box-shadow: 0 6px 16px -8px rgba(19, 28, 48, 0.7), inset 0 1px 0 rgba(255,255,255,.18);
}

.brand-text { min-width: 0; }
.brand-text h1 { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.brand-text p { margin-top: 2px; font-size: 12px; color: var(--ink-3); font-weight: 600; }

.year-badge {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 998px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

/* ── 탭 ─────────────────────────────────────────────────────── */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-top: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(8px);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.tab.is-active {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 6px 16px -10px rgba(30, 42, 68, 0.9);
}

.tab-num {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--ink-3) 16%, transparent);
  font-size: 11px;
  font-weight: 800;
}
.tab.is-active .tab-num { background: rgba(255,255,255,.18); }

/* ── 패널·리드 ──────────────────────────────────────────────── */
.panel { display: none; }
.panel.is-active { display: block; }

.lead {
  margin: 0 2px 16px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.lead strong { color: var(--ink); font-weight: 800; }

/* ── 카드 ───────────────────────────────────────────────────── */
.card {
  position: relative;
  margin: 0 0 14px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 16.5px; font-weight: 800; letter-spacing: -0.025em;
}
.card-hint { flex: 0 0 auto; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

.step {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 23px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .02em;
}

.field-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.field-label:first-of-type { margin-top: 0; }

.opt {
  display: inline-block;
  margin-left: 3px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--field);
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: 1px;
}

/* ── 금액 입력 ──────────────────────────────────────────────── */
.money-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.money-field:focus-within {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent);
}
.money-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.money-input::placeholder { color: var(--ink-3); font-weight: 600; }
.money-field .unit { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.money-field.sm { padding: 0 10px 0 12px; }
.money-field.sm .money-input { padding: 10px 0; font-size: 18px; }

.fine {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-3);
}
.fine strong { color: var(--ink-2); }
.note-box {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--gold-soft);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.note-box strong { color: var(--ink); }

/* ── 칩 ─────────────────────────────────────────────────────── */
.chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 9px;
}
.chips-grid button {
  padding: 9px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.chips-grid button:hover { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.chips-grid button.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

/* ── 스테퍼 ─────────────────────────────────────────────────── */
.stepper-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
}
.stepper output {
  min-width: 46px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.step-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.step-btn:hover { border-color: var(--gold); color: var(--gold); }

.limit-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--line-soft);
}
.limit-readout div { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.limit-readout span { font-size: 10.5px; color: var(--ink-3); font-weight: 700; }
.limit-readout strong { font-size: 13.5px; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; }

/* ── 결제수단 목록 ──────────────────────────────────────────── */
.money-list { display: flex; flex-direction: column; gap: 8px; }
.money-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  align-items: center;
  gap: 10px;
}
.money-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.money-row label em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
}
.dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.dot-credit { background: var(--credit); }
.dot-check { background: var(--check); }
.dot-market { background: var(--market); }
.dot-transit { background: #7c5cbf; }
.dot-culture { background: #c2578a; }
.dot-paid { background: var(--brand); }
.dot-final { background: var(--refund); }

/* ── 게이지 ─────────────────────────────────────────────────── */
.gauge-block { margin-top: 16px; }
.bar-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.bar-labels strong { font-size: 13px; color: var(--ink); font-weight: 800; text-align: right; }
.gauge {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: var(--field);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.gauge-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width .35s ease;
}
.gauge-fill.is-over { background: linear-gradient(90deg, var(--check), var(--refund)); }
.gauge-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
}

/* ── 슬라이더 ───────────────────────────────────────────────── */
.slider {
  width: 100%;
  margin: 14px 0 4px;
  accent-color: var(--brand);
  height: 28px;
}
.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
}

/* ── 결과 카드 ──────────────────────────────────────────────── */
.result-card {
  position: relative;
  margin: 18px 0 14px;
  padding: 20px 18px 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: var(--radius);
  background:
    radial-gradient(700px 240px at 90% -20%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%),
    var(--card);
  box-shadow: 0 2px 4px rgba(27,35,51,.05), 0 22px 46px -28px rgba(27,35,51,.5);
  overflow: hidden;
}
.result-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.result-head { margin-bottom: 16px; }
.verdict-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--refund-soft);
  color: var(--refund);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .01em;
}
.verdict-badge.is-due { background: var(--due-soft); color: var(--due); }
.verdict-badge.is-warn { background: var(--warn-soft); color: var(--warn); }
.verdict-badge.is-zero { background: var(--field); color: var(--ink-3); }

.result-title {
  font-size: clamp(21px, 5.6vw, 27px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.28;
}
.result-sub {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
  word-break: keep-all;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 560px) { .stat-grid { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); } }
@media (max-width: 559px) { .stat-grid > .stat:last-child:nth-child(3) { grid-column: span 2; } }
.stat {
  padding: 11px 11px 10px;
  border-radius: 13px;
  background: var(--field);
  border: 1px solid var(--line-soft);
  min-width: 0;
}
.stat-em {
  background: color-mix(in srgb, var(--gold) 14%, var(--card));
  border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
}
.stat-label { display: block; font-size: 10.5px; font-weight: 700; color: var(--ink-3); }
.stat-value {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.stat-note { display: block; margin-top: 2px; font-size: 10px; color: var(--ink-3); }

/* ── 비중 바 ────────────────────────────────────────────────── */
.ratio-block, .refund-bar-block { margin-top: 16px; }
.ratio-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--field);
  border: 1px solid var(--line-soft);
}
.refund-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--field);
  border: 1px solid var(--line-soft);
}
.ratio-part, .refund-part {
  display: block;
  height: 100%;
  transition: width .35s ease;
  min-width: 0;
}
.refund-part { flex: 0 0 auto; }
.part-paid { background: var(--brand); }
.part-final { background: var(--refund); }
.part-final.is-due { background: var(--due); }
.part-credit { background: var(--credit); }
.part-check { background: var(--check); }
.part-market { background: var(--market); }
.part-paid { background: var(--brand); }
.part-final { background: var(--refund); }
.bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 7px;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
}
.bar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bar-legend b { color: var(--ink-2); font-weight: 800; }

/* ── 플랜 ───────────────────────────────────────────────────── */
.plan-block {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--brand) 5%, var(--card));
  border: 1px solid color-mix(in srgb, var(--brand) 16%, var(--line));
}
.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.plan-head h3 { font-size: 14.5px; font-weight: 800; letter-spacing: -0.02em; }
.plan-gain {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--refund);
  background: var(--refund-soft);
  padding: 3px 8px;
  border-radius: 999px;
}
.plan-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: plan;
}
.plan-steps li {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line-soft);
}
.plan-steps li::before {
  counter-increment: plan;
  content: counter(plan);
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 11.5px;
  font-weight: 800;
}
.plan-steps .step-body { min-width: 0; flex: 1 1 auto; }
.plan-steps .step-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}
.plan-steps .step-title b { color: var(--gold); white-space: nowrap; font-size: 13px; }
.plan-steps .step-detail { margin-top: 3px; font-size: 11.5px; line-height: 1.55; color: var(--ink-3); }
.plan-steps li.step-empty { font-size: 12px; color: var(--ink-3); }
.plan-steps li.step-empty::before { content: "i"; background: var(--ink-3); }
.plan-summary {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-2);
}
.plan-summary strong { color: var(--ink); }

/* ── 비교 표 ────────────────────────────────────────────────── */
.compare-block { margin-top: 18px; }
.compare-block h3 { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.compare-table th {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-3);
}
.compare-table th:first-child { text-align: left; }
.compare-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.compare-table td:first-child { text-align: left; font-weight: 700; white-space: normal; }
.compare-table tr.is-best td { color: var(--refund); font-weight: 800; }
.compare-table tr:last-child td { border-bottom: 0; }

/* ── 버튼 ───────────────────────────────────────────────────── */
.btn-primary, .btn-ghost, .btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.btn-primary {
  padding: 12px 16px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  padding: 11px 15px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-text {
  padding: 10px 8px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
}
.wide { width: 100%; margin-top: 16px; }
.link-btn {
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

/* ── 아코디언 ───────────────────────────────────────────────── */
.accordion { padding: 0; }
.accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}
.accordion > summary::-webkit-details-marker { display: none; }
.accordion .chev { transition: transform .16s ease; color: var(--ink-3); font-size: 18px; }
.accordion[open] .chev { transform: rotate(180deg); }
.accordion-body { padding: 0 18px 16px; }

.sub-accordion {
  margin-top: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 4px;
}
.sub-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 0 2px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-2);
}
.sub-accordion > summary::-webkit-details-marker { display: none; }
.sub-accordion > .accordion-body { padding: 4px 0 0; }
.sub-head {
  margin: 20px 0 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

/* ── 스위치 ─────────────────────────────────────────────────── */
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 2px;
  cursor: pointer;
}
.switch-input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.switch-ui {
  position: relative;
  flex: 0 0 auto;
  width: 42px; height: 24px;
  border-radius: 999px;
  background: var(--line);
  transition: background .15s ease;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
  transition: transform .15s ease;
}
.switch-input:checked + .switch-ui { background: var(--check); }
.switch-input:checked + .switch-ui::after { transform: translateX(18px); }
.switch-input:focus-visible + .switch-ui { outline: 3px solid var(--gold); outline-offset: 2px; }
.switch-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* ── 계산 과정 표 ───────────────────────────────────────────── */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.breakdown-table th, .breakdown-table td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.breakdown-table th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-3);
}
.breakdown-table td { font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.breakdown-table tr.sum th, .breakdown-table tr.sum td {
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}
.breakdown-table tr.final th, .breakdown-table tr.final td {
  border-top: 2px solid var(--brand);
  color: var(--refund);
  font-weight: 800;
  font-size: 13.5px;
}

/* ── 세액공제 목록 ──────────────────────────────────────────── */
.credit-list, .hint-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.credit-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--line-soft);
}
.credit-list .c-name { font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.credit-list .c-note { margin-top: 2px; font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.credit-list .c-amount { flex: 0 0 auto; text-align: right; font-size: 13.5px; font-weight: 800; color: var(--ink); }
.credit-list .c-amount small { display: block; font-size: 10px; color: var(--ink-3); font-weight: 600; }
.credit-list li.is-off { opacity: .62; }

.hint-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--field);
  border: 1px solid var(--line-soft);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.hint-list b { color: var(--gold); font-weight: 800; white-space: nowrap; }

/* ── 왜 카드 ────────────────────────────────────────────────── */
.why-card { background: color-mix(in srgb, var(--gold) 5%, var(--card)); }
.why-card h2 { font-size: 15.5px; font-weight: 800; margin-bottom: 8px; }
.why-card p { font-size: 12.5px; line-height: 1.72; color: var(--ink-2); margin-bottom: 8px; }
.why-card p:last-child { margin-bottom: 0; }
.why-card .fine { font-size: 11.5px; color: var(--ink-3); }

/* ── 관련 앱 ────────────────────────────────────────────────── */
.related-apps { margin: 18px 0 14px; }
.related-apps h2 { font-size: 14px; font-weight: 800; margin: 0 2px 9px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.related-app {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  text-decoration: none;
  transition: border-color .14s ease, transform .14s ease;
}
.related-app:hover { border-color: var(--gold); transform: translateY(-2px); }
.related-app strong { font-size: 13px; font-weight: 800; color: var(--ink); }
.related-app span { font-size: 11px; line-height: 1.5; color: var(--ink-3); }

/* ── FAQ ────────────────────────────────────────────────────── */
.faq h2 { font-size: 15.5px; font-weight: 800; margin-bottom: 6px; }
.faq details { border-top: 1px solid var(--line-soft); padding: 10px 0 2px; }
.faq details:first-of-type { border-top: 0; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  display: flex;
  gap: 8px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; color: var(--gold); font-weight: 800; flex: 0 0 auto; }
.faq details p {
  margin: 4px 0 8px 20px;
  font-size: 12px;
  line-height: 1.72;
  color: var(--ink-3);
}

/* ── 공유 ───────────────────────────────────────────────────── */
.share-row { display: flex; gap: 8px; margin-top: 10px; }
.share-row .btn-primary, .share-row .btn-ghost { flex: 1 1 0; }
.share-card h2 { font-size: 15.5px; font-weight: 800; }
.toast {
  min-height: 18px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--refund);
  font-weight: 700;
  opacity: 0;
  transition: opacity .18s ease;
}
.toast.is-on { opacity: 1; }

/* ── 출처 ───────────────────────────────────────────────────── */
.source-card h2 { font-size: 15.5px; font-weight: 800; margin-bottom: 8px; }
.source-list {
  margin: 0;
  padding-left: 18px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-3);
}
.source-list li { margin-bottom: 4px; }

/* ── 광고 ───────────────────────────────────────────────────── */
.ad-slot {
  margin: 16px 0;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
}
.ad-slot[hidden] { display: none; }
.ad-slot.is-placeholder {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed var(--line);
  background: var(--field);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 10px;
}

/* ── 설치 카드 ──────────────────────────────────────────────── */
.install-card { text-align: center; }
.install-card h2 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }

/* ── 관련 글 ────────────────────────────────────────────────── */
.related-post {
  margin: 18px 0 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--gold) 7%, var(--card));
}
.related-post__label {
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--gold);
  text-transform: uppercase;
}
.related-post__link {
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  color: var(--ink);
  text-decoration: none;
}
.related-post__link:hover { text-decoration: underline; }
.related-post__note { margin-top: 5px; font-size: 10.5px; color: var(--ink-3); }

/* ── 푸터 ───────────────────────────────────────────────────── */
.app-footer {
  padding: 18px 16px 34px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-3);
}
.app-footer .disclaimer {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--line-soft);
}
.app-footer .disclaimer strong { color: var(--ink-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; }
.footer-links a { color: var(--ink-2); font-weight: 700; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-brand { margin-top: 8px; color: var(--ink-3); }

/* ── 결과 이미지 시트 ───────────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 14, 22, 0.62);
  backdrop-filter: blur(3px);
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
  width: 100%;
  max-width: 430px;
  max-height: 92vh;
  overflow: auto;
  padding: 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.sheet h2 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.sheet img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sheet-actions .btn-primary, .sheet-actions .btn-ghost { flex: 1 1 0; }
.sheet-actions .btn-text { flex: 0 0 auto; }

/* ── 문서(개인정보처리방침) ─────────────────────────────────── */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 20px 64px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}
.doc h1 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 6px 0 4px; }
.doc h2 { font-size: 15.5px; font-weight: 800; color: var(--ink); margin: 26px 0 6px; }
.doc p { margin: 8px 0; }
.doc ul { margin: 6px 0; padding-left: 20px; }
.doc li { margin: 3px 0; }
.doc a { color: var(--gold); font-weight: 700; }
.doc-back { font-size: 13px; font-weight: 700; }
.doc-back a { text-decoration: none; }
.doc-meta { font-size: 12px; color: var(--ink-3); }
.doc-note {
  margin-top: 28px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-3);
}

/* ── 모션 최소화 ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ── 작은 화면 보정 ─────────────────────────────────────────── */
@media (max-width: 360px) {
  .money-row { grid-template-columns: 1fr 110px; gap: 8px; }
  .money-row label { font-size: 12px; }
  .limit-readout strong { font-size: 12.5px; }
  .stat-value { font-size: 14.5px; }
  .brand-text h1 { font-size: 17.5px; }
}

/* ══════════════════════════════════════════════════════════════
   자동차세·유류비 계산기 추가 컴포넌트
   ══════════════════════════════════════════════════════════════ */

/* ── 세그먼트 선택 (차량 유형·연납 시기·유종) ────────────────── */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--field);
}
.seg.is-4 { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg.is-2 { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 9px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.seg button small {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: -0.01em;
}
.seg button:hover { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.seg button.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
.seg button.is-active small { color: color-mix(in srgb, var(--on-brand) 74%, transparent); }

/* ── 2열 필드 ───────────────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.field-col { min-width: 0; }
.field-col .field-label { margin-top: 0; }

.select {
  width: 100%;
  padding: 12px 34px 12px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.num-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.num-field:focus-within {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent);
}
.num-field .num-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.num-field .num-input::placeholder { color: var(--ink-3); font-weight: 600; }
.num-field .unit { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }

/* ── 결과 카드 보조 ─────────────────────────────────────────── */
.result-foot {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-2);
  word-break: keep-all;
}
.result-foot strong { color: var(--ink); }

.compare-table tr.is-pick td {
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--ink);
  font-weight: 800;
}
.compare-table tr.is-pick td:first-child::after {
  content: " 선택";
  font-size: 9.5px;
  font-weight: 800;
  color: var(--gold);
  vertical-align: 1px;
}

/* ── 계산식 라인 ────────────────────────────────────────────── */
.formula {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--field);
  border: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.formula b { color: var(--ink); font-weight: 800; }

/* ── 작은 안내 배지 ────────────────────────────────────────── */
.note-inline {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-3);
}
.warn-line {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.6;
}

/* ── 팁 목록 ────────────────────────────────────────────────── */
.tip-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tip-list li {
  display: flex;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.62;
  color: var(--ink-2);
}
.tip-list li b { color: var(--ink); font-weight: 800; }
.tip-list .tip-no {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 800;
}

@media (max-width: 360px) {
  .seg button { font-size: 12px; padding: 8px 2px; }
  .num-field .num-input { font-size: 18px; }
}

/* ── 제휴 링크 카드 (쿠팡파트너스 · 네이버 쇼핑커넥트) ─────────── */
.promo-card .card-head, .promo-card .card__head { margin-bottom: 12px; }
.promo-grid { display: grid; gap: 8px; }
.promo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 14px);
  background: var(--field, var(--surface-2, #f7faf8));
}
.promo-thumb {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 46px; width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--brand-soft);
  font-size: 19px; line-height: 1;
}
.promo-body { min-width: 0; flex: 1 1 auto; }
.promo-name { font-size: 13px; font-weight: 800; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.promo-meta { margin-top: 3px; font-size: 10.5px; color: var(--ink-3, var(--muted)); }
.promo-cta {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px; font-weight: 800; white-space: nowrap;
  text-decoration: none;
}
.promo-cta:hover { text-decoration: none; background: color-mix(in srgb, var(--brand) 15%, transparent); }
.ad-disclosure { margin-top: 10px; font-size: 10.5px; line-height: 1.5; color: var(--ink-3, var(--muted)); }

/* 좁은 화면에서 상품명이 단어 중간에서 끊기지 않도록 합니다 */
@media (max-width: 430px) {
  .promo-name, .promo-meta { word-break: keep-all; overflow-wrap: break-word; }
  .promo-cta { padding-left: 8px; padding-right: 8px; }
}
