/* === Floating Header Scroll Behavior for Chat === */
body.chat #header,
body.chat #topnav {
	position: fixed;
	width: 100%;
	transform: translateY(0);
	transition: transform 0.5s ease;
	z-index: 200;
}

/* Mobile */
body.chat.mobile #header {
	top: 0;
	height: 40px;
}
body.chat.mobile #topnav {
	top: 40px;
	z-index: 199;
}
body.chat.mobile.hide-header #header {
	transform: translateY(-44px);
}
body.chat.mobile.hide-header #topnav {
	transform: translateY(-110%); /* 40px header + ~24px topnav */
}

/* Desktop */
body.chat.desktop #header {
	top: 0;
	height: 42px; /* Slightly smaller than forum view */
}
body.chat.desktop #topnav {
	top: 42px;
	z-index: 199;
}
body.chat.desktop.hide-header #header {
	transform: translateY(-42px); /* Matches header height */
}
body.chat.desktop.hide-header #topnav {
	transform: translateY(-42px); /* Aligns with new header height */
}

/* Prevent anchor-jump under sticky header */
body.chat [id^="L"] {
	scroll-margin-top: 80px;
}
