/* ─────────────────────────────────────────────────────────────────────────
   픽스고 (FixGo) — Shared + Chat App styles
   ───────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light dark;
  /* Turn 14 #1: Pretendard 기반 글로벌 폰트 스택 — 모든 텍스트(아이콘 제외)에 적용 */
  --fixgo-font-sans:
    'Pretendard Variable', 'Pretendard',
    -apple-system, BlinkMacSystemFont,
    system-ui, Roboto, 'Helvetica Neue',
    'Segoe UI', 'Apple SD Gothic Neo',
    'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  font-family: var(--fixgo-font-sans);
}

body {
  font-family: var(--fixgo-font-sans);
  font-feature-settings: 'cv11', 'ss01';
  font-variation-settings: 'opsz' 32;
  /* 잘림 방지: 가로 스크롤 차단, 절대 위치 장식 요소가 viewport를 넘어가도 보이지 않도록 */
  overflow-x: hidden;
  max-width: 100vw;
  min-height: 100vh;
}

/* Turn 14 #1: 모든 텍스트 요소 — 아이콘 폰트(Font Awesome)는 자기 폰트 유지 */
button, input, textarea, select,
h1, h2, h3, h4, h5, h6, p, span, div, a, li, label, em, strong, small {
  font-family: inherit;
}
/* Turn16 #1: .font-mono 도 Pretendard 사용 (한글 일관성). 단, 숫자는 tabular-nums 로 정렬 유지.
   순수 코드 블록(code/pre/kbd/samp/tt)은 등호 정렬을 위해 monospace 유지. */
.font-mono {
  font-family: var(--fixgo-font-sans);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
code, pre, kbd, samp, tt {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
}
/* Font Awesome 아이콘은 영향받지 않도록 — .fa, .fas, .far, .fab 클래스는 자체 폰트 사용 */

html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* 모든 페이지 컨테이너의 가로 오버플로 방지 */
main, section, header, footer, nav, article, aside {
  max-width: 100%;
}

/* 장식용 블러/그라데이션 배경 안전 영역 */
.fixgo-bg-blob {
  position: absolute;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  z-index: 0;
}

/* 컨텐츠는 항상 장식 요소 위 */
.fixgo-content {
  position: relative;
  z-index: 1;
}

/* FontAwesome 아이콘 정렬 보정 — 텍스트와 같은 라인에서 잘리거나 어긋나지 않도록 */
i.fa, i.fas, i.far, i.fab, i.fal, i.fad {
  line-height: 1;
  vertical-align: middle;
  display: inline-block;
}

/* 작은 원형 아이콘 컨테이너(주로 w-7~w-10 + rounded-full) 안의 아이콘 중앙 정렬 보장 */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* 작은 컨테이너에서 아이콘이 잘리지 않도록 */
  overflow: visible;
  line-height: 0;
}
.icon-circle i {
  line-height: 1;
  /* FontAwesome 변환이 잘리는 것 방지 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 매우 작은 아이콘 (text-[8px] ~ text-[11px]) 최소 가독성 보장 */
i.fa, i.fas, i.far, i.fab {
  min-width: 0.875em;
  text-align: center;
}

/* 카드/섹션 가운데 안전 컨테이너 */
.fixgo-safe-container {
  width: 100%;
  max-width: min(1280px, 100vw);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
}

/* Scrollbars */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(120,120,120,0.25); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(120,120,120,0.4); }

/* ─────────────────────────────────────────────────────────────────────────
   FIXGO Chat App 전용
   ───────────────────────────────────────────────────────────────────────── */

/* PWA / WebView 친화: 텍스트 선택 차단(가독성 외 영역), 탭 하이라이트 제거 */
html.fixgo-app, html.fixgo-app body {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  overscroll-behavior: none;       /* pull-to-refresh 차단 */
  touch-action: pan-y;
  /* V5.12: 챗 앱은 가로 스크롤이 절대로 발생하지 않아야 한다. body 단계에서 차단. */
  overflow-x: hidden;
  max-width: 100vw;
}

/* 채팅 메시지 내용은 선택 가능하도록 */
html.fixgo-app .chat-bubble-in,
html.fixgo-app textarea,
html.fixgo-app input,
html.fixgo-app .selectable {
  -webkit-user-select: text;
  user-select: text;
}

/* Safe area (iOS notch / Android gesture bar) */
.chat-safe-top { padding-top: env(safe-area-inset-top); }
.chat-safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.chat-safe-left { padding-left: env(safe-area-inset-left); }
.chat-safe-right { padding-right: env(safe-area-inset-right); }

/* V3.6: 모바일 새 진단 헤더 잘림 방지
 * - 헤더(fixgo-chat-topbar)를 fixed로 분리해 iOS Safari URL bar 동적 변화에도 흔들리지 않음
 * - shell에 헤더 높이만큼 padding-top을 부여하여 body(flex-1)는 그대로 헤더 아래 영역만 채움
 *   (body가 absolute inset-0 자식을 가지므로, padding은 body가 아니라 shell에 줘야 함)
 */
