html, body { margin: 0; padding: 0; height: 100%; background: #0b0f14; overflow: hidden; font-family: var(--font-ui); }
canvas { position: fixed; inset: 0; display: block; width: 100vw; height: 100vh; }
[hidden] { display: none !important; }

:root {
	--font-ui: "Orbitron", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--ui-neon: #5cdcff;
	--ui-neon-soft: #2fa7c8;
	--ui-neon-fill: #1a4662;
	--ui-neon-fill-hover: #26668a;
	--ui-neon-fill-active: #14364c;
	--ui-panel-bg: #121c27;
	--ui-panel-bg-soft: #172432;
	--ui-panel-border: #2f8aa9;
	--ui-panel-glow: #103a4a;
	--ui-input-bg: #0f1a24;
	--ui-input-border: #3a97b6;
	--ui-scrollbar-thumb: #5ffff0;
	--ui-scrollbar-track: #10212d;
	--ui-cut-panel: 12px;
	--ui-cut-small: 8px;
	--ui-cut: 12px;
	--brand-logo-stroke: rgba(214, 168, 255, 0.98);
	--brand-logo-shadow: rgba(101, 36, 157, 0.78);
	--menu-wordmark-top-gap: clamp(16px, 3.2vh, 34px);
	--menu-wordmark-height-estimate: clamp(56px, 7.4vw, 102px);
	--chat-panel-width: min(360px, calc(100vw - 86px));
}

:is(.friends-section-list, .friends-search-results, .dm-team-players) {
	scrollbar-color: var(--ui-scrollbar-thumb) var(--ui-scrollbar-track);
	scrollbar-width: thin;
}

:is(.friends-section-list, .friends-search-results, .dm-team-players)::-webkit-scrollbar {
	width: 15px;
	height: 15px;
}

:is(.friends-section-list, .friends-search-results, .dm-team-players)::-webkit-scrollbar-track {
	background: var(--ui-scrollbar-track);
}

:is(.friends-section-list, .friends-search-results, .dm-team-players)::-webkit-scrollbar-thumb {
	background: var(--ui-scrollbar-thumb);
	border: 3px solid var(--ui-scrollbar-track);
}

:is(.friends-section-list, .friends-search-results, .dm-team-players)::-webkit-scrollbar-corner {
	background: var(--ui-scrollbar-track);
}

/* Grid layer (behind gameplay) */
#grid {
	z-index: 0;
	pointer-events: none;
}

/* Main gameplay canvas */
#c {
	z-index: 1;
}
.hud { position: fixed; left: 0; right: 0; bottom: 12px; padding: 0 12px; pointer-events: none; font-family: var(--font-ui); z-index: 4; }
.hud-frame { width: min(860px, 92vw); margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.hud-bars { display: flex; flex-direction: row; justify-content: space-between; align-items: flex-end; width: 100%; margin: 0 auto; }
.barWrap { width: 40%; flex: 0 0 40%; max-width: 40%; min-width: 0; display: block; }
.barWrap-health { text-align: left; }
.barWrap-stamina { text-align: right; }
.label { font-size: 12px; color: rgba(255,255,255,0.8); margin: 0; }
.label-inside {
	position: absolute;
	left: 0;
	top: -8px;
	font-size: 14px;
	line-height: 1.1;
	letter-spacing: 0.2px;
	color: rgba(235,245,255,0.92);
	user-select: none;
	pointer-events: none;
	z-index: 2;
}
.label-meta {
	position: absolute;
	top: 4px;
	font-size: 11px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0.9px;
	text-transform: uppercase;
	user-select: none;
	pointer-events: none;
	z-index: 2;
}
.label-meta-health { right: 0; color: #9fd5ea; }
.label-meta-stamina { left: 0; color: #e0bc8a; }
.bar {
	position: relative;
	width: 100%;
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: visible;
}
.bar-health {
	height: 44px;
}
.fill-health {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 24px;
	display: grid;
	grid-template-columns: repeat(25, minmax(0, 1fr));
	gap: 1px;
}
.hp-segment {
	--hp-fill: 0%;
	position: relative;
	background: #1e4e6a;
	border: 0;
	clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
	overflow: hidden;
}
.hp-segment-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: var(--hp-fill);
	background: #72e1ff;
}
.hp-segment.is-on {
	background: #1e4e6a;
}
.bar-stamina {
	height: 44px;
	background: transparent;
}
.fill-stamina {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 24px;
	display: grid;
	grid-template-columns: repeat(25, minmax(0, 1fr));
	gap: 1px;
}
.st-segment {
	--st-fill: 0%;
	position: relative;
	background: #4b3620;
	border: 0;
	clip-path: polygon(0 0, 88% 0, 100% 100%, 12% 100%);
	overflow: hidden;
}
.st-segment-fill {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: var(--st-fill);
	background: #d99a3a;
}
.st-segment.is-on {
	background: #4b3620;
}
.label-inside-stamina {
	left: auto;
	right: 0;
	transform: none;
}
#hpLabel,
#stLabel {
	top: -16px;
	font-size: 32px;
	font-weight: 800;
	text-shadow: -1px -1px 0 rgba(0,0,0,0.88), 1px -1px 0 rgba(0,0,0,0.88), -1px 1px 0 rgba(0,0,0,0.88), 1px 1px 0 rgba(0,0,0,0.88);
}
#hpLabel { color: #c6ebfb; }
#hpLabel .hp-max {
	font-size: 0.64em;
}
#stLabel { text-align: right; color: #f2d4a4; }
#stLabel .st-max {
	font-size: 0.64em;
}

.hotbar {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 3px;
	width: 100%;
	margin: 0 auto;
	pointer-events: auto;
}
.hotbar-slot {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 0;
	background: #111b26;
	border: 1px solid #2a7088;
	box-shadow: 0 0 0 1px #0a121a inset;
	display: grid;
	place-items: stretch;
	color: rgba(255,255,255,0.78);
	box-sizing: border-box;
	cursor: pointer;
}
.hotbar-slot.selected {
	background: #1e4e6a;
	border-color: #72e1ff;
	box-shadow: 0 0 0 1px #0a121a inset;
	color: rgba(255,255,255,0.95);
}
.hotbar-slot kbd {
	position: absolute;
	left: 3px;
	top: 2px;
	background: transparent;
	border: 0;
	width: auto;
	height: auto;
	padding: 0;
	border-radius: 0;
	display: block;
	font: 600 9px/1 var(--font-ui);
	color: rgba(220,235,250,0.82);
	letter-spacing: 0;
	pointer-events: none;
}

.hotbar-item {
	align-self: center;
	justify-self: center;
	font: 700 11px/1 var(--font-ui);
	letter-spacing: 0.2px;
	color: rgba(255,255,255,0.80);
	user-select: none;
	pointer-events: none;
}

.hint { position: fixed; top: 18px; left: 12px; color: rgba(255,255,255,0.92); font: 12px/1.3 var(--font-ui); user-select: none; z-index: 11; text-shadow: 0 2px 4px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,0.95); }
.hint.is-below-social { top: 88px; }
.hint kbd { background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.12); padding: 1px 6px; border-radius: 6px; }
.hint .netInfo { margin-top: 6px; }
.playerList { margin-top: 4px; white-space: pre-line; }
.bandwidthStats { margin-top: 6px; white-space: pre-line; color: rgba(255,255,255,0.72); }

.spectatingCenter {
	position: fixed;
	left: 50%;
	top: calc(42% - 150px);
	transform: translate(-50%, -50%);
	z-index: 6;
	color: rgba(255,255,255,0.85);
	font: 700 21px/1.2 var(--font-ui);
	user-select: none;
	pointer-events: none;
	white-space: pre-line;
	text-align: center;
	text-shadow: -1px -1px 0 rgba(0,0,0,1), 1px -1px 0 rgba(0,0,0,1), -1px 1px 0 rgba(0,0,0,1), 1px 1px 0 rgba(0,0,0,1);
}

.scoreFeedCenter {
	position: fixed;
	left: 50%;
	bottom: 22%;
	transform: translateX(-50%);
	z-index: 6;
	color: rgba(255,255,255,0.85);
	font: 700 16px/1.3 var(--font-ui);
	user-select: none;
	pointer-events: none;
	white-space: pre-line;
	text-align: center;
	min-width: 220px;
	max-width: min(520px, 92vw);
	padding: 8px 10px;
	border-radius: 0;
	background: #121c27;
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
}

.scoreboardOverlay {
	position: fixed;
	inset: 0;
	z-index: 6;
	display: grid;
	place-items: center;
	pointer-events: none;
}

.scoreboardOverlay[hidden] { display: none; }

.scoreboardCard {
	--window-cut: var(--ui-cut-panel);
	--window-border-inset: 2px;
	--window-cut-inner: calc(var(--window-cut) - var(--window-border-inset));
	position: relative;
	isolation: isolate;
	width: 1040px;
	min-width: 1040px;
	max-width: 1040px;
	max-height: 70vh;
	overflow: hidden;
	padding: 14px 16px;
	border-radius: 0;
	background: transparent;
	border: 0;
}

.scoreboardCard::before,
.scoreboardCard::after {
	content: '';
	position: absolute;
	pointer-events: none;
}

.scoreboardCard::before {
	inset: 0;
	background: var(--ui-panel-border);
	clip-path: polygon(var(--window-cut) 0, 100% 0, 100% calc(100% - var(--window-cut)), calc(100% - var(--window-cut)) 100%, 0 100%, 0 var(--window-cut));
	z-index: -2;
}

.scoreboardCard::after {
	inset: var(--window-border-inset);
	background: var(--ui-panel-bg);
	clip-path: polygon(var(--window-cut-inner) 0, 100% 0, 100% calc(100% - var(--window-cut-inner)), calc(100% - var(--window-cut-inner)) 100%, 0 100%, 0 var(--window-cut-inner));
	z-index: -1;
}

.scoreboardTitle {
	font: 800 14px/1.2 var(--font-ui);
	letter-spacing: 0.4px;
	color: rgba(255,255,255,0.90);
	text-align: center;
}

.scoreboardList {
	margin-top: 10px;
	white-space: normal;
	font: 700 13px/1.45 var(--font-ui);
	color: rgba(255,255,255,0.85);
	text-align: left;
}

