:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #10141c;
  --panel-2: #0d1118;
  --panel-3: #151a23;
  --line: rgba(177, 190, 214, 0.11);
  --line-strong: rgba(177, 190, 214, 0.18);
  --text: #f4f7fb;
  --muted: #9aa4b7;
  --dim: #687286;
  --green: #66e36a;
  --green-soft: rgba(102, 227, 106, 0.16);
  --red: #ff5975;
  --gold: #ffbd55;
  --blue: #55a7ff;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.32);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 42% 0%, var(--green-soft), transparent 34rem),
    linear-gradient(130deg, var(--bg) 0%, var(--panel-2) 42%, #080a0f 100%);
  overflow: hidden;
}

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

button {
  color: inherit;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.role-hidden {
  display: none !important;
}

body[data-theme="amoled"] {
  --bg: #030406;
  --panel: #07090d;
  --panel-2: #05070a;
  --panel-3: #0a0d12;
}

body[data-accent="blue"] {
  --green: #55a7ff;
  --green-soft: rgba(85, 167, 255, 0.16);
}

body[data-accent="red"] {
  --green: #ff5975;
  --green-soft: rgba(255, 89, 117, 0.16);
}

body[data-accent="gold"] {
  --green: #ffbd55;
  --green-soft: rgba(255, 189, 85, 0.16);
}

body[data-app-skin="cyberpunk"] {
  --bg: #060710;
  --panel: #111024;
  --panel-2: #0a0c1b;
  --green: #00f5ff;
  --green-soft: rgba(0, 245, 255, 0.15);
  --blue: #ff3df2;
}

body[data-app-skin="anime"] {
  --panel: #151322;
  --panel-2: #111221;
  --green: #ff8bd8;
  --green-soft: rgba(255, 139, 216, 0.16);
  --blue: #8bc8ff;
}

body[data-app-skin="horror"] {
  --bg: #080304;
  --panel: #120608;
  --panel-2: #0a0506;
  --green: #ff3659;
  --green-soft: rgba(255, 54, 89, 0.15);
  --muted: #b28b94;
}

body[data-app-skin="fps"] {
  --panel: #0b1112;
  --panel-2: #070d0e;
  --green: #a8ff3e;
  --green-soft: rgba(168, 255, 62, 0.13);
}

body[data-app-skin="minecraft"] {
  --panel: #10180f;
  --panel-2: #0b110a;
  --green: #69c843;
  --green-soft: rgba(105, 200, 67, 0.18);
  --gold: #c59b56;
}

body[data-app-skin="tactical"] {
  --bg: #060807;
  --panel: #0d1411;
  --panel-2: #070c0a;
  --green: #d7ff6a;
  --green-soft: rgba(215, 255, 106, 0.13);
  --muted: #a4ad9b;
}

body[data-app-skin="battle-royale"] {
  --bg: #071019;
  --panel: #111528;
  --panel-2: #080d19;
  --green: #5cf3ff;
  --green-soft: rgba(92, 243, 255, 0.15);
  --gold: #ffe066;
}

body[data-app-skin="open-world"] {
  --bg: #090915;
  --panel: #121123;
  --panel-2: #0d0b18;
  --green: #ff4fa3;
  --green-soft: rgba(255, 79, 163, 0.15);
  --blue: #58d7ff;
}

body[data-app-skin="retro-arcade"] {
  --bg: #07030c;
  --panel: #151020;
  --panel-2: #0d0815;
  --green: #32ff9a;
  --green-soft: rgba(50, 255, 154, 0.15);
  --blue: #ff5cff;
}

body[data-app-skin="space"] {
  --bg: #050914;
  --panel: #0d1424;
  --panel-2: #070c17;
  --green: #8edbff;
  --green-soft: rgba(142, 219, 255, 0.14);
  --blue: #b58cff;
}

body[data-app-skin="streamer"] {
  --bg: #0a0711;
  --panel: #15101f;
  --panel-2: #0e0a17;
  --green: #9c7dff;
  --green-soft: rgba(156, 125, 255, 0.16);
  --red: #ff6a88;
}

body[data-app-skin="racing"] {
  --panel: #0b0f18;
  --panel-2: #080b12;
  --green: #ff2f6d;
  --green-soft: rgba(255, 47, 109, 0.15);
  --blue: #3ff8ff;
}

body[data-app-skin="fantasy"] {
  --panel: #10131f;
  --panel-2: #0c0f18;
  --green: #b58cff;
  --green-soft: rgba(181, 140, 255, 0.16);
  --gold: #ffd36a;
}

body[data-app-skin="classic"] {
  background: #070a0f;
}

body[data-app-skin="classic"] .app-shell,
body[data-app-skin="classic"] .settings-shell,
body[data-app-skin="classic"] .server-modal,
body[data-app-skin="classic"] .speaker-overlay {
  backdrop-filter: none;
}

body[data-app-skin="classic"] .settings-card,
body[data-app-skin="classic"] .hub-panel,
body[data-app-skin="classic"] .video-tile {
  box-shadow: none;
}

body[data-theme="dark"] {
  --bg: #080b10;
  --panel: #10141c;
  --panel-2: #0d1118;
  --panel-3: #151a23;
  --line: rgba(177, 190, 214, 0.11);
  --line-strong: rgba(177, 190, 214, 0.18);
  --text: #f4f7fb;
  --muted: #9aa4b7;
  --dim: #687286;
  background:
    radial-gradient(circle at 42% 0%, var(--green-soft), transparent 34rem),
    linear-gradient(130deg, var(--bg) 0%, var(--panel-2) 42%, #080a0f 100%);
}

body[data-theme="amoled"] {
  --bg: #020304;
  --panel: #07090d;
  --panel-2: #030406;
  --panel-3: #0a0d12;
  --line: rgba(201, 214, 235, 0.08);
  --line-strong: rgba(201, 214, 235, 0.14);
  --text: #f7f9fc;
  --muted: #8e99ab;
  --dim: #596273;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.68);
  background: #000;
}

body[data-theme="midnight"] {
  --bg: #050b18;
  --panel: #0c1628;
  --panel-2: #071020;
  --panel-3: #122039;
  --line: rgba(143, 185, 255, 0.13);
  --line-strong: rgba(143, 185, 255, 0.22);
  --text: #f1f6ff;
  --muted: #9fb1ca;
  --dim: #677a98;
  --blue: #6db4ff;
  background:
    radial-gradient(circle at 18% 12%, rgba(85, 167, 255, 0.18), transparent 28rem),
    linear-gradient(135deg, #040915 0%, #08162d 52%, #05070d 100%);
}

body[data-theme="nebula"] {
  --bg: #080613;
  --panel: #141023;
  --panel-2: #0e0a1c;
  --panel-3: #20172e;
  --line: rgba(194, 151, 255, 0.14);
  --line-strong: rgba(194, 151, 255, 0.24);
  --text: #faf7ff;
  --muted: #b3a4ca;
  --dim: #77698c;
  --blue: #b58cff;
  background:
    radial-gradient(circle at 78% 8%, rgba(181, 140, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 15% 70%, rgba(255, 79, 163, 0.12), transparent 22rem),
    linear-gradient(135deg, #070512 0%, #161027 58%, #08050d 100%);
}

body[data-theme="ocean"] {
  --bg: #031014;
  --panel: #0a1b21;
  --panel-2: #06151a;
  --panel-3: #0f2a32;
  --line: rgba(92, 243, 255, 0.13);
  --line-strong: rgba(92, 243, 255, 0.22);
  --text: #edfbff;
  --muted: #98b9c0;
  --dim: #5c7880;
  --blue: #5cf3ff;
  background:
    radial-gradient(circle at 20% 20%, rgba(92, 243, 255, 0.16), transparent 28rem),
    linear-gradient(135deg, #02090c 0%, #08222b 55%, #031014 100%);
}

body[data-theme="forest"] {
  --bg: #07100a;
  --panel: #0f1b13;
  --panel-2: #08120b;
  --panel-3: #17271b;
  --line: rgba(152, 213, 134, 0.13);
  --line-strong: rgba(152, 213, 134, 0.22);
  --text: #f2fbef;
  --muted: #a5b99f;
  --dim: #667960;
  --gold: #d7c074;
  background:
    radial-gradient(circle at 72% 12%, rgba(105, 200, 67, 0.14), transparent 28rem),
    linear-gradient(135deg, #040905 0%, #102015 55%, #07100a 100%);
}

body[data-theme="crimson"] {
  --bg: #100407;
  --panel: #1d0b10;
  --panel-2: #120609;
  --panel-3: #2a1117;
  --line: rgba(255, 89, 117, 0.14);
  --line-strong: rgba(255, 89, 117, 0.24);
  --text: #fff5f7;
  --muted: #c79ca5;
  --dim: #88606a;
  --red: #ff5975;
  background:
    radial-gradient(circle at 76% 10%, rgba(255, 89, 117, 0.18), transparent 29rem),
    linear-gradient(135deg, #090204 0%, #230a11 54%, #080305 100%);
}

body[data-theme="solar"] {
  --bg: #100c04;
  --panel: #1d1609;
  --panel-2: #130e05;
  --panel-3: #2a200e;
  --line: rgba(255, 189, 85, 0.15);
  --line-strong: rgba(255, 189, 85, 0.26);
  --text: #fff9ec;
  --muted: #c9b78f;
  --dim: #827457;
  --gold: #ffbd55;
  background:
    radial-gradient(circle at 26% 4%, rgba(255, 189, 85, 0.18), transparent 28rem),
    linear-gradient(135deg, #080602 0%, #211707 54%, #0d0903 100%);
}

body[data-theme="graphite"] {
  --bg: #080909;
  --panel: #141616;
  --panel-2: #0d0f0f;
  --panel-3: #1c2020;
  --line: rgba(217, 226, 232, 0.1);
  --line-strong: rgba(217, 226, 232, 0.18);
  --text: #f2f5f6;
  --muted: #9aa2a7;
  --dim: #686f74;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.44);
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 226, 232, 0.08), transparent 28rem),
    linear-gradient(135deg, #070808 0%, #171b1b 52%, #090a0a 100%);
}

body[data-theme="arctic"] {
  --bg: #061015;
  --panel: #0d1a21;
  --panel-2: #07131a;
  --panel-3: #142530;
  --line: rgba(190, 230, 255, 0.15);
  --line-strong: rgba(190, 230, 255, 0.25);
  --text: #f4fbff;
  --muted: #a6bdc9;
  --dim: #6a818d;
  --blue: #bee6ff;
  background:
    radial-gradient(circle at 18% 8%, rgba(190, 230, 255, 0.17), transparent 30rem),
    linear-gradient(135deg, #041015 0%, #0d2330 55%, #061015 100%);
}

body[data-accent="green"] {
  --green: #66e36a;
  --green-soft: rgba(102, 227, 106, 0.16);
}

body[data-accent="blue"] {
  --green: #55a7ff;
  --green-soft: rgba(85, 167, 255, 0.16);
}

body[data-accent="red"] {
  --green: #ff5975;
  --green-soft: rgba(255, 89, 117, 0.16);
}

body[data-accent="gold"] {
  --green: #ffbd55;
  --green-soft: rgba(255, 189, 85, 0.16);
}

body[data-theme] :is(
  .app-shell,
  .titlebar,
  .rail,
  .channels-panel,
  .main-panel,
  .info-panel,
  .settings-shell,
  .settings-nav,
  .settings-card,
  .hub-panel,
  .server-modal,
  .message,
  .participant,
  .social-row,
  .live-card,
  .channel-button,
  .control-button,
  .talk-pad,
  .invite-button,
  .small-action,
  .settings-input,
  .settings-select,
  .settings-textarea
) {
  transition:
    background 180ms ease,
    border-color 180ms ease,
    border-radius 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

body[data-theme="amoled"] :is(
  .app-shell,
  .titlebar,
  .rail,
  .channels-panel,
  .main-panel,
  .info-panel,
  .settings-shell,
  .settings-card,
  .hub-panel,
  .server-modal,
  .message,
  .participant,
  .social-row,
  .live-card,
  .channel-button,
  .control-button,
  .talk-pad,
  .invite-button,
  .small-action,
  .settings-input,
  .settings-select,
  .settings-textarea
) {
  border-radius: 3px;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-theme="amoled"] :is(.settings-card, .hub-panel, .message, .participant, .social-row, .live-card) {
  background: rgba(255, 255, 255, 0.018);
}

body[data-theme="midnight"] :is(.app-shell, .settings-shell) {
  background:
    linear-gradient(180deg, rgba(8, 22, 45, 0.92), rgba(4, 9, 21, 0.96)),
    var(--bg);
}

body[data-theme="midnight"] :is(.settings-card, .hub-panel, .server-modal, .message, .participant, .social-row, .live-card) {
  border-radius: 12px;
  background: rgba(12, 22, 40, 0.72);
  box-shadow: 0 16px 60px rgba(0, 18, 48, 0.28);
}

body[data-theme="midnight"] .rail {
  background: linear-gradient(180deg, rgba(7, 16, 32, 0.98), rgba(5, 10, 20, 0.96));
}

body[data-theme="nebula"] :is(.settings-card, .hub-panel, .server-modal, .message, .participant, .social-row, .live-card) {
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(181, 140, 255, 0.08), rgba(255, 79, 163, 0.035)),
    rgba(14, 10, 28, 0.76);
  box-shadow: 0 18px 70px rgba(105, 66, 170, 0.22);
}

body[data-theme="nebula"] :is(.channel-button, .control-button, .small-action, .invite-button) {
  border-radius: 999px;
}

body[data-theme="nebula"] .main-panel {
  background:
    radial-gradient(circle at 84% 8%, rgba(181, 140, 255, 0.12), transparent 28rem),
    rgba(9, 7, 18, 0.72);
}

body[data-theme="ocean"] :is(.settings-card, .hub-panel, .server-modal, .message, .participant, .social-row, .live-card) {
  border-radius: 14px;
  background: rgba(8, 33, 42, 0.7);
  border-color: rgba(92, 243, 255, 0.2);
}

body[data-theme="ocean"] :is(.channels-panel, .info-panel, .settings-nav) {
  background: rgba(4, 18, 24, 0.88);
}

body[data-theme="ocean"] .channel-button.active {
  box-shadow: inset 3px 0 0 var(--green);
}

body[data-theme="forest"] :is(.settings-card, .hub-panel, .server-modal, .message, .participant, .social-row, .live-card) {
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(105, 200, 67, 0.04), transparent),
    rgba(12, 24, 14, 0.78);
  border-color: rgba(152, 213, 134, 0.18);
}

body[data-theme="forest"] :is(.channel-button, .control-button, .small-action, .invite-button) {
  border-radius: 6px;
}

body[data-theme="forest"] .section-title {
  color: #c8d8b9;
}

body[data-theme="crimson"] :is(.settings-card, .hub-panel, .server-modal, .message, .participant, .social-row, .live-card) {
  border-radius: 2px;
  background: rgba(34, 8, 14, 0.78);
  border-left: 3px solid rgba(255, 89, 117, 0.34);
}

body[data-theme="crimson"] :is(.titlebar, .room-header, .settings-header) {
  border-bottom-color: rgba(255, 89, 117, 0.28);
}

body[data-theme="crimson"] .channel-button.active {
  background: linear-gradient(90deg, rgba(255, 89, 117, 0.18), rgba(255, 89, 117, 0.04));
}

body[data-theme="solar"] :is(.settings-card, .hub-panel, .server-modal, .message, .participant, .social-row, .live-card) {
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 189, 85, 0.07), rgba(255, 189, 85, 0.025)),
    rgba(29, 22, 9, 0.78);
  border-color: rgba(255, 189, 85, 0.24);
}

body[data-theme="solar"] :is(.settings-subtitle, .section-title, .group-title) {
  color: #ffe0a2;
}

body[data-theme="solar"] .invite-button {
  background: linear-gradient(135deg, var(--green), #ffd36a);
}

body[data-theme="graphite"] :is(
  .app-shell,
  .settings-shell,
  .settings-card,
  .hub-panel,
  .server-modal,
  .message,
  .participant,
  .social-row,
  .live-card
) {
  border-radius: 0;
  box-shadow: none;
  background: rgba(14, 16, 16, 0.9);
}

body[data-theme="graphite"] :is(.channel-button, .control-button, .small-action, .invite-button, .settings-input, .settings-select, .settings-textarea) {
  border-radius: 2px;
}

body[data-theme="graphite"] :is(.settings-panels, .hub-view) {
  padding-top: 18px;
}

body[data-theme="graphite"] .voice-controls {
  min-height: 118px;
}

body[data-theme="arctic"] :is(.settings-card, .hub-panel, .server-modal, .message, .participant, .social-row, .live-card) {
  border-radius: 16px;
  background: rgba(13, 26, 33, 0.58);
  border-color: rgba(190, 230, 255, 0.22);
  backdrop-filter: blur(20px);
}

body[data-theme="arctic"] :is(.titlebar, .settings-overlay, .speaker-overlay) {
  backdrop-filter: blur(26px);
}

body[data-theme="arctic"] :is(.settings-input, .settings-select, .settings-textarea) {
  border-radius: 12px;
  background: rgba(7, 19, 26, 0.72);
}

body[data-app-skin="cyberpunk"] .app-shell {
  background:
    linear-gradient(90deg, rgba(0, 245, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 61, 242, 0.04) 1px, transparent 1px),
    rgba(8, 11, 22, 0.86);
  background-size: 38px 38px;
}

body[data-app-skin="anime"] .settings-card,
body[data-app-skin="anime"] .hub-panel,
body[data-app-skin="anime"] .channel-button.active {
  border-color: rgba(255, 139, 216, 0.34);
}

body[data-app-skin="horror"] .message,
body[data-app-skin="horror"] .participant,
body[data-app-skin="horror"] .settings-card {
  background: rgba(38, 6, 10, 0.38);
}

body[data-app-skin="fps"] .room-header,
body[data-app-skin="tactical"] .room-header {
  border-bottom-color: rgba(215, 255, 106, 0.28);
}

body[data-app-skin="minecraft"] .settings-card,
body[data-app-skin="minecraft"] .channel-button,
body[data-app-skin="minecraft"] .control-button {
  border-radius: 4px;
}

body[data-app-skin="battle-royale"] .invite-button,
body[data-app-skin="open-world"] .invite-button,
body[data-app-skin="racing"] .invite-button {
  box-shadow: 0 0 0 1px rgba(92, 243, 255, 0.16);
}

body[data-app-skin="retro-arcade"] .section-title,
body[data-app-skin="space"] .section-title,
body[data-app-skin="fantasy"] .section-title {
  color: var(--green);
}

body[data-app-skin="streamer"] .live-card.is-live {
  border-color: rgba(156, 125, 255, 0.42);
}

body.compact-mode .rail-item {
  min-height: 72px;
}

body.compact-mode .participant {
  min-height: 54px;
}

body.compact-mode .voice-controls {
  min-height: 126px;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
}

body[data-graphics-quality="low"] .topbar,
body[data-graphics-quality="low"] .settings-overlay {
  backdrop-filter: none;
}

body[data-graphics-quality="low"] .video-tile,
body[data-graphics-quality="low"] .settings-card,
body[data-graphics-quality="low"] .hub-panel {
  box-shadow: none;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 80px minmax(0, 1fr);
  background: rgba(8, 11, 16, 0.78);
  overflow: hidden;
}

.app-shell.auth-locked {
  display: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 207, 255, 0.11), transparent 32%),
    radial-gradient(circle at 70% 58%, rgba(143, 64, 255, 0.14), transparent 34%),
    #04070b;
}

.auth-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.auth-logo {
  width: min(310px, 100%);
  height: 96px;
  object-fit: contain;
  justify-self: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-tabs button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #aeb8c8;
  cursor: pointer;
}

.auth-tabs button.active {
  color: #fff;
  border-color: rgba(102, 227, 106, 0.52);
  background: rgba(102, 227, 106, 0.1);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: #8d98ab;
  font-size: 12px;
  font-weight: 800;
}

.auth-form input {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.78);
  color: #fff;
  padding: 0 14px;
  outline: 0;
}

.auth-error {
  min-height: 18px;
  margin: 0;
  color: #ff738a;
  font-size: 13px;
}

.auth-error a {
  color: #66e36a;
  font-weight: 800;
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 16, 0.82);
  backdrop-filter: blur(18px);
  -webkit-app-region: drag;
}

.brand-lockup,
.window-actions,
.room-identity,
.room-actions,
.server-summary,
.invite-row,
.profile-chip,
.room-title-row {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 14px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: min(230px, 30vw);
  height: 54px;
  object-fit: contain;
}

.brand-mark,
.server-emblem,
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark {
  width: 33px;
  height: 33px;
}

.brand-mark svg,
.server-emblem svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  color: #dce5f5;
  opacity: 0.96;
}

.window-actions {
  gap: 8px;
  color: #aab3c3;
}

.divider {
  width: 1px;
  height: 28px;
  background: var(--line-strong);
}

.icon-button,
.window-button,
.mini-gear {
  -webkit-app-region: no-drag;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aeb7c9;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.icon-button:hover,
.window-button:hover,
.mini-gear:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.icon-button svg,
.rail-item svg,
.control-button svg,
.talk-pad svg,
.send-button svg,
.mini-gear svg,
.invite-button svg,
.folder-title svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.icon-button.compact {
  width: 30px;
  height: 30px;
  font-size: 24px;
}

.icon-button.boxed {
  width: 58px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.window-button {
  width: 42px;
  min-width: 42px;
  height: 38px;
  padding: 0;
  color: #7d8799;
  font-size: 19px;
  line-height: 1;
  justify-content: center;
}

.window-button[title="Minimizza"] {
  padding-bottom: 3px;
}

.window-button[title="Chiudi"] {
  font-size: 24px;
}

.window-button[title="Chiudi"]:hover {
  background: rgba(255, 89, 117, 0.18);
  color: #fff;
}

.workspace {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 132px 344px minmax(480px, 1fr) 316px;
  overflow: hidden;
}

.workspace.focus-view {
  grid-template-columns: 132px minmax(0, 1fr);
}

.workspace.focus-view .channels-panel,
.workspace.focus-view .info-panel {
  display: none;
}

.workspace.focus-view .main-panel {
  border-right: 0;
}

.workspace.hub-focus-view {
  grid-template-columns: 132px minmax(0, 1fr) 316px;
}

.workspace.hub-focus-view .channels-panel {
  display: none;
}

.workspace.hub-focus-view .info-panel {
  display: block;
}

.workspace.hub-focus-view .main-panel {
  border-right: 1px solid var(--line);
}

.rail,
.channels-panel,
.main-panel,
.info-panel {
  min-height: 0;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.rail {
  display: flex;
  flex-direction: column;
  background: rgba(10, 14, 21, 0.72);
  padding: 20px 0 8px;
}

.rail-item {
  position: relative;
  min-height: 88px;
  border: 0;
  background: transparent;
  color: #a5aec0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  cursor: pointer;
}

.rail-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 8px 8px 0;
  background: transparent;
}

.rail-item.active {
  color: white;
}

.rail-item.active::before {
  background: var(--green);
  box-shadow: 0 0 18px rgba(102, 227, 106, 0.42);
}

.rail-item b {
  font-size: 14px;
  font-weight: 600;
}

.profile-chip {
  gap: 10px;
  margin-top: auto;
  min-height: 68px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.profile-chip > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.profile-chip strong,
.profile-chip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip strong {
  font-size: 14px;
}

.profile-chip span {
  color: var(--green);
  font-size: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: white;
  font-weight: 800;
  background:
    linear-gradient(145deg, rgba(102, 227, 106, 0.14), rgba(85, 167, 255, 0.08)),
    #171c25;
  position: relative;
}

.avatar.small {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.avatar.has-image,
.server-emblem.has-image {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.avatar::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #0b0f16;
  border-radius: 50%;
  background: var(--green);
}

.mini-gear {
  width: 26px;
  height: 26px;
  padding: 0;
}

.mini-gear svg {
  width: 16px;
  height: 16px;
}

.channels-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 24px 14px 0;
  background: rgba(12, 16, 24, 0.82);
}

.panel-heading {
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a7b0c1;
  font-size: 12px;
  font-weight: 700;
}

.community-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

.server-switcher {
  width: calc(100% - 24px);
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 12px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.server-switcher:hover {
  border-color: rgba(102, 227, 106, 0.42);
  background: rgba(102, 227, 106, 0.075);
}

.server-switcher strong,
.server-switcher span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-switcher span:not(.verified-dot):not(.chevron) {
  margin-top: 4px;
  color: #9ba5b8;
  font-size: 12px;
}

.channel-heading {
  padding-top: 10px;
}

.channel-heading small {
  color: #687286;
  font-size: 11px;
  font-weight: 700;
}

.community-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 2px;
}

.server-picker-list {
  max-height: min(58vh, 520px);
}

.community-switch {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.community-switch.active {
  border-color: rgba(102, 227, 106, 0.42);
  background: rgba(102, 227, 106, 0.08);
}

.server-emblem {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #e1e8f6;
}

.server-emblem.small {
  width: 52px;
  height: 52px;
}

.community-card strong,
.community-card span {
  display: block;
}

.community-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.community-card span:not(.verified-dot) {
  margin-top: 4px;
  color: #9ba5b8;
  font-size: 12px;
}

.verified-dot {
  color: #d7dfef;
  font-weight: 800;
}

.chevron {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #8c96a8;
  cursor: pointer;
}

.channel-tree {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 0 10px;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.channel-section {
  margin: 12px 0 4px;
}

.section-title,
.folder-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #9ea8ba;
  font-size: 12px;
  font-weight: 800;
}

.section-title span,
.folder-title span:first-child {
  width: 16px;
  color: #778296;
  text-align: center;
}

.folder-title svg {
  width: 17px;
  height: 17px;
}

.channel-list {
  margin: 0;
  padding: 0 0 0 10px;
  list-style: none;
  border-left: 1px solid rgba(177, 190, 214, 0.1);
}

.channel-button {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ea8bb;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.channel-button:hover {
  color: #eef3ff;
  background: rgba(255, 255, 255, 0.035);
}

[data-copy-id] {
  user-select: none;
}

.channel-button.active {
  color: var(--green);
  background: rgba(255, 255, 255, 0.055);
}

.channel-button.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 3px;
  bottom: 3px;
  width: 2px;
  border-radius: 2px;
  background: var(--green);
}

.channel-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.channel-button span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-count {
  color: #aeb7c9;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.create-channel {
  height: 46px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: #9ea8ba;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.create-channel:hover {
  color: white;
}

.main-panel {
  display: grid;
  grid-template-rows: 104px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(17, 22, 32, 0.74), rgba(8, 11, 16, 0.72)),
    rgba(10, 14, 20, 0.88);
}

.room-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.room-identity {
  min-width: 0;
  gap: 16px;
}

.room-identity > div:last-child {
  min-width: 0;
}

.room-title-row {
  gap: 10px;
}

.room-title-row h1 {
  margin: 0;
  overflow: hidden;
  color: white;
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-title-row svg {
  width: 20px;
  height: 20px;
  color: #d2d9e8;
}

.room-identity p {
  margin: 8px 0 0;
  color: #8d97a9;
  font-size: 14px;
}

.room-actions {
  gap: 16px;
  min-width: max-content;
}

.quality-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c2cad8;
  font-size: 13px;
}

.quality-pill strong {
  color: var(--green);
  font-weight: 800;
}

.bars {
  width: 16px;
  height: 18px;
  display: inline-grid;
  grid-template-columns: repeat(3, 3px);
  gap: 2px;
  align-items: end;
}

.bars i {
  display: block;
  border-radius: 2px;
  background: var(--green);
}

.bars i:nth-child(1) {
  height: 6px;
}

.bars i:nth-child(2) {
  height: 11px;
}

.bars i:nth-child(3) {
  height: 16px;
}

.voice-view,
.chat-view {
  min-height: 0;
  display: grid;
}

.voice-view {
  grid-template-rows: auto minmax(0, 1fr) 160px;
}

.empty-community-view {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.empty-community-view > div {
  width: min(520px, 100%);
}

.empty-community-view span {
  color: #7f8a9e;
  font-size: 11px;
  font-weight: 800;
}

.empty-community-view h2 {
  margin: 8px 0;
  font-size: 28px;
}

.empty-community-view p {
  margin: 0 0 18px;
  color: #9aa4b7;
  line-height: 1.5;
}

.voice-media-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 18px 28px 0;
}

.video-tile {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #030507;
}

.video-tile:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #000;
}

.video-tile video {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: block;
  object-fit: cover;
}

.video-tile span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-tile-action {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.56);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 160ms ease,
    background 160ms ease;
}

.video-tile:hover .media-tile-action,
.video-tile:focus-within .media-tile-action {
  opacity: 1;
}

.media-tile-action:hover {
  background: rgba(102, 227, 106, 0.24);
}

.media-tile-close {
  right: 52px;
}

.media-tile-close:hover {
  background: rgba(255, 89, 117, 0.28);
}

.media-tile-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.voice-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 28px;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.roster-group {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.roster-group + .roster-group {
  margin-top: 20px;
}

.roster-group:last-child {
  border-bottom: 0;
}

.group-title {
  margin: 0 0 14px;
  color: #aab3c2;
  font-size: 13px;
  font-weight: 800;
}

.participant {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(130px, 170px) minmax(150px, 190px) 28px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 6px 0;
}

.participant .avatar {
  width: 42px;
  height: 42px;
}

.participant-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.participant-name strong {
  overflow: hidden;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crown {
  color: var(--gold);
  font-size: 13px;
}

.participant-state {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 13px;
}

.participant-state.idle {
  color: #a6afc0;
}

.voice-meter {
  display: grid;
  grid-template-columns: 24px minmax(80px, 1fr);
  gap: 10px;
  align-items: center;
}

.voice-meter svg {
  width: 21px;
  height: 21px;
  color: var(--green);
  stroke: currentColor;
  fill: none;
}

.participant.idle .voice-meter svg {
  color: #808a9d;
}

.meter-track {
  height: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(149, 160, 181, 0.12);
}

.meter-fill {
  width: 56%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #9cf266);
  transition: width 160ms ease;
}

.participant.idle .meter-fill {
  width: 18%;
  background: #747e91;
}

.participant-volume {
  display: grid;
  grid-template-columns: 22px minmax(76px, 1fr) 44px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #b9c3d4;
  font-size: 12px;
}

.participant-volume.self {
  opacity: 1;
}

.participant-volume svg {
  width: 20px;
  height: 20px;
  color: var(--green);
  stroke: currentColor;
  fill: none;
}

.participant-volume input {
  width: 100%;
  min-width: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.participant-volume input:disabled {
  cursor: default;
}

.participant-volume b {
  min-width: 40px;
  color: #edf3ff;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.participant-menu {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a94a7;
  cursor: pointer;
}

.participant-menu:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.empty-room {
  min-height: 24px;
  display: grid;
  align-items: center;
  color: #7e899b;
  font-size: 13px;
}

.voice-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 34px;
  min-height: 160px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  background: rgba(10, 13, 19, 0.76);
}

.talk-pad,
.control-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.talk-pad {
  width: 98px;
  height: 126px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid rgba(102, 227, 106, 0.78);
  border-radius: 8px;
  color: white;
  background: rgba(102, 227, 106, 0.05);
  box-shadow: inset 0 0 22px rgba(102, 227, 106, 0.05);
}

.talk-pad svg {
  width: 44px;
  height: 44px;
  color: var(--green);
}

.talk-pad strong {
  font-size: 11px;
}

.talk-pad.active {
  background: rgba(102, 227, 106, 0.18);
  box-shadow: 0 0 28px rgba(102, 227, 106, 0.18);
}

.control-button {
  width: 92px;
  min-width: 92px;
  min-height: 88px;
  color: #b8c1d0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border-radius: 8px;
}

.control-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.04);
}

.control-button svg {
  width: 34px;
  height: 34px;
}

.control-button b {
  width: 100%;
  max-width: 112px;
  min-height: 30px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.control-button.active {
  color: var(--green);
  background: rgba(102, 227, 106, 0.08);
}

.control-button.danger {
  color: #ff738a;
}

.control-button.danger:hover {
  background: rgba(255, 89, 117, 0.08);
}

.control-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.volume-control {
  width: 132px;
  min-height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #b8c1d0;
  border-radius: 8px;
}

.volume-control svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.volume-control input {
  width: 108px;
  accent-color: var(--green);
}

.volume-control b {
  min-height: 16px;
  color: #d6deeb;
  font-size: 12px;
  font-weight: 700;
}

.volume-control:has(input:disabled) {
  opacity: 0.38;
}

.chat-view {
  grid-template-rows: minmax(0, 1fr) auto;
}

.chat-view.hidden,
.voice-view.hidden {
  display: none;
}

.message-list {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px;
}

.message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
}

.message-content {
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.message-delete {
  margin-left: auto;
  border: 1px solid rgba(255, 89, 117, 0.28);
  border-radius: 6px;
  color: #ff8ca0;
  background: rgba(255, 89, 117, 0.08);
  font-size: 11px;
  cursor: pointer;
}

.message-meta strong {
  color: #ffffff;
}

.message-meta time {
  color: #738096;
  font-size: 12px;
}

.message p {
  margin: 0;
  color: #ccd4e2;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.message-inline-media-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.message-inline-media {
  display: block;
  max-width: min(420px, 100%);
  max-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.22);
}

.message-embeds {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.message-role-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.message-role-action {
  --role-color: #64e66d;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--role-color) 42%, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  color: #e9f1fb;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  font-weight: 800;
}

.message-role-action span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--role-color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--role-color) 62%, transparent);
}

.message-role-action.selected {
  color: #ffffff;
  background: color-mix(in srgb, var(--role-color) 22%, rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--role-color) 36%, transparent);
}

