/*
  TaksaCord theme system v1.
  This file is intentionally loaded after styles.css and acts as the
  semantic theme layer while the older versioned CSS is being retired.
*/

:root {
  color-scheme: dark;

  --tc-bg-base: #07111d;
  --tc-bg-canvas: #0a1624;
  --tc-bg-soft: #101f31;
  --tc-bg-cloud-a: rgba(49, 220, 229, 0.22);
  --tc-bg-cloud-b: rgba(122, 103, 255, 0.2);
  --tc-bg-cloud-c: rgba(255, 156, 92, 0.12);

  --tc-surface-shell: rgba(10, 20, 33, 0.58);
  --tc-surface-rail: rgba(7, 18, 30, 0.68);
  --tc-surface-sidebar: rgba(13, 27, 43, 0.62);
  --tc-surface-main: rgba(17, 30, 48, 0.48);
  --tc-surface-members: rgba(10, 23, 37, 0.58);
  --tc-surface-panel: rgba(18, 34, 52, 0.54);
  --tc-surface-card: rgba(24, 42, 63, 0.46);
  --tc-surface-card-muted: rgba(12, 27, 43, 0.38);
  --tc-surface-elevated: rgba(14, 29, 47, 0.66);
  --tc-surface-elevated-soft: rgba(18, 35, 56, 0.58);
  --tc-surface-profile: rgba(13, 28, 46, 0.72);
  --tc-surface-field: rgba(3, 12, 22, 0.36);
  --tc-surface-hover: rgba(61, 226, 234, 0.1);
  --tc-surface-active: rgba(61, 226, 234, 0.16);

  --tc-border-subtle: rgba(164, 193, 228, 0.16);
  --tc-border: rgba(164, 193, 228, 0.22);
  --tc-border-strong: rgba(61, 226, 234, 0.45);

  --tc-text-primary: #f7fbff;
  --tc-text-secondary: #c9d7e8;
  --tc-text-muted: #8fa2b7;
  --tc-text-faint: #64778c;
  --tc-text-inverse: #06111d;

  --tc-accent: #31dce5;
  --tc-accent-2: #7b67ff;
  --tc-accent-contrast: #041017;
  --tc-success: #39e59b;
  --tc-danger: #ef3f73;
  --tc-danger-readable: #ffd8e3;
  --tc-offline-readable: #ff9db4;
  --tc-warning: #f3ae55;

  --tc-radius-sm: 8px;
  --tc-radius-md: 12px;
  --tc-radius-lg: 16px;
  --tc-radius-xl: 22px;
  --tc-shape-cut: 16px;
  --tc-shape-cut-sm: 9px;
  --tc-shape-radius: 5px;
  --tc-shadow-soft: 0 18px 56px rgba(1, 7, 15, 0.3);
  --tc-shadow-strong: 0 28px 90px rgba(1, 7, 15, 0.42);
  --tc-focus-ring: 0 0 0 3px rgba(49, 220, 229, 0.22);
  --tc-glass-blur: blur(28px) saturate(1.22);

  --bg: var(--tc-bg-base);
  --bg-2: var(--tc-bg-canvas);
  --panel: var(--tc-surface-panel);
  --panel-solid: var(--tc-bg-soft);
  --panel-2: var(--tc-surface-card);
  --panel-3: var(--tc-surface-card-muted);
  --line: var(--tc-border);
  --text: var(--tc-text-primary);
  --soft: var(--tc-text-secondary);
  --muted: var(--tc-text-muted);
  --accent: var(--tc-accent);
  --accent-2: var(--tc-success);
  --danger: var(--tc-danger);
  --shadow: var(--tc-shadow-strong);
  --radius: var(--tc-radius-sm);

  --simple-bg: var(--tc-bg-base);
  --simple-bg-2: var(--tc-bg-canvas);
  --simple-panel: var(--tc-surface-panel);
  --simple-panel-2: var(--tc-surface-card);
  --simple-panel-3: var(--tc-surface-card-muted);
  --simple-line: var(--tc-border);
  --simple-line-strong: var(--tc-border-strong);
  --simple-text: var(--tc-text-primary);
  --simple-soft: var(--tc-text-secondary);
  --simple-muted: var(--tc-text-muted);
  --simple-accent: var(--tc-accent);
  --simple-green: var(--tc-success);
  --simple-danger: var(--tc-danger);

  --v04-bg: var(--tc-bg-base);
  --v04-panel: var(--tc-surface-panel);
  --v04-panel-2: var(--tc-surface-card);
  --v04-panel-3: var(--tc-surface-card-muted);
  --v04-line: var(--tc-border-subtle);
  --v04-line-strong: var(--tc-border-strong);
  --v04-cyan: var(--tc-accent);
  --v04-green: var(--tc-success);
  --v04-purple: var(--tc-accent-2);

  --glass-bright: rgba(255, 255, 255, 0.075);
  --glass-dim: rgba(255, 255, 255, 0.025);
  --glass-shadow: var(--tc-shadow-strong);
}

:root[data-theme="light"] {
  color-scheme: light;

  --tc-bg-base: #9aa4d2;
  --tc-bg-canvas: #c9a7c0;
  --tc-bg-soft: #b6bbdc;
  --tc-bg-cloud-a: rgba(118, 149, 229, 0.34);
  --tc-bg-cloud-b: rgba(219, 140, 189, 0.3);
  --tc-bg-cloud-c: rgba(255, 194, 160, 0.24);

  --tc-surface-shell: rgba(118, 126, 174, 0.36);
  --tc-surface-rail: rgba(88, 99, 154, 0.44);
  --tc-surface-sidebar: rgba(112, 120, 170, 0.42);
  --tc-surface-main: rgba(126, 136, 190, 0.34);
  --tc-surface-members: rgba(96, 108, 170, 0.48);
  --tc-surface-panel: rgba(78, 92, 156, 0.58);
  --tc-surface-card: rgba(84, 98, 164, 0.56);
  --tc-surface-card-muted: rgba(70, 84, 150, 0.5);
  --tc-surface-elevated: rgba(58, 72, 138, 0.76);
  --tc-surface-elevated-soft: rgba(78, 92, 158, 0.66);
  --tc-surface-profile: rgba(54, 68, 132, 0.74);
  --tc-surface-field: rgba(226, 229, 250, 0.3);
  --tc-surface-hover: rgba(255, 255, 255, 0.18);
  --tc-surface-active: rgba(142, 166, 255, 0.26);

  --tc-border-subtle: rgba(236, 241, 255, 0.22);
  --tc-border: rgba(240, 244, 255, 0.3);
  --tc-border-strong: rgba(242, 247, 255, 0.56);

  --tc-text-primary: #f9fbff;
  --tc-text-secondary: #e3e8ff;
  --tc-text-muted: #cbd2ef;
  --tc-text-faint: #aeb7dc;
  --tc-text-inverse: #2d3155;

  --tc-accent: #d4e2ff;
  --tc-accent-2: #dda3f1;
  --tc-accent-contrast: #35406b;
  --tc-success: #c7f7de;
  --tc-danger: #ff7999;
  --tc-danger-readable: #fff0f5;
  --tc-offline-readable: #ffe4ec;
  --tc-warning: #ffd49a;

  --tc-shadow-soft: 0 18px 54px rgba(61, 58, 105, 0.14);
  --tc-shadow-strong: 0 28px 88px rgba(61, 58, 105, 0.2);
  --tc-focus-ring: 0 0 0 3px rgba(242, 247, 255, 0.24);
  --tc-glass-blur: blur(11px) saturate(1.08);
  --glass-bright: rgba(255, 255, 255, 0.18);
  --glass-dim: rgba(255, 255, 255, 0.06);
}

:root[data-theme="beige"] {
  color-scheme: light;

  --beige-bg: #e4d8c7;
  --beige-bg-soft: #eadfce;
  --beige-bg-warm: #ded0bd;
  --beige-surface: #f1e7d9;
  --beige-surface-soft: #f5ede2;
  --beige-surface-muted: #e8dccb;
  --beige-surface-strong: #ddd0be;
  --beige-border: rgba(132, 104, 74, 0.18);
  --beige-border-strong: rgba(132, 104, 74, 0.28);
  --beige-text: #2d261f;
  --beige-text-soft: #5f5348;
  --beige-text-muted: #827568;
  --beige-text-faint: #a09384;
  --beige-accent: #a98fc5;
  --beige-accent-soft: #c9b7d9;
  --beige-accent-muted: #b89ecb;
  --beige-champagne: #d7b982;
  --beige-champagne-soft: #ead4aa;
  --beige-rose: #d9aaa2;
  --beige-rose-soft: #e8c2bb;
  --beige-sand: #cdb895;
  --beige-gold-muted: #bd935d;
  --beige-success: #39b976;
  --beige-danger: #d96f78;

  --tc-bg-base: var(--beige-bg);
  --tc-bg-canvas: var(--beige-bg-warm);
  --tc-bg-soft: var(--beige-bg-soft);
  --tc-bg-cloud-a: rgba(203, 169, 124, 0.22);
  --tc-bg-cloud-b: rgba(169, 143, 197, 0.18);
  --tc-bg-cloud-c: rgba(217, 170, 162, 0.16);

  --tc-surface-shell: rgba(241, 231, 217, 0.78);
  --tc-surface-rail: rgba(218, 204, 186, 0.82);
  --tc-surface-sidebar: rgba(231, 219, 203, 0.86);
  --tc-surface-main: rgba(241, 231, 217, 0.58);
  --tc-surface-members: rgba(232, 220, 203, 0.72);
  --tc-surface-panel: rgba(241, 231, 217, 0.84);
  --tc-surface-card: rgba(247, 240, 230, 0.84);
  --tc-surface-card-muted: rgba(239, 228, 213, 0.7);
  --tc-surface-elevated: rgba(226, 211, 193, 0.9);
  --tc-surface-elevated-soft: rgba(235, 222, 205, 0.84);
  --tc-surface-profile: rgba(220, 204, 184, 0.92);
  --tc-surface-field: rgba(239, 228, 213, 0.72);
  --tc-surface-hover: rgba(245, 237, 226, 0.58);
  --tc-surface-active: rgba(218, 199, 227, 0.62);

  --tc-border-subtle: var(--beige-border);
  --tc-border: rgba(132, 104, 74, 0.2);
  --tc-border-strong: rgba(169, 143, 197, 0.35);

  --tc-text-primary: var(--beige-text);
  --tc-text-secondary: var(--beige-text-soft);
  --tc-text-muted: var(--beige-text-muted);
  --tc-text-faint: var(--beige-text-faint);
  --tc-text-inverse: #fffaf1;

  --tc-accent: var(--beige-accent);
  --tc-accent-2: var(--beige-champagne);
  --tc-accent-contrast: var(--beige-text);
  --tc-success: var(--beige-success);
  --tc-danger: var(--beige-danger);
  --tc-danger-readable: #8f3845;
  --tc-offline-readable: #9a4b58;
  --tc-warning: var(--beige-champagne);

  --tc-shadow-soft: 0 12px 32px rgba(83, 62, 43, 0.08);
  --tc-shadow-strong: 0 24px 70px rgba(83, 62, 43, 0.14);
  --tc-focus-ring: 0 0 0 3px rgba(169, 143, 197, 0.18);
  --tc-glass-blur: blur(14px) saturate(1.12);
  --glass-bright: rgba(255, 248, 235, 0.46);
  --glass-dim: rgba(231, 211, 188, 0.18);

  --panel-bg: linear-gradient(180deg, rgba(247, 240, 230, 0.92), rgba(235, 224, 209, 0.86));
  --panel-border: var(--beige-border);
  --panel-shadow: 0 18px 45px rgba(83, 62, 43, 0.1), inset 0 1px 0 rgba(255, 249, 238, 0.68);
  --shadow-soft: 0 12px 32px rgba(83, 62, 43, 0.08);
  --shadow-card: 0 18px 45px rgba(83, 62, 43, 0.1);
  --shadow-elevated: 0 24px 70px rgba(83, 62, 43, 0.14);
}

:root[data-theme="retro"] {
  color-scheme: light;

  --retro-paper: #f1dfb6;
  --retro-paper-soft: #fff0cf;
  --retro-paper-muted: #ddc17e;
  --retro-paper-deep: #ad7d3a;
  --retro-ink: #1e1b2f;
  --retro-ink-soft: #312d46;
  --retro-muted: #67563c;
  --retro-faint: #8b7149;
  --retro-indigo: #403b52;
  --retro-indigo-deep: #242235;
  --retro-orange: #d26e34;
  --retro-orange-deep: #8f4329;
  --retro-olive: #464c2e;
  --retro-green: #5b9a58;
  --retro-danger: #b64b54;
  --retro-line: rgba(31, 27, 37, 0.42);
  --retro-line-strong: rgba(31, 27, 37, 0.62);
  --retro-font: "Cascadia Mono", "Bahnschrift Condensed", "Arial Narrow", "Courier New", monospace;
  --retro-paper-texture:
    radial-gradient(circle at 11px 13px, rgba(47, 35, 24, 0.14) 0 0.55px, transparent 0.95px),
    radial-gradient(circle at 38px 31px, rgba(255, 244, 213, 0.34) 0 0.7px, transparent 1.15px),
    radial-gradient(circle at 69px 57px, rgba(76, 53, 32, 0.08) 0 0.6px, transparent 1px),
    repeating-linear-gradient(7deg, rgba(60, 43, 28, 0.028) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(93deg, rgba(255, 249, 225, 0.04) 0 1px, transparent 1px 14px);
  --retro-paper-creases:
    linear-gradient(112deg, transparent 0 32%, rgba(255, 250, 228, 0.11) 33%, transparent 35%),
    linear-gradient(74deg, transparent 0 62%, rgba(74, 49, 28, 0.055) 63%, transparent 65%),
    radial-gradient(ellipse 90% 48% at 12% 84%, rgba(79, 55, 33, 0.045), transparent 62%),
    radial-gradient(ellipse 70% 42% at 92% 9%, rgba(255, 250, 228, 0.09), transparent 56%);
  --retro-paper-scuffs:
    radial-gradient(ellipse 80px 18px at 8% 4%, rgba(38, 31, 27, 0.1), transparent 72%),
    radial-gradient(ellipse 120px 16px at 91% 97%, rgba(38, 31, 27, 0.09), transparent 70%),
    linear-gradient(91deg, transparent 0 9%, rgba(38, 31, 27, 0.08) 10%, transparent 11% 58%, rgba(255, 246, 216, 0.12) 59%, transparent 61%);
  --retro-paper-overlay:
    var(--retro-paper-scuffs),
    var(--retro-paper-creases),
    linear-gradient(104deg, transparent 0 36%, rgba(255, 250, 226, 0.12) 37%, transparent 39%),
    linear-gradient(76deg, transparent 0 58%, rgba(54, 38, 24, 0.055) 59%, transparent 61%);
  --retro-worn-frame:
    linear-gradient(90deg, transparent 0 4%, rgba(31, 27, 37, 0.3) 5% 16%, transparent 17% 24%, rgba(31, 27, 37, 0.44) 25% 57%, transparent 58% 64%, rgba(31, 27, 37, 0.26) 65% 91%, transparent 92% 100%) top left / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(31, 27, 37, 0.22) 0 10%, transparent 11% 19%, rgba(31, 27, 37, 0.4) 20% 43%, transparent 44% 53%, rgba(31, 27, 37, 0.32) 54% 78%, transparent 79% 100%) bottom left / 100% 1px no-repeat,
    linear-gradient(0deg, transparent 0 7%, rgba(31, 27, 37, 0.28) 8% 26%, transparent 27% 41%, rgba(31, 27, 37, 0.4) 42% 71%, transparent 72% 100%) top left / 1px 100% no-repeat,
    linear-gradient(0deg, rgba(31, 27, 37, 0.22) 0 20%, transparent 21% 37%, rgba(31, 27, 37, 0.42) 38% 69%, transparent 70% 83%, rgba(31, 27, 37, 0.2) 84% 100%) top right / 1px 100% no-repeat,
    radial-gradient(circle at 10px 10px, rgba(31, 27, 37, 0.28) 0 0.7px, transparent 1.4px),
    radial-gradient(circle at calc(100% - 11px) calc(100% - 10px), rgba(31, 27, 37, 0.24) 0 0.7px, transparent 1.5px);

  --tc-bg-base: var(--retro-indigo-deep);
  --tc-bg-canvas: var(--retro-indigo);
  --tc-bg-soft: var(--retro-paper-muted);
  --tc-bg-cloud-a: rgba(233, 216, 183, 0.18);
  --tc-bg-cloud-b: rgba(198, 111, 62, 0.14);
  --tc-bg-cloud-c: rgba(37, 35, 61, 0.16);

  --tc-surface-shell: rgba(242, 223, 184, 0.96);
  --tc-surface-rail: rgba(234, 206, 150, 0.96);
  --tc-surface-sidebar: rgba(241, 218, 171, 0.95);
  --tc-surface-main: rgba(36, 34, 53, 0.72);
  --tc-surface-members: rgba(240, 216, 169, 0.94);
  --tc-surface-panel: rgba(245, 226, 185, 0.95);
  --tc-surface-card: rgba(252, 235, 199, 0.94);
  --tc-surface-card-muted: rgba(181, 132, 64, 0.2);
  --tc-surface-elevated: rgba(232, 199, 136, 0.98);
  --tc-surface-elevated-soft: rgba(241, 216, 162, 0.94);
  --tc-surface-profile: rgba(57, 52, 76, 0.86);
  --tc-surface-field: rgba(233, 216, 183, 0.54);
  --tc-surface-hover: rgba(198, 111, 62, 0.13);
  --tc-surface-active: rgba(198, 111, 62, 0.32);

  --tc-border-subtle: var(--retro-line);
  --tc-border: rgba(63, 53, 38, 0.32);
  --tc-border-strong: rgba(157, 79, 47, 0.58);

  --tc-text-primary: var(--retro-ink);
  --tc-text-secondary: var(--retro-ink-soft);
  --tc-text-muted: var(--retro-muted);
  --tc-text-faint: var(--retro-faint);
  --tc-text-inverse: var(--retro-paper-soft);

  --tc-accent: var(--retro-orange);
  --tc-accent-2: var(--retro-olive);
  --tc-accent-contrast: var(--retro-paper-soft);
  --tc-success: var(--retro-green);
  --tc-danger: var(--retro-danger);
  --tc-danger-readable: #7e2d35;
  --tc-offline-readable: #8c3c45;
  --tc-warning: #cf9b55;

  --tc-radius-sm: 7px;
  --tc-radius-md: 8px;
  --tc-radius-lg: 10px;
  --tc-radius-xl: 12px;
  --tc-shadow-soft: 0 12px 24px rgba(24, 22, 34, 0.24);
  --tc-shadow-strong: 0 20px 54px rgba(18, 16, 26, 0.34);
  --tc-focus-ring: 0 0 0 3px rgba(198, 111, 62, 0.22);
  --tc-glass-blur: none;
  --glass-bright: rgba(255, 249, 228, 0.52);
  --glass-dim: rgba(111, 88, 55, 0.08);

  --panel-bg:
    var(--retro-paper-scuffs),
    var(--retro-paper-creases),
    var(--retro-paper-texture),
    linear-gradient(180deg, rgba(253, 236, 199, 0.98), rgba(228, 194, 119, 0.94));
  --panel-border: var(--retro-line);
  --panel-shadow: 0 16px 34px rgba(18, 16, 26, 0.28), inset 0 0 0 1px rgba(52, 41, 26, 0.2), inset 0 1px 0 rgba(255, 238, 187, 0.68);
  --shadow-soft: 0 12px 24px rgba(18, 16, 26, 0.22);
  --shadow-card: 0 16px 34px rgba(18, 16, 26, 0.28);
  --shadow-elevated: 0 20px 54px rgba(18, 16, 26, 0.34);
}

:root[data-theme="kattydrift"] {
  color-scheme: light;

  --katty-cream: #fff6f9;
  --katty-milk: #ffeaf3;
  --katty-blush: #ffd2e2;
  --katty-pink: #f7a9c5;
  --katty-rose: #d85d8b;
  --katty-berry: #9b315f;
  --katty-lilac: #d8c8ff;
  --katty-peach: #ffd8be;
  --katty-mint: #7ed8bd;
  --katty-honey: #b9793e;
  --katty-ink: #37202c;
  --katty-ink-soft: #694252;
  --katty-muted: #8d6373;
  --katty-line: rgba(154, 68, 104, 0.22);
  --katty-line-strong: rgba(154, 68, 104, 0.38);

  --katty-mascot-image: url("/assets/kattydrift-mascot.png");

  --tc-bg-base: #ffe2ee;
  --tc-bg-canvas: #f6bfd6;
  --tc-bg-soft: var(--katty-milk);
  --tc-bg-cloud-a: rgba(255, 255, 255, 0.62);
  --tc-bg-cloud-b: rgba(216, 200, 255, 0.42);
  --tc-bg-cloud-c: rgba(255, 216, 190, 0.46);

  --tc-surface-shell: rgba(255, 245, 249, 0.82);
  --tc-surface-rail: rgba(255, 216, 229, 0.84);
  --tc-surface-sidebar: rgba(255, 232, 241, 0.86);
  --tc-surface-main: rgba(255, 232, 243, 0.58);
  --tc-surface-members: rgba(255, 230, 240, 0.8);
  --tc-surface-panel: rgba(255, 244, 249, 0.88);
  --tc-surface-card: rgba(255, 250, 253, 0.9);
  --tc-surface-card-muted: rgba(255, 216, 230, 0.52);
  --tc-surface-elevated: rgba(255, 239, 247, 0.94);
  --tc-surface-elevated-soft: rgba(255, 222, 235, 0.82);
  --tc-surface-profile: rgba(255, 205, 226, 0.92);
  --tc-surface-field: rgba(255, 252, 254, 0.74);
  --tc-surface-hover: rgba(255, 255, 255, 0.58);
  --tc-surface-active: rgba(247, 169, 197, 0.42);

  --tc-border-subtle: var(--katty-line);
  --tc-border: rgba(154, 68, 104, 0.26);
  --tc-border-strong: rgba(216, 93, 139, 0.52);

  --tc-text-primary: var(--katty-ink);
  --tc-text-secondary: var(--katty-ink-soft);
  --tc-text-muted: var(--katty-muted);
  --tc-text-faint: #ad7e90;
  --tc-text-inverse: #fff8fb;

  --tc-accent: var(--katty-rose);
  --tc-accent-2: var(--katty-lilac);
  --tc-accent-cyan: var(--katty-mint);
  --tc-accent-violet: var(--katty-lilac);
  --tc-accent-contrast: #fff8fb;
  --tc-success: #39b982;
  --tc-danger: #cc3e70;
  --tc-danger-readable: #9a2958;
  --tc-offline-readable: #9d4862;
  --tc-warning: var(--katty-honey);

  --tc-radius-sm: 10px;
  --tc-radius-md: 13px;
  --tc-radius-lg: 18px;
  --tc-radius-xl: 24px;
  --tc-shadow-soft: 0 14px 36px rgba(141, 73, 104, 0.12);
  --tc-shadow-strong: 0 26px 76px rgba(141, 73, 104, 0.18);
  --tc-focus-ring: 0 0 0 3px rgba(216, 93, 139, 0.2);
  --tc-glass-blur: blur(18px) saturate(1.18);
  --glass-bright: rgba(255, 255, 255, 0.62);
  --glass-dim: rgba(255, 196, 219, 0.22);

  --panel-bg:
    radial-gradient(circle at 20px 20px, rgba(216, 93, 139, 0.055) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 72px 58px, rgba(255, 255, 255, 0.48) 0 1px, transparent 1.8px),
    linear-gradient(145deg, rgba(255, 250, 253, 0.94), rgba(255, 219, 234, 0.86));
  --panel-border: var(--katty-line);
  --panel-shadow: 0 18px 48px rgba(141, 73, 104, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  --shadow-soft: 0 14px 36px rgba(141, 73, 104, 0.1);
  --shadow-card: 0 18px 48px rgba(141, 73, 104, 0.12);
  --shadow-elevated: 0 26px 76px rgba(141, 73, 104, 0.18);
}

body {
  color: var(--tc-text-primary);
  background: var(--tc-bg-base);
}

html,
body,
#app {
  max-width: 100vw;
  overflow-x: hidden;
}

:root {
  --tc-shell-gutter: clamp(12px, 1.8vw, 40px);
  --tc-rail-width-base: clamp(64px, 4vw, 88px);
  --tc-sidebar-width-base: clamp(260px, 15.5vw, 390px);
  --tc-members-width-base: clamp(238px, 14.5vw, 360px);
  --tc-interface-scale: 1;
  --tc-interface-requested-scale: 1;
  --tc-interface-inverse-scale: 1;
  --tc-interface-fit-scale: 1;
  --tc-interface-width: 100%;
  --tc-interface-height: 100%;
  --tc-rail-width: calc(var(--tc-rail-width-base) * var(--tc-interface-scale));
  --tc-sidebar-width: calc(var(--tc-sidebar-width-base) * var(--tc-interface-scale));
  --tc-members-width: calc(var(--tc-members-width-base) * var(--tc-interface-scale));
  --tc-shell-font-size: calc(clamp(14px, 0.76vw, 15px) * var(--tc-interface-scale));
  --tc-settings-nav-width: clamp(332px, calc(clamp(300px, 14vw, 330px) * var(--tc-interface-scale)), 500px);
  --tc-settings-nav-pad-x: clamp(16px, 1.05vw, 24px);
  --tc-settings-nav-pad-y: clamp(22px, 1.35vw, 30px);
  --tc-settings-row-min-height: clamp(44px, 2.7vw, 58px);
  --tc-settings-row-gap: clamp(10px, 0.65vw, 14px);
  --tc-settings-row-icon: clamp(22px, 1.2vw, 26px);
}

.app-bg {
  width: 100%;
  height: 100dvh;
  max-width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
  padding: calc(var(--tc-shell-gutter) / 2);
}

.app-bg .modal-backdrop {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
}

.app-bg > [data-app-dynamic] {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  align-self: start;
  justify-self: center;
  align-items: stretch;
  justify-items: stretch;
  width: var(--tc-interface-width, 100%);
  height: var(--tc-interface-height, 100%);
  min-width: 0;
  min-height: 0;
  zoom: 1;
  transform: none;
  transform-origin: top center;
}

.app-bg > [data-app-dynamic] > * {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
}

.app-bg > [data-mobile-home-nav-slot],
.app-bg > [data-desktop-update-slot],
.app-bg > [data-overlay-slot] {
  pointer-events: none;
  z-index: 80;
}

.app-bg > [data-mobile-home-nav-slot] > *,
.app-bg > [data-desktop-update-slot] > *,
.app-bg > [data-overlay-slot] > * {
  pointer-events: auto;
}

.simple-discord-shell {
  width: 100%;
  height: 100%;
  inline-size: 100%;
  block-size: 100%;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  transform: none !important;
  font-size: var(--tc-shell-font-size, 14px);
  grid-template-columns:
    var(--tc-rail-width)
    var(--tc-sidebar-width)
    minmax(0, 1fr)
    var(--tc-members-width);
  grid-auto-columns: minmax(0, 1fr);
}

.simple-main,
.simple-content {
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.simple-discord-shell.members-hidden,
.simple-discord-shell.global-home-mode.home-without-members {
  grid-template-columns:
    var(--tc-rail-width)
    var(--tc-sidebar-width)
    minmax(0, 1fr);
}

@media (min-width: 2200px) {
  :root {
    --tc-shell-gutter: clamp(24px, 2.2vw, 64px);
    --tc-rail-width-base: clamp(78px, 3.8vw, 104px);
    --tc-sidebar-width-base: clamp(320px, 13vw, 450px);
    --tc-members-width-base: clamp(280px, 12vw, 390px);
    --tc-settings-nav-width: clamp(380px, calc(clamp(330px, 12.5vw, 360px) * var(--tc-interface-scale)), 540px);
    --tc-settings-nav-pad-x: clamp(20px, 0.95vw, 28px);
    --tc-settings-row-min-height: clamp(50px, 2.35vw, 62px);
  }
}

@media (min-width: 1181px) and (max-width: 1600px) {
  :root {
    --tc-shell-gutter: clamp(10px, 1.2vw, 24px);
    --tc-rail-width-base: clamp(58px, 3.8vw, 76px);
    --tc-sidebar-width-base: clamp(220px, 17vw, 300px);
    --tc-members-width-base: clamp(220px, 17vw, 300px);
  }
}

.mobile-menu-trigger,
.mobile-menu-layer {
  display: none;
}

.simple-main,
.simple-content {
  min-width: 0;
}

.server-rail,
.simple-sidebar,
.simple-main,
.simple-members,
.simple-topbar,
.simple-content,
.simple-home,
.direct-inbox-page,
.direct-chat-panel,
.direct-message-list,
.direct-message-form {
  min-inline-size: 0;
  max-inline-size: 100%;
  box-sizing: border-box;
}

.direct-message-form {
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
}

.direct-message-form input,
.direct-message-form textarea {
  min-width: 0;
}

.ui-panel,
.ui-card,
.ui-modal,
.ui-drawer,
.ui-composer,
.ui-dock,
.ui-call-tile {
  color: var(--tc-text-primary);
  border: 1px solid var(--tc-border-subtle);
  background:
    linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
    var(--tc-surface-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--tc-shadow-soft);
  backdrop-filter: var(--tc-glass-blur);
}

.ui-panel {
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-panel);
}

.ui-card {
  background:
    linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
    var(--tc-surface-card);
}

.ui-card-action,
.ui-news-card {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.ui-card-action:hover,
.ui-news-card:hover {
  transform: translateY(-2px);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(145deg, var(--tc-surface-active), transparent),
    var(--tc-surface-card);
}

.ui-list-row {
  color: var(--tc-text-secondary);
  border: 1px solid transparent;
  background: transparent;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.ui-list-row:hover,
.ui-list-row.active,
.ui-list-row.is-active,
.channel-item.active .ui-channel-row,
.voice-channel.active .ui-channel-row {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(90deg, var(--tc-surface-active), rgba(126, 112, 255, 0.08)),
    var(--tc-surface-card-muted);
}

.ui-field,
.ui-composer input,
.ui-composer textarea,
.ui-panel input,
.ui-panel select,
.ui-panel textarea,
.ui-card input,
.ui-card select,
.ui-card textarea,
.ui-modal input,
.ui-modal select,
.ui-modal textarea {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-subtle);
  background: var(--tc-surface-field);
}

.ui-field:focus,
.ui-composer:focus-within,
.ui-panel input:focus,
.ui-panel select:focus,
.ui-panel textarea:focus,
.ui-card input:focus,
.ui-card select:focus,
.ui-card textarea:focus,
.ui-modal input:focus,
.ui-modal select:focus,
.ui-modal textarea:focus {
  border-color: var(--tc-border-strong);
  box-shadow: var(--tc-focus-ring);
  outline: 0;
}

.ui-icon-button,
.ui-dock .dock-icon,
.ui-modal .dock-icon,
.ui-panel .dock-icon,
.ui-card .dock-icon {
  color: var(--tc-text-secondary);
  border-color: var(--tc-border-subtle);
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-card-muted);
}

.ui-icon-button:hover,
.ui-dock .dock-icon:hover,
.ui-modal .dock-icon:hover,
.ui-panel .dock-icon:hover,
.ui-card .dock-icon:hover {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(135deg, var(--tc-surface-active), var(--tc-surface-hover)),
    var(--tc-surface-card);
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--tc-radius-sm);
  padding: 0 14px;
  font-weight: 850;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ui-button:hover {
  transform: translateY(-1px);
}

.ui-button-primary {
  color: var(--tc-accent-contrast);
  border-color: transparent;
  background: linear-gradient(135deg, var(--tc-success), var(--tc-accent));
  box-shadow: 0 12px 30px rgba(36, 210, 190, 0.22);
}

.ui-button-primary:hover {
  color: var(--tc-accent-contrast);
  background: linear-gradient(135deg, var(--tc-success), var(--tc-accent));
  box-shadow: 0 16px 36px rgba(36, 210, 190, 0.3);
}

.ui-button-secondary {
  color: var(--tc-text-secondary);
  border-color: var(--tc-border-subtle);
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-card-muted);
}

.ui-button-secondary:hover,
.ui-button-secondary.active {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(135deg, var(--tc-surface-active), var(--tc-surface-hover)),
    var(--tc-surface-card);
}

.ui-server-row {
  border-radius: var(--tc-radius-md);
  padding: 8px;
}

.ui-upload-zone {
  color: var(--tc-text-secondary);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(145deg, var(--tc-surface-active), transparent),
    var(--tc-surface-card-muted);
}

.ui-upload-zone:hover {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(145deg, var(--tc-surface-active), var(--tc-surface-hover)),
    var(--tc-surface-card);
}

.ui-switch {
  color: var(--tc-text-secondary);
  border-color: var(--tc-border-subtle);
  background: var(--tc-surface-card-muted);
}

.ui-switch:hover {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background: var(--tc-surface-hover);
}

.ui-switch input,
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--tc-accent);
}

input[type="range"] {
  accent-color: var(--tc-accent);
}

select option {
  color: var(--tc-text-primary);
  background: var(--tc-bg-canvas);
}

.link-button,
.file-button {
  color: var(--tc-accent);
}

.file-button {
  border-color: var(--tc-border-subtle);
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-card-muted);
}

.file-button:hover {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background: var(--tc-surface-hover);
}

.sound-row,
.role-row {
  border-color: var(--tc-border-subtle);
  background: var(--tc-surface-card-muted);
}

.sound-row:hover,
.role-row:hover {
  border-color: var(--tc-border-strong);
  background: var(--tc-surface-hover);
}

.auth-copy,
.status-line,
.form-error,
.helper-text,
.channel-kicker {
  color: var(--tc-text-muted);
}

.form-error:not(:empty) {
  color: var(--tc-danger);
}

.animated-bg {
  background:
    radial-gradient(circle at 14% 18%, var(--tc-bg-cloud-a), transparent 34%),
    radial-gradient(circle at 74% 12%, var(--tc-bg-cloud-b), transparent 34%),
    radial-gradient(circle at 86% 84%, var(--tc-bg-cloud-c), transparent 32%),
    linear-gradient(145deg, var(--tc-bg-base) 0%, var(--tc-bg-canvas) 48%, var(--tc-bg-base) 100%);
}

.animated-bg::before {
  opacity: 0.22;
}