.scoreboardGrid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.scoreboardGrid.is-teams {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scoreboardTeam {
	min-width: 0;
	padding: 10px 10px;
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	border: 1px solid #2a7088;
	box-shadow: 0 0 0 1px #0a121a inset;
}

.scoreboardTeamHeader {
	font: 800 12px/1.2 var(--font-ui);
	letter-spacing: 0.3px;
	color: rgba(255,255,255,0.90);
	text-align: center;
	margin-bottom: 6px;
}

.scoreboardTeamHeader.is-badge {
	--sb-team-color: rgba(150,155,165,0.88);
	--sb-badge-h: 16px;
	--sb-edge-main: 16px;
	--sb-side-w: 24px;
	--sb-side-h: 12px;
	--sb-side-edge: 12px;
	--sb-mini-w: 14px;
	--sb-mini-h: 8px;
	--sb-mini-edge: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0 auto 8px;
}

.scoreboardTeamHeaderMain,
.scoreboardTeamHeaderSide,
.scoreboardTeamHeaderMini {
	background: var(--sb-team-color);
}

.scoreboardTeamHeaderMain {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 144px;
	max-width: min(100%, 190px);
	height: var(--sb-badge-h);
	padding: 0 16px;
	color: rgba(255,255,255,0.95);
	clip-path: polygon(var(--sb-edge-main) 0, 100% 0, calc(100% - var(--sb-edge-main)) 100%, 0 100%);
}

.scoreboardTeamHeaderText {
	display: block;
	font: 700 13px/1.0 var(--font-ui);
	letter-spacing: 0.2px;
	text-transform: uppercase;
	text-shadow: -1px 0 0 rgba(0,0,0,1), 1px 0 0 rgba(0,0,0,1), -1px 2px 0 rgba(0,0,0,1), 1px 2px 0 rgba(0,0,0,1);
	transform: translateY(-2px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.scoreboardTeamHeaderSide {
	width: var(--sb-side-w);
	height: var(--sb-side-h);
	flex: 0 0 var(--sb-side-w);
	clip-path: polygon(var(--sb-side-edge) 0, 100% 0, calc(100% - var(--sb-side-edge)) 100%, 0 100%);
}

.scoreboardTeamHeaderMini {
	width: var(--sb-mini-w);
	height: var(--sb-mini-h);
	flex: 0 0 var(--sb-mini-w);
	clip-path: polygon(var(--sb-mini-edge) 0, 100% 0, calc(100% - var(--sb-mini-edge)) 100%, 0 100%);
}

.scoreboardTeamHeader.is-badge > .scoreboardTeamHeaderMini:first-child {
	transform: translateX(8px);
}

.scoreboardTeamHeader.is-badge > .scoreboardTeamHeaderSide:nth-child(2) {
	transform: translateX(5px);
}

.scoreboardTeamHeader.is-badge > .scoreboardTeamHeaderSide:nth-last-child(2) {
	transform: translateX(-5px);
}

.scoreboardTeamHeader.is-badge > .scoreboardTeamHeaderMini:last-child {
	transform: translateX(-8px);
}

.scoreboardRows {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.scoreboardRow {
	display: grid;
	grid-template-columns: 1fr auto auto auto auto;
	gap: 8px;
	align-items: baseline;
}

.scoreboardRow.is-header {
	color: rgba(255,255,255,0.68);
}

.scoreboardRow.is-header > .name {
	opacity: 0;
}

.scoreboardRow.is-local {
	color: rgba(255,165,45,0.95);
}

.scoreboardRow.is-respawning,
.scoreboardRow.is-eliminated {
	color: rgba(125,125,125,0.95);
}

.scoreboardRow.is-local.is-respawning,
.scoreboardRow.is-local.is-eliminated {
	color: rgba(195,115,30,0.95);
}

.scoreboardRow.is-total {
	color: rgba(255,255,255,0.92);
	font-weight: 800;
}

.scoreboardTotalsDivider {
	height: 1px;
	margin: 1px 0 3px;
	background: rgba(255,255,255,0.20);
}

.scoreboardRow > .name {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.user-privilege-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 1px 6px;
	border: 1px solid currentColor;
	background: rgba(7, 14, 20, 0.72);
	font: 800 10px/1 var(--font-ui);
	letter-spacing: 0.25px;
	text-transform: uppercase;
	text-shadow: none;
	box-shadow: 0 0 0 1px rgba(8, 14, 20, 0.92) inset;
}

.user-privilege-badge.is-moderator {
	color: #4aa3ff;
}

.user-privilege-badge.is-developer {
	color: #ffd54a;
}

.scoreboardRow > .num {
	text-align: right;
	min-width: 20px;
}

.scoreboardSpectatingText {
	margin-top: 9px;
	text-align: center;
	font: 700 11px/1.2 var(--font-ui);
	letter-spacing: 0.25px;
	color: rgba(138, 213, 240, 0.82);
	text-transform: lowercase;
}

.topbar {
	position: fixed;
	top: 12px;
	left: 12px;
	right: 12px;
	z-index: 7;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 10px;
	color: rgba(255,255,255,0.8);
	font: 12px/1.3 var(--font-ui);
	user-select: none;
	pointer-events: none;
}

.topbar-left-stack {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-right: auto;
	pointer-events: auto;
}

.discord-launcher,
.friends-launcher {
	position: relative;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 1px solid var(--ui-panel-border);
	background: var(--ui-panel-bg-soft);
	box-shadow: 0 0 0 1px #0a121a inset;
	overflow: visible;
	cursor: pointer;
}

.discord-launcher:hover,
.friends-launcher:hover {
	background: #22384a;
	border-color: #6cc7e3;
}

.discord-launcher:focus-visible,
.friends-launcher:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.discord-launcher-icon,
.friends-launcher-icon {
	display: block;
	width: 34px;
	height: 34px;
}

.topbar-account {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 0 0 auto;
	width: 320px;
	min-height: 60px;
	padding: 8px 8px 6px;
	background: var(--ui-panel-bg-soft);
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
	font: 600 12px/1.2 var(--font-ui);
	color: rgba(235, 245, 255, 0.95);
	cursor: pointer;
	transition: background 120ms ease, border-color 120ms ease;
}

.topbar-account:hover {
	background: #22384a;
	border-color: #6cc7e3;
}

.topbar-account-line {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px;
	font: 700 13px/1.2 var(--font-ui);
}

#topbarAccountText {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.topbar-account-meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px;
	margin-top: auto;
	font: 700 12px/1.1 var(--font-ui);
	color: rgba(210, 232, 242, 0.96);
}

.topbar-account-progress {
	position: relative;
	height: 6px;
	margin-top: 2px;
	background: #1e4e6a;
	border: 1px solid rgba(114, 225, 255, 0.36);
	overflow: hidden;
}

.topbar-account-progress-fill {
	height: 100%;
	width: 0%;
	background: #72e1ff;
}

.topbar-account-btn {
	pointer-events: auto;
	border: 0;
	padding: 0;
	background: transparent;
	color: rgba(160, 225, 245, 0.95);
	font: 700 13px/1.2 var(--font-ui);
	cursor: pointer;
}

.topbar-account-stack {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	width: auto;
	max-width: calc(100vw - 24px);
	pointer-events: auto;
}

.kill-feed-stack {
	position: fixed;
	top: 92px;
	right: 12px;
	z-index: 8;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 320px;
	max-width: calc(100vw - 24px);
	pointer-events: none;
}

.notification-stack {
	position: fixed;
	right: 12px;
	bottom: 12px;
	z-index: 8;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: var(--chat-panel-width);
	pointer-events: none;
}

.chat-shell {
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: 6;
	width: auto;
	max-width: calc(100vw - 24px);
	pointer-events: none;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 6px;
	padding-top: 1px;
}

.chat-main {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 0;
	width: var(--chat-panel-width);
	min-width: 0;
}

.chat-toggle-btn {
	pointer-events: auto;
	flex: 0 0 auto;
	margin: 0;
	padding: 0 8px;
	min-width: 82px;
	height: 34px;
	border: 1px solid #2f8aa9;
	background: #1a4662;
	color: rgba(236, 247, 252, 0.96);
	font: 700 11px/1 var(--font-ui);
	cursor: pointer;
}

.chat-toggle-btn:hover {
	background: #26668a;
}

.chat-toggle-btn:active {
	background: #14364c;
}

.chat-toggle-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.chat-shell.is-chat-hidden {
	width: auto;
}

.chat-shell.is-chat-hidden .chat-main {
	display: none;
}

.chat-shell.is-chat-hidden .chat-toggle-btn {
	margin: 0;
}

.chat-window {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	height: min(220px, 32vh);
	padding: 8px;
	background: rgba(11, 20, 29, 0.94);
	border: 1px solid rgba(72, 163, 192, 0.86);
	box-shadow: 0 0 0 1px rgba(7, 13, 20, 0.95) inset;
}

.chat-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
	pointer-events: auto;
	margin-bottom: -1px;
	position: relative;
	z-index: 1;
}

.chat-tab-btn {
	box-sizing: border-box;
	min-width: 0;
	padding: 6px 6px;
	border-radius: 0;
	border: 1px solid rgba(57, 126, 150, 0.95);
	background: rgba(14, 30, 42, 0.96);
	color: rgba(208, 228, 240, 0.9);
	font: 700 11px/1.1 var(--font-ui);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
}

.chat-tab-btn:hover {
	background: rgba(22, 50, 70, 0.97);
}

.chat-tab-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.chat-tab-btn.is-active {
	border-color: #67d8ff;
	background: linear-gradient(180deg, rgba(26, 84, 112, 0.98), rgba(20, 58, 80, 0.98));
	color: rgba(236, 246, 252, 0.97);
}

.chat-tab-btn.is-slot-hidden {
	visibility: hidden;
	pointer-events: none;
}

.chat-history {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	font: 600 11px/1.35 var(--font-ui);
	color: rgba(222, 239, 248, 0.96);
	scrollbar-color: var(--ui-scrollbar-thumb) var(--ui-scrollbar-track);
	scrollbar-width: thin;
}

.chat-history::-webkit-scrollbar {
	width: 13px;
	height: 13px;
}

.chat-history::-webkit-scrollbar-track {
	background: var(--ui-scrollbar-track);
}

.chat-history::-webkit-scrollbar-thumb {
	background: var(--ui-scrollbar-thumb);
	border: 3px solid var(--ui-scrollbar-track);
}

.chat-history-row {
	display: block;
	padding: 1px 0;
	word-break: break-word;
}

.chat-history-name {
	font-weight: 800;
	color: rgba(188, 198, 206, 0.96);
}

.chat-history-text {
	color: rgba(226, 239, 248, 0.94);
}

.chat-input-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px;
}

.chat-input-row input,
.chat-input-row button {
	box-sizing: border-box;
	border-radius: 0;
	font: 600 11px/1.2 var(--font-ui);
}

.chat-input-row input {
	min-width: 0;
	padding: 7px 8px;
	background: var(--ui-input-bg);
	border: 1px solid var(--ui-input-border);
	color: rgba(240, 248, 253, 0.96);
	outline: none;
}

.chat-input-row input:focus-visible {
	border-color: #8aeaff;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.chat-input-row button {
	padding: 7px 10px;
	border: 1px solid #2f8aa9;
	background: #1a4662;
	color: rgba(236, 247, 252, 0.96);
	cursor: pointer;
}

.chat-input-row button:hover {
	background: #26668a;
}

.chat-input-row button:active {
	background: #14364c;
}

.chat-input-row button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.kill-feed-card {
	pointer-events: none;
	display: flex;
	align-items: center;
	min-height: 28px;
	padding: 6px 10px;
	background: var(--ui-panel-bg-soft);
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.kill-feed-card.is-closing {
	opacity: 0;
	transform: translateY(-6px);
}

.kill-feed-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-width: 0;
	font: 600 11px/1 var(--font-ui);
	color: rgba(226, 239, 248, 0.94);
}

.kill-feed-name {
	flex: 1 1 0;
	min-width: 0;
	font: 800 12px/1 var(--font-ui);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kill-feed-name-left {
	text-align: right;
}

.kill-feed-name-right {
	text-align: left;
}

.kill-feed-arrow {
	flex: 0 0 auto;
	color: rgba(226, 239, 248, 0.94);
	font: 800 12px/1 var(--font-ui);
	transform: translateY(-1px);
}

.notification-card {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px 10px 0;
	background: linear-gradient(180deg, rgba(23, 36, 50, 0.98), rgba(16, 28, 40, 0.98));
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset, 0 10px 18px rgba(0, 0, 0, 0.24);
	color: rgba(235, 245, 255, 0.95);
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.notification-card.is-closing {
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
}

.notification-content-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.notification-content {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 3px;
	font: 700 13px/1.35 var(--font-ui);
	color: rgba(238, 247, 252, 0.96);
	white-space: pre-line;
}

.notification-close-btn {
	flex: 0 0 auto;
	margin: 0;
	padding: 1px 0 0;
	border: 0;
	background: transparent;
	color: rgba(201, 224, 236, 0.72);
	font: 800 11px/1 var(--font-ui);
	cursor: pointer;
	align-self: flex-start;
}

.notification-close-btn:hover {
	color: rgba(236, 246, 252, 0.96);
}

.notification-close-btn:focus-visible {
	outline: none;
	color: rgba(236, 246, 252, 0.96);
}

.notification-actions {
	display: flex;
	flex-direction: row;
	gap: 8px;
}

.notification-action-btn {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	padding: 5px 6px;
	font-size: 10px;
}

.notification-timer {
	position: relative;
	height: 4px;
	margin: 0 -10px;
	background: rgba(30, 78, 106, 0.64);
	border-top: 1px solid rgba(114, 225, 255, 0.18);
	overflow: hidden;
}

.notification-timer-fill {
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, rgba(114, 225, 255, 0.82), rgba(92, 220, 255, 1));
}

.friends-launcher {
	color: #e6f3fb;
}

.settings-launcher {
	padding: 0;
}

.settings-launcher-icon {
	display: block;
	width: 30px;
	height: 30px;
}

.friends-launcher-badge {
	position: absolute;
	left: 50%;
	right: auto;
	bottom: -6px;
	transform: translateX(-50%);
	display: grid;
	place-items: center;
	min-width: 38px;
	height: 16px;
	padding: 0 2px;
	border: 1px solid var(--ui-panel-border);
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	color: #e6f3fb;
	font: 800 7.5px/1 var(--font-ui);
	letter-spacing: 0.15px;
	white-space: nowrap;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px rgba(8, 24, 34, 0.94);
}

.friends-launcher-badge.is-active {
	background: rgba(88, 225, 129, 0.96);
	color: #082313;
	border-color: rgba(77, 196, 112, 0.98);
}

.friends-launcher-pending-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	display: grid;
	place-items: center;
	width: 19px;
	height: 19px;
	padding: 0;
	border-radius: 999px;
	background: #cf3148;
	color: #f8fcff;
	font: 900 9.5px/1 var(--font-ui);
	box-shadow: 0 0 0 2px rgba(28, 8, 12, 0.78);
}

.topbar-account-btn:hover {
	color: rgba(190, 240, 255, 1);
}

.topbar-account-btn:focus-visible {
	outline: 1px solid #8aeaff;
	outline-offset: 2px;
}

.topbar-mid {
	position: fixed;
	left: 0;
	top: 16px;
	width: 100vw;
	height: 56px;
	--topbar-center-half: 75px;
	--topbar-center-pill-gap: 22px;
	gap: 6px;
	pointer-events: none;
}

.topbar-mid > .topbar-left,
.topbar-mid > .topbar-center,
.topbar-mid > .topbar-right {
	position: absolute;
	top: 0;
}

.topbar-mid > .topbar-center {
	left: 50%;
	transform: translateX(-50%);
}

.topbar-mid > .topbar-left {
	right: calc(50% + var(--topbar-center-half) + var(--topbar-center-pill-gap));
}

.topbar-mid > .topbar-right {
	left: calc(50% + var(--topbar-center-half) + var(--topbar-center-pill-gap));
}

.topbar-left, .topbar-center, .topbar-right {
	pointer-events: none;
	border-radius: 0;
	color: rgba(255,255,255,0.85);
	font: 800 14px/1.2 var(--font-ui);
}

.topbar-left, .topbar-right {
	position: relative;
	width: 300px;
	--pill-h: 56px;
	height: var(--pill-h); /* taller pills */
	overflow: visible;
	background: transparent;
	border-radius: 0;
	--tag-h: 20px; /* slightly shorter name tag */
	--tag-top-w: 50%;
	--tag-ramp: var(--tag-h); /* keep name ramp at 45deg */
	--cap: 20px; /* 45deg diagonal depth, closer to corner */
	--score-font-size: 24px;
	--stroke: transparent;
}

/* Base (score) shape starts under the name tag and has a slanted outer end. */

/* RIGHT pill: single fill polygon (no border) */
.topbar-right::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: var(--tag-h);
	bottom: 0;
	background: var(--topbar-fill, rgba(255,255,255,0.08));
	z-index: 0;
	/* base polygon */
	clip-path: polygon(0 0, calc(100% - var(--cap)) 0, 100% var(--cap), 100% 100%, 0 100%);
}

