/* Hansol AI Assistant — dark linen study theme */

:root {
	--hs-ai-bg: #121110;
	--hs-ai-card: #181614;
	--hs-ai-card-2: #1e1c19;
	--hs-ai-line: rgba(184, 166, 144, 0.16);
	--hs-ai-accent: #b8a690;
	--hs-ai-accent-2: #d8c8b2;
	--hs-ai-text: #f5f2ed;
	--hs-ai-body: #cfc8be;
	--hs-ai-muted: #8a8276;
	--hs-ai-danger: #e07a6a;
}

/* ---------- 공통 ---------- */
.hs-ai-quota {
	font-size: 13px;
	color: var(--hs-ai-muted);
	letter-spacing: .2px;
}

.hs-ai-messages {
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	scroll-behavior: smooth;
}

.hs-ai-empty {
	margin: auto;
	text-align: center;
	color: var(--hs-ai-muted);
	font-size: 14px;
	line-height: 1.8;
}

.hs-ai-msg {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.hs-ai-msg-user {
	justify-content: flex-end;
}

.hs-ai-avatar {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(184, 166, 144, 0.12);
	border: 1px solid var(--hs-ai-line);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
}

.hs-ai-hr {
	border: none;
	border-top: 1px solid rgba(184, 166, 144, 0.16);
	margin: 18px 0;
}

.hs-ai-li.hs-ai-num {
	display: block;
	margin-left: 4px;
	padding-left: 2px;
	color: #d8c8b2;
}

.hs-ai-link {
	color: #e0caa8;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.15s ease;
}

.hs-ai-link:hover {
	color: #fff;
}

.hs-ai-link i {
	font-size: 11px;
	margin-left: 2px;
	opacity: 0.8;
}

.hs-ai-suggest-chip.hs-ai-inline-chip {
	display: inline-flex;
	width: auto;
	margin: 2px 4px;
	padding: 4px 10px;
	font-size: 12.5px;
	vertical-align: middle;
}

.hs-ai-card-row {
	display: block;
	margin: 6px 0;
	padding: 8px 12px;
	border-radius: 8px;
	background: rgba(184, 166, 144, 0.08);
	border: 1px solid rgba(184, 166, 144, 0.18);
	font-size: 13.5px;
	color: #d8c8b2;
	line-height: 1.6;
}

.hs-ai-suggest-chip {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 8px 0;
	padding: 10px 14px;
	border-radius: 12px;
	border: 1px solid rgba(184, 166, 144, 0.25);
	background: linear-gradient(135deg, rgba(24, 22, 20, 0.8) 0%, rgba(30, 28, 25, 0.9) 100%);
	color: #d8c8b2;
	font-size: 13.5px;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	line-height: 1.5;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.hs-ai-suggest-chip:hover {
	border-color: rgba(201, 185, 165, 0.55);
	background: linear-gradient(135deg, rgba(35, 32, 29, 0.9) 0%, rgba(45, 41, 36, 0.95) 100%);
	color: #f5f2ed;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.hs-ai-chip-num {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(184, 166, 144, 0.18);
	color: #c9b9a5;
	font-size: 11px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.hs-ai-chip-txt {
	flex: 1 1 auto;
	word-break: break-word;
}

.hs-ai-suggest-chip i {
	flex: 0 0 auto;
	font-size: 11px;
	color: #8a8276;
	transition: transform 0.2s ease, color 0.2s ease;
}

.hs-ai-suggest-chip:hover i {
	color: #c9b9a5;
	transform: translateX(3px);
}

.hs-ai-bubble-wrap {
	position: relative;
	max-width: 82%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.hs-ai-bubble-wrap .hs-ai-bubble {
	max-width: 100%;
}

.hs-ai-copy-btn {
	margin-top: 6px;
	background: transparent;
	border: 1px solid rgba(184, 166, 144, 0.22);
	color: #9a917f;
	border-radius: 6px;
	padding: 3px 8px;
	font-size: 11.5px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: all 0.15s ease;
}

.hs-ai-copy-btn:hover {
	color: #f0e6d6;
	border-color: rgba(201, 185, 165, 0.45);
	background: rgba(184, 166, 144, 0.08);
}

.hs-ai-copy-btn i { font-size: 10.5px; }

.hs-ai-bubble {
	max-width: 78%;
	padding: 14px 16px;
	border-radius: 14px;
	font-size: 14.5px;
	line-height: 1.85;
	background: var(--hs-ai-card);
	border: 1px solid var(--hs-ai-line);
	color: var(--hs-ai-body);
	word-break: break-word;
}

.hs-ai-msg-user .hs-ai-bubble {
	background: rgba(184, 166, 144, 0.14);
	border-color: rgba(184, 166, 144, 0.28);
	color: var(--hs-ai-text);
}

.hs-ai-bubble strong { color: var(--hs-ai-text); }
.hs-ai-bubble code {
	background: rgba(184, 166, 144, 0.14);
	padding: 1px 5px;
	border-radius: 4px;
	font-size: 13px;
}
.hs-ai-pre {
	background: #0e0d0c;
	border: 1px solid var(--hs-ai-line);
	border-radius: 8px;
	padding: 12px;
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.6;
}
.hs-ai-li { display: block; padding-left: 4px; }

.hs-ai-muted { color: var(--hs-ai-muted); }
.hs-ai-error { color: var(--hs-ai-danger); }

/* ---------- 사고 중 표시 ---------- */
.hs-ai-thinking {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--hs-ai-accent-2);
	font-size: 13.5px;
	animation: hs-ai-breathe 2.4s ease-in-out infinite;
}

.hs-ai-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hs-ai-accent);
	box-shadow: 0 0 0 0 rgba(184, 166, 144, 0.5);
	animation: hs-ai-pulse 1.6s infinite;
}

@keyframes hs-ai-pulse {
	0% { box-shadow: 0 0 0 0 rgba(184, 166, 144, 0.45); }
	70% { box-shadow: 0 0 0 12px rgba(184, 166, 144, 0); }
	100% { box-shadow: 0 0 0 0 rgba(184, 166, 144, 0); }
}

@keyframes hs-ai-breathe {
	0%, 100% { opacity: .72; }
	50% { opacity: 1; }
}

/* ---------- 입력 ---------- */
.hs-ai-form {
	display: flex;
	gap: 10px;
	padding: 14px 16px 18px;
	border-top: 1px solid var(--hs-ai-line);
	background: var(--hs-ai-bg);
}

.hs-ai-form textarea {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	resize: none;
	min-height: 56px;
	max-height: 160px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--hs-ai-line);
	background: var(--hs-ai-card);
	color: var(--hs-ai-text);
	font-size: 14.5px;
	line-height: 1.6;
	outline: none;
	font-family: inherit;
}

