/* ─────────────────────────────────────────────────────────────
   월급체크 정적 사이트 공용 스타일 — 정제 미니멀 핀테크 리디자인
   쿨 flobi 팔레트 단일(브랜드 #1E5EFF · slate 뉴트럴). 앱 Tailwind와 별개.
   각 페이지 JS 엔트리에서 import → Vite가 페이지별 css 자산으로 번들.
   (블로그는 build.mjs가 이 파일 + blog.css를 결합)
   ───────────────────────────────────────────────────────────── */
:root {
  --brand-300: #7ea2ff;
  --brand-500: #1e5eff;
  --brand-600: #1a52e6;
  --brand-700: #1244c2;
  --brand-050: #eef3ff;
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --body-700: #334155;
  --neutral-500: #64748b;
  --neutral-400: #94a3b8;
  --neutral-200: #e2e8f0;
  --neutral-100: #f1f5f9;
  --neutral-50: #f8fafc;
  --success-700: #15803d;
  --error-600: #dc2626;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
  --shadow-lift: 0 2px 4px rgba(15, 23, 42, 0.05), 0 16px 32px -16px rgba(30, 94, 255, 0.18);
  --ring: 0 0 0 3px rgba(30, 94, 255, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family:
    'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(72% 320px at 50% 0, rgba(30, 94, 255, 0.07), transparent 70%),
    var(--neutral-50);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* ── 헤더: 스티키 글래스 바 ─────────────────────────────── */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}
.site-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-decoration: none;
}
.logo::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 1px 3px rgba(30, 94, 255, 0.45);
}
.head-nav {
  display: flex;
  gap: 4px;
}
.head-nav a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--neutral-500);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  transition: color 0.15s;
}
.head-nav a:hover,
.head-nav a:active {
  color: var(--brand-700);
}

main {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

/* ── 히어로 타이포 ──────────────────────────────────────── */
.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-700);
  margin: 8px 0 8px;
}
h1 {
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 8px;
}
.sub {
  font-size: 14.5px;
  color: var(--neutral-500);
  margin-bottom: 26px;
  max-width: 42ch;
}

/* ── 카드 ───────────────────────────────────────────────── */
section.card {
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  padding: 22px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

/* 결과 카드 — 다크 잉크 헤드라인 스트립 */
.result-card {
  overflow: hidden;
}
.result-hero {
  margin: -22px -20px 18px;
  padding: 22px 20px 20px;
  background:
    radial-gradient(120% 140% at 100% 0, rgba(30, 94, 255, 0.28), transparent 55%),
    linear-gradient(150deg, var(--ink-900), var(--ink-800));
}
.result-hero .result-head {
  color: var(--neutral-400);
}
.result-hero .result-total {
  color: #fff;
}
.result-hero .result-total .won {
  color: var(--neutral-400);
}
.result-hero .badge {
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.result-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--neutral-500);
  margin-bottom: 6px;
}
.result-total {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.result-total .won {
  font-size: 20px;
  font-weight: 700;
  margin-left: 2px;
}

/* 상태 배지 — author display가 UA [hidden]을 덮으므로 명시 필요 */
.badge[hidden] {
  display: none;
}
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-500);
  background: var(--neutral-100);
  border-radius: 999px;
  padding: 3px 12px;
  margin-top: 10px;
}

/* ── 입력 필드 ──────────────────────────────────────────── */
.field {
  margin-bottom: 18px;
}
.field label,
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 7px;
}
.field input[type='number'],
.field input[type='date'],
.field input[type='month'],
.field select {
  width: 100%;
  min-height: 50px;
  font-size: 17px;
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--neutral-50);
  color: var(--ink-900);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.field select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--neutral-400) 50%),
    linear-gradient(135deg, var(--neutral-400) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 55%,
    calc(100% - 15px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--ring);
  background-color: #fff;
}
.hint {
  font-size: 12.5px;
  color: var(--neutral-500);
  margin-top: 6px;
}

/* 토글 스위치 */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.toggle-row .t-label {
  font-size: 14.5px;
  font-weight: 700;
}
.toggle-row .t-desc {
  font-size: 12.5px;
  color: var(--neutral-500);
}
.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.switch .knob {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--neutral-200);
  transition: background 0.18s;
  pointer-events: none;
}
.switch .knob::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s;
}
.switch input:checked + .knob {
  background: var(--brand-500);
}
.switch input:checked + .knob::after {
  transform: translateX(20px);
}

