:root {
  color-scheme: dark;
  --bg: #070b18;
  --rail: rgba(8, 14, 31, 0.48);
  --panel: rgba(13, 21, 42, 0.46);
  --panel-2: rgba(255, 255, 255, 0.085);
  --panel-3: rgba(255, 255, 255, 0.14);
  --chat: rgba(8, 13, 28, 0.34);
  --line: rgba(185, 210, 255, 0.28);
  --line-soft: rgba(198, 218, 255, 0.16);
  --text: #f4f7ff;
  --muted: #aab4d6;
  --faint: #7480a4;
  --red: #ff4d5e;
  --red-strong: #ff3348;
  --blue: #4f8cff;
  --blue-strong: #2f73f6;
  --amber: #ffbd4a;
  --glass-fill: rgba(14, 24, 49, 0.48);
  --glass-fill-strong: rgba(18, 31, 62, 0.62);
  --glass-shine: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 22px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --shadow: var(--glass-shadow);
  --wallpaper-image: none;
  --custom-gradient-a: #123a7a;
  --custom-gradient-b: #7a143f;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --rail: rgba(247, 250, 255, 0.82);
  --panel: rgba(246, 249, 255, 0.82);
  --panel-2: rgba(232, 238, 250, 0.86);
  --panel-3: rgba(215, 226, 246, 0.92);
  --chat: rgba(250, 252, 255, 0.8);
  --line: rgba(115, 132, 166, 0.34);
  --line-soft: rgba(128, 146, 180, 0.22);
  --text: #121826;
  --muted: #52617f;
  --faint: #7583a1;
  --shadow: 0 18px 56px rgba(62, 79, 115, 0.2);
  background: #edf3ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background:
    var(--wallpaper-image),
    radial-gradient(circle at 14% 18%, rgba(108, 82, 255, 0.42), transparent 34%),
    radial-gradient(circle at 82% 20%, rgba(47, 115, 246, 0.5), transparent 32%),
    linear-gradient(135deg, #070a18 0%, #0b1f58 52%, #081027 100%);
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(132deg, transparent 0 33%, rgba(205, 224, 255, 0.24) 34%, transparent 36%),
    radial-gradient(circle at 52% 2%, rgba(255, 255, 255, 0.22), transparent 15%),
    radial-gradient(circle at 68% 72%, rgba(0, 208, 255, 0.13), transparent 28%);
  content: "";
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(4, 7, 18, 0.26);
  content: "";
  pointer-events: none;
}

body[data-theme="light"]::before {
  background:
    linear-gradient(132deg, transparent 0 33%, rgba(82, 145, 255, 0.16) 34%, transparent 36%),
    radial-gradient(circle at 22% 8%, rgba(255, 255, 255, 0.82), transparent 20%),
    radial-gradient(circle at 72% 76%, rgba(79, 140, 255, 0.2), transparent 30%);
}

body[data-theme="light"]::after {
  background: rgba(238, 244, 255, 0.22);
}

body[data-theme="light"] .auth-screen {
  background: #edf3ff;
}

body[data-theme="light"] .auth-card,
body[data-theme="light"] .rail,
body[data-theme="light"] .sidebar,
body[data-theme="light"] .right-panel,
body[data-theme="light"] .chat-header,
body[data-theme="light"] .composer,
body[data-theme="light"] .voice-card,
body[data-theme="light"] .profile-bar,
body[data-theme="light"] .dm-search,
body[data-theme="light"] .name-dialog__box {
  border-color: rgba(104, 124, 161, 0.24);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.82), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(217, 230, 255, 0.42));
  color: var(--text);
  backdrop-filter: blur(34px) saturate(170%);
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
}

select {
  color-scheme: dark;
}

select option {
  background: #111d39;
  color: #f4f7ff;
}

body[data-theme="light"] select {
  color-scheme: light;
}

body[data-theme="light"] select option {
  background: #edf3ff;
  color: #121826;
}

body[data-theme="light"] .auth-form input:not([type="checkbox"]),
body[data-theme="light"] .auth-form select,
body[data-theme="light"] .composer > input:not([type]),
body[data-theme="light"] .voice-device-controls select,
body[data-theme="light"] .voice-music__form input,
body[data-theme="light"] .gif-url-form input {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
}

body[data-theme="light"] .rail__icon,
body[data-theme="light"] .rail__server-button:not(:has(img)),
body[data-theme="light"] .control-button,
body[data-theme="light"] .invite-friend-row,
body[data-theme="light"] .attachment-card,
body[data-theme="light"] .video-tile,
body[data-theme="light"] .voice-meter,
body[data-theme="light"] .voice-actions > .control-button:not(#joinVoiceButton),
body[data-theme="light"] .voice-music,
body[data-theme="light"] .message,
body[data-theme="light"] .mention-suggestions {
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(222, 234, 255, 0.3));
  color: var(--text);
  backdrop-filter: blur(24px) saturate(165%);
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 16%, rgba(108, 82, 255, 0.36), transparent 34%),
    radial-gradient(circle at 78% 22%, rgba(47, 115, 246, 0.42), transparent 32%),
    rgba(4, 8, 18, 0.78);
  backdrop-filter: blur(18px) saturate(150%);
}

.auth-screen[hidden] {
  display: none !important;
}

