/* =========================================================
   femedicare — 실시간 상담 신청 현황 + AI 대화형 상담(qna)
   구조는 jmjmedical landing12 기준. 색은 아래 변수만 바꾸면 전체에 반영된다.
   ========================================================= */
:root {
  --main: #c2436b; /* 메인 (로즈) */
  --main-dark: #8e2a4c; /* 진한 메인 */
  --main-deep: #5e1a33; /* 가장 진한 톤 (헤더·배경) */
  --main-soft: #fbe9ef; /* 연한 배경 */
  --main-line: #f1c9d6; /* 연한 테두리 */
  --ink: #2c2228;
  --ink-sub: #7a6670;
  --cream: #fff8fa; /* 대화창 배경 */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f4eef1;
  color: var(--ink);
  word-break: keep-all;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 900px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  /* 실시간 현황을 상단 비주얼과 같은 비율(cqw)로 키우기 위한 기준 */
  container-type: inline-size;
}

/* =========================================================
   상단 비주얼 (01 메인 · 02 공감 · 03 WHY · 라인배너)
   시안 1080px 기준 : 가로는 %, 세로·크기는 cqw (1cqw = 시안 10.8px)
   ========================================================= */
.fm-visual {
  container-type: inline-size;
  overflow: hidden;
}

.fm-visual section {
  position: relative;
  overflow: hidden;
}

.fm-bg {
  display: block;
  width: 100%;
  height: auto;
}

.fm-part {
  position: absolute;
  margin: 0;
}

.fm-part img {
  display: block;
  width: 100%;
  height: auto;
}

/* ----- 01 메인 : 01_bg(1080x1926) 중 위 1553px 만 사용 ----- */
.fm-sec01 {
  height: 143.796cqw;
}

.fm-sec01 .fm-bg {
  position: absolute;
  top: 0;
  left: 0;
}

.fm-keywords {
  list-style: none;
}

.fm-title {
  top: 7.5cqw;
  left: 8.148%;
  width: 83.981%;
}

.fm-kw--1 {
  top: 45.556cqw;
  left: 61.296%;
  width: 21.019%;
}

.fm-kw--2 {
  top: 59.352cqw;
  left: 42.87%;
  width: 20.926%;
}

.fm-kw--3 {
  top: 64.722cqw;
  left: 74.63%;
  width: 20.926%;
}

.fm-kw--4 {
  top: 78.426cqw;
  left: 55.741%;
  width: 22.037%;
}

.fm-up {
  top: 112.963cqw;
  left: 17.037%;
  width: 71.574%;
}

/* 01 등장 : 타이틀 → 키워드(차례로 톡) → 탄력 UP
   JS 가 .is-play 를 일정 간격(7초)으로 다시 붙여 등장 연출을 반복한다.
   키워드 둥둥은 안쪽 img 에 따로 걸어 등장이 반복돼도 끊기지 않는다. */
