/* AskMind 방문자 화면 공통 레이어(디자인 개편 1단계, 2026-11-17)
   v2.css 다음에 읽는다. 색·글꼴은 v2.css 토큰(--ink·--surface·--line·--muted·--body)만 쓴다.
   고객이 바꿀 수 있는 값은 --brand(주색)·--brand-accent(강조색) 둘뿐(시연 결정 1). 기본값은 메인과 같은 검정.
   글꼴·둥글기·간격·헤더는 공통값. 이어 쓰는 화면: mind-chat(1) → 입구·패키지(2) → site.html(3). */
:root { --brand: var(--ink); --brand-accent: var(--ink); }

/* ── 헤더: 로고(메인과 같은 900) · 가운데 AI · 오른쪽 계정 ── */
.vhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 24px;
  border-bottom: 1px solid var(--soft-line); background: var(--white); }
.vhead .logo { font-size: 20px; white-space: nowrap; }
.vhead-who { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; min-width: 0; }
.vhead-who .name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.vhead-who .sub { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.vhead-right { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--muted); white-space: nowrap; }
.vhead-right a, .vhead-right button { color: var(--body); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.vhead-right a:hover, .vhead-right button:hover { color: var(--ink); }

/* ── 아바타: 주색 원 + 흰 첫 글자(사진이 있으면 사진) ── */
.vavatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--white); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; overflow: hidden; }

/* v2.css 의 .msg(상태 알림 — 기본 숨김·안쪽 여백)와 이름이 겹친다. 방문자 화면의 .msg 는 대화 한 줄이다(1-b 에서 발견:
   학자 화면 대화가 숨겨졌고, mind-chat 대화 줄에 알림용 여백이 묻었다). */
body.visitor .msg { display: flex; padding: 0; border-radius: 0; font-size: inherit; line-height: inherit; background: none; }

/* ── 대화 영역(.vchat 안): 내 질문 = 주색 말풍선, AI = 회색 면 ── */
.vchat .msg { display: flex; gap: 12px; }
.vchat .msg.user { flex-direction: row-reverse; }
.vchat .msg.user .avatar { display: none; }
.vchat .avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px;
  font-weight: 700; flex-shrink: 0; background: var(--brand); color: var(--white); overflow: hidden; }
.vchat .bubble { max-width: 72%; padding: 14px 18px; border-radius: 18px; font-size: 15px; line-height: 1.75; word-wrap: break-word; white-space: pre-wrap; }
.vchat .msg.user .bubble { background: var(--brand); color: var(--white); border-bottom-right-radius: 6px; }
.vchat .msg.assistant .bubble { background: var(--surface); color: var(--ink); border-bottom-left-radius: 6px; }
.vchat .example { min-height: 48px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font-size: 14px; text-align: left; cursor: pointer; }
.vchat .example:hover { border-color: var(--ink); }

/* 출처·신뢰도: 흰 알약형, 강조색 없음 */
.vchat .inline-sources { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vchat .inline-src-label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.vchat .source-tag { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--body); }
.vchat .reliability-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; margin-bottom: 8px; padding: 3px 10px;
  border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--body); }
.vchat .reliability-note { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* ── 카드 행동 버튼(입구·패키지 카드 공통, 디자인 2단계): 흰 알약형. 카드 전체가 링크라 span 으로 쓴다 ── */
.vgo { align-self: flex-start; margin-top: auto; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); background: var(--white); }
a:hover .vgo, a:focus-visible .vgo { border-color: var(--ink); }

/* ── 입력줄: 메인과 같은 알약형 입력 + 원형 전송 ── */
.vinput-bar { display: flex; gap: 10px; max-width: 820px; width: 100%; margin: 0 auto; padding: 12px 24px 8px; }
.vinput { flex: 1; min-height: 48px; border: 1px solid var(--line); border-radius: 24px; padding: 0 20px; font-size: 15px; color: var(--ink);
  background: var(--white); outline: none; font-family: inherit; }
.vinput:focus { border-color: var(--ink); }
.vinput::placeholder { color: var(--muted); }
.vsend { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--brand-accent); color: var(--white); display: flex;
  align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.vsend:hover { opacity: .9; }
.vsend:disabled { opacity: .4; cursor: default; }
/* 방문자 고지(.chat-notice 는 고지 문구 테스트가 지키는 기존 이름 — body.visitor 안에서만 같은 모양) */
.vnotice, body.visitor .chat-notice { max-width: 820px; width: 100%; margin: 0 auto; padding: 0 24px 14px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.vnotice a, body.visitor .chat-notice a { color: inherit; }

@media (max-width: 640px) {
  .vhead { padding: 10px 16px; }
  .vhead .logo { font-size: 18px; }
  .vhead-who .name, .vhead-who .sub { max-width: 150px; }
  .vchat .bubble { max-width: 85%; }
  .vinput-bar { padding: 12px 16px 8px; }
  .vnotice, body.visitor .chat-notice { padding: 0 16px 14px; }
}