:root[data-theme="light"] .animated-bg {
  background:
    radial-gradient(circle at 16% 12%, rgba(217, 226, 255, 0.38), transparent 32%),
    radial-gradient(circle at 78% 18%, rgba(238, 172, 213, 0.34), transparent 34%),
    radial-gradient(circle at 92% 88%, rgba(255, 200, 166, 0.28), transparent 30%),
    linear-gradient(132deg, #7c89c0 0%, #9e93c2 40%, #c091b4 100%);
}

:root[data-theme="light"] .animated-bg::before {
  inset: -12%;
  opacity: 0.46;
  filter: blur(0) saturate(1.18);
  background:
    url("/assets/clouds/light-cloud-a.avif") 5% 18% / min(48vw, 720px) auto no-repeat,
    url("/assets/clouds/light-cloud-b.avif") 102% 82% / min(40vw, 600px) auto no-repeat,
    url("/assets/clouds/light-cloud-main.avif") 78% 3% / min(34vw, 520px) auto no-repeat;
  mix-blend-mode: screen;
  animation: ambientFloat 34s ease-in-out infinite;
}

:root[data-theme="light"] .animated-bg::after {
  inset: -18%;
  opacity: 0.36;
  filter: blur(2px) saturate(1.12);
  background:
    url("/assets/clouds/light-cloud-c.avif") -10% 86% / min(42vw, 660px) auto no-repeat,
    url("/assets/clouds/light-cloud-d.avif") 64% 96% / min(44vw, 700px) auto no-repeat,
    linear-gradient(112deg, transparent 0 30%, rgba(255, 255, 255, 0.16) 31%, transparent 33% 64%, rgba(255, 215, 238, 0.14) 65%, transparent 67%);
  mix-blend-mode: screen;
  animation: ambientFloatReverse 42s ease-in-out infinite;
}

.animated-bg::before,
.animated-bg::after,
.ambient-cloud {
  pointer-events: none;
  backface-visibility: hidden;
}

.cloud-one {
  background: radial-gradient(circle, var(--tc-bg-cloud-a), transparent 72%);
}

.cloud-two {
  background: radial-gradient(circle, var(--tc-bg-cloud-b), transparent 72%);
}

.cloud-three {
  background: radial-gradient(circle, var(--tc-bg-cloud-c), transparent 74%);
}

.cloud-four {
  background: radial-gradient(circle, rgba(78, 236, 166, 0.22), rgba(103, 127, 255, 0.1) 50%, transparent 74%);
}

:root[data-theme="light"] .cloud-four {
  background: radial-gradient(circle, rgba(255, 218, 237, 0.2), rgba(132, 154, 228, 0.12) 50%, transparent 74%);
}

:root[data-theme="light"] .ambient-cloud {
  opacity: 0.44;
  filter: blur(12px) saturate(1.14);
  mix-blend-mode: screen;
}

:root[data-theme="light"] .cloud-one {
  background:
    url("/assets/clouds/light-cloud-main.avif") center / contain no-repeat,
    radial-gradient(circle, var(--tc-bg-cloud-a), transparent 72%);
}

:root[data-theme="light"] .cloud-two {
  background:
    url("/assets/clouds/light-cloud-a.avif") center / contain no-repeat,
    radial-gradient(circle, var(--tc-bg-cloud-b), transparent 72%);
}

:root[data-theme="light"] .cloud-three {
  background:
    url("/assets/clouds/light-cloud-c.avif") center / contain no-repeat,
    radial-gradient(circle, var(--tc-bg-cloud-c), transparent 74%);
}

.cloud-five {
  left: -6vw;
  top: 46vh;
  width: clamp(280px, 26vw, 560px);
  height: clamp(220px, 24vw, 480px);
  animation-duration: 25s;
  animation-delay: -11s;
  background: radial-gradient(circle, rgba(243, 174, 85, 0.13), rgba(122, 103, 255, 0.12) 48%, transparent 74%);
}

.cloud-six {
  right: -5vw;
  top: 58vh;
  width: clamp(300px, 28vw, 620px);
  height: clamp(220px, 24vw, 500px);
  animation-duration: 32s;
  animation-delay: -17s;
  background: radial-gradient(circle, rgba(61, 226, 234, 0.16), rgba(255, 156, 92, 0.1) 50%, transparent 74%);
}

:root[data-theme="light"] .cloud-four {
  background:
    url("/assets/clouds/light-cloud-b.avif") center / contain no-repeat,
    radial-gradient(circle, rgba(255, 218, 237, 0.2), rgba(132, 154, 228, 0.12) 50%, transparent 74%);
}

:root[data-theme="light"] .cloud-five {
  background:
    url("/assets/clouds/light-cloud-d.avif") center / contain no-repeat,
    radial-gradient(circle, rgba(255, 218, 237, 0.24), rgba(132, 154, 228, 0.14) 54%, transparent 76%);
}

:root[data-theme="light"] .cloud-six {
  background:
    url("/assets/clouds/light-cloud-a.avif") center / contain no-repeat,
    radial-gradient(circle, rgba(216, 236, 255, 0.26), rgba(255, 180, 224, 0.16) 52%, transparent 76%);
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(-2%, -2%, 0);
  }

  50% {
    transform: translate3d(2%, 2%, 0);
  }
}

@keyframes ambientFloat {
  0%,
  100% {
    transform: translate3d(-3vw, -2vh, 0) scale(0.96);
  }

  28% {
    transform: translate3d(3vw, 2vh, 0) scale(1.04);
  }

  58% {
    transform: translate3d(1vw, 5vh, 0) scale(1);
  }

  82% {
    transform: translate3d(-2vw, 2vh, 0) scale(1.06);
  }
}

@keyframes ambientFloatReverse {
  0%,
  100% {
    transform: translate3d(3vw, 2vh, 0) scale(1.03);
  }

  30% {
    transform: translate3d(-2vw, 4vh, 0) scale(0.98);
  }

  62% {
    transform: translate3d(-4vw, -1vh, 0) scale(1.06);
  }

  84% {
    transform: translate3d(1vw, -3vh, 0) scale(1);
  }
}

@keyframes mobileDrawerIn {
  from {
    opacity: 0.72;
    clip-path: inset(0 0 0 28px);
  }

  to {
    opacity: 1;
    clip-path: inset(0);
  }
}

.simple-discord-shell {
  color: var(--tc-text-primary);
  border-color: var(--tc-border);
  background:
    linear-gradient(135deg, var(--glass-bright), var(--glass-dim)),
    var(--tc-surface-shell);
  box-shadow: var(--tc-shadow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--tc-glass-blur);
}

.server-rail,
.taksa-rail,
.v15-quick-rail {
  background:
    linear-gradient(180deg, var(--glass-bright), transparent 42%),
    var(--tc-surface-rail);
  border-color: var(--tc-border);
}

.simple-sidebar {
  background:
    radial-gradient(circle at 74% 14%, var(--tc-bg-cloud-a), transparent 34%),
    var(--tc-surface-sidebar);
  border-color: var(--tc-border);
}

.simple-sidebar:has(.theme-menu-host.is-open),
.simple-sidebar:has(.voice-noise-control.is-open) {
  position: relative;
  z-index: 2200;
  overflow: visible;
}

.simple-main {
  background:
    radial-gradient(circle at 72% 12%, var(--tc-bg-cloud-b), transparent 36%),
    var(--tc-surface-main);
  border-color: var(--tc-border);
}

.simple-topbar {
  position: relative;
  z-index: 120;
}

.simple-topbar:has(.theme-menu-host.is-open) {
  z-index: 6200;
  overflow: visible;
}

.simple-members {
  background:
    radial-gradient(circle at 42% 8%, var(--tc-bg-cloud-a), transparent 34%),
    var(--tc-surface-members);
  border-color: var(--tc-border);
}

.v06-section-card,
.v06-server-head,
.v06-topbar,
.glass-card,
.home-panel,
.home-action-card,
.update-news-card,
.server-mini-card,
.settings-modal,
.settings-suite,
.settings-card,
.settings-nav-panel,
.settings-workspace,
.voice-grid,
.v12-voice-panel,
.stream-stage,
.simple-composer,
.profile-modal,
.server-news-card-v18,
.news-drawer-v18,
.news-create-modal-v18,
.news-upload-box-v18,
.news-upload-preview-v19,
.chat-attachment-preview-v20,
.emoji-picker-v20,
.media-viewer-v20,
.server-aside-card-v16,
.notification-row-v19,
.news-list-row-v18,
.invite-box-v19,
.server-empty-news {
  border-color: var(--tc-border-subtle);
  background:
    linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
    var(--tc-surface-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--tc-shadow-soft);
  backdrop-filter: var(--tc-glass-blur);
}

.simple-composer,
.settings-card,
.server-aside-card-v16,
.home-panel,
.home-action-card,
.server-empty-news,
.chat-attachment-preview-v20,
.news-upload-preview-v19 {
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-panel);
}

.simple-title h2,
.home-welcome h1,
.settings-workspace-head h2,
.server-hero-copy-v10 h1,
.welcome-empty h2,
.server-news-head-v10 h3,
.server-news-head-v18 h3,
.server-about-v10 h3,
.home-action-card strong,
.home-panel h3,
.update-news-card h4,
.server-news-card-v18 strong,
.news-detail-body-v18 h1,
.news-list-row-v18 b,
.message-head strong,
.simple-member-row strong,
.home-server-row strong,
.voice-tile-caption strong {
  color: var(--tc-text-primary);
}

.home-welcome p,
.update-news-card p,
.update-news-card li,
.update-news-meta em,
.simple-message p,
.welcome-empty p,
.server-hero-copy-v10 p,
.server-feature-grid-v16 p,
.server-about-v10 p,
.server-news-head-v10 span,
.server-news-head-v18 span,
.server-news-card-v18 span,
.news-detail-body-v18 p,
.news-list-row-v18 small,
.settings-workspace-head p,
.settings-card p,
.helper-text,
.simple-member-row em,
.home-server-row em,
.voice-tile-caption span,
.empty-section,
.empty-note {
  color: var(--tc-text-muted);
}

.update-news-drawer-v24 .update-news-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  grid-template-columns: 42px minmax(0, 1fr);
  overflow-x: hidden;
}

.update-news-drawer-v24 .update-news-body,
.update-news-drawer-v24 .update-news-meta,
.update-news-drawer-v24 .update-news-card h4,
.update-news-drawer-v24 .update-news-card p,
.update-news-drawer-v24 .update-news-card ul,
.update-news-drawer-v24 .update-news-card li {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.update-news-drawer-v24 .update-news-meta {
  flex-wrap: wrap;
}

.update-news-drawer-v24 .update-news-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.simple-search,
.home-server-search,
.settings-card input,
.settings-card select,
.settings-card textarea,
.profile-form input,
.profile-form textarea,
.settings-modal input,
.settings-modal select,
.settings-modal textarea,
.simple-composer input,
.simple-composer textarea,
.invite-box-v19 input,
.news-create-form-v18 input,
.news-create-form-v18 textarea {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-subtle);
  background: var(--tc-surface-field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.simple-search input,
.home-server-search input,
.simple-composer input,
.simple-composer textarea {
  color: var(--tc-text-primary);
}

.simple-search input::placeholder,
.home-server-search input::placeholder,
.simple-composer input::placeholder,
.simple-composer textarea::placeholder,
.settings-modal input::placeholder,
.settings-modal textarea::placeholder {
  color: var(--tc-text-faint);
}

.simple-search:focus-within,
.home-server-search:focus-within,
.settings-card input:focus,
.settings-card select:focus,
.settings-card textarea:focus,
.settings-select-button:focus-visible,
.profile-form input:focus,
.profile-form textarea:focus,
.simple-composer:focus-within,
.invite-box-v19 input:focus,
.news-create-form-v18 input:focus,
.news-create-form-v18 textarea:focus {
  border-color: var(--tc-border-strong);
  box-shadow: var(--tc-focus-ring);
  outline: 0;
}

.settings-native-select-hidden {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.settings-select-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.settings-select-button {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--tc-border-subtle);
  border-radius: var(--tc-radius-sm);
  padding: 0 12px;
  color: var(--tc-text-primary);
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  text-align: left;
}

.settings-select-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.72;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease, opacity 140ms ease;
}

.settings-select-shell.open .settings-select-button {
  border-color: var(--tc-border-strong);
  box-shadow: var(--tc-focus-ring);
}

.settings-select-shell.open .settings-select-button::after {
  opacity: 1;
  transform: rotate(225deg) translate(-2px, -2px);
}

.settings-select-button span,
.settings-select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-select-menu {
  position: absolute;
  z-index: 7600;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: none;
  max-height: min(320px, 42dvh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--tc-border-strong);
  border-radius: var(--tc-radius-sm);
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.settings-select-shell.open .settings-select-menu {
  display: grid;
  gap: 4px;
}

.settings-select-option {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: calc(var(--tc-radius-sm) - 2px);
  padding: 0 10px;
  color: var(--tc-text-secondary);
  background: transparent;
  text-align: left;
}

.settings-select-option:hover,
.settings-select-option:focus-visible,
.settings-select-option.active {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-subtle);
  background:
    linear-gradient(90deg, var(--tc-surface-active), rgba(126, 112, 255, 0.08)),
    var(--tc-surface-card-muted);
  outline: 0;
}

.settings-select-option:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.settings-select-shell.disabled {
  opacity: 0.58;
  pointer-events: none;
}

.primary-button,
.home-action-card button,
.home-invite-button,
.server-hero-v16 .primary-button {
  color: var(--tc-accent-contrast);
  border-color: transparent;
  background: linear-gradient(135deg, var(--tc-success), var(--tc-accent));
  box-shadow: 0 12px 30px rgba(36, 210, 190, 0.24);
}

.ghost-button,
.dock-icon,
.ui-icon-button,
.server-add,
.home-server-pin,
.home-collapse,
.channel-settings-btn,
.settings-close,
.emoji-picker-v20 button,
.news-upload-box-v18 span {
  color: var(--tc-text-secondary);
  border-color: var(--tc-border-subtle);
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-card-muted);
}

.primary-button:hover,
.home-action-card button:hover,
.home-invite-button:hover,
.ghost-button:hover,
.dock-icon:hover,
.ui-icon-button:hover,
.server-add:hover,
.home-server-pin:hover,
.home-collapse:hover,
.channel-settings-btn:hover,
.emoji-picker-v20 button:hover {
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(135deg, var(--tc-surface-active), var(--tc-surface-hover)),
    var(--tc-surface-card);
  color: var(--tc-text-primary);
}

.primary-button:hover,
.home-action-card button:hover,
.home-invite-button:hover {
  color: var(--tc-accent-contrast);
  background: linear-gradient(135deg, var(--tc-success), var(--tc-accent));
}

.nav-row,
.channel-row,
.home-server-row,
.server-mini-card,
.simple-member-row,
.voice-user,
.settings-nav-panel nav button,
.quick-actions-v16 button,
.rules-card-v16 div,
.notification-row-v19 {
  border-color: var(--tc-border-subtle);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent),
    var(--tc-surface-card-muted);
  color: var(--tc-text-secondary);
}

.nav-row:hover,
.nav-row.active,
.channel-row:hover,
.channel-row.active,
.channel-item.active .channel-row,
.voice-channel.active > .channel-item .channel-row,
.home-server-row:hover,
.home-server-row.is-pinned,
.server-mini-card:hover,
.simple-member-row:hover,
.voice-user:hover,
.settings-nav-panel nav button:hover,
.settings-nav-panel nav button.active,
.quick-actions-v16 button:hover,
.notification-row-v19:hover {
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(90deg, var(--tc-surface-active), rgba(126, 112, 255, 0.08)),
    var(--tc-surface-card-muted);
  color: var(--tc-text-primary);
}

.home-server-row {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(8px) saturate(1.05);
}

.home-server-row:hover,
.home-server-row.is-pinned {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 18px rgba(61, 226, 234, 0.08);
}

.server-orb,
.server-add,
.rail-empty-pin {
  border-color: var(--tc-border-subtle);
  background:
    radial-gradient(circle at 34% 22%, var(--tc-bg-cloud-a), transparent 48%),
    var(--tc-surface-card-muted);
}

.server-orb.active,
.server-orb:hover,
.server-add:hover {
  border-color: var(--tc-border-strong);
  box-shadow: 0 0 0 1px rgba(61, 226, 234, 0.16), 0 12px 34px rgba(31, 210, 220, 0.18);
}

.home-server-badge,
.voice-live-dot,
.server-pill-v10,
.news-tag-v18,
.notification-button.has-unread,
.home-server-pin.active {
  color: var(--tc-success);
  border-color: rgba(57, 229, 155, 0.28);
  background: rgba(57, 229, 155, 0.12);
}

:root[data-theme="light"] .home-server-badge,
:root[data-theme="light"] .voice-live-dot,
:root[data-theme="light"] .server-pill-v10,
:root[data-theme="light"] .news-tag-v18,
:root[data-theme="light"] .notification-button.has-unread,
:root[data-theme="light"] .home-server-pin.active {
  color: var(--tc-success);
  background: rgba(31, 157, 99, 0.12);
}

.v13-combo-dock,
.v13-combo-dock.is-connected {
  border-color: var(--tc-border-subtle);
  background:
    radial-gradient(circle at 84% 18%, var(--tc-bg-cloud-a), transparent 48%),
    var(--tc-surface-panel);
}

.combo-voice-status {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
  border-color: var(--tc-border-strong);
  background: var(--tc-surface-active);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.combo-voice-open {
  border-radius: 8px;
}

.combo-voice-open:hover,
.combo-voice-open:focus-visible,
.voice-noise-button:hover,
.voice-noise-button:focus-visible {
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(145deg, var(--tc-surface-active), transparent),
    var(--tc-surface-card);
  box-shadow: var(--tc-focus-ring);
  outline: none;
}

.voice-noise-menu {
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
    var(--tc-surface-panel);
  box-shadow: var(--tc-shadow-pop);
}

.voice-noise-option:hover,
.voice-noise-option:focus-visible,
.voice-noise-option.active {
  border-color: var(--tc-border);
  background: var(--tc-surface-active);
}

.v13-combo-dock .dock-leave,
.v06-call-controls .hangup {
  color: #ffffff;
  border-color: rgba(239, 63, 115, 0.5);
  background: rgba(239, 63, 115, 0.8);
}

.v13-combo-dock .dock-leave:hover,
.v06-call-controls .hangup:hover {
  color: #ffffff;
  border-color: rgba(255, 111, 146, 0.74);
  background: rgba(239, 63, 115, 0.92);
}

.server-hero-v10,
.server-hero-v16 {
  border-color: var(--tc-border);
  background:
    radial-gradient(circle at 74% 48%, var(--tc-bg-cloud-b), transparent 38%),
    radial-gradient(circle at 42% 58%, var(--tc-bg-cloud-a), transparent 36%),
    linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
    var(--tc-surface-card);
}

.chat-orb-v10 {
  border-color: var(--tc-border);
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 255, 255, 0.78), transparent 8%),
    radial-gradient(circle at 64% 42%, rgba(255, 255, 255, 0.78), transparent 8%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(116, 177, 245, 0.16) 52%, rgba(100, 97, 195, 0.2));
}

:root[data-theme="light"] .chat-orb-v10 {
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 255, 255, 0.95), transparent 8%),
    radial-gradient(circle at 64% 42%, rgba(255, 255, 255, 0.95), transparent 8%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(174, 211, 232, 0.32) 52%, rgba(196, 181, 232, 0.28));
}

.server-news-card-v18:hover,
.chat-image-link-v20:hover,
.chat-file-link-v20:hover,
.news-upload-box-v18:hover {
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(145deg, var(--tc-surface-active), transparent),
    var(--tc-surface-card);
}

.news-card-empty-media,
.update-icon,
.welcome-icon,
.home-server-icon,
.news-upload-box-v18 span,
.chat-file-link-v20 svg {
  color: var(--tc-accent);
  background: var(--tc-surface-active);
}

.chat-file-link-v20,
.news-attachment-v18 a {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-subtle);
  background: var(--tc-surface-card-muted);
}

.media-viewer-backdrop-v20,
.modal-backdrop {
  background: rgba(3, 7, 14, 0.72);
  backdrop-filter: blur(14px);
}

:root[data-theme="light"] .media-viewer-backdrop-v20,
:root[data-theme="light"] .modal-backdrop {
  background: rgba(48, 42, 82, 0.44);
}

.voice-room-page.v12-call-page .v12-call-summary span {
  color: var(--tc-text-muted);
}

.voice-room-page.v12-call-page .media-tile,
.voice-room-page.v12-call-page .v06-call-tile {
  border-color: var(--tc-border);
  background:
    radial-gradient(circle at 60% 18%, var(--tc-bg-cloud-b), transparent 40%),
    var(--tc-surface-card);
}

.voice-room-page.v12-call-page .voice-tile-caption {
  border-color: var(--tc-border-subtle);
  background: linear-gradient(180deg, rgba(8, 15, 24, 0.16), rgba(4, 10, 17, 0.58));
}

:root[data-theme="light"] .voice-room-page.v12-call-page .voice-tile-caption {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(240, 231, 220, 0.82));
}

