/* AI-CHAT widget (Phase 1) */
/* ───── 색상 테마 변수 ───── 런처·패널은 #svndex-aichat-root 의 자식이라 변수가 상속된다.
   기본 = 7DEX. 테마 변경 = root 에 .aichat-theme-{key} 추가(JS). 14종 = 공용 목록 svndex_widget_palette()(helper.php)와 같은 키 —
   7dex·navy·royal·blue·red·rose·pink / black·slate·gray·white·orange·green·cyan (§2026-09-28). 옛 키(violet·teal·emerald·amber)는 서버가 새 키로 읽는다.
   --ai-on = 주색 면 위 글자색 · --ai-fg* = 글자로 쓰는 주색. 보통은 주색 그대로이고, 밝은 두 테마(gray·white)만 어두운 글자로 따로 준다.
   오렌지는 면 위 글자를 흰색으로 둔다(사용자 결정 §2026-09-28 — 흰 글자 대비 1.9:1 을 알고 정했다 · 주색 #ffaa00). 흰 바탕 위 글자(--ai-fg)만 짙은 오렌지.
   --ai-dot = 런처 «Ai» 의 깜박이 점. 기본 노랑 · 그레이·화이트 = 보라 · 오렌지 = 빨강(노랑이 면에 묻힌다 · 사용자 지정). */