.hs-ai-form textarea::placeholder { color: var(--hs-ai-muted); }

.hs-ai-form textarea:focus {
	border-color: rgba(184, 166, 144, 0.5);
	box-shadow: 0 0 0 2px rgba(184, 166, 144, 0.12);
}

.hs-ai-form button {
	flex: 0 0 auto;
	width: auto !important;
	min-width: 72px;
	max-width: 96px;
	white-space: nowrap;
	align-self: flex-end;
	padding: 12px 16px;
	border: none;
	border-radius: 50px;
	background: linear-gradient(135deg, #c9b9a5 0%, #b8a690 100%);
	color: #121110;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: transform .15s ease, opacity .15s ease;
}

.hs-ai-form button:hover:not(:disabled) { transform: translateY(-1px); }
.hs-ai-form button:disabled { opacity: .55; cursor: default; }

/* ---------- 대시보드 ---------- */
#hs-ai-dashboard {
	display: flex;
	gap: 20px;
	background: var(--hs-ai-bg);
	border: 1px solid var(--hs-ai-line);
	border-radius: 18px;
	overflow: hidden;
	min-height: 620px;
}

.hs-ai-side {
	flex: 0 0 260px;
	border-right: 1px solid var(--hs-ai-line);
	background: var(--hs-ai-card);
	display: flex;
	flex-direction: column;
}

.hs-ai-side-head {
	padding: 18px 18px 12px;
	font-size: 13px;
	color: var(--hs-ai-muted);
	letter-spacing: .4px;
	text-transform: uppercase;
}

.hs-ai-history {
	flex: 1;
	overflow-y: auto;
	padding: 0 10px 16px;
}

.hs-ai-history-empty {
	padding: 12px 10px;
	color: var(--hs-ai-muted);
	font-size: 13px;
	line-height: 1.7;
}

