/* 질문 채팅 (templates/intake/_presale_chat.html) — 오른쪽 아래 버튼 하나, 누르면 창.
   홈·가이드(v2-dark.css)와 신청 화면(style.css·dark-overrides.css) 어디에 붙어도 같은 모양이다. 바탕·글자·선 색은
   그 화면의 색 변수(--c-* 또는 그 거울 --dk-*)를 따르고, 금색 단추와 입력칸은 홈·가이드에 규칙이 없어 여기서 정한다
   (값은 신청 화면에서 보이던 그대로). */
.presale { --ps-gold: #C9A84C; --ps-ink: #111D3A;
  --ps-card: var(--c-bg-card, var(--dk-bg-card, #131b2c)); --ps-card-hi: var(--c-bg-card-hi, var(--dk-bg-card-hi, #182238));
  --ps-alt: var(--c-bg-alt, var(--dk-bg-alt, #0f1626)); --ps-text: var(--c-text, var(--dk-text, #f1f5f9));
  --ps-muted: var(--c-text-secondary, var(--dk-text-secondary, #cbd5e1)); --ps-faint: var(--c-text-muted, var(--dk-text-muted, #94a3b8));
  --ps-line: var(--c-border, var(--dk-border, rgba(255,255,255,.08))); --ps-line-hi: var(--c-border-hi, var(--dk-border-hi, rgba(255,255,255,.16)));
  position: fixed; right: 16px; bottom: 16px; z-index: 50; max-width: calc(100vw - 32px); }
.presale button, .presale input { font-family: inherit; }
.presale__open { background: var(--ps-gold); color: var(--ps-ink); border: 0; border-radius: 999px; padding: 12px 18px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.presale__panel { width: 360px; max-width: 100%; max-height: min(560px, calc(100vh - 32px)); display: flex; flex-direction: column; gap: 8px; background: var(--ps-card); color: var(--ps-text); border: 1px solid var(--ps-line-hi); border-radius: 12px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: 16px; line-height: 1.65; text-align: left; }
.presale__panel[hidden] { display: none; }
.presale__open[aria-expanded="true"] { display: none; }   /* 창이 열리면 닫기(×)만 — 버튼이 창 위에 떠 있지 않게 */
.presale[data-page="result"] .presale__open { display: none; }   /* 결과 화면은 카드 안의 버튼이 연다 — 둘이면 휴대폰에서 겹친다 */
.presale__head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.presale__close { background: none; border: 0; color: var(--ps-muted); font-size: 22px; cursor: pointer; }
.presale__note { font-size: 12px; color: var(--ps-muted); margin: 0; }
.presale__log { flex: 1; overflow-y: auto; min-height: 80px; }
.presale__msg { margin: 6px 0; padding: 8px 10px; border-radius: 8px; white-space: pre-wrap; font-size: 14px; color: var(--ps-text); }
.presale__msg--me { background: var(--ps-card-hi); margin-left: 32px; }
.presale__msg--ai { background: var(--ps-alt); border: 1px solid var(--ps-line); margin-right: 32px; }
.presale__msg a { color: var(--ps-gold); text-decoration: underline; }   /* 두 화면 색 모두 a 를 본문색·밑줄 없음으로 둔다 — 링크로 보이게 */
.presale form { display: flex; gap: 6px; margin: 0; }
.presale__handoff { flex-direction: column; font-size: 13px; }
.presale__handoff[hidden] { display: none; }
.presale input { box-sizing: border-box; background: var(--ps-card-hi); color: var(--ps-text); border: 1px solid var(--ps-line-hi); border-radius: 0; padding: 14px 16px; font-size: 14.4px; }
.presale__ask input { flex: 1; min-width: 0; }
.presale__handoff input { width: 100%; margin-top: 6px; }
.presale input:focus { border-color: var(--ps-gold); outline: none; }
.presale input::placeholder { color: var(--ps-faint); }
.presale form button { background: linear-gradient(135deg, #D4B455, #C9A84C); color: #111; border: 2px solid transparent; border-radius: 8px; padding: 14px 28px; font-size: 14px; font-weight: 600; letter-spacing: .01em; cursor: pointer; box-shadow: 0 2px 8px rgba(201,168,76,.25); }
.presale__ask button:disabled { opacity: .6; cursor: default; }
/* 자격 확인 결과 카드 안의 한 줄 — 구석 버튼만으로는 못 보고 지나간다. 결과 화면(start.html)에만 있다 */
.result__chat { margin-top: 22px; font-size: .9rem; color: var(--dk-text-secondary); }
.result__chat .btn { margin-top: 10px; }