.voice-room-page,
.voice-room-page.v12-call-page,
.voice-room-page.v12-call-page .v12-voice-panel,
.voice-room-page.v12-call-page .unified-call-grid,
.voice-room-page.v12-call-page .media-tiles-slot,
.voice-room-page.v12-call-page .media-tile,
.voice-room-page.v12-call-page .v06-call-tile {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.voice-room-page.v12-call-page,
.voice-room-page.v12-call-page .v12-voice-panel,
.voice-room-page.v12-call-page .unified-call-grid,
.voice-room-page.v12-call-page .media-tile,
.voice-room-page.v12-call-page .v06-call-tile {
  overflow: hidden;
}

.voice-room-page.v12-call-page .media-tile,
.voice-room-page.v12-call-page .v06-call-tile,
.voice-room-page.v12-call-page video {
  contain: paint;
}

.home-server-group.is-collapsed {
  padding-bottom: 8px;
}

.home-server-group-toggle {
  cursor: pointer;
  user-select: none;
  padding: 3px 4px;
  border-radius: var(--tc-radius-sm);
  transition:
    background 160ms ease,
    color 160ms ease;
}

.home-server-group-toggle:hover,
.home-server-group-toggle:focus-visible {
  color: var(--tc-text-primary);
  background: var(--tc-surface-hover);
  outline: none;
}

.home-collapse {
  cursor: pointer;
  pointer-events: none;
}

.home-collapse .ui-icon {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.home-server-group.is-collapsed .home-collapse .ui-icon {
  transform: rotate(-90deg);
}

.home-server-list {
  overflow: hidden;
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 220ms ease,
    opacity 160ms ease,
    transform 180ms ease;
}

.global-home-mode > .simple-sidebar .home-directory-nav {
  gap: 9px;
  padding: 14px;
}

.global-home-mode > .simple-sidebar .home-directory-nav .nav-row {
  min-height: 54px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 0 14px;
  border-radius: var(--tc-radius-md);
}

.global-home-mode > .simple-sidebar .home-directory-nav .nav-row .ui-icon {
  width: 20px;
  height: 20px;
}

.global-home-mode > .simple-sidebar .home-directory-nav .nav-row strong {
  font-size: 14px;
}

.global-home-mode > .simple-sidebar .home-server-dropdowns {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.home-server-directory-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 2px;
}

.home-server-directory-title span {
  color: var(--tc-text-primary);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-server-directory-title em {
  color: var(--tc-text-faint);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.global-home-mode > .simple-sidebar .home-server-group {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--tc-border-subtle);
  border-radius: var(--tc-radius-lg);
  background:
    linear-gradient(145deg, var(--glass-bright), transparent),
    var(--tc-surface-card-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.global-home-mode > .simple-sidebar .home-server-group.is-collapsed {
  padding-bottom: 8px;
}

.global-home-mode > .simple-sidebar .home-server-group-toggle {
  min-height: 38px;
  margin: 0 0 6px;
  padding: 0 4px;
}

.global-home-mode > .simple-sidebar .home-server-group.is-collapsed .home-server-group-toggle {
  margin-bottom: 0;
}

.global-home-mode > .simple-sidebar .home-server-list {
  gap: 9px;
}

.global-home-mode > .simple-sidebar .home-server-row {
  min-height: 62px;
  padding: 8px;
  border-radius: var(--tc-radius-md);
}

.global-home-mode > .simple-sidebar .home-server-main {
  grid-template-columns: 46px minmax(0, 1fr);
}

.global-home-mode > .simple-sidebar .home-server-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.global-home-mode > .simple-sidebar .home-server-copy strong {
  font-size: 14px;
}

.global-home-mode > .simple-sidebar .home-server-copy em {
  font-size: 11px;
}

.global-home-mode > .simple-sidebar .home-server-pin {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.home-server-group.is-collapsed .home-server-list {
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.settings-suite {
  grid-template-columns: var(--tc-settings-nav-width) minmax(0, 1fr);
  font-size: var(--tc-shell-font-size, 14px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(8, 18, 30, 0.42);
  backdrop-filter: blur(9px) saturate(1.08);
}

.settings-nav-panel {
  gap: clamp(18px, 1.3vw, 26px);
  padding: var(--tc-settings-nav-pad-y) var(--tc-settings-nav-pad-x);
}

.settings-nav-panel header {
  grid-template-columns: clamp(52px, 2.75vw, 62px) minmax(0, 1fr);
  gap: clamp(12px, 0.75vw, 16px);
  padding: 0 clamp(6px, 0.5vw, 10px) clamp(14px, 0.95vw, 20px);
}

.settings-avatar {
  width: clamp(52px, 2.75vw, 62px);
  height: clamp(52px, 2.75vw, 62px);
}

.settings-nav-panel header div,
.settings-nav-panel header strong,
.settings-nav-panel header span,
.settings-nav-panel nav button span {
  min-width: 0;
}

.settings-nav-panel header strong,
.settings-nav-panel header span,
.settings-nav-panel nav button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-nav-panel nav button,
.settings-logout {
  min-height: var(--tc-settings-row-min-height);
}

.settings-nav-panel nav button {
  grid-template-columns: var(--tc-settings-row-icon) minmax(0, 1fr);
  gap: var(--tc-settings-row-gap);
  padding: clamp(10px, 0.75vw, 14px) clamp(12px, 0.9vw, 18px);
}

.settings-nav-panel nav button .ui-icon,
.settings-nav-panel nav button svg {
  width: var(--tc-settings-row-icon);
  height: var(--tc-settings-row-icon);
}

.settings-nav-panel,
.settings-workspace {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent),
    rgba(14, 28, 45, 0.44);
  backdrop-filter: blur(8px) saturate(1.08);
}

:root[data-theme="light"] .settings-suite {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    rgba(116, 122, 184, 0.5);
}

:root[data-theme="light"] .settings-nav-panel,
:root[data-theme="light"] .settings-workspace {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent),
    rgba(128, 135, 194, 0.42);
}

:root[data-theme="light"] .simple-search,
:root[data-theme="light"] .home-server-search {
  color: #373b66;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(235, 232, 250, 0.3);
}

:root[data-theme="light"] .simple-search input,
:root[data-theme="light"] .home-server-search input {
  color: #373b66;
}

:root[data-theme="light"] .simple-search input::placeholder,
:root[data-theme="light"] .home-server-search input::placeholder {
  color: rgba(55, 59, 102, 0.72);
}

:root[data-theme="light"] .simple-search .ui-icon,
:root[data-theme="light"] .home-server-search .ui-icon {
  color: rgba(55, 59, 102, 0.82);
}

.screen-tile:fullscreen,
.voice-room-page.v12-call-page:fullscreen {
  background: #000;
}

.home-directory-head {
  overflow: visible;
}

.home-directory-head.has-theme-menu-open {
  position: relative;
  z-index: 5200;
}

.home-directory-scroll {
  position: relative;
  z-index: 1;
}

.home-directory-brand {
  min-width: 0;
}

.home-directory-head strong,
.home-directory-brand strong {
  font-family: Montserrat, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 950;
  letter-spacing: 0;
}

.home-directory-head .dock-icon.theme-menu-trigger {
  display: grid;
}

.theme-menu-host {
  position: relative;
  z-index: 5300;
}

.topbar-theme-host {
  display: none;
}

.theme-menu-popover {
  position: absolute;
  left: 12px;
  top: calc(100% + 10px);
  z-index: 5400;
  width: min(244px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  display: grid;
  gap: 7px;
  padding: 12px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-bright) 78%, transparent), color-mix(in srgb, var(--glass-dim) 84%, transparent)),
    color-mix(in srgb, var(--tc-surface-panel) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.12);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
  contain: paint;
}

.theme-menu-host.is-open .theme-menu-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@media (min-width: 1181px) {
  .home-head-theme-host .theme-menu-popover {
    left: auto;
    right: -4px;
    top: calc(100% + 8px);
    transform-origin: top right;
  }

  .home-head-theme-host .theme-menu-popover::before {
    content: "";
    position: absolute;
    right: 16px;
    top: -9px;
    width: 18px;
    height: 18px;
    border-left: 1px solid var(--tc-border-subtle);
    border-top: 1px solid var(--tc-border-subtle);
    background:
      linear-gradient(145deg, color-mix(in srgb, var(--glass-bright) 80%, transparent), color-mix(in srgb, var(--glass-dim) 82%, transparent)),
      color-mix(in srgb, var(--tc-surface-panel) 86%, transparent);
    transform: rotate(45deg);
    backdrop-filter: blur(12px) saturate(1.12);
  }
}

@media (max-width: 1180px) {
  .topbar-theme-host {
    display: block;
  }

  .topbar-theme-host .theme-menu-popover {
    position: fixed;
    left: 12px;
    right: auto;
    top: 64px;
    width: min(260px, calc(100vw - 24px));
    z-index: 2300;
  }

  .home-directory-head .theme-menu-trigger,
  .home-directory-head .theme-menu-popover {
    display: none;
  }
}

@media (min-width: 1181px) and (max-width: 1320px) {
  .topbar-theme-host .theme-menu-popover {
    left: auto;
    right: 24px;
    top: 76px;
  }
}

.theme-menu-popover strong {
  margin-top: 4px;
  color: var(--tc-text-primary);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.theme-menu-popover button {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: var(--tc-text-secondary);
  border: 1px solid var(--tc-border-subtle);
  background: var(--tc-surface-card-muted);
  cursor: pointer;
}

.theme-menu-popover button:hover,
.theme-menu-popover button.active {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(90deg, var(--tc-surface-active), rgba(126, 112, 255, 0.1)),
    var(--tc-surface-card);
}

:root[data-theme="light"] .theme-menu-popover {
  background:
    linear-gradient(145deg, rgba(188, 195, 236, 0.9), rgba(156, 162, 211, 0.86)),
    rgba(138, 146, 199, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 18px 46px rgba(77, 83, 139, 0.26);
  backdrop-filter: blur(28px) saturate(1.16);
}

.global-home-mode .simple-main,
.global-home-mode .simple-content,
.global-home-mode .simple-home {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.global-home-mode .simple-content,
.global-home-mode .simple-home {
  contain: inline-size;
}

.simple-home *,
.simple-home *::before,
.simple-home *::after {
  box-sizing: border-box;
}

.simple-home .home-welcome,
.simple-home .home-card-grid,
.simple-home .home-two-col,
.simple-home .home-action-card,
.simple-home .home-panel,
.simple-home .home-server-list,
.simple-home .home-server-row {
  min-width: 0;
  max-width: 100%;
}

.simple-home .home-welcome {
  flex-wrap: wrap;
}

.simple-home .home-actions {
  min-width: 0;
}

.simple-home .home-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.simple-home .home-two-col {
  grid-template-columns: minmax(0, 1fr) minmax(min(320px, 100%), 0.72fr);
}

@media (max-width: 1500px) {
  .simple-home .home-two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .simple-home .home-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.mobile-home-shell,
.mobile-home-bottom-nav {
  display: none;
}

@media (max-width: 1023.98px) {
  .community-card.featured::before,
  .community-best-match .community-card.featured::before {
    transform: none;
  }
}

.mobile-profile-compose-trigger {
  display: none;
}

.direct-inbox-actions,
.direct-inbox-search {
  display: none;
}

@media (max-width: 768px) {
  .global-home-mode .simple-main,
  .global-home-mode .simple-content {
    overflow: visible;
  }

  .global-home-mode .simple-home {
    height: auto;
    min-height: 100dvh;
    display: block;
    padding:
      max(18px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      calc(92px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    background:
      radial-gradient(circle at 12% 0%, var(--tc-bg-cloud-a), transparent 32%),
      radial-gradient(circle at 92% 18%, var(--tc-bg-cloud-b), transparent 36%),
      linear-gradient(180deg, var(--tc-bg-canvas), var(--tc-bg-base));
  }

  .global-home-mode .desktop-home-shell {
    display: none;
  }

  .global-home-mode .mobile-home-shell {
    display: grid;
    gap: 14px;
    width: min(100%, 430px);
    margin: 0 auto;
  }

  .mobile-home-header {
    position: sticky;
    top: 0;
    z-index: 12;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 8px 0 2px;
    background:
      linear-gradient(180deg, var(--tc-bg-canvas), color-mix(in srgb, var(--tc-bg-canvas) 72%, transparent));
    backdrop-filter: blur(14px) saturate(1.08);
  }

  .mobile-home-brand {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .mobile-home-logo {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-md);
    background:
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      var(--tc-surface-card);
    box-shadow: inset 0 1px 0 var(--glass-bright);
  }

  .mobile-home-logo img {
    width: 74%;
    height: 74%;
    display: block;
    object-fit: contain;
  }

  .mobile-home-brand span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .mobile-home-brand strong,
  .mobile-home-brand em,
  .mobile-server-card strong,
  .mobile-server-card em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-home-brand strong {
    color: var(--tc-text-primary);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .mobile-home-brand em {
    color: var(--tc-text-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 750;
  }

  .mobile-home-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-home-icon-button {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: var(--tc-text-secondary);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-md);
    background:
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      var(--tc-surface-card);
    box-shadow: inset 0 1px 0 var(--glass-bright);
  }

  .mobile-home-icon-button .ui-icon {
    width: 19px;
    height: 19px;
  }

  .mobile-home-icon-button b {
    position: absolute;
    right: -5px;
    top: -5px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--tc-accent-contrast);
    background: var(--tc-accent);
    font-size: 10px;
    font-weight: 900;
  }

  .mobile-home-search {
    grid-column: 1 / -1;
    min-width: 0;
    min-height: 44px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    color: var(--tc-text-muted);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-md);
    background: var(--tc-surface-field);
    box-shadow: inset 0 1px 0 var(--glass-bright);
  }

  .mobile-home-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tc-text-primary);
    font: inherit;
  }

  .mobile-home-search input::placeholder {
    color: var(--tc-text-faint);
  }

  .mobile-pro-hero,
  .mobile-action-card,
  .mobile-home-section,
  .mobile-home-bottom-nav {
    border: 1px solid var(--tc-border);
    background:
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      var(--tc-surface-panel);
    box-shadow: var(--tc-shadow-soft), inset 0 1px 0 var(--glass-bright);
    backdrop-filter: blur(14px) saturate(1.08);
  }

  .mobile-pro-hero {
    position: relative;
    min-height: 214px;
    display: grid;
    align-content: end;
    gap: 18px;
    padding: 20px;
    overflow: hidden;
    border-color: var(--tc-border-strong);
    border-radius: var(--tc-radius-xl);
    background:
      radial-gradient(circle at 76% 18%, var(--tc-bg-cloud-b), transparent 34%),
      radial-gradient(circle at 18% 6%, var(--tc-bg-cloud-a), transparent 30%),
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      var(--tc-surface-panel);
  }

  .mobile-pro-hero::before {
    content: "";
    position: absolute;
    inset: 16px 18px auto auto;
    width: 96px;
    aspect-ratio: 1;
    pointer-events: none;
    border: 1px solid var(--tc-border-strong);
    border-radius: 28px;
    background:
      radial-gradient(circle at 34% 28%, var(--glass-bright), transparent 32%),
      linear-gradient(145deg, color-mix(in srgb, var(--tc-accent-2) 28%, transparent), color-mix(in srgb, var(--tc-accent) 16%, transparent)),
      var(--tc-surface-card);
    box-shadow: 0 0 46px color-mix(in srgb, var(--tc-accent-2) 28%, transparent);
    transform: rotate(13deg);
  }

  .mobile-pro-hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    max-width: 270px;
  }

  .mobile-pro-kicker {
    width: fit-content;
    max-width: 100%;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: var(--tc-accent);
    border: 1px solid var(--tc-border-strong);
    border-radius: 999px;
    background: var(--tc-surface-card-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .mobile-pro-kicker img {
    width: 15px;
    height: 15px;
  }

  .mobile-pro-hero h1 {
    margin: 0;
    color: var(--tc-text-primary);
    font-size: 29px;
    line-height: 1.08;
    letter-spacing: 0;
  }

  .mobile-pro-hero p {
    margin: 0;
    color: var(--tc-text-secondary);
    font-size: 13px;
    line-height: 1.45;
  }

  .mobile-pro-button {
    position: relative;
    z-index: 1;
    min-height: 46px;
    width: 100%;
    justify-content: center;
  }

  .mobile-action-list {
    display: grid;
    gap: 10px;
  }

  .mobile-action-card {
    min-width: 0;
    min-height: 72px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--tc-radius-lg);
  }

  .mobile-action-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--tc-accent);
    border: 1px solid var(--tc-border-subtle);
    border-radius: var(--tc-radius-md);
    background: var(--tc-surface-card-muted);
  }

  .mobile-action-icon .ui-icon {
    width: 19px;
    height: 19px;
  }

  .mobile-action-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  .mobile-action-copy strong {
    color: var(--tc-text-primary);
    font-size: 14px;
    line-height: 1.15;
  }

  .mobile-action-copy em {
    color: var(--tc-text-muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.25;
  }

  .mobile-action-button {
    min-width: 72px;
    min-height: 36px;
    justify-content: center;
    padding-inline: 10px;
    font-size: 12px;
  }

  .mobile-home-section {
    min-width: 0;
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: var(--tc-radius-lg);
  }

  .mobile-home-section header {
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  .mobile-home-section h3 {
    margin: 0;
    color: var(--tc-text-primary);
    font-size: 18px;
    line-height: 1.15;
  }

  .mobile-update-card {
    min-width: 0;
    display: grid;
    gap: 9px;
  }

  .mobile-update-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .mobile-update-meta span,
  .mobile-update-meta em {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--tc-accent);
    background: var(--tc-surface-card-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
  }

  .mobile-update-card h4 {
    margin: 0;
    color: var(--tc-text-primary);
    font-size: 15px;
    line-height: 1.25;
  }

  .mobile-update-card p,
  .mobile-update-card li {
    color: var(--tc-text-secondary);
    font-size: 13px;
    line-height: 1.4;
  }

  .mobile-update-card p {
    margin: 0;
  }

  .mobile-update-card ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-update-card li {
    position: relative;
    padding-left: 14px;
  }

  .mobile-update-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--tc-accent);
    transform: translateY(-50%);
  }

  .mobile-server-list {
    display: grid;
    gap: 10px;
  }

  .mobile-server-card {
    min-width: 0;
    width: 100%;
    min-height: 60px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 9px;
    color: var(--tc-text-primary);
    border: 1px solid var(--tc-border-subtle);
    border-radius: var(--tc-radius-md);
    background: var(--tc-surface-card-muted);
    text-align: left;
  }

  .mobile-server-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--tc-accent-contrast);
    border-radius: var(--tc-radius-md);
    background: var(--tc-accent);
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-server-card span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .mobile-server-card strong {
    font-size: 14px;
    line-height: 1.15;
  }

  .mobile-server-card em {
    color: var(--tc-text-muted);
    font-size: 12px;
    font-style: normal;
  }

  .mobile-server-card > .ui-icon {
    width: 18px;
    height: 18px;
    color: var(--tc-text-faint);
    transform: rotate(-90deg);
  }

  .mobile-home-bottom-nav {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: 0;
    z-index: 90;
    width: min(430px, calc(100vw - 24px));
    min-height: 66px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    padding: 7px;
    border-radius: var(--tc-radius-xl);
  }

  .mobile-home-bottom-nav button {
    min-width: 0;
    min-height: 50px;
    display: grid;
    place-items: center;
    gap: 3px;
    color: var(--tc-text-muted);
    border: 1px solid transparent;
    border-radius: var(--tc-radius-md);
    background: transparent;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
  }

  .mobile-home-bottom-nav button.active,
  .mobile-home-bottom-nav button:hover {
    color: var(--tc-text-primary);
    border-color: var(--tc-border-subtle);
    background: var(--tc-surface-active);
  }

  .mobile-home-bottom-nav .ui-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 380px) {
  .mobile-pro-hero h1 {
    font-size: 27px;
  }

  .mobile-action-card {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .mobile-action-icon {
    width: 38px;
    height: 38px;
  }

  .mobile-action-button {
    min-width: 66px;
    padding-inline: 8px;
  }
}

@media (max-width: 768px) {
  .global-home-mode .simple-main:has(.simple-home) > .simple-topbar {
    display: none;
  }

  .global-home-mode .simple-main {
    grid-template-rows: minmax(0, 1fr);
  }

  .global-home-mode .simple-content,
  .global-home-mode .simple-home {
    contain: none;
  }

  .global-home-mode .simple-home {
    padding:
      max(26px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      calc(112px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    background:
      radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--tc-accent) 16%, transparent), transparent 24%),
      radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--tc-accent-2) 24%, transparent), transparent 34%),
      linear-gradient(180deg, var(--tc-bg-base), var(--tc-bg-canvas) 42%, var(--tc-bg-base));
  }

  .global-home-mode .mobile-home-shell {
    gap: 14px;
    width: min(100%, 430px);
  }

  .mobile-home-header {
    position: relative;
    top: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 4px 18px;
    background: transparent;
    backdrop-filter: none;
  }

  .mobile-home-brand {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  .mobile-home-logo {
    width: 52px;
    height: 52px;
    border-color: var(--tc-border-strong);
    border-radius: 999px;
    background:
      radial-gradient(circle at 65% 26%, color-mix(in srgb, var(--tc-accent) 42%, transparent), transparent 42%),
      var(--tc-surface-elevated);
    box-shadow:
      0 0 28px color-mix(in srgb, var(--tc-accent) 30%, transparent),
      inset 0 1px 0 var(--glass-bright);
  }

  .mobile-home-brand strong {
    font-size: clamp(20px, 5.6vw, 23px);
    line-height: 1;
    text-transform: uppercase;
  }

  .mobile-home-brand em {
    color: var(--tc-text-muted);
    font-size: 14px;
    font-weight: 750;
  }

  .mobile-home-brand em b {
    color: var(--tc-accent);
  }

  .mobile-home-header-actions {
    gap: 10px;
  }

  .mobile-home-icon-button {
    width: 54px;
    height: 54px;
    color: var(--tc-text-primary);
    border-color: var(--tc-border-subtle);
    border-radius: var(--tc-radius-lg);
    background:
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      var(--tc-surface-card-muted);
    box-shadow: var(--tc-shadow-soft), inset 0 1px 0 var(--glass-bright);
  }

  .mobile-home-icon-button .ui-icon {
    width: 24px;
    height: 24px;
  }

  .mobile-pro-hero,
  .mobile-action-card,
  .mobile-home-section,
  .mobile-home-bottom-nav {
    border-color: var(--tc-border);
    background:
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      color-mix(in srgb, var(--tc-surface-panel) 86%, transparent);
    box-shadow: var(--tc-shadow-soft), inset 0 1px 0 var(--glass-bright);
  }

  .mobile-pro-hero {
    min-height: 0;
    align-content: start;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 18px;
    border-radius: var(--tc-radius-xl);
    background:
      radial-gradient(circle at 76% 30%, color-mix(in srgb, var(--tc-accent-2) 42%, transparent), transparent 34%),
      radial-gradient(circle at 22% 14%, color-mix(in srgb, var(--tc-accent) 18%, transparent), transparent 34%),
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      var(--tc-surface-panel);
  }

  .mobile-pro-hero::before {
    display: none;
  }

  .mobile-pro-hero-copy {
    max-width: 100%;
    gap: 11px;
  }

  .mobile-pro-kicker {
    min-height: 34px;
    padding: 7px 12px;
    color: var(--tc-accent-2);
    border-color: var(--tc-border-strong);
    border-radius: var(--tc-radius-md);
    background: var(--tc-surface-card-muted);
    font-size: 13px;
  }

  .mobile-pro-hero h1 {
    max-width: 100%;
    color: var(--tc-text-primary);
    font-size: clamp(22px, 6vw, 25px);
    line-height: 1.16;
    font-weight: 950;
  }

  .mobile-pro-hero h1 span {
    color: var(--tc-accent);
  }

  .mobile-pro-hero p {
    max-width: 310px;
    color: var(--tc-text-secondary);
    font-size: 13px;
    line-height: 1.34;
  }

  .mobile-pro-art {
    position: absolute;
    top: 76px;
    right: 18px;
    width: 122px;
    height: 122px;
    pointer-events: none;
    opacity: 0.82;
  }

  .mobile-pro-orbit,
  .mobile-pro-chip,
  .mobile-pro-prism {
    position: absolute;
    display: block;
  }

  .mobile-pro-orbit {
    inset: 18px;
    border: 1px solid color-mix(in srgb, var(--tc-accent-2) 58%, transparent);
    border-radius: 999px;
  }

  .mobile-pro-orbit.one {
    transform: rotate(24deg) scaleX(1.25);
  }

  .mobile-pro-orbit.two {
    transform: rotate(-34deg) scaleX(1.16);
    border-color: color-mix(in srgb, var(--tc-accent) 46%, transparent);
  }

  .mobile-pro-prism {
    inset: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--tc-border-strong);
    border-radius: 24px;
    background:
      radial-gradient(circle at 40% 26%, var(--glass-bright), transparent 30%),
      linear-gradient(145deg, color-mix(in srgb, var(--tc-accent-2) 34%, transparent), color-mix(in srgb, var(--tc-accent) 18%, transparent)),
      var(--tc-surface-card);
    box-shadow: 0 0 52px color-mix(in srgb, var(--tc-accent-2) 42%, transparent);
    transform: rotate(16deg);
  }

  .mobile-pro-prism img {
    width: 52px;
    height: 52px;
    transform: rotate(-16deg);
    filter: drop-shadow(0 0 16px color-mix(in srgb, var(--tc-accent-2) 44%, transparent));
  }

  .mobile-pro-chip {
    width: 34px;
    height: 52px;
    border: 1px solid var(--tc-border-subtle);
    border-radius: 12px;
    background:
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      var(--tc-surface-card-muted);
  }

  .mobile-pro-chip.left {
    left: 0;
    top: 52px;
    transform: rotate(-28deg);
  }

  .mobile-pro-chip.right {
    right: 0;
    top: 72px;
    transform: rotate(28deg);
  }

  .mobile-pro-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mobile-pro-features span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    color: var(--tc-text-primary);
    border: 1px solid var(--tc-border-subtle);
    border-radius: var(--tc-radius-md);
    background: var(--tc-surface-card-muted);
    font-size: 11px;
    font-weight: 850;
  }

  .mobile-pro-features img,
  .mobile-pro-button img {
    width: 16px;
    height: 16px;
  }

  .mobile-pro-button {
    min-height: 46px;
    display: inline-grid;
    grid-template-columns: auto auto 20px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--tc-accent-contrast);
    border: 0;
    border-radius: var(--tc-radius-lg);
    background: linear-gradient(90deg, var(--tc-accent), color-mix(in srgb, var(--tc-accent) 64%, var(--tc-accent-2)));
    box-shadow: 0 16px 38px color-mix(in srgb, var(--tc-accent) 26%, transparent);
    font-size: 15px;
    font-weight: 950;
  }

  .mobile-pro-button .ui-icon,
  .mobile-pro-details .ui-icon {
    transform: rotate(-90deg);
  }

  .mobile-pro-details {
    width: fit-content;
    justify-self: center;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tc-accent-2);
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 900;
  }

  .mobile-action-list {
    gap: 8px;
  }

  .mobile-action-card {
    min-height: 82px;
    grid-template-columns: 46px minmax(0, 1fr) auto 14px;
    gap: 6px;
    padding: 10px;
    border-radius: var(--tc-radius-lg);
  }

  .mobile-action-icon {
    width: 44px;
    height: 44px;
    color: var(--tc-accent);
    border-color: var(--tc-border-subtle);
    border-radius: var(--tc-radius-lg);
    background: var(--tc-surface-card-muted);
  }

  .mobile-action-icon .ui-icon {
    width: 24px;
    height: 24px;
  }

  .mobile-action-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    line-height: 1.18;
  }

  .mobile-action-copy em {
    color: var(--tc-text-secondary);
    font-size: 12px;
    line-height: 1.28;
  }

  .mobile-action-button {
    min-width: 84px;
    min-height: 36px;
    padding-inline: 7px;
    color: var(--tc-accent);
    border-color: var(--tc-border-subtle);
    background: var(--tc-surface-card-muted);
    font-size: 10px;
    white-space: nowrap;
  }

  .mobile-action-chevron,
  .mobile-server-chevron {
    color: var(--tc-text-secondary);
  }

  .mobile-action-chevron .ui-icon,
  .mobile-server-chevron .ui-icon,
  .mobile-section-link .ui-icon,
  .mobile-update-arrow .ui-icon {
    width: 18px;
    height: 18px;
    transform: rotate(-90deg);
  }

  .mobile-home-section {
    gap: 14px;
    padding: 18px;
    border-radius: var(--tc-radius-xl);
  }

  .mobile-home-section header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .mobile-home-section h3 {
    font-size: 22px;
  }

  .mobile-section-badge,
  .mobile-section-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    color: var(--tc-accent);
    border: 1px solid var(--tc-border-subtle);
    border-radius: 999px;
    background: var(--tc-surface-card-muted);
    font-size: 12px;
    font-weight: 850;
  }

  .mobile-section-link {
    border: 0;
    background: transparent;
    font-size: 14px;
  }

  .mobile-update-card {
    grid-template-columns: 52px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--tc-border-strong);
    border-radius: var(--tc-radius-lg);
    background: var(--tc-surface-card-muted);
  }

  .mobile-update-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: var(--tc-radius-md);
    background: color-mix(in srgb, var(--tc-accent) 18%, var(--tc-surface-card-muted));
  }

  .mobile-update-icon img {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 12px color-mix(in srgb, var(--tc-accent) 42%, transparent));
  }

  .mobile-update-body {
    min-width: 0;
    display: grid;
    gap: 8px;
  }

  .mobile-update-meta span,
  .mobile-update-meta em,
  .mobile-update-meta b {
    color: var(--tc-accent);
    background: var(--tc-surface-card);
  }

  .mobile-update-meta b:empty {
    display: none;
  }

  .mobile-update-card h4 {
    font-size: 16px;
  }

  .mobile-update-card p {
    color: var(--tc-text-muted);
    font-size: 14px;
  }

  .mobile-update-arrow {
    color: var(--tc-text-secondary);
    border: 0;
    background: transparent;
  }

  .mobile-update-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .mobile-update-dots span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--tc-text-faint);
  }

  .mobile-update-dots span:first-child {
    background: var(--tc-accent);
    box-shadow: 0 0 14px color-mix(in srgb, var(--tc-accent) 46%, transparent);
  }

  .mobile-server-list {
    gap: 10px;
  }

  .mobile-server-card {
    min-height: 70px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-color: var(--tc-border-subtle);
    border-radius: var(--tc-radius-lg);
    background: var(--tc-surface-card-muted);
  }

  .mobile-server-avatar {
    width: 52px;
    height: 52px;
    color: var(--tc-text-primary);
    border: 1px solid var(--tc-border-strong);
    border-radius: var(--tc-radius-lg);
    background:
      radial-gradient(circle at 36% 24%, color-mix(in srgb, var(--tc-accent-2) 42%, transparent), transparent 42%),
      var(--tc-surface-elevated);
    font-size: 22px;
  }

  .mobile-server-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
  }

  .mobile-server-card strong {
    font-size: 16px;
  }

  .mobile-server-card em {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    color: var(--tc-text-muted);
    font-size: 12px;
  }

  .mobile-server-card em i {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--tc-success);
    box-shadow: 0 0 14px color-mix(in srgb, var(--tc-success) 42%, transparent);
  }

  .mobile-server-card em b {
    width: 1px;
    height: 15px;
    background: var(--tc-border);
  }

  .mobile-server-join {
    min-height: 38px;
    padding-inline: 12px;
    color: var(--tc-text-primary);
    border-color: var(--tc-border-subtle);
    background: var(--tc-surface-card);
    font-size: 12px;
  }

  .mobile-home-bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    top: auto;
    bottom: 0;
    z-index: 90;
    width: min(calc(100vw - 24px), 430px);
    height: 78px;
    min-height: 0;
    padding: 8px 12px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-xl);
    background:
      linear-gradient(180deg, var(--glass-bright), var(--glass-dim)),
      color-mix(in srgb, var(--tc-surface-elevated) 92%, transparent);
    box-shadow:
      0 18px 54px color-mix(in srgb, var(--tc-bg-base) 70%, transparent),
      0 0 0 1px color-mix(in srgb, var(--tc-text-primary) 4%, transparent),
      inset 0 1px 0 var(--glass-bright);
    transform: translateX(-50%);
  }

  .mobile-home-bottom-nav button {
    min-height: 60px;
    color: var(--tc-text-muted);
    font-size: 12px;
    font-weight: 780;
  }

  .mobile-home-bottom-nav button.active,
  .mobile-home-bottom-nav button:hover {
    color: var(--tc-accent);
    border-color: transparent;
    background: transparent;
    box-shadow: inset 0 -3px 0 var(--tc-accent), 0 0 24px color-mix(in srgb, var(--tc-accent) 24%, transparent);
  }

  .mobile-home-bottom-nav .ui-icon {
    width: 27px;
    height: 27px;
  }

  .app-bg > [data-mobile-home-nav-slot] {
    position: fixed;
    inset: 0;
    z-index: 90;
    width: 100vw;
    height: 100dvh;
    overflow: visible;
    pointer-events: none;
  }

  .app-bg > [data-mobile-home-nav-slot] > .mobile-home-bottom-nav {
    pointer-events: auto;
  }

  .global-home-mode .simple-main:not(:has(.simple-home)) {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .global-home-mode .simple-content:has(> :is(.my-page-shell, .direct-inbox-page, .direct-chat-page, .teammate-page)) {
    overflow: visible;
    background:
      radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--tc-accent) 14%, transparent), transparent 26%),
      radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--tc-accent-2) 18%, transparent), transparent 34%),
      linear-gradient(180deg, var(--tc-bg-base), var(--tc-bg-canvas) 46%, var(--tc-bg-base));
  }

  .global-home-mode .simple-content > :is(.my-page-shell, .direct-inbox-page, .direct-chat-page, .teammate-page) {
    width: min(100%, 430px);
    height: auto;
    min-height: calc(100dvh - 68px);
    margin: 0 auto;
    padding:
      12px
      max(14px, env(safe-area-inset-right))
      calc(112px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    overflow: visible;
    contain: none;
    content-visibility: visible;
    scrollbar-gutter: auto;
  }

  .global-home-mode .simple-content > .my-page-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .my-page-main,
  .my-page-body,
  .my-page-feed-column,
  .my-page-aside,
  .my-page-feed {
    gap: 12px;
  }

  .my-page-hero,
  .my-page-main,
  .my-page-body,
  .my-page-aside,
  .my-page-composer,
  .my-page-feed,
  .my-page-empty {
    width: 100%;
    max-width: 100%;
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }

  .my-page-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .my-page-cover {
    height: clamp(128px, 36vw, 166px);
  }

  .my-page-identity {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: end;
    margin-top: -42px;
    padding: 0 14px;
  }

  .my-page-avatar {
    width: 86px;
    height: 86px;
    border-width: 3px;
    border-color: color-mix(in srgb, var(--tc-accent) 44%, var(--tc-text-primary));
    box-shadow: 0 0 24px color-mix(in srgb, var(--tc-accent) 24%, transparent);
    font-size: 26px;
  }

  .my-page-title h1 {
    font-size: clamp(22px, 7vw, 28px);
    line-height: 1.05;
  }

  .my-page-status {
    display: block;
    max-width: none;
    margin: 12px 14px 0;
    border-radius: var(--tc-radius-lg);
    line-height: 1.45;
  }

  .my-page-identity > .ui-button,
  .profile-hero-actions {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  .profile-hero-actions .ui-button,
  .my-page-identity > .ui-button {
    width: 100%;
    justify-content: center;
  }

  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty {
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .my-page-composer > .avatar {
    display: none;
  }

  .mobile-profile-compose-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-lg);
    color: var(--tc-text-primary);
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--tc-accent) 22%, transparent), color-mix(in srgb, var(--tc-accent-2) 14%, transparent)),
      var(--tc-surface-card);
    box-shadow: inset 0 1px 0 var(--glass-bright), 0 14px 34px color-mix(in srgb, var(--tc-accent) 16%, transparent);
    font: inherit;
    font-weight: 850;
  }

  .mobile-profile-compose-trigger .ui-icon {
    width: 20px;
    height: 20px;
    color: var(--tc-accent);
  }

  .my-page-composer:not(.is-mobile-open) {
    gap: 0;
  }

  .my-page-composer:not(.is-mobile-open) .my-page-composer-main {
    display: none;
  }

  .my-page-composer.is-mobile-open .mobile-profile-compose-trigger {
    display: none;
  }

  .profile-composer-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-composer-toolbar .ui-button {
    width: 100%;
    justify-content: center;
  }

  .my-page-post header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

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

  .profile-upload-preview.is-visible {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-upload-preview img {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    max-height: 180px;
  }

  .global-home-mode .simple-content > .direct-inbox-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .direct-inbox-list,
  .direct-inbox-thread,
  .direct-chat-embedded {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .direct-inbox-list {
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .direct-inbox-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    gap: 10px;
  }

  .direct-inbox-header h2 {
    font-size: clamp(28px, 9vw, 34px);
    line-height: 1;
  }

  .direct-inbox-header .channel-kicker {
    display: none;
  }

  .direct-inbox-refresh-button {
    display: none;
  }

  .direct-inbox-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .direct-inbox-actions .dock-icon {
    width: 42px;
    height: 42px;
    color: var(--tc-text-primary);
    border-color: var(--tc-border);
    border-radius: var(--tc-radius-lg);
    background: var(--tc-surface-card);
    box-shadow: inset 0 1px 0 var(--glass-bright);
  }

  .direct-inbox-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-lg);
    background:
      linear-gradient(180deg, var(--glass-bright), transparent),
      var(--tc-surface-card);
    box-shadow: inset 0 1px 0 var(--glass-bright);
  }

  .direct-inbox-search .ui-icon {
    width: 22px;
    height: 22px;
    color: var(--tc-text-muted);
  }

  .direct-inbox-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--tc-text-primary);
    background: transparent;
    font: inherit;
    font-size: 17px;
  }

  .direct-conversation-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .direct-inbox-page:has(.direct-chat-page[data-direct-thread]:not([data-direct-thread=""])) .direct-inbox-list {
    max-height: min(188px, 30dvh);
    overflow: hidden;
  }

  .direct-inbox-page:has(.direct-chat-page[data-direct-thread]:not([data-direct-thread=""])) .direct-conversation-list {
    max-height: 116px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .direct-inbox-page:has(.direct-chat-page[data-direct-thread]:not([data-direct-thread=""])) .direct-conversation-row {
    min-height: 64px;
  }

  .direct-conversation-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 104px;
    padding: 14px 2px;
    border-width: 0;
    border-bottom: 1px solid var(--tc-border-subtle);
    border-radius: var(--tc-radius-lg);
    background: transparent;
    box-shadow: none;
  }

  .direct-conversation-row:hover,
  .direct-conversation-row.active {
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--tc-accent) 10%, transparent), transparent),
      color-mix(in srgb, var(--tc-surface-card) 62%, transparent);
  }

  .direct-conversation-row > .avatar,
  .direct-conversation-row > .direct-notes-avatar {
    width: 74px;
    max-width: 74px;
    height: 74px;
    border-radius: var(--tc-radius-xl);
    font-size: 26px;
  }

  .direct-conversation-row > span:not(.avatar):not(.direct-row-side) {
    min-width: 0;
  }

  .direct-conversation-row .user-name-line strong {
    font-size: 18px;
    line-height: 1.2;
  }

  .direct-conversation-row em {
    display: none;
  }

  .direct-conversation-row p {
    margin-top: 8px;
    color: var(--tc-text-muted);
    font-size: 15px;
    line-height: 1.35;
  }

  .direct-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    min-width: 42px;
    color: var(--tc-text-muted);
    font-size: 14px;
  }

  .direct-unread-badge {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--tc-bg-base);
    background: var(--tc-accent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--tc-accent) 38%, transparent);
    font-size: 13px;
    font-weight: 900;
  }

  .direct-read-check {
    color: var(--tc-accent);
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0;
  }

  .direct-inbox-thread .direct-chat-page,
  .global-home-mode .simple-content > .direct-chat-page {
    height: auto;
    min-height: calc(100dvh - 196px);
    overflow: visible;
  }

  .direct-chat-page {
    grid-template-rows: auto minmax(320px, 1fr) auto auto;
    gap: 12px;
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .direct-chat-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: var(--tc-radius-lg);
  }

  .direct-chat-hero .ui-button {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .direct-message-list {
    min-height: 320px;
    padding: 4px 2px 8px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .direct-message-row {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: calc(100% - 10px);
    grid-template-columns: 34px minmax(0, 1fr);
    align-self: stretch;
    overflow: hidden;
  }

  .direct-message-row.is-own {
    grid-template-columns: minmax(0, 1fr) 34px;
    align-self: stretch;
  }

  .simple-message {
    max-width: 100%;
    min-width: 0;
    width: min(92%, 620px);
  }

  .direct-message-row > div {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .direct-message-row > .avatar,
  .simple-message > .avatar {
    flex: 0 0 34px;
    width: 34px;
    max-width: 34px;
    height: 34px;
  }

  .direct-message-form.direct-message-form-v20 {
    border-radius: var(--tc-radius-lg);
  }

  .teammate-page {
    align-content: start;
  }

  .teammate-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "deck"
      "side"
      "form";
    gap: 14px;
    width: 100%;
  }

  .teammate-deck {
    gap: 10px;
  }

  .teammate-deck-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 0 2px;
  }

  .teammate-deck-head h2 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .teammate-deck-meta {
    width: 100%;
    justify-content: space-between;
  }

  .teammate-card-stage,
  .teammate-card-active {
    min-height: auto;
  }

  .teammate-card,
  .teammate-self-card,
  .teammate-profile-form,
  .teammate-requests {
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .teammate-card-active {
    gap: 14px;
  }

  .teammate-card-active .teammate-avatar {
    width: 96px;
    height: 96px;
    border-radius: var(--tc-radius-xl);
    font-size: 30px;
  }

  .teammate-card-active h2 {
    font-size: clamp(24px, 7vw, 30px);
  }

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

  .teammate-card footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teammate-card footer .ui-button,
  .teammate-request-actions .ui-button {
    width: 100%;
    justify-content: center;
  }

  .teammate-request-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .teammate-request-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .teammate-profile-form header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .teammate-switch {
    justify-content: flex-start;
  }

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

  .global-home-mode .simple-content:has(> .community-page) {
    overflow: visible;
    background:
      radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--tc-accent) 14%, transparent), transparent 28%),
      radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--tc-accent-2) 18%, transparent), transparent 34%),
      linear-gradient(180deg, var(--tc-bg-base), var(--tc-bg-canvas) 48%, var(--tc-bg-base));
  }

  .global-home-mode .simple-content > .community-page {
    width: min(100%, 430px);
    height: auto;
    min-height: calc(100dvh - 68px);
    margin: 0 auto;
    padding:
      12px
      max(14px, env(safe-area-inset-right))
      calc(112px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    overflow: visible;
    align-content: start;
    gap: 12px;
    contain: none;
    content-visibility: visible;
    scrollbar-gutter: auto;
  }

  .community-page :where(.community-hero.ui-panel, .community-section.ui-panel, .community-results.ui-panel, .community-category-panel.ui-panel, .community-side-panel.ui-panel),
  .server-home-v16 :where(.server-hero-v16, .server-news-panel-v16, .server-about-v16),
  .simple-text-view .simple-composer {
    border-color: var(--tc-border-subtle);
    border-radius: var(--tc-radius-lg);
    background:
      linear-gradient(180deg, var(--glass-bright), transparent),
      color-mix(in srgb, var(--tc-surface-panel) 88%, transparent);
    box-shadow:
      inset 0 1px 0 var(--glass-bright),
      var(--tc-shadow-soft);
  }

  .community-hero.ui-panel {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border-radius: var(--tc-radius-lg);
  }

  .community-hero.ui-panel::before {
    opacity: 0.46;
  }

  .community-hero h1 {
    max-width: 100%;
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.08;
  }

  .community-hero p {
    max-width: 100%;
    margin-top: 10px;
    color: var(--tc-text-secondary);
    font-size: 14px;
    line-height: 1.45;
  }

  .community-soft-action {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    margin-top: 14px;
    border-radius: var(--tc-radius-md);
    color: var(--tc-text-primary);
    background: var(--tc-surface-card-muted);
  }

  .community-search {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 54px;
    padding: 7px 7px 7px 12px;
    border-color: var(--tc-border-subtle);
    border-radius: var(--tc-radius-lg);
    background: var(--tc-surface-card-muted);
    color: var(--tc-text-primary);
    box-shadow: none;
  }

  .community-search input,
  .community-search input::placeholder {
    color: var(--tc-text-secondary);
  }

  .community-search input {
    font-weight: 720;
  }

  .community-search-button,
  .community-clear-query {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 1px solid var(--tc-border-subtle);
    border-radius: var(--tc-radius-md);
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--tc-accent) 38%, transparent), transparent),
      var(--tc-surface-active);
    box-shadow: 0 0 18px color-mix(in srgb, var(--tc-accent) 18%, transparent);
    color: var(--tc-text-primary);
    font-size: 18px;
  }

  .community-search-large {
    max-width: none;
  }

  .community-hero-tags,
  .community-hero-categories {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    max-width: 100%;
    margin-top: 6px;
    color: var(--tc-text-muted);
  }

  .community-hero-tags button,
  .community-filter-row button,
  .community-filter-row span,
  .community-more-note {
    min-width: 0;
    border-color: var(--tc-border-subtle);
    background: var(--tc-surface-card-muted);
    color: var(--tc-text-secondary);
    white-space: nowrap;
  }

  .community-hero-tags button,
  .community-filter-row :where(button, span) {
    min-height: 34px;
    padding-inline: 12px;
  }

  .community-hero-tags {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .community-hero-tags > span {
    flex: 0 0 auto;
  }

  .community-hero-categories > div,
  .community-category-row,
  .community-showcase-grid,
  .community-popular-grid,
  .community-owned-grid,
  .community-search-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .community-hero-categories > div,
  .community-category-row {
    gap: 8px;
  }

  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel {
    gap: 12px;
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .community-section > header,
  .community-category-panel > header,
  .community-results > header,
  .server-news-head-v18 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .community-text-button,
  .community-section header .ui-button,
  .server-news-actions-v18 .ui-button,
  .server-hero-actions-v10 .ui-button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .community-card-grid.scroll {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .community-card {
    min-width: 0;
    min-height: 0;
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .community-card.featured,
  .community-best-match .community-card.featured {
    min-height: 192px;
  }

  .community-card.row {
    grid-template-columns: minmax(0, 1fr);
  }

  .community-card.row .ui-button {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }

  .community-card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .community-card-badge {
    max-width: 100%;
  }

  .community-logo {
    width: 44px;
    height: 44px;
  }

  .community-logo.large {
    width: 54px;
    height: 54px;
  }

  .community-tags,
  .community-stats,
  .community-filter-row {
    gap: 7px;
  }

  .community-filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .community-result-list {
    border-radius: var(--tc-radius-lg);
  }

  .community-side-panel button {
    min-width: 0;
    border: 1px solid var(--tc-border-subtle);
    background: var(--tc-surface-card-muted);
  }

  .simple-discord-shell.server-mode {
    grid-template-columns: minmax(0, 1fr);
  }

  .server-mode .simple-content {
    overflow: auto;
    background:
      radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--tc-accent) 12%, transparent), transparent 28%),
      linear-gradient(180deg, var(--tc-bg-base), var(--tc-bg-canvas));
  }

  .server-mode .simple-content > .server-home-v16 {
    width: min(100%, 430px);
    height: auto;
    min-height: calc(100dvh - 68px);
    margin: 0 auto;
    padding:
      12px
      max(14px, env(safe-area-inset-right))
      calc(112px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    overflow: visible;
    gap: 12px;
  }

  .server-hero-v16 {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    border-radius: var(--tc-radius-lg);
  }

  .server-hero-v16.has-server-banner .server-hero-copy-v10 {
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .server-hero-title-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .server-hero-title-row img {
    width: 54px;
    border-radius: var(--tc-radius-md);
  }

  .server-hero-v16 .server-hero-copy-v10 h1 {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.08;
  }

  .server-hero-v16 .server-hero-copy-v10 p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.45;
  }

  .server-pill-v10 {
    width: fit-content;
  }

  .server-hero-actions-v10,
  .server-news-actions-v18 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 8px;
  }

  .server-feature-grid-v16,
  .server-news-strip-v18 {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .server-feature-grid-v16 article {
    min-height: 0;
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .server-feature-grid-v16 article > span {
    width: 42px;
    height: 42px;
    border-radius: var(--tc-radius-md);
  }

  .server-news-panel-v16,
  .server-about-v16 {
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .server-news-card-v18 {
    grid-template-rows: 118px minmax(0, 1fr);
    min-height: 0;
    border-radius: var(--tc-radius-lg);
  }

  .server-news-card-v18 > img,
  .news-card-empty-media {
    height: 118px;
  }

  .server-about-v10 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .server-stats-v10 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .server-stats-v10 span {
    min-width: 0;
    padding: 10px 8px;
  }

  .server-stats-v10 em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .server-mode .simple-content > .simple-text-view {
    width: min(100%, 430px);
    height: calc(100dvh - 68px);
    min-height: 0;
    margin: 0 auto;
    padding:
      8px
      max(10px, env(safe-area-inset-right))
      calc(96px + env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 8px;
    overflow: hidden;
  }

  .simple-text-view .simple-message-list {
    min-height: 0;
    padding: 10px 4px 8px;
    gap: 10px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .simple-text-view .simple-message {
    width: 100%;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .simple-text-view .simple-message > .avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--tc-radius-sm);
  }

  .simple-text-view .message-head {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .simple-text-view .welcome-empty {
    min-height: 280px;
    padding: 20px 14px;
    border-radius: var(--tc-radius-lg);
  }

  .simple-text-view .simple-composer {
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 91;
    min-width: 0;
    padding: 8px;
    border-radius: var(--tc-radius-lg);
  }

  .simple-text-view .simple-composer :where(input, textarea) {
    min-width: 0;
    max-height: 128px;
  }

  .simple-text-view .simple-composer :where(.file-button, button) {
    flex: 0 0 auto;
  }
}

@media (max-width: 430px) {
  .mobile-pro-art {
    width: 112px;
    height: 112px;
    top: 76px;
    right: -12px;
    opacity: 0.68;
  }

  .mobile-pro-hero-copy {
    max-width: 100%;
  }

  .mobile-pro-features span {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .mobile-action-card {
    grid-template-columns: 46px minmax(0, 1fr) auto 14px;
    gap: 6px;
  }

  .mobile-server-card {
    grid-template-columns: 50px minmax(0, 1fr) auto 16px;
    gap: 8px;
  }

  .mobile-action-chevron,
  .mobile-server-chevron {
    grid-column: auto;
    grid-row: auto;
  }

  .mobile-update-card {
    grid-template-columns: 48px minmax(0, 1fr) 18px;
    padding: 14px;
  }

  .global-home-mode .simple-content > .community-page,
  .server-mode .simple-content > .server-home-v16 {
    padding-inline:
      max(12px, env(safe-area-inset-left))
      max(12px, env(safe-area-inset-right));
  }

  .community-section > header,
  .community-category-panel > header,
  .community-results > header,
  .server-news-head-v18 {
    gap: 8px;
  }

  .community-card.featured,
  .community-best-match .community-card.featured {
    min-height: 174px;
  }

  .server-stats-v10 {
    grid-template-columns: minmax(0, 1fr);
  }

  .simple-text-view .simple-composer {
    gap: 6px;
  }
}

@media (max-width: 380px) {
  .mobile-home-brand {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .mobile-home-logo,
  .mobile-home-icon-button {
    width: 50px;
    height: 50px;
  }

  .mobile-home-header-actions {
    gap: 8px;
  }

  .mobile-pro-hero {
    padding: 20px;
  }

  .mobile-pro-art {
    width: 112px;
    height: 112px;
  }

  .mobile-action-copy strong,
  .mobile-server-card strong {
    font-size: 16px;
  }

  .mobile-action-copy strong {
    white-space: normal;
  }

  .mobile-home-bottom-nav button {
    font-size: 11px;
  }

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

  .mobile-quick-action {
    min-height: 58px;
    align-items: center;
  }
}

.notification-button {
  overflow: visible;
}

.asset-icon {
  --asset-icon-url: none;
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
  background: currentColor;
  pointer-events: none;
  -webkit-mask: var(--asset-icon-url) center / contain no-repeat;
  mask: var(--asset-icon-url) center / contain no-repeat;
}

.asset-icon-theme {
  --asset-icon-url: url("/assets/theme-switch.svg");
}

.asset-icon-notification {
  --asset-icon-url: url("/assets/notification-icon.svg");
}

.notification-button .asset-icon {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 10px rgba(61, 226, 234, 0.22)) drop-shadow(0 1px 2px rgba(30, 34, 70, 0.35));
}

.notification-button.has-unread .asset-icon {
  filter: drop-shadow(0 0 12px rgba(239, 63, 115, 0.34));
}

.notification-button b {
  z-index: 2;
  pointer-events: none;
}

.simple-content > * {
  animation: none;
}

.modal-backdrop,
.notifications-drawer-v19,
.news-drawer-v18,
.media-viewer-backdrop-v20 {
  animation: tcOverlayIn 140ms ease both;
}

.settings-tab-content {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  animation: settingsTabIn 120ms ease both;
}

.profile-settings-grid {
  height: 100%;
  min-height: 0;
  overflow: hidden auto;
  align-content: stretch;
}

.profile-settings-card {
  min-height: 0;
  overflow: hidden;
}

.profile-settings-card .profile-form {
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.profile-settings-card .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
}

.modal-backdrop,
.settings-modal,
.settings-suite,
.settings-nav-panel,
.settings-workspace,
.settings-tab-content,
.settings-card,
.profile-modal,
.news-create-modal-v18,
.invite-modal-v19,
.media-viewer-v20,
.news-drawer-v18,
.notifications-drawer-v19,
.profile-comments-drawer {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.modal-backdrop {
  width: 100vw;
  max-width: 100vw;
  min-width: 0;
  z-index: 7200;
  padding-inline: min(20px, 4vw);
  overflow-x: hidden;
  contain: paint;
}

.modal-backdrop:has(.settings-suite) {
  place-items: center start;
  padding-left: clamp(20px, 4vw, 72px);
  padding-right: min(20px, 4vw);
}

.settings-modal,
.profile-modal,
.news-create-modal-v18,
.invite-modal-v19 {
  width: min(var(--modal-max-width, 760px), calc(100vw - min(40px, 8vw)));
}

.settings-modal.wide,
.settings-suite {
  --modal-max-width: 2060px;
  width: min(94%, 2060px);
  height: min(90%, 1120px);
  min-width: min(1080px, calc(100% - 32px));
  min-height: min(720px, calc(100% - 32px));
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  justify-self: start;
}

.settings-modal.small,
.profile-modal,
.invite-modal-v19 {
  --modal-max-width: 560px;
}

.settings-modal.server-settings-modal {
  --modal-max-width: 1480px;
  width: min(1480px, calc(100vw - 56px));
  min-width: min(1080px, calc(100vw - 56px));
  max-width: calc(100vw - 56px);
  max-height: calc(100dvh - 40px);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-self: center;
}

.settings-modal.server-settings-modal > header {
  flex: 0 0 auto;
}

.server-settings-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.server-settings-scroll > .server-settings-form {
  overflow: visible;
  padding-right: 0;
  scrollbar-gutter: auto;
}

.profile-comments-drawer {
  top: 96px;
  bottom: 20px;
  max-height: calc(100dvh - 116px);
}

.settings-logout {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--tc-danger, #ef3f73) 42%, transparent);
  color: color-mix(in srgb, var(--tc-danger, #ef3f73) 82%, white);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tc-danger, #ef3f73) 14%, transparent), transparent),
    var(--tc-surface-card-muted);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.settings-logout:hover,
.settings-logout:focus-visible {
  color: var(--tc-text-primary);
  border-color: color-mix(in srgb, var(--tc-danger, #ef3f73) 62%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tc-danger, #ef3f73) 24%, transparent), transparent),
    var(--tc-surface-active);
  outline: none;
}

@keyframes tcOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes settingsTabIn {
  from {
    opacity: 0.72;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

:root[data-design="cyberpunk"] :where(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .primary-button,
  .ghost-button,
  .dock-icon,
  .ui-icon-button,
  .server-orb,
  .server-add,
  .rail-empty-pin,
  .home-server-pin,
  .home-invite-button,
  .channel-settings-btn,
  .server-hero-v10,
  .server-hero-v16,
  .server-news-card-v18,
  .settings-modal,
  .settings-card,
  .settings-logout,
  .settings-close,
  .news-drawer-v18,
  .notifications-drawer-v19,
  .notification-row-v19,
  .v13-combo-dock,
  .voice-room-page.v12-call-page .media-tile,
  .voice-room-page.v12-call-page .v06-call-tile,
  .theme-menu-popover,
  .theme-menu-popover button,
  .invite-modal-v19,
  .media-viewer-v20,
  .chat-image-link-v20,
  .chat-file-link-v20,
  .news-upload-box-v18,
  .file-button,
  .switch-row
) {
  --tc-active-cut: var(--tc-shape-cut);
  border-radius: var(--tc-shape-radius) 0 var(--tc-shape-radius) 0;
  clip-path: polygon(
    0 0,
    calc(100% - var(--tc-active-cut)) 0,
    100% var(--tc-active-cut),
    100% 100%,
    var(--tc-active-cut) 100%,
    0 calc(100% - var(--tc-active-cut))
  );
}

:root[data-design="cyberpunk"] :where(
  .primary-button,
  .ghost-button,
  .dock-icon,
  .ui-icon-button,
  .server-orb,
  .server-add,
  .rail-empty-pin,
  .home-server-pin,
  .home-invite-button,
  .channel-settings-btn,
  .settings-logout,
  .settings-close,
  .theme-menu-popover button,
  .file-button
) {
  --tc-active-cut: var(--tc-shape-cut-sm);
}

:root[data-design="cyberpunk"] :where(
  .ui-panel,
  .ui-card,
  .server-hero-v10,
  .server-hero-v16,
  .settings-modal,
  .news-drawer-v18,
  .notifications-drawer-v19,
  .v13-combo-dock
) {
  position: relative;
  isolation: isolate;
  box-shadow:
    inset 0 0 0 1px rgba(61, 226, 234, 0.13),
    0 0 26px rgba(61, 226, 234, 0.07),
    var(--tc-shadow-soft);
}

:root[data-design="cyberpunk"] :where(.news-drawer-v18, .notifications-drawer-v19) {
  position: fixed;
}

:root[data-design="cyberpunk"] :where(
  .primary-button,
  .ghost-button,
  .dock-icon,
  .ui-icon-button,
  .theme-menu-popover button
):hover {
  box-shadow:
    inset 0 0 0 1px rgba(61, 226, 234, 0.2),
    0 0 22px rgba(61, 226, 234, 0.14);
}

:root[data-design="cyberpunk"] .theme-menu-host,
:root[data-design="cyberpunk"] .theme-menu-popover {
  overflow: visible;
}

:root[data-design="cyberpunk"] .theme-menu-popover {
  position: absolute;
  z-index: 5400;
}

@media (min-width: 1181px) {
  :root[data-design="cyberpunk"] .home-directory-head .theme-menu-popover {
    position: absolute;
  }
}

:root[data-design="cyberpunk"] .notification-button {
  clip-path: polygon(
    0 0,
    calc(100% - var(--tc-shape-cut-sm)) 0,
    100% var(--tc-shape-cut-sm),
    100% 100%,
    var(--tc-shape-cut-sm) 100%,
    0 calc(100% - var(--tc-shape-cut-sm))
  );
}

:root[data-design="cyberpunk"] .notification-button b {
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  font-size: 9px;
}

:root[data-design="cyberpunk"] :where(
  .simple-server-head,
  .simple-topbar,
  .simple-search,
  .simple-composer,
  .channel-row,
  .nav-row,
  .home-server-row,
  .home-collapse,
  .settings-nav-panel,
  .settings-workspace,
  .settings-nav-panel nav button,
  .home-server-group-toggle
) {
  clip-path: none;
  border-radius: var(--tc-radius-sm);
}

:root[data-design="cyberpunk"] :where(
  .settings-nav-panel,
  .settings-workspace,
  .simple-server-head,
  .simple-topbar
) {
  box-shadow:
    inset 0 0 0 1px rgba(61, 226, 234, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

:root[data-design="cyberpunk"] :where(
  .settings-nav-panel,
  .settings-workspace,
  .simple-server-head,
  .simple-topbar
)::after {
  display: none;
}

:root[data-design="cyberpunk"] :where(
  .home-action-card,
  .home-panel,
  .settings-card,
  .server-news-card-v18,
  .server-mini-card,
  .theme-menu-popover,
  .news-upload-box-v18,
  .settings-logout
) {
  box-shadow:
    inset 0 0 0 1px rgba(61, 226, 234, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-design="rounded"] :where(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .primary-button,
  .ghost-button,
  .dock-icon,
  .ui-icon-button,
  .server-orb,
  .server-add,
  .rail-empty-pin,
  .home-server-pin,
  .home-invite-button,
  .simple-server-head,
  .simple-topbar,
  .simple-search,
  .simple-composer,
  .channel-row,
  .nav-row,
  .home-server-row,
  .home-collapse,
  .settings-modal,
  .settings-nav-panel,
  .settings-workspace,
  .settings-card,
  .settings-logout,
  .settings-close,
  .settings-nav-panel nav button,
  .theme-menu-popover,
  .theme-menu-popover button,
  .file-button,
  .switch-row,
  .home-server-group-toggle,
  .notifications-drawer-v19,
  .news-drawer-v18
) {
  clip-path: none;
  border-radius: var(--tc-radius-md);
}

:root[data-design="rounded"] :where(
  .dock-icon,
  .ui-icon-button,
  .server-orb,
  .server-add,
  .rail-empty-pin,
  .home-server-pin,
  .home-collapse,
  .settings-close
) {
  border-radius: var(--tc-radius-sm);
}

@media (max-width: 1180px) {
  .simple-discord-shell {
    grid-template-columns: 82px minmax(250px, 340px) minmax(0, 1fr);
    min-width: 0;
  }

  .simple-members {
    display: none;
  }
}

/* TaksaCord mobile layout. Keep mobile behavior centralized here. */
@media (max-width: 1180px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    overflow-x: hidden;
  }

  body {
    overflow-y: auto;
  }

  .app-bg {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-bg > [data-app-dynamic] {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    zoom: 1;
    transform: none;
    transform-origin: top center;
  }

  .simple-discord-shell,
  .simple-discord-shell.members-hidden {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 100dvh;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .simple-discord-shell > .simple-sidebar,
  .server-rail,
  .simple-members {
    display: none !important;
  }

  .mobile-menu-trigger {
    display: inline-grid;
  }

  .mobile-menu-layer {
    position: fixed;
    inset: 0;
    z-index: 7200;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    background: rgba(12, 10, 30, 0.46);
    backdrop-filter: blur(12px) saturate(1.08);
    overflow: hidden;
    animation: tcOverlayIn 150ms ease both;
  }

  .mobile-menu-drawer {
    width: min(86vw, 430px);
    height: 100dvh;
    max-width: calc(100vw - 42px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid var(--tc-border);
    border-right: 0;
    border-radius: 18px 0 0 18px;
    background:
      radial-gradient(circle at 18% 8%, var(--tc-bg-cloud-a), transparent 42%),
      radial-gradient(circle at 92% 0%, var(--tc-bg-cloud-b), transparent 44%),
      linear-gradient(145deg, var(--glass-bright), var(--glass-dim)),
      color-mix(in srgb, var(--tc-surface-sidebar) 82%, transparent);
    box-shadow:
      -28px 0 90px color-mix(in srgb, var(--tc-bg-base) 34%, transparent),
      inset 0 1px 0 var(--glass-bright);
    backdrop-filter: blur(22px) saturate(1.18);
    overflow: hidden;
    animation: mobileDrawerIn 180ms ease both;
  }

  .mobile-menu-head {
    min-width: 0;
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    align-items: center;
    gap: 14px;
    padding: max(22px, env(safe-area-inset-top)) 24px 16px;
  }

  .mobile-menu-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--tc-text-primary);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .mobile-menu-close {
    width: 58px;
    height: 58px;
    justify-self: end;
  }

  .mobile-menu-body.simple-sidebar {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    padding: 0 18px 18px;
    flex-direction: column;
    gap: 12px;
    border: 0;
    background: transparent;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .mobile-menu-body > .simple-server-head:first-child {
    display: none;
  }

  .mobile-menu-body .home-directory-nav,
  .mobile-menu-body .home-directory-scroll,
  .mobile-menu-body .home-directory-actions,
  .mobile-menu-body .server-home-nav,
  .mobile-menu-body .simple-section,
  .mobile-menu-body .v06-section-card {
    margin: 0;
    padding: 14px;
  }

  .mobile-menu-body .home-directory-scroll {
    max-height: none;
  }

  .mobile-menu-body .simple-user-strip,
  .mobile-menu-body .v13-combo-dock {
    margin-top: auto;
    position: sticky;
    bottom: 0;
    border-radius: var(--tc-radius-lg);
  }

  .mobile-nav {
    gap: 14px;
  }

  .mobile-nav-card {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: var(--tc-radius-lg);
  }

  .mobile-global-nav .nav-row,
  .mobile-current-server .nav-row {
    width: 100%;
    justify-content: start;
  }

  .mobile-servers-nav {
    gap: 12px;
  }

  .mobile-servers-nav .home-server-list {
    display: grid;
    gap: 8px;
  }

  .mobile-servers-nav .home-server-empty {
    margin: 0;
    padding: 10px 12px;
    color: var(--tc-text-muted);
    border: 1px solid var(--tc-border-subtle);
    border-radius: var(--tc-radius-md);
    background: var(--tc-surface-card-muted);
    font-size: 12px;
    line-height: 1.4;
  }

  .mobile-menu-section-title,
  .mobile-current-server-head {
    min-width: 0;
    display: grid;
    align-items: center;
    gap: 10px;
  }

  .mobile-menu-section-title {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 38px;
    color: var(--tc-text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-menu-section-title button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: var(--tc-text-secondary);
    border: 1px solid var(--tc-border-subtle);
    background: var(--tc-surface-card-muted);
  }

  .mobile-menu-section-actions {
    display: inline-flex;
    align-items: center;
    justify-content: end;
    gap: 6px;
    min-width: 0;
  }

  .mobile-server-group {
    min-width: 0;
    display: grid;
    gap: 8px;
  }

  .mobile-server-row {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .mobile-current-server-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--tc-border-subtle);
  }

  .mobile-current-server-head div {
    min-width: 0;
  }

  .mobile-current-server-head strong,
  .mobile-current-server-head em {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-current-server-head strong {
    color: var(--tc-text-primary);
    font-size: 16px;
  }

  .mobile-current-server-head em {
    color: var(--tc-text-muted);
    font-style: normal;
    font-size: 12px;
  }

  .mobile-channel-list {
    min-width: 0;
    display: grid;
    gap: 8px;
  }

  .mobile-channel-item {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
  }

  .mobile-channel-row {
    min-width: 0;
    width: 100%;
  }

  .mobile-channel-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-channel-row em {
    margin-left: auto;
    color: var(--tc-text-muted);
    font-style: normal;
    font-size: 11px;
    text-transform: uppercase;
  }

  .mobile-menu-actions {
    margin-top: 2px;
  }

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

  .mobile-quick-action {
    min-width: 0;
    min-height: 78px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    padding: 10px;
    color: var(--tc-text-primary);
    border: 1px solid var(--tc-border-subtle);
    border-radius: var(--tc-radius-md);
    background:
      linear-gradient(180deg, var(--glass-bright), transparent),
      var(--tc-surface-card-muted);
    text-align: left;
  }

  .mobile-quick-action .ui-icon {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: var(--tc-accent);
  }

  .mobile-quick-action span,
  .mobile-quick-action strong,
  .mobile-quick-action em {
    min-width: 0;
    display: block;
  }

  .mobile-quick-action strong {
    overflow: hidden;
    font-size: 13px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-quick-action em {
    margin-top: 4px;
    color: var(--tc-text-muted);
    font-size: 11px;
    font-style: normal;
    line-height: 1.25;
  }

  .mobile-quick-action b {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    color: var(--tc-text-primary);
    border-radius: 999px;
    background: color-mix(in srgb, var(--tc-accent) 34%, var(--tc-surface-active));
    font-size: 11px;
    font-weight: 900;
  }

  .mobile-menu-search-empty {
    margin: 0;
    padding: 10px 12px;
    color: var(--tc-text-muted);
    border: 1px solid var(--tc-border-subtle);
    border-radius: var(--tc-radius-md);
    background: var(--tc-surface-card-muted);
    font-size: 12px;
    line-height: 1.4;
  }

  .simple-sidebar {
    width: 100%;
    min-width: 0;
    max-height: none;
    min-height: 0;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--tc-border);
  }

  .simple-main {
    order: -1;
  }

  .server-mode .simple-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .simple-server-head,
  .home-directory-head {
    min-height: 64px;
    padding: 10px 14px;
  }

  .simple-server-head h3,
  .home-directory-head h3 {
    min-width: 0;
  }

  .home-directory-scroll {
    max-height: 42dvh;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .server-mode .simple-section {
    max-height: 24dvh;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .server-mode .voice-section {
    max-height: 30dvh;
  }

  .home-directory-nav,
  .home-directory-scroll,
  .home-directory-actions,
  .server-mode .simple-section,
  .server-mode .v06-section-card {
    margin: 8px 10px;
    padding: 10px;
  }

  .home-server-row,
  .nav-row,
  .channel-item,
  .channel-row {
    min-width: 0;
  }

  .home-server-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .home-server-main,
  .home-server-copy,
  .home-server-copy strong,
  .home-server-copy span {
    min-width: 0;
  }

  .home-server-copy strong,
  .home-server-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-server-badge {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .simple-user-strip,
  .v13-combo-dock {
    padding: 10px 14px;
  }

  .v13-combo-dock.is-connected {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "voice voice voice"
      "avatar meta actions";
    align-items: center;
  }

  .combo-dock-actions {
    grid-area: actions;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
  }

  .combo-dock-actions .voice-noise-control {
    flex: 0 0 38px;
    width: 38px;
  }

  .combo-dock-actions .dock-icon {
    width: 38px;
    height: 38px;
  }

  .simple-main {
    width: 100%;
    min-width: 0;
    min-height: 0;
    border-right: 0;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: visible;
  }

  .simple-topbar {
    min-height: auto;
    padding: 10px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .simple-title,
  .simple-title h2 {
    min-width: 0;
  }

  .simple-title h2 {
    font-size: 19px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .simple-title {
    gap: 12px;
  }

  .simple-title > .ui-icon {
    display: none;
  }

  .header-actions {
    width: auto;
    display: grid;
    grid-template-columns: auto;
    gap: 8px;
    justify-content: end;
  }

  .topbar-theme-host,
  .header-actions .notification-button,
  .header-actions .members-toggle {
    display: none;
  }

  .header-actions .simple-search {
    min-width: 0;
    width: 54px;
    height: 54px;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
  }

  .header-actions .simple-search input {
    display: none;
  }

  .header-actions .simple-search .ui-icon {
    grid-column: 1;
  }

  .simple-content {
    min-width: 0;
    overflow: visible;
  }

  .simple-home,
  .server-home-v10,
  .server-home-v16,
  .simple-text-view,
  .simple-voice-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px;
    overflow-x: hidden;
  }

  .home-welcome,
  .home-action-card,
  .home-panel,
  .server-hero-v10,
  .server-hero-v16,
  .server-about-v10,
  .server-news-card-v18,
  .v06-section-card {
    min-width: 0;
  }

  .home-welcome,
  .server-hero-v10,
  .server-hero-v16 {
    min-height: auto;
    padding: 16px;
  }

  .home-welcome {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .home-welcome > div {
    min-width: 0;
  }

  .server-hero-visual-v10,
  .server-hero-visual-v16 {
    display: none;
  }

  .home-welcome h1,
  .server-hero-copy-v10 h1 {
    font-size: clamp(26px, 8vw, 36px);
    line-height: 1.08;
  }

  .home-actions,
  .server-hero-actions-v10 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    gap: 8px;
    justify-content: stretch;
    width: 100%;
  }

  .home-actions button,
  .server-hero-actions-v10 button {
    width: 100%;
    min-height: 44px;
    white-space: normal;
  }

  .home-card-grid,
  .home-two-col,
  .server-feature-grid-v16,
  .server-news-strip-v18,
  .server-stats-v10 {
    grid-template-columns: minmax(0, 1fr);
  }

  .server-news-card-v18 {
    grid-template-rows: 160px auto;
    min-height: 0;
  }

  .simple-message-list {
    padding: 12px;
    overflow-x: hidden;
  }

  .simple-message {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .simple-message p,
  .chat-attachment-card-v20,
  .news-card-body-v18 {
    overflow-wrap: anywhere;
  }

  .simple-composer {
    position: sticky;
    bottom: 0;
    z-index: 8;
    margin: 0;
    padding: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .chat-composer-v20 .primary-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 40px;
  }

  .chat-attachment-preview-v20 {
    grid-column: 1 / -1;
  }

  .emoji-picker-v20 {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    max-height: min(440px, 58dvh);
    z-index: 9100;
  }

  .sticker-picker-v20 {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    max-height: min(440px, 58dvh);
    z-index: 9100;
  }

  .theme-menu-popover {
    left: 10px;
    right: 10px;
    width: auto;
    min-width: 0;
  }

  .modal-backdrop {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .settings-modal.wide,
  .settings-suite {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100dvh;
    min-height: 0;
    max-height: none;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 0;
    resize: none;
  }

  .settings-modal.small,
  .settings-modal.server-settings-modal,
  .profile-modal,
  .news-create-modal-v18,
  .invite-modal-v19 {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }

  .settings-nav-panel {
    max-height: 30dvh;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--tc-border);
  }

  .settings-nav-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .settings-nav-panel .nav-row {
    width: 100%;
  }

  .settings-workspace {
    min-height: 0;
    overflow: auto;
    padding: 12px;
  }

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

  .settings-card label {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .settings-card input,
  .settings-card select,
  .settings-card textarea {
    width: 100%;
    min-width: 0;
  }

  .modal-backdrop:has(.settings-suite) {
    place-items: stretch;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .settings-modal.wide.settings-suite,
  .settings-suite {
    overflow: hidden;
  }

  .settings-suite::after {
    display: none;
  }

  .settings-nav-panel {
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
    max-height: 32dvh;
    padding: 12px 10px 10px;
    overflow: hidden;
  }

  .settings-nav-panel header {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 0 2px 10px;
  }

  .settings-avatar {
    width: 40px;
    height: 40px;
  }

  .settings-nav-panel header strong,
  .settings-nav-panel header span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-nav-panel nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    padding-bottom: 2px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .settings-nav-panel nav::-webkit-scrollbar {
    display: none;
  }

  .settings-nav-panel nav button {
    flex: 0 0 min(158px, 43vw);
    min-height: 40px;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    scroll-snap-align: start;
  }

  .settings-nav-panel nav button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-logout {
    min-height: 38px;
    padding: 8px 10px;
  }

  .settings-workspace {
    gap: 10px;
    padding:
      12px
      max(10px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    overflow: hidden;
  }

  .settings-workspace-head {
    gap: 10px;
    align-items: start;
  }

  .settings-workspace-head h2 {
    font-size: clamp(20px, 6vw, 24px);
    line-height: 1.1;
  }

  .settings-workspace-head p {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.35;
  }

  .settings-close {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .settings-tab-content {
    overflow: hidden;
    padding-right: 0;
  }

  .settings-tab-content > .settings-tab-grid,
  .settings-tab-content > .pro-settings-layout {
    gap: 12px;
    padding-right: 0;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .settings-tab-grid,
  .settings-tab-grid.single,
  .appearance-settings-grid,
  .pro-settings-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .settings-suite .settings-card {
    gap: 10px;
    padding: 12px;
  }

  .settings-suite .settings-card h3 {
    font-size: 15px;
  }

  .settings-card label,
  .switch-row,
  .sound-row,
  .role-row {
    max-width: 100%;
    min-width: 0;
  }

  .settings-card label > span,
  .switch-row span,
  .sound-row strong,
  .role-row span,
  .role-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .switch-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sound-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .sound-row > :not(strong) {
    width: 100%;
    justify-content: center;
  }

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

  .news-drawer-v18,
  .notifications-drawer-v19,
  .profile-comments-drawer {
    position: fixed;
    inset: 0;
    z-index: 7200;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .simple-content:has(.profile-comments-drawer) {
    position: relative;
    z-index: 7300;
  }

  .news-drawer-v18 header,
  .notifications-drawer-v19 header,
  .profile-comments-drawer header {
    gap: 8px;
  }

  .news-list-row-v18 {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "media"
      "title"
      "date"
      "excerpt";
  }

  .news-list-row-v18 img,
  .news-list-row-v18 > span {
    width: 100%;
    height: 160px;
  }

  .news-list-row-v18 i {
    display: none;
  }

  .news-detail-meta-v18 {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .media-viewer-backdrop-v20 {
    padding: 0;
  }

  .media-viewer-v20 {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .voice-room-page.v12-call-page {
    min-height: 62dvh;
    padding: 10px;
    overflow: hidden;
  }

  .voice-room-page.v12-call-page .v12-voice-panel {
    height: auto;
    min-height: 58dvh;
    overflow: hidden;
  }

  .voice-room-page.v12-call-page .v12-call-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .voice-room-page.v12-call-page .v07-call-tiles.unified-call-grid,
  .voice-room-page.v12-call-page .v07-call-tiles.unified-call-grid.no-media {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: minmax(210px, 38dvh) !important;
    overflow: hidden;
  }

  .v06-call-controls {
    position: sticky;
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 91;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px;
    gap: 8px;
    overflow-x: hidden;
    flex-wrap: wrap;
    justify-content: center;
    scrollbar-width: none;
  }

  .v06-call-controls button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .v06-call-controls::-webkit-scrollbar {
    display: none;
  }

  .simple-discord-shell,
  .simple-discord-shell.global-home-mode,
  .simple-discord-shell.server-mode,
  .simple-discord-shell.members-hidden {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
  }

  .simple-main {
    order: 0 !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
  }

  .simple-topbar,
  .simple-content,
  .simple-home {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
  }
}

@media (min-width: 1181px) and (max-width: 1320px) {
  .simple-main,
  .simple-content,
  .voice-room-page.v12-call-page {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .simple-topbar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    gap: 8px;
    padding-inline: 10px;
    overflow: hidden;
  }

  .simple-topbar:has(.theme-menu-host.is-open) {
    overflow: visible;
    z-index: 6200;
  }

  .simple-title,
  .simple-title h2 {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .simple-title span {
    font-size: 22px;
  }

  .simple-title h2 {
    font-size: 20px;
  }

  .header-actions {
    width: auto;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: repeat(2, 34px) minmax(104px, 1fr);
    gap: 6px;
    justify-content: end;
  }

  .header-actions .dock-icon {
    width: 34px;
    height: 34px;
  }

  .header-actions .dock-icon:nth-of-type(n + 3) {
    display: none;
  }

  .header-actions .simple-search {
    width: min(150px, 100%);
    min-width: 0;
    height: 36px;
  }

  .voice-room-page.v12-call-page {
    padding: 8px;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .voice-room-page.v12-call-page .v12-voice-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 10px;
    overflow: hidden;
  }

  .voice-room-page.v12-call-page .v12-call-summary {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .voice-room-page.v12-call-page .v12-call-summary span {
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .voice-room-page.v12-call-page .v07-call-tiles.unified-call-grid,
  .voice-room-page.v12-call-page .v07-call-tiles.unified-call-grid.no-media {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: minmax(180px, 1fr) !important;
    gap: 8px !important;
    overflow: hidden;
  }

  .voice-room-page.v12-call-page .v06-call-controls {
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    justify-self: stretch;
    box-sizing: border-box;
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
  }

  .voice-room-page.v12-call-page .v06-call-controls button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .voice-room-page.v12-call-page:fullscreen .v06-call-controls,
  .voice-room-page.v12-call-page[data-test-fullscreen] .v06-call-controls {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: 18px !important;
    width: max-content !important;
    max-width: calc(100vw - 20px) !important;
    min-width: 0 !important;
    transform: translate(-50%, 18px);
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  .voice-room-page.v12-call-page:fullscreen .exit-fullscreen-control,
  .voice-room-page.v12-call-page[data-test-fullscreen] .exit-fullscreen-control {
    display: grid !important;
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
  }

  .voice-room-page.simple-voice-page.v06-call-page.v07-call-page.v12-call-page {
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    padding: 8px !important;
    overflow: clip;
    contain: inline-size paint;
  }
}

@media (max-width: 520px) {
  .home-directory-scroll {
    max-height: 38dvh;
  }

  .server-mode .simple-section {
    max-height: 22dvh;
  }

  .server-mode .voice-section {
    max-height: 28dvh;
  }

  .home-server-badge {
    display: none;
  }

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

  .header-actions .dock-icon:nth-of-type(n + 3) {
    display: none;
  }

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

  .settings-nav-panel nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .simple-message {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .simple-message .avatar {
    width: 32px;
    height: 32px;
  }

  .voice-room-page.v12-call-page .v07-call-tiles.unified-call-grid,
  .voice-room-page.v12-call-page .v07-call-tiles.unified-call-grid.no-media {
    grid-auto-rows: minmax(190px, 34dvh) !important;
  }

  .v13-combo-dock.is-connected {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "voice voice"
      "avatar meta"
      "actions actions";
  }

  .combo-dock-actions {
    justify-content: stretch;
  }

  .combo-dock-actions .voice-noise-control {
    flex: 1 1 0;
    width: auto;
  }

  .combo-dock-actions .dock-icon {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animated-bg::before,
  .animated-bg::after,
  .ambient-cloud,
  .simple-content > * {
    animation: none !important;
  }
}
/* Subscription / support UI */
.pro-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.pro-summary-card,
.pro-plan-card,
.doberman-support-card {
  position: relative;
  overflow: hidden;
}

.pro-summary-card::before,
.pro-plan-card::before,
.doberman-support-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--tc-accent) 20%, transparent), transparent 36%),
    radial-gradient(circle at 82% 12%, color-mix(in srgb, #a873ff 18%, transparent), transparent 34%);
  opacity: 0.7;
}

.pro-card-head,
.pro-action-row,
.pro-feature-list,
.pro-plan-grid,
.pro-manual-note,
.doberman-copy,
.support-thanks {
  position: relative;
  z-index: 1;
}

.pro-card-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.pro-eyebrow,
.pro-status-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--tc-border-subtle);
  background: color-mix(in srgb, var(--tc-surface-card) 78%, transparent);
  color: var(--tc-text-secondary);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  clip-path: polygon(0 0, calc(100% - var(--tc-shape-cut-sm)) 0, 100% var(--tc-shape-cut-sm), 100% 100%, var(--tc-shape-cut-sm) 100%, 0 calc(100% - var(--tc-shape-cut-sm)));
}

.pro-eyebrow img,
.pro-status-pill img,
.pro-manual-note img,
.support-thanks img,
.pro-plan-option small img,
.pro-connect-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.pro-status-pill.active {
  color: var(--tc-success);
  border-color: color-mix(in srgb, var(--tc-success) 48%, transparent);
}

.pro-summary-card h3,
.pro-plan-card h3,
.doberman-copy h3 {
  margin: 12px 0 8px;
}

.pro-feature-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.pro-feature-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--tc-border-subtle);
  background: color-mix(in srgb, var(--tc-surface-card-muted) 78%, transparent);
  clip-path: polygon(0 0, calc(100% - var(--tc-shape-cut-sm)) 0, 100% var(--tc-shape-cut-sm), 100% 100%, var(--tc-shape-cut-sm) 100%, 0 calc(100% - var(--tc-shape-cut-sm)));
}

.pro-feature-row > .asset-icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 14px;
  color: var(--tc-accent);
  background: color-mix(in srgb, var(--tc-accent) 18%, var(--tc-surface-card));
  -webkit-mask-origin: content-box;
  mask-origin: content-box;
  -webkit-mask-clip: content-box;
  mask-clip: content-box;
}

.pro-feature-row strong,
.pro-plan-option strong,
.support-thanks strong {
  color: var(--tc-text-primary);
}

.pro-feature-row span,
.pro-plan-option em,
.support-thanks span {
  display: block;
  margin-top: 4px;
  color: var(--tc-text-muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.pro-feature-row i {
  min-width: 34px;
  color: var(--tc-text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.pro-feature-row.enabled {
  border-color: color-mix(in srgb, var(--tc-success) 48%, transparent);
}

.pro-feature-row.enabled i {
  color: var(--tc-success);
}

.pro-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.pro-connect-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.pro-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.pro-plan-option {
  display: grid;
  gap: 10px;
  min-height: 168px;
  align-content: center;
  justify-items: center;
  padding: 16px 12px;
  border: 1px solid var(--tc-border-subtle);
  background: color-mix(in srgb, var(--tc-surface-card-muted) 74%, transparent);
  text-align: center;
  clip-path: polygon(0 0, calc(100% - var(--tc-shape-cut-sm)) 0, 100% var(--tc-shape-cut-sm), 100% 100%, var(--tc-shape-cut-sm) 100%, 0 calc(100% - var(--tc-shape-cut-sm)));
}

.pro-plan-option.featured {
  border-color: color-mix(in srgb, var(--tc-accent-2) 58%, var(--tc-border-strong));
  box-shadow: 0 18px 46px color-mix(in srgb, var(--tc-accent-2) 16%, transparent);
}

.pro-plan-option small {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--tc-border-subtle);
  color: var(--tc-text-secondary);
  font-weight: 800;
}

.pro-plan-option span {
  color: var(--tc-text-primary);
  font-size: 26px;
  font-weight: 900;
}

.pro-manual-note {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--tc-border-subtle);
  color: var(--tc-text-muted);
  background: color-mix(in srgb, var(--tc-surface-card) 72%, transparent);
}

.pro-manual-note p {
  margin: 0;
}

.doberman-support-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.doberman-art {
  position: relative;
  z-index: 1;
  min-height: 210px;
  border: 1px solid var(--tc-border-subtle);
  overflow: hidden;
  background: color-mix(in srgb, var(--tc-surface-card-muted) 84%, transparent);
  clip-path: polygon(0 0, calc(100% - var(--tc-shape-cut-sm)) 0, 100% var(--tc-shape-cut-sm), 100% 100%, var(--tc-shape-cut-sm) 100%, 0 calc(100% - var(--tc-shape-cut-sm)));
}

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

.support-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.support-tier-grid button {
  min-height: 72px;
  border: 1px solid var(--tc-border-subtle);
  background: color-mix(in srgb, var(--tc-surface-card-muted) 84%, transparent);
  color: var(--tc-text-primary);
  font-weight: 900;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - var(--tc-shape-cut-sm)) 0, 100% var(--tc-shape-cut-sm), 100% 100%, var(--tc-shape-cut-sm) 100%, 0 calc(100% - var(--tc-shape-cut-sm)));
}

.support-tier-grid button:hover {
  border-color: var(--tc-border-strong);
  transform: translateY(-1px);
}

.support-tier-grid button span {
  display: block;
  margin-top: 4px;
  color: var(--tc-text-muted);
  font-size: 12px;
}

.support-thanks {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--tc-accent-2) 42%, var(--tc-border-subtle));
  background: color-mix(in srgb, var(--tc-surface-card) 70%, transparent);
  clip-path: polygon(0 0, calc(100% - var(--tc-shape-cut-sm)) 0, 100% var(--tc-shape-cut-sm), 100% 100%, var(--tc-shape-cut-sm) 100%, 0 calc(100% - var(--tc-shape-cut-sm)));
}

@media (max-width: 980px) {
  .pro-settings-layout,
  .doberman-support-card {
    grid-template-columns: 1fr;
  }

  .pro-plan-grid,
  .support-tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pro-card-head,
  .pro-action-row {
    display: grid;
  }

  .pro-plan-grid,
  .support-tier-grid {
    grid-template-columns: 1fr;
  }
}

/* Premium beige theme */
:root[data-theme="beige"] body {
  color: var(--beige-text);
  background: var(--beige-bg);
}

:root[data-theme="beige"] .animated-bg {
  background:
    radial-gradient(circle at 12% 18%, rgba(203, 169, 124, 0.22) 0%, transparent 38%),
    radial-gradient(circle at 74% 8%, rgba(169, 143, 197, 0.18) 0%, transparent 34%),
    radial-gradient(circle at 88% 78%, rgba(217, 170, 162, 0.16) 0%, transparent 42%),
    linear-gradient(135deg, #e4d8c7 0%, #ded0bd 45%, #eadfce 100%);
}

:root[data-theme="beige"] .animated-bg::before {
  inset: -14%;
  opacity: 0.22;
  filter: blur(2px) saturate(1.04);
  background:
    radial-gradient(circle at 10% 24%, rgba(255, 248, 235, 0.32), transparent 28%),
    radial-gradient(circle at 72% 16%, rgba(201, 183, 217, 0.22), transparent 34%),
    radial-gradient(circle at 88% 84%, rgba(232, 194, 187, 0.22), transparent 38%);
  mix-blend-mode: soft-light;
  animation: ambientFloat 44s ease-in-out infinite;
}

:root[data-theme="beige"] .animated-bg::after {
  inset: -16%;
  opacity: 0.18;
  filter: blur(8px) saturate(1.03);
  background:
    linear-gradient(100deg, transparent 0 24%, rgba(255, 240, 208, 0.24) 25%, transparent 27% 58%, rgba(169, 143, 197, 0.14) 59%, transparent 61%),
    radial-gradient(circle at 42% 94%, rgba(215, 185, 130, 0.18), transparent 34%);
  mix-blend-mode: soft-light;
  animation: ambientFloatReverse 58s ease-in-out infinite;
}

:root[data-theme="beige"] .ambient-cloud {
  opacity: 0.26;
  filter: blur(18px) saturate(1.02);
  mix-blend-mode: soft-light;
}

:root[data-theme="beige"] .cloud-one,
:root[data-theme="beige"] .cloud-five {
  background: radial-gradient(circle, rgba(234, 212, 170, 0.28), rgba(201, 183, 217, 0.12) 52%, transparent 74%);
}

:root[data-theme="beige"] .cloud-two,
:root[data-theme="beige"] .cloud-six {
  background: radial-gradient(circle, rgba(217, 170, 162, 0.2), rgba(203, 184, 149, 0.16) 54%, transparent 76%);
}

:root[data-theme="beige"] .cloud-three,
:root[data-theme="beige"] .cloud-four {
  background: radial-gradient(circle, rgba(169, 143, 197, 0.2), rgba(245, 237, 226, 0.18) 48%, transparent 74%);
}

:root[data-theme="beige"] .simple-discord-shell {
  background:
    linear-gradient(135deg, rgba(255, 248, 235, 0.34), rgba(221, 208, 190, 0.18)),
    rgba(241, 231, 217, 0.68);
  border-color: rgba(132, 104, 74, 0.2);
  box-shadow:
    0 24px 70px rgba(83, 62, 43, 0.14),
    inset 0 1px 0 rgba(255, 246, 232, 0.7);
}

:root[data-theme="beige"] :where(.server-rail, .taksa-rail, .v15-quick-rail) {
  background:
    linear-gradient(180deg, rgba(231, 219, 203, 0.92), rgba(218, 204, 186, 0.88));
  border-color: rgba(132, 104, 74, 0.18);
}

:root[data-theme="beige"] .simple-sidebar {
  background:
    radial-gradient(circle at 74% 14%, rgba(169, 143, 197, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(231, 219, 203, 0.92), rgba(218, 204, 186, 0.88));
  border-color: rgba(132, 104, 74, 0.18);
}

:root[data-theme="beige"] .simple-main {
  background:
    radial-gradient(circle at 72% 12%, rgba(169, 143, 197, 0.14), transparent 36%),
    rgba(241, 231, 217, 0.48);
  border-color: rgba(132, 104, 74, 0.18);
}

:root[data-theme="beige"] .simple-members {
  background:
    radial-gradient(circle at 42% 8%, rgba(215, 185, 130, 0.16), transparent 34%),
    rgba(232, 220, 203, 0.76);
  border-color: rgba(132, 104, 74, 0.18);
}

:root[data-theme="beige"] :where(.simple-topbar, .v06-topbar, .channel-header) {
  background:
    linear-gradient(180deg, rgba(246, 238, 228, 0.92), rgba(232, 220, 204, 0.86));
  border-color: rgba(132, 104, 74, 0.16);
  box-shadow:
    0 12px 32px rgba(80, 61, 44, 0.08),
    inset 0 1px 0 rgba(255, 249, 238, 0.75);
}

:root[data-theme="beige"] :where(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-action-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .profile-modal,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .media-viewer-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-hero,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .direct-inbox-page,
  .direct-conversation-row
) {
  border-color: rgba(132, 104, 74, 0.17);
  background:
    linear-gradient(180deg, rgba(247, 240, 230, 0.92), rgba(235, 224, 209, 0.86));
  box-shadow:
    0 16px 42px rgba(83, 62, 43, 0.1),
    inset 0 1px 0 rgba(255, 249, 238, 0.68);
  backdrop-filter: blur(14px) saturate(1.12);
}

:root[data-theme="beige"] :where(.ui-panel, .settings-workspace, .simple-main, .voice-grid, .stream-stage) {
  background:
    linear-gradient(180deg, rgba(241, 231, 217, 0.88), rgba(224, 211, 194, 0.82));
}

:root[data-theme="beige"] :where(.ui-list-row, .nav-row, .home-server-row, .channel-row, .sound-row, .role-row) {
  color: var(--beige-text-soft);
  border-color: rgba(132, 104, 74, 0.12);
  background: rgba(245, 237, 226, 0.3);
}

:root[data-theme="beige"] :where(
  .ui-list-row:hover,
  .ui-list-row.active,
  .ui-list-row.is-active,
  .nav-row:hover,
  .nav-row.active,
  .channel-item.active .ui-channel-row,
  .voice-channel.active .ui-channel-row
) {
  color: #3b2f27;
  border-color: rgba(169, 143, 197, 0.35);
  background:
    linear-gradient(135deg, rgba(218, 199, 227, 0.62), rgba(235, 218, 194, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 235, 0.6),
    0 8px 20px rgba(112, 86, 63, 0.08);
}

:root[data-theme="beige"] :where(
  .ui-field,
  .ui-composer input,
  .ui-composer textarea,
  .ui-panel input,
  .ui-panel select,
  .ui-panel textarea,
  .ui-card input,
  .ui-card select,
  .ui-card textarea,
  .ui-modal input,
  .ui-modal select,
  .ui-modal textarea,
  .home-server-search,
  .simple-search
) {
  color: var(--beige-text);
  border-color: rgba(132, 104, 74, 0.18);
  background: rgba(239, 228, 213, 0.72);
  box-shadow: inset 0 1px 3px rgba(83, 62, 43, 0.05);
}

:root[data-theme="beige"] :where(input::placeholder, textarea::placeholder) {
  color: #948678;
}

:root[data-theme="beige"] select option {
  color: var(--beige-text);
  background: var(--beige-surface-soft);
}

:root[data-theme="beige"] .ui-button-primary,
:root[data-theme="beige"] .primary-button {
  color: var(--beige-text);
  border-color: rgba(132, 104, 74, 0.18);
  background: linear-gradient(135deg, #ead4aa 0%, #d9aaa2 48%, #c9b7d9 100%);
  box-shadow:
    0 12px 28px rgba(132, 104, 74, 0.14),
    inset 0 1px 0 rgba(255, 248, 235, 0.62);
}

:root[data-theme="beige"] .ui-button-primary:hover,
:root[data-theme="beige"] .primary-button:hover {
  color: var(--beige-text);
  background: linear-gradient(135deg, #f0ddb8 0%, #e0b6af 48%, #d3c0e0 100%);
  box-shadow:
    0 16px 34px rgba(132, 104, 74, 0.18),
    inset 0 1px 0 rgba(255, 248, 235, 0.74);
}

:root[data-theme="beige"] .ui-button-secondary,
:root[data-theme="beige"] .ghost-button,
:root[data-theme="beige"] .file-button,
:root[data-theme="beige"] :where(.ui-icon-button, .dock-icon, .home-server-pin, .server-add) {
  color: #4f4237;
  border-color: rgba(132, 104, 74, 0.18);
  background:
    linear-gradient(180deg, rgba(245, 237, 226, 0.88), rgba(230, 217, 199, 0.82));
}

:root[data-theme="beige"] :where(.ui-button-secondary:hover, .ghost-button:hover, .file-button:hover, .ui-icon-button:hover, .dock-icon:hover) {
  color: #3b2f27;
  border-color: rgba(169, 143, 197, 0.32);
  background:
    linear-gradient(135deg, rgba(201, 183, 217, 0.78), rgba(235, 218, 194, 0.78));
}

:root[data-theme="beige"] :where(.home-server-badge, .news-tag-v18, .reaction-button, .profile-emoji-chip, .message-reaction, .server-pill-v10) {
  color: var(--beige-text-soft);
  border-color: rgba(132, 104, 74, 0.16);
  background: rgba(239, 228, 213, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 248, 235, 0.45);
}

:root[data-theme="beige"] :where(.home-server-badge, .news-tag-v18) {
  color: #278657;
  border-color: rgba(57, 185, 118, 0.22);
  background: rgba(57, 185, 118, 0.12);
}

:root[data-theme="beige"] :where(
  .avatar:not(.image-avatar),
  .mini-avatar:not(.image-avatar),
  .social-avatar:not(.image-avatar),
  .my-page-avatar:not(.image-avatar),
  .profile-modal-avatar:not(.image-avatar),
  .settings-avatar
) {
  color: #fffaf1;
  border-color: rgba(234, 212, 170, 0.75);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 248, 235, 0.45), transparent 38%),
    linear-gradient(135deg, #b8a2ce 0%, #9f86bd 52%, #d6bc8e 100%);
  box-shadow:
    0 12px 28px rgba(88, 68, 48, 0.18),
    inset 0 1px 0 rgba(255, 248, 235, 0.55);
}

:root[data-theme="beige"] .my-page-cover {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 236, 198, 0.36) 0%, transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(169, 143, 197, 0.28) 0%, transparent 40%),
    linear-gradient(115deg, #d8c3a7 0%, #ead8bb 18%, #f0e1cc 34%, #cdb8db 54%, #ead0b6 72%, #bfa8d2 100%);
  background-blend-mode: soft-light, normal, normal;
}

:root[data-theme="beige"] .my-page-cover::before {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 240, 208, 0.32) 34%, rgba(169, 143, 197, 0.18) 58%, transparent 100%);
  opacity: 0.65;
}

:root[data-theme="beige"] :where(.simple-title h2, .home-welcome h1, .settings-workspace-head h2, .my-page-title h1, .home-action-card strong, .home-panel h3, .my-page-side-card h3) {
  color: #241f1a;
}

:root[data-theme="beige"] :where(.home-welcome p, .settings-workspace-head p, .settings-card p, .helper-text, .my-page-title p, .my-page-status, .profile-upload-policy, .empty-section, .empty-note) {
  color: var(--beige-text-muted);
}

:root[data-theme="beige"] :where(hr, .rail-separator, .home-server-group, .section-title, .message-divider) {
  border-color: rgba(132, 104, 74, 0.13);
}

:root[data-theme="beige"] .theme-menu-popover {
  color: var(--beige-text);
  border-color: rgba(132, 104, 74, 0.2);
  background:
    linear-gradient(180deg, rgba(246, 238, 228, 0.96), rgba(232, 220, 204, 0.9));
  box-shadow:
    0 18px 45px rgba(83, 62, 43, 0.12),
    inset 0 1px 0 rgba(255, 249, 238, 0.72);
}

:root[data-theme="beige"][data-design="cyberpunk"] :where(.ui-panel, .ui-card, .settings-modal, .news-drawer-v18, .notifications-drawer-v19, .v13-combo-dock) {
  box-shadow:
    inset 0 0 0 1px rgba(169, 143, 197, 0.12),
    0 0 26px rgba(215, 185, 130, 0.08),
    var(--tc-shadow-soft);
}

:root[data-theme="beige"][data-design="cyberpunk"] :where(.primary-button, .ghost-button, .dock-icon, .ui-icon-button, .theme-menu-popover button):hover {
  box-shadow:
    inset 0 0 0 1px rgba(169, 143, 197, 0.18),
    0 0 22px rgba(215, 185, 130, 0.14);
}

/* Premium retro theme */
:root[data-theme="retro"] body {
  color: var(--retro-ink);
  background: var(--retro-indigo);
}

:root[data-theme="retro"] .animated-bg {
  background:
    radial-gradient(circle at 16% 12%, rgba(222, 194, 133, 0.1), transparent 30%),
    radial-gradient(circle at 86% 86%, rgba(210, 110, 52, 0.12), transparent 32%),
    linear-gradient(135deg, #28263a 0%, #403b52 48%, #201f31 100%);
}

:root[data-theme="retro"] .animated-bg::before {
  inset: 0;
  opacity: 0.24;
  filter: none;
  background:
    radial-gradient(circle at 12px 14px, rgba(255, 239, 204, 0.2) 0 1px, transparent 1.8px),
    radial-gradient(circle at 34px 42px, rgba(37, 35, 61, 0.16) 0 1px, transparent 1.8px),
    repeating-linear-gradient(0deg, rgba(255, 244, 217, 0.08) 0 1px, transparent 1px 7px);
  background-size: 46px 46px, 58px 58px, auto;
  mix-blend-mode: soft-light;
  animation: none;
}

:root[data-theme="retro"] .animated-bg::after {
  inset: 0;
  opacity: 0.16;
  filter: none;
  background:
    repeating-linear-gradient(90deg, rgba(20, 19, 34, 0.22) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(233, 216, 183, 0.06), transparent 28%, rgba(37, 35, 61, 0.08));
  mix-blend-mode: multiply;
  animation: none;
}

:root[data-theme="retro"] .ambient-cloud {
  display: none;
}

:root[data-theme="retro"] .simple-discord-shell {
  background:
    repeating-linear-gradient(0deg, rgba(222, 194, 133, 0.04) 0 1px, transparent 1px 7px),
    rgba(29, 27, 42, 0.26);
  border-color: rgba(222, 194, 133, 0.2);
  box-shadow:
    0 20px 48px rgba(18, 16, 26, 0.42),
    inset 0 0 0 1px rgba(31, 27, 37, 0.32);
}

:root[data-theme="retro"] :where(.server-rail, .taksa-rail, .v15-quick-rail) {
  color: var(--retro-ink);
  border-color: var(--retro-line-strong);
  background:
    radial-gradient(circle at 18% 14%, rgba(46, 36, 24, 0.1) 0 1px, transparent 1.8px),
    repeating-linear-gradient(0deg, rgba(31, 27, 37, 0.08) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, rgba(222, 194, 133, 0.98), rgba(190, 146, 77, 0.96));
}

:root[data-theme="retro"] .simple-sidebar,
:root[data-theme="retro"] .simple-members {
  color: var(--retro-ink);
  border-color: var(--retro-line-strong);
  background:
    radial-gradient(circle at 18px 20px, rgba(46, 36, 24, 0.1) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72px 56px, rgba(46, 36, 24, 0.06) 0 1px, transparent 1.8px),
    repeating-linear-gradient(0deg, rgba(31, 27, 37, 0.07) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(224, 195, 133, 0.98), rgba(194, 151, 83, 0.96));
  background-size: auto;
  box-shadow:
    inset -1px 0 0 rgba(255, 226, 164, 0.36),
    inset 0 0 0 1px rgba(31, 27, 37, 0.18);
}

:root[data-theme="retro"] .simple-main {
  color: var(--retro-ink);
  border-color: rgba(32, 28, 45, 0.28);
  background:
    radial-gradient(circle at 30px 24px, rgba(222, 194, 133, 0.08) 0 1px, transparent 1.9px),
    repeating-linear-gradient(90deg, rgba(20, 18, 30, 0.18) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(45, 42, 64, 0.92), rgba(31, 30, 47, 0.94));
}

:root[data-theme="retro"] :where(.simple-topbar, .v06-topbar, .channel-header) {
  color: var(--retro-ink);
  border-color: var(--retro-line-strong);
  background:
    radial-gradient(circle at 24px 22px, rgba(46, 36, 24, 0.1) 0 1px, transparent 1.8px),
    repeating-linear-gradient(0deg, rgba(31, 27, 37, 0.08) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(235, 207, 151, 0.98), rgba(199, 158, 92, 0.96));
  background-size: auto;
  box-shadow:
    0 10px 22px rgba(18, 16, 26, 0.22),
    inset 0 1px 0 rgba(255, 226, 164, 0.52);
}

:root[data-theme="retro"] :where(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-action-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .profile-modal,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .media-viewer-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-hero,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .direct-inbox-page,
  .direct-conversation-row
) {
  color: var(--retro-ink);
  border-color: var(--retro-line-strong);
  background: var(--panel-bg);
  background-size: auto;
  box-shadow: var(--panel-shadow);
  backdrop-filter: none;
}

:root[data-theme="retro"] :where(
  .simple-title h2,
  .home-directory-brand strong,
  .section-title,
  .nav-row strong,
  .home-server-directory-title span,
  .home-server-group-toggle strong,
  .simple-server-name strong,
  .settings-workspace-head h2,
  .settings-card h3,
  .my-page-title h1,
  .my-page-side-card h3,
  .home-welcome h1,
  .home-action-card strong,
  .message-author,
  .server-news-card-v18 h3
) {
  color: var(--retro-ink);
  font-family: var(--retro-font);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

:root[data-theme="retro"] :where(.helper-text, .empty-note, .empty-section, .settings-card p, .my-page-status, .profile-upload-policy) {
  color: var(--retro-muted);
}

:root[data-theme="retro"] :where(.ui-list-row, .nav-row, .home-server-row, .channel-row, .sound-row, .role-row, .direct-conversation-row) {
  color: var(--retro-ink-soft);
  border-color: rgba(63, 53, 38, 0.2);
  background: rgba(233, 216, 183, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 246, 222, 0.38);
}

:root[data-theme="retro"] :where(
  .ui-list-row:hover,
  .ui-list-row.active,
  .ui-list-row.is-active,
  .nav-row:hover,
  .nav-row.active,
  .home-server-row:hover,
  .home-server-row.active,
  .channel-item.active .ui-channel-row,
  .voice-channel.active .ui-channel-row
) {
  color: #221d30;
  border-color: rgba(123, 67, 37, 0.55);
  background: linear-gradient(180deg, rgba(213, 124, 70, 0.78), rgba(188, 97, 54, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 222, 177, 0.46),
    0 8px 18px rgba(78, 49, 31, 0.18);
}

:root[data-theme="retro"] :where(
  .ui-field,
  .ui-composer input,
  .ui-composer textarea,
  .ui-panel input,
  .ui-panel select,
  .ui-panel textarea,
  .ui-card input,
  .ui-card select,
  .ui-card textarea,
  .ui-modal input,
  .ui-modal select,
  .ui-modal textarea,
  .home-server-search,
  .simple-search
) {
  color: var(--retro-ink);
  border-color: rgba(63, 53, 38, 0.34);
  background:
    radial-gradient(circle at 14px 12px, rgba(85, 63, 34, 0.08) 0 1px, transparent 1.6px),
    rgba(233, 216, 183, 0.68);
  box-shadow:
    inset 0 1px 2px rgba(68, 48, 26, 0.1),
    inset 0 0 0 1px rgba(255, 246, 222, 0.22);
}

:root[data-theme="retro"] :where(input::placeholder, textarea::placeholder) {
  color: rgba(112, 99, 79, 0.78);
}

:root[data-theme="retro"] select option {
  color: var(--retro-ink);
  background: var(--retro-paper-soft);
}

:root[data-theme="retro"] .ui-button-primary,
:root[data-theme="retro"] .primary-button {
  color: var(--retro-paper-soft);
  border-color: rgba(78, 49, 31, 0.42);
  background: linear-gradient(180deg, #cf7a45, #a65331);
  box-shadow:
    0 10px 20px rgba(78, 49, 31, 0.24),
    inset 0 1px 0 rgba(255, 218, 172, 0.42);
}

:root[data-theme="retro"] .ui-button-primary:hover,
:root[data-theme="retro"] .primary-button:hover {
  color: #fff0d4;
  background: linear-gradient(180deg, #db8650, #b65f39);
}

:root[data-theme="retro"] .ui-button-secondary,
:root[data-theme="retro"] .ghost-button,
:root[data-theme="retro"] .file-button,
:root[data-theme="retro"] :where(.ui-icon-button, .dock-icon, .home-server-pin, .server-add, .theme-settings-button) {
  color: var(--retro-ink);
  border-color: rgba(63, 53, 38, 0.3);
  background:
    radial-gradient(circle at 12px 11px, rgba(80, 59, 35, 0.08) 0 1px, transparent 1.7px),
    linear-gradient(180deg, rgba(239, 224, 195, 0.96), rgba(220, 199, 164, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 222, 0.5),
    0 8px 16px rgba(38, 32, 25, 0.1);
}

:root[data-theme="retro"] :where(.ui-button-secondary:hover, .ghost-button:hover, .file-button:hover, .ui-icon-button:hover, .dock-icon:hover, .theme-settings-button:hover) {
  color: var(--retro-paper-soft);
  border-color: rgba(78, 49, 31, 0.54);
  background: linear-gradient(180deg, #cf7a45, #a65331);
}

:root[data-theme="retro"] :where(.home-server-badge, .news-tag-v18, .reaction-button, .profile-emoji-chip, .message-reaction, .server-pill-v10, .role-pill) {
  color: var(--retro-ink-soft);
  border-color: rgba(63, 53, 38, 0.26);
  background: rgba(233, 216, 183, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 246, 222, 0.34);
}

:root[data-theme="retro"] :where(.home-server-badge, .news-tag-v18, .voice-live-dot) {
  color: #315f36;
  border-color: rgba(91, 154, 88, 0.38);
  background: rgba(91, 154, 88, 0.16);
}

:root[data-theme="retro"] :where(
  .avatar:not(.image-avatar),
  .mini-avatar:not(.image-avatar),
  .social-avatar:not(.image-avatar),
  .my-page-avatar:not(.image-avatar),
  .profile-modal-avatar:not(.image-avatar),
  .settings-avatar
) {
  color: var(--retro-paper-soft);
  border-color: rgba(233, 216, 183, 0.88);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 239, 204, 0.28), transparent 38%),
    linear-gradient(135deg, #5a566d, #353248 58%, #a65331);
  box-shadow:
    0 10px 18px rgba(38, 32, 25, 0.22),
    inset 0 1px 0 rgba(255, 246, 222, 0.34);
}

:root[data-theme="retro"] .my-page-cover {
  border-color: rgba(63, 53, 38, 0.34);
  background-color: var(--retro-indigo-deep);
}

:root[data-theme="retro"] .my-page-cover::before {
  opacity: 0.34;
  background:
    repeating-linear-gradient(0deg, rgba(18, 17, 30, 0.28) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, rgba(233, 216, 183, 0.22), transparent 30%, rgba(198, 111, 62, 0.16));
  mix-blend-mode: soft-light;
}

:root[data-theme="retro"] .my-page-identity {
  background:
    linear-gradient(180deg, rgba(233, 216, 183, 0), rgba(233, 216, 183, 0.12)),
    rgba(42, 38, 59, 0.66);
}

:root[data-theme="retro"] .my-page-title h1,
:root[data-theme="retro"] .my-page-title p,
:root[data-theme="retro"] .my-page-status {
  color: var(--retro-paper-soft);
  text-shadow: 0 2px 2px rgba(20, 17, 27, 0.34);
}

:root[data-theme="retro"] .simple-message,
:root[data-theme="retro"] .direct-message-row {
  color: var(--retro-ink);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

:root[data-theme="retro"] .simple-message.is-own,
:root[data-theme="retro"] .direct-message-row.is-own {
  border-color: rgba(157, 79, 47, 0.28);
}

:root[data-theme="retro"] :where(.simple-title .ui-icon, .nav-row .ui-icon, .dock-icon .ui-icon, .asset-icon) {
  color: currentColor;
}

:root[data-theme="retro"] .notification-button.has-unread {
  color: var(--retro-paper-soft);
  background: linear-gradient(180deg, #c75f47, #983d3e);
}

:root[data-theme="retro"] .theme-menu-popover {
  color: var(--retro-ink);
  border-color: var(--retro-line);
  background:
    radial-gradient(circle at 18px 20px, rgba(85, 63, 34, 0.08) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(239, 224, 195, 0.98), rgba(222, 200, 164, 0.96));
  box-shadow: var(--panel-shadow);
  backdrop-filter: none;
}

:root[data-theme="retro"] .theme-menu-popover button {
  color: var(--retro-ink-soft);
  border-color: rgba(63, 53, 38, 0.24);
  background: rgba(233, 216, 183, 0.5);
}

:root[data-theme="retro"] .theme-menu-popover button:hover,
:root[data-theme="retro"] .theme-menu-popover button.active {
  color: var(--retro-paper-soft);
  border-color: rgba(78, 49, 31, 0.5);
  background: linear-gradient(180deg, #cf7a45, #a65331);
}

.theme-settings-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--tc-border-subtle);
  color: var(--tc-text-primary);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-bright) 46%, transparent), color-mix(in srgb, var(--glass-dim) 68%, transparent)),
    var(--tc-surface-card-muted);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 26px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.theme-settings-button:hover,
.theme-settings-button:focus-visible {
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(135deg, var(--tc-surface-active), transparent),
    var(--tc-surface-card);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--tc-accent-cyan) 20%, transparent),
    0 0 24px color-mix(in srgb, var(--tc-accent-cyan) 14%, transparent);
  transform: translateY(-1px);
  outline: none;
}

.theme-settings-button .asset-icon {
  width: 22px;
  height: 22px;
}

.appearance-settings-grid {
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.35fr);
}

.theme-choice-grid,
.design-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 10px;
}

.theme-choice-card,
.design-choice-card {
  min-height: 104px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--tc-border-subtle);
  color: var(--tc-text-secondary);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-bright) 34%, transparent), color-mix(in srgb, var(--glass-dim) 62%, transparent)),
    var(--tc-surface-card-muted);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.theme-choice-card:hover,
.theme-choice-card:focus-visible,
.design-choice-card:hover,
.design-choice-card:focus-visible,
.theme-choice-card.active,
.design-choice-card.active {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(135deg, var(--tc-surface-active), color-mix(in srgb, var(--tc-accent-violet) 10%, transparent)),
    var(--tc-surface-card);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--tc-accent-cyan) 18%, transparent),
    0 16px 34px rgba(0, 0, 0, 0.14);
  outline: none;
}

.theme-choice-card:hover,
.design-choice-card:hover {
  transform: translateY(-1px);
}

.theme-choice-copy,
.design-choice-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.theme-choice-copy strong,
.design-choice-copy strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tc-text-primary);
  font-size: 14px;
}

.theme-choice-lock {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--tc-warning) 52%, transparent);
  color: var(--tc-warning);
  background: color-mix(in srgb, var(--tc-warning) 12%, transparent);
  font-size: 10px;
  line-height: 1;
}

.theme-choice-card.locked:not(.active) {
  opacity: 0.78;
}

.theme-choice-card.locked:not(.active) .theme-choice-preview {
  filter: saturate(0.68);
}

.theme-choice-copy em,
.design-choice-copy em {
  color: var(--tc-text-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.theme-choice-preview,
.design-choice-frame {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--tc-border-subtle);
  background: var(--tc-surface-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 24px rgba(0, 0, 0, 0.12);
}

.theme-choice-preview {
  position: relative;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
}

.theme-choice-preview i {
  position: relative;
  z-index: 1;
  height: 100%;
  border-radius: 7px;
  background: var(--preview-color, var(--tc-accent-cyan));
}

.theme-choice-dark .theme-choice-preview {
  background: linear-gradient(135deg, #07131b, #162238 56%, #0cd7d9);
}

.theme-choice-dark .theme-choice-preview i:nth-child(1) { --preview-color: #0b1826; }
.theme-choice-dark .theme-choice-preview i:nth-child(2) { --preview-color: #27365f; }
.theme-choice-dark .theme-choice-preview i:nth-child(3) { --preview-color: #22d7d9; }

.theme-choice-light .theme-choice-preview {
  background: linear-gradient(135deg, #adc2ff, #e7c6f3 56%, #f2d6dd);
}

.theme-choice-light .theme-choice-preview i:nth-child(1) { --preview-color: #bed3ff; }
.theme-choice-light .theme-choice-preview i:nth-child(2) { --preview-color: #d9c6f7; }
.theme-choice-light .theme-choice-preview i:nth-child(3) { --preview-color: #f2d4e0; }

.theme-choice-beige .theme-choice-preview {
  background: linear-gradient(135deg, #f3e2c7, #dbc2a0 48%, #bba5cc);
}

.theme-choice-beige .theme-choice-preview i:nth-child(1) { --preview-color: #f0dfc4; }
.theme-choice-beige .theme-choice-preview i:nth-child(2) { --preview-color: #d7b795; }
.theme-choice-beige .theme-choice-preview i:nth-child(3) { --preview-color: #b9a0ca; }

.theme-choice-retro .theme-choice-preview {
  background:
    radial-gradient(circle at 16px 14px, rgba(47, 35, 24, 0.16) 0 1px, transparent 1.8px),
    linear-gradient(112deg, transparent 0 32%, rgba(255, 247, 218, 0.32) 33%, transparent 36%),
    repeating-linear-gradient(0deg, rgba(37, 35, 61, 0.16) 0 1px, transparent 1px 6px),
    linear-gradient(135deg, #f3dfb5, #cf713c 54%, #4d4964);
}

.theme-choice-retro .theme-choice-preview i {
  border-radius: 3px;
}

.theme-choice-retro .theme-choice-preview::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(31, 27, 37, 0.5) 8% 26%, transparent 27% 35%, rgba(31, 27, 37, 0.4) 36% 72%, transparent 73% 100%) top / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(31, 27, 37, 0.36) 0 18%, transparent 19% 31%, rgba(31, 27, 37, 0.48) 32% 68%, transparent 69% 82%, rgba(31, 27, 37, 0.34) 83% 100%) bottom / 100% 1px no-repeat,
    linear-gradient(0deg, transparent 0 10%, rgba(31, 27, 37, 0.44) 11% 34%, transparent 35% 48%, rgba(31, 27, 37, 0.34) 49% 86%, transparent 87% 100%) left / 1px 100% no-repeat,
    linear-gradient(0deg, rgba(31, 27, 37, 0.32) 0 24%, transparent 25% 39%, rgba(31, 27, 37, 0.48) 40% 74%, transparent 75% 100%) right / 1px 100% no-repeat;
  opacity: 0.78;
  pointer-events: none;
  z-index: 2;
}

.theme-choice-retro .theme-choice-preview i:nth-child(1) { --preview-color: #f3dfb5; }
.theme-choice-retro .theme-choice-preview i:nth-child(2) { --preview-color: #c66f3e; }
.theme-choice-retro .theme-choice-preview i:nth-child(3) { --preview-color: #4d4964; }

.theme-choice-kattydrift .theme-choice-preview {
  background:
    radial-gradient(circle at 74% 26%, rgba(255, 255, 255, 0.78), transparent 24%),
    linear-gradient(135deg, #fff6f9, #ffcfe1 52%, #d8c8ff);
}

.theme-choice-kattydrift .theme-choice-preview::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -9px;
  width: 48px;
  height: 58px;
  background: url("/assets/kattydrift-mascot.png") right bottom / contain no-repeat;
  opacity: 0.86;
  filter: drop-shadow(0 6px 10px rgba(141, 73, 104, 0.22));
  pointer-events: none;
}

.theme-choice-kattydrift .theme-choice-preview i:nth-child(1) { --preview-color: #fff8fb; }
.theme-choice-kattydrift .theme-choice-preview i:nth-child(2) { --preview-color: #f7a9c5; }
.theme-choice-kattydrift .theme-choice-preview i:nth-child(3) { --preview-color: #9b315f; }

.theme-choice-neon-voice .theme-choice-preview {
  background:
    radial-gradient(circle at 22% 18%, rgba(54, 232, 241, 0.46), transparent 33%),
    radial-gradient(circle at 78% 70%, rgba(139, 108, 255, 0.38), transparent 38%),
    linear-gradient(135deg, #07111d, #10233a 54%, #071724);
}

.theme-choice-neon-voice .theme-choice-preview::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(86, 238, 245, 0.34);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 18px rgba(55, 220, 230, 0.26);
  pointer-events: none;
}

.theme-choice-neon-voice .theme-choice-preview i:nth-child(1) { --preview-color: #071724; }
.theme-choice-neon-voice .theme-choice-preview i:nth-child(2) { --preview-color: #26d4dd; }
.theme-choice-neon-voice .theme-choice-preview i:nth-child(3) { --preview-color: #8b6cff; }

.design-choice-frame {
  position: relative;
  background:
    radial-gradient(circle at 28% 24%, color-mix(in srgb, var(--tc-accent-cyan) 34%, transparent), transparent 36%),
    linear-gradient(145deg, var(--tc-surface-card), var(--tc-surface-card-muted));
}

.design-choice-frame i {
  width: 34px;
  height: 24px;
  display: block;
  border: 1px solid color-mix(in srgb, var(--tc-accent-cyan) 52%, transparent);
  background: color-mix(in srgb, var(--tc-accent-violet) 18%, transparent);
}

.interface-scale-card {
  gap: 14px;
}

.interface-scale-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.interface-scale-head h3 {
  margin: 0 0 6px;
}

.interface-scale-current {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 7px 10px;
  border: 1px solid var(--tc-border-strong);
  color: var(--tc-accent-cyan);
  background: color-mix(in srgb, var(--tc-accent-cyan) 12%, transparent);
  text-align: center;
  font-weight: 800;
}

.interface-scale-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 10px;
}

.interface-scale-preset {
  min-height: clamp(74px, 4.2vw, 92px);
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--tc-border-subtle);
  color: var(--tc-text-secondary);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-bright) 28%, transparent), color-mix(in srgb, var(--glass-dim) 60%, transparent)),
    var(--tc-surface-card-muted);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.interface-scale-preset:hover,
.interface-scale-preset:focus-visible,
.interface-scale-preset.active {
  color: var(--tc-text-primary);
  border-color: var(--tc-border-strong);
  background:
    linear-gradient(135deg, var(--tc-surface-active), color-mix(in srgb, var(--tc-accent-violet) 10%, transparent)),
    var(--tc-surface-card);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--tc-accent-cyan) 18%, transparent),
    0 16px 34px rgba(0, 0, 0, 0.14);
  outline: none;
}

.interface-scale-preset:hover {
  transform: translateY(-1px);
}

.interface-scale-preset strong {
  color: var(--tc-text-primary);
  font-size: 14px;
}

.interface-scale-preset em {
  color: var(--tc-text-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.interface-scale-slider {
  display: grid;
  gap: 8px;
}

.interface-scale-slider span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.interface-scale-slider b {
  color: var(--tc-accent-cyan);
}

.design-choice-rounded .design-choice-frame,
.design-choice-rounded .design-choice-frame i {
  border-radius: 16px;
  clip-path: none;
}

:root[data-design="cyberpunk"] :where(
  .theme-settings-button,
  .theme-choice-card,
  .design-choice-card,
  .interface-scale-preset,
  .interface-scale-current,
  .theme-choice-preview,
  .design-choice-frame,
  .design-choice-frame i,
  .home-directory-nav .nav-row,
  .home-server-group-toggle,
  .home-server-search,
  .home-invite-button
) {
  border-radius: var(--tc-shape-radius) 0 var(--tc-shape-radius) 0;
  clip-path: polygon(
    0 0,
    calc(100% - var(--tc-shape-cut-sm)) 0,
    100% var(--tc-shape-cut-sm),
    100% 100%,
    var(--tc-shape-cut-sm) 100%,
    0 calc(100% - var(--tc-shape-cut-sm))
  );
}

:root[data-design="rounded"] :where(
  .theme-settings-button,
  .theme-choice-card,
  .design-choice-card,
  .interface-scale-preset,
  .interface-scale-current,
  .theme-choice-preview,
  .design-choice-frame,
  .design-choice-frame i,
  .home-directory-nav .nav-row,
  .home-server-group-toggle,
  .home-server-search,
  .home-invite-button
) {
  clip-path: none;
  border-radius: var(--tc-radius-md);
}

:root[data-theme="beige"] .theme-settings-button,
:root[data-theme="beige"] .theme-choice-card,
:root[data-theme="beige"] .design-choice-card,
:root[data-theme="beige"] .interface-scale-preset,
:root[data-theme="beige"] .interface-scale-current {
  color: var(--beige-text);
  border-color: rgba(132, 104, 74, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 248, 235, 0.58), rgba(210, 191, 222, 0.32)),
    rgba(239, 228, 213, 0.48);
}

:root[data-theme="retro"] .theme-settings-button,
:root[data-theme="retro"] .theme-choice-card,
:root[data-theme="retro"] .design-choice-card,
:root[data-theme="retro"] .interface-scale-preset,
:root[data-theme="retro"] .interface-scale-current {
  color: var(--retro-ink);
  border-color: rgba(63, 53, 38, 0.3);
  background:
    radial-gradient(circle at 14px 12px, rgba(85, 63, 34, 0.08) 0 1px, transparent 1.6px),
    linear-gradient(180deg, rgba(239, 224, 195, 0.96), rgba(220, 199, 164, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 222, 0.46),
    0 10px 20px rgba(38, 32, 25, 0.12);
}

:root[data-theme="retro"] :where(
  .theme-settings-button,
  .theme-choice-card,
  .design-choice-card,
  .interface-scale-preset,
  .interface-scale-current,
  .theme-choice-preview,
  .design-choice-frame,
  .design-choice-frame i,
  .home-directory-nav .nav-row,
  .home-server-group-toggle,
  .home-server-search,
  .home-invite-button,
  .pro-feature-row
) {
  clip-path: none;
  border-radius: 7px;
}

.home-pro-banner {
  position: relative;
  min-width: 0;
  max-width: 100%;
  min-height: clamp(220px, 18vw, 290px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr) minmax(172px, 0.28fr);
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
  padding: clamp(22px, 3vw, 36px);
  overflow: hidden;
  border: 1px solid var(--tc-border-strong);
  background:
    radial-gradient(circle at 69% 36%, color-mix(in srgb, var(--tc-accent-2) 34%, transparent), transparent 35%),
    radial-gradient(circle at 42% 8%, rgba(255, 255, 255, 0.26), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--glass-bright) 92%, transparent), color-mix(in srgb, var(--tc-accent-2) 18%, transparent)),
    var(--tc-surface-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 72px rgba(83, 61, 158, 0.18);
  backdrop-filter: var(--tc-glass-blur);
}

.home-pro-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(108deg, transparent 0 35%, rgba(255, 255, 255, 0.16) 36%, transparent 47%),
    radial-gradient(circle at 76% 24%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 83% 58%, rgba(255, 255, 255, 0.38) 0 1px, transparent 2px),
    radial-gradient(circle at 63% 68%, color-mix(in srgb, var(--tc-accent) 34%, transparent) 0 1px, transparent 2px);
  opacity: 0.8;
}

.home-pro-copy,
.home-pro-art,
.home-pro-actions {
  position: relative;
  z-index: 1;
}

.home-pro-copy {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.home-pro-kicker,
.home-pro-features span {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: color-mix(in srgb, var(--tc-accent-2) 72%, var(--tc-text-primary));
  border: 1px solid color-mix(in srgb, var(--tc-accent-2) 42%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tc-accent-2) 20%, transparent), color-mix(in srgb, var(--glass-bright) 72%, transparent)),
    var(--tc-surface-card-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.home-pro-kicker {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.home-pro-copy h1 {
  max-width: 680px;
  margin: 0;
  color: var(--tc-text-primary);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

.home-pro-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--tc-text-secondary);
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1.55;
}

.home-pro-features {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.home-pro-features span {
  min-height: 46px;
  padding: 10px 14px;
  color: var(--tc-text-secondary);
  font-size: 14px;
  font-weight: 750;
}

.home-pro-kicker img,
.home-pro-features img,
.home-pro-actions img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--tc-accent-2) 42%, transparent));
}

.home-pro-art {
  min-width: 0;
  min-height: 180px;
  display: grid;
  place-items: center;
}

.home-pro-orbit,
.home-pro-chip,
.home-pro-prism {
  position: absolute;
  pointer-events: none;
}

.home-pro-orbit {
  width: clamp(170px, 18vw, 270px);
  height: clamp(82px, 8vw, 126px);
  border: 1px solid color-mix(in srgb, var(--tc-border-strong) 76%, transparent);
  border-radius: 999px;
  opacity: 0.72;
}

.home-pro-orbit.one {
  transform: rotate(-26deg);
}

.home-pro-orbit.two {
  transform: rotate(22deg);
  opacity: 0.46;
}

.home-pro-prism {
  position: relative;
  width: clamp(116px, 12vw, 166px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--tc-border-strong) 82%, transparent);
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.58), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--tc-accent-2) 26%, transparent), color-mix(in srgb, var(--tc-accent) 12%, transparent)),
    var(--tc-surface-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 0 42px color-mix(in srgb, var(--tc-accent-2) 28%, transparent);
  transform: rotate(12deg);
}

.home-pro-prism img {
  width: 56%;
  height: 56%;
  transform: rotate(-12deg);
  filter:
    brightness(1.35)
    drop-shadow(0 0 22px rgba(255, 255, 255, 0.56))
    drop-shadow(0 0 28px color-mix(in srgb, var(--tc-accent-2) 48%, transparent));
}

.home-pro-chip {
  width: clamp(34px, 4vw, 58px);
  aspect-ratio: 0.72;
  border: 1px solid color-mix(in srgb, var(--tc-border-strong) 56%, transparent);
  background: color-mix(in srgb, var(--glass-bright) 82%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.home-pro-chip.left {
  left: 10%;
  top: 18%;
  transform: rotate(-28deg);
}

.home-pro-chip.right {
  right: 7%;
  top: 24%;
  transform: rotate(24deg);
}

.home-pro-actions {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: center;
}

.home-pro-actions button {
  min-width: 0;
  min-height: 48px;
  justify-content: center;
  gap: 10px;
  white-space: normal;
}

:root[data-design="cyberpunk"] :where(
  .home-pro-banner,
  .home-pro-kicker,
  .home-pro-features span,
  .home-pro-actions button,
  .home-pro-prism,
  .home-pro-chip
) {
  border-radius: var(--tc-shape-radius) 0 var(--tc-shape-radius) 0;
  clip-path: polygon(
    0 0,
    calc(100% - var(--tc-shape-cut-sm)) 0,
    100% var(--tc-shape-cut-sm),
    100% 100%,
    var(--tc-shape-cut-sm) 100%,
    0 calc(100% - var(--tc-shape-cut-sm))
  );
}

:root[data-design="rounded"] :where(
  .home-pro-banner,
  .home-pro-kicker,
  .home-pro-features span,
  .home-pro-actions button,
  .home-pro-prism,
  .home-pro-chip
) {
  clip-path: none;
  border-radius: var(--tc-radius-lg);
}

:root[data-design="rounded"] .home-pro-kicker,
:root[data-design="rounded"] .home-pro-features span,
:root[data-design="rounded"] .home-pro-actions button {
  border-radius: var(--tc-radius-md);
}

:root[data-theme="light"] .home-pro-banner {
  background:
    radial-gradient(circle at 70% 36%, rgba(209, 178, 255, 0.62), transparent 35%),
    radial-gradient(circle at 42% 9%, rgba(255, 255, 255, 0.44), transparent 29%),
    linear-gradient(135deg, rgba(245, 241, 255, 0.45), rgba(182, 178, 230, 0.34)),
    var(--tc-surface-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 28px 74px rgba(104, 96, 164, 0.18);
}

:root[data-theme="beige"] .home-pro-banner {
  border-color: color-mix(in srgb, var(--beige-champagne) 56%, var(--beige-border));
  background:
    radial-gradient(circle at 70% 34%, rgba(189, 157, 210, 0.34), transparent 36%),
    radial-gradient(circle at 40% 10%, rgba(255, 250, 240, 0.58), transparent 30%),
    linear-gradient(135deg, rgba(255, 247, 231, 0.58), rgba(219, 197, 171, 0.34)),
    var(--tc-surface-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 26px 66px rgba(105, 78, 49, 0.12);
}

:root[data-theme="beige"] .home-pro-kicker,
:root[data-theme="beige"] .home-pro-features span {
  color: var(--beige-text);
  border-color: rgba(132, 104, 74, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 248, 235, 0.68), rgba(210, 191, 222, 0.32)),
    rgba(239, 228, 213, 0.48);
}

:root[data-theme="kattydrift"] .home-pro-banner {
  border-color: rgba(216, 93, 139, 0.32);
  background:
    radial-gradient(circle at 72% 38%, rgba(216, 200, 255, 0.5), transparent 34%),
    radial-gradient(circle at 42% 10%, rgba(255, 255, 255, 0.66), transparent 30%),
    linear-gradient(135deg, rgba(255, 252, 254, 0.72), rgba(255, 201, 224, 0.34)),
    var(--tc-surface-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 28px 74px rgba(141, 73, 104, 0.16);
}

:root[data-theme="kattydrift"] .home-pro-banner::before {
  opacity: 0.6;
}

:root[data-theme="kattydrift"] .home-pro-banner::after {
  content: "";
  position: absolute;
  right: clamp(16px, 4vw, 78px);
  bottom: -18px;
  z-index: 0;
  width: clamp(150px, 18vw, 280px);
  aspect-ratio: 3 / 4;
  background: var(--katty-mascot-image) center bottom / contain no-repeat;
  opacity: 0.86;
  filter:
    drop-shadow(0 18px 28px rgba(141, 73, 104, 0.22))
    drop-shadow(0 0 26px rgba(255, 255, 255, 0.42));
  pointer-events: none;
}

:root[data-theme="kattydrift"] .home-pro-kicker,
:root[data-theme="kattydrift"] .home-pro-features span {
  color: var(--katty-ink);
  border-color: rgba(216, 93, 139, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(216, 200, 255, 0.22)),
    rgba(255, 235, 244, 0.58);
}

:root[data-theme="kattydrift"] .home-pro-copy h1,
:root[data-theme="kattydrift"] .home-pro-copy p {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.62);
}

@media (max-width: 900px) {
  :root[data-theme="kattydrift"] .home-pro-banner::after {
    right: -18px;
    width: clamp(118px, 30vw, 190px);
    opacity: 0.36;
  }
}

@media (max-width: 760px) {
  .appearance-settings-grid {
    grid-template-columns: 1fr;
  }

  .theme-choice-card,
  .design-choice-card {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 88px;
  }

  .interface-scale-head {
    display: grid;
  }

  .interface-scale-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-choice-preview,
  .design-choice-frame {
    width: 48px;
    height: 48px;
  }

  .home-pro-banner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 20px;
  }

  .home-pro-art {
    min-height: 150px;
    order: -1;
  }

  .home-pro-copy h1 {
    font-size: 27px;
  }

  .home-pro-features {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-pro-actions {
    grid-template-columns: 1fr;
  }
}

/* TaksaCord v0.27 interface polish: final theme/design overrides. */
:root[data-design="cyberpunk"] :where(.ui-composer, .my-page-composer, .profile-composer-input) {
  clip-path: none;
  overflow: visible;
}

:root[data-design="cyberpunk"] :where(
  .emoji-picker-v20,
  .direct-conversation-row,
  .direct-chat-hero,
  .profile-side-actions > button:not(.profile-side-add),
  .teammate-form-grid input,
  .teammate-form-grid select,
  .teammate-form-grid textarea,
  .teammate-switch-wide
) {
  border-radius: var(--tc-shape-radius) 0 var(--tc-shape-radius) 0;
  clip-path: polygon(
    0 0,
    calc(100% - var(--tc-shape-cut-sm)) 0,
    100% var(--tc-shape-cut-sm),
    100% 100%,
    var(--tc-shape-cut-sm) 100%,
    0 calc(100% - var(--tc-shape-cut-sm))
  );
}

:root[data-design="cyberpunk"] .emoji-picker-v20 {
  clip-path: polygon(
    0 0,
    calc(100% - var(--tc-shape-cut)) 0,
    100% var(--tc-shape-cut),
    100% 100%,
    var(--tc-shape-cut) 100%,
    0 calc(100% - var(--tc-shape-cut))
  );
}

:root[data-design="rounded"] :where(
  .emoji-picker-v20,
  .direct-conversation-row,
  .direct-chat-hero,
  .profile-side-actions > button:not(.profile-side-add),
  .teammate-form-grid input,
  .teammate-form-grid select,
  .teammate-form-grid textarea,
  .teammate-switch-wide
) {
  clip-path: none;
  border-radius: var(--tc-radius-md);
}

:root[data-design="rounded"] .emoji-picker-v20 {
  border-radius: var(--tc-radius-xl);
}

/* TaksaCord v0.29: consistent raised glass surfaces across all themes. */
:where(
  .ui-panel,
  .ui-card,
  .home-action-card,
  .home-panel,
  .server-mini-card,
  .server-feature-grid-v16 article,
  .server-news-panel-v16,
  .server-about-v16,
  .server-aside-card-v16,
  .server-news-card-v18,
  .server-empty-news,
  .my-page-hero,
  .my-page-side-card,
  .my-page-post,
  .my-page-empty,
  .my-page-composer,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .profile-friend-card,
  .profile-comment-row,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .settings-card,
  .settings-workspace,
  .settings-nav-panel,
  .settings-modal,
  .news-drawer-v18,
  .news-create-modal-v18,
  .notifications-drawer-v19
) {
  border-color: color-mix(in srgb, var(--tc-border-strong) 46%, var(--tc-border-subtle));
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--glass-bright) 48%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--tc-surface-elevated) 94%, transparent), color-mix(in srgb, var(--tc-surface-elevated-soft) 84%, transparent)),
    var(--tc-surface-elevated);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 16%, transparent),
    0 20px 58px color-mix(in srgb, var(--tc-bg-base) 38%, transparent);
  backdrop-filter: var(--tc-glass-blur);
}

:root[data-theme="light"] :where(
  .v06-section-card,
  .glass-card,
  .home-panel,
  .home-action-card,
  .server-mini-card,
  .server-feature-grid-v16 article,
  .server-news-panel-v16,
  .server-about-v16,
  .server-aside-card-v16,
  .server-news-card-v18,
  .server-empty-news,
  .my-page-side-card,
  .my-page-post,
  .my-page-empty,
  .my-page-composer,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .profile-friend-card,
  .profile-comment-row,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .settings-card,
  .settings-workspace,
  .settings-nav-panel,
  .settings-modal,
  .news-drawer-v18,
  .news-create-modal-v18,
  .notifications-drawer-v19
) {
  border-color: color-mix(in srgb, var(--tc-border-strong) 52%, var(--tc-border-subtle));
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, .055), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .035), transparent),
    var(--tc-surface-card-muted);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 18px 48px color-mix(in srgb, var(--tc-bg-base) 28%, transparent);
}

.my-page-hero {
  border-color: color-mix(in srgb, var(--tc-border-strong) 54%, var(--tc-border-subtle));
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--glass-bright) 52%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--tc-surface-profile) 96%, transparent), color-mix(in srgb, var(--tc-surface-elevated-soft) 84%, transparent)),
    var(--tc-surface-profile);
}

.my-page-identity {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
}

.my-page-status,
.my-page-title p,
.profile-presence span,
.profile-upload-policy,
.my-page-post header em,
.profile-about-list {
  color: color-mix(in srgb, var(--tc-text-secondary) 74%, var(--tc-text-muted));
}

.profile-presence.offline b {
  color: var(--tc-offline-readable);
  text-shadow: 0 1px 12px color-mix(in srgb, var(--tc-danger) 18%, transparent);
}

.ghost-button.danger,
.ui-button-secondary.danger,
.profile-hero-actions .ghost-button.danger {
  color: var(--tc-danger-readable);
  border-color: color-mix(in srgb, var(--tc-danger) 56%, var(--tc-border-subtle));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--tc-danger) 24%, transparent), color-mix(in srgb, var(--glass-bright) 42%, transparent)),
    color-mix(in srgb, var(--tc-danger) 18%, var(--tc-surface-elevated));
  text-shadow: 0 1px 12px color-mix(in srgb, var(--tc-danger) 24%, transparent);
}

.ghost-button.danger:hover,
.ui-button-secondary.danger:hover,
.profile-hero-actions .ghost-button.danger:hover {
  color: var(--tc-danger-readable);
  border-color: color-mix(in srgb, var(--tc-danger) 74%, var(--tc-border-strong));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--tc-danger) 34%, transparent), color-mix(in srgb, var(--glass-bright) 58%, transparent)),
    color-mix(in srgb, var(--tc-danger) 26%, var(--tc-surface-elevated));
}

:root[data-theme="light"] :where(
  .home-action-card strong,
  .home-panel h3,
  .server-mini-card strong,
  .server-feature-grid-v16 strong,
  .server-news-panel-v16 h3,
  .server-about-v16 h3,
  .my-page-title h1,
  .my-page-side-card h3,
  .my-page-post strong,
  .direct-chat-hero h2,
  .direct-conversation-row strong,
  .teammate-card h2,
  .teammate-profile-form h2,
  .teammate-requests h3
) {
  color: #ffffff;
}

:root[data-theme="light"] :where(
  .home-action-card p,
  .home-panel p,
  .server-mini-card em,
  .server-feature-grid-v16 p,
  .server-about-v16 p,
  .my-page-side-card,
  .my-page-post p,
  .direct-chat-hero p,
  .direct-conversation-row em,
  .direct-conversation-row p,
  .teammate-card p,
  .teammate-form-grid label
) {
  color: rgba(239, 244, 255, .8);
}

/* TaksaCord v0.28: premium motion layer for SPA screens, modals, and live chat. */
:root {
  --tc-motion-fast: 220ms;
  --tc-motion-medium: 520ms;
  --tc-motion-route: 620ms;
  --tc-motion-route-cascade: 680ms;
  --tc-motion-ease: cubic-bezier(.22, 1, .36, 1);
  --tc-motion-ease-soft: cubic-bezier(.25, .9, .28, 1);
}

@keyframes tcRouteOld {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }

  to {
    opacity: .86;
    transform: translate3d(0, -3px, 0) scale(.996);
    filter: blur(0);
  }
}

@keyframes tcRouteNew {
  from {
    opacity: .84;
    transform: translate3d(0, 12px, 0) scale(.992);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes tcModalOld {
  from {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }

  to {
    opacity: .9;
    transform: scale(.998);
    filter: blur(0);
  }
}

@keyframes tcModalNew {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(.985);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes tcSurfaceEnter {
  from {
    opacity: .88;
    transform: translate3d(0, 14px, 0) scale(.992);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes tcModalBackdropIn {
  from {
    opacity: 0;
    backdrop-filter: blur(8px) saturate(1);
  }

  to {
    opacity: 1;
    backdrop-filter: blur(16px) saturate(1.08);
  }
}

@keyframes tcSettingsSuiteBackdropIn {
  from {
    opacity: .98;
    backdrop-filter: blur(16px) saturate(1.08);
  }

  to {
    opacity: 1;
    backdrop-filter: blur(16px) saturate(1.08);
  }
}

@keyframes tcModalPanelIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(.982);
    filter: blur(0);
  }

  72% {
    opacity: 1;
    transform: translate3d(0, -1px, 0) scale(1.002);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes tcSettingsSuiteIn {
  from {
    opacity: .98;
  }

  to {
    opacity: 1;
  }
}

@keyframes tcSettingsSuiteChildIn {
  from {
    opacity: .98;
  }

  to {
    opacity: 1;
  }
}

@keyframes tcSettingsSuiteOut {
  from {
    opacity: 1;
  }

  to {
    opacity: .98;
  }
}

@keyframes tcSettingsSuiteBackdropOut {
  from {
    opacity: 1;
  }

  to {
    opacity: .98;
  }
}

@keyframes tcDrawerIn {
  from {
    opacity: .88;
    transform: translate3d(0, 16px, 0) scale(.992);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes tcCascadeCardIn {
  from {
    opacity: .9;
    transform: translate3d(0, 12px, 0) scale(.992);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes tcComposerFloatIn {
  from {
    opacity: .9;
    transform: translate3d(0, 12px, 0) scale(.992);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--tc-motion-route);
  animation-timing-function: var(--tc-motion-ease);
  animation-fill-mode: both;
  mix-blend-mode: normal;
}

:root.tc-motion-route::view-transition-old(root) {
  animation-name: tcRouteOld;
}

:root.tc-motion-route::view-transition-new(root) {
  animation-name: tcRouteNew;
}

:root.tc-motion-modal::view-transition-old(root) {
  animation-name: tcModalOld;
  animation-duration: 380ms;
}

:root.tc-motion-modal::view-transition-new(root) {
  animation-name: tcModalNew;
  animation-duration: 460ms;
}

.tc-render-motion[data-motion-kind="route"] .simple-content > * {
  animation: tcSurfaceEnter var(--tc-motion-route) var(--tc-motion-ease) both;
  contain: paint;
  will-change: opacity, transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .ui-panel,
  .ui-card,
  .home-action-card,
  .my-page-post,
  .my-page-side-card,
  .direct-conversation-row,
  .teammate-card,
  .server-news-card-v18,
  .ui-composer,
  .my-page-composer,
  .direct-message-form
) {
  animation: none !important;
  will-change: auto;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-hero,
  .my-page-composer,
  .my-page-empty,
  .my-page-post:nth-child(-n + 8),
  .my-page-side-card,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-empty-state,
  .direct-conversation-row:nth-child(-n + 8),
  .direct-chat-page,
  .direct-chat-hero,
  .direct-message-row:nth-last-child(-n + 8),
  .direct-message-list > .empty-section,
  .direct-message-form,
  .teammate-deck,
  .teammate-card-stage > *,
  .teammate-aside > *,
  .teammate-profile-form,
  .teammate-request-row
) {
  animation: tcCascadeCardIn var(--tc-motion-route-cascade) var(--tc-motion-ease) both !important;
  transform-origin: center top;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-hero,
  .direct-inbox-list,
  .teammate-deck
) {
  animation-delay: 36ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-composer,
  .direct-chat-page,
  .teammate-profile-form
) {
  animation-delay: 82ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-side-card,
  .profile-ad-card,
  .direct-empty-state,
  .teammate-aside > *,
  .direct-message-form
) {
  animation-delay: 128ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(1),
  .direct-conversation-row:nth-child(1),
  .direct-message-row:nth-last-child(-n + 8),
  .teammate-request-row:nth-child(1)
) {
  animation-delay: 146ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(2),
  .direct-conversation-row:nth-child(2),
  .teammate-request-row:nth-child(2)
) {
  animation-delay: 184ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(3),
  .direct-conversation-row:nth-child(3),
  .teammate-request-row:nth-child(3)
) {
  animation-delay: 222ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(4),
  .direct-conversation-row:nth-child(4),
  .teammate-request-row:nth-child(4)
) {
  animation-delay: 260ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(5),
  .direct-conversation-row:nth-child(5),
  .teammate-request-row:nth-child(5)
) {
  animation-delay: 298ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(6),
  .direct-conversation-row:nth-child(6),
  .teammate-request-row:nth-child(6)
) {
  animation-delay: 336ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(7),
  .direct-conversation-row:nth-child(7),
  .teammate-request-row:nth-child(7)
) {
  animation-delay: 374ms !important;
}

.tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(8),
  .direct-conversation-row:nth-child(8),
  .teammate-request-row:nth-child(8)
) {
  animation-delay: 412ms !important;
}

:root[data-performance="super"] {
  --tc-motion-route: 440ms;
  --tc-motion-route-cascade: 420ms;
}

:root[data-performance="super"] :where(
  .my-page-shell,
  .direct-inbox-page,
  .direct-chat-page,
  .teammate-page
) {
  transform: translateZ(0);
  backface-visibility: hidden;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content > * {
  animation-duration: var(--tc-motion-route) !important;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-hero,
  .my-page-composer,
  .my-page-empty,
  .my-page-side-card,
  .profile-ad-card,
  .my-page-post:nth-child(-n + 4),
  .direct-inbox-list,
  .direct-empty-state,
  .direct-conversation-row:nth-child(-n + 4),
  .direct-chat-page,
  .direct-chat-hero,
  .direct-message-row:nth-last-child(-n + 4),
  .direct-message-form,
  .teammate-deck,
  .teammate-card-stage > *,
  .teammate-aside > *,
  .teammate-profile-form,
  .teammate-request-row:nth-child(-n + 4)
) {
  animation-duration: 420ms !important;
  will-change: opacity, transform;
  transform: translateZ(0);
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-hero,
  .direct-inbox-list,
  .teammate-deck
) {
  animation-delay: 18ms !important;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-composer,
  .direct-chat-page,
  .teammate-profile-form
) {
  animation-delay: 42ms !important;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-side-card,
  .profile-ad-card,
  .direct-empty-state,
  .teammate-aside > *,
  .direct-message-form
) {
  animation-delay: 58ms !important;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(1),
  .direct-conversation-row:nth-child(1),
  .direct-message-row:nth-last-child(-n + 4),
  .teammate-request-row:nth-child(1)
) {
  animation-delay: 72ms !important;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(2),
  .direct-conversation-row:nth-child(2),
  .teammate-request-row:nth-child(2)
) {
  animation-delay: 88ms !important;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(3),
  .direct-conversation-row:nth-child(3),
  .teammate-request-row:nth-child(3)
) {
  animation-delay: 104ms !important;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(4),
  .direct-conversation-row:nth-child(4),
  .teammate-request-row:nth-child(4)
) {
  animation-delay: 120ms !important;
}

:root[data-performance="super"] .tc-render-motion[data-motion-kind="route"] .simple-content :where(
  .my-page-post:nth-child(n + 5),
  .direct-conversation-row:nth-child(n + 5),
  .teammate-request-row:nth-child(n + 5)
) {
  animation: none !important;
  opacity: 1;
  transform: translateZ(0);
}

:root[data-performance="super"] :where(
  .my-page-cover-img,
  .my-page-avatar img,
  .profile-photo-grid img,
  .my-page-post img,
  .direct-conversation-row img,
  .direct-message-row img,
  .teammate-card img
) {
  transform: translateZ(0);
  backface-visibility: hidden;
}

:root[data-performance="super"] :where(
  .my-page-feed .my-page-post:nth-child(n + 5),
  .my-page-aside .my-page-side-card:nth-child(n + 2)
) {
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

.modal-backdrop,
.media-viewer-backdrop-v20 {
  animation: tcModalBackdropIn 360ms var(--tc-motion-ease-soft) both;
}

.settings-suite-backdrop {
  animation: tcSettingsSuiteBackdropIn 360ms var(--tc-motion-ease-soft) both;
}

.tc-render-motion[data-motion-kind="modal"] .settings-suite-backdrop {
  animation: tcSettingsSuiteBackdropIn 360ms var(--tc-motion-ease-soft) both !important;
}

.settings-suite-backdrop.is-settings-closing {
  animation: tcSettingsSuiteBackdropOut 180ms var(--tc-motion-ease-soft) both !important;
}

.settings-modal,
.profile-modal,
.profile-friends-modal,
.profile-photos-modal,
.news-create-modal-v18,
.invite-modal-v19,
.media-viewer-v20 {
  animation: tcModalPanelIn 640ms var(--tc-motion-ease) both !important;
  transform-origin: center;
  will-change: opacity, transform;
}

.share-setup-backdrop {
  animation: tcShareSetupBackdropStableIn 220ms var(--tc-motion-ease-soft) both !important;
}

.share-setup-modal {
  animation: tcShareSetupPanelStableIn 220ms var(--tc-motion-ease) both !important;
}

@keyframes tcShareSetupBackdropStableIn {
  from { opacity: .98; }
  to { opacity: 1; }
}

@keyframes tcShareSetupPanelStableIn {
  from {
    opacity: .98;
    transform: translate3d(0, 4px, 0) scale(.998);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.settings-modal.wide,
.settings-suite {
  animation: none !important;
  transform: none !important;
  will-change: auto !important;
}

.tc-render-motion[data-motion-kind="modal"] .settings-modal.wide.settings-suite {
  animation: none !important;
  opacity: 1;
  will-change: opacity !important;
  backface-visibility: hidden;
  transform: none !important;
}

.tc-render-motion[data-motion-kind="modal"] .settings-suite-backdrop.is-settings-closing {
  animation: tcSettingsSuiteBackdropOut 180ms var(--tc-motion-ease-soft) both !important;
}

.tc-render-motion[data-motion-kind="modal"] .settings-modal.wide.settings-suite.is-settings-closing {
  animation: tcSettingsSuiteOut 180ms var(--tc-motion-ease) both !important;
  opacity: 1;
}

.settings-modal.wide.settings-suite.is-settings-closing {
  animation: tcSettingsSuiteOut 180ms var(--tc-motion-ease) both !important;
}

.settings-suite :where(.settings-nav-panel, .settings-workspace) {
  animation: tcSettingsSuiteChildIn 640ms var(--tc-motion-ease-soft) both;
  will-change: opacity;
  transform: none;
  backface-visibility: hidden;
}

.tc-render-motion[data-motion-kind="modal"] .settings-suite :where(.settings-nav-panel, .settings-workspace) {
  animation: tcSettingsSuiteChildIn 640ms var(--tc-motion-ease-soft) both;
  will-change: opacity;
  transform: none;
  backface-visibility: hidden;
}

.tc-render-motion[data-motion-kind="modal"] .settings-suite .settings-workspace {
  animation-delay: 70ms;
}

.notifications-drawer-v19,
.news-drawer-v18,
.profile-comments-drawer {
  animation: tcDrawerIn 620ms var(--tc-motion-ease) both !important;
  will-change: opacity, transform;
}

.notifications-drawer-v19 {
  animation: none !important;
  transform: none !important;
  will-change: auto;
}

.tc-render-motion[data-motion-kind="modal"] .notifications-drawer-v19 {
  animation: tcDrawerIn 260ms var(--tc-motion-ease) both !important;
  will-change: opacity, transform;
}

.settings-tab-content {
  animation: none !important;
  min-height: 0;
  overflow: hidden;
}

.settings-tab-content > .settings-tab-grid,
.settings-tab-content > .pro-settings-layout {
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  padding-bottom: 18px;
  scrollbar-gutter: stable;
}

:root[data-theme="retro"] .modal-backdrop:has(.settings-suite) {
  background: rgba(24, 23, 35, 0.62);
}

:root[data-theme="retro"] .settings-modal.wide,
:root[data-theme="retro"] .settings-suite,
:root[data-theme="retro"] .settings-workspace,
:root[data-theme="retro"] .settings-tab-content,
:root[data-theme="retro"] .settings-card {
  color: var(--retro-ink);
  border-color: var(--retro-line-strong);
  background:
    radial-gradient(circle at 18px 20px, rgba(46, 36, 24, 0.11) 0 1px, transparent 1.8px),
    radial-gradient(circle at 74px 58px, rgba(46, 36, 24, 0.065) 0 1px, transparent 1.8px),
    repeating-linear-gradient(0deg, rgba(31, 27, 37, 0.075) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, #e2c27e 0%, #c89b52 100%);
  background-size: auto;
  box-shadow:
    0 18px 42px rgba(18, 16, 26, 0.34),
    inset 0 0 0 1px rgba(31, 27, 37, 0.28),
    inset 0 1px 0 rgba(255, 226, 164, 0.52);
  backdrop-filter: none;
}

:root[data-theme="retro"] .settings-nav-panel {
  color: var(--retro-ink);
  border-color: var(--retro-line-strong);
  background:
    radial-gradient(circle at 16px 18px, rgba(46, 36, 24, 0.12) 0 1px, transparent 1.8px),
    repeating-linear-gradient(0deg, rgba(31, 27, 37, 0.08) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, #d3a965, #ad793d);
  box-shadow: inset -1px 0 0 rgba(255, 226, 164, 0.28);
}

:root[data-theme="retro"] .settings-nav-panel nav button {
  color: var(--retro-ink-soft);
  border-color: rgba(31, 27, 37, 0.34);
  background: rgba(236, 209, 152, 0.42);
}

:root[data-theme="retro"] .settings-nav-panel nav button.active,
:root[data-theme="retro"] .settings-nav-panel nav button:hover {
  color: var(--retro-paper-soft);
  border-color: rgba(31, 27, 37, 0.54);
  background: linear-gradient(180deg, #d26e34, #8f4329);
}

:root[data-theme="retro"] .settings-tab-content {
  box-shadow: none;
}

.direct-message-row,
.simple-message {
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root),
  .tc-render-motion[data-motion-kind="route"] .simple-content > *,
  .tc-render-motion[data-motion-kind="route"] .simple-content :where(
    .ui-panel,
    .ui-card,
    .home-action-card,
    .my-page-post,
    .my-page-side-card,
    .direct-conversation-row,
    .teammate-card,
    .server-news-card-v18,
    .ui-composer,
    .my-page-composer,
    .direct-message-form,
    .direct-chat-page,
    .direct-chat-hero,
    .teammate-deck,
    .teammate-aside > *,
    .teammate-profile-form,
    .profile-ad-card
  ),
  .modal-backdrop,
  .media-viewer-backdrop-v20,
  .settings-modal,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .news-create-modal-v18,
  .invite-modal-v19,
  .media-viewer-v20,
  .notifications-drawer-v19,
  .news-drawer-v18,
  .profile-comments-drawer,
  .settings-tab-content,
  .direct-message-row,
  .simple-message {
    animation: none !important;
    transition-duration: 1ms !important;
    filter: none !important;
  }
}

/* TaksaCord v0.30: semantic surface engine for theme-builder ready skins. */
:root {
  --tc-page-text-primary: var(--tc-text-primary);
  --tc-page-text-secondary: var(--tc-text-secondary);
  --tc-page-text-muted: var(--tc-text-muted);
  --tc-surface-text-primary: var(--tc-text-primary);
  --tc-surface-text-secondary: var(--tc-text-secondary);
  --tc-surface-text-muted: var(--tc-text-muted);
  --tc-chrome-text-primary: var(--tc-text-primary);
  --tc-chrome-text-secondary: var(--tc-text-secondary);
  --tc-chrome-text-muted: var(--tc-text-muted);
  --tc-theme-bg-size: auto;
  --tc-theme-surface-size: auto;
  --tc-shell-bg:
    linear-gradient(135deg, var(--glass-bright), var(--glass-dim)),
    var(--tc-surface-shell);
  --tc-rail-bg:
    linear-gradient(180deg, var(--glass-bright), transparent 42%),
    var(--tc-surface-rail);
  --tc-chrome-bg:
    radial-gradient(circle at 74% 14%, var(--tc-bg-cloud-a), transparent 34%),
    var(--tc-surface-sidebar);
  --tc-members-bg:
    radial-gradient(circle at 42% 8%, var(--tc-bg-cloud-a), transparent 34%),
    var(--tc-surface-members);
  --tc-page-bg:
    radial-gradient(circle at 72% 12%, var(--tc-bg-cloud-b), transparent 36%),
    var(--tc-surface-main);
  --tc-topbar-bg:
    linear-gradient(180deg, color-mix(in srgb, var(--glass-bright) 82%, transparent), color-mix(in srgb, var(--glass-dim) 72%, transparent)),
    var(--tc-surface-elevated);
  --tc-surface-bg:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--glass-bright) 48%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--tc-surface-elevated) 94%, transparent), color-mix(in srgb, var(--tc-surface-elevated-soft) 84%, transparent)),
    var(--tc-surface-elevated);
  --tc-card-bg:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--glass-bright) 38%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--tc-surface-card) 92%, transparent), color-mix(in srgb, var(--tc-surface-card-muted) 78%, transparent)),
    var(--tc-surface-card);
  --tc-field-bg: var(--tc-surface-field);
  --tc-row-bg:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-bright) 24%, transparent), transparent),
    var(--tc-surface-card-muted);
  --tc-row-active-bg:
    linear-gradient(90deg, var(--tc-surface-active), color-mix(in srgb, var(--tc-accent-2) 8%, transparent)),
    var(--tc-surface-card-muted);
  --tc-chrome-border: var(--tc-border);
  --tc-surface-border: color-mix(in srgb, var(--tc-border-strong) 46%, var(--tc-border-subtle));
  --tc-row-border: var(--tc-border-subtle);
  --tc-chrome-shadow: var(--tc-shadow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --tc-surface-shadow:
    inset 0 1px 0 color-mix(in srgb, white 16%, transparent),
    0 20px 58px color-mix(in srgb, var(--tc-bg-base) 38%, transparent);
  --tc-surface-backdrop: var(--tc-glass-blur);
  --tc-profile-hero-bg:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--glass-bright) 34%, transparent) 0%, transparent 34%),
    radial-gradient(circle at 78% 28%, color-mix(in srgb, var(--simple-accent) 24%, transparent) 0%, transparent 40%),
    linear-gradient(115deg, color-mix(in srgb, var(--tc-surface-profile) 96%, transparent), color-mix(in srgb, var(--tc-surface-elevated-soft) 84%, transparent));
  --tc-profile-hero-overlay:
    radial-gradient(ellipse 72% 52% at 15% 72%, rgba(255,255,255,.18), transparent 74%),
    radial-gradient(ellipse 62% 46% at 78% 76%, color-mix(in srgb, var(--simple-accent) 20%, transparent), transparent 78%),
    linear-gradient(105deg, transparent 0 38%, rgba(255,255,255,.16) 58%, transparent 78% 100%),
    linear-gradient(252deg, transparent 0 36%, color-mix(in srgb, var(--simple-accent) 15%, transparent) 62%, transparent 84% 100%),
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.015) 36%, rgba(255,255,255,.07) 58%, color-mix(in srgb, var(--panel-bg, rgba(17, 29, 48, .64)) 42%, transparent) 80%, color-mix(in srgb, var(--panel-bg, rgba(17, 29, 48, .64)) 58%, transparent) 100%);
  --tc-profile-hero-filter: blur(26px) saturate(1.5) contrast(1.04);
  --tc-profile-text-primary: var(--tc-text-primary);
  --tc-profile-text-muted: var(--tc-text-secondary);
  --tc-profile-cover-bg: var(--tc-profile-hero-bg);
}

:root[data-theme="beige"] {
  --tc-theme-bg-size: 42px 42px, 68px 68px, auto, auto;
  --tc-theme-surface-size: 42px 42px, 68px 68px, auto, auto;
  --tc-page-text-primary: var(--beige-text);
  --tc-page-text-secondary: var(--beige-text-soft);
  --tc-page-text-muted: var(--beige-text-muted);
  --tc-surface-text-primary: var(--beige-text);
  --tc-surface-text-secondary: var(--beige-text-soft);
  --tc-surface-text-muted: var(--beige-text-muted);
  --tc-chrome-text-primary: var(--beige-text);
  --tc-chrome-text-secondary: var(--beige-text-soft);
  --tc-chrome-text-muted: var(--beige-text-muted);
  --tc-shell-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.045) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.03) 0 1px, transparent 1.8px),
    linear-gradient(135deg, rgba(255, 248, 235, 0.34), rgba(221, 208, 190, 0.18)),
    rgba(241, 231, 217, 0.68);
  --tc-rail-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.055) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.035) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(231, 219, 203, 0.92), rgba(218, 204, 186, 0.88));
  --tc-chrome-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.055) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.035) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(231, 219, 203, 0.92), rgba(218, 204, 186, 0.88));
  --tc-members-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.05) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.03) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(232, 220, 203, 0.9), rgba(218, 204, 186, 0.84));
  --tc-page-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.04) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.028) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72% 12%, rgba(169, 143, 197, 0.12), transparent 36%),
    rgba(241, 231, 217, 0.56);
  --tc-topbar-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.055) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.035) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(246, 238, 228, 0.92), rgba(232, 220, 204, 0.86));
  --tc-surface-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.05) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.032) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(247, 240, 230, 0.92), rgba(235, 224, 209, 0.86));
  --tc-card-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.048) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.03) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(247, 240, 230, 0.92), rgba(235, 224, 209, 0.86));
  --tc-field-bg: rgba(239, 228, 213, 0.72);
  --tc-row-bg:
    radial-gradient(circle at 18px 20px, rgba(92, 70, 45, 0.04) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(92, 70, 45, 0.026) 0 1px, transparent 1.8px),
    rgba(245, 237, 226, 0.3);
  --tc-row-active-bg:
    linear-gradient(135deg, rgba(218, 199, 227, 0.62), rgba(235, 218, 194, 0.74));
  --tc-chrome-border: rgba(132, 104, 74, 0.18);
  --tc-surface-border: rgba(132, 104, 74, 0.17);
  --tc-row-border: rgba(132, 104, 74, 0.12);
  --tc-chrome-shadow:
    0 12px 32px rgba(80, 61, 44, 0.08),
    inset 0 1px 0 rgba(255, 249, 238, 0.75);
  --tc-surface-shadow:
    0 16px 42px rgba(83, 62, 43, 0.1),
    inset 0 1px 0 rgba(255, 249, 238, 0.68);
  --tc-surface-backdrop: blur(14px) saturate(1.12);
  --tc-profile-text-primary: #fffaf1;
  --tc-profile-text-muted: rgba(255, 250, 241, 0.84);
  --tc-profile-cover-bg:
    radial-gradient(circle at 18% 18%, rgba(255, 236, 198, 0.36) 0%, transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(169, 143, 197, 0.28) 0%, transparent 40%),
    linear-gradient(115deg, #d8c3a7 0%, #ead8bb 18%, #f0e1cc 34%, #cdb8db 54%, #ead0b6 72%, #bfa8d2 100%);
}