.hs-ai-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.hs-ai-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--hs-ai-line);
	background: var(--hs-ai-card-2);
}

.hs-ai-title {
	font-size: 16px;
	font-weight: 800;
	color: var(--hs-ai-text);
	letter-spacing: .2px;
}

.hs-ai-messages-main { flex: 1; }

/* ---------- 플로팅 위젯 ---------- */
.hs-ai-widget {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99990;
}

.hs-ai-launcher {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border-radius: 50px;
	border: 1px solid rgba(184, 166, 144, 0.35);
	background: rgba(24, 22, 20, 0.96);
	color: var(--hs-ai-text);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(10px);
	transition: transform .15s ease, border-color .15s ease;
}

.hs-ai-launcher:hover { transform: translateY(-2px); border-color: var(--hs-ai-accent); }
.hs-ai-launcher-icon { font-size: 17px; }

.hs-ai-drawer {
	position: fixed;
	top: 0;
	right: 0;
	width: 380px;
	max-width: 100%;
	height: 100%;
	background: var(--hs-ai-bg);
	border-left: 1px solid var(--hs-ai-line);
	box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	transform: translateX(102%);
	transition: transform .28s ease;
	z-index: 99991;
}

.hs-ai-widget.is-open .hs-ai-drawer { transform: translateX(0); }

.hs-ai-drawer-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--hs-ai-line);
	background: var(--hs-ai-card-2);
}

.hs-ai-drawer-title {
	font-size: 15px;
	font-weight: 800;
	color: var(--hs-ai-text);
}

.hs-ai-drawer-head .hs-ai-quota { margin-left: auto; }