.fixgo-chat-shell {
  position: relative;
  padding-top: calc(56px + env(safe-area-inset-top));
}
.fixgo-chat-topbar {
  /* fixed 모드에서도 backdrop-filter 보존 */
  isolation: isolate;
  /* iOS 환경에서 hardware-accelerated layer로 끌어올려 합성 안정성 ↑ */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.fixgo-chat-body {
  /* body는 flex-1 min-h-0 relative — absolute inset-0 자식들이 padding 영역 위로 침범하지 않도록 */
  position: relative;
}

/* V3.8 #9: 입력창은 viewport 기준 fixed — 모바일 키보드/iOS Safari URL bar 변동에도 흔들리지 않음 */
.fixgo-chat-composer {
  /* iOS keyboard envelope 처리 — visualViewport 변동에 합성기 안정성 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  transition: opacity .25s ease, transform .25s ease;
}

/* V5.26: 제품 식별 분석 중에는 채팅 입력창 숨김 (사용자 추가 입력 차단 + 시각적 집중)
   - opacity 0 + pointer-events none → 클릭/포커스 모두 차단
   - translateY(12px) → 살짝 아래로 미끄러져 사라지는 자연스러운 모션
   - aria-hidden 도 함께 적용해 스크린리더에도 가려짐 */
.fixgo-chat-composer.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) translateZ(0);
}

/* V5.12: 챗 스트림은 세로 스크롤만 허용 — 좌우 스크롤 완전 차단
   원인: 자식 카드 내부의 긴 모델명 / URL / 시리얼 / 캐러셀 등이 폭을 넘기면
        부모 컨테이너에 가로 스크롤바가 생기며 초기 화면과 대화창이 좌우로 흔들렸음.
   해결:
     1) 컨테이너 자체에 overflow-x:hidden + overscroll-behavior-x:none
     2) 직계 자식(말풍선 row)이 컨테이너 폭을 절대 넘지 못하도록 max-width:100% + min-width:0
        (flex item 의 기본 min-width:auto 가 자식 내용으로 늘어나는 버그 차단)
     3) 모든 후손에 word-break / overflow-wrap 강제 → 긴 단어/URL 자동 줄바꿈
        (코드/모노스페이스 영역은 별도 가로 스크롤이 필요하므로 예외 처리) */
