:root {
	--color-header: #0f6e7d;
	--color-header-deep: #0b5964;
	--color-surface: #ffffff;
	--color-bot-bubble: #e9f3f3;
	--color-user-bubble: #0f6e7d;
	--color-user-text: #ffffff;
	--color-text: #0e2530;
	--color-text-muted: #5c7580;
	--color-accent: #0f6e7d;
	--color-accent-hover: #0c5a66;
	--color-accent-muted: #8fb7bd;
	--color-warn: #a6660e;
	--color-warn-bg: #fcf1de;
	--color-warn-border: #e3a93d;
	--color-border: #dceaea;
	--color-notice-bg: #fbf6e9;
	--color-notice-text: #7a5c12;

	--font-family-base:
		-apple-system, BlinkMacSystemFont, "Hiragino Sans",
		"Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Segoe UI", sans-serif;

	--radius-bubble: 18px;
	--radius-pill: 999px;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
	font-family: var(--font-family-base);
	background: var(--color-surface);
	color: var(--color-text);
}

body {
	display: flex;
	flex-direction: column;
}

#chat-shell {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: var(--color-surface);
}

.chat-header {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: linear-gradient(
		135deg,
		var(--color-header),
		var(--color-header-deep)
	);
	color: #ffffff;
}

.chat-header .badge {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	display: flex;
	align-items: center;
	justify-content: center;
}

.chat-header .badge svg {
	width: 16px;
	height: 16px;
}

.chat-header .titles {
	line-height: 1.3;
}

.chat-header .title {
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.chat-header .subtitle {
	font-size: 11px;
	opacity: 0.82;
}

#chat {
	flex: 1;
	min-height: 0;
	height: 100%;
	width: 100%;
	border: none !important;
	border-radius: 0 !important;
}

#escalate-footer {
	flex-shrink: 0;
	padding: 0 14px 10px;
	text-align: center;
	font-size: 0.8rem;
	color: var(--color-text-muted);
	background: var(--color-surface);
	transition: all 0.2s ease;
}

#escalate-footer a {
	color: inherit;
	text-decoration: unset;
	text-underline-offset: 2px;
}

#escalate-footer.escalated {
	background: var(--color-warn-bg);
	color: var(--color-warn);
	border-top: 2px solid var(--color-warn-border);
	font-weight: 600;
	padding: 12px 14px;
}
