/* 한누리 챗봇 — 사이트 스타일과 섞이지 않도록 모두 #hnc-root 아래에 둡니다 */
#hnc-root, #hnc-root * { box-sizing: border-box; }
#hnc-root {
	--hnc-ink: #1B2330;
	--hnc-sub: #5B6576;
	--hnc-line: #E1E5EC;
	--hnc-field: #C9D1DE;
	--hnc-bg: #F7F8FB;
	font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
	color: var(--hnc-ink);
	font-size: 14px;
	line-height: 1.55;
	letter-spacing: 0;
}
#hnc-root [hidden] { display: none !important; }
#hnc-root button { font-family: inherit; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; }
#hnc-root .hnc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 채팅 아이콘 */
#hnc-root .hnc-launcher {
	position: fixed; right: var(--hnc-right); bottom: var(--hnc-bottom); z-index: 2147483000;
	width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0;
	background: var(--hnc-launcher, var(--hnc-brand)); color: #fff;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 20px rgba(16, 30, 54, .25);
}
#hnc-root .hnc-launcher:focus-visible { outline: 3px solid #F2A900; outline-offset: 3px; }

/* 채팅창 (PC) */
#hnc-root .hnc-panel {
	position: fixed; right: var(--hnc-right); bottom: calc(var(--hnc-bottom) + 76px); z-index: 2147483001;
	width: 380px; height: min(620px, calc(100vh - var(--hnc-bottom) - 100px));
	background: #fff; border-radius: 16px; overflow: hidden;
	box-shadow: 0 12px 40px rgba(16, 30, 54, .18);
	display: flex; flex-direction: column;
}
#hnc-root .hnc-head { background: var(--hnc-brand); color: #fff; display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 18px; }
#hnc-root .hnc-title { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
#hnc-root .hnc-title strong { font-size: 16px; font-weight: 700; }
#hnc-root .hnc-sub { flex-basis: 100%; font-size: 12px; opacity: .9; }
#hnc-root .hnc-badge { font-size: 11px; background: #F2A900; color: #2A1E00; border-radius: 4px; padding: 1px 6px; font-weight: 700; }
#hnc-root .hnc-close { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 8px; padding: 0; }
#hnc-root .hnc-close:focus-visible { outline: 2px solid #fff; }

#hnc-root .hnc-banner { background: #FFF4E0; color: #6B4A10; font-size: 13px; padding: 8px 16px; }

#hnc-root .hnc-log { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: var(--hnc-bg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
#hnc-root .hnc-msg { max-width: 85%; padding: 10px 14px; font-size: 14px; word-break: keep-all; overflow-wrap: anywhere; white-space: pre-wrap; }
#hnc-root .hnc-bot { align-self: flex-start; background: #fff; border: 1px solid var(--hnc-line); border-radius: 4px 14px 14px 14px; }
#hnc-root .hnc-user { align-self: flex-end; background: var(--hnc-brand); color: #fff; border-radius: 14px 4px 14px 14px; }
#hnc-root .hnc-bot a { color: var(--hnc-brand); font-weight: 500; text-decoration: underline; }

#hnc-root .hnc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#hnc-root .hnc-chip { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--hnc-field); background: #fff; color: var(--hnc-brand); font-size: 13px; }
#hnc-root .hnc-chip:hover { border-color: var(--hnc-brand); }
#hnc-root .hnc-chip-on { background: var(--hnc-brand); border-color: var(--hnc-brand); color: #fff; }
#hnc-root .hnc-chip:disabled:not(.hnc-chip-on) { opacity: .5; cursor: default; }
#hnc-root .hnc-chip-line { display: block; margin-top: 8px; border-color: var(--hnc-brand); white-space: nowrap; }

#hnc-root .hnc-typing { display: flex; gap: 4px; align-items: center; }
#hnc-root .hnc-typing span { width: 6px; height: 6px; border-radius: 50%; background: #AEB7C6; animation: hnc-blink 1.2s infinite ease-in-out; }
#hnc-root .hnc-typing span:nth-child(2) { animation-delay: .2s; }
#hnc-root .hnc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes hnc-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #hnc-root .hnc-typing span { animation: none; } }