:root[data-theme="retro"] {
  --tc-theme-bg-size: auto;
  --tc-theme-surface-size: auto;
  --tc-page-text-primary: var(--retro-paper-soft);
  --tc-page-text-secondary: rgba(236, 209, 152, 0.84);
  --tc-page-text-muted: rgba(222, 194, 133, 0.62);
  --tc-surface-text-primary: var(--retro-ink);
  --tc-surface-text-secondary: var(--retro-ink-soft);
  --tc-surface-text-muted: var(--retro-muted);
  --tc-chrome-text-primary: var(--retro-ink);
  --tc-chrome-text-secondary: var(--retro-ink-soft);
  --tc-chrome-text-muted: var(--retro-muted);
  --tc-shell-bg:
    radial-gradient(circle at 18px 20px, rgba(255, 239, 204, 0.08) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76px 58px, rgba(18, 17, 30, 0.07) 0 1px, transparent 1.8px),
    repeating-linear-gradient(0deg, rgba(222, 194, 133, 0.04) 0 1px, transparent 1px 7px),
    rgba(29, 27, 42, 0.26);
  --tc-rail-bg:
    var(--retro-paper-scuffs),
    var(--retro-paper-creases),
    var(--retro-paper-texture),
    linear-gradient(180deg, rgba(249, 228, 184, 0.98), rgba(224, 187, 110, 0.94));
  --tc-chrome-bg:
    var(--retro-paper-scuffs),
    var(--retro-paper-creases),
    var(--retro-paper-texture),
    linear-gradient(180deg, rgba(253, 235, 194, 0.98), rgba(228, 191, 114, 0.94));
  --tc-members-bg:
    var(--retro-paper-scuffs),
    var(--retro-paper-creases),
    var(--retro-paper-texture),
    linear-gradient(180deg, rgba(253, 235, 194, 0.98), rgba(228, 191, 114, 0.94));
  --tc-page-bg:
    radial-gradient(circle at 30px 24px, rgba(222, 194, 133, 0.08) 0 1px, transparent 1.9px),
    radial-gradient(circle at 112px 76px, rgba(222, 194, 133, 0.05) 0 1px, transparent 1.9px),
    repeating-linear-gradient(90deg, rgba(20, 18, 30, 0.18) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(45, 42, 64, 0.92), rgba(31, 30, 47, 0.94));
  --tc-topbar-bg:
    var(--retro-paper-scuffs),
    var(--retro-paper-creases),
    var(--retro-paper-texture),
    linear-gradient(180deg, rgba(255, 239, 202, 0.98), rgba(232, 196, 120, 0.94));
  --tc-surface-bg:
    var(--retro-paper-scuffs),
    var(--retro-paper-creases),
    var(--retro-paper-texture),
    linear-gradient(180deg, rgba(255, 241, 207, 0.98), rgba(230, 198, 126, 0.94));
  --tc-card-bg:
    var(--retro-paper-scuffs),
    var(--retro-paper-creases),
    var(--retro-paper-texture),
    linear-gradient(180deg, rgba(255, 244, 214, 0.98), rgba(232, 201, 131, 0.94));
  --tc-field-bg:
    var(--retro-paper-texture),
    rgba(246, 226, 183, 0.7);
  --tc-row-bg:
    var(--retro-paper-texture),
    rgba(246, 226, 183, 0.42);
  --tc-row-active-bg:
    var(--retro-paper-texture),
    linear-gradient(180deg, rgba(215, 126, 72, 0.82), rgba(191, 99, 54, 0.74));
  --tc-chrome-border: var(--retro-line-strong);
  --tc-surface-border: var(--retro-line-strong);
  --tc-row-border: rgba(63, 53, 38, 0.24);
  --tc-chrome-shadow:
    0 10px 22px rgba(18, 16, 26, 0.22),
    inset 0 1px 0 rgba(255, 226, 164, 0.52);
  --tc-surface-shadow: var(--panel-shadow);
  --tc-surface-backdrop: none;
  --tc-profile-text-primary: var(--retro-paper-soft);
  --tc-profile-text-muted: rgba(236, 209, 152, 0.84);
  --tc-profile-cover-bg:
    radial-gradient(circle at 30px 24px, rgba(246, 226, 183, 0.14) 0 1px, transparent 1.9px),
    repeating-linear-gradient(0deg, rgba(18, 17, 30, 0.18) 0 1px, transparent 1px 5px),
    linear-gradient(115deg, rgba(45, 42, 64, 0.96), rgba(97, 67, 74, 0.92) 48%, rgba(198, 111, 62, 0.84));
  --tc-profile-hero-overlay:
    repeating-linear-gradient(0deg, rgba(18, 17, 30, 0.22) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, transparent 0 44%, rgba(35, 31, 49, 0.18) 64%, rgba(35, 31, 49, 0.46) 100%);
  --tc-profile-hero-filter: none;
}