.auth-card {
  width: min(430px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid rgba(218, 230, 255, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(18, 31, 62, 0.42));
  backdrop-filter: blur(34px) saturate(170%);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 14px;
  margin-bottom: 18px;
  text-align: center;
}

.auth-brand img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.auth-brand h1 {
  margin: 3px 0 0;
  font-size: 1.35rem;
}

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

.auth-tabs button {
  height: 40px;
  border: 1px solid rgba(218, 232, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-weight: 850;
  backdrop-filter: blur(16px) saturate(145%);
}

.auth-tabs button.is-active {
  background: rgba(79, 140, 255, 0.22);
  color: var(--text);
}

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

.auth-form.is-active {
  display: flex;
}

.auth-form [hidden] {
  display: none !important;
}

.auth-verification-heading h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.auth-verification-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.auth-form .verification-code {
  height: 54px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 850;
  letter-spacing: 0.3em;
}

.auth-verification-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.auth-verification-actions button {
  padding: 6px 0;
  background: transparent;
  color: #a9c7ff;
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-verification-actions button:hover {
  color: #ffffff;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-form input:not([type="checkbox"]),
.auth-form select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  backdrop-filter: blur(18px) saturate(145%);
}

.check-row {
  flex-direction: row !important;
  align-items: center;
}

.auth-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: #ffd4d9;
  font-size: 0.86rem;
  font-weight: 780;
}

.auth-install-button {
  width: 100%;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.09);
  color: #d8e6ff;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.app-shell {
  display: grid;
  grid-template-columns: minmax(236px, 286px) minmax(0, 1fr) minmax(280px, 340px);
  grid-template-rows: 66px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
}

.rail {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), var(--rail));
  border-bottom: 1px solid rgba(220, 232, 255, 0.16);
  backdrop-filter: blur(34px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

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

.rail__side--left {
  justify-content: flex-end;
}

.rail__side--right {
  justify-content: flex-start;
  overflow: hidden;
}

.rail__brand,
.rail__icon,
.icon-button,
.send-button,
.control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--text);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.rail__brand {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  position: relative;
  width: 48px;
  height: 48px;
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: none;
}

.rail__brand img,
.server-icon-preview img,
.avatar img,
.member__avatar img,
.message__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail__brand img {
  display: block;
  width: 44px;
  height: 44px;
  margin: auto;
  object-fit: contain;
  object-position: center;
}

.rail__icon {
  width: 46px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.rail__icon.is-active {
  background: rgba(82, 145, 255, 0.24);
  color: #d8e6ff;
}

.rail__servers {
  display: flex;
  flex: 0 1 auto;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.rail__servers::-webkit-scrollbar {
  display: none;
}

.rail__server-button {
  position: relative;
  width: 46px;
  height: 46px;
  overflow: visible;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-weight: 950;
}

.rail__server-button.is-active {
  outline: 0;
  background: transparent;
}

.rail__server-button.is-active::after {
  position: absolute;
  right: 10px;
  bottom: -6px;
  left: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.rail__server-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
  user-select: none;
  -webkit-user-drag: none;
}

.rail__server-button:not(:has(img)) {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.rail__icon:hover,
.rail__icon:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.control-button:hover,
.control-button:focus-visible {
  transform: translateY(-1px);
  background: var(--panel-3);
  color: var(--text);
  outline: none;
}

.sidebar {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), var(--panel));
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(32px) saturate(165%);
}

.server-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.invite-friend-list {
  display: flex;
  max-height: min(420px, 60vh);
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.invite-friend-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(155%);
}

.invite-friend-row .member__avatar {
  width: 38px;
  height: 38px;
}

.invite-friend-row__name {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-card h1 {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: normal;
  font-size: 1.1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-only {
  display: none;
}

.owner-only.is-visible {
  display: inline-flex;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.22rem;
  line-height: 1.1;
}

h2 {
  font-size: 1.08rem;
  line-height: 1.2;
}

.server-card__badge,
.live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(79, 140, 255, 0.44);
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.12);
  color: #cfe0ff;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
  backdrop-filter: blur(14px) saturate(145%);
}

.channel-group {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
}

.channel-group:nth-of-type(2) {
  flex: 1;
}

.channel-group .group-title {
  justify-content: flex-end;
}

.channel-section-label {
  display: none;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.group-title__actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.group-title__actions .icon-button {
  width: 28px;
  height: 28px;
}

.channel-list,
.member-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.channel-row.has-actions {
  grid-template-columns: minmax(0, 1fr) 74px;
}

.channel-actions {
  display: grid;
  grid-template-columns: 34px 34px;
  gap: 4px;
}

.channel-button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  text-align: left;
}

.channel-button:hover,
.channel-button:focus-visible,
.channel-button.is-active {
  border-color: rgba(218, 232, 255, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(75, 133, 255, 0.11));
  color: var(--text);
  outline: none;
  backdrop-filter: blur(18px) saturate(145%);
}

.channel-button.is-active {
  box-shadow: inset 3px 0 0 rgba(111, 166, 255, 0.86), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.channel-button__name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-button__meta {
  min-width: 20px;
  color: var(--faint);
  font-size: 0.78rem;
  text-align: right;
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.icon-button.danger:hover,
.icon-button.danger:focus-visible,
.message__delete:hover,
.message__delete:focus-visible {
  background: rgba(255, 77, 94, 0.16);
  color: #ffd4d9;
  outline: none;
}

.icon-button svg,
.send-button svg,
.control-button svg,
.rail__icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.profile-bar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(16, 27, 55, 0.42));
  backdrop-filter: blur(26px) saturate(160%);
}

.spotify-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(218, 232, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 0%, rgba(48, 255, 142, 0.18), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(13, 27, 58, 0.5));
  backdrop-filter: blur(24px) saturate(165%);
  box-shadow: var(--glass-shadow);
}

.spotify-card[hidden] {
  display: none !important;
}

