/*******************************************************************************
 * GTChat - www/style.css                                                      *
 *                                                                             *
 * Shared application layout, controls, themes and color palettes.             *
 *                                                                             *
 * Copyright 2001-2004 by Wladimir Palant (http://www.gtchat.de)               *
 * Copyright 2006-2026 by Sascha Greuel (https://softcreatr.dev)               *
 *                                                                             *
 * License: LICENSE-EN.md and LICENSE-DE.md.                                   *
 ******************************************************************************/

:root
{
	--fontFamily: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
	--fontFamilyMonospace: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace;
	/* Conservative bounds for the existing transcript/private/moderation surfaces. */
	--message-contrast-light-background: #d4d4d0;
	--message-contrast-dark-background: #565656;
}

:root [data-chat-color]
{
	color: var(--message-color-light, currentColor);
}

:root[data-appearance="dark"] [data-chat-color]
{
	color: var(--message-color-dark, currentColor);
}

@media (prefers-color-scheme: dark)
{
	:root[data-appearance="auto"] [data-chat-color]
	{
		color: var(--message-color-dark, currentColor);
	}
}

@media (forced-colors: active)
{
	:root[data-appearance] [data-chat-color] { color: CanvasText; }
	:root[data-appearance] a[data-chat-color] { color: LinkText; }
}

body
{
	font-family: var(--fontFamily);
	font-size: 10pt;
	line-height: 1.45;
	color: var(--page-text);
	background-color: var(--page-bg);
	scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

:is(input, textarea)::placeholder
{
	color: var(--auth-text-soft);
	opacity: 1;
}

*::-webkit-scrollbar
{
	width: 12px;
	height: 12px;
}

*::-webkit-scrollbar-track
{
	background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb
{
	border: 2px solid var(--scrollbar-track);
	border-radius: 999px;
	background: var(--scrollbar-thumb);
}

*::-webkit-scrollbar-thumb:hover
{
	background: var(--scrollbar-thumb-hover);
}

table
{
	font-family: var(--fontFamily);
	font-size: 10pt;
	color: var(--legacy-table-text);
}

a
{
	color: var(--page-link);
	text-decoration: none;
}
a:active
{
	color: var(--page-link);
}
a:hover
{
	color: var(--page-link-hover);
}
.smalltext
{
	font-size: 80%;
}
.bigtext
{
	font-size: 110%;color:#ff0000;font-weight: bold;
}
table.bordered1, table.bordered2
{
	background-color: var(--legacy-panel-bg);
	border-collapse: collapse;
}
.text-center,
.table-cell-center
{
	text-align: center;
}
.table-centered
{
	margin-inline: auto;
}
.message-dialog
{
	display: flow-root;
}
.message-dialog > img
{
	float: left;
	margin-inline-end: 12px;
}
body.messages-page
{
	overflow-wrap: anywhere;
}
body.messages-page img,
.private-shell__messages-body img
{
	max-inline-size: 100%;
	block-size: auto;
}
table.bordered1 td, table.bordered2 td, table.bordered1 th, table.bordered2 th
{
	padding: 4px;
}
th
{	
	font-size:9pt;
	font-weight: 400;
	color: var(--legacy-header-text);
	background-image:url('/www/images/blue.gif');
	background-color: var(--legacy-header-bg);
}
table.bordered1 td.subheader, table.bordered2 td.subheader
{
	background-image: url('/www/images/blue.gif');
	background-color: var(--legacy-header-bg);
	padding: 1px;
	font-weight: bold;
}
table.bordered1, table.bordered1 th, table.bordered2 th, table.bordered2 td
{
	border: 1px solid var(--legacy-panel-border);
}
input.plain
{
	background-color: var(--legacy-input-bg);
	border: 1px solid var(--legacy-input-border);
}
form
{
	margin: 0px;
}
.fullsize
{
	width : 98%;
}
img.clickable
{
	cursor: pointer;
}
#toolbar
{
	background-color: var(--toolbar-bg);
	border: 2px outset;
	user-select: none;
}
#toolbar .button
{
	margin: 4px;
	border: 1px solid var(--toolbar-button-border);
	cursor: pointer;
}
#toolbar .button.pointed
{
	background-color: var(--toolbar-hover-bg);
}
#toolbar .button.pressed
{
	border-color: var(--toolbar-pressed-border) var(--toolbar-pressed-border) var(--toolbar-pressed-border) var(--toolbar-pressed-border);
}
#toolbar .img_menu_separator
{
	margin: 5px;
}
input
{
	background-color: var(--legacy-input-bg);
	border: 1px solid var(--legacy-input-border);
}
input,
select,
textarea,
button
{
	font-family: inherit;
	font-size: 14px;
	line-height: 1.35;
	color-scheme: var(--ui-color-scheme);
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="image"],
select,
a.auth-button,
a.auth-pill-link,
a.detail-link,
a.detail-tab,
.chat-toolbutton,
.chat-submit
{
	cursor: pointer;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="date"],
input:not([type]),
select,
textarea
{
	min-height: 2.1rem;
	padding: 0.28rem 0.5rem;
	box-sizing: border-box;
}
input[type="checkbox"],
input[type="radio"]
{
	width: 1rem;
	height: 1rem;
	accent-color: #0a4b68;
}
option
{
	background-color: var(--auth-input-bg);
	border: 0;
	color: var(--auth-text);
	color-scheme: var(--ui-color-scheme);
}
.outer
{
background-color: var(--legacy-panel-bg);
}

table.outer
{
	width: 100%;
}

/* Shared palette tokens. Appearance selects light/dark independently. */
:root
{
	--palette-ground: #e3eaf0;
	--palette-panel: #f5f8fb;
	--palette-soft: #eaf0f5;
	--palette-subtle: #e1eaf2;
	--palette-muted: #d4dfe9;
	--palette-header: #405e79;
	--palette-ink: #243446;
	--palette-secondary: #495e71;
	--palette-faint: #53687b;
	--palette-link: #245a86;
	--palette-link-hover: #173e60;
	--palette-primary: #326a98;
	--palette-primary-hover: #255375;
	--palette-primary-ink: #ffffff;
	--palette-input: #ffffff;
	--palette-border: #d4dfe9;
	--palette-control: #748798;
	--palette-frame: #899ba9;
	--palette-warm: #e1edf7;
	--palette-warm-2: #d3e4f1;
	--palette-header-ink: #f7f9fc;
}

:root[data-appearance="dark"]
{
	--palette-ground: #18222e;
	--palette-panel: #253444;
	--palette-soft: #202e3d;
	--palette-subtle: #2b3c4e;
	--palette-muted: #34465a;
	--palette-header: #344d65;
	--palette-ink: #edf3f9;
	--palette-secondary: #c0cfdd;
	--palette-faint: #acbfd0;
	--palette-link: #aacfee;
	--palette-link-hover: #d4e8fa;
	--palette-primary: #9bc7ec;
	--palette-primary-hover: #c0dff6;
	--palette-primary-ink: #202a35;
	--palette-input: #1b2836;
	--palette-border: #3b4d60;
	--palette-control: #8399ad;
	--palette-frame: #667e93;
	--palette-warm: #2b4257;
	--palette-warm-2: #25384a;
	--palette-header-ink: #edf3f9;
}

@media (prefers-color-scheme: dark)
{
	:root[data-appearance="auto"]
	{
		--palette-ground: #18222e;
		--palette-panel: #253444;
		--palette-soft: #202e3d;
		--palette-subtle: #2b3c4e;
		--palette-muted: #34465a;
		--palette-header: #344d65;
		--palette-ink: #edf3f9;
		--palette-secondary: #c0cfdd;
		--palette-faint: #acbfd0;
		--palette-link: #aacfee;
		--palette-link-hover: #d4e8fa;
		--palette-primary: #9bc7ec;
		--palette-primary-hover: #c0dff6;
		--palette-primary-ink: #202a35;
		--palette-input: #1b2836;
		--palette-border: #3b4d60;
		--palette-control: #8399ad;
		--palette-frame: #667e93;
		--palette-warm: #2b4257;
		--palette-warm-2: #25384a;
		--palette-header-ink: #edf3f9;
	}
}

:root[data-palette="forest"]
{
	--palette-ground: #e6ede8;
	--palette-panel: #f5f9f6;
	--palette-soft: #eaf1eb;
	--palette-subtle: #e0eae2;
	--palette-muted: #d6e2d9;
	--palette-header: #3f6154;
	--palette-ink: #283b31;
	--palette-secondary: #4b6254;
	--palette-faint: #536d5c;
	--palette-link: #2a644a;
	--palette-link-hover: #1d4834;
	--palette-primary: #38664f;
	--palette-primary-hover: #294d3b;
	--palette-primary-ink: #ffffff;
	--palette-input: #ffffff;
	--palette-border: #d4e1d8;
	--palette-control: #738b7c;
	--palette-frame: #829b8c;
	--palette-warm: #e1eee7;
	--palette-warm-2: #d2e5da;
	--palette-header-ink: #f4f8f4;
}

:root[data-palette="forest"][data-appearance="dark"]
{
	--palette-ground: #1c2822;
	--palette-panel: #293b31;
	--palette-soft: #223229;
	--palette-subtle: #314739;
	--palette-muted: #405848;
	--palette-header: #3a5648;
	--palette-ink: #eaf3ec;
	--palette-secondary: #c2d6c8;
	--palette-faint: #abc5b2;
	--palette-link: #addbbd;
	--palette-link-hover: #d5efdd;
	--palette-primary: #a6d4bb;
	--palette-primary-hover: #c5e8d4;
	--palette-primary-ink: #212d25;
	--palette-input: #1c2d23;
	--palette-border: #3c5444;
	--palette-control: #88a491;
	--palette-frame: #6e8c79;
	--palette-warm: #324b3d;
	--palette-warm-2: #2b4034;
	--palette-header-ink: #eaf3ec;
}

@media (prefers-color-scheme: dark)
{
	:root[data-palette="forest"][data-appearance="auto"]
	{
		--palette-ground: #1c2822;
		--palette-panel: #293b31;
		--palette-soft: #223229;
		--palette-subtle: #314739;
		--palette-muted: #405848;
		--palette-header: #3a5648;
		--palette-ink: #eaf3ec;
		--palette-secondary: #c2d6c8;
		--palette-faint: #abc5b2;
		--palette-link: #addbbd;
		--palette-link-hover: #d5efdd;
		--palette-primary: #a6d4bb;
		--palette-primary-hover: #c5e8d4;
		--palette-primary-ink: #212d25;
		--palette-input: #1c2d23;
		--palette-border: #3c5444;
		--palette-control: #88a491;
		--palette-frame: #6e8c79;
		--palette-warm: #324b3d;
		--palette-warm-2: #2b4034;
		--palette-header-ink: #eaf3ec;
	}
}

:root[data-palette="wine"]
{
	--palette-ground: #eee7eb;
	--palette-panel: #fbf6f8;
	--palette-soft: #f3ebef;
	--palette-subtle: #ece0e6;
	--palette-muted: #e4d7df;
	--palette-header: #704b5e;
	--palette-ink: #402e38;
	--palette-secondary: #694d5b;
	--palette-faint: #765869;
	--palette-link: #8a3f5a;
	--palette-link-hover: #652d42;
	--palette-primary: #855571;
	--palette-primary-hover: #654056;
	--palette-primary-ink: #ffffff;
	--palette-input: #ffffff;
	--palette-border: #e6d9e0;
	--palette-control: #a08494;
	--palette-frame: #ad95a1;
	--palette-warm: #f2e3ec;
	--palette-warm-2: #e9d5e1;
	--palette-header-ink: #fdf7fa;
}

:root[data-palette="wine"][data-appearance="dark"]
{
	--palette-ground: #2a2028;
	--palette-panel: #3a2d36;
	--palette-soft: #322630;
	--palette-subtle: #45333f;
	--palette-muted: #54404e;
	--palette-header: #5a4051;
	--palette-ink: #f5eaf1;
	--palette-secondary: #dcc5d3;
	--palette-faint: #c9acbd;
	--palette-link: #efb8d1;
	--palette-link-hover: #fadcea;
	--palette-primary: #dfb0ca;
	--palette-primary-hover: #f0cfdf;
	--palette-primary-ink: #30232b;
	--palette-input: #2d212a;
	--palette-border: #533e4c;
	--palette-control: #b28b9f;
	--palette-frame: #99778b;
	--palette-warm: #4c3544;
	--palette-warm-2: #402d3a;
	--palette-header-ink: #f8edf4;
}

@media (prefers-color-scheme: dark)
{
	:root[data-palette="wine"][data-appearance="auto"]
	{
		--palette-ground: #2a2028;
		--palette-panel: #3a2d36;
		--palette-soft: #322630;
		--palette-subtle: #45333f;
		--palette-muted: #54404e;
		--palette-header: #5a4051;
		--palette-ink: #f5eaf1;
		--palette-secondary: #dcc5d3;
		--palette-faint: #c9acbd;
		--palette-link: #efb8d1;
		--palette-link-hover: #fadcea;
		--palette-primary: #dfb0ca;
		--palette-primary-hover: #f0cfdf;
		--palette-primary-ink: #30232b;
		--palette-input: #2d212a;
		--palette-border: #533e4c;
		--palette-control: #b28b9f;
		--palette-frame: #99778b;
		--palette-warm: #4c3544;
		--palette-warm-2: #402d3a;
		--palette-header-ink: #f8edf4;
	}
}

/* Additional accent palettes share the same neutral, readable surfaces. */
:root[data-palette="lime"]
{
	--accent-light: #4f6f18;
	--accent-light-hover: #3a5310;
	--accent-dark: #cdf58b;
	--accent-dark-hover: #def9b0;
	--accent-header: #42552d;
}

:root[data-palette="ocean"]
{
	--accent-light: #086f86;
	--accent-light-hover: #075467;
	--accent-dark: #9ce3fa;
	--accent-dark-hover: #c5f0fc;
	--accent-header: #2b505c;
}

:root[data-palette="violet"]
{
	--accent-light: #6b4e9e;
	--accent-light-hover: #513979;
	--accent-dark: #d8bcff;
	--accent-dark-hover: #e8d6ff;
	--accent-header: #514065;
}

:root[data-palette="purple"]
{
	--accent-light: #7944a3;
	--accent-light-hover: #5d327e;
	--accent-dark: #c596f6;
	--accent-dark-hover: #dfc1ff;
	--accent-header: #543763;
}

:root[data-palette="rose"]
{
	--accent-light: #9a4567;
	--accent-light-hover: #76334e;
	--accent-dark: #ffbdd4;
	--accent-dark-hover: #ffdae7;
	--accent-header: #653d50;
}

:root[data-palette="red"]
{
	--accent-light: #a23c48;
	--accent-light-hover: #7d2c36;
	--accent-dark: #ff8993;
	--accent-dark-hover: #ffbbc1;
	--accent-header: #663940;
}

:root[data-palette="amber"]
{
	--accent-light: #915918;
	--accent-light-hover: #6e4210;
	--accent-dark: #ffd18b;
	--accent-dark-hover: #ffe5be;
	--accent-header: #604a30;
}

:root[data-palette="yellow"]
{
	--accent-light: #756212;
	--accent-light-hover: #594a0c;
	--accent-dark: #ffe36b;
	--accent-dark-hover: #fff0aa;
	--accent-header: #58512b;
}

:root[data-palette="silver"]
{
	--accent-light: #465861;
	--accent-light-hover: #34434a;
	--accent-dark: #dfe7e2;
	--accent-dark-hover: #f5f8f6;
	--accent-header: #454e4b;
}

:root[data-palette="black"]
{
	--accent-light: #26282c;
	--accent-light-hover: #111214;
	--accent-dark: #bcc1c9;
	--accent-dark-hover: #e1e4e9;
	--accent-header: #292b30;
}

:root:is([data-palette="lime"], [data-palette="ocean"], [data-palette="violet"], [data-palette="purple"], [data-palette="rose"], [data-palette="red"], [data-palette="amber"], [data-palette="yellow"], [data-palette="silver"], [data-palette="black"])
{
	--palette-ground: #e7eaed;
	--palette-panel: #f8f9fa;
	--palette-soft: #eef1f3;
	--palette-subtle: #e0e5e9;
	--palette-muted: #d6dce1;
	--palette-header: var(--accent-header);
	--palette-ink: #26323a;
	--palette-secondary: #4e5e67;
	--palette-faint: #586a74;
	--palette-link: var(--accent-light);
	--palette-link-hover: var(--accent-light-hover);
	--palette-primary: var(--accent-light);
	--palette-primary-hover: var(--accent-light-hover);
	--palette-primary-ink: #ffffff;
	--palette-input: #ffffff;
	--palette-border: #d2dbe1;
	--palette-control: #7a8b96;
	--palette-frame: #8b9ba6;
	--palette-warm: #e5ebef;
	--palette-warm-2: #dae3e9;
	--palette-header-ink: #f7f9fb;
}

:root:is([data-palette="lime"], [data-palette="ocean"], [data-palette="violet"], [data-palette="purple"], [data-palette="rose"], [data-palette="red"], [data-palette="amber"], [data-palette="yellow"], [data-palette="silver"], [data-palette="black"])[data-appearance="dark"]
{
	--palette-ground: #1b1e22;
	--palette-panel: #272c31;
	--palette-soft: #22272b;
	--palette-subtle: #30363d;
	--palette-muted: #3a424b;
	--palette-header: var(--accent-header);
	--palette-ink: #edf1f4;
	--palette-secondary: #c1ccd4;
	--palette-faint: #adbcc6;
	--palette-link: var(--accent-dark);
	--palette-link-hover: var(--accent-dark-hover);
	--palette-primary: var(--accent-dark);
	--palette-primary-hover: var(--accent-dark-hover);
	--palette-primary-ink: #172027;
	--palette-input: #1b2025;
	--palette-border: #414c56;
	--palette-control: #879ba9;
	--palette-frame: #6f8594;
	--palette-warm: #303c44;
	--palette-warm-2: #29343c;
	--palette-header-ink: #f7f9fb;
}

@media (prefers-color-scheme: dark)
{
:root:is([data-palette="lime"], [data-palette="ocean"], [data-palette="violet"], [data-palette="purple"], [data-palette="rose"], [data-palette="red"], [data-palette="amber"], [data-palette="yellow"], [data-palette="silver"], [data-palette="black"])[data-appearance="auto"]
{
	--palette-ground: #1b1e22;
	--palette-panel: #272c31;
	--palette-soft: #22272b;
	--palette-subtle: #30363d;
	--palette-muted: #3a424b;
	--palette-header: var(--accent-header);
	--palette-ink: #edf1f4;
	--palette-secondary: #c1ccd4;
	--palette-faint: #adbcc6;
	--palette-link: var(--accent-dark);
	--palette-link-hover: var(--accent-dark-hover);
	--palette-primary: var(--accent-dark);
	--palette-primary-hover: var(--accent-dark-hover);
	--palette-primary-ink: #172027;
	--palette-input: #1b2025;
	--palette-border: #414c56;
	--palette-control: #879ba9;
	--palette-frame: #6f8594;
	--palette-warm: #303c44;
	--palette-warm-2: #29343c;
	--palette-header-ink: #f7f9fb;
}
}

:root[data-palette="black"][data-appearance="dark"] {--palette-ground: #111214; --palette-panel: #1d1f23; --palette-soft: #191b1f;}
@media (prefers-color-scheme: dark) { :root[data-palette="black"][data-appearance="auto"] {--palette-ground: #111214; --palette-panel: #1d1f23; --palette-soft: #191b1f;} }

:root
{
	--ui-color-scheme: light;
	--panel-header-bg: var(--palette-header);
	--panel-header-text: var(--palette-header-ink);
	color-scheme: var(--ui-color-scheme);
	--page-bg: var(--palette-ground);
	--page-text: var(--palette-ink);
	--page-link: var(--palette-link);
	--page-link-hover: var(--palette-link-hover);
	--legacy-table-text: var(--palette-ink);
	--legacy-panel-bg: var(--palette-panel);
	--legacy-panel-border: var(--palette-frame);
	--legacy-header-bg: var(--palette-header);
	--legacy-header-text: var(--palette-header-ink);
	--legacy-input-bg: var(--palette-input);
	--legacy-input-border: var(--palette-control);
	--toolbar-bg: var(--palette-soft);
	--toolbar-hover-bg: var(--palette-muted);
	--toolbar-button-border: var(--palette-control);
	--toolbar-pressed-border: var(--palette-frame);
	--chat-bg-top: var(--palette-ground);
	--chat-bg-bottom: var(--palette-ground);
	--chat-panel: var(--palette-panel);
	--chat-panel-border: var(--palette-frame);
	--chat-panel-shadow: rgba(0, 0, 0, 0.12);
	--chat-accent: var(--palette-primary);
	--chat-accent-strong: var(--palette-primary-hover);
	--chat-input-bg: var(--palette-input);
	--surface-strong: var(--palette-panel);
	--surface-soft: var(--palette-soft);
	--surface-subtle: var(--palette-subtle);
	--surface-muted: var(--palette-muted);
	--surface-muted-2: var(--palette-ground);
	--surface-accent: var(--palette-warm);
	--surface-accent-2: var(--palette-warm-2);
	--surface-card: var(--palette-panel);
	--surface-card-alt: var(--palette-soft);
	--surface-card-alt-2: var(--palette-subtle);
	--border-soft: var(--palette-border);
	--border-soft-2: var(--palette-control);
	--border-soft-3: var(--palette-control);
	--text-strong: var(--palette-ink);
	--text-muted: var(--palette-secondary);
	--text-soft: var(--palette-faint);
	--text-soft-2: var(--palette-secondary);
	--auth-bg: var(--palette-ground);
	--auth-surface: var(--palette-soft);
	--auth-surface-strong: var(--palette-panel);
	--auth-surface-muted: var(--palette-subtle);
	--auth-border: var(--palette-border);
	--auth-border-strong: var(--palette-control);
	--auth-text: var(--palette-ink);
	--auth-text-muted: var(--palette-secondary);
	--auth-text-soft: var(--palette-faint);
	--auth-primary: var(--palette-primary);
	--primary-button-text: var(--palette-primary-ink);
	--auth-primary-strong: var(--palette-primary-hover);
	--auth-primary-soft: var(--palette-warm);
	--auth-input-bg: var(--palette-input);
	--auth-input-border: var(--palette-control);
	--auth-input-border-focus: var(--palette-link);
	--auth-shadow: none;
	--auth-radius: 6px;
	--input-inset-highlight: rgba(255, 255, 255, 0.92);
	--auth-hero-band: var(--palette-header);
	--auth-page-top: var(--palette-ground);
	--auth-link: var(--palette-link);
	--auth-link-hover: var(--palette-link-hover);
	--modal-surface: var(--palette-panel);
	--modal-close-bg: var(--palette-muted);
	--modal-close-bg-hover: var(--palette-header);
	--scrollbar-track: var(--palette-ground);
	--scrollbar-thumb: var(--palette-control);
	--scrollbar-thumb-hover: var(--palette-frame);
	--button-secondary-top: var(--palette-panel);
	--button-secondary-bottom: var(--palette-soft);
	--button-secondary-hover-bottom: var(--palette-muted);
	--state-allowed-bg: rgba(24, 126, 71, 0.14);
	--state-allowed-text: #19633f;
	--state-denied-bg: rgba(175, 48, 48, 0.12);
	--state-denied-text: #9b3434;
	--state-default-bg: var(--palette-muted);
	--state-default-text: var(--palette-secondary);
	--error-bg: rgba(141, 29, 29, 0.08);
	--error-bg-strong: rgba(141, 29, 29, 0.14);
	--error-border: rgba(209, 75, 75, 0.65);
	--error-text: #7f2020;
	--error-text-soft: #9f4a4a;
	--admin-main-top: var(--palette-panel);
	--admin-main-bottom: var(--palette-soft);
	--admin-frame-bg: var(--palette-soft);
	--admin-sidebar-top: var(--palette-header);
	--admin-sidebar-bottom: var(--palette-header);
	--admin-menu-link: var(--palette-link);
	--admin-menu-link-active: var(--palette-header-ink);
	--admin-menu-link-active-bar: var(--palette-primary);
}

:root[data-appearance="dark"]
{
	--ui-color-scheme: dark;
	--panel-header-bg: var(--palette-header);
	--panel-header-text: var(--palette-header-ink);
	--page-bg: var(--palette-ground);
	--page-text: var(--palette-ink);
	--page-link: var(--palette-link);
	--page-link-hover: var(--palette-link-hover);
	--legacy-table-text: var(--palette-ink);
	--legacy-panel-bg: var(--palette-panel);
	--legacy-panel-border: var(--palette-frame);
	--legacy-header-bg: var(--palette-header);
	--legacy-header-text: var(--palette-header-ink);
	--legacy-input-bg: var(--palette-input);
	--legacy-input-border: var(--palette-control);
	--toolbar-bg: var(--palette-soft);
	--toolbar-hover-bg: var(--palette-muted);
	--toolbar-button-border: var(--palette-control);
	--toolbar-pressed-border: var(--palette-frame);
	--chat-bg-top: var(--palette-ground);
	--chat-bg-bottom: var(--palette-ground);
	--chat-panel: var(--palette-panel);
	--chat-panel-border: var(--palette-frame);
	--chat-panel-shadow: rgba(0, 0, 0, 0.4);
	--chat-accent: var(--palette-primary);
	--chat-accent-strong: var(--palette-primary-hover);
	--chat-input-bg: var(--palette-input);
	--surface-strong: var(--palette-panel);
	--surface-soft: var(--palette-soft);
	--surface-subtle: var(--palette-subtle);
	--surface-muted: var(--palette-muted);
	--surface-muted-2: var(--palette-ground);
	--surface-accent: var(--palette-warm);
	--surface-accent-2: var(--palette-warm-2);
	--surface-card: var(--palette-panel);
	--surface-card-alt: var(--palette-soft);
	--surface-card-alt-2: var(--palette-subtle);
	--border-soft: var(--palette-border);
	--border-soft-2: var(--palette-control);
	--border-soft-3: var(--palette-control);
	--text-strong: var(--palette-ink);
	--text-muted: var(--palette-secondary);
	--text-soft: var(--palette-faint);
	--text-soft-2: var(--palette-secondary);
	--auth-bg: var(--palette-ground);
	--auth-surface: var(--palette-soft);
	--auth-surface-strong: var(--palette-panel);
	--auth-surface-muted: var(--palette-subtle);
	--auth-border: var(--palette-border);
	--auth-border-strong: var(--palette-control);
	--auth-text: var(--palette-ink);
	--auth-text-muted: var(--palette-secondary);
	--auth-text-soft: var(--palette-faint);
	--auth-primary: var(--palette-primary);
	--primary-button-text: var(--palette-primary-ink);
	--auth-primary-strong: var(--palette-primary-hover);
	--auth-primary-soft: var(--palette-warm);
	--auth-input-bg: var(--palette-input);
	--auth-input-border: var(--palette-control);
	--auth-input-border-focus: var(--palette-link);
	--auth-shadow: none;
	--auth-hero-band: var(--palette-header);
	--auth-page-top: var(--palette-ground);
	--auth-link: var(--palette-link);
	--auth-link-hover: var(--palette-link-hover);
	--input-inset-highlight: rgba(255, 255, 255, 0.04);
	--modal-surface: var(--palette-panel);
	--modal-close-bg: var(--palette-muted);
	--modal-close-bg-hover: var(--palette-header);
	--scrollbar-track: var(--palette-ground);
	--scrollbar-thumb: var(--palette-control);
	--scrollbar-thumb-hover: var(--palette-frame);
	--button-secondary-top: var(--palette-panel);
	--button-secondary-bottom: var(--palette-soft);
	--button-secondary-hover-bottom: var(--palette-muted);
	--state-allowed-bg: rgba(34, 197, 94, 0.16);
	--state-allowed-text: #71dfa0;
	--state-denied-bg: rgba(239, 68, 68, 0.16);
	--state-denied-text: #ff9696;
	--state-default-bg: var(--palette-muted);
	--state-default-text: var(--palette-secondary);
	--error-bg: rgba(137, 39, 59, 0.18);
	--error-bg-strong: rgba(137, 39, 59, 0.26);
	--error-border: rgba(216, 92, 114, 0.7);
	--error-text: #ff9aaa;
	--error-text-soft: #f3b7c1;
	--admin-main-top: var(--palette-panel);
	--admin-main-bottom: var(--palette-soft);
	--admin-frame-bg: var(--palette-soft);
	--admin-sidebar-top: var(--palette-header);
	--admin-sidebar-bottom: var(--palette-header);
	--admin-menu-link: var(--palette-link);
	--admin-menu-link-active: var(--palette-header-ink);
	--admin-menu-link-active-bar: var(--palette-primary);
}

@media (prefers-color-scheme: dark)
{
	:root[data-appearance="auto"]
	{
		--ui-color-scheme: dark;
		--panel-header-bg: var(--palette-header);
		--panel-header-text: var(--palette-header-ink);
		--page-bg: var(--palette-ground);
		--page-text: var(--palette-ink);
		--page-link: var(--palette-link);
		--page-link-hover: var(--palette-link-hover);
		--legacy-table-text: var(--palette-ink);
		--legacy-panel-bg: var(--palette-panel);
		--legacy-panel-border: var(--palette-frame);
		--legacy-header-bg: var(--palette-header);
		--legacy-header-text: var(--palette-header-ink);
		--legacy-input-bg: var(--palette-input);
		--legacy-input-border: var(--palette-control);
		--toolbar-bg: var(--palette-soft);
		--toolbar-hover-bg: var(--palette-muted);
		--toolbar-button-border: var(--palette-control);
		--toolbar-pressed-border: var(--palette-frame);
		--chat-bg-top: var(--palette-ground);
		--chat-bg-bottom: var(--palette-ground);
		--chat-panel: var(--palette-panel);
		--chat-panel-border: var(--palette-frame);
		--chat-panel-shadow: rgba(0, 0, 0, 0.4);
		--chat-accent: var(--palette-primary);
		--chat-accent-strong: var(--palette-primary-hover);
		--chat-input-bg: var(--palette-input);
		--surface-strong: var(--palette-panel);
		--surface-soft: var(--palette-soft);
		--surface-subtle: var(--palette-subtle);
		--surface-muted: var(--palette-muted);
		--surface-muted-2: var(--palette-ground);
		--surface-accent: var(--palette-warm);
		--surface-accent-2: var(--palette-warm-2);
		--surface-card: var(--palette-panel);
		--surface-card-alt: var(--palette-soft);
		--surface-card-alt-2: var(--palette-subtle);
		--border-soft: var(--palette-border);
		--border-soft-2: var(--palette-control);
		--border-soft-3: var(--palette-control);
		--text-strong: var(--palette-ink);
		--text-muted: var(--palette-secondary);
		--text-soft: var(--palette-faint);
		--text-soft-2: var(--palette-secondary);
		--auth-bg: var(--palette-ground);
		--auth-surface: var(--palette-soft);
		--auth-surface-strong: var(--palette-panel);
		--auth-surface-muted: var(--palette-subtle);
		--auth-border: var(--palette-border);
		--auth-border-strong: var(--palette-control);
		--auth-text: var(--palette-ink);
		--auth-text-muted: var(--palette-secondary);
		--auth-text-soft: var(--palette-faint);
		--auth-primary: var(--palette-primary);
		--primary-button-text: var(--palette-primary-ink);
		--auth-primary-strong: var(--palette-primary-hover);
		--auth-primary-soft: var(--palette-warm);
		--auth-input-bg: var(--palette-input);
		--auth-input-border: var(--palette-control);
		--auth-input-border-focus: var(--palette-link);
		--auth-shadow: none;
		--auth-hero-band: var(--palette-header);
		--auth-page-top: var(--palette-ground);
		--auth-link: var(--palette-link);
		--auth-link-hover: var(--palette-link-hover);
		--input-inset-highlight: rgba(255, 255, 255, 0.04);
		--modal-surface: var(--palette-panel);
		--modal-close-bg: var(--palette-muted);
		--modal-close-bg-hover: var(--palette-header);
		--scrollbar-track: var(--palette-ground);
		--scrollbar-thumb: var(--palette-control);
		--scrollbar-thumb-hover: var(--palette-frame);
		--button-secondary-top: var(--palette-panel);
		--button-secondary-bottom: var(--palette-soft);
		--button-secondary-hover-bottom: var(--palette-muted);
		--state-allowed-bg: rgba(34, 197, 94, 0.16);
		--state-allowed-text: #71dfa0;
		--state-denied-bg: rgba(239, 68, 68, 0.16);
		--state-denied-text: #ff9696;
		--state-default-bg: var(--palette-muted);
		--state-default-text: var(--palette-secondary);
		--error-bg: rgba(137, 39, 59, 0.18);
		--error-bg-strong: rgba(137, 39, 59, 0.26);
		--error-border: rgba(216, 92, 114, 0.7);
		--error-text: #ff9aaa;
		--error-text-soft: #f3b7c1;
		--admin-main-top: var(--palette-panel);
		--admin-main-bottom: var(--palette-soft);
		--admin-frame-bg: var(--palette-soft);
		--admin-sidebar-top: var(--palette-header);
		--admin-sidebar-bottom: var(--palette-header);
		--admin-menu-link: var(--palette-link);
		--admin-menu-link-active: var(--palette-header-ink);
		--admin-menu-link-active-bar: var(--palette-primary);
	}
}

body.chat-page
{
	margin: 0;
	min-height: 100vh;
	background: var(--surface-muted-2);
}

body.auth-page
{
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 24px 16px 32px;
	box-sizing: border-box;
	background: var(--surface-muted-2);
	color: var(--auth-text);
}

body.auth-page a
{
	color: var(--auth-link);
}

body.auth-page a:hover
{
	color: var(--auth-link-hover);
}

.auth-screen
{
	inline-size: 100%;
	max-inline-size: 87.5rem;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding-top: 4px;
	padding-inline: 20px;
	box-sizing: border-box;
}

.auth-shell-header
{
	/* Links and focus rings must contrast with this surface, not the page. */
	--auth-link: var(--panel-header-text);
	--auth-link-hover: var(--panel-header-text);
	--auth-input-border-focus: var(--panel-header-text);
	display: flex;
	min-block-size: 44px;
	box-sizing: border-box;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 14px 24px;
	border-bottom: 3px solid var(--palette-control);
	border-radius: 6px 6px 0 0;
	background: var(--panel-header-bg);
	color: var(--panel-header-text);
}

.auth-shell-brand
{
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--auth-link);
}

.auth-shell-brand__name
{
	font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
	font-weight: bold;
	color: inherit;
}

.auth-shell-mark
{
	flex: none;
	color: inherit;
}

.auth-shell-header :is(.auth-language-link, .auth-language-current)
{
	min-block-size: 44px;
	box-sizing: border-box;
}

.auth-shell-header .auth-language-link.is-active
{
	background: transparent;
	border-color: transparent;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.auth-public-header .auth-shell-header
{
	border-block-end: 0;
}

.auth-public-header
{
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--auth-surface);
}
.auth-public-header .auth-shell-header {border-radius: 7px 7px 0 0;}
.auth-public-header .auth-shell-header:last-child {border-radius: 7px;}

.auth-header-tools,
.auth-language-current
{
	display: flex;
	align-items: center;
	gap: 12px;
}

.auth-header-tools
{
	flex-wrap: wrap;
	justify-content: flex-end;
}

.auth-language-current {gap: 5px; font-size: .875rem; min-block-size: 44px;}

#waiting-room-form button:disabled
{
	cursor: default;
	background: var(--button-secondary-bottom);
	color: var(--auth-primary);
	opacity: .65;
}

.auth-public-nav
{
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
	padding-inline: 14px;
	background: var(--auth-surface);
	border-radius: 0 0 7px 7px;
}

body.auth-page .auth-public-nav a
{
	display: inline-flex;
	align-items: center;
	min-block-size: 44px;
	box-sizing: border-box;
	padding: 8px 10px;
	border-block-end: 3px solid transparent;
	font-size: .875rem;
	font-weight: 600;
	color: var(--palette-ink);
}

body.auth-page .auth-public-nav a[aria-current="page"]
{
	border-block-end-color: currentColor;
}

.auth-public-nav__news
{
	margin-inline-start: auto;
}

body.auth-page .auth-public-nav a:hover
{
	text-decoration: underline;
	text-underline-offset: 4px;
}

body.auth-page .auth-public-nav a:focus-visible
{
	outline-color: var(--palette-ink);
	outline-offset: -4px;
}

.auth-shell-brand__tag
{
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.76);
	display: none;
}

.auth-language-switcher
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	align-items: center;
}

.auth-language-link
{
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 5px;
	min-width: 0;
	padding: 5px 9px;
	border: 1px solid transparent;
	border-radius: 2px;
	background: transparent;
	color: var(--auth-link);
	font-size: 0.82rem;
	font-weight: bold;
}

.auth-language-form
{
	margin: 0;
}

body.auth-page button.auth-language-link
{
	appearance: none;
	cursor: pointer;
	font: inherit;
}

:is(.auth-language-link, .auth-language-current) img
{
	inline-size: 18px;
	block-size: auto;
	display: block;
}

.auth-language-link.is-active
{
	background: transparent;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.auth-grid
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) 240px;
	gap: 16px;
	align-items: start;
	margin-top: 0;
}

.auth-section-stack
{
	min-width: 0;
}

.auth-grid--single
{
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
}

.auth-grid--single > *
{
	width: 100%;
}

.auth-card
{
	background: var(--auth-surface-strong);
	border: 1px solid var(--auth-border);
	border-radius: 6px;
	box-shadow: none;
	overflow: visible;
}

.auth-card__head
{
	padding: 20px 24px;
	border-bottom: 1px solid var(--auth-border);
	background: var(--surface-card-alt);
}

.auth-card__title
{
	margin: 0;
	font-size: 1.375rem;
	line-height: 1.3;
	overflow-wrap: anywhere;
	color: var(--auth-text);
}

.auth-card__text
{
	margin: 10px 0 0;
	color: var(--auth-text-muted);
	font-size: .9375rem;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.auth-card__body
{
	padding: 24px;
	font-size: .9375rem;
	line-height: 1.6;
}

.auth-login-layout
{
	--login-panel-padding: clamp(16px, 1.5vw, 20px);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(20rem, 28rem);
	grid-template-rows: max-content 1fr;
	gap: 16px 24px;
	align-items: start;
}

.auth-welcome,
.auth-community
{
	grid-column: 1;
	min-inline-size: 0;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--auth-surface);
	overflow: hidden;
}

.auth-welcome {grid-row: 1; position: relative;}
.auth-community {grid-row: 1;}
.auth-login-layout > .auth-welcome ~ .auth-community {grid-row: 2;}
.auth-community > section:first-child {border-block-start: 0;}

.auth-login-layout > .auth-login-card
{
	grid-column: 2;
	grid-row: 1;
	min-inline-size: 0;
}

.auth-login-rail
{
	grid-column: 2;
	grid-row: 1 / 3;
	display: grid;
	gap: 14px;
	min-inline-size: 0;
}

.auth-login-layout > .auth-welcome ~ .auth-login-card {grid-row: 1 / 3;}
.auth-community > .auth-welcome {border: 0; border-radius: 0;}

.auth-welcome__image
{
	display: block;
	inline-size: 100%;
	block-size: auto;
}

.auth-welcome__caption
{
	padding: 20px 24px 22px;
	border-block-start: 1px solid var(--auth-border);
	background: var(--surface-card-alt);
}

:is(.auth-welcome, .auth-community) h2
{
	margin: 0;
	color: var(--auth-text);
	font-size: 1.125rem;
	line-height: 1.35;
}

.auth-welcome h2
{
	font-size: clamp(1.5rem, 1.25rem + .7vw, 2rem);
}

:is(.auth-welcome, .auth-community) p
{
	margin: 12px 0 0;
	color: var(--auth-text-muted);
	font-size: .9375rem;
	line-height: 1.6;
}

@media (min-width: 601px)
{
	.auth-login-layout > .auth-welcome > .auth-welcome__caption
	{
		position: absolute;
		inset-block-end: 16px;
		inset-inline-start: 16px;
		max-inline-size: calc(100% - 32px);
		padding: 14px 18px;
		border: 1px solid rgb(255 255 255 / .22);
		border-radius: 6px;
		background: rgb(10 19 31 / .83);
	}

	.auth-login-layout > .auth-welcome > .auth-welcome__caption :is(h2, p) {color: #fff;}
	.auth-login-layout > .auth-welcome > .auth-welcome__caption p {margin-block-start: 6px;}
}

.auth-lounge,
.auth-news
{
	padding: 24px;
	border-block-start: 1px solid var(--auth-border);
}

.auth-lounge__heading
{
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
}

.auth-online-count
{
	color: var(--auth-text-muted);
	font-size: .875rem;
	font-variant-numeric: tabular-nums;
}

.auth-online-users
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.auth-avatar
{
	display: grid;
	place-items: center;
	inline-size: 48px;
	block-size: 48px;
	border: 1px solid var(--auth-border);
	border-radius: 50%;
	overflow: hidden;
	background: var(--surface-soft);
	color: var(--auth-text);
	font-size: 1.125rem;
	font-weight: 700;
}

.auth-avatar-trigger
{
	padding: 0;
	cursor: pointer;
}

.auth-avatar-trigger:is(:hover, :focus-visible)
{
	outline: 2px solid var(--auth-link);
	outline-offset: 2px;
}

.auth-avatar img
{
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.auth-avatar--large
{
	inline-size: 64px;
	block-size: 64px;
	border-radius: 6px;
	font-size: 1.5rem;
}

.auth-profile-preview
{
	inline-size: min(13.5rem, calc(100% - 24px));
	max-block-size: calc(100dvh - 24px);
	padding: 12px 14px;
	overflow: auto;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--auth-surface);
	color: var(--auth-text);
	box-shadow: 0 8px 32px rgb(0 0 0 / .24);
	overflow-wrap: anywhere;
}

.auth-profile-preview:popover-open
{
	display: grid;
	justify-items: center;
	gap: 8px;
	text-align: center;
}

.auth-profile-preview a
{
	display: grid;
	align-items: center;
	min-block-size: 44px;
	font-size: .875rem;
}

@supports (position-area: block-end center) and (position-try-fallbacks: flip-block)
{
	.auth-profile-preview
	{
		inset: auto;
		position-area: block-end center;
		margin: 8px;
		position-try-fallbacks: flip-block, --profile-preview-start, --profile-preview-end;
	}

	@position-try --profile-preview-start {position-area: block-start span-inline-end;}
	@position-try --profile-preview-end {position-area: block-start span-inline-start;}
}

@supports (position-anchor: --login-artwork) and (position-try-fallbacks: --profile-preview-art-fallback)
{
	@media (min-width: 901px)
	{
		.auth-login-layout > .auth-welcome .auth-welcome__image {anchor-name: --login-artwork;}

		.auth-login-layout:has(> .auth-welcome) .auth-profile-preview
		{
			position-anchor: --login-artwork;
			position-area: none;
			inset: auto;
			right: anchor(right);
			bottom: anchor(bottom);
			margin: 16px;
			position-try-fallbacks: --profile-preview-art-fallback;
		}
	}

	@position-try --profile-preview-art-fallback
	{
		position-anchor: auto;
		position-area: block-start center;
		inset: auto;
		margin: 8px;
	}
}

.auth-online-more
{
	align-self: center;
	color: var(--auth-text-muted);
	white-space: nowrap;
}

.auth-lounge .auth-online-room
{
	margin-block-start: 16px;
	padding-block: 0;
	border: 0;
}

.auth-lounge .auth-online-room__title
{
	margin-block-end: 10px;
	font-size: .9375rem;
}

.auth-lounge .auth-user-chip
{
	color: var(--auth-text);
	border: 0;
	background: var(--surface-soft);
}

.auth-login-register
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	column-gap: .65rem;
	margin-block-start: 8px;
	border-block-start: 1px solid var(--auth-border);
	color: var(--auth-text-muted);
	font-size: .875rem;
}

.auth-login-register p {margin: 0;}

.auth-login-register a
{
	display: inline-flex;
	align-items: center;
	min-block-size: 36px;
	font-weight: 600;
}

.auth-login-card .form-grid
{
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
}

.auth-login-card .auth-form .form-section
{
	padding: 0;
	gap: 10px;
}

.auth-login-rail .auth-card__head
{
	padding: 12px var(--login-panel-padding);
}

.auth-login-card .auth-card__body
{
	padding: 14px var(--login-panel-padding) 12px;
}

.auth-login-card .login-option-row
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 12px;
}

