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

:root {
  /* BMW Brand Colors */
  --primary: #1C69D4;
  --primary-hover: #0653B6;
  --primary-light: #E8F3FF;
  --primary-glow: rgba(28, 105, 212, 0.15);
  --secondary: #4E5968;
  --success: #00C4B8;
  --danger: #FF736A;
  --bg: #0D0D0F;
  --bg-elevated: #141417;
  --surface: #FFFFFF;
  --text-primary: #191F28;
  --text-secondary: #4E5968;
  --text-tertiary: #8B95A1;
  --border: #E5E8EB;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  /* BMW Premium Glow */
  --bmw-glow-blue: rgba(28, 105, 212, 0.4);
  --bmw-glow-white: rgba(255, 255, 255, 0.03);
}

body {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Pretendard', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 24px 0 60px;
  position: relative;
}

/* BMW Premium Ambient Light Effect */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(28, 105, 212, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 0%, rgba(28, 105, 212, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(28, 105, 212, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: ambientPulse 8s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  0% {
    opacity: 0.7;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1.02) rotate(1deg);
  }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 3열 레이아웃 */
.page-layout {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: flex-start;
}

/* 광고 사이드바 */
/* DISABLED: 광고 영역
.ad-sidebar {
  display: none;
}

.ad-sidebar .ad-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

.ad-sticky {
  position: sticky;
  top: 80px;
}
*/

/* 중앙 컨텐츠 영역 */
.content-center {
  width: 100%;
  max-width: 520px;
  flex: 0 1 auto;
  margin: 0 auto;
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 데스크톱/태블릿: canvas 좌우 분할 (폼 확장 시) */
@media (min-width: 768px) {
  /* S2 폼 확장: content-center 넓히기 + flex-grow 허용 */
  body.state-form-expanded .content-center {
    max-width: 100%;
    flex: 1 1 auto;
  }

  /* S2: canvas 좌우 분할 */
  body.state-form-expanded .canvas-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  /* 왼쪽: AI 입력 고정폭 */
  body.state-form-expanded .canvas-left {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
  }

  /* 오른쪽: 폼 나머지 공간 */
  body.state-form-expanded .canvas-right {
    flex: 1;
    min-width: 0;
  }

  /* 왼쪽 패널 안 chat-input-bar max-width 해제 */
  .canvas-left .chat-input-bar {
    max-width: 100%;
  }

  /* 오른쪽 패널 안 sub-input-grid 2열 제한 */
  .canvas-right .sub-input-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1024px+: 왼쪽 패널 넓히기 */
@media (min-width: 1024px) {
  body.state-form-expanded .content-center {
    max-width: 1100px;
  }

  body.state-form-expanded .canvas-left {
    width: 380px;
  }
}

/* 1200px+: 확장 */
@media (min-width: 1200px) {
  body.state-form-expanded .content-center {
    max-width: 1200px;
  }

  body.state-form-expanded .canvas-left {
    width: 420px;
  }
}

/* 1400px+: 더 넓게 */
@media (min-width: 1400px) {
  body.state-form-expanded .content-center {
    max-width: 1400px;
  }

  body.state-form-expanded .canvas-left {
    width: 460px;
  }
}

/* ==================== 결과 전체화면 뷰 ==================== */
.result-fullscreen {
  display: none;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  animation: resultFullscreenIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.state-results .result-fullscreen {
  display: block;
}

body.state-results .canvas-layout {
  display: none;
}

body.state-results .chat-landing {
  display: none;
}

/* S1: content-center를 결과 표시에 맞게 확장 */
body.state-results .content-center {
  max-width: 720px;
}

@keyframes resultFullscreenIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 뒤로가기 버튼 */
.btn-back-to-calc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  margin-bottom: 20px;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  color: #B0B8C1;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-to-calc:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  color: #E8F3FF;
}

.btn-back-to-calc svg {
  flex-shrink: 0;
}

/* DISABLED: 광고 영역
@media (min-width: 1200px) {
  .ad-sidebar {
    width: 200px;
  }
}

@media (min-width: 1400px) {
  .ad-sidebar {
    width: 250px;
  }
}

.ad-bottom {
  margin-top: 32px;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
  min-height: 90px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

.ad-placeholder {
  color: rgba(255, 255, 255, 0.15);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
}
*/

/* Header - BMW Premium Style */
.header {
  text-align: center;
  margin-bottom: 48px;
  padding-top: 20px;
  position: relative;
}

.header h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #FFFFFF 0%, #E8F3FF 50%, #FFFFFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.2;
  text-shadow: 0 0 60px rgba(28, 105, 212, 0.3);
}

.subtitle {
  font-size: 16px;
  color: #B0B8C1;
  font-weight: 400;
}

/* Canvas Layout */
.canvas-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.canvas-left {
  width: 100%;
}

/* 데스크톱 Canvas 스타일: 입력바를 하단에 배치 */
@media (min-width: 768px) {
  body.state-form-expanded .canvas-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: calc(100vh - 120px);
  }
}

.canvas-right {
  width: 100%;
}

/* 결과 섹션 등장 애니메이션 */
@keyframes resultAppear {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.result-section {
  animation: resultAppear 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 결과 섹션 강조 스타일 - BMW Premium Glow */
.canvas-layout.with-results .result-section {
  border: 1px solid rgba(28, 105, 212, 0.3);
  box-shadow:
    0 0 0 1px rgba(28, 105, 212, 0.1),
    0 4px 20px rgba(28, 105, 212, 0.12),
    0 8px 32px rgba(28, 105, 212, 0.08),
    0 0 80px -20px rgba(28, 105, 212, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Sections */
.input-section,
.result-section {
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius-xl);
  box-shadow:
    0 0 0 1px rgba(28, 105, 212, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 0 60px -20px rgba(28, 105, 212, 0.15),
              0 8px 20px -2px rgba(255, 200, 100, 0.25),
              0 10px 24px -2px rgba(255, 195, 95, 0.22),
              0 12px 28px -3px rgba(255, 190, 90, 0.19),
              0 14px 32px -3px rgba(255, 185, 85, 0.16),
              0 16px 36px -4px rgba(255, 180, 80, 0.13),
              0 18px 40px -4px rgba(255, 175, 75, 0.10),
              0 20px 44px -5px rgba(255, 170, 70, 0.08),
              0 24px 52px -6px rgba(255, 165, 65, 0.06),
              0 28px 60px -8px rgba(255, 160, 60, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 2px solid #E5E8EB;
  position: relative;
}

/* Result Header with Export Buttons */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.input-section h2,
.result-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.input-section h2 {
  margin-bottom: 24px;
}

/* Export Buttons */
.export-buttons {
  display: flex;
  gap: 8px;
}

.btn-export {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  background: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-export:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-export svg {
  flex-shrink: 0;
}

.btn-export-image:hover {
  background: #E8F5E9;
  border-color: #4CAF50;
  color: #2E7D32;
}

.btn-export-pdf:hover {
  background: #FFEBEE;
  border-color: #F44336;
  color: #C62828;
}

/* Form Groups */
.form-group {
  margin-bottom: 24px;
}

.form-group-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.inline-input {
  display: flex;
  flex-direction: column;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.label-text {
  font-size: 15px;
}

.required-badge {
  display: inline-block;
  padding: 2px 6px;
  margin-left: 6px;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.label-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-left: 4px;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
  color: var(--text-primary);
  transition: all 0.2s ease;
  background: var(--surface);
}

.form-group input[type="number"]::placeholder,
.form-group input[type="text"]::placeholder {
  color: #B0B8C1;
}

.form-group input[type="number"]:hover,
.form-group input[type="text"]:hover,
.form-group select:hover {
  border-color: #B0B8C1;
}

.form-group input[type="number"]:focus,
.form-group input[type="text"]:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.1);
}

.form-group input[type="text"]:read-only {
  background: var(--primary-light);
  cursor: not-allowed;
  font-weight: 700;
  color: var(--primary);
  border-color: var(--primary-light);
}

/* 한글 단위 힌트 — label 우측에 표시 */
.korean-unit-hint {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.korean-unit-hint:empty {
  display: none;
}

/* 한글 단위 힌트가 있는 label → flex 전환 */
label.has-korean-hint {
  display: flex;
  align-items: baseline;
}

/* Input with Unit */
.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-unit input {
  width: 100%;
  padding-right: 60px;
}

.input-with-unit input[type="number"]::-webkit-inner-spin-button,
.input-with-unit input[type="number"]::-webkit-outer-spin-button {
  margin-left: 20px;
}

.input-unit {
  position: absolute;
  right: 50px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
}

/* Sub Inputs Grid */
.sub-input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

/* 태블릿 이상: 2열 */
@media (min-width: 640px) {
  .sub-input-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 데스크톱: 4열 */
@media (min-width: 1024px) {
  .sub-input-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Sub Inputs */
.sub-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.sub-input-grid .sub-input-group {
  margin-top: 0;
}

.form-group > .sub-input-group {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.sub-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.sub-input-grid .sub-label {
  font-size: 12px;
  white-space: nowrap;
}

/* Label with Checkbox */
.label-with-checkbox {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Inline Checkbox (작은 체크박스) */
/* 체크박스 섹션 (취득세 대출 포함) */
.checkbox-section {
  margin-bottom: 12px;
  padding: 14px 18px;
  background: #F9FAFB;
  border-radius: 8px;
  border: 1.5px solid #E5E8EB;
  transition: all 0.2s ease;
}

.checkbox-section:hover {
  background: #F3F4F6;
  border-color: var(--primary);
}

.inline-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.inline-checkbox:hover {
  color: var(--primary);
}

.inline-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin: 0;
}

.inline-checkbox span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
}

.sub-input-group input {
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: all 0.2s ease;
  background: var(--surface);
  color: var(--text-primary);
}

.sub-input-group input:hover {
  border-color: #B0B8C1;
}

.sub-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.1);
}

.sub-input-group input:read-only {
  background: var(--primary-light);
  cursor: not-allowed;
  font-weight: 700;
  color: var(--primary);
  border-color: var(--primary-light);
}

.total-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}

.total-group .sub-label {
  font-weight: 700;
  color: var(--text-primary);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 16px;
  background: #F9FAFB;
  border: 1.5px solid #D1D6DB;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.checkbox-label:hover {
  background: #F2F4F6;
  border-color: #B0B8C1;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
  position: relative;
  top: 0;
}

.checkbox-label span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Hint Text */
.hint-text {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 8px;
  line-height: 1.5;
}

/* Buttons - BMW Premium Style */
.btn-calculate {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, #0A4DA8 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 4px 15px rgba(28, 105, 212, 0.4),
    0 8px 30px rgba(28, 105, 212, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-family: inherit;
  letter-spacing: -0.3px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.btn-calculate::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.btn-calculate:hover::before {
  left: 100%;
}

.btn-calculate:hover {
  background: linear-gradient(135deg, #1B64DA 0%, #0653B6 100%);
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(28, 105, 212, 0.5),
    0 12px 40px rgba(28, 105, 212, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-calculate:active {
  transform: translateY(0);
  box-shadow:
    0 2px 10px rgba(28, 105, 212, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-calculate.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  height: 52px;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 20px;
}

.btn-secondary:hover {
  background: #F2F4F6;
  border-color: #D1D6DB;
}

/* Result Cards */
.result-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .result-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.result-card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  transition: all 0.3s ease;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #D1D6DB;
}

.result-card.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #1B64DA 100%);
  color: white;
  box-shadow: 0 12px 32px rgba(49, 130, 246, 0.3);
  border: none;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .result-card.primary {
    grid-column: span 3;
  }
}

.result-card.primary:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(49, 130, 246, 0.35);
}

.card-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-card.primary .card-label {
  color: rgba(255, 255, 255, 0.8);
}

.card-value {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  font-family: 'Poppins', 'Noto Sans KR', sans-serif;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1.1;
  word-break: keep-all;
}

.result-card.primary .card-value {
  color: white;
  font-size: 30px;
}

.card-detail {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: pre-line;
  line-height: 1.6;
}

.result-card.primary .card-detail {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.result-card.highlight {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  grid-column: span 1;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.3);
  border: none;
}

@media (min-width: 768px) {
  .result-card.highlight {
    grid-column: span 3;
  }
}

.result-card.highlight:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.35);
}

.result-card.highlight .card-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.result-card.highlight .card-detail {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 500;
}

/* ==================== 요약 바 ==================== */
.result-summary-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 20px;
}

.summary-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.summary-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: -0.2px;
}

.summary-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Poppins', 'Noto Sans KR', sans-serif;
  letter-spacing: -0.5px;
  word-break: keep-all;
  text-align: center;
}

@media (max-width: 640px) {
  .result-summary-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .summary-metric {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 16px;
  }

  .summary-value {
    font-size: 15px;
  }
}

/* ==================== 아코디언 ==================== */
.result-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.result-accordion {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.result-accordion:hover {
  border-color: #D1D6DB;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  background: #F9FAFB;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: #F2F4F6;
}

.accordion-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.accordion-arrow {
  font-size: 11px;
  color: var(--text-tertiary);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.result-accordion.open .accordion-arrow {
  transform: rotate(90deg);
}

.accordion-content {
  display: none;
  padding: 18px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.result-accordion.open .accordion-content {
  display: block;
  animation: accordionSlideDown 0.25s ease-out;
}

@keyframes accordionSlideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Detail Sections (used inside accordions now) */
.detail-table {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  background: #F9FAFB;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: background 0.2s ease;
}

.detail-row:hover {
  background: #F2F4F6;
}

.detail-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.detail-value {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 15px;
}

/* Structure Visual */
.structure-visual {
  padding: 20px;
  background: #F9FAFB;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.structure-items {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.structure-item {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.structure-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.structure-sep {
  color: var(--text-tertiary);
  font-weight: 800;
  font-size: 20px;
}

.item-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.item-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* Info Box */
.info-box {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #FFF7ED 0%, #FFF1DC 100%);
  border: 1.5px solid #FFEDD5;
  border-radius: var(--radius-lg);
}

.info-box h4 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.info-content p {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-content p:last-child {
  margin-bottom: 0;
}

/* Comparison Section */
.comparison-section {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.comparison-section h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.comparison-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.comparison-table thead th {
  background: var(--bg);
  font-weight: 700;
  color: var(--text-primary);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: var(--bg);
}

/* Footer */
.footer {
  margin-top: 60px;
  text-align: center;
  color: var(--text-tertiary);
  padding: 20px 0;
}

.footer p {
  font-size: 14px;
  margin-bottom: 8px;
}

.disclaimer {
  font-size: 13px;
  opacity: 0.8;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-icon {
  font-size: 28px;
  line-height: 1;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-body {
  padding: 24px 28px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-line;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.3);
}

.modal-btn:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  body {
    padding: 16px 0 40px;
  }

  .modal-content {
    width: 95%;
    max-width: none;
    margin: 16px;
  }

  .modal-header {
    padding: 20px 20px 16px;
  }

  .modal-body {
    padding: 20px;
    font-size: 14px;
  }

  .modal-footer {
    padding: 12px 20px 20px;
  }

  .header {
    margin-bottom: 32px;
  }

  .header h1 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 14px;
  }

  .input-section,
  .result-section {
    padding: 24px;
    border-radius: var(--radius-lg);
  }

  .sub-input-group {
    grid-template-columns: 120px 1fr;
  }

  .structure-items {
    flex-direction: column;
    align-items: stretch;
  }

  .structure-sep {
    transform: rotate(90deg);
    margin: 8px 0;
  }
}

/* ==================== 인포 툴팁 (ⓘ) ==================== */

.info-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

.info-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}

.info-tooltip-icon:hover,
.info-tooltip-icon:focus {
  color: var(--primary);
}

.info-tooltip-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  padding: 10px 14px;
  background: var(--text-primary);
  color: #FFF;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  z-index: 100;
  pointer-events: none;
  white-space: normal;
}

.info-tooltip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text-primary);
}

.info-tooltip-icon:hover + .info-tooltip-bubble,
.info-tooltip-icon:focus + .info-tooltip-bubble {
  display: block;
  animation: tooltipFadeIn 0.15s ease-out;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==================== 보증금 금리 할인 안내 ==================== */

.deposit-discount-info {
  display: none;
  margin-top: -6px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: var(--primary-light);
  border-left: 2.5px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.deposit-discount-info.visible {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ddi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.ddi-source {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  background: rgba(28, 105, 212, 0.1);
  border: 1px solid rgba(28, 105, 212, 0.2);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.ddi-formula {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Poppins', 'Noto Sans KR', sans-serif;
}

.ddi-formula .ddf-rate {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ddi-formula .ddf-op {
  font-size: 12px;
  color: var(--text-tertiary);
}

.ddi-formula .ddf-discount {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.ddi-formula .ddf-result {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

.ddi-range {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: auto;
}

/* ==================== 월 유지비 계산기 스타일 ==================== */

/* 연료 타입 선택 버튼 */
.fuel-type-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.fuel-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.fuel-type-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.fuel-type-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.fuel-icon {
  font-size: 24px;
}

@media (max-width: 640px) {
  .fuel-type-selector {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 입력란 + 링크 버튼 */
.input-with-link {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-link input {
  width: 100%;
  padding-right: 100px;
}

.btn-compare-link {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  background: #10B981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-compare-link:hover {
  background: #059669;
}

/* 가격 조회 버튼 */
.btn-fetch-price {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-fetch-price:hover {
  background: var(--primary-hover);
}

.btn-fetch-price:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 접을 수 있는 섹션 */
.collapsible-section {
  margin-top: 24px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
  background: #F9FAFB;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  transition: background 0.2s ease;
}

.collapsible-header:hover {
  background: #F2F4F6;
}

.toggle-icon {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
}

.collapsible-content {
  padding: 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* 비용 내역 */
.cost-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cost-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #F9FAFB;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.cost-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.cost-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cost-label {
  font-weight: 600;
  color: var(--text-primary);
}

.cost-value {
  font-weight: 700;
  color: var(--primary);
  font-size: 17px;
}

.cost-detail {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-left: auto;
  text-align: right;
  max-width: 200px;
}

@media (max-width: 640px) {
  .cost-item {
    flex-wrap: wrap;
  }

  .cost-info {
    flex: 1 1 calc(100% - 64px);
  }

  .cost-detail {
    flex: 1 1 100%;
    margin-left: 64px;
    margin-top: 8px;
    text-align: left;
    max-width: none;
  }
}

/* 비용 비율 차트 */
.cost-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-bar-container {
  width: 100%;
  height: 12px;
  background: #E5E8EB;
  border-radius: 6px;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.chart-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.chart-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.chart-value {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==================== 보험사 카드 스타일 (카톡 링크 프리뷰 스타일) ==================== */

.insurance-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insurance-card {
  display: block;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.insurance-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(28, 105, 212, 0.15);
  transform: translateY(-2px);
}

.insurance-card.featured {
  border-color: #FF5722;
  background: linear-gradient(135deg, #FFF8F6 0%, #FFFFFF 100%);
}

.card-preview {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.card-logo {
  width: 80px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.card-url {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.card-features {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #F9FAFB;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.feature-tag {
  display: inline-block;
  padding: 4px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.feature-tag.hot {
  background: #FF5722;
  border-color: #FF5722;
  color: white;
}

.feature-tag.official {
  background: #2E7D32;
  border-color: #2E7D32;
  color: white;
}

/* 섹션 구분선 */
.section-divider {
  margin: 48px 0 24px;
  text-align: center;
}

.section-divider h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-desc {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* 주의사항 박스 */
.warning-box {
  margin-top: 32px;
  padding: 20px;
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: var(--radius-md);
}

.warning-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: #F57C00;
  margin-bottom: 12px;
}

.warning-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.warning-box li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}

.warning-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #F57C00;
}

/* 돌아가기 버튼 */
.back-link {
  margin-top: 32px;
  text-align: center;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* 모바일 반응형 */
@media (max-width: 640px) {
  .card-logo {
    width: 64px;
    min-height: 64px;
  }

  .card-content {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-desc {
    font-size: 13px;
  }

  .card-features {
    padding: 10px 12px;
  }

  .feature-tag {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* ==================== 채팅 랜딩 & AI 입력바 ==================== */

/* 채팅 랜딩 섹션 */
.chat-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: 40px 20px 20px;
  text-align: center;
  animation: chatLandingFadeIn 0.6s ease-out;
}

@keyframes chatLandingFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-greeting {
  margin-bottom: 32px;
}

.chat-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.25;
  background: linear-gradient(135deg, #FFFFFF 0%, #E8F3FF 50%, #FFFFFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.chat-subtitle {
  font-size: 16px;
  color: #8B95A1;
  font-weight: 400;
  line-height: 1.5;
}

/* 제안 칩 */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 480px;
}

.suggestion-chip {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: #B0B8C1;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: rgba(28, 105, 212, 0.15);
  border-color: var(--primary);
  color: #E8F3FF;
  transform: translateY(-1px);
}

.suggestion-chip:active {
  transform: translateY(0);
}

/* AI 랜딩 (첫 질문 전 표시) */
.ai-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px 32px;
  flex: 1;
  position: relative;
  animation: aiLandingFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aiLandingFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 배경 글로우 */
.ai-landing-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(28, 105, 212, 0.06) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
}

/* 뱃지 */
.ai-landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(28, 105, 212, 0.08) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #A78BFA;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
}

.ai-landing-title {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  line-height: 1.3;
  position: relative;
}

.ai-landing-subtitle {
  font-size: 13px;
  color: #6B7684;
  margin-bottom: 32px;
  line-height: 1.7;
  position: relative;
}

.ai-landing-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  position: relative;
}

.ai-landing-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: #8B95A1;
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

.ai-landing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 12px;
}

.ai-landing-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  color: #D4D4D8;
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
}

.ai-landing-card:hover::before {
  opacity: 1;
}

.ai-landing-card:active {
  transform: translateX(2px);
}

.ai-landing-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8B5CF6;
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
}

.ai-landing-card:hover .ai-landing-card-icon {
  background: rgba(139, 92, 246, 0.18);
  color: #A78BFA;
}

.ai-landing-card-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.ai-landing-card-arrow {
  font-size: 18px;
  color: #4E5968;
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
  font-weight: 300;
}

.ai-landing-card:hover .ai-landing-card-arrow {
  color: #8B5CF6;
  transform: translateX(2px);
}

/* 카드 순차 등장 */
.ai-landing-card:nth-child(1) { animation: cardSlideIn 0.4s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ai-landing-card:nth-child(2) { animation: cardSlideIn 0.4s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ai-landing-card:nth-child(3) { animation: cardSlideIn 0.4s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-landing.hidden {
  display: none;
}

/* AI 입력바 */
.chat-input-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 24px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* 외부 pill 컨테이너: 시각적 border, 배경, 그림자 담당 */
.chat-input-row {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 28px;
  padding: 5px 5px 5px 6px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.chat-input-row:focus-within {
  border-color: #8B5CF6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12), 0 4px 20px rgba(139, 92, 246, 0.15);
}

/* 내부 wrapper: 카메라+input만 담당, 시각적 스타일 없음 */
.chat-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

/* 카메라 버튼 */
.chat-camera-btn {
  width: 40px;
  height: 40px;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-camera-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

.chat-camera-btn:active {
  transform: scale(0.95);
}

/* 이미지 미리보기 바 */
.image-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  margin-top: 8px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
}

.image-preview-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.image-preview-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview-remove {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-tertiary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.image-preview-remove:hover {
  background: rgba(255, 0, 0, 0.15);
  color: #FF736A;
}

.chat-input {
  flex: 1;
  height: 44px;
  padding: 0 8px 0 8px;
  border: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
  outline: none;
}

.chat-input::placeholder {
  color: #B0B8C1;
  font-size: 14px;
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.chat-send-btn:active {
  transform: scale(0.98);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 전송 버튼 로딩 스피너 */
.chat-send-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 채팅 메시지 영역 ==================== */
.chat-messages {
  display: none;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 16px 16px 8px;
  min-height: 0;
}

.chat-messages.active {
  display: flex;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* 공통 버블 */
.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
  animation: chatBubbleIn 0.25s ease-out;
}

@keyframes chatBubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 유저 버블 (보라 그라데이션) */
.chat-bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #FFF;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.25);
}

/* AI 버블 행 (아바타 + 버블) */
.chat-bubble-ai-row {
  display: flex;
  gap: 10px;
  align-self: flex-start;
  max-width: 88%;
  animation: chatBubbleIn 0.25s ease-out;
}

.chat-ai-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 2px;
}

/* AI 버블 (다크 서피스) */
.chat-bubble-ai {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #D4D4D8;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}

/* 타이핑 인디케이터 행 */
.chat-typing-row {
  display: flex;
  gap: 10px;
  align-self: flex-start;
  animation: chatBubbleIn 0.25s ease-out;
}

.chat-typing-box {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}

.chat-dot {
  width: 7px;
  height: 7px;
  background: #8B5CF6;
  border-radius: 50%;
  opacity: 0.3;
  animation: chatDotBounce 1.4s ease-in-out infinite;
}

.chat-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatDotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* 시스템 칩 */
.chat-system-msg {
  align-self: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #34D399;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  animation: chatBubbleIn 0.25s ease-out;
}

.chat-system-msg.error {
  color: #FCA5A5;
  background: rgba(252, 165, 165, 0.08);
  border-color: rgba(252, 165, 165, 0.2);
}

/* 이미지 첨부 미리보기 (유저 버블 안) */
.chat-bubble-image {
  max-width: 200px;
  border-radius: 10px;
  margin-bottom: 6px;
  display: block;
}

/* 직접 입력하기 버튼 */
.btn-direct-input {
  margin-top: 14px;
  padding: 6px 16px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.btn-direct-input:hover {
  color: var(--primary);
}

/* ==================== UI 3상태 시스템 ==================== */

/* S0: 초기 상태 — 랜딩 보임, 폼/결과 숨김 */
body.state-initial .chat-landing {
  display: flex;
}

body.state-initial .input-section {
  display: none;
}

body.state-initial .result-section {
  display: none !important;
}

body.state-initial .canvas-right {
  display: none;
}

body.state-initial .ai-landing {
  display: none;
}

body.state-initial .chat-messages {
  display: none !important;
}

/* S1: 결과 상태 — canvas/랜딩 숨김, 결과 전체화면 (CSS는 위 .result-fullscreen 블록에서 처리) */
body.state-results .ai-landing {
  display: none;
}

/* S2: 폼 확장 상태 — 랜딩 숨김, 폼 보임, 결과(있으면) 보임 */
body.state-form-expanded .chat-landing {
  display: none;
}

body.state-form-expanded .canvas-right {
  display: block;
}

body.state-form-expanded .input-section {
  display: block;
  animation: formSlideDown 0.3s ease-out;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@keyframes formSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 폼 축소 애니메이션 (AI 파싱 후) */
.input-section.minimizing {
  animation: formMinimize 0.5s ease-in forwards;
  transform-origin: top left;
}

@keyframes formMinimize {
  0% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: scale(0.2) translate(-30%, -30%);
  }
}

/* AI 로딩 오버레이 */
.ai-loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.ai-loading-overlay.visible {
  display: flex;
  animation: aiOverlayFadeIn 0.3s ease-out;
}

@keyframes aiOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ai-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.ai-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(139, 92, 246, 0.2);
  border-top-color: #8B5CF6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.ai-loading-text {
  color: #E2E8F0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.6;
}

/* 로딩 완료 상태 */
.ai-loading-overlay.complete .ai-loading-text {
  font-size: 18px;
  animation: aiCompleteTextPop 0.4s ease-out;
}

.ai-loading-check {
  display: block;
  font-size: 40px;
  color: #34D399;
  margin-bottom: 12px;
  animation: aiCheckPop 0.4s ease-out;
}

@keyframes aiCheckPop {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes aiCompleteTextPop {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 결과 등장 애니메이션 */
@keyframes resultsSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 데스크톱 canvas 오른쪽 슬라이드 인 */
@keyframes canvasSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 768px) {
  body.state-form-expanded .canvas-right {
    animation: canvasSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* 폼 접기/펼치기 헤더 */
.form-collapse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
  user-select: none;
}

.form-collapse-header h2 {
  margin-bottom: 0 !important;
}

.collapse-icon {
  font-size: 14px;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
}

/* ==================== 결과 Q&A ==================== */

.result-qa-section {
  margin-top: 24px;
  padding: 20px 0 0;
  border-top: 1.5px solid var(--border);
}

.qa-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.qa-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
  border-radius: 8px;
  font-size: 14px;
}

.qa-header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.qa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.qa-chip {
  padding: 8px 14px;
  background: #F5F3FF;
  border: 1.5px solid #E9E5FF;
  border-radius: 20px;
  color: #6D28D9;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.qa-chip:hover {
  background: #EDE9FE;
  border-color: #C4B5FD;
  color: #5B21B6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.1);
}

.qa-chip:active {
  transform: translateY(0);
}

.qa-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.qa-messages::-webkit-scrollbar {
  width: 4px;
}

.qa-messages::-webkit-scrollbar-thumb {
  background: #D1D6DB;
  border-radius: 4px;
}

.qa-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
  animation: qaBubbleIn 0.25s ease-out;
}

@keyframes qaBubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.qa-bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary) 0%, #1B64DA 100%);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(28, 105, 212, 0.2);
}

.qa-bubble-ai {
  align-self: flex-start;
  background: #F9FAFB;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
}

/* 타이핑 인디케이터 */
.qa-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
}

.qa-dot {
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: qaDotBounce 1.4s ease-in-out infinite;
}

.qa-dot:nth-child(2) { animation-delay: 0.2s; }
.qa-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes qaDotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Q&A 입력바 외부 pill */
.qa-input-row {
  display: flex;
  align-items: center;
  width: 100%;
  background: #F9FAFB;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 5px;
  transition: all 0.25s ease;
  margin-top: 12px;
}

.qa-input-row:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow), 0 2px 8px rgba(28, 105, 212, 0.08);
}

/* Q&A 내부 wrapper */
.qa-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.qa-input {
  flex: 1;
  height: 34px;
  padding: 0 8px 0 13px;
  border: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
  outline: none;
}

.qa-input::placeholder {
  color: var(--text-tertiary);
  font-size: 13px;
}

.qa-send-btn {
  width: 34px;
  height: 34px;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #1B64DA 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.qa-send-btn:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #0B4FB0 100%);
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(28, 105, 212, 0.35);
}

.qa-send-btn:active {
  transform: scale(0.96);
}

/* ==================== AI 추천값 선택지 ==================== */

.chat-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 38px;
  padding: 4px 0 8px;
  animation: choiceRowIn 0.3s ease;
}

@keyframes choiceRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-choice-btn {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.chat-choice-apply {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.chat-choice-apply:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(28, 105, 212, 0.3);
}

.chat-choice-dismiss {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-tertiary);
  border-color: rgba(255, 255, 255, 0.1);
}

.chat-choice-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.chat-choice-custom {
  background: rgba(139, 92, 246, 0.12);
  color: #A78BFA;
  border-color: rgba(139, 92, 246, 0.25);
}

.chat-choice-custom:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.chat-choice-status {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
  padding: 2px 0;
}

/* 인라인 커스텀 입력 */

.chat-custom-input-row {
  margin-left: 38px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: choiceRowIn 0.25s ease;
}

.chat-custom-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-custom-input-label {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 70px;
  flex-shrink: 0;
}

.chat-custom-input {
  width: 90px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  text-align: center;
  outline: none;
  transition: border-color 0.15s ease;
  -moz-appearance: textfield;
}

.chat-custom-input::-webkit-outer-spin-button,
.chat-custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.chat-custom-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(28, 105, 212, 0.15);
}

.chat-custom-input-unit {
  font-size: 13px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.chat-custom-btn-row {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

/* 모바일 반응형 */
@media (max-width: 640px) {
  .chat-title {
    font-size: 28px;
  }

  .chat-subtitle {
    font-size: 14px;
  }

  .chat-landing {
    min-height: 30vh;
    padding: 24px 16px 16px;
  }

  .chat-suggestions {
    gap: 8px;
  }

  .suggestion-chip {
    font-size: 13px;
    padding: 8px 14px;
  }

  .chat-input-bar {
    padding: 0 0 16px;
  }

  .chat-input {
    height: 38px;
    font-size: 14px;
    padding-left: 18px;
  }

  .chat-send-btn {
    width: 38px;
    height: 38px;
  }

  .chat-send-btn svg {
    width: 17px;
    height: 17px;
  }

  .result-qa-section {
    padding: 16px 0 0;
  }

  .qa-chip {
    font-size: 12px;
    padding: 7px 12px;
  }

  .qa-bubble {
    max-width: 90%;
    font-size: 13px;
    padding: 9px 12px;
  }

  .qa-messages {
    max-height: 280px;
  }

  .qa-input {
    height: 30px;
    font-size: 13px;
    padding-left: 9px;
  }

  .qa-send-btn {
    width: 30px;
    height: 30px;
  }

  .qa-send-btn svg {
    width: 13px;
    height: 13px;
  }

  /* 채팅 버블 모바일 */
  .chat-messages {
    padding: 12px 12px 6px;
    gap: 10px;
  }

  .chat-bubble {
    max-width: 90%;
    font-size: 13px;
  }

  .chat-bubble-ai {
    font-size: 13px;
  }

  .chat-ai-avatar {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  /* 선택지 모바일 */
  .chat-choice-row {
    margin-left: 32px;
    gap: 6px;
  }

  .chat-choice-btn {
    font-size: 12px;
    padding: 6px 11px;
  }

  .chat-custom-input-row {
    margin-left: 32px;
    padding: 10px 12px;
  }

  .chat-custom-input-label {
    font-size: 12px;
    min-width: 60px;
  }

  .chat-custom-input {
    width: 80px;
    height: 32px;
    font-size: 13px;
  }
}