.spotify-card__main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.spotify-card__main > svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(42, 214, 113, 0.18);
  color: #37e682;
}

.spotify-card__main div {
  min-width: 0;
}

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

.spotify-card__main strong {
  color: #f4fff8;
  font-size: 0.86rem;
}

.spotify-card__main span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.spotify-card__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dm-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
  padding-top: 8px;
}

.dm-panel[hidden] {
  display: none !important;
}

.dm-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--faint);
  backdrop-filter: blur(22px) saturate(155%);
}

.dm-search svg {
  width: 16px;
  height: 16px;
}

.dm-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-weight: 760;
}

.dm-section-label {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dm-contact {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
}

.dm-contact.is-active,
.dm-contact:hover,
.dm-contact:focus-visible {
  border-color: rgba(218, 232, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(145%);
  outline: none;
}

.avatar,
.member__avatar,
.message__avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 950;
  text-transform: uppercase;
}

.avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(111, 166, 255, 0.85), rgba(82, 145, 255, 0.52));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.avatar-button {
  padding: 0;
}

.avatar.has-image,
.member__avatar.has-image,
.message__avatar.has-image {
  background: rgba(255, 255, 255, 0.08);
}

.profile-name {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.profile-stack {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.profile-status-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.profile-status-field span {
  display: inline-flex;
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-status-field select {
  min-width: 0;
}

.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

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

.glass-select__button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(218, 232, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(38, 53, 90, 0.88), rgba(12, 24, 50, 0.9));
  color: #f6f9ff;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px) saturate(165%);
  font-weight: 900;
  text-align: left;
}

.glass-select__button span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glass-select__button svg {
  justify-self: end;
  width: 18px;
  height: 18px;
  transition: transform 150ms ease;
}

.glass-select.is-open .glass-select__button svg {
  transform: rotate(180deg);
}

.glass-select__menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(218, 232, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(16, 27, 55, 0.96), rgba(8, 15, 33, 0.98));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(26px) saturate(170%);
}

.glass-select__menu button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #93a2c5;
  font-size: 0.9rem;
  font-weight: 850;
  text-align: left;
}

.glass-select__menu button.is-active,
.glass-select__menu button:hover,
.glass-select__menu button:focus-visible {
  background: rgba(94, 126, 190, 0.42);
  color: #ffffff;
  outline: none;
}

.profile-status-field .glass-select__button {
  grid-template-columns: minmax(0, 1fr) 14px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.66rem;
}

.profile-status-field .glass-select__button svg {
  width: 14px;
  height: 14px;
}

.profile-status-field .glass-select__menu {
  top: auto;
  bottom: calc(100% + 6px);
  min-width: 156px;
  left: auto;
  right: 0;
}

.profile-name span {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-name input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.presence-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(8, 14, 31, 0.92);
  border-radius: 999px;
  background: #7d879f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.presence-dot--online {
  background: #28d874;
}

.presence-dot--away {
  background: #ffbd4a;
}

.presence-dot--dnd {
  background: #ff4d5e;
}

.presence-dot--invisible,
.presence-dot--offline {
  background: #7d879f;
}

body[data-theme="light"] .presence-dot {
  border-color: rgba(244, 247, 251, 0.94);
}

body[data-theme="light"] .glass-select__button {
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(218, 232, 255, 0.62));
  color: #10182b;
  box-shadow:
    0 14px 34px rgba(62, 79, 115, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme="light"] .glass-select__menu {
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(145deg, rgba(242, 247, 255, 0.96), rgba(218, 230, 250, 0.98));
  box-shadow: 0 20px 54px rgba(62, 79, 115, 0.24);
}

body[data-theme="light"] .glass-select__menu button {
  color: #6c7898;
}

body[data-theme="light"] .glass-select__menu button.is-active,
body[data-theme="light"] .glass-select__menu button:hover,
body[data-theme="light"] .glass-select__menu button:focus-visible {
  background: rgba(82, 130, 210, 0.18);
  color: #10182b;
}

.chat-panel {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 26px auto;
  min-width: 0;
  min-height: 0;
  background-color: transparent;
  background-image:
    linear-gradient(rgba(6, 10, 23, 0.34), rgba(6, 10, 23, 0.46)),
    var(--wallpaper-image);
  background-position: center;
  background-size: cover;
}

body[data-wallpaper="default"] {
  --wallpaper-image: none;
}

