/* ═══════════════════════════════════════════════════════
   AI 적합도 분석 페이지 전용 스타일 — ai-style.css v2
   ═══════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────
   페이지 헤더 — 인디고/퍼플 그라데이션
────────────────────────────────────────── */
.ai-page-header {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 45%, #24243e 100%);
  padding: 28px 20px 22px;
  color: #fff;
}

/* 배경 데코 원 */
.ai-page-header-deco { position: absolute; border-radius: 50%; pointer-events: none; }
.ai-deco1 {
  width: 240px; height: 240px; top: -80px; right: -70px;
  background: radial-gradient(circle at center, rgba(139,92,246,.35) 0%, transparent 70%);
  animation: deco-float 6s ease-in-out infinite;
}
.ai-deco2 {
  width: 160px; height: 160px; bottom: -50px; left: -40px;
  background: radial-gradient(circle at center, rgba(99,102,241,.28) 0%, transparent 70%);
  animation: deco-float 8s ease-in-out infinite reverse;
}
.ai-deco3 {
  width: 80px; height: 80px; top: 20px; left: 50%;
  background: radial-gradient(circle at center, rgba(167,139,250,.2) 0%, transparent 70%);
  animation: deco-float 5s ease-in-out infinite 1s;
}
@keyframes deco-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-12px) scale(1.05); }
}

/* 별빛 파티클 */
.ai-star {
  position: absolute; color: rgba(255,255,255,.6); font-size: 12px;
  pointer-events: none; animation: star-twinkle 3s ease-in-out infinite;
}
.s1 { top: 18px; left: 30%; font-size: 10px; animation-delay: 0s; }
.s2 { top: 40px; right: 30%; font-size: 8px; animation-delay: .8s; }
.s3 { top: 12px; right: 20%; font-size: 14px; animation-delay: 1.5s; }
@keyframes star-twinkle {
  0%, 100% { opacity: .4; transform: scale(1); }
  50%       { opacity: 1;  transform: scale(1.3) rotate(15deg); }
}

/* 헤더 인너 */
.ai-header-inner {
  display: flex; align-items: flex-start; gap: 16px;
  position: relative; z-index: 1; margin-bottom: 22px;
}
.ai-header-icon-wrap { flex-shrink: 0; }
.ai-header-icon {
  position: relative;
  width: 60px; height: 60px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.08));
  border: 1.5px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; backdrop-filter: blur(6px);
}
.ai-icon-pulse {
  position: absolute; inset: -6px; border-radius: 26px;
  border: 2px solid rgba(167,139,250,.5);
  animation: icon-pulse 2s ease-in-out infinite;
}
@keyframes icon-pulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50%       { opacity: 0;  transform: scale(1.18); }
}
.ai-icon-emoji { position: relative; z-index: 1; }

.ai-header-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.95); font-size: 10px; font-weight: 800;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 8px;
  letter-spacing: .5px; text-transform: uppercase;
}
.ai-header-title {
  font-size: 22px; font-weight: 900; color: #fff;
  letter-spacing: -.6px; line-height: 1.3; margin-bottom: 6px;
}
.ai-header-desc {
  font-size: 12.5px; color: rgba(255,255,255,.75); line-height: 1.7;
}

/* ── 스텝 진행 바 ── */
.ai-step-progress {
  display: flex; align-items: center; justify-content: center; gap: 0;
  position: relative; z-index: 1; padding: 0 10px;
}
.ai-sp-step {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  min-width: 60px;
  opacity: .45; transition: opacity .3s, transform .3s;
}
.ai-sp-step.active  { opacity: 1; }
.ai-sp-step.done    { opacity: .7; }
.ai-sp-step.active .ai-sp-icon {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.5);
  transform: scale(1.1);
}
.ai-sp-icon {
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(255,255,255,.1); border: 1.5px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all .3s;
}
.ai-sp-label {
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,.9);
  text-align: center;
}
.ai-sp-line {
  flex: 1; height: 2px; background: rgba(255,255,255,.15);
  position: relative; overflow: hidden;
}
.ai-sp-line-fill {
  height: 100%; width: 0%; background: rgba(255,255,255,.7);
  transition: width .5s ease; border-radius: 2px;
}
.ai-sp-line-fill.filled { width: 100%; }