.fixgo-chat-stream {
  overflow-x: hidden !important;
  overscroll-behavior-x: none;
}
.fixgo-chat-stream > * {
  max-width: 100%;
  min-width: 0;
}
.fixgo-chat-stream,
.fixgo-chat-stream * {
  /* 긴 단어/URL 자동 줄바꿈 — 카드 내부에서도 가로 폭을 넘기지 않게 */
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* 코드/모노스페이스 영역은 가로 스크롤이 필요할 수 있으므로 word-break 해제하되,
   자체 overflow-x:auto 로 부모로 전파되지 않게 하고 max-width 는 유지. */
.fixgo-chat-stream pre,
.fixgo-chat-stream code {
  overflow-wrap: normal;
  word-break: normal;
  max-width: 100%;
}
.fixgo-chat-stream pre {
  overflow-x: auto;
}
/* 가로 marquee/캐러셀(롤링 칩 등)이 스트림 폭 안에서만 동작하도록 안전망 */
.fixgo-chat-stream .fixgo-rolling-row,
.fixgo-chat-stream .fixgo-rolling {
  max-width: 100%;
  overflow: hidden;
}
/* 이미지/비디오는 절대로 컨테이너 폭을 넘기지 못하게 */
.fixgo-chat-stream img,
.fixgo-chat-stream video,
.fixgo-chat-stream iframe {
  max-width: 100%;
  height: auto;
}

/* Chat bubble animation */
.chat-bubble-in {
  animation: chatIn 0.3s ease-out;
}
@keyframes chatIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Typing indicator dots */
.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  margin: 0 1px;
  animation: typing 1.2s infinite;
  opacity: 0.4;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Image thumb */
.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(120,120,120,0.1);
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.thumb .remove-btn {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.thumb .remove-btn:hover { background: rgba(0,0,0,0.85); }

/* ═══════════════════════════════════════════════════════════════════════
   FIXGO Conversational Diagnosis UX V2
   사용자 중심 대화형 진단 — Agent 노출 제거, 즉시 응답, 카드 구조
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── 상단 Progress UI ────────────────────────────────────────────────── */
.chat-progress-wrap {
  animation: progressSlideDown 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes progressSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.progress-step .progress-step-bar {
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.progress-step.done .progress-step-bar { width: 100% !important; }
.progress-step.active .progress-step-bar { width: 60% !important; }
.progress-step.active .text-\[9px\] { color: rgb(28 125 245); font-weight: 600; }
html.dark .progress-step.active .text-\[9px\] { color: rgb(125 175 255); }

/* Follow-up 모드: 첫 단계(제품 확인) 건너뜀 — 회색 처리 */
.progress-step.skipped .progress-step-bar { width: 0% !important; background: rgb(229 231 235) !important; }
html.dark .progress-step.skipped .progress-step-bar { background: rgb(38 38 38) !important; }
.progress-step.skipped .text-\[9px\] {
  color: rgb(163 163 163);
  text-decoration: line-through;
  opacity: 0.6;
}

/* 진행 중일 때 채팅 스트림 상단 패딩 확보 (progress 영역 높이만큼) */
#chat-stream.progress-on { padding-top: 88px !important; }

/* Follow-up 단일 질문 카드 — 살짝 brand-tinted */
.followup-card {
  position: relative;
  background-image: linear-gradient(135deg, rgba(28,125,245,0.04) 0%, rgba(168,85,247,0.04) 100%);
}
html.dark .followup-card {
  background-image: linear-gradient(135deg, rgba(28,125,245,0.08) 0%, rgba(168,85,247,0.08) 100%);
}
.followup-card .finalize-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}

/* Chat menu 항목 — 모바일 터치 영역 확보, 명확한 active 상태 */
.chat-menu-item {
  -webkit-tap-highlight-color: rgba(28,125,245,0.1);
  user-select: none;
  -webkit-user-select: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.chat-menu-item:focus-visible {
  outline: 2px solid rgb(28 125 245);
  outline-offset: -2px;
}

/* ─── 사용자 이미지 — 분석 완료 후 축소 (collapsed 상태) ──────────────── */
.user-images-grid {
  display: grid;
  gap: 4px;
  transition: max-width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.user-images-grid.collapsed {
  max-width: 88px !important;
  grid-template-columns: 1fr !important;
}
.user-images-grid.collapsed img:not(:first-child) { display: none; }
.user-images-grid.collapsed .img-count-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  pointer-events: none;
  letter-spacing: 0.02em;
}
.user-images-grid img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.user-images-grid img:hover { transform: scale(1.02); }

/* ─── Image Lightbox ──────────────────────────────────────────────────── */
.fixgo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: lightboxIn 0.22s ease-out;
}
@keyframes lightboxIn { from { opacity: 0 } to { opacity: 1 } }
.fixgo-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none; /* 핀치/팬을 JS가 직접 처리 */
  transform-origin: center center;
  transition: transform 0.18s ease-out;
  cursor: zoom-in;
  will-change: transform;
}
.fixgo-lightbox img.zoomed { cursor: grab; transition: none; }
.fixgo-lightbox img.zoomed.dragging { cursor: grabbing; }
.fixgo-lightbox-zoom-hint {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}
.fixgo-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 18px;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}
.fixgo-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.fixgo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.fixgo-lightbox-nav.prev { left: 12px; }
.fixgo-lightbox-nav.next { right: 12px; }
.fixgo-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 12px;
  font-family: var(--fixgo-font-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ─── 즉시 응답 Quick-reply 버튼 (예/아니오/잘 모르겠어요) ──────────── */
.quick-reply-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.quick-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgb(245 245 245);
  color: rgb(38 38 38);
  border: 1px solid rgb(229 229 229);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.quick-reply-btn:hover {
  background: rgb(28 125 245);
  color: white;
  border-color: rgb(28 125 245);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(28, 125, 245, 0.25);
}
.quick-reply-btn:active { transform: translateY(0); }
.quick-reply-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.quick-reply-btn.is-selected {
  background: rgb(28 125 245);
  color: white;
  border-color: rgb(28 125 245);
  cursor: default;
}
html.dark .quick-reply-btn {
  background: rgb(38 38 38);
  color: rgb(229 229 229);
  border-color: rgb(64 64 64);
}
html.dark .quick-reply-btn:hover {
  background: rgb(28 125 245);
  color: white;
  border-color: rgb(28 125 245);
}

/* ─── Accordion (진단 결과 카드 펼침형) ──────────────────────────────── */
.accordion-card {
  border-radius: 16px;
  border: 1px solid rgb(229 229 229);
  background: white;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
html.dark .accordion-card {
  background: rgb(23 23 23);
  border-color: rgb(38 38 38);
}
.accordion-card.open { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05); }
.accordion-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.accordion-header:hover { background: rgba(0, 0, 0, 0.02); }
html.dark .accordion-header:hover { background: rgba(255, 255, 255, 0.03); }
.accordion-chevron {
  margin-left: auto;
  color: rgb(115 115 115);
  font-size: 12px;
  transition: transform 0.25s ease;
}
.accordion-card.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.accordion-card.open .accordion-body { grid-template-rows: 1fr; }
.accordion-body > div {
  overflow: hidden;
  min-height: 0;
}
.accordion-body-inner {
  padding: 0 16px 16px;
  border-top: 1px solid rgb(229 229 229);
}
html.dark .accordion-body-inner { border-top-color: rgb(38 38 38); }

/* ─── Model Recovery card ────────────────────────────────────────────── */
.model-recovery-card {
  border-radius: 16px;
  border: 1px solid rgb(254 215 170);
  background: linear-gradient(180deg, rgb(255 247 237) 0%, rgb(255 251 235) 100%);
  padding: 16px;
}
html.dark .model-recovery-card {
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.18) 0%, rgba(120, 53, 15, 0.08) 100%);
  border-color: rgba(254, 215, 170, 0.25);
}
.model-recovery-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: white;
  border: 1px solid rgb(229 229 229);
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 13px;
}
.model-recovery-option:hover {
  border-color: rgb(28 125 245);
  background: rgba(28, 125, 245, 0.04);
  transform: translateY(-1px);
}
html.dark .model-recovery-option {
  background: rgb(23 23 23);
  border-color: rgb(64 64 64);
  color: rgb(229 229 229);
}
html.dark .model-recovery-option:hover {
  background: rgba(28, 125, 245, 0.08);
}
.model-recovery-option .icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(28, 125, 245, 0.1);
  color: rgb(28 125 245);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Dropzone ────────────────────────────────────────────────────────── */