/* 접수 양식·완료 카드 */
#hnc-root .hnc-card { align-self: stretch; background: #fff; border: 1px solid var(--hnc-line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
#hnc-root .hnc-card p { margin: 0 0 4px; font-size: 13px; }
#hnc-root .hnc-lead label { font-size: 13px; font-weight: 500; color: #3A4456; margin-top: 4px; }
#hnc-root .hnc-lead input { width: 100%; height: 44px; border: 1px solid var(--hnc-field); border-radius: 10px; padding: 0 12px; font-size: 15px; font-family: inherit; color: var(--hnc-ink); background: #fff; margin: 0; }
#hnc-root .hnc-lead input:focus { outline: 2px solid var(--hnc-brand); outline-offset: 0; border-color: var(--hnc-brand); }
#hnc-root .hnc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
#hnc-root .hnc-ts:empty { display: none; }
#hnc-root .hnc-err { color: #B3261E; font-size: 13px; min-height: 0; }
#hnc-root .hnc-err:empty { display: none; }
#hnc-root .hnc-submit { height: 48px; border: 0; border-radius: 12px; background: var(--hnc-brand); color: #fff; font-size: 15px; font-weight: 700; margin-top: 6px; }
#hnc-root .hnc-submit:disabled { opacity: .6; cursor: default; }
#hnc-root .hnc-note { color: var(--hnc-sub); font-size: 12px !important; }
#hnc-root .hnc-note a { color: var(--hnc-brand); }
#hnc-root .hnc-done-title { font-weight: 700; font-size: 16px; color: #1E6B52; }
#hnc-root .hnc-done dl { display: grid; grid-template-columns: 72px 1fr; gap: 4px 8px; margin: 4px 0; }
#hnc-root .hnc-done dt { color: var(--hnc-sub); margin: 0; }
#hnc-root .hnc-done dd { margin: 0; font-weight: 500; }

/* 입력창 */
#hnc-root .hnc-input { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--hnc-line); background: #fff; margin: 0; }
#hnc-root .hnc-input input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--hnc-field); border-radius: 22px; padding: 0 16px; font-size: 15px; font-family: inherit; color: var(--hnc-ink); background: #fff; margin: 0; }
#hnc-root .hnc-input input:focus { outline: 2px solid var(--hnc-brand); outline-offset: 0; }
#hnc-root .hnc-send { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 0; padding: 0; background: var(--hnc-brand); color: #fff; display: flex; align-items: center; justify-content: center; }
#hnc-root .hnc-foot { font-size: 11px; color: var(--hnc-sub); text-align: center; padding: 0 12px 8px; background: #fff; }

/* 모바일: 전체 화면, 글자 16px (아이폰 자동 확대 방지) */
@media (max-width: 600px) {
	#hnc-root .hnc-panel { left: 0; right: 0; top: 0; bottom: auto; width: 100%; height: 100vh; height: 100dvh; border-radius: 0; }
	#hnc-root.hnc-is-open .hnc-launcher { display: none; }
	#hnc-root .hnc-launcher { width: 56px; height: 56px; }
	#hnc-root .hnc-head { padding-top: max(12px, env(safe-area-inset-top)); }
	#hnc-root .hnc-title strong { font-size: 17px; }
	#hnc-root .hnc-close { width: 48px; height: 48px; }
	#hnc-root .hnc-msg { font-size: 16px; }
	#hnc-root .hnc-chip { min-height: 40px; font-size: 15px; }
	#hnc-root .hnc-card p { font-size: 15px; }
	#hnc-root .hnc-lead label { font-size: 14px; }
	#hnc-root .hnc-lead input, #hnc-root .hnc-input input { height: 48px; font-size: 16px; }
	#hnc-root .hnc-send { width: 48px; height: 48px; }
	#hnc-root .hnc-input { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
	#hnc-root .hnc-foot { font-size: 12px; }
}
html.hnc-lock, html.hnc-lock body { overflow: hidden !important; }