body[data-wallpaper="red-blue"] {
  --wallpaper-image: repeating-linear-gradient(135deg, #2b1020 0 120px, #10294d 120px 240px, #181b29 240px 360px);
}

body[data-wallpaper="forest"] {
  --wallpaper-image: linear-gradient(145deg, #10281f 0%, #153b32 42%, #182137 100%);
}

body[data-wallpaper="violet"] {
  --wallpaper-image: linear-gradient(145deg, #28133d 0%, #202a54 52%, #461f3a 100%);
}

body[data-wallpaper="ocean"] {
  --wallpaper-image: linear-gradient(145deg, #082c36 0%, #0f4b57 46%, #172b4d 100%);
}

body[data-wallpaper="cherry"] {
  --wallpaper-image: linear-gradient(145deg, #351221 0%, #6e2139 48%, #27355d 100%);
}

body[data-wallpaper="custom"] {
  --wallpaper-image: var(--custom-wallpaper, none);
}

body[data-wallpaper="custom-gradient"] {
  --wallpaper-image: linear-gradient(135deg, var(--custom-gradient-a), var(--custom-gradient-b));
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(16, 28, 58, 0.34));
  backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.chat-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
}

.chat-header h2 span {
  color: var(--blue);
}

.header-actions {
  display: flex;
  gap: 6px;
}

.messages {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 22px;
  scrollbar-color: var(--line) transparent;
}

.empty-state {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-weight: 850;
  text-align: center;
}

.message {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  width: fit-content;
  min-width: min(520px, 100%);
  max-width: min(980px, 100%);
  min-height: 44px;
  padding: 7px 96px 7px 8px;
  border: 1px solid rgba(218, 232, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 15%, rgba(255, 255, 255, 0.18), transparent 12%),
    linear-gradient(105deg, rgba(255, 255, 255, 0.105), rgba(14, 27, 57, 0.48) 54%, rgba(7, 16, 39, 0.54));
  backdrop-filter: blur(26px) saturate(165%);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.18),
    0 0 18px rgba(30, 115, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.message:hover {
  border-color: rgba(226, 238, 255, 0.3);
  background:
    radial-gradient(circle at 8% 15%, rgba(255, 255, 255, 0.22), transparent 13%),
    linear-gradient(105deg, rgba(255, 255, 255, 0.14), rgba(19, 36, 72, 0.56) 54%, rgba(10, 22, 49, 0.62));
}

.message.is-highlighted {
  border-color: rgba(98, 163, 255, 0.8);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.32),
    0 0 0 2px rgba(79, 140, 255, 0.28),
    0 0 34px rgba(30, 115, 255, 0.28);
}

.message.is-mention {
  border-color: rgba(255, 189, 74, 0.7);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 189, 74, 0.2),
    0 0 28px rgba(255, 189, 74, 0.12);
}

.message__avatar {
  align-self: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(72, 148, 255, 0.56);
  background: rgba(19, 94, 255, 0.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 18px rgba(31, 119, 255, 0.42);
  color: #ffffff;
  font-size: 0.86rem;
}

.message__content {
  min-width: 0;
  align-self: center;
}

.message__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding-right: 0;
  line-height: 1.08;
}

.message__controls {
  position: absolute;
  top: 7px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.message__action,
.message__delete {
  position: static;
  display: grid;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(218, 232, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #2486ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(150%);
}

.message__action {
  order: 2;
}

.message__action[data-react-message] {
  order: 1;
}

.message__action[data-reply-message] {
  order: 2;
}

.message__delete {
  order: 3;
  border-color: rgba(255, 77, 94, 0.36);
  background: rgba(255, 77, 94, 0.1);
  color: #ff7a86;
}

.message__action:hover,
.message__delete:hover {
  border-color: rgba(104, 168, 255, 0.82);
  background: rgba(31, 118, 255, 0.22);
  color: #ffffff;
}

.message__action svg,
.message__delete svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.45;
}

.message__name {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message__time {
  flex: 0 0 auto;
  color: #6684c8;
  font-size: 0.82rem;
  font-weight: 800;
}

.message__body {
  margin: 1px 0 0;
  overflow-wrap: anywhere;
  color: #f6f9ff;
  font-size: 0.98rem;
  line-height: 1.38;
}

body[data-theme="light"] .message__body {
  color: #172033;
}

body[data-theme="light"] .message__name {
  color: #0f172a;
}

body[data-theme="light"] .message__time,
body[data-theme="light"] .message-reply {
  color: #66769a;
}

.message-reply {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  min-width: 0;
  gap: 7px;
  margin: 5px 0 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9aa7c4;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: left;
}

.message-reply:hover,
.message-reply:focus-visible {
  color: #c5d3f2;
}

.message-reply svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #1681ff;
  stroke-width: 2.55;
}

.message-reply span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-reply strong {
  color: #1681ff;
  font-weight: 950;
}

.message__body a {
  color: #a9c7ff;
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.message-reaction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(218, 232, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.2), transparent 40%),
    rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 850;
  backdrop-filter: blur(16px) saturate(150%);
}

.message-reaction.is-own {
  border-color: rgba(79, 140, 255, 0.62);
  background: rgba(79, 140, 255, 0.2);
}

.message-reaction img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.message-reaction small {
  color: var(--muted);
  font-size: 0.76rem;
}

.reaction-picker {
  position: fixed;
  z-index: 60;
  width: min(390px, calc(100vw - 16px));
  padding: 10px;
  border: 1px solid rgba(218, 232, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(18, 30, 62, 0.94), rgba(8, 14, 31, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(28px) saturate(170%);
}

.reaction-picker__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}

.reaction-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 9px;
  padding: 0 10px;
  border: 1px solid rgba(218, 232, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  backdrop-filter: blur(18px) saturate(150%);
}

.reaction-search svg {
  width: 16px;
  height: 16px;
}

.reaction-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-weight: 850;
}

.reaction-picker__tabs button,
.reaction-grid button {
  border: 1px solid rgba(218, 232, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-weight: 900;
  backdrop-filter: blur(16px) saturate(150%);
}

.reaction-picker__tabs button {
  min-height: 32px;
}

.reaction-picker__tabs button.is-active {
  border-color: rgba(79, 140, 255, 0.58);
  background: rgba(79, 140, 255, 0.22);
}

.reaction-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  max-height: 250px;
  overflow-y: auto;
}

.reaction-grid button {
  min-height: 38px;
  font-size: 1.22rem;
}

.reaction-grid button:hover,
.reaction-grid button:focus-visible {
  border-color: rgba(104, 168, 255, 0.8);
  background: rgba(79, 140, 255, 0.2);
  outline: none;
}

.reaction-picker__custom {
  display: grid;
  gap: 8px;
}

.reaction-picker__custom[hidden] {
  display: none !important;
}

.reaction-picker__custom input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(218, 232, 255, 0.2);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0 11px;
  font-weight: 850;
}

.custom-reaction-preview {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(218, 232, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.custom-reaction-preview[hidden] {
  display: none !important;
}

.custom-reaction-preview img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.custom-reaction-preview span {
  min-width: 0;
  color: var(--text);
  font-weight: 850;
}

.reaction-empty {
  grid-column: 1 / -1;
  min-height: 72px;
}

body[data-theme="light"] .reaction-picker {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(145deg, rgba(245, 249, 255, 0.96), rgba(218, 230, 250, 0.96));
  box-shadow: 0 24px 70px rgba(62, 79, 115, 0.25);
}

.game-invite {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin-top: 5px;
  padding: 9px;
  border: 1px solid rgba(111, 166, 255, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(24, 62, 128, 0.28));
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.game-invite__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: rgba(13, 105, 255, 0.24);
  color: #77b5ff;
}

.game-invite__main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.game-invite__main strong {
  color: var(--text);
  font-size: 0.86rem;
}

.game-invite__main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-invite__button {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  font-size: 0.78rem;
}

.mention {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(79, 140, 255, 0.16);
  color: #cfe0ff;
  font-weight: 850;
}

.mention--self {
  background: rgba(255, 189, 74, 0.2);
  color: #ffe3a1;
}

.attachment-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: min(460px, 100%);
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(150%);
}

.attachment-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-card small {
  color: var(--faint);
}

.attachment-card--image {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.attachment-card--image img {
  max-width: min(340px, 100%);
  max-height: 260px;
  border-radius: 8px;
  object-fit: contain;
}

.typing {
  min-height: 26px;
  padding: 0 26px;
  color: var(--faint);
  font-size: 0.85rem;
}

.composer {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 74px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(10, 18, 40, 0.42));
  backdrop-filter: blur(30px) saturate(170%);
}

.mention-suggestions {
  position: absolute;
  right: 64px;
  bottom: calc(100% - 8px);
  left: 86px;
  z-index: 8;
  display: grid;
  max-height: 238px;
  overflow-y: auto;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(218, 232, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(18, 31, 62, 0.86), rgba(8, 15, 36, 0.82));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px) saturate(170%);
}

.mention-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.mention-suggestion:hover,
.mention-suggestion:focus-visible,
.mention-suggestion.is-active {
  border-color: rgba(104, 168, 255, 0.38);
  background: rgba(79, 140, 255, 0.16);
  outline: none;
}

.mention-suggestion__avatar {
  display: none;
}

.mention-suggestion span {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-suggestions__title {
  padding: 2px 4px 4px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.command-suggestion {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
}

.command-suggestion small {
  min-width: 0;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-preview {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(79, 140, 255, 0.24);
  border-radius: 8px;
  background: rgba(79, 140, 255, 0.1);
}

.reply-preview div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.reply-preview strong,
.reply-preview span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-preview strong {
  color: var(--text);
  font-size: 0.82rem;
}

.reply-preview span {
  color: var(--muted);
  font-size: 0.8rem;
}

.composer input[type="text"],
.composer > input:not([type]) {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0 14px;
  backdrop-filter: blur(18px) saturate(145%);
}

.composer input:focus {
  border-color: rgba(79, 140, 255, 0.68);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

.attachment-preview {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(79, 140, 255, 0.28);
  border-radius: 8px;
  background: rgba(79, 140, 255, 0.09);
  color: var(--muted);
  font-size: 0.86rem;
}

.attachment-preview span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.send-button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff4d5e, #2f73f6);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(47, 115, 246, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.send-button:hover,
.send-button:focus-visible,
.control-button.primary:hover,
.control-button.primary:focus-visible {
  transform: translateY(-1px);
  background: var(--red-strong);
  outline: none;
}

.right-panel {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), var(--panel));
  border-left: 1px solid var(--line-soft);
  backdrop-filter: blur(32px) saturate(165%);
}

.voice-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(218, 232, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(93, 127, 190, 0.58), rgba(18, 39, 88, 0.54) 52%, rgba(12, 27, 64, 0.58));
  backdrop-filter: blur(34px) saturate(170%);
  box-shadow: var(--shadow);
}

.voice-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.voice-card__right {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  min-width: 0;
}

.voice-avatars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: end;
  min-width: 0;
  padding-left: 7px;
}

.voice-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: -7px;
  overflow: hidden;
  border: 2px solid rgba(220, 232, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 950;
}

.voice-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-pill {
  border-color: rgba(255, 77, 94, 0.38);
  background: rgba(255, 77, 94, 0.12);
  color: #ffd4d9;
}

.live-pill.is-live {
  border-color: rgba(79, 140, 255, 0.5);
  background: rgba(79, 140, 255, 0.14);
  color: #cfe0ff;
}

.voice-meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 8px;
  height: 72px;
  padding: 12px;
  border: 1px solid rgba(218, 232, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.18), transparent 34%),
    rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.voice-meter span {
  display: block;
  height: 22%;
  min-height: 10px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, rgba(111, 166, 255, 0.95), rgba(47, 115, 246, 0.78));
  opacity: 0.58;
  transition: height 100ms linear;
}