/* ──────────────────────────────────────────
   스텝 컨테이너
────────────────────────────────────────── */
.ai-step {
  padding: 20px 16px 28px;
  animation: stepFade .35s ease both;
}
@keyframes stepFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 스텝 레이블 */
.ai-step-label {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1.5px solid var(--border-soft, #f0f0f0);
}
.ai-step-num-badge {
  position: relative; flex-shrink: 0;
  width: 36px; height: 36px;
}
.ai-step-num {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-size: 15px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  box-shadow: 0 3px 12px rgba(99,102,241,.35);
}
.ai-step-num-ring {
  position: absolute; inset: -4px; border-radius: 16px;
  border: 2px solid rgba(99,102,241,.3);
  animation: step-ring 2s ease-in-out infinite;
}
@keyframes step-ring {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%       { opacity: 0;  transform: scale(1.15); }
}
.ai-step-title {
  font-size: 17px; font-weight: 900; color: var(--txt1, #1a1a1a);
  letter-spacing: -.3px; margin-bottom: 2px;
}
.ai-step-sub {
  font-size: 11.5px; color: var(--txt4, #999); font-weight: 500;
}
.ai-step-chip-count {
  margin-left: auto;
  font-size: 10px; font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; padding: 3px 10px; border-radius: 20px;
  display: none;
}
.ai-step-chip-count.show { display: block; }

/* ──────────────────────────────────────────
   필드 카드
────────────────────────────────────────── */
.ai-field-card {
  background: #fff;
  border: 1.5px solid #f0eff8;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(99,102,241,.06), 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .2s, border-color .2s;
}
.ai-field-card:focus-within {
  border-color: #c7d2fe;
  box-shadow: 0 4px 20px rgba(99,102,241,.12);
}

.ai-field-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px;
}
.ai-field-icon-wrap {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.ai-field-icon-wrap.purple  { background: #f5f3ff; }
.ai-field-icon-wrap.blue    { background: #eff6ff; }
.ai-field-icon-wrap.green   { background: #f0fdf4; }
.ai-field-icon-wrap.orange  { background: #fff7ed; }
.ai-field-icon-wrap.indigo  { background: #eef2ff; }
.ai-field-icon-wrap.amber   { background: #fffbeb; }
.ai-field-icon-wrap.teal    { background: #f0fdfa; }
.ai-field-icon-wrap.pink    { background: #fdf2f8; }
.ai-field-icon-wrap.rose    { background: #fff1f2; }
.ai-field-icon-wrap.sky     { background: #f0f9ff; }

.ai-field-text { flex: 1; }
.ai-field-name {
  font-size: 14.5px; font-weight: 800; color: #111827;
  margin-bottom: 3px; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 6px;
}
.ai-required {
  color: #ef4444; font-size: 14px; font-weight: 900;
}
.ai-multi-badge {
  font-size: 9.5px; font-weight: 800; color: #6d28d9;
  background: #f5f3ff; border: 1px solid #ddd6fe;
  padding: 2px 8px; border-radius: 10px;
}
.ai-field-hint {
  font-size: 11.5px; color: #9ca3af; font-weight: 500;
}

/* ── 일반 칩 그룹 ── */
.ai-chip-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ai-chip {
  padding: 8px 16px; border-radius: 24px;
  font-size: 12.5px; font-weight: 600;
  color: #374151; background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  cursor: pointer; transition: all .18s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
  line-height: 1;
}
.ai-chip:active { transform: scale(.92); }
.ai-chip.selected {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 14px rgba(99,102,241,.4);
  transform: translateY(-1px);
}
.ai-chip.multi.selected {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 3px 14px rgba(16,185,129,.35);
}

/* ── 커스텀 입력 ── */
.ai-custom-input-wrap { margin-top: 12px; }
.ai-input-group {
  display: flex; align-items: center;
  border: 1.5px solid #e5e7eb; border-radius: 12px;
  overflow: hidden; background: #f9fafb;
  transition: border-color .2s, box-shadow .2s;
}
.ai-input-group:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: #fff;
}
.ai-input-icon {
  padding: 0 12px; color: #9ca3af; font-size: 13px;
}
.ai-custom-input {
  flex: 1; padding: 12px 0;
  font-size: 14px; color: #111827; background: transparent;
  border: none; outline: none;
  font-family: var(--font, 'Noto Sans KR', sans-serif); font-weight: 600;
}
.ai-custom-input::placeholder { color: #d1d5db; font-weight: 400; }
.ai-input-suffix {
  padding: 0 14px; font-size: 13px; font-weight: 700;
  color: #6366f1; background: #eef2ff; height: 100%;
  display: flex; align-items: center; border-left: 1.5px solid #e5e7eb;
}

/* ── 셀렉트 래퍼 ── */
.ai-select-wrap {
  position: relative; display: flex; align-items: center;
}
.ai-sel-icon {
  position: absolute; left: 14px; color: #6366f1; font-size: 13px; z-index: 1;
}
.ai-select {
  width: 100%; padding: 12px 14px 12px 38px;
  border: 1.5px solid #e5e7eb; border-radius: 12px;
  font-size: 14px; color: #111827; background: #f9fafb;
  outline: none; font-family: var(--font, 'Noto Sans KR', sans-serif); font-weight: 600;
  transition: border-color .2s, box-shadow .2s; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236366f1'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 36px;
}
.ai-select:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); background-color: #fff; }

/* ── 기업형태 카드 그리드 ── */
.ai-chip-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.ai-chip-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; padding: 12px 6px;
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  border-radius: 14px; cursor: pointer;
  transition: all .18s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.ai-chip-card:active { transform: scale(.94); }
.ai-chip-card.selected {
  background: linear-gradient(135deg, #eef2ff, #ede9fe);
  border-color: #a5b4fc;
  box-shadow: 0 3px 12px rgba(99,102,241,.2);
}
.chip-card-icon { font-size: 22px; line-height: 1; }
.chip-card-label {
  font-size: 11px; font-weight: 700; color: #374151;
  text-align: center; line-height: 1.2;
}
.ai-chip-card.selected .chip-card-label { color: #4338ca; }

/* ── 매출 바 그래프 스타일 ── */
.ai-revenue-grid {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 8px 0 4px;
}
.ai-rev-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 6px; cursor: pointer; padding: 0;
  background: none; border: none;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s;
}
.ai-rev-btn:active { transform: scale(.94); }
.rev-bar {
  width: 100%; background: #e5e7eb; border-radius: 6px 6px 0 0;
  transition: background .18s, transform .18s;
  min-height: 8px;
}
.ai-rev-btn.selected .rev-bar {
  background: linear-gradient(to top, #6366f1, #8b5cf6);
  transform: scaleY(1.05);
}
.rev-label {
  font-size: 10px; font-weight: 700; color: #6b7280; text-align: center;
  transition: color .18s;
}
.ai-rev-btn.selected .rev-label { color: #6366f1; }

/* ── 고용인원 선택 ── */
.ai-emp-options {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px;
  scrollbar-width: none;
}
.ai-emp-options::-webkit-scrollbar { display: none; }
.ai-emp-btn {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 12px 10px;
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  border-radius: 14px; cursor: pointer; min-width: 72px;
  transition: all .18s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.ai-emp-btn:active { transform: scale(.94); }
.ai-emp-btn.selected {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
  box-shadow: 0 3px 12px rgba(16,185,129,.2);
}
.emp-icon { font-size: 22px; }
.emp-count {
  font-size: 11px; font-weight: 800; color: #374151;
  line-height: 1;
}
.emp-desc {
  font-size: 10px; font-weight: 500; color: #9ca3af;
}
.ai-emp-btn.selected .emp-count { color: #059669; }
.ai-emp-btn.selected .emp-desc  { color: #10b981; }

/* ── 연령 선택 ── */
.ai-age-row {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 2px 0 4px; scrollbar-width: none;
}
.ai-age-row::-webkit-scrollbar { display: none; }
.ai-age-btn {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 12px 14px;
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  border-radius: 14px; cursor: pointer; min-width: 68px;
  transition: all .18s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.ai-age-btn:active { transform: scale(.94); }
.ai-age-btn.selected {
  background: linear-gradient(135deg, #fdf2f8, #fce7f3);
  border-color: #f9a8d4;
  box-shadow: 0 3px 12px rgba(236,72,153,.2);
}
.age-emoji { font-size: 22px; }
.age-range {
  font-size: 12px; font-weight: 800; color: #374151;
}
.age-years {
  font-size: 10px; font-weight: 500; color: #9ca3af;
}
.ai-age-btn.selected .age-range { color: #be185d; }
.ai-age-btn.selected .age-years { color: #db2777; }

/* ── 성별 선택 ── */
.ai-gender-row {
  display: flex; gap: 12px;
}
.ai-gender-btn {
  flex: 1; position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 8px; padding: 18px 12px;
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  border-radius: 16px; cursor: pointer;
  transition: all .18s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.ai-gender-btn:active { transform: scale(.96); }
.ai-gender-btn.selected {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #93c5fd;
  box-shadow: 0 4px 16px rgba(59,130,246,.2);
}
.gender-icon { font-size: 32px; }
.gender-label {
  font-size: 14px; font-weight: 800; color: #374151;
}
.ai-gender-btn.selected .gender-label { color: #1d4ed8; }
.gender-bonus {
  position: absolute; top: 8px; right: 8px;
  font-size: 9px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  padding: 2px 7px; border-radius: 10px;
}

/* ── 장애 여부 ── */
.ai-yn-row {
  display: flex; gap: 12px;
}
.ai-yn-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 16px;
  border-radius: 14px; cursor: pointer;
  font-size: 14px; font-weight: 700;
  position: relative; overflow: hidden;
  transition: all .18s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.ai-yn-btn.yes {
  background: #f0fdf4; border: 1.5px solid #bbf7d0; color: #166534;
}
.ai-yn-btn.no {
  background: #fafafa; border: 1.5px solid #e5e7eb; color: #6b7280;
}
.ai-yn-btn:active { transform: scale(.96); }
.ai-yn-btn.yes.selected {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,.35);
}
.ai-yn-btn.no.selected {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,.3);
}
.yn-bonus {
  position: absolute; top: 6px; right: 8px;
  font-size: 9px; font-weight: 800; color: #059669;
  background: #dcfce7; padding: 2px 7px; border-radius: 10px;
}
.ai-yn-btn.yes.selected .yn-bonus {
  background: rgba(255,255,255,.25); color: #fff;
}

/* ── 프로파일 확인 요약 카드 ── */
.ai-summary-card {
  background: linear-gradient(135deg, #faf5ff, #f5f3ff);
  border: 1.5px solid #ddd6fe; border-radius: 16px;
  padding: 16px; margin-bottom: 16px;
  animation: stepFade .3s ease both;
}
.ai-summary-title {
  font-size: 12px; font-weight: 800; color: #6d28d9;
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.ai-summary-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-summary-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border: 1.5px solid #ddd6fe;
  color: #4c1d95; font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px;
  box-shadow: 0 1px 4px rgba(109,40,217,.08);
}

/* ── AI 실행 섹션 ── */
.ai-run-section { margin-top: 8px; }
.ai-run-info {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: #6b7280; font-weight: 500;
  background: #f8fafc; border: 1px solid #e2e8f0;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 12px;
}
.ai-run-info i { color: #6366f1; }

/* ── 네비게이션 버튼 ── */
.ai-step-btns {
  display: flex; gap: 10px;
}
.ai-next-btn, .ai-next-btn.flex1 {
  flex: 1; padding: 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border-radius: 14px;
  font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 20px rgba(99,102,241,.4);
  letter-spacing: -.2px; margin-top: 6px;
  transition: transform .15s, box-shadow .15s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
}
.ai-next-btn:active { transform: scale(.97); box-shadow: 0 3px 10px rgba(99,102,241,.3); }

.ai-prev-btn {
  padding: 15px 20px;
  background: #fff; border: 1.5px solid #e5e7eb;
  color: #6b7280; border-radius: 14px;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
  transition: background .15s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
}
.ai-prev-btn:active { background: #f9fafb; }

/* AI 분석 실행 버튼 */
.ai-run-btn {
  flex: 1; padding: 0; height: 54px;
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  color: #fff; border-radius: 14px;
  font-size: 15px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(16,185,129,.45);
  letter-spacing: -.3px; transition: transform .15s, box-shadow .15s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
  position: relative; overflow: hidden;
  animation: run-glow 2.5s ease-in-out infinite;
}
@keyframes run-glow {
  0%, 100% { box-shadow: 0 6px 22px rgba(16,185,129,.45); }
  50%       { box-shadow: 0 8px 30px rgba(16,185,129,.65); }
}
.ai-run-btn:active { transform: scale(.97); }
.run-btn-inner {
  display: flex; align-items: center; gap: 10px; position: relative; z-index: 1;
}
.run-btn-inner i { font-size: 18px; }
.run-btn-text { font-size: 15px; }
.run-btn-shine {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.3), transparent);
  animation: shine 3s linear infinite;
}
@keyframes shine {
  0%   { left: -100%; }
  100% { left: 150%; }
}

/* ──────────────────────────────────────────
   결과 화면
────────────────────────────────────────── */

/* 결과 헤더 */
.ai-result-header {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 60%, #6366f1 100%);
  padding: 28px 20px 20px; color: #fff;
}
.ai-result-confetti {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-around;
  font-size: 18px; padding-top: 8px; pointer-events: none;
  animation: confetti-fall 1.5s ease both;
}
@keyframes confetti-fall {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ai-result-header-inner {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
  position: relative; z-index: 1;
}
.ai-result-icon-wrap {
  position: relative; flex-shrink: 0;
}
.ai-result-icon {
  width: 56px; height: 56px; border-radius: 18px;
  background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; backdrop-filter: blur(6px);
}
.ai-result-icon-ring {
  position: absolute; inset: -6px; border-radius: 24px;
  border: 2px solid rgba(255,255,255,.4);
  animation: icon-pulse 2s ease-in-out infinite;
}
.ai-result-title {
  font-size: 22px; font-weight: 900; color: #fff;
  letter-spacing: -.4px; margin-bottom: 4px;
}
.ai-result-sub {
  font-size: 12.5px; color: rgba(255,255,255,.8); line-height: 1.5;
}

/* 통계 카드 3종 */
.ai-stat-row {
  display: flex; gap: 10px; position: relative; z-index: 1;
}
.ai-stat-item {
  flex: 1; padding: 12px 8px; border-radius: 14px;
  text-align: center; backdrop-filter: blur(6px);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
}
.ai-stat-item.excellent { border-color: rgba(167,243,208,.4); }
.ai-stat-item.good      { border-color: rgba(147,197,253,.4); }
.ai-stat-item.urgent    { border-color: rgba(252,165,165,.4); }
.ai-stat-num {
  font-size: 28px; font-weight: 900; color: #fff;
  line-height: 1; margin-bottom: 4px;
}
.ai-stat-lbl {
  font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.75);
}

/* 프로파일 바 */
.ai-profile-bar {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; background: #faf5ff;
  border-bottom: 1.5px solid #ede9fe;
}
.ai-profile-bar-label {
  flex-shrink: 0; font-size: 11px; font-weight: 800; color: #7c3aed;
  padding-top: 4px; display: flex; align-items: center; gap: 4px;
}
.ai-result-tags {
  display: flex; flex-wrap: wrap; gap: 6px; flex: 1;
}
.ai-profile-tag {
  display: inline-flex; align-items: center;
  background: #fff; border: 1.5px solid #ddd6fe;
  color: #4c1d95; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 18px;
}

/* 결과 필터 탭 */
.ai-result-filter {
  display: flex; gap: 6px; padding: 12px 14px;
  background: #fff; border-bottom: 1.5px solid #f3f4f6;
  overflow-x: auto; scrollbar-width: none;
}
.ai-result-filter::-webkit-scrollbar { display: none; }
.ai-rf-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: 22px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  color: #6b7280; background: #f9fafb; border: 1.5px solid #e5e7eb;
  transition: all .18s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
}
.ai-rf-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 12px rgba(99,102,241,.35);
}

/* 결과 리스트 */
.ai-result-list {
  padding: 12px 14px 20px;
  display: flex; flex-direction: column; gap: 12px;
}

/* ── AI 결과 카드 ── */
.ai-result-card {
  background: #fff; border-radius: 18px;
  border: 1.5px solid #f3f4f6;
  box-shadow: 0 3px 14px rgba(0,0,0,.06);
  overflow: hidden; cursor: pointer; position: relative;
  transition: transform .18s, box-shadow .18s;
  animation: cardAppear .4s ease both;
}
@keyframes cardAppear {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-result-card:active { transform: scale(.985); }

/* 강력추천 카드 */
.ai-top-card {
  border-color: #c7d2fe;
  box-shadow: 0 4px 20px rgba(99,102,241,.15);
}
.ai-top-badge {
  position: absolute; top: 0; right: 0;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 5px 14px; border-radius: 0 18px 0 14px;
  letter-spacing: .3px;
}
.ai-closed-card { opacity: .6; }

/* 랭크 배지 */
.ai-rank-badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 22px; z-index: 2; line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}

/* 점수 영역 */
.ai-card-score-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  background: linear-gradient(135deg, #fafafa, #f5f5f5);
  border-bottom: 1px solid #f0f0f0;
}
.ai-card-score-info {
  display: flex; align-items: center; gap: 10px;
}
.ai-score-circle {
  position: relative; width: 48px; height: 48px; flex-shrink: 0;
}
.ai-score-svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.ai-score-num {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px; font-weight: 900; line-height: 1;
}
.ai-score-pct {
  position: absolute; bottom: 6px; right: 2px;
  font-size: 8px; font-weight: 800;
}
.ai-score-label {
  font-size: 12px; font-weight: 800;
  margin-bottom: 6px; letter-spacing: -.1px;
}
.ai-score-bar-wrap { width: 80px; }
.ai-score-bar {
  height: 5px; background: #e5e7eb; border-radius: 4px; overflow: hidden;
}
.ai-score-fill {
  height: 100%; border-radius: 4px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* 카드 바디 */
.ai-card-body {
  padding: 12px 16px;
}
.ai-card-title {
  font-size: 14px; font-weight: 800; color: #111827;
  line-height: 1.4; margin-bottom: 5px; letter-spacing: -.2px;
}
.ai-card-org {
  font-size: 11.5px; color: #9ca3af; font-weight: 500;
  margin-bottom: 8px; display: flex; align-items: center; gap: 4px;
}
.ai-card-badges {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px;
}
.ai-reasons {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding-top: 8px; border-top: 1px dashed #f0f0f0;
}
.ai-reason-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  color: #166534; padding: 3px 9px; border-radius: 10px;
}

/* 카드 푸터 */
.ai-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #fafafa;
  border-top: 1px solid #f3f4f6;
}
.ai-card-date {
  font-size: 11px; font-weight: 600; color: #9ca3af;
  display: flex; align-items: center; gap: 5px;
}
.ai-card-arrow {
  color: #d1d5db; font-size: 12px;
}

/* 빈 결과 */
.ai-empty {
  text-align: center; padding: 48px 24px;
  color: #9ca3af;
}
.ai-empty-icon { font-size: 48px; margin-bottom: 14px; }
.ai-empty-title { font-size: 15px; font-weight: 800; color: #6b7280; margin-bottom: 6px; }
.ai-empty-desc  { font-size: 13px; }

/* 다시 분석 버튼 */
.ai-rerun-wrap {
  padding: 0 14px 24px; display: flex; justify-content: center;
}
.ai-rerun-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 14px;
  background: #f5f3ff; border: 2px solid #ddd6fe;
  color: #6d28d9; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: all .18s;
  font-family: var(--font, 'Noto Sans KR', sans-serif);
}
.ai-rerun-btn:active { transform: scale(.96); }
.ai-rerun-btn:hover  { background: #ede9fe; }

/* ──────────────────────────────────────────
   토스트 메시지
────────────────────────────────────────── */
.ai-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(30,27,75,.93); color: #fff;
  font-size: 13.5px; font-weight: 700; padding: 13px 24px;
  border-radius: 24px; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  white-space: nowrap; z-index: 9999;
  opacity: 0; transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.ai-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ──────────────────────────────────────────
   홈 AI 프로모 카드
────────────────────────────────────────── */
.ai-promo-card {
  margin: 14px 16px;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  border-radius: 20px; padding: 20px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 6px 24px rgba(49,46,129,.4);
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, box-shadow .15s;
}
.ai-promo-card:active { transform: scale(.98); }
.ai-promo-deco1 {
  position: absolute; top: -30px; right: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.4), transparent 70%);
  pointer-events: none;
}
.ai-promo-deco2 {
  position: absolute; bottom: -20px; left: 30%;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.3), transparent 70%);
  pointer-events: none;
}
.ai-promo-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px;
  background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; position: relative; z-index: 1;
}
.ai-promo-text { flex: 1; position: relative; z-index: 1; }
.ai-promo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.9); font-size: 9.5px; font-weight: 800;
  padding: 3px 10px; border-radius: 12px; margin-bottom: 6px;
  letter-spacing: .5px;
}
.ai-promo-title {
  font-size: 15px; font-weight: 900; color: #fff;
  margin-bottom: 4px; letter-spacing: -.3px;
}
.ai-promo-desc {
  font-size: 11.5px; color: rgba(255,255,255,.7);
}
.ai-promo-arrow {
  flex-shrink: 0; color: rgba(255,255,255,.6);
  font-size: 16px; position: relative; z-index: 1;
  animation: promo-bounce 1.5s ease-in-out infinite;
}
@keyframes promo-bounce {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(4px); }
}

/* ──────────────────────────────────────────
   D-Day 배지 (결과 카드용)
────────────────────────────────────────── */
.dday-badge {
  font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: 10px;
}
.dday-badge.urgent { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.dday-badge.near   { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.dday-badge.normal { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.dday-badge.coming { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.dday-badge.done   { background: #f9fafb; color: #9ca3af; border: 1px solid #e5e7eb; }

/* ──────────────────────────────────────────
   반응형 (태블릿 이상)
────────────────────────────────────────── */
@media (min-width: 480px) {
  .ai-chip-grid { grid-template-columns: repeat(4, 1fr); }
  .ai-age-row, .ai-emp-options { flex-wrap: wrap; }
}