.message-embed {
  --embed-color: #64e66d;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 14px;
  max-width: min(560px, 100%);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--embed-color);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(28, 34, 47, 0.96), rgba(20, 25, 36, 0.98));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.embed-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.embed-head {
  display: grid;
  gap: 6px;
}

.embed-head span,
.message-embed footer {
  color: #a9b4c8;
  font-size: 12px;
  font-weight: 800;
}

.embed-head a,
.embed-head strong {
  color: #74b8ff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.message-embed p {
  color: #d9e1ee;
}

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

.embed-fields div {
  min-width: 0;
}

.embed-fields span {
  display: block;
  margin-bottom: 3px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.embed-fields strong,
.embed-fields a {
  color: #d7dfed;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.embed-fields a {
  color: #74b8ff;
}

.embed-thumb {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #090d14;
}

.embed-thumb img,
.embed-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.embed-image {
  display: block;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #090d14;
}

.message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
}

.message-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 24px 0;
  border-top: 1px solid var(--line);
}

.message-tools button,
.soundboard-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #dfe7f5;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.message-tools svg {
  width: 14px;
  height: 14px;
}

.message-form input {
  min-width: 0;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 16px;
  color: white;
  background: rgba(255, 255, 255, 0.045);
}

.message-form input:focus {
  border-color: rgba(102, 227, 106, 0.56);
  box-shadow: 0 0 0 3px rgba(102, 227, 106, 0.1);
}