:root[data-theme="kattydrift"] {
  --tc-theme-bg-size: 46px 46px, 92px 92px, auto, auto;
  --tc-theme-surface-size: 38px 38px, 84px 84px, auto, auto;
  --tc-page-text-primary: var(--katty-ink);
  --tc-page-text-secondary: var(--katty-ink-soft);
  --tc-page-text-muted: var(--katty-muted);
  --tc-surface-text-primary: var(--katty-ink);
  --tc-surface-text-secondary: var(--katty-ink-soft);
  --tc-surface-text-muted: var(--katty-muted);
  --tc-chrome-text-primary: var(--katty-ink);
  --tc-chrome-text-secondary: var(--katty-ink-soft);
  --tc-chrome-text-muted: var(--katty-muted);
  --tc-shell-bg:
    radial-gradient(circle at 18px 20px, rgba(216, 93, 139, 0.052) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 82px 62px, rgba(255, 255, 255, 0.52) 0 1px, transparent 1.8px),
    linear-gradient(135deg, rgba(255, 252, 254, 0.72), rgba(255, 211, 229, 0.32)),
    rgba(255, 239, 247, 0.74);
  --tc-rail-bg:
    radial-gradient(circle at 18px 20px, rgba(216, 93, 139, 0.062) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 82px 62px, rgba(255, 255, 255, 0.44) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(255, 228, 239, 0.95), rgba(248, 190, 213, 0.88));
  --tc-chrome-bg:
    radial-gradient(circle at 18px 20px, rgba(216, 93, 139, 0.06) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 82px 62px, rgba(255, 255, 255, 0.46) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(255, 238, 246, 0.94), rgba(255, 214, 231, 0.84));
  --tc-members-bg:
    radial-gradient(circle at 18px 20px, rgba(216, 93, 139, 0.055) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 82px 62px, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(255, 234, 244, 0.92), rgba(252, 205, 225, 0.82));
  --tc-page-bg:
    radial-gradient(circle at 74% 16%, rgba(216, 200, 255, 0.28), transparent 34%),
    radial-gradient(circle at 18% 84%, rgba(255, 216, 190, 0.26), transparent 32%),
    radial-gradient(circle at 28px 24px, rgba(216, 93, 139, 0.035) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(255, 232, 243, 0.78), rgba(255, 221, 236, 0.7));
  --tc-topbar-bg:
    radial-gradient(circle at 24px 22px, rgba(216, 93, 139, 0.06) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 92px 58px, rgba(255, 255, 255, 0.48) 0 1px, transparent 1.8px),
    linear-gradient(180deg, rgba(255, 248, 252, 0.94), rgba(255, 222, 236, 0.86));
  --tc-surface-bg:
    radial-gradient(circle at 20px 22px, rgba(216, 93, 139, 0.048) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 74px 60px, rgba(255, 255, 255, 0.46) 0 1px, transparent 1.8px),
    linear-gradient(145deg, rgba(255, 251, 254, 0.93), rgba(255, 224, 237, 0.86));
  --tc-card-bg:
    radial-gradient(circle at 20px 22px, rgba(216, 93, 139, 0.046) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 74px 60px, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.8px),
    linear-gradient(145deg, rgba(255, 252, 254, 0.96), rgba(255, 228, 239, 0.88));
  --tc-field-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 239, 247, 0.72));
  --tc-row-bg:
    radial-gradient(circle at 18px 20px, rgba(216, 93, 139, 0.035) 0 1px, transparent 1.8px),
    rgba(255, 236, 245, 0.42);
  --tc-row-active-bg:
    linear-gradient(135deg, rgba(247, 169, 197, 0.48), rgba(216, 200, 255, 0.36)),
    rgba(255, 246, 250, 0.72);
  --tc-chrome-border: rgba(154, 68, 104, 0.24);
  --tc-surface-border: rgba(154, 68, 104, 0.2);
  --tc-row-border: rgba(154, 68, 104, 0.15);
  --tc-chrome-shadow:
    0 12px 34px rgba(141, 73, 104, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --tc-surface-shadow:
    0 18px 48px rgba(141, 73, 104, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
  --tc-surface-backdrop: blur(18px) saturate(1.18);
  --tc-profile-text-primary: var(--katty-ink);
  --tc-profile-text-muted: var(--katty-ink-soft);
  --tc-profile-cover-bg:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.42) 0%, transparent 34%),
    radial-gradient(circle at 76% 28%, rgba(216, 200, 255, 0.34) 0%, transparent 38%),
    linear-gradient(115deg, #ffd6e5 0%, #ffeef5 24%, #ffd5c3 47%, #f3b4d0 70%, #d8c8ff 100%);
  --tc-profile-hero-overlay:
    radial-gradient(ellipse 70% 46% at 16% 78%, rgba(255, 255, 255, 0.34), transparent 74%),
    linear-gradient(180deg, transparent 0 42%, rgba(255, 240, 247, 0.22) 68%, rgba(255, 224, 237, 0.56) 100%);
  --tc-profile-hero-filter: blur(20px) saturate(1.32);
}