.voice-meter.is-live span {
  opacity: 1;
}

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

.video-tile {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.video-tile::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  content: "Camera";
  font-size: 0.78rem;
  font-weight: 850;
}

.video-tile video,
.video-tile img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  background: rgba(4, 8, 18, 0.42);
}

.video-tile.is-screen video,
.video-tile.is-screen img {
  object-fit: contain;
}

.video-tile span {
  position: absolute;
  z-index: 2;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(10, 18, 40, 0.58);
  color: #ffffff;
  backdrop-filter: blur(14px) saturate(150%);
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 10px;
}

.voice-device-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.voice-device-controls label {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.voice-device-controls label > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.voice-device-controls select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0 9px;
  outline: none;
  text-overflow: ellipsis;
  backdrop-filter: blur(18px) saturate(145%);
}

.voice-music {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(218, 232, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(13, 25, 54, 0.58));
  backdrop-filter: blur(28px) saturate(170%);
  box-shadow: var(--glass-shadow);
}

.voice-music__header,
.voice-music__form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.voice-music__form input,
.gif-url-form input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0 10px;
  backdrop-filter: blur(18px) saturate(145%);
}

.voice-music__player:empty {
  display: none;
}

.music-suggestions:empty {
  display: none;
}

.music-suggestion {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(218, 232, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(30, 91, 190, 0.18));
  color: #eef5ff;
  font-size: 0.82rem;
  font-weight: 850;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(155%);
}