.send-button {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(102, 227, 106, 0.48);
  border-radius: 8px;
  color: var(--green);
  background: rgba(102, 227, 106, 0.1);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.info-panel {
  overflow-y: auto;
  background: rgba(12, 16, 24, 0.8);
  border-right: 0;
}

.info-section {
  padding: 24px 24px 22px;
  border-bottom: 1px solid var(--line);
}

.info-section h2 {
  margin: 0 0 20px;
  color: #9ea8ba;
  font-size: 12px;
  font-weight: 800;
}

.server-summary {
  gap: 14px;
}

.server-summary strong,
.server-summary small {
  display: block;
}

.server-summary strong {
  color: white;
  font-size: 16px;
}

.server-summary strong span {
  color: #d8e0ef;
}

.server-summary small {
  margin-top: 4px;
  color: #9ba5b8;
}

.info-section p {
  margin: 20px 0;
  color: #c1cad8;
  font-size: 14px;
  line-height: 1.55;
}

.invite-row {
  gap: 10px;
}

.invite-button {
  height: 44px;
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, 0.035);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.invite-button:hover {
  border-color: rgba(102, 227, 106, 0.38);
}

.role-list,
.activity-list,
.server-list {
  display: grid;
  gap: 14px;
}

.role-row,
.activity-row,
.server-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #c6cedd;
  font-size: 14px;
}

.role-dot {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.role-row span:nth-child(2),
.activity-row span:nth-child(2),
.server-row strong,
.server-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-row em,
.activity-row em {
  color: #9da7b8;
  font-style: normal;
  font-size: 13px;
}

.activity-icon {
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #aeb7c9;
  font-size: 11px;
}

.server-row {
  grid-template-columns: 34px minmax(0, 1fr) 10px;
}

.server-row .server-emblem {
  width: 34px;
  height: 34px;
}

.server-row strong,
.server-row small {
  display: block;
}

.server-row strong {
  color: white;
  font-weight: 600;
}

.server-row small {
  margin-top: 3px;
  color: #8f99ab;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(102, 227, 106, 0.7);
}

.main-panel.alt-view {
  grid-template-rows: minmax(0, 1fr);
}

.hub-view {
  min-height: 0;
  overflow-y: auto;
  padding: 28px;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.hub-header span {
  color: #7f8a9e;
  font-size: 11px;
  font-weight: 800;
}

.hub-header h1 {
  margin: 5px 0 0;
  font-size: 26px;
}

.hub-action {
  max-width: 210px;
}

.hub-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
}

.hub-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 18px;
}

.hub-panel.wide {
  grid-column: span 1;
}

.hub-panel h2 {
  margin: 0 0 16px;
  color: #aab3c2;
  font-size: 12px;
  font-weight: 800;
}

.social-list,
.live-feed {
  display: grid;
  gap: 12px;
}

.live-section {
  display: grid;
  gap: 10px;
}

.live-section.offlive {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.live-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  color: #8f9bad;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.live-section-title strong {
  color: #c7d0df;
}

.live-section-title span {
  min-width: 28px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dfe7f5;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
}

.social-row,
.live-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.38);
}

.hub-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.social-icon,
.live-thumb {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--green-soft);
  border: 1px solid rgba(102, 227, 106, 0.24);
  font-weight: 800;
}