/* ── 내역 행 ────────────────────────────────────────────── */
.rows {
  border-top: 1px solid var(--neutral-100);
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 14px;
}
.row .k {
  color: var(--neutral-500);
}
.row .v {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.row .v.muted {
  color: var(--neutral-500);
  font-weight: 600;
}

/* 참고·한계 안내 콜아웃 */
.note {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--neutral-500);
  margin-top: 16px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: 12px;
  padding: 12px 14px;
}

/* ── 해설 아티클 ────────────────────────────────────────── */
article h2 {
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 40px 0 10px;
}
article h2::before {
  content: '';
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  margin-bottom: 12px;
}
article h3 {
  font-size: 15.5px;
  margin: 20px 0 6px;
}
article p {
  font-size: 14.5px;
  color: var(--body-700);
  margin-bottom: 10px;
}

/* ── 상호 링크(다른 계산기) ─────────────────────────────── */
.more-calcs {
  margin-top: 40px;
}
.more-calcs h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.more-calcs a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
}
.more-calcs a::after {
  content: '›';
  color: var(--neutral-400);
  font-size: 18px;
  font-weight: 400;
  transition:
    color 0.15s,
    transform 0.15s;
}

/* ── 허브 카드 목록 ─────────────────────────────────────── */
.calc-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.calc-list a {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  padding: 18px 44px 16px 20px;
  text-decoration: none;
  color: var(--ink-900);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
}
.calc-list a::after {
  content: '›';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  font-size: 20px;
  transition:
    color 0.15s,
    transform 0.15s;
}
.calc-list a strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}
.calc-list a span {
  font-size: 13px;
  color: var(--neutral-500);
}

/* 데스크톱 호버 리프트 */
@media (hover: hover) {
  .calc-list a:hover,
  .more-calcs a:hover {
    transform: translateY(-2px);
    border-color: rgba(30, 94, 255, 0.35);
    box-shadow: var(--shadow-lift);
  }
  .calc-list a:hover::after {
    color: var(--brand-600);
    transform: translateY(-50%) translateX(2px);
  }
  .more-calcs a:hover::after {
    color: var(--brand-600);
    transform: translateX(2px);
  }
}

.calc-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-700);
  background: var(--brand-050);
  border-radius: 999px;
  padding: 1.5px 9px;
  margin-left: 7px;
  vertical-align: 2px;
}

/* ── 공식 스토어 배지 ───────────────────────────────────── */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--neutral-100);
}
.store-badges a {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border-radius: 9px;
  transition:
    transform 0.15s,
    opacity 0.15s;
}
.store-badges img {
  display: block;
}
@media (hover: hover) {
  .store-badges a:hover {
    transform: translateY(-1px);
    opacity: 0.9;
  }
}
.cta-sub {
  text-align: center;
  font-size: 12.5px;
  color: var(--neutral-500);
  margin-top: 10px;
}

/* ── 요일별 시간 그리드 (parttime·verify) ───────────────── */
.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
}
.day-cell label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--neutral-500);
  text-align: center;
  margin-bottom: 4px;
}
.day-cell input {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  padding: 8px 4px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--neutral-50);
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.day-cell input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--ring);
  background: #fff;
}

/* ── 주차별 표 (verify) ─────────────────────────────────── */
.weeks-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 13px;
}
.weeks-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--neutral-400);
  padding: 6px 4px;
  border-bottom: 1px solid var(--neutral-200);
}
.weeks-table td {
  padding: 9px 4px;
  border-bottom: 1px solid var(--neutral-100);
  font-variant-numeric: tabular-nums;
}
.weeks-table .num {
  text-align: right;
}

/* 차액 표기 */
.diff-line {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}
.diff-match {
  color: var(--success-700);
}
.diff-over {
  color: var(--brand-700);
}
.diff-under {
  color: var(--error-600);
}

