/* 월급 점프 — 2026 실수령 비교기 */
:root {
  --bg: #eef1f7;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #7b879c;
  --line: #e3e8f1;
  --brand: #1d4ed8;
  --brand-2: #3b82f6;
  --up: #0e9f6e;
  --down: #dc2626;
  --navy-1: #0b1220;
  --navy-2: #182642;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --tab: "tnum" 1;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 320px;
  background: radial-gradient(120% 90% at 50% -20%, #dbe6ff 0%, rgba(238, 241, 247, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
}

/* ── 상단 ───────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 2px 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.28);
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.basis-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand);
  background: #e6edff;
  border: 1px solid #cfdcff;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.intro {
  padding: 14px 4px 16px;
}

.intro h1 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.32;
  letter-spacing: -0.7px;
  font-weight: 800;
}

.intro h1 em {
  font-style: normal;
  color: var(--brand);
}

.intro p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: -0.2px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(226, 232, 240, 0.7);
}

/* ── 입력 ───────────────────────────── */
.field + .field {
  margin-top: 12px;
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 7px;
  padding: 0 2px;
}

.field-label .hint {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 12px;
}

.money-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7f9fd;
  border: 1.5px solid var(--line);
  border-radius: 15px;
  padding: 12px 14px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.money-field:focus-within {
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.money-field.target:focus-within {
  border-color: var(--up);
  box-shadow: 0 0 0 4px rgba(14, 159, 110, 0.14);
}

.money-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 0;
  outline: none;
}

.money-field .unit {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  flex: none;
}

.chips {
  display: flex;
  gap: 5px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  border: 1.5px solid #d9e2f2;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s, border-color 0.15s;
}

.chip:active {
  transform: scale(0.96);
  background: #eef3ff;
}

.chip.ghost {
  color: var(--ink-2);
  border-color: #e3e8f1;
}

/* ── 결과(다크) ─────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  margin-bottom: 14px;
  background: linear-gradient(160deg, var(--navy-1) 0%, var(--navy-2) 62%, #1f3358 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgba(11, 18, 32, 0.28);
}

.hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -90px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(59, 130, 246, 0) 70%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.hero-label {
  font-size: 13px;
  font-weight: 700;
  color: #9fb0cc;
  letter-spacing: -0.2px;
}

.pill {
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(16, 185, 129, 0.16);
  color: #5eead4;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pill.minus {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.pill.flat {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.32);
}

.hero-num {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.hero-num strong {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.6px;
}

.hero-num .won {
  font-size: 17px;
  font-weight: 700;
  color: #b9c6dd;
}

.hero-sub {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 13.5px;
  color: #9fb0cc;
  font-variant-numeric: tabular-nums;
}

.hero-sub b {
  color: #e2e8f0;
  font-weight: 800;
}

.ratio {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.ratio-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  color: #9fb0cc;
  font-weight: 700;
}

.ratio-head strong {
  font-size: 20px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}

.bar {
  margin-top: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.bar i.minus {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.ratio-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #c3cfe3;
  letter-spacing: -0.2px;
}

.ratio-note b {
  color: #fff;
  font-weight: 800;
}

/* ── 공제 내역 ──────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 0 2px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.section-head span {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.table th {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  text-align: right;
  padding: 0 0 9px;
  letter-spacing: -0.2px;
}

.table th:first-child {
  text-align: left;
  padding-left: 2px;
}

.table td {
  font-size: 13.5px;
  padding: 9px 0;
  text-align: right;
  color: var(--ink-2);
  border-top: 1px solid #f1f4f9;
  letter-spacing: -0.2px;
}

.table td:first-child {
  text-align: left;
  color: var(--ink);
  font-weight: 600;
  padding-left: 2px;
}

.table td.delta {
  font-weight: 800;
  color: var(--ink);
}

.table td.delta.up { color: var(--up); }
.table td.delta.down { color: var(--down); }
.table tr.group td {
  padding-top: 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  letter-spacing: 0;
}
.table tr.total td {
  border-top: 1.5px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
}
.table tr.net td {
  border-top: 1.5px solid var(--line);
  color: var(--brand);
  font-weight: 800;
  font-size: 14.5px;
  padding-top: 12px;
}

.table .sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  margin-top: 1px;
}

/* ── 세부 설정 ──────────────────────── */
.settings {
  padding: 0;
  overflow: hidden;
}

.settings > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.settings > summary::-webkit-details-marker { display: none; }

.sum-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.sum-hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.settings > summary .chev {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2fa;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: transform 0.2s;
  flex: none;
}

.settings[open] > summary .chev { transform: rotate(180deg); }

.settings-body {
  padding: 2px 18px 18px;
  border-top: 1px solid #f1f4f9;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f4f6fb;
}

.row:last-child { border-bottom: 0; }

.row .row-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.row .row-hint {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.4;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #f4f7fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px;
  flex: none;
}

.stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.stepper button:disabled {
  opacity: 0.35;
  cursor: default;
}

.stepper .val {
  min-width: 42px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mini-input {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f4f7fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 11px;
  flex: none;
}

.mini-input input {
  width: 54px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  color: var(--ink);
  outline: none;
  font-variant-numeric: tabular-nums;
}

.mini-input .unit {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}

.switch {
  position: relative;
  width: 50px;
  height: 30px;
  flex: none;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #dbe2ee;
  transition: background 0.18s;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  transition: transform 0.18s;
}

.switch input:checked + .track {
  background: var(--up);
}

.switch input:checked + .track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .track {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

/* ── 복사 ───────────────────────────── */
.copy {
  width: 100%;
  border: 1.5px solid #cdd9f0;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  border-radius: 16px;
  padding: 15px;
  cursor: pointer;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.15s, transform 0.08s;
}

.copy:active { transform: scale(0.99); background: #f2f6ff; }
.copy.done { color: var(--up); border-color: #b7e6d4; background: #f0fdf8; }

/* ── 안내 ───────────────────────────── */
.basis h2, .applike summary {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.basis h2 { margin: 0 0 10px; }

.basis ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.basis li {
  position: relative;
  padding-left: 14px;
  font-size: 12.6px;
  line-height: 1.65;
  color: var(--ink-2);
  letter-spacing: -0.2px;
}

.basis li + li { margin-top: 5px; }

.basis li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b9c5da;
}

.basis a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid #c9d8fb;
  font-weight: 600;
}

.basis .note {
  margin: 11px 0 0;
  font-size: 11.8px;
  line-height: 1.6;
  color: var(--ink-3);
  letter-spacing: -0.2px;
}

.applike {
  padding: 0;
}

.applike > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.applike > summary::-webkit-details-marker { display: none; }

.applike .chev {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2fa;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: transform 0.2s;
  flex: none;
}

.applike[open] .chev { transform: rotate(180deg); }

.applike-body {
  padding: 0 18px 18px;
  border-top: 1px solid #f1f4f9;
}

.os {
  margin-top: 12px;
}

.os h3 {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}

.os ol {
  margin: 0;
  padding-left: 17px;
  font-size: 12.6px;
  line-height: 1.7;
  color: var(--ink-2);
}

footer {
  padding: 6px 4px 0;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.2px;
}

footer nav {
  display: flex;
  gap: 12px;
}

footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px);
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 20;
  box-shadow: 0 12px 24px rgba(11, 18, 32, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.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;
}

/* 문서 페이지 */
.doc {
  padding-top: 8px;
}

.doc .card h1 {
  font-size: 21px;
  margin: 0 0 6px;
  letter-spacing: -0.6px;
}

.doc .card h2 {
  font-size: 15px;
  margin: 20px 0 8px;
  letter-spacing: -0.3px;
}

.doc .card p, .doc .card li {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
  letter-spacing: -0.2px;
}

.doc .card ul { padding-left: 18px; margin: 0; }
.doc .card p { margin: 0 0 10px; }
.doc .updated { font-size: 12px; color: var(--ink-3); }
.doc .back {
  display: inline-block;
  margin-top: 6px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  font-size: 13.5px;
}

@media (max-width: 360px) {
  .hero-num strong { font-size: 34px; }
  .intro h1 { font-size: 22px; }
  .table td, .table th { font-size: 12.5px; }
  .money-field input { font-size: 19px; }
}

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