/* 대기 중 움직임: 맥박 · 알림 점 · 말풍선 안내 */
#hnc-root .hnc-launcher { overflow: visible; }
#hnc-root .hnc-launcher.hnc-pulse::before,
#hnc-root .hnc-launcher.hnc-pulse::after {
	content: ""; position: absolute; inset: 0; border-radius: 50%;
	background: var(--hnc-launcher, var(--hnc-brand)); z-index: -1;
	animation: hnc-pulse 2.4s ease-out 4;
}
#hnc-root .hnc-launcher.hnc-pulse::after { animation-delay: 1.2s; }
@keyframes hnc-pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.7); opacity: 0; } }
#hnc-root .hnc-dot {
	position: absolute; top: 0; right: 0; width: 14px; height: 14px; border-radius: 50%;
	background: #F2B84B; border: 2px solid #fff; animation: hnc-pop .3s ease-out both;
}
@keyframes hnc-pop { from { transform: scale(0); } to { transform: scale(1); } }
#hnc-root .hnc-teaser {
	position: fixed; right: var(--hnc-right); bottom: calc(var(--hnc-bottom) + 76px); z-index: 2147483000;
	max-width: min(260px, calc(100vw - 32px));
	display: flex; align-items: flex-start; gap: 2px;
	background: #fff; color: var(--hnc-ink); border-radius: 14px 14px 4px 14px;
	box-shadow: 0 8px 28px rgba(16, 30, 54, .28);
	opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .35s ease;
}
#hnc-root .hnc-teaser.hnc-teaser-in { opacity: 1; transform: translateY(0); }
#hnc-root .hnc-teaser-text { flex: 1; word-break: keep-all; border: 0; background: transparent; text-align: left; padding: 12px 4px 12px 14px; font-size: 14px; line-height: 1.5; color: var(--hnc-ink); }
#hnc-root .hnc-teaser-x { width: 36px; height: 36px; flex-shrink: 0; border: 0; background: transparent; color: var(--hnc-sub); display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 8px; margin: 4px 4px 0 0; }
#hnc-root .hnc-teaser-text:focus-visible, #hnc-root .hnc-teaser-x:focus-visible { outline: 2px solid var(--hnc-brand); }
#hnc-root .hnc-link { display: inline-block; margin-top: 2px; }
@media (max-width: 600px) {
	#hnc-root .hnc-teaser { bottom: calc(var(--hnc-bottom) + 68px); }
	#hnc-root .hnc-teaser-text { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
	#hnc-root .hnc-launcher.hnc-pulse::before, #hnc-root .hnc-launcher.hnc-pulse::after { animation: none; display: none; }
	#hnc-root .hnc-teaser { transition: none; transform: none; }
	#hnc-root .hnc-dot { animation: none; }
}

/* 자격 확인 흐름 */
#hnc-root .hnc-notes { background: #FFF8EC; border-color: #F2D9A8; }
#hnc-root .hnc-notes-title { font-weight: 700; color: #7A4B00; }
#hnc-root .hnc-notes .hnc-chips { margin-top: 4px; }
#hnc-root .hnc-quote-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; color: #fff !important; margin-top: 0; }
#hnc-root .hnc-quote .hnc-chip-line { align-self: flex-start; margin-top: 4px; }
#hnc-root .hnc-label { font-size: 13px; font-weight: 500; color: #3A4456; margin-top: 4px; }
@media (max-width: 600px) { #hnc-root .hnc-label { font-size: 14px; } }
#hnc-root .hnc-step { display: block; font-size: 12px; font-weight: 700; color: var(--hnc-brand); margin-bottom: 2px; }
#hnc-root .hnc-chip-back { border-style: dashed; color: var(--hnc-sub); }
#hnc-root .hnc-chip-back:hover { border-color: var(--hnc-sub); }
#hnc-root .hnc-foot { word-break: keep-all; }