.social-icon {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.social-row strong,
.social-row span,
.live-card strong,
.live-card p,
.live-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-row span,
.live-card small {
  color: #8f9bad;
  font-size: 12px;
}

.small-action {
  min-width: 76px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.small-action:hover {
  border-color: rgba(102, 227, 106, 0.44);
}

.settings-inline-action {
  width: 100%;
  margin-top: 8px;
}

.webcam-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
  object-fit: cover;
}

.soundboard-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.soundboard-dropdown {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.soundboard-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  color: #dfe7f3;
  cursor: pointer;
}

.soundboard-dropdown summary::marker {
  color: var(--green);
}

.soundboard-dropdown summary strong {
  color: var(--green);
  font-size: 12px;
}

.soundboard-dropdown .soundboard-list {
  padding: 0 12px 12px;
}

.game-role-dropdown {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.game-role-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  color: #e7eefb;
  cursor: pointer;
}

.game-role-dropdown summary::marker {
  color: var(--green);
}

.game-role-dropdown summary strong {
  color: var(--green);
  font-size: 12px;
}

.game-role-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.game-role-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.game-role-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.game-role-option strong {
  min-width: 0;
  overflow: hidden;
  color: #edf4ff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-role-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.game-role-dropdown .field-label,
.game-role-dropdown .settings-textarea {
  margin-left: 12px;
  margin-right: 12px;
  width: calc(100% - 24px);
}

.game-role-dropdown .settings-textarea {
  margin-bottom: 12px;
}

.game-role-dropdown.locked {
  opacity: 0.54;
}

.soundboard-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.soundboard-chip {
  padding: 0 10px;
}

.soundboard-delete {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 89, 117, 0.36);
  border-radius: 8px;
  color: #ffd5dc;
  background: rgba(255, 89, 117, 0.1);
  cursor: pointer;
}

.soundboard-modal,
.asset-picker-modal {
  width: min(620px, calc(100vw - 32px));
}

.soundboard-modal-grid,
.asset-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.soundboard-modal-chip,
.asset-picker-item {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #e7edf7;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.soundboard-modal-chip {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px;
}

.soundboard-modal-chip svg {
  width: 18px;
  height: 18px;
}

.asset-picker-grid.emoji-grid {
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
}

.asset-picker-grid.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
}

.asset-picker-item {
  padding: 8px;
  overflow: hidden;
}

.asset-picker-item strong {
  font-size: 20px;
}

.asset-picker-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.live-card {
  grid-template-columns: 146px minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 118px;
  padding: 12px;
}

.live-thumb {
  width: 146px;
  min-height: 92px;
  background-position: center;
  background-size: cover;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(102, 227, 106, 0.22), rgba(85, 167, 255, 0.1)),
    rgba(5, 8, 13, 0.72);
}

.live-thumb span {
  align-self: start;
  justify-self: start;
  margin: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(20, 25, 34, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
}

.live-player-wrap {
  position: relative;
  padding: 0;
  background: #000;
}

.live-player {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  display: block;
}

.live-player-fallback {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  text-align: center;
}

.live-player-fallback strong {
  max-width: 120px;
  color: #dfe7f5;
  font-size: 12px;
  line-height: 1.25;
}

.live-card.is-live .live-thumb span {
  background: rgba(255, 89, 117, 0.86);
}

.live-card.is-offline {
  min-height: 92px;
  opacity: 0.86;
}

.live-card.is-offline .live-thumb {
  min-height: 72px;
  filter: saturate(0.78);
}

.live-card.is-offline .live-thumb span {
  color: #cbd4e2;
  background: rgba(143, 155, 173, 0.18);
}

.live-body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.live-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(145, 70, 255, 0.24), rgba(85, 167, 255, 0.1)),
    rgba(5, 8, 13, 0.72);
  background-position: center;
  background-size: cover;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.live-card p {
  margin: 4px 0;
  color: #cbd4e2;
}

.live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #8f9bad;
  font-size: 12px;
}

.live-card {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  cursor: pointer;
}

.live-card:hover,
.live-card:focus-visible {
  border-color: rgba(102, 227, 106, 0.42);
  background: rgba(102, 227, 106, 0.07);
  outline: none;
}

.live-logo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(145, 70, 255, 0.24), rgba(85, 167, 255, 0.1)),
    rgba(5, 8, 13, 0.72);
  background-position: center;
  background-size: cover;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.live-card.is-live .live-logo {
  border-color: rgba(255, 89, 117, 0.56);
  box-shadow: 0 0 0 3px rgba(255, 89, 117, 0.08);
}

.live-status {
  width: max-content;
  padding: 3px 8px;
  border: 1px solid rgba(143, 155, 173, 0.22);
  border-radius: 999px;
  color: #cbd4e2;
  background: rgba(143, 155, 173, 0.12);
  font-size: 11px;
  font-weight: 900;
}

.live-status.live-on {
  color: #fff;
  border-color: rgba(255, 89, 117, 0.46);
  background: rgba(255, 89, 117, 0.86);
}

.live-viewer-modal {
  width: min(980px, calc(100vw - 32px));
}

.live-viewer-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.live-viewer-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.live-viewer-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  color: #cbd4e2;
  text-align: center;
}

.live-viewer-fallback strong,
.live-viewer-fallback span,
.live-viewer-info strong,
.live-viewer-info span {
  display: block;
}

.live-viewer-info {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.live-viewer-info span {
  margin-top: 4px;
  color: #8f9bad;
  font-size: 12px;
}

.empty-state {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #8793a6;
  text-align: center;
}

.empty-state.compact {
  min-height: 54px;
  padding: 12px;
}

.compact-select {
  width: min(260px, 100%);
}

.search-input {
  width: min(360px, 100%);
}

.messages-layout {
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  min-height: 560px;
}

.dm-thread-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
}

.dm-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.dm-thread-head span,
.dm-thread-head strong {
  display: block;
}

.dm-thread-head span {
  color: #7f8a9e;
  font-size: 11px;
  font-weight: 800;
}

.dm-thread-head strong {
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
}

.dm-conversation-list,
.friend-list {
  display: grid;
  gap: 10px;
}

.dm-thread-button,
.friend-row,
.server-result-card {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.38);
}

.dm-thread-button {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 10px;
  color: #cbd4e2;
  text-align: left;
  cursor: pointer;
}

.dm-thread-button.active {
  border-color: rgba(102, 227, 106, 0.48);
  background: rgba(102, 227, 106, 0.1);
}

.dm-thread-button strong,
.dm-thread-button span,
.dm-thread-button small,
.friend-row strong,
.friend-row span,
.server-result-card strong,
.server-result-card p,
.server-result-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-thread-button span,
.dm-thread-button small,
.friend-row span,
.server-result-card span {
  color: #8793a6;
  font-size: 12px;
}

.dm-history {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.dm-bubble {
  width: min(76%, 560px);
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dm-bubble.mine {
  margin-left: auto;
  border-color: rgba(102, 227, 106, 0.34);
  background: rgba(102, 227, 106, 0.1);
}

.dm-bubble-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dm-bubble-meta .message-delete {
  margin-left: auto;
}

.dm-bubble strong,
.dm-bubble time {
  display: block;
  color: #8f9bad;
  font-size: 12px;
}

.dm-bubble p {
  margin: 5px 0;
  color: #eef3fb;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dm-form {
  padding: 14px 18px;
}

.server-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.server-result-card {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 96px;
  padding: 14px;
}

.server-result-card p {
  margin: 4px 0;
  color: #c6cfdd;
}

.friend-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 10px;
  width: min(360px, 100%);
}

.friend-row {
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  min-height: 66px;
  padding: 10px;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.friend-row:hover,
.friend-row:focus-visible {
  border-color: rgba(102, 227, 106, 0.34);
  background: rgba(102, 227, 106, 0.08);
  outline: none;
}

.friend-profile-card {
  width: min(560px, 100%);
}

.friend-profile-hero {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.friend-profile-avatar {
  width: 74px;
  height: 74px;
  font-size: 26px;
}

.friend-profile-hero strong,
.friend-profile-hero span,
.friend-profile-hero small {
  display: block;
}

.friend-profile-hero span {
  color: var(--green);
}

.friend-profile-hero small,
.profile-stat-grid span,
.profile-note span {
  color: #8793a6;
  font-size: 12px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.profile-stat-grid > div,
.profile-note {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.34);
}

.profile-stat-grid strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-note {
  margin-top: 12px;
}

.profile-note p {
  margin: 6px 0 0;
  color: #cbd4e2;
  line-height: 1.5;
}

.small-action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.bot-config-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.bot-config-head span,
.bot-config-head strong,
.bot-config-head small {
  display: block;
}

.bot-config-head span {
  color: #7f8a9e;
  font-size: 11px;
  font-weight: 800;
}

.bot-config-head strong {
  margin-top: 4px;
  color: #fff;
  font-size: 20px;
}

.bot-config-head small {
  margin-top: 4px;
  color: #94a0b4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-bot-pill {
  min-width: max-content;
  padding: 8px 12px;
  border: 1px solid rgba(102, 227, 106, 0.35);
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
}

.settings-subtitle {
  margin: 0 0 14px;
  color: #cbd4e2;
  font-size: 15px;
}

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

.secret-grid label,
.secret-status-line {
  display: block;
}

.secret-grid label span {
  display: block;
  margin-bottom: 7px;
  color: #c6cfdd;
  font-size: 13px;
  font-weight: 800;
}

.secret-grid small,
.secret-status-line {
  margin-top: 6px;
  color: #8f9bad;
  font-size: 12px;
}

.secret-grid small.configured,
.secret-status-line.configured {
  color: var(--green);
}

.member-role-list {
  display: grid;
  gap: 10px;
}

.member-role-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(150px, 210px);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.38);
}

.member-role-row strong,
.member-role-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-role-row span {
  color: #8f9bad;
  font-size: 12px;
}

.settings-note {
  margin: 0 0 14px;
  color: #98a3b6;
  line-height: 1.45;
}

.plan-feature-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.server-plan-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.server-plan-summary strong {
  color: #fff;
}

.server-plan-summary span {
  color: #9aa6ba;
  font-size: 13px;
}

.plan-feature {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #cbd4e2;
  font-size: 13px;
}

.plan-feature svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  stroke: currentColor;
  fill: none;
}

.toggle-row.locked {
  opacity: 0.54;
}

.toggle-row.locked > div span::after {
  content: " Piano superiore richiesto.";
  color: var(--gold);
}

.danger-card {
  border-color: rgba(255, 89, 117, 0.3);
}

.danger-action {
  color: #fff;
  border-color: rgba(255, 89, 117, 0.4);
  background: rgba(255, 89, 117, 0.12);
}

.danger-action:hover {
  border-color: rgba(255, 89, 117, 0.74);
  background: rgba(255, 89, 117, 0.2);
}

.id-select {
  font-variant-numeric: tabular-nums;
}

.app-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  min-width: 170px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 14px;
  border: 1px solid rgba(102, 227, 106, 0.34);
  border-radius: 8px;
  color: #fff;
  background: rgba(11, 15, 22, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.app-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.app-notification {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 86;
  width: min(390px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(102, 227, 106, 0.34);
  border-radius: 8px;
  color: #fff;
  background: rgba(9, 13, 20, 0.97);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    border-color 160ms ease;
}

.app-notification.visible {
  opacity: 1;
  transform: translateY(0);
}

.app-notification.live {
  border-color: rgba(255, 89, 117, 0.44);
}

.app-notification.server-invite {
  border-color: rgba(85, 167, 255, 0.44);
}

.app-notification-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
}

.app-notification-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.app-notification strong,
.app-notification span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-notification strong {
  white-space: nowrap;
}

.app-notification span {
  margin-top: 3px;
  color: #9aa4b7;
  font-size: 12px;
}

.app-notification .small-action {
  min-width: 64px;
}

.speaker-overlay {
  position: fixed;
  top: 96px;
  right: 24px;
  z-index: 32;
  width: min(280px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid rgba(102, 227, 106, 0.28);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.86);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.speaker-overlay-title {
  margin-bottom: 8px;
  color: #8d98aa;
  font-size: 11px;
  font-weight: 900;
}

.speaker-overlay-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.speaker-overlay-row strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speaker-overlay-row svg {
  width: 18px;
  height: 18px;
  color: var(--green);
  stroke: currentColor;
  fill: none;
}

.speaker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(14px);
}

.server-modal {
  width: min(520px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #10141c;
  box-shadow: var(--shadow);
  padding: 22px;
}

.server-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.server-modal header span {
  color: #7f8a9e;
  font-size: 11px;
  font-weight: 800;
}

.server-modal h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

.modal-submit {
  width: 100%;
  margin-top: 16px;
}

.server-drawer {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
}

.server-drawer-actions {
  display: flex;
  justify-content: flex-end;
}

.server-drawer-actions .invite-button {
  min-width: 180px;
}

.context-menu {
  position: fixed;
  z-index: 90;
  min-width: 190px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(12, 16, 23, 0.98);
  box-shadow: var(--shadow);
}

.context-menu button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: #dce5f5;
  text-align: left;
  background: transparent;
  padding: 0 10px;
  cursor: pointer;
}

.context-menu button:hover {
  color: #fff;
  background: rgba(102, 227, 106, 0.12);
}

.inline-modal {
  z-index: 42;
}

.inline-modal-card {
  display: grid;
  gap: 16px;
}

.inline-modal-card header {
  margin-bottom: 0;
}

.inline-form {
  display: grid;
  gap: 12px;
}

.inline-field {
  display: grid;
  gap: 8px;
}

.inline-field span {
  color: #c6cfdd;
  font-size: 13px;
  font-weight: 800;
}

.inline-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.inline-modal-actions .invite-button,
.inline-modal-actions .small-action {
  min-width: 112px;
}

.source-modal-card {
  width: min(900px, 100%);
}

.desktop-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
}

.desktop-source-card {
  min-width: 0;
  min-height: 180px;
  display: grid;
  grid-template-rows: 112px auto auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  text-align: left;
  background: rgba(5, 8, 13, 0.66);
  cursor: pointer;
}

.desktop-source-card:hover {
  border-color: rgba(102, 227, 106, 0.56);
  background: rgba(102, 227, 106, 0.08);
}

.desktop-source-card img,
.desktop-source-fallback {
  width: 100%;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.desktop-source-card img {
  object-fit: cover;
}

.desktop-source-fallback {
  display: grid;
  place-items: center;
}

.desktop-source-fallback svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  color: var(--green);
}

