:root {
    --bg: #f6efe7;
    --ink: #2d211c;
    --text: var(--ink);
    --muted: #6d5a52;
    --text-muted: var(--muted);
    --line: rgba(45, 33, 28, 0.12);
    --border: var(--line);
    --panel: rgba(255, 252, 249, 0.92);
    --panel-strong: #fffaf5;
    --accent: #cd5c3f;
    --accent-deep: #8e3827;
    --accent-soft: rgba(205, 92, 63, 0.12);
    --success-bg: rgba(232, 247, 236, 0.94);
    --success-line: rgba(62, 126, 82, 0.2);
    --error-bg: rgba(255, 236, 232, 0.95);
    --error-line: rgba(142, 56, 39, 0.2);
    --shadow: 0 1.6rem 4rem rgba(77, 50, 39, 0.12);
    --bg-accent-1: rgba(205, 92, 63, 0.16);
    --bg-accent-2: rgba(218, 170, 98, 0.18);
    --bg-base-top: #fbf7f3;
    --bg-base-bottom: #f6efe7;
    --panel-border-width: 1px;
    --panel-radius: 1.35rem;
    --panel-shadow: var(--shadow);
    --panel-blur: 14px;
    --panel-accent-overlay: linear-gradient(135deg, rgba(205, 92, 63, 0.08), rgba(218, 170, 98, 0.08));
    --button-radius: 999px;
    --button-border-width: 1px;
    --button-font-weight: 700;
    --button-letter-spacing: 0;
    --button-text-transform: none;
    --button-shadow: 0 0.9rem 1.8rem rgba(77, 50, 39, 0.12);
    --button-hover-translate-y: -1px;
    --button-hover-scale: 1;
    --button-primary-shadow: 0 1rem 2rem rgba(142, 56, 39, 0.18);
    --button-primary-text: #fff;
    --button-primary-border-color: transparent;
    --input-radius: 1rem;
    --input-border-width: 1px;
    --input-background: rgba(255, 255, 255, 0.92);
    --input-shadow: none;
    --ui-font-family: "DM Sans";
    --ui-font-scale: 1;
    --ui-button-font-scale: 1;
    --ui-site-scale: 0.67;
    --ui-box-scale: 1;
    --ui-panel-radius-scale: clamp(0.88, var(--ui-box-scale), 1.22);
    --ui-panel-radius: calc(var(--panel-radius) * var(--ui-panel-radius-scale));
    --ui-panel-padding: clamp(1.2rem, calc(2rem * var(--ui-box-scale)), 2.8rem);
    --ui-modal-padding: clamp(1.1rem, calc(1.75rem * var(--ui-box-scale)), 2.5rem);
    --ui-layout-gap: clamp(1rem, calc(1.5rem * var(--ui-box-scale)), 2rem);
    --ui-grid-gap: clamp(0.7rem, calc(0.9rem * var(--ui-box-scale)), 1.35rem);
    --ui-card-padding: clamp(0.78rem, calc(0.95rem * var(--ui-box-scale)), 1.35rem);
    --ui-card-gap: clamp(0.55rem, calc(0.7rem * var(--ui-box-scale)), 1.05rem);
    --ui-card-radius: calc(0.85rem * clamp(0.88, var(--ui-box-scale), 1.24));
    --ui-card-heading-size: clamp(0.92rem, calc(1.05rem * var(--ui-box-scale)), 1.28rem);
    --ui-card-meta-size: clamp(0.78rem, calc(0.95rem * var(--ui-box-scale)), 1.05rem);
    --ui-card-action-font-size: clamp(0.68rem, calc(0.78rem * var(--ui-box-scale)), 0.92rem);
    --ui-control-pad-y: clamp(0.58rem, calc(0.78rem * var(--ui-box-scale)), 0.98rem);
    --ui-control-pad-x: clamp(0.8rem, calc(1rem * var(--ui-box-scale)), 1.25rem);
    --ui-member-card-min: clamp(11rem, calc(14rem * var(--ui-box-scale)), 17rem);
    --ui-friend-photo-size: clamp(3rem, calc(4.5rem * var(--ui-box-scale)), 5.5rem);
    --ui-modal-close-size: clamp(2.2rem, calc(2.5rem * var(--ui-box-scale)), 3rem);
    --chat-friend-sidebar-width: 22rem;
    --live-chat-dock-splitter-width: 1rem;
    --chat-friend-splitter-width: 0.85rem;
    --live-chat-dock-width: min(40vw, 100vw);
    --conference-dock-width: clamp(24rem, 46vw, 56rem);
    --conference-dock-splitter-width: 1rem;
    --button-primary-filter: saturate(1) brightness(1);
}

html {
    font-size: calc(16px * var(--ui-site-scale));
    scroll-behavior: smooth;
    transition: font-size 140ms ease;
}

body {
    background:
        radial-gradient(circle at top left, var(--bg-accent-1), transparent 22rem),
        radial-gradient(circle at right 18%, var(--bg-accent-2), transparent 18rem),
        linear-gradient(180deg, var(--bg-base-top) 0%, var(--bg-base-bottom) 100%);
    color: var(--ink);
    font-family: var(--ui-font-family), sans-serif;
    font-size: calc(1rem * var(--ui-font-scale));
    transition: font-size 140ms ease, background 180ms ease, color 180ms ease;
}

body[data-theme-style="sunrise"] {
    --bg: #f6efe7;
    --ink: #2d211c;
    --muted: #6d5a52;
    --line: rgba(45, 33, 28, 0.12);
    --panel: rgba(255, 252, 249, 0.92);
    --panel-strong: #fffaf5;
    --shadow: 0 1.6rem 4rem rgba(77, 50, 39, 0.12);
    --bg-accent-1: rgba(205, 92, 63, 0.16);
    --bg-accent-2: rgba(218, 170, 98, 0.18);
    --bg-base-top: #fbf7f3;
    --bg-base-bottom: #f6efe7;
}

body[data-theme-style="coastal"] {
    --bg: #edf6f6;
    --ink: #17343b;
    --muted: #547078;
    --line: rgba(23, 52, 59, 0.12);
    --panel: rgba(248, 254, 255, 0.9);
    --panel-strong: #f8feff;
    --shadow: 0 1.6rem 4rem rgba(41, 95, 103, 0.14);
    --bg-accent-1: rgba(77, 165, 191, 0.16);
    --bg-accent-2: rgba(162, 217, 208, 0.22);
    --bg-base-top: #f9ffff;
    --bg-base-bottom: #edf6f6;
}

body[data-theme-style="midnight"] {
    --bg: #1a1f2a;
    --ink: #eef3ff;
    --muted: #b7c0d9;
    --line: rgba(255, 255, 255, 0.12);
    --panel: rgba(26, 33, 45, 0.9);
    --panel-strong: #21293a;
    --shadow: 0 1.6rem 4rem rgba(7, 10, 17, 0.38);
    --success-bg: rgba(24, 68, 43, 0.82);
    --success-line: rgba(126, 214, 160, 0.18);
    --error-bg: rgba(93, 33, 39, 0.82);
    --error-line: rgba(235, 145, 157, 0.18);
    --bg-accent-1: rgba(87, 116, 199, 0.26);
    --bg-accent-2: rgba(13, 185, 177, 0.14);
    --bg-base-top: #232b3d;
    --bg-base-bottom: #161c29;
}

body[data-theme-style="meadow"] {
    --bg: #eef6ea;
    --ink: #23311f;
    --muted: #5d7054;
    --line: rgba(35, 49, 31, 0.12);
    --panel: rgba(251, 255, 248, 0.92);
    --panel-strong: #fbfff8;
    --shadow: 0 1.6rem 4rem rgba(62, 92, 43, 0.12);
    --bg-accent-1: rgba(127, 184, 84, 0.16);
    --bg-accent-2: rgba(219, 239, 161, 0.18);
    --bg-base-top: #f9fff4;
    --bg-base-bottom: #eef6ea;
}

body[data-theme-style="rosewater"] {
    --bg: #fbf0f2;
    --ink: #3a252b;
    --muted: #7f6167;
    --line: rgba(58, 37, 43, 0.12);
    --panel: rgba(255, 251, 252, 0.92);
    --panel-strong: #fffafc;
    --shadow: 0 1.6rem 4rem rgba(115, 71, 83, 0.12);
    --bg-accent-1: rgba(224, 148, 171, 0.18);
    --bg-accent-2: rgba(255, 217, 224, 0.22);
    --bg-base-top: #fff9fb;
    --bg-base-bottom: #fbf0f2;
}

body[data-theme-style="graphite"] {
    --bg: #eceff2;
    --ink: #20262d;
    --muted: #5c6874;
    --line: rgba(32, 38, 45, 0.12);
    --panel: rgba(250, 252, 255, 0.9);
    --panel-strong: #fcfdff;
    --shadow: 0 1.6rem 4rem rgba(55, 66, 79, 0.12);
    --bg-accent-1: rgba(84, 101, 122, 0.14);
    --bg-accent-2: rgba(191, 202, 214, 0.2);
    --bg-base-top: #fafcff;
    --bg-base-bottom: #eceff2;
}

body[data-theme-style="ember"] {
    --bg: #f8efe8;
    --ink: #35231b;
    --muted: #73584c;
    --line: rgba(53, 35, 27, 0.12);
    --panel: rgba(255, 250, 246, 0.92);
    --panel-strong: #fffaf6;
    --shadow: 0 1.6rem 4rem rgba(111, 64, 44, 0.14);
    --bg-accent-1: rgba(191, 107, 63, 0.2);
    --bg-accent-2: rgba(238, 192, 109, 0.18);
    --bg-base-top: #fff8f2;
    --bg-base-bottom: #f8efe8;
}

body[data-theme-style="glacier"] {
    --bg: #edf4fa;
    --ink: #1d2d3f;
    --muted: #5b7087;
    --line: rgba(29, 45, 63, 0.12);
    --panel: rgba(249, 252, 255, 0.92);
    --panel-strong: #fbfdff;
    --shadow: 0 1.6rem 4rem rgba(56, 93, 131, 0.12);
    --bg-accent-1: rgba(125, 169, 217, 0.18);
    --bg-accent-2: rgba(201, 228, 248, 0.24);
    --bg-base-top: #fbfeff;
    --bg-base-bottom: #edf4fa;
}

body[data-theme-style="parchment"] {
    --bg: #f5f0e3;
    --ink: #382c20;
    --muted: #736350;
    --line: rgba(56, 44, 32, 0.12);
    --panel: rgba(255, 251, 242, 0.92);
    --panel-strong: #fffbf2;
    --shadow: 0 1.6rem 4rem rgba(94, 74, 52, 0.12);
    --bg-accent-1: rgba(192, 154, 98, 0.18);
    --bg-accent-2: rgba(233, 214, 166, 0.22);
    --bg-base-top: #fffdf6;
    --bg-base-bottom: #f5f0e3;
}

body[data-theme-style="forest"] {
    --bg: #e8f0eb;
    --ink: #203229;
    --muted: #5b6f63;
    --line: rgba(32, 50, 41, 0.12);
    --panel: rgba(248, 253, 249, 0.9);
    --panel-strong: #fbfffc;
    --shadow: 0 1.6rem 4rem rgba(43, 81, 59, 0.14);
    --bg-accent-1: rgba(53, 125, 87, 0.18);
    --bg-accent-2: rgba(179, 215, 193, 0.2);
    --bg-base-top: #f8fdf9;
    --bg-base-bottom: #e8f0eb;
}

body[data-theme-style="coastal"],
body[data-theme-style="glacier"] {
    --panel-blur: 18px;
    --button-radius: 1.1rem;
    --input-radius: 1rem;
}

body[data-theme-style="midnight"],
body[data-theme-style="graphite"] {
    --button-radius: 0.95rem;
    --button-letter-spacing: 0.02em;
    --input-background: rgba(255, 255, 255, 0.04);
    --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme-style="parchment"] {
    --button-radius: 0.8rem;
    --button-letter-spacing: 0.03em;
    --button-text-transform: uppercase;
    --panel-accent-overlay: linear-gradient(135deg, rgba(192, 154, 98, 0.08), rgba(233, 214, 166, 0.08));
}

body[data-theme-style="rosewater"] {
    --button-radius: 1.4rem;
    --input-radius: 1.25rem;
    --panel-shadow: 0 1.8rem 4rem rgba(148, 101, 112, 0.12);
}

body[data-theme-style="aurora"],
body[data-theme-style="lagoon"],
body[data-theme-style="arctic"] {
    --panel-blur: 18px;
    --button-radius: 1.1rem;
    --input-radius: 1rem;
}

body[data-theme-style="velvet"],
body[data-theme-style="storm"],
body[data-theme-style="cabernet"],
body[data-theme-style="obsidian"] {
    --button-radius: 1rem;
    --button-letter-spacing: 0.02em;
    --input-background: rgba(255, 255, 255, 0.05);
    --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme-style="blueprint"],
body[data-theme-style="harbor"] {
    --button-radius: 0.9rem;
    --button-letter-spacing: 0.03em;
}

body[data-theme-style="sandbar"],
body[data-theme-style="dune"],
body[data-theme-style="honeycomb"] {
    --button-radius: 0.82rem;
    --button-letter-spacing: 0.03em;
    --button-text-transform: uppercase;
    --panel-accent-overlay: linear-gradient(135deg, rgba(210, 170, 107, 0.08), rgba(246, 223, 176, 0.08));
}

body[data-theme-style="mulberry"],
body[data-theme-style="plum"],
body[data-theme-style="orchid"] {
    --button-radius: 1.35rem;
    --input-radius: 1.2rem;
}

body[data-theme-style="glass"] {
    --bg: #edf4fb;
    --ink: #183042;
    --muted: #5b7184;
    --line: rgba(255, 255, 255, 0.36);
    --panel: rgba(255, 255, 255, 0.3);
    --panel-strong: rgba(255, 255, 255, 0.42);
    --shadow: 0 2rem 4.8rem rgba(52, 92, 127, 0.2);
    --panel-border-width: 1px;
    --panel-radius: 1.6rem;
    --panel-shadow: 0 2rem 4.8rem rgba(52, 92, 127, 0.2);
    --panel-blur: 24px;
    --panel-accent-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
    --button-radius: 1.2rem;
    --button-shadow: 0 1.1rem 2.5rem rgba(80, 131, 173, 0.18);
    --button-primary-shadow: 0 1.2rem 2.8rem rgba(80, 131, 173, 0.24);
    --input-radius: 1.15rem;
    --input-background: rgba(255, 255, 255, 0.58);
    --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    --bg-accent-1: rgba(150, 199, 235, 0.34);
    --bg-accent-2: rgba(222, 240, 255, 0.42);
    --bg-base-top: #fafdff;
    --bg-base-bottom: #edf4fb;
}

body[data-theme-style="softui"] {
    --bg: #eef2f7;
    --ink: #223143;
    --muted: #617284;
    --line: rgba(255, 255, 255, 0.8);
    --panel: #eef2f7;
    --panel-strong: #f4f7fb;
    --panel-border-width: 1px;
    --panel-radius: 1.8rem;
    --panel-shadow: 1rem 1rem 2rem rgba(164, 180, 200, 0.28), -1rem -1rem 2rem rgba(255, 255, 255, 0.9);
    --panel-blur: 0px;
    --panel-accent-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(210, 220, 232, 0.3));
    --button-radius: 1.4rem;
    --button-shadow: 0.65rem 0.65rem 1.3rem rgba(164, 180, 200, 0.24), -0.65rem -0.65rem 1.3rem rgba(255, 255, 255, 0.82);
    --button-primary-shadow: 0.8rem 0.8rem 1.5rem rgba(164, 180, 200, 0.28), -0.5rem -0.5rem 1rem rgba(255, 255, 255, 0.72);
    --button-hover-translate-y: 0px;
    --button-hover-scale: 1.01;
    --input-radius: 1.2rem;
    --input-background: #eef2f7;
    --input-shadow: inset 0.45rem 0.45rem 0.9rem rgba(177, 190, 208, 0.22), inset -0.45rem -0.45rem 0.9rem rgba(255, 255, 255, 0.85);
    --bg-accent-1: rgba(177, 190, 208, 0.22);
    --bg-accent-2: rgba(255, 255, 255, 0.6);
    --bg-base-top: #f6f9fc;
    --bg-base-bottom: #eef2f7;
}

body[data-theme-style="clay"] {
    --bg: #fff0ec;
    --ink: #402926;
    --muted: #896764;
    --line: rgba(255, 255, 255, 0.7);
    --panel: #fff2ef;
    --panel-strong: #fff7f4;
    --panel-radius: 2rem;
    --panel-shadow: 0 1.7rem 3.4rem rgba(205, 150, 139, 0.28);
    --panel-accent-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 217, 207, 0.26));
    --button-radius: 1.45rem;
    --button-shadow: 0 1rem 2rem rgba(205, 150, 139, 0.28);
    --button-primary-shadow: 0 1.1rem 2.2rem rgba(205, 150, 139, 0.34);
    --input-radius: 1.35rem;
    --input-background: rgba(255, 255, 255, 0.75);
    --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    --bg-accent-1: rgba(255, 178, 161, 0.22);
    --bg-accent-2: rgba(255, 224, 211, 0.3);
    --bg-base-top: #fff9f6;
    --bg-base-bottom: #fff0ec;
}

body[data-theme-style="brutal"] {
    --bg: #f8f2da;
    --ink: #111111;
    --muted: #544a35;
    --line: rgba(17, 17, 17, 0.92);
    --panel: rgba(255, 248, 214, 0.96);
    --panel-strong: #fff8d6;
    --panel-border-width: 3px;
    --panel-radius: 0.2rem;
    --panel-shadow: 0.65rem 0.65rem 0 rgba(17, 17, 17, 0.82);
    --panel-blur: 0px;
    --panel-accent-overlay: linear-gradient(135deg, rgba(255, 230, 135, 0.22), rgba(255, 255, 255, 0));
    --button-radius: 0.12rem;
    --button-border-width: 3px;
    --button-font-weight: 800;
    --button-letter-spacing: 0.03em;
    --button-text-transform: uppercase;
    --button-shadow: 0.35rem 0.35rem 0 rgba(17, 17, 17, 0.82);
    --button-hover-translate-y: 2px;
    --button-hover-scale: 1;
    --button-primary-shadow: 0.45rem 0.45rem 0 rgba(17, 17, 17, 0.9);
    --button-primary-border-color: rgba(17, 17, 17, 0.9);
    --input-radius: 0.2rem;
    --input-border-width: 3px;
    --input-background: rgba(255, 255, 255, 0.95);
    --input-shadow: none;
    --bg-accent-1: rgba(255, 216, 87, 0.26);
    --bg-accent-2: rgba(255, 255, 255, 0.24);
    --bg-base-top: #fff9de;
    --bg-base-bottom: #f8f2da;
}

body[data-theme-style="editorial"] {
    --bg: #fbfaf7;
    --ink: #1f1f1f;
    --muted: #6b6b6b;
    --line: rgba(31, 31, 31, 0.1);
    --panel: rgba(255, 255, 255, 0.96);
    --panel-strong: #ffffff;
    --panel-border-width: 1px;
    --panel-radius: 0.35rem;
    --panel-shadow: 0 1rem 2.4rem rgba(31, 31, 31, 0.06);
    --panel-accent-overlay: linear-gradient(135deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0));
    --button-radius: 0.28rem;
    --button-font-weight: 700;
    --button-letter-spacing: 0.06em;
    --button-text-transform: uppercase;
    --button-shadow: none;
    --button-primary-shadow: 0 0.75rem 1.5rem rgba(31, 31, 31, 0.08);
    --button-hover-translate-y: -1px;
    --input-radius: 0.3rem;
    --input-background: rgba(255, 255, 255, 0.98);
    --input-shadow: none;
    --bg-accent-1: rgba(0, 0, 0, 0.035);
    --bg-accent-2: rgba(0, 0, 0, 0.015);
    --bg-base-top: #fffefb;
    --bg-base-bottom: #fbfaf7;
}

body[data-theme-style="retro"] {
    --bg: #e8ecff;
    --ink: #1f2457;
    --muted: #5f6799;
    --line: rgba(31, 36, 87, 0.55);
    --panel: #f4f6ff;
    --panel-strong: #fafbff;
    --panel-border-width: 2px;
    --panel-radius: 0.5rem;
    --panel-shadow: inset -2px -2px 0 rgba(255, 255, 255, 0.88), inset 2px 2px 0 rgba(123, 133, 191, 0.22), 0 1rem 2.2rem rgba(72, 87, 163, 0.14);
    --panel-accent-overlay: linear-gradient(135deg, rgba(176, 188, 255, 0.2), rgba(255, 255, 255, 0.16));
    --button-radius: 0.45rem;
    --button-border-width: 2px;
    --button-shadow: inset -2px -2px 0 rgba(255, 255, 255, 0.85), inset 2px 2px 0 rgba(111, 121, 184, 0.28);
    --button-primary-shadow: inset -2px -2px 0 rgba(255, 255, 255, 0.22), inset 2px 2px 0 rgba(27, 41, 112, 0.18), 0 0.8rem 1.6rem rgba(72, 87, 163, 0.16);
    --button-hover-scale: 1.01;
    --input-radius: 0.45rem;
    --input-border-width: 2px;
    --input-background: #fcfdff;
    --input-shadow: inset 2px 2px 0 rgba(182, 190, 235, 0.3);
    --bg-accent-1: rgba(157, 176, 255, 0.22);
    --bg-accent-2: rgba(227, 234, 255, 0.28);
    --bg-base-top: #f8faff;
    --bg-base-bottom: #e8ecff;
}

body[data-theme-style="neon"] {
    --bg: #131523;
    --ink: #f4f7ff;
    --muted: #a6afd7;
    --line: rgba(126, 190, 255, 0.22);
    --panel: rgba(18, 24, 41, 0.9);
    --panel-strong: rgba(23, 29, 52, 0.95);
    --panel-radius: 1.2rem;
    --panel-shadow: 0 0 0 1px rgba(126, 190, 255, 0.14), 0 1.6rem 3.6rem rgba(0, 0, 0, 0.42);
    --panel-blur: 18px;
    --panel-accent-overlay: linear-gradient(135deg, rgba(90, 190, 255, 0.08), rgba(196, 93, 255, 0.12));
    --button-radius: 999px;
    --button-letter-spacing: 0.04em;
    --button-shadow: 0 0 0 1px rgba(126, 190, 255, 0.16), 0 0.8rem 1.8rem rgba(29, 124, 255, 0.14);
    --button-primary-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 2rem rgba(29, 124, 255, 0.25);
    --input-radius: 1rem;
    --input-background: rgba(255, 255, 255, 0.04);
    --input-shadow: inset 0 0 0 1px rgba(126, 190, 255, 0.12);
    --bg-accent-1: rgba(0, 183, 255, 0.16);
    --bg-accent-2: rgba(208, 0, 255, 0.12);
    --bg-base-top: #191c2f;
    --bg-base-bottom: #111422;
}

body[data-theme-style="citrine"] {
    --bg: #fbf4d9;
    --ink: #3b2d11;
    --muted: #7b6a41;
    --line: rgba(59, 45, 17, 0.12);
    --panel: rgba(255, 252, 239, 0.94);
    --panel-strong: #fffdf4;
    --shadow: 0 1.6rem 4rem rgba(135, 105, 31, 0.14);
    --bg-accent-1: rgba(227, 181, 53, 0.2);
    --bg-accent-2: rgba(255, 221, 120, 0.24);
    --bg-base-top: #fffced;
    --bg-base-bottom: #fbf4d9;
}

body[data-theme-style="lagoon"] {
    --bg: #e6f5f3;
    --ink: #18373a;
    --muted: #55797b;
    --line: rgba(24, 55, 58, 0.12);
    --panel: rgba(246, 255, 254, 0.92);
    --panel-strong: #f8ffff;
    --shadow: 0 1.7rem 4rem rgba(35, 109, 113, 0.14);
    --bg-accent-1: rgba(39, 173, 165, 0.18);
    --bg-accent-2: rgba(102, 214, 198, 0.2);
    --bg-base-top: #f4fffe;
    --bg-base-bottom: #e6f5f3;
}

body[data-theme-style="velvet"] {
    --bg: #22162b;
    --ink: #f7efff;
    --muted: #c2b0d2;
    --line: rgba(255, 255, 255, 0.11);
    --panel: rgba(39, 26, 48, 0.9);
    --panel-strong: #30203b;
    --shadow: 0 1.8rem 4.2rem rgba(8, 5, 11, 0.4);
    --success-bg: rgba(25, 73, 48, 0.82);
    --success-line: rgba(119, 220, 162, 0.16);
    --error-bg: rgba(97, 30, 53, 0.84);
    --error-line: rgba(244, 146, 181, 0.16);
    --bg-accent-1: rgba(180, 96, 230, 0.24);
    --bg-accent-2: rgba(78, 161, 255, 0.12);
    --bg-base-top: #2a1c34;
    --bg-base-bottom: #1a111f;
}

body[data-theme-style="sandbar"] {
    --bg: #f6eddc;
    --ink: #3d2f22;
    --muted: #7b6a58;
    --line: rgba(61, 47, 34, 0.12);
    --panel: rgba(255, 251, 243, 0.93);
    --panel-strong: #fffdf7;
    --shadow: 0 1.6rem 3.8rem rgba(120, 96, 71, 0.13);
    --bg-accent-1: rgba(214, 177, 119, 0.18);
    --bg-accent-2: rgba(255, 215, 169, 0.2);
    --bg-base-top: #fffaf1;
    --bg-base-bottom: #f6eddc;
}

body[data-theme-style="aurora"] {
    --bg: #edf5fb;
    --ink: #1b2940;
    --muted: #5f7390;
    --line: rgba(27, 41, 64, 0.12);
    --panel: rgba(249, 253, 255, 0.9);
    --panel-strong: #fcfeff;
    --shadow: 0 1.6rem 4.2rem rgba(60, 96, 142, 0.13);
    --bg-accent-1: rgba(129, 183, 255, 0.2);
    --bg-accent-2: rgba(177, 152, 255, 0.18);
    --bg-base-top: #f7fbff;
    --bg-base-bottom: #edf5fb;
}

body[data-theme-style="blueprint"] {
    --bg: #dfeaf8;
    --ink: #17314f;
    --muted: #5a7595;
    --line: rgba(23, 49, 79, 0.14);
    --panel: rgba(246, 251, 255, 0.92);
    --panel-strong: #fbfdff;
    --shadow: 0 1.6rem 4rem rgba(44, 82, 128, 0.14);
    --bg-accent-1: rgba(57, 123, 214, 0.2);
    --bg-accent-2: rgba(145, 185, 255, 0.2);
    --bg-base-top: #f5faff;
    --bg-base-bottom: #dfeaf8;
}

body[data-theme-style="mulberry"] {
    --bg: #f6edf4;
    --ink: #3b2135;
    --muted: #7c5b74;
    --line: rgba(59, 33, 53, 0.12);
    --panel: rgba(255, 250, 254, 0.92);
    --panel-strong: #fffaff;
    --shadow: 0 1.6rem 4rem rgba(118, 77, 109, 0.13);
    --bg-accent-1: rgba(177, 96, 150, 0.2);
    --bg-accent-2: rgba(232, 168, 209, 0.18);
    --bg-base-top: #fff7fe;
    --bg-base-bottom: #f6edf4;
}

body[data-theme-style="ivy"] {
    --bg: #e9f0e7;
    --ink: #243226;
    --muted: #617064;
    --line: rgba(36, 50, 38, 0.12);
    --panel: rgba(248, 252, 247, 0.92);
    --panel-strong: #fcfffb;
    --shadow: 0 1.6rem 4rem rgba(50, 81, 56, 0.13);
    --bg-accent-1: rgba(75, 131, 86, 0.18);
    --bg-accent-2: rgba(159, 192, 134, 0.16);
    --bg-base-top: #f7fbf5;
    --bg-base-bottom: #e9f0e7;
}

body[data-theme-style="apricot"] {
    --bg: #fff0e7;
    --ink: #43271d;
    --muted: #866155;
    --line: rgba(67, 39, 29, 0.12);
    --panel: rgba(255, 250, 246, 0.92);
    --panel-strong: #fffdfb;
    --shadow: 0 1.6rem 4rem rgba(164, 110, 87, 0.13);
    --bg-accent-1: rgba(246, 143, 92, 0.22);
    --bg-accent-2: rgba(255, 195, 150, 0.22);
    --bg-base-top: #fff8f3;
    --bg-base-bottom: #fff0e7;
}

body[data-theme-style="storm"] {
    --bg: #232936;
    --ink: #eef3fb;
    --muted: #b3bfce;
    --line: rgba(255, 255, 255, 0.1);
    --panel: rgba(35, 44, 57, 0.9);
    --panel-strong: #2b3443;
    --shadow: 0 1.8rem 4.2rem rgba(8, 11, 18, 0.42);
    --success-bg: rgba(22, 74, 56, 0.82);
    --success-line: rgba(123, 230, 191, 0.16);
    --error-bg: rgba(91, 39, 48, 0.82);
    --error-line: rgba(241, 154, 170, 0.16);
    --bg-accent-1: rgba(115, 144, 201, 0.24);
    --bg-accent-2: rgba(51, 214, 215, 0.1);
    --bg-base-top: #2b3444;
    --bg-base-bottom: #1b212c;
}

body[data-theme-style="plum"] {
    --bg: #f2eaf3;
    --ink: #35273b;
    --muted: #76627c;
    --line: rgba(53, 39, 59, 0.12);
    --panel: rgba(254, 250, 255, 0.92);
    --panel-strong: #fffcff;
    --shadow: 0 1.6rem 4rem rgba(111, 86, 124, 0.13);
    --bg-accent-1: rgba(160, 118, 181, 0.2);
    --bg-accent-2: rgba(219, 183, 234, 0.18);
    --bg-base-top: #fbf7fd;
    --bg-base-bottom: #f2eaf3;
}

body[data-theme-style="fresco"] {
    --bg: #eef2ef;
    --ink: #253230;
    --muted: #66756f;
    --line: rgba(37, 50, 48, 0.12);
    --panel: rgba(252, 255, 253, 0.92);
    --panel-strong: #ffffff;
    --shadow: 0 1.6rem 4rem rgba(77, 104, 97, 0.12);
    --bg-accent-1: rgba(138, 170, 154, 0.18);
    --bg-accent-2: rgba(209, 219, 194, 0.18);
    --bg-base-top: #f9fbf9;
    --bg-base-bottom: #eef2ef;
}

body[data-theme-style="dune"] {
    --bg: #f2e8d8;
    --ink: #392d21;
    --muted: #736556;
    --line: rgba(57, 45, 33, 0.12);
    --panel: rgba(255, 251, 245, 0.93);
    --panel-strong: #fffdf8;
    --shadow: 0 1.6rem 4rem rgba(118, 95, 68, 0.12);
    --bg-accent-1: rgba(188, 147, 91, 0.18);
    --bg-accent-2: rgba(229, 201, 159, 0.18);
    --bg-base-top: #fbf7ef;
    --bg-base-bottom: #f2e8d8;
}

body[data-theme-style="arctic"] {
    --bg: #f1f7fb;
    --ink: #1c3040;
    --muted: #607787;
    --line: rgba(28, 48, 64, 0.1);
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: #ffffff;
    --shadow: 0 1.6rem 4rem rgba(83, 120, 148, 0.12);
    --bg-accent-1: rgba(162, 206, 237, 0.18);
    --bg-accent-2: rgba(229, 244, 255, 0.28);
    --bg-base-top: #fcfeff;
    --bg-base-bottom: #f1f7fb;
}