:where(.simple-discord-shell) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-shell-bg);
  background-size: var(--tc-theme-bg-size);
  box-shadow: var(--tc-chrome-shadow);
}

:where(.server-rail, .taksa-rail, .v15-quick-rail) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-rail-bg);
  background-size: var(--tc-theme-bg-size);
}

:where(.simple-sidebar, .mobile-menu-body.simple-sidebar) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-chrome-bg);
  background-size: var(--tc-theme-bg-size);
}

:where(.simple-members) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-members-bg);
  background-size: var(--tc-theme-bg-size);
}

:where(.simple-main) {
  color: var(--tc-page-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-page-bg);
  background-size: var(--tc-theme-bg-size);
}

:where(.simple-content) {
  color: var(--tc-page-text-primary);
}

:where(.simple-topbar, .v06-topbar, .channel-header) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-topbar-bg);
  background-size: var(--tc-theme-bg-size);
  box-shadow: var(--tc-chrome-shadow);
}

:where(.simple-title h2, .home-directory-brand strong, .simple-server-head strong) {
  color: var(--tc-chrome-text-primary);
}

:where(.simple-server-head span, .home-directory-brand span, .section-title, .home-server-directory-title, .home-server-directory-title em) {
  color: var(--tc-chrome-text-muted);
}