.desktop-source-card strong,
.desktop-source-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-source-card small {
  color: #8f9bad;
  font-size: 12px;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 7, 11, 0.82);
  backdrop-filter: blur(18px);
}

.settings-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 19, 27, 0.98), rgba(10, 13, 19, 0.98)),
    var(--bg);
}

.settings-nav {
  min-height: 0;
  overflow-y: auto;
  padding: 28px 16px 18px;
  border-right: 1px solid var(--line);
  background: rgba(8, 11, 16, 0.94);
}

.settings-user {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.settings-user strong,
.settings-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-user span {
  color: var(--green);
  font-size: 12px;
}

.settings-nav-group {
  display: grid;
  gap: 4px;
}

.settings-nav-group > span {
  padding: 10px 12px 8px;
  color: #7f8a9e;
  font-size: 11px;
  font-weight: 800;
}

.settings-nav-item,
.settings-danger-link {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aab4c6;
  padding: 0 12px;
  text-align: left;
  cursor: pointer;
}

.settings-nav-item:hover,
.settings-nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.settings-nav-item.active {
  box-shadow: inset 2px 0 var(--green);
}

.settings-danger-link {
  width: 100%;
  margin-top: 22px;
  color: #ff758d;
}

.settings-danger-link:hover {
  background: rgba(255, 89, 117, 0.08);
}

.settings-content {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.settings-header {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
}

.settings-header span {
  color: #7f8a9e;
  font-size: 11px;
  font-weight: 800;
}

.settings-header h2 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 24px;
}

.settings-close {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #b9c2d2;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.settings-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
}

.settings-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}

.app-version-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.app-version-card div {
  display: grid;
  gap: 6px;
}

.app-version-card small,
.app-version-card span {
  color: var(--muted);
}

.settings-panels {
  min-height: 0;
  overflow-y: auto;
  padding: 28px 34px 60px;
}

.settings-panel {
  display: none;
  max-width: 760px;
}

.settings-panel.active {
  display: grid;
  gap: 16px;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 18px;
}

.account-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  background:
    linear-gradient(135deg, var(--green-soft), rgba(85, 167, 255, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.avatar.large {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.account-preview strong,
.account-preview span {
  display: block;
}

.account-preview strong {
  color: #fff;
  font-size: 20px;
}

.account-preview span {
  margin-top: 4px;
  color: var(--green);
}

.field-label,
.range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
  color: #c6cfdd;
  font-size: 13px;
  font-weight: 800;
}

.field-label:first-child {
  margin-top: 0;
}

.settings-input,
.settings-select,
.settings-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: #fff;
  background: rgba(5, 8, 13, 0.78);
}

.settings-input,
.settings-select {
  height: 42px;
  padding: 0 12px;
}

.settings-textarea {
  min-height: 86px;
  resize: vertical;
  padding: 12px;
}

.settings-input:focus,
.settings-select:focus,
.settings-textarea:focus {
  border-color: rgba(102, 227, 106, 0.56);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row strong,
.toggle-row span {
  display: block;
}

.toggle-row strong {
  color: #fff;
  font-size: 14px;
}

.toggle-row span {
  margin-top: 4px;
  color: #94a0b4;
  font-size: 13px;
  line-height: 1.35;
}

.switch {
  position: relative;
  width: 48px;
  height: 26px;
  display: block;
}

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

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #3a4352;
  cursor: pointer;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--green);
}

.switch input:checked + span::after {
  transform: translateX(22px);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.64);
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: #aeb8ca;
  background: transparent;
  cursor: pointer;
}

.segmented-control button.active {
  color: #fff;
  background: var(--green-soft);
}

.settings-range {
  width: 100%;
  accent-color: var(--green);
}

.file-input {
  padding: 10px;
}

body.game-mode *,
body.reduce-motion * {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

body.game-mode .app-shell,
body.game-mode .settings-shell,
body.game-mode .server-modal,
body.game-mode .speaker-overlay {
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.shortcut-list {
  display: grid;
  gap: 0;
}

.shortcut-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: #cbd3e1;
}

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

.shortcut-key-button {
  min-width: 112px;
  justify-content: center;
}

kbd {
  min-width: 76px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(5, 8, 13, 0.84);
  text-align: center;
  font: 700 12px ui-monospace, SFMono-Regular, Consolas, monospace;
}

body[data-app-skin="cyberpunk"],
body[data-app-skin="horror"] {
  --skin-panel-alpha: 0.74;
}

body[data-app-skin="anime"] {
  --skin-edge: rgba(255, 139, 216, 0.44);
  --skin-glow: rgba(255, 139, 216, 0.14);
  --skin-panel-bg: linear-gradient(135deg, rgba(31, 17, 38, 0.82), rgba(9, 18, 38, 0.72));
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 139, 216, 0.22), transparent 28rem),
    radial-gradient(circle at 84% 70%, rgba(139, 200, 255, 0.2), transparent 30rem),
    linear-gradient(135deg, #070712 0%, #171027 48%, #07131f 100%);
}

body[data-app-skin="fps"],
body[data-app-skin="tactical"] {
  --skin-edge: rgba(215, 255, 106, 0.38);
  --skin-glow: rgba(168, 255, 62, 0.1);
  --skin-panel-bg: linear-gradient(135deg, rgba(8, 18, 14, 0.88), rgba(6, 9, 8, 0.78));
  background:
    linear-gradient(90deg, rgba(215, 255, 106, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(215, 255, 106, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 75% 20%, rgba(168, 255, 62, 0.12), transparent 24rem),
    #050807;
  background-size: 46px 46px, 46px 46px, auto, auto;
}

body[data-app-skin="minecraft"] {
  --skin-edge: rgba(105, 200, 67, 0.42);
  --skin-glow: rgba(105, 200, 67, 0.12);
  --skin-panel-bg:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(135deg, rgba(16, 28, 15, 0.9), rgba(24, 18, 10, 0.82));
  background:
    linear-gradient(90deg, rgba(105, 200, 67, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(105, 200, 67, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #07120a 0%, #10210d 52%, #1a1208 100%);
  background-size: 32px 32px, 32px 32px, auto;
}

body[data-app-skin="battle-royale"] {
  --skin-edge: rgba(255, 189, 85, 0.42);
  --skin-glow: rgba(255, 189, 85, 0.13);
  --skin-panel-bg: linear-gradient(135deg, rgba(17, 21, 40, 0.86), rgba(26, 13, 29, 0.76));
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 189, 85, 0.18), transparent 25rem),
    radial-gradient(circle at 82% 70%, rgba(85, 167, 255, 0.16), transparent 30rem),
    linear-gradient(135deg, #070e18 0%, #171226 54%, #080609 100%);
}

body[data-app-skin="open-world"] {
  --skin-edge: rgba(255, 79, 163, 0.42);
  --skin-glow: rgba(88, 215, 255, 0.13);
  --skin-panel-bg: linear-gradient(135deg, rgba(22, 16, 34, 0.82), rgba(10, 18, 28, 0.72));
  background:
    radial-gradient(circle at 15% 85%, rgba(88, 215, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 75% 24%, rgba(255, 79, 163, 0.18), transparent 28rem),
    linear-gradient(145deg, #080716 0%, #141128 52%, #07151f 100%);
}

body[data-app-skin="retro-arcade"] {
  --skin-edge: rgba(50, 255, 154, 0.44);
  --skin-glow: rgba(255, 92, 255, 0.13);
  --skin-panel-bg: linear-gradient(135deg, rgba(12, 7, 22, 0.86), rgba(7, 20, 19, 0.74));
  background:
    linear-gradient(90deg, rgba(50, 255, 154, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 92, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 105%, rgba(255, 92, 255, 0.22), transparent 32rem),
    #05020a;
  background-size: 26px 26px, 26px 26px, auto, auto;
}

body[data-app-skin="space"] {
  --skin-edge: rgba(142, 219, 255, 0.42);
  --skin-glow: rgba(181, 140, 255, 0.14);
  --skin-panel-bg: linear-gradient(135deg, rgba(8, 14, 31, 0.86), rgba(4, 8, 18, 0.78));
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 34%, rgba(142, 219, 255, 0.24) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 78%, rgba(181, 140, 255, 0.2), transparent 26rem),
    linear-gradient(180deg, #030612 0%, #081128 58%, #02040b 100%);
}

body[data-app-skin="streamer"] {
  --skin-edge: rgba(156, 125, 255, 0.44);
  --skin-glow: rgba(255, 106, 136, 0.14);
  --skin-panel-bg: linear-gradient(135deg, rgba(19, 13, 31, 0.84), rgba(14, 7, 23, 0.76));
  background:
    radial-gradient(circle at 18% 12%, rgba(156, 125, 255, 0.24), transparent 27rem),
    radial-gradient(circle at 78% 72%, rgba(255, 106, 136, 0.18), transparent 30rem),
    linear-gradient(135deg, #080611 0%, #181024 56%, #0a0611 100%);
}

body[data-app-skin="racing"] {
  --skin-edge: rgba(255, 47, 109, 0.44);
  --skin-glow: rgba(63, 248, 255, 0.13);
  --skin-panel-bg: linear-gradient(135deg, rgba(13, 16, 26, 0.88), rgba(8, 8, 13, 0.78));
  background:
    repeating-linear-gradient(115deg, transparent 0 42px, rgba(255, 47, 109, 0.13) 42px 46px, transparent 46px 92px),
    radial-gradient(circle at 78% 18%, rgba(63, 248, 255, 0.16), transparent 28rem),
    #05070c;
}

body[data-app-skin="fantasy"] {
  --skin-edge: rgba(181, 140, 255, 0.42);
  --skin-glow: rgba(255, 211, 106, 0.12);
  --skin-panel-bg: linear-gradient(135deg, rgba(18, 18, 31, 0.86), rgba(16, 12, 24, 0.76));
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 211, 106, 0.14), transparent 28rem),
    radial-gradient(circle at 80% 80%, rgba(181, 140, 255, 0.18), transparent 30rem),
    linear-gradient(135deg, #070812 0%, #14131f 54%, #0c0714 100%);
}

body[data-app-skin="anime"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="fps"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="tactical"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="minecraft"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="battle-royale"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="open-world"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="retro-arcade"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="space"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="streamer"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="racing"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="fantasy"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card) {
  border-color: var(--skin-edge);
  background: var(--skin-panel-bg);
  box-shadow: inset 0 0 0 1px var(--skin-glow), 0 18px 42px rgba(0, 0, 0, 0.18);
}

body[data-app-skin="minecraft"] :is(.settings-card, .server-switcher, .room-header, .message-tools button, .message-form input, .send-button, .invite-button, .control-button, .small-action) {
  border-radius: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

body[data-app-skin="fps"] :is(.panel-heading, .section-title, .folder-title, .info-section h2),
body[data-app-skin="tactical"] :is(.panel-heading, .section-title, .folder-title, .info-section h2) {
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body[data-app-skin="cyberpunk"] {
  --skin-edge: #12dfff;
  --skin-hot: #ff3de7;
  --skin-soft: rgba(18, 223, 255, 0.16);
  color: #e9fbff;
  background:
    radial-gradient(circle at 13% 18%, rgba(0, 217, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 82% 82%, rgba(255, 61, 231, 0.19), transparent 32rem),
    linear-gradient(180deg, #020615 0%, #050a1c 52%, #02040d 100%);
}

body[data-app-skin="cyberpunk"]::before,
body[data-app-skin="horror"]::before,
body[data-app-skin="cyberpunk"]::after,
body[data-app-skin="horror"]::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body[data-app-skin="cyberpunk"]::before {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(18, 223, 255, 0.11) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 61, 231, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, transparent 60%, rgba(0, 217, 255, 0.08) 60%, transparent 62%);
  background-size: 54px 54px, 54px 54px, 100% 18px;
  opacity: 0.42;
}

body[data-app-skin="cyberpunk"]::after {
  z-index: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 36%),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(18, 223, 255, 0.12) 42px 44px, transparent 44px 90px),
    radial-gradient(circle at 55% 72%, rgba(255, 61, 231, 0.12), transparent 27rem);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  mix-blend-mode: screen;
  opacity: 0.72;
}

body[data-app-skin="cyberpunk"] .app-shell,
body[data-app-skin="horror"] .app-shell {
  position: relative;
  z-index: 1;
}

body[data-app-skin] .settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
}

body[data-app-skin="cyberpunk"] .app-shell {
  border: 1px solid rgba(18, 223, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(1, 8, 23, 0.88), rgba(2, 5, 16, 0.7)),
    radial-gradient(circle at 50% 100%, rgba(255, 61, 231, 0.12), transparent 44rem);
  box-shadow:
    inset 0 0 0 1px rgba(255, 61, 231, 0.2),
    inset 0 0 42px rgba(18, 223, 255, 0.08),
    0 0 36px rgba(18, 223, 255, 0.12);
}

body[data-app-skin="cyberpunk"] .brand-logo {
  filter: drop-shadow(0 0 12px rgba(18, 223, 255, 0.7)) drop-shadow(0 0 18px rgba(255, 61, 231, 0.42)) saturate(1.25);
}

body[data-app-skin="cyberpunk"] :is(
  .titlebar,
  .rail,
  .channels-panel,
  .main-panel,
  .info-panel,
  .settings-shell,
  .settings-nav,
  .settings-card,
  .server-switcher,
  .room-header,
  .message-form,
  .message-tools,
  .server-modal,
  .hub-panel,
  .live-card
) {
  border-color: rgba(18, 223, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(5, 14, 33, var(--skin-panel-alpha)), rgba(2, 5, 18, 0.78)),
    linear-gradient(90deg, rgba(18, 223, 255, 0.06), transparent 22%, rgba(255, 61, 231, 0.05));
  box-shadow:
    inset 0 0 0 1px rgba(255, 61, 231, 0.14),
    inset 0 0 28px rgba(18, 223, 255, 0.05),
    0 0 22px rgba(18, 223, 255, 0.08);
}

body[data-app-skin="cyberpunk"] :is(
  .channels-panel,
  .main-panel,
  .info-panel,
  .settings-shell,
  .settings-card,
  .server-switcher,
  .room-header,
  .message-form,
  .message-tools button,
  .send-button,
  .invite-button,
  .control-button,
  .small-action,
  .soundboard-dropdown
) {
  border-radius: 0;
  clip-path: polygon(0 12px, 12px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
}

body[data-app-skin="cyberpunk"] :is(.channels-panel, .main-panel, .info-panel, .settings-card, .server-switcher, .room-header) {
  position: relative;
  overflow: hidden;
}

body[data-app-skin="cyberpunk"] :is(.channels-panel, .main-panel, .info-panel, .settings-card, .server-switcher, .room-header)::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 61, 231, 0.18);
  background:
    linear-gradient(90deg, transparent, rgba(18, 223, 255, 0.1), transparent) 0 0 / 100% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(255, 61, 231, 0.11), transparent) 100% 0 / 1px 100% no-repeat;
  pointer-events: none;
}

body[data-app-skin="cyberpunk"] .message-list {
  position: relative;
  background:
    linear-gradient(180deg, transparent 0%, rgba(2, 6, 18, 0.36) 100%),
    radial-gradient(circle at 78% 60%, rgba(255, 61, 231, 0.08), transparent 22rem);
}

body[data-app-skin="cyberpunk"] .message-list::before {
  content: "";
  position: absolute;
  right: 5%;
  bottom: 0;
  width: 52%;
  height: 48%;
  background:
    linear-gradient(0deg, rgba(18, 223, 255, 0.16), transparent 72%),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(18, 223, 255, 0.22) 28px 31px, transparent 31px 58px),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 61, 231, 0.16) 18px 20px, transparent 20px 44px);
  clip-path: polygon(0 88%, 7% 62%, 14% 72%, 21% 42%, 30% 80%, 38% 28%, 48% 70%, 58% 46%, 66% 82%, 76% 36%, 88% 72%, 100% 50%, 100% 100%, 0 100%);
  opacity: 0.62;
  pointer-events: none;
}

body[data-app-skin="cyberpunk"] .message-list > * {
  position: relative;
  z-index: 1;
}

body[data-app-skin="cyberpunk"] :is(.message-meta strong, .section-title, .folder-title, .panel-heading, .info-section h2, .settings-subtitle) {
  color: #77ecff;
  text-shadow: 0 0 12px rgba(18, 223, 255, 0.42);
}

body[data-app-skin="cyberpunk"] :is(.channel-button.active, .message-meta strong) {
  color: #ff78ee;
}

body[data-app-skin="cyberpunk"] .channel-button.active {
  border: 1px solid rgba(18, 223, 255, 0.52);
  box-shadow: inset 0 0 22px rgba(18, 223, 255, 0.13), 0 0 18px rgba(18, 223, 255, 0.16);
}

body[data-app-skin="cyberpunk"] :is(.message-delete, .message-tools button, .send-button, .invite-button) {
  border-color: rgba(255, 61, 231, 0.52);
  color: #ffe8fb;
  text-shadow: 0 0 10px rgba(255, 61, 231, 0.38);
  background: rgba(4, 12, 30, 0.78);
}

body[data-app-skin="horror"] {
  --skin-edge: #c83737;
  --skin-hot: #ff594f;
  --skin-soft: rgba(200, 55, 55, 0.16);
  color: #d7d0c8;
  background:
    radial-gradient(circle at 18% 82%, rgba(139, 0, 0, 0.32), transparent 28rem),
    radial-gradient(circle at 85% 12%, rgba(255, 41, 41, 0.13), transparent 26rem),
    linear-gradient(135deg, #030303 0%, #080504 48%, #020202 100%);
  font-family: Georgia, "Times New Roman", serif;
}

body[data-app-skin="horror"]::before {
  z-index: 0;
  background:
    repeating-linear-gradient(104deg, transparent 0 22px, rgba(255, 255, 255, 0.025) 22px 23px, transparent 23px 68px),
    repeating-linear-gradient(18deg, transparent 0 34px, rgba(164, 19, 19, 0.07) 34px 36px, transparent 36px 84px),
    radial-gradient(circle at 15% 65%, rgba(255, 255, 255, 0.06), transparent 16rem);
  opacity: 0.8;
}

body[data-app-skin="horror"]::after {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(139, 0, 0, 0.5), transparent 8%, transparent 92%, rgba(139, 0, 0, 0.48)),
    linear-gradient(180deg, rgba(139, 0, 0, 0.42), transparent 10%, transparent 88%, rgba(139, 0, 0, 0.46)),
    radial-gradient(circle at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.54) 100%);
  opacity: 0.9;
}

body[data-app-skin="horror"] .app-shell {
  border: 1px solid rgba(200, 55, 55, 0.42);
  background:
    linear-gradient(180deg, rgba(4, 4, 4, 0.9), rgba(8, 5, 5, 0.72)),
    radial-gradient(circle at 50% 70%, rgba(60, 0, 0, 0.28), transparent 40rem);
  box-shadow:
    inset 0 0 0 1px rgba(255, 89, 75, 0.14),
    inset 0 0 70px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(164, 19, 19, 0.18);
}

body[data-app-skin="horror"] .brand-logo {
  filter: sepia(0.55) saturate(1.55) hue-rotate(320deg) drop-shadow(0 0 12px rgba(200, 55, 55, 0.48));
}

body[data-app-skin="horror"] :is(
  .titlebar,
  .rail,
  .channels-panel,
  .main-panel,
  .info-panel,
  .settings-shell,
  .settings-nav,
  .settings-card,
  .server-switcher,
  .room-header,
  .message-form,
  .message-tools,
  .server-modal,
  .hub-panel,
  .live-card
) {
  border-color: rgba(200, 55, 55, 0.34);
  background:
    linear-gradient(135deg, rgba(8, 8, 7, var(--skin-panel-alpha)), rgba(13, 7, 7, 0.82)),
    repeating-linear-gradient(130deg, transparent 0 18px, rgba(255, 255, 255, 0.018) 18px 19px, transparent 19px 58px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 89, 75, 0.09),
    inset 0 0 34px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(139, 0, 0, 0.12);
}

body[data-app-skin="horror"] :is(
  .channels-panel,
  .main-panel,
  .info-panel,
  .settings-shell,
  .settings-card,
  .server-switcher,
  .room-header,
  .message-form,
  .message-tools button,
  .send-button,
  .invite-button,
  .control-button,
  .small-action,
  .soundboard-dropdown
) {
  border-radius: 2px;
}

body[data-app-skin="horror"] :is(.channels-panel, .main-panel, .info-panel, .settings-card, .server-switcher, .room-header) {
  position: relative;
  overflow: hidden;
}

body[data-app-skin="horror"] :is(.channels-panel, .main-panel, .info-panel, .settings-card, .server-switcher, .room-header)::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 89, 75, 0.14);
  background:
    linear-gradient(90deg, rgba(200, 55, 55, 0.24), transparent 12%, transparent 88%, rgba(200, 55, 55, 0.18)),
    repeating-linear-gradient(160deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 47px, transparent 47px 110px);
  pointer-events: none;
}