/* LEFT pill: single fill polygon (no border) */
.topbar-left::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: var(--tag-h);
	bottom: 0;
	background: var(--topbar-fill, rgba(255,255,255,0.08));
	z-index: 0;
	clip-path: polygon(0 var(--cap), var(--cap) 0, 100% 0, 100% 100%, 0 100%);
}
.topbar-name {
	position: absolute;
	top: 0;
	height: var(--tag-h);
	display: flex;
	align-items: center;
	line-height: 1;
	width: calc(var(--tag-top-w) + var(--tag-ramp));
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font: 700 13px/1.0 var(--font-ui);
	letter-spacing: 0.2px;
	color: #fff;
	background: transparent;
	border-radius: 0;
	z-index: 2;
}

.topbar-name-text {
	display: block;
	transform: translateY(-1px);
	/* Keep outline/shadow locked to the moved text span. */
	text-shadow: -1px -1px 0 rgba(0,0,0,1), 1px -1px 0 rgba(0,0,0,1), -1px 1px 0 rgba(0,0,0,1), 1px 1px 0 rgba(0,0,0,1);
}

.topbar-name::before {
	/* name tag fill */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	background: var(--topbar-tag-fill, rgba(0,0,0,0.22));
	/* darken name/team bar by 25% */
	filter: brightness(0.75);
	z-index: -1;
}

.topbar-left .topbar-name {
	right: 0;
	left: auto;
	padding: 0 10px 0 6px;
	justify-content: flex-end;
	text-align: right;
}

.topbar-right .topbar-name {
	left: 0;
	right: auto;
	padding: 0 6px 0 10px;
	justify-content: flex-start;
	text-align: left;
}
/* Name tag silhouette: top width is smaller; right/left edge ramps down to the base. */
.topbar-right .topbar-name::before {
	clip-path: polygon(0 0, calc(100% - var(--tag-ramp)) 0, 100% 100%, 0 100%);
}

.topbar-left .topbar-name::before {
	clip-path: polygon(var(--tag-ramp) 0, 100% 0, 100% 100%, 0 100%);
}

.topbar-score {
	position: absolute;
	/* center vertically inside the base area (below the name tag) */
	top: calc(var(--tag-h) + ((var(--pill-h) - var(--tag-h)) / 2) - (var(--score-font-size) / 2) - 1px);
	font-weight: 700;
	font-size: var(--score-font-size);
	line-height: 1;
	letter-spacing: 0.2px;
	color: #fff;
	/* use same bold outlined style as player names */
	text-shadow: -1px -1px 0 rgba(0,0,0,1), 1px -1px 0 rgba(0,0,0,1), -1px 1px 0 rgba(0,0,0,1), 1px 1px 0 rgba(0,0,0,1);
	padding: 0;
	z-index: 2;
}

/* Score aligned toward the timer (inner edge). */
.topbar-left .topbar-score {
	right: 8px;
	left: auto;
	text-align: right;
}

.topbar-right .topbar-score {
	left: 8px;
	right: auto;
	text-align: left;
}

.topbar-center {
	font: 900 22px/1.0 var(--font-ui);
	letter-spacing: 0.5px;
	padding: 10px 14px;
	width: 132px;
	text-align: center;
	background: rgba(255,255,255,0.08);
	box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
}
.topbar-center {
	font: 900 26px/1.0 var(--font-ui);
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 56px;
	padding: 0 16px;
	width: 150px;
	text-align: center;
	background: rgba(255,255,255,0.08);
	box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
	color: #fff;
	text-shadow: -1px -1px 0 rgba(0,0,0,1), 1px -1px 0 rgba(0,0,0,1), -1px 1px 0 rgba(0,0,0,1), 1px 1px 0 rgba(0,0,0,1);
}

.topbar-left[hidden],
.topbar-center[hidden],
.topbar-right[hidden] {
	display: none !important;
}



.topbar .volbox {
	pointer-events: auto;
}

