/* ============================================================
   SCPS Chatbot — UI 스타일
   레퍼런스: https://sc301.hospital.chat.interactor.com/chat
   브라우저 실측(computed) 기반 1:1 재현
   ============================================================ */

/* ── CSS 변수 ── */
:root {
  --scps-primary:       #A43C93;
  --scps-primary-hover: #8E3380;
  --scps-sidebar-w:     240px;

  --scps-body-bg:   #F5F5F7;
  --scps-bg:        #F7F8F9;
  --scps-surface:   #FFFFFF;

  --scps-border:    #EFF1F4;
  --scps-border2:   #E5E5EA;
  --scps-border-panel: #ECF0F3;

  --scps-text:      #1C1C1E;
  --scps-heading:   #2A3038;
  --scps-title:     #0F1729;
  --scps-muted:     #545D6D;
  --scps-muted2:    #6B7280;
  --scps-muted3:    #858A94;
  --scps-placeholder:#9AA3AE;

  --scps-icon-circle:#2A3038;

  --scps-green-bg:  #F0FDF4;
  --scps-green-text:#1C7C3A;
  --scps-cat-hover-bg:#FBEAF4;

  --scps-cal-sun:   #FF3B30;
  --scps-cal-sat:   #007AFF;

  --scps-shadow-soft: 0 0 12px 0 rgba(0,0,0,.08);
}

/* 다크모드 */
.scps-dark {
  --scps-body-bg:   #1C1C1E;
  --scps-bg:        #1C1C1E;
  --scps-surface:   #2C2C2E;
  --scps-border:    #3A3A3C;
  --scps-border2:   #3A3A3C;
  --scps-border-panel:#3A3A3C;
  --scps-text:      #FFFFFF;
  --scps-heading:   #FFFFFF;
  --scps-title:     #FFFFFF;
  --scps-muted:     #A1A8B5;
  --scps-muted2:    #A1A8B5;
  --scps-muted3:    #9CA3AF;
  --scps-placeholder:#9CA3AF;
  --scps-icon-circle:#1C1C1E;
}