#dropzone.dragging {
  border-color: rgb(28 125 245) !important;
  background-color: rgba(28, 125, 245, 0.06);
}

/* Section enter */
.section-enter {
  opacity: 0;
  transform: translateY(8px);
  animation: sectionIn 0.45s ease-out forwards;
}
@keyframes sectionIn { to { opacity: 1; transform: translateY(0); } }

/* Pricing toggle */
[data-billing="yearly"] [data-price-monthly],
[data-billing="yearly"] [data-period-monthly] { display: none; }
[data-billing="monthly"] [data-price-yearly],
[data-billing="monthly"] [data-period-yearly] { display: none; }

/* ─────────────────────────────────────────────────────────────────────────
   테마 아이콘 토글
   - Tailwind CDN(dark:*) 로딩 지연 시 두 아이콘이 동시에 보이는 문제 방지
   - .dark 클래스 유무에 따라 직접 표시/숨김 (CDN 로드와 무관하게 즉시 동작)
   ───────────────────────────────────────────────────────────────────────── */
.theme-icon-light { display: inline-block; }   /* 라이트모드: 달 아이콘 (다크로 전환하는 액션) */
.theme-icon-dark { display: none; }             /* 라이트모드: 해 아이콘 숨김 */
html.dark .theme-icon-light { display: none; }  /* 다크모드: 달 숨김 */
html.dark .theme-icon-dark { display: inline-block; } /* 다크모드: 해 표시 */

/* ═════════════════════════════════════════════════════════════════════════
   MODERN SAAS V2 — Premium Landing Experience
   - Hero Swipe Carousel · Scroll Reveal · Sticky Story · Section Indicator
   - Stripe / Linear / Arc 스타일 참고
   ═════════════════════════════════════════════════════════════════════════ */

/* ─── Scroll Reveal (Fade + Slide-up + Scale) ────────────────────────── */
/* V3.6: "스르륵 빠르게" 인상을 위해 duration 0.7s/0.8s → 0.5s/0.55s 단축 */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px) scale(0.99);
  transition:
    opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* fallback (JS 미적용 환경) — JS가 inline transition-delay 직접 부여 */
[data-reveal-delay="100"] { transition-delay: 100ms; }
[data-reveal-delay="200"] { transition-delay: 200ms; }
[data-reveal-delay="300"] { transition-delay: 300ms; }
[data-reveal-delay="400"] { transition-delay: 400ms; }

/* reduced motion 존중 */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ─── Hero Carousel ──────────────────────────────────────────────────── */
.hero-carousel { position: relative; }
.hero-carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  touch-action: pan-y;
}
.hero-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}
.hero-carousel.dragging .hero-carousel-track { transition: none; }

.hero-carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.hero-carousel-dot {
  width: 26px;
  height: 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.12);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, width 0.35s ease;
}
html.dark .hero-carousel-dot { background: rgba(255, 255, 255, 0.15); }
.hero-carousel-dot.active {
  background: rgb(28 125 245);
  width: 42px;
}

/* Hero Carousel arrow buttons (prev/next) — md+ */
.hero-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  color: rgb(38, 38, 38);
  font-size: 14px;
  cursor: pointer;
  z-index: 5;
  display: none; /* hidden on mobile, shown on md+ */
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  opacity: 0.85;
}
.hero-carousel-arrow:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05);
}
.hero-carousel-arrow:focus-visible {
  outline: 2px solid rgb(28 125 245);
  outline-offset: 2px;
  opacity: 1;
}
.hero-carousel-arrow-prev { left: -22px; }
.hero-carousel-arrow-next { right: -22px; }

html.dark .hero-carousel-arrow {
  background: rgba(23, 23, 23, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
  .hero-carousel-arrow { display: flex; }
}

/* Premium Glass Card */
.glass-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 20px 60px -20px rgba(15, 23, 42, 0.18),
    0 8px 24px -12px rgba(15, 23, 42, 0.10);
}
html.dark .glass-card {
  background: linear-gradient(180deg, rgba(23,23,28,0.85) 0%, rgba(20,20,24,0.75) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 20px 60px -20px rgba(0, 0, 0, 0.5),
    0 8px 24px -12px rgba(0, 0, 0, 0.4);
}

/* ─── Section Indicator (right-side dots, desktop only) ───────────────── */
.section-indicator {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 14px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.06);
}
html.dark .section-indicator {
  background: rgba(20,20,24,0.6);
  border-color: rgba(255,255,255,0.06);
}
@media (min-width: 1100px) { .section-indicator { display: flex; } }