.volbox { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 0; background: var(--ui-panel-bg-soft); border: 1px solid var(--ui-panel-border); box-shadow: 0 0 0 1px #0a121a inset; }
.volbox-label { color: rgba(255,255,255,0.85); font: 600 12px/1.2 var(--font-ui); }
.volbox-range { width: 140px; }
.namebox { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 0; background: var(--ui-panel-bg-soft); border: 1px solid var(--ui-panel-border); box-shadow: 0 0 0 1px #0a121a inset; }
.namebox input { width: 160px; background: var(--ui-input-bg); border: 1px solid var(--ui-input-border); color: rgba(255,255,255,0.9); outline: none; font: 12px/1.3 var(--font-ui); padding: 4px 8px; border-radius: 0; }
.namebox input:focus-visible,
.dm-setting-field input:focus-visible,
.dm-setting-field select:focus-visible {
	outline: none;
	border-color: #8aeaff;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

:is(.menu-btn, .menu-btn-square-primary) {
	position: relative;
	border: 1px solid #58cfe8;
	border-radius: 0;
	background: linear-gradient(
		180deg,
		rgba(42, 116, 150, 0.98) 0%,
		rgba(50, 130, 164, 0.98) 28%,
		rgba(74, 164, 196, 0.98) 50%,
		rgba(18, 60, 92, 0.98) 50.1%,
		rgba(22, 76, 112, 0.98) 72%,
		rgba(30, 94, 132, 0.98) 100%
	);
	color: #f4fcff;
	cursor: pointer;
	isolation: isolate;
	overflow: hidden;
	padding-inline: 10px;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 1px rgba(140, 229, 255, 0.14), 0 0 14px rgba(38, 104, 140, 0.14), 0 12px 28px rgba(0, 0, 0, 0.24);
	text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 12px rgba(8,36,58,1);
	transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

:is(.menu-btn, .menu-btn-square-primary)::before {
	content: '';
	position: absolute;
	inset: 1px;
	border: 1px solid rgba(198, 245, 255, 0.22);
	background: radial-gradient(140% 110% at 50% 12%, rgba(206, 245, 255, 0.16) 0%, rgba(206, 245, 255, 0.1) 26%, rgba(206, 245, 255, 0.04) 52%, rgba(206, 245, 255, 0) 88%);
	pointer-events: none;
	opacity: 0.95;
}


:is(.menu-btn, .menu-btn-square-primary):hover {
	background: linear-gradient(
		180deg,
		rgba(48, 128, 164, 0.98) 0%,
		rgba(58, 144, 180, 0.98) 28%,
		rgba(82, 176, 208, 0.98) 50%,
		rgba(20, 68, 102, 0.98) 50.1%,
		rgba(26, 86, 124, 0.98) 72%,
		rgba(34, 106, 146, 0.98) 100%
	);
	border-color: #86e5ff;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 1px rgba(170, 240, 255, 0.2), 0 0 20px rgba(48, 132, 170, 0.18), 0 12px 28px rgba(0, 0, 0, 0.28);
	text-shadow: 0 1px 3px rgba(0,0,0,0.98), 0 0 14px rgba(8,36,58,0.65);
}

:is(.menu-btn, .menu-btn-square-primary):hover::before {
	border-color: rgba(204, 248, 255, 0.26);
}

:is(.menu-btn, .menu-btn-square-primary):active {
	background: linear-gradient(
		180deg,
		rgba(36, 104, 136, 0.98) 0%,
		rgba(46, 118, 150, 0.98) 28%,
		rgba(68, 152, 182, 0.98) 50%,
		rgba(14, 48, 74, 0.98) 50.1%,
		rgba(18, 68, 98, 0.98) 72%,
		rgba(24, 84, 118, 0.98) 100%
	);
	transform: translateY(1px);
}

:is(.menu-btn, .menu-btn-square-primary):active::before {
	opacity: 0.72;
}


:is(.menu-btn, .menu-btn-square-primary):focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px #0a121a, 0 0 0 4px #aaf0ff, 0 0 14px #2fa7c8;
}


:is(.menu-btn, .menu-btn-square-primary)[disabled] {
	opacity: 1;
	cursor: not-allowed;
	color: #d9e3e9;
	background: linear-gradient(180deg, #53606a 0%, #434f58 100%);
	border-color: #7b8790;
	box-shadow: 0 0 0 1px #0a121a inset;
	text-shadow: none;
}

:is(.menu-btn, .menu-btn-square-primary)[disabled]::before {
	border-color: rgba(255, 255, 255, 0.08);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 54%);
}


:is(.menu-btn, .menu-btn-square-primary)[disabled]:hover {
	text-shadow: none;
	transform: none;
}

:is(.menu-btn, .menu-btn-square-primary).menu-btn-primary {
	border-color: #7bddff;
	background: linear-gradient(
		180deg,
		rgba(46, 124, 160, 0.98) 0%,
		rgba(56, 142, 178, 0.98) 28%,
		rgba(82, 178, 210, 0.98) 50%,
		rgba(20, 68, 106, 0.98) 50.1%,
		rgba(24, 86, 126, 0.98) 72%,
		rgba(32, 108, 150, 0.98) 100%
	);
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 1px rgba(170, 240, 255, 0.16), 0 0 18px rgba(54, 146, 186, 0.18), 0 12px 28px rgba(0, 0, 0, 0.28);
}

:is(.menu-btn, .menu-btn-square-primary).menu-btn-primary::before {
	border-color: rgba(208, 245, 255, 0.22);
	background: radial-gradient(140% 110% at 50% 12%, rgba(214, 247, 255, 0.18) 0%, rgba(214, 247, 255, 0.11) 28%, rgba(214, 247, 255, 0.05) 54%, rgba(214, 247, 255, 0) 88%);
}

:is(.menu-btn, .menu-btn-square-primary).menu-btn-primary:hover {
	background: linear-gradient(
		180deg,
		rgba(54, 138, 176, 0.98) 0%,
		rgba(64, 156, 194, 0.98) 28%,
		rgba(92, 188, 220, 0.98) 50%,
		rgba(22, 76, 116, 0.98) 50.1%,
		rgba(28, 96, 138, 0.98) 72%,
		rgba(38, 118, 162, 0.98) 100%
	);
	border-color: #a5ecff;
}

:is(.menu-btn, .menu-btn-square-primary).menu-btn-primary:active {
	background: linear-gradient(
		180deg,
		rgba(40, 112, 144, 0.98) 0%,
		rgba(48, 128, 160, 0.98) 28%,
		rgba(74, 162, 192, 0.98) 50%,
		rgba(16, 56, 88, 0.98) 50.1%,
		rgba(22, 74, 108, 0.98) 72%,
		rgba(28, 92, 128, 0.98) 100%
	);
}

:is(.menu-btn, .menu-btn-square-primary).menu-btn-primary[disabled] {
	border-color: #7b8790;
	background: linear-gradient(180deg, #53606a 0%, #434f58 100%);
	box-shadow: 0 0 0 1px #0a121a inset;
}

:is(.menu-btn, .menu-btn-square-primary).menu-btn-primary[disabled]::before {
	border-color: rgba(255, 255, 255, 0.08);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 54%);
}

.menu-btn.menu-btn-secondary {
	border-color: var(--ui-panel-border);
	background: var(--ui-panel-bg-soft);
	box-shadow: 0 0 0 1px #0a121a inset;
	text-shadow: none;
}

.menu-btn.menu-btn-secondary::before {
	display: none;
}

.menu-btn.menu-btn-secondary:hover {
	background: #22384a;
	border-color: #6cc7e3;
	box-shadow: 0 0 0 1px #0a121a inset;
}

.menu-btn.menu-btn-secondary:active {
	background: #1a2d3c;
}

.menu-btn.menu-btn-secondary[disabled] {
	color: #cfdbe3;
	background: #35414a;
	border-color: #6d7e8a;
	box-shadow: 0 0 0 1px #0a121a inset;
	text-shadow: none;
}

.dm-team-action-btn,
.namebox button,
.friends-secondary-btn,
.friends-launcher {
	border: 1px solid var(--ui-panel-border);
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	color: #e6f3fb;
	cursor: pointer;
	box-shadow: 0 0 0 1px #0a121a inset;
	transition: background 120ms ease, border-color 120ms ease, transform 80ms ease, box-shadow 120ms ease;
}

.dm-team-action-btn:hover,
.namebox button:hover,
.friends-secondary-btn:hover,
.friends-launcher:hover {
	background: #22384a;
	border-color: #6cc7e3;
}

.dm-team-action-btn:active,
.namebox button:active,
.friends-secondary-btn:active,
.friends-launcher:active {
	background: #1a2d3c;
	transform: translateY(1px);
}

.dm-team-action-btn:focus-visible,
.namebox button:focus-visible,
.friends-secondary-btn:focus-visible,
.friends-launcher:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.dm-team-action-btn[disabled],
.namebox button[disabled],
.friends-secondary-btn[disabled],
.friends-launcher[disabled] {
	cursor: not-allowed;
	color: #cfdbe3;
	background: #35414a;
	border-color: #6d7e8a;
	transform: none;
}
.menu-overlay { position: fixed; inset: 0; display: grid; place-items: center; background: transparent; z-index: 5; }
 .menu-overlay[hidden] { display: none; }

.menu-overlay.lobby-layout {
	--lobby-top-offset: calc((var(--menu-wordmark-top-gap) * 2) + var(--menu-wordmark-height-estimate));
	--lobby-edge-gap: var(--menu-wordmark-top-gap);
	place-items: start center;
	padding: var(--lobby-top-offset) 12px var(--lobby-edge-gap);
	box-sizing: border-box;
}

/* Render a full-screen dark backdrop when any `.menu-overlay` is visible.
   This sits above the canvases but below the wordmark and menu panels.
   Uses `:has()` to detect visible overlays. Modern browsers required. */
body:has(.menu-overlay:not([hidden]))::before {
	content: '';
	position: fixed;
	inset: 0;
	background: rgba(8,10,14,0.55);
	pointer-events: none;
	z-index: 2;
}
.connection-lost-overlay {
	position: fixed;
	inset: 0;
	z-index: 14;
	display: grid;
	place-items: center;
	background: rgba(6, 9, 14, 0.72);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.connection-lost-overlay[hidden] { display: none !important; }

.connection-lost-modal {
	--window-cut: var(--ui-cut-panel);
	--window-border-inset: 2px;
	--window-cut-inner: calc(var(--window-cut) - var(--window-border-inset));
	position: relative;
	isolation: isolate;
	z-index: 1;
	width: min(360px, calc(100vw - 44px));
	min-height: 172px;
	max-height: 172px;
	padding: 14px 14px 12px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: transparent;
	overflow: hidden;
}

.connection-lost-modal::before,
.connection-lost-modal::after {
	content: '';
	position: absolute;
	pointer-events: none;
}

.connection-lost-modal::before {
	inset: 0;
	background: var(--ui-panel-border);
	clip-path: polygon(var(--window-cut) 0, 100% 0, 100% calc(100% - var(--window-cut)), calc(100% - var(--window-cut)) 100%, 0 100%, 0 var(--window-cut));
	z-index: -2;
}

.connection-lost-modal::after {
	inset: var(--window-border-inset);
	background: linear-gradient(180deg, rgba(18, 28, 39, 0.98), rgba(12, 20, 29, 0.98));
	clip-path: polygon(var(--window-cut-inner) 0, 100% 0, 100% calc(100% - var(--window-cut-inner)), calc(100% - var(--window-cut-inner)) 100%, 0 100%, 0 var(--window-cut-inner));
	z-index: -1;
}

.connection-lost-title {
	margin: 0;
	font-size: 19px;
	line-height: 1.1;
	text-align: center;
}

.connection-lost-copy {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font: 700 clamp(13px, 1.1vw, 16px)/1.35 var(--font-ui);
	color: rgba(228, 242, 249, 0.96);
}

.connection-lost-modal .menu-panel-actions {
	margin-top: auto;
	padding-top: 4px;
}

.account-banned-modal {
	width: min(820px, calc(100vw - 44px));
	min-height: 0;
	max-height: none;
	padding: 30px 28px 24px;
	gap: 0;
}

.account-banned-eyebrow {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: #5cdcff;
	text-align: center;
}

/* Account banned reason display */
.account-banned-reason-block {
	margin-top: 6px;
}
.account-banned-reason-label {
	font: 700 13px/1 var(--font-ui);
	color: rgba(255,255,255,0.92);
	margin-bottom: 4px;
}
.account-banned-reason {
	font: 400 13px/1.3 var(--font-ui);
	color: rgba(235,245,255,0.95);
	font-style: normal; /* ensure not italic */
	white-space: pre-line;
	margin-bottom: 8px;
}

.account-banned-modal .menu-panel-actions {
	margin-top: 12px; /* avoid pushing actions to the bottom of the modal */
}

.account-banned-accent-line {
	width: min(240px, 48%);
	height: 2px;
	margin: 0 auto 18px;
	background: linear-gradient(90deg, rgba(92, 220, 255, 0), rgba(92, 220, 255, 0.95), rgba(92, 220, 255, 0));
}

.account-banned-title {
	margin: 0 0 14px;
	font-size: clamp(24px, 3.4vw, 40px);
	letter-spacing: 0.06em;
	text-align: center;
}

.account-banned-copy {
	display: block;
	flex: 0 0 auto;
	text-align: center;
	font: 600 clamp(14px, 1.35vw, 20px)/1.62 var(--font-ui);
	letter-spacing: 0.04em;
	color: rgba(220, 235, 245, 0.92);
}

.account-banned-copy strong {
	font-weight: 800;
}

.account-banned-copy em {
	display: inline-block;
	margin-top: 4px;
	margin-bottom: 14px;
	font-style: italic;
	color: rgba(220, 235, 245, 0.88);
}

.account-banned-actions {
	margin-top: 34px;
	padding-top: 0;
	display: flex;
	justify-content: center;
}

.account-banned-discord-btn {
	min-width: min(340px, 100%);
	margin: 0 auto;
	text-align: center;
	text-decoration: none;
}

.loading-overlay {
	z-index: 8;
	background:
		radial-gradient(circle at center, rgba(20, 58, 74, 0.26), rgba(8, 10, 14, 0.92) 70%),
		rgba(8, 10, 14, 0.9);
}

body.boot-loading > :not(#loadingOverlay):not(script) {
	display: none !important;
}

.loading-overlay .loading-card {
	width: min(520px, 92vw);
	height: auto;
	min-width: 0;
	max-width: min(520px, 92vw);
	min-height: min(360px, 60vh);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 18px;
}

.loading-overlay .loading-status {
	min-height: 1.4em;
	text-align: center;
}

.loading-overlay .loading-progress {
	position: relative;
	width: 50%;
	min-width: 180px;
	max-width: 260px;
	height: 14px;
	background: #0d1821;
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
	overflow: hidden;
}

.loading-overlay .loading-progress-fill {
	width: 0%;
	height: 100%;
	background: linear-gradient(90deg, var(--ui-neon-fill-hover), var(--ui-neon));
	box-shadow: 0 0 12px rgba(92, 220, 255, 0.28);
	transition: width 180ms ease;
}

.loading-overlay .loading-progress-label {
	font: 700 12px/1.2 var(--font-ui);
	letter-spacing: 0.4px;
	color: rgba(220, 235, 245, 0.88);
	text-align: center;
}

.loading-overlay[data-state="error"] .loading-progress-fill {
	background: linear-gradient(90deg, #7f3a34, #cf675c);
	box-shadow: 0 0 12px rgba(207, 103, 92, 0.24);
}

.loading-overlay[data-state="error"] .loading-status,
.loading-overlay[data-state="error"] .loading-progress-label {
	color: rgba(255, 214, 206, 0.92);
}

.account-status {
	position: fixed;
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%);
	padding: 6px 12px;
	background: rgba(8, 14, 20, 0.86);
	border: 1px solid rgba(120, 198, 226, 0.58);
	color: rgba(226, 247, 255, 0.95);
	font: 12px/1.2 var(--font-ui);
	letter-spacing: 0.4px;
	text-align: center;
	pointer-events: none;
	z-index: 6;
}

.menu-brand-overlay {
	position: fixed;
	inset: 0;
	display: grid;
	align-items: start;
	justify-items: center;
	padding-top: var(--menu-wordmark-top-gap);
	pointer-events: none;
	z-index: 3;
}

.menu-brand-overlay[hidden] {
	display: none;
}

.menu-layout {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 20px;
}

.menu-brand-wordmark {
	position: relative;
	display: inline-grid;
	place-items: center;
	margin: 0;
	padding: 0 12px;
	font-family: var(--font-ui);
	font-size: clamp(56px, 7.4vw, 102px);
	font-style: italic;
	font-weight: 900;
	line-height: 0.84;
	letter-spacing: 0.015em;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
}

.menu-brand-wordmark::before,
.menu-brand-wordmark-fill {
	grid-area: 1 / 1;
	display: block;
	font: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	white-space: inherit;
	padding-right: 0.19em;
}

.menu-brand-wordmark::before {
	content: attr(data-text);
	color: var(--brand-logo-stroke);
	text-shadow:
		-1px 0 0 var(--brand-logo-stroke),
		1px 0 0 var(--brand-logo-stroke),
		0 -1px 0 var(--brand-logo-stroke),
		0 1px 0 var(--brand-logo-stroke),
		-1px -1px 0 var(--brand-logo-stroke),
		1px -1px 0 var(--brand-logo-stroke),
		-1px 1px 0 var(--brand-logo-stroke),
		1px 1px 0 var(--brand-logo-stroke);
	z-index: 0;
}

.menu-brand-wordmark-fill {
	color: transparent;
	background-image: linear-gradient(
		180deg,
		#bb7cf3 0%,
		#dcaefb 35%,
		#f4ddff 50%,
		#47206f 50.1%,
		#7c49be 65%,
		#a06ae8 100%
	);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	z-index: 1;
}
.menu-panel-card {
	--window-cut: var(--ui-cut-panel);
	--window-border-inset: 2px;
	--window-cut-inner: calc(var(--window-cut) - var(--window-border-inset));
	position: relative;
	isolation: isolate;
	padding: 22px 24px;
	border-radius: 0;
	background: transparent;
	border: 0;
	text-align: center;
	width: 50vw;
	height: 58vh;
	min-width: 50vw;
	max-width: 50vw;
	min-height: 58vh;
	max-height: 58vh;
	box-sizing: border-box;
	overflow: hidden;
}

.menu-panel-card::before,
.menu-panel-card::after {
	content: '';
	position: absolute;
	pointer-events: none;
}

.menu-panel-card::before {
	inset: 0;
	background: var(--ui-panel-border);
	clip-path: polygon(var(--window-cut) 0, 100% 0, 100% calc(100% - var(--window-cut)), calc(100% - var(--window-cut)) 100%, 0 100%, 0 var(--window-cut));
	z-index: -2;
}

.menu-panel-card::after {
	inset: var(--window-border-inset);
	background: var(--ui-panel-bg);
	clip-path: polygon(var(--window-cut-inner) 0, 100% 0, 100% calc(100% - var(--window-cut-inner)), calc(100% - var(--window-cut-inner)) 100%, 0 100%, 0 var(--window-cut-inner));
	z-index: -1;
}
.menu-panel-card[hidden] { display: none !important; }
.menu-panel-title { font: 700 22px/1.1 var(--font-ui); color: rgba(255,255,255,0.95); letter-spacing: 0.3px; }
.menu-panel-sub { margin-top: 8px; font: 13px/1.4 var(--font-ui); color: rgba(255,255,255,0.75); white-space: pre-line; }
.menu-panel-heading {
	position: relative;
	display: block;
	min-height: 34px;
}
.menu-panel-heading .menu-panel-title {
	text-align: center;
	width: 100%;
}
.menu-btn { margin-top: 14px; padding: 8px 14px; font: 600 12px/1 var(--font-ui); }
.menu-panel-toolbar-btn {
	position: absolute;
	top: 0;
	right: 0;
	min-width: 116px;
	margin-top: 0;
	padding: 7px 12px;
	font: 700 11px/1 var(--font-ui);
	letter-spacing: 0.32px;
}

.menu-panel-toolbar-btn-left {
	left: 0;
	right: auto;
}
.namebox button { padding: 4px 8px; font: 600 11px/1 var(--font-ui); }
.menu-panel-actions { margin-top: 12px; display: flex; gap: 10px; justify-content: center; width: 100%; }
.menu-panel-actions .menu-btn { margin-top: 0; }
.menu-panel-actions .menu-btn { flex: 1 1 280px; max-width: 320px; }

.menu-panel-actions.is-single .menu-btn {
	flex: 1 1 100%;
}

.menu-card {
	min-width: 50vw;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.menu-card.lobby-layout {
	width: min(calc(100vw - 24px), clamp(790px, 59vw, 1120px));
	max-width: min(calc(100vw - 24px), clamp(790px, 59vw, 1120px));
	min-width: min(calc(100vw - 24px), clamp(790px, 59vw, 1120px));
	height: calc(100vh - var(--lobby-top-offset) - var(--lobby-edge-gap));
	max-height: calc(100vh - var(--lobby-top-offset) - var(--lobby-edge-gap));
	min-height: 0;
}

#menuMain {
	justify-content: center;
}

.auth-card,
.pause-card {
	width: min(520px, 92vw);
	height: auto;
	min-width: 0;
	max-width: min(520px, 92vw);
	min-height: 0;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
}

.prelogin-card {
	width: min(620px, 92vw);
	height: auto;
	min-width: 0;
	max-width: min(620px, 92vw);
	min-height: 0;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
}

.prelogin-copy {
	margin-top: 12px;
	text-align: left;
	white-space: normal;
	font: 600 13px/1.5 var(--font-ui);
	color: rgba(226, 241, 250, 0.9);
}

.prelogin-copy p {
	margin: 0;
}

.prelogin-copy p + p {
	margin-top: 10px;
}

.prelogin-card .menu-panel-actions {
	margin-top: auto;
	padding-top: 14px;
}

.auth-form {
	margin-top: 12px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	text-align: left;
}

.auth-form label {
	font: 600 12px/1.2 var(--font-ui);
	color: rgba(255,255,255,0.82);
}

.auth-form input {
	width: 100%;
	box-sizing: border-box;
	background: var(--ui-input-bg);
	border: 1px solid var(--ui-input-border);
	color: rgba(255,255,255,0.9);
	outline: none;
	font: 12px/1.3 var(--font-ui);
	padding: 7px 8px;
	border-radius: 0;
}

.auth-form input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	padding: 0;
	height: 18px;
	border: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}

.volbox-range {
	-webkit-appearance: none;
	appearance: none;
	padding: 0;
	height: 18px;
	border: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}

:is(.auth-form input[type="range"], .volbox-range)::-webkit-slider-runnable-track {
	height: 6px;
	background:
		linear-gradient(90deg, var(--ui-neon), var(--ui-neon-soft)) 0 0 / calc(var(--range-progress, 0%) + 1px) 100% no-repeat,
		var(--ui-neon-fill);
	box-shadow: 0 0 8px rgba(92, 220, 255, 0.28);
}

:is(.auth-form input[type="range"], .volbox-range)::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	margin-top: -6px;
	width: 16px;
	height: 16px;
	border: 1px solid var(--ui-panel-border);
	background: linear-gradient(180deg, #d9f8ff, var(--ui-neon));
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 8px rgba(92, 220, 255, 0.38);
}

:is(.auth-form input[type="range"], .volbox-range)::-moz-range-track {
	height: 6px;
	background: var(--ui-neon-fill);
	box-shadow: 0 0 8px rgba(92, 220, 255, 0.28);
}

:is(.auth-form input[type="range"], .volbox-range)::-moz-range-progress {
	height: 6px;
	background: linear-gradient(90deg, var(--ui-neon), var(--ui-neon-soft));
}

:is(.auth-form input[type="range"], .volbox-range)::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border: 1px solid var(--ui-panel-border);
	border-radius: 0;
	background: linear-gradient(180deg, #d9f8ff, var(--ui-neon));
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 8px rgba(92, 220, 255, 0.38);
}

:is(.auth-form input[type="range"], .volbox-range):focus-visible {
	outline: none;
	border: 0;
	box-shadow: none;
}

:is(.auth-form input[type="range"], .volbox-range):focus-visible::-webkit-slider-runnable-track {
	box-shadow: 0 0 0 2px #8aeaff33;
}

:is(.auth-form input[type="range"], .volbox-range):focus-visible::-moz-range-track {
	box-shadow: 0 0 0 2px #8aeaff33;
}

.auth-form input:focus-visible {
	outline: none;
	border-color: #8aeaff;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.settings-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 10px;
	border: 1px solid rgba(95, 179, 206, 0.24);
	background: rgba(15, 27, 38, 0.82);
	box-shadow: 0 0 0 1px rgba(10, 18, 26, 0.95) inset;
}

.settings-toggle input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	accent-color: #5cdcff;
	flex: 0 0 auto;
}

.settings-note {
	font: 600 11px/1.35 var(--font-ui);
	color: rgba(186, 214, 226, 0.84);
}

#authChoiceDiscordRow .menu-btn,
#authUpgradeChoiceDiscordRow .menu-btn {
	font-weight: 700;
}

.menu-card.simulation-popup {
	width: auto;
	height: auto;
	min-width: 420px;
	max-width: min(760px, 92vw);
	min-height: 0;
	max-height: 82vh;
}

.gameover-popup-card {
	width: auto;
	height: auto;
	min-width: 420px;
	max-width: min(760px, 92vw);
	min-height: 0;
	max-height: 82vh;
}

.menu-panel {
	margin-top: 12px;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.menu-panel[hidden] {
	display: none !important;
}

.fixed-btn-row {
	justify-content: center;
}

.fixed-btn-row .menu-btn {
	flex: 0 0 300px;
	width: 300px;
	max-width: 100%;
	padding: 6px 12px;
	font: 600 11px/1 var(--font-ui);
}

#menuCreate .create-mode-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: auto;
}

#menuCreate .create-mode-actions .menu-btn {
	flex: 0 1 auto;
	width: min(320px, 100%);
}