.hs-ai-close {
	background: none;
	border: none;
	color: var(--hs-ai-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.hs-ai-close:hover { color: var(--hs-ai-text); }

.hs-ai-widget .hs-ai-messages { flex: 1; padding: 16px; }
.hs-ai-widget .hs-ai-bubble { max-width: 88%; font-size: 14px; }

@media (max-width: 782px) {
	.hs-ai-drawer { width: 90%; }
	.hs-ai-widget { right: 14px; bottom: 84px; }
	#hs-ai-dashboard { flex-direction: column; min-height: 540px; }
	.hs-ai-side {
		flex: 0 0 auto;
		border-right: none;
		border-bottom: 1px solid var(--hs-ai-line);
		max-height: 180px;
	}
	.hs-ai-bubble { max-width: 88%; }
}


/* 입력 영역이 좁을 때는 버튼을 아래로 내려 입력창 폭 확보 */
/* 이 규칙은 수업 페이지 플로팅 위젯 전용 (전용 페이지의 입력창에는 적용 금지) */
@media (max-width: 782px) {
	#hs-ai-widget .hs-ai-form { flex-wrap: wrap; }
	#hs-ai-widget .hs-ai-form textarea { flex: 1 1 100%; }
	#hs-ai-widget .hs-ai-form button { width: 100% !important; max-width: none; margin-top: 8px; }
}

/* 전용 페이지 입력창은 모바일에서도 한 줄 유지 */
@media (max-width: 900px) {
	.hs-chat-form.hs-ai-form { flex-wrap: nowrap; align-items: flex-end; }
	.hs-chat-form.hs-ai-form textarea { flex: 1 1 auto; }
	.hs-chat-form.hs-ai-form button {
		flex: 0 0 40px;
		width: 40px !important;
		min-width: 40px;
		max-width: 40px;
		margin-top: 0;
	}
}


/* 대화 기록 기능 구현 전까지 빈 사이드바를 숨겨 대화 영역을 넓게 사용 */
#hs-ai-dashboard .hs-ai-side {
	display: none;
}

/* 모델이 ## / ### 로 출력하는 소제목 */
.hs-ai-bubble .hs-ai-h {
	display: block;
	margin: 14px 0 6px;
	color: #f5f2ed;
	font-weight: 800;
	font-size: 15px;
}


/* =========================================================
   전용 페이지 (/ai-assistant/) — ChatGPT 스타일
   ========================================================= */
body.hs-chat-body {
	margin: 0;
	background: #121110;
	color: #cfc8be;
	font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
	height: 100vh;
	overflow: hidden;
}

.hs-chat-app {
	display: flex;
	height: 100vh;
}

/* 좌측 사이드바 */
.hs-chat-side {
	flex: 0 0 260px;
	background: #161513;
	border-right: 1px solid rgba(184, 166, 144, .14);
	display: flex;
	flex-direction: column;
	padding: 18px 14px;
	gap: 12px;
}

.hs-chat-brand {
	font-size: 15px;
	font-weight: 800;
	color: #f5f2ed;
	padding: 4px 6px 10px;
	letter-spacing: .2px;
}

.hs-chat-new {
	width: 100%;
	padding: 11px 14px;
	border-radius: 10px;
	border: 1px solid rgba(184, 166, 144, .3);
	background: transparent;
	color: #d8c8b2;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
}

.hs-chat-new:hover { background: rgba(184, 166, 144, .08); }

.hs-chat-history {
	flex: 1;
	overflow-y: auto;
	padding: 4px 2px;
}

.hs-chat-history-empty {
	font-size: 12.5px;
	color: #6f685e;
	padding: 10px 6px;
	line-height: 1.7;
}

.hs-chat-side-foot {
	border-top: 1px solid rgba(184, 166, 144, .12);
	padding-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hs-chat-home {
	font-size: 13px;
	color: #8a8276;
	text-decoration: none;
}

.hs-chat-home:hover { color: #b8a690; }

/* 우측 본문 */
.hs-chat-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	min-height: 0;
}

.hs-chat-topbar {
	display: none;
	padding: 14px 18px;
	border-bottom: 1px solid rgba(184, 166, 144, .12);
	background: #161513;
	align-items: center;
	justify-content: space-between;
}

.hs-chat-topbar-title { font-size: 14px; font-weight: 800; color: #f5f2ed; }

.hs-chat-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.hs-chat-messages {
	max-width: 780px;
	margin: 0 auto;
	padding: 32px 24px 24px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* 환영 화면 */
.hs-chat-welcome {
	margin: auto;
	text-align: center;
	padding: 40px 0;
	max-width: 620px;
}

.hs-chat-welcome-icon { font-size: 40px; }

.hs-chat-welcome h2 {
	font-size: 26px;
	font-weight: 900;
	color: #f5f2ed;
	margin: 14px 0 8px;
}

.hs-chat-welcome p { font-size: 14.5px; color: #8a8276; margin: 0 0 26px; }

.hs-chat-suggests {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.hs-chat-suggest {
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid rgba(184, 166, 144, .18);
	background: #181614;
	color: #cfc8be;
	font-size: 13.5px;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
	line-height: 1.5;
}

.hs-chat-suggest:hover {
	border-color: rgba(184, 166, 144, .42);
	background: #1d1b18;
	color: #f5f2ed;
}

/* 입력 영역 */
.hs-chat-composer {
	padding: 12px 24px calc(38px + env(safe-area-inset-bottom, 0px));
	background: linear-gradient(to top, #121110 55%, rgba(18, 17, 16, .85) 80%, rgba(18, 17, 16, 0));
}

.hs-chat-form.hs-ai-form {
	max-width: 780px;
	margin: 0 auto;
	background: #1b1917;
	border: 1px solid rgba(184, 166, 144, .22);
	border-radius: 18px;
	padding: 8px 8px 8px 16px;
	gap: 8px;
	align-items: flex-end;
}

.hs-chat-form.hs-ai-form textarea {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 10px 0;
	min-height: 42px;
	max-height: 200px;
	font-size: 15px;
}

.hs-chat-form.hs-ai-form textarea:focus { box-shadow: none; border: none; }

.hs-chat-form.hs-ai-form button {
	width: 40px !important;
	height: 40px;
	min-width: 40px;
	max-width: 40px;
	padding: 0;
	border-radius: 50%;
	background: #b8a690;
	color: #121110;
	font-size: 18px;
	font-weight: 900;
	line-height: 40px;
	text-align: center;
}

.hs-chat-form.hs-ai-form button:disabled { opacity: .5; }

.hs-chat-note {
	max-width: 780px;
	margin: 8px auto 0;
	text-align: center;
	font-size: 11.5px;
	color: #5f5951;
}

/* 진입 차단 화면 */
.hs-chat-gate {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.hs-chat-gate-card {
	max-width: 520px;
	width: 100%;
	background: #181614;
	border: 1px solid rgba(184, 166, 144, .18);
	border-radius: 20px;
	padding: 44px 32px;
	text-align: center;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.hs-chat-gate-icon { font-size: 44px; }

.hs-chat-gate-card h1 {
	font-size: 24px;
	font-weight: 900;
	color: #f5f2ed;
	margin: 12px 0 10px;
}

.hs-chat-gate-lead { color: #b8a690; font-weight: 700; font-size: 16px; margin: 0 0 10px; }
.hs-chat-gate-desc { color: #8a8276; font-size: 14.5px; line-height: 1.8; margin: 0 0 28px; }

.hs-chat-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.hs-chat-btn-primary,
.hs-chat-btn-ghost {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 50px;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
}

.hs-chat-btn-primary { background: linear-gradient(135deg, #c9b9a5, #b8a690); color: #121110; }
.hs-chat-btn-ghost { border: 1.5px solid rgba(184, 166, 144, .45); color: #b8a690; }

@media (max-width: 900px) {
	.hs-chat-side { display: none; }
	.hs-chat-topbar { display: flex; }
	.hs-chat-messages { padding: 20px 16px; }
	/* 하단 고정 내비게이션(약 60px) 위로 띄운다 */
	.hs-chat-composer { padding: 10px 14px calc(82px + env(safe-area-inset-bottom, 0px)); }
	.hs-chat-scroll { scroll-padding-bottom: 70px; }
	.hs-chat-suggests { grid-template-columns: 1fr; }
	.hs-chat-welcome h2 { font-size: 21px; }
}


/* 전용 페이지에서는 사이트 배경 그리드를 숨겨 채팅에 집중 */
body.hs-chat-body::before,
body.hs-chat-body::after {
	display: none !important;
}


/* =========================================================
   프리미엄 보강 + 라망(羅網) 문양
   ========================================================= */
body.hs-chat-body {
	height: 100dvh;
	background:
		radial-gradient(1200px 600px at 50% -10%, rgba(184, 166, 144, .10), transparent 70%),
		#121110;
}

.hs-chat-app {
	height: 100dvh;
	position: relative;
	z-index: 1;
}

/* 사방으로 이어지는 라망 문양 */
.hs-chat-lattice {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		repeating-linear-gradient(45deg, rgba(184, 166, 144, .085) 0 1px, transparent 1px 26px),
		repeating-linear-gradient(-45deg, rgba(184, 166, 144, .085) 0 1px, transparent 1px 26px),
		repeating-linear-gradient(45deg, rgba(184, 166, 144, .03) 0 1px, transparent 1px 130px),
		repeating-linear-gradient(-45deg, rgba(184, 166, 144, .03) 0 1px, transparent 1px 130px);
	-webkit-mask-image: radial-gradient(ellipse at 50% 35%, rgba(0,0,0,.95) 0%, rgba(0,0,0,.55) 55%, transparent 100%);
	mask-image: radial-gradient(ellipse at 50% 35%, rgba(0,0,0,.95) 0%, rgba(0,0,0,.55) 55%, transparent 100%);
	opacity: .9;
}

/* 사이드바: 하단 잘림 방지 */
.hs-chat-side {
	position: relative;
	z-index: 1;
	padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px));
	background: linear-gradient(180deg, #171614 0%, #141310 100%);
}

.hs-chat-side-foot {
	margin-bottom: 10px;
}

/* 프리미엄 회원 카드 */
.hs-chat-member {
	border: 1px solid rgba(201, 185, 165, .28);
	border-radius: 14px;
	padding: 14px 14px 13px;
	background:
		linear-gradient(150deg, rgba(184, 166, 144, .16) 0%, rgba(184, 166, 144, .04) 55%, rgba(184, 166, 144, .08) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
	margin-bottom: 4px;
}

.hs-chat-member-top {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.hs-chat-member-badge {
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: .12em;
	padding: 3px 8px;
	border-radius: 4px;
	color: #121110;
	background: linear-gradient(135deg, #efdcb9 0%, #c9b39a 50%, #b8a690 100%);
	box-shadow: 0 1px 6px rgba(201, 179, 154, .35);
}

.hs-chat-member-label {
	font-size: 11.5px;
	color: #9a917f;
	letter-spacing: .04em;
}

.hs-chat-member-name {
	font-size: 14.5px;
	font-weight: 800;
	color: #f0e6d6;
	line-height: 1.4;
}

.hs-chat-member-sub {
	font-size: 11.5px;
	color: #857c6d;
	margin-top: 3px;
}

/* 상단 얇은 금선 */
.hs-chat-main {
	position: relative;
	z-index: 1;
}

.hs-chat-topbar {
	border-bottom: 1px solid rgba(201, 185, 165, .18);
}

/* 입력창: 금빛 포커스 */
.hs-chat-form.hs-ai-form {
	background: rgba(27, 25, 23, .92);
	backdrop-filter: blur(8px);
	border-color: rgba(201, 185, 165, .22);
	transition: border-color .2s ease, box-shadow .2s ease;
}

.hs-chat-form.hs-ai-form:focus-within {
	border-color: rgba(214, 195, 168, .55);
	box-shadow: 0 0 0 3px rgba(184, 166, 144, .10), 0 8px 30px rgba(0, 0, 0, .45);
}

.hs-chat-form.hs-ai-form button {
	background: linear-gradient(135deg, #e6d4b4 0%, #c9b39a 55%, #b8a690 100%);
	box-shadow: 0 2px 10px rgba(201, 179, 154, .28);
}

/* 추천 질문 카드: 살짝 금빛 */
.hs-chat-suggest {
	background: linear-gradient(160deg, rgba(184, 166, 144, .08), rgba(24, 22, 20, .9));
	border-color: rgba(184, 166, 144, .22);
}

.hs-chat-suggest:hover {
	border-color: rgba(214, 195, 168, .5);
	box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

/* 환영 타이틀에 금빛 그라데이션 */
.hs-chat-welcome h2 {
	background: linear-gradient(180deg, #f7f1e6 0%, #d9c8ae 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* 안내 문구 등 */
.hs-chat-note { color: #6b6459; }


/* =========================================================
   상단 내비게이션 (홈페이지와 동일한 구성)
   ========================================================= */
.hs-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: 64px;
	background: rgba(18, 17, 16, .94);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(184, 166, 144, .16);
}

.hs-header-inner {
	max-width: 1320px;
	margin: 0 auto;
	height: 64px;
	padding: 0 22px;
	display: flex;
	align-items: center;
	gap: 22px;
}

.hs-logo {
	font-size: 18px;
	font-weight: 900;
	color: #f5f2ed;
	text-decoration: none;
	letter-spacing: .4px;
	white-space: nowrap;
}

.hs-nav {
	display: flex;
	align-items: center;
	gap: 22px;
}

.hs-nav a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14.5px;
	font-weight: 600;
	color: #cfc8be;
	text-decoration: none;
	transition: color .15s ease;
}

.hs-nav a:hover { color: #b8a690; }
.hs-nav a.is-active { color: #b8a690; font-weight: 800; }
.hs-nav a i { font-size: 13px; }

.hs-header-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.hs-btn-ghost {
	padding: 8px 16px;
	border-radius: 40px;
	border: 1px solid rgba(184, 166, 144, .32);
	color: #d8c8b2;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.hs-btn-ghost:hover { border-color: #b8a690; color: #f5f2ed; }

.hs-btn-primary {
	padding: 9px 18px;
	border-radius: 40px;
	background: linear-gradient(135deg, #c84332 0%, #b53828 100%);
	color: #fff;
	font-size: 13.5px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(200, 67, 50, .32);
}

.hs-menu-toggle {
	display: none;
	margin-left: auto;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	border: 1px solid rgba(184, 166, 144, .28);
	background: transparent;
	color: #d8c8b2;
	font-size: 16px;
	cursor: pointer;
}

/* 헤더 높이만큼 앱 영역 축소 */
.hs-chat-app { height: calc(100dvh - 64px); }
.hs-chat-gate { min-height: calc(100dvh - 64px); }

/* =========================================================
   사이드바 재설계
   ========================================================= */
.hs-chat-brand {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 15.5px;
	font-weight: 800;
	color: #f5f2ed;
	padding: 2px 4px 6px;
	letter-spacing: .2px;
	border-bottom: 1px solid rgba(184, 166, 144, .10);
	margin-bottom: 2px;
}

.hs-chat-brand-mark { font-size: 17px; }

.hs-chat-member { margin-top: 6px; }

.hs-chat-new {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 11px 14px;
	border-radius: 10px;
	border: 1px solid rgba(201, 185, 165, .32);
	background: linear-gradient(135deg, rgba(184, 166, 144, .16), rgba(184, 166, 144, .04));
	color: #f0e6d6;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
	font-family: inherit;
	transition: border-color .15s ease, background .15s ease;
}

.hs-chat-new:hover {
	border-color: rgba(214, 195, 168, .6);
	background: linear-gradient(135deg, rgba(184, 166, 144, .24), rgba(184, 166, 144, .07));
}

.hs-chat-new i { font-size: 12px; }

.hs-chat-history-head {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 16px;
	padding: 0 4px 8px;
	font-size: 11.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #7d7567;
	border-bottom: 1px solid rgba(184, 166, 144, .08);
}

.hs-chat-history-head i { font-size: 11px; }

.hs-chat-history { padding-top: 8px; }

.hs-chat-history-empty {
	font-size: 12.5px;
	color: #6b6459;
	padding: 6px 4px;
	line-height: 1.7;
}

.hs-chat-history-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 9px 10px;
	margin-bottom: 4px;
	border-radius: 8px;
	cursor: pointer;
	color: #cfc8be;
	transition: all 0.15s ease;
	border: 1px solid transparent;
}

.hs-chat-history-item:hover {
	background: rgba(184, 166, 144, 0.08);
	color: #f5f2ed;
}

.hs-chat-history-item.is-active {
	background: rgba(184, 166, 144, 0.14);
	border-color: rgba(184, 166, 144, 0.28);
	color: #f5f2ed;
}

.hs-chat-history-item i {
	font-size: 12px;
	margin-top: 3px;
	color: #8a8276;
	flex: 0 0 auto;
}

.hs-chat-history-item.is-active i {
	color: #c9b9a5;
}

.hs-chat-history-item-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.hs-chat-history-title {
	font-size: 12.5px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.4;
}

.hs-chat-history-date {
	font-size: 10.5px;
	color: #6b6459;
	margin-top: 2px;
}

/* 하단: 쿼터 카드 */
.hs-chat-quota-card {
	border: 1px solid rgba(201, 185, 165, .22);
	border-radius: 12px;
	padding: 11px 12px 10px;
	background: linear-gradient(160deg, rgba(184, 166, 144, .10), rgba(184, 166, 144, .02));
	margin-bottom: 10px;
}

.hs-chat-quota-top {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	color: #d8c8b2;
	font-weight: 700;
}

.hs-chat-quota-top i { color: #c9b39a; font-size: 13px; }

.hs-chat-quota-bar {
	margin-top: 8px;
	height: 4px;
	border-radius: 4px;
	background: rgba(184, 166, 144, .14);
	overflow: hidden;
}

.hs-chat-quota-fill {
	display: block;
	height: 100%;
	border-radius: 4px;
	background: linear-gradient(90deg, #8f7f66 0%, #c9b39a 60%, #efdcb9 100%);
	transition: width .4s ease;
}

.hs-chat-home {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	color: #8a8276;
	text-decoration: none;
	padding: 2px 2px;
}

.hs-chat-home i { font-size: 11px; }
.hs-chat-home:hover { color: #c9b39a; }

@media (max-width: 900px) {
	.hs-nav { display: none; }
	.hs-nav.is-open {
		display: flex;
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		padding: 8px 22px 16px;
		background: rgba(18, 17, 16, .98);
		border-bottom: 1px solid rgba(184, 166, 144, .18);
		z-index: 60;
	}
	.hs-nav.is-open a { padding: 12px 0; width: 100%; }
	.hs-menu-toggle { display: block; }
	.hs-header-actions .hs-btn-primary { display: none; }
}


.hs-chat-messages { padding-bottom: 28px; }
.hs-chat-scroll { scroll-padding-bottom: 28px; }


/* 모바일 헤더: 로고 + 햄버거만 남긴다 */
@media (max-width: 900px) {
	.hs-header-inner { padding: 0 14px; gap: 12px; }
	.hs-logo { font-size: 16px; }
	.hs-header-actions { display: none; }
	.hs-menu-toggle { display: block; margin-left: auto; }
}
