/*
 * 메디플로 강원 홈(index2.jsp) — AI 상담6 답변 모양 (2026-11-17).
 * 상담6 화면은 밝은 배경용 스타일(ai-answer-style.jsp + 관리자 답변 디자인 answerCss.do)을 쓰지만,
 * 메디플로는 영상 위 어두운 화면이라 그 스타일을 불러오지 않고 여기서 같은 클래스를 어두운 색으로 다시 그린다.
 * 클래스 출처: ai-core6.js(ai2-loading, ab-step, ab-say, ab-think, ab-loading, ai2-tscroll),
 *   answer-blocks.js(section.ab, .ab__part, table[data-role], .ab-no/.ab-name/.ab-act),
 *   answer-map.js(ai2-map), answer-fold.js(ai2-fold, ai2-tabs), answer-trace.js(ai3-trace),
 *   answer-feedback.js(ai3-fb), answer-suggest.js(ai3-sg), answer-live6.js(kp-memory, ab-ref, ab-flash),
 *   voice-input.js(kp-voice-btn, kp-voice-status)
 */

.pg_mediflo {
  --mfa_text: rgba(255, 255, 255, .9);
  --mfa_sub: rgba(255, 255, 255, .62);
  --mfa_faint: rgba(255, 255, 255, .45);
  --mfa_accent: #b8cfff;
  --mfa_accent_2: #8fb0ff;
  --mfa_line: rgba(255, 255, 255, .14);
  --mfa_line_2: rgba(255, 255, 255, .24);
  --mfa_panel: rgba(255, 255, 255, .06);
  --mfa_panel_2: rgba(255, 255, 255, .1);
  --mfa_warn: #ffb4b4;
}

/* ---------- 질문 말풍선 ---------- */
.chat_query_text { white-space: pre-wrap; word-break: break-word; }
.chat_query_spark { display: inline-block; width: 22px; height: 22px; margin-right: 8px; vertical-align: -5px; }
.chat_query_spark img { width: 100%; height: 100%; border-radius: 50%; }
.chat_query [data-role="query-pill"][data-ai-streaming]::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: mfa_caret 1s steps(2, start) infinite; }