#menuCreate .create-back-row {
	margin-top: auto;
}

#menuMatchmakingModes {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

#mmModeSelect {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.matchmaking-queue-panel {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 0;
}

#mmModeSelect > .menu-panel-actions.fixed-btn-row:first-of-type {
	margin-top: auto;
}

#mmModeSelect > .menu-panel-actions.fixed-btn-row:last-of-type {
	margin-bottom: auto;
}

#matchmakingActionRow {
	margin-top: auto;
	padding-top: 22px;
}

.namebox-lobby {
	margin-top: auto;
	width: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	padding: 6px 8px;
}

.namebox-label {
	font: 600 11px/1.2 var(--font-ui);
	color: rgba(255,255,255,0.82);
	text-align: left;
}

.namebox-row {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	align-items: center;
}

.namebox-lobby input { width: auto; flex: 1 1 0; min-width: 0; }
.namebox-lobby button { white-space: nowrap; padding: 4px 8px; }
.namebox-lobby #nameUpdate { flex: 0 0 auto; min-width: 0; }

.lobby-main {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

#svLobby,
#dmLobby,
#mmLobby { height: 100%; }

#mmLobby {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.mm-lobby-wrap {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px;
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
	background: var(--ui-panel-bg-soft);
}

.mm-lobby-status {
	font: 600 14px/1.2 var(--font-ui);
	color: rgba(220,235,245,0.90);
	text-align: center;
}

.mm-lobby-timer {
	font: 700 26px/1 var(--font-ui);
	letter-spacing: 0.6px;
	color: rgba(255,255,255,0.96);
	text-align: center;
}

.mm-lobby-count {
	font: 700 16px/1.1 var(--font-ui);
	color: rgba(220,235,245,0.92);
	text-align: center;
}

#svLobby {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

#svSplit {
	flex: 1 1 auto;
	min-height: 0;
}

#svSplit > .dm-team {
	height: 100%;
}

#dmLobby {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

#dmConfig {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

#dmConfig > .dm-split {
	flex: 1 1 auto;
	min-height: 0;
}

#lobbyActionRow {
	margin-top: auto;
	padding-top: 22px;
}

.lobby-settings-overlay {
	z-index: 6;
	background:
		radial-gradient(circle at top right, rgba(64, 171, 208, 0.22), transparent 30%),
		radial-gradient(circle at bottom left, rgba(38, 102, 138, 0.18), transparent 34%),
		rgba(8, 10, 14, 0.74);
}

.lobby-settings-card {
	width: min(920px, 94vw);
	height: auto;
	min-width: 0;
	max-width: min(920px, 94vw);
	min-height: 0;
	max-height: min(82vh, 760px);
	display: flex;
	flex-direction: column;
	padding: 18px 20px 20px;
	text-align: left;
}

.lobby-settings-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(47, 138, 169, 0.4);
}

.lobby-settings-header-copy {
	min-width: 0;
}

.lobby-settings-header-copy .menu-panel-sub {
	margin-top: 6px;
}

.lobby-settings-close-btn {
	flex: 0 0 auto;
	min-width: 110px;
	margin-top: 0;
}