/* --ai-surface/--ai-text/--ai-text-soft/--ai-mute/--ai-hairline = 중립 표면·글자색(다크 오버라이드 대상) */
#svndex-aichat-root { --ai-primary: #7c3aed; --ai-primary-d: #6d28d9; --ai-primary-dd: #5b21b6; --ai-primary-ddd: #4c1d95; --ai-accent: #8b5cf6; --ai-accent-light: #a78bfa; --ai-accent-200: #c4b5fd; --ai-bg: #f7f8fa; --ai-bg-2: #faf5ff; --ai-tint: #ede9fe; --ai-border: #ddd6fe; --ai-border-2: #e9d5ff; --ai-primary-rgb: 124, 58, 237; --ai-primary-dd-rgb: 91, 33, 182; --ai-accent-light-rgb: 167, 139, 250; --ai-surface: #fff; --ai-text: #1f2937; --ai-text-soft: #374151; --ai-mute: #6b7280; --ai-hairline: #e5e7eb; --ai-on: #fff; --ai-on-rgb: 255, 255, 255; --ai-fg: var(--ai-primary); --ai-fg-d: var(--ai-primary-d); --ai-fg-dd: var(--ai-primary-dd); --ai-fg-ddd: var(--ai-primary-ddd); --ai-dot: #fde047; --ai-dot-rgb: 253, 224, 71; }
#svndex-aichat-root.aichat-theme-navy { --ai-primary: #191970; --ai-primary-d: #16165f; --ai-primary-dd: #121250; --ai-primary-ddd: #0e0e40; --ai-accent: #2d2d9e; --ai-accent-light: #7373d1; --ai-accent-200: #b3b3e6; --ai-bg-2: #f6f6fd; --ai-tint: #e8e8f8; --ai-border: #cfcff1; --ai-border-2: #cfcff1; --ai-primary-rgb: 25, 25, 112; --ai-primary-dd-rgb: 18, 18, 80; --ai-accent-light-rgb: 115, 115, 209; }
#svndex-aichat-root.aichat-theme-royal { --ai-primary: #0c2ac0; --ai-primary-d: #0a24a6; --ai-primary-dd: #081e8a; --ai-primary-ddd: #06186e; --ai-accent: #2a47d9; --ai-accent-light: #6d85ec; --ai-accent-200: #aab8f5; --ai-bg-2: #f4f6fe; --ai-tint: #e2e8fd; --ai-border: #c7d2fb; --ai-border-2: #c7d2fb; --ai-primary-rgb: 12, 42, 192; --ai-primary-dd-rgb: 8, 30, 138; --ai-accent-light-rgb: 109, 133, 236; }
#svndex-aichat-root.aichat-theme-blue { --ai-primary: #2563eb; --ai-primary-d: #1d4ed8; --ai-primary-dd: #1e40af; --ai-primary-ddd: #1e3a8a; --ai-accent: #3b82f6; --ai-accent-light: #60a5fa; --ai-accent-200: #93c5fd; --ai-bg-2: #f5f9ff; --ai-tint: #dbeafe; --ai-border: #bfdbfe; --ai-border-2: #bfdbfe; --ai-primary-rgb: 37, 99, 235; --ai-primary-dd-rgb: 30, 64, 175; --ai-accent-light-rgb: 96, 165, 250; }
#svndex-aichat-root.aichat-theme-red { --ai-primary: #b21010; --ai-primary-d: #9c0e0e; --ai-primary-dd: #850c0c; --ai-primary-ddd: #6e0a0a; --ai-accent: #dc2626; --ai-accent-light: #f87171; --ai-accent-200: #fca5a5; --ai-bg-2: #fef6f6; --ai-tint: #fee2e2; --ai-border: #fecaca; --ai-border-2: #fecaca; --ai-primary-rgb: 178, 16, 16; --ai-primary-dd-rgb: 133, 12, 12; --ai-accent-light-rgb: 248, 113, 113; }
#svndex-aichat-root.aichat-theme-rose { --ai-primary: #e51a4f; --ai-primary-d: #c91645; --ai-primary-dd: #a8123a; --ai-primary-ddd: #880f2f; --ai-accent: #f43f6a; --ai-accent-light: #fb7194; --ai-accent-200: #fda4bc; --ai-bg-2: #fff5f7; --ai-tint: #ffe4ea; --ai-border: #fecdd8; --ai-border-2: #fecdd8; --ai-primary-rgb: 229, 26, 79; --ai-primary-dd-rgb: 168, 18, 58; --ai-accent-light-rgb: 251, 113, 148; }
#svndex-aichat-root.aichat-theme-pink { --ai-primary: #dd26ad; --ai-primary-d: #c21f97; --ai-primary-dd: #a11a7e; --ai-primary-ddd: #831566; --ai-accent: #e94fbf; --ai-accent-light: #f07fd2; --ai-accent-200: #f7b3e4; --ai-bg-2: #fef5fb; --ai-tint: #fce4f5; --ai-border: #f9cbeb; --ai-border-2: #f9cbeb; --ai-primary-rgb: 221, 38, 173; --ai-primary-dd-rgb: 161, 26, 126; --ai-accent-light-rgb: 240, 127, 210; }
#svndex-aichat-root.aichat-theme-black { --ai-primary: #232323; --ai-primary-d: #1a1a1a; --ai-primary-dd: #111111; --ai-primary-ddd: #0a0a0a; --ai-accent: #404040; --ai-accent-light: #737373; --ai-accent-200: #d4d4d4; --ai-bg-2: #fafafa; --ai-tint: #f0f0f0; --ai-border: #e0e0e0; --ai-border-2: #e5e5e5; --ai-primary-rgb: 35, 35, 35; --ai-primary-dd-rgb: 17, 17, 17; --ai-accent-light-rgb: 115, 115, 115; }
#svndex-aichat-root.aichat-theme-slate { --ai-primary: #475569; --ai-primary-d: #334155; --ai-primary-dd: #1e293b; --ai-primary-ddd: #0f172a; --ai-accent: #64748b; --ai-accent-light: #94a3b8; --ai-accent-200: #cbd5e1; --ai-bg-2: #f8fafc; --ai-tint: #f1f5f9; --ai-border: #e2e8f0; --ai-border-2: #e2e8f0; --ai-primary-rgb: 71, 85, 105; --ai-primary-dd-rgb: 30, 41, 59; --ai-accent-light-rgb: 148, 163, 184; }
#svndex-aichat-root.aichat-theme-gray { --ai-primary: #d6d9dd; --ai-primary-d: #c9cdd2; --ai-primary-dd: #bcc1c7; --ai-primary-ddd: #aeb4bb; --ai-accent: #e3e6e9; --ai-accent-light: #aeb4bb; --ai-accent-200: #cfd4da; --ai-bg-2: #f8f9fa; --ai-tint: #eef0f2; --ai-border: #dde1e5; --ai-border-2: #e3e6e9; --ai-primary-rgb: 214, 217, 221; --ai-primary-dd-rgb: 188, 193, 199; --ai-accent-light-rgb: 174, 180, 187; --ai-on: #1e293b; --ai-on-rgb: 30, 41, 59; --ai-fg: #475569; --ai-fg-d: #475569; --ai-fg-dd: #334155; --ai-fg-ddd: #1e293b; --ai-dot: #7c3aed; --ai-dot-rgb: 124, 58, 237; }
#svndex-aichat-root.aichat-theme-white { --ai-primary: #ffffff; --ai-primary-d: #f1f3f5; --ai-primary-dd: #e4e7eb; --ai-primary-ddd: #d3d8de; --ai-accent: #f5f6f8; --ai-accent-light: #aeb4bb; --ai-accent-200: #d6d9dd; --ai-bg-2: #f8f9fa; --ai-tint: #f1f3f5; --ai-border: #e1e5ea; --ai-border-2: #e6e9ed; --ai-primary-rgb: 174, 180, 187; --ai-primary-dd-rgb: 148, 163, 184; --ai-accent-light-rgb: 174, 180, 187; --ai-on: #1e293b; --ai-on-rgb: 30, 41, 59; --ai-fg: #475569; --ai-fg-d: #475569; --ai-fg-dd: #334155; --ai-fg-ddd: #1e293b; --ai-dot: #7c3aed; --ai-dot-rgb: 124, 58, 237; }
#svndex-aichat-root.aichat-theme-orange { --ai-primary: #ffaa00; --ai-primary-d: #f0a000; --ai-primary-dd: #e09400; --ai-primary-ddd: #c98500; --ai-accent: #ffbb33; --ai-accent-light: #ffcc66; --ai-accent-200: #ffe0a3; --ai-bg-2: #fffaf0; --ai-tint: #fff1d6; --ai-border: #ffe2a8; --ai-border-2: #ffe2a8; --ai-primary-rgb: 255, 170, 0; --ai-primary-dd-rgb: 224, 148, 0; --ai-accent-light-rgb: 255, 204, 102; --ai-fg: #b45309; --ai-fg-d: #b45309; --ai-fg-dd: #92400e; --ai-fg-ddd: #78350f; --ai-dot: #ef4444; --ai-dot-rgb: 239, 68, 68; }
#svndex-aichat-root.aichat-theme-green { --ai-primary: #16a34a; --ai-primary-d: #15803d; --ai-primary-dd: #166534; --ai-primary-ddd: #14532d; --ai-accent: #22c55e; --ai-accent-light: #4ade80; --ai-accent-200: #86efac; --ai-bg-2: #f4fdf6; --ai-tint: #dcfce7; --ai-border: #bbf7d0; --ai-border-2: #bbf7d0; --ai-primary-rgb: 22, 163, 74; --ai-primary-dd-rgb: 22, 101, 52; --ai-accent-light-rgb: 74, 222, 128; }
#svndex-aichat-root.aichat-theme-cyan { --ai-primary: #0891b2; --ai-primary-d: #0e7490; --ai-primary-dd: #155e75; --ai-primary-ddd: #164e63; --ai-accent: #06b6d4; --ai-accent-light: #22d3ee; --ai-accent-200: #67e8f9; --ai-bg-2: #f2fcfe; --ai-tint: #cffafe; --ai-border: #a5f3fc; --ai-border-2: #a5f3fc; --ai-primary-rgb: 8, 145, 178; --ai-primary-dd-rgb: 21, 94, 117; --ai-accent-light-rgb: 34, 211, 238; }
/* 화이트 테마 = 흰 면이 흰 바탕에 묻히지 않게 선을 긋는다(런처·헤더·사용자 말풍선·전송·출처 표시). 다크에서는 --ai-border 가 어두워져 그대로 맞는다 */
#svndex-aichat-root.aichat-theme-white .svndex-aichat-launcher { box-shadow: inset 0 0 0 1px var(--ai-border), 0 8px 24px rgba(var(--ai-primary-dd-rgb), 0.35); }
#svndex-aichat-root.aichat-theme-white .svndex-aichat-header { border-bottom: 1px solid var(--ai-border); }
#svndex-aichat-root.aichat-theme-white .svndex-aichat-msg-user .svndex-aichat-msg-bubble { border: 1px solid var(--ai-border); }
#svndex-aichat-root.aichat-theme-white :is(.svndex-aichat-send, .svndex-aichat-lead button:not([type="button"]), .aichat-src-type) { box-shadow: inset 0 0 0 1px var(--ai-border); }
/* §2026-10-13 화이트 테마 강조색 = 그 사이트 대표색(브랜드 토큰 계약 --brand-color-d · 없으면 --brand-color · 둘 다 없으면 남회색).
   틀(런처·머리·바탕)은 흰색 그대로, 강조 자리(소제목 · 목록 표시 · 관련 정보 칩 · 추천 질문 · 출처 · 아래 버튼 글자)만 대표색을 옅게 쓴다.
   종전엔 강조 변수까지 회색이라 본문과 소제목·관련 정보가 구분되지 않았다(비온 실측 — 색 테마 강남과 비교).
   ⚠️ 다크는 파일 끝 공용 다크 블록(특이도가 더 높다)이 이 변수들을 전부 덮어 회색 그대로다. */