.section-indicator-item {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
html.dark .section-indicator-item { background: rgba(255,255,255,0.22); }
.section-indicator-item:hover { transform: scale(1.25); }
.section-indicator-item.active {
  background: rgb(28 125 245);
  box-shadow: 0 0 0 4px rgba(28,125,245,0.18);
}
.section-indicator-item .label {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgb(64 64 64);
  background: rgba(255,255,255,0.95);
  padding: 4px 9px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
html.dark .section-indicator-item .label {
  color: rgb(230 230 230);
  background: rgba(30,30,34,0.95);
}
.section-indicator-item:hover .label,
.section-indicator-item.active .label { opacity: 1; }

/* ─── Mobile Top Progress Bar ────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  z-index: 50;
  pointer-events: none;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgb(28 125 245), rgb(168 85 247));
  transition: width 0.12s linear;
}
@media (min-width: 1100px) { .scroll-progress { display: none; } }

/* ─── Sticky Story (Service overview) ────────────────────────────────── */
/* V3.8 #2: 데스크탑 서비스 소개 섹션이 6×60vh=360vh 의 거대한 스크롤 영역이라
 *          페이지가 과하게 길어졌음. min-height 60vh → 38vh, padding 56→32px 로 컴팩트화. */
.sticky-story-steps { position: relative; }
.sticky-story-step {
  padding: 32px 0;
  min-height: 38vh;
  display: flex;
  align-items: center;
  border-left: 2px solid transparent;
  padding-left: 24px;
  margin-left: -24px;
  transition: border-color 0.4s ease, opacity 0.4s ease;
}
.sticky-story-step:not(.active) { opacity: 0.42; }
.sticky-story-step.active { border-left-color: rgb(28 125 245); }

/* Mobile-only inline frame inside each step (hidden on desktop) */
.sticky-story-mobile-frame {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sticky-story-step.active .sticky-story-mobile-frame {
  opacity: 1;
  transform: translateY(0);
}
/* On mobile we don't want the dim effect — each step is fully visible with its own visual */
@media (max-width: 1023px) {
  .sticky-story-step {
    min-height: auto;
    padding: 32px 0;
  }
  .sticky-story-step:not(.active) { opacity: 1; }
  .sticky-story-step.active { border-left-color: rgb(28 125 245); }
  /* On mobile the inline frame is already a strong visual, so reveal it always */
  .sticky-story-mobile-frame { opacity: 1; transform: translateY(0); }
}

.sticky-story-visual {
  position: sticky;
  top: 96px;
  height: calc(100vh - 200px);
  max-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sticky-story-frame {
  display: none;
  width: 100%;
}
.sticky-story-frame.active { display: block; animation: storyFadeIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes storyFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── V3.9 #O: 데스크탑 바 타입 + 세로 라인 (PC 서비스 소개 재설계) ──── */
/* 모든 단계가 한 화면에 보이도록 sticky 스크롤 제거, 세로 라인으로 연결 */
@media (min-width: 1024px) {
  .story-bar-rail {
    position: relative;
    padding: 16px 0;
  }
  /* 세로 연결 라인 — 노드 column 중앙을 관통 */
  .story-bar-rail::before {
    content: '';
    position: absolute;
    top: 32px;
    bottom: 32px;
    left: 27px;
    width: 2px;
    background: linear-gradient(
      to bottom,
      rgb(28 125 245 / 0) 0%,
      rgb(28 125 245 / 0.6) 8%,
      rgb(28 125 245 / 0.6) 92%,
      rgb(28 125 245 / 0) 100%
    );
    border-radius: 2px;
    z-index: 0;
  }
  .story-bar-row {
    /* override 일반 sticky-story-step 스타일 */
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    align-items: flex-start;
    padding: 18px 0;
    min-height: auto;
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    opacity: 1; /* 모든 바가 항상 표시 (sticky 효과 비활성화) */
  }
  .story-bar-row + .story-bar-row { padding-top: 22px; }
  .story-bar-rail-col {
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 14px;
    z-index: 1;
  }
  .story-bar-node {
    position: relative;
    width: 56px;
    height: 56px;
    display: inline-flex;
  }
  .story-bar-node-inner {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgb(28 125 245), rgb(124 58 237));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow:
      0 6px 14px -4px rgba(28, 125, 245, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
  .story-bar-node-badge {
    position: absolute;
    bottom: -6px;
    right: -8px;
    background: #fff;
    color: rgb(28 125 245);
    border: 1.5px solid rgb(28 125 245);
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    font-family: var(--fixgo-font-sans); font-variant-numeric: tabular-nums;
    line-height: 1;
  }
  :is(.dark) .story-bar-node-badge {
    background: rgb(10 10 10);
    color: rgb(96 165 250);
    border-color: rgb(96 165 250);
  }

  /* 바 카드 — 일종의 가로 바 박스 (frame 포함) */
  .story-bar-card {
    /* sticky-story-frame override: 표시/비표시 토글 제거 */
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 24px;
    align-items: stretch;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
    border: 1px solid rgb(229 231 235);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    animation: none !important; /* 기존 storyFadeIn 무력화 */
  }
  :is(.dark) .story-bar-card {
    background: rgba(23, 23, 23, 0.6);
    border-color: rgb(38 38 38);
  }
  .story-bar-row.active .story-bar-card {
    border-color: rgb(28 125 245 / 0.55);
    box-shadow:
      0 12px 28px -16px rgba(28, 125, 245, 0.45),
      0 0 0 1px rgb(28 125 245 / 0.18);
    transform: translateY(-1px);
  }
  .story-bar-card-head {
    align-self: center;
  }
  .story-bar-card-frame {
    align-self: stretch;
    min-height: 200px;
    padding: 14px;
    background: linear-gradient(135deg, rgb(247 248 252), rgb(243 244 247));
    border: 1px solid rgb(229 231 235);
    border-radius: 14px;
    overflow: hidden;
  }
  :is(.dark) .story-bar-card-frame {
    background: linear-gradient(135deg, rgb(15 15 17), rgb(20 20 23));
    border-color: rgb(38 38 38);
  }
}

/* ─── Cost grid (예상 수리비 3-셀) — 모바일에서 가격 잘림 방지 ──────── */
.cost-grid-3 {
  display: grid;
  grid-template-columns: 1fr;  /* 모바일: 세로 스택 (각 가격 한 줄에 통째로 표시) */
  gap: 8px;
}
@media (min-width: 480px) {
  .cost-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}
.cost-cell {
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
@media (min-width: 480px) {
  .cost-cell {
    display: block;
    padding: 10px;
  }
}
.cost-cell-min { background-color: rgb(16 185 129 / 0.10); border-color: rgb(16 185 129 / 0.25); }
.cost-cell-avg { background-color: rgb(28 125 245 / 0.10); border-color: rgb(28 125 245 / 0.25); }
.cost-cell-max { background-color: rgb(244 63 94 / 0.10); border-color: rgb(244 63 94 / 0.25); }
.cost-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
@media (min-width: 480px) {
  .cost-label { font-size: 10px; }
}
.cost-value {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.01em;
  text-align: right;
}
@media (min-width: 480px) {
  .cost-value {
    font-size: 13px;
    margin-top: 2px;
    text-align: center;
  }
}
@media (min-width: 768px) {
  .cost-value { font-size: 14px; }
}

/* ─── Mobile vertical numbered timeline (Service overview, < lg) ─────── */
.story-mobile-timeline {
  position: relative;
  padding: 4px 0 8px 0;
}
.story-mobile-rail {
  position: absolute;
  left: 21px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(28,125,245,0) 0%,
    rgba(28,125,245,0.45) 12%,
    rgba(168,85,247,0.45) 88%,
    rgba(168,85,247,0) 100%);
  border-radius: 2px;
  pointer-events: none;
}
.story-mobile-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
}
.story-mobile-step + .story-mobile-step { padding-top: 18px; }
.story-mobile-num {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-mobile-num-inner {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgb(28 125 245), rgb(168 85 247));
  color: #fff;
  font-size: 16px;
  box-shadow: 0 6px 18px -6px rgba(28,125,245,0.55), 0 2px 6px rgba(0,0,0,0.06);
  position: relative;
  z-index: 1;
}
.story-mobile-num-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #fff;
  color: rgb(28 125 245);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--fixgo-font-sans); font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgb(28 125 245);
  z-index: 2;
  letter-spacing: -0.02em;
}
:is(.dark) .story-mobile-num-badge {
  background: rgb(15 23 42);
  color: rgb(96 165 250);
  border-color: rgb(96 165 250);
}
.story-mobile-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

/* ─── How It Works Timeline ──────────────────────────────────────────── */
.timeline-track {
  position: relative;
}
.timeline-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(28,125,245,0) 0%,
    rgba(28,125,245,0.35) 12%,
    rgba(168,85,247,0.35) 88%,
    rgba(168,85,247,0) 100%);
  transform: translateX(-50%);
  display: none;
}
@media (min-width: 768px) { .timeline-track::before { display: block; } }

.timeline-step-icon {
  width: 72px; height: 72px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: linear-gradient(135deg, rgb(28 125 245 / 0.12), rgb(168 85 247 / 0.12));
  color: rgb(28 125 245);
  border: 1px solid rgba(28,125,245,0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
html.dark .timeline-step-icon {
  background: linear-gradient(135deg, rgba(28,125,245,0.18), rgba(168,85,247,0.18));
  color: rgb(125 175 255);
  border-color: rgba(125,175,255,0.22);
}
.timeline-step-card:hover .timeline-step-icon {
  transform: scale(1.06);
  box-shadow: 0 12px 30px -12px rgba(28,125,245,0.45);
}

/* Mobile: horizontal scroll cards */
.timeline-mobile-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 24px 24px;
  margin: 0 -24px;
  scrollbar-width: none;
}
.timeline-mobile-scroll::-webkit-scrollbar { display: none; }
.timeline-mobile-scroll > * {
  flex: 0 0 78%;
  scroll-snap-align: center;
}

/* ─── Premium Hover for Why FIXGO cards ──────────────────────────────── */
.why-card {
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.why-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 24px 50px -20px rgba(15, 23, 42, 0.18);
  border-color: rgba(28, 125, 245, 0.35);
}
html.dark .why-card:hover {
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.6);
}

/* V3.5: Why FIXGO 아이콘 — How it works(timeline-step-icon) 스타일 차용
 *  - 단색 tint 배경 → gradient 배경
 *  - 테두리 추가 (해당 아이콘 톤의 18% alpha)
 *  - hover 시 살짝 scale + glow shadow
 *  - 데스크탑 72px, 모바일 60px
 *  - 각 카드의 iconBg 클래스(bg-amber-500/12 등)는 base layer 로 유지하되,
 *    overlay gradient + ring 으로 한 단계 더 입체감 부여
 */
.why-icon {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 12px -6px rgba(15, 23, 42, 0.12);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}
@media (min-width: 768px) {
  .why-icon { width: 72px; height: 72px; border-radius: 22px; font-size: 28px; }
}
/* 다크 모드: inset highlight 제거하고 외곽 border 강화 */
html.dark .why-icon {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 18px -8px rgba(0, 0, 0, 0.5);
}
/* hover lift + glow — 부모 .why-card:hover 와 연동 */
.why-card:hover .why-icon {
  transform: translateY(-2px) scale(1.06) rotate(-2deg);
  border-color: rgba(28, 125, 245, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 14px 30px -12px rgba(28, 125, 245, 0.35);
}
html.dark .why-card:hover .why-icon {
  border-color: rgba(125, 175, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px -12px rgba(125, 175, 255, 0.35);
}

/* ─── Skeleton ───────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(0,0,0,0.06) 0%,
    rgba(0,0,0,0.12) 50%,
    rgba(0,0,0,0.06) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: 12px;
}
html.dark .skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 100%);
  background-size: 200% 100%;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Smooth section transitions ─────────────────────────────────────── */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ═════════════════════════════════════════════════════════════════════════
   V3.2 — 9-item polish: font-size scale / attach modal / hero mobile / WhyCard reveal
   ═════════════════════════════════════════════════════════════════════════ */

/* ─── Chat font-size scale (도트 메뉴에서 사용자 선택) ──────────────────────
   body.fs-sm / .fs-md (default) / .fs-lg
   대화창 내부 텍스트(스트림 영역) 만 스케일링 — 헤더/composer/시스템 UI는 고정 */
.fs-sm #chat-stream { font-size: 13.5px; }
.fs-md #chat-stream { font-size: 15px; }   /* default — 기존보다 한 단계 큼 */
.fs-lg #chat-stream { font-size: 17px; }

/* 챗 내부 텍스트 유틸리티 클래스 자동 스케일 (Tailwind text-* 오버라이드) */
.fs-md #chat-stream .text-xs   { font-size: 0.84rem; }
.fs-md #chat-stream .text-sm   { font-size: 0.97rem; line-height: 1.5; }
.fs-md #chat-stream .text-base { font-size: 1.05rem; }
.fs-lg #chat-stream .text-xs   { font-size: 0.92rem; }
.fs-lg #chat-stream .text-sm   { font-size: 1.08rem; line-height: 1.55; }
.fs-lg #chat-stream .text-base { font-size: 1.18rem; }
.fs-lg #chat-stream .text-[11px],
.fs-lg #chat-stream .text-\[11px\] { font-size: 0.86rem; }

/* 현재 선택된 font-size 버튼 강조 */
.chat-font-btn.is-active {
  background: rgb(23 23 23);
  color: white;
}
html.dark .chat-font-btn.is-active {
  background: white;
  color: rgb(23 23 23);
}

/* ─── 사진 첨부 선택 모달 (#chat-attach-choice) ─────────────────────────── */
#chat-attach-choice {
  display: none;
}
#chat-attach-choice.flex {
  display: flex;
  animation: fixgo-attach-fade-in 0.18s ease-out;
}
@keyframes fixgo-attach-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
#chat-attach-choice > div:last-child {
  animation: fixgo-attach-slide-up 0.22s cubic-bezier(0.22, 0.94, 0.36, 1);
}
@keyframes fixgo-attach-slide-up {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #chat-attach-choice.flex,
  #chat-attach-choice > div:last-child { animation: none; }
}