.fm-sec01.is-play .fm-title {
  animation: fmFadeDown 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.fm-sec01.is-play .fm-kw {
  animation: fmPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.fm-sec01.is-play .fm-kw--1 {
  animation-delay: 0.4s;
}

.fm-sec01.is-play .fm-kw--2 {
  animation-delay: 0.55s;
}

.fm-sec01.is-play .fm-kw--3 {
  animation-delay: 0.7s;
}

.fm-sec01.is-play .fm-kw--4 {
  animation-delay: 0.85s;
}

.fm-up {
  transform-origin: 50% 100%;
}

/* 탄력 UP : 작게 눌렸다가 → 커지며(살짝 오버) 위로 솟은 뒤 제자리 */
.fm-sec01.is-play .fm-up {
  animation: fmGrowUp 1.1s cubic-bezier(0.22, 0.8, 0.3, 1) 1s both;
}

.fm-kw img {
  animation: fmFloat 3.4s ease-in-out infinite;
}

.fm-kw--2 img {
  animation-delay: -0.8s;
}

.fm-kw--3 img {
  animation-delay: -1.6s;
}

.fm-kw--4 img {
  animation-delay: -2.4s;
}

@keyframes fmFadeDown {
  from {
    opacity: 0;
    translate: 0 -3cqw;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes fmGrowUp {
  0% {
    opacity: 0;
    scale: 0.4;
    translate: 0 8cqw;
  }
  45% {
    opacity: 1;
    scale: 0.8;
    translate: 0 3cqw;
  }
  75% {
    scale: 1.06;
    translate: 0 -1.2cqw;
  }
  100% {
    opacity: 1;
    scale: 1;
    translate: 0 0;
  }
}

@keyframes fmPop {
  from {
    opacity: 0;
    scale: 0.6;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes fmFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.4cqw);
  }
}

/* ----- 02 공감 : 02_bg(1080x1355) ----- */
.fm-sec02-inner {
  position: absolute;
  inset: 0;
  text-align: center;
}

.fm-worry-eyebrow {
  margin-top: 5.7cqw;
  color: #3a2a28;
  font-size: 5.2cqw;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.fm-worry-title {
  margin-top: 0;
  font-size: 10.4cqw;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.04em;
  /* 로즈 → 브라운 그라데이션 글자 */
  background: linear-gradient(90deg, #d8666f 0%, #b24a50 45%, #6a2a22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.fm-worry-grid {
  position: absolute;
  top: 29.72cqw;
  left: 9.72%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.85cqw 1.85%;
  width: 78.24%;
  list-style: none;
}

/* ----- 카드 공통 디자인 -----
   흰 카드 + 같은 모서리(2.4cqw) + 같은 아이콘 원(12cqw, 플랫 로즈) + 같은 선 굵기
   02(밝은 배경)는 은은한 로즈 테두리·그림자, 03(진한 배경)은 테두리 없이 그림자로 띄운다 */
.fm-worry-card,
.fm-why-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 2.4cqw;
  background: #fff;
  text-align: center;
  transition:
    opacity 0.6s ease,
    translate 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.fm-ico {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 10.6cqw;
  height: 10.6cqw;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff2f5 0%, #fde1e8 100%);
  box-shadow: inset 0 0 0 0.15cqw rgba(226, 120, 150, 0.22);
}

/* 24 그리드 선 아이콘 (Lucide 스타일, 선 굵기 통일) */
.fm-ico svg {
  width: 56%;
  height: 56%;
  fill: none;
  stroke: #c2436b;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 02 공감 카드 : 아이콘 + 고민 한 줄 */
.fm-worry-card {
  gap: 2cqw;
  height: 27cqw;
  border: 0.15cqw solid #f6d6df;
  box-shadow: 0 1.2cqw 3.2cqw rgba(196, 92, 124, 0.13);
}

.fm-worry-card strong {
  color: #3d2329;
  font-size: 4.1cqw;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

/* ----- 03 WHY : 03_bg(1080x1263), 제목은 배경 이미지 ----- */
.fm-why-grid {
  position: absolute;
  top: 46.11cqw;
  left: 8.7%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6cqw 1.6cqw;
  width: 83.61%;
  list-style: none;
}

/* 03 이유 카드 : 아이콘 + 키워드 + 짧은 포인트 바 + 설명 */
.fm-why-card {
  height: 29.6cqw;
  box-shadow: 0 1.4cqw 3.6cqw rgba(30, 0, 10, 0.4);
}

/* 세로 공간이 좁아 아이콘을 한 단계 작게 → 카드 위아래 여백 확보 */
.fm-why-card .fm-ico {
  width: 9.4cqw;
  height: 9.4cqw;
  margin-bottom: 1.6cqw;
}

.fm-why-card strong {
  color: #a3163a;
  font-size: 4.9cqw;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.fm-why-desc {
  position: relative;
  margin-top: 1.2cqw;
  padding-top: 1.5cqw;
  color: #6b5a60;
  font-size: 3.1cqw;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

/* 긴 구분선 대신 가운데 짧은 로즈 포인트 바 */
.fm-why-desc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 4cqw;
  height: 0.4cqw;
  translate: -50% 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f08aa6, #c2436b);
}

/* 03 이유 카드 순차 강조 : JS 가 .is-lit 을 1→4 순서로 옮긴다 (보일 때만)
   켜진 카드는 살짝 떠오르며 코랄 테두리·글로우, 아이콘 원이 채워지고 파동이 퍼진다 */
.fm-why-card {
  position: relative;
}

.fm-why-card .fm-ico {
  position: relative;
  transition:
    background 0.45s ease,
    scale 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.fm-why-card .fm-ico svg {
  transition: stroke 0.45s ease;
}

.fm-why-card .fm-ico::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 0.35cqw solid #f36971;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.fm-why-desc::before {
  transition: width 0.45s ease;
}

.fm-why-grid .fm-why-card.is-lit {
  z-index: 1;
  transform: translateY(-1cqw) scale(1.03);
  box-shadow:
    0 0 0 0.45cqw #f36971,
    0 2cqw 5cqw rgba(30, 0, 10, 0.5),
    0 0 4cqw rgba(243, 105, 113, 0.55);
}

.fm-why-card.is-lit .fm-ico {
  scale: 1.08;
  background: linear-gradient(160deg, #fb8f86 0%, #e05060 100%);
}

.fm-why-card.is-lit .fm-ico svg {
  stroke: #fff;
}

.fm-why-card.is-lit .fm-ico::after {
  animation: fmRipple 1s ease-out;
}

.fm-why-card.is-lit .fm-why-desc::before {
  width: 9cqw;
}

@keyframes fmRipple {
  0% {
    opacity: 0.9;
    scale: 1;
  }
  100% {
    opacity: 0;
    scale: 1.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fm-why-card .fm-ico,
  .fm-why-card .fm-ico svg,
  .fm-why-desc::before {
    transition: none;
  }
  .fm-why-card.is-lit .fm-ico::after {
    animation: none;
  }
}

@media (hover: hover) {
  .fm-worry-card:hover,
  .fm-why-card:hover {
    transform: translateY(-0.6cqw);
  }
  .fm-worry-card:hover {
    box-shadow: 0 1.8cqw 4cqw rgba(196, 92, 124, 0.2);
  }
}

/* ----- 라인배너 : 03 하단에 겹침 (시안 76px = 7.04cqw) ----- */
.fm-linebanner {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: -7.04cqw;
}

.fm-linebanner img {
  display: block;
  width: 100%;
  height: auto;
}

/* 카드 등장 : 화면에 들어오면 차례로 */
.fm-reveal {
  opacity: 0;
  translate: 0 3cqw;
  transition:
    opacity 0.6s ease,
    translate 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.fm-reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

.fm-reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.fm-reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.fm-reveal:nth-child(4) {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .fm-sec01.is-play .fm-title,
  .fm-sec01.is-play .fm-kw,
  .fm-sec01.is-play .fm-up,
  .fm-kw img {
    animation: none;
  }
  .fm-reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }
}

/* ===== 실시간 상담 신청 현황 =====
   상단 비주얼과 같은 비율(cqw)로 키우고, 목록은 흰 카드 패널 안에서 흐르게 */
/* 최상단(01) 블러시 핑크(#fdf1f3·#fbe1e4) + 브라운 글자(#682c1b) 톤에 맞춘다
   실시간 현황 → AI 상담까지 같은 핑크 배경으로 이어진다 */
.live-feed-container {
  position: relative;
  padding: 9cqw 8.7% 5cqw;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(180deg, #fdf1f3 0%, #fbe4e8 100%);
}

.live-feed-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2cqw;
  margin-bottom: 4cqw;
}

.live-indicator {
  width: 1.8cqw;
  height: 1.8cqw;
  border-radius: 50%;
  background: #e0566f;
  box-shadow: 0 0 8px #e0566f;
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(194, 67, 107, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(194, 67, 107, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(194, 67, 107, 0);
  }
}

.live-title-text {
  color: #682c1b;
  font-size: 6.4cqw;
  font-weight: 600;
  letter-spacing: -0.04em;
}

/* 02 "나만의 고민일까요?" 와 같은 로즈 → 브라운 그라데이션 강조 */
.live-title-text strong {
  font-weight: 800;
  background: linear-gradient(90deg, #d8666f 0%, #b24a50 55%, #6a2a22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* 흰 카드 패널 + 4줄 노출 + 위아래 페이드 */
.rolling-notice-wrap {
  position: relative;
  width: 100%;
  height: 52cqw;
  padding: 0 4cqw;
  overflow: hidden;
  /* 위 카드들과 같은 흰 카드 패널 */
  border: 0.15cqw solid #f6d6df;
  border-radius: 2.4cqw;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1.2cqw 3.2cqw rgba(196, 92, 124, 0.13);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 14%, black 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 14%, black 86%, transparent);
}

.rolling-notice-track {
  display: flex;
  flex-direction: column;
  animation: rolling-vertical 26s linear infinite;
}

/* 한 줄 = 13cqw (패널 52cqw 에 정확히 4줄) */
.rolling-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 3cqw;
  height: 13cqw;
  border-bottom: 0.15cqw dashed #f3dbe2;
  color: #3d2329;
  font-size: 4.1cqw;
  font-weight: 500;
}

.rolling-item .badge {
  padding: 0.9cqw 2cqw;
  border-radius: 100px;
  background: linear-gradient(90deg, #e2557f, #c2436b);
  color: #fff;
  font-size: 3cqw;
  font-weight: 700;
  white-space: nowrap;
}

.rolling-item .name {
  font-weight: 700;
}

.rolling-item .phone {
  color: #8a6f6a;
  font-variant-numeric: tabular-nums;
}

.rolling-item .date {
  min-width: 11cqw;
  color: #c2436b;
  font-size: 3.4cqw;
  font-weight: 600;
  text-align: right;
}

@keyframes rolling-vertical {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* ===== AI 대화형 상담 ===== */
/* 실시간 현황 하단 색(#fbe4e8)에서 그대로 이어받는다 */
.qna {
  padding: 4cqw 16px 48px;
  background: linear-gradient(180deg, #fbe4e8 0%, #f9dce2 100%);
}

.chat-window {
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--main-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px -12px rgba(150, 60, 90, 0.35);
}

.chat-window-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 18px;
  /* 최상단 타이틀(로즈 → 브라운)과 같은 계열 */
  background: linear-gradient(135deg, #8a3a3c 0%, #b24a50 45%, #d8666f 100%);
  color: #fff;
}

.cw-ava,
.chat-ava {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  line-height: 1.05;
  text-align: center;
}

.cw-ava {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

.cw-ava b,
.chat-ava b {
  font-size: 12px;
  font-weight: 800;
}

/* 상담원 사진 (seomyeonel 과 같은 여성 상담원 이미지) */
.cw-ava img,
.chat-ava img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cw-ava {
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.cw-ava i,
.chat-ava i {
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
}

.cw-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cw-title strong {
  font-size: 15px;
  font-weight: 700;
}

.cw-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11.5px;
}

.cw-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22e06b;
  animation: pulse-green 1.5s infinite;
}

.chat-window-body {
  height: clamp(340px, 56vh, 480px);
  padding: 20px 14px;
  overflow-y: auto;
  background: var(--cream);
  -webkit-overflow-scrolling: touch;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-window-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 16px;
  border-top: 1px solid var(--main-line);
  background: #fff;
  color: var(--main);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.cw-foot-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--main);
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 224, 107, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(34, 224, 107, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 224, 107, 0);
  }
}

/* 말풍선 */
.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.chat-row--user {
  justify-content: flex-end;
}

.chat-ava {
  width: 44px;
  height: 44px;
  background: var(--main-soft);
  color: var(--main-dark);
}

.chat-bubble {
  max-width: 88%;
  padding: 13px 14px;
  border-radius: 16px;
  border-top-left-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(60, 20, 40, 0.06);
}

.chat-bubble b {
  color: var(--main-dark);
  font-weight: 700;
}

.chat-bubble--user {
  max-width: 80%;
  border-top-left-radius: 16px;
  border-top-right-radius: 5px;
  background: var(--main);
  color: #fff;
}

/* 말풍선 안 포인트 문구 : 홈페이지 포인트 컬러("탄력 UP" 코랄 레드) */
.chat-point {
  color: #d44456;
  font-weight: 700;
}

.chat-help {
  display: block;
  margin-top: 8px;
  color: var(--main-dark);
  font-size: 13px;
  font-weight: 600;
}

.chat-agree-view {
  color: var(--main-dark);
  font-weight: 700;
  text-decoration: underline;
}

.chat-legal {
  display: block;
  margin-top: 10px;
  color: #e5342b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

/* 답변 컨트롤 (오른쪽 정렬) */
.chat-ctrl {
  display: flex;
  justify-content: flex-end;
}

.chat-answers {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ans-btn {
  padding: 11px 22px;
  border: 1.5px solid var(--main);
  border-radius: 11px;
  background: #fff;
  color: var(--main-dark);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.ans-btn:hover:not(:disabled) {
  background: var(--main);
  color: #fff;
}

.chat-answers.is-done .ans-btn {
  border-color: #e6dce0;
  color: #b3a7ad;
  cursor: default;
}

.ans-btn--end {
  border-color: #d8c9cf;
  color: var(--ink-sub);
}

/* 텍스트 입력 (성함 / 연락처) */
.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 340px;
  margin-left: auto;
}

.chat-prefix {
  flex: 0 0 auto;
  padding: 11px 14px;
  border: 1.5px solid var(--main-line);
  border-radius: 11px;
  background: var(--main-soft);
  color: var(--main-dark);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.chat-field {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 14px;
  border: 1.5px solid var(--main-line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

.chat-field:focus {
  outline: none;
  border-color: var(--main);
}

.chat-field:disabled {
  background: #f6f2f4;
  color: #a99ca3;
}

.chat-next,
.chat-submit {
  flex: 0 0 auto;
  padding: 12px 20px;
  border: 0;
  border-radius: 11px;
  background: var(--main);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.chat-next:hover:not(:disabled),
.chat-submit:hover:not(:disabled) {
  filter: brightness(1.08);
}

.chat-submit {
  padding: 15px 34px;
  font-size: 16px;
  box-shadow: 0 6px 16px -6px rgba(142, 42, 76, 0.6);
}

.chat-submit:disabled {
  background: #cdbfc5;
  box-shadow: none;
  cursor: default;
}

/* 중복 선택 */
.chat-multi {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  margin-left: auto;
}

.chat-multi-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.multi-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--main-line);
  border-radius: 11px;
  background: #fff;
  color: var(--main-dark);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.multi-btn b {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.multi-btn i {
  color: var(--ink-sub);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
}

.multi-check {
  position: relative;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--main-line);
  border-radius: 6px;
  background: #fff;
}

.multi-check::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 5px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
}

.multi-btn.is-on {
  border-color: var(--main);
  background: var(--main-soft);
}

.multi-btn.is-on .multi-check {
  border-color: var(--main);
  background: var(--main);
}

.multi-btn.is-on .multi-check::after {
  opacity: 1;
}

.multi-confirm {
  align-self: stretch;
  padding: 13px 20px;
}

.multi-confirm:disabled {
  background: #d9cdd2;
  cursor: default;
}

.chat-multi.is-done .multi-btn {
  border-color: #ece4e7;
  background: #fff;
  color: #b3a7ad;
  cursor: default;
}

.chat-multi.is-done .multi-btn.is-on {
  background: var(--main-soft);
  color: var(--ink-sub);
}

.chat-multi.is-done .multi-confirm {
  display: none;
}

/* 등장 */
.chat-appear {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.chat-appear.is-in {
  opacity: 1;
  transform: none;
}

/* landing_v1.js 가 참조하는 실제 필드는 숨김 */
.lead-hidden {
  display: none;
}

/* ===== 개인정보 수집·이용 동의 팝업 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  padding: 2rem 1.6rem 1.8rem;
  overflow-y: auto;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.modal .close {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: #999;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-title {
  margin-bottom: 1.2rem;
  padding-right: 1.5rem;
  color: var(--main-deep);
  font-size: 1.3rem;
  font-weight: 800;
}

.privacy-row {
  margin-bottom: 1rem;
}

.privacy-row strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--main-dark);
  font-size: 1.05rem;
}

.privacy-row p {
  color: #4a5568;
  line-height: 1.5;
}

.privacy-note {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  color: #888;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .live-indicator,
  .cw-dot,
  .cw-foot-dot,
  .rolling-notice-track {
    animation: none;
  }
  .chat-appear {
    transition: none;
  }
}

/* =========================================================
   상담창 닫기 버튼 — 팝업으로 열렸을 때만 노출
   ========================================================= */
.cw-close {
  display: none;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chat-layer .cw-close {
  display: block;
}

/* =========================================================
   상담창 팝업 — 모바일은 아래에서 올라오는 시트, PC 는 가운데 팝업
   (#qna 의 같은 .chat-window 노드를 옮겨 띄워 대화 상태가 유지된다)
   ========================================================= */
.chat-layer {
  position: fixed;
  inset: 0;
  z-index: 950; /* 개인정보 모달(1000)보다 아래 */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  transition: visibility 0.3s ease;
}

.chat-layer.is-open {
  visibility: visible;
}

.chat-layer-dim {
  position: absolute;
  inset: 0;
  background: rgba(40, 6, 20, 0.62);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-layer.is-open .chat-layer-dim {
  opacity: 1;
}

.chat-layer-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.7, 0.25, 1);
}

.chat-layer.is-open .chat-layer-panel {
  transform: none;
}

.chat-layer .chat-window {
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.chat-layer .chat-window-body {
  height: min(60vh, 520px);
}

.chat-layer .chat-window-foot {
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 600px) {
  .chat-layer {
    align-items: center;
    padding: 20px;
  }

  .chat-layer-panel {
    opacity: 0;
    transform: translateY(24px);
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
  }

  .chat-layer.is-open .chat-layer-panel {
    opacity: 1;
    transform: none;
  }

  .chat-layer .chat-window {
    border-bottom: 1px solid var(--main-line);
    border-radius: 18px;
  }
}

/* 팝업 위에 남는 원래 자리 (상담 영역 높이 유지) */
.chat-window-placeholder {
  max-width: 560px;
  margin: 0 auto;
}

/* 팝업이 열려 있는 동안 배경 스크롤·하단 버튼 잠금 */
body.is-chat-open {
  overflow: hidden;
}

body.is-chat-open .floating-cta {
  opacity: 0;
  visibility: hidden;
}

/* =========================================================
   하단 고정 CTA — "1:1 비공개 무료상담 신청"
   로즈 그라데이션 + 흰 테두리 + 빛줄기·빛 고리·톡톡 튀는 모션으로 시선 유도
   가운데 정렬은 margin auto (transform 은 애니메이션 전용)
   ========================================================= */
.floating-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 auto;
  padding: clamp(16px, 4.4vw, 22px) clamp(26px, 8vw, 48px);
  border: 2px solid #fff;
  border-radius: 999px;
  /* 01 "탄력 UP" 글자 색 (위 피치 하이라이트 → 코랄 레드 → 딥 로즈) */
  background: linear-gradient(180deg, #fb8f86 0%, #f36971 22%, #e05060 55%, #c4394b 100%);
  box-shadow:
    0 12px 28px rgba(150, 30, 45, 0.38),
    0 0 22px rgba(243, 105, 113, 0.6);
  color: #fff;
  font-size: clamp(18px, 5vw, 23px);
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(140, 25, 40, 0.45);
  cursor: pointer;
  animation: ctaNudge 4s ease-in-out 1.5s infinite;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    box-shadow 0.3s ease;
}

.floating-cta:hover {
  box-shadow:
    0 16px 32px rgba(150, 30, 45, 0.45),
    0 0 30px rgba(243, 105, 113, 0.85);
}

/* 버튼 위를 주기적으로 훑는 빛줄기 */
.floating-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 60%) no-repeat;
  background-size: 250% 100%;
  background-position: 150% 0;
  animation: ctaShine 3s ease-in-out 0.8s infinite;
  pointer-events: none;
}

/* 버튼 바깥으로 퍼지는 빛 고리 */
.floating-cta::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(243, 105, 113, 0.85);
  border-radius: inherit;
  animation: ctaRing 2s ease-out infinite;
  pointer-events: none;
}

/* 깜빡이는 상태 표시 */
.floating-cta__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  animation: ctaPulse 1.8s ease-out infinite;
}

.floating-cta__arrow {
  display: grid;
  place-items: center;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  background: #fff;
  color: #d44456;
  font-size: 0.9em;
  line-height: 1;
  text-shadow: none;
}

@keyframes ctaPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8);
  }
  70%,
  100% {
    box-shadow: 0 0 0 9px rgba(255, 255, 255, 0);
  }
}

@keyframes ctaRing {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.1, 1.45);
  }
}

@keyframes ctaShine {
  0% {
    background-position: 150% 0;
  }
  45%,
  100% {
    background-position: -50% 0;
  }
}

/* 4초마다 한 번 톡톡 튀어 시선을 끈다 */
@keyframes ctaNudge {
  0%,
  76%,
  100% {
    transform: translateY(0);
  }
  82% {
    transform: translateY(-9px);
  }
  88% {
    transform: translateY(0);
  }
  93% {
    transform: translateY(-4px);
  }
}

/* 상담 영역이 화면에 보이면 가린다 (입력 방해 방지) */
.floating-cta.is-hidden {
  opacity: 0;
  visibility: hidden;
}


@media (prefers-reduced-motion: reduce) {
  .chat-layer,
  .chat-layer-dim,
  .chat-layer-panel,
  .floating-cta,
  .floating-cta::before,
  .floating-cta::after,
  .floating-cta__dot {
    animation: none;
    transition: none;
  }
}