@supports (color: color-mix(in srgb, red 50%, white)) {
  #svndex-aichat-root.aichat-theme-white { --ai-em: var(--brand-color-d, var(--brand-color, #475569)); --ai-fg: color-mix(in srgb, var(--ai-em) 92%, #000); --ai-fg-d: color-mix(in srgb, var(--ai-em) 92%, #000); --ai-fg-dd: color-mix(in srgb, var(--ai-em) 85%, #000); --ai-fg-ddd: color-mix(in srgb, var(--ai-em) 72%, #000); --ai-bg-2: color-mix(in srgb, var(--ai-em) 5%, #fff); --ai-tint: color-mix(in srgb, var(--ai-em) 10%, #fff); --ai-border: color-mix(in srgb, var(--ai-em) 18%, #fff); --ai-border-2: color-mix(in srgb, var(--ai-em) 14%, #fff); --ai-accent-light: color-mix(in srgb, var(--ai-em) 45%, #fff); --ai-accent-200: color-mix(in srgb, var(--ai-em) 28%, #fff); }
}
/* 머리의 «새 채팅» 단추도 같은 강조색(흰 머리 위 회색 알약 → 대표색 글자·옅은 바탕). 다크는 종전 모양 그대로 둔다(밝은 화면에서만). */
html:not([data-theme="dark"]) #svndex-aichat-root.aichat-theme-white .svndex-aichat-newchat { color: var(--ai-fg-dd); background: var(--ai-bg-2); border-color: var(--ai-accent-200); opacity: 1; }
html:not([data-theme="dark"]) #svndex-aichat-root.aichat-theme-white .svndex-aichat-newchat:hover { background: var(--ai-tint); border-color: var(--ai-accent-light); }
.svndex-aichat-launcher, .svndex-aichat-panel { font-family: 'Pretendard', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; box-sizing: border-box; }
.svndex-aichat-launcher *, .svndex-aichat-panel * { box-sizing: border-box; }
.svndex-aichat-launcher { position: fixed; right: 12px; bottom: 20px; width: 60px; height: 60px; border-radius: 50%; border: none; background: var(--ai-primary); color: var(--ai-on); font-size: 20px; font-weight: 700; letter-spacing: 0.5px; line-height: 1; cursor: pointer; box-shadow: 0 8px 24px rgba(var(--ai-primary-dd-rgb), 0.35); z-index: 9050; display: flex; align-items: center; justify-content: center; transition: transform 0.15s ease, background 0.15s ease; font-family: 'Pretendard', system-ui, sans-serif; }
.svndex-aichat-launcher:hover { background: var(--ai-primary-d); transform: translateY(-2px); }
.svndex-aichat-launcher[aria-expanded="true"] { background: var(--ai-primary-dd); }
/* 외곽 링 펄스 (퍼지는 효과) — pseudo 2개 stagger */
.svndex-aichat-launcher::before, .svndex-aichat-launcher::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.svndex-aichat-launcher::before { border: 2px solid rgba(var(--ai-primary-rgb), 0.55); animation: aichat-ring-pulse 2.4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; }
.svndex-aichat-launcher::after { border: 2px solid rgba(var(--ai-accent-light-rgb), 0.5); animation: aichat-ring-pulse 2.4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite 1.2s; }
@keyframes aichat-ring-pulse { 0% { transform: scale(1); opacity: 0.7; } 70% { opacity: 0; } 100% { transform: scale(1.55); opacity: 0; } }
.svndex-aichat-launcher[aria-expanded="true"]::before, .svndex-aichat-launcher[aria-expanded="true"]::after { animation: none; opacity: 0; }
/* AI 텍스트 주변 채팅 데코 — 우상단 노란 활성 점 (online 느낌) */
/* AI 텍스트 = A 큰 + i 작은 + i 의 dot = 노란 블링크 (소문자 i 처럼) */
.svndex-aichat-launcher .ai-text { display: inline-flex; align-items: flex-end; }
.svndex-aichat-launcher .ai-a { font-size: 28px; line-height: 1; margin-left: -2px; margin-bottom: -0.5px; font-weight: 600; }
.svndex-aichat-launcher .ai-i { position: relative; display: inline-block; font-size: 18px; line-height: 1; padding-top: 8px; margin-left: 1px; }
.svndex-aichat-launcher .ai-i-dot { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); width: 8px; height: 8px; border-radius: 50%; background: var(--ai-dot); box-shadow: 0 0 0 2px var(--ai-primary), 0 0 8px rgba(var(--ai-dot-rgb), 0.6); animation: aichat-i-dot-blink 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes aichat-i-dot-blink { 0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); } 50% { opacity: 0.55; transform: translateX(-50%) scale(0.8); } }
@keyframes aichat-decor-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.85); } }
.svndex-aichat-panel { position: fixed; right: 12px; bottom: 20px; width: 425px; max-width: calc(100vw - 24px); height: 760px; max-height: calc(100vh - 40px); background: var(--ai-surface); border: 1px solid var(--ai-border); border-radius: 16px; box-shadow: 0 20px 50px rgba(var(--ai-primary-dd-rgb), 0.25); display: flex; flex-direction: column; overflow: hidden; z-index: 9991; /* 진입/퇴장 = opacity + transform / 확대축소 = 박스 속성(top/left/right/bottom/width/height/border-radius) 전부 transition */ opacity: 0; transform: translateY(10px) scale(.97); transform-origin: bottom right; transition: opacity .2s ease, transform .26s cubic-bezier(.16, 1, .3, 1), width .24s cubic-bezier(.16, 1, .3, 1), height .24s cubic-bezier(.16, 1, .3, 1), top .24s cubic-bezier(.16, 1, .3, 1), left .24s cubic-bezier(.16, 1, .3, 1), right .24s cubic-bezier(.16, 1, .3, 1), bottom .24s cubic-bezier(.16, 1, .3, 1), max-height .24s cubic-bezier(.16, 1, .3, 1), border-radius .24s ease; }
/* 열린 상태 = 화면에 안착 (opacity/transform transition 의 도착점) */
.svndex-aichat-panel.is-open { opacity: 1; transform: translateY(0) scale(1); }
.svndex-aichat-panel.is-expanded { width: 540px; height: calc(100vh - 24px); max-height: calc(100vh - 24px); bottom: 12px; right: 12px; }
/* panel 열림 시 = launcher 숨김 (panel 이 launcher 자리 점유) */
.svndex-aichat-launcher[aria-expanded="true"] { display: none; }
.svndex-aichat-panel[hidden] { display: none; }
/* 모션 최소화 선호 사용자 = 애니메이션 끔 (접근성) */
@media (prefers-reduced-motion: reduce) { .svndex-aichat-panel { transition: none; transform: none; } .svndex-aichat-header { animation: none; } }
/* 헤더 = 보라톤 유지 + 색이 천천히 흐르는 그라데이션(스트림 느낌). 대칭 팔레트라 이음새 없이 부드럽게 왕복. */
.svndex-aichat-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; color: var(--ai-on); background: linear-gradient(135deg, var(--ai-primary-dd), var(--ai-primary-d), var(--ai-primary), var(--ai-accent), var(--ai-primary), var(--ai-primary-d), var(--ai-primary-dd)); background-size: 220% 100%; animation: svndex-aichat-header-flow 9s ease-in-out infinite; }
@keyframes svndex-aichat-header-flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.svndex-aichat-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 20px; font-weight: 600; line-height: 1.2; }
/* 제목 텍스트 안전망 — 길어도 헤더 버튼 안 밀고 말줄임 (관리자 maxlength=12 + 이중 안전) */
.svndex-aichat-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.svndex-aichat-mode-badge { display: inline-block; margin-left: 8px; padding: 2px 6px; font-size: 10px; font-weight: 600; background: rgba(var(--ai-on-rgb), 0.2); border-radius: 4px; vertical-align: middle; }
.svndex-aichat-actions { display: inline-flex; align-items: center; gap: 2px; }
.svndex-aichat-close { background: transparent; border: 0; color: var(--ai-on); font-size: 28px; line-height: 1; cursor: pointer; padding: 6px 12px; }
.svndex-aichat-expand { background: transparent; border: 0; color: var(--ai-on); cursor: pointer; padding: 4px 6px; display: inline-flex; align-items: center; justify-content: center; opacity: .85; transition: opacity .12s ease; }
.svndex-aichat-newchat { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 24px; padding: 4px 9px; border: 1px solid rgba(var(--ai-on-rgb), 0.28); border-radius: 999px; background: rgba(var(--ai-on-rgb), 0.14); color: var(--ai-on); font-size: 11px; font-weight: 600; line-height: 1; cursor: pointer; opacity: .9; transition: background .12s ease, border-color .12s ease, opacity .12s ease; }
.svndex-aichat-expand:hover { opacity: 1; }
.svndex-aichat-newchat:hover { opacity: 1; background: rgba(var(--ai-on-rgb), 0.22); border-color: rgba(var(--ai-on-rgb), 0.42); }
.svndex-aichat-expand .ic-collapse { display: none; }
.svndex-aichat-panel.is-expanded .svndex-aichat-expand .ic-expand { display: none; }
.svndex-aichat-panel.is-expanded .svndex-aichat-expand .ic-collapse { display: inline-block; }
.svndex-aichat-body { flex: 1 1 auto; overflow-y: auto; padding: 12px 14px; background: var(--ai-bg); }
.svndex-aichat-msg { display: flex; margin: 12px 0; }
.svndex-aichat-msg-user { justify-content: flex-end; }
.svndex-aichat-msg-bot { justify-content: flex-start; flex-direction:column; align-items:flex-start; }
/* 대비가 모자라 --ai-mute(라이트 배경 대비 약 4.8:1) + 12px 로 올린다 */
.svndex-aichat-msg-time { align-self: flex-end; flex: 0 0 auto; margin: 0 6px 2px; font-size: 12px; line-height: 1; color: var(--ai-mute); white-space: nowrap; }
.svndex-aichat-msg-user .svndex-aichat-msg-time { order: 0; }
.svndex-aichat-msg-user .svndex-aichat-msg-bubble { order: 1; }
.svndex-aichat-msg-time-inline { display:block; margin:8px 0 0 auto; text-align:right; }
.svndex-aichat-msg-bubble { max-width: 80%; padding: 9px 12px; border-radius: 12px; font-size: 16px; line-height: 1.8; word-break: break-word; }
.svndex-aichat-msg-user .svndex-aichat-msg-bubble { background: var(--ai-primary); color: var(--ai-on); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble { width:100%; max-width: 100%; flex: 1 1 auto; background: var(--ai-surface); color: var(--ai-text); border: 1px solid var(--ai-border-2); border-bottom-left-radius: 4px; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble p { margin: 0 0 8px; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble p:last-child { margin-bottom: 0; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-h4 { margin: 18px 0 10px; font-size: 18px; font-weight: 700; color: var(--ai-fg-dd); line-height: 1.35; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-h4:first-child { margin-top: 0; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-h5 { margin: 14px 0 8px; font-size: 17px; font-weight: 700; color: var(--ai-fg-d); line-height: 1.35; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ul { margin: 4px 0 8px; padding-left: 24px; list-style: disc; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ul li { margin: 2px 0; line-height: 1.7; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ol { margin: 4px 0 8px; padding-left: 24px; list-style: decimal; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ol li { margin: 2px 0; line-height: 1.7; }
/* 중첩 (nested) list — Level 2 들여쓰기 + marker 차별 */
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ul .svndex-aichat-ul, .svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ol .svndex-aichat-ul { padding-left: 0; margin: 4px 0 6px 0; list-style: none; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ul .svndex-aichat-ul > li, .svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ol .svndex-aichat-ul > li { position: relative; padding-left: 14px; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ul .svndex-aichat-ul > li::before, .svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-ol .svndex-aichat-ul > li::before { content: "−"; position: absolute; left: 0; color: var(--ai-fg); font-weight: 700; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-followup-chip { display: block; width: 100%; max-width: 100%; margin: 0; padding: 7px 10px; border: 1px solid var(--ai-border); border-radius: 10px; background: var(--ai-bg-2); color: var(--ai-fg-dd); font: inherit; font-weight: 500; font-size: 15px; line-height: 1.55; text-align: left; cursor: pointer; word-break: break-word; transition: background .12s ease, border-color .12s ease; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-followup-chip:hover, .svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-followup-chip:focus-visible { outline: none; background: var(--ai-tint); border-color: var(--ai-accent-light); color: var(--ai-fg-ddd); }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble ul.svndex-aichat-ul li:has(> .svndex-aichat-followup-chip) { list-style-type: none; margin-left: -6px; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble ol.svndex-aichat-ol li:has(> .svndex-aichat-followup-chip) { list-style: none; margin-left: 0; padding-left: 0; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-followup-chip strong { font-weight: 600; color: inherit; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble strong { color: var(--ai-text); font-weight: 700; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-cite { display: inline-block; padding: 0 4px; margin: 0 1px; font-size: 13px; font-weight: 600; color: var(--ai-fg); background: var(--ai-bg); border: 1px solid var(--ai-border-2); border-radius: 3px; text-decoration: none; vertical-align: middle; }
.svndex-aichat-msg-bot .svndex-aichat-msg-bubble .svndex-aichat-cite:hover { background: var(--ai-tint); }
/* 같은 이유 — --ai-mute + 12px */
.svndex-aichat-feedback { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin:6px 0 0 2px; font-size:12px; color:var(--ai-mute); }
.svndex-aichat-feedback-label { margin-right:2px; }
.svndex-aichat-feedback-btn, .svndex-aichat-feedback-reason { border:1px solid var(--ai-border); border-radius:999px; background:var(--ai-surface); color:var(--ai-fg-d); font-size:11px; line-height:1; padding:5px 8px; cursor:pointer; }
.svndex-aichat-feedback-btn:hover, .svndex-aichat-feedback-reason:hover, .svndex-aichat-feedback-btn.is-active, .svndex-aichat-feedback-reason.is-active { background:var(--ai-tint); border-color:var(--ai-accent-light); color:var(--ai-fg-dd); }
.svndex-aichat-feedback-reasons { display:flex; flex-wrap:wrap; gap:4px; flex-basis:100%; margin-top:2px; }
.svndex-aichat-feedback-reasons[hidden] { display:none; }
/* [NB9 LOW] 2.4:1(WCAG AA 미달) → var(--ai-mute) */
.svndex-aichat-feedback-status { min-width:34px; color:var(--ai-mute); }
.svndex-aichat-typing { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; color: var(--ai-mute); }
.svndex-aichat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ai-accent-light); animation: svndex-aichat-bounce 1s infinite ease-in-out both; }
.svndex-aichat-typing span:nth-child(2) { animation-delay: 0.15s; }
.svndex-aichat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes svndex-aichat-bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }
.svndex-aichat-system-msg { display:flex; justify-content:center; margin:12px 0; }
.svndex-aichat-system-box { max-width:86%; text-align:center; color:var(--ai-mute); font-size:12px; line-height:1.55; }
.svndex-aichat-system-box p { margin:0 0 8px; }
.svndex-aichat-inline-newchat { display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:0 18px; border:0; border-radius:999px; background:#1d5fad; color:#fff; font-size:14px; font-weight:700; line-height:1; cursor:pointer; box-shadow:0 4px 10px rgba(29,95,173,.18); }
.svndex-aichat-inline-newchat:hover { background:#164f93; }
/* 대화 종료(세션 만료/비활성) 오버레이 — 본문 위 가운데 플로팅 + 뒤 메시지 블러. 헤더는 위(크리스프·닫기/새채팅 클릭 유지). */
.svndex-aichat-header { position:relative; z-index:6; }
.svndex-aichat-ended-overlay { position:absolute; inset:0; z-index:5; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(255,255,255,.28); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); animation:svndex-aichat-ended-in .18s ease; }
.svndex-aichat-ended-card { max-width:88%; text-align:center; background:var(--ai-surface); border:1px solid var(--ai-border); border-radius:14px; box-shadow:0 12px 32px rgba(0,0,0,.14); padding:22px 22px 20px; }
.svndex-aichat-ended-text { margin:0 0 14px; white-space:pre-line; font-size:14px; line-height:1.6; color:var(--ai-text-soft); font-weight:500; }
@keyframes svndex-aichat-ended-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.svndex-aichat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; background: var(--ai-bg); }
.svndex-aichat-suggestion { border: 1px solid var(--ai-accent-200); background: var(--ai-surface); color: var(--ai-fg-dd); font-size: 13px; line-height: 1.3; padding: 4px 11px; border-radius: 999px; cursor: pointer; }
.svndex-aichat-suggestion:hover { background: var(--ai-tint); }
/* 면책 문구 = 법적 고지라 노출은 하되 대화를 가리지 않게 최소 크기로 둔다. 크면 두세 줄을 차지해 답변 영역을 누른다 */
.svndex-aichat-disclaimer { font-size: 10px; color: var(--ai-mute); padding: 4px 14px 7px; background: var(--ai-bg); line-height: 1.35; opacity: .75; letter-spacing: -0.1px; }
.svndex-aichat-input { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--ai-border); background: var(--ai-surface); }
.svndex-aichat-input textarea { flex: 1 1 auto; resize: none; min-height: 56px; max-height: 112px; padding: 8px 10px; border: 1px solid var(--ai-border); border-radius: 8px; background: var(--ai-surface); color: var(--ai-text); font-size: 16px; line-height: 24px; font-family: inherit; transition: height 0.28s cubic-bezier(0.16, 1, 0.3, 1); overflow-y: auto; box-sizing: border-box; }
.svndex-aichat-input textarea:focus { outline: 2px solid rgba(var(--ai-primary-rgb), 0.35); outline-offset: 0; border-color: var(--ai-fg); }
.svndex-aichat-send { border: 0; background: var(--ai-primary); color: var(--ai-on); font-weight: 600; font-size: 13px; padding: 0 14px; border-radius: 8px; cursor: pointer; }
.svndex-aichat-send:hover { background: var(--ai-primary-d); }
.svndex-aichat-send:disabled { background: var(--ai-accent-200); cursor: not-allowed; }
.svndex-aichat-lead { display: grid; gap: 6px; padding: 10px 12px; background: var(--ai-surface); border-top: 1px solid var(--ai-tint); }
.svndex-aichat-lead[hidden] { display: none; }
.svndex-aichat-lead strong { font-size: 13px; color: var(--ai-fg-dd); }
.svndex-aichat-lead input:not([type="checkbox"]), .svndex-aichat-lead textarea { width: 100%; border: 1px solid var(--ai-border); border-radius: 8px; padding: 7px 9px; background: var(--ai-surface); color: var(--ai-text); font: inherit; font-size: 13px; }
.svndex-aichat-lead button { border: 0; border-radius: 8px; padding: 7px 10px; background: var(--ai-primary); color: var(--ai-on); font-weight: 600; cursor: pointer; }
.svndex-aichat-lead button[type="button"] { background: var(--ai-bg); color: var(--ai-fg-dd); border: 1px solid var(--ai-border); }
.svndex-aichat-lead-notice { font-size: 11px; line-height: 1.5; color: var(--ai-mute); margin: 0; }
.svndex-aichat-lead-notice a { color: var(--ai-fg); text-decoration: underline; }
.svndex-aichat-lead-agree { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--ai-text-soft); cursor: pointer; }
.svndex-aichat-lead-agree input[type="checkbox"] { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 1px; accent-color: var(--ai-fg); cursor: pointer; }
.svndex-aichat-lead-error { font-size: 12px; color: #dc2626; margin: 0; }
.svndex-aichat-lead-error[hidden] { display: none; }
.svndex-aichat-footer { display: flex; flex-wrap: nowrap; gap: 6px; padding: 8px 12px 12px; background: var(--ai-surface); border-top: 1px solid var(--ai-tint); }
/* 높이 34px 고정 = 텍스트 18 + 상하패딩 7+7 + 테두리 1+1.
   ⚠️ line-height 를 반드시 명시한다 — 미지정이면 브라우저 기본 normal(폰트 메트릭에 따라 1.15~1.25)에
      좌우돼 같은 값을 줘도 기기마다 높이가 1~2px 흔들린다. */
.svndex-aichat-footer-btn { flex: 1 1 0; min-width: 0; text-align: center; text-decoration: none; font-size: 15px; line-height: 18px; font-weight: 600; color: var(--ai-fg-dd); background: var(--ai-bg); border: 1px solid var(--ai-border); padding: 7px 10px; border-radius: 8px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svndex-aichat-footer-btn:hover { background: var(--ai-tint); }
.svndex-aichat-sources { margin: 4px 0 10px; padding: 0 4px 6px; display: flex; flex-wrap: nowrap; gap: 5px; align-items: center; font-size: 11px; color: var(--ai-mute); overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; cursor: grab; user-select: none; -webkit-user-select: none; }
.svndex-aichat-sources.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.svndex-aichat-sources:active { cursor: grabbing; }
.svndex-aichat-sources::-webkit-scrollbar { height: 4px; }
.svndex-aichat-sources::-webkit-scrollbar-track { background: transparent; }
.svndex-aichat-sources::-webkit-scrollbar-thumb { background: var(--ai-border); border-radius: 2px; }
.svndex-aichat-sources::-webkit-scrollbar-thumb:hover { background: var(--ai-accent-light); }
.svndex-aichat-sources > * { flex-shrink: 0; white-space: nowrap; }
.aichat-src-type { display:inline-block; padding:0 4px; margin-right:3px; font-size:9px; font-weight:700; line-height:1.5; color:var(--ai-on); background:var(--ai-primary); border-radius:3px; vertical-align:1px; }
.aichat-src-type.aichat-src-internal { background:#06b6d4; }
/* 파일 / 직접 텍스트 = ph 아이콘 + 병원명 */
.aichat-src-icon { font-size:13px; vertical-align:-1px; margin-right:3px; }
.aichat-src-icon.ph-file-pdf { color:#dc2626; }
.aichat-src-icon.ph-file-text { color:#475569; }
.aichat-src-icon.ph-quotes { color:var(--ai-fg); }
.aichat-src-label { vertical-align:1px; }
.svndex-aichat-sources span { font-weight: 600; color: var(--ai-fg-dd); }
.svndex-aichat-sources a, .svndex-aichat-sources em { color: var(--ai-fg-dd); background: var(--ai-surface); border: 1px solid var(--ai-border); border-radius: 999px; padding: 3px 9px; text-decoration: none; font-style: normal; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.svndex-aichat-sources em { cursor: default; opacity: .85; }
.svndex-aichat-sources a { cursor: pointer; }
.svndex-aichat-sources a:hover { background: var(--ai-tint); }
.svndex-aichat-sources em .aichat-src-icon { vertical-align: -1px; margin-right: 3px; font-size: 12px; }
.svndex-aichat-sources em .aichat-src-icon.ph-file-pdf { color: #dc2626; }
.svndex-aichat-sources em .aichat-src-icon.ph-file-text { color: #475569; }
.svndex-aichat-sources em .aichat-src-icon.ph-quotes { color: var(--ai-fg); }
.svndex-aichat-sources a.is-highlight, .svndex-aichat-sources em.is-highlight { background:var(--ai-tint); border-color:var(--ai-fg); box-shadow:0 0 0 2px rgba(var(--ai-primary-rgb),.18); }
/* ───── 버블 메시지 (런처 좌상단 말풍선) — 메인페이지 + 펼침시작 off 시 채팅 유도 ───── */
/* 긴 알약 + 그레이 보더/쉐도우(테마 연동 X) + 런처 좌측(스크롤탑은 런처 위로 이동 = 겹침 없음) + 꼬리 없음 */
.svndex-aichat-bubble { position: fixed; right: 80px; bottom: 26px; min-height: 48px; max-width: min(260px, calc(100vw - 96px)); display: flex; align-items: center; gap: 8px; background: var(--ai-surface); color: var(--ai-text); border: 1px solid var(--ai-hairline); border-radius: 999px; padding: 8px 16px; font-size: 13px; line-height: 1.45; font-weight: 500; box-shadow: 0 6px 20px rgba(17, 24, 39, 0.12); z-index: 9049; animation: svndex-aichat-bubble-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
/* 열기 버튼 = 네이티브 <button> 리셋(과거 role="button" div 시절과 동일하게 보이도록) — 닫기 버튼과 형제로 분리(중첩 interactive 회피) */
.svndex-aichat-bubble-open { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.svndex-aichat-bubble-open > span { display: block; overflow: hidden; }
.svndex-aichat-bubble-open:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
/* 닫기 = 본문 크기 + 텍스트와 나란히 (코너 절대배치 X) */
.svndex-aichat-bubble-close { flex: 0 0 auto; border: 0; background: transparent; color: var(--ai-mute); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 1px; }
.svndex-aichat-bubble-close:hover { color: var(--ai-text-soft); }
.svndex-aichat-bubble[hidden] { display: none; }
@keyframes svndex-aichat-bubble-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .svndex-aichat-bubble { animation: none; } }
@media (max-width: 760px) { .svndex-aichat-bubble { right: 76px; bottom: 22px; min-height: 44px; } }
/* 스크롤탑 (.acc-buttons) 배치 — 챗봇 런처 "위"로 세로 스택(런처 좌측 안내 버블과 겹침 회피). */
/* 데스크톱 = 런처(right 12 · 60px) 중심에 맞춰 right 18px, 런처 위 12px 띄워 bottom 92px */
body:has(.svndex-aichat-launcher) .acc-buttons { right: 18px; bottom: 92px; }
/* 모바일 = 런처(right 14 · 60px) 중심에 맞춰 right 22px, bottom 86px */
@media (max-width: 768px) { body:has(.svndex-aichat-launcher) .acc-buttons { right: 22px; bottom: 86px; } }
@media (max-width: 760px) { /* 모바일 패널은 top/bottom 을 함께 지정해 «실제 보이는 뷰포트» 를 채운다.
   bottom + height:100vh 를 섞으면 기준이 달라(visual viewport vs 주소창 포함 large viewport)
   하단 공백 + 상단 잘림이 생긴다. */ .svndex-aichat-panel { right: 8px; left: 8px; top: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; height: auto; max-height: none; } .svndex-aichat-launcher { right: 14px; bottom: 14px; } /* 확장 모드 — 모바일/태블릿 = 전체화면 (inset 0, 라운드 0, border 0) */ .svndex-aichat-panel.is-expanded { right: 0 !important; left: 0 !important; top: 0 !important; bottom: 0 !important; width: auto !important; height: auto !important; max-height: none !important; max-width: none !important; border-radius: 0 !important; border: 0 !important; } }
/* 다크모드 — 사이트 토글은 html[data-theme="dark"] 속성을 따른다(자동추종은 쓰지 않는다).
   이 모듈은 자기완결이라 core/css/darkmode.css 로 분리하지 않고 이 파일 끝에 둔다. */
/* 다크는 «테마와 무관한 공용 다크그레이» 한 벌로 고정한다.
   ⚠️ 변수 20개를 **전부** 덮어야 한다 — 일부만 덮으면 배경·글자만 어두워지고 브랜드색 계열이
      라이트 그대로 남아 어두운 바닥에 밝은 보라 테두리·칩이 얹힌다(카드·추천질문 칩·푸터가 안 읽혔다).
      색 선언의 81%가 이 변수들을 쓰므로 20개를 덮으면 그만큼이 같이 따라온다. */
html[data-theme="dark"] #svndex-aichat-root { /* 바닥·면 */ --ai-surface: #1e2024; /* 패널·말풍선 등 «떠 있는» 면 */ --ai-bg: #16181c; /* 대화 영역 바닥 */ --ai-bg-2: #23262b; /* 보조 면 — 추천질문 칩·관련정보 카드·푸터 버튼 */ --ai-tint: rgba(255, 255, 255, .055); /* 은은한 강조 배경(무채색이라 어떤 테마에도 안 튄다) */ /* 글자 */ --ai-text: #e7e9ec; --ai-text-soft: #c3c7ce; --ai-mute: #949aa3; /* 선 */ --ai-hairline: rgba(255, 255, 255, .10); --ai-border: #33373e; --ai-border-2: #3d424a; /* 주색은 다크에서 «밝게» 잡는다 — 라이트의 «점점 진해지는» 순서는 흰 바탕 글자를 전제하므로,
   그대로 옮기면 어두운 바탕에 어두운 글자가 얹혀 통째로 안 읽힌다.
   ⚠️ 이 변수들은 글자와 면 양쪽에 쓰인다. 글자에 맞춰 밝게 잡고, 면으로 쓰는 자리만 아래에서 어둡게 덮는다. */ --ai-primary: #c9ced6; --ai-primary-d: #bcc2cb; --ai-primary-dd: #d8dce2; --ai-primary-ddd: #e5e8ec; --ai-accent: #8d939d; --ai-accent-light: #767d88; --ai-accent-200: #4a4f58; /* rgba 조합용 — 위 값과 «반드시» 같은 색이어야 한다(어긋나면 그림자만 브랜드색으로 남는다) */ --ai-primary-rgb: 201, 206, 214; --ai-primary-dd-rgb: 216, 220, 226; --ai-accent-light-rgb: 118, 125, 136; /* 면 위 글자·글자 주색도 공용 회색으로 되돌린다 — 밝은 테마(gray·white·orange)가 준 어두운 글자가 다크에 남으면 안 읽힌다 */ --ai-on: #fff; --ai-on-rgb: 255, 255, 255; --ai-fg: var(--ai-primary); --ai-fg-d: var(--ai-primary-d); --ai-fg-dd: var(--ai-primary-dd); --ai-fg-ddd: var(--ai-primary-ddd); --ai-dot: #fde047; --ai-dot-rgb: 253, 224, 71; }
/* 변수를 안 쓰고 색을 직접 쓴 자리 중 «다크에서 실제로 어긋나는» 것만 덮는다.
   ⚠️ color:#fff 계열(런처·헤더·전송·사용자 말풍선)은 어두운 면 위 흰 글자라 그대로 맞다 — 과하게 덮으면 대비가 죽는다. */
/* ── 면(배경)으로 쓰는 자리 — 어두운 회색 면 + 흰 글자로 되돌린다.
   이 목록이 곧 «primary 계열을 background 로 쓰는 선택자 전부» 다. 새로 만들면 여기에 추가한다. */
html[data-theme="dark"] .svndex-aichat-launcher { background: #3b4048; }
html[data-theme="dark"] .svndex-aichat-launcher:hover { background: #454a53; }
html[data-theme="dark"] .svndex-aichat-launcher[aria-expanded="true"] { background: #2f333a; }
html[data-theme="dark"] .svndex-aichat-header { background: #2b2f36; }
html[data-theme="dark"] .svndex-aichat-msg-user .svndex-aichat-msg-bubble { background: #3b4048; }
html[data-theme="dark"] .svndex-aichat-send { background: #3b4048; }
html[data-theme="dark"] .svndex-aichat-send:hover { background: #454a53; }
html[data-theme="dark"] .svndex-aichat-lead button { background: #3b4048; }
html[data-theme="dark"] .aichat-src-type { background: #3b4048; }
html[data-theme="dark"] .svndex-aichat-ended-overlay { background: rgba(8, 9, 11, .62); }
html[data-theme="dark"] .svndex-aichat-ended-card { box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .svndex-aichat-inline-newchat { background: var(--ai-primary); }
html[data-theme="dark"] .svndex-aichat-inline-newchat:hover { background: var(--ai-accent); }
html[data-theme="dark"] .svndex-aichat-lead-error { color: #f87171; }
/* 라이트의 #dc2626 은 어두운 바닥에서 안 읽힌다 */
/* 접근성 — prefers-reduced-motion 전역 가드. ※ 반드시 이 파일 최하단(모든 규칙 뒤).
   개별 가드로는 런처 링펄스·점멸·헤더 그라데이션·타이핑 바운스를 못 덮어 !important 로 일괄 정지한다.
   duration 을 0 이 아니라 .01ms 로 두는 이유 = transitionend/animationend 를 기다리는 JS 가 멈추지 않게 하려는 표준 관용구. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
/* FOUC 가드 해제 — seo-extras.php 가 이 부품을 visibility:hidden 으로 숨겨 두고, 이 파일이 도착하면 드러낸다.
   ⚠ 이 규칙을 지우면 챗봇 위젯이 영영 안 보인다. */
.svndex-aichat-launcher, .svndex-aichat-panel { visibility: visible; }

/* 줄간격·자간·font-smoothing 은 위젯이 출고한다 — 안 정하면 사이트 body 값을 상속해 병원마다 갈린다.
   공통 기준 = line-height 1.3 · letter-spacing normal · font-smoothing auto. */
#svndex-aichat-root { line-height:1.3; }

#svndex-aichat-root { -webkit-font-smoothing:auto; -moz-osx-font-smoothing:auto; }

#svndex-aichat-root { letter-spacing:normal; }
