/* =============================================================
   calc24.kr — design system (v8 / Starbucks-inspired)
   - 4단계 녹색 시스템 (Starbucks/Accent/House/Light)
   - 따뜻한 베이지 캔버스 + 흰 카드
   - 다크 그린 푸터, 풀 필 알약 버튼
   - 모바일 우선 (max-width 480px 컬럼)
============================================================= */

:root {
  /* ── 캔버스 (스타벅스 따뜻한 베이지) ── */
  --bg: #f2f0eb;            /* Neutral Warm */
  --surface: #ffffff;        /* 카드 흰색 */
  --surface-alt: #edebe9;    /* Ceramic */

  /* ── 텍스트 (87% 검정으로 부드럽게) ── */
  --text: rgba(0, 0, 0, 0.87);          /* Text Black */
  --text-secondary: rgba(0, 0, 0, 0.58); /* Text Black Soft */
  --text-muted: #939084;                  /* Warm Gray */

  /* ── 4단계 녹색 시스템 (역할별) ── */
  --green-primary: #006241;   /* Starbucks Green - H1, 헤딩 */
  --green-cta:     #00754A;   /* Green Accent - 메인 CTA 버튼 */
  --green-dark:    #1E3932;   /* House Green - 푸터, 다크 밴드 */
  --green-uplift:  #2b5148;   /* Green Uplift - 호버 등 */
  --green-light:   #d4e9e2;   /* Green Light - 정상 상태 hint */

  /* ── 호환성 (기존 변수 alias) ── */
  --accent:      var(--green-light);
  --accent-deep: var(--green-cta);
  --accent-text: var(--green-dark);

  /* ── 보더 (스타벅스 sand 계열) ── */
  --line: #d6dbde;          /* 표준 보더 */
  --line-strong: #c5c0b1;   /* 강조 보더 */
  --line-soft: #e7e7e7;     /* 약한 구분선 */

  /* ── 모서리 ── */
  --r-sm: 8px;
  --r-md: 12px;        /* 카드 기본 (스타벅스 12px) */
  --r-lg: 12px;
  --r-xl: 12px;
  --r-pill: 50px;      /* 풀 필 알약 (스타벅스 50px) */

  /* ── 그림자 (스타벅스 whisper-soft) ── */
  --shadow-card: 0 0 0.5px rgba(0, 0, 0, 0.14), 0 1px 1px rgba(0, 0, 0, 0.24);
  --shadow-elev: 0 0 6px rgba(0, 0, 0, 0.12), 0 8px 12px rgba(0, 0, 0, 0.10);

  /* ── 레이아웃 ── */
  --container: 480px;
  --side-gap: 12px;

  /* ── 인터랙션 ── */
  --press-scale: scale(0.95);
  --tracking: -0.16px;   /* 스타벅스 트레이드마크 트래킹 */
}

@media (max-width: 380px) {
  :root { --side-gap: 10px; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Apple SD Gothic Neo', 'Noto Sans KR', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: var(--tracking);  /* -0.16px Starbucks 트레이드마크 */
  font-feature-settings: 'cv11', 'ss01', 'ss03';  /* Inter 가독성 향상 */
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ─────────────────────────────────────────────────────────────
   레이아웃 컨테이너
   - 데스크탑에서도 모바일 폭으로 가운데 정렬
───────────────────────────────────────────────────────────── */
.app {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 481px) {
  .app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

.main { flex: 1; }

/* ─────────────────────────────────────────────────────────────
   헤더
───────────────────────────────────────────────────────────── */
.hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px;
  background: var(--bg);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1.0px;
  color: var(--green-primary);    /* Starbucks Green */
  line-height: 1;
}
.logo-icon {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}
.icon-btn {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hdr-actions { display: flex; gap: 14px; align-items: center; }

/* ─────────────────────────────────────────────────────────────
   카테고리 탭 - Starbucks 스타일 (inset shadow underline)
───────────────────────────────────────────────────────────── */
.cat-nav {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.cat-nav a {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 14px 0 15px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.16px;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.cat-nav a:hover {
  color: var(--text);
  box-shadow: var(--green-light) 0px -3px 0px 0px inset;
}
.cat-nav a[aria-current="page"] {
  color: var(--green-cta);
  font-weight: 700;
  box-shadow: var(--green-cta) 0px -3px 0px 0px inset;
}

/* ─────────────────────────────────────────────────────────────
   자체 광고 배너 (롤링)
───────────────────────────────────────────────────────────── */
.banner-rail {
  margin: 16px var(--side-gap) 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}
.banner-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}
.banner {
  flex: 0 0 100%;
  display: block;
  margin: 0;
  background: var(--green-light);
  padding: 18px 16px 16px;
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.banner-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--green-cta);
  margin-bottom: 9px;
}
.banner-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: -0.16px;
  line-height: 1.45;
  margin: 0 0 14px;
}
.banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-dark);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.16px;
  transition: transform 0.2s ease;
}
.banner-cta:hover { background: var(--green-cta); }
.banner-cta:active { transform: var(--press-scale); }
.banner-cta::after { content: '→'; font-size: 13px; }
.banner-deco {
  position: absolute;
  right: -8px;
  bottom: -8px;
  opacity: 0.35;
  pointer-events: none;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 18px;
}
.banner-dots .dot {
  width: 6px;
  height: 4px;
  border-radius: var(--r-pill);
  background: #c5c0b1;
  transition: width 0.2s ease, background 0.2s ease;
  border: none;
  padding: 0;
  cursor: pointer;
}
.banner-dots .dot.active {
  width: 18px;
  background: var(--green-cta);
}

