/* ════════════════════════════════════════
   아테나 복지서비스 — 프리미엄 미니멀 UI
════════════════════════════════════════ */

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

/* 스크린리더 전용 — 시각적으로는 숨기되 TalkBack/VoiceOver에는 읽힘 */
.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;
}

body {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background: #f4f6fb;
  color: #1a1a2e;
  min-height: 100vh;
}

/* ── 헤더 ── */
.header {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 24px 20px 20px;
  text-align: center;
  position: relative;
}
.logo    { font-size: 1.4rem; font-weight: 900; letter-spacing: -0.5px; }
.tagline { font-size: 0.85rem; opacity: 0.85; margin-top: 4px; }

/* ── 언어 선택 바 ── */
.lang-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  padding: 2px 6px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.lang-bar::-webkit-scrollbar { display: none; }

/* 카드형 국기 버튼 */
.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 62px;
  height: 64px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.18);
  cursor: pointer;
  flex-shrink: 0;
  padding: 6px 4px 6px;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.lang-btn:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.30);
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}
.lang-btn.active {
  border: 2.5px solid #fff;
  background: rgba(255,255,255,0.32);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.35), 0 6px 18px rgba(0,0,0,0.25);
  transform: translateY(-3px);
}

/* 국기 이미지 */
.lang-flag {
  width: 36px;
  height: 27px;
  object-fit: cover;
  border-radius: 3px;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* 언어명 — 국기 아래 별도 텍스트 */
.lang-name {
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
  white-space: nowrap;
}
.lang-btn.active .lang-name {
  color: #fff;
  text-shadow: 0 1px 4px rgba(37,99,235,0.8);
}

.main { max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; }

/* ════════════════════════════════════════
   입력 카드
════════════════════════════════════════ */
.input-card {
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* 도트 진행 */
.dot-progress { display: flex; justify-content: center; gap: 8px; margin-bottom: 26px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #e2e8f0; transition: all 0.3s; }
.dot.active { width: 24px; border-radius: 4px; background: #2563eb; }
.dot.done   { background: #93c5fd; }

/* 질문 */
.step-q   { font-size: 1.2rem; font-weight: 800; color: #111827; margin-bottom: 16px; line-height: 1.4; }
.step-sub { font-size: 0.82rem; color: #6b7280; margin-bottom: 14px; margin-top: -10px; }

/* 지역 */
.region-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.region-big-btn {
  padding: 16px; border: 2px solid #e5e7eb; border-radius: 14px;
  background: #fff; font-size: 1rem; font-weight: 700; color: #374151; cursor: pointer;
  transition: all 0.15s;
}
.region-big-btn:hover  { border-color: #2563eb; color: #2563eb; }
.region-big-btn.active { border-color: #2563eb; background: #eff6ff; color: #2563eb; }

/* 나이 */
.age-input {
  width: 100%; padding: 16px 18px;
  border: 2px solid #e5e7eb; border-radius: 14px;
  font-size: 1.4rem; font-weight: 700; color: #111827;
  text-align: center; outline: none; margin-bottom: 24px;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.age-input::-webkit-outer-spin-button,
.age-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.age-input:focus { border-color: #2563eb; }

/* select */
.select-box {
  width: 100%; padding: 13px 16px;
  border: 2px solid #e5e7eb; border-radius: 12px;
  font-size: 0.95rem; color: #374151; background: #fff;
  outline: none; margin-bottom: 16px; cursor: pointer;
}
.select-box:focus { border-color: #2563eb; }

/* 상황 그리드 */
.situation-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px; margin-bottom: 20px;
}
.sit-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; padding: 12px 6px;
  border: 2px solid #e5e7eb; border-radius: 14px;
  background: #fff; cursor: pointer; transition: all 0.15s;
}
.sit-card:hover  { border-color: #93c5fd; background: #f8faff; }
.sit-card.active { border-color: #2563eb; background: #eff6ff; }
.sit-icon  { font-size: 1.5rem; }
.sit-label {
  font-size: 0.68rem; font-weight: 600; color: #374151;
  text-align: center; line-height: 1.3; word-break: keep-all;
}
.sit-card.active .sit-label { color: #2563eb; }

/* 부가 선택 */
.extra-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.extra-label { font-size: 0.78rem; font-weight: 700; color: #374151; margin-bottom: 7px; }
.optional { font-size: 0.68rem; color: #9ca3af; margin-left: 4px; font-weight: 400; }

/* 칩 */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border: 1.5px solid #e5e7eb; border-radius: 99px;
  background: #fff; font-size: 0.78rem; font-weight: 600; color: #374151;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.chip:hover  { border-color: #93c5fd; }
.chip.active { border-color: #2563eb; background: #eff6ff; color: #2563eb; }
.small-chips .chip { font-size: 0.72rem; padding: 5px 10px; }

/* 버튼 */
.btn-main {
  width: 100%; padding: 16px; background: #2563eb;
  color: #fff; border: none; border-radius: 14px;
  font-size: 1rem; font-weight: 800; cursor: pointer;
  transition: background 0.15s, transform 0.1s; margin-top: 4px;
}
.btn-main:hover { background: #1d4ed8; transform: translateY(-1px); }
.btn-main.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-row-two { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.btn-back-sm {
  padding: 15px 18px; border: 1.5px solid #e5e7eb; border-radius: 14px;
  background: #fff; font-size: 0.9rem; color: #6b7280; cursor: pointer; white-space: nowrap;
}
.btn-back-sm:hover { background: #f9fafb; }

/* NLP 진입 */
.nlp-entry { text-align: center; margin-top: 14px; }
.nlp-entry-btn {
  background: none; border: none; color: #2563eb;
  font-size: 0.88rem; font-weight: 700; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* NLP 패널 */
.nlp-panel {
  background: #fff; border-radius: 22px;
  padding: 28px 24px; box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.nlp-textarea {
  width: 100%; padding: 14px 16px;
  border: 2px solid #e5e7eb; border-radius: 14px;
  font-size: 0.95rem; color: #111827; resize: none;
  outline: none; line-height: 1.6; margin-bottom: 16px; font-family: inherit;
}
.nlp-textarea:focus { border-color: #2563eb; }
.nlp-examples { background: #f9fafb; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.example-title { font-size: 0.75rem; color: #9ca3af; margin-bottom: 6px; font-weight: 600; }
.example-item  { font-size: 0.8rem; color: #4b5563; line-height: 1.8; }
.nlp-opts-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
/* 소득 직접 입력 */
.income-input-wrap { margin-bottom: 4px; }
.income-input-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.income-input {
  flex: 1; padding: 14px 16px;
  border: 2px solid #e5e7eb; border-radius: 14px;
  font-size: 1.3rem; font-weight: 700; color: #111827;
  text-align: center; outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.income-input::-webkit-outer-spin-button,
.income-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.income-input:focus { border-color: #2563eb; }
.income-unit {
  font-size: 0.95rem; font-weight: 700; color: #6b7280; white-space: nowrap;
}
.income-result {
  display: flex; align-items: center; gap: 8px;
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  border-radius: 12px; padding: 10px 14px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.income-result-arrow { font-size: 1rem; color: #2563eb; font-weight: 900; }
.income-result-text  { font-size: 0.88rem; font-weight: 700; color: #1e40af; }
.income-result.warn  { background: #fff7ed; border-color: #fed7aa; }
.income-result.warn .income-result-text  { color: #c2410c; }
.income-result.warn .income-result-arrow { color: #f97316; }

/* 음성 입력 */
.voice-input-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.voice-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: 99px;
  border: 2px solid #2563eb; background: #eff6ff;
  color: #2563eb; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.voice-btn:hover { background: #dbeafe; }
.voice-btn.recording {
  background: #fef2f2; border-color: #dc2626; color: #dc2626;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}
.voice-icon  { font-size: 1.1rem; }
.voice-label { font-size: 0.85rem; }
.voice-status {
  font-size: 0.8rem; color: #dc2626; font-weight: 700;
  animation: blink 1s step-start infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nlp-cancel-btn {
  width: 100%; padding: 12px; margin-top: 10px;
  background: none; border: 1.5px solid #e5e7eb;
  border-radius: 12px; font-size: 0.88rem; color: #6b7280; cursor: pointer;
}
.nlp-region { margin-bottom: 14px; }
.nlp-region-hint { font-size: 0.8rem; color: #b45309; margin-bottom: 10px; }

/* 서약 */
.pledge-box {
  background: #f0f9ff; border: 1.5px solid #bae6fd;
  border-radius: 16px; padding: 20px; margin-bottom: 20px;
}
.pledge-title  { font-size: 0.95rem; font-weight: 800; color: #0369a1; margin-bottom: 8px; }
.pledge-desc   { font-size: 0.82rem; color: #374151; line-height: 1.7; margin-bottom: 14px; }
/* 문장 전체 터치 서약 버튼 */
.pledge-confirm-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; background: #fff;
  border: 2px solid #bfdbfe; border-radius: 14px;
  padding: 14px 16px; cursor: pointer;
  font-size: 0.92rem; font-weight: 700; color: #1e40af;
  margin-bottom: 12px; text-align: left;
  transition: all 0.2s ease;
}
.pledge-confirm-btn:hover { border-color: #2563eb; background: #f0f9ff; }
.pledge-confirm-btn.pledged {
  background: #eff6ff; border-color: #2563eb;
  color: #1d4ed8;
}
.pledge-confirm-icon {
  font-size: 1.3rem; flex-shrink: 0; width: 24px; text-align: center;
  color: #2563eb; transition: all 0.2s;
}
.pledge-confirm-btn.pledged .pledge-confirm-icon { color: #16a34a; }
.pledge-legal  {
  font-size: 0.73rem; color: #6b7280;
  border-left: 3px solid #d1d5db; padding: 7px 10px;
  border-radius: 0 8px 8px 0; line-height: 1.6;
}

/* 로딩 */
.loading { text-align: center; padding: 60px 20px; background: #fff; border-radius: 22px; }
.spinner {
  width: 40px; height: 40px; border: 4px solid #e2e8f0;
  border-top-color: #2563eb; border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { font-size: 0.9rem; color: #6b7280; }

/* ════════════════════════════════════════
   결과
════════════════════════════════════════ */
.result-header {
  background: #fff; border-radius: 22px;
  padding: 22px; margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.result-header h2 { font-size: 1.1rem; font-weight: 800; color: #111827; }

.nlp-analysis {
  background: #fff; border-radius: 16px;
  padding: 14px 16px; margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.analysis-title { font-size: 0.78rem; font-weight: 700; color: #15803d; margin-bottom: 8px; }
.analysis-tags  { display: flex; flex-wrap: wrap; gap: 5px; }
.analysis-tag   { padding: 4px 10px; background: #dcfce7; color: #166534; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.nlp-warning    { font-size: 0.76rem; color: #b45309; background: #fef3c7; border-radius: 8px; padding: 6px 10px; margin-top: 7px; }

/* 온톨로지 */
.ont-section { margin-bottom: 14px; }
.ont-header  { font-size: 0.95rem; font-weight: 800; color: #1e40af; margin-bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ont-badge   { font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.ont-badge-def { background: #dcfce7; color: #15803d; }
.ont-badge-pos { background: #fff7ed; color: #c2410c; }
.ont-badge-fut { background: #eff6ff; color: #1d4ed8; }

.ont-disclaimer {
  font-size: 0.75rem; color: #6b7280;
  background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.6;
}
.disclaimer-legal { display: block; margin-top: 5px; font-size: 0.71rem; }

.ont-group { margin-bottom: 10px; }
.ont-group-title {
  font-size: 0.85rem; font-weight: 700; padding: 8px 12px;
  border-radius: 12px 12px 0 0; display: flex; align-items: center; gap: 8px;
}
.ont-group-def .ont-group-title { background: #dcfce7; color: #166534; }
.ont-group-pos .ont-group-title { background: #fff7ed; color: #c2410c; }
.ont-group-fut .ont-group-title { background: #eff6ff; color: #1e40af; }
.ont-toggle-btn { margin-left: auto; background: none; border: 1px solid currentColor; border-radius: 6px; padding: 2px 8px; font-size: 0.7rem; cursor: pointer; color: inherit; }

.ont-card { border: 1px solid #e5e7eb; border-top: none; padding: 14px 16px; background: #fff; }
.ont-card + .ont-card { border-top: 1px solid #f3f4f6; }
.ont-card:last-child  { border-radius: 0 0 12px 12px; }
.ont-card:hover       { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.ont-card-def { border-left: 4px solid #22c55e; }
.ont-card-pos { border-left: 4px solid #f97316; }
.ont-card-fut { border-left: 4px solid #3b82f6; }

.ont-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.ont-policy-name { font-size: 0.92rem; font-weight: 700; color: #111827; }
/* 신청 마감일 */
.ont-deadline {
  font-size: 0.76rem; font-weight: 700; color: #b91c1c;
  background: #fef2f2; border-radius: 6px;
  padding: 5px 9px; margin-bottom: 6px;
}
.ont-deadline.calm { color: #047857; background: #f0fdf4; font-weight: 600; }

.ont-apply-btn {
  flex-shrink: 0; font-size: 0.72rem; font-weight: 700;
  padding: 6px 10px; background: #2563eb; color: #fff;
  border-radius: 8px; text-decoration: none; white-space: nowrap;
}
.ont-apply-btn:hover { background: #1d4ed8; }
.ont-desc    { font-size: 0.8rem; color: #4b5563; line-height: 1.5; margin-bottom: 7px; }
.ont-tags    { margin-bottom: 5px; }
.ont-tag     { display: inline-block; padding: 2px 7px; background: #f3f4f6; color: #374151; border-radius: 99px; font-size: 0.7rem; margin: 2px; }
.ont-docs    { font-size: 0.76rem; color: #6b7280; background: #f9fafb; border-radius: 6px; padding: 5px 9px; margin-bottom: 5px; }
.ont-reason  { font-size: 0.74rem; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 5px 9px; margin-bottom: 5px; }
.ont-authority { font-size: 0.74rem; color: #9ca3af; margin-top: 4px; }

.tel-link { color: #2563eb; font-weight: 700; text-decoration: none; border: 1.5px solid #2563eb; border-radius: 20px; padding: 2px 8px; font-size: 0.73rem; margin-left: 3px; }
.tel-link:hover { background: #2563eb; color: #fff; }

.link-section-wrap { margin-top: 14px; }
.link-section-header { font-size: 0.88rem; font-weight: 700; color: #374151; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #e5e7eb; }
.result-section { background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 6px rgba(0,0,0,0.05); }
.section-title  { font-size: 0.85rem; font-weight: 700; color: #374151; margin-bottom: 10px; }
.service-item   { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.service-item:last-child { border-bottom: none; }
.service-name   { font-size: 0.82rem; color: #374151; }
.service-link   { flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: #2563eb; text-decoration: none; }

/* ════════════════════════════════════════
   선순환
════════════════════════════════════════ */
.pay-forward-section {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1.5px solid #bbf7d0; border-radius: 18px;
  padding: 22px 20px; text-align: center; margin: 16px 0;
}
.pay-forward-nudge { font-size: 0.88rem; color: #374151; line-height: 1.7; margin-bottom: 14px; }
.pay-forward-nudge strong { color: #15803d; }
.pay-forward-btn {
  background: #16a34a; color: #fff; border: none;
  border-radius: 50px; padding: 13px 24px; font-size: 0.9rem;
  font-weight: 700; cursor: pointer; width: 100%;
}
.pay-forward-btn:hover { background: #15803d; }

/* ── 보안 배지 (STEP A 상단) ── */
.security-badge {
  background: #f0f9ff; border: 1px solid #bae6fd;
  border-radius: 10px; padding: 9px 14px;
  font-size: 0.78rem; color: #0369a1; font-weight: 600;
  text-align: center; margin-bottom: 18px;
  letter-spacing: -0.2px;
}

/* ── 부정수급 신고 안내 ── */
.fraud-guide {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 14px; padding: 16px 18px; margin: 12px 0;
}
.fraud-guide-title {
  font-size: 0.82rem; font-weight: 700; color: #92400e;
  margin-bottom: 9px;
}
.fraud-guide-list {
  list-style: none; display: flex; flex-direction: column; gap: 6px;
}
.fraud-guide-list li {
  font-size: 0.78rem; color: #78350f; line-height: 1.6;
  padding-left: 10px; position: relative;
}
.fraud-guide-list li::before { content: "·"; position: absolute; left: 0; }
.fraud-tel {
  color: #b45309; font-weight: 700; text-decoration: none;
}
.fraud-tel:hover { text-decoration: underline; }

.btn-retry { width: 100%; padding: 14px; background: #fff; border: 1.5px solid #e5e7eb; border-radius: 14px; font-size: 0.9rem; color: #6b7280; cursor: pointer; margin-top: 4px; }
.btn-retry:hover { background: #f9fafb; }

/* ════════════════════════════════════════
   모달
════════════════════════════════════════ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: #fff; border-radius: 22px; padding: 28px 22px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: modalIn 0.25s ease; }
@keyframes modalIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.modal-content h3 { font-size: 1.15rem; font-weight: 800; color: #111827; text-align: center; margin-bottom: 8px; }
.modal-desc   { font-size: 0.82rem; color: #4b5563; line-height: 1.7; text-align: center; margin-bottom: 18px; }
.modal-options { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.modal-option-btn { display: flex; align-items: center; gap: 13px; background: #f9fafb; border: 1.5px solid #e5e7eb; border-radius: 14px; padding: 13px 14px; cursor: pointer; text-align: left; width: 100%; transition: border-color 0.15s, background 0.15s; }
.modal-option-btn:hover { border-color: #16a34a; background: #f0fdf4; }
.modal-opt-icon { font-size: 1.5rem; flex-shrink: 0; }
.modal-opt-text strong { display: block; font-size: 0.88rem; color: #111827; margin-bottom: 2px; }
.modal-opt-text small  { font-size: 0.73rem; color: #6b7280; line-height: 1.4; }
.modal-close-btn { width: 100%; background: none; border: 1.5px solid #d1d5db; border-radius: 10px; padding: 11px; font-size: 0.85rem; color: #6b7280; cursor: pointer; }
.modal-close-btn:hover { background: #f3f4f6; }

/* 푸터 */
.footer { text-align: center; padding: 16px; max-width: 480px; margin: 0 auto; }

/* 개인정보 보호 배너 */
.privacy-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1.5px solid #bae6fd; border-radius: 16px;
  padding: 16px 18px; text-align: left;
}
.privacy-icon { font-size: 1.8rem; flex-shrink: 0; }
.privacy-text strong {
  display: block; font-size: 0.88rem; color: #0369a1;
  font-weight: 800; margin-bottom: 4px;
}
.privacy-text p {
  font-size: 0.78rem; color: #374151; line-height: 1.6; margin: 0;
}
.privacy-text p strong { display: inline; font-size: inherit; color: #0369a1; }

/* 유틸 */
.hidden { display: none !important; }

/* ════════════════════════════════════════
   모바일 반응형 (≤ 480px)
════════════════════════════════════════ */
@media (max-width: 480px) {

  /* 헤더 */
  .header { padding: 18px 14px 14px; }
  .logo   { font-size: 1.2rem; }
  .tagline { font-size: 0.78rem; }

  /* 언어 버튼 — 7개가 좁은 화면에서도 한 줄로 스크롤 */
  .lang-bar { gap: 5px; margin-top: 12px; padding: 2px 4px 6px; justify-content: flex-start; }
  .lang-btn { width: 54px; height: 56px; border-radius: 10px; padding: 5px 3px 5px; gap: 3px; }
  .lang-flag { width: 30px; height: 22px; }
  .lang-name { font-size: 0.52rem; }

  /* 메인 컨텐츠 */
  .main { padding: 14px 10px 32px; }

  /* 입력 카드 */
  .input-card { padding: 20px 16px; border-radius: 18px; }

  /* 도트 진행 */
  .dot-progress { gap: 6px; margin-bottom: 20px; }

  /* 질문 텍스트 */
  .step-q   { font-size: 1.05rem; margin-bottom: 12px; }
  .step-sub { font-size: 0.78rem; }

  /* 지역 버튼 */
  .region-row { gap: 8px; }
  .region-big-btn { padding: 13px 8px; font-size: 0.92rem; border-radius: 12px; }

  /* 나이 입력 */
  .age-input { padding: 14px 12px; font-size: 1.2rem; border-radius: 12px; margin-bottom: 18px; }

  /* 상황 그리드 — 3열 유지하되 패딩 축소 */
  .situation-grid { gap: 6px; margin-bottom: 16px; }
  .sit-card  { padding: 10px 4px; border-radius: 12px; gap: 4px; }
  .sit-icon  { font-size: 1.3rem; }
  .sit-label { font-size: 0.63rem; }

  /* 부가 선택 (가족·소득·성별) — 1열로 */
  .extra-row { grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }

  /* 칩 */
  .chip { padding: 7px 11px; font-size: 0.76rem; }
  .small-chips .chip { font-size: 0.7rem; padding: 5px 9px; }

  /* 버튼 */
  .btn-main { padding: 15px; font-size: 0.95rem; border-radius: 12px; }
  .btn-back-sm { padding: 14px 14px; font-size: 0.85rem; }

  /* NLP 패널 */
  .nlp-panel { padding: 20px 14px; border-radius: 18px; }
  .nlp-opts-row { grid-template-columns: 1fr; gap: 10px; }

  /* 서약 박스 */
  .pledge-box { padding: 16px 14px; }
  .pledge-confirm-btn { padding: 12px 13px; font-size: 0.86rem; }

  /* 결과 헤더 */
  .result-header { padding: 16px; border-radius: 18px; }
  .result-header h2 { font-size: 1rem; }

  /* 온톨로지 카드 */
  .ont-card { padding: 12px 12px; }
  .ont-policy-name { font-size: 0.88rem; }
  .ont-desc  { font-size: 0.77rem; }
  .ont-apply-btn { padding: 7px 10px; font-size: 0.7rem; }

  /* 링크 서비스 */
  .result-section { padding: 12px 13px; }
  .service-name   { font-size: 0.8rem; }
  .service-link   { font-size: 0.73rem; }

  /* 선순환 */
  .pay-forward-section { padding: 18px 14px; }
  .pay-forward-btn { padding: 12px 18px; font-size: 0.85rem; }

  /* 모달 */
  .modal-content { padding: 22px 16px; border-radius: 18px; }
  .modal-content h3 { font-size: 1rem; }

  /* 푸터 */
  .footer { padding: 12px 10px; font-size: 0.75rem; }

  /* 보안 배지 */
  .security-badge { font-size: 0.74rem; padding: 8px 12px; }

  /* 부정수급 안내 */
  .fraud-guide { padding: 14px 14px; }
  .fraud-guide-list li { font-size: 0.75rem; }
}

/* ════════════════════════════════════════
   초소형 화면 (≤ 360px, 구형 폰)
════════════════════════════════════════ */
@media (max-width: 360px) {
  .lang-btn  { width: 46px; height: 50px; }
  .lang-flag { width: 26px; height: 19px; }
  .lang-name { font-size: 0.48rem; }

  .step-q    { font-size: 0.98rem; }
  .sit-label { font-size: 0.6rem; }
  .situation-grid { grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
  .sit-card  { padding: 8px 3px; }
  .sit-icon  { font-size: 1.1rem; }

  .btn-main  { font-size: 0.9rem; padding: 14px; }
  .input-card { padding: 16px 12px; }
}

/* ════════════════════════════════════════
   태블릿 (481px ~ 768px)
════════════════════════════════════════ */
@media (min-width: 481px) and (max-width: 768px) {
  .main   { max-width: 520px; padding: 18px 20px 40px; }
  .footer { max-width: 520px; }
  .lang-bar { gap: 8px; }
  .lang-btn { width: 66px; height: 62px; }
}

/* ════════════════════════════════════════
   터치 접근성 — 최소 터치 타겟 44px
════════════════════════════════════════ */
@media (pointer: coarse) {
  .chip       { min-height: 38px; padding: 8px 14px; }
  .btn-main   { min-height: 52px; }
  .btn-back-sm { min-height: 50px; }
  .region-big-btn { min-height: 52px; }
  .ont-apply-btn  { min-height: 36px; padding: 8px 12px; }
  .lang-btn   { min-height: 52px; }
  .sit-card   { min-height: 68px; }
}

/* ════════════════════════════════════════
   가족 구성원 카운터 (v3.3)
════════════════════════════════════════ */
.family-composer {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 4px;
}

/* 본인 (고정 행) */
.fc-self {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-bottom: 1.5px solid #bfdbfe !important;
  cursor: default;
}
.fc-counter-fixed {
  display: flex; align-items: center; justify-content: center;
  width: 88px;
}
.fc-num-fixed {
  font-size: 1.1rem; font-weight: 800; color: #2563eb;
  background: #dbeafe; border-radius: 10px;
  padding: 6px 18px;
}

/* 일반 행 */
.fc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.fc-row:last-of-type { border-bottom: none; }
.fc-row.fc-active { background: #f0fdf4; }

.fc-icon {
  font-size: 1.35rem;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}
.fc-label-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.fc-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e3a8a;
}
.fc-hint {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* 카운터 버튼 */
.fc-counter {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.fc-btn {
  width: 34px; height: 34px;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
  flex-shrink: 0;
}
.fc-btn:hover:not(:disabled) { background: #dbeafe; }
.fc-btn:disabled { color: #cbd5e1; cursor: default; }
.fc-btn.fc-minus { border-right: 1px solid #e2e8f0; }
.fc-btn.fc-plus  { border-left:  1px solid #e2e8f0; }
.fc-num {
  width: 32px;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 34px;
}

/* 합계 행 */
.fc-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: #f8fafc;
  border-top: 1.5px solid #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}
.fc-total-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2563eb;
  background: #eff6ff;
  padding: 4px 14px;
  border-radius: 20px;
}

/* 모바일 */
@media (max-width: 400px) {
  .fc-btn  { width: 30px; height: 30px; font-size: 1rem; }
  .fc-num  { width: 26px; line-height: 30px; font-size: 0.9rem; }
  .fc-label { font-size: 0.82rem; }
}

/* ════════════════════════════════════════
   마이페이지 버튼 (헤더)
════════════════════════════════════════ */
.mypage-shortcut {
  position: absolute;
  top: 18px; right: 16px;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.45);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
}
.mypage-shortcut:hover { background: rgba(255,255,255,0.3); }

/* 결과화면 저장 버튼 */
.btn-save-result {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  padding: 13px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s;
}
.btn-save-result:hover { opacity: 0.88; }

/* ── 마이페이지 모달 ── */
.mypage-modal {
  max-width: 480px;
  width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
  border-radius: 22px;
}
.mypage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-radius: 22px 22px 0 0;
}
.mypage-header h3 { font-size: 1.1rem; font-weight: 800; color: #1e3a8a; }
.mypage-close {
  background: none; border: none;
  font-size: 1.2rem; cursor: pointer;
  color: #6b7280; padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.mypage-close:hover { background: #f3f4f6; }

.mypage-section {
  padding: 18px 22px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.mypage-section:last-of-type { border-bottom: none; }

.mypage-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

/* 내 정보 그리드 */
.mypage-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.mypage-profile-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}
.mypage-profile-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 3px;
}
.mypage-profile-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e3a8a;
  word-break: keep-all;
}

.mypage-edit-btn {
  display: block;
  width: 100%;
  margin: 6px 0 12px;
  padding: 10px;
  background: #eff6ff;
  color: #2563eb;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.mypage-edit-btn:hover { background: #dbeafe; }

/* 저장된 복지 카드 */
.mypage-saved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.mypage-saved-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.mypage-saved-card-body { flex: 1; min-width: 0; }
.mypage-saved-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mypage-saved-card-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mypage-saved-card-date {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 4px;
}
.mypage-saved-del {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background 0.14s;
}
.mypage-saved-del:hover { background: #fee2e2; }

.mypage-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 18px 0 8px;
}

.mypage-clear-btn {
  display: block;
  width: calc(100% - 44px);
  margin: 8px 22px 20px;
  padding: 12px;
  background: #fff1f2;
  color: #ef4444;
  border: 1.5px solid #fecaca;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.mypage-clear-btn:hover { background: #ffe4e6; }

/* 저장 완료 토스트 */
.save-toast {
  position: fixed;
  bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e3a8a;
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}
.save-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .mypage-shortcut { font-size: 0.72rem; padding: 5px 9px; }
  .mypage-profile-grid { grid-template-columns: 1fr; }
}