.lobby-settings-content {
	flex: 1 1 auto;
	min-height: 0;
	margin-top: 14px;
	padding-right: 4px;
	overflow: auto;
	scrollbar-color: #5ffff0 #10212d;
	scrollbar-width: thin;
}

.lobby-list {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
	text-align: left;
	max-height: 220px;
	overflow: hidden;
}

.lobby-list.is-empty {
	background: transparent;
	border: 0;
	padding: 0;
	max-height: none;
	overflow: visible;
}

.join-empty-text {
	font: 13px/1.4 var(--font-ui);
	color: rgba(255,255,255,0.75);
	text-align: center;
	padding: 10px 0 0;
}

.join-empty-actions {
	margin-top: 12px;
	display: flex;
	justify-content: stretch;
}

.join-empty-actions .menu-btn {
	flex: 1;
}

.friends-overlay {
	z-index: 9;
	background:
		radial-gradient(circle at top right, rgba(40, 132, 168, 0.24), transparent 42%),
		radial-gradient(circle at bottom left, rgba(15, 98, 140, 0.20), transparent 38%),
		rgba(8, 10, 14, 0.72);
}

.settings-overlay {
	z-index: 9;
	background:
		radial-gradient(circle at top right, rgba(40, 132, 168, 0.22), transparent 42%),
		radial-gradient(circle at bottom left, rgba(15, 98, 140, 0.16), transparent 38%),
		rgba(8, 10, 14, 0.62);
}

.bug-report-overlay {
	z-index: 10;
	background:
		radial-gradient(circle at top right, rgba(40, 132, 168, 0.22), transparent 42%),
		radial-gradient(circle at bottom left, rgba(15, 98, 140, 0.16), transparent 38%),
		rgba(8, 10, 14, 0.72);
}

.bug-report-card {
	width: min(720px, 94vw);
	height: min(92vh, 980px);
	max-height: min(92vh, 980px);
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow: hidden;
}

.bug-report-header {
	margin-bottom: 4px;
}

.bug-report-warning {
	padding: 10px 12px;
	border: 1px solid rgba(214, 84, 84, 0.6);
	background: rgba(88, 20, 20, 0.5);
	color: #ffd6d6;
	font: 700 12px/1.4 var(--font-ui);
}

.bug-report-help {
	color: rgba(224, 241, 249, 0.9);
	font: 600 12px/1.35 var(--font-ui);
}

.bug-report-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 auto;
	min-height: 0;
}

.bug-report-form textarea {
	min-height: 112px;
	flex: 1 1 0;
	resize: none;
	background: var(--ui-input-bg);
	border: 1px solid var(--ui-input-border);
	color: rgba(255, 255, 255, 0.9);
	outline: none;
	font: 12px/1.4 var(--font-ui);
	padding: 10px;
	border-radius: 0;
}

.bug-report-form textarea:focus-visible {
	border-color: #8aeaff;
	box-shadow: 0 0 0 2px #8aeaff2a;
}

.bug-report-form textarea + label {
	margin-top: 10px;
}

.bug-report-submit-row {
	margin-top: auto;
	padding-top: 8px;
	flex: 0 0 auto;
}

.settings-shell {
	width: min(520px, 92vw);
}

.settings-card {
	width: min(520px, 92vw);
	height: auto;
	min-width: 0;
	max-width: min(520px, 92vw);
	min-height: 0;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
}

.friends-shell {
	width: min(860px, 94vw);
}

.friends-card-shell {
	width: min(860px, 94vw);
	min-width: min(860px, 94vw);
	max-width: min(860px, 94vw);
	height: min(78vh, 760px);
	min-height: min(78vh, 760px);
	max-height: min(78vh, 760px);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.friends-card-shell::after {
	background:
		linear-gradient(180deg, rgba(18, 28, 39, 0.98), rgba(12, 20, 29, 0.98)),
		repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 4px);
}

.friends-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.friends-header-copy {
	text-align: left;
}

.friends-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

.friends-secondary-btn {
	margin-top: 0;
	padding: 7px 12px;
	font: 600 11px/1 var(--font-ui);
	text-shadow: none;
}

.friends-search-toggle-btn {
	min-width: 142px;
}

.friends-close-btn {
	flex: 0 0 auto;
	min-width: 92px;
}

.friends-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.friends-tab-btn {
	width: 100%;
	min-height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 6px 10px;
}

.friends-tab-btn.is-active {
	background: #22384a;
	border-color: #6cc7e3;
}

.friends-tab-label {
	font: 800 11px/1 var(--font-ui);
	letter-spacing: 0.35px;
	text-transform: uppercase;
}

.friends-tab-count {
	flex: 0 0 auto;
	font: 800 11px/1 var(--font-ui);
	letter-spacing: 0.15px;
	color: rgba(212, 240, 250, 0.96);
}

.friends-tab-badge {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	border-radius: 999px;
	font: 900 10px/1 var(--font-ui);
	letter-spacing: 0.2px;
}

.friends-tab-badge-red {
	width: 22px;
	height: 22px;
	padding: 0;
	background: #cf3148;
	color: #f8fcff;
	box-shadow: 0 0 0 2px rgba(28, 8, 12, 0.72);
}

.friends-panels {
	flex: 1 1 auto;
	min-height: 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.friends-section {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	padding: 14px;
	background: rgba(17, 27, 38, 0.82);
	border: 1px solid rgba(95, 179, 206, 0.28);
	box-shadow: 0 0 0 1px rgba(10, 18, 26, 0.95) inset;
}

.friends-section-fill {
	flex: 1 1 auto;
}

.friends-section-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	overflow: auto;
	padding-right: 2px;
}

.friends-card,
.friends-search-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	overflow: hidden;
	position: relative;
	background-image:
		linear-gradient(135deg, rgba(21, 36, 50, 0.56), rgba(14, 26, 38, 0.56)),
		var(--friends-card-banner-image, none);
	background-size: cover, cover;
	background-position: center, center;
	border: 1px solid transparent;
	border-image-source: var(--profile-banner-border-image, linear-gradient(to bottom, rgba(97, 174, 204, 0.95), rgba(97, 174, 204, 0.95)));
	border-image-slice: 1;
	box-shadow: 0 0 0 1px rgba(8, 14, 20, 0.92) inset;
	isolation: isolate;
}

.friends-card::after,
.friends-search-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.6) 0%,
		rgba(0, 0, 0, 0.34) 18%,
		rgba(0, 0, 0, 0) 36%,
		rgba(0, 0, 0, 0) 64%,
		rgba(0, 0, 0, 0.34) 82%,
		rgba(0, 0, 0, 0.6) 100%
	);
	pointer-events: none;
}

.friends-card > *,
.friends-search-card > * {
	position: relative;
	z-index: 1;
}

.friends-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.friends-card-title,
.friends-search-meta {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: left;
}

.friends-card-name-line {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	flex-wrap: wrap;
}

.friends-card-name {
	font: 800 15px/1.05 var(--font-ui);
	letter-spacing: 0.2px;
	color: rgba(245, 251, 255, 0.96);
	word-break: break-word;
	text-shadow: 0 0 8px rgba(0, 0, 0, 0.62), 0 1px 0 rgba(0, 0, 0, 0.55);
}

.friends-card-name-line .user-privilege-badge {
	font-size: 9px;
	padding: 1px 5px;
}

.friends-card-divider,
.friends-card-level {
	font: 700 11px/1 var(--font-ui);
	color: rgba(174, 213, 226, 0.86);
	text-shadow: 0 0 6px rgba(0, 0, 0, 0.58), 0 1px 0 rgba(0, 0, 0, 0.5);
}

.friends-presence-dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	flex: 0 0 auto;
	box-shadow: 0 0 0 2px rgba(10, 18, 26, 0.9);
}

.friends-presence-dot.is-online {
	background: #4fe08f;
}

.friends-presence-dot.is-offline {
	background: rgba(129, 145, 158, 0.9);
}

.friends-card-detail,
.friends-search-status,
.friends-search-empty,
.friends-search-label {
	font: 600 11px/1.35 var(--font-ui);
	color: rgba(186, 214, 226, 0.84);
	text-shadow: 0 0 6px rgba(0, 0, 0, 0.56), 0 1px 0 rgba(0, 0, 0, 0.48);
}

.friends-chip {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	border-radius: 999px;
	font: 800 10px/1 var(--font-ui);
	letter-spacing: 0.4px;
	text-transform: uppercase;
	border: 1px solid transparent;
}

.friends-chip.is-online {
	background: rgba(61, 188, 166, 0.18);
	color: rgba(191, 255, 235, 0.95);
	border-color: rgba(84, 212, 188, 0.36);
}

.friends-chip.is-queue {
	background: rgba(208, 170, 56, 0.16);
	color: rgba(255, 236, 182, 0.94);
	border-color: rgba(214, 178, 82, 0.34);
}

.friends-chip.is-battle {
	background: rgba(58, 132, 215, 0.18);
	color: rgba(212, 234, 255, 0.96);
	border-color: rgba(84, 156, 235, 0.34);
}

.friends-chip.is-offline {
	background: rgba(133, 149, 164, 0.16);
	color: rgba(227, 233, 238, 0.86);
	border-color: rgba(150, 167, 183, 0.24);
}

.friends-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.friends-card-actions.is-right {
	justify-content: flex-end;
}

.friends-card-actions.is-inline {
	flex: 0 0 auto;
	margin-left: auto;
	align-self: center;
	align-items: center;
}

.friends-card-actions.is-inline .friends-action-btn {
	min-width: 124px;
}

.friends-card-menu-wrap {
	position: relative;
	flex: 0 0 auto;
	align-self: center;
	z-index: 1;
}

.friends-card-menu-trigger {
	width: 40px;
	height: 36px;
	border: 1px solid var(--ui-panel-border);
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	color: #e6f3fb;
	box-shadow: 0 0 0 1px #0a121a inset;
	cursor: pointer;
	font: 800 14px/1 var(--font-ui);
}

.friends-card-menu-trigger:hover {
	background: #22384a;
	border-color: #6cc7e3;
}

.friends-card-menu-trigger:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.friends-context-menu {
	position: fixed;
	z-index: 12;
	display: flex;
	flex-direction: column;
	min-width: 196px;
	padding: 8px;
	background: rgba(13, 22, 31, 0.98);
	border: 1px solid rgba(107, 190, 219, 0.32);
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(8, 14, 20, 0.95) inset;
}

.friends-context-menu-btn {
	border: 0;
	background: transparent;
	color: rgba(231, 245, 252, 0.94);
	text-align: left;
	padding: 8px 10px;
	font: 700 11px/1.25 var(--font-ui);
	cursor: pointer;
}

.friends-context-menu-btn:hover:not([disabled]) {
	background: rgba(38, 64, 84, 0.96);
}

.friends-context-menu-btn.is-danger {
	color: rgba(255, 202, 202, 0.96);
}

.friends-context-menu-btn[disabled] {
	opacity: 0.52;
	cursor: not-allowed;
}

.friends-action-btn {
	margin-top: 0;
	flex: 0 0 auto;
	min-width: 132px;
	padding: 7px 12px;
	font: 700 11px/1 var(--font-ui);
}

.notification-actions > .notification-action-btn {
	flex: 1 1 0;
	width: 0;
	min-width: 0;
}

.friends-action-secondary-flat {
	border: 1px solid var(--ui-panel-border);
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	color: #e6f3fb;
	box-shadow: 0 0 0 1px #0a121a inset;
	text-shadow: none;
	transition: background 120ms ease, border-color 120ms ease, transform 80ms ease, box-shadow 120ms ease;
}

.friends-action-secondary-flat::before,
.friends-action-secondary-flat::after {
	display: none;
}

.friends-action-secondary-flat:hover:not([disabled]) {
	background: #22384a;
	border-color: #6cc7e3;
}

.friends-action-secondary-flat:active:not([disabled]) {
	background: #1a2d3c;
	transform: translateY(1px);
}