/* ─────────────────────────────────────────────────────────────
   광고 슬롯 (Google AdSense)
───────────────────────────────────────────────────────────── */
.ad-slot {
  margin: 18px var(--side-gap) 22px;
  background: var(--surface-alt);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 32px 12px;
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ad-slot-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
}
.ad-slot-sublabel {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 500;
}
.ad-slot ins { display: block; }

/* ─────────────────────────────────────────────────────────────
   섹션 타이틀
───────────────────────────────────────────────────────────── */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px 12px;
}
.section-title h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  margin: 0;
}
.section-title .more {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   자주 쓰는 4×2 라인 아이콘 그리드
───────────────────────────────────────────────────────────── */
.popular-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 0;
  padding: 0 8px 22px;
}
.popular-item { text-align: center; color: var(--text); }
.popular-item .ic {
  display: block;
  margin: 0 auto 8px;
  width: 30px;
  height: 30px;
}
.popular-item .name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* ─────────────────────────────────────────────────────────────
   리스트 카드 (새로 들어왔어요, 카테고리 페이지 등)
───────────────────────────────────────────────────────────── */
.card-list {
  background: var(--surface);
  margin: 0 var(--side-gap) 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.card-list .item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s ease;
}
.card-list .item:hover { background: rgba(0, 98, 65, 0.03); }
.card-list .item:last-child { border-bottom: none; }
.card-list .item .ic {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--green-cta);   /* 아이콘은 Green Accent */
}
.card-list .item .body { flex: 1; min-width: 0; }
.card-list .item .name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.16px;
}
.card-list .item .desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}
.card-list .item .arrow {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}

.badge {
  font-size: 9px;
  font-weight: 700;
  color: #ffffff;
  background: var(--green-cta);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-soon {
  background: var(--surface-alt);
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────
   푸터 - Starbucks House Green 다크 밴드
───────────────────────────────────────────────────────────── */
.ftr {
  background: var(--green-dark);   /* House Green #1E3932 */
  padding: 28px 16px 32px;
  border-top: none;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.70);    /* Text White Soft */
}
.ftr-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-md);
  padding: 13px 14px;
  margin-bottom: 18px;
}
.ftr-cta-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.16px;
  color: #ffffff;
}
.ftr-cta-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.70);
  margin-top: 2px;
  font-weight: 500;
}
.ftr-links {
  display: flex;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.16px;
  flex-wrap: wrap;
  align-items: center;
}
.ftr-links a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.15s ease;
}
.ftr-links a:hover { color: #ffffff; }
.ftr-links span { color: rgba(255, 255, 255, 0.30); }

.ftr-feedback {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.ftr-feedback a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.16px;
  transition: color 0.15s ease;
}
.ftr-feedback a:hover { color: #ffffff; }
.ftr-feedback a::before {
  content: '✉';
  font-size: 13px;
}
.ftr-info {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 20px;
  line-height: 1.7;
}
.ftr-info-name {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
  letter-spacing: -0.16px;
}
.ftr-copy {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.40);
  font-size: 11px;
}

/* ─────────────────────────────────────────────────────────────
   드로어 (햄버거 메뉴)
───────────────────────────────────────────────────────────── */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0);
  visibility: hidden;
  transition: background 0.22s, visibility 0.22s;
  z-index: 90;
}
.drawer-mask.open {
  background: rgba(10, 10, 10, 0.4);
  visibility: visible;
}
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 78%;
  max-width: 320px;
  background: var(--surface);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 24px;
}
.drawer-section {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  padding: 18px 18px 8px;
}
.drawer-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 18px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.drawer-list a[aria-current="page"] { color: var(--accent-deep); font-weight: 800; }
.drawer-list .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────
   토스트 / 모달