/* ---------- 답변 본문 기본 글자 (마크다운) ---------- */
.mf_answer { min-width: 0; color: var(--mfa_text); font-size: 16px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
.mf_answer p { margin: 0 0 10px; }
.mf_answer p:last-child { margin-bottom: 0; }
.mf_answer strong, .mf_answer b { color: var(--mfa_accent); font-weight: 700; }
.mf_answer em { font-style: normal; color: var(--mfa_accent); }
.mf_answer h1, .mf_answer h2, .mf_answer h3 { margin: 22px 0 8px; color: #fff; font-size: 19px; font-weight: 800; line-height: 1.45; letter-spacing: -.03em; }
.mf_answer h4, .mf_answer h5 { margin: 16px 0 6px; color: #fff; font-size: 16px; font-weight: 700; }
.mf_answer > :first-child, .mf_answer .ab-timeline > :first-child { margin-top: 0; }
.mf_answer ul, .mf_answer ol { margin: 6px 0 12px; padding-left: 1.3em; }
.mf_answer ul { list-style: disc; }
.mf_answer ol { list-style: decimal; }
.mf_answer li { margin: 3px 0; }
.mf_answer li::marker { color: var(--mfa_accent_2); }
.mf_answer a { color: var(--mfa_accent); text-decoration: underline; text-underline-offset: 3px; }
.mf_answer a[href^="tel:"] { white-space: nowrap; font-weight: 700; text-decoration: none; }
.mf_answer hr { margin: 18px 0; border: 0; border-top: 1px solid var(--mfa_line); }
.mf_answer blockquote { margin: 12px 0; padding: 10px 16px; border-left: 3px solid var(--mfa_accent_2); background: var(--mfa_panel); }
.mf_answer code { padding: 1px 5px; border-radius: 4px; background: var(--mfa_panel_2); font-size: .92em; }
.mf_answer img { max-width: 100%; height: auto; border-radius: 8px; }
.mf_answer_status { margin: 0; color: var(--mfa_sub); font-size: 14px; }
.mf_answer_status.is_error { color: var(--mfa_warn); }

/* ---------- 블록 (answer-blocks.js) ---------- */
.mf_answer section.ab { margin: 0 0 18px; }
.mf_answer section.ab:last-child { margin-bottom: 0; }
.mf_answer .ab__part + .ab__part { margin-top: 10px; }
.mf_answer .ab__part[data-slot="head"] { color: #fff; font-weight: 700; }
.mf_answer .ab__part[data-slot="foot"],
.mf_answer .ab__part[data-slot="note"],
.mf_answer .ab__part[data-slot="hint"] { color: var(--mfa_sub); font-size: 14px; }
.mf_answer .ab__part[data-slot="count"],
.mf_answer .ab__part[data-slot="summary"] { padding: 12px 16px; border-left: 3px solid var(--mfa_accent_2); background: rgba(255, 255, 255, .07); font-size: 15px; }
/* 응급 안내 블록 */
.mf_answer section.ab[data-block="emergency-alert"] { padding: 14px 18px; border: 1px solid rgba(255, 120, 120, .45); border-radius: 12px; background: rgba(230, 57, 70, .16); }
.mf_answer section.ab[data-block="emergency-alert"] strong { color: #ffd2d2; }

/* 표 (목록·일반) */
.mf_answer .ai2-tscroll { margin: 10px 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--mfa_line); border-radius: 12px; }
.mf_answer table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.mf_answer .ai2-tscroll > table { margin: 0; }
.mf_answer th { padding: 10px 12px; border-bottom: 1px solid var(--mfa_line_2); background: rgba(255, 255, 255, .08); color: var(--mfa_sub); font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; }
.mf_answer td { padding: 12px; border-top: 1px solid var(--mfa_line); color: var(--mfa_text); vertical-align: top; word-break: keep-all; overflow-wrap: break-word; }
.mf_answer tbody tr:first-child td { border-top: 0; }
.mf_answer td:first-child, .mf_answer th:first-child { min-width: 8em; }
.mf_answer .ab-no { color: var(--mfa_accent_2); font-weight: 700; }
.mf_answer .ab-name { color: #fff; font-weight: 700; }
.mf_answer td .ai2-acts { display: block; margin-top: 6px; white-space: nowrap; }
.mf_answer td [data-action="route"],
.mf_answer td [data-action="detail"],
.mf_answer td a[href*="map.kakao.com/link/to/"],
.mf_answer td a[href^="#ai2-detail="] { display: inline-flex; align-items: center; height: 26px; margin: 0 6px 0 0; padding: 0 10px; border: 1px solid var(--mfa_line_2); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--mfa_accent); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s; }
.mf_answer td [data-action]:hover { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .14); }
/* 표 행 ↔ 지도 마커 (answer-map.js) */
.mf_answer tr.ai2-row-link { cursor: pointer; }
.mf_answer tr.ai2-row-link:hover > td, .mf_answer tr.ai2-row-link:focus-visible > td { background: rgba(255, 255, 255, .06); }
.mf_answer tr.ai2-row-link:focus-visible { outline: none; }
.mf_answer tr.ai2-row-link.is-active > td { background: rgba(255, 170, 110, .14); }
.mf_answer tr.ai2-row-link.is-active > td:first-child { box-shadow: inset 3px 0 0 #ff9a52; }
.mf_answer table.ai2-pop, .mf_answer img.ai2-pop { animation: mfa_rise .45s cubic-bezier(.2, .7, .3, 1) both; }
@media (max-width: 640px) {
  .mf_answer th, .mf_answer td { min-width: 4.5em; }
  .mf_answer td:first-child, .mf_answer th:first-child { min-width: 8em; }
}

/* ---------- 불러오는 중 · 진행 줄 (ai-core6.js) ---------- */
.ai2-loading { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--mfa_line); border-radius: 999px; background: var(--mfa_panel); color: var(--mfa_sub); font-size: 14px; font-weight: 600; }
.ai2-loading__spinner { flex: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--mfa_accent); border-radius: 50%; animation: mfa_spin .8s linear infinite; }
.ai2-loading__dots i { font-style: normal; animation: mfa_dot 1.2s infinite both; }
.ai2-loading__dots i:nth-child(2) { animation-delay: .2s; }
.ai2-loading__dots i:nth-child(3) { animation-delay: .4s; }
.ai2-loading__label--swap { display: inline-block; animation: mfa_swap .3s ease-out both; }
.mf_answer.ai2-reveal { animation: mfa_rise .45s cubic-bezier(.2, .7, .3, 1) both; }

.ab-timeline { display: flex; flex-direction: column; }
.ab-step { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; color: var(--mfa_sub); font-size: 13.5px; line-height: 1.5; }
.ab-step::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.ab-step.is-running::before { background: var(--mfa_accent); animation: mfa_dot 1.2s infinite both; }
.ab-step.is-done::before { content: "✓"; width: auto; height: auto; margin: 0 1px; border-radius: 0; background: none; color: #7ee2a8; font-size: 12px; font-weight: 700; line-height: 1; }
.ab-say { margin: 4px 0 12px; }
.ab-say > :last-child { margin-bottom: 0; }
.ab-timeline > section.ab { margin-bottom: 14px; }
.ab-timeline > section.ab.ab-rise { animation: mfa_fade .6s ease-out both; }
.ab-timeline .ab-wait { display: none !important; }
.ab-timeline .ab-in { animation: mfa_rise .55s ease-out both; }
.ab-say.is-typing > :last-child::after,
.ab-say.is-typing:empty::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: text-bottom; border-radius: 1px; background: var(--mfa_accent); animation: mfa_caret 1s steps(2, start) infinite; }
/* 찾는 과정(끝난 진행 줄 접기) */
.ab-think { margin: 0 0 12px; color: var(--mfa_sub); font-size: 13px; }
.ab-think__sum { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--mfa_line); border-radius: 999px; background: var(--mfa_panel); list-style: none; cursor: pointer; user-select: none; }
.ab-think__sum::-webkit-details-marker { display: none; }
.ab-think__sum::before { content: "✓"; color: #7ee2a8; font-size: 12px; font-weight: 700; }
.ab-think__sum::after { content: "▾"; font-size: 10px; transition: transform .15s; }
.ab-think[open] > .ab-think__sum::after { transform: rotate(180deg); }
.ab-think__list { margin: 8px 0 0; padding: 8px 12px 8px 30px; border-left: 2px solid var(--mfa_line); line-height: 1.7; list-style: disc; }
/* 목록을 불러오는 동안의 자리 (ai-core6.js makeLoader) */
.ab-loading { margin: 6px 0 16px; padding: 14px 16px; border: 1px solid var(--mfa_line); border-radius: 12px; background: var(--mfa_panel); animation: mfa_rise .35s ease-out both; }
.ab-loading__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--mfa_sub); font-size: 13px; }
.ab-loading__dots { display: inline-flex; gap: 4px; }
.ab-loading__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mfa_accent); animation: mfa_bounce 1s ease-in-out infinite; }
.ab-loading__dots i:nth-child(2) { animation-delay: .15s; }
.ab-loading__dots i:nth-child(3) { animation-delay: .3s; }
.ab-loading__bar { height: 12px; margin: 8px 0; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, .08) 25%, rgba(255, 255, 255, .16) 50%, rgba(255, 255, 255, .08) 75%); background-size: 200% 100%; animation: mfa_shimmer 1.2s linear infinite; }
.ab-loading__bar:nth-child(3) { width: 82%; }
.ab-loading__bar:nth-child(4) { width: 64%; }
.ab-loading--overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; margin: 0; border: 0; border-radius: 0; background: #1a2a52; transition: opacity .35s ease-out; }
.ab-loading--overlay .ab-loading__head { margin: 0; }
.ab-loading--overlay.is-done { opacity: 0; }
/* AI 글 속 기관 이름 → 카드·지도 위치 (answer-live6.js) */
.ab-ref { display: inline; padding: 0 2px; border: 0; border-bottom: 1px dashed var(--mfa_accent); background: none; color: var(--mfa_accent); font: inherit; font-weight: 600; cursor: pointer; }
.ab-ref:hover, .ab-ref:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.ab-flash { animation: mfa_flash 1.6s ease-out 1; }
.ab [data-ab-map]:empty { display: none; }