.music-suggestion:hover,
.music-suggestion:focus-visible {
  border-color: rgba(104, 168, 255, 0.58);
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(30, 112, 255, 0.26));
  outline: none;
}

.music-suggestion span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-suggestion__meta {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.music-suggestion__meta strong,
.music-suggestion__meta small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-suggestion__meta small {
  color: var(--faint);
  font-size: 0.72rem;
}

.voice-music__player iframe {
  display: block;
  width: 100%;
  height: 152px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(4, 8, 18, 0.52);
}

.voice-music small {
  color: var(--faint);
}

.youtube-music-host {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(4, 8, 18, 0.52);
}

.youtube-music-host iframe {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
}

.music-enable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  gap: 8px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid rgba(218, 232, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(47, 115, 246, 0.28));
  color: #ffffff;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 26px rgba(47, 115, 246, 0.18);
}

.music-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.message-gif {
  position: relative;
  width: fit-content;
  max-width: min(420px, 100%);
  margin-top: 7px;
}

.message-gif img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: 8px;
  object-fit: contain;
}

.gif-save-button,
.gif-favorite__remove {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(16, 28, 58, 0.62);
  color: #ffffff;
  backdrop-filter: blur(16px) saturate(150%);
}

.gif-save-button.is-saved {
  background: rgba(79, 140, 255, 0.84);
}

.gif-dialog {
  width: min(650px, calc(100vw - 32px));
}

.gif-url-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.gif-favorites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  max-height: min(52vh, 460px);
  overflow-y: auto;
}

.gif-favorite {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.gif-favorite > button:first-child {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
}

.gif-favorite img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@supports (backdrop-filter: blur(20px)) {
  .rail {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(8, 14, 31, 0.46));
    backdrop-filter: blur(34px) saturate(180%);
  }

  .sidebar,
  .right-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(13, 21, 42, 0.48));
    backdrop-filter: blur(32px) saturate(165%);
  }

  .chat-header,
  .composer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(10, 18, 40, 0.42));
    backdrop-filter: blur(30px) saturate(170%);
  }

  .voice-card,
  .profile-bar,
  .dm-search,
  .name-dialog__box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(18, 32, 66, 0.5));
    backdrop-filter: blur(34px) saturate(170%);
    box-shadow: var(--glass-shadow);
  }
}

.screen-source-dialog .name-dialog__box {
  width: min(820px, calc(100vw - 32px));
}

.screen-source-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  max-height: min(62vh, 620px);
  overflow-y: auto;
}

.screen-source-item {
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 8px;
  text-align: left;
  backdrop-filter: blur(18px) saturate(145%);
}

.screen-source-item:hover,
.screen-source-item:focus-visible,
.screen-source-item.is-selected {
  border-color: var(--blue);
  background: rgba(79, 140, 255, 0.12);
}