───────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(15, 22, 32, 0.92);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 200;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  z-index: 150;
  transition: background 0.2s, visibility 0s linear 0.2s;
}
.modal-mask.open {
  background: rgba(10, 10, 10, 0.4);
  visibility: visible;
  transition: background 0.2s, visibility 0s;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 26px 24px 20px;
  min-width: 280px;
  max-width: 340px;
  margin: 18px;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.2s, transform 0.2s;
}
.modal-mask.open .modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--green-primary);
  letter-spacing: -0.16px;
}
.modal p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 18px;
}
.modal-actions { display: flex; justify-content: flex-end; }
.modal-actions button {
  background: var(--green-cta);
  color: #ffffff;
  border: 1px solid var(--green-cta);
  padding: 10px 22px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.modal-actions button:hover { background: var(--green-primary); border-color: var(--green-primary); }
.modal-actions button:active { transform: var(--press-scale); }

/* ─────────────────────────────────────────────────────────────
   계산기 페이지 — 본문 / 폼 / 결과
───────────────────────────────────────────────────────────── */
.calc-hero {
  margin: 16px var(--side-gap) 16px;
}
.calc-hero h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.48px;
  margin: 0 0 6px;
  color: var(--green-primary);    /* Starbucks Green */
}
.calc-hero p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

.calc-form {
  background: var(--surface);
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 14px 6px;
  box-shadow: var(--shadow-card);
}
.form-row { margin-bottom: 14px; }
.form-row label.lbl {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--text);
  letter-spacing: -0.2px;
}
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #EBE7DC;
  color: #888;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

/* segmented control */
.seg-control {
  display: flex;
  background: #F4F2EC;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.seg-control input[type="radio"] { display: none; }
.seg-control label {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 7px;
  margin: 0;
  transition: all 0.12s;
  letter-spacing: -0.2px;
}
.seg-control input[type="radio"]:checked + label {
  background: var(--text);
  color: #fff;
  font-weight: 700;
}

/* select */
select.fld {
  width: 100%;
  padding: 11px 32px 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fff
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text);
}
select.fld:focus { outline: none; border-color: var(--text); }

/* input + suffix */
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  padding: 11px 44px 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.input-wrap input:focus { outline: none; border-color: var(--text); }
.input-wrap .suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

/* checkbox group */
.checkbox-group {
  background: #F4F2EC;
  border-radius: 9px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--text);
}

/* 계산 버튼 */
.btn-calc {
  display: block;
  width: calc(100% - var(--side-gap) * 2);
  margin: 18px var(--side-gap);
  background: var(--green-cta);   /* Green Accent */
  color: #ffffff;
  border: 1px solid var(--green-cta);
  padding: 16px;
  border-radius: var(--r-pill);   /* 풀 필 알약 50px */
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn-calc:hover { background: var(--green-primary); border-color: var(--green-primary); }
.btn-calc:active { transform: var(--press-scale); }

/* 결과 */
.result-wrap { margin-bottom: 18px; }
.result-hero {
  margin: 0 var(--side-gap) 12px;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  box-shadow: var(--shadow-card);
}
.result-hero-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--green-cta);
  text-transform: uppercase;
}
.result-hero-amount {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-top: 8px;
  color: var(--green-dark);
}
.result-breakdown {
  background: var(--surface);
  margin: 0 var(--side-gap) 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px 16px;
  box-shadow: var(--shadow-card);
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  gap: 12px;
}
.result-row:last-child { border-bottom: none; }
.result-row .key { color: var(--text-secondary); font-weight: 500; }
.result-row .lbl { color: var(--text-secondary); font-weight: 500; }
.result-row .val { font-weight: 700; color: var(--text); text-align: right; }
.result-row .rate {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 4px;
}

.share-row {
  display: flex;
  gap: 8px;
  margin: 0 var(--side-gap) 14px;
}
.share-row button {
  flex: 1;
  padding: 13px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);   /* 알약 */
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.share-row button:active { transform: var(--press-scale); }
.share-row .btn-share-link {
  background: var(--green-cta);
  color: #ffffff;
  border-color: var(--green-cta);
}
.share-row .btn-share-link:hover {
  background: var(--green-primary);
  border-color: var(--green-primary);
}