body[data-theme-style="cabernet"] {
    --bg: #27161c;
    --ink: #fff0f3;
    --muted: #cfb2ba;
    --line: rgba(255, 255, 255, 0.11);
    --panel: rgba(46, 26, 34, 0.9);
    --panel-strong: #381f28;
    --shadow: 0 1.8rem 4.2rem rgba(11, 6, 8, 0.4);
    --success-bg: rgba(23, 75, 52, 0.82);
    --success-line: rgba(113, 219, 173, 0.16);
    --error-bg: rgba(106, 36, 44, 0.84);
    --error-line: rgba(255, 155, 171, 0.18);
    --bg-accent-1: rgba(160, 46, 76, 0.26);
    --bg-accent-2: rgba(255, 181, 120, 0.08);
    --bg-base-top: #331d25;
    --bg-base-bottom: #1d1015;
}

body[data-theme-style="mintcream"] {
    --bg: #edf8f3;
    --ink: #1f342a;
    --muted: #5e786d;
    --line: rgba(31, 52, 42, 0.11);
    --panel: rgba(252, 255, 253, 0.92);
    --panel-strong: #ffffff;
    --shadow: 0 1.6rem 4rem rgba(74, 121, 102, 0.11);
    --bg-accent-1: rgba(122, 214, 171, 0.18);
    --bg-accent-2: rgba(213, 245, 226, 0.24);
    --bg-base-top: #fbfffd;
    --bg-base-bottom: #edf8f3;
}

body[data-theme-style="obsidian"] {
    --bg: #121418;
    --ink: #edf2f6;
    --muted: #acb7c1;
    --line: rgba(255, 255, 255, 0.09);
    --panel: rgba(22, 26, 32, 0.92);
    --panel-strong: #1b2028;
    --shadow: 0 2rem 4.5rem rgba(0, 0, 0, 0.48);
    --success-bg: rgba(23, 69, 51, 0.82);
    --success-line: rgba(121, 223, 182, 0.16);
    --error-bg: rgba(92, 34, 42, 0.82);
    --error-line: rgba(240, 150, 165, 0.16);
    --bg-accent-1: rgba(86, 117, 167, 0.2);
    --bg-accent-2: rgba(48, 64, 90, 0.2);
    --bg-base-top: #1a1e24;
    --bg-base-bottom: #0f1216;
}

body[data-theme-style="honeycomb"] {
    --bg: #f8efcf;
    --ink: #3d2f16;
    --muted: #7c6a43;
    --line: rgba(61, 47, 22, 0.12);
    --panel: rgba(255, 251, 238, 0.93);
    --panel-strong: #fffdf5;
    --shadow: 0 1.6rem 4rem rgba(130, 102, 41, 0.13);
    --bg-accent-1: rgba(221, 164, 48, 0.2);
    --bg-accent-2: rgba(255, 214, 114, 0.22);
    --bg-base-top: #fffcef;
    --bg-base-bottom: #f8efcf;
}

body[data-theme-style="orchid"] {
    --bg: #f7eefc;
    --ink: #382245;
    --muted: #7b648d;
    --line: rgba(56, 34, 69, 0.12);
    --panel: rgba(255, 250, 255, 0.92);
    --panel-strong: #fffaff;
    --shadow: 0 1.6rem 4rem rgba(127, 91, 151, 0.13);
    --bg-accent-1: rgba(184, 112, 230, 0.2);
    --bg-accent-2: rgba(241, 187, 255, 0.18);
    --bg-base-top: #fdf7ff;
    --bg-base-bottom: #f7eefc;
}

body[data-theme-style="harbor"] {
    --bg: #e8edf2;
    --ink: #22303c;
    --muted: #637280;
    --line: rgba(34, 48, 60, 0.12);
    --panel: rgba(250, 252, 255, 0.92);
    --panel-strong: #ffffff;
    --shadow: 0 1.6rem 4rem rgba(72, 93, 111, 0.13);
    --bg-accent-1: rgba(104, 136, 165, 0.18);
    --bg-accent-2: rgba(196, 209, 221, 0.2);
    --bg-base-top: #f8fafc;
    --bg-base-bottom: #e8edf2;
}

body[data-theme-style="image-custom"] {
    --accent: var(--theme-image-color-1);
    --accent-deep: color-mix(in srgb, var(--theme-image-color-2) 76%, black);
    --accent-soft: color-mix(in srgb, var(--theme-image-color-1) 16%, transparent);
    --bg: color-mix(in srgb, var(--theme-image-color-3) 16%, white);
    --ink: color-mix(in srgb, var(--theme-image-color-2) 78%, black);
    --muted: color-mix(in srgb, var(--ink) 62%, white);
    --line: color-mix(in srgb, var(--theme-image-color-2) 16%, transparent);
    --panel: color-mix(in srgb, var(--theme-image-color-4) 30%, white);
    --panel-strong: color-mix(in srgb, var(--theme-image-color-4) 20%, white);
    --shadow: 0 1.65rem 4rem color-mix(in srgb, var(--theme-image-color-2) 16%, rgba(33, 24, 20, 0.12));
    --bg-accent-1: color-mix(in srgb, var(--theme-image-color-1) 18%, transparent);
    --bg-accent-2: color-mix(in srgb, var(--theme-image-color-2) 14%, transparent);
    --bg-base-top: color-mix(in srgb, var(--theme-image-color-4) 32%, white);
    --bg-base-bottom: color-mix(in srgb, var(--theme-image-color-3) 22%, white);
}

body[data-theme-accent="coral"] {
    --accent: #cd5c3f;
    --accent-deep: #8e3827;
    --accent-soft: rgba(205, 92, 63, 0.12);
}

body[data-theme-accent="ocean"] {
    --accent: #2d7ea6;
    --accent-deep: #1f5372;
    --accent-soft: rgba(45, 126, 166, 0.14);
}

body[data-theme-accent="emerald"] {
    --accent: #238f72;
    --accent-deep: #16624d;
    --accent-soft: rgba(35, 143, 114, 0.14);
}

body[data-theme-accent="gold"] {
    --accent: #c58a1f;
    --accent-deep: #8a5c0f;
    --accent-soft: rgba(197, 138, 31, 0.16);
}

body[data-theme-accent="berry"] {
    --accent: #b2496f;
    --accent-deep: #7b304b;
    --accent-soft: rgba(178, 73, 111, 0.16);
}

body[data-theme-accent="lavender"] {
    --accent: #7a6fe0;
    --accent-deep: #5148a6;
    --accent-soft: rgba(122, 111, 224, 0.16);
}

body[data-theme-accent="mint"] {
    --accent: #2db38a;
    --accent-deep: #1d7c60;
    --accent-soft: rgba(45, 179, 138, 0.16);
}

body[data-theme-accent="sunset"] {
    --accent: #e4754f;
    --accent-deep: #a34529;
    --accent-soft: rgba(228, 117, 79, 0.16);
}

body[data-theme-accent="ink"] {
    --accent: #355c9b;
    --accent-deep: #243d67;
    --accent-soft: rgba(53, 92, 155, 0.16);
}

body[data-theme-panel-style="solid"] {
    --panel: var(--panel-strong);
    --input-background: var(--panel-strong);
}

body[data-theme-panel-style="glass"] {
    --panel: rgba(255, 255, 255, 0.42);
    --panel-strong: rgba(255, 255, 255, 0.54);
    --panel-blur: 24px;
    --input-background: rgba(255, 255, 255, 0.5);
}

body[data-theme-style="midnight"][data-theme-panel-style="glass"],
body[data-theme-style="graphite"][data-theme-panel-style="glass"],
body[data-theme-style="neon"][data-theme-panel-style="glass"] {
    --panel: rgba(21, 28, 44, 0.62);
    --panel-strong: rgba(26, 33, 52, 0.76);
    --input-background: rgba(255, 255, 255, 0.06);
}

body[data-theme-panel-style="tinted"] {
    --panel-accent-overlay: linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, 0.02));
}

body[data-theme-mode="dark"] {
    color-scheme: dark;
    --bg: #121822;
    --ink: #eef4fb;
    --text: var(--ink);
    --muted: #d5dde9;
    --text-muted: color-mix(in srgb, var(--muted) 84%, white 16%);
    --line: rgba(255, 255, 255, 0.1);
    --border: var(--line);
    --panel: rgba(20, 27, 38, 0.88);
    --panel-strong: #1b2430;
    --shadow: 0 1.8rem 4.2rem rgba(0, 0, 0, 0.44);
    --panel-shadow: 0 1.8rem 4.2rem rgba(0, 0, 0, 0.44);
    --input-background: rgba(255, 255, 255, 0.06);
    --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --success-bg: rgba(21, 79, 58, 0.82);
    --success-line: rgba(122, 223, 182, 0.18);
    --error-bg: rgba(95, 36, 44, 0.84);
    --error-line: rgba(248, 159, 175, 0.2);
    --bg-accent-1: color-mix(in srgb, var(--accent) 18%, transparent);
    --bg-accent-2: color-mix(in srgb, var(--accent-deep) 12%, transparent);
    --bg-base-top: #1a2230;
    --bg-base-bottom: #0f141c;
    --panel-accent-overlay: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 55%, rgba(255, 255, 255, 0.025)), rgba(255, 255, 255, 0.01));
    --button-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.28);
    --button-primary-shadow: 0 1rem 2rem color-mix(in srgb, var(--accent-deep) 40%, rgba(0, 0, 0, 0.34));
    --light-surface-ink: #182331;
    --light-surface-muted: #556578;
}