.friends-action-secondary-flat:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.friends-action-danger::before {
	background: linear-gradient(180deg, #65302b 0%, #54241f 100%);
}

.friends-action-danger::after {
	background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
}

.friends-empty-state {
	padding: 14px 12px;
	background: rgba(15, 24, 34, 0.72);
	border: 1px dashed rgba(125, 176, 199, 0.22);
	font: 600 11px/1.4 var(--font-ui);
	color: rgba(174, 198, 210, 0.82);
	text-align: center;
}

.friends-search-overlay {
	z-index: 10;
	background: rgba(4, 7, 10, 0.52);
}

.friends-search-shell {
	width: min(540px, 94vw);
}

.friends-search-modal {
	width: min(540px, 94vw);
	min-width: min(540px, 94vw);
	max-width: min(540px, 94vw);
	height: min(72vh, 660px);
	min-height: min(72vh, 660px);
	max-height: min(72vh, 660px);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.friends-search-panel {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	padding: 16px;
	background:
		linear-gradient(180deg, rgba(15, 30, 42, 0.98), rgba(12, 24, 34, 0.98));
	border: 1px solid rgba(114, 209, 238, 0.26);
	box-shadow: 0 0 0 1px rgba(7, 14, 20, 0.95) inset;
}

.friends-search-panel input {
	width: 100%;
	box-sizing: border-box;
	background: var(--ui-input-bg);
	border: 1px solid var(--ui-input-border);
	color: rgba(255,255,255,0.92);
	outline: none;
	font: 12px/1.3 var(--font-ui);
	padding: 8px 10px;
	border-radius: 0;
}

.friends-search-panel input:focus-visible {
	border-color: #8aeaff;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.friends-search-results {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	overflow: auto;
}

.friends-search-empty[hidden] {
	display: none !important;
}

.profile-overlay {
	z-index: 10;
	background: rgba(4, 7, 10, 0.52);
}

.profile-card-shell {
	width: min(760px, 94vw);
	min-width: min(760px, 94vw);
	max-width: min(760px, 94vw);
	height: min(76vh, 740px);
	min-height: min(76vh, 740px);
	max-height: min(76vh, 740px);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.profile-content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 0;
}

.profile-summary-card {
	position: relative;
	overflow: hidden;
	padding: 12px;
	background-image:
		linear-gradient(135deg, rgba(21, 36, 50, 0.86), rgba(14, 26, 38, 0.9)),
		var(--profile-banner-image, none);
	background-size: cover, cover;
	background-position: center, center;
	border: 1px solid transparent;
	border-image-source: var(--profile-banner-border-image, linear-gradient(to bottom, rgba(97, 174, 204, 0.95), rgba(97, 174, 204, 0.95)));
	border-image-slice: 1;
	box-shadow: 0 0 0 1px rgba(8, 14, 20, 0.92) inset;
}

.profile-summary-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(120% 85% at 50% 50%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0.54) 100%),
		linear-gradient(180deg, rgba(5, 10, 15, 0.34), rgba(5, 10, 15, 0.42));
	pointer-events: none;
}

.profile-summary-head {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.profile-summary-name {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 800 18px/1.1 var(--font-ui);
	color: rgba(244, 251, 255, 0.96);
}

.profile-summary-name .user-privilege-badge {
	font-size: 10px;
}

.profile-summary-level,
.profile-summary-next {
	font: 700 12px/1.2 var(--font-ui);
	color: rgba(210, 232, 242, 0.96);
}

.profile-summary-progress {
	position: relative;
	z-index: 1;
	height: 8px;
	margin-top: 10px;
	background: #1e4e6a;
	border: 1px solid rgba(114, 225, 255, 0.36);
	overflow: hidden;
}

.profile-summary-progress-fill {
	height: 100%;
	width: 0;
	background: #72e1ff;
}

.profile-cosmetics-panel {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	background: rgba(17, 27, 38, 0.82);
	border: 1px solid rgba(95, 179, 206, 0.28);
	box-shadow: 0 0 0 1px rgba(10, 18, 26, 0.95) inset;
}

.profile-cosmetics-title {
	font: 700 13px/1.2 var(--font-ui);
	letter-spacing: 0.2px;
	color: rgba(230, 245, 250, 0.96);
}

.profile-banner-status {
	font: 600 11px/1.35 var(--font-ui);
	color: rgba(186, 214, 226, 0.84);
}

.profile-banner-grid {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	padding-right: 2px;
}

.profile-border-controls {
	display: grid;
	gap: 8px;
	padding: 10px;
	background: rgba(10, 22, 31, 0.72);
	border: 1px solid rgba(95, 179, 206, 0.22);
	box-shadow: 0 0 0 1px rgba(8, 14, 20, 0.92) inset;
}

.profile-border-controls-title {
	font: 700 12px/1.2 var(--font-ui);
	letter-spacing: 0.2px;
	color: rgba(215, 236, 245, 0.96);
}

.profile-border-controls-grid {
	display: grid;
	grid-template-columns: minmax(130px, 170px) minmax(48px, 56px) minmax(0, 1fr) minmax(120px, 130px);
	gap: 0;
	align-items: center;
}

.profile-border-field {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.profile-border-label {
	font: 700 10px/1.1 var(--font-ui);
	letter-spacing: 0.2px;
	color: rgba(180, 214, 228, 0.92);
	text-transform: uppercase;
}

.profile-border-field select,
.profile-border-field input[type="color"] {
	height: 32px;
	border: 1px solid var(--ui-input-border);
	background: var(--ui-input-bg);
	color: rgba(230, 245, 252, 0.94);
	outline: none;
	padding: 0 8px;
	font: 12px/1.2 var(--font-ui);
	border-radius: 0;
}

.profile-border-field input[type="color"] {
	padding: 2px;
	width: 100%;
	min-width: 0;
}

.profile-border-field select:focus-visible,
.profile-border-field input[type="color"]:focus-visible {
	border-color: #8aeaff;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
}

.profile-border-knob-wrap {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	height: 32px;
}

.profile-border-count-field,
.profile-border-direction-field {
	justify-content: center;
}

.profile-border-count-field {
	margin-right: 8px;
}

.profile-border-knob {
	--knob-angle: 180deg;
	position: relative;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--ui-input-border);
	background: var(--ui-input-bg);
	cursor: grab;
	touch-action: none;
}

.profile-border-knob:active {
	cursor: grabbing;
}

.profile-border-knob:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.profile-border-knob-indicator {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 2px;
	height: 12px;
	background: #8aeaff;
	transform-origin: 50% 100%;
	transform: translate(-50%, -100%) rotate(var(--knob-angle));
	box-shadow: 0 0 6px rgba(114, 225, 255, 0.52);
}

.profile-border-knob:focus-visible {
	border-color: #8aeaff;
	box-shadow: 0 0 0 1px #0a121a inset, 0 0 0 2px #8aeaff33;
	outline: none;
}

.profile-border-color-row {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	width: 100%;
}

.profile-border-color-field {
	flex: 1 1 0;
}

.profile-border-color-stack {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
	width: 100%;
	margin-left: 0;
}

.profile-border-save-btn {
	width: 100%;
	min-width: 0;
	height: 32px;
	margin-top: auto;
	margin-left: 8px;
}

.profile-banner-option {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px;
	border: 1px solid rgba(97, 174, 204, 0.22);
	background: rgba(14, 26, 38, 0.96);
	box-shadow: 0 0 0 1px rgba(8, 14, 20, 0.92) inset;
	color: rgba(228, 246, 254, 0.94);
	cursor: pointer;
}

.profile-banner-option:hover:not([disabled]) {
	background: rgba(24, 42, 59, 0.96);
	border-color: rgba(114, 209, 238, 0.5);
}

.profile-banner-option.is-selected {
	border-color: #72e1ff;
	box-shadow: 0 0 0 1px rgba(8, 14, 20, 0.92) inset, 0 0 0 1px rgba(114, 225, 255, 0.36);
}

.profile-banner-option-image {
	display: block;
	aspect-ratio: 8 / 1;
	height: auto;
	background-image: var(--profile-banner-image, none);
	background-size: cover;
	background-position: center;
	position: relative;
	border: 1px solid transparent;
	border-image-source: var(--profile-banner-border-image, linear-gradient(to bottom, rgba(97, 174, 204, 0.95), rgba(97, 174, 204, 0.95)));
	border-image-slice: 1;
}

.profile-banner-option-image::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(120% 85% at 50% 50%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0.54) 100%),
		linear-gradient(180deg, rgba(5, 10, 15, 0.24), rgba(5, 10, 15, 0.34));
}

.profile-banner-option-label {
	font: 700 11px/1.2 var(--font-ui);
	letter-spacing: 0.2px;
}

.lobby-row {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 10px;
	padding: 8px 6px;
	border-top: 1px solid rgba(255,255,255,0.10);
}
.lobby-row:first-child { border-top: 0; }

.lobby-row-main {
	min-width: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.lobby-row-title {
	font: 700 13px/1.2 var(--font-ui);
	color: rgba(255,255,255,0.92);
}

.lobby-row-sub {
	margin-top: 2px;
	font: 12px/1.25 var(--font-ui);
	color: rgba(255,255,255,0.75);
	white-space: pre-line;
}

.lobby-row-join-btn {
	margin-top: 0;
	min-width: 156px;
	padding-inline: 16px;
}

.lobby-players {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
	text-align: left;
}

.lobby-player {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	padding: 6px 2px;
	border-top: 1px solid rgba(255,255,255,0.10);
}
.lobby-player:first-child { border-top: 0; }

.lobby-player-left {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex: 1;
}

.kick-btn {
	width: 22px;
	height: 22px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,0.18);
	background: rgba(255,255,255,0.08);
	color: rgba(255,255,255,0.85);
	cursor: pointer;
	font: 700 12px/1 var(--font-ui);
	display: grid;
	place-items: center;
	flex: 0 0 auto;
}

.kick-btn:hover { background: rgba(255,255,255,0.14); }