:where(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-action-card,
  .update-news-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .profile-friend-card,
  .profile-comment-row,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .media-viewer-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .my-page-loading,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .community-hero,
  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel,
  .community-card,
  .community-result-list,
  .community-category
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-surface-border);
  background: var(--tc-surface-bg);
  background-size: var(--tc-theme-surface-size);
  box-shadow: var(--tc-surface-shadow);
  backdrop-filter: var(--tc-surface-backdrop);
}

:where(
  .ui-card,
  .home-action-card,
  .server-mini-card,
  .settings-card,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .community-card,
  .community-category
) {
  background: var(--tc-card-bg);
  background-size: var(--tc-theme-surface-size);
}

:where(
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .simple-member-row,
  .voice-user,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .quick-actions-v16 button,
  .notification-row-v19
) {
  color: var(--tc-surface-text-secondary);
  border-color: var(--tc-row-border);
  background: var(--tc-row-bg);
  background-size: var(--tc-theme-surface-size);
}

:where(
  .ui-list-row:hover,
  .ui-list-row.active,
  .ui-list-row.is-active,
  .nav-row:hover,
  .nav-row.active,
  .home-server-row:hover,
  .home-server-row.is-pinned,
  .channel-row:hover,
  .channel-row.active,
  .channel-item.active .channel-row,
  .voice-channel.active > .channel-item .channel-row,
  .settings-nav-panel nav button:hover,
  .settings-nav-panel nav button.active,
  .home-server-group-toggle:hover,
  .home-server-group-toggle:focus-visible,
  .quick-actions-v16 button:hover,
  .notification-row-v19:hover
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-border-strong);
  background: var(--tc-row-active-bg);
  background-size: var(--tc-theme-surface-size);
}

:where(
  .ui-field,
  .ui-composer input,
  .ui-composer textarea,
  .ui-panel input,
  .ui-panel select,
  .ui-panel textarea,
  .ui-card input,
  .ui-card select,
  .ui-card textarea,
  .ui-modal input,
  .ui-modal select,
  .ui-modal textarea,
  .home-server-search,
  .simple-search,
  .teammate-form-grid input,
  .teammate-form-grid select,
  .teammate-form-grid textarea,
  .profile-comment-form input
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-row-border);
  background: var(--tc-field-bg);
  background-size: var(--tc-theme-surface-size);
}

:where(.simple-search input, .home-server-search input) {
  color: var(--tc-surface-text-primary);
  background: transparent;
}

:where(
  .home-action-card strong,
  .home-panel h3,
  .update-news-card h4,
  .server-mini-card strong,
  .my-page-side-card h3,
  .my-page-post strong,
  .direct-chat-hero h2,
  .direct-conversation-row strong,
  .teammate-card h2,
  .teammate-profile-form h2,
  .teammate-requests h3,
  .community-card h3,
  .community-card strong,
  .community-section h3,
  .community-results h3,
  .community-category-panel h3
) {
  color: var(--tc-surface-text-primary);
}

:where(
  .home-action-card p,
  .home-panel p,
  .update-news-card p,
  .update-news-card li,
  .server-mini-card em,
  .my-page-side-card,
  .my-page-post p,
  .my-page-post header em,
  .profile-upload-policy,
  .profile-about-list,
  .profile-comment-row p,
  .direct-chat-hero p,
  .direct-conversation-row em,
  .direct-conversation-row p,
  .teammate-card p,
  .teammate-form-grid label,
  .community-card p,
  .community-card span,
  .community-side-panel em
) {
  color: var(--tc-surface-text-muted);
}

.teammate-deck-head h2,
.simple-content > .teammate-page .teammate-deck-head h2 {
  color: var(--tc-page-text-primary);
}

.teammate-deck-head .channel-kicker,
.simple-content > .teammate-page .teammate-deck-head .channel-kicker {
  color: var(--tc-page-text-muted);
}

.my-page-hero.ui-panel {
  color: var(--tc-profile-text-primary);
  border-color: var(--tc-surface-border);
  background: var(--tc-surface-bg);
  background-size: var(--tc-theme-surface-size);
  box-shadow: var(--tc-surface-shadow);
  backdrop-filter: none;
}

.my-page-cover {
  background: var(--tc-profile-cover-bg);
  background-size: cover;
  background-position: center top;
}

.my-page-cover-img {
  display: block;
  visibility: visible;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-page-hero::after {
  background: var(--tc-profile-hero-overlay);
  -webkit-backdrop-filter: var(--tc-profile-hero-filter);
  backdrop-filter: var(--tc-profile-hero-filter);
}

.my-page-title h1,
.my-page-title p,
.my-page-status,
.profile-presence,
.profile-presence span {
  color: var(--tc-profile-text-muted);
}

.my-page-title h1 {
  color: var(--tc-profile-text-primary);
}

/* Theme-builder bridge: these selectors intentionally outrank legacy theme
   one-offs, so new skins only have to change semantic tokens above. */
:root[data-theme="beige"] :is(.simple-discord-shell),
:root[data-theme="retro"] :is(.simple-discord-shell) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-shell-bg);
  background-size: var(--tc-theme-bg-size);
  box-shadow: var(--tc-chrome-shadow);
}

:root[data-theme="beige"] :is(.server-rail, .taksa-rail, .v15-quick-rail),
:root[data-theme="retro"] :is(.server-rail, .taksa-rail, .v15-quick-rail) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-rail-bg);
  background-size: var(--tc-theme-bg-size);
}

:root[data-theme="beige"] :is(.simple-sidebar, .mobile-menu-body.simple-sidebar),
:root[data-theme="retro"] :is(.simple-sidebar, .mobile-menu-body.simple-sidebar) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-chrome-bg);
  background-size: var(--tc-theme-bg-size);
}

:root[data-theme="beige"] :is(.simple-members),
:root[data-theme="retro"] :is(.simple-members) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-members-bg);
  background-size: var(--tc-theme-bg-size);
}

:root[data-theme="beige"] :is(.simple-main),
:root[data-theme="retro"] :is(.simple-main) {
  color: var(--tc-page-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-page-bg);
  background-size: var(--tc-theme-bg-size);
}

:root[data-theme="beige"] :is(.simple-content),
:root[data-theme="retro"] :is(.simple-content) {
  color: var(--tc-page-text-primary);
}

:root[data-theme="beige"] :is(.simple-topbar, .v06-topbar, .channel-header),
:root[data-theme="retro"] :is(.simple-topbar, .v06-topbar, .channel-header) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-topbar-bg);
  background-size: var(--tc-theme-bg-size);
  box-shadow: var(--tc-chrome-shadow);
}

:root[data-theme="beige"] :is(.simple-title h2, .home-directory-brand strong, .simple-server-head strong),
:root[data-theme="retro"] :is(.simple-title h2, .home-directory-brand strong, .simple-server-head strong) {
  color: var(--tc-chrome-text-primary);
}

:root[data-theme="beige"] :is(.simple-server-head span, .home-directory-brand span, .section-title, .home-server-directory-title, .home-server-directory-title em),
:root[data-theme="retro"] :is(.simple-server-head span, .home-directory-brand span, .section-title, .home-server-directory-title, .home-server-directory-title em) {
  color: var(--tc-chrome-text-muted);
}

:root[data-theme="beige"] :is(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-action-card,
  .update-news-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .profile-friend-card,
  .profile-comment-row,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .media-viewer-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .my-page-loading,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .community-hero,
  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel,
  .community-card,
  .community-result-list,
  .community-category
),
:root[data-theme="retro"] :is(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-action-card,
  .update-news-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .profile-friend-card,
  .profile-comment-row,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .media-viewer-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .my-page-loading,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .community-hero,
  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel,
  .community-card,
  .community-result-list,
  .community-category
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-surface-border);
  background: var(--tc-surface-bg);
  background-size: var(--tc-theme-surface-size);
  box-shadow: var(--tc-surface-shadow);
  backdrop-filter: var(--tc-surface-backdrop);
}

:root[data-theme="beige"] :is(
  .ui-card,
  .home-action-card,
  .server-mini-card,
  .settings-card,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .community-card,
  .community-category
),
:root[data-theme="retro"] :is(
  .ui-card,
  .home-action-card,
  .server-mini-card,
  .settings-card,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .community-card,
  .community-category
) {
  background: var(--tc-card-bg);
  background-size: var(--tc-theme-surface-size);
}

:root[data-theme="beige"] :is(
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .simple-member-row,
  .voice-user,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .quick-actions-v16 button,
  .notification-row-v19
),
:root[data-theme="retro"] :is(
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .simple-member-row,
  .voice-user,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .quick-actions-v16 button,
  .notification-row-v19
) {
  color: var(--tc-surface-text-secondary);
  border-color: var(--tc-row-border);
  background: var(--tc-row-bg);
  background-size: var(--tc-theme-surface-size);
}

:root[data-theme="beige"] :is(
  .ui-list-row:hover,
  .ui-list-row.active,
  .ui-list-row.is-active,
  .nav-row:hover,
  .nav-row.active,
  .home-server-row:hover,
  .home-server-row.is-pinned,
  .channel-row:hover,
  .channel-row.active,
  .channel-item.active .channel-row,
  .voice-channel.active > .channel-item .channel-row,
  .settings-nav-panel nav button:hover,
  .settings-nav-panel nav button.active,
  .home-server-group-toggle:hover,
  .home-server-group-toggle:focus-visible,
  .quick-actions-v16 button:hover,
  .notification-row-v19:hover
),
:root[data-theme="retro"] :is(
  .ui-list-row:hover,
  .ui-list-row.active,
  .ui-list-row.is-active,
  .nav-row:hover,
  .nav-row.active,
  .home-server-row:hover,
  .home-server-row.is-pinned,
  .channel-row:hover,
  .channel-row.active,
  .channel-item.active .channel-row,
  .voice-channel.active > .channel-item .channel-row,
  .settings-nav-panel nav button:hover,
  .settings-nav-panel nav button.active,
  .home-server-group-toggle:hover,
  .home-server-group-toggle:focus-visible,
  .quick-actions-v16 button:hover,
  .notification-row-v19:hover
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-border-strong);
  background: var(--tc-row-active-bg);
  background-size: var(--tc-theme-surface-size);
}

:root[data-theme="beige"] :is(
  .ui-field,
  .ui-composer input,
  .ui-composer textarea,
  .ui-panel input,
  .ui-panel select,
  .ui-panel textarea,
  .ui-card input,
  .ui-card select,
  .ui-card textarea,
  .ui-modal input,
  .ui-modal select,
  .ui-modal textarea,
  .home-server-search,
  .simple-search,
  .teammate-form-grid input,
  .teammate-form-grid select,
  .teammate-form-grid textarea,
  .profile-comment-form input
),
:root[data-theme="retro"] :is(
  .ui-field,
  .ui-composer input,
  .ui-composer textarea,
  .ui-panel input,
  .ui-panel select,
  .ui-panel textarea,
  .ui-card input,
  .ui-card select,
  .ui-card textarea,
  .ui-modal input,
  .ui-modal select,
  .ui-modal textarea,
  .home-server-search,
  .simple-search,
  .teammate-form-grid input,
  .teammate-form-grid select,
  .teammate-form-grid textarea,
  .profile-comment-form input
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-row-border);
  background: var(--tc-field-bg);
  background-size: var(--tc-theme-surface-size);
}

:root[data-theme="beige"] :is(.simple-search input, .home-server-search input),
:root[data-theme="retro"] :is(.simple-search input, .home-server-search input) {
  color: var(--tc-surface-text-primary);
  background: transparent;
}

:root[data-theme="beige"] :is(.my-page-hero.ui-panel),
:root[data-theme="retro"] :is(.my-page-hero.ui-panel) {
  color: var(--tc-profile-text-primary);
  border-color: var(--tc-surface-border);
  background: var(--tc-surface-bg);
  background-size: var(--tc-theme-surface-size);
  box-shadow: var(--tc-surface-shadow);
  backdrop-filter: none;
}

:root[data-theme="beige"] :is(.my-page-cover),
:root[data-theme="retro"] :is(.my-page-cover) {
  background: var(--tc-profile-cover-bg);
  background-size: cover;
  background-position: center top;
}