.input-summary {
  background: var(--surface);
  margin: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
}
.input-summary-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.summary-item .lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.summary-item .val {
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
  margin-top: 1px;
}

.btn-back {
  display: block;
  width: calc(100% - 28px);
  margin: 4px 14px 22px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 12px;
  border-radius: var(--r-pill);    /* 알약 */
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.btn-back:active { transform: var(--press-scale); }

/* SEO 섹션 */
/* ─────────────────────────────────────────────────────────────
   SEO 섹션 (안내·FAQ) - 입력·결과 영역과 시각적 분리
───────────────────────────────────────────────────────────── */
.seo-section {
  background: var(--surface);
  margin: 0 var(--side-gap) 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-card);
}
/* 첫 번째 SEO 섹션 위에 큰 간격 + 라벨 헤더로 그룹 시작 표시 */
.seo-section:first-of-type {
  margin-top: 90px;
  position: relative;
}
.seo-section:first-of-type::before {
  content: "이 계산기에 대해";
  position: absolute;
  top: -22px;
  left: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.seo-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--green-primary);   /* Starbucks Green H2 */
  letter-spacing: -0.16px;
}
.seo-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 8px;
}
.faq-item {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 0;
}
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-question {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.5;
  letter-spacing: -0.16px;
}
.faq-answer {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* 카테고리 페이지 */
.cat-list { padding: 0 var(--side-gap) 22px; }
.cat-list .calc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 16px;
  margin-bottom: 8px;
  color: var(--text);
}
.cat-list .calc-card .ic { width: 24px; height: 24px; flex-shrink: 0; }
.cat-list .calc-card > div { flex: 1; min-width: 0; }
.cat-list .calc-card .name { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.cat-list .calc-card .desc { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }

/* ─────────────────────────────────────────────────────────────
   레거시 alias — 취득세 페이지 등 기존 클래스명 호환
   (점진적으로 위 표준 클래스명으로 통일 권장)
───────────────────────────────────────────────────────────── */
.form { /* = .calc-form */
  background: var(--surface);
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 14px 6px;
}
.form .field { margin-bottom: 14px; }
.form .field .label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--text);
  letter-spacing: -0.2px;
}
.form .segmented {
  display: flex;
  background: #F4F2EC;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.form .segmented input[type="radio"] { display: none; }
.form .segmented label {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 7px;
  margin: 0;
  transition: all 0.12s;
  letter-spacing: -0.2px;
}
.form .segmented input[type="radio"]:checked + label {
  background: var(--text);
  color: #fff;
  font-weight: 700;
}
.form .input-hint {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 5px;
  letter-spacing: -0.1px;
}
.form .cta {
  display: block;
  width: 100%;
  background: var(--text);
  color: #fff;
  border: none;
  padding: 14px;
  margin: 4px 0 14px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  cursor: pointer;
}
.form .cta:active { transform: translateY(0.5px); }

/* 결과 영역 — 옛 마크업 (.result, .result-label, .result-amount, .key/.val) */
.result { margin-bottom: 12px; }
.result .result-hero {
  margin: 0 14px 12px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: var(--r-xl);
  padding: 18px 16px;
}
.result .result-hero .result-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-deep);
}
.result .result-hero .result-amount {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-top: 4px;
}
.result .result-hero .result-amount .unit {
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
}
.result .result-breakdown {
  background: var(--surface);
  margin: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px 14px;
}
.result .result-breakdown .result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.result .result-breakdown .result-row:last-child { border-bottom: none; }
.result .result-breakdown .key {
  color: var(--text-secondary);
  font-weight: 500;
}
.result .result-breakdown .key .rate {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 4px;
}
.result .result-breakdown .val {
  font-weight: 700;
  color: var(--text);
}

.input-summary dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
}
.input-summary dt {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.input-summary dd {
  margin: 0;
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
}
.input-summary h3 {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

/* ─────────────────────────────────────────────────────────────
   iOS 스타일 가로 폼 — 라벨 좌측 + 값 우측 정렬
───────────────────────────────────────────────────────────── */
.form-h {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin: 0 var(--side-gap) 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.form-h-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  gap: 12px;
  min-height: 50px;
}
.form-h-row:last-child { border-bottom: none; }
.form-h-row.hidden { display: none; }

.form-h-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 86px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.form-h-row input.fld {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  padding: 0;
  font-family: inherit;
  outline: none;
  letter-spacing: -0.2px;
  min-width: 0;
}
.form-h-row input.fld::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}
.form-h-suffix {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}
.form-h-select {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: right;
}
.form-h-select .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}
.form-h-select .value.muted { color: var(--text-muted); font-weight: 500; }
.form-h-select .arrow {
  color: #bbb;
  flex-shrink: 0;
}