/* ---------- 지도 (answer-map.js): 배경지도는 밝은 그대로, 테두리만 어둡게 ---------- */
.ai2-map { position: relative; margin: 4px 0 20px; overflow: hidden; border: 1px solid var(--mfa_line_2); border-radius: 12px; background: #1a2a52; animation: mfa_fade .7s ease-out both; }
.ai2-map__canvas { width: 100%; height: 280px; }
.ai2-map__pop { position: relative; min-width: 160px; max-width: 240px; padding: 10px 28px 10px 12px; border-radius: 10px; background: #fff; box-shadow: 0 6px 20px rgba(5, 34, 105, .25); color: #263241; font-size: 12px; line-height: 1.45; }
.ai2-map__pop::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
.ai2-map__pop-name { display: block; color: #052269; font-size: 13px; font-weight: 800; }
.ai2-map__pop-cat, .ai2-map__pop-addr { display: block; color: #5b6577; }
.ai2-map__pop-tel { display: inline-block; margin: 2px 0; color: #002789; font-weight: 700; }
.ai2-map__pop-close { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: #8a93a6; font-size: 16px; line-height: 1; cursor: pointer; }
.ai2-map .ol-zoom button, .ai2-map .ol-attribution button { cursor: pointer; }
@media (max-width: 640px) { .ai2-map__canvas { height: 230px; } }

/* ---------- 건강정보 접기·탭·그림 (answer-fold.js) ---------- */
.ai2-fold { position: relative; margin: 0 0 14px; }
.ai2-fold__inner { position: relative; max-height: 7.2em; overflow: hidden; }
.ai2-fold__inner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(rgba(16, 32, 72, 0), rgba(16, 32, 72, .92)); pointer-events: none; }
.ai2-fold.is-open .ai2-fold__inner { max-height: none; }
.ai2-fold.is-open .ai2-fold__inner::after { display: none; }
.ai2-fold__btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 5px 14px; border: 1px solid var(--mfa_line_2); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--mfa_accent); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.ai2-fold__btn::after { content: "▾"; font-size: 10px; }
.ai2-fold.is-open .ai2-fold__btn::after { content: "▴"; }
.ai2-fold__btn small { color: var(--mfa_sub); font-weight: 400; }
.mf_answer h4.ai2-tabs-label { margin: 18px 0 6px; color: var(--mfa_sub); font-size: 13px; }
.ai2-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ai2-tabs button { padding: 6px 13px; border: 1px solid var(--mfa_line_2); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--mfa_text); font-size: 13px; cursor: pointer; }
.ai2-tabs button:hover { border-color: rgba(255, 255, 255, .5); }
.ai2-tabs button.is-on { border-color: #fff; background: #fff; color: #0b1f4d; font-weight: 700; }
.ai2-tab-panel { margin: 0 0 14px; padding: 6px 16px 4px; border-left: 3px solid var(--mfa_accent_2); border-radius: 0 8px 8px 0; background: var(--mfa_panel); }
.ai2-tab-panel > h3:first-child { margin-top: 8px; }
.ai2-img-btn { padding: 5px 12px; border: 1px dashed var(--mfa_line_2); border-radius: 8px; background: var(--mfa_panel); color: var(--mfa_text); font-size: 12.5px; cursor: pointer; }
img.ai2-health-img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; margin: 8px 0; border-radius: 8px; background: #fff; cursor: zoom-in; }
img.ai2-health-img.is-zoom { max-height: none; cursor: zoom-out; }

/* ---------- 검색 과정 상자 (answer-trace.js) ---------- */
.ai3-trace { margin: 4px 0 18px; border: 1px solid var(--mfa_line); border-radius: 12px; background: var(--mfa_panel); color: var(--mfa_sub); font-size: 13px; }
.ai3-trace > summary { padding: 9px 14px; color: var(--mfa_text); font-weight: 700; list-style: none; cursor: pointer; }
.ai3-trace > summary::-webkit-details-marker { display: none; }
.ai3-trace > summary::after { content: " ▾"; font-size: 10px; }
.ai3-trace[open] > summary::after { content: " ▴"; }
.ai3-trace__list { margin: 0; padding: 0 14px 4px 34px; list-style: none; }
.ai3-trace__list li { margin: 3px 0; }
.ai3-trace__err { color: var(--mfa_warn); }
.ai3-trace__meta { margin: 0; padding: 4px 14px 10px; color: var(--mfa_faint); }

/* ---------- 이어서 물어보기 (answer-suggest.js) — 퍼블리싱 시안 chat_follow 모양 ---------- */
.ai3-sg { margin: 22px 0 8px; padding-top: 18px; border-top: 1px solid var(--mfa_line); animation: mfa_fade .7s ease-out both; }
.ai3-sg__title { margin: 0 0 10px; color: #fff; font-size: 14px; font-weight: 700; }
.ai3-sg__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ai3-sg__chip { min-height: 34px; padding: 6px 14px; border: 1px solid var(--mfa_line_2); border-radius: 999px; background: rgba(255, 255, 255, .06); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.4; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.ai3-sg__chip:hover { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .14); }
.ai3-sg__chip.is-on { border-color: var(--mfa_accent); color: var(--mfa_accent); }
.ai3-sg--closing { margin-top: 16px; padding-top: 0; border-top: 0; }
.ai3-sg__closing { margin: 0 0 12px; color: var(--mfa_text); font-size: inherit; line-height: 1.75; }

/* ---------- 답변 평가 (answer-feedback.js) — 시안 chat_feedback 모양 ---------- */
.ai3-fb { margin: 14px 0 4px; color: var(--mfa_sub); font-size: 14px; animation: mfa_fade .7s ease-out both; }
.ai3-fb__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai3-fb__q { margin-right: 2px; }
.ai3-fb__vote { display: inline-grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid var(--mfa_line_2); border-radius: 50%; background: transparent; color: #fff; font-size: 17px; line-height: 1; cursor: pointer; transition: border-color .15s, background .15s; }
.ai3-fb__vote:hover, .ai3-fb__vote.is-on { border-color: #fff; background: rgba(255, 255, 255, .14); }
.ai3-fb__link { padding: 0 4px; border: 0; background: none; color: var(--mfa_accent); font-size: 13px; text-decoration: underline; cursor: pointer; }
.ai3-fb__status { color: var(--mfa_sub); font-size: 13px; }
.ai3-fb__panel { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--mfa_line); border-radius: 12px; background: var(--mfa_panel); }
.ai3-fb__title { margin: 0 0 8px; color: #fff; font-weight: 700; }
.ai3-fb__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ai3-fb__chip { padding: 4px 12px; border: 1px solid var(--mfa_line_2); border-radius: 999px; background: transparent; color: var(--mfa_text); font-size: 13px; cursor: pointer; }
.ai3-fb__chip.is-on { border-color: #fff; background: #fff; color: #0b1f4d; }
.ai3-fb__memo { width: 100%; padding: 8px 10px; border: 1px solid var(--mfa_line_2); border-radius: 8px; background: rgba(0, 0, 0, .18); color: #fff; font: inherit; resize: vertical; }
.ai3-fb__memo::placeholder { color: var(--mfa_faint); }
.ai3-fb__actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.ai3-fb__send, .ai3-fb__cancel { padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.ai3-fb__send { border: 0; background: #fff; color: #0b1f4d; font-weight: 700; }
.ai3-fb__send:disabled { opacity: .5; cursor: default; }
.ai3-fb__cancel { border: 1px solid var(--mfa_line_2); background: transparent; color: var(--mfa_text); }

/* ---------- 입력창: 답변 중 멈추기 버튼 · 흔들기 ---------- */
.ask_field { position: relative; }
.ask_submit .ask_submit_stop { display: none; }
.ask_form.is_busy .ask_submit .ask_submit_go { display: none; }
.ask_form.is_busy .ask_submit .ask_submit_stop { display: block; fill: currentColor; stroke: none; }
.ask_form.is_busy .ask_submit { background: var(--brand); }
.ask_input:disabled { cursor: not-allowed; opacity: .6; }
.ask_form.is_shake .ask_field { animation: mfa_shake .35s ease-in-out; }

/* ---------- 음성 입력 (voice-input.js, 기본 모양은 voice-input.css) ---------- */
.ask_field .kp-voice-btn { align-self: center; width: 50px; height: 50px; margin: 0; border: 1.5px solid #d4dbe8; border-radius: 50%; background: #fff; color: var(--navy); }
.ask_field .kp-voice-btn:not(:disabled):hover { border-color: var(--brand); background: #f4f7fc; }
.ask_field .kp-voice-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ask_field .kp-voice-btn.is-recording { border-color: #c0392b; background: #c0392b; color: #fff; }
.ask_field .kp-voice-status { right: 18px; bottom: calc(100% + 12px); }
.stage_wrap.is_docked .ask_field .kp-voice-btn { width: 42px; height: 42px; }

/* ---------- 기억 칩 (answer-live6.js, 입력창 위) ---------- */
.kp-memory { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0 0 12px; color: var(--mfa_sub); font-size: 13px; }
.kp-memory[hidden] { display: none; }
.kp-memory__title { color: #fff; font-weight: 700; }
.kp-memory__chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 11px; border: 1px solid var(--mfa_line_2); border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(6px); animation: mfa_fade .5s ease-out both; }
.kp-memory__chip b { color: var(--mfa_sub); font-weight: 500; }
.kp-memory__x { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; }
.kp-memory__x:hover { background: rgba(255, 255, 255, .3); }
.kp-memory__clear { border: 0; background: none; color: var(--mfa_sub); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
/* 칩이 많아도 대화창을 가리지 않게: 넓은 화면은 두 줄까지, 좁은 화면은 한 줄 가로 스크롤 */
.kp-memory { max-height: 64px; overflow-y: auto; }
.kp-memory__chip, .kp-memory__title, .kp-memory__clear { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 1024px) {
  .kp-memory { flex-wrap: nowrap; justify-content: flex-start; max-height: none; margin: 0 -4px 10px; padding: 2px 4px 4px; overflow-x: auto; overflow-y: hidden; font-size: 12.5px; scrollbar-width: none; }
  .kp-memory::-webkit-scrollbar { display: none; }
}

/* ---------- 움직임 ---------- */
@keyframes mfa_spin { to { transform: rotate(360deg); } }
@keyframes mfa_dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes mfa_bounce { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes mfa_rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mfa_fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes mfa_swap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes mfa_caret { to { visibility: hidden; } }
@keyframes mfa_shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes mfa_flash { 0%, 40% { box-shadow: 0 0 0 3px rgba(184, 207, 255, .55); background-color: rgba(184, 207, 255, .1); } 100% { box-shadow: 0 0 0 3px rgba(184, 207, 255, 0); } }
@keyframes mfa_shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  .ai2-loading__spinner, .ai2-loading__dots i, .ai2-loading__label--swap, .mf_answer.ai2-reveal, .ab-step.is-running::before,
  .ab-timeline > section.ab.ab-rise, .ab-timeline .ab-in, .ab-loading, .ab-loading__dots i, .ab-loading__bar,
  .ai2-map, .ai3-sg, .ai3-fb, .kp-memory__chip, .ab-flash, .ask_form.is_shake .ask_field,
  .ab-say.is-typing > :last-child::after, .ab-say.is-typing:empty::after,
  .chat_query [data-role="query-pill"][data-ai-streaming]::after { animation: none; }
}