/* ─── Hero 모바일 잘림 방지 (V3.2) ──────────────────────────────────────── */
@media (max-width: 640px) {
  #hero {
    /* 모바일에서 하단 콘텐츠가 잘리지 않도록 자연스러운 흐름 보장 */
    overflow: visible;
  }
  #hero .fixgo-content {
    overflow: visible;
  }
  /* 모바일에서 hero 내부 grid gap 최적화 */
  #hero h1 {
    word-break: keep-all;
  }
}

/* ─── WhyCard 모바일 등장 효과 (단계별 fade-up) ────────────────────────── */
@media (max-width: 768px) {
  .why-card {
    /* 모바일에서 카드 자체 그림자 살짝 강화 (시각적 입체감) */
    box-shadow: 0 2px 10px -4px rgba(0,0,0,0.05);
  }
  .why-card .why-icon {
    /* V3.5: 모바일 중앙정렬 시 아이콘 박스 — 입체감 유지하며 살짝 축소 */
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 20px;
  }
}

/* ─── 모바일 햄버거 드롭다운 애니메이션 ─────────────────────────────────── */
#mobile-menu:not(.hidden) {
  animation: fixgo-menu-dropdown 0.18s cubic-bezier(0.22, 0.94, 0.36, 1);
  transform-origin: top right;
}
@keyframes fixgo-menu-dropdown {
  from { opacity: 0; transform: scale(0.92) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #mobile-menu:not(.hidden) { animation: none; }
}

/* ─── V14 #5: 챗봇 초기 화면 — 3행 롤링 제안 칩 캐러셀 ──────────────────── */
/* V5.25: 좌측 어두운 곳에서 → 가운데 또렷이 → 우측 어두운 곳으로 사라지는 부드러운 페이드
   사용자 요구: "좌측 어두운 곳에서 밝아졌다가 다시 우측 어두운 곳으로 사라지는 듯한 페이드인/아웃"
   구현 전략 (3단 합성):
     1) row 자체의 mask-image → 가장자리는 완전히 투명 (시야에서 사라짐)
     2) row::before 오버레이 → 좌→우 그라데이션으로 칩 위에 어두운 톤 입힘 (밝아짐 효과)
     3) row::after 오버레이 → 우측 어두운 톤
   세 가지가 합쳐져 칩이 "어두운 영역에서 떠올라 → 또렷이 → 다시 어두워지며 사라짐" 처럼 보임. */
.fixgo-rolling {
  /* 화면 모두 채우지 않게: 모바일에서 max-md 보다 좁게, 약 3개 칩이 잘 보이는 폭 */
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.fixgo-rolling-row {
  position: relative;
  overflow: hidden;
  /* 더 넓은 페이드 (28%) — 부드러운 진입/퇴장 */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 28%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 28%, #000 72%, transparent 100%);
}
/* 좌측 어두움 오버레이 — 라이트모드 */
.fixgo-rolling-row::before,
.fixgo-rolling-row::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 36%;
  pointer-events: none;
  z-index: 2;
}
/* 라이트모드: bg-neutral-50 (#fafafa) 와 정확히 매치 */
.fixgo-rolling-row::before {
  left: 0;
  background: linear-gradient(to right,
    rgba(250, 250, 250, 1) 0%,
    rgba(250, 250, 250, 0.7) 40%,
    rgba(250, 250, 250, 0) 100%);
}
.fixgo-rolling-row::after {
  right: 0;
  background: linear-gradient(to left,
    rgba(250, 250, 250, 1) 0%,
    rgba(250, 250, 250, 0.7) 40%,
    rgba(250, 250, 250, 0) 100%);
}
/* 다크모드: bg-neutral-950 (#0a0a0a) 와 정확히 매치 → 어두운 톤에서 떠오르는 느낌 */
.dark .fixgo-rolling-row::before {
  background: linear-gradient(to right,
    rgba(10, 10, 10, 1) 0%,
    rgba(10, 10, 10, 0.7) 40%,
    rgba(10, 10, 10, 0) 100%);
}
.dark .fixgo-rolling-row::after {
  background: linear-gradient(to left,
    rgba(10, 10, 10, 1) 0%,
    rgba(10, 10, 10, 0.7) 40%,
    rgba(10, 10, 10, 0) 100%);
}
.fixgo-rolling-track {
  display: flex;
  gap: 8px;
  width: max-content;
  /* 애니메이션은 JS 가 inline style 로 duration/direction 주입 */
  animation-name: fixgo-rolling-marquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
.fixgo-rolling-row[data-dir="rtl"] .fixgo-rolling-track {
  animation-name: fixgo-rolling-marquee-rev;
}
.fixgo-rolling-row .suggest-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  /* 작은 카드 톤 */
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  color: #1f2937;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.dark .fixgo-rolling-row .suggest-chip {
  background: rgba(23,23,23,0.85);
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}
.fixgo-rolling-row .suggest-chip:hover {
  border-color: rgba(99,102,241,0.45);
  background: rgba(99,102,241,0.06);
  transform: translateY(-1px);
}
.fixgo-rolling-row .suggest-chip i {
  color: var(--brand-600, #4f46e5);
  font-size: 11px;
}
.dark .fixgo-rolling-row .suggest-chip i {
  color: #a5b4fc;
}
@keyframes fixgo-rolling-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes fixgo-rolling-marquee-rev {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.fixgo-rolling-row:hover .fixgo-rolling-track {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .fixgo-rolling-track {
    animation: none !important;
  }
}

/* V5.4 #9: 안녕하세요 화면 wrench 아이콘 떠오름 애니메이션
   - 부드럽게 위아래로 떠다니는 효과 + 첫 진입 시 살짝 페이드인 */
@keyframes fixgo-float-btn-anim {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes fixgo-float-btn-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.fixgo-float-btn {
  animation:
    fixgo-float-btn-in 0.6s ease-out both,
    fixgo-float-btn-anim 3.2s ease-in-out 0.6s infinite;
}
@media (prefers-reduced-motion: reduce) {
  .fixgo-float-btn {
    animation: fixgo-float-btn-in 0.4s ease-out both;
  }
}

/* V5.7 의 "고객 문의 대기" 도트 애니메이션은 V5.8 에서 대기 카드 제거에 따라 삭제됨. */