/* 도움말 아이콘 (?) */
.help-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.help-mini:hover {
  background: var(--green-light);
  color: var(--green-cta);
}

/* segmented inline (가로 폼 내부) */
.seg-inline {
  display: flex;
  flex: 1;
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 3px;
  gap: 1px;
}
.seg-inline button {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.16px;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg-inline button.active {
  background: var(--green-cta);
  color: #ffffff;
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────
   시트 모달 (셀렉트 시트, 옵션 다중 선택)
───────────────────────────────────────────────────────────── */
.sheet-mask {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0);
  visibility: hidden;
  z-index: 150;
  transition: background 0.22s, visibility 0.22s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-mask.open {
  background: rgba(10,10,10,0.4);
  visibility: visible;
}
.sheet {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 8px 0 18px;
  transform: translateY(100%);
  transition: transform 0.24s ease;
  max-height: 85vh;
  overflow-y: auto;
  width: 100%;
  max-width: var(--container);
}
.sheet-mask.open .sheet { transform: translateY(0); }
.sheet-handle {
  width: 36px;
  height: 4px;
  background: #D5D0BF;
  border-radius: 2px;
  margin: 6px auto 14px;
}
.sheet-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
  padding: 0 18px 12px;
  color: var(--text);
}
.sheet-options { padding: 0 10px; }
.sheet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: -0.2px;
  background: transparent;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}
.sheet-option:active { background: #F4F2EC; }
.sheet-option.selected { color: var(--accent-deep); }
.sheet-option .check {
  color: var(--accent-deep);
  visibility: hidden;
  flex-shrink: 0;
}
.sheet-option.selected .check { visibility: visible; }

.sheet-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  margin: 0 10px;
  user-select: none;
}
.sheet-checkbox:active { background: #F4F2EC; }
.sheet-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--text);
  margin: 0;
  flex-shrink: 0;
  margin-top: 1px;
}
.sheet-checkbox .desc {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}
.sheet-apply {
  display: block;
  width: calc(100% - 28px);
  margin: 14px 14px 0;
  background: var(--text);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
  cursor: pointer;
  font-family: inherit;
}

/* ─────────────────────────────────────────────────────────────
   결과 — 적용 세율 / 신고 안내 박스
───────────────────────────────────────────────────────────── */
.info-box {
  margin: 0 var(--side-gap) 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.info-box-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 11px;
}
.info-box-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.info-box-list li {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-secondary);
}
.info-box-list li::before {
  content: '●';
  color: var(--green-cta);    /* 녹색 마커 */
  font-size: 9px;
  flex-shrink: 0;
  margin-top: 6px;
}
.info-box-list li strong { font-weight: 700; color: var(--text); }
.info-box-list ul { margin: 0; padding: 0; }

/* 상환 스케줄 (대출이자 계산기) */
.schedule-box .info-box-title { margin-bottom: 8px; }
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 -2px;
}
.schedule-item {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 9px 11px;
}
.schedule-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.schedule-row-1 {
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 0.5px dashed var(--line-soft);
}
.schedule-month {
  flex: 0 0 auto;
  min-width: 48px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
.schedule-cell {
  flex: 1 1 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.schedule-row-2 .schedule-cell:first-child { padding-left: 58px; }
.schedule-label {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.schedule-value {
  flex: 1 1 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-value.strong {
  font-weight: 800;
  color: var(--accent-deep);
}
.schedule-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* 큰 금액 시 글자 자동 축소 (반응형) */
@media (max-width: 360px) {
  .schedule-value { font-size: 12.5px; }
  .schedule-month { min-width: 42px; font-size: 12px; }
  .schedule-row-2 .schedule-cell:first-child { padding-left: 52px; }
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  padding: 5px 0;
  gap: 12px;
}
.info-row .lbl { color: var(--text-secondary); }
.info-row .val { color: var(--text); font-weight: 700; text-align: right; }
.info-row .val.muted { color: var(--text-muted); font-weight: 600; }

/* 결과 영역 구분선 */
.result-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 14px 14px;
}
.result-divider .line {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(to right, #d5d2c9 0, #d5d2c9 3px, transparent 3px, transparent 7px);
}
.result-divider .label {
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}

/* 정적 페이지 (이용약관 등) */
.legal { padding: 0 14px 30px; }
.legal h2 { font-size: 14px; margin: 18px 0 6px; color: var(--text); font-weight: 800; }
.legal p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 8px;
}