/* ── verify 달력 (읽기 전용) ────────────────────────────── */
.cal {
  margin-top: 18px;
  border-top: 1px solid var(--neutral-100);
  padding-top: 16px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-head-row {
  margin-bottom: 4px;
}
.cal-dow {
  font-size: 11px;
  font-weight: 700;
  color: var(--neutral-400);
  text-align: center;
}
.cal-week {
  border-radius: 10px;
  padding: 2px 0;
}
.cal-week--holiday {
  background: var(--brand-050);
  box-shadow: inset 0 0 0 1px rgba(30, 94, 255, 0.14);
}
.cal-week--next {
  background: var(--neutral-100);
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 38px;
  padding: 3px 0 2px;
}
.cal-num {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
}
.cal-hours {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}
.cal-day--off .cal-num {
  color: var(--neutral-200);
}
.cal-day--out {
  opacity: 0.45;
}
.cal-week-cap {
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  margin: 2px 2px 8px;
}
.cal-cap--holiday {
  color: var(--brand-700);
}
.cal-cap--next,
.cal-cap--none {
  color: var(--neutral-500);
}
.cal-legend {
  font-size: 11px;
  color: var(--neutral-500);
  margin-top: 8px;
}
.cal-key--holiday {
  background: var(--brand-050);
  color: var(--brand-700);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 700;
}

/* ── 구조화 푸터 ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--neutral-200);
  background: #fff;
}
.foot-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 20px 36px;
}
.foot-brand {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.foot-brand span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
  margin-top: 2px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 14px 0 12px;
}
.foot-links a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--neutral-500);
  text-decoration: none;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.foot-links a:hover {
  color: var(--brand-700);
}
.foot-note {
  font-size: 11.5px;
  color: var(--neutral-400);
}

/* ── 진입 모션 (절제된 스태거) ──────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  main > * {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  main > *:nth-child(2) {
    animation-delay: 0.04s;
  }
  main > *:nth-child(3) {
    animation-delay: 0.08s;
  }
  main > *:nth-child(4) {
    animation-delay: 0.12s;
  }
  main > *:nth-child(5) {
    animation-delay: 0.16s;
  }
  main > *:nth-child(n + 6) {
    animation-delay: 0.2s;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 입력 모드 세그먼트 (hourly 통합 — 주당 합계/요일별) */
.mode-toggle {
  display: flex;
  gap: 3px;
  background: var(--neutral-100);
  border-radius: 12px;
  padding: 3px;
}
.mode-btn {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral-500);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}
.mode-btn.active {
  background: #fff;
  color: var(--ink-900);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

/* 실수령 추정 범위 (결과 히어로 내부 — 항상 범위, 확정값 금지) */
.net-range {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.net-range[hidden] {
  display: none;
}
.net-range .nr-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--neutral-400);
  margin-bottom: 2px;
}
.net-range #netRangeValue {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.net-caption {
  font-size: 11px;
  line-height: 1.6;
  color: rgba(203, 213, 225, 0.8);
  margin-top: 6px;
}

/* 블로그 전용 추가 스타일 — calc.css 뒤에 이어 붙음(빌드 시 결합) */
.blog-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.blog-tab {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--neutral-200);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral-500);
  font-family: inherit;
  cursor: pointer;
}
.blog-tab.active {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
}
.post-list {
  display: grid;
  gap: 12px;
}
.post-card {
  display: block;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 16px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--ink-900);
}
.post-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}
.post-card span {
  display: block;
  font-size: 13px;
  color: var(--neutral-500);
}
.post-card time {
  display: block;
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 8px;
}
.empty {
  font-size: 14px;
  color: var(--neutral-500);
  padding: 24px 0;
}
.post-meta {
  font-size: 12px;
  color: var(--neutral-500);
  margin: 16px 0 6px;
}
.post-meta .calc-badge {
  margin-left: 0;
  margin-right: 6px;
  vertical-align: 0;
}
.post-body {
  margin-top: 8px;
}
.post-body p {
  font-size: 15px;
  color: #334155;
  margin-bottom: 12px;
}
.post-body h2 {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 28px 0 10px;
}
.post-body h3 {
  font-size: 16px;
  margin: 20px 0 8px;
}
.post-body ul,
.post-body ol {
  padding-left: 22px;
  margin-bottom: 12px;
}
.post-body li {
  font-size: 15px;
  color: #334155;
  margin-bottom: 4px;
}
.post-body a {
  color: var(--brand-700);
  font-weight: 600;
}
.flobi-line {
  text-align: center;
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 12px;
}
.flobi-line a {
  color: var(--brand-700);
  font-weight: 600;
}
