:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-sub: #475569;
    --text-muted: #94a3b8;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --border: #e2e8f0;
    --success: #059669;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
  
  a {
    color: var(--primary);
    text-decoration: none;
  }
  
  a:hover {
    text-decoration: underline;
  }
  
  .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* Header */
  .site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
  }
  
  .logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
  }
  
  .nav-links {
    display: flex;
    gap: 20px;
    font-size: 0.92rem;
  }
  
  .nav-links a {
    color: var(--text-sub);
    font-weight: 500;
  }
  
  .nav-links a:hover {
    color: var(--primary);
    text-decoration: none;
  }
  
  /* Hero */
  .hero {
    padding: 40px 0 24px;
    text-align: center;
  }
  
  .hero-badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
  }
  
  .hero h1 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
  }
  
  .hero p {
    color: var(--text-sub);
    font-size: 0.98rem;
  }
  
  /* Calculator Layout */
  .calc-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    margin-bottom: 48px;
    align-items: start;
  }
  
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
  }
  
  .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .btn-reset {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-sub);
    font-size: 0.82rem;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
  }
  
  .btn-reset:hover {
    background: var(--bg);
    color: var(--text-main);
  }
  
  /* Form Elements */
  .form-group {
    margin-bottom: 22px;
  }
  
  .form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
  }
  
  .form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
  }
  
  .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .input-wrap input[type="number"] {
    width: 100%;
    padding: 12px 44px 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    outline: none;
    transition: border-color 0.15s;
  }
  
  .input-wrap input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }
  
  .input-unit {
    position: absolute;
    right: 14px;
    color: var(--text-sub);
    font-size: 0.9rem;
    font-weight: 500;
  }
  
  /* Frequency Segmented Control */
  .freq-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  
  .freq-option input {
    display: none;
  }
  
  .freq-option label {
    display: block;
    text-align: center;
    padding: 10px 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.15s;
  }
  
  .freq-option input:checked + label {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
  }
  
  /* Tax Exemption Checkboxes */
  .checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
  }
  
  .checkbox-item:hover {
    background: var(--bg);
  }
  
  .checkbox-item input[type="checkbox"] {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
  }
  
  .checkbox-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
  }
  
  .checkbox-text span {
    font-size: 0.8rem;
    color: var(--text-sub);
  }
  
  .hidden {
    display: none;
  }
  
  /* Result Card */
  .result-card {
    position: sticky;
    top: 84px;
  }
  
  .result-highlight {
    background: var(--primary-soft);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .result-highlight .label {
    font-size: 0.88rem;
    color: var(--primary);
    font-weight: 600;
  }
  
  .result-highlight .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
    letter-spacing: -0.02em;
  }
  
  .result-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .result-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.94rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
  }
  
  .result-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .result-list .num {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  
  .text-danger {
    color: var(--danger);
  }
  
  .text-success {
    color: var(--success);
  }
  
  .applied-info {
    background: var(--bg);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.82rem;
    color: var(--text-sub);
  }
  
  .applied-badge {
    display: inline-block;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
  }

  /* 금융소득종합과세 경고 배너 */
.warning-banner {
    margin-top: 14px;
    padding: 14px 16px;
    background-color: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    color: #92400e;
    font-size: 0.84rem;
    line-height: 1.5;
  }
  
  .warning-banner strong {
    display: block;
    margin-bottom: 4px;
    color: #b45309;
    font-size: 0.88rem;
  }
  
  .warning-banner p {
    margin: 0;
  }
  
  /* Content Sections (SEO & AdSense) */
  .content-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
  }
  
  .content-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
  }
  
  .content-section h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 18px 0 8px;
  }
  
  .content-section p,
  .content-section li {
    color: var(--text-sub);
    font-size: 0.95rem;
    margin-bottom: 10px;
  }
  
  .content-section ul {
    padding-left: 20px;
  }
  
  .info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
  }
  
  .info-table th,
  .info-table td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
  }
  
  .info-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-main);
  }
  
  /* Footer */
  .site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 48px;
    color: var(--text-sub);
    font-size: 0.86rem;
  }
  
  .footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .footer-links {
    display: flex;
    gap: 16px;
  }
  
  @media (max-width: 768px) {
    .calc-grid {
      grid-template-columns: 1fr;
    }
    .result-card {
      position: static;
    }
    .hero h1 {
      font-size: 1.5rem;
    }
    .freq-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* 활성 메뉴 강조 */
.nav-links a.active {
  color: var(--primary);
  font-weight: 700;
}

/* 환율 상태 텍스트 */
.rate-status {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--primary);
}

/* 이중 통화 (원화 + 현지 통화) 표시 */
.result-highlight .sub-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.num-stack {
  text-align: right;
}

.num-stack .sub-currency {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* FAQ 아코디언 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--bg);
}

.faq-item summary {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 10px;
  margin-bottom: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* 404 에러 페이지 */
.error-box {
  text-align: center;
  padding: 72px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 48px 0;
  box-shadow: var(--shadow);
}

.error-code {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 12px;
}

.error-box h1 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.error-box p {
  color: var(--text-sub);
  margin-bottom: 28px;
}

.error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary,
.btn-outline {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.btn-outline {
  background: var(--surface);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg);
  text-decoration: none;
}