body[data-app-skin="horror"] .message-list {
  position: relative;
  background:
    radial-gradient(circle at 10% 80%, rgba(130, 0, 0, 0.16), transparent 20rem),
    radial-gradient(circle at 76% 42%, rgba(255, 255, 255, 0.035), transparent 18rem);
}

body[data-app-skin="horror"] .message-list::before {
  content: "";
  position: absolute;
  left: 6%;
  bottom: 0;
  width: 34%;
  height: 48%;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(0, 0, 0, 0.8), transparent 58%),
    linear-gradient(180deg, transparent, rgba(65, 65, 65, 0.18));
  clip-path: polygon(44% 10%, 55% 10%, 62% 35%, 73% 100%, 24% 100%, 37% 35%);
  opacity: 0.32;
  pointer-events: none;
}

body[data-app-skin="horror"] .message-list > * {
  position: relative;
  z-index: 1;
}

body[data-app-skin="horror"] :is(.section-title, .folder-title, .panel-heading, .info-section h2, .settings-subtitle) {
  color: #d5524d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-app-skin="horror"] :is(.message-meta strong, .server-switcher strong, .server-summary strong, .room-title-row h1) {
  color: #f1ebe4;
  text-shadow: 0 0 12px rgba(200, 55, 55, 0.28);
}

body[data-app-skin="horror"] .channel-button.active {
  color: #ff5b55;
  border: 1px solid rgba(200, 55, 55, 0.38);
  background: rgba(70, 15, 15, 0.48);
}

body[data-app-skin="horror"] :is(.message-delete, .message-tools button, .send-button, .invite-button) {
  border-color: rgba(200, 55, 55, 0.46);
  color: #ff7f76;
  background: rgba(17, 7, 7, 0.8);
}

@media (max-width: 1240px) {
  .workspace {
    grid-template-columns: 92px 300px minmax(420px, 1fr);
  }

  .info-panel {
    display: none;
  }

  .rail-item b {
    display: none;
  }
}

@media (max-width: 880px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    height: auto;
    grid-template-rows: 64px auto;
  }

  .titlebar {
    padding: 0 14px;
  }

  .brand-lockup {
    font-size: 18px;
  }

  .brand-logo {
    width: 168px;
    height: 44px;
  }

  .window-actions {
    gap: 4px;
  }

  .workspace {
    min-height: calc(100vh - 64px);
    grid-template-columns: 1fr;
  }

  .workspace.focus-view {
    grid-template-columns: 1fr;
  }

  .rail {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .rail-item {
    min-width: 58px;
    min-height: 58px;
  }

  .rail-item::before {
    top: auto;
    right: 8px;
    bottom: 0;
    left: 8px;
    width: auto;
    height: 3px;
  }

  .profile-chip {
    margin-left: auto;
    margin-top: 0;
    border-top: 0;
  }

  .channels-panel {
    min-height: 370px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-panel {
    min-height: 680px;
    border-right: 0;
  }

  .room-header {
    flex-wrap: wrap;
    align-content: center;
    padding: 16px;
  }

  .room-actions {
    min-width: 0;
    width: 100%;
    justify-content: space-between;
  }

  .voice-controls {
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
  }

  .participant {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .participant-volume {
    grid-column: 1 / -1;
    width: 100%;
  }

  .voice-meter,
  .participant-menu {
    display: none;
  }

  .hub-grid,
  .messages-layout,
  .secret-grid {
    grid-template-columns: 1fr;
  }

  .hub-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hub-action {
    max-width: none;
    width: 100%;
  }

  .live-card {
    grid-template-columns: 1fr;
  }

  .live-thumb {
    width: 100%;
    min-height: 150px;
  }

  .server-result-card,
  .friend-row,
  .member-role-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .server-result-card .small-action,
  .friend-row .small-action,
  .friend-row .icon-button,
  .member-role-row select {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hub-action-row {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .hub-action-row .small-action {
    width: 100%;
  }

  .inline-modal {
    align-items: start;
    overflow-y: auto;
  }

  .inline-modal-actions {
    flex-direction: column-reverse;
  }

  .inline-modal-actions .invite-button,
  .inline-modal-actions .small-action {
    width: 100%;
  }

  .desktop-source-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .friend-form {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .settings-user,
  .settings-danger-link,
  .settings-nav-group > span {
    display: none;
  }

  .settings-nav-group {
    display: flex;
    gap: 6px;
  }

  .settings-nav-item {
    min-width: max-content;
  }

  .settings-header,
  .settings-panels {
    padding-right: 16px;
    padding-left: 16px;
  }
}

.hub-live-view {
  padding: 32px 28px 44px;
}

.hub-live-header {
  margin-bottom: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.hub-live-header h1 {
  font-size: 28px;
}

.hub-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.hub-tab {
  position: relative;
  min-height: 44px;
  border: 0;
  color: #a9b1c0;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.hub-tab.active {
  color: #fff;
}

.hub-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--green);
  box-shadow: 0 0 18px var(--green-soft);
}

.hub-live-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hub-live-toolbar h2 {
  margin: 0;
  font-size: 18px;
}

.hub-platform-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hub-platform {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #d7deea;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.hub-platform.active {
  color: #fff;
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 18px rgba(102, 227, 106, 0.14);
}

.live-feed.hub-live-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.live-feed .hub-live-card {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.54);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.live-feed .hub-live-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--green) 58%, transparent);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26), 0 0 22px var(--green-soft);
}