.auth-login-card .login-option-card
{
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.auth-login-card .auth-form .form-checkbox {min-block-size: 36px;}
.auth-login-card .form-checkbox span {white-space: normal;}

.auth-connection-options
{
	color: var(--auth-text-muted);
	font-size: .875rem;
}

.auth-connection-options summary
{
	width: fit-content;
	min-block-size: 36px;
	display: list-item;
	align-content: center;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.auth-connection-options[open] {flex-basis: 100%;}

.auth-connection-options[open] .login-option-card__line
{
	padding-block-end: 4px;
}

body.auth-page .auth-login-card .auth-form-actions
{
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
}

body.auth-page .auth-login-card input[type="submit"]
{
	min-block-size: 44px;
	font-size: 1rem;
}

body.auth-page .auth-login-card .auth-login-recovery
{
	font-size: .875rem;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.auth-password-label
{
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 12px;
}

body.auth-page .auth-login-card :is(input[type="text"], input[type="password"], select)
{
	box-sizing: border-box;
	inline-size: 100%;
	min-block-size: 44px;
	font-size: 1rem;
}

@media (pointer: coarse), (max-width: 600px)
{
	.auth-login-register a,
	.auth-login-card .auth-form .form-checkbox,
	.auth-connection-options summary {min-block-size: 44px;}
}

body.auth-page :is(a, summary, button, input, select, textarea, .install-license-text):focus-visible,
.moderation-toolbar button:focus-visible
{
	outline: 2px solid var(--auth-input-border-focus);
	outline-offset: 3px;
}

@media (max-width: 900px)
{
	.auth-login-layout {grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 16px;}
	.auth-welcome, .auth-login-layout > .auth-login-card, .auth-login-rail, .auth-community {grid-column: auto; grid-row: auto;}
	.auth-login-layout > .auth-welcome ~ :is(.auth-login-card, .auth-community) {grid-row: auto;}
	body.auth-page .auth-shell-header {padding: 16px; gap: 12px;}
	.auth-shell-mark {inline-size: 36px; block-size: 33px;}
}

@media (forced-colors: active)
{
	.auth-shell-header {border-bottom-color: CanvasText;}
	.auth-lounge, .auth-news, .auth-join {border: 1px solid CanvasText;}
	.auth-shell-header .auth-language-link.is-active {color: LinkText;}
	.auth-public-nav {background: Canvas; border: 1px solid CanvasText;}
	body.auth-page .auth-public-nav a {color: LinkText;}
	body.auth-page .auth-public-nav a[aria-current="page"] {border-block-end-color: LinkText;}
}

.auth-card__body > :first-child
{
	margin-top: 0;
}

.auth-card__body > :last-child
{
	margin-bottom: 0;
}

.auth-alert
{
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid var(--auth-border);
	background: var(--auth-surface-muted);
	color: var(--auth-text-muted);
}

.auth-alert--error
{
	border-color: var(--error-border);
	background: var(--error-bg);
	color: var(--error-text);
}

#install-license-title
{
	font-size: clamp(1.3rem, 6vw, 1.75rem);
}

.install-license-text
{
	margin: 0 0 1rem;
	padding: clamp(12px, 4vw, 18px);
	max-block-size: min(420px, 55dvh);
	overflow: auto;
	border: 1px solid var(--auth-border);
	border-radius: 10px;
	background: var(--auth-input-bg);
	color: var(--auth-text);
	font: 0.92rem/1.55 "IBM Plex Mono", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.auth-hero-links
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.auth-button,
.auth-pill-link
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 0.72rem 1.1rem;
	border: 1px solid var(--auth-border-strong);
	border-radius: 5px;
	background: var(--button-secondary-bottom);
	color: var(--auth-primary);
	font-weight: 600;
	box-shadow: none;
}

body.auth-page a.auth-button,
body.auth-page a.auth-pill-link
{
	color: var(--auth-primary);
}

.auth-button:hover,
.auth-pill-link:hover
{
	background: var(--button-secondary-hover-bottom);
	color: var(--auth-primary-strong);
}

.auth-button--primary
{
	background: var(--auth-primary);
	border-color: var(--auth-primary-strong);
	color: var(--primary-button-text);
	box-shadow: none;
}

body.auth-page a.auth-button--primary
{
	color: var(--primary-button-text);
}

.auth-button--primary:hover
{
	background: var(--auth-primary-strong);
	color: var(--primary-button-text);
}

.auth-button--ghost
{
	background: var(--button-secondary-bottom);
	box-shadow: none;
}

body.auth-page a.auth-button--ghost
{
	color: var(--auth-primary);
}

.auth-section-stack
{
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.auth-sidebar-card
{
	padding: 16px;
}

.auth-sidebar-card__title
{
	margin: 0 0 10px;
	font-size: 1rem;
	color: var(--auth-text);
}

.auth-online-room
{
	padding: 12px 0;
	border-top: 1px solid rgba(202, 214, 223, 0.8);
}

.auth-online-room:first-of-type
{
	border-top: 0;
	padding-top: 0;
}

.auth-online-room__title
{
	margin: 0 0 8px;
	font-weight: bold;
	color: var(--auth-text);
}

.auth-online-room__users
{
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.auth-user-chip
{
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.6rem;
	border-radius: 4px;
	background: var(--surface-muted);
	border: 1px solid var(--border-soft);
	color: var(--auth-primary);
	font-size: 0.9rem;
}

.auth-form
{
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.auth-form .form-card
{
	padding: 0;
	border: 0;
	background: transparent;
}

.auth-form .form-label
{
	font-size: 0.875rem;
	letter-spacing: normal;
	text-transform: none;
	color: var(--auth-text);
}

.auth-form .form-checkbox {min-block-size: 44px;}

.auth-form .form-note
{
	margin: 0;
	font-size: .875rem;
	line-height: 1.6;
}

.form-required-indicator {color: var(--error-text);}

.form-required-note
{
	margin: 1.25rem 0 0;
	color: var(--auth-text-muted);
	font-size: .875rem;
}

.auth-form .form-section {gap: 16px;}
.auth-form .field-status:empty {display: none;}
.auth-form .auth-inline-fields
{
	grid-template-columns: 3.25rem minmax(0, 10rem) 4rem;
	align-items: stretch;
}
.auth-card--entry .fullsize {inline-size: 100%;}

.auth-registration-options
{
	border-block: 1px solid var(--auth-border);
}

.auth-registration-options > summary
{
	min-block-size: 3rem;
	align-content: center;
	padding-block: .375rem;
	box-sizing: border-box;
	color: var(--auth-link);
	cursor: pointer;
	font-weight: 600;
}

.auth-registration-options > .form-section
{
	padding-block: .75rem 1rem;
}

.auth-registration-options > .form-section + .form-section
{
	border-block-start: 1px solid var(--auth-border);
}

@media (max-width: 600px)
{
	.auth-card--entry :is(.auth-card__head, .auth-card__body) {padding: .875rem;}
	.auth-card--entry .auth-card__title {font-size: 1.25rem;}
	.auth-card--entry .auth-form {gap: .875rem;}
}

.form-date {min-inline-size: 0; margin: 0; padding: 0; border: 0;}
.form-date > legend {margin-block-end: 6px;}
.auth-form .form-section__title
{
	border: 0;
	padding: 0;
	font-size: 1.0625rem;
}

.auth-form > .form-card + .form-card
{
	padding-block-start: 24px;
	border-block-start: 1px solid var(--auth-border);
}

.auth-card__body .auth-info-item
{
	padding: 0;
	border: 0;
	background: transparent;
	font-size: .9375rem;
	line-height: 1.6;
}

.auth-card__body .auth-info-list {gap: 16px;}

.auth-hero-links .auth-inline-link
{
	min-block-size: 24px;
	display: inline-flex;
	align-items: center;
}

@media (pointer: coarse)
{
	body.auth-page .auth-shell-header :is(.auth-language-link, .auth-language-current)
	{
		min-block-size: 48px;
	}

	:is(.auth-language-link, .auth-hero-links .auth-inline-link)
	{
		min-block-size: 44px;
	}

	.auth-shell-header
	{
		min-block-size: 56px;
	}

	.auth-form .form-checkbox,
	body.auth-page .auth-form .auth-form-actions > *,
	body.auth-page form.auth-form-actions > .auth-button
	{
		min-block-size: 48px;
	}

	body.auth-page .auth-form :is(input:not([type]), input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="search"], input[type="number"], select, textarea)
	{
		font-size: 1rem;
	}
}

.auth-form-actions
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
}

.auth-form-actions--center
{
	justify-content: center;
}

.auth-form-meta
{
	text-align: center;
	color: var(--auth-text-muted);
}

.auth-footer
{
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 20px;
	align-items: center;
	padding: 12px 2px 0;
	border-block-start: 1px solid var(--auth-border);
	color: var(--text-muted);
}

body.auth-page .auth-footer a
{
	color: inherit;
}

.auth-footer p
{
	margin: 0;
}

.auth-footer__links
{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 0.45em;
}

.auth-footer__link
{
	display: inline-flex;
	align-items: baseline;
	gap: 0.45em;
}

@media (max-width: 600px)
{
	.auth-footer {flex-direction: column; text-align: center;}
}

.auth-policy p
{
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.auth-policy h2
{
	margin-block: 1.5em .5em;
	font-size: 1.125rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.palette-preferences
{
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.palette-preferences legend {padding: 0; margin-block-end: 8px; font-weight: 600;}
.palette-preferences__options {max-inline-size: 42rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px;}
.palette-preferences__choice {display: flex; align-items: center; gap: 10px; min-block-size: 48px; cursor: pointer;}
.palette-preferences__choice input {margin: 0; flex: none;}
.palette-preferences__default {grid-column: 1 / -1;}
.palette-preferences__swatch {inline-size: 20px; block-size: 20px; flex: none; border: 1px solid var(--auth-border-strong); border-radius: 50%; background: var(--palette-swatch);}
[data-palette-choice="lime"] {--palette-swatch: #cdf58b;}
[data-palette-choice="forest"] {--palette-swatch: #7dd8a4;}
[data-palette-choice="ocean"] {--palette-swatch: #9ce3fa;}
[data-palette-choice="blue"] {--palette-swatch: #79b3ff;}
[data-palette-choice="violet"] {--palette-swatch: #d8bcff;}
[data-palette-choice="purple"] {--palette-swatch: #c596f6;}
[data-palette-choice="rose"] {--palette-swatch: #ffbdd4;}
[data-palette-choice="red"] {--palette-swatch: #ff8993;}
[data-palette-choice="amber"] {--palette-swatch: #ffd18b;}
[data-palette-choice="yellow"] {--palette-swatch: #ffe36b;}
[data-palette-choice="silver"] {--palette-swatch: #dfe7e2;}
[data-palette-choice="black"] {--palette-swatch: #16181b;}
[data-palette-choice="wine"] {--palette-swatch: #bf84a5;}

@media (forced-colors: active)
{
	.palette-preferences__swatch {display: none;}
}

.auth-success-card
{
	max-width: none;
	margin: 0;
	width: 100%;
}

.auth-news-grid
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: 16px;
}

.auth-news-grid--latest {margin-block-start: 14px;}
.auth-login-news__list
{
	list-style: none;
	margin: 0;
	padding: 0 var(--login-panel-padding);
}

.auth-login-news__list li + li {border-block-start: 1px solid var(--auth-border);}

.auth-login-news__link
{
	display: grid;
	align-content: center;
	gap: 2px;
	min-block-size: 48px;
	padding-block: 6px;
	overflow-wrap: anywhere;
}

.auth-login-news__link time {color: var(--auth-text-muted); font-size: .75rem;}
.auth-login-news__link span {font-size: .9375rem; font-weight: 600;}
.auth-login-news__link:is(:hover, :focus-visible) span {text-decoration: underline;}

.auth-news-grid--index > :first-child {grid-column: 1 / -1;}
.auth-news-entry {min-inline-size: 0;}

.auth-news-entry__link
{
	display: block;
	block-size: 100%;
	overflow: hidden;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--surface-card-alt);
	color: var(--auth-text);
	text-decoration: none;
}

.auth-news-entry__link:is(:hover, :focus-visible) h3 {text-decoration: underline;}
.auth-news-entry__copy {padding: 14px 16px; overflow-wrap: anywhere;}
.auth-news-entry h3 {margin: 0; font-size: 1.125rem;}
.auth-news-entry .auth-news__date {margin: 6px 0 0; color: var(--auth-text-muted); font-size: .875rem;}
.auth-news-excerpt {display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;}
.auth-news-thumb {display: block; inline-size: 100%; aspect-ratio: 16 / 9; object-fit: cover;}
@media (min-width: 720px)
{
	.auth-news-grid--index > :first-child .auth-news-entry__link:has(.auth-news-thumb)
	{
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		align-items: center;
	}

	.auth-news-grid--index > :first-child .auth-news-entry__copy {padding: 22px 26px;}
	.auth-news-grid--index > :first-child h3 {font-size: 1.5rem;}
}
.auth-news-back {display: inline-block; margin-block-end: 8px;}
.auth-news-entry__body {font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere;}
.auth-news-entry__body img {max-inline-size: 100%; block-size: auto;}
.auth-news-cover {display: block; margin-block-end: 24px;}
.auth-not-found {text-align: center;}
.auth-not-found .auth-card__body {padding-block: clamp(28px, 8vw, 88px);}
.auth-not-found__code {margin: 0 0 10px; color: var(--auth-link); font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 700; line-height: 1;}
.auth-not-found .auth-button {margin-block-start: 8px;}
.admin-news-editor h2 {margin-block-start: 0;}
.admin-news-format:not([hidden]) {display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 6px;}
.admin-news-format button {min-height: 36px; padding: 4px 10px;}
.admin-news-preview {margin-block-start: 20px; padding: 16px; border: 1px solid var(--auth-border);}

.auth-info-list
{
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.auth-info-item
{
	padding: 14px 16px;
	border-radius: 5px;
	background: var(--auth-surface-strong);
	border: 1px solid rgba(202, 214, 223, 0.85);
}

.auth-inline-link
{
	color: var(--auth-link);
	font-weight: 600;
}

.chat-shell
{
	height: 100vh;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 6px;
	box-sizing: border-box;
	overflow: clip;
}

.chat-main
{
	flex: 1 1 0%;
	display: flex;
	gap: 6px;
	min-height: 0;
}

.chat-titlebar
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-block-size: 28px;
	padding-inline: 10px;
	color: var(--text-strong);
}

.chat-titlebar h1
{
	min-inline-size: 0;
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.gtchat-private-back-icon {display: none;}

.chat-account
{
	flex: 0 0 auto;
	min-block-size: 28px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.chat-account:hover
{
	background: var(--surface-strong);
}

:is(.chat-account, .chat-user-action, .chat-sidecard__toggle, .chat-toolbutton, .chat-mobile-toggle,
	.chat-toolbar__collapse, .chat-restore-button):focus-visible
{
	outline: 2px solid var(--auth-primary);
	outline-offset: 2px;
}

@media (pointer: coarse)
{
	:is(.chat-account, .chat-user-action, .chat-sidecard__toggle)
	{
		min-inline-size: 44px;
		min-block-size: 44px;
	}

	.chat-room-item,
	.chat-room-item__count
	{
		min-block-size: 44px;
		min-inline-size: 44px;
	}
}

.chat-stream
{
	flex: 1 1 auto;
	min-width: 0;
	background: var(--page-bg);
	border: 1px solid var(--chat-panel-border);
	border-radius: 3px;
	box-shadow: none;
	overflow: hidden;
}

.chat-frame
{
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: var(--page-bg);
}

.chat-sidebar
{
	flex: 0 0 260px;
	min-width: 220px;
	max-width: 300px;
	padding: 0;
	box-sizing: border-box;
	background: var(--surface-card);
	border: 1px solid var(--chat-panel-border);
	border-radius: 3px;
	box-shadow: none;
	overflow: auto;
	overscroll-behavior-y: contain;
	transition: flex-basis 0.2s ease, min-width 0.2s ease, max-width 0.2s ease, padding 0.2s ease;
}

.chat-sidebar.chat-sidebar-collapsed
{
	flex-basis: 132px;
	min-width: 132px;
	max-width: 132px;
	padding: 0;
	overflow: auto;
}

#chat-sidebar-content
{
	display: flex;
	flex-direction: column;
	gap: 0;
	min-height: 0;
}

.chat-restore
{
	display: flex;
	justify-content: center;
}

.chat-restore-button
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0.45rem 0.8rem;
	border: 1px solid var(--border-soft-2);
	border-radius: 3px;
	background: var(--surface-strong);
	color: var(--auth-primary);
	font: inherit;
	cursor: pointer;
	inline-size: 100%;
	min-inline-size: 0;
	min-block-size: 44px;
	justify-content: flex-start;
	text-align: start;
	overflow-wrap: anywhere;
}

.chat-restore-button img
{
	width: 12px;
	height: 12px;
}

.chat-sidecard
{
	display: flex;
	flex-direction: column;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	overflow: hidden;
}

.chat-sidecard__header
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 8px;
	background: var(--panel-header-bg);
	color: var(--panel-header-text);
}

.chat-sidecard__headline
{
	min-width: 0;
}

.chat-sidecard__title
{
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.2;
	font-weight: 600;
	color: inherit;
}

.chat-sidecard__meta
{
	margin: 3px 0 0;
	font-size: 0.75rem;
	color: inherit;
}

.chat-sidecard__toggle
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--border-soft-2);
	border-radius: 2px;
	background: var(--surface-strong);
	cursor: pointer;
}

.chat-sidecard__toggle img
{
	width: 12px;
	height: 12px;
}

.chat-sidecard__body
{
	padding: 4px;
}

.chat-room-list,
.chat-user-list
{
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.chat-room-item,
.chat-room-item.is-active
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 6px;
	border: 0;
	border-radius: 2px;
	background: transparent;
	color: var(--auth-text);
	box-shadow: none;
}

.chat-room-item
{
	text-decoration: none;
}

.chat-room-item:hover
{
	border-color: var(--auth-border-strong);
	background: var(--surface-soft);
	color: var(--auth-primary);
}

.chat-room-item.is-active
{
	background: var(--surface-muted);
	box-shadow: none;
}

.chat-room-item__name
{
	font-weight: 600;
	font-size: 0.8125rem;
}

.chat-room-item__meta
{
	display: inline-flex;
	align-items: center;
}

.chat-room-item__count
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	padding: 0 4px;
	border-radius: 2px;
	background: var(--surface-muted-2);
	color: var(--auth-link);
	font-size: 0.82rem;
	font-weight: 700;
	min-height: 24px;
	font-variant-numeric: tabular-nums;
}

.chat-user-item
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 3px 6px;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.chat-user-item__main
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.chat-user-link
{
	color: var(--auth-link);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 700;
}

.chat-user-link:hover
{
	color: var(--auth-link-hover);
}

.chat-user-badge
{
	display: inline-flex;
	align-items: center;
	padding: 1px 4px;
	border-radius: 2px;
	background: var(--surface-muted);
	color: var(--text-muted);
	font-size: 0.6875rem;
	font-weight: 500;
}

.chat-user-actions
{
	display: inline-flex;
	align-items: center;
	gap: 2px;
	flex: 0 0 auto;
}

.chat-user-action
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 2px;
	background: transparent;
	cursor: pointer;
}

.chat-user-action:hover:not(:disabled)
{
	background: var(--surface-muted);
	border-color: var(--auth-border-strong);
}

.chat-user-action:disabled
{
	cursor: default;
	filter: grayscale(1);
	opacity: 0.35;
}

.chat-user-action img
{
	max-width: 14px;
	max-height: 14px;
}

.chat-footer
{
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 0;
}

.chat-input
{
	padding: 0;
}

.chat-private-strip
{
	display: flex;
	align-items: center;
	gap: 6px;
	min-inline-size: 0;
}

.chat-private-tabs
{
	display: none;
	flex: 1 1 auto;
	min-inline-size: 0;
	align-items: stretch;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	padding-top: 4px;
	padding-bottom: 2px;
	scrollbar-width: thin;
}

.chat-private-tab
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	max-width: 220px;
	min-width: 0;
	padding: 0.375rem 0.625rem;
	border: 1px solid var(--chat-panel-border);
	border-radius: 3px;
	background: var(--surface-card);
	color: var(--text-strong);
	box-shadow: none;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.chat-private-tab:hover
{
	border-color: var(--auth-input-border-focus);
	background: var(--surface-soft);
}

.chat-private-tab.is-active
{
	border-color: var(--auth-primary);
	background: var(--surface-soft);
	color: var(--auth-primary);
}

.chat-private-tab.is-unread
{
	border-color: #ba263b;
	background: var(--surface-accent);
}

.chat-private-tab__indicator
{
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	box-sizing: border-box;
	border: 1px solid var(--text-muted);
	border-radius: 50%;
}

.chat-private-tab[data-peer-online="true"] .chat-private-tab__indicator
{
	border-color: #168447;
	background: #168447;
}

.chat-private-tab[data-peer-online="false"] .chat-private-tab__indicator
{
	border: 2px solid #ba263b;
}

:root[data-appearance="dark"] .chat-private-tab[data-peer-online="true"] .chat-private-tab__indicator
{
	border-color: #70dc96;
	background: #70dc96;
}

:root[data-appearance="dark"] .chat-private-tab[data-peer-online="false"] .chat-private-tab__indicator
{
	border-color: #ff8594;
}

.chat-private-tab--overflow[hidden],
.chat-private-tab--compact[hidden]
{
	display: none;
}

.chat-private-tab__label
{
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chat-private-tab__count
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: #ba263b;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

@media (prefers-reduced-motion: no-preference)
{
	.chat-private-tab__count--new {animation: private-message-arrival 350ms ease-out 2 alternate;}

	@keyframes private-message-arrival
	{
		from {transform: scale(1);}
		to {transform: scale(1.13);}
	}
}

.chat-mobile-backdrop
{
	position: fixed;
	inset: 0;
	z-index: 80;
	background: rgba(5, 23, 33, 0.52);
	backdrop-filter: none;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.chat-mobile-backdrop.is-visible
{
	opacity: 1;
	pointer-events: auto;
}

.chat-compose-form
{
	margin: 0;
}

.chat-compose-row
{
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.chat-smiley-trigger
{
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	min-inline-size: 42px;
	min-block-size: 42px;
	padding: 0;
	border: 1px solid var(--auth-input-border);
	border-radius: 3px;
	background: var(--surface-card-alt);
	color: var(--text-strong);
	cursor: pointer;
}

.chat-smiley-picker:popover-open
{
	display: block;
	box-sizing: border-box;
	inline-size: min(20rem, calc(100% - max(8px, env(safe-area-inset-left)) - max(8px, env(safe-area-inset-right))));
	max-block-size: min(20rem, max(0px, calc(var(--smiley-edge, 65dvh) - var(--chat-visible-top, 0px) - max(8px, env(safe-area-inset-top)))));
	overflow: auto;
	overscroll-behavior: contain;
	padding: 10px;
	border: 1px solid var(--chat-panel-border);
	border-radius: 6px;
	background: var(--surface-card);
	color: var(--text-strong);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.chat-smiley-picker strong {display: block; margin-block-end: 8px;}
.chat-smiley-picker .chat-smiley-status {margin: 8px 0 2px; color: var(--text-muted);}

.chat-smiley-filter
{
	box-sizing: border-box;
	inline-size: 100%;
	min-block-size: 40px;
	margin-block-end: 8px;
	padding: 6px 8px;
	border: 1px solid var(--auth-input-border);
	border-radius: 3px;
	background: var(--chat-input-bg);
	color: var(--auth-text);
	font: inherit;
	font-size: 16px;
}

.chat-smiley-grid:not([hidden]),
.chat-smiley-row
{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
	gap: 4px;
}
.chat-smiley-row {grid-column: 1 / -1; grid-template-columns: subgrid;}
.chat-smiley-grid button {inline-size: 100%;}
.chat-smiley-picker button
{
	min-block-size: 44px;
	border: 1px solid color-mix(in srgb, var(--auth-input-border), transparent 52%);
	border-radius: 3px;
	background: var(--surface-card-alt);
	color: var(--text-strong);
	font: inherit;
	cursor: pointer;
}
.chat-smiley-trigger:hover,
.chat-smiley-picker button:hover {background: var(--surface-strong);}
:is(.chat-smiley-trigger, .chat-smiley-picker button, .chat-smiley-filter):focus-visible
{
	outline: 2px solid var(--auth-input-border-focus);
	outline-offset: -2px;
}
.chat-smiley-trigger img,
.chat-smiley-grid img {object-fit: contain; image-rendering: pixelated; vertical-align: middle;}
.chat-smiley-all {inline-size: 100%; margin-block-start: 8px;}

html[data-chat-short-viewport] .chat-smiley-picker:popover-open
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
	gap: 6px;
	align-items: start;
	padding: 6px;
}

html[data-chat-short-viewport] #chat-smiley-heading
{
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	clip-path: inset(50%);
}

html[data-chat-short-viewport] .chat-smiley-filter {margin-block-end: 0;}
html[data-chat-short-viewport] .chat-smiley-status,
html[data-chat-short-viewport] .chat-smiley-all {grid-column: 1 / -1;}

@media (pointer: coarse)
{
	.chat-smiley-trigger, .chat-smiley-filter {min-block-size: 44px;}
	.chat-smiley-trigger {min-inline-size: 44px;}
}

@supports (position-area: block-start)
{
	.chat-smiley-picker:popover-open
	{
		inset: auto;
		margin: 0 0 6px;
		position-area: block-start span-inline-start;
		position-try-fallbacks: flip-inline, flip-block;
	}
}

@supports not (position-area: block-start)
{
	.chat-smiley-picker:popover-open
	{
		inset: auto;
		inset-inline-end: max(8px, env(safe-area-inset-right));
		inset-block-start: var(--smiley-edge, 65dvh);
		margin: 0;
		transform: translateY(-100%);
	}
}

.chat-mobile-toggle,
.chat-mobile-panel-close,
.chat-smiley-picker
{
	display: none;
}

.chat-compose-row input[type="text"]
{
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	min-height: 42px;
	padding: 0.48rem 0.7rem;
	font-size: 16px;
	border: 1px solid var(--auth-input-border);
	border-radius: 4px;
	background: var(--chat-input-bg);
	color: var(--auth-text);
	box-shadow: inset 0 1px 0 var(--input-inset-highlight);
	box-sizing: border-box;
}

.chat-compose-row input[type="text"]:hover
{
	border-color: var(--auth-input-border-focus);
}

.chat-compose-row input[type="text"]:focus
{
	border-color: var(--auth-input-border-focus);
	outline: none;
	box-shadow: 0 0 0 1px rgba(70, 122, 157, 0.16);
}

.chat-submit
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	font-size: 16px;
	height: 42px;
	min-height: 42px;
	padding: 0 1.1rem;
	border: 1px solid var(--auth-primary-strong);
	border-radius: 3px;
	background: var(--auth-primary);
	color: var(--primary-button-text);
	font-weight: 600;
	cursor: pointer;
	box-shadow: none;
	box-sizing: border-box;
}

.chat-submit img
{
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.chat-submit span
{
	display: inline-block;
}

.chat-submit:hover
{
	background: var(--auth-primary-strong);
}

.chat-mobile-panel-header
{
	display: none;
}

.chat-hidden-frame
{
	position: absolute;
	width: 0;
	height: 0;
	border: 0;
	left: -9999px;
	top: -9999px;
}

.visually-hidden,
.chat-titlebar:has(#private-tabs > button) .chat-account > span:last-child,
.admin-setting-row__meta + .admin-setting-row__control > .form-choice > legend
{
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

body.chat-page #toolbar
{
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.chat-menu.popup-panel
{
	padding: 4px 6px;
	border: 1px solid var(--chat-panel-border);
	border-radius: 3px;
	background: var(--surface-card-alt);
	box-shadow: none;
}

.chat-toolbar
{
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.chat-toolbar__group
{
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	min-width: 0;
	align-items: center;
}

.chat-toolbar__section-title
{
	display: none;
}

.chat-toolbar__group--primary
{
	flex: 1 1 auto;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 2px;
	scrollbar-width: thin;
}

.chat-toolbar__group--toggles
{
	flex: 0 0 auto;
}

.chat-toolbar__group--status
{
	margin-left: auto;
	flex-wrap: nowrap;
	justify-content: flex-end;
	align-items: center;
	flex: 0 0 auto;
}

.chat-toolbutton
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--border-soft-2);
	border-radius: 2px;
	background: transparent;
	color: var(--text-strong);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.chat-toolbutton span
{
	display: none;
}

.chat-toolbutton:hover,
.chat-toolbutton.pointed
{
	border-color: var(--auth-border-strong);
	background: var(--surface-subtle);
	color: var(--auth-primary);
}

.chat-toolbutton.pressed,
.chat-toolbutton:active
{
	border-color: var(--auth-primary);
	background: var(--surface-accent-2);
	color: var(--auth-primary);
}

.chat-toolbutton:active
{
	color: var(--text-strong);
}

.chat-toolbutton img
{
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.chat-toolbutton--toggle,
.chat-toolbutton--subtle
{
	background: var(--surface-soft);
}

.chat-toolbar__collapse
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--border-soft-2);
	border-radius: 2px;
	background: transparent;
	cursor: pointer;
}

.chat-toolbar__collapse:hover
{
	background: var(--surface-subtle);
	border-color: var(--auth-border-strong);
}

.chat-toolbar__collapse img
{
	width: 12px;
	height: 12px;
}

.popup-page
{
	margin: 0;
	padding: 12px 12px 18px;
	box-sizing: border-box;
	background: var(--modal-surface);
	overflow: visible;
}

body.messages-page
{
	margin: 0;
	padding: 12px;
	font-size: 0.875rem;
	box-sizing: border-box;
	background: transparent;
}

.messages-page [data-chat-room-block]
{
	display: flow-root;
	contain-intrinsic-block-size: auto 105rem;
}

.messages-page [data-chat-room-older]:not(:focus-within)
{
	content-visibility: auto;
}

.messages-intro
{
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.messages-intro__hero
{
	padding: 0 0 10px;
	margin-bottom: 12px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	border-bottom: 1px solid var(--border-soft);
}

.messages-intro__welcome
{
	margin: 4px 0 0;
	color: var(--text-muted);
}

.messages-intro__title
{
	margin: 0;
	color: var(--text-strong);
	font-size: 0.9375rem;
	line-height: 1.4;
}

.messages-intro__topic
{
	margin: 10px 0 0;
	color: var(--text-muted);
}

.messages-notice
{
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
	padding: 0.9rem 1rem;
	border: 1px solid var(--border-soft);
	border-radius: 12px;
	background: var(--surface-strong);
	color: var(--text-muted);
}

.messages-notice--muted
{
	background: var(--surface-soft);
}

.messages-notice--action a
{
	font-weight: 700;
}

.chat-registration-message
{
	margin-block: .5rem;
	padding: .5rem .75rem;
	border: 1px solid var(--border-soft);
	border-inline-start: 3px solid var(--auth-primary);
	border-radius: 4px;
	background: var(--surface-strong);
	color: var(--text-strong);
	overflow-wrap: anywhere;
}

.chat-registration-review
{
	display: inline-block;
	min-block-size: 24px;
	margin-inline-start: .25rem;
	font-weight: 700;
}

.popup-panel
{
	background: var(--chat-panel);
	border: 1px solid var(--chat-panel-border);
	border-radius: 12px;
	box-shadow: 0 18px 40px var(--chat-panel-shadow);
}

.popup-footer
{
	margin-top: 12px;
	text-align: center;
}

.popup-page--profile-detail
{
	padding: 0;
	background: transparent;
}

.popup-page--profile-detail .detail-shell
{
	gap: 0;
}

.popup-page--profile-detail .detail-tabs
{
	padding: 20px 18px 16px;
}

.popup-page--profile-detail .detail-card--profile-main
{
	padding-top: 0 !important;
}

.popup-page--simple-overlay
{
	padding: 20px 24px 24px;
}


.auth-layout
{
	width: 100%;
}

.auth-fields input[type="text"],
.auth-fields input[type="password"],
.auth-fields select
{
	box-sizing: border-box;
}

.auth-inline-fields
{
	display: grid;
	grid-template-columns: 6.5rem minmax(11rem, 1fr) 7.5rem;
	gap: 8px;
	align-items: start;
}

.auth-inline-fields > *
{
	min-width: 0;
}

.auth-inline-fields input[type="text"],
.auth-inline-fields select,
.auth-inline-fields .custom-select
{
	width: 100%;
}

.captcha-panel
{
	display: flex;
	flex-direction: column;
	gap: 10px;
}

[data-recaptcha-mode="v2"] iframe
{
	/* Google themes the widget, but its document keeps a light canvas. */
	color-scheme: only light;
	background: var(--auth-surface-strong);
}

.form-notice
{
	padding: 10px 12px;
}

.form-notice-error
{
	background: var(--error-bg-strong);
	color: var(--error-text-soft);
	font-weight: bold;
}

.field-error-row td
{
	color: var(--error-text-soft);
}

.field-error-input
{
	border-color: var(--error-border) !important;
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--error-border) 60%, transparent);
}

.field-error-panel
{
	padding: 10px 12px;
	border: 1px solid var(--error-border);
	border-radius: 8px;
	background: var(--error-bg-strong);
}

.table-scroll
{
	max-width: 100%;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.table-scroll > table.outer
{
	width: max-content;
	min-width: 100%;
}

.admin-plugin-table
{
	width: max-content;
	min-width: 760px;
}

.detail-shell
{
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-height: 100%;
}

.detail-tabs
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.detail-tab
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.58rem 0.95rem;
	border: 1px solid var(--auth-border-strong);
	border-radius: 5px;
	background: var(--button-secondary-bottom);
	color: var(--auth-primary);
	font-weight: bold;
}

.detail-tab.is-active
{
	background: var(--auth-primary);
	border-color: var(--auth-primary-strong);
	color: var(--primary-button-text);
}

.detail-card
{
	background: var(--surface-strong);
	border: 1px solid var(--auth-border);
	border-top: 4px solid var(--auth-primary);
	border-radius: var(--auth-radius);
	box-shadow: var(--auth-shadow);
	padding: 18px 18px 16px;
}

.popup-page--profile-detail .detail-card
{
	background: var(--surface-strong);
	border: 1px solid var(--auth-border);
	border-top: 4px solid var(--auth-primary);
	border-radius: var(--auth-radius);
	box-shadow: var(--auth-shadow);
	padding: 18px 18px 16px;
}

.detail-card--profile-main
{
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 0;
}

.detail-card__header
{
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px 16px;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(202, 214, 223, 0.8);
}

.detail-card__header--profile
{
	align-items: center;
}

.detail-card__hero
{
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.detail-card__hero-body
{
	min-width: 0;
}

.detail-card__title
{
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.2;
	color: var(--auth-text);
}

.detail-card__subtitle
{
	margin: 4px 0 0;
	color: var(--auth-text-muted);
}

.detail-card__badges
{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.detail-badge
{
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: var(--auth-primary-soft);
	color: var(--auth-primary);
	font-size: 0.88rem;
	font-weight: bold;
}

.profile-avatar
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border: 1px solid var(--auth-border);
	border-radius: 12px;
	background: var(--surface-soft);
	overflow: hidden;
	flex: 0 0 auto;
}

.profile-avatar img
{
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.profile-avatar__placeholder
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.profile-avatar__placeholder img
{
	width: 28px;
	height: 28px;
	opacity: 0.82;
	object-fit: contain;
}

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

.detail-item
{
	padding: 12px 14px;
	border: 1px solid rgba(202, 214, 223, 0.85);
	border-radius: 8px;
	background: var(--surface-soft);
}

.detail-item--full
{
	grid-column: 1 / -1;
}

.detail-label
{
	display: block;
	margin-bottom: 6px;
	color: var(--auth-text-soft);
	font-size: 0.82rem;
	font-weight: bold;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.detail-value
{
	color: var(--auth-text);
	word-break: break-word;
}

.detail-item--network .detail-value
{
	word-break: normal;
	overflow-wrap: anywhere;
}

.detail-inline-form
{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.detail-inline-form input[type="text"]
{
	flex: 1 1 14rem;
	min-width: 0;
}

.detail-actions
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-top: 2px;
}

.popup-page--profile-detail .detail-actions
{
	padding: 0;
}

.popup-page--profile-detail > .detail-shell > .overlay-footer
{
	margin-top: auto;
}

.detail-actions--profile-footer
{
	justify-content: flex-end;
	padding: 0;
	border-top: 0;
}

.detail-actions--profile-footer form
{
	justify-content: flex-end;
}

.detail-actions form
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.detail-link-list
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.detail-link
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.58rem 0.95rem;
	border: 1px solid var(--auth-border-strong);
	border-radius: 5px;
	background: var(--button-secondary-bottom);
	color: var(--auth-primary);
	font-weight: bold;
}

.popup-page--profile-detail .detail-actions input[type="button"],
.popup-page--profile-detail .detail-actions input[type="submit"],
.popup-page--profile-detail .detail-actions a,
.popup-page--profile-detail .detail-actions button,
.popup-page--profile-detail .detail-link
{
	min-height: 2rem;
	padding: 0.42rem 0.88rem;
}

.detail-link:hover
{
	background: var(--button-secondary-hover-bottom);
	color: var(--auth-primary-strong);
}

.permission-list
{
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.permission-row
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
	gap: 12px;
	align-items: center;
	padding: 12px 14px;
	border: 1px solid rgba(149, 170, 188, 0.75);
	border-radius: 12px;
	background: var(--surface-card);
}

.permission-row__label
{
	color: var(--text-strong);
}

.permission-row__value
{
	text-align: right;
	color: var(--text-muted);
}

.permission-row__value select
{
	width: 100%;
}

.permission-state
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.38rem 0.72rem;
	border-radius: 999px;
	font-size: 0.88rem;
	font-weight: bold;
}

.permission-state--allowed
{
	background: var(--state-allowed-bg);
	color: var(--state-allowed-text);
}

.permission-state--denied
{
	background: var(--state-denied-bg);
	color: var(--state-denied-text);
}

.permission-state--default
{
	background: var(--state-default-bg);
	color: var(--state-default-text);
}

.overlay-panel
{
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
}

.overlay-panel__header
{
	display: none;
}

.overlay-panel__title
{
	margin: 0;
	font-size: 1.2rem;
	color: var(--auth-text);
}

.overlay-table
{
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: transparent;
	color: var(--auth-text);
}

.overlay-table th,
.overlay-table td
{
	padding: 10px 12px;
	border-right: 1px solid rgba(202, 214, 223, 0.8);
	border-bottom: 1px solid rgba(202, 214, 223, 0.8);
	vertical-align: top;
}

.overlay-table th:last-child,
.overlay-table td:last-child
{
	border-right: 0;
}

.overlay-table thead th
{
	background: var(--surface-soft);
	color: var(--auth-text-soft);
	font-size: 0.8rem;
	font-weight: bold;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.overlay-table tbody tr:first-child td
{
	border-top: 1px solid rgba(202, 214, 223, 0.8);
}

.overlay-table tbody td:first-child,
.overlay-table thead th:first-child
{
	border-left: 1px solid rgba(202, 214, 223, 0.8);
}

.overlay-table tbody tr:last-child td:first-child
{}

.overlay-table tbody tr:last-child td:last-child
{}

.overlay-table thead th:first-child
{}

.overlay-table thead th:last-child
{}

.overlay-table__command
{
	white-space: nowrap;
	color: var(--auth-primary);
	font-weight: 600;
}

.overlay-table__aliases
{
	color: var(--auth-text-muted);
}

.overlay-list-actions
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	margin: 0 0 12px;
}

.search-overlay
{
	flex: 1 1 auto;
	min-height: 100%;
}

.search-shell
{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 100%;
	padding: 0;
	overflow: hidden;
}

.search-shell__body
{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 18px;
	min-height: 0;
	overflow: auto;
	padding: 18px 18px 0;
}

.search-shell__footer
{
	margin-top: 0;
}

@media (max-width: 26rem)
{
	html[data-dialog-hosted] .search-shell__footer .form-actions > :is(a, input[type="submit"])
	{
		padding-inline: 0.375rem;
		font-size: 0.875rem;
	}

	html[data-dialog-hosted] .search-shell__footer .form-actions > a
	{
		flex: 1 1 0;
		min-inline-size: 0;
		white-space: normal;
		overflow-wrap: anywhere;
		text-align: center;
	}
}

.search-hero
{
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 16px;
	align-items: center;
	padding: 16px;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--surface-card);
}

.search-hero__badge
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border: 1px solid var(--auth-border);
	border-radius: 50%;
	background: var(--surface-strong);
}

.search-hero__badge img
{
	max-width: 28px;
	max-height: 28px;
}

.search-hero__body
{
	min-width: 0;
}

.search-hero .form-grid
{
	margin: 0;
}

.search-results-section
{
	flex: 1 1 auto;
	min-height: 0;
	container-type: inline-size;
}

.search-results-toolbar
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 14px;
}

.search-pagination
{
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.search-pagination .detail-link
{
	box-sizing: border-box;
	min-block-size: 2.75rem;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
}

.search-pagination__status
{
	color: var(--auth-text-soft);
	font-size: 0.85rem;
	font-weight: 600;
}

.search-result-grid
{
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.search-result-card
{
	display: grid;
	grid-template-columns: 2.5rem minmax(0, 1fr);
	align-items: center;
	gap: 0.75rem;
	padding-block: 0.75rem;
	border-block-end: 1px solid var(--chat-panel-border);
	color: var(--auth-text);
	text-decoration: none;
}

.search-result-card:is(:hover, :focus-visible)
{
	background: var(--surface-soft);
}

.search-result-card__avatar
{
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 2.5rem;
	block-size: 2.5rem;
	border-radius: 6px;
	overflow: hidden;
}

.search-result-card__status-dot
{
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 12px;
	height: 12px;
	border: 2px solid var(--surface-card);
	border-radius: 50%;
	box-sizing: border-box;
}

.search-result-card__status-dot--online
{
	background: #18a957;
}

.search-result-card__status-dot--offline
{
	background: #8b98a5;
}

.search-result-card__avatar-image,
.search-result-card__avatar-icon
{
	display: block;
}

.search-result-card__avatar-image
{
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.search-result-card__avatar-icon
{
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.search-result-card__body
{
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	min-inline-size: 0;
}

.search-result-card__name
{
	flex-basis: 100%;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--auth-text);
}

.search-result-card__name,
.search-result-card__meta
{
	min-inline-size: 0;
	overflow-wrap: anywhere;
}

.search-result-card__meta
{
	color: var(--auth-text-soft);
	font-size: 0.9rem;
	font-weight: 600;
}

.search-result-card__chips
{
	display: flex;
	flex-wrap: wrap;
}

.search-result-card__chip
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.3rem 0.62rem;
	border-radius: 999px;
	background: var(--auth-primary-soft);
	color: var(--auth-primary);
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

@container (inline-size >= 32rem)
{
	.search-result-card__body
	{
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.search-result-card__meta
	{
		grid-column: 1;
	}

	.search-result-card__chips
	{
		grid-column: 2;
		grid-row: 1 / 3;
		align-self: center;
	}
}

.search-empty
{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 220px;
	padding: 24px;
	border: 1px dashed var(--auth-border);
	border-radius: 8px;
	background: var(--surface-card);
	text-align: center;
}

.search-empty img
{
	width: 28px;
	height: 28px;
	opacity: 0.75;
}

.traceroute-shell
{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 100%;
	padding: 0;
	overflow: hidden;
}

.traceroute-shell__body
{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 18px;
	min-height: 0;
	padding: 18px;
	overflow: auto;
}

.traceroute-meta
{
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 14px;
}

.traceroute-meta__item
{
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--surface-card);
}

.traceroute-meta__label
{
	color: var(--auth-text-soft);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.traceroute-meta__value
{
	color: var(--auth-text);
	font-weight: 600;
	word-break: break-word;
}

.traceroute-section
{
	flex: 1 1 auto;
	min-height: 0;
}

.traceroute-output
{
	margin: 0;
	min-height: 100%;
	padding: 16px 18px;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--surface-soft);
	color: var(--auth-text);
	font-family: var(--fontFamilyMonospace);
	font-size: 0.92rem;
	line-height: 1.55;
	white-space: pre-wrap;
	word-break: break-word;
	box-sizing: border-box;
}

.traceroute-empty
{
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 12px;
	min-height: 220px;
	padding: 18px;
	border: 1px dashed var(--auth-border);
	border-radius: 8px;
	background: var(--surface-card);
}

.traceroute-command
{
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	padding: 0.45rem 0.7rem;
	border: 1px solid var(--auth-border);
	border-radius: 6px;
	background: var(--surface-strong);
	color: var(--auth-text);
	font-family: var(--fontFamilyMonospace);
	font-size: 0.86rem;
	word-break: break-all;
}

.palette-picker
{
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: min(100%, 520px);
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
	background: transparent;
}

.palette-card
{
	padding: 16px;
	border: 1px solid rgba(205, 219, 229, 0.88);
	border-radius: 12px;
	background: var(--surface-card);
	box-shadow: 0 12px 26px rgba(17, 52, 73, 0.08);
}

.palette-card--selection
{
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.palette-selection-row
{
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

.palette-preview
{
	width: 44px;
	height: 44px;
	border: 1px solid rgba(9, 42, 63, 0.12);
	border-radius: 8px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.palette-selection
{
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.palette-label
{
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--auth-text-soft);
}

.palette-hex-row
{
	display: flex;
	gap: 10px;
}

.palette-hex-input
{
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(167, 192, 209, 0.92);
	border-radius: 8px;
	background: var(--surface-strong);
	color: var(--auth-text);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.palette-hex-input.is-invalid
{
	border-color: #c95c5c;
	box-shadow: 0 0 0 3px rgba(201, 92, 92, 0.12);
}

.palette-apply
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--auth-primary-strong);
	border-radius: 8px;
	background: var(--auth-primary);
	color: var(--primary-button-text);
	font-weight: 700;
}

.palette-apply:hover
{
	background: var(--auth-primary-strong);
}

.palette-custom
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--auth-text);
	font-weight: 600;
}

.palette-native-input
{
	flex: 0 0 auto;
	width: 56px;
	height: 40px;
	padding: 2px;
	border: 1px solid rgba(167, 192, 209, 0.92);
	border-radius: 8px;
	background: var(--surface-strong);
	cursor: pointer;
}

.palette-grid
{
	display: grid;
	grid-template-columns: repeat(auto-fill, 44px);
	gap: 8px;
	justify-content: start;
}

.form-shell
{
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.popup-page:not(.popup-page--profile-detail) .form-shell
{
	min-height: 100%;
}

.form-card
{
	background: var(--surface-soft);
	border: 1px solid var(--auth-border);
	border-radius: var(--auth-radius);
	box-shadow: none;
	padding: 18px 18px 16px;
}

.popup-page .form-card
{
	background: var(--surface-strong);
	border-top: 4px solid var(--auth-primary);
	box-shadow: var(--auth-shadow);
}

.form-card__header
{
	margin-bottom: 14px;
}

.form-card--dialog-simple
{
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.form-card--dialog-fill
{
	flex: 1 1 auto;
}

.form-card--dialog-simple .form-card__header
{
	display: none;
}

.form-card--dialog-simple > .form-section
{
	padding-left: 20px;
	padding-right: 20px;
}

.form-card--dialog-simple > .form-section + .form-section
{
	padding-top: 20px;
}

.form-card--dialog-simple > .form-section:first-child
{
	padding-top: 20px;
}

.form-card--dialog-simple > .form-section:last-of-type
{
	padding-bottom: 28px;
}

.form-card__title
{
	margin: 0;
	font-size: 1.2rem;
	color: var(--auth-text);
}

.form-card__intro
{
	margin: 6px 0 0;
	color: var(--auth-text-muted);
}

.form-section
{
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.form-section__title
{
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(202, 214, 223, 0.8);
	color: var(--auth-text);
	font-size: 1rem;
}

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

.form-grid--search
{
	grid-template-columns: minmax(0, 1fr);
}

.form-field
{
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.field-status
{
	min-height: 1.15rem;
	font-size: 0.8rem;
	color: var(--auth-text-soft);
}

.field-status.is-checking
{
	color: var(--auth-text-muted);
}

.field-status.is-available
{
	color: var(--state-allowed-text);
}

.field-status.is-taken,
.field-status.is-error,
.field-status.is-invalid
{
	color: var(--state-denied-text);
}

.form-field--full
{
	grid-column: 1 / -1;
}

.form-label
{
	color: var(--auth-text-soft);
	font-size: 0.82rem;
	font-weight: bold;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.form-note
{
	color: var(--auth-text-muted);
	font-size: 0.82rem;
}

.login-option-row
{
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 1fr);
	gap: 14px 16px;
	align-items: start;
}

.login-option-card
{
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.login-option-card__line
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 2.1rem;
}

.login-option-card__line .form-checkbox
{
	flex: 1 1 auto;
	min-width: 0;
}

.login-option-card__line .form-checkbox span
{
	white-space: nowrap;
}

.login-option-card__subline
{
	padding-left: 2rem;
}

.login-option-card__link
{
	white-space: nowrap;
	font-size: 0.88rem;
}

.avatar-editor
{
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

.avatar-editor__preview
{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 128px;
	height: 128px;
	border: 1px solid var(--auth-border);
	border-radius: 12px;
	background: var(--surface-soft);
	overflow: hidden;
}

.avatar-editor__preview img
{
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.avatar-editor__placeholder
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.avatar-editor__placeholder img
{
	width: 36px;
	height: 36px;
	object-fit: contain;
	opacity: 0.8;
}

.avatar-editor__body
{
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.avatar-editor__picker
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.avatar-editor__file-input
{
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.avatar-editor__file-button
{
	flex: 0 0 auto;
	height: 2.4rem;
	min-height: 2.4rem;
	padding-top: 0;
	padding-bottom: 0;
	line-height: 1.2;
	white-space: nowrap;
	box-sizing: border-box;
}

.avatar-editor__file-name
{
	display: inline-flex;
	align-items: center;
	flex: 1 1 16rem;
	min-height: 2.4rem;
	min-width: 0;
	padding: 0 0.9rem;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--surface-soft);
	color: var(--auth-text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.avatar-editor__actions
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.avatar-editor__actions .detail-link
{
	height: 2.4rem;
	min-height: 2.4rem;
	padding-top: 0;
	padding-bottom: 0;
	line-height: 1.2;
	box-sizing: border-box;
}

.overlay-list
{
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.popup-page--roomlist
{
	background: var(--page-bg);
}

.roomlist-shell
{
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.roomlist-toolbar
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding-bottom: 2px;
}

.roomlist-toolbar__meta
{
	flex: 1 1 auto;
	min-width: 0;
}

.roomlist-toolbar__count
{
	color: var(--auth-text-soft);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.roomlist-toolbar__action
{
	min-height: 2.55rem;
	padding-inline: 1.1rem;
	white-space: nowrap;
	border-radius: 12px;
}

.roomlist-list
{
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(149, 170, 188, 0.24);
	border-radius: 18px;
	overflow: hidden;
	background: var(--surface-card);
}

.roomlist-list__head
{
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(12rem, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 0.95rem 1.35rem;
	border-bottom: 1px solid rgba(149, 170, 188, 0.24);
	background: rgba(255, 255, 255, 0.025);
}

.roomlist-list__heading
{
	color: var(--auth-text-soft);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.roomlist-list__heading--actions
{
	text-align: right;
}

.roomlist-row
{
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(12rem, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 1.1rem 1.35rem;
	border-bottom: 1px solid rgba(149, 170, 188, 0.16);
}

.roomlist-list > :last-child
{
	border-bottom: 0;
}

.roomlist-row__room
{
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.roomlist-row__name
{
	display: inline-flex;
	align-items: center;
	max-width: fit-content;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--auth-primary);
	text-decoration: none;
}

.roomlist-row__name:hover
{
	color: var(--auth-primary-strong);
}

.roomlist-row__topic
{
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.6rem;
	align-items: baseline;
	min-width: 0;
}

.roomlist-row__topic-label
{
	color: var(--auth-text-soft);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.roomlist-row__topic-text
{
	color: var(--auth-text);
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.roomlist-row__topic-empty
{
	color: var(--auth-text-muted);
	font-style: italic;
}

.roomlist-row__status
{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-start;
}

.roomlist-badge
{
	background: rgba(69, 130, 176, 0.14);
	color: #77b9ea;
}

.roomlist-badge--public
{
	background: rgba(72, 150, 98, 0.18);
	color: #73ce8b;
}

.roomlist-badge--private
{
	background: rgba(171, 123, 69, 0.18);
	color: #e1b06d;
}

.roomlist-badge--temporary
{
	background: rgba(126, 139, 156, 0.18);
	color: #d2dde8;
}

.roomlist-badge--moderated
{
	background: rgba(104, 95, 180, 0.2);
	color: #b9b0ff;
}

.roomlist-row__actions
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
}

.roomlist-row__delete-form
{
	margin: 0;
}

.roomlist-row__action
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.05rem;
	padding: 0.42rem 0.82rem;
	border: 1px solid var(--auth-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--auth-text-soft);
	font-size: 0.84rem;
	font-weight: 600;
	text-decoration: none;
}

button.roomlist-row__action
{
	cursor: pointer;
}

.roomlist-row__action:hover
{
	border-color: var(--auth-border-strong);
	background: rgba(255, 255, 255, 0.08);
	color: var(--auth-text);
}

.roomlist-row__action--danger
{
	color: #c85a5a;
}

.roomlist-row__action--danger:hover
{
	border-color: rgba(200, 90, 90, 0.5);
	background: rgba(200, 90, 90, 0.12);
	color: #de7a7a;
}

.roomlist-row__action--muted
{
	opacity: 0.55;
	cursor: default;
}

.overlay-list__item
{
	display: block;
	padding: 12px 14px;
	border: 1px solid var(--auth-border);
	border-radius: 10px;
	background: var(--surface-strong);
	color: var(--auth-text);
	text-decoration: none;
}

.overlay-list__item a
{
	color: inherit;
	text-decoration: none;
}

.overlay-list__item:hover
{
	border-color: rgba(38, 113, 166, 0.35);
	background: var(--surface-subtle);
}

@media (max-width: 760px)
{
	.roomlist-toolbar
	{
		flex-direction: column;
		align-items: stretch;
	}

	.roomlist-toolbar__meta
	{
		min-width: 0;
	}

	.roomlist-toolbar__action
	{
		width: 100%;
	}

	.roomlist-list
	{
		border-radius: 16px;
	}

	.roomlist-list__head
	{
		display: none;
	}

	.roomlist-row
	{
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		padding: 1rem;
	}

	.roomlist-row__status
	{
		justify-content: flex-start;
	}

	.roomlist-row__actions
	{
		justify-content: flex-start;
	}

	.roomlist-row__name
	{
		font-size: 1.08rem;
	}
}

.overlay-feed
{
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.overlay-feed__item
{
	padding: 14px 16px;
	border: 1px solid var(--auth-border);
	border-radius: 10px;
	background: var(--surface-strong);
}

.overlay-feed__meta
{
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-bottom: 8px;
	color: var(--auth-text-soft);
	font-size: 0.84rem;
	font-weight: 600;
}

.overlay-feed__body
{
	color: var(--auth-text);
	line-height: 1.55;
}

.offline-message-list
{
	display: grid;
	gap: 12px;
}

.offline-message
{
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 16px;
	padding: 12px;
	border: 1px solid var(--auth-border);
	background: var(--surface-strong);
	min-inline-size: 0;
}

.offline-message-time
{
	color: var(--auth-text-soft);
	font-size: .875rem;
	overflow-wrap: anywhere;
}

.offline-message-content
{
	flex: 1 1 18rem;
	min-inline-size: 0;
	overflow-wrap: anywhere;
}

.offline-message-content img
{
	max-inline-size: 100%;
	block-size: auto;
}

.overlay-log-content
{
	min-height: 180px;
	flex: 1 1 auto;
	color: var(--auth-text);
}

.form-static
{
	min-height: 2.1rem;
	padding: 0.42rem 0;
	color: var(--auth-text);
}

.form-checkbox
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 2.1rem;
	color: var(--auth-text);
}

.form-actions
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	padding-top: 2px;
}

.popup-page .form-actions,
.popup-page .detail-actions
{
	padding-bottom: 18px;
}

.overlay-footer
{
	margin-top: 22px;
	padding: 16px 20px 18px;
	border-top: 1px solid rgba(202, 214, 223, 0.82);
	background: var(--surface-strong);
	position: sticky;
	bottom: 0;
	z-index: 3;
}

.form-card--dialog-simple > .overlay-footer
{
	margin-top: auto;
}

.overlay-footer .form-actions,
.overlay-footer .detail-actions
{
	justify-content: flex-end;
	padding-top: 0;
	padding-bottom: 0;
	margin-top: 0;
}

.form-actions--dialog-footer
{
	justify-content: flex-end;
	padding-top: 0;
	padding-bottom: 0;
}

.form-actions input[type="button"],
.form-actions input[type="submit"],
.form-actions a,
.detail-actions input[type="button"],
.detail-actions input[type="submit"],
.detail-actions a,
.detail-actions button,
.detail-link,
.auth-form-actions input[type="submit"],
.auth-form-actions input[type="button"]
{
	min-height: 2.4rem;
	padding: 0.58rem 1rem;
	border-radius: 5px;
}

body.auth-page input[type="submit"],
body.auth-page input[type="button"]
{
	min-block-size: 48px;
	background: var(--auth-primary);
	border: 1px solid var(--auth-primary-strong);
	color: var(--primary-button-text);
	font-weight: 600;
	box-shadow: none;
}

body.auth-page input[type="submit"]:hover,
body.auth-page input[type="button"]:hover
{
	background: var(--auth-primary-strong);
}

body.auth-page input[type="text"],
body.auth-page input[type="password"],
body.auth-page input[type="email"],
body.auth-page input[type="url"],
body.auth-page input[type="search"],
body.auth-page input[type="number"],
body.auth-page input:not([type]),
body.auth-page select,
body.auth-page textarea
{
	box-sizing: border-box;
	font-size: max(1rem, 1em);
	min-height: 48px;
	background: var(--auth-input-bg);
	border: 1px solid var(--auth-input-border);
	border-radius: 5px;
	color: var(--auth-text);
	padding: 0.58rem 0.78rem;
	box-shadow: 0 1px 0 var(--input-inset-highlight) inset;
}

body.auth-page input[type="text"]:hover,
body.auth-page input[type="password"]:hover,
body.auth-page input[type="email"]:hover,
body.auth-page input[type="url"]:hover,
body.auth-page input[type="search"]:hover,
body.auth-page input[type="number"]:hover,
body.auth-page input:not([type]):hover,
body.auth-page select:hover,
body.auth-page textarea:hover,
body.auth-page input[type="text"]:focus,
body.auth-page input[type="password"]:focus,
body.auth-page input[type="email"]:focus,
body.auth-page input[type="url"]:focus,
body.auth-page input[type="search"]:focus,
body.auth-page input[type="number"]:focus,
body.auth-page input:not([type]):focus,
body.auth-page select:focus,
body.auth-page textarea:focus
{
	border-color: var(--auth-input-border-focus);
	outline: none;
	box-shadow: 0 0 0 3px rgba(70, 122, 157, 0.14);
}

.popup-page input[type="text"],
.popup-page input[type="password"],
.popup-page input[type="email"],
.popup-page input[type="url"],
.popup-page input[type="search"],
.popup-page input[type="number"],
.popup-page input:not([type]),
.popup-page select,
.popup-page textarea
{
	box-sizing: border-box;
	min-height: 44px;
	background: var(--auth-input-bg);
	border: 1px solid var(--auth-input-border);
	border-radius: 5px;
	color: var(--auth-text);
	padding: 0.58rem 0.78rem;
	box-shadow: 0 1px 0 var(--input-inset-highlight) inset;
}

.popup-page input[type="text"]:hover,
.popup-page input[type="password"]:hover,
.popup-page input[type="email"]:hover,
.popup-page input[type="url"]:hover,
.popup-page input[type="search"]:hover,
.popup-page input[type="number"]:hover,
.popup-page input:not([type]):hover,
.popup-page select:hover,
.popup-page textarea:hover,
.popup-page input[type="text"]:focus,
.popup-page input[type="password"]:focus,
.popup-page input[type="email"]:focus,
.popup-page input[type="url"]:focus,
.popup-page input[type="search"]:focus,
.popup-page input[type="number"]:focus,
.popup-page input:not([type]):focus,
.popup-page select:focus,
.popup-page textarea:focus
{
	border-color: var(--auth-input-border-focus);
	outline: none;
	box-shadow: 0 0 0 3px rgba(70, 122, 157, 0.14);
}

.popup-page .form-actions input[type="submit"],
.popup-page .detail-actions input[type="submit"],
.popup-page .detail-actions .detail-link
{
	background: var(--auth-primary);
	border: 1px solid var(--auth-primary-strong);
	color: var(--primary-button-text);
	font-weight: 600;
	box-shadow: none;
	min-height: 1.8rem;
	padding: 0.36rem 0.72rem;
}

.popup-page .form-actions input[type="submit"]:hover,
.popup-page .detail-actions input[type="submit"]:hover,
.popup-page .detail-actions .detail-link:hover
{
	background: var(--auth-primary-strong);
	color: var(--primary-button-text);
}

.popup-page .form-actions input[type="button"],
.popup-page .form-actions a,
.popup-page .detail-actions input[type="button"],
.popup-page .detail-actions a,
.popup-page .detail-actions button
{
	background: var(--button-secondary-bottom);
	border: 1px solid var(--auth-border-strong);
	color: var(--auth-primary);
	font-weight: 600;
	box-shadow: none;
	min-height: 1.8rem;
	padding: 0.36rem 0.72rem;
}

.popup-page:not(.popup-page--profile-detail) .form-card
{
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
}

.popup-page:not(.popup-page--profile-detail) .form-shell
{
	gap: 18px;
}

.popup-page--simple-overlay .detail-shell
{
	gap: 0;
}

.popup-page .form-actions input[type="button"]:hover,
.popup-page .form-actions a:hover,
.popup-page .detail-actions input[type="button"]:hover,
.popup-page .detail-actions a:hover,
.popup-page .detail-actions button:hover
{
	background: var(--button-secondary-hover-bottom);
	color: var(--auth-primary-strong);
}

body.auth-page select
{
	appearance: auto;
	-webkit-appearance: menulist;
	cursor: pointer;
	background-color: var(--auth-input-bg) !important;
	color: var(--auth-text) !important;
	background-image: none;
	color-scheme: var(--ui-color-scheme) !important;
	padding-right: 0.78rem;
}

body.auth-page option
{
	background: var(--auth-input-bg);
	color: var(--auth-text);
}

.popup-page select
{
	appearance: auto;
	-webkit-appearance: menulist;
	background-color: var(--auth-input-bg) !important;
	color: var(--auth-text) !important;
	color-scheme: var(--ui-color-scheme) !important;
	background-image: none;
}

.popup-page option
{
	background-color: var(--auth-input-bg) !important;
	color: var(--auth-text) !important;
}

select.custom-select-native
{
	display: none !important;
}

.custom-select
{
	position: relative;
	display: block;
	width: 100%;
	min-width: 0;
}

.auth-page .custom-select
{
	z-index: 1;
}

.auth-page .custom-select.is-open
{
	z-index: 20;
}

.custom-select + .custom-select
{
	margin-top: 10px;
}

.custom-select__button
{
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 44px;
	padding: 0.58rem 0.78rem;
	border: 1px solid var(--auth-input-border);
	border-radius: 5px;
	background: var(--auth-input-bg);
	box-shadow: 0 1px 0 var(--input-inset-highlight) inset;
	color: var(--auth-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.custom-select__button:hover
{
	border-color: var(--auth-input-border-focus);
}

.custom-select__button:focus
{
	outline: none;
	border-color: var(--auth-input-border-focus);
	box-shadow: 0 0 0 3px rgba(70, 122, 157, 0.14);
}

.custom-select__label
{
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.custom-select__arrow
{
	flex: 0 0 auto;
	color: var(--text-soft);
	font-size: 14px;
}

.custom-select__menu
{
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 50;
	display: none;
	border: 1px solid var(--auth-input-border-focus);
	border-radius: 8px;
	background: var(--surface-strong);
	box-shadow: 0 12px 32px rgba(5, 23, 33, 0.16);
	overflow: hidden;
}

.auth-page .custom-select__menu
{
	top: calc(100% + 4px);
	border-radius: 6px;
	box-shadow: 0 16px 32px rgba(14, 41, 59, 0.16);
}

.custom-select.is-open .custom-select__menu
{
	display: block;
}

.custom-select.is-open-up .custom-select__menu
{
	top: auto;
	bottom: calc(100% + 6px);
}

.custom-select__search-wrap
{
	padding: 10px;
	border-bottom: 1px solid var(--chat-panel-border);
	background: var(--surface-soft);
}

.auth-page .custom-select__search-wrap
{
	padding: 8px;
}

.custom-select__search
{
	width: 100%;
	box-sizing: border-box;
}

.custom-select__list
{
	max-height: 280px;
	max-height: var(--custom-select-max-height, 280px);
	overflow: auto;
}

.auth-page .custom-select__list
{
	max-height: var(--custom-select-max-height, min(220px, 30vh));
}

.custom-select__option
{
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-top: 1px solid rgba(214, 225, 233, 0.7);
	background: var(--surface-strong);
	color: var(--auth-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.custom-select__list .custom-select__option:first-child
{
	border-top: 0;
}

.custom-select__option:hover,
.custom-select__option:focus,
.custom-select__option.is-selected
{
	background: var(--surface-muted);
	color: var(--auth-primary-strong);
	outline: none;
}

.custom-select__option.is-disabled
{
	color: var(--text-soft);
	cursor: default;
	background: var(--surface-soft);
}

body.auth-page input[type="checkbox"],
body.auth-page input[type="radio"]
{
	accent-color: var(--auth-primary);
}

.form-actions--spread
{
	justify-content: space-between;
}

.form-inline-actions
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.form-inline-actions .fullsize
{
	flex: 1 1 auto;
}

.profile-color-chip
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.profile-color-chip::before
{
	content: "";
	display: inline-block;
	width: 0.95rem;
	height: 0.95rem;
	border-radius: 999px;
	border: 1px solid rgba(6, 43, 63, 0.2);
	background: currentColor;
}

.private-shell
{
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	gap: 12px;
	height: 100%;
	min-height: 0;
}

.popup-page--private-overlay
{
	height: 100%;
	padding: 0;
}

.popup-page--private-overlay .private-shell
{
	height: 100%;
	min-height: 0;
	padding: 16px;
	box-sizing: border-box;
}

.popup-page--private-messages
{
	height: 100%;
	padding: 0;
	background: transparent;
}

.popup-page--private-messages,
.popup-page--private-messages body
{
	background: transparent;
}

@media (max-width: 860px)
{
	body.auth-page
	{
		padding: 16px 0 24px;
	}

	.auth-inline-fields
	{
		grid-template-columns: 1fr;
	}

	.auth-shell-header,
	.auth-grid
	{
		grid-template-columns: 1fr;
	}

	.auth-shell-header
	{
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
	}

	.auth-card__head,
	.auth-card__body
	{
		padding-left: 18px;
		padding-right: 18px;
	}

	.auth-hero-links
	{
		flex-direction: column;
		align-items: stretch;
	}

	.auth-hero-links > *
	{
		width: 100%;
	}

	.auth-form-actions
	{
		flex-direction: column;
		align-items: stretch;
	}

	.auth-form-actions > *
	{
		width: 100%;
	}

	.detail-grid,
	.form-grid
	{
		grid-template-columns: 1fr;
	}

	.login-option-row
	{
		grid-template-columns: 1fr;
	}

	.login-option-card__line
	{
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.login-option-card__line .form-checkbox span
	{
		white-space: normal;
	}

	.login-option-card__subline
	{
		padding-left: 0;
	}

	.avatar-editor
	{
		grid-template-columns: 1fr;
	}

	.avatar-editor__preview
	{
		margin: 0 auto;
	}

	.auth-layout,
	.auth-layout > tbody,
	.auth-layout > tbody > tr
	{
		display: block;
	}

	.auth-layout > tbody > tr > td
	{
		display: block;
		width: auto !important;
		padding: 0 0 16px 0 !important;
	}

	.auth-layout > tbody > tr > td:last-child
	{
		padding-bottom: 0 !important;
	}

	.auth-layout table.bordered1
	{
		width: 100% !important;
	}
}

@media (max-width: 640px)
{
	.auth-topbar,
	.auth-language-switcher
	{
		justify-content: stretch;
	}

	.auth-language-link
	{
		flex: 0 0 auto;
		padding-inline: 4px;
	}

	.auth-language-switcher
	{
		gap: 4px;
	}

	.auth-grid--single
	{
		max-width: none;
	}

	.auth-card__title
	{
		font-size: 1.55rem;
	}

	.auth-fields,
	.auth-fields > tbody,
	.auth-fields > tbody > tr,
	.auth-fields > tbody > tr > td
	{
		display: block;
		width: auto !important;
	}

	.auth-fields > tbody > tr > td
	{
		padding-bottom: 8px;
	}

	.permission-row
	{
		grid-template-columns: 1fr;
	}

	.permission-row__value
	{
		text-align: left;
	}

	.auth-fields input[type="text"],
	.auth-fields input[type="password"],
	.auth-fields select
	{
		width: 100% !important;
	}



	.detail-card,
	.form-card
	{
		padding: 14px;
	}



	.overlay-footer
	{
		padding: 14px 16px 16px;
	}

	.overlay-footer .form-actions,
	.overlay-footer .detail-actions,
	.form-actions--dialog-footer,
	.detail-actions--profile-footer,
	.detail-actions--profile-footer form
	{
		justify-content: stretch;
	}

	.overlay-footer .form-actions > *,
	.overlay-footer .detail-actions > *,
	.form-actions--dialog-footer > *,
	.detail-actions--profile-footer > *,
	.detail-actions--profile-footer form > *
	{
		box-sizing: border-box;
		flex: 1 1 100%;
		width: 100%;
	}
}

.private-shell__messages-body .chat-message
{
	inline-size: fit-content;
	max-inline-size: 90%;
	box-sizing: border-box;
	margin-block: 8px;
	padding: 9px 12px;
	border: 1px solid var(--chat-panel-border);
	border-radius: 10px 10px 10px 2px;
	background: var(--surface-card-alt);
	overflow-wrap: anywhere;
}

.private-shell__messages-body .chat-message--own
{
	margin-inline-start: auto;
	border-radius: 10px 10px 2px 10px;
	background: var(--surface-strong);
}

.private-shell__messages,
.private-shell__input
{
	overflow: hidden;
}

.private-shell__messages
{
	min-height: 0;
	padding: 0;
}

.private-shell__messages-body
{
	height: 100%;
	min-height: 0;
	padding: 14px 16px;
	box-sizing: border-box;
	overflow: auto;
	background: var(--chat-panel);
	color: var(--text-strong);
}

.private-shell__input
{
	display: flex;
	align-items: center;
	padding: 12px;
	box-sizing: border-box;
}

.private-input-form
{
	--private-compose-size: 42px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: stretch;
	width: 100%;
	gap: 8px;
}

@media (pointer: coarse)
{
	.private-input-form {--private-compose-size: 48px;}
}

.popup-page--private-input
{
	padding: 0;
	background: transparent;
}

.private-input-form :is(input[type="text"], .chat-submit)
{
	min-inline-size: 0;
	block-size: auto;
	min-block-size: var(--private-compose-size);
	border-radius: 3px;
	box-sizing: border-box;
}

.private-input-form input[type="text"]
{
	padding: 0.48rem 0.7rem;
	font-size: 16px;
	border: 1px solid var(--auth-input-border);
	background: var(--chat-input-bg);
	color: var(--auth-text);
}

.palette-swatch
{
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 0;
	border: 1px solid rgba(9, 42, 63, 0.12);
	border-radius: 8px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
	cursor: pointer;
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.palette-swatch:hover
{
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(17, 52, 73, 0.14);
}

.palette-swatch:focus
{
	outline: none;
	box-shadow: 0 0 0 3px rgba(70, 122, 157, 0.22);
}

.palette-swatch.is-active
{
	border-color: var(--auth-primary-strong);
	box-shadow: 0 0 0 3px rgba(70, 122, 157, 0.22);
}

.smiley-browser
{
	width: min(100%, 560px);
	margin: 0 auto;
	max-height: min(68vh, 520px);
	overflow: auto;
	padding-right: 4px;
	box-sizing: border-box;
}

.smiley-browser__grid
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 8px;
}

.smiley-card
{
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	padding: 10px;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--surface-card);
	box-shadow: none;
}

.smiley-card__preview
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--auth-border);
	border-radius: 6px;
	background: var(--surface-strong);
}

.smiley-card__preview:hover
{
	border-color: var(--auth-input-border-focus);
	background: var(--surface-subtle);
}

.smiley-card__preview img
.smiley-card__image
{
	max-width: 22px;
	max-height: 22px;
}

.smiley-card__body
{
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.smiley-card__chips
{
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.smiley-chip
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 0 8px;
	border: 1px solid var(--auth-border);
	border-radius: 6px;
	background: var(--surface-strong);
	color: var(--auth-text);
	font-family: var(--fontFamilyMonospace);
	font-size: 0.84rem;
	font-weight: 600;
}

.smiley-chip:hover
{
	border-color: var(--auth-input-border-focus);
	background: var(--surface-subtle);
	color: var(--auth-primary-strong);
}

.smiley-admin-upload
{
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	margin: 0 28px 0;
	padding: 22px;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--surface-card);
}

.smiley-admin-upload--page
{
	max-width: 1120px;
}

.smiley-admin-upload__aside
{
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

.smiley-admin-upload__preview
{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 128px;
	height: 128px;
	border: 1px solid var(--auth-border);
	border-radius: 12px;
	background: var(--surface-soft);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
	overflow: hidden;
}

.smiley-admin-upload__preview img
{
	max-width: 88px;
	max-height: 88px;
	object-fit: contain;
	filter: drop-shadow(0 6px 16px rgba(14, 37, 54, 0.16));
}

.smiley-admin-upload__preview span
{
	padding: 0 14px;
	color: var(--auth-text-muted);
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.45;
	text-align: center;
}

.smiley-admin-upload__body
{
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.smiley-admin-upload__grid
{
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 16px;
}

.smiley-admin-upload__field
{
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
}

.smiley-admin-upload__field--file
{
	min-width: 0;
}

.smiley-admin-upload__field > span
{
	color: var(--text-strong);
	font-size: 0.88rem;
	font-weight: 600;
}

.smiley-admin-upload__field > input[type="text"]
{
	width: 100%;
}

.smiley-admin-upload__field small
{
	color: var(--text-muted);
	line-height: 1.45;
}

.smiley-admin-upload__field--wide
{
	grid-column: 1 / -1;
}

.smiley-admin-upload__field--toggle .form-checkbox
{
	min-height: 2.4rem;
}

.smiley-admin-upload__picker
{
	width: 100%;
}

.smiley-admin-upload__picker .avatar-editor__file-name
{
	flex-basis: 100%;
}

.smiley-admin-upload__actions
{
	display: flex;
	justify-content: flex-end;
}

.smiley-admin-table__preview
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 6px;
	border: 1px solid var(--auth-border);
	border-radius: 8px;
	background: var(--surface-soft);
}

.smiley-admin-table__preview img
{
	max-width: 28px;
	max-height: 28px;
	object-fit: contain;
}

.moderated-list,
#moderated-list-body
{
	min-inline-size: 0;
}

.moderation-toolbar
{
	margin-block-end: 1rem;
}

.moderation-toolbar button
{
	min-block-size: 44px;
	max-inline-size: 100%;
	overflow-wrap: anywhere;
}

.moderated-empty
{
	margin: 0;
	color: var(--auth-text-muted);
}

#moderated-list-body:not(:empty) + .moderated-empty
{
	display: none;
}

.moderated-entry
{
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr);
	align-items: start;
	gap: 8px;
	margin-block-end: 12px;
}

.moderated-entry__content
{
	min-inline-size: 0;
	overflow-wrap: anywhere;
}

.moderated-entry__content img
{
	max-inline-size: 100%;
	block-size: auto;
}

.moderation-action
{
	min-inline-size: 44px;
	min-block-size: 44px;
}

.moderated-message
{
	display: inline-block;
	box-sizing: border-box;
	max-width: 100%;
	padding: 6px 10px;
	border-radius: 10px;
	background: rgba(6, 43, 63, 0.08);
}

.admin-overlay-page
{
	padding: 0;
	background: transparent;
	height: 100%;
	min-height: 0;
	overflow: hidden;
}

.admin-overlay-app
{
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 0;
	width: 100%;
	height: 100%;
	min-height: 0;
	overflow: hidden;
}

.admin-overlay-app.popup-panel
{
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.admin-overlay-sidebar
{
	padding: 18px 16px;
	border-right: 1px solid var(--chat-panel-border);
	background: var(--admin-frame-bg);
	overflow: auto;
	border-radius: 0;
}

.admin-overlay-main
{
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	min-width: 0;
	min-height: 0;
	background: var(--surface-strong);
	overflow: hidden;
	border-radius: 0;
}

.admin-overlay-header
{
	padding: 18px 20px 14px;
	border-bottom: 1px solid rgba(149, 170, 188, 0.6);
}

.admin-overlay-header h1
{
	margin: 0;
	font-size: 1.2rem;
	color: var(--text-strong);
}

.admin-overlay-header p
{
	margin: 6px 0 0;
	color: var(--text-muted);
}

.admin-overlay-header p:empty
{
	display: none;
}

.admin-overlay-content
{
	display: flex;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.admin-overlay-frame
{
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	background: var(--admin-frame-bg);
}

.admin-content-root
{
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
}

.admin-injected-page
{
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	width: 100%;
	min-height: 100%;
	box-sizing: border-box;
}

.admin-injected-page.popup-page
{
	margin: 0;
	padding: 0;
	background: transparent;
	overflow: visible;
}

.admin-injected-page.admin-panel-page
{
	margin: 0;
	padding: 0;
	background: transparent;
}

.admin-injected-page.admin-panel-page--loading
{
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.admin-content-loading,
.admin-content-error
{
	padding: 18px 20px;
	border: 1px solid rgba(149, 170, 188, 0.6);
	border-radius: 12px;
	background: var(--surface-card);
	color: var(--text-muted);
	overflow-wrap: anywhere;
}

.admin-content-loading
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: min(100%, 24rem);
	min-height: 4.5rem;
	text-align: left;
	box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14);
}

.admin-content-loading__spinner
{
	flex: 0 0 auto;
	width: 1.1rem;
	height: 1.1rem;
	border: 2px solid rgba(149, 170, 188, 0.28);
	border-top-color: var(--admin-menu-link-active-bar);
	border-radius: 50%;
	animation: admin-loading-spin 0.85s linear infinite;
}

.admin-content-loading__label
{
	min-width: 0;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.admin-content-error
{
	color: #8d1d1d;
}

@keyframes admin-loading-spin
{
	from
	{
		transform: rotate(0deg);
	}
	to
	{
		transform: rotate(360deg);
	}
}

.admin-content-success
{
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	max-inline-size: calc(100% - 36px);
	margin: 18px 18px 0;
	padding: 10px 14px;
	border: 1px solid rgba(80, 138, 94, 0.35);
	border-radius: 10px;
	background: rgba(225, 244, 229, 0.92);
	color: #234f2c;
	box-sizing: border-box;
	overflow-wrap: anywhere;
}

.admin-inline-notice
{
	display: flex;
	width: 100%;
	max-width: none;
	margin: 0;
	align-self: stretch;
	box-sizing: border-box;
}

.admin-settings-lead > .admin-content-success.admin-inline-notice,
.admin-settings-lead > .admin-content-error.admin-inline-notice
{
	width: 100%;
	max-width: none;
	margin: 0;
	align-self: stretch;
}

.admin-inline-notice strong
{
	display: block;
	color: inherit;
}

.admin-inline-notice__details
{
	margin: 8px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: rgba(10, 24, 34, 0.16);
	color: inherit;
	font: 0.82rem/1.45 Consolas, Monaco, monospace;
	white-space: pre-wrap;
	word-break: break-word;
}

.admin-inline-help
{
	padding: 14px 16px;
	border: 1px solid rgba(149, 170, 188, 0.7);
	border-radius: 10px;
	background: var(--surface-soft);
	color: var(--text-strong);
}

.admin-inline-help__header
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.admin-inline-help__close
{
	padding: 0.35rem 0.7rem;
	border: 1px solid rgba(6, 43, 63, 0.25);
	border-radius: 999px;
	background: var(--surface-subtle);
	color: var(--text-strong);
	cursor: pointer;
}

.admin-inline-help__body
{
	color: var(--text-muted);
}

.admin-menu-list
{
	margin: 0;
	padding: 0;
	list-style: none;
}

.admin-menu-group
{
	margin: 0 0 14px;
}

.admin-menu-group__title
{
	margin-bottom: 6px;
	font-weight: bold;
	color: #f4f8fa;
}

.admin-menu-group .admin-menu-list
{
	padding-left: 10px;
	border-left: 1px solid rgba(149, 170, 188, 0.28);
}

.admin-menu-link
{
	display: block;
	width: 100%;
	padding: 7px 10px;
	margin: 2px 0;
	text-align: left;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: var(--admin-menu-link);
	font: inherit;
	cursor: pointer;
}

.admin-menu-link:hover,
.admin-menu-link.is-active
{
	background: rgba(149, 170, 188, 0.18);
	color: var(--admin-menu-link-active);
}

.admin-menu-link.is-active
{
	font-weight: bold;
	box-shadow: inset 3px 0 0 var(--admin-menu-link-active-bar);
}

.admin-panel-page
{
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	background: transparent;
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.admin-panel-page > form
{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 100%;
}

.admin-inline-section
{
	padding: 24px 28px 28px;
}

.admin-settings-form
{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 100%;
}

.admin-table-page,
.admin-editor-page
{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 100%;
}

.admin-settings-body
{
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 24px 0 24px;
}

.capacity-dashboard h2
{
	margin: 0 0 .75rem;
	font-size: 1.125rem;
}

.capacity-metrics
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
	gap: .75rem;
	margin: 0;
}

.capacity-metrics > div
{
	padding: .75rem 1rem;
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	background: var(--surface-card-alt);
}

.capacity-metrics dt,
.capacity-limit p
{
	color: var(--text-muted);
}

.capacity-metrics dd
{
	margin: .25rem 0 0;
	font-size: 1.4rem;
	font-variant-numeric: tabular-nums;
	font-weight: 650;
}

.capacity-load
{
	display: block;
	inline-size: 100%;
	block-size: .75rem;
	margin-block: .75rem;
}

.capacity-limit
{
	margin-block-start: 1rem;
}

.capacity-limit input
{
	inline-size: 10rem;
}

.capacity-limit p
{
	margin: 0;
}

.capacity-history caption
{
	padding-block-end: .5rem;
	text-align: start;
	font-weight: 600;
}

.capacity-history meter
{
	inline-size: min(6rem, 60%);
	block-size: .75rem;
	vertical-align: baseline;
	margin-inline-end: .5rem;
}

.capacity-history th[scope="row"]
{
	font-variant-numeric: tabular-nums;
	text-align: start;
}

.capacity-history meter::-webkit-meter-optimum-value,
.capacity-load::-webkit-meter-optimum-value
{
	background: var(--palette-primary);
}

.capacity-history meter.capacity-full::-webkit-meter-optimum-value
{
	background: var(--danger, #b14545);
}

.admin-settings-lead,
.admin-settings-help,
.admin-settings-group
{
	padding: 0 28px;
}

.admin-page-intro,
.admin-page-toolbar,
.admin-table-shell,
.admin-check-grid
{
	padding-left: 28px;
	padding-right: 28px;
}

.admin-page-intro
{
	padding-top: 24px;
	color: var(--text-muted);
	line-height: 1.6;
}

.admin-page-intro p
{
	margin: 0;
}

.admin-page-toolbar
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding-top: 24px;
}

.admin-page-toolbar__left,
.admin-page-toolbar__right
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.admin-page-toolbar__left .form-label
{
	margin-right: 2px;
}

.admin-toolbar-field
{
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.admin-toolbar-field input[type="text"],
.admin-toolbar-field select
{
	min-width: 12rem;
}

.admin-button--small
{
	min-height: 1.85rem;
	padding: 0.42rem 0.82rem;
}

.admin-table-shell
{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	padding-top: 24px;
	padding-bottom: 28px;
}

.admin-table-scroll
{
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
}

.admin-data-table
{
	width: 100%;
	border-collapse: collapse;
	background: var(--surface-strong);
}

.admin-data-table th
{
	padding: 12px 14px;
	border: 1px solid rgba(202, 214, 223, 0.9);
	background: var(--surface-muted);
	color: var(--text-soft);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.admin-data-table td
{
	padding: 14px;
	border: 1px solid rgba(202, 214, 223, 0.9);
	background: var(--surface-strong);
	color: var(--text-strong);
	vertical-align: top;
}

.admin-data-table td p
{
	margin: 0;
}

.admin-data-table td form
{
	margin: 0;
}

.admin-data-table__actions
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.admin-data-table__toggle
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.admin-data-table__meta
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.admin-row-actions
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.admin-data-table__empty
{
	color: var(--text-soft);
	font-style: italic;
}

.admin-news-message
{
	width: 100%;
	min-height: 7rem;
	resize: vertical;
}

.admin-log-stream
{
	display: flex;
	flex-direction: column;
	padding: 0 28px 28px;
	background: var(--surface-strong);
}

.admin-log-title {margin: 0 0 8px; font-size: 1.25rem; line-height: 1.3;}
.admin-log-footer,
.admin-log-pagination {display: flex; flex-wrap: wrap; align-items: center; gap: 12px;}
.admin-log-pagination {flex: 1 1 auto; margin: 0;}
.admin-log-page-state {flex: 1 1 14rem; margin: 0; color: var(--text-soft); font-size: .875rem;}
html[data-dialog-hosted="admin.section"] .admin-log-footer :is(button, input[type="button"]) {min-height: 48px; min-block-size: 48px; font-size: 1rem;}
.admin-log-pagination button {box-sizing: border-box; padding: .36rem .72rem; border: 1px solid var(--auth-border-strong); border-radius: 4px; background: var(--button-secondary-bottom); color: var(--auth-primary); font: inherit; font-weight: 600; cursor: pointer;}
.admin-log-pagination button:hover {background: var(--button-secondary-hover-bottom); color: var(--auth-primary-strong);}
.admin-log-pagination button:focus-visible {outline: 2px solid var(--text-strong); outline-offset: 2px;}
.admin-log-pagination button.admin-log-pagination__next {background: var(--auth-primary); border-color: var(--auth-primary-strong); color: var(--primary-button-text);}
.admin-log-pagination button.admin-log-pagination__next:hover {background: var(--auth-primary-strong);}

.admin-log-entry
{
	padding-block: 16px;
	border-block-end: 1px solid var(--border-soft);
	min-inline-size: 0;
	overflow-wrap: anywhere;
}

.admin-log-entry__header
{
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 20px;
}

.admin-log-entry__header time,
.admin-log-entry__context
{
	color: var(--text-soft);
	font-size: .875rem;
	font-variant-numeric: tabular-nums;
}

.admin-log-entry__context,
.admin-log-entry__text {margin-block: 8px;}
.admin-log-entry__text,
.admin-log-entry__details dd {white-space: pre-wrap;}
.admin-log-entry__details summary {cursor: pointer; min-block-size: 44px; align-content: center;}
.admin-log-entry__details dl {margin: 0;}
.admin-log-entry__details dl > div {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 8px 16px; padding-block: 4px;}
.admin-log-entry__details dt {color: var(--text-soft);}
.admin-log-entry__details dd {margin: 0; min-inline-size: 0;}

@media (max-width: 480px)
{
	.admin-log-entry__details dl > div {grid-template-columns: minmax(0, 1fr); gap: 2px;}
}

.admin-check-grid
{
	display: grid;
	gap: 14px;
	padding-top: 24px;
	padding-bottom: 28px;
}

.admin-check-row
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px;
	align-items: start;
	padding: 14px 16px;
	border: 1px solid rgba(202, 214, 223, 0.9);
	background: var(--surface-strong);
}

.admin-check-row__meta
{
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.admin-check-row__title
{
	margin: 0;
	color: var(--text-strong);
	font-weight: 600;
	line-height: 1.45;
}

.admin-check-row__description
{
	color: var(--text-soft);
	font-size: 0.85rem;
	line-height: 1.45;
}

.admin-settings-alert
{
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 14px;
	align-items: start;
	padding: 16px 18px;
	border: 1px solid rgba(202, 214, 223, 0.82);
	border-radius: 8px;
	background: var(--surface-strong);
}

.admin-settings-alert__icon
{
	display: flex;
	align-items: center;
	justify-content: center;
}

.admin-settings-alert__text
{
	margin: 0;
	color: var(--text-muted);
	line-height: 1.6;
}

.admin-settings-group
{
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.admin-settings-group:last-of-type
{
	padding-bottom: 28px;
}

.admin-settings-group__title
{
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(202, 214, 223, 0.82);
	color: var(--text-strong);
	font-size: 1rem;
}

.admin-settings-list
{
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mail-settings-transport-list
{
	display: grid;
	gap: 10px;
}

.mail-settings-transport
{
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 12px;
	align-items: start;
	padding: 14px 16px;
	border: 1px solid rgba(202, 214, 223, 0.82);
	border-radius: 8px;
	background: var(--surface-strong);
}

.mail-settings-transport__copy
{
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.mail-settings-transport__copy strong
{
	color: var(--text-strong);
	font-size: 0.96rem;
}

.mail-settings-transport__copy small
{
	color: var(--text-muted);
	font-size: 0.83rem;
	line-height: 1.45;
}

.admin-setting-row
{
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
	gap: 16px 22px;
	align-items: start;
}

.admin-setting-row__meta
{
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	align-items: start;
	min-width: 0;
}

.admin-setting-row__help
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding-top: 1px;
	text-decoration: none;
}

.admin-setting-row__label,
.form-choice > legend
{
	margin: 0;
	color: var(--text-strong);
	font-weight: 600;
	line-height: 1.45;
}

.admin-setting-row__control
{
	min-width: 0;
}

.form-choice
{
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.form-choice__options
{
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: .375rem;
	margin-block-start: .375rem;
}

.admin-setting-row:has(> .admin-setting-row__control > .form-choice)
{
	grid-template-columns: minmax(0, 1fr);
	gap: 5px;
}

.admin-setting-row__meta + .admin-setting-row__control > .form-choice > .form-choice__options
{
	margin-block-start: 0;
}

.form-choice__options label
{
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .25rem .65rem;
	border: 1px solid var(--auth-border-strong);
	border-radius: 4px;
	background: var(--button-secondary-bottom);
	color: var(--text-strong);
	cursor: pointer;
	font-weight: 600;
}

.form-choice__options label > span
{
	font-weight: 700;
}

.form-choice__options input:checked + label
{
	background: #2d762f;
	border-color: #2d762f;
	color: #fff;
}

.form-choice__options input[value="0"]:checked + label
{
	background: #b82828;
	border-color: #b82828;
}

.form-choice__options input:not(:checked) + label:hover
{
	background: var(--button-secondary-hover-bottom);
}

.form-choice__options input:focus-visible + label
{
	outline: 2px solid var(--auth-input-border-focus);
	outline-offset: 2px;
}

@media (pointer: coarse)
{
	.form-choice__options label {min-block-size: 3rem;}
}

@media (forced-colors: active)
{
	.form-choice__options input:checked + label {border-color: Highlight; text-decoration: underline;}
}

.admin-setting-row__control > input[type="text"],
.admin-setting-row__control > input[type="email"],
.admin-setting-row__control > input[type="password"],
.admin-setting-row__control > select,
.admin-setting-row__control > textarea,
.admin-setting-row__control > .fullsize
{
	width: 100%;
}

.admin-input-with-suffix
{
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: 100%;
}

.admin-input-with-suffix > input
{
	width: 8rem;
	max-width: 100%;
}

.admin-input-with-suffix > span
{
	color: var(--text-muted);
	white-space: nowrap;
}

.admin-inline-copy
{
	margin: 0;
	padding: 12px 20px;
	color: var(--text-muted);
	line-height: 1.55;
}

.admin-panel-page > .overlay-footer
{
	margin-top: auto;
}

.admin-panel-page > form > .overlay-footer
{
	margin-top: auto;
}

.admin-panel-page > .admin-inline-section:first-child
{
	padding-top: 24px;
}

.admin-panel-card
{
	max-width: 640px;
	padding: 20px 22px;
}

.admin-panel-card h2
{
	margin: 0 0 10px;
	color: var(--text-strong);
}

.admin-panel-card p
{
	margin: 0;
	color: var(--text-muted);
}

@media (max-width: 900px), (pointer: coarse) and (max-width: 1100px) and (max-height: 500px)
{
	.chat-shell
	{
		min-height: auto;
		padding: 8px;
		gap: 8px;
	}

	.chat-main
	{
		flex: 0 0 auto;
		flex-direction: column;
		gap: 8px;
	}

	.chat-stream
	{
		flex: 0 0 auto;
		height: min(42vh, 360px);
		min-height: 240px;
	}

	.chat-sidebar
	{
		flex: 0 0 auto;
		min-width: 0;
		max-width: none;
		padding: 8px;
	}

	.chat-sidebar.chat-sidebar-collapsed
	{
		flex-basis: auto;
		min-width: 0;
		max-width: none;
	}

	.private-shell
	{
		grid-template-rows: minmax(0, 1fr) auto;
	}

	.admin-overlay-app
	{
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(0, 1fr);
		height: 100%;
	}

	.admin-overlay-sidebar
	{
		max-height: 34vh;
		border-right: 0;
		border-bottom: 1px solid var(--chat-panel-border);
	}

	.admin-overlay-header
	{
		padding: 14px 16px 12px;
	}

	.admin-overlay-content
	{
		min-height: 36vh;
	}

	.admin-setting-row
	{
		grid-template-columns: 1fr;
	}

	.smiley-admin-upload
	{
		grid-template-columns: 1fr;
		margin-left: 20px;
		margin-right: 20px;
	}

	.smiley-admin-upload__aside
	{
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 14px;
	}

	.smiley-admin-upload__preview
	{
		width: 96px;
		height: 96px;
	}

	.smiley-admin-upload__preview img
	{
		max-width: 64px;
		max-height: 64px;
	}

	.smiley-admin-upload__field--file
	{
		min-width: 0;
	}

	.smiley-admin-upload__grid
	{
		grid-template-columns: 1fr;
	}

	.admin-settings-lead,
	.admin-settings-help,
	.admin-settings-group,
	.admin-page-intro,
	.admin-page-toolbar,
	.admin-table-shell,
	.admin-check-grid
	{
		padding-left: 20px;
		padding-right: 20px;
	}

	.admin-check-row
	{
		grid-template-columns: 1fr;
	}

	body.chat-page #toolbar
	{
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 6px;
		padding: 8px;
	}

	.chat-toolbar
	{
		grid-template-columns: 1fr;
		display: grid;
		grid-template-areas:
			"primary"
			"toggles"
			"status";
	}

	.chat-toolbar__group--status
	{
		margin-left: 0;
		justify-content: flex-start;
		flex-wrap: wrap;
	}
}

@media (max-width: 900px)
{
	body.auth-page
	{
		margin: 0;
		padding: 12px 12px 24px;
	}

	.auth-screen
	{
		padding: 0;
		gap: 16px;
		min-width: 0;
		max-width: 100%;
	}

	.auth-public-header .auth-shell-header
	{
		padding: 14px 12px;
		flex-direction: row;
		align-items: center;
		gap: 8px;
	}
	.auth-shell-brand {gap: 8px; min-inline-size: 0; min-block-size: 44px;}
	.auth-shell-brand__name {font-size: 1.375rem;}
	.auth-shell-mark {inline-size: 32px; block-size: 30px; flex: none;}
	.auth-header-tools {gap: 4px; flex: none;}
	.auth-language-switcher {gap: 2px;}
	.auth-shell-header .auth-language-link {min-block-size: 44px; padding: 4px 6px; gap: 5px;}
	.auth-language-link > span:last-child {display: none;}
	.auth-language-link::after {content: attr(lang); text-transform: uppercase; font-size: .75rem;}
	.auth-public-nav {gap: 0; padding-inline: 4px;}
	body.auth-page .auth-public-nav a {padding-inline: 8px; font-size: .8125rem;}
	.auth-page--login :is(.auth-lounge, .auth-news, .auth-welcome__caption) {padding: 18px;}
	.auth-grid
	{
		grid-template-columns: 1fr;
		gap: 14px;
		margin-top: 0;
		min-width: 0;
		max-width: 100%;
	}

	.auth-section-stack,
	.auth-card,
	.auth-sidebar-card,
	.auth-card__head,
	.auth-card__body,
	.auth-form,
	.form-card,
	.form-section,
	.auth-info-item
	{
		min-width: 0;
		max-width: 100%;
		box-sizing: border-box;
	}
}

@media (max-width: 900px), (pointer: coarse) and (max-width: 1100px) and (max-height: 500px)
{
	body.chat-page {overflow: hidden;}
	.chat-user-link {display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 4px;}
	.chat-user-item {min-block-size: 52px;}
	.chat-shell
	{
		position: fixed;
		inset-inline: 0;
		inset-block-start: var(--chat-visible-top, 0px);
		height: 100vh;
		height: var(--chat-visible-height, 100dvh);
		min-height: 0;
		padding-block: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
		padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
		gap: 8px;
	}

	.chat-titlebar {min-block-size: 48px; padding-inline: 4px; gap: 8px; flex-shrink: 0;}
	.chat-titlebar h1 {flex: 1 1 0; font-size: 1rem;}
	.chat-titlebar-brand {display: none;}
	.chat-account-label {display: none;}
	.chat-account, .chat-logout {min-block-size: 44px; min-inline-size: 44px; font-size: .875rem;}
	#chat-account-root .chat-account-area {flex-wrap: nowrap; gap: 6px; min-inline-size: 0;}
	#chat-account-root {min-inline-size: 0; max-inline-size: 60%;}
	.chat-account {min-inline-size: 44px; flex: 1 1 auto;}
	.chat-account > span:last-child {min-inline-size: 0; max-inline-size: 5.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
	.chat-titlebar .chat-logout {flex: 0 0 auto; padding-inline-end: 4px; white-space: nowrap;}

	.chat-titlebar > .chat-private-strip
	{
		flex: 0 1 max(100px, 30%);
		max-inline-size: 180px;
	}

	.chat-titlebar > .chat-private-strip[data-compact] {flex: 0 0 auto;}

	.chat-shell:has(.chat-titlebar #private-tabs > button)
	{
		gap: 4px;
		padding-block: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-bottom));
	}

	.chat-titlebar:has(#private-tabs > button) {min-block-size: 44px;}

	.chat-titlebar > .chat-private-strip:not(:has(#private-tabs > button))
	{
		display: none;
	}

	@media (max-width: 359px)
	{
		.chat-titlebar:has(#private-tabs > button) .chat-logout
		{
			padding-inline: 0;
			background: url("images/menu_logout.gif") center / 18px no-repeat;
			font-size: 0;
			image-rendering: pixelated;
		}
	}

	.chat-main
	{
		flex: 1 1 0%;
		min-height: 0;
	}

	body.messages-page
	{
		padding: 10px;
	}

	.messages-intro
	{
		gap: 10px;
	}

	.messages-intro__hero
	{
		padding: 0 0 10px;
		border-radius: 0;
	}

	.messages-intro__title
	{
		font-size: 0.9375rem;
	}
	.messages-page[data-chat-embedded="true"] :is(.messages-intro__title, .messages-intro__welcome) {display: none;}
	.messages-page[data-chat-embedded="true"] .messages-intro__hero {padding: 0; border: 0;}
	body.messages-page {min-block-size: 100dvh; box-sizing: border-box; display: flex; flex-direction: column;}
	.messages-page [data-message-log] {margin-block-start: auto;}
	.messages-page .chat-message
	{
		inline-size: fit-content;
		max-inline-size: 90%;
		box-sizing: border-box;
		margin-block: 8px;
		padding: 9px 12px;
		border: 1px solid var(--chat-panel-border);
		border-radius: 10px 10px 10px 2px;
		background: var(--surface-card-alt);
		overflow-wrap: anywhere;
	}
	.messages-page .chat-message--own
	{
		margin-inline-start: auto;
		border-radius: 10px 10px 2px 10px;
		background: var(--surface-strong);
	}

	@media (max-height: 135px)
	{
		.messages-page[data-chat-embedded="true"] {padding: 6px;}
		html[data-dialog-hosted="private_frames"] .private-shell__messages-body {padding-block: 4px;}
		.messages-page[data-chat-embedded="true"] .chat-message,
		html[data-dialog-hosted="private_frames"] .private-shell__messages-body .chat-message
		{
			max-inline-size: 100%;
			margin-block: 4px;
			padding: 5px 8px;
		}
	}
	.messages-page [data-chat-room-block]
	{
		contain-intrinsic-block-size: auto 288rem;
	}
	/* Give the outer margins to the block so bubbles keep their usual gap. */
	.messages-page [data-chat-room-block]:has(> :first-child > .chat-message:first-child)
	{
		margin-block-start: 8px;
	}
	.messages-page [data-chat-room-block]:has(> :last-child > .chat-message:last-child)
	{
		margin-block-end: 8px;
	}
	.messages-page [data-chat-room-block] > :first-child > .chat-message:first-child
	{
		margin-block-start: 0;
	}
	.messages-page [data-chat-room-block] > :last-child > .chat-message:last-child
	{
		margin-block-end: 0;
	}
	.private-shell__messages-body
	{
		overscroll-behavior: contain;
		padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
	}
	html[data-dialog-hosted="private_frames"] .private-shell__input
	{
		padding-block-end: max(10px, env(safe-area-inset-bottom));
		padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
	}
	@media (max-height: 135px)
	{
		html[data-dialog-hosted="private_frames"] .private-shell__input
		{
			padding-block: 6px max(6px, env(safe-area-inset-bottom));
		}
	}

	.chat-stream
	{
		flex: 1 1 auto;
		height: auto;
		min-height: 0;
		border-radius: 3px;
	}

	.chat-sidebar
	{
		position: fixed;
		left: 0;
		right: 0;
		top: var(--chat-visible-top, 0px);
		bottom: auto;
		height: var(--chat-visible-height, 100dvh);
		z-index: 90;
		display: flex;
		flex-direction: column;
		min-width: 0;
		max-width: none;
		padding: 0;
		overflow: hidden;
		border-radius: 0;
		transform: translateY(18px);
		opacity: 0;
		pointer-events: none;
		visibility: hidden;
		transition: opacity 0.2s ease, transform 0.2s ease;
	}

	body.mobile-panels-open .chat-sidebar
	{
		transform: translateY(0);
		opacity: 1;
		pointer-events: auto;
		visibility: visible;
	}

	#chat-sidebar-content
	{
		flex: 1 1 auto;
		padding-block: 12px max(12px, env(safe-area-inset-bottom));
		padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
		overflow: auto;
	}

	.chat-menu.popup-panel
	{
		position: fixed;
		left: 0;
		right: 0;
		top: var(--chat-visible-top, 0px);
		bottom: auto;
		height: var(--chat-visible-height, 100dvh);
		z-index: 95;
		display: block !important;
		max-height: none;
		padding: 0;
		overflow: auto;
		border-radius: 0;
		transform: translateY(calc(100% + 12px));
		opacity: 0;
		pointer-events: none;
		visibility: hidden;
		transition: opacity 0.2s ease, transform 0.2s ease;
	}

	body.mobile-menu-open .chat-menu
	{
		transform: translateY(0);
		opacity: 1;
		pointer-events: auto;
		visibility: visible;
	}

	.chat-mobile-panel-header
	{
		display: flex;
		align-items: center;
		position: sticky;
		top: 0;
		z-index: 2;
		padding-block: max(6px, env(safe-area-inset-top)) 6px;
		padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
		gap: 12px;
		justify-content: flex-start;
		border-bottom: 1px solid rgba(149, 170, 188, 0.6);
		background: var(--surface-card-alt);
		color: var(--text-strong);
	}

	.chat-mobile-panel-close
	{
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 3px;
		background: var(--surface-muted);
		color: var(--text-strong);
		font-size: 0;
		line-height: 0;
	}

	.chat-mobile-panel-close span
	{
		display: block;
		font-size: 24px;
		line-height: 1;
		transform: translateY(-1px);
	}

	.chat-footer
	{
		flex: 0 0 auto;
		gap: 8px;
	}

	@media (min-width: 640px)
	{
		html[data-chat-short-viewport] .chat-footer:has(#private-tabs > button)
		{
			display: grid;
			grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
			align-items: center;
		}

		html[data-chat-short-viewport] .chat-footer:has(.chat-private-strip[data-compact] #private-tabs > button)
		{
			grid-template-columns: auto minmax(0, 1fr);
		}
	}

	.chat-input
	{
		position: relative;
		z-index: 20;
		padding: 0;
	}

	.chat-private-tabs
	{
		gap: 6px;
		padding-top: 0;
	}

	.chat-private-tab
	{
		max-width: 180px;
		min-block-size: 44px;
		min-inline-size: 44px;
		padding: 0.5rem 0.7rem;
	}

	.chat-private-tab__label
	{
		font-size: 0.82rem;
	}

	.chat-private-tab--compact
	{
		position: relative;
		justify-content: center;
		padding: 0;
	}

	.chat-private-tab--compact[data-unread]::after
	{
		content: '';
		position: absolute;
		inset-block-start: 6px;
		inset-inline-end: 6px;
		inline-size: 8px;
		block-size: 8px;
		border-radius: 50%;
		background: var(--error-text);
	}

	.chat-private-tabs[popover]
	{
		--private-list-top: calc(max(4px, env(safe-area-inset-top)) + 50px);
		box-sizing: border-box;
		position: fixed;
		inset-block: calc(var(--chat-visible-top, 0px) + var(--private-list-top)) auto;
		inset-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
		margin-block: 0;
		margin-inline: auto;
		inline-size: auto;
		max-inline-size: 24rem;
		max-block-size: calc(var(--chat-visible-height, 100dvh) - var(--private-list-top) - max(4px, env(safe-area-inset-bottom)));
		flex-direction: column;
		gap: 4px;
		padding: 4px;
		overflow-y: auto;
		overscroll-behavior: contain;
		scroll-padding-block: 4px;
		border: 1px solid var(--chat-panel-border);
		border-radius: 3px;
		background: var(--surface-card);
		color: var(--text-strong);
	}

	.chat-private-tabs[popover]:popover-open {display: flex;}
	.chat-private-tabs[popover] .chat-private-tab
	{
		max-inline-size: none;
		padding: 4px 8px;
		text-align: start;
	}

	.chat-private-tabs[popover] .chat-private-tab__label
	{
		flex: 1 1 auto;
		line-height: 1.2;
		white-space: normal;
		overflow-wrap: anywhere;
	}

	.chat-compose-row
	{
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto auto;
		align-items: center;
		gap: 8px;
	}

	.chat-compose-row input[type="text"]
	{
		min-width: 0;
		min-block-size: 48px;
	}

	.chat-compose-row .chat-submit
	{
		min-inline-size: 48px;
		min-block-size: 48px;
		padding: 0 12px;
		border-radius: 3px;
	}

	.chat-submit span
	{
		display: block;
		font-size: .875rem;
	}
	.chat-submit img {display: none;}

	.chat-mobile-toggle
	{
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-block-size: 44px;
		min-inline-size: 44px;
		border: 0;
		border-radius: 3px;
		background: transparent;
		color: var(--text-strong);
		cursor: pointer;
	}
	.chat-mobile-toggle[aria-expanded="true"] {background: var(--surface-strong);}

	.chat-mobile-tools
	{
		min-block-size: 48px;
		min-inline-size: 48px;
		padding: 0;
		border: 1px solid var(--auth-input-border);
		background: var(--surface-card-alt);
	}
	.chat-mobile-tools img {image-rendering: pixelated;}
	.chat-smiley-trigger {min-inline-size: 48px; min-block-size: 48px;}
	.chat-mobile-room-back
	{
		max-inline-size: 100%;
		justify-content: flex-start;
		gap: 8px;
		padding: 0 4px;
		font: inherit;
	}
	.chat-mobile-room-chevron {font-size: 1.6rem; line-height: 1;}
	#mobile-room-title {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}

	@media (max-width: 359px)
	{
		.chat-compose-row .chat-submit {padding: 0;}
		.chat-compose-row .chat-submit span {display: none;}
		.chat-compose-row .chat-submit img {display: block;}
	}

	#restore_menu
	{
		display: none !important;
	}

	body.chat-page #toolbar
	{
		display: block;
		padding-block: 12px;
		padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
		border: 0;
		box-shadow: none;
		background: transparent;
	}

	.chat-toolbar
	{
		display: flex;
		flex-direction: column;
		gap: 12px;
		align-items: stretch;
		padding-bottom: env(safe-area-inset-bottom);
	}

	.chat-toolbar__section-title
	{
		display: block;
		margin: 4px 4px 0;
		color: var(--text-muted);
		font-size: 0.8125rem;
		font-weight: 600;
	}

	.chat-toolbar__group + .chat-toolbar__section-title
	{
		margin-top: 12px;
	}

	.chat-toolbar__group
	{
		display: grid;
		gap: 8px;
		min-width: 0;
	}

	.chat-toolbar__group--primary
	{
		grid-template-columns: repeat(2, minmax(0, 1fr));
		overflow: visible;
		padding-bottom: 0;
	}

	.chat-toolbar__group--admin
	{
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.chat-toolbar__group--toggles
	{
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.chat-toolbar__group--status
	{
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		margin-left: 0;
	}

	.chat-toolbutton,
	.chat-toolbar__collapse
	{
		width: auto;
		min-width: 0;
	}

	.chat-toolbutton
	{
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		height: auto;
		min-height: 52px;
		padding: 0.72rem 0.85rem;
		gap: 9px;
		border-radius: 3px;
		border-color: var(--border-soft-2);
		background: var(--surface-strong);
		box-shadow: none;
		white-space: normal;
		text-align: left;
		align-self: stretch;
	}

	.chat-toolbutton span
	{
		display: block;
		font-size: 0.84rem;
		line-height: 1.2;
	}

	.chat-toolbutton img
	{
		flex: 0 0 auto;
		width: 18px;
		height: 18px;
	}

	.chat-toolbar__group--primary .chat-toolbutton
	{
		position: relative;
		padding-right: 2.2rem;
	}

	.chat-toolbar__group--primary .chat-toolbutton::after
	{
		content: "›";
		position: absolute;
		right: 0.95rem;
		top: 50%;
		transform: translateY(-50%);
		color: #8ba2b6;
		font-size: 1.2rem;
		line-height: 1;
	}

	.chat-toolbar__group--toggles .chat-toolbutton,
	.chat-toolbar__group--admin .chat-toolbutton,
	.chat-toolbar__group--status .chat-toolbutton
	{
		min-height: 52px;
		padding: 0.72rem 0.85rem;
		border-radius: 8px;
		box-shadow: none;
	}

	.chat-toolbar__group--toggles .chat-toolbutton span,
	.chat-toolbar__group--admin .chat-toolbutton span,
	.chat-toolbar__group--status .chat-toolbutton span
	{
		font-size: 0.8rem;
	}

	.chat-toolbar__group--admin .chat-toolbutton,
	.chat-toolbar__group--toggles .chat-toolbutton
	{
		background: var(--surface-strong);
		border-color: var(--border-soft-2);
	}

	.chat-toolbar__group--admin
	{
		padding: 0;
		border-radius: 0;
		background: transparent;
		border: 0;
	}

	.chat-toolbar__group--toggles
	{
		padding: 0;
		border-radius: 0;
		background: transparent;
		border: 0;
	}

	.chat-toolbar__group--status .chat-toolbutton
	{
		justify-content: center;
	}

	.chat-toolbar__collapse
	{
		display: none;
	}







	.palette-picker
	{
		padding: 14px;
		gap: 14px;
	}

	.palette-card
	{
		padding: 14px;
	}

	.palette-card--selection
	{
		gap: 10px;
	}

	.palette-selection-row
	{
		grid-template-columns: 44px minmax(0, 1fr);
	}

	.palette-hex-row
	{
		flex-direction: column;
	}

	.palette-apply
	{
		width: 100%;
	}

	.palette-grid
	{
		grid-template-columns: repeat(auto-fill, 44px);
	}

	.search-shell__body
	{
		padding: 14px 14px 0;
		gap: 14px;
	}

	.search-hero
	{
		grid-template-columns: 1fr;
		gap: 12px;
		padding: 14px;
	}

	.search-hero__badge
	{
		width: 48px;
		height: 48px;
	}

	.traceroute-shell__body
	{
		padding: 14px;
		gap: 14px;
	}

	.traceroute-meta
	{
		grid-template-columns: 1fr;
	}

	.traceroute-output
	{
		padding: 14px;
		font-size: 0.86rem;
	}

	.smiley-card
	{
		grid-template-columns: 48px minmax(0, 1fr);
		gap: 12px;
		padding: 12px;
	}

	.smiley-card__preview
	{
		width: 48px;
		height: 48px;
	}

	.smiley-card__preview img
	{
		max-width: 26px;
		max-height: 26px;
	}

	.smiley-chip
	{
		min-height: 32px;
		padding: 0 10px;
		font-size: 0.88rem;
	}

	.admin-overlay-sidebar
	{
		max-height: 30vh;
		padding: 12px 10px;
	}

	.admin-overlay-header
	{
		padding: 12px 14px 10px;
	}

	.admin-overlay-header h1
	{
		font-size: 0.9375rem;
	}

	.admin-overlay-header p
	{
		font-size: 0.95rem;
	}

	.admin-panel-page
	{
		padding: 12px;
	}

	.admin-panel-card
	{
		max-width: none;
		padding: 14px 16px;
	}

	.admin-welcome-copy
	{
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce)
{
	.chat-sidebar,
	.chat-menu,
	.chat-mobile-backdrop
	{
		transition: none;
	}
}
/* Native tools share a quiet frame. Private conversations leave the room usable. */
.gtchat-dialog
{
	box-sizing: border-box;
	padding: 0;
	margin: auto;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	border: 1px solid var(--chat-panel-border);
	border-radius: 8px;
	background: var(--surface-strong);
	color: var(--text-strong);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
	overflow: hidden;
}

.gtchat-dialog:is([open], :popover-open)
{
	display: flex;
	flex-direction: column;
}

.gtchat-dialog:modal
{
	overscroll-behavior: contain;
}

.gtchat-dialog::backdrop
{
	background: rgba(5, 23, 33, 0.35);
	overflow: hidden;
	overscroll-behavior: contain;
}

.gtchat-dialog--private
{
	position: fixed;
	inset: auto 12px 160px auto;
	margin: 0;
	z-index: 5000;
}

@supports (position-area: block-start span-inline-end)
{
	.gtchat-dialog--private.gtchat-dialog--anchored
	{
		inset: auto;
		margin: 0 0 8px;
		position-area: block-start span-inline-end;
		position-try-fallbacks: flip-inline;
	}
}

.gtchat-dialog--private::backdrop
{
	background: transparent;
}

.gtchat-dialog.gtchat-dialog--mobile
{
	max-width: none;
	max-height: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
.gtchat-dialog.gtchat-dialog--mobile .gtchat-modal-header {min-block-size: 52px; padding-block-start: max(4px, env(safe-area-inset-top)); padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));}
.gtchat-dialog.gtchat-dialog--mobile :is(.gtchat-modal-close, .gtchat-modal-minimize) {min-inline-size: 44px; min-block-size: 44px;}
.gtchat-dialog--mobile .gtchat-modal-minimize {order: -1; margin-inline-end: 4px;}
.gtchat-dialog--mobile .gtchat-modal-minimize > span:first-child {display: none;}
.gtchat-dialog--mobile .gtchat-private-back-icon {display: inline;}
.gtchat-dialog.gtchat-dialog--mobile .gtchat-private-resize {display: none;}
.gtchat-dialog .gtchat-private-resize
{
	cursor: nesw-resize;
	touch-action: none;
}
.gtchat-private-profile
{
	color: inherit;
	text-underline-offset: 0.18em;
}
.gtchat-private-profile:hover
{
	color: var(--auth-primary);
}

.private-day-heading
{
	align-self: center;
	margin: 0.65rem auto 0.35rem;
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	background: var(--surface-soft);
	color: var(--text-muted);
	font-size: 0.75rem;
	font-weight: 600;
	text-align: center;
	inline-size: fit-content;
}

.private-day-group {display: flow-root;}

[data-private-message-block]
{
	display: flow-root;
	contain-intrinsic-block-size: auto 224rem;
}

[data-private-message-older]:not(:focus-within)
{
	content-visibility: auto;
}

/* Keep the same bubble spacing across block boundaries. */
[data-private-message-block]:has(> .chat-message:first-child) {margin-block-start: 8px;}
[data-private-message-block]:has(> .chat-message:last-child) {margin-block-end: 8px;}
.private-shell__messages-body [data-private-message-block] > .chat-message:first-child {margin-block-start: 0;}
.private-shell__messages-body [data-private-message-block] > .chat-message:last-child {margin-block-end: 0;}

.private-shell__messages-body[data-private-scrolling] .private-day-heading
{
	position: sticky;
	inset-block-start: 0;
	z-index: 1;
}

.private-message-time
{
	display: inline-block;
	margin-inline-start: 0.5em;
	color: var(--text-muted);
	font-size: 0.75em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.gtchat-dialog .gtchat-modal-header
{
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 4px 8px 4px 16px;
	border: 0;
	border-bottom: 1px solid var(--chat-panel-border);
	background: var(--surface-strong);
}

.gtchat-dialog .gtchat-modal-title
{
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 1rem;
	line-height: 1.35;
	font-weight: 700;
	color: var(--text-strong);
}

.gtchat-dialog .gtchat-modal-title:focus,
.admin-overlay-header h1:focus
{
	outline: none;
}

.gtchat-dialog .gtchat-modal-close
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	min-width: 40px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	box-shadow: none;
	color: var(--text-strong);
	cursor: pointer;
}

.gtchat-dialog .gtchat-modal-close span
{
	font-size: 24px;
	line-height: 1;
}

.gtchat-dialog .gtchat-modal-close:hover
{
	background: var(--surface-soft);
}

.gtchat-dialog-frame
{
	display: block;
	flex: 1 1 0;
	min-height: 0;
	width: 100%;
	border: 0;
	background: var(--surface-strong);
}

/* These overrides apply only to documents hosted inside a native dialog. */
html[data-dialog-hosted],
html[data-dialog-hosted] body
{
	height: auto;
	min-height: 0;
}

html[data-dialog-hosted] .popup-page
{
	margin: 0;
	padding: 16px;
	background: var(--surface-strong);
}

html[data-dialog-hosted] .form-shell,
html[data-dialog-hosted] .form-card,
html[data-dialog-hosted] .form-card--dialog-simple
{
	min-height: 0;
}

html[data-dialog-hosted] .form-card
{
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

html[data-dialog-hosted] .form-card--dialog-simple > .form-section
{
	padding: 0;
}

html[data-dialog-hosted] .form-card--dialog-simple > .form-section + .form-section
{
	padding-top: 20px;
}

html[data-dialog-hosted] .overlay-footer
{
	margin-top: 20px;
	padding: 12px 0 0;
	border-color: var(--chat-panel-border);
	position: sticky;
}

html[data-dialog-hosted="admin.menu"],
html[data-dialog-hosted="private_frames"],
html[data-dialog-hosted="admin.menu"] .popup-page,
html[data-dialog-hosted="private_frames"] .popup-page
{
	height: 100%;
	padding: 0;
	overflow: hidden;
}

html[data-dialog-hosted="private_frames"] .private-shell
{
	gap: 0;
	padding: 0;
}

html[data-dialog-hosted="private_frames"] .popup-panel
{
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

html[data-dialog-hosted="private_frames"] .private-shell__input
{
	padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
	border-top: 1px solid var(--chat-panel-border);
}

html[data-dialog-hosted="admin.menu"] .admin-overlay-app
{
	grid-template-columns: 240px minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr);
}

html[data-dialog-hosted="admin.menu"] .admin-overlay-sidebar
{
	max-height: none;
	padding: 12px;
	background: var(--surface-soft);
}

html[data-dialog-hosted="admin.menu"] .admin-menu-group__title,
html[data-dialog-hosted="admin.menu"] .admin-menu-link.is-active
{
	color: var(--text-strong);
}

html[data-dialog-hosted="admin.menu"] .admin-menu-link
{
	color: var(--auth-primary);
}

html[data-dialog-hosted="admin.menu"] .admin-menu-link.is-active
{
	box-shadow: inset 3px 0 0 var(--auth-primary);
}

.admin-section-navigation
{
	display: none;
}

.admin-section-navigation label
{
	display: block;
	margin-bottom: 6px;
	color: var(--text-strong);
}

.admin-section-navigation__controls
{
	display: flex;
	gap: 8px;
}

.admin-section-navigation__controls select
{
	flex: 1 1 auto;
	width: 0;
	min-width: 0;
}

.admin-section-navigation__controls :is(select, button)
{
	font: inherit;
	font-size: 1rem;
	min-height: 48px;
}

html[data-dialog-hosted="admin.menu"] .admin-overlay-main
{
	background: var(--surface-strong);
}

html[data-dialog-hosted="admin.menu"] .admin-overlay-header
{
	padding: 16px 20px;
}

html[data-dialog-hosted="admin.menu"] .admin-overlay-header h1
{
	font-size: 1.1rem;
}

html[data-dialog-hosted="admin.menu"] .admin-overlay-content
{
	min-height: 0;
}

html[data-dialog-hosted="admin.menu"] .admin-injected-page .overlay-footer
{
	position: sticky;
	margin-top: auto;
	padding: 12px 16px;
}

html[data-dialog-hosted="admin.menu"] .overlay-footer .form-actions > *
{
	flex: 0 1 auto;
	width: auto;
	min-height: 40px;
}

@media (max-width: 600px)
{
	.gtchat-dialog .gtchat-modal-close
	{
		width: 44px;
		height: 44px;
	}

	html[data-dialog-hosted="admin.menu"] .admin-overlay-app
	{
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr);
	}

	html[data-dialog-hosted="admin.menu"] .admin-overlay-sidebar
	{
		border-right: 0;
		border-bottom: 1px solid var(--chat-panel-border);
	}

	.admin-section-navigation
	{
		display: block;
	}

	html[data-dialog-hosted="admin.menu"] #admin-menu-tree
	{
		display: none;
	}
}

/* Dialog contents: grouped settings, compact desktop fields, and readable lists. */
html[data-dialog-hosted]
{
	--dialog-control-size: 2rem;
	--dialog-control-font: 0.875rem;
	--dialog-content-gap: 1.5rem;
}

html[data-dialog-hosted] .popup-page
{
	font-size: 0.875rem;
	line-height: 1.45;
}

html[data-dialog-hosted] .admin-settings-body,
html[data-dialog-hosted] .settings-layout,
html[data-dialog-hosted] .permission-editor
{
	container: settings / inline-size;
}

html[data-dialog-hosted] .admin-settings-body
{
	gap: var(--dialog-content-gap);
	padding: 20px;
}

html[data-dialog-hosted] :is(.admin-settings-lead, .admin-settings-help, .admin-settings-group)
{
	padding: 0;
}

.settings-layout
{
	gap: var(--dialog-content-gap, 1.5rem);
}

.settings-section
{
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.settings-section > legend
{
	float: none;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 12px;
	padding: 0;
	color: var(--text-strong);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
}

.settings-fields,
html[data-dialog-hosted] .form-grid
{
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px 24px;
}

.settings-fields--preferences > .admin-setting-row
{
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 5px 20px;
}

.settings-fields > *,
html[data-dialog-hosted] .form-field
{
	min-width: 0;
}

html[data-dialog-hosted] .admin-setting-row
{
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

html[data-dialog-hosted] .admin-setting-row__meta
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
}

html[data-dialog-hosted] .admin-setting-row__meta .form-note
{
	flex-basis: 100%;
}

html[data-dialog-hosted] .admin-setting-row__label,
html[data-dialog-hosted] .form-choice > legend,
html[data-dialog-hosted] .form-label
{
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	color: var(--text-strong);
}

html[data-dialog-hosted] .form-field
{
	gap: 5px;
}

html[data-dialog-hosted] .popup-page :is(input:not([type]), input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="search"], input[type="number"], select, textarea)
{
	min-height: var(--dialog-control-size);
	max-width: 100%;
	font: inherit;
	font-size: var(--dialog-control-font);
	line-height: 1.4;
	padding: 5px 8px;
	border-radius: 4px;
	box-shadow: none;
}

html[data-dialog-hosted] .popup-page select
{
	padding-inline-end: 28px;
}

html[data-dialog-hosted="private_frames"] .private-input-form input[data-private-input]
{
	min-height: var(--private-compose-size);
	border-radius: 3px;
	font-size: 16px;
}

html[data-dialog-hosted] .popup-page textarea
{
	resize: vertical;
}

html[data-dialog-hosted] :is(.form-grid, .settings-fields) input:is([maxlength="4"], [maxlength="5"], [maxlength="10"])
{
	width: 12ch;
}

html[data-dialog-hosted] .form-checkbox
{
	min-height: var(--dialog-control-size);
	gap: 8px;
	font-size: 0.875rem;
	font-weight: 400;
}

html[data-dialog-hosted] .form-note,
html[data-dialog-hosted] .form-card__intro
{
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
}

html[data-dialog-hosted] .settings-intro
{
	margin: 0;
	color: var(--text-muted);
}

html[data-dialog-hosted] .avatar-editor
{
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 12px;
	margin-bottom: 16px;
	padding: 0;
	border: 0;
	background: transparent;
}

html[data-dialog-hosted] .avatar-editor__preview
{
	width: 64px;
	height: 64px;
	border-radius: 6px;
}

html[data-dialog-hosted] :is(.avatar-editor__body, .avatar-editor__picker)
{
	gap: 6px;
}

html[data-dialog-hosted] .avatar-editor__file-button
{
	min-height: var(--dialog-control-size);
	padding: 5px 10px;
	font-size: 0.8125rem;
}

html[data-dialog-hosted] .field-status:empty
{
	display: none;
}

.date-field
{
	margin: 0;
	padding: 0;
	border: 0;
	min-inline-size: 0;
}

.date-parts
{
	display: grid;
	grid-template-columns: 3rem minmax(0, 8.5rem) 4.25rem;
	gap: 6px;
	max-width: 100%;
	margin-block-start: 8px;
}

html[data-dialog-hosted] .date-parts :is(input, select)
{
	width: 100%;
	min-width: 0;
}

html[data-dialog-hosted] .mail-settings-transport
{
	padding: 8px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	gap: 8px;
	min-height: var(--dialog-control-size);
}

html[data-dialog-hosted] .admin-settings-alert
{
	padding: 10px 12px;
	gap: 10px;
	border-radius: 4px;
}

.permission-filter
{
	position: sticky;
	top: 0;
	z-index: 2;
	padding-block: 0 12px;
	background: var(--surface-strong);
}

.permission-filter label
{
	display: block;
	margin-bottom: 5px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text-strong);
}

.permission-filter__controls
{
	display: flex;
	align-items: center;
	gap: 12px;
}

.permission-filter__controls input
{
	flex: 1 1 auto;
	min-width: 0;
}

.permission-filter__count
{
	white-space: nowrap;
	font-size: 0.8125rem;
	color: var(--text-muted);
	font-variant-numeric: tabular-nums;
}

.permission-groups
{
	display: grid;
	gap: 24px;
}

.permission-group > legend
{
	margin-bottom: 8px;
}

html[data-dialog-hosted] .permission-row
{
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 6px 16px;
	align-items: center;
	padding: 7px 0;
	border: 0;
	border-bottom: 1px solid var(--chat-panel-border);
	border-radius: 0;
	background: transparent;
}

html[data-dialog-hosted] .permission-row__label
{
	font-weight: 400;
	line-height: 1.4;
}

html[data-dialog-hosted] .permission-row__value
{
	text-align: start;
}

html[data-dialog-hosted] .permission-row__value select
{
	width: 100%;
}

.permission-group[hidden],
.permission-row[hidden]
{
	display: none !important;
}

html[data-dialog-hosted] .detail-grid
{
	margin: 0;
	gap: 14px 24px;
}

html[data-dialog-hosted] .detail-item
{
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

html[data-dialog-hosted] .detail-label
{
	margin: 0 0 4px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
}

html[data-dialog-hosted] .detail-value
{
	margin: 0;
}

html[data-dialog-hosted] .detail-card__title
{
	font-size: 1.125rem;
}

@container settings (min-width: 32rem)
{
	.settings-fields:not(.settings-fields--preferences),
	html[data-dialog-hosted] .form-grid
	{
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	html[data-dialog-hosted] .permission-row
	{
		grid-template-columns: minmax(0, 1fr) 15rem;
	}
}

@media (pointer: coarse)
{
	html[data-dialog-hosted]
	{
		--dialog-control-size: 3rem;
		--dialog-control-font: 1rem;
	}

	html[data-dialog-hosted] .popup-page :is(input[type="submit"], input[type="button"], button, .detail-link)
	{
		min-height: var(--dialog-control-size);
	}
}

html[data-dialog-hosted] .avatar-editor__file-name
{
	min-height: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 0.8125rem;
	color: var(--text-muted);
}

html[data-dialog-hosted] .detail-shell
{
	container: profile / inline-size;
	gap: 16px;
	min-height: 0;
}

html[data-dialog-hosted] .detail-card
{
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

html[data-dialog-hosted] .detail-grid
{
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-dialog-hosted] .profile-avatar
{
	width: 52px;
	height: 52px;
	border-radius: 6px;
}

html[data-dialog-hosted] .admin-section-navigation__controls :is(select, button)
{
	min-height: var(--dialog-control-size);
	font-size: var(--dialog-control-font);
}

@media (max-height: 240px)
{
	html[data-dialog-hosted="admin.menu"] .admin-overlay-header
	{
		padding-block: 6px;
	}
}

@media (max-width: 600px) and (max-height: 240px)
{
	html[data-dialog-hosted="admin.menu"] .admin-overlay-sidebar
	{
		padding: 0 8px;
	}

	/* The selected section is already shown in the picker at this size. */
	html[data-dialog-hosted="admin.menu"] :is(
		.admin-section-navigation label,
		.admin-overlay-main:has(.admin-overlay-frame) .admin-overlay-header
	)
	{
		position: absolute;
		inline-size: 1px;
		block-size: 1px;
		padding: 0;
		margin: 0;
		border: 0;
		clip-path: inset(50%);
		overflow: hidden;
	}

	html[data-dialog-hosted="admin.menu"] .admin-section-navigation__controls :is(select, button)
	{
		min-block-size: 44px;
	}
}

@container profile (max-width: 31.99rem)
{
	html[data-dialog-hosted] .detail-grid
	{
		grid-template-columns: minmax(0, 1fr);
	}
}

html[data-dialog-hosted] .search-shell,
html[data-dialog-hosted] .search-shell__body
{
	min-height: 0;
	overflow: visible;
	padding: 0;
}

html[data-dialog-hosted] .search-shell__body
{
	gap: 16px;
}

html[data-dialog-hosted] .search-results-section
{
	margin: 0;
	padding: 0;
}

html[data-dialog-hosted] .search-layout
{
	display: grid;
}

html[data-dialog-hosted] .search-input-line
{
	display: flex;
	align-items: center;
	gap: 10px;
}

html[data-dialog-hosted] .search-input-line input
{
	flex: 1 1 auto;
	min-width: 0;
}

html[data-dialog-hosted] .search-input-line img
{
	width: 20px;
	height: 20px;
	object-fit: contain;
}

html[data-dialog-hosted] .admin-setting-row
{
	align-items: stretch;
}

.settings-field--wide
{
	grid-column: 1 / -1;
}

html[data-dialog-hosted] .admin-setting-row__help
{
	min-width: 24px;
	min-height: 24px;
	padding: 0;
}

@media (pointer: coarse)
{
	html[data-dialog-hosted] .admin-setting-row
	{
		gap: 10px;
	}

	html[data-dialog-hosted] .admin-setting-row__help
	{
		position: relative;
	}

	html[data-dialog-hosted] .admin-setting-row__help::after
	{
		content: "";
		position: absolute;
		width: 44px;
		height: 44px;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
	}
}

html[data-dialog-hosted]
{
	scroll-padding-block: 1rem 5rem;
}

html[data-dialog-hosted] .admin-content-root
{
	scroll-padding-block: 1rem 5rem;
}

html[data-dialog-hosted] .overlay-footer :is(.form-actions, .detail-actions) > *
{
	flex: 0 1 auto;
	width: auto;
}

@media (pointer: coarse)
{
	html[data-dialog-hosted] .popup-page .auth-button
	{
		min-height: var(--dialog-control-size);
	}
}

html[data-dialog-hosted] .detail-tabs
{
	justify-content: flex-start;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

html[data-dialog-hosted] .detail-tab
{
	min-height: 32px;
	padding: 6px 10px;
	font-size: 0.8125rem;
}

html[data-dialog-hosted] .overlay-footer :is(.form-actions, .detail-actions)
{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

@media (pointer: coarse)
{
	html[data-dialog-hosted] .detail-tab
	{
		min-height: 44px;
	}
}

.user-presence
{
	margin-inline-start: 8px;
	font-weight: 400;
	font-size: 0.8125rem;
	color: var(--text-muted);
}

html[data-dialog-hosted] :is(.admin-page-intro, .admin-page-toolbar, .admin-table-shell, .admin-check-grid)
{
	padding-inline: 20px;
}

html[data-dialog-hosted] .admin-table-shell
{
	padding-block: 16px 20px;
}

html[data-dialog-hosted] .admin-table-scroll
{
	max-width: 100%;
	overscroll-behavior: contain;
}

html[data-dialog-hosted] .admin-data-table
{
	border-collapse: separate;
	border-spacing: 0;
	font: inherit;
}

html[data-dialog-hosted] .admin-data-table thead
{
	position: sticky;
	inset-block-start: 0;
	z-index: 1;
}

html[data-dialog-hosted] .admin-data-table :is(th, td)
{
	padding: 8px 10px;
	border: 0;
	border-bottom: 1px solid var(--chat-panel-border);
}

html[data-dialog-hosted] .admin-data-table th
{
	font-size: 0.8125rem;
	letter-spacing: normal;
	text-transform: none;
	color: var(--text-strong);
}

html[data-dialog-hosted] .popup-page button.admin-setting-row__help
{
	min-height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}

.profile-color-chip::before
{
	background: var(--profile-color, currentColor);
}

html[data-dialog-hosted]
{
	--page-link: var(--auth-link);
	--page-link-hover: var(--auth-link-hover);
}

label.admin-data-table__toggle
{
	min-width: 24px;
	min-height: 32px;
	cursor: pointer;
}

@media (pointer: coarse)
{
	label.admin-data-table__toggle
	{
		min-width: 44px;
		min-height: 44px;
	}
}

/* Administration has one vertical content scroller per section. Tables only
   introduce horizontal overflow; wheel gestures can reach the content scroller. */
.admin-overlay-frame
{
	display: block;
	border: 0;
	min-height: 0;
}

html[data-dialog-hosted="admin.section"]
{
	height: 100%;
	overflow: hidden;
	--admin-gutter: 20px;
}

html[data-dialog-hosted="admin.section"] .admin-section-page
{
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	box-sizing: border-box;
	padding: 0;
	overflow: hidden;
}

html[data-dialog-hosted="admin.section"] .admin-section-page > :is(form, .admin-table-page)
{
	flex: 1 1 0;
	min-height: 0;
}

.admin-section-content
{
	flex: 1 1 0;
	min-height: 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: var(--admin-gutter);
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
	scroll-padding-block: 16px;
}

html[data-dialog-hosted="admin.section"] .admin-section-content > *
{
	flex-shrink: 0;
}

html[data-dialog-hosted="admin.section"] :is(.admin-page-intro, .admin-page-toolbar, .admin-table-shell, .admin-inline-section, .admin-settings-body, .admin-settings-group, .admin-check-grid, .admin-log-stream)
{
	padding: 0;
}

html[data-dialog-hosted="admin.section"] :is(.admin-table-shell, .admin-table-scroll)
{
	display: block;
	flex: none;
}

html[data-dialog-hosted="admin.section"] .admin-table-scroll
{
	overflow: auto;
	overscroll-behavior: auto;
}

html[data-dialog-hosted="admin.section"] .admin-inline-copy
{
	padding: 0;
}

html[data-dialog-hosted="admin.section"] .admin-page-toolbar
{
	justify-content: flex-start;
	gap: 12px;
}

html[data-dialog-hosted="admin.section"] .admin-data-table
{
	min-inline-size: 34rem;
}

html[data-dialog-hosted="admin.section"] .admin-data-table :is(th, td)
{
	text-align: start;
	vertical-align: middle;
}

html[data-dialog-hosted="admin.section"] .admin-data-table th
{
	background: var(--surface-muted);
	white-space: nowrap;
}

html[data-dialog-hosted="admin.section"] .admin-data-table__empty
{
	padding-block: 24px;
	font-style: normal;
	color: var(--text-muted);
}

html[data-dialog-hosted="admin.section"] :is(.admin-row-actions, .admin-data-table__actions)
{
	flex-wrap: nowrap;
}

html[data-dialog-hosted="admin.section"] .overlay-footer
{
	position: static;
	flex: 0 0 auto;
	margin: 0;
	padding: 12px var(--admin-gutter);
}

html[data-dialog-hosted="admin.section"] .overlay-footer .form-actions > *
{
	min-height: 36px;
}

@media (max-height: 180px)
{
	/* A fixed footer can leave no space for the form when the keyboard opens. */
	html[data-dialog-hosted="admin.section"] .admin-section-page
	{
		overflow-y: auto;
	}

	html[data-dialog-hosted="admin.section"] .admin-section-page > :is(form, .admin-table-page),
	html[data-dialog-hosted="admin.section"] .admin-section-content
	{
		flex: 0 0 auto;
	}

	html[data-dialog-hosted="admin.section"] .admin-section-content
	{
		overflow: visible;
	}
}

html[data-dialog-hosted="admin.section"] .admin-check-row
{
	padding: 10px 12px;
	border: 0;
	border-bottom: 1px solid var(--chat-panel-border);
}

html[data-dialog-hosted="admin.section"] .admin-toolbar-field
{
	align-items: end;
}

html[data-dialog-hosted="admin.section"] .admin-toolbar-field :is(input[type="text"], select)
{
	min-inline-size: min(12rem, 100%);
	max-inline-size: 100%;
}

[data-admin-section="cleanupmembers"] #cleanupmembers-limit
{
	inline-size: 10rem;
	max-inline-size: 100%;
}

[data-admin-section="cleanupmembers"] .admin-data-table td:nth-child(n+3)
{
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

[data-admin-section="news"] .admin-data-table :is(th, td):nth-child(3)
{
	inline-size: 60%;
}

@media (max-width: 600px)
{
	html[data-dialog-hosted="admin.section"]
	{
		--admin-gutter: 12px;
	}
}

@media (pointer: coarse)
{
	html[data-dialog-hosted="admin.section"] .overlay-footer .form-actions > *
	{
		min-height: 44px;
	}
}

html[data-dialog-hosted] .popup-page .form-shell
{
	min-height: 0;
}

html[data-dialog-hosted] .search-layout
{
	gap: 18px;
}

html[data-dialog-hosted] .search-layout .overlay-footer
{
	margin-top: 0;
}

html[data-dialog-hosted] .smiley-browser
{
	max-height: none;
	overflow: visible;
	padding: 0;
}

html[data-dialog-hosted] .smiley-browser__grid
{
	grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
}

html[data-dialog-hosted] .smiley-card
{
	grid-template-columns: 36px minmax(0, 1fr);
	gap: 8px;
	padding: 8px;
}

html[data-dialog-hosted] .smiley-card__preview
{
	width: 36px;
	height: 36px;
}

html[data-dialog-hosted] .smiley-card__image
{
	max-width: 32px;
	max-height: 32px;
	object-fit: contain;
}

@media (pointer: coarse)
{
	html[data-dialog-hosted] .smiley-card
	{
		grid-template-columns: 44px minmax(0, 1fr);
	}

	html[data-dialog-hosted] .smiley-card__preview
	{
		width: 44px;
		height: 44px;
	}

	html[data-dialog-hosted] .smiley-chip
	{
		min-width: 44px;
		min-height: 44px;
	}
}

html[data-dialog-hosted] .popup-page--session-log .form-section__title
{
	display: none;
}

html[data-dialog-hosted] .popup-page--session-log .form-section
{
	padding: 0;
}

html[data-dialog-hosted] .popup-page--session-log .overlay-log-content
{
	min-height: 0;
	flex: 0 0 auto;
}

html[data-dialog-hosted] .popup-page--session-log .overlay-footer
{
	margin-top: 16px;
}

.roomlist-row__title
{
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 12px;
}

.roomlist-row__edit
{
	font-size: 0.875rem;
	text-decoration: underline;
}

html[data-dialog-hosted] .roomlist-list
{
	border-radius: 3px;
	background: var(--surface-strong);
}

html[data-dialog-hosted] .roomlist-row__action
{
	border-radius: 3px;
}

html[data-dialog-hosted] .detail-inline-form
{
	display: flex;
	align-items: stretch;
	gap: 8px;
}

html[data-dialog-hosted] .detail-inline-form input[type="text"]
{
	flex: 1 1 0;
	min-width: 0;
	width: auto;
}

html[data-dialog-hosted] .detail-inline-form input[type="submit"]
{
	flex: 0 0 auto;
	align-self: stretch;
	min-height: var(--dialog-control-size);
	font-size: var(--dialog-control-font);
	padding-block: 0;
}

.admin-setting-help
{
	grid-column: 1 / -1;
	margin: 4px 0 0;
	padding: 8px 12px;
	border-inline-start: 2px solid var(--chat-panel-border);
	background: var(--surface-soft);
	color: var(--text-muted);
	font-weight: 400;
	white-space: pre-line;
	line-height: 1.5;
}

.chat-account-area
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 4px 8px;
	font-size: 0.8125rem;
}

.chat-account-label
{
	color: var(--text-muted);
}

.chat-account
{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-inline-size: 100%;
	overflow-wrap: anywhere;
}

.chat-account-avatar
{
	display: grid;
	place-items: center;
	flex: 0 0 24px;
	inline-size: 24px;
	block-size: 24px;
	border-radius: 2px;
	background: var(--surface-muted);
	color: var(--text-muted);
	overflow: clip;
}

.chat-account-avatar img:not(.chat-account-avatar__fallback)
{
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.chat-logout
{
	border: 0;
	border-inline-start: 1px solid var(--chat-panel-border);
	padding: 2px 0 2px 10px;
	background: transparent;
	color: var(--auth-link);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

@media (pointer: coarse)
{
	.chat-logout
	{
		min-block-size: 44px;
	}
}

html[data-dialog-hosted="admin.section"] .admin-data-table .admin-input-with-suffix
{
	min-inline-size: 17rem;
}

html[data-dialog-hosted="admin.section"] .admin-data-table .admin-input-with-suffix > input
{
	flex: 0 0 8rem;
	inline-size: 8rem;
}

html[data-dialog-hosted="admin.section"] .admin-data-table .admin-input-with-suffix > button
{
	white-space: nowrap;
}

html[data-dialog-hosted="admin.section"] .admin-toolbar-field
{
	display: grid;
	grid-template-columns: minmax(0, 16rem) auto;
	gap: 6px 10px;
	max-inline-size: 100%;
}

html[data-dialog-hosted="admin.section"] .admin-toolbar-field > label
{
	grid-column: 1 / -1;
}

html[data-dialog-hosted="admin.section"] .admin-toolbar-field > input[type="text"]
{
	inline-size: 100%;
	min-inline-size: 0;
}

.admin-alias-create:not([hidden])
{
	display: flex;
	align-items: end;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.admin-alias-create > div
{
	flex: 1 1 8rem;
	min-inline-size: 0;
}

.admin-alias-create > div:first-child
{
	flex-basis: min(100%, 14rem);
}

.admin-alias-create :is(input, select)
{
	inline-size: 100%;
	min-inline-size: 0;
}

form[data-alias-editor] [data-alias-label]
{
	overflow-wrap: anywhere;
}

form[data-alias-editor] .admin-input-with-suffix
{
	inline-size: 100%;
	flex-wrap: wrap;
}

form[data-alias-editor] :is(.admin-table-shell, button, p)[hidden]
{
	display: none;
}

@container (inline-size >= 44rem)
{
	form[data-alias-editor] .admin-data-table
	{
		table-layout: fixed;
	}

	form[data-alias-editor] .admin-data-table th:nth-child(1) {inline-size: 34%;}
	form[data-alias-editor] .admin-data-table th:nth-child(2) {inline-size: 20%;}
	form[data-alias-editor] .admin-data-table th:nth-child(4) {inline-size: 7rem;}
}

@media (pointer: coarse)
{
	form[data-alias-editor] :is(input:not([type="hidden"]), select, button)
	{
		min-block-size: 44px;
	}
}

@media (max-width: 600px)
{
	html[data-dialog-hosted="admin.section"] .admin-toolbar-field
	{
		inline-size: 100%;
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

/* Shared confirmation surface, including confirmations requested by tool frames. */
.gtchat-confirmation {
 width: min(28rem, calc(100vw - 2rem));
 max-height: calc(100dvh - 2rem);
 box-sizing: border-box;
 padding: 1.5rem;
 border: 1px solid var(--border-soft);
 border-radius: 10px;
 color: var(--text-strong);
 background: var(--surface-strong);
 box-shadow: 0 18px 60px #0005;
 overflow: auto;
 overscroll-behavior: contain;
}
.gtchat-confirmation::backdrop {
 background: #10182080;
 overflow: hidden;
 overscroll-behavior: contain;
}
.gtchat-confirmation h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.gtchat-confirmation p { margin: 0 0 1.5rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.gtchat-confirmation form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; margin: 0; padding: 0; }
.gtchat-confirmation button { min-height: 44px; padding: .65rem 1.1rem; border-radius: 5px; }
.gtchat-confirmation-accept { background: var(--text-strong); color: var(--surface-strong); }

.chat-compose-form { position: relative; }
.chat-send-error:not([hidden]) { position: absolute; bottom: calc(100% + .5rem); inset-inline: .5rem; margin: 0; padding: .75rem; border: 1px solid var(--border-soft); border-radius: 5px; background: var(--surface-strong); color: var(--text-strong); overflow-wrap: anywhere; }

.private-input-form .chat-send-error, .detail-inline-form .chat-send-error { position: static; grid-column: 1 / -1; flex-basis: 100%; }

/* Tables adapt to the space in their dialog or admin pane, independently of
   the outer window. Desktop tables retain their columns and native markup. */
.responsive-table-region
{
	container-type: inline-size;
	min-inline-size: 0;
	max-inline-size: 100%;
}

@container (inline-size < 44rem)
{
	html .responsive-table-region .responsive-data-table
	{
		display: block;
		inline-size: 100%;
		min-inline-size: 0;
		background: transparent;
	}

	.responsive-table-region .responsive-data-table > thead
	{
		display: none;
	}

	/* Reset desktop percentage widths, including the wide news text column. */
	html .responsive-table-region .responsive-data-table :is(th, td):nth-child(n)
	{
		inline-size: 100%;
		white-space: normal;
	}

	.responsive-table-region .responsive-data-table > tbody
	{
		display: grid;
		gap: 12px;
	}

	.responsive-table-region .responsive-data-table > tbody > tr
	{
		display: block;
		min-inline-size: 0;
		border: 1px solid var(--border-soft);
		border-radius: 6px;
		background: var(--surface-strong);
	}

	.responsive-table-region .responsive-data-table > tbody > tr > td
	{
		display: grid;
		gap: 4px;
		box-sizing: border-box;
		inline-size: 100%;
		min-inline-size: 0;
		padding: 10px 12px;
		border: 0;
		border-block-end: 1px solid var(--border-soft);
		background: transparent;
		text-align: start;
		white-space: normal;
		overflow-wrap: anywhere;
	}

	.responsive-table-region .responsive-data-table > tbody > tr > td:last-child
	{
		border-block-end: 0;
	}

	.responsive-table-region .responsive-data-table > tbody > tr > td[data-column-empty]
	{
		display: none;
	}

	.responsive-data-table td[data-column-label]:not([data-column-label=""])::before
	{
		content: attr(data-column-label);
		color: var(--text-soft);
		font-size: .8125rem;
		font-weight: 600;
		line-height: 1.4;
		letter-spacing: normal;
		text-transform: none;
	}

	.responsive-table-region .responsive-data-table td:has(.admin-data-table__toggle)
	{
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}

	.responsive-data-table td > *,
	.responsive-data-table :is(input, textarea, select)
	{
		min-inline-size: 0;
		max-inline-size: 100%;
		box-sizing: border-box;
	}

	html .responsive-table-region .responsive-data-table .admin-input-with-suffix
	{
		min-inline-size: 0;
		flex-wrap: wrap;
	}

	.responsive-table-region .responsive-data-table :is(.admin-row-actions, .admin-data-table__actions)
	{
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.responsive-data-table :is(.admin-row-actions, .admin-data-table__actions) > button
	{
		flex: 1 1 auto;
	}

	.responsive-table-region .admin-data-table--selection > tbody > tr
	{
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
	}

	.responsive-table-region .admin-data-table--selection > tbody > tr > td
	{
		grid-column: 1 / -1;
	}

	.responsive-table-region .admin-data-table--selection > tbody > tr > td:first-child
	{
		grid-column: 1;
		grid-template-columns: auto;
		align-content: center;
		padding-inline-end: 0;
	}

	.responsive-table-region .admin-data-table--selection > tbody > tr > td:nth-child(2)
	{
		grid-column: 2;
		align-content: center;
	}
}

@media (max-width: 44rem)
{
	.moderated-entry
	{
		grid-template-columns: auto auto minmax(0, 1fr);
		padding-block-end: 12px;
		border-block-end: 1px solid var(--border-soft);
	}

	.moderated-entry__content
	{
		grid-column: 1 / -1;
		grid-row: 1;
	}
}

@media (max-width: 600px)
{
	body.auth-page .auth-public-header .auth-shell-header {padding: 8px 10px;}
	.auth-shell-brand__name {font-size: clamp(1rem, 4vw, 1.25rem); line-height: 1.25;}
	.auth-shell-mark {inline-size: 24px; block-size: 22px;}
	.auth-language-current {gap: 4px; font-size: .75rem;}
	.auth-shell-header :is(.auth-language-link, .auth-language-current) img {inline-size: 16px; block-size: auto;}
	.auth-shell-header .auth-language-link {padding-inline: 4px; gap: 3px;}

	.auth-public-nav
	{
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
	}
	body.auth-page .auth-public-nav a
	{
		justify-content: center;
		padding-inline: 4px;
		font-size: .75rem;
		text-align: center;
	}

	.auth-page--login .auth-welcome__caption
	{
		position: absolute;
		inset: auto 0 0;
		padding: 14px 16px;
		border: 0;
		background: linear-gradient(transparent, rgb(10 19 31 / .95));
	}

	.auth-welcome__caption h2, .auth-welcome__caption p {color: #fff;}
	.auth-welcome__caption h2 {font-size: clamp(1.2rem, 5vw, 1.5rem); line-height: 1.15;}
	.auth-welcome__caption p {margin-block-start: 5px; font-size: .8125rem; line-height: 1.3;}
	.auth-login-card .auth-card__title {font-size: 1.25rem;}
}

@media (max-width: 360px)
{
	.auth-login-rail {display: contents;}
	.auth-login-layout > .auth-welcome {order: 1;}
	.auth-login-news {order: 2;}
	.auth-login-layout > .auth-community {order: 3;}

	.auth-page--login .auth-welcome__caption
	{
		position: static;
		padding: 12px 14px;
		border-block-start: 1px solid var(--auth-border);
		background: var(--surface-card-alt);
	}

	.auth-welcome__caption h2 {color: var(--auth-text);}
	.auth-welcome__caption p {color: var(--auth-text-muted);}
}

.registration-radio-list
{
	display: grid;
	gap: .25rem;
	margin-block: .375rem;
}

.registration-radio-list .form-checkbox
{
	min-block-size: 2rem;
}

.admin-entry-list
{
	list-style: none;
	margin: 0;
	padding: .25rem;
	border: 1px solid var(--auth-input-border);
	border-radius: 4px;
	background: var(--auth-input-bg);
}

.admin-entry-list li,
.admin-entry-controls
{
	display: flex;
	align-items: center;
	gap: .375rem;
}

.admin-entry-list li > span
{
	min-inline-size: 0;
	overflow-wrap: anywhere;
}

.admin-entry-controls input
{
	flex: 1;
	min-inline-size: 0;
}

.admin-entry-list button,
.admin-entry-controls button
{
	flex: none;
	min-inline-size: 2rem;
	min-block-size: 2rem;
	border: 1px solid var(--auth-input-border);
	border-radius: 4px;
	background: var(--surface-strong);
	color: var(--text-strong);
	font-size: 1.25em;
	line-height: 1;
	cursor: pointer;
}

.admin-entry-list button:hover,
.admin-entry-controls button:hover
{
	background: var(--surface-card-alt);
}

.admin-entry-controls button
{
	align-self: stretch;
	min-inline-size: 2.75rem;
}

@media (pointer: coarse)
{
	.registration-radio-list .form-checkbox
	{
		min-block-size: 3rem;
	}

	.admin-entry-list button,
	.admin-entry-controls button
	{
		min-inline-size: 3rem;
		min-block-size: 3rem;
	}
}
