: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%, rgba(86, 105, 127, 0.12), transparent 34rem),
    linear-gradient(130deg, #070a0f 0%, #0c1017 42%, #080a0f 100%);
  overflow: hidden;
}

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

button {
  color: inherit;
}

.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.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);
}

.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: 16px;
  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: 24px;
  color: #7d8799;
  font-size: 18px;
}

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

.rail,
.channels-panel,
.main-panel,
.info-panel {
  min-height: 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 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;
}

.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;
}

.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-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-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
}

.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;
}

.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);
}

.live-card {
  grid-template-columns: 118px minmax(0, 1fr) auto;
  min-height: 92px;
}

.live-thumb {
  width: 118px;
  height: 66px;
  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 {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 89, 117, 0.8);
  font-size: 11px;
}

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

.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;
}

.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 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);
}

.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);
  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;
}

.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;
}

@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;
  }

  .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%;
  }

  .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;
  }
}