.screen-source-item.is-selected {
  box-shadow:
    0 0 0 2px rgba(79, 140, 255, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.screen-source-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  background: rgba(4, 8, 18, 0.44);
  object-fit: contain;
}

.screen-source-item span {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wumped-desktop #downloadWindowsButton {
  display: none;
}

.control-button {
  min-width: 44px;
  height: 44px;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid rgba(218, 232, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-weight: 850;
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.control-button.primary {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(255, 77, 94, 0.92), rgba(47, 115, 246, 0.92));
  color: #ffffff;
}

.control-button.is-danger {
  background: rgba(255, 77, 94, 0.14);
  color: #ffd4d9;
}

.control-button.is-danger:hover,
.control-button.is-danger:focus-visible {
  background: rgba(255, 77, 94, 0.24);
  color: #ffffff;
}

body[data-theme="light"] .control-button.is-danger {
  background: rgba(227, 52, 69, 0.1);
  color: #ab1f31;
}

.control-button.is-join {
  border-color: rgba(113, 255, 178, 0.28);
  background: linear-gradient(135deg, rgba(31, 167, 90, 0.92), rgba(70, 190, 132, 0.78));
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(31, 167, 90, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.control-button.is-join:hover,
.control-button.is-join:focus-visible {
  background: linear-gradient(135deg, rgba(38, 191, 105, 0.96), rgba(85, 214, 151, 0.82));
  outline: none;
}

.control-button.is-leave {
  border-color: rgba(255, 140, 152, 0.28);
  background: linear-gradient(135deg, rgba(227, 52, 69, 0.92), rgba(255, 77, 94, 0.76));
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(227, 52, 69, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.control-button.is-leave:hover,
.control-button.is-leave:focus-visible {
  background: linear-gradient(135deg, rgba(255, 77, 94, 0.96), rgba(227, 52, 69, 0.82));
  outline: none;
}

.control-button.is-active {
  border-color: rgba(111, 166, 255, 0.38);
  background: rgba(79, 140, 255, 0.22);
  color: #d8e6ff;
}

.voice-actions #joinVoiceButton {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: 0 16px;
}

.voice-actions #joinVoiceButton span {
  overflow: visible;
  white-space: nowrap;
}

.voice-actions > .control-button:not(#joinVoiceButton) {
  justify-self: center;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid rgba(218, 232, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: #d8deed;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(150%);
}

.voice-actions > .control-button:not(#joinVoiceButton):hover,
.voice-actions > .control-button:not(#joinVoiceButton):focus-visible {
  border-color: rgba(79, 140, 255, 0.55);
  background: rgba(79, 140, 255, 0.16);
  color: #ffffff;
}

.voice-actions > .control-button:not(#joinVoiceButton).is-active {
  border-color: rgba(79, 140, 255, 0.72);
  background: rgba(79, 140, 255, 0.24);
  color: #ffffff;
}

.voice-actions > .control-button:not(#joinVoiceButton) svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

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

.member {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
}

.member:hover {
  border-color: rgba(218, 232, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(145%);
}

.member--clickable {
  cursor: pointer;
}

.member.is-open,
.member--clickable:focus-within {
  border-color: rgba(111, 166, 255, 0.28);
  background: rgba(79, 140, 255, 0.12);
  backdrop-filter: blur(18px) saturate(145%);
}

.member--offline {
  opacity: 0.62;
}

.member--offline:hover,
.member--offline.is-open,
.member--offline:focus-within {
  opacity: 0.92;
}

.member--offline .member__avatar {
  filter: grayscale(0.45);
}

.member__avatar {
  width: 32px;
  height: 32px;
  background: var(--blue);
  font-size: 0.84rem;
}

.member__main {
  min-width: 0;
}

.member__name {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member__pause {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 77, 94, 0.16);
  color: #ffd4d9;
  font-size: 0.72rem;
}

.member__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
}

.member__status svg {
  width: 15px;
  height: 15px;
}

.member__mute {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  color: var(--faint);
}

.member__mute:hover,
.member__mute:focus-visible {
  color: var(--text);
}

.member__hint {
  margin-top: 2px;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dm-group-members {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.dm-group-member {
  display: grid;
  grid-template-columns: 22px 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 800;
  backdrop-filter: blur(18px) saturate(145%);
}

.dm-group-member input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.dm-group-member .member__avatar {
  width: 34px;
  height: 34px;
}

.dm-group-limit {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 760;
}

.dm-group-limit.is-full {
  color: #ffd4d9;
}

.person-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(218, 232, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 850;
  backdrop-filter: blur(16px) saturate(145%);
}

.person-action svg {
  width: 14px;
  height: 14px;
}

.person-action:hover,
.person-action:focus-visible {
  background: rgba(79, 140, 255, 0.2);
  outline: none;
}

.person-action.is-done {
  color: #cfe0ff;
}

.member__breaks {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}

.member__volume {
  display: grid;
  grid-template-columns: 16px minmax(70px, 1fr) 42px;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 850;
}

.member__volume svg {
  width: 15px;
  height: 15px;
}

.member__volume input {
  width: 100%;
  min-width: 0;
  accent-color: var(--blue);
}

.member__volume span {
  color: var(--muted);
  text-align: right;
}

.member__breaks button {
  min-width: 34px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 77, 94, 0.14);
  color: #ffd4d9;
  font-size: 0.74rem;
  font-weight: 850;
}

.member__breaks .is-ban {
  background: rgba(255, 77, 94, 0.16);
  color: #ffd4d9;
}

.moderation-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  width: min(260px, calc(100vw - 24px));
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(218, 232, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(18, 31, 62, 0.88), rgba(8, 15, 36, 0.9));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(30px) saturate(175%);
}

.moderation-menu[hidden] {
  display: none;
}

.moderation-menu__title {
  padding: 5px 8px 7px;
  color: var(--faint);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.moderation-menu__row {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.moderation-menu__row span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.moderation-menu button {
  min-height: 30px;
  border-radius: 7px;
  padding: 0 9px;
  background: rgba(79, 140, 255, 0.16);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 900;
}

.moderation-menu button:hover,
.moderation-menu button:focus-visible {
  background: rgba(79, 140, 255, 0.3);
  outline: none;
}

.moderation-menu .is-danger {
  width: 100%;
  justify-content: flex-start;
  background: rgba(255, 77, 94, 0.16);
  color: #ffd4d9;
}

.server-bans {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.server-ban-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border-radius: 8px;
  background: rgba(8, 10, 17, 0.56);
}

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

.server-ban-row .control-button {
  height: 34px;
  padding: 0 10px;
  color: #ffd4d9;
}

body.voice-floating .right-panel {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: block;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  pointer-events: none;
}

body.voice-floating .right-panel > .panel-section {
  display: none;
}

body.voice-floating .voice-card {
  position: fixed;
  top: 82px;
  right: 18px;
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  pointer-events: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.voice-floating .voice-card__top {
  cursor: grab;
  touch-action: none;
}

body.voice-floating .voice-card__top:active {
  cursor: grabbing;
}

.member__breaks button:hover,
.member__breaks button:focus-visible {
  background: rgba(255, 77, 94, 0.26);
  outline: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(16, 28, 58, 0.68));
  backdrop-filter: blur(26px) saturate(165%);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

.name-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(16, 28, 58, 0.68));
  backdrop-filter: blur(34px) saturate(170%);
  color: var(--text);
  box-shadow: var(--shadow);
}

.name-dialog::backdrop {
  background: rgba(3, 7, 18, 0.58);
  backdrop-filter: blur(8px);
}

.name-dialog__box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.name-dialog__header,
.name-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-field span {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dialog-field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0 12px;
  font-weight: 850;
  backdrop-filter: blur(18px) saturate(145%);
}

.dialog-field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0 12px;
  font-weight: 850;
  backdrop-filter: blur(18px) saturate(145%);
}

.dialog-field input:focus {
  border-color: rgba(79, 140, 255, 0.68);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}

.name-dialog__actions {
  justify-content: flex-end;
}

.server-icon-field {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.server-icon-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-weight: 950;
}

.settings-dialog {
  width: min(500px, calc(100vw - 32px));
}

.settings-dialog .dialog-field span,
.settings-dialog .wallpaper-field legend,
.settings-dialog .gradient-builder span,
.settings-dialog .settings-check span {
  color: #ffffff;
}

.settings-device-controls {
  display: grid;
  gap: 10px;
}

.settings-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 850;
  backdrop-filter: blur(18px) saturate(145%);
}

.settings-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.settings-spotify {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px) saturate(145%);
}

.settings-spotify__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-device-controls .dialog-field {
  margin: 0;
}

.settings-security {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(150%);
}

.settings-security strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.settings-security small,
.dialog-note {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.45;
}

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

.settings-security__actions .settings-action {
  min-height: 40px;
}

.totp-dialog {
  width: min(430px, calc(100vw - 32px));
}

.totp-qr {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.totp-qr img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.wallpaper-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.wallpaper-field legend {
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.wallpaper-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 8px;
}

.wallpaper-swatch {
  position: relative;
  height: 54px;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #ffffff;
  overflow: hidden;
}

.wallpaper-swatch.is-active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--blue);
}

.wallpaper-swatch--default {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(16, 28, 58, 0.6));
}

.wallpaper-swatch--red-blue {
  background: linear-gradient(135deg, #8e2333, #174b94);
}

.wallpaper-swatch--forest {
  background: linear-gradient(135deg, #153b32, #182137);
}

.wallpaper-swatch--violet {
  background: linear-gradient(135deg, #5a287f, #294f94);
}

.wallpaper-swatch--ocean {
  background: linear-gradient(135deg, #0f6672, #294f94);
}

.wallpaper-swatch--cherry {
  background: linear-gradient(135deg, #8d2948, #344c8e);
}

.wallpaper-swatch--custom {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(79, 140, 255, 0.24));
}

.gradient-builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.gradient-builder label {
  display: grid;
  gap: 6px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.gradient-builder input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.gradient-builder .control-button {
  grid-column: 1 / -1;
}

.settings-action {
  width: 100%;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  text-decoration: none;
}

.server-icon-preview img {
  object-fit: contain;
  object-position: center;
}

.server-icon-preview:not(:has(img)) {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(145%);
}

audio {
  display: none;
}

body.voice-expanded {
  overflow: hidden;
}

body.voice-expanded .app-shell {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.voice-expanded .rail,
body.voice-expanded .sidebar,
body.voice-expanded .chat-panel {
  display: none;
}

body.voice-expanded .right-panel {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  grid-template-rows: minmax(0, 1fr);
  gap: 18px;
  height: 100vh;
  padding: 18px;
  overflow: hidden;
}

body.voice-expanded .voice-card {
  min-height: 0;
}

body.voice-expanded .video-grid {
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  min-height: 0;
}

body.voice-expanded .video-tile {
  min-height: 260px;
}

body.voice-expanded .video-tile video,
body.voice-expanded .video-tile img {
  min-height: 260px;
}

body.voice-expanded .right-panel > .panel-section[aria-label="In voice"] {
  min-height: 0;
  overflow-y: auto;
}

body.voice-expanded .right-panel > .panel-section[aria-label="Members"] {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(224px, 270px) minmax(0, 1fr);
    grid-template-rows: 66px minmax(0, 1fr);
  }

  .right-panel {
    display: none;
  }

  body.voice-expanded .right-panel {
    display: grid;
  }
}

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

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
    min-height: 100vh;
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 4;
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    justify-content: flex-start;
    min-height: 66px;
    border-bottom: 1px solid #202538;
  }

  .rail__icon,
  .rail__brand {
    width: 42px;
    height: 42px;
  }

  .sidebar,
  .right-panel {
    grid-column: 1;
    grid-row: auto;
    display: flex;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .chat-panel {
    grid-column: 1;
    grid-row: auto;
    min-height: 640px;
  }

  .chat-header,
  .composer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .messages {
    padding: 14px;
  }

  body.voice-expanded .app-shell {
    min-height: 100vh;
  }

  body.voice-expanded .right-panel {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 1fr;
    height: 100vh;
  }
}

@media (max-width: 520px) {
  .server-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .server-card__badge {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .channel-row.has-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-actions {
    justify-content: end;
  }

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

  .message {
    grid-template-columns: 32px minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    min-height: 48px;
    gap: 8px;
    padding: 8px 92px 8px 8px;
  }

  .message__avatar {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }

  .message__action,
  .message__delete {
    width: 29px;
    height: 29px;
  }

  .message__name {
    font-size: 1rem;
  }

  .message__time,
  .message__body,
  .message-reply {
    font-size: 0.94rem;
  }

  .voice-actions {
    grid-template-columns: repeat(4, minmax(42px, 1fr));
  }
}