.controls-card {
	min-width: 50vw;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.controls-card .controls-list {
	flex: 1 1 auto;
	min-height: 0;
}

.controls-card .menu-panel-actions {
	margin-top: auto;
}
.controls-list { text-align: left; }
.controls-list > div { margin-top: 6px; }
.controls-note { margin-top: 10px; }

@media (max-width: 980px) {
	.friends-card-shell {
		height: min(86vh, 880px);
		min-height: min(86vh, 880px);
		max-height: min(86vh, 880px);
	}
}

@media (max-width: 640px) {
	.topbar-account-stack {
		width: auto;
		max-width: calc(100vw - 24px);
	}

	.topbar {
		align-items: flex-start;
	}

	.notification-stack {
		width: var(--chat-panel-width);
	}

	.kill-feed-stack {
		top: 122px;
		width: 320px;
		max-width: calc(100vw - 24px);
	}

	.friends-card-shell {
		width: min(94vw, 94vw);
		min-width: min(94vw, 94vw);
		max-width: min(94vw, 94vw);
		height: min(88vh, 920px);
		min-height: min(88vh, 920px);
		max-height: min(88vh, 920px);
		padding: 18px 18px;
	}

	.friends-search-modal {
		width: min(94vw, 94vw);
		min-width: min(94vw, 94vw);
		max-width: min(94vw, 94vw);
		height: min(82vh, 760px);
		min-height: min(82vh, 760px);
		max-height: min(82vh, 760px);
		padding: 18px 18px;
	}

	.profile-card-shell {
		width: min(94vw, 94vw);
		min-width: min(94vw, 94vw);
		max-width: min(94vw, 94vw);
		height: min(82vh, 760px);
		min-height: min(82vh, 760px);
		max-height: min(82vh, 760px);
		padding: 18px 18px;
	}

	.profile-summary-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.profile-banner-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.profile-border-controls-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.profile-border-color-row {
		flex-wrap: nowrap;
	}

	.profile-border-color-stack {
		grid-column: 1 / -1;
	}

	.friends-header {
		flex-direction: column;
		align-items: stretch;
	}

	.friends-header-actions {
		width: 100%;
	}

	.friends-header-actions .friends-secondary-btn {
		flex: 1 1 0;
		min-width: 0;
	}

	.friends-tabs {
		gap: 8px;
	}

	.friends-tab-btn {
		min-height: 40px;
		gap: 6px;
		padding: 6px 8px;
	}

	.friends-close-btn,
	.friends-search-card .friends-action-btn,
	.friends-action-btn {
		width: 100%;
		min-width: 0;
	}

	.friends-card-actions {
		flex-direction: column;
	}
}

.dm-settings {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
	text-align: left;
}

.dm-settings-panel {
	margin-top: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	display: grid;
	gap: 14px;
}

.dm-settings-2col {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.dm-settings-category {
	display: grid;
	gap: 12px;
	padding: 14px;
	background: rgba(10, 27, 37, 0.92);
	border: 1px solid #2f8aa9;
	box-shadow: inset 0 0 0 1px rgba(7, 18, 25, 0.85);
}

.dm-settings-category-head {
	display: grid;
	gap: 4px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(47, 138, 169, 0.35);
}

.dm-settings-category-title {
	font: 700 14px/1.2 var(--font-ui);
	letter-spacing: 0.3px;
	color: #e6f5fa;
}

.dm-settings-category-copy {
	font: 500 11px/1.45 var(--font-ui);
	color: rgba(196, 230, 239, 0.9);
}

.dm-settings-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}

.dm-settings-grid-two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dm-settings-grid-compact {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dm-setting-field {
	display: grid;
	gap: 6px;
	min-width: 0;
	font: 500 12px/1.2 var(--font-ui);
	color: rgba(212, 240, 248, 0.92);
}

.dm-setting-label {
	font: 700 12px/1.2 var(--font-ui);
	color: rgba(230, 245, 250, 0.96);
}

.dm-setting-help {
	font: 500 11px/1.4 var(--font-ui);
	color: rgba(190, 223, 233, 0.82);
}

.dm-setting-field input,
.dm-setting-field select {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	background: #10212d;
	color: #e6f5fa;
	border: 1px solid #2f8aa9;
	padding: 7px 9px;
	font: 500 12px/1.2 var(--font-ui);
}

.dm-setting-field select {
	appearance: none;
}

.dm-setting-field input[disabled],
.dm-setting-field select[disabled] {
	background: rgba(59, 72, 81, 0.92);
	border-color: #6d7e8a;
	color: #d6e0e8;
}

.dm-setting-choice-group {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.dm-setting-choice {
	position: relative;
	display: grid;
	align-content: start;
	gap: 6px;
	min-height: 88px;
	padding: 12px 14px 12px 40px;
	background: rgba(13, 29, 40, 0.95);
	border: 1px solid #2f8aa9;
	box-shadow: inset 0 0 0 1px rgba(7, 18, 25, 0.78);
	color: rgba(212, 240, 248, 0.92);
	cursor: pointer;
}

.dm-setting-choice:hover {
	background: rgba(19, 39, 54, 0.95);
}

.dm-setting-choice:focus-within {
	box-shadow: inset 0 0 0 1px rgba(7, 18, 25, 0.78), 0 0 0 2px rgba(138, 234, 255, 0.2);
}

.dm-setting-choice:has(input:checked) {
	background: linear-gradient(180deg, rgba(17, 45, 60, 0.98), rgba(12, 33, 46, 0.98));
	border-color: #57cbe9;
}

.dm-setting-choice input[type="radio"] {
	position: absolute;
	left: 14px;
	top: 14px;
	margin: 0;
	width: 14px;
	height: 14px;
	accent-color: #5ffff0;
}

.dm-setting-choice-title {
	font: 700 12px/1.2 var(--font-ui);
	letter-spacing: 0.2px;
	color: #e6f5fa;
}

.dm-setting-choice-copy {
	font: 500 11px/1.4 var(--font-ui);
	color: rgba(190, 223, 233, 0.82);
}

.dm-win-settings[hidden] { display: none !important; }

.dm-split {
	--dm-team-panel-width: 430px;
	--dm-card-rail-width: 400px;
	margin-top: 12px;
	padding: 0 8px;
	border-radius: 12px;
	background: transparent;
	border: 0;
	display: grid;
	grid-template-columns: minmax(0, min(100%, var(--dm-team-panel-width)));
	grid-auto-rows: minmax(0, 1fr);
	row-gap: 12px;
	column-gap: 24px;
	align-items: stretch;
	justify-items: center;
	justify-content: center;
}

.dm-split.dm-split-single {
	grid-template-columns: minmax(0, min(100%, var(--dm-team-panel-width)));
}

.dm-split.dm-split-two {
	grid-template-columns: repeat(2, minmax(0, min(100%, var(--dm-team-panel-width))));
}

.dm-split.dm-split-four {
	grid-template-columns: repeat(2, minmax(0, min(100%, var(--dm-team-panel-width))));
}

.dm-team {
	box-sizing: border-box;
	width: min(100%, var(--dm-team-panel-width));
	padding: 8px 10px;
	text-align: center;
	min-width: 0;
	max-width: var(--dm-team-panel-width);
	min-height: 0;
	display: flex;
	flex-direction: column;
	border-radius: 0;
	background: var(--ui-panel-bg-soft);
	border: 1px solid var(--ui-panel-border);
	box-shadow: 0 0 0 1px #0a121a inset;
	overflow: hidden;
	justify-self: center;
}

.dm-team-name {
	font: 700 14px/1.2 var(--font-ui);
	color: rgba(255,255,255,0.92);
	margin-bottom: 6px;
}

.dm-team > .scoreboardTeamHeader.is-badge {
	margin: 0 auto 6px;
	max-width: 100%;
}

.dm-team .scoreboardTeamHeaderMain {
	min-width: 100px;
	max-width: min(100%, 160px);
}

.dm-team-players {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1 1 auto;
	min-height: 0;
	gap: 8px;
	white-space: normal;
	font: 12px/1.2 var(--font-ui);
	overflow-y: auto;
	overflow-x: hidden;
	color: rgba(255,255,255,0.80);
	min-height: 44px;
	max-height: none;
}

.lobby-member-card {
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	align-self: center;
	gap: 6px;
	width: min(100%, var(--dm-card-rail-width));
	padding: 0 8px;
	aspect-ratio: 8 / 1;
	max-height: 50px;
	border: 1px solid transparent;
	border-image-source: var(--profile-banner-border-image, linear-gradient(to bottom, rgba(97, 174, 204, 0.95), rgba(97, 174, 204, 0.95)));
	border-image-slice: 1;
	background-image:
		linear-gradient(135deg, rgba(21, 36, 50, 0.56), rgba(14, 26, 38, 0.56)),
		var(--lobby-member-banner-image, none);
	background-size: cover, cover;
	background-position: center, center;
	text-align: left;
}

.lobby-member-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.6) 0%,
		rgba(0, 0, 0, 0.34) 18%,
		rgba(0, 0, 0, 0) 36%,
		rgba(0, 0, 0, 0) 64%,
		rgba(0, 0, 0, 0.34) 82%,
		rgba(0, 0, 0, 0.6) 100%
	);
	pointer-events: none;
}

.lobby-member-card.is-empty {
	background-image: none;
	background: rgba(14, 26, 38, 0.32);
	border: 1px dashed rgba(120, 160, 180, 0.18);
	border-image: none;
}

.lobby-member-card.is-empty::after {
	display: none;
}

.lobby-member-card.is-empty .lobby-member-name {
	font: 600 14px/1.05 var(--font-ui);
	color: rgba(180, 210, 225, 0.28);
	filter: none;
}

.lobby-member-card.is-bot {
	background-image: none;
	background: rgba(20, 38, 52, 0.52);
	border: 1px solid rgba(95, 255, 240, 0.14);
	border-image: none;
}

.lobby-member-card.is-bot.is-bot-easy {
	background: rgba(20, 52, 34, 0.6);
	border-color: rgba(96, 232, 136, 0.38);
}

.lobby-member-card.is-bot.is-bot-normal {
	background: rgba(58, 52, 20, 0.62);
	border-color: rgba(255, 216, 92, 0.4);
}

.lobby-member-card.is-bot.is-bot-hard {
	background: rgba(62, 39, 18, 0.62);
	border-color: rgba(255, 166, 76, 0.42);
}

.lobby-member-card.is-bot::after {
	display: none;
}

.lobby-member-card.is-bot .lobby-member-name {
	font: 600 14px/1.05 var(--font-ui);
	color: rgba(95, 255, 240, 0.45);
	filter: none;
}

.lobby-member-card.is-bot.is-bot-easy .lobby-member-name {
	color: rgba(126, 245, 152, 0.92);
}

.lobby-member-card.is-bot.is-bot-normal .lobby-member-name {
	color: rgba(255, 226, 122, 0.94);
}

.lobby-member-card.is-bot.is-bot-hard .lobby-member-name {
	color: rgba(255, 180, 102, 0.96);
}

.lobby-member-copy {
	position: relative;
	z-index: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	align-items: flex-start;
	text-align: left;
}

.lobby-member-name {
	display: flex;
	align-items: center;
	gap: 8px;
	font: 700 18px/1.05 var(--font-ui);
	color: rgba(245, 251, 255, 0.96);
	word-break: normal;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: none;
	filter:
		drop-shadow(0 0 5px rgba(0, 0, 0, 0.95))
		drop-shadow(0 0 10px rgba(0, 0, 0, 0.85));
}

.lobby-member-name .user-privilege-badge {
	font-size: 9px;
	padding: 1px 5px;
}

.lobby-member-level {
	font: 700 14px/1 var(--font-ui);
	color: rgba(196, 230, 239, 0.9);
	text-shadow: none;
	filter:
		drop-shadow(0 0 4px rgba(0, 0, 0, 0.95))
		drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
	white-space: nowrap;
}

.lobby-member-host-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1px 4px;
	border: 1px solid rgba(130, 220, 245, 0.54);
	background: rgba(28, 63, 82, 0.76);
	font: 800 10px/1 var(--font-ui);
	letter-spacing: 0.2px;
	text-transform: uppercase;
	text-shadow: none;
	filter:
		drop-shadow(0 0 4px rgba(0, 0, 0, 0.95))
		drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
}

.lobby-member-action-wrap {
	position: relative;
	z-index: 1;
}

.lobby-member-action-trigger {
	width: 18px;
	height: 18px;
	min-width: 18px;
	padding: 0;
	font-size: 10px;
}

.lobby-bot-difficulty-btn {
	width: auto;
	min-width: 54px;
	height: 22px;
	padding: 0 6px;
	font: 700 9px/1 var(--font-ui);
	letter-spacing: 0.2px;
	text-transform: uppercase;
}

.lobby-member-context-menu {
	z-index: 13;
}

.dm-team-actions {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
	min-height: 20px;
	width: min(100%, var(--dm-card-rail-width));
	align-self: center;
}

.dm-team-action-slot {
	display: flex;
	align-items: center;
	min-width: 0;
}

.dm-team-action-slot-left {
	justify-content: flex-start;
}

.dm-team-action-slot-center {
	justify-content: center;
}

.dm-team-action-slot-right {
	justify-content: flex-end;
}

.dm-team-count {
	font: 700 11px/1 var(--font-ui);
	color: rgba(196, 230, 239, 0.72);
	letter-spacing: 0.2px;
}

.dm-team-action-btn {
	padding: 3px 10px;
	font: 600 10px/1 var(--font-ui);
	text-transform: uppercase;
	letter-spacing: 0.2px;
	min-width: 80px;
}

.dm-bot-fill-btn {
	min-width: 0;
}

@media (max-width: 860px) {
	.menu-panel-heading {
		min-height: 0;
		padding-top: 40px;
	}

	.menu-panel-toolbar-btn {
		position: absolute;
		top: 0;
		right: 0;
		width: 100%;
	}

	.lobby-settings-card {
		width: min(94vw, 94vw);
		max-width: min(94vw, 94vw);
		padding: 16px;
	}

	.lobby-settings-header {
		flex-direction: column;
	}

	.lobby-settings-close-btn {
		width: 100%;
	}

	.dm-settings-grid-two,
	.dm-setting-choice-group {
		grid-template-columns: minmax(0, 1fr);
	}

	.dm-settings-2col {
		grid-template-columns: minmax(0, 1fr);
	}

	.dm-split.dm-split-two,
	.dm-split.dm-split-four {
		grid-template-columns: minmax(0, min(100%, var(--dm-team-panel-width)));
	}
}