body[data-theme-style="image-custom"][data-theme-mode="dark"] {
    --bg: color-mix(in srgb, var(--theme-image-color-4) 30%, #08111b);
    --ink: #f4f7fb;
    --text: var(--ink);
    --muted: #c3ced8;
    --text-muted: #d3dce6;
    --line: rgba(255, 255, 255, 0.12);
    --panel: color-mix(in srgb, var(--theme-image-color-4) 22%, rgba(12, 18, 28, 0.92));
    --panel-strong: color-mix(in srgb, var(--theme-image-color-3) 18%, rgba(16, 22, 32, 0.96));
    --shadow: 0 1.85rem 4.25rem rgba(0, 0, 0, 0.46);
    --panel-shadow: 0 1.85rem 4.25rem rgba(0, 0, 0, 0.46);
    --input-background: rgba(255, 255, 255, 0.06);
    --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --accent: color-mix(in srgb, var(--theme-image-color-1) 82%, white);
    --accent-deep: color-mix(in srgb, var(--theme-image-color-2) 48%, white);
    --accent-soft: color-mix(in srgb, var(--theme-image-color-1) 22%, transparent);
    --bg-accent-1: color-mix(in srgb, var(--theme-image-color-1) 20%, transparent);
    --bg-accent-2: color-mix(in srgb, var(--theme-image-color-2) 14%, transparent);
    --bg-base-top: color-mix(in srgb, var(--theme-image-color-4) 20%, #141d2a);
    --bg-base-bottom: color-mix(in srgb, var(--theme-image-color-3) 14%, #0d131c);
    --panel-accent-overlay: linear-gradient(135deg, color-mix(in srgb, var(--theme-image-color-1) 18%, transparent), rgba(255, 255, 255, 0.01));
}

body[data-theme-mode="dark"] :where(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    li,
    dt,
    dd,
    th,
    td,
    label,
    legend,
    small,
    strong,
    b,
    .hero-text,
    .form-note,
    .member-card p,
    .member-meta-line,
    .feature-strip span,
    .profile-edit-section,
    .profile-section-header,
    .page-panel,
    .market-shell,
    .community-shell,
    .notes-shell,
    .calendar-shell,
    .modal-panel
) {
    color: var(--ink) !important;
}

body[data-theme-mode="dark"] :where(
    .hero-text,
    .form-note,
    .member-card p,
    .member-meta-line,
    .feature-strip span,
    .community-switch-history-host,
    .downloads-item-copy p,
    .admin-statistics-tile-copy .form-note,
    .calendar-day-modal-entry p,
    .calendar-day-modal-empty,
    .tasklist-main-heading span,
    .tasklist-item-top small,
    .tasklist-meta-row .form-note,
    .notes-attachments-section .form-note,
    .files-upload-actions .form-note,
    .files-upload-progress-meta .form-note,
    .files-main-panel > .form-note,
    .theater-upload-actions .form-note,
    .theater-upload-progress-meta .form-note
) {
    color: var(--text-muted) !important;
}

body[data-theme-mode="dark"] :where(
    input:not([type="submit"]):not([type="reset"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
    select,
    textarea,
    option
) {
    color: var(--ink) !important;
}

body[data-theme-mode="dark"] :where(
    a:not(.button):not(.site-nav-link-with-icon):not(.site-nav-utility-button),
    .eyebrow,
    .site-nav-link-icon,
    .brand-kicker
) {
    color: color-mix(in srgb, var(--ink) 92%, white 8%) !important;
}

body[data-theme-mode="dark"] :where(
    .flash-error,
    .is-error,
    .preferences-ai-voice-preview-status.is-error
) {
    color: #ffd7df !important;
}

body[data-theme-mode="dark"] :where(
    .chat-friend-item,
    .chat-friend-copy,
    .chat-friend-presence,
    .live-chat-header,
    .live-chat-messages,
    .chat-message-bubble,
    .chat-message-own .chat-message-bubble,
    .chat-reply-composer,
    .chat-reply-echo,
    .chat-link-preview,
    .chat-message-file,
    .chat-message-file-icon
) {
    color: var(--light-surface-ink) !important;
}

body[data-theme-mode="dark"] :where(
    .chat-friend-item strong,
    .chat-friend-copy strong,
    .live-chat-header h2,
    .live-chat-header .eyebrow,
    .live-chat-presence-label,
    .live-chat-presence-option-label,
    .chat-message-text,
    .chat-message-text :where(p, span, strong, b, em, i, li, ul, ol, code, pre, blockquote),
    .chat-message-reply-author,
    .chat-message-file-name,
    .chat-link-preview-title,
    .chat-reply-echo-author,
    .chat-reply-composer-text,
    .chat-reply-composer-author,
    .chat-reply-echo-text
) {
    color: var(--light-surface-ink) !important;
}

body[data-theme-mode="dark"] :where(
    .chat-friend-section-label,
    .chat-friend-empty,
    .chat-friend-filter-empty,
    .chat-friend-item small,
    .chat-empty-state,
    .chat-search-count,
    .live-chat-header p,
    .chat-message-meta,
    .chat-message-reply-text,
    .chat-message-file-action,
    .chat-link-preview-site,
    .chat-link-preview-url,
    .chat-link-preview-description
) {
    color: var(--light-surface-muted) !important;
}

body[data-theme-mode="dark"] :where(
    .chat-message-link,
    .chat-message-text a:not(.button),
    .chat-reply-echo-author,
    .chat-reply-composer-author,
    .chat-message-reply-author
) {
    color: var(--accent-deep) !important;
}

body[data-theme-mode="dark"] .modal-close {
    background: color-mix(in srgb, var(--panel-strong) 88%, rgba(255, 255, 255, 0.08));
    border-color: color-mix(in srgb, var(--line) 92%, transparent);
    color: var(--ink);
}

body[data-theme-mode="dark"] :where(
    .community-switch-history-open,
    .downloads-item,
    .group-member-option,
    .group-member-option:has(input:checked),
    .admin-statistics-tile,
    .calendar-day-modal-card,
    .calendar-day-list-card,
    .calendar-day-modal-entry,
    .calendar-editor-card,
    .calendar-sidebar,
    .calendar-main,
    .calendar-diary-card,
    .calendar-timeline-card,
    .tasklist-sidebar-panel,
    .tasklist-main-panel,
    .tasklist-modal-card,
    .tasklist-item-open,
    .tasklist-item-vote-rail,
    .tasklist-vote-button
) {
    background: color-mix(in srgb, var(--panel-strong) 94%, rgba(8, 12, 20, 0.82)) !important;
    border-color: color-mix(in srgb, var(--line) 92%, transparent) !important;
    color: var(--ink) !important;
}

body[data-theme-mode="dark"] .group-member-check {
    background: color-mix(in srgb, var(--panel-strong) 88%, rgba(255, 255, 255, 0.08));
    border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
}

body[data-theme-mode="dark"][data-theme-panel-style="glass"] {
    --panel: rgba(20, 27, 38, 0.62);
    --panel-strong: rgba(27, 36, 49, 0.78);
    --input-background: rgba(255, 255, 255, 0.07);
}

body[data-theme-mode="dark"][data-theme-panel-style="solid"] {
    --panel: var(--panel-strong);
    --input-background: var(--panel-strong);
}

body[data-theme-button-vibrance="calm"] {
    --button-primary-filter: saturate(0.82) brightness(0.98);
}

body[data-theme-button-vibrance="balanced"] {
    --button-primary-filter: saturate(1) brightness(1);
}

body[data-theme-button-vibrance="bold"] {
    --button-primary-filter: saturate(1.22) brightness(1.04);
}

body[data-theme-button-vibrance="electric"] {
    --button-primary-filter: saturate(1.38) brightness(1.08);
    --button-primary-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 1rem 2.4rem color-mix(in srgb, var(--accent) 48%, transparent);
}

body[data-theme-font-family="dm-sans"] {
    --ui-font-family: "DM Sans";
}

body[data-theme-font-family="manrope"] {
    --ui-font-family: "Manrope";
}

body[data-theme-font-family="space-grotesk"] {
    --ui-font-family: "Space Grotesk";
}

body[data-theme-font-family="outfit"] {
    --ui-font-family: "Outfit";
}

body[data-theme-font-family="sora"] {
    --ui-font-family: "Sora";
}

body[data-theme-font-family="newsreader"] {
    --ui-font-family: "Newsreader";
}

body[data-theme-font-family="merriweather-sans"] {
    --ui-font-family: "Merriweather Sans";
}

body[data-theme-font-family="nunito-sans"] {
    --ui-font-family: "Nunito Sans";
}

body[data-theme-font-family="poppins"] {
    --ui-font-family: "Poppins";
}

body[data-theme-font-family="rubik"] {
    --ui-font-family: "Rubik";
}

body.guest-page {
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

a {
    color: var(--accent-deep);
}

.site-shell {
    --site-sidebar-width: clamp(17rem, 19vw, 22rem);
    --site-sidebar-collapsed-width: 6.4rem;
    --site-sidebar-current-width: var(--site-sidebar-width);
    align-items: start;
    box-sizing: border-box;
    display: grid;
    gap: 1rem;
    grid-template-columns: var(--site-sidebar-width) minmax(0, 1fr);
    margin: 0;
    min-height: 100vh;
    max-width: none;
    padding: 0.75rem 0.5rem 2rem;
    width: 100%;
}

.site-header,
.site-main,
.flash-stack {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
}

.site-header {
    grid-column: 1;
    align-self: start;
    align-content: start;
    backdrop-filter: blur(var(--panel-blur));
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    border: var(--panel-border-width) solid var(--line);
    border-radius: calc(var(--panel-radius) * 0.9);
    box-shadow: var(--panel-shadow);
    display: grid;
    gap: 1rem;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: calc(100vh - 1rem);
    inset: 0.5rem auto 0.5rem 0.5rem;
    margin-top: 0;
    max-height: calc(100vh - 1rem);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem 1rem 0.95rem;
    position: fixed;
    scrollbar-gutter: stable;
    width: var(--site-sidebar-width);
    z-index: 25;
}

.site-header-top {
    align-items: start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.site-brand-stack {
    align-self: start;
    display: grid;
    flex: 1 1 auto;
    gap: 0.55rem;
    min-width: 0;
}

.brand-mark {
    border-bottom: 0;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.brand-logo {
    display: block;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.site-community-banner-link {
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: calc(var(--panel-radius) * 0.65);
    display: block;
    overflow: hidden;
    text-decoration: none;
    width: 100%;
}

.site-community-banner-image {
    display: block;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.brand-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

.brand-mark strong {
    font-family: var(--ui-font-family), sans-serif;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: none;
}

.site-sidebar-toggle {
    align-items: center;
    align-self: start;
    background: color-mix(in srgb, var(--panel-strong) 84%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    color: inherit;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: calc(0.96rem * var(--ui-button-font-scale));
    font-weight: 700;
    justify-content: center;
    line-height: 1.12;
    min-height: 3rem;
    min-width: 3rem;
    padding: 0.7rem;
    width: 3rem;
}

.site-sidebar-toggle-label {
    display: none;
}

.site-community-switch-button {
    align-items: center;
    align-self: stretch;
    background: color-mix(in srgb, var(--panel-strong) 84%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    box-sizing: border-box;
    color: inherit;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: flex-start;
    max-width: 100%;
    min-height: 3rem;
    min-width: 0;
    padding: 0.65rem 0.95rem;
    text-align: left;
    width: 100%;
}

.site-community-switch-button .site-nav-link-icon {
    flex: 0 0 auto;
}

.site-community-switch-button span:last-child {
    flex: 1 1 auto;
    font-size: calc(0.96rem * var(--ui-button-font-scale));
    font-weight: 700;
    line-height: 1.12;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
}

.site-nav {
    display: grid;
    gap: 0.75rem;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.site-nav-primary,
.site-nav-link-cluster,
.site-nav-icon-cluster {
    align-content: start;
    display: grid;
    gap: 0.6rem;
}

.site-nav-primary {
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.site-nav-link-with-icon,
.site-nav-utility-button {
    align-items: center;
    background: color-mix(in srgb, var(--panel-strong) 82%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: calc(var(--panel-radius) * 0.6);
    box-sizing: border-box;
    color: inherit;
    display: flex;
    font-size: calc(0.96rem * var(--ui-button-font-scale));
    font-weight: 700;
    gap: 0.75rem;
    justify-content: flex-start;
    line-height: 1.12;
    min-width: 0;
    min-height: 3.2rem;
    padding: 0.88rem 0.95rem;
    position: relative;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    width: 100%;
}

.site-nav-link-with-icon:hover,
.site-nav-link-with-icon:focus-visible,
.site-nav-utility-button:hover,
.site-nav-utility-button:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    box-shadow: 0 1rem 1.9rem rgba(15, 23, 42, 0.09);
    transform: translateY(-1px);
}

.site-nav-link-label-row {
    align-items: center;
    display: inline-flex;
    gap: 0.55rem;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}

.site-nav-link-icon {
    align-items: center;
    color: var(--accent-deep);
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.44rem;
    justify-content: center;
    width: 1.44rem;
}

.site-nav-link-icon svg {
    display: block;
    height: 100%;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 100%;
}

.site-nav-link-label {
    flex: 1 1 auto;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    min-width: 0;
}

.site-nav-link-badge {
    align-items: center;
    background: linear-gradient(135deg, #d75873 0%, #bf3f5f 100%);
    border-radius: 999px;
    box-shadow: 0 0.35rem 0.9rem rgba(191, 63, 95, 0.22);
    color: #fff;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 1.22rem;
    min-width: 1.22rem;
    padding: 0 0.38rem;
}

.site-action-icon {
    display: block;
    flex: 0 0 auto;
    height: 1.5rem;
    pointer-events: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 1.5rem;
}

.site-nav-utility-button {
    box-sizing: border-box;
    font-size: clamp(0.95rem, calc(0.98rem * var(--ui-button-font-scale)), 1.35rem) !important;
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
}

.site-nav-utility-link {
    font-size: clamp(0.95rem, calc(0.98rem * var(--ui-button-font-scale)), 1.35rem);
}

.site-nav-utility-form {
    display: block;
    margin: 0;
}

.site-version {
    background: color-mix(in srgb, var(--panel-strong) 86%, transparent);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1;
    justify-self: start;
    margin-left: 0;
    padding: 0.42rem 0.72rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-footer-meta {
    align-items: center;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 0.2rem;
    min-width: 0;
    width: 100%;
}

.site-footer-user {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    justify-self: end;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-shell.is-sidebar-collapsed {
    --site-sidebar-current-width: var(--site-sidebar-collapsed-width);
    grid-template-columns: var(--site-sidebar-collapsed-width) minmax(0, 1fr);
}

.site-shell.is-sidebar-collapsed .site-header {
    scrollbar-gutter: auto;
    width: var(--site-sidebar-collapsed-width);
}

.site-shell.is-sidebar-collapsed .site-header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.site-shell.is-sidebar-collapsed .site-header-top,
.site-shell.is-sidebar-collapsed .brand-mark {
    justify-content: center;
}

.site-shell.is-sidebar-collapsed .site-brand-stack {
    display: none;
}

.site-shell.is-sidebar-collapsed .brand-mark {
    display: none;
}

.site-shell.is-sidebar-collapsed .brand-copy,
.site-shell.is-sidebar-collapsed .site-version,
.site-shell.is-sidebar-collapsed .site-footer-user,
.site-shell.is-sidebar-collapsed .site-sidebar-toggle-label,
.site-shell.is-sidebar-collapsed .site-nav-link-label {
    display: none;
}

.site-shell.is-sidebar-collapsed .site-nav-link-with-icon,
.site-shell.is-sidebar-collapsed .site-nav-utility-button,
.site-shell.is-sidebar-collapsed .site-sidebar-toggle {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.site-shell.is-sidebar-collapsed .site-nav-primary {
    padding-right: 0;
}

.site-shell.is-sidebar-collapsed .site-nav-link-label-row {
    justify-content: center;
    width: auto;
}

.site-shell.is-sidebar-collapsed .site-nav-link-badge {
    position: absolute;
    right: 0.4rem;
    top: 0.4rem;
}

.site-main {
    grid-column: 2;
    min-width: 0;
    padding-bottom: 4rem;
    padding-top: 0;
}

.whiteboards-page .site-main {
    min-height: calc(100dvh - 1.5rem);
    overflow: hidden;
    padding-bottom: 0;
}

.notes-page .site-main {
    min-height: calc(100dvh - 1.5rem);
    overflow: hidden;
    padding-bottom: 0;
}

.chat-page .site-main {
    min-height: calc(100vh - 1.5rem);
}

.chat-page-shell {
    display: grid;
    justify-items: stretch;
    min-height: calc(100vh - 1.5rem);
}

.panel {
    background: var(--panel);
    border: var(--panel-border-width) solid var(--line);
    border-radius: var(--ui-panel-radius);
    box-shadow: var(--panel-shadow);
    padding: var(--ui-panel-padding);
}

.panel-accent {
    background: var(--panel-accent-overlay), var(--panel);
}

.modal-backdrop {
    align-items: center;
    background: rgba(27, 18, 15, 0.58);
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.5rem;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.2s ease;
    z-index: 30;
}

.modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop.fullscreen-hosted {
    position: absolute;
    z-index: 40;
}

.modal-panel {
    background: var(--panel);
    border: var(--panel-border-width) solid var(--line);
    border-radius: var(--ui-panel-radius);
    box-shadow: var(--panel-shadow);
    margin: auto 0;
    overflow: visible;
    padding: var(--ui-modal-padding);
    position: relative;
    width: min(100%, 44rem);
}

.modal-close {
    align-items: center;
    appearance: none;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-size: clamp(0.95rem, calc(1rem * var(--ui-box-scale)), 1.15rem);
    font-weight: 700;
    height: var(--ui-modal-close-size);
    justify-content: center;
    position: absolute;
    right: clamp(0.8rem, calc(1rem * var(--ui-box-scale)), 1.2rem);
    top: clamp(0.8rem, calc(1rem * var(--ui-box-scale)), 1.2rem);
    width: var(--ui-modal-close-size);
}

.preferences-modal {
    width: min(100%, 62rem);
}

.preferences-form .fields {
    display: grid;
    gap: clamp(0.8rem, calc(1rem * var(--ui-box-scale)), 1.25rem) clamp(0.9rem, calc(1.1rem * var(--ui-box-scale)), 1.4rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preferences-form .field {
    display: grid;
    gap: 0.4rem;
}

.preferences-form .field.preferences-theme-mode-field {
    gap: 0.65rem;
    grid-column: 1 / -1;
}

.preferences-form .field.preferences-help-field {
    gap: 0.65rem;
    grid-column: 1 / -1;
}

.preferences-form .field:nth-child(n + 7) {
    grid-column: 1 / -1;
}

.preferences-theme-mode-toggle {
    width: fit-content;
}

.preferences-theme-mode-toggle .discover-toggle-copy {
    font-size: calc(0.95rem * var(--ui-button-font-scale));
}

.preferences-help-toggle {
    width: fit-content;
}

.preferences-help-toggle .discover-toggle-copy {
    font-size: calc(0.95rem * var(--ui-button-font-scale));
}

.preferences-theme-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.preferences-theme-image-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.15rem;
}

.preferences-theme-image-swatch {
    border: 1px solid var(--line);
    border-radius: 0.72rem;
    box-shadow: 0 0.35rem 0.8rem rgba(15, 23, 42, 0.12);
    height: 2rem;
    width: 2rem;
}

.preferences-theme-image-status {
    margin: 0;
}

.preferences-theme-image-status.is-error {
    color: #b91c1c;
    font-weight: 700;
}

.field-inline-heading {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.font-scale-value {
    color: var(--accent-deep);
    font-size: 0.9rem;
    font-weight: 700;
    min-width: calc(3.5rem * clamp(0.9, var(--ui-box-scale), 1.1));
    text-align: right;
}

.preferences-form input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    min-height: 2.4rem;
    padding-block: 0.45rem;
    touch-action: pan-y;
    width: 100%;
}

.preferences-form input[type="range"]::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), var(--accent));
    border-radius: 999px;
    height: 0.78rem;
}

.preferences-form input[type="range"]::-moz-range-track {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), var(--accent));
    border-radius: 999px;
    height: 0.78rem;
}

.preferences-form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    border: 3px solid rgba(255, 255, 255, 0.96);
    border-radius: 50%;
    box-shadow: 0 0.55rem 1.2rem rgba(0, 0, 0, 0.18);
    height: 1.55rem;
    margin-top: -0.385rem;
    transition: transform 140ms ease, box-shadow 140ms ease;
    width: 1.55rem;
}

.preferences-form input[type="range"]::-moz-range-thumb {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    border: 3px solid rgba(255, 255, 255, 0.96);
    border-radius: 50%;
    box-shadow: 0 0.55rem 1.2rem rgba(0, 0, 0, 0.18);
    height: 1.55rem;
    transition: transform 140ms ease, box-shadow 140ms ease;
    width: 1.55rem;
}

.preferences-form input[type="range"]:active {
    cursor: grabbing;
}

.preferences-form input[type="range"]:focus-visible {
    outline: none;
}

.preferences-form input[type="range"]:focus-visible::-webkit-slider-runnable-track,
.preferences-form input[type="range"]:focus-visible::-moz-range-track {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--accent) 28%, transparent);
}

.preferences-form input[type="range"]::-webkit-slider-thumb:hover,
.preferences-form input[type="range"]::-webkit-slider-thumb:active,
.preferences-form input[type="range"]::-moz-range-thumb:hover {
    box-shadow: 0 0.75rem 1.45rem rgba(0, 0, 0, 0.24);
    transform: scale(1.08);
}

.preferences-form input[type="range"]::-moz-range-thumb:active {
    box-shadow: 0 0.75rem 1.45rem rgba(0, 0, 0, 0.24);
    transform: scale(1.08);
}

.preferences-form .actions {
    align-items: center;
    justify-content: space-between;
}

.preferences-ai-voice-preview-status {
    margin: 0;
}

.preferences-ai-voice-preview-status.is-error {
    color: #b91c1c;
}

.ui-help-target {
    overflow: visible;
    position: relative;
}

.ui-help-trigger {
    align-items: center;
    background: linear-gradient(135deg, #42c26b 0%, #238a4b 100%);
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    box-shadow: 0 0.45rem 1rem rgba(25, 94, 52, 0.28);
    color: white;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 800;
    height: 1.12rem;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: -0.24rem;
    text-indent: 0;
    text-align: center;
    top: -0.24rem;
    user-select: none;
    width: 1.42rem;
    z-index: 4;
}

.ui-help-trigger:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 45%, white);
    outline-offset: 2px;
}

.ui-help-modal {
    width: min(100%, 40rem);
}

.ui-help-message-card {
    background: color-mix(in srgb, var(--panel) 84%, white);
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.1);
    margin-top: 1rem;
    padding: 1rem 1.1rem;
}

.ui-help-message {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    white-space: pre-wrap;
}

.ui-help-actions {
    margin-top: 1rem;
}

.ui-help-editor {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.ui-help-editor-actions {
    justify-content: space-between;
}

.ui-help-status {
    margin: 0.6rem 0 0;
}

.ui-help-status.is-error {
    color: #b91c1c;
    font-weight: 700;
}

@media screen and (max-width: 760px) {
    .preferences-form .fields {
        grid-template-columns: 1fr;
    }

    .preferences-form .field:nth-child(n + 5) {
        grid-column: auto;
    }
}

.modal-flash-stack {
    display: grid;
    gap: 0.85rem;
    margin: 1rem 0 0;
}

.flash-stack {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.flash {
    border-radius: calc(1rem * clamp(0.9, var(--ui-box-scale), 1.18));
    border: 1px solid transparent;
    padding: calc(0.95rem * var(--ui-box-scale)) calc(1.1rem * var(--ui-box-scale));
    line-height: 1.6;
}

.flash-success {
    background: var(--success-bg);
    border-color: var(--success-line);
}

.flash-error {
    background: var(--error-bg);
    border-color: var(--error-line);
}

.eyebrow {
    color: var(--accent-deep);
}

.hero-text,
.form-note,
.member-card p,
.member-meta-line,
dd,
.feature-strip span {
    color: var(--muted);
}

.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
    color: inherit;
    box-sizing: border-box;
    border-radius: var(--button-radius) !important;
    border-width: var(--button-border-width) !important;
    font-weight: var(--button-font-weight);
    letter-spacing: var(--button-letter-spacing);
    min-width: 0;
    overflow-wrap: anywhere;
    text-transform: var(--button-text-transform);
    box-shadow: var(--button-shadow);
    font-size: calc(1rem * var(--ui-button-font-scale));
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.button.primary,
button.primary,
input[type="submit"].primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-color: var(--button-primary-border-color);
    box-shadow: var(--button-primary-shadow);
    color: var(--button-primary-text) !important;
    filter: var(--button-primary-filter);
}

.button.is-selected {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-color: transparent;
    color: #fff !important;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
    box-shadow: var(--button-primary-shadow);
    transform: translateY(var(--button-hover-translate-y)) scale(var(--button-hover-scale));
}

input:not([type="submit"]):not([type="reset"]):not([type="button"]),
select,
textarea {
    background: var(--input-background);
    box-sizing: border-box;
    border-radius: var(--input-radius);
    border-width: var(--input-border-width);
    box-shadow: var(--input-shadow);
    font: inherit;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

body[data-theme-mode="dark"] .site-community-switch-button,
body[data-theme-mode="dark"] .site-sidebar-toggle,
body[data-theme-mode="dark"] .site-nav-link-with-icon,
body[data-theme-mode="dark"] .site-nav-utility-button,
body[data-theme-mode="dark"] .site-version {
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.24);
}

body[data-theme-mode="dark"] .site-community-switch-button,
body[data-theme-mode="dark"] .site-sidebar-toggle,
body[data-theme-mode="dark"] .site-nav-link-with-icon,
body[data-theme-mode="dark"] .site-nav-utility-button {
    background: color-mix(in srgb, var(--panel-strong) 84%, rgba(255, 255, 255, 0.04));
    border-color: color-mix(in srgb, var(--line) 92%, transparent);
    color: var(--ink) !important;
}

body[data-theme-mode="dark"] .site-community-switch-button span:last-child,
body[data-theme-mode="dark"] .site-nav-link-label,
body[data-theme-mode="dark"] .site-nav-link-label-row,
body[data-theme-mode="dark"] .site-nav-utility-button span {
    color: var(--ink) !important;
}

body[data-theme-mode="dark"] .site-nav-link-icon,
body[data-theme-mode="dark"] .brand-kicker {
    color: color-mix(in srgb, var(--accent) 72%, white 28%);
}

body[data-theme-mode="dark"] .member-card-actions .button:not(.primary):not(.friend-action-button),
body[data-theme-mode="dark"] .member-detail-trigger {
    background: color-mix(in srgb, var(--panel-strong) 84%, rgba(255, 255, 255, 0.04));
    border-color: color-mix(in srgb, var(--line) 92%, transparent) !important;
    color: var(--ink) !important;
}

input:not([type="submit"]):not([type="reset"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
select,
textarea {
    padding: var(--ui-control-pad-y) var(--ui-control-pad-x);
}

select {
    height: auto;
    line-height: 1.35;
    min-height: calc(3rem * clamp(0.96, var(--ui-box-scale), 1.14));
    padding-bottom: calc(var(--ui-control-pad-y) + 0.08rem);
    padding-right: max(3rem, calc(var(--ui-control-pad-x) + 2.1rem));
    padding-top: calc(var(--ui-control-pad-y) + 0.08rem);
}

.ai-input-shell {
    display: grid;
    gap: 0.32rem;
    position: relative;
    width: 100%;
}

.ai-input-shell > input,
.ai-input-shell > textarea {
    width: 100%;
}

.has-ai-polish-control {
    padding-right: calc(var(--ui-control-pad-x) + 3.2rem) !important;
}

.ai-input-polish-button {
    align-items: center;
    background: color-mix(in srgb, var(--panel) 92%, white 8%);
    border: 1px solid color-mix(in srgb, var(--border) 86%, white 14%);
    border-radius: 999px;
    box-shadow: 0 0.55rem 1.3rem rgba(15, 23, 42, 0.1);
    color: var(--text);
    display: inline-flex;
    gap: 0.25rem;
    height: 1.75rem;
    justify-content: center;
    min-height: 0;
    min-width: 2.4rem;
    padding: 0 0.55rem;
    position: absolute;
    right: 0.65rem;
    top: 0.6rem;
    transform: none;
    z-index: 2;
}

.ai-input-polish-button:hover {
    transform: none;
}

.ai-input-polish-label {
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.ai-input-polish-spinner {
    animation: ai-input-spin 0.7s linear infinite;
    border: 2px solid color-mix(in srgb, var(--border) 86%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    display: none;
    height: 0.72rem;
    width: 0.72rem;
}

.ai-input-polish-button.is-busy .ai-input-polish-label {
    display: none;
}

.ai-input-polish-button.is-busy .ai-input-polish-spinner {
    display: inline-block;
}

.ai-input-polish-status {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}

.ai-input-polish-status.is-error {
    color: #b91c1c;
}

.ai-polish-modal {
    max-width: min(100%, 52rem);
    width: min(100%, 52rem);
}

.ai-polish-modal-card {
    display: grid;
    gap: 1rem;
}

.ai-polish-modal-card .field {
    margin: 0;
}

.ai-polish-custom-row,
.ai-polish-actions-grid {
    display: grid;
    gap: 0.85rem;
}

.ai-polish-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-polish-action-button {
    align-items: flex-start;
    background: color-mix(in srgb, var(--panel) 92%, white 8%);
    border: 1px solid color-mix(in srgb, var(--border) 86%, white 14%);
    border-radius: 1rem !important;
    box-shadow: 0 0.9rem 1.8rem rgba(15, 23, 42, 0.08);
    color: var(--text);
    display: flex;
    gap: 0.9rem;
    justify-content: space-between;
    min-height: 5.9rem;
    padding: 1rem 1.05rem;
    text-align: left;
    width: 100%;
}

.ai-polish-action-button:hover,
.ai-polish-action-button:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.ai-polish-custom-button {
    align-items: center;
    min-height: 4.35rem;
}

.ai-polish-action-copy {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.ai-polish-action-title {
    color: inherit;
    font-size: 0.98rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    line-height: 1.18;
}

.ai-polish-action-description {
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.42;
}

.ai-polish-custom-button .ai-polish-action-description {
    color: color-mix(in srgb, var(--button-primary-text) 88%, rgba(255, 255, 255, 0.2));
}

.ai-polish-action-spinner {
    animation: ai-input-spin 0.7s linear infinite;
    border: 2px solid color-mix(in srgb, var(--border) 86%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    display: none;
    flex: 0 0 auto;
    height: 1rem;
    margin-top: 0.12rem;
    width: 1rem;
}

.ai-polish-action-button.is-busy .ai-polish-action-spinner {
    display: inline-block;
}

.ai-polish-status {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
}

.ai-polish-status.is-error {
    color: #b91c1c;
}

@media screen and (max-width: 760px) {
    .ai-polish-actions-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

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

.landing-shell,
.dashboard-grid,
.profile-grid {
    display: grid;
    gap: var(--ui-layout-gap);
}

.landing-shell {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: start;
    padding-top: 1rem;
}

.promo-panel {
    align-self: stretch;
}

.landing-copy h1,
.page-hero h1 {
    margin-bottom: 1rem;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(1rem * var(--ui-box-scale));
    margin-top: calc(2rem * var(--ui-box-scale));
}

.feature-strip article {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.feature-strip strong {
    display: block;
    font-family: var(--ui-font-family), sans-serif;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.page-shell-compact {
    padding-top: 1rem;
}

.news-feed-panel {
    display: grid;
    gap: 1.5rem;
}

.news-feed-list {
    column-count: 3;
    column-gap: 1rem;
}

.news-feed-list > .empty-state {
    break-inside: avoid;
    display: inline-block;
    margin: 0 0 1rem;
    width: 100%;
}

.news-card {
    break-inside: avoid;
    display: grid;
    gap: 1rem;
    margin: 0 0 1rem;
    overflow: hidden;
    width: 100%;
}

.news-card-link-shell {
    color: inherit;
    display: block;
    text-decoration: none;
}

.news-card-openable {
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.news-card-openable:hover,
.news-card-openable:focus-visible {
    box-shadow: 0 1.15rem 2.2rem rgba(10, 24, 46, 0.12);
    transform: translateY(-0.15rem);
}

.news-card-media {
    container-type: inline-size;
    position: relative;
}

.news-card-media-link {
    color: inherit;
    display: block;
    text-decoration: none;
}

.news-card-media img {
    border-radius: calc(var(--radius) - 0.2rem);
    display: block;
    height: auto;
    width: 100%;
}

.news-card-media::after {
    background: linear-gradient(180deg, rgba(8, 14, 27, 0) 0%, rgba(8, 14, 27, 0.72) 100%);
    border-radius: calc(var(--radius) - 0.2rem);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.news-card-media-title {
    color: #fff;
    font-family: var(--news-title-font, "Space Grotesk", sans-serif);
    font-size: clamp(1.15rem, calc(var(--news-title-size, 8.5) * 1cqw), 3rem);
    font-weight: 900;
    left: calc(var(--news-title-x, 50) * 1%);
    letter-spacing: 0.04em;
    margin: 0;
    max-width: calc(100% - 2rem);
    pointer-events: none;
    position: absolute;
    text-align: center;
    text-shadow:
        -1px -1px 0 rgba(0, 0, 0, 0.92),
        1px -1px 0 rgba(0, 0, 0, 0.92),
        -1px 1px 0 rgba(0, 0, 0, 0.92),
        1px 1px 0 rgba(0, 0, 0, 0.92),
        0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    top: calc(var(--news-title-y, 88) * 1%);
    transform: translate(-50%, -50%);
    width: calc(100% - 2rem);
    z-index: 1;
    -webkit-text-stroke: 1.4px rgba(0, 0, 0, 0.92);
}

.news-card-copy {
    display: grid;
    gap: 0.75rem;
}

.news-card-copy h2,
.news-card-copy p {
    margin: 0;
}

.news-card-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.news-card-body {
    color: var(--text);
    line-height: 1.8;
}

.news-article-detail-modal {
    max-width: min(100%, 72rem);
    width: min(100%, 72rem);
}

.news-article-detail-content {
    display: grid;
    gap: 1rem;
    max-height: min(78vh, 60rem);
    overflow: auto;
    padding-right: 0.35rem;
}

.news-article-detail-shell,
.news-article-detail-copy {
    display: grid;
    gap: 1rem;
}

.news-article-detail-shell .news-card-media {
    margin: 0;
}

.news-article-detail-shell .news-card-media img {
    max-height: 70vh;
    object-fit: contain;
}

.news-editor-link-note {
    overflow-wrap: anywhere;
}

.news-editor-layout {
    display: grid;
    gap: var(--ui-layout-gap);
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.news-editor-form-panel,
.news-editor-list-panel {
    min-width: 0;
}

.news-editor-current-image {
    display: grid;
    gap: 0.5rem;
    width: 100%;
}

.news-editor-current-image-stage {
    container-type: inline-size;
    position: relative;
    width: 100%;
}

.news-editor-current-image img,
.news-editor-image-placeholder {
    border-radius: calc(var(--radius) - 0.2rem);
    display: block;
    width: 100%;
}

.news-editor-current-image img {
    height: auto;
}

.news-editor-image-title-overlay {
    color: #fff;
    cursor: grab;
    font-family: var(--news-title-font, "Space Grotesk", sans-serif);
    font-size: clamp(1rem, calc(var(--news-title-size, 8.5) * 1cqw), 3.2rem);
    font-weight: 900;
    left: calc(var(--news-title-x, 50) * 1%);
    letter-spacing: 0.04em;
    margin: 0;
    max-width: calc(100% - 2rem);
    padding: 0.2rem 0.4rem;
    position: absolute;
    text-align: center;
    text-shadow:
        -1px -1px 0 rgba(0, 0, 0, 0.92),
        1px -1px 0 rgba(0, 0, 0, 0.92),
        -1px 1px 0 rgba(0, 0, 0, 0.92),
        1px 1px 0 rgba(0, 0, 0, 0.92),
        0 0.45rem 0.9rem rgba(0, 0, 0, 0.3);
    touch-action: none;
    top: calc(var(--news-title-y, 88) * 1%);
    transform: translate(-50%, -50%);
    user-select: none;
    width: calc(100% - 2rem);
    z-index: 1;
    -webkit-text-stroke: 1.4px rgba(0, 0, 0, 0.92);
}

.news-editor-image-title-overlay.is-dragging {
    cursor: grabbing;
}

.news-editor-image-placeholder {
    align-items: center;
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.64);
    border: 1px dashed var(--line);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.news-editor-dropzone {
    margin-top: 0.4rem;
}

.news-editor-upload-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: flex-start;
    margin-top: 0.85rem;
}

.news-editor-upload-actions .form-note {
    margin: 0;
}

.news-title-font-select {
    font-size: 1.02rem;
}

.news-editor-upload-trigger {
    box-sizing: border-box;
    height: calc(3.05rem * var(--ui-box-scale));
    line-height: 1.15;
    min-height: calc(3.05rem * var(--ui-box-scale));
    min-width: 13rem;
    padding: 0 1.5rem;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-landing-branding-panel {
    gap: 1rem;
}

.admin-landing-branding-preview-wrap {
    background:
        radial-gradient(circle at top left, rgba(25, 143, 114, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 242, 236, 0.96));
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) - 0.1rem);
    display: flex;
    justify-content: center;
    min-height: 10rem;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.admin-landing-branding-preview {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.admin-landing-branding-upload-row {
    align-items: center;
}

.admin-landing-branding-dropzone {
    aspect-ratio: 16 / 5;
    cursor: pointer;
    min-height: 12rem;
}

.admin-landing-branding-dropzone.is-dragover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(25, 143, 114, 0.16);
}

.admin-landing-branding-overlay {
    align-items: center;
    align-self: stretch;
    background: linear-gradient(180deg, rgba(8, 15, 32, 0.16), rgba(8, 15, 32, 0.52));
    color: #fff;
    display: grid;
    gap: 0.2rem;
    justify-items: center;
    padding: 1rem;
    pointer-events: none;
    position: relative;
    text-align: center;
    width: 100%;
    z-index: 1;
}

.admin-landing-branding-overlay strong,
.admin-landing-branding-overlay span {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.news-editor-list {
    display: grid;
    gap: 1rem;
}

.news-editor-list-card {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
}

.news-editor-list-media {
    min-width: 0;
}

.news-editor-list-image {
    aspect-ratio: 4 / 3;
    border-radius: calc(var(--radius) - 0.2rem);
    display: block;
    object-fit: cover;
    width: 100%;
}

.news-editor-list-image-placeholder {
    align-items: center;
    background: rgba(255, 255, 255, 0.58);
    border: 1px dashed var(--line);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.news-editor-list-copy {
    display: grid;
    gap: 0.55rem;
}

.news-editor-list-copy h3,
.news-editor-list-copy p {
    margin: 0;
}

.news-editor-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.news-editor-list-actions form {
    margin: 0;
}

.news-editor-list-actions .button {
    width: auto;
}

.news-editor-form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.news-editor-form-actions li {
    margin: 0;
}

.news-editor-form-actions .button,
.news-editor-list-actions .button {
    font-size: var(--button-text-size);
    min-width: 11rem;
    padding: 0.9rem 1.35rem;
    text-align: center;
}

.news-editor-hero-actions .button,
.news-editor-form-actions .button,
.news-editor-list-actions .button,
.news-editor-upload-trigger {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1.15;
}

.news-editor-upload-trigger > span {
    align-items: center;
    display: flex;
    justify-content: center;
    line-height: 1.15;
    min-height: 100%;
    text-align: center;
    width: 100%;
}

.news-action-button,
.news-editor-upload-trigger {
    background: linear-gradient(135deg, #2d9d68 0%, #1f6f4b 100%);
    border-color: rgba(31, 111, 75, 0.9) !important;
    box-shadow: 0 1rem 2rem rgba(31, 111, 75, 0.22);
    color: #fff !important;
}

.news-action-button:hover,
.news-action-button:focus,
.news-action-button:focus-visible,
.news-editor-upload-trigger:hover,
.news-editor-upload-trigger:focus,
.news-editor-upload-trigger:focus-visible {
    box-shadow: 0 1.15rem 2.3rem rgba(31, 111, 75, 0.28);
}

.market-layout {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
    min-width: 0;
}

.market-shell {
    display: grid;
    gap: 1.5rem;
}

.market-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.08;
}

.market-toolbar-panel {
    display: grid;
    gap: 1rem;
}

.market-toolbar-panel .section-heading {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.market-toolbar-panel .section-heading > div {
    min-width: 0;
}

.market-toolbar-actions {
    display: flex;
    justify-content: flex-end;
}

.market-filter-form {
    align-items: end;
    display: grid;
    gap: 0.9rem;
    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(10rem, 0.72fr)
        minmax(10rem, 0.72fr)
        minmax(10rem, 0.72fr)
        auto;
}

.market-filter-form .field {
    min-width: 0;
}

.market-filter-actions {
    display: flex;
    gap: 0.75rem;
}

.market-filter-actions .button {
    min-height: calc(3.05rem * var(--ui-box-scale));
}

.market-toolbar-actions .button {
    min-height: calc(3.2rem * var(--ui-box-scale));
}

.market-editor-panel,
.market-list-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.market-editor-panel .section-heading,
.market-list-panel .section-heading {
    align-items: start;
    display: grid;
    gap: 0.35rem;
    justify-content: stretch;
}

.market-editor-panel .section-heading > div,
.market-list-panel .section-heading > div {
    min-width: 0;
}

.market-editor-panel .section-heading h2,
.market-editor-panel .section-heading span,
.market-list-panel .section-heading h2,
.market-list-panel .section-heading span {
    display: block;
    margin: 0;
    overflow-wrap: anywhere;
}

.market-editor-panel .section-heading span,
.market-list-panel .section-heading span {
    color: var(--text-muted);
    font-size: calc(0.92rem * var(--ui-font-scale));
    line-height: 1.45;
}

.market-editor-form,
.market-editor-form .profile-edit-section,
.market-editor-form .fields,
.market-editor-form .field {
    min-width: 0;
}

.market-editor-form .profile-edit-section {
    overflow: hidden;
}

.market-editor-form .fields {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
}

.market-editor-title-field,
.market-editor-type-field,
.market-editor-price-field,
.market-editor-image-field,
.market-editor-description-field {
    align-self: start;
}

.market-editor-title-field {
    grid-column: 1 / -1;
}

.market-editor-type-field {
    grid-column: 1;
}

.market-editor-price-field {
    grid-column: 2;
}

.market-editor-description-field textarea {
    min-height: calc(13rem * var(--ui-box-scale));
}

.market-editor-modal {
    max-width: calc(100vw - 1rem);
    width: min(96vw, 112rem);
}

.market-editor-modal-card {
    display: grid;
    gap: 1rem;
}

.market-editor-modal .section-heading {
    align-items: start;
    display: grid;
    gap: 0.45rem;
}

.market-editor-modal .section-heading > div {
    min-width: 0;
}

.market-editor-modal .section-heading h2,
.market-editor-modal .section-heading .hero-text {
    margin: 0;
}

.market-editor-dropzone {
    align-content: center;
    box-sizing: border-box;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    max-width: 100%;
    min-height: auto;
    overflow: hidden;
    padding: 3.15rem 0.7rem 0.7rem;
    position: relative;
    text-align: center;
    width: 100%;
}

.market-image-rotate-button {
    align-items: center;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: calc(1.05rem * var(--ui-font-scale));
    font-weight: 800;
    height: calc(2.5rem * var(--ui-box-scale));
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 0.85rem;
    top: 0.85rem;
    width: calc(2.5rem * var(--ui-box-scale));
    z-index: 2;
}

.market-image-rotate-button:hover,
.market-image-rotate-button:focus-visible {
    background: rgba(15, 23, 42, 0.9);
    outline: none;
}

.market-image-shell {
    background: rgba(247, 250, 248, 0.94);
    overflow: hidden;
    position: relative;
}

.market-image-shell img {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    transform: rotate(var(--market-image-rotation, 0deg));
    transform-origin: center center;
    width: 100%;
}

.market-image-shell--quarter-turn img {
    object-fit: contain;
}

.market-editor-dropzone .news-editor-current-image {
    align-items: center;
    display: grid;
    justify-items: center;
    margin-inline: auto;
    max-width: 100%;
    width: 100%;
}

.market-editor-dropzone .news-editor-image-placeholder {
    align-items: center;
    aspect-ratio: 16 / 9;
    display: grid;
    justify-items: center;
    margin-inline: auto;
    max-width: min(100%, 11rem);
    padding: 0.75rem;
    text-align: center;
    width: min(100%, 11rem);
}

.market-editor-dropzone .dropzone-label {
    font-size: calc(0.94rem * var(--ui-font-scale));
    text-align: center;
}

.market-editor-dropzone .dropzone-subtext {
    font-size: calc(0.82rem * var(--ui-font-scale));
    line-height: 1.35;
    max-width: 12rem;
    text-align: center;
}

.market-editor-preview-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    justify-items: center;
    width: 100%;
}

.market-editor-preview-item {
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(var(--radius) - 0.25rem);
    overflow: hidden;
    aspect-ratio: 1;
    width: 100%;
}

.market-editor-preview-remove {
    align-items: center;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: calc(0.95rem * var(--ui-font-scale));
    font-weight: 800;
    height: calc(2rem * var(--ui-box-scale));
    justify-content: center;
    left: 0.45rem;
    padding: 0;
    position: absolute;
    top: 0.45rem;
    width: calc(2rem * var(--ui-box-scale));
    z-index: 2;
}

.market-editor-preview-remove:hover,
.market-editor-preview-remove:focus-visible {
    background: rgba(15, 23, 42, 0.92);
    outline: none;
}

.market-editor-preview-image {
    border-radius: inherit;
}

.market-price-input-shell {
    align-items: center;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
}

.market-price-prefix {
    color: var(--accent-deep);
    font-size: calc(1.05rem * var(--ui-font-scale));
    font-weight: 800;
    margin-right: 0.6rem;
}

.market-editor-price-field input[type="number"] {
    padding-left: 1rem;
    padding-right: 1rem;
}

.market-editor-panel .news-editor-upload-actions,
.market-editor-panel .upload-action-row,
.market-editor-modal .news-editor-upload-actions,
.market-editor-modal .upload-action-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.market-editor-panel .upload-trigger,
.market-editor-panel .news-editor-upload-trigger,
.market-editor-modal .upload-trigger,
.market-editor-modal .news-editor-upload-trigger,
.market-image-trigger {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    height: calc(3.05rem * var(--ui-box-scale));
    justify-content: center;
    line-height: 1;
    min-height: calc(3.05rem * var(--ui-box-scale));
    padding-block: 0;
    padding-inline: 1.35rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.market-editor-panel .upload-trigger > span,
.market-editor-panel .news-editor-upload-trigger > span,
.market-editor-modal .upload-trigger > span,
.market-editor-modal .news-editor-upload-trigger > span,
.market-image-trigger > span {
    display: block;
    line-height: 1;
    text-align: center;
    width: 100%;
}

.market-image-trigger {
    min-width: clamp(11rem, calc(13rem * var(--ui-box-scale)), 16rem);
}

.market-card-price {
    color: var(--accent-deep);
    font-size: calc(1.08rem * var(--ui-font-scale));
    font-weight: 800;
}

@media screen and (max-width: 820px) {
    .market-filter-form {
        grid-template-columns: 1fr;
    }

    .market-filter-actions {
        justify-content: stretch;
    }

    .market-filter-actions .button {
        flex: 1 1 0%;
    }

    .market-editor-form .fields {
        grid-template-columns: 1fr;
    }

    .market-editor-title-field,
    .market-editor-type-field,
    .market-editor-price-field {
        grid-column: auto;
    }
}

.market-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    min-width: 0;
}

.market-grid > .empty-state {
    grid-column: 1 / -1;
}

.market-load-more {
    color: var(--muted);
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.15rem;
}

.market-scroll-sentinel {
    height: 1px;
    width: 100%;
}

.market-card {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
    padding: var(--ui-card-padding);
}

.market-card-media {
    background: rgba(244, 249, 246, 0.94);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(var(--radius) - 0.1rem);
    display: grid;
    gap: 0.6rem;
    min-height: calc(14rem * var(--ui-box-scale));
    overflow: hidden;
    padding: 0.65rem;
    position: relative;
}

.market-card-media-overlay {
    left: 0.75rem;
    position: absolute;
    top: 0.75rem;
    z-index: 3;
}

.market-card-media-overlay .button {
    min-height: calc(2.45rem * var(--ui-box-scale));
    padding-inline: 1rem;
}

.market-card-media-button {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: grid;
    gap: 0.6rem;
    padding: 0;
    text-align: left;
    width: 100%;
}

.market-card-media-button:focus-visible {
    outline: 2px solid rgba(31, 111, 75, 0.35);
    outline-offset: 0.15rem;
}

.market-card-media-primary,
.market-card-image-placeholder {
    display: block;
    width: 100%;
}

.market-card-media-primary {
    border-radius: calc(var(--radius) - 0.35rem);
}

.market-card-media-primary-shell {
    aspect-ratio: 16 / 10;
    border-radius: calc(var(--radius) - 0.35rem);
    width: 100%;
}

.market-card-image-placeholder {
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(66, 165, 245, 0.14), transparent 42%),
        radial-gradient(circle at bottom right, rgba(31, 111, 75, 0.14), transparent 46%),
        rgba(247, 250, 248, 0.94);
    color: rgba(36, 43, 39, 0.6);
    display: grid;
    font-size: calc(0.95rem * var(--ui-font-scale));
    justify-items: center;
    padding: 1rem;
    text-align: center;
}

.market-card-media-count {
    background: rgba(2, 6, 23, 0.72);
    border-radius: 999px;
    color: #fff;
    font-size: calc(0.74rem * var(--ui-font-scale));
    font-weight: 700;
    justify-self: start;
    margin-top: -3.1rem;
    padding: 0.35rem 0.7rem;
    position: relative;
    z-index: 1;
}

.market-card-gallery-strip {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.market-card-gallery-more {
    aspect-ratio: 1;
    border-radius: calc(var(--radius) - 0.35rem);
    display: block;
    width: 100%;
}

.market-card-gallery-thumb {
    aspect-ratio: 1;
    border-radius: calc(var(--radius) - 0.35rem);
}

.market-card-gallery-image {
    border-radius: inherit;
}

.market-card-gallery-more {
    align-items: center;
    background: rgba(31, 111, 75, 0.12);
    border: 1px solid rgba(31, 111, 75, 0.14);
    color: var(--accent-deep);
    display: grid;
    font-size: calc(0.9rem * var(--ui-font-scale));
    font-weight: 800;
    justify-items: center;
}

.market-card-copy {
    display: grid;
    gap: 0.6rem;
    min-width: 0;
}

.market-card-copy h3,
.market-card-copy p {
    margin: 0;
    overflow-wrap: anywhere;
}

.market-card-type-badge {
    align-items: center;
    border: 1px solid rgba(31, 111, 75, 0.18);
    border-radius: 999px;
    color: var(--accent-deep);
    display: inline-flex;
    font-size: calc(0.7rem * var(--ui-font-scale));
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.12em;
    margin-bottom: 0.45rem;
    padding: 0.35rem 0.8rem;
    text-transform: uppercase;
}

.market-card-type-badge--wanted {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
    color: #9a5a00;
}

.market-card-type-badge--sell {
    background: rgba(31, 111, 75, 0.1);
}

.market-card-copy h3 {
    font-size: calc(1.08rem * var(--ui-font-scale));
}

.market-card-meta {
    color: rgba(36, 43, 39, 0.62);
    font-size: calc(0.82rem * var(--ui-font-scale));
}

.market-card-actions {
    align-items: stretch;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr);
}

.market-card-actions.is-owner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-card-actions .button,
.market-card-actions form {
    width: 100%;
}

.market-card-actions form {
    margin: 0;
    min-width: 0;
}

.market-card-actions .button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1.2;
    min-height: calc(3.05rem * var(--ui-box-scale));
    text-align: center;
}

.market-gallery-modal {
    max-width: min(100vw - 2rem, 58rem);
    width: min(100vw - 2rem, 58rem);
}

.market-gallery-card {
    display: grid;
    gap: 1rem;
}

.market-gallery-main {
    aspect-ratio: 16 / 10;
    border-radius: calc(var(--radius) - 0.1rem);
    width: 100%;
}

.market-gallery-main-image {
    width: 100%;
}

.market-gallery-caption {
    color: var(--text-muted);
    margin: 0;
}

.market-gallery-thumbs {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(5.25rem, 1fr));
}

.market-gallery-thumb {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.market-gallery-thumb-shell {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: calc(var(--radius) - 0.2rem);
    width: 100%;
}

.market-gallery-thumb.is-active .market-gallery-thumb-shell {
    border-color: var(--accent-deep);
    box-shadow: 0 0 0 0.15rem rgba(31, 111, 75, 0.12);
}

.market-gallery-thumb-image {
    border-radius: inherit;
    width: 100%;
}

.market-connect-button {
    min-height: calc(3.05rem * var(--ui-box-scale));
}

.market-editor-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.market-editor-actions li {
    margin: 0;
}

.market-editor-actions .button {
    min-width: clamp(11rem, calc(14rem * var(--ui-box-scale)), 17rem);
}

.market-editor-delete-form {
    margin: 0;
}

#market-editor-submit-label {
    margin-top: 0;
}

.downloads-modal {
    max-width: calc(100vw - 1rem);
    width: min(92vw, 64rem);
}

.downloads-modal-card {
    display: grid;
    gap: 1rem;
}

.community-switch-modal {
    max-width: min(100%, 72rem);
}

.community-switch-form {
    display: grid;
    gap: 0.85rem;
}

.community-switch-history {
    display: grid;
    gap: 0.7rem;
}

.community-switch-history-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14rem;
    margin: 0;
    text-transform: uppercase;
}

.community-switch-history-list {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.community-switch-history-empty {
    margin: 0;
}

.community-switch-history-item {
    position: relative;
}

.community-switch-history-open {
    align-items: stretch;
    aspect-ratio: 1 / 1;
    background: color-mix(in srgb, var(--panel) 88%, white 12%);
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: 1.1rem;
    color: inherit;
    cursor: pointer;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    padding: 0;
    text-align: center;
    width: 100%;
}

.community-switch-history-open:hover,
.community-switch-history-open:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 55%, white 45%);
    box-shadow: 0 1rem 2rem rgba(10, 18, 38, 0.14);
}

.community-switch-history-item.is-current .community-switch-history-open {
    background: color-mix(in srgb, var(--panel) 90%, white 10%);
    border-color: color-mix(in srgb, var(--accent) 60%, white 40%);
    box-shadow: 0 0 0 0.12rem color-mix(in srgb, var(--accent) 18%, transparent);
}

.community-switch-history-media {
    inset: 0;
    overflow: hidden;
    position: absolute;
}

.community-switch-history-media::after {
    background: linear-gradient(180deg, rgba(7, 11, 19, 0.06) 0%, rgba(7, 11, 19, 0.7) 100%);
    content: "";
    inset: 0;
    position: absolute;
}

.community-switch-history-logo {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.community-switch-history-copy {
    align-content: end;
    align-items: center;
    display: grid;
    gap: 0.4rem;
    inset: 0;
    justify-items: center;
    padding: 1rem 0.9rem 0.95rem;
    position: relative;
    z-index: 1;
}

.community-switch-history-name {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
    text-shadow: 0 0.18rem 0.6rem rgba(0, 0, 0, 0.55);
}

.community-switch-history-host {
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    text-align: center;
}

.community-switch-history-current-badge {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    color: color-mix(in srgb, var(--accent-deep) 78%, black);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05rem;
    padding: 0.2rem 0.58rem;
    text-transform: uppercase;
}

.community-switch-history-remove {
    align-items: center;
    background: #c83c4f;
    border: none;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 800;
    height: 1.7rem;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 0.55rem;
    top: 0.55rem;
    width: 1.7rem;
    z-index: 2;
}

.community-switch-history-remove:hover,
.community-switch-history-remove:focus-visible {
    background: #ab273a;
}

.community-switch-current,
.community-switch-preview {
    margin: 0;
}

.community-switch-preview {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.community-switch-form .chat-request-actions {
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.community-switch-remove-confirm-modal {
    max-width: min(100%, 28rem);
}

@media screen and (max-width: 1100px) {
    .community-switch-history-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 820px) {
    .community-switch-modal {
        max-width: min(100%, 52rem);
    }

    .community-switch-history-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 560px) {
    .community-switch-history-list {
        grid-template-columns: 1fr;
    }
}

.downloads-grid {
    display: grid;
    gap: 1rem;
}

.downloads-item {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
}

.downloads-item-copy,
.downloads-item-copy h3,
.downloads-item-copy p {
    margin: 0;
}

.downloads-item-copy {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.downloads-item-copy p {
    color: var(--text-muted);
}

.downloads-item-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.downloads-item-actions--stacked {
    align-items: stretch;
    flex-direction: column;
}

.downloads-item-actions .button {
    min-height: calc(3.05rem * var(--ui-box-scale));
    min-width: 13.5rem;
}

@media screen and (max-width: 820px) {
    .downloads-item {
        grid-template-columns: 1fr;
    }

    .downloads-item-actions {
        justify-content: stretch;
    }

    .downloads-item-actions .button {
        min-width: 0;
        width: 100%;
    }
}

.auth-form-card {
    margin: 1.5rem 0 0;
}

.switch-link {
    margin: 0.85rem 0 0;
    text-align: center;
}

.auth-form-card .switch-link {
    margin-top: 0.45rem;
}

.auth-support-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.15rem;
}

.auth-reset-panel {
    margin-inline: auto;
    max-width: min(100%, 42rem);
}

.auth-form-card .actions {
    margin-bottom: 0.75rem;
}

.auth-form-card .login-actions {
    justify-content: center;
    margin-bottom: 0;
}

.auth-form-card .login-actions li:first-child {
    padding-left: 0;
}

.auth-form-card .login-actions .button {
    min-width: 12rem;
}

.auth-form-card .field,
.profile-edit-section .field {
    align-content: start;
    display: grid;
    gap: 0.35rem;
}

.auth-form-card .field label,
.profile-edit-section .field label {
    line-height: 1.2;
    margin: 0;
}

#profile-password-modal .modal-panel {
    max-width: min(100%, 34rem);
}

.profile-password-form {
    display: grid;
    gap: 0.9rem;
}

.profile-password-form .actions {
    margin-top: 0.35rem;
}

.profile-form-panel input[type="number"] {
    padding-left: 1rem;
    padding-right: 2.75rem;
    text-align: left;
}

.upload-field-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.upload-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.profile-photo-actions {
    justify-content: center;
    margin-top: 0.85rem;
}

.upload-trigger {
    cursor: pointer;
    min-width: 12rem;
    text-align: center;
}

.section-heading,
.member-heading,
.profile-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.discover-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    min-width: min(42rem, 100%);
}

.discover-search-input {
    flex: 1 1 18rem;
    margin: 0;
    min-width: min(18rem, 100%);
    width: min(28rem, 100%);
}

.discover-filter-select {
    flex: 0 0 12rem;
    margin: 0;
    min-width: 12rem;
}

.discover-toggle {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 0.65rem;
    min-height: 2.8rem;
}

.discover-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.discover-toggle-slider {
    background: rgba(148, 163, 184, 0.36);
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.55rem;
    position: relative;
    transition: background 140ms ease, border-color 140ms ease;
    width: 2.8rem;
}

.discover-toggle-slider::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0.2rem 0.55rem rgba(15, 23, 42, 0.2);
    content: "";
    height: 1.15rem;
    left: 0.16rem;
    position: absolute;
    top: 0.14rem;
    transition: transform 140ms ease;
    width: 1.15rem;
}

.discover-toggle input:checked + .discover-toggle-slider {
    background: rgba(34, 197, 94, 0.28);
    border-color: rgba(34, 197, 94, 0.45);
}

.discover-toggle input:checked + .discover-toggle-slider::after {
    transform: translateX(1.18rem);
}

.discover-toggle-copy {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.page-shell {
    display: grid;
    gap: 1.5rem;
    padding-top: 1rem;
}

.whiteboards-page .page-shell {
    height: calc(100dvh - 1.5rem);
    min-height: 0;
    overflow: hidden;
    padding-top: 0;
}

.notes-page .page-shell {
    height: calc(100dvh - 1.5rem);
    min-height: 0;
    overflow: hidden;
    padding-top: 0;
}

.ai-chat-page .page-shell {
    height: calc(100dvh - 1.5rem);
    min-height: 0;
    overflow: hidden;
    padding-top: 0;
}

.ai-chat-page-shell {
    min-height: 0;
}

.ai-chat-panel {
    display: grid;
    gap: 1rem;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    margin-top: 0;
    min-height: 0;
    overflow: hidden;
}

.ai-chat-heading {
    align-items: center;
    gap: 1rem;
}

.ai-chat-thread {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, transparent) 0%, color-mix(in srgb, var(--surface) 96%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--border) 82%, white 18%);
    border-radius: calc(var(--radius) * 1.05);
    display: grid;
    gap: 0.85rem;
    min-height: 18rem;
    min-width: 0;
    overflow-y: auto;
    padding: 1rem;
}

.ai-chat-empty {
    margin: auto;
    max-width: 28rem;
    text-align: center;
}

.ai-chat-message {
    background: color-mix(in srgb, var(--panel) 92%, white 8%);
    border: 1px solid color-mix(in srgb, var(--border) 80%, white 20%);
    border-radius: 1.1rem;
    box-shadow: 0 0.8rem 1.8rem rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 0.45rem;
    max-width: min(44rem, 100%);
    padding: 0.95rem 1rem;
}

.ai-chat-message.is-user {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-strong) 18%, white 82%) 0%, color-mix(in srgb, var(--accent) 12%, white 88%) 100%);
    justify-self: end;
}

.ai-chat-message.is-assistant {
    justify-self: start;
}

.ai-chat-message-role {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0;
    text-transform: uppercase;
}

.ai-chat-message-body {
    color: var(--text);
    line-height: 1.55;
    word-break: break-word;
}

.ai-chat-message-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.15rem;
}

.ai-chat-speak-button {
    min-width: 6.5rem;
}

.ai-chat-speak-button.is-active {
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--accent) 24%, transparent);
}

.ai-chat-form {
    display: grid;
    gap: 0.55rem;
    min-height: 0;
}

.ai-chat-input {
    min-height: 4.25rem;
    max-height: 10rem;
    resize: vertical;
}

.ai-chat-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.ai-chat-status {
    margin: 0;
}

.ai-chat-status.is-error {
    color: #b91c1c;
}

.dashboard-hero {
    align-items: center;
    display: grid;
    gap: calc(0.55rem * var(--ui-box-scale)) calc(1rem * var(--ui-box-scale));
    grid-template-columns: minmax(0, 1fr) auto;
    padding: calc(0.7rem * var(--ui-box-scale)) calc(1rem * var(--ui-box-scale));
}

.dashboard-hero-copy {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.dashboard-hero .eyebrow,
.dashboard-hero h1,
.dashboard-hero .hero-text,
.dashboard-hero .actions {
    margin: 0;
}

.dashboard-hero h1 {
    line-height: 1.05;
}

.dashboard-hero .hero-text {
    max-width: 44rem;
}

.dashboard-hero .actions {
    list-style: none;
    padding: 0;
}

.dashboard-hero-logo-wrap {
    display: flex;
    justify-content: center;
}

.dashboard-hero-logo {
    display: block;
    height: auto;
    max-width: min(7rem, 12vw);
    object-fit: contain;
    width: 100%;
}

.guest-landing-panel {
    align-items: start;
    justify-items: stretch;
    min-height: 0;
}

.guest-landing-copy {
    align-content: start;
    gap: 0.45rem;
}

.guest-landing-logo-wrap {
    justify-content: center;
}

.guest-landing-logo {
    max-width: min(16rem, 42vw);
}

.guest-landing-shell {
    align-content: start;
    gap: 1rem;
}

.guest-branding-panel {
    align-items: center;
    aspect-ratio: 16 / 5;
    background:
        radial-gradient(circle at top left, rgba(25, 143, 114, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 242, 236, 0.96));
    display: flex;
    justify-content: center;
    min-height: clamp(10rem, 28vw, 16rem);
    overflow: hidden;
    padding: 0;
    position: relative;
}

.guest-branding-image {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.profile-grid {
    grid-template-columns: minmax(290px, 0.78fr) minmax(0, 1.22fr);
    align-items: start;
}

.profile-panel,
.profile-form-panel {
    align-self: start;
}

.members-grid {
    align-items: stretch;
    display: grid;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--ui-member-card-min)), 1fr));
    gap: var(--ui-grid-gap);
    margin-top: 1.25rem;
}

.discover-load-more {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.85rem 0;
    text-align: center;
}

.discover-scroll-sentinel {
    height: 1px;
    width: 100%;
}

.member-card-shell {
    height: 100%;
    min-width: 0;
}

.member-card {
    contain: layout paint style;
    display: grid;
    gap: var(--ui-card-gap);
    grid-template-rows: auto 1fr auto;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    padding: var(--ui-card-padding);
}

.member-card > * {
    min-width: 0;
}

.member-card-media {
    aspect-ratio: 1 / 1;
    border-radius: var(--ui-card-radius);
    background: rgba(205, 92, 63, 0.08);
    contain: layout paint;
    overflow: hidden;
    width: 100%;
}

.member-card-media-trigger {
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: 0;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    display: block;
    font-size: 0;
    height: auto !important;
    line-height: 0;
    margin: 0;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    transition: box-shadow 140ms ease;
    width: 100%;
}

.member-presence-dot {
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    height: 0.95rem;
    position: absolute;
    right: 0.6rem;
    top: 0.6rem;
    width: 0.95rem;
    z-index: 2;
}

.member-presence-dot.is-online,
.member-presence-dot.is-open {
    background: #22c55e;
    box-shadow: 0 0 0.8rem rgba(34, 197, 94, 0.38);
}

.member-presence-dot.is-in-call {
    background: #2563eb;
    box-shadow: 0 0 0.8rem rgba(37, 99, 235, 0.34);
}

.member-presence-dot.is-dnd {
    background: #d97706;
    box-shadow: 0 0 0.8rem rgba(217, 119, 6, 0.3);
}

.member-presence-dot.is-offline {
    background: #ef4444;
    box-shadow: 0 0 0.8rem rgba(239, 68, 68, 0.28);
}

.member-card-media-trigger:hover,
.member-card-media-trigger:focus-visible {
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.16);
}

.member-card-media-trigger:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 45%, white);
    outline-offset: 0.18rem;
}

.member-photo,
.profile-summary-photo,
.profile-photo-preview img,
.photo-tile img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.default-profile-logo {
    background: rgba(255, 255, 255, 0.92);
    box-sizing: border-box;
    object-fit: contain;
    padding: 0.85rem;
}

.member-card-media .member-photo {
    aspect-ratio: 1 / 1;
    height: auto;
}

.member-location {
    font-size: var(--ui-card-meta-size);
    margin: 0;
    overflow-wrap: anywhere;
}

.member-card h3 {
    font-size: var(--ui-card-heading-size);
    line-height: 1.1;
    margin-bottom: 0.15rem;
    overflow-wrap: anywhere;
}

.member-card-actions {
    display: grid;
    gap: calc(0.45rem * var(--ui-box-scale));
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-card-actions form {
    display: contents;
    margin: 0;
}

.member-detail-trigger {
    margin-top: 0.15rem;
}

.member-card-actions .button {
    align-items: center;
    display: inline-flex;
    font-size: calc(var(--ui-card-action-font-size) * var(--ui-button-font-scale));
    justify-content: center;
    line-height: 1.2;
    min-height: calc(2.7rem * clamp(0.92, var(--ui-box-scale), 1.16));
    min-width: 0;
    overflow: hidden;
    padding: calc(0.6rem * var(--ui-box-scale)) calc(0.5rem * var(--ui-box-scale));
    text-align: center;
    text-overflow: clip;
    text-wrap: balance;
    white-space: normal;
    width: 100%;
}

.member-card-actions .wide {
    width: 100%;
}

.member-card-actions .member-request-pending {
    grid-column: 1 / -1;
}

.member-admin-status {
    color: #b8273f;
    font-size: 0.82rem !important;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0.35rem 0 0;
    text-transform: uppercase;
}

.member-detail-modal {
    width: min(100%, 72rem);
}

.chat-request-modal {
    width: min(100%, 30rem);
}

.upload-limit-modal {
    text-align: center;
    width: min(100%, 32rem);
}

.upload-limit-badge {
    align-items: center;
    background: linear-gradient(135deg, rgba(205, 92, 63, 0.16), rgba(251, 205, 157, 0.4));
    border: 1px solid rgba(205, 92, 63, 0.28);
    border-radius: 999px;
    color: var(--accent-deep);
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0.5rem auto 1rem;
    padding: 0.75rem 1.05rem;
    text-transform: uppercase;
}

.upload-limit-copy {
    margin: 0.75rem auto 0;
    max-width: 26rem;
}

.upload-limit-modal .chat-request-actions {
    justify-content: center;
    margin-top: 1.4rem;
}

.call-ended-popup-backdrop {
    z-index: 42;
}

.call-ended-popup-panel {
    text-align: center;
    width: min(100%, 30rem);
}

.chat-request-person {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    margin: 1rem 0 0.5rem;
}

.chat-request-person strong,
.chat-request-person p {
    margin: 0;
}

.chat-request-avatar {
    align-items: center;
    background: rgba(205, 92, 63, 0.12);
    border-radius: 999px;
    display: flex;
    height: 3.5rem;
    justify-content: center;
    overflow: hidden;
    width: 3.5rem;
}

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

.chat-request-avatar span {
    color: var(--accent-deep);
    font-size: 1.25rem;
    font-weight: 700;
}

.chat-request-actions,
.live-chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.live-chat-actions {
    display: grid;
    gap: 0.75rem;
}

.live-chat-actions-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
}

.live-chat-actions-row-primary {
    justify-content: flex-start;
}

.live-chat-actions-row-secondary {
    justify-content: flex-start;
}

.live-chat-actions-spacer {
    flex: 1 1 auto;
    min-width: 1rem;
}

.call-ended-popup-panel .chat-request-actions {
    justify-content: center;
    margin-top: 1rem;
}

.admin-message-panel {
    max-width: min(100%, 36rem);
}

.admin-message-body {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    margin-top: 1rem;
    min-height: 7.5rem;
    padding: 1rem 1.1rem;
    white-space: pre-wrap;
}

.admin-message-actions {
    justify-content: flex-end;
    margin-top: 1rem;
}

.global-admin-message-panel {
    max-width: min(100%, 42rem);
}

.global-admin-message-body {
    min-height: 6rem;
}

.global-admin-message-thread {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.global-admin-message-thread-list {
    display: grid;
    gap: 0.75rem;
    max-height: 16rem;
    overflow: auto;
    padding-right: 0.3rem;
}

.global-admin-message-form {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.live-chat-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.live-chat-timer-note {
    background: color-mix(in srgb, var(--accent) 18%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
    border-radius: 1rem;
    box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.08);
    color: var(--accent-deep);
    flex: 1 1 16rem;
    margin: 0;
    padding: 0.9rem 1rem;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

#live-chat-remove-timer {
    align-items: center;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 800;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0.9rem 1.3rem;
    text-align: center;
}

#live-chat-remove-timer:not([hidden]) {
    flex: 0 0 auto;
}

#live-chat-remove-timer[disabled] {
    opacity: 0.8;
}

#live-chat-modal {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
}

.live-chat-modal {
    box-sizing: border-box;
    border-radius: 0;
    display: grid;
    gap: 0;
    grid-template-columns:
        var(--live-chat-dock-splitter-width)
        minmax(16rem, var(--chat-friend-sidebar-width))
        var(--chat-friend-splitter-width)
        minmax(0, 1fr);
    height: 100vh;
    margin: 0 0 0 auto;
    max-width: var(--live-chat-dock-width);
    min-width: 0;
    overflow: hidden;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    width: var(--live-chat-dock-width);
}

.live-chat-modal.has-conference-open {
    grid-template-columns:
        0
        minmax(20rem, var(--conference-dock-width))
        var(--conference-dock-splitter-width)
        minmax(0, 1fr);
}

.live-chat-modal:not(.live-chat-page-panel).has-conference-open {
    max-width: min(96vw, 110rem);
    width: min(96vw, 110rem);
}

.live-chat-page-panel {
    background: var(--panel);
    border: var(--panel-border-width) solid var(--line);
    border-radius: var(--ui-panel-radius);
    box-shadow: var(--panel-shadow);
    height: calc(100vh - 1.5rem);
    margin: 0 0 0 auto;
    max-width: none;
    transform: none;
    width: 100%;
}

.chat-page .live-chat-page-panel {
    margin: 0;
    max-width: none;
    width: 100%;
}

@media screen and (min-width: 821px) {
    .chat-page .live-chat-page-panel.has-conference-open {
        height: 100vh;
        inset: 0;
        margin: 0;
        max-height: 100vh;
        max-width: none;
        min-width: 0;
        overflow: visible;
        padding: 0;
        position: fixed;
        width: 100vw;
        z-index: 40;
    }

    .chat-page .live-chat-page-panel.has-conference-open .conference-dock {
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
        align-self: stretch;
        inset: 0 auto 0 0;
        grid-template-rows: minmax(0, 1fr);
        min-height: 100vh;
        position: fixed;
        width: var(--conference-dock-width);
        z-index: 41;
    }

    .chat-page .live-chat-page-panel.has-conference-open .conference-dock-header {
        display: none;
    }

    .chat-page .live-chat-page-panel.has-conference-open .conference-dock-frame {
        grid-row: 1;
        height: 100vh;
    }

    .chat-page .live-chat-page-panel.has-conference-open .conference-dock-splitter {
        bottom: 0;
        display: flex;
        left: var(--conference-dock-width);
        position: fixed;
        top: 0;
        width: var(--conference-dock-splitter-width);
        z-index: 42;
    }

    .chat-page .live-chat-page-panel.has-conference-open .live-chat-main {
        background: var(--panel);
        border-left: var(--panel-border-width) solid var(--line);
        bottom: 0;
        box-shadow: var(--panel-shadow);
        grid-column: auto;
        left: calc(var(--conference-dock-width) + var(--conference-dock-splitter-width));
        min-height: 100vh;
        position: fixed;
        right: 0;
        top: 0;
        z-index: 41;
    }
}

#live-chat-modal.is-open .live-chat-modal {
    transform: translateX(0);
}

.live-chat-dock-splitter {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    cursor: col-resize;
    display: flex;
    justify-content: center;
    min-width: 0;
    opacity: 0;
    pointer-events: none;
    touch-action: none;
    transition: background 0.2s ease, opacity 0.2s ease;
    user-select: none;
}

.live-chat-dock-splitter.is-active {
    opacity: 1;
    pointer-events: auto;
}

.live-chat-dock-splitter:hover,
.live-chat-dock-splitter.is-dragging {
    background: rgba(205, 92, 63, 0.14);
}

.live-chat-dock-splitter-handle {
    background: rgba(45, 33, 28, 0.46);
    border-radius: 999px;
    box-shadow: 0 0.45rem 1.2rem rgba(45, 33, 28, 0.18);
    display: block;
    height: 6rem;
    width: 0.28rem;
}

.conference-dock {
    background:
        radial-gradient(circle at top left, rgba(32, 185, 158, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(8, 17, 31, 0.98), rgba(7, 13, 24, 0.98));
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    grid-column: 2;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: relative;
    transform: translateX(1.2rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.conference-dock.is-open {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.conference-dock-splitter {
    align-items: center;
    background: rgba(248, 250, 252, 0.04);
    cursor: col-resize;
    display: none;
    grid-column: 3;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    touch-action: none;
    transition: opacity 0.2s ease, background 0.2s ease;
    width: var(--conference-dock-splitter-width);
}

.conference-dock-splitter.is-active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.conference-dock-splitter:hover,
.conference-dock-splitter.is-dragging {
    background: rgba(248, 250, 252, 0.06);
}

.conference-dock-splitter-handle {
    background: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    box-shadow: 0 0.45rem 1.2rem rgba(15, 23, 42, 0.28);
    display: block;
    height: 6rem;
    width: 0.32rem;
}

body.is-resizing-conference-dock,
body.is-resizing-conference-dock * {
    cursor: col-resize !important;
    user-select: none !important;
}

body.is-resizing-conference-dock .conference-dock-frame {
    pointer-events: none !important;
}

.conference-dock-header {
    align-items: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-width: 0;
    padding: 1rem 1.15rem 0.9rem;
}

.conference-dock-header .eyebrow {
    color: rgba(190, 243, 231, 0.86);
    margin: 0 0 0.3rem;
}

.conference-dock-header h2 {
    color: #f8fafc;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
    margin: 0;
}

.conference-dock-header-actions {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.6rem;
}

.conference-dock-detach {
    min-width: 0;
    white-space: nowrap;
}

.conference-dock-close {
    flex: 0 0 auto;
    position: static;
}

.conference-dock-frame {
    background: #020617;
    border: 0;
    display: block;
    height: 100%;
    min-height: 0;
    width: 100%;
}

.whiteboard-dock {
    background:
        radial-gradient(circle at top left, rgba(32, 185, 158, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(246, 251, 250, 0.98), rgba(231, 241, 239, 0.98));
    border-right: 1px solid rgba(25, 143, 114, 0.14);
    bottom: 0;
    display: grid;
    gap: 0.9rem;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    left: 0;
    opacity: 0;
    padding: 1rem 1.15rem 1.1rem;
    pointer-events: none;
    position: fixed;
    right: var(--live-chat-dock-width);
    top: 0;
    transform: translateX(-1.2rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 31;
}

.whiteboard-dock.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.whiteboard-dock-header {
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
    min-width: 0;
    padding-bottom: 0.7rem;
}

.whiteboard-dock-header .eyebrow {
    margin: 0 0 0.28rem;
}

.whiteboard-dock-header h2 {
    font-size: 1.35rem;
    letter-spacing: 0.01em;
    margin: 0;
}

.whiteboard-dock-copy {
    margin: 0.4rem 0 0;
}

.whiteboard-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: space-between;
}

.whiteboard-palette {
    align-items: center;
    display: flex;
    flex: 1 1 18rem;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.whiteboard-color-swatch {
    appearance: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2)),
        var(--whiteboard-swatch-color, var(--accent));
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    box-shadow: 0 0.65rem 1.2rem rgba(15, 23, 42, 0.14);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.2rem;
    min-height: 2.2rem;
    min-width: 2.2rem;
    padding: 0;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    width: 2.2rem;
}

.whiteboard-color-swatch--custom {
    position: relative;
}

.whiteboard-color-swatch--custom::after {
    color: rgba(15, 23, 42, 0.78);
    content: "+";
    font-size: 1rem;
    font-weight: 800;
    inset: 50% auto auto 50%;
    line-height: 1;
    position: absolute;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
    transform: translate(-50%, -50%);
}

.whiteboard-color-swatch:hover,
.whiteboard-color-swatch:focus-visible {
    box-shadow: 0 0.85rem 1.6rem rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.whiteboard-color-swatch:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 42%, white);
    outline-offset: 0.16rem;
}

.whiteboard-color-swatch.is-active {
    border-color: color-mix(in srgb, var(--accent) 44%, white);
    box-shadow:
        0 0 0 0.18rem color-mix(in srgb, var(--accent) 14%, transparent),
        0 0.85rem 1.6rem rgba(15, 23, 42, 0.2);
    transform: translateY(-1px) scale(1.04);
}

.whiteboard-toolbar-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

.whiteboard-toolbar-actions .button {
    min-height: 3rem;
}

.whiteboard-custom-color-input {
    block-size: 0.01px;
    inline-size: 0.01px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.whiteboard-stage {
    background:
        linear-gradient(transparent 95%, rgba(107, 114, 128, 0.34) 95%),
        linear-gradient(90deg, transparent 95%, rgba(107, 114, 128, 0.34) 95%),
        linear-gradient(180deg, rgba(17, 24, 39, 0.99), rgba(9, 13, 21, 0.99));
    background-size: 3rem 3rem, 3rem 3rem, 100% 100%;
    border: 1px solid rgba(107, 114, 128, 0.42);
    border-radius: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1rem 2rem rgba(15, 23, 42, 0.18);
    min-height: 0;
    overflow: hidden;
    position: relative;
    touch-action: none;
}

.whiteboard-svg {
    cursor: crosshair;
    display: block;
    height: 100%;
    inset: 0;
    position: absolute;
    width: 100%;
}

.whiteboard-stroke {
    vector-effect: non-scaling-stroke;
}

.whiteboard-stroke.is-draft {
    opacity: 0.72;
}

.whiteboard-empty {
    color: rgba(229, 231, 235, 0.82);
    font-size: 1rem;
    left: 50%;
    line-height: 1.5;
    max-width: 20rem;
    pointer-events: none;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translate(-50%, -50%);
}

.whiteboard-status {
    margin: 0;
}

.whiteboard-status[data-state="error"] {
    color: #b8273f;
}

.local-whiteboards-page-grid {
    align-items: stretch;
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
    height: 100%;
    margin-top: 0;
    min-height: 0;
    overflow: hidden;
}

.local-whiteboards-sidebar {
    display: grid;
    gap: 1rem;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    min-height: 0;
}

.local-whiteboards-sidebar-heading,
.local-whiteboards-editor-heading {
    align-items: start;
}

.local-whiteboards-sidebar-copy {
    margin: 0;
}

.local-whiteboard-list {
    display: grid;
    align-content: start;
    gap: 0.7rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.local-whiteboard-list-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: calc(var(--panel-radius) * 0.6);
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    min-height: 5rem;
    padding: 1rem 1.15rem 1.05rem;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    width: 100%;
}

.local-whiteboard-list-item:hover,
.local-whiteboard-list-item:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 30%, rgba(148, 163, 184, 0.22));
    box-shadow: 0 0.9rem 1.6rem rgba(15, 23, 42, 0.09);
    transform: translateY(-1px);
}

.local-whiteboard-list-item.is-active {
    background: color-mix(in srgb, rgba(255, 255, 255, 0.84) 72%, var(--accent-soft));
    border-color: color-mix(in srgb, var(--accent) 42%, rgba(148, 163, 184, 0.22));
    box-shadow: 0 1rem 1.8rem rgba(15, 23, 42, 0.1);
}

.local-whiteboard-list-title {
    display: block;
    font-weight: 700;
    justify-self: center;
    line-height: 1.3;
    text-align: center;
    width: 100%;
    word-break: break-word;
}

.local-whiteboard-list-meta {
    color: var(--muted);
    display: flex;
    font-size: 0.92rem;
    justify-content: center;
    justify-self: stretch;
    text-align: center;
    width: 100%;
}

.local-whiteboards-editor {
    display: grid;
    gap: 1rem;
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
}

.local-whiteboard-title-field {
    margin: 0;
}

.local-whiteboards-editor input[type="text"] {
    width: 100%;
}

.local-whiteboard-toolbar {
    gap: 1rem;
}

.local-whiteboard-toolbar-actions {
    align-items: center;
}

.local-whiteboard-delete-button {
    margin-left: auto;
}

.local-whiteboard-stage {
    --local-whiteboard-grid-size: 48px;
    --local-whiteboard-grid-offset-x: 0px;
    --local-whiteboard-grid-offset-y: 0px;
    background:
        linear-gradient(0deg, rgba(107, 114, 128, 0.32) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 114, 128, 0.32) 1px, transparent 1px),
        linear-gradient(180deg, rgba(17, 24, 39, 0.99), rgba(9, 13, 21, 0.99));
    background-position:
        var(--local-whiteboard-grid-offset-x) var(--local-whiteboard-grid-offset-y),
        var(--local-whiteboard-grid-offset-x) var(--local-whiteboard-grid-offset-y),
        0 0;
    background-size:
        var(--local-whiteboard-grid-size) var(--local-whiteboard-grid-size),
        var(--local-whiteboard-grid-size) var(--local-whiteboard-grid-size),
        100% 100%;
    border: 1px solid rgba(107, 114, 128, 0.38);
    border-radius: calc(var(--panel-radius) * 0.72);
    cursor: crosshair;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
    touch-action: none;
    user-select: none;
}

.local-whiteboard-stage[data-background-mode="light"] {
    background:
        linear-gradient(0deg, rgba(100, 116, 139, 0.24) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 116, 139, 0.24) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(242, 246, 250, 0.99));
    border-color: rgba(100, 116, 139, 0.34);
}

.local-whiteboard-status {
    justify-self: end;
    margin: 0;
    min-height: 1.5rem;
    text-align: right;
}

.local-whiteboard-note {
    margin: 0;
}

.local-whiteboard-empty-list {
    min-height: 12rem;
}

.notes-page-grid {
    align-items: stretch;
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
    height: 100%;
    margin-top: 0;
    min-height: 0;
    overflow: hidden;
}

.notes-sidebar {
    display: grid;
    gap: 1rem;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    min-height: 0;
}

.notes-sidebar-heading,
.notes-editor-heading,
.notes-attachments-heading {
    align-items: start;
}

.notes-editor-heading-actions {
    align-items: end;
    display: grid;
    gap: 0.35rem;
    justify-items: end;
}

.notes-sidebar-copy {
    margin: 0;
}

.notes-list {
    align-content: start;
    display: grid;
    gap: 0.7rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.notes-list-item {
    display: grid;
    gap: 0.7rem;
    justify-items: stretch;
    cursor: grab;
    text-align: left;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.notes-list-item:active {
    cursor: grabbing;
}

.notes-list-item.is-dragging {
    opacity: 0.45;
}

.notes-list-item.is-drop-target {
    border-color: color-mix(in srgb, var(--accent) 42%, rgba(148, 163, 184, 0.24));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
    transform: translateY(-2px);
}

.notes-list-item-top {
    align-items: start;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
}

.notes-list-title {
    justify-self: start;
    text-align: left;
}

.notes-list-drag-label {
    align-self: start;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: right;
    text-transform: uppercase;
}

.notes-list-meta {
    justify-self: start;
    text-align: left;
}

.notes-list-actions {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

.notes-list-actions .button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 3rem;
    min-width: 0;
    padding-inline: 1rem;
    text-align: center;
    white-space: normal;
}

.notes-editor,
.notes-editor-summary {
    align-content: start;
    display: grid;
    gap: 0.8rem;
    grid-template-rows: auto;
    min-height: 0;
}

.notes-autosave-status {
    color: var(--muted);
    font-weight: 700;
    margin: 0;
    text-align: right;
}

.notes-save-button {
    min-width: 10rem;
}

.notes-autosave-status.is-error {
    color: var(--danger-strong);
}

.notes-editor-form {
    align-content: start;
    display: grid;
    gap: 0.85rem;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
    overflow: visible;
}

.notes-editor-top {
    align-content: start;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: minmax(0, 1fr);
}

.notes-title-field,
.notes-body-field,
.notes-importance-field {
    margin: 0;
}

.notes-title-field input,
.notes-body-field textarea {
    width: 100%;
}

.notes-body-field textarea {
    min-height: 11rem;
    resize: none;
}

.notes-attachments-section {
    align-content: start;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    gap: 0.85rem;
    min-height: 0;
    overflow: visible;
    padding-top: 0.85rem;
}

.notes-attachments-section .form-note {
    margin: 0;
}

.notes-attachments-upload-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.notes-attachments-upload-trigger > span {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1;
    width: 100%;
}

.notes-attachments-selection {
    flex: 1 1 14rem;
    min-width: 0;
}

.notes-attachments-list {
    display: grid;
    gap: 0.9rem;
    max-height: 16rem;
    overflow: auto;
    padding-right: 0.15rem;
}

.notes-attachment-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: calc(var(--panel-radius) * 0.55);
    display: grid;
    gap: 0.9rem;
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    padding: 0.9rem 1rem;
}

.notes-attachment-thumb {
    align-items: center;
    background: linear-gradient(180deg, rgba(241, 247, 243, 0.98) 0%, rgba(222, 234, 226, 0.88) 100%);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: 0.95rem;
    display: flex;
    height: 5rem;
    justify-content: center;
    overflow: hidden;
    width: 5rem;
}

.notes-attachment-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.notes-attachment-icon {
    color: var(--accent-strong);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.notes-attachment-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.notes-attachment-copy strong,
.notes-attachment-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-attachment-copy strong {
    white-space: nowrap;
}

.notes-attachment-copy span {
    color: var(--muted);
    font-size: 0.94rem;
    white-space: nowrap;
}

.notes-attachment-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.notes-attachments-empty,
.notes-empty-list {
    min-height: 10rem;
}

.local-whiteboard-bar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 250, 247, 0.92));
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(var(--panel-radius) * 0.72);
    padding: 0.9rem 1rem;
}

.local-whiteboard-tools {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.local-whiteboard-toolbar-toggle {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    gap: 0.7rem;
    font-size: calc(0.95rem * var(--ui-button-font-scale));
    font-weight: 800;
    justify-content: space-between;
    line-height: 1;
    min-height: 2.9rem;
    padding: 0.08rem 0;
    vertical-align: middle;
}

.local-whiteboard-toolbar-toggle .admin-toggle-switch {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
}

.local-whiteboard-toolbar-toggle-copy {
    white-space: nowrap;
}

.local-whiteboard-background-toggle {
    min-width: 15.2rem;
}

.local-whiteboard-grid-toggle {
    min-width: 7.4rem;
}

.local-whiteboard-toolbar-toggle .admin-toggle-switch-track {
    height: 2.65rem;
    width: 4.8rem;
}

.local-whiteboard-toolbar-toggle .admin-toggle-switch-track::after {
    height: 1.95rem;
    width: 1.95rem;
}

.local-whiteboard-toolbar-toggle input:checked + .admin-toggle-switch-track::after {
    transform: translateX(1.9rem);
}

.local-whiteboard-palette {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.local-whiteboard-palette button {
    border-radius: 999px !important;
    box-shadow: 0 0.35rem 0.8rem rgba(15, 23, 42, 0.08);
    height: 2.3rem;
    min-height: 2.3rem;
    min-width: 2.3rem;
    padding: 0;
    width: 2.3rem;
}

.local-whiteboard-mode-group {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.local-whiteboard-mode-group button,
.local-whiteboard-tools > button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 2.7rem;
    padding: 0.68rem 1.05rem;
    text-align: center;
}

.local-whiteboard-mode-group button.is-active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
}

.local-whiteboard-size-control {
    align-items: center;
    display: grid;
    gap: 0.35rem 0.75rem;
    grid-template-columns: auto minmax(10rem, 15rem) auto;
    margin: 0;
}

.local-whiteboard-size-control span,
.local-whiteboard-size-control strong {
    color: var(--text);
    font-size: calc(0.9rem * var(--ui-button-font-scale));
    font-weight: 800;
}

.local-whiteboard-size-control input[type="range"] {
    margin: 0;
    min-width: 10rem;
    width: 100%;
}

.local-whiteboard-canvas {
    cursor: inherit;
    display: block;
    height: 100%;
    inset: 0;
    position: absolute;
    width: 100%;
}

.local-whiteboard-stage.is-dragover {
    box-shadow: inset 0 0 0 2px rgba(26, 143, 114, 0.35);
}

.local-whiteboard-stage.is-panning {
    cursor: grabbing;
}

.local-whiteboard-stage.is-moving {
    cursor: move;
}

.local-whiteboard-empty {
    color: rgba(229, 231, 235, 0.84);
    display: grid;
    font-size: 1.05rem;
    inset: 0;
    line-height: 1.6;
    margin: auto;
    max-width: 34rem;
    padding: 2rem;
    place-items: center;
    pointer-events: none;
    position: absolute;
    text-align: center;
}

.local-whiteboard-stage[data-background-mode="light"] .local-whiteboard-empty {
    color: rgba(15, 23, 42, 0.72);
}

.local-whiteboard-status-inline {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 999px;
    bottom: 1rem;
    color: #fff;
    left: 50%;
    max-width: min(90%, 34rem);
    padding: 0.65rem 1rem;
    position: absolute;
    text-align: center;
    transform: translateX(-50%);
}

.local-whiteboard-status-inline[data-state="error"] {
    background: rgba(159, 45, 45, 0.9);
}

.local-whiteboard-text-modal {
    align-items: center;
    background: rgba(15, 23, 42, 0.52);
    display: grid;
    inset: 0;
    padding: 1.25rem;
    position: fixed;
    z-index: 80;
}

.local-whiteboard-text-panel {
    background: linear-gradient(180deg, rgba(20, 29, 48, 0.98), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    box-sizing: border-box;
    color: #f8fafc;
    display: grid;
    gap: 1rem;
    margin: 0 auto;
    max-width: min(92vw, 56rem);
    padding: 1.5rem;
    width: 100%;
}

.local-whiteboard-text-copy {
    display: grid;
    gap: 0.35rem;
}

.local-whiteboard-text-copy strong {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.local-whiteboard-text-copy span {
    color: rgba(226, 232, 240, 0.86);
    line-height: 1.45;
}

.local-whiteboard-text-form {
    display: grid;
    gap: 1rem;
}

.local-whiteboard-text-form textarea {
    background: rgba(30, 41, 59, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.25rem;
    box-sizing: border-box;
    color: #fff;
    max-width: 100%;
    min-height: 14rem;
    min-width: 0;
    padding: 1rem 1.1rem;
    resize: vertical;
    width: 100%;
}

.local-whiteboard-text-form textarea::placeholder {
    color: rgba(226, 232, 240, 0.58);
}

.local-whiteboard-text-form .conference-whiteboard-text-actions {
    display: flex;
    gap: 0.85rem;
    justify-content: flex-end;
}

.local-whiteboard-text-form .conference-whiteboard-text-actions button {
    min-height: 2.9rem;
    min-width: 9rem;
}

@media (max-width: 980px) {
    .local-whiteboards-page-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

.local-whiteboard-stage {
        min-height: 22rem;
        height: auto;
    }

    .local-whiteboard-status {
        justify-self: start;
        text-align: left;
    }

    .local-whiteboard-size-control {
        grid-template-columns: 1fr;
    }

    .notes-page-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .notes-editor-summary {
        overflow: visible;
    }

    .notes-editor-form {
        grid-template-rows: auto auto auto;
        overflow: visible;
    }

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

    .notes-list-actions {
        grid-template-columns: 1fr;
    }

    .notes-attachment-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .notes-attachment-actions {
        justify-content: start;
    }
}

.chat-friend-sidebar {
    background: rgba(255, 255, 255, 0.5);
    border-right: 1px solid var(--line);
    display: grid;
    gap: 1rem;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0.8rem 1rem 1rem;
    transition: opacity 0.22s ease, transform 0.22s ease, width 0.22s ease, padding 0.22s ease;
}

.chat-friend-splitter {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    cursor: col-resize;
    display: flex;
    justify-content: center;
    min-width: 0;
    touch-action: none;
    transition: background 0.2s ease, opacity 0.2s ease;
    user-select: none;
}

.local-whiteboard-stage[data-background-mode="dark"][data-grid-visible="0"] {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.99), rgba(9, 13, 21, 0.99));
}

.local-whiteboard-stage[data-background-mode="light"][data-grid-visible="0"] {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(242, 246, 250, 0.99));
}

.chat-friend-splitter:hover,
.chat-friend-splitter.is-dragging {
    background: rgba(205, 92, 63, 0.12);
}

.chat-friend-splitter-handle {
    background: rgba(45, 33, 28, 0.4);
    border-radius: 999px;
    box-shadow: 0 0.35rem 0.9rem rgba(45, 33, 28, 0.14);
    display: block;
    height: 4.8rem;
    width: 0.24rem;
}

.chat-friend-sidebar-top {
    display: grid;
    gap: 0.25rem;
}

.chat-friend-sidebar-top h2 {
    display: none !important;
}

.chat-friend-sidebar-heading {
    align-items: start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.chat-friend-sidebar-controls {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.chat-friend-section-label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.25rem 0;
    text-transform: uppercase;
}

.chat-friend-presence-filter {
    font-size: 0.78rem;
    min-height: 2.35rem;
    min-width: 4.9rem;
    padding: 0.45rem 0.8rem;
}

.chat-group-toggle {
    font-size: calc(0.78rem * var(--ui-button-font-scale));
    min-height: 2.35rem;
    min-width: 5.3rem;
    padding: 0.45rem 0.8rem;
}

.chat-group-toggle.is-active {
    background: linear-gradient(135deg, #2d9d68 0%, #1f6f4b 100%);
    border-color: rgba(31, 111, 75, 0.9) !important;
    box-shadow: 0 0.8rem 1.4rem rgba(31, 111, 75, 0.2);
    color: #fff !important;
}

.chat-friend-sidebar-top h2,
.chat-friend-sidebar-top p {
    margin: 0;
}

.chat-friend-list {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.chat-friend-empty {
    color: var(--muted);
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem 0.25rem;
}

.chat-friend-filter-empty {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0 0.25rem;
}

.chat-friend-item {
    align-items: stretch;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid var(--line);
    border-radius: 1rem !important;
    box-sizing: border-box;
    box-shadow: none !important;
    cursor: pointer;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 4.9rem minmax(0, 1fr);
    height: auto !important;
    line-height: 1.2 !important;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0.78rem !important;
    text-align: left;
    width: 100%;
}

.chat-friend-list .chat-friend-item {
    min-height: 6rem !important;
}

.chat-friend-item:hover,
.chat-friend-item:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
    box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.08) !important;
}

.chat-friend-item.is-requesting-chat {
    background: color-mix(in srgb, var(--accent) 14%, white) !important;
    border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--accent) 18%, transparent),
        0 1rem 2rem rgba(0, 0, 0, 0.12) !important;
}

.chat-friend-item-group {
    background: linear-gradient(180deg, rgba(222, 244, 232, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%) !important;
}

.chat-friend-avatar {
    align-items: center;
    align-self: stretch;
    background: rgba(205, 92, 63, 0.12);
    border-radius: 0.9rem;
    display: flex;
    height: auto;
    justify-content: center;
    min-height: 4.9rem;
    overflow: hidden;
    width: 4.9rem;
}

.chat-friend-avatar img {
    display: block;
    height: 100%;
    min-height: 4.9rem;
    object-fit: cover;
    width: 100%;
}

.chat-friend-avatar span {
    color: var(--accent-deep);
    font-size: 1rem;
    font-weight: 800;
}

.chat-friend-item-group .chat-friend-avatar {
    background: linear-gradient(135deg, rgba(45, 157, 104, 0.18) 0%, rgba(31, 111, 75, 0.3) 100%);
}

.chat-friend-item-group .chat-friend-avatar span {
    color: #18563a;
}

.chat-friend-copy {
    align-content: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
    border-radius: 0.95rem;
    display: grid;
    gap: 0.38rem;
    height: auto;
    min-height: 4.15rem;
    min-width: 0;
    padding: 0.55rem 0.7rem;
}

.chat-friend-copy strong,
.chat-friend-copy small,
.chat-friend-presence {
    margin: 0;
}

.chat-friend-copy strong {
    color: var(--text);
    display: -webkit-box;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-wrap: balance;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.chat-friend-copy small {
    color: var(--muted);
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-friend-presence {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid currentColor;
    border-radius: 0.8rem;
    box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.08);
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 0.35rem;
    line-height: 1.2;
    justify-self: start;
    min-height: 1.9rem;
    padding: 0.32rem 0.72rem;
    width: fit-content;
}

.chat-friend-presence.is-online,
.chat-friend-presence.is-open {
    color: #1f8d42;
}

.chat-friend-presence.is-in-call {
    color: #1d4ed8;
}

.chat-friend-presence.is-dnd {
    color: #b45309;
}

.chat-friend-presence.is-offline {
    color: #c94d4d;
}

.chat-friend-presence.is-group {
    color: #1f6f4b;
}

.chat-friend-presence-dot {
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 0.62rem;
    width: 0.62rem;
}

.chat-friend-presence.is-online .chat-friend-presence-dot,
.chat-friend-presence.is-open .chat-friend-presence-dot {
    background: #2bb24c;
    box-shadow: 0 0 0.35rem rgba(43, 178, 76, 0.45);
}

.chat-friend-presence.is-in-call .chat-friend-presence-dot {
    background: #2563eb;
    box-shadow: 0 0 0.35rem rgba(37, 99, 235, 0.35);
}

.chat-friend-presence.is-dnd .chat-friend-presence-dot {
    background: #d97706;
    box-shadow: 0 0 0.35rem rgba(217, 119, 6, 0.28);
}

.chat-friend-presence.is-offline .chat-friend-presence-dot {
    background: #d24d4d;
    box-shadow: 0 0 0.3rem rgba(210, 77, 77, 0.35);
}

.chat-friend-presence.is-group .chat-friend-presence-dot {
    background: #2d9d68;
    box-shadow: 0 0 0.35rem rgba(45, 157, 104, 0.32);
}

.chat-friend-copy small {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.3;
}

.live-chat-main {
    display: grid;
    gap: 0.45rem;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0.3rem 1rem 1rem;
}

.live-chat-header-top {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.6rem;
    margin-bottom: 0;
}

.live-chat-heading-stack {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    flex: 1 1 auto;
}

.live-chat-heading-stack .eyebrow {
    margin: 0;
}

.live-chat-header-top h2 {
    flex: 1 1 auto;
    line-height: 1.05;
    margin: 0;
    min-width: 0;
}

.chat-friend-toggle,
.chat-friend-reopen {
    align-items: center;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-width: 2.5rem;
}

.live-chat-close {
    position: static;
    flex: 0 0 auto;
    right: auto;
    top: auto;
    margin-left: auto;
}

.live-chat-modal.friends-collapsed {
    grid-template-columns: var(--live-chat-dock-splitter-width) 0 0 minmax(0, 1fr);
}

.live-chat-modal.friends-collapsed .chat-friend-sidebar {
    border-right: 0;
    opacity: 0;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
    pointer-events: none;
    transform: translateX(-1rem);
}

.live-chat-modal.friends-collapsed .chat-friend-splitter {
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.live-chat-modal.has-conference-open .chat-friend-sidebar {
    border-right: 0;
    grid-column: 2;
    opacity: 0;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
    pointer-events: none;
    transform: translateX(-1rem);
}

.live-chat-modal.has-conference-open .chat-friend-splitter,
.live-chat-modal.has-conference-open .live-chat-dock-splitter {
    display: none;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.live-chat-modal.has-conference-open .chat-friend-reopen {
    display: none;
}

.live-chat-modal.has-conference-open .live-chat-main {
    grid-column: 4;
}

body.is-resizing-chat-friends,
body.is-resizing-chat-friends * {
    cursor: col-resize !important;
    user-select: none !important;
}

.live-chat-header {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 0.65rem 1.4rem rgba(0, 0, 0, 0.05);
    display: grid;
    gap: 0.2rem;
    padding: 0.35rem 0.8rem 0.55rem;
}

.live-chat-header h2,
.live-chat-header p {
    margin: 0;
}

.live-chat-presence-bar {
    display: grid;
    gap: 0.35rem;
}

.live-chat-presence-label {
    margin: 0;
}

.live-chat-presence-toggle-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    min-width: 0;
}

.live-chat-presence-toggle {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    min-width: 0;
}

.live-chat-presence-option-label {
    color: var(--text-color);
    font-size: calc(0.88rem * var(--ui-button-font-scale));
    font-weight: 700;
    white-space: nowrap;
}

.live-chat-presence-switch {
    align-items: center;
    background: rgba(34, 197, 94, 0.28);
    border: 1px solid rgba(34, 197, 94, 0.45);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.55rem;
    min-height: 1.55rem;
    padding: 0;
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    width: 2.8rem;
}

.live-chat-presence-switch:hover,
.live-chat-presence-switch:focus,
.live-chat-presence-switch:focus-visible {
    border-color: rgba(34, 197, 94, 0.58);
    box-shadow: 0 0.55rem 1.05rem rgba(34, 197, 94, 0.22);
    outline: none;
}

.live-chat-presence-switch-track {
    align-items: center;
    display: block;
    height: 100%;
    position: relative;
    width: 100%;
}

.live-chat-presence-switch-thumb {
    background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.86));
    border-radius: 999px;
    box-shadow: 0 0.2rem 0.55rem rgba(15, 23, 42, 0.2);
    display: block;
    height: 1.15rem;
    left: 0.16rem;
    position: absolute;
    top: 0.14rem;
    transform: translateX(0);
    transition: transform 0.18s ease, background 0.18s ease;
    width: 1.15rem;
}

.live-chat-presence-switch.is-dnd {
    background: color-mix(in srgb, var(--alert) 20%, rgba(23, 31, 54, 0.18));
    border-color: color-mix(in srgb, var(--alert) 55%, rgba(23, 31, 54, 0.16));
}

.live-chat-presence-switch.is-dnd:hover,
.live-chat-presence-switch.is-dnd:focus,
.live-chat-presence-switch.is-dnd:focus-visible {
    border-color: color-mix(in srgb, var(--alert) 70%, rgba(23, 31, 54, 0.16));
    box-shadow: 0 0.55rem 1.05rem color-mix(in srgb, var(--alert) 22%, transparent);
}

.live-chat-presence-switch.is-dnd .live-chat-presence-switch-thumb {
    background: linear-gradient(180deg, #ffd6dd, #ffb3c1);
    transform: translateX(1.18rem);
}

.live-chat-presence-switch:disabled {
    cursor: wait;
    opacity: 0.72;
}

@media screen and (max-width: 900px) {
    .live-chat-presence-toggle-row {
        gap: 0.55rem;
    }
}

@media screen and (max-width: 640px) {
    .news-feed-list {
        column-count: 1;
    }
}

.live-chat-search-box {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 0.45rem;
    justify-content: stretch;
    min-width: 0;
    width: 100%;
}

.live-chat-search-box input {
    flex: 1 1 16rem;
    margin: 0;
    min-height: 2.5rem;
    min-width: 0;
}

.chat-search-jump {
    align-items: center;
    display: inline-flex;
    font-size: 0.95rem;
    justify-content: center;
    min-height: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
}

.chat-search-count {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 2.6rem;
    text-align: center;
}

.live-chat-messages {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    border-radius: 1rem;
    display: grid;
    gap: 0.75rem;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}

.chat-empty-state {
    color: var(--muted);
    margin: 0;
    min-height: 0;
}

.live-chat-form {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    min-width: 0;
}

.live-chat-form.is-drop-target {
    position: relative;
}

.live-chat-form > * {
    min-width: 0;
}

.chat-reply-composer {
    align-items: center;
    background: color-mix(in srgb, var(--accent) 10%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    border-radius: 0.95rem;
    display: flex;
    gap: 0.8rem;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
}

.chat-reply-composer[hidden] {
    display: none;
}

.chat-reply-echo {
    background: color-mix(in srgb, var(--panel, white) 84%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
    border-radius: 0.95rem;
    display: grid;
    gap: 0.18rem;
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
}

.chat-reply-echo[hidden] {
    display: none;
}

.chat-reply-echo-copy {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
}

.chat-reply-echo-author {
    color: var(--accent-deep);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.chat-reply-echo-text {
    color: color-mix(in srgb, var(--text) 82%, var(--muted));
    line-height: 1.35;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-reply-composer-copy {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
}

.chat-reply-composer-author {
    color: var(--accent-deep);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.chat-reply-composer-text {
    color: var(--text);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-reply-cancel {
    flex: 0 0 auto;
}

.chat-composer-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 0;
}

.chat-composer-tools[hidden] {
    display: none;
}

.chat-emoji-picker-shell {
    display: grid;
    gap: 0.35rem;
}

.chat-emoji-picker-shell[hidden] {
    display: none;
}

.chat-emoji-picker-shell .form-note {
    margin: 0;
}

.chat-emoji-picker {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    min-height: 3.6rem;
    padding: 0.7rem 0.9rem;
}

.chat-emoji-picker-inline {
    flex: 0 0 8.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    min-height: 2.75rem;
    min-width: 0;
    padding: 0.35rem 0.7rem;
}

.chat-emoji-picker-icon {
    flex: 0 0 2.9rem;
    width: 2.9rem;
    min-width: 2.9rem;
    min-height: 2.75rem;
    padding: 0.2rem 0.35rem;
    font-size: 1.25rem;
    line-height: 1;
    text-align: center;
}

.chat-inline-emoji-slot {
    display: inline-flex;
    align-items: center;
}

.chat-gif-trigger {
    min-width: 3.5rem;
}

.live-chat-actions .chat-gif-trigger {
    font-size: 0.88rem;
    min-width: 0;
    white-space: nowrap;
}

.live-chat-actions .chat-sound-toggle {
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0 0.1rem;
}

.live-chat-actions .chat-sound-toggle .discover-toggle-copy {
    font-size: 0.8rem;
}

.live-chat-actions .chat-gif-trigger.is-disabled {
    cursor: not-allowed;
    opacity: 0.45;
    pointer-events: none;
}

.live-chat-form textarea {
    box-sizing: border-box;
    display: block;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

#live-chat-input.is-drop-target {
    background: color-mix(in srgb, var(--accent) 10%, white);
    border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.live-chat-actions .button.primary {
    font-size: calc(1.05rem * var(--ui-button-font-scale));
    font-weight: 800;
    min-height: 3rem;
    min-width: 5.5rem;
}

.live-chat-actions .conference-trigger {
    min-height: 3rem;
    min-width: 5.5rem;
}

.live-chat-actions-row-primary > .button[type="submit"] {
    margin-left: auto;
}

.live-chat-actions-row-secondary .chat-inline-emoji-slot {
    display: inline-flex;
    min-width: 0;
}

#live-chat-input:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.chat-message {
    display: grid;
    gap: 0.2rem;
    max-width: 85%;
    min-width: 0;
}

.chat-message-own {
    justify-self: end;
    text-align: left;
}

.chat-message-main {
    align-items: flex-start;
    display: flex;
    gap: 0;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.chat-message-own .chat-message-main {
    justify-content: flex-end;
}

.chat-message-bubble {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    border-radius: 1rem;
    display: grid;
    flex: 0 1 auto;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr);
    max-width: calc(100% - 2.4rem);
    min-width: min(8rem, 100%);
    overflow: hidden;
    padding: 0.95rem 0.85rem 0.7rem;
    transition: transform 0.16s ease;
}

.chat-message-own .chat-message-bubble {
    background: rgba(205, 92, 63, 0.14);
    border-color: rgba(205, 92, 63, 0.24);
    justify-items: start;
    text-align: left;
}

.chat-message.is-swipe-reply-ready .chat-message-bubble {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
}

.chat-message-reply {
    border-left: 0.24rem solid color-mix(in srgb, var(--accent) 56%, transparent);
    display: grid;
    gap: 0.12rem;
    padding-left: 0.7rem;
}

.chat-message-reply-author {
    color: var(--accent-deep);
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.chat-message-reply-text {
    color: color-mix(in srgb, var(--text) 78%, var(--muted));
    font-size: 0.88rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-message-delete {
    align-items: center;
    background: #f4c8d4;
    border: 1px solid #e5a7ba;
    border-radius: 999px;
    color: #8f3550;
    cursor: pointer;
    display: inline-flex;
    font-size: calc(0.7rem * var(--ui-button-font-scale));
    font-weight: 800;
    height: 1.33rem;
    justify-content: center;
    line-height: 1;
    margin-left: -0.54rem;
    margin-top: -0.28rem;
    padding: 0;
    position: static;
    flex: 0 0 auto;
    width: 1.33rem;
    z-index: 1;
}

.chat-message-delete:hover,
.chat-message-delete:focus-visible {
    background: #efb8c8;
    border-color: #d98ea7;
    outline: none;
}

.chat-message-text {
    line-height: 1.45;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    word-break: break-word;
    width: auto;
}

.chat-message-text > * {
    max-width: 100%;
    min-width: 0;
}

.chat-message-link {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.14rem;
    word-break: break-all;
}

.chat-message-link:hover,
.chat-message-link:focus-visible {
    color: var(--accent);
}

.chat-link-preview-slot[hidden] {
    display: none;
}

.chat-link-preview {
    align-items: stretch;
    background: color-mix(in srgb, var(--accent) 8%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
    border-radius: 0.95rem;
    color: inherit;
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 6.6rem) minmax(0, 1fr);
    overflow: hidden;
    text-decoration: none;
}

.chat-message-own .chat-link-preview {
    background: rgba(255, 255, 255, 0.76);
}

.chat-link-preview:hover,
.chat-link-preview:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
    transform: none !important;
}

.chat-link-preview-image-shell {
    background: rgba(255, 255, 255, 0.72);
    display: block;
    min-height: 6.6rem;
    overflow: hidden;
}

.chat-link-preview-image {
    display: block;
    height: 100%;
    min-height: 6.6rem;
    object-fit: cover;
    width: 100%;
}

.chat-link-preview-copy {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.72rem 0.82rem;
}

.chat-link-preview-site,
.chat-link-preview-url {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
}

.chat-link-preview-site {
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.chat-link-preview-title {
    color: var(--text);
    display: -webkit-box;
    font-size: 0.92rem;
    line-height: 1.25;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.chat-link-preview-description {
    color: color-mix(in srgb, var(--text) 76%, var(--muted));
    display: -webkit-box;
    font-size: 0.8rem;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.chat-link-preview-url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .chat-link-preview {
        grid-template-columns: minmax(0, 1fr);
    }

    .chat-link-preview-image-shell,
    .chat-link-preview-image {
        min-height: 8rem;
    }
}

.chat-message.is-search-match .chat-message-bubble {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}

.chat-message.is-active-search-match .chat-message-bubble {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.chat-message-gif-shell {
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0.9rem;
    cursor: zoom-in;
    display: block;
    height: auto !important;
    line-height: 0;
    max-width: min(100%, 18rem);
    min-height: 0 !important;
    overflow: hidden;
    padding: 0;
    transform: none !important;
    width: auto;
}

.chat-message-gif-shell:hover,
.chat-message-gif-shell:focus-visible {
    box-shadow: none !important;
    transform: none !important;
}

.chat-message-gif {
    display: block;
    height: auto;
    max-width: min(100%, 18rem);
    width: 100%;
}

.chat-message-file {
    align-items: center;
    background: color-mix(in srgb, var(--accent) 10%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    border-radius: 0.9rem;
    color: inherit;
    display: flex;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    text-decoration: none;
}

.chat-message-file:hover,
.chat-message-file:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
    transform: none !important;
}

.chat-message-file-icon {
    align-items: center;
    background: color-mix(in srgb, var(--accent) 20%, white);
    border-radius: 0.8rem;
    display: inline-flex;
    flex: 0 0 2.65rem;
    font-size: 1.35rem;
    height: 2.65rem;
    justify-content: center;
    width: 2.65rem;
}

.chat-message-file-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.chat-message-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-message-file-action {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.chat-message-meta {
    color: var(--muted);
    font-size: 0.78rem;
}

.advertiser-shell {
    gap: 1.2rem;
}

.advertiser-auth-grid,
.advertiser-account-grid,
.advertiser-workflow-grid {
    align-items: start;
}

.advertiser-workflow-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.9fr);
}

.advertiser-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.advertiser-card-grid,
.advertiser-audit-log {
    display: grid;
    gap: 1rem;
}

.advertiser-campaign-card,
.advertiser-proof-card,
.advertiser-audit-entry,
.advertiser-invoice-panel {
    gap: 0.7rem;
}

.advertiser-proof-card h3,
.advertiser-proof-card p {
    margin: 0;
}

.advertiser-sidebar-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.campaign-step-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.campaign-stat-row {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.92rem;
}

.moderation-panel {
    background: color-mix(in srgb, var(--accent) 10%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
    border-radius: 1rem;
    padding: 0.9rem 1rem;
}

.wizard-progress {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.wizard-progress li {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    padding: 0.55rem 0.8rem;
    text-align: center;
}

.wizard-progress li.is-active {
    background: color-mix(in srgb, var(--accent) 14%, white);
    border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
    color: var(--ink);
    font-weight: 700;
}

.wizard-progress li.is-complete {
    border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
    color: var(--ink);
}

.advertiser-campaign-sidebar {
    position: sticky;
    top: 6.5rem;
}

.advertiser-campaign-sidebar > * + * {
    margin-top: 1rem;
}

.advertiser-preview-media {
    border-radius: 1rem;
    display: block;
    max-height: 22rem;
    object-fit: cover;
    width: 100%;
}

.advertiser-shell .profile-form-grid .fields {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.advertiser-shell .profile-form-grid .field {
    display: grid;
    gap: 0.35rem;
    grid-column: 1 / -1;
}

.advertiser-shell .profile-form-grid .field.half {
    grid-column: span 2;
}

.advertiser-shell .profile-form-grid .field.quarter {
    grid-column: span 1;
}

.campaign-breakdown-list,
.campaign-summary-list {
    display: grid;
    gap: 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.campaign-breakdown-list li {
    align-items: baseline;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: 0.55rem;
}

.campaign-breakdown-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.campaign-breakdown-list strong,
.campaign-summary-list strong {
    color: var(--ink);
}

.campaign-summary-list li {
    color: var(--muted);
    line-height: 1.5;
}

.invoice-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-pre {
    margin: 0;
    white-space: pre-wrap;
}

.table-wrap {
    overflow-x: auto;
}

.simple-table {
    border-collapse: collapse;
    width: 100%;
}

.simple-table th,
.simple-table td {
    border-bottom: 1px solid var(--line);
    padding: 0.7rem 0.6rem;
    text-align: left;
}

@media screen and (max-width: 980px) {
    .advertiser-workflow-grid,
    .advertiser-stat-grid,
    .wizard-progress {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .advertiser-shell .profile-form-grid .fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 720px) {
    .advertiser-workflow-grid,
    .advertiser-stat-grid,
    .wizard-progress,
    .advertiser-sidebar-stats,
    .advertiser-shell .profile-form-grid .fields {
        grid-template-columns: 1fr;
    }

    .advertiser-shell .profile-form-grid .field.half,
    .advertiser-shell .profile-form-grid .field.quarter {
        grid-column: 1 / -1;
    }
}

#live-chat-status.is-error {
    color: var(--accent-deep);
    font-weight: 700;
}

@media screen and (max-width: 1200px) {
    :root {
        --live-chat-dock-width: min(62vw, 100vw);
        --conference-dock-width: clamp(22rem, 48vw, 48rem);
    }

    .whiteboard-dock {
        right: var(--live-chat-dock-width);
    }

    .live-chat-modal {
        grid-template-columns:
            var(--live-chat-dock-splitter-width)
            minmax(16rem, var(--chat-friend-sidebar-width))
            var(--chat-friend-splitter-width)
            minmax(0, 1fr);
        max-width: var(--live-chat-dock-width);
        width: var(--live-chat-dock-width);
    }
}

@media screen and (max-width: 820px) {
    :root {
        --live-chat-dock-width: 100vw;
    }

    .conference-dock {
        bottom: 0;
        inset: 0;
        left: 0;
        position: fixed;
        right: 0;
        top: 0;
        z-index: 31;
    }

    .whiteboard-dock {
        inset: 0;
        padding: 0.9rem;
        z-index: 31;
    }

    .conference-dock-splitter {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    #live-chat-modal {
        padding: 0;
    }

    .live-chat-modal {
        grid-template-columns: 1fr;
        height: 100vh;
        max-width: 100vw;
        width: 100vw;
    }

    .live-chat-modal.has-conference-open {
        grid-template-columns: 1fr;
        max-width: 100vw;
        width: 100vw;
    }

    .live-chat-page-panel {
        height: calc(100vh - 1rem);
        max-width: 100%;
        width: 100%;
    }

    .live-chat-dock-splitter,
    .chat-friend-splitter {
        display: none;
    }

    .chat-friend-sidebar {
        border-bottom: 1px solid var(--line);
        border-right: 0;
        max-height: 14rem;
    }

    .whiteboard-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .whiteboard-palette,
    .whiteboard-toolbar-actions {
        width: 100%;
    }

    .whiteboard-toolbar-actions .button {
        flex: 1 1 12rem;
    }

    .live-chat-modal.friends-collapsed {
        grid-template-columns: 1fr;
    }

    .live-chat-modal.has-conference-open .conference-dock {
        display: none;
    }

    .live-chat-modal.friends-collapsed .chat-friend-sidebar {
        border-bottom: 0;
        max-height: 0;
        padding-bottom: 0;
        padding-top: 0;
        transform: translateY(-0.5rem);
    }

    .live-chat-modal.has-conference-open .conference-dock.is-open {
        display: grid;
    }

    .live-chat-search-box {
        justify-content: stretch;
        width: 100%;
    }

    .theater-shell {
        grid-template-columns: 1fr;
    }

    .theater-grid {
        max-height: none;
    }

    .theater-player {
        min-height: 16rem;
    }
}

.member-detail-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
    align-items: start;
}

.member-detail-media {
    aspect-ratio: 1 / 1.08;
    background: rgba(205, 92, 63, 0.08);
    border-radius: 1rem;
    overflow: hidden;
}

.theater-shell {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
    align-items: start;
}

.theater-sidebar,
.theater-player-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: 1.35rem;
    box-shadow: 0 1.1rem 2.6rem rgba(0, 0, 0, 0.08);
    padding: 1.2rem;
}

.theater-sidebar {
    display: grid;
    gap: 1rem;
}

.theater-upload-card {
    background: linear-gradient(180deg, rgba(248, 251, 249, 0.96) 0%, rgba(239, 246, 242, 0.92) 100%);
    border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
    border-radius: 1.1rem;
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.theater-upload-heading {
    align-items: start;
    display: flex;
    gap: 0.9rem;
    justify-content: space-between;
}

.theater-upload-heading h3,
.theater-upload-heading p,
.theater-upload-heading span {
    margin: 0;
}

.theater-upload-form {
    display: grid;
    gap: 0.9rem;
}

.theater-dropzone {
    align-items: center;
    background: linear-gradient(180deg, rgba(241, 247, 243, 0.98) 0%, rgba(222, 234, 226, 0.88) 100%);
    border: 1.5px dashed rgba(31, 111, 75, 0.34);
    border-radius: 1.2rem;
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    min-height: 9.5rem;
    padding: 1.35rem;
    text-align: center;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.theater-dropzone:hover,
.theater-dropzone.is-dragover {
    border-color: rgba(31, 111, 75, 0.6);
    box-shadow: 0 1rem 2rem rgba(31, 111, 75, 0.14);
    transform: translateY(-1px);
}

.theater-upload-actions {
    align-items: center;
    justify-content: space-between;
}

.theater-upload-actions .form-note {
    margin: 0;
}

.theater-upload-actions .form-note.is-error {
    color: #8d1f1f;
    font-weight: 700;
}

.theater-upload-progress {
    display: grid;
    gap: 0.55rem;
}

.theater-upload-progress-bar {
    background: rgba(31, 111, 75, 0.12);
    border-radius: 999px;
    height: 0.8rem;
    overflow: hidden;
    width: 100%;
}

.theater-upload-progress-fill {
    background: linear-gradient(135deg, #2d9d68 0%, #1f6f4b 100%);
    border-radius: inherit;
    height: 100%;
    transition: width 0.16s ease;
    width: 0%;
}

.theater-upload-progress-meta {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.theater-upload-progress-meta .form-note {
    margin: 0;
}

.theater-sidebar-copy h2,
.theater-player-header h1,
.theater-sidebar-copy p {
    margin: 0;
}

.theater-grid {
    display: grid;
    gap: 0.85rem;
    max-height: calc(100vh - 13rem);
    overflow-y: auto;
    padding-right: 0.2rem;
}

.theater-tile {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 1rem;
    color: inherit;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 3.2rem minmax(0, 1fr);
    padding: 0.9rem 1rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.theater-tile:hover,
.theater-tile:focus-visible,
.theater-tile.is-active {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    box-shadow: 0 0.9rem 1.8rem rgba(0, 0, 0, 0.08);
    transform: translateY(-0.1rem);
}

.theater-tile-reel {
    align-items: center;
    background: color-mix(in srgb, var(--accent) 16%, white);
    border-radius: 0.9rem;
    display: inline-flex;
    font-size: 1.45rem;
    height: 3.2rem;
    justify-content: center;
    width: 3.2rem;
}

.theater-tile-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.theater-tile-copy strong,
.theater-tile-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theater-tile-copy span,
.theater-player-meta,
.theater-note {
    color: var(--muted);
    font-size: 0.94rem;
}

.theater-player-card {
    display: grid;
    gap: 1rem;
}

.theater-player-header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.theater-player-shell {
    background: #020617;
    border-radius: 1.1rem;
    overflow: hidden;
}

.theater-player {
    background: #000;
    display: block;
    max-height: calc(100vh - 14rem);
    min-height: 24rem;
    width: 100%;
}

.theater-note {
    margin: 0;
}

.shared-media-shell {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(21rem, 28rem) minmax(0, 1fr);
    align-items: start;
}

.shared-media-sidebar,
.shared-media-main,
.shared-media-preview-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: 1.35rem;
    box-shadow: 0 1.1rem 2.6rem rgba(0, 0, 0, 0.08);
}

.shared-media-sidebar {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
}

.shared-media-main {
    padding: 1.2rem;
}

.shared-media-sidebar-copy,
.shared-media-sidebar-copy h2,
.shared-media-sidebar-copy p {
    margin: 0;
}

.shared-media-list {
    display: grid;
    gap: 0.85rem;
    max-height: calc(100vh - 13rem);
    overflow-y: auto;
    padding-right: 0.2rem;
}

.shared-media-tile-shell {
    position: relative;
}

.shared-media-tile {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 1rem;
    color: inherit;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 4.8rem minmax(0, 1fr);
    padding: 0.9rem 1rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shared-media-tile.is-unread {
    border-color: rgba(191, 63, 95, 0.22);
    box-shadow: 0 0 0 1px rgba(191, 63, 95, 0.08);
}

.shared-media-tile:hover,
.shared-media-tile:focus-visible,
.shared-media-tile.is-active {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    box-shadow: 0 0.9rem 1.8rem rgba(0, 0, 0, 0.08);
    transform: translateY(-0.1rem);
}

.shared-media-tile-thumb {
    align-items: center;
    background: linear-gradient(180deg, rgba(241, 247, 243, 0.98) 0%, rgba(222, 234, 226, 0.88) 100%);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: 0.95rem;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    min-height: 4.8rem;
    overflow: hidden;
    position: relative;
}

.shared-media-tile-thumb.has-unread {
    min-height: 5.7rem;
    padding: 0.4rem 0.4rem 1.45rem;
}

.shared-media-tile-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.shared-media-tile-thumb .shared-file-icon {
    border-radius: 0.85rem;
    font-size: 0.92rem;
    min-height: 4rem;
    min-width: 4rem;
}

.shared-media-tile-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.shared-media-tile-shell.has-delete .shared-media-tile-copy {
    padding-right: 2.4rem;
}

.shared-media-tile-copy-top {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    min-width: 0;
}

.shared-media-tile-copy strong,
.shared-media-tile-copy span,
.shared-media-tile-copy small {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shared-media-tile-copy strong {
    font-size: 1.02rem;
    white-space: nowrap;
}

.shared-media-tile-copy-top strong {
    flex: 1 1 auto;
    min-width: 0;
}

.shared-media-tile-unread-marker {
    bottom: 0.22rem;
    left: 50%;
    max-width: calc(100% - 0.6rem);
    pointer-events: none;
    position: absolute;
    transform: translateX(-50%);
    z-index: 1;
}

.shared-media-tile-copy span,
.shared-media-tile-copy small,
.shared-media-preview-copy p,
.shared-media-preview-meta {
    color: var(--muted);
    font-size: 0.94rem;
}

.shared-media-tile-copy span {
    white-space: nowrap;
}

.shared-media-tile-delete-form {
    position: absolute;
    right: 0.65rem;
    top: 0.65rem;
    z-index: 3;
}

.shared-media-tile-delete-button {
    align-items: center;
    background: #d85b72;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 0.85rem 1.45rem rgba(102, 32, 44, 0.2);
    color: #fff;
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 900;
    height: 2rem;
    justify-content: center;
    line-height: 1;
    min-height: 2rem;
    min-width: 2rem;
    padding: 0;
    width: 2rem;
}

.shared-media-tile-delete-button:hover,
.shared-media-tile-delete-button:focus-visible {
    background: #c94b63;
    color: #fff;
    transform: translateY(-1px);
}

.shared-media-preview-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
}

.shared-media-preview-header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.shared-media-preview-header h1,
.shared-media-preview-header p {
    margin: 0;
}

.shared-media-preview-surface {
    align-items: center;
    background: linear-gradient(180deg, rgba(245, 249, 247, 0.96) 0%, rgba(230, 239, 234, 0.88) 100%);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: 1.1rem;
    display: flex;
    justify-content: center;
    min-height: 26rem;
    overflow: hidden;
}

.shared-media-display-image,
.shared-media-player,
.shared-media-document-frame {
    display: block;
    height: 100%;
    min-height: 26rem;
    width: 100%;
}

.shared-media-display-image {
    object-fit: contain;
}

.shared-media-player,
.shared-media-document-frame {
    background: #0b1220;
    border: 0;
}

.shared-media-audio-shell,
.shared-media-fallback {
    align-items: center;
    display: grid;
    gap: 1rem;
    justify-items: center;
    max-width: 34rem;
    padding: 1.5rem;
    text-align: center;
}

.shared-media-audio-icon {
    min-height: 6rem;
    min-width: 6rem;
}

.shared-media-audio-player {
    max-width: 34rem;
    width: 100%;
}

.shared-media-fallback-copy,
.shared-media-preview-copy {
    display: grid;
    gap: 0.35rem;
}

.shared-media-fallback-copy h3,
.shared-media-fallback-copy p,
.shared-media-preview-copy p {
    margin: 0;
}

.shared-media-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.shared-media-scope-toggle-row .button,
.theater-upload-actions .button,
.theater-upload-progress-meta .button,
.shared-media-preview-actions .button {
    align-items: center;
    display: inline-flex;
    font-size: calc(1rem * var(--ui-button-font-scale)) !important;
    justify-content: center;
    line-height: 1.2;
    min-height: 3rem;
    padding: 0.82rem 1.3rem;
    text-align: center;
}

.shared-media-scope-toggle-row .button {
    gap: 0.55rem;
    flex: 1 1 0;
    justify-content: center;
    min-width: 8.5rem;
}

.theater-upload-actions .upload-trigger,
.shared-media-preview-actions .button {
    min-width: 11rem;
}

@media screen and (max-width: 900px) {
    .shared-media-shell {
        grid-template-columns: 1fr;
    }

    .shared-media-list {
        max-height: none;
    }

    .shared-media-preview-surface,
    .shared-media-display-image,
    .shared-media-player,
    .shared-media-document-frame {
        min-height: 18rem;
    }
}

.member-detail-copy {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
}

.member-detail-list {
    gap: 0.75rem;
    margin: 0;
}

.member-detail-section {
    display: grid;
    gap: 0.35rem;
}

.member-detail-section h3,
.member-detail-section p {
    margin: 0;
}

.member-detail-gallery-section {
    display: grid;
    gap: 0.8rem;
}

.member-gallery-heading {
    align-items: center;
}

.member-gallery-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-gallery-tile {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.52) !important;
    border: 1px solid var(--line);
    border-radius: 0.9rem !important;
    box-shadow: none !important;
    cursor: pointer;
    display: block;
    font-size: 0;
    height: auto !important;
    line-height: 0 !important;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.member-gallery-tile img {
    aspect-ratio: 1 / 1;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.member-gallery-tile:hover,
.member-gallery-tile:focus-visible {
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.14) !important;
    transform: translateY(-1px);
}

.compact-empty-state {
    margin: 0;
    padding: 1rem 1.1rem;
}

.compact-empty-state p {
    margin: 0;
}

.photo-viewer-backdrop {
    align-items: center;
    justify-content: center;
}

.photo-viewer-backdrop:fullscreen {
    background: rgba(8, 10, 18, 0.98);
    padding: 1.25rem;
}

.photo-viewer-modal {
    max-width: min(92vw, 70rem);
    width: min(92vw, 70rem);
}

.photo-viewer-backdrop:fullscreen .photo-viewer-modal {
    max-width: 100vw;
    width: 100%;
}

.photo-viewer-figure {
    display: grid;
    gap: 0.9rem;
    margin: 0;
}

.photo-viewer-image {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    display: block;
    max-height: 78vh;
    object-fit: contain;
    width: 100%;
}

.photo-viewer-backdrop:fullscreen .photo-viewer-image {
    max-height: calc(100vh - 11rem);
}

.photo-viewer-frame {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 1rem;
    display: block;
    height: min(78vh, 56rem);
    width: 100%;
}

.photo-viewer-backdrop:fullscreen .photo-viewer-frame {
    height: calc(100vh - 11rem);
}

.photo-viewer-caption {
    color: var(--muted);
    margin: 0;
    text-align: center;
}

.photo-viewer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
    margin-top: 0.9rem;
}

.photo-viewer-fullscreen[hidden],
.photo-viewer-download[hidden] {
    display: none;
}


.detail-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.detail-pill {
    background: var(--accent-soft);
    border-radius: 999px;
    color: var(--accent-deep);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.35rem 0.65rem;
}

.member-meta-line,
.member-interests {
    font-size: 0.9rem;
}

@media screen and (max-width: 980px) {
    .member-detail-grid {
        grid-template-columns: 1fr;
    }

    .member-detail-media {
        max-width: 20rem;
    }

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

.detail-pill-muted {
    background: rgba(45, 33, 28, 0.08);
    color: var(--muted);
}

.info-list {
    display: grid;
    gap: 0.9rem;
    margin: 1.5rem 0 0;
}

.info-list div {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.9rem;
}

.info-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.profile-summary-top {
    align-items: flex-start;
}

.profile-summary-photo {
    aspect-ratio: 1 / 1;
    border-radius: 1rem;
    max-width: 7.75rem;
    overflow: hidden;
}

.placeholder-avatar,
.member-photo-placeholder,
.profile-photo-placeholder {
    align-items: center;
    background: rgba(205, 92, 63, 0.08);
    color: var(--accent-deep);
    display: flex;
    font-weight: 700;
    justify-content: center;
    line-height: 1.5;
    min-height: 7.75rem;
    padding: 1rem;
    text-align: center;
}

.profile-dropzone {
    background: rgba(255, 255, 255, 0.55);
    border: 2px dashed rgba(142, 56, 39, 0.28);
    border-radius: 1.4rem;
    cursor: pointer;
    display: grid;
    gap: 0.85rem;
    justify-items: center;
    margin-top: 0.75rem;
    padding: 1.25rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.profile-dropzone:hover,
.profile-dropzone.is-dragover {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(142, 56, 39, 0.6);
    transform: translateY(-1px);
}

.profile-photo-preview {
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    max-width: 15rem;
    overflow: hidden;
    width: min(15rem, 60vw);
}

.dropzone-label {
    font-weight: 700;
    text-align: center;
}

.dropzone-subtext {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 18rem;
    text-align: center;
}

.profile-form-grid {
    margin-top: 1.25rem;
}

.profile-edit-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 248, 241, 0.88));
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    margin-top: 1rem;
    padding: 1.35rem;
}

.profile-edit-section:first-child {
    margin-top: 0;
}

.profile-edit-section > h3,
.profile-section-header h3 {
    margin-bottom: 0.2rem;
}

.profile-edit-section .fields {
    display: grid;
    gap: 1.1rem 1rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.profile-section-header {
    display: grid;
    gap: 0.25rem;
}

.profile-section-header .eyebrow {
    margin-bottom: 0;
}

.profile-section-header .form-note {
    margin: 0;
}

.profile-edit-section .field label,
.profile-edit-section .upload-field-label {
    color: var(--text);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0;
    text-transform: uppercase;
}

.profile-edit-section .field {
    gap: 0.5rem;
}

.profile-edit-section .field .form-note {
    margin: 0 0 0.65rem;
}

.compact-profile-list {
    margin-top: 1.25rem;
}

.university-map-panel {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 1rem;
    margin-top: 1.3rem;
    padding-top: 1.25rem;
}

.university-map-copy h4 {
    margin-bottom: 0.25rem;
}

.university-map-copy .eyebrow {
    margin-bottom: 0.15rem;
}

.university-map-copy .form-note {
    margin: 0;
}

.university-map-shell {
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid var(--line);
    border-radius: 1rem;
    min-height: 18rem;
    overflow: hidden;
    position: relative;
}

.university-map-frame {
    border: 0;
    display: block;
    height: 18rem;
    width: 100%;
}

.university-map-placeholder {
    align-items: center;
    color: var(--muted);
    display: grid;
    gap: 0.35rem;
    height: 18rem;
    justify-items: center;
    padding: 1.5rem;
    text-align: center;
}

.university-map-placeholder strong {
    color: var(--text);
    font-family: var(--ui-font-family), sans-serif;
}

.photo-gallery-section {
    margin-top: 2rem;
}

.friends-section {
    margin-top: 2rem;
}

.friends-page-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.friends-grid {
    display: grid;
    gap: var(--ui-grid-gap);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
}

.connections-heading {
    align-items: center;
}

.connections-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    min-width: min(24rem, 100%);
}

.connections-search-input {
    margin: 0;
    min-width: min(18rem, 100%);
    width: min(26rem, 100%);
}

.groups-section {
    gap: 1rem;
}

.group-manager-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.group-manager-card {
    gap: 1rem;
}

.group-manager-create {
    margin-top: 1.25rem;
}

.group-manager-header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.group-manager-header h3,
.group-manager-header p {
    margin: 0;
}

.group-manager-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.group-member-picker-shell {
    display: grid;
    gap: 0.55rem;
}

.group-member-search-input {
    margin: 0;
    width: 100%;
}

.group-member-picker-note {
    margin: 0;
}

.group-member-picker {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.group-member-picker-empty {
    margin: 0;
}

.group-member-option {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    cursor: pointer;
    display: flex;
    gap: 0.65rem;
    min-height: 3rem;
    position: relative;
    padding: 0.75rem 0.85rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.group-member-option input {
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.group-member-check {
    align-items: center;
    background: #fff;
    border: 2px solid rgba(31, 111, 75, 0.35);
    border-radius: 0.35rem;
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.25rem;
    justify-content: center;
    width: 1.25rem;
}

.group-member-option input:checked + .group-member-check {
    background: linear-gradient(135deg, #2d9d68 0%, #1f6f4b 100%);
    border-color: #1f6f4b;
}

.group-member-option input:checked + .group-member-check::after {
    color: #fff;
    content: "✓";
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1;
}

.group-member-name {
    color: var(--text);
    display: block;
    font-size: 0.94rem;
    font-weight: 700;
}

.group-member-option:has(input:checked) {
    background: linear-gradient(180deg, rgba(222, 244, 232, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-color: rgba(31, 111, 75, 0.48);
    box-shadow: 0 0.8rem 1.5rem rgba(31, 111, 75, 0.12);
}

.group-member-option:focus-within {
    border-color: rgba(31, 111, 75, 0.52);
    box-shadow: 0 0 0 0.18rem rgba(31, 111, 75, 0.12);
}

.group-delete-button {
    align-items: center;
    background: linear-gradient(135deg, #c62828 0%, #8d1f1f 100%);
    border-color: rgba(141, 31, 31, 0.92) !important;
    box-shadow: 0 1rem 2rem rgba(141, 31, 31, 0.22);
    color: #fff !important;
    display: inline-flex;
    font-size: clamp(0.9rem, calc(1rem * var(--ui-button-font-scale)), 1.5rem) !important;
    justify-content: center;
    line-height: 1.2;
    min-height: 2.85rem;
    text-align: center;
}

.group-delete-button:hover {
    box-shadow: 0 1.15rem 2.3rem rgba(141, 31, 31, 0.28);
}

.friend-card {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    border-radius: calc(1rem * clamp(0.9, var(--ui-box-scale), 1.2));
    display: grid;
    gap: calc(1rem * var(--ui-box-scale));
    padding: var(--ui-card-padding);
}

.friend-card-top {
    align-items: center;
    display: flex;
    gap: calc(0.9rem * var(--ui-box-scale));
}

.friend-card-top > div {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.friend-card-profile-trigger {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    text-align: left;
    width: 100%;
}

.friend-card-profile-trigger:hover,
.friend-card-profile-trigger:focus-visible {
    opacity: 0.94;
}

.friend-card-top h3,
.friend-card-top p {
    margin: 0;
    overflow-wrap: anywhere;
}

.friend-card-top h3 {
    font-size: var(--ui-card-heading-size);
    line-height: 1.1;
}

.friend-card-top p,
.blocked-chat-note,
.member-card p {
    font-size: var(--ui-card-meta-size);
    overflow-wrap: anywhere;
}

.friend-card-photo {
    aspect-ratio: 1 / 1;
    border-radius: calc(0.9rem * clamp(0.9, var(--ui-box-scale), 1.18));
    display: block;
    flex: 0 0 var(--ui-friend-photo-size);
    height: var(--ui-friend-photo-size);
    max-width: none;
    object-fit: cover;
    overflow: hidden;
    width: var(--ui-friend-photo-size);
}

.friend-card-photo.placeholder-avatar {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: var(--ui-friend-photo-size);
    min-width: var(--ui-friend-photo-size);
    padding: 0.5rem;
    text-align: center;
}

.friend-card-photo.default-profile-logo {
    padding: 0.45rem;
}

.friend-card-notes {
    display: grid;
    gap: 0.45rem;
}

.friend-card-notes label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.friend-card-notes textarea {
    min-height: 8.5rem;
    resize: vertical;
}

.friend-card-note-status {
    margin: 0;
}

.friend-card-note-status.is-error {
    color: #9f2d2d;
}

.friend-card-actions {
    align-items: stretch;
    display: grid;
    gap: calc(0.65rem * var(--ui-box-scale));
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.friend-card-actions form {
    display: flex;
    margin: 0;
}

.friend-card-actions > *,
.friend-card-actions form > * {
    width: 100%;
}

.admin-user-list {
    display: grid;
    gap: 1rem;
}

.admin-workspace-shell {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
}

.admin-section-sidebar {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 1rem;
}

.admin-section-sidebar-top {
    display: grid;
    gap: 0.3rem;
}

.admin-section-sidebar-top h2,
.admin-section-sidebar-top p {
    margin: 0;
}

.admin-section-nav {
    display: grid;
    gap: 0.6rem;
}

.admin-section-link {
    align-items: center;
    background: color-mix(in srgb, var(--panel) 88%, white);
    border: 1px solid var(--line);
    border-radius: 1rem;
    color: var(--text);
    display: flex;
    font-weight: 700;
    justify-content: flex-start;
    min-height: 3.1rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-section-link:hover,
.admin-section-link:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
    box-shadow: 0 0.85rem 1.75rem rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.admin-section-link.is-active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, white), color-mix(in srgb, var(--accent) 10%, white));
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.12);
}

.admin-section-main {
    display: grid;
    gap: 1.1rem;
    min-width: 0;
}

.admin-section-hero {
    margin: 0;
}

.admin-user-search {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.admin-user-search input[type="search"] {
    min-width: min(100%, 24rem);
}

.admin-setting-toggle-row {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-setting-toggle-copy {
    display: grid;
    gap: 0.35rem;
}

.admin-setting-toggle-copy strong,
.admin-setting-toggle-copy span {
    margin: 0;
}

.admin-setting-toggle-copy span {
    color: var(--muted);
}

.admin-toggle-switch {
    cursor: pointer;
    display: inline-flex;
    position: relative;
}

.admin-toggle-switch input {
    height: 1px;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 1px;
}

.admin-toggle-switch-track {
    align-items: center;
    background: color-mix(in srgb, var(--line) 78%, white);
    border: 1px solid color-mix(in srgb, var(--line) 88%, rgba(15, 23, 42, 0.12));
    border-radius: 999px;
    box-shadow: 0 0.75rem 1.4rem rgba(15, 23, 42, 0.08);
    display: inline-flex;
    height: 3rem;
    padding: 0.25rem;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    width: 5.4rem;
}

.admin-toggle-switch-track::after {
    background: white;
    border-radius: 50%;
    box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.18);
    content: "";
    display: block;
    height: 2.3rem;
    transition: transform 160ms ease;
    width: 2.3rem;
}

.admin-toggle-switch input:checked + .admin-toggle-switch-track {
    background: color-mix(in srgb, var(--accent) 26%, white);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.admin-toggle-switch input:checked + .admin-toggle-switch-track::after {
    transform: translateX(2.35rem);
}

.admin-toggle-switch input:focus-visible + .admin-toggle-switch-track {
    box-shadow: 0 0 0 0.2rem rgba(25, 143, 114, 0.18), 0 0.75rem 1.4rem rgba(15, 23, 42, 0.08);
}

.admin-user-card {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.admin-user-copy {
    display: grid;
    gap: 0.35rem;
}

.admin-user-copy h3,
.admin-user-meta {
    margin: 0;
}

.admin-user-actions {
    align-items: stretch;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: min(100%, 18rem);
}

.admin-user-actions form {
    margin: 0;
}

.admin-user-actions .button {
    width: 100%;
}

.admin-license-panel .profile-edit-section {
    gap: 1rem;
}

.admin-edit-actions {
    margin-top: 1rem;
}

.admin-user-message-form {
    display: grid;
    gap: 1rem;
}

.admin-global-broadcast-list {
    display: grid;
    gap: 1rem;
}

.admin-global-broadcast-card {
    display: grid;
    gap: 1rem;
}

.admin-global-broadcast-card-top {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.admin-global-broadcast-card-top h3,
.admin-global-broadcast-card-top span,
.admin-global-broadcast-card-top p {
    margin: 0;
}

.admin-global-broadcast-card-top > div {
    display: grid;
    gap: 0.2rem;
}

.admin-global-broadcast-body,
.admin-global-broadcast-preview {
    background: color-mix(in srgb, var(--accent) 10%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    border-radius: 1.2rem;
    padding: 1rem 1.05rem;
    white-space: pre-wrap;
}

.admin-global-broadcast-preview {
    display: grid;
    gap: 0.45rem;
}

.admin-global-broadcast-preview strong,
.admin-global-broadcast-preview p {
    margin: 0;
}

.admin-global-thread-list {
    display: grid;
    gap: 0.85rem;
}

.admin-global-thread-card {
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.95rem 1rem;
}

.admin-global-thread-card-copy {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.admin-global-thread-card-copy p {
    margin: 0;
    white-space: pre-wrap;
}

.admin-global-thread-card-top {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.admin-global-thread-card-top strong,
.admin-global-thread-card-top span {
    margin: 0;
}

.admin-global-thread-actions {
    min-width: 9.5rem;
}

.admin-global-empty-state {
    margin-top: 0.35rem;
}

.admin-global-thread-transcript {
    display: grid;
    gap: 0.75rem;
    max-height: 18rem;
    overflow: auto;
    padding-right: 0.3rem;
}

.admin-global-thread-transcript-item {
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid var(--line);
    border-radius: 1rem;
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0.95rem;
}

.admin-global-thread-transcript-item.is-admin {
    background: color-mix(in srgb, var(--accent) 10%, white);
    border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
}

.admin-global-thread-transcript-top {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.admin-global-thread-transcript-top strong,
.admin-global-thread-transcript-top span,
.admin-global-thread-transcript-item p {
    margin: 0;
}

.admin-global-thread-transcript-top span {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-user-message-target {
    background: color-mix(in srgb, var(--accent) 12%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-radius: 1.25rem;
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
}

.admin-user-message-target strong,
.admin-user-message-target span {
    margin: 0;
}

.admin-user-message-errors {
    background: rgba(166, 56, 28, 0.12);
    border: 1px solid rgba(166, 56, 28, 0.28);
    border-radius: 1rem;
    color: #7f2d13;
    display: grid;
    gap: 0.3rem;
    padding: 0.85rem 1rem;
}

.admin-user-message-errors p {
    margin: 0;
}

#admin-user-message-modal .modal-panel {
    max-width: min(100%, 42rem);
}

#admin-user-message-modal textarea {
    min-height: 11rem;
}

#admin-global-message-modal .modal-panel,
#admin-global-thread-modal .modal-panel {
    max-width: min(100%, 46rem);
}

#admin-global-thread-modal textarea {
    min-height: 9rem;
}

#admin-statistics-modal .modal-panel {
    max-width: min(100%, 72rem);
    width: min(100%, 72rem);
}

.admin-superadmin-overview {
    display: grid;
    gap: 1.2rem;
}

.admin-superadmin-overview-heading {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-superadmin-overview-heading > div {
    min-width: 0;
}

.admin-superadmin-overview-heading h2,
.admin-superadmin-overview-heading span {
    margin: 0;
}

.admin-superadmin-overview-heading span {
    color: var(--muted);
}

.admin-superadmin-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

.admin-superadmin-toggle .button.is-active {
    box-shadow: 0 0.9rem 1.8rem rgba(15, 23, 42, 0.14);
    filter: saturate(1.04);
}

.admin-superadmin-chart-view {
    display: none;
}

.admin-superadmin-chart-view.is-active {
    display: block;
}

.admin-superadmin-chart-layout {
    align-items: center;
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
}

.admin-superadmin-chart-card {
    display: grid;
    justify-items: center;
}

.admin-superadmin-chart-donut {
    aspect-ratio: 1;
    background: var(--admin-superadmin-chart);
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 1rem 2rem rgba(15, 23, 42, 0.12);
    display: grid;
    place-items: center;
    position: relative;
    width: min(100%, 18rem);
}

.admin-superadmin-chart-donut::after {
    background: color-mix(in srgb, var(--panel) 90%, white);
    border-radius: 50%;
    content: "";
    inset: 18%;
    position: absolute;
}

.admin-superadmin-chart-total {
    display: grid;
    gap: 0.2rem;
    justify-items: center;
    position: relative;
    text-align: center;
    z-index: 1;
}

.admin-superadmin-chart-total strong {
    font-size: clamp(1.2rem, calc(1.35rem * var(--ui-font-scale)), 1.8rem);
    line-height: 1.1;
}

.admin-superadmin-chart-total span {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-webrtc-panel {
    gap: 1rem;
}

.admin-webrtc-settings-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.admin-webrtc-settings-actions {
    display: flex;
    justify-content: flex-end;
}

.admin-webrtc-settings-section {
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) - 0.15rem);
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem;
}

.admin-webrtc-settings-section h3 {
    margin: 0;
}

.admin-community-menu-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.admin-community-menu-card {
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) - 0.15rem);
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.admin-community-menu-card-top {
    align-items: start;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-community-menu-card-top h3,
.admin-community-menu-card-top span,
.admin-community-menu-card-top p {
    margin: 0;
}

.admin-community-menu-card-top span {
    color: var(--muted);
    font-size: 0.92rem;
    padding-top: 0.1rem;
}

.admin-community-menu-form {
    gap: 0.9rem;
}

.admin-community-menu-options {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.admin-community-menu-option {
    align-items: center;
    background: color-mix(in srgb, var(--panel) 82%, white);
    border: 1px solid var(--line);
    border-radius: 1rem;
    cursor: pointer;
    display: flex;
    gap: 0.65rem;
    min-height: 3rem;
    padding: 0.75rem 0.85rem;
}

.admin-community-menu-option input {
    accent-color: var(--accent);
    flex: 0 0 auto;
    margin: 0;
}

.admin-community-menu-option span {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
}

.admin-webrtc-slider-field {
    gap: 0.45rem;
}

.admin-webrtc-slider-meta {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-webrtc-slider-meta input[type="range"] {
    width: 100%;
}

.admin-webrtc-slider-meta strong {
    min-width: 4.75rem;
    text-align: right;
}

.admin-webrtc-settings-status.is-error {
    color: #9f2d2d;
}

.admin-superadmin-chart-meta {
    display: grid;
    gap: 0.95rem;
}

.admin-superadmin-chart-meta h3 {
    margin: 0;
}

.admin-superadmin-legend {
    display: grid;
    gap: 0.7rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-superadmin-legend-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--line);
    border-radius: 1rem;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0.85rem 0.95rem;
}

.admin-superadmin-legend-item.is-empty {
    grid-template-columns: auto minmax(0, 1fr);
}

.admin-superadmin-legend-swatch {
    background: var(--admin-stat-color);
    border-radius: 999px;
    display: inline-block;
    height: 0.95rem;
    width: 0.95rem;
}

.admin-superadmin-legend-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.admin-superadmin-legend-copy strong,
.admin-superadmin-legend-copy span {
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-superadmin-legend-copy span {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-statistics-summary {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1rem 0 1.1rem;
}

.admin-statistics-summary > div {
    background: color-mix(in srgb, var(--accent) 10%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
    border-radius: 1.2rem;
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
}

.admin-statistics-summary strong {
    font-size: 1.3rem;
}

.admin-statistics-summary span {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-statistics-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.admin-statistics-tile {
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--line);
    border-radius: 1.3rem;
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
}

.admin-statistics-tile-copy {
    display: grid;
    gap: 0.3rem;
}

.admin-statistics-tile-copy h3,
.admin-statistics-tile-copy .form-note {
    margin: 0;
}

.admin-statistics-tile-copy h3 {
    overflow-wrap: anywhere;
}

.admin-statistics-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.admin-statistics-list div {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.admin-statistics-list dt,
.admin-statistics-list dd {
    margin: 0;
}

.admin-statistics-list dt {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-statistics-list dd {
    font-weight: 800;
    text-align: right;
}

.admin-statistics-actions {
    margin-top: 1.15rem;
}

@media screen and (max-width: 720px) {
    .admin-workspace-shell {
        grid-template-columns: 1fr;
    }

    .admin-section-sidebar {
        position: static;
    }

    .admin-superadmin-overview-heading {
        grid-template-columns: 1fr;
    }

    .admin-superadmin-toggle {
        justify-content: flex-start;
    }

    .admin-superadmin-chart-layout {
        grid-template-columns: 1fr;
    }

    .admin-statistics-summary {
        grid-template-columns: 1fr;
    }
}

.friend-action-button,
.friend-card-actions button {
    align-items: center;
    background: linear-gradient(135deg, #2d9d68 0%, #1f6f4b 100%);
    border-color: rgba(31, 111, 75, 0.9) !important;
    box-shadow: 0 1rem 2rem rgba(31, 111, 75, 0.22);
    color: #fff !important;
    display: inline-flex;
    font-size: clamp(0.9rem, calc(1rem * var(--ui-button-font-scale)), 1.5rem) !important;
    justify-content: center;
    line-height: 1.2;
    min-height: 2.85rem;
    text-align: center;
}

.friend-action-button:hover,
.friend-card-actions button:hover {
    box-shadow: 0 1.15rem 2.3rem rgba(31, 111, 75, 0.28);
}

.calendar-shell-page {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 1.5rem;
}

.calendar-sidebar,
.calendar-main,
.calendar-editor-card,
.calendar-day-modal-card,
.calendar-day-list-card,
.calendar-diary-card,
.calendar-timeline-card {
    display: grid;
    gap: 1rem;
}

.calendar-sidebar {
    align-content: start;
}

.calendar-main {
    min-width: 0;
}

.calendar-main-full {
    width: 100%;
}

.calendar-scope-current {
    color: var(--ink);
    font-size: clamp(1.35rem, calc(1.75rem * var(--ui-button-font-scale)), 2.35rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.05;
    text-align: center;
    text-transform: uppercase;
}

.calendar-sidebar-copy h2,
.calendar-sidebar-copy p {
    margin: 0;
}

.calendar-sidebar-copy {
    display: grid;
    gap: 0.45rem;
}

.calendar-editor-heading,
.calendar-diary-item-top,
.calendar-toolbar,
.calendar-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.calendar-entry-form {
    display: grid;
    gap: 1rem;
}

.calendar-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.calendar-editor-actions form {
    margin: 0;
}

.calendar-delete-button {
    background: linear-gradient(135deg, #d8647b 0%, #b8273f 100%) !important;
    border-color: rgba(140, 24, 45, 0.72) !important;
    box-shadow: 0 0.8rem 1.7rem rgba(184, 39, 63, 0.24) !important;
    color: #fff !important;
}

.calendar-delete-button:hover,
.calendar-delete-button:focus,
.calendar-delete-button:focus-visible {
    box-shadow: 0 1rem 1.95rem rgba(184, 39, 63, 0.32) !important;
}

.calendar-diary-cta {
    display: flex;
    justify-content: center;
}

.calendar-day-entry-list {
    display: grid;
    gap: 0.75rem;
}

.calendar-day-modal-list {
    display: grid;
    gap: 0.75rem;
}

.calendar-day-modal-entry {
    gap: 0.65rem;
}

.calendar-day-modal-entry p {
    margin: 0;
}

.calendar-day-modal-empty {
    margin: 0;
}

.calendar-diary-item {
    gap: 0.65rem;
}

.calendar-diary-item p {
    margin: 0;
}

.calendar-diary-swatch {
    border-radius: 999px;
    display: inline-block;
    height: 0.8rem;
    margin-right: 0.45rem;
    vertical-align: middle;
    width: 0.8rem;
}

.diary-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.diary-color-option {
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.12);
    cursor: pointer;
    height: 1.55rem;
    padding: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    width: 1.55rem;
}

.diary-color-option:hover,
.diary-color-option.is-selected {
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.24);
    transform: scale(1.05);
}

.diary-grid {
    display: grid;
    gap: 0.75rem;
}

.diary-weekdays,
.diary-grid-cells {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.diary-weekdays span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.diary-day-card {
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1rem;
    color: inherit;
    display: grid;
    gap: 0.5rem;
    min-height: 8.5rem;
    padding: 0.8rem;
    position: relative;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.diary-day-card:hover {
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.diary-day-card.is-other-month {
    opacity: 0.55;
}

.diary-day-card.is-selected {
    border-color: rgba(45, 157, 104, 0.52);
    box-shadow: 0 0 0 2px rgba(45, 157, 104, 0.14);
}

.diary-day-card.is-today {
    outline: 2px solid rgba(37, 99, 235, 0.28);
    outline-offset: 0;
}

.diary-day-card.has-diary {
    border-left: 4px solid var(--diary-day-accent, var(--accent));
}

.diary-day-card.has-diary.is-past-range {
    background: rgba(148, 163, 184, 0.14);
}

.diary-day-card.has-diary.is-current-range {
    background: rgba(59, 130, 246, 0.14);
}

.diary-day-card.has-diary.is-future-range {
    background: rgba(45, 157, 104, 0.14);
}

.diary-day-number {
    font-size: 1rem;
    font-weight: 800;
}

.diary-day-notes {
    display: grid;
    gap: 0.38rem;
}

.diary-note-chip {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 0.75rem;
    color: var(--text);
    cursor: pointer;
    display: block;
    font-size: 0.78rem;
    line-height: 1.35;
    overflow: hidden;
    padding: 0.45rem 0.55rem;
    text-overflow: ellipsis;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    white-space: nowrap;
}

.diary-note-chip:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0.55rem 1.2rem rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.calendar-toolbar {
    justify-content: flex-start;
}

.calendar-toolbar label {
    display: grid;
    gap: 0.35rem;
    min-width: 9rem;
}

.calendar-toolbar label span,
.calendar-meta-head {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calendar-timeline {
    overflow: hidden;
}

.calendar-shell {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
}

.calendar-fixed-column {
    background: rgba(255, 255, 255, 0.46);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    min-width: 0;
}

.calendar-meta-head {
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    min-height: 4rem;
    padding: 0.95rem 1rem;
}

.calendar-labels-column,
.calendar-tracks-column {
    display: grid;
}

.calendar-entry-meta,
.calendar-entry-track {
    min-height: 4rem;
}

.calendar-entry-meta {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    display: grid;
    gap: 0.18rem;
    padding: 0.8rem 1rem;
}

.calendar-entry-meta strong,
.calendar-entry-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-entry-meta span {
    color: var(--muted);
    font-size: 0.84rem;
}

.calendar-scroller {
    cursor: grab;
    min-width: 0;
    overflow: auto hidden;
    scrollbar-width: thin;
}

.calendar-timeline.is-panning .calendar-scroller {
    cursor: grabbing;
    user-select: none;
}

.calendar-header-row {
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    position: sticky;
    top: 0;
    z-index: 2;
}

.calendar-days-row {
    display: flex;
    min-height: 4rem;
    position: relative;
}

.calendar-day {
    align-items: center;
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    color: inherit;
    display: grid;
    flex: 0 0 auto;
    justify-items: center;
    padding: 0.65rem 0.25rem;
    position: relative;
    text-decoration: none;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.65);
}

.calendar-day.has-diary::after {
    background: var(--calendar-diary-accent, var(--accent));
    border-radius: 999px;
    bottom: 0.45rem;
    content: "";
    height: 0.33rem;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: min(1.45rem, calc(100% - 0.8rem));
}

.calendar-day-name {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calendar-day strong {
    font-size: 0.92rem;
}

.calendar-day.is-today {
    background: rgba(59, 130, 246, 0.12);
}

.calendar-day.has-diary.is-past-range {
    background: rgba(148, 163, 184, 0.16);
}

.calendar-day.has-diary.is-current-range {
    background: rgba(59, 130, 246, 0.18);
}

.calendar-day.has-diary.is-future-range {
    background: rgba(45, 157, 104, 0.16);
}

.calendar-tracks-column {
    position: relative;
}

.calendar-entry-track {
    align-items: stretch;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    display: flex;
    position: relative;
}

.calendar-entry-track-empty {
    opacity: 0.55;
}

.calendar-grid-line {
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    display: block;
    flex: 0 0 auto;
    height: 100%;
}

.calendar-entry-bar {
    appearance: none;
    align-items: center;
    background: var(--calendar-entry-color, #7cb342);
    border: 2px solid rgba(45, 157, 104, 0.32);
    border-radius: 999px;
    box-shadow: 0 0.8rem 1.8rem rgba(15, 23, 42, 0.18);
    color: #fff;
    cursor: grab;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 800;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0 1.1rem;
    position: absolute;
    text-decoration: none;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.calendar-entry-bar.is-resizing {
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.28);
}

.calendar-entry-bar.is-moving {
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.28);
    cursor: grabbing;
}

.calendar-entry-bar:hover,
.calendar-entry-bar:focus,
.calendar-entry-bar:focus-visible,
.calendar-entry-bar:active {
    transform: translateY(-50%);
}

.calendar-entry-bar.is-past {
    border-color: rgba(148, 163, 184, 0.72);
    box-shadow: 0 0.8rem 1.7rem rgba(71, 85, 105, 0.2), 0 0 0 1px rgba(148, 163, 184, 0.16);
    filter: saturate(0.76);
    opacity: 0.86;
}

.calendar-entry-bar.is-current {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.calendar-entry-bar.is-warning {
    border-color: rgba(45, 157, 104, 0.86);
    box-shadow: 0 1rem 2rem rgba(84, 123, 33, 0.2), 0 0 0 1px rgba(45, 157, 104, 0.18);
}

.calendar-entry-bar.is-upcoming {
    border-color: rgba(45, 157, 104, 0.8);
    box-shadow: 0 1rem 2rem rgba(74, 112, 29, 0.18), 0 0 0 1px rgba(45, 157, 104, 0.16);
}

.calendar-entry-bar.is-future {
    border-color: rgba(45, 157, 104, 0.74);
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(45, 157, 104, 0.12);
    filter: saturate(1.04);
}

.calendar-entry-bar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-entry-handle {
    background: rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    bottom: 0.18rem;
    cursor: ew-resize;
    position: absolute;
    top: 0.18rem;
    width: 0.7rem;
}

.calendar-entry-handle.is-left {
    left: 0.22rem;
}

.calendar-entry-handle.is-right {
    right: 0.22rem;
}

.calendar-entry-bar:hover .calendar-entry-handle,
.calendar-entry-bar.is-resizing .calendar-entry-handle,
.calendar-entry-bar.is-moving .calendar-entry-handle {
    background: rgba(255, 255, 255, 0.68);
}

.calendar-today-line {
    background: rgba(220, 38, 38, 0.45);
    bottom: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 2px;
    z-index: 0;
}

.calendar-entry-modal {
    max-width: min(94vw, 54rem);
    width: min(94vw, 54rem);
}

.calendar-day-modal {
    max-width: min(94vw, 58rem);
    width: min(94vw, 58rem);
}

.calendar-scope-toggle {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 0 0 1rem;
}

.calendar-scope-toggle .button.is-active {
    box-shadow: 0 0.9rem 1.8rem rgba(15, 23, 42, 0.16);
    filter: saturate(1.04);
}

.calendar-shell-page .button.small,
#calendar-day-modal .button.small,
#calendar-entry-modal .button.small {
    font-size: calc(1rem * var(--ui-button-font-scale)) !important;
    line-height: 1.2;
}

.calendar-nav .button.small,
.calendar-scope-toggle .button.small,
#calendar-day-modal .button.small,
#calendar-entry-modal .button.small {
    min-height: 3.05rem;
    padding: 0.82rem 1.35rem;
}

.calendar-nav .button.small,
.calendar-scope-toggle .button.small {
    font-weight: 800;
}

.calendar-day-modal-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.calendar-day-entry-owner {
    margin: 0;
}

.calendar-day-entry-delete-form {
    margin: 0;
}

.calendar-entry-bar.is-readonly {
    cursor: default;
}

@media screen and (max-width: 1100px) {
    .calendar-shell-page {
        grid-template-columns: 1fr;
    }

    .calendar-shell {
        grid-template-columns: 1fr;
    }

    .calendar-fixed-column {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }
}

@media screen and (max-width: 760px) {
    .diary-weekdays,
    .diary-grid-cells {
        gap: 0.45rem;
    }

    .diary-day-card {
        min-height: 7rem;
        padding: 0.65rem;
    }

    .calendar-entry-meta,
    .calendar-entry-track,
    .calendar-days-row {
        min-height: 3.5rem;
    }
}

.discussions-page-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1.65fr) minmax(24rem, 30rem);
}

.discussions-map-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.discussions-main-panel {
    display: grid;
    gap: 1rem;
    max-height: calc(100vh - 2rem);
    min-width: 0;
    overflow-y: auto;
    position: sticky;
    top: 1rem;
}

.discussions-page-grid.is-workspace-open {
    grid-template-columns: minmax(0, 1fr);
}

.discussions-main-panel.is-hidden {
    display: none;
}

.discussion-map-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.discussion-graph-shell {
    display: grid;
    gap: 0.9rem;
}

.discussion-workspace {
    display: grid;
    gap: 1rem;
    min-height: 54rem;
}

.discussion-workspace-header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.discussion-workspace-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.discussion-workspace-header h2,
.discussion-subjects-heading h3,
.discussion-workspace-thread-header h3 {
    margin: 0;
}

.discussion-workspace-edit-button {
    min-width: calc(10rem * var(--ui-box-scale));
}

.discussion-workspace-exit {
    align-items: center;
    background: #d85b72;
    border-radius: 999px;
    box-shadow: 0 1rem 1.8rem rgba(102, 32, 44, 0.18);
    color: #fff;
    display: inline-flex;
    font-size: calc(0.9rem * var(--ui-button-font-scale));
    font-weight: 900;
    height: 2.4rem;
    justify-content: center;
    min-width: 2.4rem;
    text-decoration: none;
}

.discussion-workspace-exit:hover {
    background: #ca4860;
}

.discussion-workspace-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
    min-height: 0;
}

.discussion-subjects-panel,
.discussion-workspace-thread {
    display: grid;
    gap: 1rem;
    min-height: 0;
}

.discussion-subjects-panel {
    align-content: start;
    background: linear-gradient(180deg, rgba(248, 252, 249, 0.96) 0%, rgba(236, 244, 239, 0.92) 100%);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(1rem * clamp(0.9, var(--ui-box-scale), 1.16));
    padding: var(--ui-card-padding);
}

.discussion-subjects-heading {
    display: grid;
    gap: 0.8rem;
}

.discussion-subject-list {
    display: grid;
    gap: 0.75rem;
    max-height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.discussion-subject-link {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(31, 111, 75, 0.14);
    border-radius: calc(0.95rem * clamp(0.9, var(--ui-box-scale), 1.18));
    color: inherit;
    display: grid;
    gap: 0.3rem;
    padding: calc(0.95rem * var(--ui-box-scale));
    text-decoration: none;
}

.discussion-subject-link strong {
    font-size: calc(0.96rem * var(--ui-button-font-scale));
}

.discussion-subject-link small {
    color: rgba(36, 43, 39, 0.64);
    font-size: calc(0.8rem * var(--ui-font-scale));
}

.discussion-subject-link:hover,
.discussion-subject-link.is-active {
    border-color: rgba(31, 111, 75, 0.42);
    box-shadow: 0 1rem 1.8rem rgba(31, 111, 75, 0.12);
}

.discussion-subject-link.is-active {
    background: linear-gradient(180deg, rgba(222, 244, 232, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.discussion-workspace-thread {
    background: linear-gradient(180deg, rgba(247, 251, 249, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(1rem * clamp(0.9, var(--ui-box-scale), 1.16));
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    padding: var(--ui-card-padding);
}

.discussion-workspace-thread-header {
    align-items: start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.discussion-workspace-thread-header > div:first-child {
    flex: 1 1 16rem;
    min-width: 0;
}

.discussion-workspace-thread-actions {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-left: auto;
    max-width: 100%;
    min-width: 0;
}

.discussion-subject-remove-button {
    align-items: center;
    display: inline-flex;
    font-size: calc(1rem * var(--ui-button-font-scale));
    font-weight: 900;
    height: 2.35rem;
    justify-content: center;
    line-height: 1;
    min-width: 2.35rem;
    padding: 0;
    width: 2.35rem;
}

.discussion-workspace-thread-scroll {
    max-height: none;
    min-height: 20rem;
}

.discussion-post-form-card-compact {
    background: rgba(248, 252, 249, 0.92);
    border: 1px solid rgba(31, 111, 75, 0.1);
    box-shadow: none;
}

.discussion-post-form-card-compact .fields {
    gap: 0.8rem;
}

.discussion-post-form-card-compact .section-heading {
    display: none;
}

.discussion-post-form-card-compact textarea {
    min-height: 7rem;
}

.discussion-graph-hint {
    display: grid;
    gap: 0.25rem;
}

.discussion-graph-hint strong {
    font-size: calc(0.92rem * var(--ui-button-font-scale));
}

.discussion-graph-hint span {
    color: rgba(36, 43, 39, 0.72);
    font-size: calc(0.82rem * var(--ui-font-scale));
    line-height: 1.45;
}

.discussion-graph-viewport {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0) 26%),
        radial-gradient(circle at 82% 12%, rgba(45, 157, 104, 0.16) 0%, rgba(45, 157, 104, 0) 28%),
        radial-gradient(circle at 50% 88%, rgba(34, 113, 202, 0.12) 0%, rgba(34, 113, 202, 0) 26%),
        linear-gradient(180deg, rgba(241, 247, 243, 0.98) 0%, rgba(228, 237, 231, 0.9) 100%);
    border: 1px solid rgba(31, 111, 75, 0.14);
    border-radius: calc(1.1rem * clamp(0.9, var(--ui-box-scale), 1.18));
    cursor: grab;
    min-height: 54rem;
    overflow: hidden;
    position: relative;
}

.discussion-graph-fit-all {
    left: 1rem;
    min-height: 2.45rem;
    padding-inline: 1rem;
    position: absolute;
    top: 1rem;
    z-index: 5;
}

.discussion-graph-viewport.is-panning {
    cursor: grabbing;
}

.discussion-graph-viewport:fullscreen {
    border-radius: 0;
    border-width: 0;
    height: 100vh;
    margin: 0;
    max-height: none;
    min-height: 100vh;
    width: 100vw;
}

.discussion-workspace-overlay {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0) 28%),
        radial-gradient(circle at 82% 12%, rgba(45, 157, 104, 0.12) 0%, rgba(45, 157, 104, 0) 32%),
        linear-gradient(180deg, rgba(241, 247, 243, 0.98) 0%, rgba(228, 237, 231, 0.94) 100%);
    inset: 0;
    overflow: auto;
    padding: 1rem;
    position: absolute;
    z-index: 6;
}

.discussion-graph-viewport:fullscreen .discussion-workspace-overlay {
    padding: 1.2rem;
}

.discussion-workspace-overlay .discussion-workspace {
    min-height: calc(100vh - 2.4rem);
    position: relative;
}

.discussion-workspace-overlay .discussion-workspace-header {
    padding-right: 3.4rem;
}

.discussion-workspace-overlay .discussion-workspace-header-actions {
    padding-right: 0;
}

.discussion-workspace-overlay .discussion-workspace-exit {
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 2;
}

.discussion-graph-links,
.discussion-graph-node-layer {
    inset: 0;
    position: absolute;
    transform-origin: 0 0;
}

.discussion-graph-links {
    height: 100%;
    width: 100%;
}

.discussion-graph-link {
    stroke: rgba(31, 111, 75, 0.2);
    stroke-linecap: round;
    stroke-width: 3;
}

.discussion-graph-node-layer {
    pointer-events: none;
}

.discussion-graph-node-wrap {
    left: 0;
    pointer-events: auto;
    position: absolute;
    top: 0;
}

.discussion-graph-node {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(226, 240, 231, 0.96) 100%);
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    box-shadow:
        0 1.25rem 2.3rem rgba(18, 47, 32, 0.2),
        0 0.35rem 0.9rem rgba(18, 47, 32, 0.12),
        inset 0 0 0 1px rgba(31, 111, 75, 0.1);
    color: inherit;
    cursor: grab;
    display: grid;
    gap: 0.28rem;
    height: 100%;
    justify-items: center;
    left: 0;
    overflow: hidden;
    padding:
        calc(1rem * var(--discussion-node-padding-scale, 1))
        calc(0.9rem * var(--discussion-node-padding-scale, 1));
    pointer-events: auto;
    position: absolute;
    text-align: center;
    top: 0;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    user-select: none;
    width: 100%;
}

.discussion-graph-node:hover {
    border-color: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1.45rem 2.6rem rgba(18, 47, 32, 0.24),
        0 0.45rem 1rem rgba(18, 47, 32, 0.14),
        inset 0 0 0 1px rgba(31, 111, 75, 0.14);
}

.discussion-graph-node.is-leaf {
    background: linear-gradient(180deg, rgba(226, 244, 234, 0.98) 0%, rgba(210, 232, 220, 0.95) 100%);
}

.discussion-graph-node.has-image {
    background-image:
        linear-gradient(180deg, rgba(15, 34, 24, 0.52) 0%, rgba(15, 34, 24, 0.34) 100%),
        var(--discussion-node-image);
    background-position: center;
    background-size: cover;
    border-color: rgba(255, 255, 255, 0.96);
}

.discussion-graph-node.has-image .discussion-graph-node-name {
    color: #fff;
    text-shadow: 0 0.16rem 0.8rem rgba(0, 0, 0, 0.35);
}

.discussion-graph-node.has-image .discussion-graph-node-meta {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0.16rem 0.7rem rgba(0, 0, 0, 0.3);
}

.discussion-graph-node.is-selected {
    border-color: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1.55rem 2.9rem rgba(18, 47, 32, 0.26),
        0 0.4rem 1rem rgba(18, 47, 32, 0.16),
        0 0 0 0.4rem rgba(45, 157, 104, 0.14);
}

.discussion-graph-node.is-root {
    gap: 0.42rem;
    padding:
        calc(1.35rem * var(--discussion-node-padding-scale, 1))
        calc(1.3rem * var(--discussion-node-padding-scale, 1));
}

.discussion-graph-node.is-dragging {
    cursor: grabbing;
    transition: none;
}

.discussion-graph-node.is-image-drop-target {
    border-color: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1.6rem 2.7rem rgba(18, 47, 32, 0.24),
        0 0.35rem 0.95rem rgba(18, 47, 32, 0.14),
        0 0 0 0.46rem rgba(45, 157, 104, 0.18);
}

.discussion-graph-node.is-uploading {
    cursor: progress;
    filter: saturate(0.92);
    opacity: 0.86;
}

.discussion-graph-node-add {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(210, 232, 220, 0.96) 100%);
    border: 1px solid rgba(31, 111, 75, 0.2);
    border-radius: 999px;
    box-shadow: 0 0.8rem 1.5rem rgba(31, 111, 75, 0.16);
    color: #1f6f4b;
    cursor: pointer;
    display: inline-flex;
    font-size: calc(1rem * var(--ui-button-font-scale));
    font-weight: 900;
    height: 2rem;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0.15rem;
    top: 0.15rem;
    transform: translate(28%, -28%);
    transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    width: 2rem;
    z-index: 2;
}

.discussion-graph-node-wrap:hover .discussion-graph-node-add,
.discussion-graph-node-wrap:focus-within .discussion-graph-node-add {
    opacity: 1;
    pointer-events: auto;
    transform: translate(20%, -20%);
}

.discussion-graph-node-add:hover {
    box-shadow: 0 1rem 1.8rem rgba(31, 111, 75, 0.24);
}

.discussion-topic-delete-form {
    left: 0;
    margin: 0;
    position: absolute;
    top: 0;
    z-index: 2;
}

.discussion-graph-node-delete {
    align-items: center;
    background: linear-gradient(180deg, #df667d 0%, #c94b63 100%);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 0.8rem 1.5rem rgba(133, 39, 58, 0.22);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: calc(1rem * var(--ui-button-font-scale));
    font-weight: 900;
    height: 2rem;
    justify-content: center;
    left: 0.2rem;
    line-height: 1;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: absolute;
    top: 0.2rem;
    transform: translate(-28%, -28%);
    transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    width: 2rem;
}

.discussion-graph-node-wrap:hover .discussion-graph-node-delete,
.discussion-graph-node-wrap:focus-within .discussion-graph-node-delete {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-20%, -20%);
}

.discussion-graph-node-delete:hover {
    background: linear-gradient(180deg, #cf5069 0%, #bb4258 100%);
    box-shadow: 0 1rem 1.8rem rgba(133, 39, 58, 0.28);
}

.discussion-graph-fullscreen-exit {
    align-items: center;
    background: #d85b72;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 1rem 1.8rem rgba(102, 32, 44, 0.24);
    color: #fff;
    cursor: pointer;
    display: none;
    font-size: calc(0.9rem * var(--ui-button-font-scale));
    font-weight: 900;
    height: 2.4rem;
    justify-content: center;
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 2.4rem;
    z-index: 5;
}

.discussion-graph-viewport:fullscreen .discussion-graph-fullscreen-exit {
    display: inline-flex;
}

.discussion-graph-fullscreen-exit:hover {
    background: #ca4860;
}

.discussion-graph-node-name,
.discussion-graph-node-meta {
    display: -webkit-box;
    line-clamp: 2;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.discussion-graph-node-name {
    font-size: calc(1.14rem * var(--ui-button-font-scale) * var(--discussion-node-font-scale, 1));
    font-weight: 900;
    line-height: 1.15;
    max-width: 100%;
    text-shadow:
        0 0.08rem 0 rgba(255, 255, 255, 0.82),
        0 0.16rem 0.36rem rgba(255, 255, 255, 0.55),
        0 0.22rem 0.75rem rgba(18, 47, 32, 0.26);
}

.discussion-graph-node.is-root .discussion-graph-node-name {
    font-size: calc(1.3rem * var(--ui-button-font-scale) * var(--discussion-node-font-scale, 1));
    line-height: 1.12;
}

.discussion-graph-node-meta {
    color: rgba(36, 43, 39, 0.66);
    font-size: calc(0.72rem * var(--ui-font-scale) * var(--discussion-node-meta-scale, 1));
    line-height: 1.2;
}

.discussion-graph-node.is-root .discussion-graph-node-meta {
    font-size: calc(0.78rem * var(--ui-font-scale) * var(--discussion-node-meta-scale, 1));
}

.discussion-panel-heading h2,
.discussion-panel-heading h3,
.discussion-panel-heading p,
.discussion-panel-heading span {
    margin: 0;
}

.discussion-tree-list {
    display: grid;
    gap: 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.discussion-tree-list .discussion-tree-list {
    border-left: 1px solid rgba(31, 111, 75, 0.14);
    margin-left: 1rem;
    margin-top: 0.65rem;
    padding-left: 1rem;
}

.discussion-tree-item {
    min-width: 0;
}

.discussion-tree-row {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(0.95rem * clamp(0.9, var(--ui-box-scale), 1.18));
    box-shadow: 0 0.75rem 1.6rem rgba(31, 111, 75, 0.07);
    padding: 0.85rem 0.95rem;
}

.discussion-tree-row.is-active {
    background: linear-gradient(180deg, rgba(222, 244, 232, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-color: rgba(31, 111, 75, 0.4);
}

.discussion-tree-copy {
    display: grid;
    gap: 0.25rem;
}

.discussion-tree-copy small {
    color: rgba(36, 43, 39, 0.62);
    font-size: calc(0.8rem * var(--ui-font-scale));
}

.discussion-tree-branch-link,
.discussion-tree-open-trigger {
    color: inherit;
    font-size: calc(0.98rem * var(--ui-button-font-scale));
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
}

.discussion-tree-open-trigger {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.discussion-tree-branch-link:hover,
.discussion-tree-open-trigger:hover {
    color: var(--accent-strong);
}

.discussion-topic-panel,
.discussion-branch-form-card,
.discussion-post-form-card,
.discussion-child-panel,
.discussion-post-card {
    display: grid;
    gap: 1rem;
}

.discussion-topic-path {
    color: rgba(36, 43, 39, 0.64);
    font-size: calc(0.82rem * var(--ui-font-scale));
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.discussion-topic-panel-actions {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-left: auto;
    max-width: 100%;
    min-width: 0;
}

.discussion-child-grid,
.discussion-post-list {
    display: grid;
    gap: 1rem;
}

.discussion-thread-panel {
    grid-template-rows: auto minmax(0, 1fr);
}

.discussion-thread-scroll {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(1rem * clamp(0.9, var(--ui-box-scale), 1.16));
    min-height: 26rem;
    max-height: calc(100vh - 20rem);
    overflow-y: auto;
    padding: 1rem;
}

.discussion-thread-list {
    gap: 0.95rem;
}

.discussion-thread-loading {
    color: rgba(36, 43, 39, 0.62);
    font-size: calc(0.82rem * var(--ui-font-scale));
    padding: 0 0 0.8rem;
    text-align: center;
}

.discussion-thread-message {
    align-items: start;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: auto minmax(0, 1fr);
}

.discussion-thread-author-mark {
    align-items: center;
    background: linear-gradient(180deg, rgba(226, 244, 234, 0.98) 0%, rgba(209, 230, 219, 0.94) 100%);
    border: 1px solid rgba(31, 111, 75, 0.16);
    border-radius: 999px;
    color: #1f6f4b;
    display: inline-flex;
    font-size: calc(0.92rem * var(--ui-button-font-scale));
    font-weight: 800;
    height: 2.7rem;
    justify-content: center;
    width: 2.7rem;
}

.discussion-thread-card {
    gap: 0.9rem;
}

.discussion-child-link-card {
    display: grid;
    gap: 0.65rem;
}

.discussion-child-link {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(0.95rem * clamp(0.9, var(--ui-box-scale), 1.18));
    color: inherit;
    display: grid;
    gap: 0.25rem;
    padding: var(--ui-card-padding);
    text-decoration: none;
}

.discussion-child-link:hover {
    border-color: rgba(31, 111, 75, 0.34);
    box-shadow: 0 1rem 1.8rem rgba(31, 111, 75, 0.12);
}

.discussion-child-link small {
    color: rgba(36, 43, 39, 0.62);
}

.discussion-child-rename-button {
    justify-self: start;
}

.discussion-topic-request-list {
    display: grid;
    gap: 0.9rem;
}

.discussion-topic-request-card {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.discussion-topic-request-copy {
    display: grid;
    gap: 0.3rem;
}

.discussion-topic-request-copy h3,
.discussion-topic-request-copy p {
    margin: 0;
}

.discussion-topic-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.discussion-topic-request-actions form {
    margin: 0;
}

.discussion-entry-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: calc(0.78rem * var(--ui-button-font-scale));
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.04em;
    min-height: 2rem;
    padding: 0.15rem 0.8rem;
    text-transform: uppercase;
}

.discussion-entry-question {
    background: rgba(45, 157, 104, 0.16);
    color: #1f6f4b;
}

.discussion-entry-answer {
    background: rgba(22, 123, 189, 0.14);
    color: #185f9b;
}

.discussion-entry-comment {
    background: rgba(133, 110, 84, 0.14);
    color: #7b5c35;
}

.discussion-post-top {
    align-items: start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.discussion-post-heading {
    display: grid;
    gap: 0.55rem;
}

.discussion-post-meta {
    align-items: center;
    color: rgba(36, 43, 39, 0.68);
    display: flex;
    flex-wrap: wrap;
    font-size: calc(0.82rem * var(--ui-font-scale));
    gap: 0.45rem 0.8rem;
}

.discussion-post-body {
    line-height: 1.6;
    margin: 0;
    overflow-wrap: anywhere;
}

.discussion-post-body p,
.discussion-comment-body p {
    margin: 0;
}

.discussion-comments {
    border-top: 1px solid rgba(31, 111, 75, 0.12);
    display: grid;
    gap: 0.85rem;
    padding-top: 1rem;
}

.discussion-comments h4 {
    margin: 0;
}

.discussion-comments-list {
    display: grid;
    gap: 0.75rem;
}

.discussion-comment-card {
    background: rgba(248, 250, 249, 0.95);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(0.9rem * clamp(0.9, var(--ui-box-scale), 1.14));
    display: grid;
    gap: 0.45rem;
    padding: calc(0.9rem * var(--ui-box-scale));
}

.discussion-comment-card p {
    line-height: 1.55;
    margin: 0;
    overflow-wrap: anywhere;
}

.discussion-inline-comment-form .discussion-post-form-card {
    background: rgba(248, 250, 249, 0.92);
    border: 1px solid rgba(31, 111, 75, 0.12);
    box-shadow: none;
    gap: 0.75rem;
    padding: calc(0.9rem * var(--ui-box-scale));
}

.discussion-inline-comment-form .discussion-post-form-card .section-heading h3 {
    font-size: calc(0.95rem * var(--ui-button-font-scale));
}

.discussion-inline-comment-form .discussion-post-form-card .fields {
    gap: 0.7rem;
}

.discussion-branch-modal .hero-text {
    margin-bottom: 1rem;
}

.discussion-empty-state {
    min-height: 14rem;
}

.discussion-workspace .discussion-empty-state {
    min-height: 18rem;
}

.files-page-grid {
    align-items: start;
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
}

.files-filter-panel {
    gap: 1rem;
}

.files-sidebar-panel {
    display: grid;
    gap: 0.95rem;
    grid-template-rows: auto auto minmax(0, 1fr);
    max-height: calc(100vh - 2rem);
    min-width: 0;
    position: sticky;
    top: 1rem;
}

.files-sidebar-top {
    margin-bottom: 0.1rem;
}

.files-mode-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.8rem;
}

.files-mode-toggle {
    flex: 1 1 0;
    font-size: calc(0.88rem * var(--ui-button-font-scale)) !important;
    justify-content: center;
    min-width: 7.5rem;
}

.files-side-nav {
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.files-side-link {
    color: inherit;
    font-size: calc(1rem * var(--ui-button-font-scale));
    text-decoration: none;
}

.files-side-link .chat-friend-copy {
    font-size: calc(1rem * var(--ui-button-font-scale));
}

.files-side-link-top {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.files-side-link-top strong {
    min-width: 0;
}

.files-side-unread-badge {
    align-items: center;
    background: linear-gradient(135deg, #d75873 0%, #bf3f5f 100%);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: calc(0.72rem * var(--ui-button-font-scale));
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 1.35rem;
    min-width: 1.35rem;
    padding: 0 0.42rem;
}

.files-side-link .chat-friend-avatar span {
    font-size: calc(1rem * var(--ui-button-font-scale)) !important;
}

.files-side-link .chat-friend-copy strong {
    font-size: calc(1rem * var(--ui-button-font-scale)) !important;
}

.files-side-link .chat-friend-copy small {
    font-size: calc(0.82rem * var(--ui-button-font-scale)) !important;
}

.files-side-link.is-active {
    background: linear-gradient(180deg, rgba(222, 244, 232, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%) !important;
    border-color: rgba(31, 111, 75, 0.56);
    box-shadow: 0 1rem 1.8rem rgba(31, 111, 75, 0.14) !important;
}

.files-side-link.is-active .chat-friend-avatar {
    background: linear-gradient(135deg, rgba(45, 157, 104, 0.26) 0%, rgba(31, 111, 75, 0.38) 100%);
}

.files-side-link.is-active .chat-friend-copy {
    background: rgba(248, 252, 249, 0.97);
    border-color: rgba(31, 111, 75, 0.28);
}

.tasklist-sidebar-panel,
.tasklist-main-panel,
.tasklist-modal-card {
    display: grid;
    gap: 1rem;
}

.tasklist-sidebar-panel {
    align-content: start;
}

.tasklist-scope-toggle-row {
    margin-top: 0.8rem;
}

.tasklist-side-nav {
    display: grid;
    gap: 0.85rem;
    max-height: calc(100vh - 16rem);
    min-width: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.tasklist-side-link {
    color: inherit;
    text-decoration: none;
}

.tasklist-main-panel {
    align-content: start;
    min-width: 0;
}

.tasklist-main-heading {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.tasklist-main-heading h2,
.tasklist-item-top strong {
    margin: 0;
}

.tasklist-main-heading span {
    color: var(--muted);
    display: inline-block;
    font-size: 0.95rem;
    margin-top: 0.35rem;
}

.tasklist-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.tasklist-header-actions .button.small,
.tasklist-header-actions .button {
    align-items: center;
    display: inline-grid;
    font-size: calc(1rem * var(--ui-button-font-scale));
    justify-content: center;
    line-height: 1.1;
    min-height: 3rem;
    padding: 0.82rem 1.3rem;
    place-items: center;
    text-align: center;
    vertical-align: middle;
}

.tasklist-meta-row {
    display: grid;
    gap: 0.35rem;
}

.tasklist-meta-row .form-note {
    margin: 0;
}

.tasklist-items {
    display: grid;
    gap: 1rem;
}

.tasklist-item-card {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
    padding: calc(1rem * clamp(0.9, var(--ui-box-scale), 1.12));
}

.tasklist-item-vote-rail {
    align-items: center;
    align-content: center;
    background: linear-gradient(180deg, rgba(238, 247, 242, 0.9) 0%, rgba(224, 239, 231, 0.86) 100%);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(1rem * clamp(0.88, var(--ui-box-scale), 1.12));
    display: grid;
    gap: 0.5rem;
    grid-auto-rows: min-content;
    justify-items: center;
    min-width: 4.2rem;
    padding: 0.75rem 0.5rem;
}

.tasklist-item-vote-rail .task-list-vote-form {
    display: grid;
    justify-items: center;
    margin: 0;
}

.tasklist-vote-button {
    align-items: center;
    appearance: none;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(31, 111, 75, 0.18);
    border-radius: 999px;
    box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.08);
    color: var(--accent-deep);
    cursor: pointer;
    display: inline-flex;
    font-size: calc(0.95rem * var(--ui-button-font-scale));
    font-weight: 900;
    height: 2.2rem;
    justify-content: center;
    line-height: 1;
    min-width: 2.2rem;
    padding: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tasklist-vote-button:hover,
.tasklist-vote-button:focus,
.tasklist-vote-button:focus-visible {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0.7rem 1.3rem rgba(31, 111, 75, 0.16);
    transform: translateY(-1px);
}

.tasklist-vote-button.is-active {
    background: linear-gradient(135deg, rgba(45, 157, 104, 0.18) 0%, rgba(31, 111, 75, 0.22) 100%);
    border-color: rgba(31, 111, 75, 0.4);
    box-shadow: 0 0.85rem 1.6rem rgba(31, 111, 75, 0.16);
}

.tasklist-item-score {
    align-items: center;
    color: var(--accent-deep);
    display: inline-flex;
    font-size: calc(1rem * var(--ui-button-font-scale));
    font-weight: 900;
    justify-content: center;
    line-height: 1;
    min-height: 2rem;
    min-width: 2.4rem;
    text-align: center;
}

.tasklist-item-open {
    align-content: start;
    appearance: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(246, 251, 248, 0.93) 100%);
    border: 1px solid rgba(31, 111, 75, 0.14);
    border-radius: calc(1rem * clamp(0.88, var(--ui-box-scale), 1.12));
    box-shadow: 0 0.9rem 1.7rem rgba(15, 23, 42, 0.08);
    color: inherit;
    cursor: pointer;
    display: grid;
    gap: 0.85rem;
    min-width: 0;
    padding: 1rem 1.15rem;
    text-align: left;
}

.tasklist-item-open:hover,
.tasklist-item-open:focus,
.tasklist-item-open:focus-visible {
    border-color: rgba(31, 111, 75, 0.26);
    box-shadow: 0 1.1rem 2rem rgba(31, 111, 75, 0.12);
}

.tasklist-item-top {
    align-items: start;
    display: flex;
    gap: 0.9rem;
    justify-content: space-between;
}

.tasklist-item-top small {
    color: var(--muted);
    display: block;
    font-size: 0.86rem;
    margin-top: 0.25rem;
}

.tasklist-item-open p {
    color: var(--text);
    line-height: 1.55;
    margin: 0;
    overflow-wrap: anywhere;
}

.tasklist-empty-state {
    min-height: 15rem;
}

.tasklist-title-modal {
    max-width: min(92vw, 40rem);
    width: min(92vw, 40rem);
}

.tasklist-item-modal {
    max-width: min(94vw, 56rem);
    width: min(94vw, 56rem);
}

.tasklist-modal-card .calendar-editor-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.tasklist-modal-card .calendar-editor-actions form,
.tasklist-modal-card .calendar-editor-actions [data-task-item-delete-wrapper] {
    margin: 0;
}

.tasklist-modal-card .button,
.tasklist-modal-card .button.small,
.tasklist-scope-toggle-row .button.small {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    font-size: calc(1rem * var(--ui-button-font-scale)) !important;
    justify-content: center;
    line-height: 1;
    min-height: 3.1rem;
    padding: 0.82rem 1.3rem;
    text-align: center;
    vertical-align: middle;
}

@media screen and (max-width: 900px) {
    .tasklist-main-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .tasklist-header-actions {
        justify-content: stretch;
    }

    .tasklist-header-actions .button,
    .tasklist-header-actions .button.small {
        width: 100%;
    }

    .tasklist-item-card {
        grid-template-columns: 1fr;
    }

    .tasklist-item-vote-rail {
        grid-template-columns: repeat(3, auto);
        justify-content: start;
        min-width: 0;
    }

    .tasklist-side-nav {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

.files-upload-inline .form-note {
    margin: 0;
}

.files-upload-card {
    background: linear-gradient(180deg, rgba(241, 247, 243, 0.96) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(31, 111, 75, 0.14);
    border-radius: calc(1rem * clamp(0.9, var(--ui-box-scale), 1.2));
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding: var(--ui-card-padding);
}

.files-upload-card-disabled {
    background: rgba(250, 252, 251, 0.92);
}

.files-upload-form {
    display: grid;
    gap: 1rem;
}

.files-upload-inline {
    border-top: 1px solid rgba(31, 111, 75, 0.12);
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.files-upload-inline-heading {
    margin-bottom: 0;
}

.files-upload-inline-heading h3 {
    margin: 0;
}

.files-dropzone {
    align-items: center;
    background: linear-gradient(180deg, rgba(241, 247, 243, 0.98) 0%, rgba(222, 234, 226, 0.88) 100%);
    border: 1.5px dashed rgba(31, 111, 75, 0.34);
    border-radius: 1.2rem;
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    min-height: 10.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.files-dropzone:hover,
.files-dropzone.is-dragover {
    border-color: rgba(31, 111, 75, 0.6);
    box-shadow: 0 1rem 2rem rgba(31, 111, 75, 0.14);
    transform: translateY(-1px);
}

.files-upload-actions {
    align-items: center;
    justify-content: space-between;
}

.files-upload-actions .form-note {
    margin: 0;
}

.files-upload-actions .form-note.is-error {
    color: #8d1f1f;
    font-weight: 700;
}

.files-upload-progress {
    display: grid;
    gap: 0.55rem;
}

.files-upload-progress-bar {
    background: rgba(31, 111, 75, 0.12);
    border-radius: 999px;
    height: 0.8rem;
    overflow: hidden;
    width: 100%;
}

.files-upload-progress-fill {
    background: linear-gradient(135deg, #2d9d68 0%, #1f6f4b 100%);
    border-radius: inherit;
    height: 100%;
    transition: width 0.16s ease;
    width: 0%;
}

.files-upload-progress-meta {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.files-upload-progress-meta .form-note {
    margin: 0;
}

.files-filter-form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.files-filter-fields {
    align-items: end;
}

.files-filter-actions {
    justify-content: flex-start;
}

.files-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}

.files-main-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.files-main-panel > .form-note {
    margin: 0;
}

.files-main-heading {
    align-items: center;
    gap: 1rem;
}

.files-main-heading > div {
    display: grid;
    gap: 0.2rem;
}

.files-main-heading h2,
.files-main-heading span {
    margin: 0;
}

.files-clear-action {
    flex: 0 0 auto;
}

.shared-file-card {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    border-radius: calc(1rem * clamp(0.9, var(--ui-box-scale), 1.2));
    display: grid;
    gap: calc(1rem * var(--ui-box-scale));
    grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
    overflow: hidden;
    padding: var(--ui-card-padding);
}

.shared-file-card.is-unread {
    border-color: color-mix(in srgb, #d75873 38%, var(--line));
    box-shadow: 0 0 0 2px color-mix(in srgb, #d75873 12%, transparent);
}

.shared-file-preview {
    align-items: center;
    background: linear-gradient(180deg, rgba(241, 247, 243, 0.98) 0%, rgba(222, 234, 226, 0.88) 100%);
    border: 1px solid rgba(31, 111, 75, 0.12);
    border-radius: calc(0.95rem * clamp(0.9, var(--ui-box-scale), 1.18));
    display: flex;
    justify-content: center;
    min-height: 9rem;
    overflow: hidden;
}

.shared-file-preview-button {
    appearance: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
}

.shared-file-preview img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.shared-file-icon {
    align-items: center;
    background: linear-gradient(135deg, #2d9d68 0%, #1f6f4b 100%);
    border-radius: 1rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    color: #fff;
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.12em;
    min-height: 5.5rem;
    min-width: 5.5rem;
    padding: 0.75rem;
    text-transform: uppercase;
}

.shared-file-body {
    display: grid;
    gap: 0.9rem;
}

.shared-file-copy {
    display: grid;
    gap: 0.35rem;
}

.shared-file-copy-top {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.shared-file-copy-top h3 {
    flex: 1 1 auto;
    min-width: 0;
}

.shared-file-unread-marker {
    align-items: center;
    background: linear-gradient(135deg, rgba(215, 88, 115, 0.14), rgba(191, 63, 95, 0.2));
    border: 1px solid rgba(191, 63, 95, 0.24);
    border-radius: 999px;
    color: #a33c58;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    padding: 0.3rem 0.58rem;
    text-transform: uppercase;
}

.shared-file-copy h3,
.shared-file-copy p {
    margin: 0;
    overflow-wrap: anywhere;
}

.shared-file-copy h3 {
    font-size: var(--ui-card-heading-size);
    line-height: 1.12;
}

.shared-file-source,
.shared-file-meta {
    font-size: var(--ui-card-meta-size);
}

.shared-file-actions {
    align-items: stretch;
    display: grid;
    gap: calc(0.65rem * var(--ui-box-scale));
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.shared-file-actions form {
    display: flex;
    margin: 0;
}

.shared-file-actions > *,
.shared-file-actions form > * {
    width: 100%;
}

.shared-file-disabled-button {
    align-items: center;
    background: rgba(95, 110, 104, 0.18);
    border-color: rgba(95, 110, 104, 0.24) !important;
    box-shadow: none;
    color: rgba(36, 43, 39, 0.78) !important;
    cursor: default;
    display: inline-flex;
    justify-content: center;
    min-height: 2.85rem;
    text-align: center;
}

.files-delete-modal {
    max-width: 28rem;
}

.files-delete-confirm-copy {
    margin-bottom: 0;
}

.shared-files-empty {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .discussions-page-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .discussions-map-panel,
    .discussions-main-panel {
        max-height: none;
        overflow-y: visible;
        position: static;
    }

    .discussion-graph-viewport {
        min-height: 32rem;
    }

    .discussion-thread-scroll {
        max-height: none;
    }

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

    .files-sidebar-panel {
        max-height: none;
        position: static;
    }

    .files-side-nav {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

.blocked-chat-card {
    align-content: start;
}

.blocked-chat-note {
    margin: 0;
}

@media screen and (max-width: 900px) {
    .news-feed-list {
        column-count: 2;
    }

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

    .news-editor-list-card {
        grid-template-columns: 1fr;
    }

    .discussion-post-top {
        align-items: stretch;
        flex-direction: column;
    }

    .discussion-thread-message {
        grid-template-columns: 1fr;
    }

    .friends-grid {
        grid-template-columns: 1fr;
    }

    .files-grid {
        grid-template-columns: 1fr;
    }

    .shared-file-card {
        grid-template-columns: 1fr;
    }

    .shared-file-preview {
        min-height: 12rem;
    }

    .files-upload-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .files-upload-progress-meta {
        align-items: stretch;
        flex-direction: column;
    }
}

@media screen and (max-width: 1180px) {
    .market-layout {
        grid-template-columns: 1fr;
    }
}

.gallery-scroll {
    margin-top: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
}

.gallery-grid {
    display: grid;
    gap: 1rem;
    grid-auto-columns: minmax(13.5rem, 16rem);
    grid-auto-flow: column;
}

.photo-tile {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    border-radius: 1rem;
    margin: 0;
    min-height: 13rem;
    overflow: hidden;
    position: relative;
}

.photo-delete-form {
    margin: 0;
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    z-index: 2;
}

.photo-delete-button {
    align-items: center;
    appearance: none;
    background: #c62828;
    border: 0;
    border-radius: 999px;
    color: #ffeb3b;
    cursor: pointer;
    display: inline-flex;
    font-family: var(--ui-font-family), sans-serif;
    font-size: calc(0.72rem * var(--ui-button-font-scale));
    font-weight: 700;
    justify-content: center;
    letter-spacing: 0.12em;
    min-width: 5.5rem;
    padding: 0.5rem 0.9rem;
    text-align: center;
    text-transform: uppercase;
}

.photo-delete-button:hover {
    background: #a91f1f;
}

.photo-tile figcaption {
    background: linear-gradient(180deg, transparent, rgba(18, 13, 11, 0.82));
    bottom: 0;
    color: #fff;
    left: 0;
    padding: 0.7rem 0.9rem;
    position: absolute;
    right: 0;
}

.photo-badge {
    background: rgba(255, 250, 245, 0.94);
    border-radius: 999px;
    color: var(--accent-deep);
    font-size: 0.78rem;
    font-weight: 700;
    left: 0.75rem;
    padding: 0.35rem 0.7rem;
    position: absolute;
    top: 0.75rem;
}

.empty-state {
    background: rgba(255, 255, 255, 0.55);
    border: 1px dashed var(--line);
    border-radius: 1rem;
    padding: 1.2rem;
}

.visually-hidden {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media screen and (max-width: 980px) {
    .landing-shell,
    .dashboard-grid,
    .profile-grid,
    .feature-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-logo {
        max-width: min(18rem, 60vw);
    }
}

@media screen and (max-width: 980px) {
    .site-shell {
        --site-sidebar-width: clamp(13rem, 30vw, 16rem);
        --site-sidebar-collapsed-width: 6rem;
        grid-template-columns: var(--site-sidebar-width) minmax(0, 1fr);
        gap: 0.8rem;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
        width: 100%;
    }

    .site-header {
        height: calc(100vh - 0.8rem);
        inset: 0.4rem auto 0.4rem 0.4rem;
        max-height: calc(100vh - 0.8rem);
        padding: 0.9rem 0.8rem 0.85rem;
        position: fixed;
        width: var(--site-sidebar-width);
    }

    .site-main {
        grid-column: 2;
    }

    .site-header-top {
        align-items: start;
    }

    .site-nav {
        grid-template-rows: minmax(0, 1fr);
        overflow: hidden;
    }

    .site-nav-primary,
    .site-nav-link-cluster,
    .site-nav-icon-cluster {
        grid-template-columns: 1fr;
    }

    .site-nav-primary {
        overflow-y: auto;
        padding-right: 0.1rem;
    }

    .site-sidebar-toggle {
        display: inline-flex;
    }

}

@media screen and (max-width: 736px) {
    .site-shell {
        --site-sidebar-width: clamp(12.5rem, 42vw, 14.5rem);
        --site-sidebar-collapsed-width: 5.8rem;
        grid-template-columns: var(--site-sidebar-width) minmax(0, 1fr);
        gap: 0.55rem;
        padding-left: 0.3rem;
        padding-right: 0.3rem;
        width: 100%;
    }

    .site-header {
        height: calc(100vh - 0.7rem);
        inset: 0.35rem auto 0.35rem 0.3rem;
        max-height: calc(100vh - 0.7rem);
        padding: 0.75rem 0.7rem 0.75rem;
        width: var(--site-sidebar-width);
    }

    .site-main,
    .flash-stack {
        width: 100%;
        max-width: 100%;
    }

    .site-main {
        grid-column: 2;
    }

    .brand-mark {
        justify-content: flex-start;
    }

    .site-nav-primary,
    .site-nav-link-cluster,
    .site-nav-icon-cluster {
        grid-template-columns: 1fr;
    }

    .site-nav-link-with-icon,
    .site-nav-utility-button {
        min-height: 3rem;
        padding-left: 0.72rem;
        padding-right: 0.72rem;
    }

    .panel {
        padding: clamp(1rem, calc(1.4rem * var(--ui-box-scale)), 2rem);
    }

}

.lectures-page-shell,
.lecture-room-shell {
    display: grid;
    gap: 1.5rem;
}

.lectures-start-panel,
.lectures-live-panel,
.lecture-room-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lectures-start-form {
    display: grid;
    gap: 1rem;
}

.lecture-start-note {
    max-width: 56rem;
}

.lectures-start-actions,
.lecture-room-header-actions,
.lecture-chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.lectures-live-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.lecture-live-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    min-height: 14rem;
}

.lecture-live-card-copy h3,
.lecture-live-card-copy p {
    margin: 0;
}

.lecture-live-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.lecture-live-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    color: var(--text);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lecture-room-heading {
    align-items: flex-start;
}

.lecture-room-header-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.lecture-room-header-actions form {
    display: flex;
    margin: 0;
}

.lecture-room-header-actions .button {
    white-space: nowrap;
}

.lecture-room-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(20rem, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.lecture-stage-card,
.lecture-chat-card {
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
}

.lecture-stage-card {
    min-width: 0;
}

.lecture-video-shell {
    position: relative;
    min-height: 30rem;
    border-radius: 1.2rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(5, 14, 23, 0.92), rgba(5, 14, 23, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
}

.lecture-room-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.lecture-room-status {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    max-width: calc(100% - 2rem);
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(6, 11, 18, 0.7);
    color: #fff;
    font-size: 0.88rem;
    backdrop-filter: blur(8px);
}

.lecture-comment-overlay {
    position: absolute;
    left: 50%;
    bottom: 4.25rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: min(42rem, calc(100% - 3rem));
    padding: 1rem 1.25rem;
    border-radius: 1.2rem;
    background: rgba(10, 16, 26, 0.84);
    color: #fff;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.lecture-comment-overlay strong {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lecture-comment-overlay span {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    line-height: 1.45;
}

.lecture-chat-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 32rem;
}

.lecture-chat-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.lecture-chat-header h3,
.lecture-chat-header p {
    margin: 0;
}

.lecture-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-height: 14rem;
    max-height: 34rem;
    overflow: auto;
    padding-right: 0.2rem;
}

.lecture-chat-empty[hidden] {
    display: none;
}

.lecture-chat-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lecture-chat-form textarea {
    min-height: 7rem;
    resize: vertical;
}

.lecture-chat-actions {
    justify-content: flex-end;
}

.lecture-chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel) 84%, white 16%);
    color: var(--text);
}

.lecture-chat-message.is-own {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    background: color-mix(in srgb, var(--accent-soft) 34%, var(--panel));
}

.lecture-chat-message-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
    font-size: 0.86rem;
}

.lecture-chat-message-top span {
    color: var(--text-muted);
    white-space: nowrap;
}

.lecture-chat-message p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .lecture-room-layout {
        grid-template-columns: 1fr;
    }

    .lecture-video-shell {
        min-height: 24rem;
    }

    .lecture-chat-card {
        min-height: 0;
    }
}

@media (max-width: 720px) {
    .lectures-live-list {
        grid-template-columns: 1fr;
    }

    .lectures-start-actions .button {
        width: 100%;
    }

    .lecture-room-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .lecture-video-shell {
        min-height: 18rem;
    }

    .lecture-comment-overlay {
        width: calc(100% - 1.5rem);
        bottom: 1.2rem;
    }
}

@supports (content-visibility: auto) {
    .member-card-shell,
    .market-card,
    .shared-media-tile-shell,
    .notes-list-item,
    .notes-attachment-card,
    .local-whiteboard-list-item {
        content-visibility: auto;
        contain-intrinsic-size: 18rem;
    }

    .shared-media-tile-shell {
        contain-intrinsic-size: 9rem;
    }

    .notes-list-item,
    .local-whiteboard-list-item {
        contain-intrinsic-size: 7rem;
    }
}