:root[data-theme="beige"] :is(.my-page-cover-img),
:root[data-theme="retro"] :is(.my-page-cover-img) {
  display: block;
  visibility: visible;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:root[data-theme="beige"] :is(.my-page-hero)::after,
:root[data-theme="retro"] :is(.my-page-hero)::after {
  background: var(--tc-profile-hero-overlay);
  -webkit-backdrop-filter: var(--tc-profile-hero-filter);
  backdrop-filter: var(--tc-profile-hero-filter);
}

:root[data-theme="beige"] :is(.teammate-deck-head h2, .simple-content > .teammate-page .teammate-deck-head h2),
:root[data-theme="retro"] :is(.teammate-deck-head h2, .simple-content > .teammate-page .teammate-deck-head h2) {
  color: var(--tc-page-text-primary);
}

:root[data-theme="beige"] :is(.teammate-deck-head .channel-kicker, .simple-content > .teammate-page .teammate-deck-head .channel-kicker),
:root[data-theme="retro"] :is(.teammate-deck-head .channel-kicker, .simple-content > .teammate-page .teammate-deck-head .channel-kicker) {
  color: var(--tc-page-text-muted);
}

:root[data-theme="retro"] :is(
  .server-rail,
  .taksa-rail,
  .v15-quick-rail,
  .simple-sidebar,
  .mobile-menu-body.simple-sidebar,
  .simple-members,
  .simple-topbar,
  .v06-topbar,
  .channel-header,
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-pro-banner,
  .home-action-card,
  .update-news-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .theme-choice-card,
  .design-choice-card,
  .interface-scale-preset,
  .interface-scale-current,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .theme-menu-popover,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .profile-friend-card,
  .profile-comment-row,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .my-page-loading,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .community-hero,
  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel,
  .community-card,
  .community-result-list,
  .community-category,
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .simple-member-row,
  .voice-user,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .quick-actions-v16 button
):not(.my-page-hero):not(.media-viewer-v20) {
  position: relative;
}

:root[data-theme="retro"] :is(
  .server-rail,
  .taksa-rail,
  .v15-quick-rail,
  .simple-sidebar,
  .mobile-menu-body.simple-sidebar,
  .simple-members,
  .simple-topbar,
  .v06-topbar,
  .channel-header,
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-pro-banner,
  .home-action-card,
  .update-news-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .theme-choice-card,
  .design-choice-card,
  .interface-scale-preset,
  .interface-scale-current,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .theme-menu-popover,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .profile-friend-card,
  .profile-comment-row,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .my-page-loading,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .community-hero,
  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel,
  .community-card,
  .community-result-list,
  .community-category,
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .simple-member-row,
  .voice-user,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .quick-actions-v16 button
):not(.my-page-hero):not(.media-viewer-v20) > * {
  position: relative;
  z-index: 1;
}

:root[data-theme="retro"] :is(
  .server-rail,
  .taksa-rail,
  .v15-quick-rail,
  .simple-sidebar,
  .mobile-menu-body.simple-sidebar,
  .simple-members,
  .simple-topbar,
  .v06-topbar,
  .channel-header,
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-pro-banner,
  .home-action-card,
  .update-news-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .theme-choice-card,
  .design-choice-card,
  .interface-scale-preset,
  .interface-scale-current,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .theme-menu-popover,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .profile-friend-card,
  .profile-comment-row,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .my-page-loading,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .community-hero,
  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel,
  .community-card,
  .community-result-list,
  .community-category,
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .simple-member-row,
  .voice-user,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .quick-actions-v16 button
):not(.my-page-hero):not(.media-viewer-v20)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--retro-paper-overlay);
  opacity: 0.48;
  mix-blend-mode: multiply;
}

:root[data-theme="retro"] :is(
  .server-rail,
  .taksa-rail,
  .v15-quick-rail,
  .simple-sidebar,
  .mobile-menu-body.simple-sidebar,
  .simple-members,
  .simple-topbar,
  .v06-topbar,
  .channel-header,
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-pro-banner,
  .home-action-card,
  .update-news-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .theme-choice-card,
  .design-choice-card,
  .interface-scale-preset,
  .interface-scale-current,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .theme-menu-popover,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .profile-friend-card,
  .profile-comment-row,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .my-page-loading,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .community-hero,
  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel,
  .community-card,
  .community-result-list,
  .community-category,
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .simple-member-row,
  .voice-user,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .quick-actions-v16 button
):not(.my-page-hero):not(.media-viewer-v20)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: var(--retro-worn-frame);
  opacity: 0.82;
}

:root[data-theme="kattydrift"] :where(.simple-discord-shell) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-shell-bg);
  background-size: var(--tc-theme-bg-size);
  box-shadow: var(--tc-chrome-shadow);
}

:root[data-theme="kattydrift"] :where(.server-rail, .taksa-rail, .v15-quick-rail) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-rail-bg);
  background-size: var(--tc-theme-bg-size);
}

:root[data-theme="kattydrift"] :where(.simple-sidebar, .mobile-menu-body.simple-sidebar) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-chrome-bg);
  background-size: var(--tc-theme-bg-size);
}

:root[data-theme="kattydrift"] :where(.simple-members) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-members-bg);
  background-size: var(--tc-theme-bg-size);
}

:root[data-theme="kattydrift"] :where(.simple-main) {
  color: var(--tc-page-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-page-bg);
  background-size: var(--tc-theme-bg-size);
}

:root[data-theme="kattydrift"] :where(.simple-content) {
  color: var(--tc-page-text-primary);
}

:root[data-theme="kattydrift"] :where(.simple-topbar, .v06-topbar, .channel-header) {
  color: var(--tc-chrome-text-primary);
  border-color: var(--tc-chrome-border);
  background: var(--tc-topbar-bg);
  background-size: var(--tc-theme-bg-size);
  box-shadow: var(--tc-chrome-shadow);
}

:root[data-theme="kattydrift"] :where(.simple-title h2, .home-directory-brand strong, .simple-server-head strong) {
  color: var(--tc-chrome-text-primary);
}

:root[data-theme="kattydrift"] :where(.simple-server-head span, .home-directory-brand span, .section-title, .home-server-directory-title, .home-server-directory-title em) {
  color: var(--tc-chrome-text-muted);
}

:root[data-theme="kattydrift"] :where(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .v06-section-card,
  .v06-server-head,
  .glass-card,
  .home-panel,
  .home-action-card,
  .update-news-card,
  .server-mini-card,
  .settings-modal,
  .settings-suite,
  .settings-card,
  .settings-nav-panel,
  .settings-workspace,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage,
  .simple-composer,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .profile-post-edit-form,
  .profile-friend-card,
  .profile-comment-row,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .news-upload-box-v18,
  .news-upload-preview-v19,
  .chat-attachment-preview-v20,
  .emoji-picker-v20,
  .media-viewer-v20,
  .server-aside-card-v16,
  .notification-row-v19,
  .news-list-row-v18,
  .invite-box-v19,
  .server-empty-news,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .my-page-loading,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .teammate-deck-count,
  .community-hero,
  .community-section,
  .community-results,
  .community-category-panel,
  .community-side-panel,
  .community-card,
  .community-result-list,
  .community-category
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-surface-border);
  background: var(--tc-surface-bg);
  background-size: var(--tc-theme-surface-size);
  box-shadow: var(--tc-surface-shadow);
  backdrop-filter: var(--tc-surface-backdrop);
}

:root[data-theme="kattydrift"] :where(
  .ui-card,
  .home-action-card,
  .server-mini-card,
  .settings-card,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .profile-composer-input,
  .profile-upload-policy,
  .profile-ad-card,
  .direct-conversation-row,
  .direct-message-row > div,
  .simple-message > div,
  .teammate-card,
  .teammate-self-card,
  .teammate-request-row,
  .teammate-profile-form,
  .teammate-requests,
  .community-card,
  .community-category
) {
  background: var(--tc-card-bg);
  background-size: var(--tc-theme-surface-size);
}

:root[data-theme="kattydrift"] :where(
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .simple-member-row,
  .voice-user,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .quick-actions-v16 button,
  .notification-row-v19
) {
  color: var(--tc-surface-text-secondary);
  border-color: var(--tc-row-border);
  background: var(--tc-row-bg);
  background-size: var(--tc-theme-surface-size);
}

:root[data-theme="kattydrift"] :where(
  .ui-list-row:hover,
  .ui-list-row.active,
  .ui-list-row.is-active,
  .nav-row:hover,
  .nav-row.active,
  .home-server-row:hover,
  .home-server-row.is-pinned,
  .channel-row:hover,
  .channel-row.active,
  .channel-item.active .channel-row,
  .voice-channel.active > .channel-item .channel-row,
  .settings-nav-panel nav button:hover,
  .settings-nav-panel nav button.active,
  .home-server-group-toggle:hover,
  .home-server-group-toggle:focus-visible,
  .quick-actions-v16 button:hover,
  .notification-row-v19:hover
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-border-strong);
  background: var(--tc-row-active-bg);
  background-size: var(--tc-theme-surface-size);
}

:root[data-theme="kattydrift"] :where(
  .ui-field,
  .ui-composer input,
  .ui-composer textarea,
  .ui-panel input,
  .ui-panel select,
  .ui-panel textarea,
  .ui-card input,
  .ui-card select,
  .ui-card textarea,
  .ui-modal input,
  .ui-modal select,
  .ui-modal textarea,
  .home-server-search,
  .simple-search,
  .teammate-form-grid input,
  .teammate-form-grid select,
  .teammate-form-grid textarea,
  .profile-comment-form input
) {
  color: var(--tc-surface-text-primary);
  border-color: var(--tc-row-border);
  background: var(--tc-field-bg);
  background-size: var(--tc-theme-surface-size);
}

:root[data-theme="kattydrift"] :where(.simple-search input, .home-server-search input) {
  color: var(--tc-surface-text-primary);
  background: transparent;
}

:root[data-theme="kattydrift"] :where(.my-page-hero.ui-panel) {
  color: var(--tc-profile-text-primary);
  border-color: var(--tc-surface-border);
  background: var(--tc-surface-bg);
  background-size: var(--tc-theme-surface-size);
  box-shadow: var(--tc-surface-shadow);
  backdrop-filter: none;
}

:root[data-theme="kattydrift"] :where(.my-page-cover) {
  background: var(--tc-profile-cover-bg);
  background-size: cover;
  background-position: center top;
}

:root[data-theme="kattydrift"] :where(.my-page-cover-img) {
  display: block;
  visibility: visible;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:root[data-theme="kattydrift"] :where(.my-page-hero)::after {
  background: var(--tc-profile-hero-overlay);
  -webkit-backdrop-filter: var(--tc-profile-hero-filter);
  backdrop-filter: var(--tc-profile-hero-filter);
}

:root[data-theme="kattydrift"] :where(.teammate-deck-head h2, .simple-content > .teammate-page .teammate-deck-head h2) {
  color: var(--tc-page-text-primary);
}

:root[data-theme="kattydrift"] :where(.teammate-deck-head .channel-kicker, .simple-content > .teammate-page .teammate-deck-head .channel-kicker) {
  color: var(--tc-page-text-muted);
}

/* Premium neon voice theme */
:root[data-theme="neon-voice"] {
  color-scheme: dark;

  --neon-voice-bg: #06111d;
  --neon-voice-bg-deep: #030913;
  --neon-voice-bg-soft: #0b1d31;
  --neon-voice-panel: rgba(12, 28, 46, 0.72);
  --neon-voice-panel-strong: rgba(15, 35, 58, 0.82);
  --neon-voice-card: rgba(17, 40, 64, 0.64);
  --neon-voice-card-muted: rgba(9, 24, 40, 0.56);
  --neon-voice-border: rgba(129, 224, 236, 0.18);
  --neon-voice-border-strong: rgba(80, 230, 238, 0.44);
  --neon-voice-cyan: #3ee8f2;
  --neon-voice-teal: #31d7c5;
  --neon-voice-violet: #8d75ff;
  --neon-voice-text: #f6fbff;
  --neon-voice-soft: #c4d7e9;
  --neon-voice-muted: #8ca3b9;

  --tc-bg-base: var(--neon-voice-bg);
  --tc-bg-canvas: var(--neon-voice-bg-deep);
  --tc-bg-soft: var(--neon-voice-bg-soft);
  --tc-bg-cloud-a: rgba(62, 232, 242, 0.24);
  --tc-bg-cloud-b: rgba(141, 117, 255, 0.22);
  --tc-bg-cloud-c: rgba(49, 215, 197, 0.16);
  --tc-surface-shell: rgba(4, 13, 24, 0.72);
  --tc-surface-rail: rgba(5, 16, 29, 0.78);
  --tc-surface-sidebar: rgba(9, 24, 40, 0.72);
  --tc-surface-main: rgba(9, 22, 37, 0.56);
  --tc-surface-members: rgba(7, 20, 34, 0.66);
  --tc-surface-panel: var(--neon-voice-panel);
  --tc-surface-card: var(--neon-voice-card);
  --tc-surface-card-muted: var(--neon-voice-card-muted);
  --tc-surface-elevated: var(--neon-voice-panel-strong);
  --tc-surface-elevated-soft: rgba(17, 39, 62, 0.74);
  --tc-surface-profile: rgba(12, 31, 52, 0.82);
  --tc-surface-field: rgba(4, 14, 25, 0.64);
  --tc-surface-hover: rgba(62, 232, 242, 0.11);
  --tc-surface-active: rgba(62, 232, 242, 0.17);
  --tc-border-subtle: var(--neon-voice-border);
  --tc-border: rgba(129, 224, 236, 0.22);
  --tc-border-strong: var(--neon-voice-border-strong);
  --tc-text-primary: var(--neon-voice-text);
  --tc-text-secondary: var(--neon-voice-soft);
  --tc-text-muted: var(--neon-voice-muted);
  --tc-text-faint: #637b91;
  --tc-text-inverse: #041017;
  --tc-accent: var(--neon-voice-cyan);
  --tc-accent-2: var(--neon-voice-violet);
  --tc-accent-cyan: var(--neon-voice-cyan);
  --tc-accent-violet: var(--neon-voice-violet);
  --tc-accent-contrast: #03121b;
  --tc-success: #37e59f;
  --tc-danger: #ff5f8d;
  --tc-danger-readable: #ffd8e5;
  --tc-offline-readable: #ff9db8;
  --tc-warning: #f7c46a;
  --tc-shadow-soft: 0 18px 50px rgba(0, 7, 18, 0.34);
  --tc-shadow-strong: 0 28px 92px rgba(0, 7, 18, 0.48);
  --tc-focus-ring: 0 0 0 3px rgba(62, 232, 242, 0.22);
  --tc-glass-blur: blur(18px) saturate(1.18);
  --glass-bright: rgba(171, 235, 245, 0.105);
  --glass-dim: rgba(68, 116, 154, 0.035);

  --tc-page-text-primary: var(--neon-voice-text);
  --tc-page-text-secondary: var(--neon-voice-soft);
  --tc-page-text-muted: var(--neon-voice-muted);
  --tc-surface-text-primary: var(--neon-voice-text);
  --tc-surface-text-secondary: var(--neon-voice-soft);
  --tc-surface-text-muted: var(--neon-voice-muted);
  --tc-chrome-text-primary: var(--neon-voice-text);
  --tc-chrome-text-secondary: var(--neon-voice-soft);
  --tc-chrome-text-muted: var(--neon-voice-muted);
  --tc-theme-bg-size: auto;
  --tc-theme-surface-size: auto;
  --tc-shell-bg:
    radial-gradient(circle at 16% 6%, rgba(62, 232, 242, 0.13), transparent 32%),
    radial-gradient(circle at 82% 86%, rgba(141, 117, 255, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(10, 25, 42, 0.76), rgba(4, 12, 24, 0.78));
  --tc-rail-bg:
    linear-gradient(180deg, rgba(16, 38, 62, 0.82), rgba(5, 16, 29, 0.78));
  --tc-chrome-bg:
    radial-gradient(circle at 72% 12%, rgba(62, 232, 242, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(13, 31, 51, 0.78), rgba(7, 20, 34, 0.72));
  --tc-members-bg:
    radial-gradient(circle at 40% 10%, rgba(49, 215, 197, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(12, 29, 48, 0.68), rgba(6, 18, 31, 0.66));
  --tc-page-bg:
    radial-gradient(circle at 76% 14%, rgba(141, 117, 255, 0.11), transparent 38%),
    radial-gradient(circle at 18% 88%, rgba(62, 232, 242, 0.095), transparent 34%),
    rgba(8, 21, 36, 0.58);
  --tc-topbar-bg:
    linear-gradient(180deg, rgba(23, 51, 78, 0.78), rgba(9, 22, 38, 0.72));
  --tc-surface-bg:
    radial-gradient(circle at 12% 0%, rgba(171, 235, 245, 0.09), transparent 34%),
    linear-gradient(145deg, rgba(19, 44, 70, 0.84), rgba(9, 24, 40, 0.72));
  --tc-card-bg:
    radial-gradient(circle at 14% 0%, rgba(62, 232, 242, 0.075), transparent 34%),
    linear-gradient(145deg, rgba(20, 46, 72, 0.72), rgba(8, 22, 37, 0.64));
  --tc-field-bg:
    linear-gradient(180deg, rgba(5, 17, 30, 0.78), rgba(7, 22, 38, 0.72));
  --tc-row-bg:
    linear-gradient(145deg, rgba(171, 235, 245, 0.035), transparent),
    rgba(9, 25, 42, 0.46);
  --tc-row-active-bg:
    linear-gradient(110deg, rgba(62, 232, 242, 0.2), rgba(141, 117, 255, 0.13)),
    rgba(12, 32, 52, 0.68);
  --tc-chrome-border: rgba(129, 224, 236, 0.2);
  --tc-surface-border: rgba(129, 224, 236, 0.2);
  --tc-row-border: rgba(129, 224, 236, 0.14);
  --tc-chrome-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.08),
    0 20px 58px rgba(0, 8, 20, 0.3);
  --tc-surface-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.1),
    0 18px 52px rgba(0, 7, 18, 0.34),
    0 0 34px rgba(62, 232, 242, 0.055);
  --tc-surface-backdrop: blur(18px) saturate(1.18);
  --tc-profile-text-primary: var(--neon-voice-text);
  --tc-profile-text-muted: var(--neon-voice-soft);
  --tc-profile-cover-bg:
    radial-gradient(circle at 16% 18%, rgba(62, 232, 242, 0.2) 0%, transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(141, 117, 255, 0.22) 0%, transparent 40%),
    linear-gradient(115deg, #071724 0%, #102943 42%, #14213f 68%, #081524 100%);
  --tc-profile-hero-overlay:
    radial-gradient(ellipse 70% 48% at 16% 76%, rgba(62, 232, 242, 0.16), transparent 76%),
    linear-gradient(180deg, transparent 0 44%, rgba(5, 17, 30, 0.28) 72%, rgba(5, 15, 27, 0.58) 100%);
  --tc-profile-hero-filter: blur(20px) saturate(1.28);
}

:root[data-theme="neon-voice"] body {
  color: var(--neon-voice-text);
  background: var(--neon-voice-bg-deep);
}

:root[data-theme="neon-voice"] .animated-bg {
  background:
    radial-gradient(circle at 12% 16%, rgba(62, 232, 242, 0.18) 0%, transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(141, 117, 255, 0.16) 0%, transparent 32%),
    radial-gradient(circle at 72% 84%, rgba(49, 215, 197, 0.12) 0%, transparent 38%),
    linear-gradient(145deg, #030913 0%, #071724 48%, #0a1424 100%);
}

:root[data-theme="neon-voice"] .animated-bg::before,
:root[data-theme="neon-voice"] .animated-bg::after {
  opacity: 0.2;
  filter: blur(8px) saturate(1.08);
  background:
    radial-gradient(circle at 18% 26%, rgba(62, 232, 242, 0.2), transparent 32%),
    radial-gradient(circle at 84% 72%, rgba(141, 117, 255, 0.18), transparent 36%);
  mix-blend-mode: screen;
}

:root[data-theme="neon-voice"] .ambient-cloud {
  opacity: 0.22;
  filter: blur(20px) saturate(1.05);
  mix-blend-mode: screen;
}

:root[data-theme="neon-voice"] .cloud-one,
:root[data-theme="neon-voice"] .cloud-five {
  background: radial-gradient(circle, rgba(62, 232, 242, 0.24), rgba(141, 117, 255, 0.09) 52%, transparent 74%);
}

:root[data-theme="neon-voice"] .cloud-two,
:root[data-theme="neon-voice"] .cloud-six {
  background: radial-gradient(circle, rgba(49, 215, 197, 0.2), rgba(62, 232, 242, 0.08) 54%, transparent 76%);
}

:root[data-theme="neon-voice"] :where(
  .simple-discord-shell,
  .server-rail,
  .taksa-rail,
  .v15-quick-rail,
  .simple-sidebar,
  .simple-main,
  .simple-members,
  .simple-topbar,
  .v06-topbar,
  .channel-header,
  .theme-menu-popover
) {
  border-color: rgba(129, 224, 236, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.08),
    0 18px 54px rgba(0, 7, 18, 0.32),
    0 0 38px rgba(62, 232, 242, 0.045);
}

:root[data-theme="neon-voice"] :where(
  .ui-panel,
  .ui-card,
  .ui-modal,
  .ui-drawer,
  .ui-composer,
  .ui-dock,
  .ui-call-tile,
  .settings-card,
  .settings-suite,
  .settings-nav-panel,
  .settings-workspace,
  .home-panel,
  .home-action-card,
  .server-mini-card,
  .server-news-card-v18,
  .news-drawer-v18,
  .news-create-modal-v18,
  .notification-row-v19,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .my-page-hero,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .voice-grid,
  .v12-voice-panel,
  .stream-stage
) {
  color: var(--neon-voice-text);
  border-color: rgba(129, 224, 236, 0.2);
  background:
    radial-gradient(circle at 12% 0%, rgba(220, 252, 255, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(18, 43, 68, 0.78), rgba(7, 21, 36, 0.66));
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.1),
    0 18px 52px rgba(0, 7, 18, 0.34),
    0 0 34px rgba(62, 232, 242, 0.055);
  backdrop-filter: blur(18px) saturate(1.18);
}

:root[data-theme="neon-voice"] .modal-backdrop {
  background:
    radial-gradient(circle at 28% 22%, rgba(62, 232, 242, 0.11), transparent 34%),
    radial-gradient(circle at 78% 76%, rgba(141, 117, 255, 0.1), transparent 38%),
    rgba(3, 9, 19, 0.72);
  backdrop-filter: blur(16px) saturate(1.12);
}

:root[data-theme="neon-voice"] .modal-backdrop:has(.settings-suite) {
  background:
    radial-gradient(circle at 18% 14%, rgba(62, 232, 242, 0.12), transparent 34%),
    radial-gradient(circle at 80% 18%, rgba(141, 117, 255, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(3, 9, 19, 0.74), rgba(5, 17, 30, 0.66));
}

:root[data-theme="neon-voice"] :where(
  .ui-list-row,
  .nav-row,
  .home-server-row,
  .channel-row,
  .sound-row,
  .role-row,
  .settings-nav-panel nav button,
  .home-server-group-toggle,
  .direct-conversation-row,
  .voice-user,
  .simple-member-row,
  .theme-menu-popover button
) {
  color: var(--neon-voice-soft);
  border-color: rgba(129, 224, 236, 0.14);
  background:
    linear-gradient(145deg, rgba(171, 235, 245, 0.035), transparent),
    rgba(9, 25, 42, 0.46);
}

:root[data-theme="neon-voice"] :where(
  .ui-list-row:hover,
  .ui-list-row.active,
  .ui-list-row.is-active,
  .nav-row:hover,
  .nav-row.active,
  .home-server-row:hover,
  .home-server-row.is-pinned,
  .channel-row:hover,
  .channel-row.active,
  .channel-item.active .ui-channel-row,
  .voice-channel.active .ui-channel-row,
  .settings-nav-panel nav button:hover,
  .settings-nav-panel nav button.active,
  .theme-menu-popover button:hover,
  .theme-menu-popover button.active
) {
  color: var(--neon-voice-text);
  border-color: rgba(62, 232, 242, 0.42);
  background:
    linear-gradient(110deg, rgba(62, 232, 242, 0.19), rgba(141, 117, 255, 0.13)),
    rgba(12, 32, 52, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.12),
    0 0 22px rgba(62, 232, 242, 0.11);
}

:root[data-theme="neon-voice"] :where(
  .ui-field,
  .ui-composer input,
  .ui-composer textarea,
  .ui-panel input,
  .ui-panel select,
  .ui-panel textarea,
  .ui-card input,
  .ui-card select,
  .ui-card textarea,
  .ui-modal input,
  .ui-modal select,
  .ui-modal textarea,
  .home-server-search,
  .simple-search,
  .teammate-form-grid input,
  .teammate-form-grid select,
  .teammate-form-grid textarea
) {
  color: var(--neon-voice-text);
  border-color: rgba(129, 224, 236, 0.18);
  background:
    linear-gradient(180deg, rgba(5, 17, 30, 0.78), rgba(7, 22, 38, 0.72));
}

:root[data-theme="neon-voice"] :where(
  .ui-field:focus,
  .ui-composer input:focus,
  .ui-composer textarea:focus,
  .ui-panel input:focus,
  .ui-panel select:focus,
  .ui-panel textarea:focus,
  .ui-card input:focus,
  .ui-card select:focus,
  .ui-card textarea:focus,
  .ui-modal input:focus,
  .ui-modal select:focus,
  .ui-modal textarea:focus
) {
  border-color: rgba(62, 232, 242, 0.5);
  box-shadow:
    var(--tc-focus-ring),
    0 0 26px rgba(49, 215, 197, 0.12);
}

:root[data-theme="neon-voice"] :where(.ui-button-primary, .primary-button) {
  color: #03121b;
  border-color: rgba(62, 232, 242, 0.5);
  background: linear-gradient(135deg, #3ee8f2 0%, #31d7c5 48%, #8d75ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 14px 34px rgba(62, 232, 242, 0.16);
}

:root[data-theme="neon-voice"] :where(.ui-button-primary:hover, .primary-button:hover) {
  background: linear-gradient(135deg, #66f0f7 0%, #47e1d0 48%, #9d8aff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 18px 42px rgba(62, 232, 242, 0.22);
}

:root[data-theme="neon-voice"] :where(.ui-button-secondary, .ghost-button, .file-button, .ui-icon-button, .dock-icon, .home-server-pin, .server-add, .theme-settings-button) {
  color: var(--neon-voice-soft);
  border-color: rgba(129, 224, 236, 0.16);
  background:
    linear-gradient(145deg, rgba(171, 235, 245, 0.07), rgba(68, 116, 154, 0.035)),
    rgba(10, 26, 43, 0.58);
}

:root[data-theme="neon-voice"] :where(.ui-button-secondary:hover, .ghost-button:hover, .file-button:hover, .ui-icon-button:hover, .dock-icon:hover, .theme-settings-button:hover, .ui-icon-button:focus-visible, .dock-icon:focus-visible) {
  color: var(--neon-voice-text);
  border-color: rgba(62, 232, 242, 0.42);
  background:
    linear-gradient(135deg, rgba(62, 232, 242, 0.15), rgba(141, 117, 255, 0.09)),
    rgba(12, 32, 52, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.12),
    0 0 24px rgba(62, 232, 242, 0.12);
}

:root[data-theme="neon-voice"] :where(.direct-message-row > div, .simple-message > div) {
  border-color: rgba(129, 224, 236, 0.14);
  background:
    linear-gradient(145deg, rgba(17, 40, 64, 0.62), rgba(8, 22, 37, 0.54));
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.075),
    0 10px 28px rgba(0, 7, 18, 0.22);
}

:root[data-theme="neon-voice"] :where(.direct-message-row.is-own > div, .simple-message.is-own > div) {
  border-color: rgba(62, 232, 242, 0.24);
  background:
    linear-gradient(145deg, rgba(24, 68, 83, 0.64), rgba(10, 36, 52, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.1),
    0 12px 30px rgba(49, 215, 197, 0.08);
}

:root[data-theme="neon-voice"] .chat-audio-message-v21,
:root[data-theme="neon-voice"] .chat-audio-recorder-v21 {
  border-color: rgba(62, 232, 242, 0.26);
  background:
    radial-gradient(circle at 12% 8%, rgba(62, 232, 242, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(12, 38, 55, 0.78), rgba(7, 23, 38, 0.66));
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.1),
    0 0 26px rgba(49, 215, 197, 0.1);
}

:root[data-theme="neon-voice"] .chat-composer-v20 {
  border-color: rgba(62, 232, 242, 0.24);
  background:
    radial-gradient(circle at 18% 0%, rgba(62, 232, 242, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(13, 34, 55, 0.86), rgba(5, 18, 31, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.12),
    0 14px 44px rgba(0, 7, 18, 0.3),
    0 0 30px rgba(62, 232, 242, 0.07);
}

:root[data-theme="neon-voice"] .chat-composer-v20:focus-within {
  border-color: rgba(62, 232, 242, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.14),
    0 0 0 3px rgba(62, 232, 242, 0.14),
    0 0 34px rgba(49, 215, 197, 0.13);
}

:root[data-theme="neon-voice"] .chat-composer-v20 .chat-audio-record-v21:hover,
:root[data-theme="neon-voice"] .chat-composer-v20 .chat-audio-record-v21:focus-visible,
:root[data-theme="neon-voice"] .chat-composer-v20 .chat-audio-record-v21.is-recording,
:root[data-theme="neon-voice"] .chat-composer-v20 .chat-audio-record-v21.is-gesture-active {
  color: var(--neon-voice-text);
  border-color: rgba(62, 232, 242, 0.52);
  background:
    radial-gradient(circle at 50% 30%, rgba(62, 232, 242, 0.24), transparent 54%),
    rgba(9, 30, 45, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.16),
    0 0 28px rgba(62, 232, 242, 0.18);
}

:root[data-theme="neon-voice"] .voice-room-page.v12-call-page .video-voice-tile.is-speaking,
:root[data-theme="neon-voice"] .voice-tile.is-speaking {
  border-color: rgba(62, 232, 242, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.13),
    0 0 0 1px rgba(62, 232, 242, 0.16),
    0 0 34px rgba(62, 232, 242, 0.18);
}

:root[data-theme="neon-voice"] .voice-room-page.v12-call-page .video-voice-tile.is-speaking .social-avatar,
:root[data-theme="neon-voice"] .social-avatar.speaking {
  box-shadow:
    0 0 0 3px rgba(62, 232, 242, 0.16),
    0 0 28px rgba(49, 215, 197, 0.22);
  transform: translateY(-1px);
}

:root[data-theme="neon-voice"] :where(.home-server-badge, .news-tag-v18, .voice-live-dot, .message-reaction, .reaction-button, .server-pill-v10, .role-pill) {
  color: var(--neon-voice-soft);
  border-color: rgba(62, 232, 242, 0.2);
  background: rgba(62, 232, 242, 0.09);
  box-shadow: inset 0 1px 0 rgba(220, 252, 255, 0.08);
}

:root[data-theme="neon-voice"] ::selection {
  color: #03121b;
  background: rgba(62, 232, 242, 0.72);
}

:root[data-theme="neon-voice"] * {
  scrollbar-color: rgba(62, 232, 242, 0.42) rgba(5, 15, 27, 0.72);
  scrollbar-width: thin;
}

:root[data-theme="neon-voice"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

:root[data-theme="neon-voice"] ::-webkit-scrollbar-track {
  background: rgba(5, 15, 27, 0.72);
}

:root[data-theme="neon-voice"] ::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 15, 27, 0.72);
  background: linear-gradient(180deg, rgba(62, 232, 242, 0.46), rgba(49, 215, 197, 0.34));
}

@media (prefers-reduced-motion: no-preference) {
  :root[data-theme="neon-voice"] .chat-composer-v20 .chat-audio-record-v21.is-recording,
  :root[data-theme="neon-voice"] .voice-room-page.v12-call-page .video-voice-tile.is-speaking .social-avatar,
  :root[data-theme="neon-voice"] .social-avatar.speaking {
    animation: neonVoicePulse 1800ms ease-in-out infinite;
  }
}

@keyframes neonVoicePulse {
  0%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  50% {
    opacity: 0.94;
    transform: translateY(-1px) scale(1.012);
  }
}

@media (max-width: 1180px) {
  .app-bg:has(:where([data-emoji-picker]:not([hidden]), [data-sticker-picker]:not([hidden]))) > [data-app-dynamic],
  .simple-discord-shell:has(:where([data-emoji-picker]:not([hidden]), [data-sticker-picker]:not([hidden]))),
  .simple-discord-shell:has(:where([data-emoji-picker]:not([hidden]), [data-sticker-picker]:not([hidden]))) .simple-main,
  .simple-discord-shell:has(:where([data-emoji-picker]:not([hidden]), [data-sticker-picker]:not([hidden]))) .simple-content,
  .simple-discord-shell:has(:where([data-emoji-picker]:not([hidden]), [data-sticker-picker]:not([hidden]))) .simple-text-view .simple-composer,
  .simple-discord-shell:has(:where([data-emoji-picker]:not([hidden]), [data-sticker-picker]:not([hidden]))) :where(.direct-inbox-page, .direct-inbox-thread, .direct-chat-page, .direct-message-form) {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    contain: none !important;
    filter: none !important;
    transform: none !important;
    will-change: auto !important;
    zoom: normal !important;
  }

  :root :where(.emoji-picker-v20, .sticker-picker-v20) {
    position: fixed !important;
    left: max(12px, env(safe-area-inset-left)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    top: auto !important;
    bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(440px, 58dvh) !important;
    z-index: 9100 !important;
  }
}

/* Desktop game mode keeps TaksaCord cheap while a game is running. */
:root[data-performance="game"] {
  --tc-glass-blur: none;
  --tc-shadow-soft: none;
  --tc-shadow-strong: none;
  --shadow: none;
  --shadow-strong: none;
  --panel-shadow: none;
  --glass-shadow: none;
}

:root[data-performance="game"] *,
:root[data-performance="game"] *::before,
:root[data-performance="game"] *::after {
  animation: none !important;
  transition-duration: 1ms !important;
  scroll-behavior: auto !important;
  will-change: auto !important;
}

:root[data-performance="game"] :where(.animated-bg, .app-bg) {
  background:
    linear-gradient(145deg, var(--tc-bg-base, var(--bg)), var(--tc-bg-soft, var(--bg-2))) !important;
}

:root[data-performance="game"] :where(
  .animated-bg::before,
  .animated-bg::after,
  .ambient-cloud,
  .my-page-hero::before,
  .my-page-hero::after,
  .home-pro-banner::before,
  .profile-cover-crop-grid
) {
  display: none !important;
}

:root[data-performance="game"] :where(*, *::before, *::after) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}

:root[data-performance="game"] :where(
  .glass,
  .auth-panel,
  .discord-shell,
  .settings-modal,
  .modal-backdrop,
  .ui-panel,
  .ui-card,
  .glass-card,
  .simple-sidebar,
  .simple-main,
  .simple-members,
  .main-panel,
  .members-panel,
  .home-card,
  .home-panel,
  .home-action-card,
  .server-mini-card,
  .server-feature-grid-v16 article,
  .server-news-panel-v16,
  .server-about-v16,
  .server-aside-card-v16,
  .server-news-card-v18,
  .server-empty-news,
  .my-page-hero,
  .my-page-composer,
  .my-page-post,
  .my-page-side-card,
  .my-page-empty,
  .profile-modal,
  .profile-friends-modal,
  .profile-photos-modal,
  .profile-comments-drawer,
  .notifications-drawer-v19,
  .news-drawer-v18,
  .news-create-modal-v18,
  .direct-inbox-list,
  .direct-inbox-page,
  .direct-chat-panel,
  .direct-chat-hero,
  .direct-conversation-row,
  .teammate-card,
  .teammate-self-card,
  .teammate-requests,
  .settings-card,
  .settings-workspace,
  .settings-nav-panel,
  .desktop-update-banner,
  .user-game-activity
) {
  box-shadow: none !important;
}

:root[data-performance="game"] :where(.tc-render-motion, .tc-motion-shell) {
  transform: none !important;
}