.hub-live-thumb {
  position: relative;
  aspect-ratio: 16 / 8.4;
  background-position: center;
  background-size: cover;
}

.hub-live-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.5));
}

.live-badge,
.live-viewers {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  color: #fff;
  font-weight: 900;
}

.live-badge {
  top: 12px;
  left: 12px;
  min-height: 28px;
  padding: 0 9px;
  background: #c7131e;
  font-size: 12px;
}

.live-viewers {
  left: 12px;
  bottom: 10px;
  font-size: 13px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.74);
}

.live-viewers svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.hub-live-body {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.hub-live-creator {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.hub-live-creator strong,
.hub-live-body p,
.hub-live-body small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-live-body p {
  margin: 0;
  color: #dfe5ef;
}

.hub-live-body small {
  color: #9099aa;
}

.platform-mark {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: #6a39ff;
  font-size: 10px;
  font-weight: 900;
}

.platform-youtube {
  background: #ff1f28;
}

.platform-kick {
  background: #52f04f;
  color: #061106;
}

.platform-twitch {
  background: #9147ff;
}

.live-more-button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #b6bfce;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.live-more-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.hub-load-more {
  display: block;
  width: max-content;
  min-width: 168px;
  margin: 24px auto 0;
}

.hub-social-drawer {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.hub-social-drawer summary {
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  color: #c4ccd9;
  cursor: pointer;
}

.hub-social-drawer .social-list {
  padding: 0 14px 14px;
}

.hub-live-empty {
  grid-column: 1 / -1;
  min-height: 170px;
  display: grid;
  place-items: center;
}

.theme-studio-panel {
  max-width: none;
  min-height: calc(100vh - 190px);
}

.theme-studio-panel.active {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px;
}

.theme-studio {
  min-height: 0;
}

.theme-studio-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 680px);
  align-items: end;
  gap: 18px;
  margin-bottom: 22px;
}

.theme-studio-header h3 {
  margin: 0;
  color: #f6f7fb;
  font-size: 28px;
  line-height: 1.15;
}

.theme-studio-header p {
  margin: 8px 0 0;
  color: #b4bdcd;
}

.theme-spark {
  color: #9c64ff;
  margin-right: 10px;
}

.theme-studio-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 170px 136px;
  gap: 12px;
}

.theme-search,
.theme-sort,
.theme-favorites {
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #dfe5f2;
  background: rgba(6, 10, 18, 0.72);
}

.theme-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.theme-search svg,
.theme-favorites svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.theme-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.theme-sort {
  padding: 0 14px;
}

.theme-favorites {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.theme-favorites.active {
  color: #fff;
  border-color: #9c64ff;
  background: rgba(156, 100, 255, 0.18);
}

.theme-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 22px;
}

.theme-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(6, 10, 18, 0.82);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.theme-card.selected {
  border-color: #9c64ff;
  box-shadow: 0 0 0 1px rgba(156, 100, 255, 0.65), 0 0 28px rgba(156, 100, 255, 0.36);
}

.theme-card-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background-position: center;
  background-size: cover;
}

.theme-card-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  justify-self: center;
  margin-top: -24px;
  border: 1px solid color-mix(in srgb, var(--green) 70%, transparent);
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(156, 100, 255, 0.72), rgba(15, 20, 35, 0.96));
  box-shadow: 0 0 18px var(--green-soft);
  font-size: 13px;
  font-weight: 900;
}

.theme-card-body {
  display: grid;
  gap: 3px;
  text-align: center;
}

.theme-card-body strong,
.theme-card-body span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-card-body strong {
  color: #fff;
  font-size: 15px;
}

.theme-card-body span {
  color: #9da7b8;
  font-size: 12px;
}

.theme-preview-button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.theme-preview-button.selected {
  border-color: transparent;
  background: linear-gradient(135deg, #7e35ff, #2f92ff);
}

.theme-favorite-button,
.theme-selected-check {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
}

.theme-favorite-button {
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #d9e0ee;
  background: rgba(5, 8, 13, 0.64);
  cursor: pointer;
}

.theme-favorite-button.active {
  color: #ffd36a;
  border-color: rgba(255, 211, 106, 0.58);
  background: rgba(255, 211, 106, 0.14);
}

.theme-favorite-button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
}

.theme-selected-check {
  right: -10px;
  top: -10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #05070f;
  background: #9c64ff;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(156, 100, 255, 0.54);
}

.theme-action-bar {
  position: sticky;
  bottom: -60px;
  display: grid;
  grid-template-columns: minmax(160px, 210px) minmax(160px, 210px) minmax(190px, 250px);
  justify-content: end;
  gap: 14px;
  padding: 20px 0 0;
  background: linear-gradient(180deg, transparent, rgba(7, 10, 15, 0.92) 28%);
}

.theme-action-bar .invite-button,
.theme-action-bar .small-action {
  width: 100%;
}

.theme-save {
  background: linear-gradient(135deg, #7b35ff, #2f92ff);
}

.theme-empty {
  grid-column: 1 / -1;
  min-height: 200px;
  display: grid;
  place-items: center;
}

body[data-app-skin="dark"] {
  --skin-edge: rgba(139, 95, 255, 0.36);
  --skin-panel-bg: linear-gradient(135deg, rgba(10, 11, 20, 0.9), rgba(4, 6, 11, 0.78));
  background:
    radial-gradient(circle at 76% 18%, rgba(111, 65, 214, 0.13), transparent 30rem),
    radial-gradient(circle at 20% 88%, rgba(28, 132, 255, 0.08), transparent 28rem),
    #05070c;
}

body[data-app-skin="minimal"] {
  --bg: #ecf2f8;
  --panel: #ffffff;
  --panel-2: #edf2f7;
  --panel-3: #dfe7f0;
  --line: rgba(37, 50, 68, 0.15);
  --line-strong: rgba(37, 50, 68, 0.24);
  --text: #111827;
  --muted: #506070;
  --dim: #7a8696;
  --green: #2f6fff;
  --green-soft: rgba(47, 111, 255, 0.13);
  color: #111827;
  background: linear-gradient(135deg, #f6f8fb, #dde8f4);
}

body[data-app-skin="steampunk"] {
  --bg: #100b06;
  --panel: #20150b;
  --panel-2: #130c06;
  --green: #d79a42;
  --green-soft: rgba(215, 154, 66, 0.16);
  --gold: #f2c56e;
  --muted: #c2ad8d;
  color: #f4ead9;
  background:
    radial-gradient(circle at 22% 24%, rgba(242, 197, 110, 0.14), transparent 25rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 42px),
    linear-gradient(135deg, #120b05, #050403);
}

body[data-app-skin="neon"] {
  --bg: #070312;
  --panel: #141027;
  --panel-2: #0b0717;
  --green: #ff43df;
  --green-soft: rgba(255, 67, 223, 0.15);
  --blue: #1fe9ff;
  color: #f8edff;
  background:
    radial-gradient(circle at 18% 82%, rgba(31, 233, 255, 0.16), transparent 27rem),
    radial-gradient(circle at 80% 20%, rgba(255, 67, 223, 0.22), transparent 30rem),
    #05020c;
}

body[data-app-skin="dark"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="minimal"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="steampunk"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card),
body[data-app-skin="neon"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card) {
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
}

body[data-app-skin="minimal"] :is(.app-shell, .titlebar, .rail, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-nav, .settings-card, .server-switcher, .room-header, .message-form, .message-tools, .server-modal, .hub-panel, .live-card) {
  color: #152033;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

body[data-app-skin="minimal"] :is(.channel-button, .rail-item, .settings-nav-item, .hub-tab, .hub-live-body small, .theme-card-body span) {
  color: #4f5f76;
}

body[data-app-skin="minimal"] :is(.message-form input, .settings-input, .settings-select, .settings-textarea, .theme-search, .theme-sort, .theme-favorites) {
  color: #111827;
  background: rgba(255, 255, 255, 0.88);
}

body[data-app-skin="steampunk"] :is(.settings-card, .hub-panel, .live-card, .theme-card, .server-switcher, .room-header) {
  background:
    linear-gradient(135deg, rgba(52, 32, 13, 0.78), rgba(14, 9, 5, 0.82)),
    repeating-linear-gradient(90deg, rgba(242, 197, 110, 0.04) 0 1px, transparent 1px 22px);
  box-shadow: inset 0 0 0 1px rgba(242, 197, 110, 0.08);
}

body[data-app-skin="neon"] :is(.invite-button, .send-button, .theme-preview-button.selected, .hub-platform.active) {
  box-shadow: 0 0 18px rgba(255, 67, 223, 0.25), 0 0 22px rgba(31, 233, 255, 0.12);
}

.global-search {
  -webkit-app-region: no-drag;
  width: min(520px, 34vw);
  min-width: 280px;
  height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #8f9bad;
  background: rgba(8, 13, 23, 0.78);
}

.global-search svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.global-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.global-search kbd {
  color: #8b94a6;
  font: inherit;
  font-size: 12px;
}

.top-user-chip {
  -webkit-app-region: no-drag;
  min-width: 128px;
  height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.top-user-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.avatar.tiny {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.workspace {
  grid-template-columns: 288px 344px minmax(480px, 1fr) 316px;
}

.workspace.focus-view {
  grid-template-columns: 288px minmax(0, 1fr);
}

.workspace.hub-focus-view {
  grid-template-columns: 288px minmax(0, 1fr) 316px;
}

.workspace.ai-focus-view {
  grid-template-columns: 288px minmax(0, 1fr);
}

.app-sidebar {
  padding: 18px 14px 0;
  gap: 12px;
  background: rgba(7, 11, 20, 0.78);
}

.rail-primary,
.rail-secondary {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.app-sidebar .rail-item {
  min-height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  place-items: center start;
  align-content: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
}

.app-sidebar .rail-item::before {
  top: 8px;
  bottom: 8px;
}

.app-sidebar .rail-item.active {
  background: linear-gradient(90deg, rgba(156, 100, 255, 0.24), rgba(47, 146, 255, 0.08));
}

.app-sidebar .rail-item b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.app-sidebar .rail-item em {
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #7d35ff, #c13dff);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.sidebar-server-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 2px 0 8px;
}

.sidebar-server-section > span {
  color: #7d879a;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-server-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
}

.sidebar-server-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
}

.sidebar-server-row.active {
  background: rgba(156, 100, 255, 0.12);
}

.sidebar-server-row > button:first-child {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  color: #dce5f6;
  background: transparent;
  cursor: pointer;
}

.sidebar-server-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.sidebar-server-row em {
  color: var(--green);
  font-size: 11px;
  font-style: normal;
}

.server-emblem.tiny {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.sidebar-favorite,
.community-favorite {
  display: grid;
  place-items: center;
  color: #7d879a;
  cursor: pointer;
}

.sidebar-favorite {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.sidebar-favorite.active,
.community-favorite.active,
.server-result-favorite.active {
  color: #ffd36a;
}

.sidebar-favorite svg,
.community-favorite svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
}

.community-favorite {
  width: 34px;
  height: 34px;
}

body.theme-artwork-active {
  --theme-edge: var(--green);
  --theme-accent-strong: var(--green);
  --theme-glow: var(--green-soft);
  --theme-panel-tint: rgba(5, 8, 14, 0.9);
  --theme-screen-dim: rgba(0, 0, 0, 0.82);
  --theme-artwork-opacity: 0.12;
  --theme-artwork-blur: 42px;
  --theme-display-font: inherit;
  background: #020409;
}

body.theme-artwork-active::before,
body.theme-artwork-active::after {
  display: none;
}

body.theme-artwork-active .app-shell,
body.theme-artwork-active .settings-overlay {
  isolation: isolate;
  background: transparent;
}

body.theme-artwork-active .app-shell::before,
body.theme-artwork-active .settings-overlay::before {
  content: "";
  position: absolute;
  inset: -140px;
  z-index: 0;
  pointer-events: none;
  background-image: var(--theme-artwork);
  background-size: 180% auto;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--theme-artwork-opacity);
  filter: blur(var(--theme-artwork-blur)) saturate(1.45) contrast(1.08);
  transform: scale(1.2);
}

body.theme-artwork-active .app-shell::after,
body.theme-artwork-active .settings-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--theme-accent-strong) 16%, transparent), transparent 32rem),
    radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--theme-edge) 14%, transparent), transparent 34rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.62)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 18%, rgba(0, 0, 0, 0.64)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 4px),
    var(--theme-screen-dim);
}

body.theme-artwork-active .settings-overlay::before {
  opacity: var(--theme-artwork-opacity);
  filter: blur(calc(var(--theme-artwork-blur) + 3px)) saturate(1.24) contrast(1.04);
}

body.theme-artwork-active .settings-overlay::after {
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--theme-accent-strong) 14%, transparent), transparent 30rem),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-screen-dim) 80%, rgba(0, 0, 0, 0.72)), rgba(0, 0, 0, 0.72));
}

body.theme-artwork-active :is(.titlebar, .workspace, .settings-shell) {
  position: relative;
  z-index: 2;
}