/* ── 리셋 (0-특이성: 내 .scps-* 클래스 규칙을 덮어쓰지 않도록 :where 사용) ── */
:where(#scps-chatbot-wrap *) { box-sizing: border-box; margin: 0; padding: 0; }
:where(#scps-chatbot-wrap *)::before, :where(#scps-chatbot-wrap *)::after { box-sizing: border-box; }

/* ── 폰트 강제 (테마 폰트 덮어쓰기 방지: ID 특이성) ── */
#scps-chatbot-wrap, #scps-chatbot-wrap * {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

.scps-wrap {
  display: flex;
  width: 100%;
  height: 100vh;                 /* 폴백 */
  height: 100dvh;                /* iOS 동적 툴바 대응: 실제 보이는 높이 */
  overflow: hidden;
  background: var(--scps-bg);
  color: var(--scps-text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Noto Sans KR', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  /* 이중 스크롤(문서 스크롤 + 내부 스크롤) 방지:
     앱 셸을 뷰포트에 고정해 문서 높이에 기여하지 않게 함 → 내부 스크롤 1개만 남음 */
  position: fixed;
  top: 0; left: 0; right: 0;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
.scps-wrap button { font-family: inherit; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.scps-sidebar {
  display: flex; flex-direction: column;
  background: var(--scps-surface);
  border-right: 1px solid var(--scps-border);
  flex-shrink: 0; overflow-y: auto;
  position: fixed; inset: 0 auto 0 0;
  /* iOS Safari 상단 주소창·하단 툴바(노치/홈 인디케이터)에 콘텐츠가 가려 잘린 느낌 방지 */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 40; width: 280px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  transform: translateX(-100%);
  transition: transform .2s ease-out, background .2s, border-color .2s;
}
.scps-sidebar.open { transform: translateX(0); }
.scps-sidebar::-webkit-scrollbar { width: 4px; }
.scps-sidebar::-webkit-scrollbar-thumb { background: var(--scps-border); border-radius: 4px; }

/* 로고 */
.scps-logo { padding: 24px 24px 8px; line-height: 0; }
.scps-logo-link { display: flex; align-items: center; gap: 6px; text-decoration: none; transition: opacity .2s; }
.scps-logo-link:hover { opacity: .8; }
.scps-logo-icon, .scps-logo-img { height: 20px; width: auto; display: block; }

/* 새 채팅 */
.scps-newchat-wrap { padding: 0 12px; margin-bottom: 2px; }
.scps-new-chat-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; border-radius: 8px;
  background: none; border: none; cursor: pointer; text-align: left;
  transition: background .15s;
}
.scps-new-chat-btn:hover { background: var(--scps-bg); }
.scps-newchat-ico {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--scps-body-bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--scps-muted);
  transition: background .15s;
}
.scps-new-chat-btn:hover .scps-newchat-ico { background: #EFEFF3; }
.scps-dark .scps-new-chat-btn:hover .scps-newchat-ico { background: #2C2C2E; }
.scps-newchat-label {
  font-size: 13px; font-weight: 500; line-height: 1.4;
  letter-spacing: -0.26px; color: var(--scps-muted);
}

/* 브랜드 카피 */
.scps-copy { padding: 8px 16px 12px; }
.scps-copy-headline {
  white-space: pre-line;
  font-size: 20px; font-weight: 700; line-height: 1.4;
  letter-spacing: -0.02em; color: var(--scps-heading);
  margin-bottom: 10px;
}
.scps-copy-sub {
  white-space: pre-line;
  font-size: 13px; font-weight: 500; line-height: 1.5;
  color: var(--scps-muted);
}
.scps-copy-gap { height: 8px; }

/* 스페이서 */
.scps-spacer { flex: 1 1 auto; min-height: 8px; }

/* 네비게이션 */
.scps-nav { padding: 0 12px; margin-bottom: 8px; display: flex; flex-direction: column; }
.scps-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 8px; border-radius: 8px;
  text-decoration: none; cursor: pointer; width: 100%;
  background: none; border: none; text-align: left;
  transition: background .15s;
}
.scps-nav-item:hover { background: var(--scps-bg); }
.scps-nav-ico-slot { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.scps-nav-ico-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--scps-icon-circle); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.scps-nav-label { flex: 1; font-size: 14px; font-weight: 500; color: var(--scps-muted); transition: color .15s; }
.scps-nav-item:hover .scps-nav-label { color: var(--scps-text); }
.scps-nav-chevron { width: 12px; height: 12px; margin-right: 4px; color: var(--scps-placeholder); transition: transform .2s; }

/* 드롭다운 (떠있는 팝업) */
.scps-nav-dropdown { position: relative; }
.scps-nav-dropdown.open .scps-nav-chevron { transform: rotate(180deg); }
.scps-dropdown-menu {
  display: none; position: absolute; left: 0; z-index: 50;
  flex-direction: column; min-width: 192px;
  background: var(--scps-surface);
  border: 1px solid var(--scps-border); border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}
.scps-nav-dropdown.open .scps-dropdown-menu { display: flex; }
/* 길찾기: 버튼 위로 (bottom-full + mb-1) — 하단 위치라 위 영역을 덮어 스크롤 방지 */
#scpsMapDropdown .scps-dropdown-menu { bottom: 100%; margin-bottom: 4px; width: 208px; }
/* 한국어: 버튼 위로 (bottom-full + mb-1) */
#scpsLangDropdown .scps-dropdown-menu { bottom: 100%; margin-bottom: 4px; width: 192px; }
.scps-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; margin: 0 4px; border-radius: 9999px;
  color: #3F4756; font-size: 13px;
  text-decoration: none; background: none; border: none;
  cursor: pointer; transition: background .15s, color .15s; text-align: left;
}
.scps-dark .scps-dropdown-item { color: var(--scps-muted); }
.scps-dropdown-item:hover { background: #F7F8F9; color: var(--scps-text); }
.scps-dark .scps-dropdown-item:hover { background: #3A3A3C; }
.scps-dropdown-item.active { background: #F7F8F9; color: var(--scps-text); font-weight: 600; }
.scps-dark .scps-dropdown-item.active { background: #3A3A3C; }
#scpsMapDropdown .scps-dropdown-item { font-size: 12px; gap: 10px; }
/* 지도 아이콘 이미지 (시안 동일: w-5 h-5 rounded-[6px] object-contain) */
.scps-map-ico { width: 20px; height: 20px; border-radius: 6px; object-fit: contain; flex-shrink: 0; }

/* 후기 */
.scps-reviews-link { display: block; margin: 0 12px 8px; padding: 8px 12px; border-radius: 8px; text-decoration: none; transition: background .15s; }
.scps-reviews-link:hover { background: var(--scps-bg); }
.scps-reviews-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--scps-heading); }
.scps-reviews-title { font-size: 14px; font-weight: 500; }
.scps-reviews-sub { font-size: 11px; color: var(--scps-muted); line-height: 1.6; }

/* 디바이더 */
.scps-divider { height: 1px; background: var(--scps-border); margin: 0 12px; }

/* 푸터 링크 (한 줄) */
.scps-footer-links { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 16px; }
.scps-footer-links a, .scps-darkmode-btn {
  font-size: 11px; color: var(--scps-muted3);
  text-decoration: none; background: none; border: none;
  cursor: pointer; transition: color .15s;
  display: inline-flex; align-items: center; gap: 4px;
}
.scps-footer-links a:hover, .scps-darkmode-btn:hover { color: #3F4756; }
.scps-dark .scps-footer-links a:hover, .scps-dark .scps-darkmode-btn:hover { color: #fff; }

/* SNS */
.scps-sns { display: flex; align-items: center; gap: 16px; padding: 0 16px 16px; }
.scps-sns-btn { opacity: .9; transition: opacity .2s; line-height: 0; color: var(--scps-muted); }
.scps-sns-btn:hover { opacity: 1; }
.scps-sns-btn svg { width: 24px; height: 24px; display: block; }

/* 모바일 오버레이 */
.scps-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
.scps-overlay.active { display: block; }

/* ============================================================
   MAIN
   ============================================================ */
.scps-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }

/* 모바일 헤더 */
.scps-mobile-header {
  display: none; align-items: center; height: 48px; padding: 0 12px;
  background: var(--scps-surface); border-bottom: 1px solid var(--scps-border); flex-shrink: 0;
}
.scps-hamburger {
  width: 40px; height: 40px; margin-left: -4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: none; border: none; cursor: pointer;
  color: var(--scps-text); transition: background .15s;
}
.scps-hamburger:hover { background: var(--scps-body-bg); }
.scps-mobile-logo { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; transition: opacity .2s; }
.scps-mobile-logo:hover { opacity: .8; }
.scps-mobile-logo img { height: 20px; width: auto; }
.scps-mobile-header-spacer { width: 40px; height: 40px; }

/* ============================================================
   WELCOME
   ============================================================ */
.scps-welcome {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;   /* iOS 모멘텀 스크롤 */
  overscroll-behavior: contain;        /* 스크롤 체이닝(문서로 전파) 차단 */
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px;
}
.scps-welcome.hidden { display: none; }

.scps-welcome-title, .scps-welcome-subtitle {
  font-size: 18px; font-weight: 700; line-height: 1.4;
  letter-spacing: -0.02em; color: var(--scps-title);
  text-align: center; word-break: keep-all;
}
.scps-welcome-subtitle { margin-top: 4px; }
.scps-welcome-desc { font-size: 11px; color: #9A6898; text-align: center; margin-top: 8px; padding: 0 8px; }

/* 히어로 장식 라인 + eyebrow (시안과 동일) */
.scps-hero-ornament { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; margin: 0 auto 12px; }
.scps-hero-ornament .scps-rule { flex: 1; height: 1px; }
.scps-hero-ornament .scps-rule-l { background: linear-gradient(90deg, transparent, var(--scps-primary)); }
.scps-hero-ornament .scps-rule-r { background: linear-gradient(90deg, var(--scps-primary), transparent); }
.scps-hero-ornament .scps-bow { font-size: 14px; line-height: 1; flex-shrink: 0; color: var(--scps-primary); opacity: .7; }
#scps-chatbot-wrap .scps-hero-eyebrow {
  font-family: 'DM Serif Display', serif !important;
  font-size: 9px !important;
  font-weight: 400 !important;
  font-style: italic !important;
  letter-spacing: 0.32em !important;
  color: #6A3868 !important;
  text-align: center;
  margin: 0 0 10px !important;
}

/* 헤드카피 시간대별 롤링 */
.scps-welcome-roller { width: 100%; display: flex; flex-direction: column; align-items: center; }
.scps-roller-item {
  display: none;
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.scps-roller-item.scps-roll-active { display: block; }
.scps-roller-item.scps-roll-in { opacity: 1; transform: translateY(0); }
/* 시안과 동일한 세리프 헤드카피 (DM Serif Display + 이탤릭 강조) */
#scps-chatbot-wrap .scps-roller-item,
#scps-chatbot-wrap .scps-roller-item * {
  font-family: 'DM Serif Display', serif !important;
}
#scps-chatbot-wrap .scps-roller-item {
  font-size: 34px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.35 !important;
}
#scps-chatbot-wrap .scps-roller-item em { font-style: italic !important; color: var(--scps-primary) !important; }

/* 태그 */
.scps-topic-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; max-width: 340px; }
.scps-topic-tag {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 5.5px 12px 5.5px 8px; border-radius: 9999px;
  border: none; cursor: pointer; font-size: 12px; font-weight: 500; color: #fff;
  transition: background .15s;
}
.scps-tag-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.25); font-size: 11px; font-weight: 700; color: #fff; }
.scps-topic-tag:nth-child(1) { background: #A43C93; }
.scps-topic-tag:nth-child(1):hover { background: #8E3380; }
.scps-topic-tag:nth-child(2) { background: #D88AC4; }
.scps-topic-tag:nth-child(2):hover { background: #C77AB5; }
.scps-topic-tag:nth-child(3) { background: #A43C93; }
.scps-topic-tag:nth-child(3):hover { background: #8E3380; }
.scps-topic-tag:nth-child(4) { background: #D88AC4; }
.scps-topic-tag:nth-child(4):hover { background: #C77AB5; }
.scps-topic-tag:nth-child(5) { background: #FBEAF4; color: #A43C93; }
.scps-topic-tag:nth-child(5) .scps-tag-num { background: rgba(164,60,147,.18); color: #A43C93; }
.scps-topic-tag:nth-child(5):hover { background: #F5D9EC; }

/* 히어로 */
.scps-hero {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  margin-top: 8px; width: 100%; max-width: 760px; height: 320px; overflow: hidden;
  flex-shrink: 0;
}
.scps-hero-roll-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; animation: scps-hero-roll 12s infinite; -webkit-mask-image: linear-gradient(#000 70%, transparent 100%); mask-image: linear-gradient(#000 70%, transparent 100%); }
.scps-hero-roll-img:nth-child(1) { animation-delay: 0s; }
.scps-hero-roll-img:nth-child(2) { animation-delay: 4s; }
.scps-hero-roll-img:nth-child(3) { animation-delay: 8s; }
@keyframes scps-hero-roll { 0% { opacity: 0; } 3% { opacity: 1; } 30% { opacity: 1; } 33% { opacity: 0; } 100% { opacity: 0; } }

/* 스파클 (✦) */
.scps-sparkle { position: absolute; z-index: 0; }
.scps-sparkle.s0 { top: 24px;  left: 64px;  width: 20px; height: 20px; color: #FF8F23; opacity: .9; }
.scps-sparkle.s1 { top: 80px;  right: 96px; width: 16px; height: 16px; color: #FFCC00; }
.scps-sparkle.s2 { top: 160px; left: 24px;  width: 24px; height: 24px; color: #2196F3; }
.scps-sparkle.s3 { bottom: 80px; right: 40px; width: 20px; height: 20px; color: #9C27B0; }
.scps-sparkle.s4 { bottom: 32px; left: 96px;  width: 16px; height: 16px; color: #4CAF50; }
.scps-sparkle.s5 { top: 48px;  right: 32px;  width: 12px; height: 12px; color: #E91E63; }
.scps-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; z-index: 0; }
.scps-dot.d1 { top: 176px; right: 176px; background: #FF8F23; }
.scps-dot.d2 { bottom: 128px; left: 176px; background: #2196F3; }
.scps-dot.d3 { top: 128px; left: 160px; background: #9C27B0; }
.scps-dark .scps-sparkle, .scps-dark .scps-dot { display: none; }

/* 로그인 배너 */
.scps-login-banner {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  z-index: 10; width: calc(100% - 16px); max-width: 344px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px 16px; border-radius: 8px;
  background: linear-gradient(90deg, #A43C93 0%, #BE5BAE 55%, #D88AC4 100%);
  box-shadow: var(--scps-shadow-soft);
}
.scps-login-banner.hidden { display: none; }
.scps-login-banner > svg { color: #fff; flex-shrink: 0; }
.scps-login-banner p { flex: 1; font-size: 14px; line-height: 1.5; letter-spacing: -0.28px; color: #fff; font-weight: 500; word-break: keep-all; }
.scps-banner-login { flex-shrink: 0; font-size: 14px; line-height: 1.5; letter-spacing: -0.28px; color: #fff; font-weight: 700; white-space: nowrap; text-decoration: none; transition: opacity .2s; }
.scps-banner-login:hover { opacity: .8; }
.scps-banner-close { flex-shrink: 0; margin-right: -4px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: none; border: none; cursor: pointer; color: rgba(255,255,255,.85); transition: background .15s, color .15s; }
.scps-banner-close:hover { color: #fff; background: rgba(255,255,255,.15); }

/* ============================================================
   INPUT (welcome / chat 공용 폼)
   ============================================================ */
.scps-input-wrap { width: 100%; max-width: 680px; margin-top: 0; }

.scps-input-form {
  display: flex; align-items: center; gap: 32px;
  background: var(--scps-surface);
  border: 1px solid var(--scps-primary);
  border-radius: 32px;
  box-shadow: var(--scps-shadow-soft);
  padding: 16px 16px 16px 24px;
  transition: border-color .15s;
}
.scps-dark .scps-input-form { box-shadow: none; }
.scps-input-form:hover, .scps-input-form:focus-within { border-color: var(--scps-primary-hover); }

.scps-textarea {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--scps-title); font-size: 14px; line-height: 1.5;
  padding: 6px 0; resize: none; max-height: 160px; overflow: hidden; font-family: inherit;
}
.scps-textarea::placeholder { color: var(--scps-placeholder); }

.scps-input-actions { display: flex; align-items: center; gap: 4px; padding: 0 4px; color: var(--scps-placeholder); flex-shrink: 0; }
.scps-action-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: none; border: none; cursor: pointer;
  color: inherit; text-decoration: none; transition: background .15s, color .15s;
}
.scps-action-btn:hover { background: var(--scps-green-bg); color: var(--scps-green-text); }
.scps-dark .scps-action-btn:hover { background: #2C3A2E; }
.scps-lang-glyph { font-size: 12px; font-weight: 700; }
.scps-act-copy { display: none; }      /* 복사 버튼: 채팅 모드에서만 노출 */

.scps-send-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: none; cursor: pointer;
  background: var(--scps-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(164,60,147,.30); transition: background .15s;
}
.scps-send-btn:hover { background: var(--scps-primary-hover); }
.scps-send-btn:disabled { opacity: .5; cursor: not-allowed; }

.scps-disclaimer { font-size: 12px; color: var(--scps-placeholder); text-align: center; margin-top: 12px; word-break: keep-all; }

@media (min-width: 640px) {
.scps-disclaimer { font-size: 11px; color: var(--scps-placeholder); text-align: center; margin-top: 12px; word-break: keep-all; }
}

/* ============================================================
   CATEGORIES
   ============================================================ */
.scps-categories {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px 20px; justify-items: center;
  width: 100%; max-width: 680px; margin: 28px auto 0;
}
.scps-cat-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; }
.scps-cat-ico {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #F7F8F9; border: 1px solid #EFF1F4;
  color: #6B7280; transition: border-color .15s, background .15s, color .15s;
}
/* hover/active: 라이트·다크 공통으로 크림 배경 + 주황 테두리 (시안엔 dark 변형 없음) */
.scps-cat-btn:hover .scps-cat-ico, .scps-cat-btn.active .scps-cat-ico { border-color: #A43C93; background: #FBEAF4; color: #1C7C3A; }
.scps-dark .scps-cat-btn:hover .scps-cat-ico, .scps-dark .scps-cat-btn.active .scps-cat-ico { color: #A43C93; }
.scps-cat-label { font-size: 12px; color: #6B7280; white-space: nowrap; transition: color .15s; }
.scps-cat-btn:hover .scps-cat-label, .scps-cat-btn.active .scps-cat-label { color: #1C7C3A; }
.scps-cat-btn.active .scps-cat-label { font-weight: 600; }
.scps-dark .scps-cat-btn:hover .scps-cat-label, .scps-dark .scps-cat-btn.active .scps-cat-label { color: #A43C93; }

/* ============================================================
   SUGGESTIONS (welcome)
   ============================================================ */
.scps-suggestions-area { width: 100%; max-width: 680px; margin: 28px auto 0; }
.scps-suggestions-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.scps-suggestions-chips:empty { display: none; }
.scps-suggestions-chip { font-size: 12px; font-weight: 600; color: var(--scps-green-text); }
.scps-dark .scps-suggestions-chip { color: var(--scps-primary); }
.scps-suggestions-desc { font-size: 13px; color: var(--scps-muted2); margin-bottom: 12px; }
.scps-suggestions { display: flex; flex-direction: column; gap: 8px; }
.scps-suggestion-btn {
  text-align: left; font-size: 13px; color: #3F4756;
  background: var(--scps-surface); border: 1px solid var(--scps-border2);
  border-radius: 9999px; padding: 8px 16px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: border-color .15s, color .15s, background .15s;
}
.scps-suggestion-btn:hover { border-color: var(--scps-primary); color: var(--scps-green-text); background: var(--scps-cat-hover-bg); }
.scps-dark .scps-suggestion-btn { color: var(--scps-muted); box-shadow: none; }
/* hover: 라이트·다크 공통 (크림 배경 + 초록 텍스트 + 주황 테두리) — 시안엔 dark 변형 없음 */
.scps-dark .scps-suggestion-btn:hover { background: var(--scps-cat-hover-bg); color: var(--scps-green-text); border-color: var(--scps-primary); }

/* ============================================================
   CHAT MESSAGES
   ============================================================ */
.scps-messages { flex: 1; overflow-y: auto; overflow-x: hidden; display: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.scps-messages.active { display: block; }
.scps-messages-inner { max-width: 768px; margin: 0 auto; width: 100%; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }

.scps-date-divider { display: flex; align-items: center; gap: 12px; color: #8E8E93; font-size: 12px; }
.scps-date-divider .line { flex: 1; height: 1px; background: var(--scps-border2); }

/* 사용자 버블 */
.scps-msg-user { display: flex; justify-content: flex-end; }
.scps-msg-user .scps-bubble {
  max-width: 75%; padding: 12px 16px; background: var(--scps-primary); color: #fff;
  border-radius: 16px 16px 6px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
  font-size: 14px; line-height: 1.625; word-break: break-word; white-space: pre-wrap;
}

/* AI 메시지 */
.scps-msg-ai { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
.scps-msg-ai-row { display: flex; gap: 10px; max-width: 88%; }
.scps-ai-avatar {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; margin-top: 4px;
  background: var(--scps-cat-hover-bg); color: var(--scps-primary);
  display: flex; align-items: center; justify-content: center;
}
.scps-dark .scps-ai-avatar { background: #3A2030; }
.scps-ai-content {
  flex: 1; min-width: 0; padding: 16px 20px;
  background: var(--scps-surface); color: var(--scps-text);
  border: 1px solid var(--scps-border);
  border-radius: 16px 16px 16px 6px;
  box-shadow: 0 1px 2px rgba(15,23,41,.04);
  font-size: 14px; line-height: 1.75; letter-spacing: -0.01em; word-break: keep-all;
}
.scps-ai-content p { margin: 10px 0; }
.scps-ai-content p:first-child { margin-top: 0; }
.scps-ai-content p:last-child { margin-bottom: 0; }
.scps-ai-content h1 { font-size: 18px; font-weight: 700; margin: 20px 0 10px; color: var(--scps-title); }
.scps-ai-content h1:first-child { margin-top: 0; }
.scps-ai-content h2 { font-size: 16px; font-weight: 700; margin: 18px 0 8px; color: var(--scps-title); }
.scps-ai-content h2:first-child { margin-top: 0; }
.scps-ai-content h3 { font-size: 15px; font-weight: 700; margin: 14px 0 6px; }
.scps-ai-content ul, .scps-ai-content ol { padding-left: 20px; margin: 10px 0; }
.scps-ai-content li { margin: 4px 0; }
.scps-ai-content strong { font-weight: 700; }
.scps-ai-content a { color: var(--scps-primary); }
.scps-ai-content .citation-badge {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin: 0 2px; border-radius: 4px;
  background: var(--scps-bg); font-size: 9px; line-height: 1;
  vertical-align: middle; cursor: help;
}
/* 인용 배지 호버 시 검은 툴팁 (시안과 동일) */
#scps-chatbot-wrap .scps-ai-content .citation-badge::after {
  content: "출처: " attr(data-cite);
  position: absolute; left: 50%; bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 220px;
  padding: 8px 11px; border-radius: 8px;
  background: #1F2024; color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.45; letter-spacing: normal;
  white-space: normal; text-align: left;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease; z-index: 60;
}
#scps-chatbot-wrap .scps-ai-content .citation-badge::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #1F2024;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .15s ease; z-index: 60;
}
#scps-chatbot-wrap .scps-ai-content .citation-badge:hover::after {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
#scps-chatbot-wrap .scps-ai-content .citation-badge:hover::before {
  opacity: 1; visibility: visible;
}

/* 상담 유도 박스 (녹색) */
.scps-ai-content .consult-question, .scps-consult-question {
  background: #E8F8EB; color: var(--scps-green-text);
  border-radius: 14px; padding: 13px 16px; margin-top: 18px;
  font-size: 14px; font-weight: 600; line-height: 1.55;
}
.scps-dark .scps-ai-content .consult-question, .scps-dark .scps-consult-question { background: #20351F; }

/* 면책 박스 */
.scps-disclaimer-note {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px;
  border-radius: 12px; background: var(--scps-bg); border: 1px solid var(--scps-border);
  padding: 8px 12px;
}
.scps-disclaimer-note svg { flex-shrink: 0; margin-top: 2px; color: #9AA3B0; }
.scps-dark .scps-disclaimer-note svg { color: #6B7280; }
.scps-disclaimer-note span { font-size: 12px; line-height: 1.6; color: #8A929E; }

/* 로딩 */
.scps-loading-dots { display: flex; gap: 5px; padding: 16px 20px; align-items: center; background: var(--scps-surface); border: 1px solid var(--scps-border); border-radius: 16px 16px 16px 6px; }
.scps-loading-dots span.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--scps-primary); animation: scps-dot .9s ease-in-out infinite; }
.scps-loading-dots span.dot:nth-child(2) { animation-delay: .15s; }
.scps-loading-dots span.dot:nth-child(3) { animation-delay: .3s; }
.scps-loading-text { font-size: 14px; color: #8E8E93; padding-left: 4px; }
@keyframes scps-dot { 0%,80%,100% { transform: scale(.8); opacity: .5; } 40% { transform: scale(1.1); opacity: 1; } }

/* 채팅 추천질문 (전체폭, 들여쓰기) */
.scps-chat-suggestions { display: flex; flex-direction: column; gap: 8px; margin-left: 36px; width: calc(100% - 36px); }
.scps-chat-suggestion-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 12px 16px; font-size: 14px; color: var(--scps-text);
  background: var(--scps-surface); border: 1px solid var(--scps-border2);
  border-radius: 9999px; cursor: pointer;
  transition: border-color .15s, color .15s, opacity .35s ease, transform .35s ease;
}
/* 추천 질문 순차 등장 (1초 간격) */
.scps-chat-suggestion-btn.scps-sugg-hidden { opacity: 0; transform: translateY(6px); pointer-events: none; }
.scps-chat-suggestion-btn svg { flex-shrink: 0; color: #8E8E93; transition: color .15s; }
.scps-chat-suggestion-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scps-chat-suggestion-btn:hover { border-color: var(--scps-primary); color: var(--scps-green-text); }
.scps-chat-suggestion-btn:hover svg { color: var(--scps-primary); }

/* ============================================================
   CHAT FOOTER (하단 입력 바)
   ============================================================ */
.scps-chat-footer { display: none; flex-shrink: 0; padding: 12px 16px; background: var(--scps-surface); border-top: 1px solid var(--scps-border); }
.scps-chat-footer.active { display: block; }
.scps-chat-footer .scps-input-wrap { max-width: 768px; margin: 0 auto; }
.scps-chat-footer .scps-input-form { gap: 12px; border-radius: 24px; padding: 6px 6px 6px 20px; }
.scps-chat-footer .scps-input-actions { gap: 12px; padding: 0 8px; }
.scps-chat-footer .scps-disclaimer { display: none; }
.scps-chat-footer .scps-act-copy { display: flex; }

/* 채팅 답변 아래 '상담 예약하기' CTA (PC/모바일 공통) */
.scps-appt-cta-inline { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0 44px; padding: 10px 16px; border-radius: 9999px; border: none; background: #1A1C20; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .2s; font-family: inherit; }
.scps-appt-cta-inline:hover { opacity: .88; }
.scps-appt-cta-inline svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   APPOINTMENT PANEL
   ============================================================ */
.scps-appointment-panel {
  position: fixed; top: 0; left: 0; height: 100%;
  width: 100%; max-width: 400px; background: #fff; z-index: 30;
  display: flex; flex-direction: column;
  box-shadow: 0 0 11px rgba(0,0,0,.08);
  transform: translateX(-100%); transition: transform .25s ease;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  letter-spacing: -0.02em;
}
.scps-appointment-panel.open { transform: translateX(0); }
.scps-appt { display: flex; flex-direction: column; height: 100%; }

/* 헤더 */
.scps-appt-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; flex-shrink: 0; border-bottom: 1px solid #ECF0F3; }
.scps-appt-title { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; color: #2A3038; margin: 0; }
.scps-appt-close { width: 33px; height: 33px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: #858A94; transition: background .15s; }
.scps-appt-close:hover { background: #F3F4F5; }

/* 바디 */
.scps-appt-body { flex: 1; overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 20px; }

/* 아코디언 */
.scps-appt-acc { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 4px 0; background: none; border: none; cursor: pointer; }
.scps-appt-acc-label { font-weight: 600; color: #2A3038; }
.scps-appt-acc-date, .scps-appt-acc-visitor { font-size: 14px; }
.scps-appt-acc-time { font-size: 13px; }
.scps-appt-chev { width: 16px; height: 16px; color: #9AA3AE; transition: transform .2s; flex-shrink: 0; }
.scps-appt-acc[aria-expanded="true"] .scps-appt-chev { transform: rotate(180deg); }
.scps-appt-acc-body.collapsed { display: none; }

/* 달력 */
.scps-cal { font-size: 13px; }
.scps-cal-nav-row { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; }
.scps-cal-nav { padding: 4px; border-radius: 6px; background: none; border: none; cursor: pointer; color: #858A94; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.scps-cal-nav:hover { background: #F3F4F5; }
.scps-cal-month { font-size: 14px; font-weight: 600; color: #2A3038; margin: 0; }
.scps-cal-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; margin-bottom: 4px; }
.scps-cal-dow { font-size: 11px; font-weight: 500; color: #858A94; }
.scps-cal-dow.sun { color: #FF3B30; }
.scps-cal-dow.sat { color: #007AFF; }
.scps-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.scps-cal-cell { width: 36px; height: 36px; margin: 0 auto; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #2A3038; background: none; border: none; cursor: pointer; transition: background .15s, box-shadow .15s, color .15s; }
.scps-cal-cell.sat { color: #007AFF; }
.scps-cal-cell:hover:not(.is-disabled):not(.is-selected):not(.is-today) { background: #F3F4F5; }
.scps-cal-cell.is-today { box-shadow: inset 0 0 0 2px #007AFF; color: #007AFF; font-weight: 600; }
.scps-cal-cell.is-selected { background: #1A1C20; color: #fff; font-weight: 600; box-shadow: none; }
.scps-cal-cell.is-disabled { cursor: not-allowed; }
.scps-cal-cell.d-weekday { color: #C7CCD3; }
.scps-cal-cell.d-sat-past { color: rgba(0,122,255,.3); }
.scps-cal-cell.d-sun-past { color: rgba(255,59,48,.3); }
.scps-cal-cell.d-sun-future { color: #FF3B30; }
.scps-cal-empty { width: 36px; height: 36px; }
.scps-cal-selected { font-size: 11px; color: #1A1C20; text-align: center; margin-top: 8px; margin-bottom: 0; }

/* 시간 그리드 */
.scps-time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.scps-time-btn { padding: 8px 0; border-radius: 6px; border: none; background: #F3F4F5; font-size: 12px; font-weight: 500; color: #545D6D; cursor: pointer; transition: background .15s, color .15s; }
.scps-time-btn:hover:not(.is-selected):not(:disabled) { background: #ECF0F3; }
.scps-time-btn.is-selected { background: #1A1C20; color: #fff; }
.scps-time-btn:disabled { background: #ECF0F3; color: #B1B3BB; cursor: not-allowed; }

/* 주의사항 */
.scps-notice-box { background: #F3F4F5; border-radius: 16px; padding: 12px; margin-top: 16px; }
.scps-notice-title { font-size: 11px; font-weight: 600; color: #545D6D; margin: 0 0 4px; }
.scps-notice-box ul { font-size: 10px; color: #858A94; list-style: disc; padding-left: 1.1em; margin: 0; }
.scps-notice-box li { line-height: 1.7; }

/* 방문자 정보 (시안: space-y-3 = 12px 균일 간격) */
.scps-appt-acc-body[data-acc-body="visitor"] { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.scps-appt-hint { font-size: 12px; color: #858A94; margin: 0; line-height: 1.5; }
.scps-appt-input { display: block; width: 100%; border: 1px solid #DDDEE2; border-radius: 4px; padding: 10px 16px; font-size: 13px; background: #fff; color: #2A3038; outline: none; transition: border-color .15s; font-family: inherit; margin: 0; }
.scps-appt-input:focus { border-color: #1A1C20; }
.scps-appt-input::placeholder { color: #9AA3AE; }
.scps-appt-select-wrap { position: relative; margin: 0; }
.scps-appt-select { appearance: none; -webkit-appearance: none; width: 100%; padding: 10px 36px 10px 16px; font-size: 13px; border: 1px solid #DDDEE2; border-radius: 4px; background: #fff; color: #2A3038; outline: none; cursor: pointer; font-family: inherit; }
.scps-appt-select:focus { border-color: #1A1C20; }
.scps-appt-select-chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #9AA3AE; pointer-events: none; }
/* 예약 요약: 회색 라운드 카드 */
.scps-appt-summary { background: #F7F8F9; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.scps-appt-summary-title { font-size: 13px; font-weight: 600; color: #2A3038; margin: 0; }
.scps-appt-summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 0; }
.scps-appt-summary-row span:first-child { color: #858A94; flex-shrink: 0; }
.scps-appt-summary-row span:last-child { color: #2A3038; font-weight: 500; text-align: right; }
.scps-appt-submit { display: block; width: 100%; margin: 0; background: #1A1C20; color: #fff; text-align: center; padding: 12px 0; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .2s; }
.scps-appt-submit:disabled { opacity: .45; cursor: not-allowed; }
.scps-appt-submit:not(:disabled):hover { opacity: .88; }

/* ============================================================
   반응형
   ============================================================ */
@media (min-width: 640px) {
  .scps-welcome { padding: 40px 24px; }
  .scps-welcome-title, .scps-welcome-subtitle { font-size: 24px; }
  .scps-welcome-desc { font-size: 12px; margin-top: 12px; }
  .scps-hero { height: 440px; }
  .scps-hero-roll-img { object-fit: contain; object-position: center; }
  .scps-login-banner { max-width: 520px; gap: 24px; }
  .scps-msg-ai-row { max-width: 82%; }
}

@media (min-width: 768px) {
  .scps-sidebar { position: static; width: var(--scps-sidebar-w); transform: none; box-shadow: none; }
  .scps-login-banner { max-width: 640px; gap: 40px; }
  .scps-appointment-panel { width: 400px; left: var(--scps-sidebar-w); }
  .scps-msg-ai-row { max-width: 720px; }
}

@media (min-width: 1024px) {
  .scps-welcome-title, .scps-welcome-subtitle { font-size: 28px; }
  .scps-topic-tags { max-width: 640px; }
  .scps-login-banner { max-width: 680px; }
  .scps-categories { grid-template-columns: repeat(6, 1fr); gap: 0 28px; }
}

/* 모바일: 사이드바 드로어 + 모바일 헤더 */
@media (max-width: 767px) {
  .scps-mobile-header { display: flex; }
  .scps-appointment-panel { width: 100%; max-width: none; left: 0; z-index: 50; }
}

/* 헤드카피 반응형 (데스크톱 34px → 태블릿/모바일 축소) */
@media (max-width: 768px) {
  #scps-chatbot-wrap .scps-roller-item { font-size: 28px !important; letter-spacing: -0.01em !important; }
}
@media (max-width: 480px) {
  #scps-chatbot-wrap .scps-roller-item { font-size: 23px !important; letter-spacing: -0.03em !important; }
}

/* ============================================================
   테마 !important 방어
   일부 테마/빌더가 p·ul·li 의 line-height/margin 을 !important 로
   강제하여 여백이 뭉개지는 문제 보정 (ID + !important 로 우선순위 확보)
   ============================================================ */
#scps-chatbot-wrap .scps-copy-headline   { line-height: 1.4 !important; margin: 0 0 10px !important; }
#scps-chatbot-wrap .scps-copy-sub        { line-height: 1.5 !important; margin: 0 !important; }
#scps-chatbot-wrap .scps-welcome-desc    { line-height: 1.5 !important; margin: 8px 0 0 !important; padding: 0 8px !important; color: #9A6898 !important; }
#scps-chatbot-wrap .scps-disclaimer      { line-height: 1.5 !important; margin: 12px 0 0 !important; }
#scps-chatbot-wrap .scps-login-banner p  { line-height: 1.5 !important; margin: 0 !important; }
#scps-chatbot-wrap .scps-suggestions-desc{ line-height: 1.5 !important; margin: 0 0 12px !important; }
#scps-chatbot-wrap .scps-panel-label     { line-height: 1.4 !important; margin: 0 0 12px !important; }
#scps-chatbot-wrap .scps-selected-date   { margin: 0 0 12px !important; }
#scps-chatbot-wrap .scps-login-required  { margin: 0 !important; }
#scps-chatbot-wrap .scps-notice-box p    { line-height: 1.4 !important; margin: 0 0 4px !important; }
#scps-chatbot-wrap .scps-notice-box ul   { margin: 0 !important; }
#scps-chatbot-wrap .scps-notice-box li   { line-height: 1.7 !important; margin: 0 !important; }
#scps-chatbot-wrap .scps-reviews-sub     { line-height: 1.6 !important; }

/* 채팅 AI 마크다운 본문 */
#scps-chatbot-wrap .scps-ai-content p              { line-height: 1.75 !important; margin: 10px 0 !important; }
#scps-chatbot-wrap .scps-ai-content p:first-child  { margin-top: 0 !important; }
#scps-chatbot-wrap .scps-ai-content p:last-child   { margin-bottom: 0 !important; }
#scps-chatbot-wrap .scps-ai-content h1             { margin: 20px 0 10px !important; line-height: 1.4 !important; }
#scps-chatbot-wrap .scps-ai-content h2             { margin: 18px 0 8px !important; line-height: 1.4 !important; }
#scps-chatbot-wrap .scps-ai-content h3             { margin: 14px 0 6px !important; line-height: 1.4 !important; }
#scps-chatbot-wrap .scps-ai-content h1:first-child,
#scps-chatbot-wrap .scps-ai-content h2:first-child { margin-top: 0 !important; }
#scps-chatbot-wrap .scps-ai-content ul,
#scps-chatbot-wrap .scps-ai-content ol             { margin: 10px 0 !important; padding-left: 20px !important; }
#scps-chatbot-wrap .scps-ai-content li             { margin: 4px 0 !important; line-height: 1.75 !important; }

@media (min-width: 640px) {
  #scps-chatbot-wrap .scps-welcome-desc { margin-top: 12px !important; }
}

/* 배너 링크: 테마의 a:hover 색(검정) 덮어쓰기 방지 → 흰색 유지 */
#scps-chatbot-wrap .scps-banner-login,
#scps-chatbot-wrap .scps-banner-login:hover,
#scps-chatbot-wrap .scps-banner-login:focus { color: #fff !important; }
#scps-chatbot-wrap .scps-banner-login:hover { opacity: .8; }

/* ============================================================
   로그인 화면 (오버레이) — 레퍼런스 /login
   ============================================================ */
.scps-login-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: var(--scps-bg); overflow-y: auto;
  align-items: center; justify-content: center; padding: 16px;
}
.scps-login-overlay.active { display: flex; }
.scps-login-inner { width: 100%; max-width: 448px; }
/* 인증 뷰 전환 */
.scps-auth-view { display: none; }
.scps-auth-view.active { display: block; }
.scps-login-logo { width: 32px; height: 32px; color: var(--scps-primary); display: block; }
.scps-login-hint { font-size: 12px; color: var(--scps-muted3); margin-top: 6px; }
.scps-login-error { font-size: 13px; color: #E5484D; text-align: center; }
.scps-login-back-link { display: block; width: 100%; text-align: center; margin-top: 16px; background: none; border: none; color: var(--scps-primary); font-size: 14px; cursor: pointer; }
.scps-login-back-link:hover { text-decoration: underline; }
.scps-login-header { text-align: center; margin-bottom: 32px; }
.scps-login-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.scps-login-brand img { height: 24px; width: auto; display: block; }
.scps-login-brand span { font-weight: 700; color: var(--scps-title); font-size: 20px; letter-spacing: -0.02em; }
.scps-login-header h1 { font-size: 24px; font-weight: 700; color: var(--scps-title); }
.scps-login-header p { font-size: 14px; color: var(--scps-muted2); margin-top: 4px; }
.scps-login-card {
  background: var(--scps-surface); border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  padding: 32px;
}
.scps-login-card form { display: flex; flex-direction: column; gap: 20px; }
.scps-login-field { display: flex; flex-direction: column; }
.scps-login-field label { font-size: 14px; font-weight: 500; color: var(--scps-text); margin-bottom: 6px; }
.scps-login-field input {
  width: 100%; padding: 12px 16px; background: var(--scps-body-bg);
  border: 1px solid transparent; border-radius: 9999px; outline: none;
  font-size: 14px; color: var(--scps-text); font-family: inherit;
}
.scps-login-field input::placeholder { color: var(--scps-placeholder); }
.scps-login-field input:focus { border-color: var(--scps-primary); }
.scps-login-row { display: flex; align-items: center; justify-content: space-between; }
.scps-login-remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #3F4756; cursor: pointer; user-select: none; }
.scps-dark .scps-login-remember { color: var(--scps-muted); }
.scps-login-remember input { width: 16px; height: 16px; accent-color: var(--scps-primary); cursor: pointer; }
.scps-login-forgot { font-size: 14px; color: var(--scps-primary); text-decoration: none; }
.scps-login-forgot:hover { text-decoration: underline; }
.scps-login-submit {
  width: 100%; background: var(--scps-primary); color: #fff; font-weight: 500;
  padding: 12px; border: none; border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); font-size: 14px; cursor: pointer;
  transition: background .15s;
}
.scps-login-submit:hover { background: var(--scps-primary-hover); }
.scps-login-signup { text-align: center; font-size: 14px; color: var(--scps-text); margin-top: 20px; }
.scps-login-signup a { color: var(--scps-primary); font-weight: 500; text-decoration: none; }
.scps-login-back { display: block; width: 100%; text-align: center; margin-top: 16px; background: none; border: none; color: var(--scps-muted2); font-size: 14px; cursor: pointer; }
.scps-login-back:hover { color: var(--scps-text); }

/* 입력창 포커스/호버 시 테마가 입히는 흰색 글로우(box-shadow)·배경·아웃라인 제거 */
#scps-chatbot-wrap .scps-textarea,
#scps-chatbot-wrap .scps-textarea:hover,
#scps-chatbot-wrap .scps-textarea:focus,
#scps-chatbot-wrap .scps-textarea:focus-visible,
#scps-chatbot-wrap .scps-textarea:active {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border: none !important;
}

/* iOS Safari 입력 포커스 시 자동 줌(확대) 방지: 입력 요소 글자 크기 16px 이상 강제 */
#scps-chatbot-wrap .scps-textarea,
#scps-chatbot-wrap .scps-appt-input,
#scps-chatbot-wrap .scps-appt-select,
#scps-chatbot-wrap .scps-login-field input,
#scps-chatbot-wrap input[type="text"],
#scps-chatbot-wrap input[type="email"],
#scps-chatbot-wrap input[type="tel"],
#scps-chatbot-wrap input[type="number"],
#scps-chatbot-wrap input[type="password"],
#scps-chatbot-wrap input[type="search"],
#scps-chatbot-wrap select,
#scps-chatbot-wrap textarea {
  font-size: 16px !important;
}

/* 전송 버튼: 테마의 submit 버튼 스타일(#333 사각형) 강제 무력화 */
#scps-chatbot-wrap button.scps-send-btn {
  background: var(--scps-primary) !important;
  background-image: none !important;
  color: #fff !important;
  width: 36px !important; height: 36px !important;
  min-width: 36px !important; max-width: 36px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 8px rgba(164,60,147,.30) !important;
  text-shadow: none !important;
}
#scps-chatbot-wrap button.scps-send-btn:hover { background: var(--scps-primary-hover) !important; }
#scps-chatbot-wrap button.scps-send-btn:disabled { opacity: .5 !important; }

/* 모바일: 입력창/전송버튼 높이 축소 */
@media (max-width: 480px) {
  #scps-chatbot-wrap .scps-input-form { padding: 8px 8px 8px 18px !important; gap: 8px !important; }
  #scps-chatbot-wrap .scps-chat-footer .scps-input-form { padding: 5px 5px 5px 16px !important; }
  #scps-chatbot-wrap .scps-textarea { padding: 2px 0 !important; font-size: 16px !important; }
  #scps-chatbot-wrap button.scps-send-btn {
    width: 30px !important; height: 30px !important;
    min-width: 30px !important; max-width: 30px !important;
  }
}

/* 예약 로그인 버튼(검정 pill)·시간/칩 버튼도 테마 submit/button 스타일 방지 */
#scps-chatbot-wrap .scps-login-cta-btn { background: #1A1C20 !important; color: #fff !important; border-radius: 9999px !important; }
#scps-chatbot-wrap button.scps-login-submit {
  background: var(--scps-primary) !important; background-image: none !important;
  color: #fff !important; border: none !important; border-radius: 9999px !important;
  width: 100% !important; min-width: 0 !important; max-width: none !important;
  padding: 12px !important; text-shadow: none !important;
}
#scps-chatbot-wrap button.scps-login-submit:hover { background: var(--scps-primary-hover) !important; }
/* 예약 패널 (시안 1:1): 테마 button/submit/select 스타일 방지 */
#scps-chatbot-wrap button.scps-time-btn { border-radius: 6px !important; background: #F3F4F5 !important; color: #545D6D !important; border: none !important; padding: 8px 0 !important; min-width: 0 !important; max-width: none !important; box-shadow: none !important; text-shadow: none !important; }
#scps-chatbot-wrap button.scps-time-btn.is-selected { background: #1A1C20 !important; color: #fff !important; }
#scps-chatbot-wrap button.scps-time-btn:disabled { background: #ECF0F3 !important; color: #B1B3BB !important; }
#scps-chatbot-wrap button.scps-appt-submit { background: #1A1C20 !important; background-image: none !important; color: #fff !important; border: none !important; border-radius: 8px !important; width: 100% !important; min-width: 0 !important; max-width: none !important; padding: 12px 0 !important; box-shadow: none !important; text-shadow: none !important; }
#scps-chatbot-wrap button.scps-appt-submit:disabled { opacity: .45 !important; }
#scps-chatbot-wrap button.scps-appt-cta-inline { background: #1A1C20 !important; background-image: none !important; color: #fff !important; border: none !important; border-radius: 9999px !important; width: auto !important; min-width: 0 !important; max-width: none !important; box-shadow: none !important; text-shadow: none !important; }
#scps-chatbot-wrap .scps-appt-input, #scps-chatbot-wrap .scps-appt-select { border-radius: 4px !important; background: #fff !important; background-image: none !important; border: 1px solid #DDDEE2 !important; box-shadow: none !important; }
#scps-chatbot-wrap .scps-appt-input:focus, #scps-chatbot-wrap .scps-appt-select:focus { border-color: #1A1C20 !important; }
#scps-chatbot-wrap button.scps-cal-cell { box-shadow: none; }
#scps-chatbot-wrap button.scps-cal-cell.is-today { box-shadow: inset 0 0 0 2px #007AFF !important; }
#scps-chatbot-wrap button.scps-cal-cell.is-selected { background: #1A1C20 !important; color: #fff !important; }

/* 예약 패널 폰트: 시안과 동일하게 Noto Sans KR 강제 (전역 Pretendard 규칙 오버라이드) */
#scps-chatbot-wrap .scps-appointment-panel,
#scps-chatbot-wrap .scps-appointment-panel * {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif !important;
}

/* ── 티맵 PC 안내 팝업 (모바일 전용 기능 안내) ── */
#scps-chatbot-wrap .scps-tmap-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; }
#scps-chatbot-wrap .scps-tmap-modal.open { display: flex; }
#scps-chatbot-wrap .scps-tmap-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s ease; }
#scps-chatbot-wrap .scps-tmap-modal.open .scps-tmap-modal-backdrop { opacity: 1; }
#scps-chatbot-wrap .scps-tmap-modal-card {
  position: relative; width: calc(100% - 48px); max-width: 320px;
  background: #fff; border-radius: 18px; padding: 36px 28px 26px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  transform: translateY(8px) scale(.96); opacity: 0;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}
#scps-chatbot-wrap .scps-tmap-modal.open .scps-tmap-modal-card { transform: translateY(0) scale(1); opacity: 1; }
#scps-chatbot-wrap .scps-tmap-modal-ico { width: 60px; height: 60px; margin: 0 auto 24px; border-radius: 50%; background: #F2F5F8; color: #2A3038; display: flex; align-items: center; justify-content: center; }
#scps-chatbot-wrap .scps-tmap-modal-title { font-size: 17px; font-weight: 700; color: #1C1C1E; margin: 0 0 18px !important; letter-spacing: -.01em; word-break: keep-all; line-height: 1.45; }
#scps-chatbot-wrap .scps-tmap-modal-desc { font-size: 13px; line-height: 20px !important; color: #6B7280; margin: 0 0 20px !important; word-break: keep-all; }
#scps-chatbot-wrap .scps-tmap-modal-actions { display: flex; flex-direction: column; gap: 10px; }
#scps-chatbot-wrap .scps-tmap-modal-copy { width: 100%; padding: 13px; border-radius: 10px; border: 1px solid #E2E5EA; background: #fff; color: #3F4756; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s; font-family: inherit; }
#scps-chatbot-wrap .scps-tmap-modal-copy:hover { background: #F7F8F9; }
#scps-chatbot-wrap .scps-tmap-modal-close { width: 100%; padding: 14px; border-radius: 10px; border: none; background: var(--scps-primary); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity .15s; font-family: inherit; }
#scps-chatbot-wrap .scps-tmap-modal-close:hover { opacity: .92; }
/* 다크모드 */
#scps-chatbot-wrap.scps-dark .scps-tmap-modal-card { background: #2C2C2E; }
#scps-chatbot-wrap.scps-dark .scps-tmap-modal-ico { background: #3A3A3C; color: #fff; }
#scps-chatbot-wrap.scps-dark .scps-tmap-modal-title { color: #fff; }
#scps-chatbot-wrap.scps-dark .scps-tmap-modal-desc { color: #A1A8B5; }
#scps-chatbot-wrap.scps-dark .scps-tmap-modal-copy { background: #2C2C2E; border-color: #3A3A3C; color: #A1A8B5; }
#scps-chatbot-wrap.scps-dark .scps-tmap-modal-copy:hover { background: #3A3A3C; }