body.theme-artwork-active :is(
  .titlebar,
  .app-sidebar,
  .channels-panel,
  .main-panel,
  .info-panel,
  .settings-shell,
  .settings-nav,
  .settings-card,
  .server-switcher,
  .room-header,
  .message-form,
  .message-tools,
  .server-modal,
  .hub-panel,
  .live-card,
  .ai-main-card,
  .ai-preview-panel,
  .plugin-card,
  .activity-feed-item,
  .notification-center-item,
  .theme-card,
  .theme-search,
  .theme-sort,
  .theme-favorites
) {
  border-color: color-mix(in srgb, var(--theme-edge) 58%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-panel-tint) 96%, rgba(255, 255, 255, 0.035)), color-mix(in srgb, var(--theme-panel-tint) 86%, rgba(0, 0, 0, 0.76))),
    rgba(0, 0, 0, 0.72);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--theme-accent-strong) 20%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 0 30px rgba(0, 0, 0, 0.36),
    0 0 18px color-mix(in srgb, var(--theme-glow) 70%, transparent);
  backdrop-filter: blur(9px) saturate(1.18);
}

body.theme-artwork-active :is(.channels-panel, .main-panel, .info-panel, .settings-shell) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-panel-tint) 98%, rgba(255, 255, 255, 0.03)), color-mix(in srgb, var(--theme-panel-tint) 88%, rgba(0, 0, 0, 0.9))),
    rgba(0, 0, 0, 0.9);
}

body.theme-artwork-active :is(.chat-view, .message-list, .voice-view, .empty-community-view) {
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--theme-edge) 8%, transparent), transparent 30rem),
    linear-gradient(180deg, rgba(2, 4, 10, 0.86), rgba(1, 2, 6, 0.92));
}

body.theme-artwork-active .message-list {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-edge) 12%, transparent);
}

body.theme-artwork-active :is(.settings-card, .hub-panel, .live-card, .theme-card, .plugin-card, .activity-feed-item, .notification-center-item, .ai-main-card, .ai-preview-panel) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-panel-tint) 94%, rgba(255, 255, 255, 0.045)), color-mix(in srgb, var(--theme-panel-tint) 76%, rgba(0, 0, 0, 0.84))),
    rgba(0, 0, 0, 0.76);
}

body.theme-artwork-active :is(.titlebar, .room-header, .settings-header, .server-switcher, .message-form, .message-tools, .settings-card, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel) {
  position: relative;
  overflow: hidden;
}

body.theme-artwork-active :is(.titlebar, .room-header, .settings-header, .server-switcher, .message-form, .message-tools, .settings-card, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel)::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--theme-accent-strong) 34%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--theme-edge) 34%, transparent), transparent 18%, transparent 82%, color-mix(in srgb, var(--theme-accent-strong) 24%, transparent)),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-edge) 18%, transparent), transparent 18%, transparent 84%, color-mix(in srgb, var(--theme-accent-strong) 20%, transparent));
  opacity: 0.22;
  pointer-events: none;
}

body.theme-artwork-active :is(h1, h2, h3, .room-title-row h1, .panel-heading, .section-title, .folder-title, .settings-subtitle, .theme-card-body strong, .message-meta strong) {
  font-family: var(--theme-display-font);
  color: color-mix(in srgb, var(--theme-accent-strong) 62%, #ffffff);
  text-shadow: 0 0 12px var(--theme-glow);
}

body.theme-artwork-active :is(.rail-item.active, .settings-nav-item.active, .channel-button.active, .hub-tab.active, .hub-platform.active, .theme-preview-button.selected) {
  border-color: color-mix(in srgb, var(--theme-edge) 68%, transparent);
  color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--theme-accent-strong) 34%, transparent), color-mix(in srgb, var(--theme-edge) 18%, transparent));
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--theme-edge) 22%, transparent), 0 0 18px var(--theme-glow);
}

body.theme-artwork-active :is(.invite-button, .send-button, .small-action, .control-button, .theme-preview-button, .message-tools button, .soundboard-chip) {
  border-color: color-mix(in srgb, var(--theme-edge) 56%, transparent);
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-panel-tint) 86%, transparent), color-mix(in srgb, var(--theme-accent-strong) 14%, transparent));
  text-shadow: 0 0 10px var(--theme-glow);
}

body.theme-artwork-active :is(.settings-input, .settings-select, .settings-textarea, .message-form input, .global-search, .theme-search input, .theme-sort) {
  border-color: color-mix(in srgb, var(--theme-edge) 42%, transparent);
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.78), color-mix(in srgb, var(--theme-panel-tint) 84%, rgba(0, 0, 0, 0.68)));
}

body.theme-artwork-active .theme-card-preview {
  border-color: color-mix(in srgb, var(--theme-edge) 62%, transparent);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.34), 0 0 18px var(--theme-glow);
}

body.theme-artwork-active[data-theme-id="cyberpunk"] :is(.app-sidebar, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel),
body.theme-artwork-active[data-theme-id="neon"] :is(.app-sidebar, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel),
body.theme-artwork-active[data-theme-id="space"] :is(.app-sidebar, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel) {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-panel-tint) 98%, rgba(255, 255, 255, 0.035)), rgba(0, 0, 0, 0.88)),
    linear-gradient(90deg, color-mix(in srgb, var(--theme-edge) 10%, transparent) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-edge) 7%, transparent) 0 1px, transparent 1px 100%);
  background-size: auto, 36px 36px, 36px 36px;
}

body.theme-artwork-active[data-theme-id="cyberpunk"] :is(.titlebar, .room-header, .server-switcher, .message-form, .settings-card, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel)::after,
body.theme-artwork-active[data-theme-id="neon"] :is(.titlebar, .room-header, .server-switcher, .message-form, .settings-card, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel)::after,
body.theme-artwork-active[data-theme-id="space"] :is(.titlebar, .room-header, .server-switcher, .message-form, .settings-card, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel)::after {
  opacity: 0.46;
}

body.theme-artwork-active[data-theme-id="horror"] :is(.app-sidebar, .channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel) {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-panel-tint) 96%, rgba(255, 255, 255, 0.025)), rgba(0, 0, 0, 0.82)),
    radial-gradient(circle at 20% 20%, rgba(177, 31, 25, 0.14), transparent 24%),
    repeating-linear-gradient(92deg, rgba(238, 86, 74, 0.06) 0 1px, transparent 1px 16px);
  box-shadow:
    inset 0 0 0 1px rgba(238, 86, 74, 0.18),
    inset 0 0 35px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(177, 31, 25, 0.34);
}

body.theme-artwork-active[data-theme-genre="horror"] :is(.channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel) {
  border-radius: 2px;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

body.theme-artwork-active[data-theme-id="cyberpunk"] :is(.channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel),
body.theme-artwork-active[data-theme-id="neon"] :is(.channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel),
body.theme-artwork-active[data-theme-id="space"] :is(.channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel),
body.theme-artwork-active[data-theme-id="tactical"] :is(.channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel),
body.theme-artwork-active[data-theme-genre="fps"] :is(.channels-panel, .main-panel, .info-panel, .settings-shell, .settings-card, .server-switcher, .room-header, .message-form, .hub-panel, .theme-card, .ai-main-card, .ai-preview-panel) {
  border-radius: 0;
  clip-path: polygon(0 12px, 12px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
}

body.theme-artwork-active[data-theme-genre="clean"] .app-shell::after,
body.theme-artwork-active[data-theme-genre="clean"] .settings-overlay::after {
  background: rgba(255, 255, 255, 0.14);
}

body.theme-artwork-active[data-theme-genre="clean"] :is(.settings-input, .settings-select, .settings-textarea, .message-form input, .global-search, .theme-search input, .theme-sort) {
  color: #111827;
}

.plugin-result-list,
.activity-feed-list {
  display: grid;
  gap: 12px;
}

.plugin-card,
.activity-feed-item,
.notification-center-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.plugin-card > span,
.activity-feed-item > span,
.notification-center-item > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: rgba(156, 100, 255, 0.13);
}

.plugin-card svg,
.activity-feed-item svg,
.notification-center-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.plugin-card p,
.activity-feed-item p,
.notification-center-item p {
  margin: 4px 0 0;
  color: #9ba5b8;
}

.plugin-card em,
.activity-feed-item em {
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

.notification-center-list {
  max-height: min(58vh, 520px);
  display: grid;
  gap: 10px;
  overflow-y: auto;
}

.compact-info-modal,
.notification-center-modal {
  width: min(620px, calc(100vw - 34px));
}

.havoc-ai-view {
  min-height: 100%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  padding: 18px;
  overflow: auto;
}

.ai-main-card,
.ai-preview-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(8, 12, 22, 0.78);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.ai-main-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.ai-builder-header,
.ai-config-head,
.ai-builder-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ai-builder-header h1,
.ai-hero h2,
.ai-config-head h3,
.ai-preview-panel h2,
.ai-preview-panel h3 {
  margin: 0;
}

.ai-builder-header p,
.ai-hero p,
.ai-config-head p,
.ai-help-box p {
  margin: 5px 0 0;
  color: #a6b0c1;
}

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

.ai-steps span {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #8994a7;
  font-weight: 900;
}

.ai-steps span::first-letter {
  color: #fff;
}

.ai-steps span.done,
.ai-steps span.active {
  color: #b78cff;
}

.ai-steps small {
  min-width: 0;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
}

.ai-hero {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 10%, rgba(156, 100, 255, 0.19), transparent 42%),
    rgba(255, 255, 255, 0.025);
}

.ai-mark {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(156, 100, 255, 0.52);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, rgba(156, 100, 255, 0.72), rgba(36, 99, 235, 0.5));
  font-size: 34px;
  font-weight: 950;
}

.ai-prompt {
  min-height: 86px;
  resize: vertical;
}

.ai-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.ai-option-grid button {
  min-height: 134px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  align-items: center;
  gap: 5px 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.ai-option-grid button.active {
  border-color: rgba(156, 100, 255, 0.72);
  background: rgba(156, 100, 255, 0.14);
}

.ai-option-grid svg {
  grid-row: 1 / 4;
  width: 44px;
  height: 44px;
  color: #b36cff;
  stroke: currentColor;
  fill: none;
}

.ai-option-grid small,
.ai-option-grid em {
  color: #a6b0c1;
}

.ai-option-grid em {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 7px;
  color: #d8c4ff;
  background: rgba(156, 100, 255, 0.14);
  font-style: normal;
  font-size: 12px;
}

.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ai-suggestions strong {
  flex: 0 0 100%;
}

.ai-suggestions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  padding: 0 14px;
  cursor: pointer;
}

.ai-suggestions button.active {
  border-color: rgba(156, 100, 255, 0.62);
  background: rgba(156, 100, 255, 0.18);
}

.ai-preview-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.ai-preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.ai-preview-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
}

.ai-preview-card div {
  padding: 14px;
}

.ai-preview-card span {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #caa9ff;
  background: rgba(156, 100, 255, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.ai-preview-panel section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.ai-preview-panel ul {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.ai-preview-panel li {
  display: flex;
  justify-content: space-between;
  color: #a6b0c1;
}

.ai-suggests-box p {
  margin: 9px 0 0;
  color: #b8f2bf;
}

.ai-help-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.ai-help-box p {
  grid-column: 1;
}

.ai-lock-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 5, 10, 0.62);
  backdrop-filter: blur(8px);
}

.ai-lock-overlay > div {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid rgba(156, 100, 255, 0.48);
  border-radius: 8px;
  text-align: center;
  background: rgba(8, 12, 22, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.ai-lock-overlay strong {
  color: #fff;
  font-size: 20px;
}

.ai-lock-overlay p {
  margin: 8px 0 0;
  color: #a6b0c1;
}

.theme-card {
  overflow: hidden;
}

.theme-card-preview {
  min-height: 116px;
}

@media (max-width: 1280px) {
  .workspace,
  .workspace.focus-view,
  .workspace.hub-focus-view,
  .workspace.ai-focus-view {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .workspace.hub-focus-view .info-panel {
    display: none;
  }

  .global-search {
    width: min(420px, 32vw);
  }

  .havoc-ai-view {
    grid-template-columns: 1fr;
  }

  .ai-preview-panel {
    grid-row: auto;
  }

  .ai-option-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .theme-gallery {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .live-feed.hub-live-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 860px) {
  .titlebar {
    padding: 0 12px;
    gap: 10px;
  }

  .brand-logo {
    width: 154px;
  }

  .global-search,
  .top-user-chip strong {
    display: none;
  }

  .workspace,
  .workspace.focus-view,
  .workspace.hub-focus-view,
  .workspace.ai-focus-view {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .app-sidebar {
    padding: 12px 8px 0;
  }

  .app-sidebar .rail-item {
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
  }

  .app-sidebar .rail-item b,
  .app-sidebar .rail-item em,
  .sidebar-server-section > span,
  .sidebar-server-row span,
  .sidebar-server-row em,
  .profile-chip > div:nth-child(2),
  .profile-chip .mini-gear {
    display: none;
  }

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

  .sidebar-favorite {
    display: none;
  }

  .profile-chip {
    justify-content: center;
    padding-inline: 0;
  }

  .ai-option-grid,
  .ai-steps {
    grid-template-columns: 1fr;
  }

  .havoc-ai-view {
    padding: 10px;
  }

  .theme-studio-header,
  .theme-studio-tools {
    grid-template-columns: 1fr;
  }

  .theme-gallery,
  .live-feed.hub-live-grid {
    grid-template-columns: 1fr;
  }

  .theme-action-bar {
    grid-template-columns: 1fr;
  }

  .hub-live-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
