:root {
  color-scheme: dark;
  --bg: #111214;
  --rail: #1e1f22;
  --panel: #2b2d31;
  --panel-strong: #35373c;
  --panel-soft: #383a40;
  --surface: #313338;
  --surface-high: #3f4147;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f2f3f5;
  --muted: #b5bac1;
  --subtle: #80848e;
  --accent: #5865f2;
  --accent-strong: #4752c4;
  --accent-2: #f0b232;
  --accent-3: #00a8fc;
  --danger: #ed4245;
  --good: #23a55a;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: calc(16px * var(--font-scale, 1));
  overflow: hidden;
}

body.theme-light {
  color-scheme: light;
  --bg: #f4f6f7;
  --rail: #e7ecef;
  --panel: #ffffff;
  --panel-strong: #eef2f4;
  --panel-soft: #dfe7ea;
  --surface: #ffffff;
  --surface-high: #edf2f4;
  --line: rgba(20, 30, 36, 0.13);
  --text: #172026;
  --muted: #56646b;
  --subtle: #74848c;
}

body.theme-dim {
  --bg: #17191f;
  --rail: #1d2028;
  --panel: #222630;
  --panel-strong: #2a303b;
  --surface: #1b1f27;
  --surface-high: #252b35;
}

body.high-contrast {
  --line: rgba(255, 255, 255, 0.22);
  --muted: #d2dcdd;
  --subtle: #b2c0c3;
}

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

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

button {
  border: 0;
}

.app-shell {
  min-height: 100%;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(24px, 6vw, 64px);
  background:
    linear-gradient(135deg, rgba(49, 208, 170, 0.14) 0%, transparent 34%),
    linear-gradient(215deg, rgba(88, 101, 242, 0.18) 0%, transparent 40%),
    var(--bg);
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 36, 43, 0.94);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-hero {
  max-width: 620px;
}

.auth-hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 18px;
  font-weight: 900;
}

.auth-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-hero h2 {
  margin: 0 0 16px;
  max-width: 560px;
  font-size: 60px;
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-hero p {
  max-width: 520px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
  max-width: 430px;
  margin-top: 26px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 36, 43, 0.78);
  color: var(--text);
  padding: 0 12px;
  font-weight: 800;
}

.auth-feature svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.auth-logo {
  margin-bottom: 18px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.auth-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.auth-form input:focus {
  border-color: rgba(49, 208, 170, 0.65);
  box-shadow: 0 0 0 3px rgba(49, 208, 170, 0.12);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.auth-links button,
.auth-reset-link {
  min-height: 34px;
  border-radius: 999px;
  background: var(--surface-high);
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
  text-decoration: none;
}

.auth-links button:hover,
.auth-reset-link:hover {
  color: var(--text);
  background: rgba(49, 208, 170, 0.16);
}

.auth-message {
  margin-top: 14px;
  border: 1px solid rgba(49, 208, 170, 0.22);
  border-radius: 8px;
  background: rgba(49, 208, 170, 0.09);
  color: #d8fff5;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-reset-link {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
}

@media (max-width: 860px) {
  .auth-page {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .auth-hero {
    max-width: 440px;
  }

  .auth-hero h2 {
    font-size: 36px;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }
}

.workspace {
  display: grid;
  grid-template-columns: 72px 286px minmax(0, 1fr) 280px;
  height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(49, 208, 170, 0.08), transparent 28rem),
    linear-gradient(135deg, rgba(244, 180, 95, 0.05), transparent 24rem),
    var(--bg);
}

body.dm-open .workspace {
  grid-template-columns: 72px 286px minmax(0, 1fr) 338px;
}

body.dm-call-main-open .workspace {
  grid-template-columns: 72px 286px minmax(0, 1fr);
}

.server-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  background: var(--rail);
  border-right: 1px solid var(--line);
  overflow-x: visible;
}

.brand-mark,
.server-pill,
.icon-button,
.avatar,
.small-avatar,
.voice-participant-avatar,
.status-dot,
.reaction,
.member-status {
  display: inline-grid;
  place-items: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), #168d78);
  color: #07201d;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: var(--shadow);
}

.rail-separator {
  width: 36px;
  height: 1px;
  background: var(--line);
}

.server-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
  overflow-x: visible;
  overflow-y: auto;
  padding: 2px 4px;
}

.server-pill {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #fff;
  background: var(--panel-soft);
  cursor: pointer;
  transition: transform 150ms ease, border-radius 150ms ease, box-shadow 150ms ease;
}

.server-home-pill {
  position: relative;
}

.server-pill::before,
.server-home-pill::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  width: 4px;
  height: 0;
  border-radius: 0 999px 999px 0;
  background: var(--text);
  transform: translateY(-50%);
  opacity: 0;
  transition: height 150ms ease, opacity 150ms ease;
}

.server-pill.has-activity:not(.active)::before,
.server-home-pill.has-activity:not(.active)::before {
  height: 10px;
  opacity: 0.86;
}

.server-pill.has-mention:not(.active)::before,
.server-home-pill.has-mention:not(.active)::before {
  height: 16px;
}

.server-pill:hover::before,
.server-home-pill:hover::before {
  height: 18px;
  opacity: 1;
}

.server-pill.active::before,
.server-home-pill.active::before {
  height: 38px;
  opacity: 1;
}

.server-pill:hover,
.server-pill.active {
  transform: translateY(-1px);
  border-radius: 6px;
}

.server-pill.active {
  box-shadow: 0 0 0 2px rgba(49, 208, 170, 0.55);
}

.server-pill .unread-badge,
.server-pill .mention-count-badge,
.server-home-pill .mention-count-badge,
.channel-row .unread-badge,
.channel-row .mention-count-badge {
  position: absolute;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
}

.server-pill .mention-count-badge,
.server-home-pill .mention-count-badge,
.channel-row .mention-count-badge {
  background: #ed4245;
  box-shadow: 0 0 0 2px var(--rail);
}

.server-pill .unread-badge {
  top: -3px;
  right: -1px;
}

.server-pill .mention-count-badge {
  right: -6px;
  bottom: -5px;
  min-width: 22px;
}

.server-home-pill .mention-count-badge {
  top: -4px;
  right: -6px;
  min-width: 19px;
}

.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.icon-button:hover,
.icon-button.active {
  background: rgba(49, 208, 170, 0.14);
  color: var(--accent);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.38;
  transform: none;
}

.icon-button:disabled:hover {
  background: var(--panel-strong);
  color: var(--muted);
}

.topbar-count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 0 5px;
}

.icon-button:active,
.primary-action:active,
.ghost-action:active {
  transform: translateY(1px);
}

.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(29, 36, 43, 0.96);
  border-right: 1px solid var(--line);
}

.server-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.server-title {
  min-width: 0;
}

.server-title-button {
  display: grid;
  width: 100%;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.server-title-button:hover {
  color: #fff;
}

.server-title h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0;
}

.server-caret {
  color: var(--muted);
  font-size: 12px;
}

.server-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 10px;
}

.friends-sidebar {
  background: rgba(18, 21, 26, 0.98);
}

.dm-search {
  position: relative;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

.dm-search input {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-high);
  color: var(--text);
  outline: none;
  padding: 0 38px 0 12px;
}

.dm-search input:focus {
  border-color: rgba(49, 208, 170, 0.65);
  box-shadow: 0 0 0 3px rgba(49, 208, 170, 0.12);
}

.dm-search > .icon {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 17px;
  height: 17px;
  color: var(--subtle);
  pointer-events: none;
}

.dm-search .search-clear {
  top: 12px;
  right: 10px;
}

.dm-nav {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.dm-nav-row,
.dm-row,
.server-quick-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
}

.dm-nav-row.active,
.dm-nav-row:hover,
.dm-row:hover,
.server-quick-row:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.dm-nav-row .icon,
.server-quick-row .icon {
  width: 20px;
  height: 20px;
}

.dm-nav-alert-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 0 5px;
}

.server-quick-links {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.server-quick-row {
  min-height: 38px;
  color: var(--muted);
  text-align: left;
}

.dm-row {
  position: relative;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  min-height: 48px;
  padding: 6px;
  outline: none;
}

.dm-row.active {
  background: var(--panel-strong);
  color: var(--text);
}

.dm-row.incoming-call {
  background: rgba(35, 165, 89, 0.13);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(35, 165, 89, 0.34);
}

.dm-row.incoming-call::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 4px;
  height: 18px;
  border-radius: 0 999px 999px 0;
  background: var(--good);
  transform: translateY(-50%);
}

.dm-row.incoming-call .small-avatar {
  box-shadow: 0 0 0 2px rgba(35, 165, 89, 0.42);
}

.dm-row.incoming-call .friend-meta span,
.dm-row.active-call .friend-meta span {
  color: var(--good);
}

.dm-row.has-unread:not(.active) {
  color: var(--text);
  font-weight: 800;
}

.dm-row.has-unread::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 4px;
  height: 8px;
  border-radius: 0 999px 999px 0;
  background: var(--text);
  opacity: 0.9;
  transform: translateY(-50%);
}

.dm-row.has-mention::before {
  height: 13px;
  background: var(--danger);
}

.dm-row.active::before {
  opacity: 0;
}

.dm-row.incoming-call::before,
.dm-row.incoming-call.active::before {
  height: 18px;
  background: var(--good);
  opacity: 1;
}

.dm-row:focus-visible {
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 2px rgba(88, 101, 242, 0.72);
}

.dm-row-activity {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 20px;
}

.dm-row-activity .unread-badge,
.dm-row-activity .mention-count-badge {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 17px;
  padding: 0 5px;
}

.dm-row-activity .unread-badge {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.dm-call-badge {
  display: inline-grid;
  min-width: 36px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 18px;
  padding: 0 6px;
  animation: dmIncomingPulse 1.3s ease-in-out infinite;
}

.dm-row:hover .dm-row-activity {
  display: none;
}

.dm-row.incoming-call:hover .dm-row-activity {
  display: inline-flex;
}

.dm-typing {
  color: var(--accent) !important;
}

.dm-row-actions {
  display: inline-flex;
  gap: 3px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition: max-width 160ms ease, opacity 140ms ease, transform 140ms ease;
}

.dm-row:hover .dm-row-actions,
.dm-row:focus-within .dm-row-actions {
  max-width: 124px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.dm-row-actions .icon-button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(17, 18, 20, 0.58);
}

.dm-row-actions .icon {
  width: 16px;
  height: 16px;
}

@keyframes dmIncomingPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(218, 55, 60, 0.44);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(218, 55, 60, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dm-call-badge {
    animation: none;
  }
}

.dm-empty {
  margin: 8px 4px 0;
  border-radius: 8px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 10px;
}

.dm-search-reopen {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.dm-search-section-title {
  margin: 0 4px 2px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dm-search-result {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  background: rgba(255, 255, 255, 0.03);
}

.dm-start-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(49, 208, 170, 0.14);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  padding: 0 8px;
}

.new-pill {
  border-radius: 999px;
  background: #fff;
  color: #17191f;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
}

.channel-group {
  margin-bottom: 18px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 8px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.group-label {
  transition: color 140ms ease;
}

.channel-group:hover .group-label {
  color: var(--text);
}

.group-title button {
  width: 24px;
  height: 24px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.group-title button:hover {
  color: var(--text);
  background: var(--panel-strong);
}

.category-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.channel-group:hover .category-actions {
  opacity: 1;
}

.category-actions .icon {
  width: 14px;
  height: 14px;
}

.group-title .category-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  min-width: 0;
  max-width: calc(100% - 32px);
  height: 24px;
  justify-self: start;
  padding: 0 4px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-toggle .category-caret {
  flex: 0 0 auto;
}

.category-toggle .group-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-activity-badges {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.category-activity-badge {
  min-width: 18px;
  height: 16px;
  border-radius: 999px;
  background: rgba(128, 132, 142, 0.28);
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  line-height: 16px;
  padding: 0 6px;
  text-align: center;
}

.category-activity-badge.mention {
  background: var(--danger);
  color: #fff;
}

.category-activity-badge.voice {
  background: rgba(35, 165, 90, 0.16);
  color: var(--good);
}

.category-activity-badge.draft,
.draft-badge {
  background: rgba(250, 166, 26, 0.16);
  color: #faa61a;
}

.modal.category-modal,
.modal.create-channel-modal {
  width: min(560px, calc(100vw - 48px));
}

.category-form,
.create-channel-form {
  display: grid;
  gap: 14px;
}

.category-form label,
.create-channel-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-form input,
.category-form select,
.create-channel-form input,
.create-channel-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10161b;
  color: var(--text);
  padding: 10px;
  text-transform: none;
}

.create-private-row {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
  text-transform: none;
}

.create-private-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
}

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

.create-private-row small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 600;
}

.channel-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.channel-row:hover,
.channel-row.active {
  background: var(--panel-strong);
  color: var(--text);
}

.channel-row.has-unread:not(.active):not(.muted-channel) {
  color: var(--text);
  font-weight: 800;
}

.channel-row.has-unread::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 4px;
  height: 8px;
  border-radius: 0 999px 999px 0;
  background: var(--text);
  opacity: 0.9;
  transform: translateY(-50%);
}

.channel-row.has-mention::before {
  height: 13px;
  background: var(--danger);
}

.channel-row.active::before {
  opacity: 0;
}

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

.channel-row .unread-badge,
.channel-row .mention-count-badge {
  position: static;
}

.channel-row-end {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 46px;
}

.voice-channel-end {
  min-width: 104px;
}

.channel-row-actions {
  display: none;
  gap: 3px;
}

.channel-row:hover .channel-row-actions,
.channel-row.active .channel-row-actions {
  display: inline-flex;
}

.channel-row:hover .channel-row-end > .unread-badge,
.channel-row:hover .channel-row-end > .mention-count-badge,
.channel-row:hover .channel-row-end > .draft-badge {
  display: none;
}

.voice-channel-row {
  cursor: default;
}

.voice-channel-row.voice-active,
.voice-channel-row:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.voice-channel-row.voice-active > .icon {
  color: var(--good);
}

.voice-channel-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
}

.voice-channel-name {
  overflow: hidden;
  color: inherit;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-channel-status {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  font-size: 11px;
  line-height: 1.15;
  opacity: 0;
  padding: 0;
  text-align: left;
}

.voice-channel-status.has-status,
.voice-channel-row:hover .voice-channel-status,
.voice-channel-row.voice-active .voice-channel-status {
  opacity: 1;
}

.voice-channel-status:hover {
  color: var(--text);
}

.voice-channel-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-channel-status .icon {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.channel-row.muted-channel {
  color: color-mix(in srgb, var(--muted) 72%, #000 28%);
}

.channel-row.muted-channel .icon {
  opacity: 0.55;
}

.voice-row-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.voice-channel-row:hover .voice-row-actions {
  opacity: 1;
  pointer-events: auto;
}

.voice-mini-action {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
}

.voice-mini-action:hover {
  background: rgba(255, 255, 255, 0.08);
}

.modal.voice-status-modal {
  width: min(520px, calc(100vw - 48px));
}

.voice-status-panel {
  display: grid;
  gap: 14px;
}

.voice-status-preview {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.voice-status-preview > .icon {
  width: 24px;
  height: 24px;
  color: var(--good);
}

.voice-status-preview strong,
.voice-status-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-status-preview span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.voice-status-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.voice-status-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10161b;
  color: var(--text);
  padding: 10px;
  text-transform: none;
}

.voice-status-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-status-chip {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 11px;
}

.voice-status-chip:hover {
  border-color: rgba(49, 208, 170, 0.45);
  background: rgba(49, 208, 170, 0.1);
}

.voice-elapsed {
  color: var(--good);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.voice-participant-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  margin: 2px 0 0 30px;
  padding: 2px 8px;
  color: var(--muted);
}

.voice-participant-avatar {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #071614;
  font-size: 10px;
  font-weight: 900;
}

.voice-participant-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--subtle);
}

.voice-participant-controls:empty {
  display: none;
}

.voice-participant-controls .icon {
  width: 15px;
  height: 15px;
}

.voice-participant-state {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #f87171;
}

.voice-participant-state.streaming {
  color: var(--good);
}

.voice-participant-row.muted .voice-participant-avatar,
.voice-participant-row.deafened .voice-participant-avatar {
  filter: saturate(0.72);
}

.live-mini {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.stream-popover {
  position: absolute;
  left: 42px;
  top: 24px;
  z-index: 15;
  display: none;
  width: 280px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 12px;
}

.voice-participant-row.streaming:hover .stream-popover {
  display: grid;
}

.stream-popover-label {
  color: var(--muted);
  font-size: 11px;
}

.user-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.user-card-controls {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.user-card-controls .icon-button {
  width: 34px;
  height: 34px;
}

.voice-connected-card {
  display: grid;
  gap: 10px;
  margin: 0 8px 8px;
  border-radius: 8px;
  background: var(--surface-high);
  padding: 12px;
}

.voice-connected-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.voice-connected-head > .icon {
  color: var(--good);
}

.voice-connected-head strong,
.voice-connected-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-connected-head strong {
  color: var(--good);
  font-size: 13px;
}

.voice-connected-head span {
  color: var(--muted);
  font-size: 11px;
}

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

.voice-connected-actions .icon-button {
  width: 100%;
  height: 34px;
  background: var(--surface);
}

.voice-connected-actions.incoming-call-actions {
  grid-template-columns: 1fr 1fr;
}

.voice-connected-actions .sidebar-call-action {
  width: 100%;
  min-width: 0;
  height: 34px;
  font-size: 12px;
}

.avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #071614;
  font-size: 14px;
  font-weight: 900;
}

.avatar,
.small-avatar,
.typing-avatar,
.voice-participant-avatar,
.profile-preview-avatar,
.account-avatar,
.dm-profile-avatar,
.dm-welcome-avatar,
.member-profile-avatar,
.dm-voice-avatar,
.topbar-dm-avatar {
  position: relative;
  flex: 0 0 auto;
}

.avatar.avatar-image,
.small-avatar.avatar-image,
.voice-participant-avatar.avatar-image,
.typing-avatar.avatar-image,
.profile-preview-avatar.avatar-image,
.account-avatar.avatar-image,
.dm-profile-avatar.avatar-image,
.dm-welcome-avatar.avatar-image,
.member-profile-avatar.avatar-image,
.dm-voice-avatar.avatar-image,
.topbar-dm-avatar.avatar-image {
  background: var(--surface) !important;
  background-image: none !important;
}

.avatar-image-frame {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}

.avatar.avatar-image img,
.small-avatar.avatar-image img,
.voice-participant-avatar.avatar-image img,
.typing-avatar.avatar-image img,
.profile-preview-avatar.avatar-image img,
.account-avatar.avatar-image img,
.dm-profile-avatar.avatar-image img,
.dm-welcome-avatar.avatar-image img,
.member-profile-avatar.avatar-image img,
.dm-voice-avatar.avatar-image img,
.topbar-dm-avatar.avatar-image img,
.avatar-image-frame img,
.recent-avatar img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: inherit;
}

.avatar .status-dot,
.small-avatar .status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  border: 3px solid var(--surface);
}

.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--good);
}

.status-idle .status-dot {
  background: #f0b232;
}

.status-dnd .status-dot {
  background: var(--danger);
}

.status-invisible .status-dot {
  background: #80848e;
}

.user-meta {
  min-width: 0;
}

.user-meta strong,
.member-meta strong,
.friend-meta strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta span,
.member-meta span,
.friend-meta span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 160px),
    var(--bg);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 0 18px;
  background: rgba(16, 19, 23, 0.86);
  border-bottom: 1px solid var(--line);
}

.dm-call-active-topbar {
  background: #050607;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dm-call-active-topbar .topbar-dm-avatar {
  width: 36px;
  height: 36px;
}

.dm-call-active-topbar .topbar-dm-avatar .status-dot {
  border-color: #050607;
}

.dm-call-active-topbar .channel-heading h2 {
  color: #fff;
}

.channel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-navigation {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.topbar-nav-button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
}

.topbar-nav-button .icon {
  width: 18px;
  height: 18px;
}

.channel-symbol {
  color: var(--subtle);
  font-size: 24px;
  font-weight: 800;
}

.topbar-dm-avatar {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #061f1a;
  font-size: 12px;
  font-weight: 900;
}

.topbar-dm-avatar .status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  border: 3px solid var(--bg);
}

.channel-heading h2 {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-heading-copy {
  min-width: 0;
}

.channel-heading p {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-topbar-status {
  max-width: 320px;
}

.dm-call-top-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 210px;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(35, 165, 89, 0.34);
  border-radius: 999px;
  background: rgba(35, 165, 89, 0.14);
  color: #59d58d;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.dm-call-top-status::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.dm-call-top-status.incoming {
  border-color: rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.22);
  color: #c9d1ff;
}

.dm-call-top-status.calling,
.dm-call-top-status.ringing,
.dm-call-top-status.answering {
  border-color: rgba(250, 166, 26, 0.42);
  background: rgba(250, 166, 26, 0.14);
  color: #ffd37a;
}

.dm-call-top-status.muted {
  border-color: rgba(237, 66, 69, 0.38);
  background: rgba(237, 66, 69, 0.12);
  color: #ff9ca0;
}

.channel-topic-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 5px;
  padding: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.channel-topic-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-topic-button .icon {
  width: 13px;
  height: 13px;
  opacity: 0;
  transition: opacity 140ms ease, color 140ms ease;
}

.channel-heading:hover .channel-topic-button,
.channel-topic-button:hover,
.channel-topic-button:focus-visible {
  color: var(--text);
}

.channel-heading:hover .channel-topic-button .icon,
.channel-topic-button:hover .icon,
.channel-topic-button:focus-visible .icon {
  opacity: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dm-call-topbar-actions {
  gap: 8px;
}

.dm-call-topbar-control-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(24, 25, 29, 0.96);
  box-shadow: var(--shadow);
}

.dm-call-topbar-control-group .icon-button {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
}

.dm-call-topbar-control-group .icon-button:hover,
.dm-call-topbar-control-group .icon-button.active {
  background: rgba(255, 255, 255, 0.16);
}

.dm-call-topbar-control-group .danger-call {
  background: #da373c;
  color: #fff;
}

.topbar-call-action {
  min-width: 84px;
  height: 38px;
  border-radius: 8px;
}

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

.friends-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.friends-topbar-left > strong {
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.friend-top-tab {
  position: relative;
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
  font-weight: 700;
}

.friend-top-tab:hover,
.friend-top-tab.active {
  background: var(--panel-strong);
  color: var(--text);
}

.friend-top-tab.has-incoming:not(.active)::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg);
}

.add-friend-top {
  min-height: 34px;
  border-radius: 7px;
}

.add-friend-top.active {
  background: var(--accent);
  color: #061f1a;
}

.search-box {
  position: relative;
}

.search-box input,
.modal input,
.modal textarea,
.modal select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.search-box input {
  width: 250px;
  padding: 0 38px 0 12px;
}

.search-box input:focus,
.modal input:focus,
.modal textarea:focus,
.composer textarea:focus {
  border-color: rgba(49, 208, 170, 0.65);
  box-shadow: 0 0 0 3px rgba(49, 208, 170, 0.12);
}

.search-box .icon {
  position: absolute;
  top: 10px;
  right: 11px;
  color: var(--subtle);
}

.search-clear {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search-clear:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.search-clear .icon {
  position: static;
  width: 17px;
  height: 17px;
}

.search-suggestion-popover {
  position: absolute;
  top: 46px;
  right: 0;
  z-index: 40;
  display: grid;
  width: min(340px, calc(100vw - 36px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  gap: 4px;
}

.search-suggestion-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  padding: 4px 8px 6px;
  text-transform: uppercase;
}

.search-suggestion-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.search-history-clear {
  border-radius: 4px;
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 4px;
  text-transform: none;
}

.search-history-clear:hover {
  background: rgba(88, 101, 242, 0.14);
  color: var(--text);
}

.search-suggestion-row {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.search-suggestion-row:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.search-suggestion-row.active {
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(88, 101, 242, 0.36);
}

.search-suggestion-row strong {
  color: var(--text);
  font-size: 13px;
}

.search-suggestion-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.recent-search-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.voice-stage-topbar {
  background: #050607;
}

.voice-stage-topbar .channel-heading > .icon {
  color: var(--muted);
}

.voice-stage-actions {
  justify-content: flex-end;
}

.quality-badge,
.live-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.quality-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.live-badge {
  background: #ef4444;
  color: #fff;
}

.voice-stage {
  position: relative;
  display: grid;
  grid-template-rows: minmax(340px, 1fr) minmax(240px, 0.65fr);
  gap: 8px;
  height: 100%;
  overflow: hidden;
  background: #000;
  padding: 32px 28px 88px;
}

.voice-stage-tiles {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(320px, 0.9fr);
  gap: 18px;
  min-height: 0;
}

.stream-stage-card,
.voice-avatar-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #050607;
}

.stream-stage-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stream-live-badge {
  position: absolute;
  right: 16px;
  top: 14px;
}

.voice-avatar-tile {
  background: var(--banner-color, #fca41c);
}

.voice-avatar-tile strong {
  position: absolute;
  left: 18px;
  bottom: 14px;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.voice-stage-avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent-warm);
  font-size: 28px;
  font-weight: 900;
}

.muted-corner {
  position: absolute;
  left: 18px;
  bottom: 48px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}

.voice-activity-panel {
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(760px, 78vw);
  min-height: 220px;
  border-radius: 8px;
  background: radial-gradient(circle at 55% 40%, rgba(196, 122, 255, 0.34), transparent 18rem), #130516;
}

.activity-art {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.activity-art span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 22px;
  background: linear-gradient(145deg, #7c3aed, #31d0aa);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.activity-art span:nth-child(2) {
  width: 118px;
  height: 118px;
  background: linear-gradient(145deg, #fca41c, #ec4899);
}

.activity-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.call-dock {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(24, 26, 31, 0.94);
  box-shadow: var(--shadow);
  padding: 10px;
}

.call-dock .icon-button {
  background: rgba(255, 255, 255, 0.07);
}

.call-dock .danger-call {
  background: #ef4444;
  color: #fff;
}

.dm-call-panel {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  pointer-events: none;
}

.dm-call-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: min(430px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(32, 34, 40, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  pointer-events: auto;
}

.dm-call-card:focus-visible,
.dm-voice-connected-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.dm-call-card.incoming {
  border-color: rgba(49, 208, 170, 0.42);
  box-shadow: 0 18px 70px rgba(49, 208, 170, 0.12), 0 18px 60px rgba(0, 0, 0, 0.42);
}

.dm-call-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.dm-call-info strong,
.dm-call-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-call-info span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.dm-call-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dm-call-actions .danger-call,
.dm-call-decline {
  background: #ef4444;
  color: #fff;
}

.dm-call-accept,
.dm-call-decline {
  height: 34px;
  min-width: 76px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.dm-call-accept {
  background: #23a559;
}

.dm-call-decline {
  background: #da373c;
}

.topbar-call-action.dm-call-accept,
.topbar-call-action.dm-call-decline {
  min-width: 84px;
  height: 38px;
  border-radius: 8px;
}

.dm-voice-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 8%, rgba(88, 101, 242, 0.14), transparent 300px),
    #000;
  padding: 34px 24px 104px;
}

.dm-voice-stage-header {
  position: absolute;
  top: 18px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 44px);
  color: var(--text);
}

.dm-voice-stage-header > .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.dm-voice-stage-header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dm-voice-stage-header span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dm-voice-stage-header strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-voice-stage.calling,
.dm-voice-stage.ringing,
.dm-voice-stage.answering {
  background:
    radial-gradient(circle at 50% 8%, rgba(49, 208, 170, 0.18), transparent 280px),
    #000;
}

.dm-voice-stage.incoming {
  background:
    radial-gradient(circle at 50% 8%, rgba(49, 208, 170, 0.24), transparent 300px),
    #000;
}

.dm-voice-stage.sharing {
  min-height: 460px;
  align-content: center;
  gap: 0;
  padding: 58px 24px 112px;
}

.dm-share-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(220px, 34%);
  gap: 8px;
  width: min(1230px, calc(100% - 24px));
  margin: 0 auto;
  align-items: stretch;
}

.dm-share-main {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.48);
}

.dm-share-main .stream-preview-dm-main {
  width: 100%;
  min-height: 250px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #000;
}

.dm-share-main .stream-live-badge {
  top: 8px;
  right: 8px;
}

.dm-share-source-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-share-participants {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
}

.dm-share-participants .dm-voice-avatar-wrap {
  position: relative;
  display: grid;
  min-height: 120px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(88, 101, 242, 0.18), transparent 120px),
    #14243d;
}

.dm-share-participants .dm-voice-avatar-wrap.self {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.1), transparent 120px),
    var(--accent-warm);
}

.dm-share-participants .dm-voice-avatar {
  width: 76px;
  height: 76px;
  font-size: 22px;
}

.dm-share-participants .dm-voice-name {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
}

.dm-screen-share-preview {
  position: relative;
  width: min(640px, 82%);
  aspect-ratio: 16 / 9;
}

.dm-screen-share-preview .stream-preview-small {
  height: 100%;
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.38);
}

.dm-screen-share-preview .stream-live-badge {
  top: 8px;
  right: 8px;
}

.dm-voice-stage.sharing .dm-voice-avatar {
  width: 64px;
  height: 64px;
  font-size: 20px;
}

.dm-voice-stage.sharing .dm-share-participants .dm-voice-avatar {
  width: 76px;
  height: 76px;
  font-size: 22px;
}

.dm-voice-participants {
  display: flex;
  gap: 42px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.dm-voice-stage:not(.sharing) .dm-voice-participants {
  transform: translateY(-12px);
}

.dm-voice-avatar-wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.dm-voice-avatar {
  display: grid;
  place-items: center;
  position: relative;
  width: 98px;
  height: 98px;
  border: 4px solid #000;
  border-radius: 50%;
  color: #071614;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.46);
}

.dm-voice-avatar-wrap.self .dm-voice-avatar {
  color: var(--accent-warm);
  background: #fff !important;
}

.dm-voice-avatar-wrap.speaking .dm-voice-avatar {
  border-color: #23a559;
  box-shadow:
    0 0 0 4px rgba(35, 165, 89, 0.92),
    0 0 26px rgba(35, 165, 89, 0.42),
    0 16px 46px rgba(0, 0, 0, 0.46);
}

.dm-voice-avatar-wrap.speaking .dm-voice-avatar .status-dot {
  border-color: #23a559;
}

.dm-voice-avatar .status-dot {
  right: 3px;
  bottom: 3px;
  border-color: #000;
}

.dm-voice-name {
  max-width: 120px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-voice-status {
  position: absolute;
  left: 50%;
  bottom: 82px;
  display: grid;
  gap: 2px;
  justify-items: center;
  transform: translateX(-50%);
  color: var(--text);
  text-align: center;
}

.dm-voice-status strong {
  font-size: 13px;
}

.dm-voice-status span {
  color: var(--muted);
  font-size: 12px;
}

.dm-voice-device-note {
  position: absolute;
  left: 50%;
  bottom: 136px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(520px, calc(100% - 42px));
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(30, 31, 36, 0.88);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%);
}

.dm-voice-device-note .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.dm-voice-device-note.warning {
  border-color: rgba(237, 66, 69, 0.28);
  background: rgba(237, 66, 69, 0.13);
  color: #ffd1d3;
}

.dm-voice-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
}

.dm-voice-control-group {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(24, 25, 29, 0.96);
  box-shadow: var(--shadow);
  padding: 8px;
}

.dm-voice-stage .dm-voice-control-group,
.dm-voice-stage .dm-voice-hangup,
.dm-voice-stage .dm-voice-accept {
  backdrop-filter: blur(12px);
}

.dm-voice-control-group .icon-button {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
}

.dm-voice-control-group .icon-button:hover,
.dm-voice-control-group .icon-button.active {
  background: rgba(255, 255, 255, 0.16);
}

.dm-voice-hangup,
.dm-voice-accept {
  display: grid;
  place-items: center;
  height: 48px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.dm-voice-hangup {
  width: 66px;
  background: #da373c;
}

.dm-voice-hangup .icon {
  width: 21px;
  height: 21px;
}

.dm-voice-accept {
  min-width: 108px;
  background: #23a559;
}

.dm-voice-connected-card .voice-connected-head > .icon {
  color: var(--good);
}

.dm-voice-connected-card {
  cursor: pointer;
}

@media (max-width: 720px) {
  .dm-call-panel {
    left: 12px;
    right: 12px;
    bottom: 14px;
    transform: none;
  }

  .dm-call-card {
    min-width: 0;
    width: 100%;
  }

  .dm-voice-stage {
    min-height: 240px;
    padding-inline: 12px;
  }

  .dm-voice-stage.sharing {
    min-height: 430px;
    padding: 58px 10px 112px;
  }

  .dm-share-layout {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .dm-share-participants {
    grid-template-columns: 1fr 1fr;
  }

  .dm-share-participants .dm-voice-avatar-wrap {
    min-height: 96px;
  }

  .dm-share-main,
  .dm-share-main .stream-preview-dm-main {
    min-height: 180px;
  }

  .dm-voice-participants {
    gap: 18px;
  }

  .dm-voice-avatar {
    width: 72px;
    height: 72px;
    font-size: 22px;
  }

  .dm-voice-controls {
    gap: 8px;
  }

  .dm-voice-control-group {
    gap: 6px;
    padding: 7px;
  }

  .dm-voice-control-group .icon-button {
    width: 38px;
    height: 38px;
  }
}

.stream-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 76px;
  overflow: hidden;
  border-radius: 7px;
  background: #080b0d;
}

.stream-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.stream-video-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  background:
    radial-gradient(circle at 50% 40%, rgba(88, 101, 242, 0.16), transparent 240px),
    #000;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.stream-video-loading .icon {
  width: 30px;
  height: 30px;
  color: var(--brand);
}

.stream-preview.stream-ready .stream-video-loading {
  display: none;
}

.stream-preview-waiting {
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stream-preview-waiting .icon {
  width: 28px;
  height: 28px;
  color: var(--brand);
}

.stream-preview-stage {
  width: min(920px, 88%);
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.45);
}

.stream-preview-small {
  height: 116px;
}

.mini-window-preview {
  display: grid;
  grid-template-columns: 34px 96px minmax(0, 1fr) 72px;
  width: 100%;
  height: 100%;
  min-height: 76px;
  background: #10171b;
  color: #cfe3de;
}

.mini-rail,
.mini-sidebar,
.mini-main,
.mini-members {
  display: grid;
  gap: 5px;
  padding: 8px;
}

.mini-rail {
  background: #162126;
}

.mini-rail span {
  display: grid;
  place-items: center;
  height: 20px;
  border-radius: 5px;
  background: var(--accent);
  color: #071614;
  font-size: 8px;
  font-weight: 900;
}

.mini-sidebar,
.mini-members {
  align-content: start;
  background: #1d2930;
}

.mini-sidebar span,
.mini-members span,
.mini-composer {
  min-height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.mini-main {
  align-content: center;
  background: #0d1317;
  padding: 12px;
}

.mini-main strong {
  font-size: 13px;
}

.mini-main p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.mini-composer {
  margin-top: 12px;
}

.camera-preview {
  background: linear-gradient(145deg, rgba(109, 183, 255, 0.35), rgba(244, 180, 95, 0.42));
}

.camera-blur {
  width: 100%;
  height: 100%;
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.12);
}

.chat-view {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  position: relative;
  height: 100%;
}

.chat-view.dm-call-open {
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #1e1f22;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px 8px;
}

.welcome-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(34, 42, 50, 0.52);
}

.channel-welcome-card {
  align-items: start;
}

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

.welcome-copy {
  margin-bottom: 13px;
}

.welcome-card h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.welcome-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.welcome-actions {
  display: grid;
  gap: 7px;
}

.welcome-action-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  background: rgba(15, 20, 25, 0.48);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.welcome-action-row:hover {
  border-color: rgba(49, 208, 170, 0.38);
  background: rgba(49, 208, 170, 0.11);
}

.welcome-action-row .icon {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.welcome-action-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.welcome-action-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-action-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-action-chevron {
  color: var(--subtle);
  font-size: 18px;
  text-align: right;
}

.dm-welcome-profile {
  margin: 18vh 0 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.dm-welcome-avatar {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #071614;
  font-size: 28px;
  font-weight: 900;
}

.dm-welcome-avatar .status-dot {
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border: 4px solid var(--bg);
}

.dm-welcome-profile h1 {
  margin: 16px 0 6px;
  font-size: 32px;
  line-height: 1;
}

.dm-welcome-profile h2 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.dm-welcome-copy {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.dm-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.dm-mutual-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.call-event-message {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 7px 0 7px 54px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.call-event-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: rgba(35, 165, 89, 0.16);
  color: #3ba55d;
}

.call-event-icon .icon {
  width: 13px;
  height: 13px;
}

.call-event-copy {
  min-width: 0;
}

.call-event-copy strong {
  color: #d8dee8;
  font-weight: 800;
}

.call-event-time {
  flex: 0 0 auto;
  color: var(--subtle);
  font-size: 11px;
}

.message.grouped-message {
  padding-top: 1px;
  padding-bottom: 1px;
}

.message.grouped-message:hover {
  background: rgba(255, 255, 255, 0.025);
}

.message.own-message {
  border-left: 3px solid rgba(244, 180, 95, 0.8);
  background: rgba(244, 180, 95, 0.07);
  padding-left: 10px;
}

.message.pinned-message {
  background: rgba(252, 164, 28, 0.08);
}

.message.mentioned-message {
  border-left: 3px solid rgba(250, 166, 26, 0.92);
  background: rgba(250, 166, 26, 0.12);
  padding-left: 10px;
}

.message.mentioned-message::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -3px;
  width: 3px;
  border-radius: 999px;
  background: #faa61a;
}

.message.message-jump-highlight {
  animation: messageJumpPulse 1.5s ease;
}

.message:hover .message-tools {
  opacity: 1;
}

.message:hover .message-quick-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.message-quick-actions {
  position: absolute;
  top: -10px;
  right: 8px;
  display: inline-flex;
  gap: 2px;
  max-width: min(430px, calc(100% - 58px));
  overflow-x: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-high);
  box-shadow: var(--shadow);
  padding: 3px;
}

.message-quick-actions::-webkit-scrollbar {
  display: none;
}

.message-quick-actions {
  scrollbar-width: none;
}

.message-quick-actions .icon-button {
  width: 30px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
}

.quick-reaction-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
}

.quick-reaction-button:hover,
.quick-reaction-button.active {
  background: rgba(49, 208, 170, 0.16);
}

.quick-reaction-button.active {
  box-shadow: inset 0 -2px 0 rgba(49, 208, 170, 0.9);
}

.message-quick-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 20px;
  align-self: center;
  margin: 0 2px;
  background: var(--line);
}

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

.message-content {
  display: grid;
  gap: 8px;
}

.message-inline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: -2px;
}

.message-inline-editor {
  display: grid;
  gap: 8px;
  max-width: min(760px, 100%);
}

.message-inline-editor textarea {
  min-height: 72px;
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(88, 101, 242, 0.44);
  border-radius: 8px;
  background: #101419;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
  outline: none;
  padding: 11px 12px;
}

.message-inline-editor textarea:focus {
  border-color: #7f8cff;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.18);
}

.message-inline-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.message-inline-editor-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-thread-summary {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.message-thread-link {
  display: inline-grid;
  grid-template-columns: 18px minmax(0, auto) auto;
  gap: 8px;
  align-items: center;
  justify-self: start;
  max-width: min(520px, 100%);
  border: 1px solid rgba(88, 101, 242, 0.28);
  border-radius: 6px;
  background: rgba(88, 101, 242, 0.1);
  color: #dce2ff;
  cursor: pointer;
  padding: 7px 9px;
  text-align: left;
}

.message-thread-link:hover {
  border-color: rgba(88, 101, 242, 0.56);
  background: rgba(88, 101, 242, 0.18);
}

.message-thread-link .icon {
  color: #9fb0ff;
}

.message-thread-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-reply-line {
  display: grid;
  grid-template-columns: 26px auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  width: fit-content;
  max-width: 78%;
  margin: 0 0 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.message-reply-line:hover strong,
.message-reply-line:hover span:last-child {
  color: var(--text);
}

.message-reply-line.cross-channel span:last-child {
  color: #cdd3ff;
}

.message-reply-line.deleted {
  cursor: default;
  opacity: 0.68;
}

.message-reply-line.deleted strong,
.message-reply-line.deleted span:last-child {
  color: var(--subtle);
}

.reply-line-stem {
  position: relative;
  height: 14px;
}

.reply-line-stem::before {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 12px;
  border-top: 2px solid rgba(159, 166, 178, 0.45);
  border-left: 2px solid rgba(159, 166, 178, 0.45);
  border-top-left-radius: 7px;
}

.message-reply-line strong {
  color: #cfd5de;
  font-size: 12px;
}

.message-reply-line span:last-child {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.message-head strong {
  color: var(--text);
  font-size: 14px;
}

.message-time {
  color: var(--subtle);
  cursor: help;
  font-size: 11px;
}

.message-compact-time {
  align-self: start;
  justify-self: end;
  opacity: 0;
  width: 38px;
  border: 0;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 21px;
  padding: 0;
  text-align: right;
}

.message.grouped-message:hover .message-compact-time,
.message-compact-time:focus-visible {
  opacity: 1;
}

.message-compact-time:hover {
  color: var(--text);
}

.edited-badge {
  color: var(--subtle);
  cursor: default;
  font-size: 11px;
}

.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(252, 164, 28, 0.14);
  color: #ffd38a;
  font-size: 11px;
  font-weight: 800;
}

.pin-badge .icon {
  width: 12px;
  height: 12px;
}

.mention-badge {
  border-radius: 999px;
  background: rgba(250, 166, 26, 0.16);
  color: #ffd38a;
  cursor: default;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
}

.message-text {
  margin: 0;
  color: #dce7e3;
  font-size: 14px;
  line-height: 1.46;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-bold {
  color: #f2f5f4;
  font-weight: 900;
}

.message-italic {
  color: #e7eeeb;
}

.message-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message-strike {
  color: var(--muted);
}

.message-spoiler {
  display: inline;
  border-radius: 4px;
  background: #101215;
  cursor: pointer;
  padding: 1px 4px;
  transition: background 120ms ease, color 120ms ease;
}

.message-spoiler:not(.revealed),
.message-spoiler:not(.revealed) * {
  color: transparent !important;
  text-shadow: none !important;
}

.message-spoiler:not(.revealed) .mention,
.message-spoiler:not(.revealed) .channel-mention,
.message-spoiler:not(.revealed) .message-link {
  background: transparent;
  border-color: transparent;
}

.message-spoiler:hover,
.message-spoiler:focus-visible {
  background: #1f232b;
  outline: none;
}

.message-spoiler.revealed {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: default;
}

.message-timestamp {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.18);
  color: #dce2ff;
  cursor: default;
  font-size: 0.94em;
  font-weight: 800;
  padding: 1px 5px;
}

.message-timestamp:hover {
  background: rgba(88, 101, 242, 0.28);
  color: #fff;
}

.message-inline-code {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
  color: #f0f3f2;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  padding: 1px 4px;
}

.message-code-block {
  display: block;
  max-width: min(720px, 100%);
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #101215;
  color: #edf2f0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0 0;
  padding: 10px 12px;
  white-space: pre;
}

.message-quote-line {
  display: block;
  border-left: 4px solid #4b515c;
  color: #c9d1ce;
  padding-left: 10px;
}

.message-media {
  position: relative;
  display: grid;
  gap: 8px;
  width: min(310px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--media-accent) 42%, #15191f), #171b22);
  padding: 12px;
}

.message-media-art {
  display: grid;
  place-items: center;
  min-height: 132px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 26% 28%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(145deg, color-mix(in srgb, var(--media-accent) 78%, #ffffff), color-mix(in srgb, var(--media-accent) 34%, #05070a));
  animation: mediaPulse 1.8s ease-in-out infinite;
}

.message-media-sticker {
  width: 210px;
  background: transparent;
  border-color: transparent;
  padding: 4px 0 0;
}

.message-media-sticker .message-media-art {
  min-height: 152px;
  background: radial-gradient(circle at 50% 52%, color-mix(in srgb, var(--media-accent) 40%, transparent), transparent 62%);
}

.message-media-art span {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
  font-size: 74px;
}

.message-media strong {
  color: var(--text);
  font-size: 14px;
}

.message-attachments {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-width: min(520px, 100%);
}

.message-attachment {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(49, 51, 56, 0.72);
  padding: 10px;
}

.message-attachment.image-attachment {
  grid-template-columns: minmax(0, 1fr);
  width: min(440px, 100%);
  align-items: stretch;
}

.attachment-image-button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  padding: 0;
  text-align: left;
}

.attachment-image-button:focus-visible {
  outline: none;
}

.attachment-image-button:focus-visible .attachment-image,
.attachment-image-button:hover .attachment-image {
  outline: 2px solid rgba(49, 208, 170, 0.72);
  outline-offset: 2px;
}

.attachment-image {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 7px;
  background: #0b0d10;
}

.attachment-file-icon {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(88, 101, 242, 0.18);
  color: #c9d2ff;
  font-size: 11px;
  font-weight: 900;
}

.attachment-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.modal.attachment-preview-modal {
  width: min(920px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.attachment-preview-panel {
  display: grid;
  gap: 12px;
}

.attachment-preview-image {
  display: block;
  justify-self: center;
  max-width: 100%;
  max-height: min(70vh, 720px);
  border-radius: 8px;
  background: #0b0d10;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
  object-fit: contain;
}

.attachment-preview-meta {
  display: grid;
  gap: 3px;
  color: var(--text);
}

.attachment-preview-meta span {
  color: var(--muted);
  font-size: 12px;
}

.message-poll {
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  margin-top: 8px;
  border: 1px solid rgba(88, 101, 242, 0.28);
  border-radius: 8px;
  background: rgba(32, 37, 45, 0.78);
  padding: 13px;
}

.poll-head {
  display: grid;
  gap: 4px;
}

.poll-kicker {
  color: #a8b1ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.poll-head strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.poll-options {
  display: grid;
  gap: 7px;
}

.poll-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  overflow: hidden;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(16, 19, 23, 0.72);
  color: var(--text);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
}

.poll-option:hover,
.poll-option.selected {
  border-color: rgba(49, 208, 170, 0.46);
}

.poll-option.selected {
  background: rgba(49, 208, 170, 0.12);
}

.poll-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--poll-percent);
  background: rgba(88, 101, 242, 0.26);
  pointer-events: none;
}

.poll-option-text,
.poll-option-meta {
  position: relative;
  z-index: 1;
}

.poll-option-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poll-option-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.poll-footer {
  color: var(--muted);
  font-size: 12px;
}

.attachment-meta strong,
.attachment-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta strong {
  color: var(--text);
  font-size: 13px;
}

.attachment-meta span {
  color: var(--muted);
  font-size: 12px;
}

.gif-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 7px;
}

@keyframes mediaPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}

@keyframes messageJumpPulse {
  0%,
  100% {
    background: transparent;
  }
  18%,
  72% {
    background: rgba(88, 101, 242, 0.18);
  }
}

.mention {
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.28);
  color: #dbe1ff;
  padding: 0 4px;
}

.role-mention {
  border-bottom: 2px solid var(--role-color, #5865f2);
  background: rgba(88, 101, 242, 0.22);
  color: #fff;
  font-weight: 800;
}

.broad-mention {
  background: rgba(250, 166, 26, 0.22);
  color: #ffd38a;
  font-weight: 800;
}

.channel-mention {
  border: 0;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.22);
  color: #cfd5ff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 4px;
  vertical-align: baseline;
}

.channel-mention:hover {
  background: rgba(88, 101, 242, 0.34);
  color: #fff;
  text-decoration: underline;
}

.message-link {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.2);
  color: #9fb0ff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 4px;
  vertical-align: baseline;
}

.message-link .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-right: 4px;
}

.message-link.channel-link {
  background: rgba(35, 165, 90, 0.18);
  color: #b8f7d0;
}

.message-link.server-link {
  background: rgba(252, 164, 28, 0.2);
  color: #ffd38a;
}

.message-link.event-link {
  background: rgba(168, 85, 247, 0.2);
  color: #ead8ff;
}

.message-link:hover {
  background: rgba(88, 101, 242, 0.34);
  color: #dce2ff;
  text-decoration: underline;
}

.message-link.channel-link:hover {
  background: rgba(35, 165, 90, 0.32);
  color: #effff4;
}

.message-link.server-link:hover {
  background: rgba(252, 164, 28, 0.34);
  color: #fff0cf;
}

.message-link.event-link:hover {
  background: rgba(168, 85, 247, 0.34);
  color: #fff3ff;
}

.message-url {
  color: #5ea1ff;
  font-weight: 700;
  text-decoration: none;
}

.message-url:hover {
  color: #8fbdff;
  text-decoration: underline;
}

.message-link-previews {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-width: min(520px, 100%);
}

.message-link-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid #5865f2;
  border-radius: 8px;
  background: rgba(30, 33, 40, 0.86);
  color: var(--text);
  padding: 10px;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.message-link-preview.vatra-link-preview {
  width: 100%;
  cursor: pointer;
  font: inherit;
  text-align: left;
  border-left-color: #31d0aa;
}

.message-link-preview:hover {
  border-color: rgba(88, 101, 242, 0.72);
  background: rgba(35, 39, 47, 0.96);
  transform: translateY(-1px);
}

.message-link-preview.vatra-link-preview:hover {
  border-color: rgba(49, 208, 170, 0.72);
}

.message-link-preview-art {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(145deg, rgba(88, 101, 242, 0.82), rgba(49, 208, 170, 0.42));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.message-link-preview-copy {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

.message-link-preview-copy span {
  color: #8fbdff;
  font-size: 12px;
  font-weight: 800;
}

.message-link-preview-copy strong,
.message-link-preview-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-link-preview-copy strong {
  color: var(--text);
  font-size: 14px;
}

.message-link-preview-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.date-separator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 18px 0 10px;
  color: var(--subtle);
  font-size: 12px;
}

.date-separator::before,
.date-separator::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.unread-separator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 18px 0 10px;
  color: #ff6b6b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.unread-separator::before,
.unread-separator::after {
  content: "";
  height: 1px;
  background: rgba(237, 66, 69, 0.66);
}

.unread-separator-label {
  border-radius: 999px;
  background: rgba(237, 66, 69, 0.12);
  padding: 3px 8px;
}

.unread-separator-action {
  border: 1px solid rgba(237, 66, 69, 0.32);
  border-radius: 999px;
  background: rgba(237, 66, 69, 0.1);
  color: #ffd1d1;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  min-height: 22px;
  padding: 3px 8px;
}

.unread-separator-action:hover {
  border-color: rgba(237, 66, 69, 0.62);
  background: rgba(237, 66, 69, 0.18);
  color: #fff;
}

.jump-present-button {
  position: absolute;
  right: 24px;
  bottom: 78px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 48px);
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(88, 101, 242, 0.45);
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  color: #fff;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.jump-present-button.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.jump-present-button:hover {
  background: #4752c4;
}

.jump-present-button .icon {
  width: 16px;
  height: 16px;
}

.jump-present-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 0 24px 4px;
  color: var(--muted);
  font-size: 12px;
}

.typing-avatar {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #071614;
  font-size: 9px;
  font-weight: 900;
}

.typing-avatar .status-dot {
  display: none;
}

.typing-copy strong {
  color: var(--text);
}

.typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.typing-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: typingPulse 1s ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.typing-dots i:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes typingPulse {
  0%, 80%, 100% {
    opacity: 0.32;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.message-tools {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.message-avatar-clickable {
  cursor: pointer;
}

.message-avatar-clickable:hover {
  filter: brightness(1.12);
}

.message-author-button {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.message-author-button:hover {
  text-decoration: underline;
}

.message-app-badge {
  display: inline-flex;
  align-items: center;
  height: 15px;
  border-radius: 3px;
  background: #5865f2;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 0 4px;
  text-transform: uppercase;
}

.reaction {
  min-width: 34px;
  min-height: 26px;
  border-radius: 999px;
  background: var(--surface-high);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0 9px;
}

.reaction.add-reaction {
  min-width: 28px;
  font-weight: 900;
}

.reaction.has-count {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reaction.active,
.reaction:hover {
  color: var(--text);
  background: rgba(49, 208, 170, 0.18);
}

.reaction.active {
  border-color: rgba(49, 208, 170, 0.38);
}

.composer {
  position: relative;
  padding: 14px 20px 20px;
}

.composer.drag-over .composer-inner,
.composer.drag-over .composer-attachments,
.composer.drag-over .reply-composer-bar {
  border-color: rgba(49, 208, 170, 0.82);
  background: rgba(49, 208, 170, 0.1);
}

.composer.drag-over::after {
  content: "Drop files to attach";
  position: absolute;
  inset: 8px 20px 20px;
  z-index: 45;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(49, 208, 170, 0.86);
  border-radius: 10px;
  background: rgba(7, 11, 16, 0.74);
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 46px rgba(0, 0, 0, 0.42);
}

.reply-composer-bar {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #20252d;
  padding: 9px 10px;
}

.reply-composer-accent {
  width: 4px;
  height: 100%;
  min-height: 28px;
  border-radius: 999px;
  background: var(--accent);
}

.reply-composer-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reply-composer-jump {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.reply-composer-jump:hover strong,
.reply-composer-jump:hover span {
  color: var(--text);
}

.reply-composer-jump:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.reply-composer-copy strong {
  color: var(--text);
  font-size: 13px;
}

.reply-composer-copy span {
  color: var(--muted);
  font-size: 12px;
}

.reply-composer-bar + .composer-inner {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.composer-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #20252d;
  padding: 10px;
}

.reply-composer-bar + .composer-attachments {
  border-top: 0;
  border-radius: 0;
}

.composer-attachments + .composer-inner {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.composer-attachment {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 19, 23, 0.58);
  padding: 8px;
}

.composer-attachment.image-draft {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}

.composer-attachment img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #0b0d10;
}

.composer-attachment .icon-button {
  width: 30px;
  height: 30px;
}

.composer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-high);
}

.composer textarea {
  width: 100%;
  min-height: 42px;
  max-height: 140px;
  resize: vertical;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 11px 4px 6px;
  line-height: 1.35;
}

.composer-expression-tools {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.composer-tool-pill {
  min-height: 36px;
  border-radius: 7px;
  background: rgba(16, 19, 23, 0.62);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.composer-tool-pill.active,
.composer-tool-pill:hover {
  background: rgba(49, 208, 170, 0.18);
  color: var(--text);
}

.composer-assist {
  position: absolute;
  left: 70px;
  bottom: 86px;
  z-index: 42;
  display: grid;
  gap: 6px;
  width: min(460px, calc(100vw - 520px));
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #22242a;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.46);
  padding: 8px;
}

.composer-assist-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  padding: 4px 6px 8px;
}

.composer-assist-head strong {
  color: var(--text);
  font-size: 13px;
}

.composer-assist-head span {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-assist-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  padding: 7px 9px;
  text-align: left;
}

.composer-assist-row:hover,
.composer-assist-row.active {
  background: var(--accent);
  color: #fff;
}

.composer-assist-row .icon {
  color: currentColor;
}

.composer-role-swatch {
  width: 14px;
  height: 14px;
  justify-self: center;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.composer-emoji-symbol {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 21px;
  line-height: 1;
}

.composer-assist-row:hover .composer-emoji-symbol,
.composer-assist-row.active .composer-emoji-symbol {
  background: rgba(255, 255, 255, 0.16);
}

.composer-assist-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.composer-assist-copy strong,
.composer-assist-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-assist-copy small {
  color: var(--muted);
  font-size: 12px;
}

.composer-assist-row:hover .composer-assist-copy small,
.composer-assist-row.active .composer-assist-copy small {
  color: rgba(255, 255, 255, 0.82);
}

.composer-assist-empty {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.expression-picker {
  position: absolute;
  right: 20px;
  bottom: 86px;
  z-index: 40;
  display: grid;
  gap: 12px;
  width: min(520px, calc(100vw - 460px));
  max-height: min(620px, calc(100vh - 150px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #22242a;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
  padding: 12px;
}

.expression-tabs {
  display: flex;
  gap: 8px;
}

.expression-tab {
  min-height: 34px;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  padding: 0 12px;
}

.expression-tab.active,
.expression-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.expression-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.expression-search {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1d22;
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.add-emoji-action {
  min-height: 42px;
}

.expression-body {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 320px;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.expression-rail {
  display: grid;
  align-content: start;
  gap: 5px;
  max-height: 430px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 8px 6px 8px 0;
}

.expression-rail-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 17px;
}

.expression-rail-button.active,
.expression-rail-button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.emoji-content,
.sticker-content {
  max-height: 430px;
  overflow-y: auto;
  padding: 10px 4px 10px 14px;
}

.emoji-content h3,
.sticker-content h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 4px;
  margin-bottom: 14px;
}

.emoji-option {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 7px;
  cursor: pointer;
  font-size: 30px;
}

.emoji-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.gif-grid,
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
  padding: 2px 2px 6px;
}

.sticker-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-right: 4px;
}

.media-option {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 118px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.24), transparent 26%),
    linear-gradient(145deg, color-mix(in srgb, var(--media-accent) 72%, #ffffff), color-mix(in srgb, var(--media-accent) 35%, #0b0d12));
  color: #fff;
  cursor: pointer;
  padding: 10px;
}

.media-option:hover {
  outline: 2px solid var(--accent);
}

.sticker-option {
  min-height: 126px;
  background: rgba(255, 255, 255, 0.06);
}

.media-option-emoji {
  font-size: 44px;
  line-height: 1;
  transition: transform 180ms ease;
}

.media-option:hover .media-option-emoji {
  transform: scale(1.08) rotate(-4deg);
}

.media-option strong {
  align-self: end;
  overflow-wrap: anywhere;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.expression-empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 160px;
  color: var(--muted);
  text-align: center;
}

.primary-action,
.ghost-action,
.danger-action,
.light-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action {
  background: var(--accent);
  color: #061f1a;
}

.primary-action:hover {
  filter: brightness(1.05);
}

.ghost-action {
  background: var(--panel-strong);
  color: var(--text);
}

.danger-action {
  background: rgba(255, 107, 129, 0.13);
  color: #ffd4da;
}

.light-action {
  background: #fff;
  color: #14161b;
}

.member-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(23, 29, 35, 0.96);
  border-left: 1px solid var(--line);
}

.dm-profile-panel {
  background: #1f2027;
  overflow: hidden;
}

.dm-profile-banner {
  position: relative;
  min-height: 120px;
  background: #17345c;
}

.dm-profile-banner-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

.dm-profile-banner-actions .icon-button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.68);
  color: var(--text);
}

.dm-profile-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 16px 16px;
  min-height: 0;
}

.dm-profile-avatar {
  position: relative;
  width: 86px;
  height: 86px;
  margin-top: -46px;
  border: 6px solid #1f2027;
  border-radius: 999px;
  color: #071614;
  font-size: 26px;
  font-weight: 900;
}

.dm-profile-avatar .status-dot {
  position: absolute;
  right: 2px;
  bottom: 6px;
  width: 17px;
  height: 17px;
  border: 4px solid #1f2027;
}

.dm-profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

.dm-profile-name-row strong {
  overflow: hidden;
  font-size: 22px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-profile-badges {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.dm-profile-badges i {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #5865f2;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.dm-profile-tag {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.dm-profile-info-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(12, 13, 17, 0.52);
}

.dm-profile-info-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.dm-profile-info-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.dm-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  padding: 0 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.dm-profile-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dm-profile-row .icon {
  color: var(--muted);
}

.dm-profile-footer {
  width: calc(100% + 32px);
  min-height: 44px;
  margin: auto -16px -16px;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.dm-profile-footer:hover {
  background: rgba(255, 255, 255, 0.05);
}

.panel-section {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.compact-member-section {
  border-bottom: 0;
  padding-bottom: 6px;
}

.panel-section h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.voice-card {
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(49, 208, 170, 0.18), rgba(109, 183, 255, 0.1));
  border: 1px solid rgba(49, 208, 170, 0.25);
  padding: 13px;
}

.voice-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

.voice-card span {
  color: #cfe3de;
  font-size: 12px;
}

.voice-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.voice-actions .icon-button {
  width: 100%;
  height: 36px;
  background: rgba(16, 19, 23, 0.48);
}

.member-list,
.friend-list {
  display: grid;
  gap: 8px;
}

.member-group-heading {
  display: flex;
  gap: 6px;
  align-items: center;
}

.member-group-swatch,
.member-role-swatch {
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 999px;
}

.member-group-swatch {
  width: 8px;
  height: 8px;
}

.member-row,
.friend-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 6px;
  border-radius: 8px;
}

.member-row {
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  width: 100%;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  outline: none;
}

.member-row:hover,
.friend-row:hover {
  background: var(--surface-high);
}

.member-row:focus-visible {
  background: var(--surface-high);
  box-shadow: inset 0 0 0 2px rgba(88, 101, 242, 0.72);
}

.member-row.offline-member {
  opacity: 0.62;
}

.member-row.offline-member:hover,
.member-row.offline-member:focus-visible,
.member-row.offline-member:focus-within {
  opacity: 0.9;
}

.member-role-line {
  display: flex;
  gap: 6px;
  align-items: center;
}

.member-role-swatch {
  width: 7px;
  height: 7px;
}

.member-app-badge {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0 4px;
}

.small-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #071614;
  font-size: 12px;
  font-weight: 900;
}

.member-status {
  min-width: 58px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11px;
}

.member-status.online {
  color: #dfffea;
  background: rgba(126, 231, 135, 0.12);
}

.member-status.in-voice {
  color: #caffd4;
  background: rgba(35, 165, 90, 0.18);
}

.member-status.streaming {
  color: #fff;
  background: #ef4444;
}

.member-quick-actions {
  display: inline-flex;
  gap: 3px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition: max-width 160ms ease, opacity 140ms ease, transform 140ms ease;
}

.member-row:hover .member-quick-actions,
.member-row:focus-within .member-quick-actions {
  max-width: 128px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.member-quick-actions .icon-button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(17, 18, 20, 0.58);
}

.member-quick-actions .icon {
  width: 16px;
  height: 16px;
}

.muted-note {
  margin: 0;
  color: var(--subtle);
  font-size: 12px;
}

.active-now-panel {
  background: rgba(24, 27, 33, 0.98);
}

.active-now-section {
  border-bottom: 0;
  padding: 18px;
}

.active-now-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.active-now-empty {
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
  text-align: center;
}

.active-now-empty strong {
  display: block;
  margin-bottom: 8px;
}

.active-now-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.active-now-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  margin-top: 8px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.active-now-card:hover {
  background: var(--surface-high);
}

.friends-view {
  height: 100%;
  overflow-y: auto;
  padding: 22px;
}

.friends-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0 22px;
}

.friends-hero h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.friends-hero p {
  margin: 0;
  color: var(--muted);
}

.friend-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tab-button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 14px;
  background: var(--surface-high);
  color: var(--muted);
  cursor: pointer;
}

.tab-button.active,
.tab-button:hover {
  background: rgba(49, 208, 170, 0.16);
  color: var(--text);
}

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

.friends-list {
  display: grid;
  gap: 4px;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 8px;
}

.friends-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.friends-section-head strong {
  color: var(--text);
  font-size: 13px;
}

.friends-empty {
  display: grid;
  min-height: 62vh;
  place-items: center;
  color: var(--muted);
}

.friend-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.friend-list-card {
  min-height: 64px;
  border-color: transparent;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.friend-list-card:hover {
  border-radius: 8px;
  background: var(--surface-high);
}

.friend-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.relationship-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.relationship-badge.pending-incoming,
.relationship-badge.pending-outgoing {
  background: rgba(88, 101, 242, 0.18);
  color: #cfd4ff;
}

.relationship-badge.blocked {
  background: rgba(255, 107, 129, 0.14);
  color: #ffc5ce;
}

.friend-actions {
  display: flex;
  gap: 8px;
}

.friend-actions .icon-button {
  width: 36px;
  height: 36px;
}

.compact-action {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 12px;
}

.add-friend-panel {
  max-width: 760px;
  margin: 42px auto 0;
  padding: 0 6px;
}

.add-friend-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.add-friend-panel p,
.add-friend-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.add-friend-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 22px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.add-friend-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1217;
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
}

.add-friend-form input:focus {
  border-color: var(--accent);
  outline: none;
}

.settings-view {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 22px;
}

.settings-hub {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.settings-nav {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 22px 16px;
  background: rgba(16, 19, 23, 0.62);
  border-right: 1px solid var(--line);
}

.settings-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.settings-mini-profile {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.settings-mini-profile-button {
  width: 100%;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.settings-mini-profile-button:hover,
.settings-mini-profile-button.active {
  background: var(--surface-high);
}

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

.settings-mini-profile span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.settings-mini-profile span .icon {
  width: 12px;
  height: 12px;
}

.settings-search {
  width: 100%;
  min-height: 40px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.settings-nav-group {
  margin: 16px 8px 6px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-nav-item {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
  padding: 0 10px;
  text-align: left;
}

.settings-nav-item:hover,
.settings-nav-item.active {
  background: var(--surface-high);
  color: var(--text);
}

.settings-nav-child {
  display: flex;
  width: calc(100% - 22px);
  min-height: 32px;
  align-items: center;
  margin-left: 18px;
  border-left: 2px solid var(--line);
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 0 10px;
  text-align: left;
}

.settings-nav-child:hover,
.settings-nav-child.active {
  border-left-color: var(--accent);
  color: var(--text);
}

.settings-nav-item.danger {
  margin-top: 14px;
  color: #ff9aa9;
}

.settings-detail {
  position: relative;
  min-height: 0;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: none;
  padding: 26px min(7vw, 72px) 46px;
}

.settings-detail::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.settings-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.settings-detail-head h2 {
  margin: 0;
  font-size: 20px;
}

.settings-stack {
  display: grid;
  gap: 24px;
  max-width: 760px;
}

.account-card {
  overflow: hidden;
  border-radius: 8px;
  background: #0f1115;
  border: 1px solid var(--line);
}

.account-banner {
  height: 100px;
  background: linear-gradient(135deg, var(--accent-2), #ff9d1a);
}

.account-body {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 0 16px 16px;
}

.account-avatar {
  width: 84px;
  height: 84px;
  margin-top: -34px;
  border: 6px solid #0f1115;
  border-radius: 50%;
  color: #071614;
  font-size: 18px;
  font-weight: 900;
}

.account-body h3 {
  margin: 8px 0 0;
  min-width: 0;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-rows {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.account-row,
.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.account-row strong,
.settings-row strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.account-row span,
.settings-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.settings-panel {
  max-width: 760px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.settings-panel h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.settings-row {
  min-height: 64px;
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
}

.settings-range {
  width: min(220px, 32vw);
  accent-color: var(--accent);
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.messages,
.friends-view {
  scrollbar-width: thin;
  scrollbar-color: #72757f transparent;
}

.messages::-webkit-scrollbar,
.friends-view::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.messages::-webkit-scrollbar-track,
.friends-view::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.messages::-webkit-scrollbar-thumb,
.friends-view::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #72757f;
  background-clip: content-box;
}

.settings-scrollbar {
  position: absolute;
  top: 48px;
  right: 13px;
  bottom: 18px;
  z-index: 4;
  width: 16px;
  border-radius: 999px;
  cursor: pointer;
}

.settings-scrollbar-thumb {
  width: 8px;
  min-height: 72px;
  margin: 0 auto;
  border-radius: 999px;
  background: #72757f;
  opacity: 0.82;
  transition: background 140ms ease, opacity 140ms ease;
}

.settings-scrollbar:hover .settings-scrollbar-thumb,
.settings-scrollbar-thumb.dragging {
  background: #8b8f99;
  opacity: 1;
}

.settings-scrollbar.disabled {
  opacity: 0;
  pointer-events: none;
}

.profile-editor {
  display: grid;
  gap: 24px;
  max-width: 940px;
}

.profile-editor .primary-action,
.profile-widget-modal .primary-action,
.profile-avatar-modal .primary-action,
.profile-picker-modal .primary-action,
.profile-color-modal .primary-action {
  background: #5865f2;
  color: #fff;
}

.profile-promo {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  min-height: 104px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 35%, rgba(255, 255, 255, 0.34), transparent 7rem),
    linear-gradient(135deg, #8d56ff, #ff79c9 58%, #f6d9ff);
  padding: 16px 24px;
}

.profile-promo-art {
  position: relative;
  min-height: 72px;
}

.profile-promo-art span {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.profile-promo-art span:first-child {
  width: 72px;
  height: 72px;
  background: #202229;
  color: #ffad21;
}

.profile-promo-art span:last-child {
  left: 54px;
  top: 8px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.86);
  color: #5865f2;
}

.profile-promo h3,
.profile-promo p {
  margin: 0;
}

.profile-promo h3 {
  font-size: 20px;
}

.profile-promo p {
  margin-top: 5px;
  color: #fff;
  line-height: 1.35;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 34px;
  align-items: start;
}

.profile-form {
  display: grid;
  gap: 0;
}

.profile-edit-block {
  position: relative;
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 24px;
  margin-bottom: 24px;
}

.profile-edit-block strong {
  font-size: 16px;
}

.profile-edit-block > span {
  color: var(--muted);
  font-size: 13px;
}

.profile-edit-block .primary-action {
  justify-self: start;
  width: auto;
  min-width: 112px;
  padding-inline: 16px;
}

.profile-input,
.profile-bio {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.profile-input {
  min-height: 42px;
}

.profile-bio {
  min-height: 138px;
  resize: vertical;
  padding-top: 12px;
}

.profile-count {
  position: absolute;
  right: 12px;
  bottom: 36px;
  color: var(--muted);
  font-weight: 800;
}

.profile-color-swatch,
.profile-theme-swatch {
  display: grid;
  place-items: center;
  width: 70px;
  height: 50px;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
}

.profile-theme-swatches {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.profile-banner-upload-preview {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fca41c;
  color: #fff;
  padding: 16px;
}

.profile-banner-upload-preview strong {
  width: fit-content;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  padding: 7px 10px;
}

.profile-preview-column {
  position: sticky;
  top: 0;
  display: grid;
  gap: 14px;
}

.profile-preview-column h3 {
  margin: 0;
  font-size: 16px;
}

.profile-preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #24262d;
  box-shadow: var(--shadow);
}

.profile-preview-banner {
  height: 112px;
  background: #fca41c;
}

.profile-preview-body {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 0 16px 16px;
}

.profile-preview-avatar {
  position: relative;
  width: 86px;
  height: 86px;
  margin-top: -43px;
  border: 6px solid #24262d;
  border-radius: 50%;
  color: #071614;
  font-size: 20px;
  font-weight: 900;
}

.status-chip {
  position: absolute;
  top: -8px;
  left: 116px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
}

.profile-preview-card strong {
  font-size: 22px;
}

.profile-preview-card span,
.profile-preview-bio {
  color: var(--text);
  margin: 0;
}

.profile-pronouns,
.profile-widget-pill {
  color: var(--muted) !important;
  font-size: 13px;
}

.profile-widget-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px 9px;
}

.profile-example-button {
  width: 100%;
  justify-self: stretch;
  margin-top: 10px;
}

.profile-nameplate {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
}

.profile-nameplate.fancy {
  background: linear-gradient(135deg, rgba(49, 208, 170, 0.22), rgba(88, 101, 242, 0.26));
}

.profile-nitro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  border: 2px solid rgba(205, 97, 255, 0.8);
  border-radius: 8px;
  background: rgba(72, 43, 86, 0.2);
  padding: 24px;
}

.profile-nitro-panel h3,
.profile-nitro-panel p {
  margin: 0 0 12px;
}

.profile-nitro-preview {
  display: grid;
  gap: 12px;
}

.profile-widget-modal {
  width: min(980px, 100%);
}

.profile-widget-modal-body {
  display: grid;
  grid-template-columns: 420px minmax(360px, 1fr);
  gap: 32px;
  align-items: start;
}

.profile-widget-board {
  display: grid;
  align-content: start;
  gap: 18px;
  text-align: center;
}

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

.widget-card {
  display: grid;
  place-items: center;
  min-height: 92px;
  border-radius: 8px;
  background: var(--surface-high);
  color: var(--text);
  cursor: pointer;
  padding: 12px;
}

.widget-card span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 5px;
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-size: 24px;
  font-weight: 900;
}

.widget-card strong {
  max-width: 100%;
  text-align: center;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-avatar-modal {
  width: min(520px, 100%);
}

.profile-avatar-modal-body {
  display: grid;
  gap: 16px;
}

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

.avatar-upload-tile,
.avatar-remove-tile,
.avatar-gif-tile {
  display: grid;
  place-items: center;
  min-height: 100px;
  border-radius: 8px;
  background: var(--surface-high);
  color: var(--muted);
  cursor: pointer;
}

.avatar-upload-tile {
  grid-row: span 2;
}

.avatar-remove-tile {
  border: 1px solid rgba(218, 55, 60, 0.36);
  color: #ff8f8f;
}

.avatar-gif-tile {
  background:
    linear-gradient(135deg, rgba(49, 208, 170, 0.18), rgba(88, 101, 242, 0.2)),
    var(--surface-high);
}

.hidden-file {
  display: none;
}

.recent-avatar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recent-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  border: 2px solid transparent;
  overflow: hidden;
  transition: border-color 0.12s ease, transform 0.12s ease, opacity 0.12s ease;
}

.recent-avatar:not(:disabled):hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.recent-avatar.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(49, 208, 170, 0.14);
}

.recent-avatar.empty {
  cursor: default;
  opacity: 0.5;
}

.profile-picker-modal {
  width: min(860px, 100%);
}

.profile-picker-body {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.profile-picker-options {
  display: grid;
  gap: 10px;
}

.profile-picker-options h3 {
  margin: 0;
  font-size: 15px;
}

.profile-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 10px;
}

.profile-option {
  display: grid;
  place-items: center;
  min-height: 78px;
  border: 2px solid transparent;
  border-radius: 5px;
  background:
    radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.22), transparent 2rem),
    linear-gradient(135deg, rgba(49, 208, 170, 0.2), rgba(88, 101, 242, 0.22));
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.profile-option.active {
  border-color: #5865f2;
}

.profile-option span {
  font-size: 22px;
}

.profile-option strong {
  font-size: 11px;
  text-align: center;
}

.profile-picker-preview {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.profile-picker-preview .profile-preview-card {
  width: 100%;
}

.profile-picker-preview .profile-preview-avatar {
  width: 76px;
  height: 76px;
  margin-top: -38px;
}

.profile-picker-preview .status-chip {
  left: 104px;
}

.picker-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.profile-color-modal {
  width: min(360px, 100%);
}

.profile-color-body {
  display: grid;
  gap: 18px;
}

.profile-color-input {
  width: 100%;
  height: 170px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.profile-color-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.profile-color-choice {
  aspect-ratio: 1;
  border-radius: 6px;
  cursor: pointer;
}

.profile-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-radius: 8px;
  background: var(--surface-high);
  padding: 12px 14px;
}

.tabs-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(49, 208, 170, 0.12), rgba(109, 183, 255, 0.1));
  padding: 22px;
}

.hero-panel h3 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.15;
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.info-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.info-card-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--surface-high);
  color: var(--accent);
  font-weight: 900;
}

.info-card strong,
.info-card span,
.empty-panel strong,
.empty-panel span {
  display: block;
}

.info-card strong {
  margin-bottom: 8px;
}

.info-card span,
.empty-panel span {
  color: var(--muted);
  line-height: 1.45;
}

.empty-panel {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 24px;
  text-align: center;
}

.connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 10px;
  max-width: 560px;
}

.connection-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.connection-tile:hover {
  border-color: rgba(49, 208, 170, 0.44);
  background: var(--surface-high);
}

.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--panel-soft);
  cursor: pointer;
}

.toggle:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 150ms ease, background 150ms ease;
}

.toggle.active {
  background: rgba(49, 208, 170, 0.25);
}

.toggle.active::after {
  transform: translateX(20px);
  background: var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  z-index: 20;
}

.modal {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.modal.profile-widget-modal {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.modal.profile-picker-modal {
  width: min(860px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.modal.profile-avatar-modal {
  width: min(560px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.modal.profile-color-modal {
  width: min(380px, calc(100vw - 48px));
}

.modal.reaction-picker-modal {
  width: min(620px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.modal.quick-switcher-modal {
  width: min(680px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  padding: 16px;
  overflow: hidden;
}

.modal.danger-confirm-modal {
  width: min(560px, calc(100vw - 48px));
}

.modal.screen-share-modal {
  width: min(960px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding-bottom: 16px;
}

.modal.utility-modal,
.modal.member-profile-modal {
  width: min(640px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.danger-confirm-panel {
  display: grid;
  gap: 16px;
}

.delete-message-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(255, 107, 129, 0.22);
  border-radius: 8px;
  background: rgba(255, 107, 129, 0.08);
  padding: 12px;
}

.delete-message-copy {
  min-width: 0;
}

.delete-message-copy strong {
  display: inline-block;
  margin-right: 8px;
  color: var(--text);
}

.delete-message-copy span {
  color: var(--subtle);
  font-size: 11px;
}

.delete-message-copy p {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reaction-picker-panel {
  display: grid;
  gap: 12px;
}

.reaction-message-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.reaction-preview-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

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

.reaction-preview-copy span {
  color: var(--muted);
  font-size: 12px;
}

.reaction-search {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1217;
  color: var(--text);
  padding: 0 12px;
}

.reaction-search:focus {
  border-color: var(--accent);
  outline: none;
}

.reaction-picker-body {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.reaction-emoji-content {
  max-height: 430px;
  overflow-y: auto;
  padding: 12px;
}

.reaction-emoji-content h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.reaction-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 5px;
  margin-bottom: 14px;
}

.quick-switcher-panel {
  display: grid;
  gap: 12px;
}

.quick-switcher-input {
  min-height: 48px;
  border: 1px solid rgba(88, 101, 242, 0.5);
  border-radius: 8px;
  background: #0f1117;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  outline: none;
  padding: 0 14px;
}

.quick-switcher-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.18);
}

.quick-switcher-results {
  display: grid;
  gap: 4px;
  max-height: min(55vh, 480px);
  overflow-y: auto;
  padding-right: 4px;
}

.quick-switcher-result {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.quick-switcher-result:hover,
.quick-switcher-result.active {
  background: var(--accent);
  color: #fff;
}

.quick-switcher-result .icon {
  color: currentColor;
}

.quick-switcher-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quick-switcher-copy strong,
.quick-switcher-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-switcher-copy small {
  color: var(--muted);
  font-size: 12px;
}

.quick-switcher-result:hover .quick-switcher-copy small,
.quick-switcher-result.active .quick-switcher-copy small {
  color: rgba(255, 255, 255, 0.82);
}

.quick-switcher-kind {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--subtle);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.quick-switcher-result:hover .quick-switcher-kind,
.quick-switcher-result.active .quick-switcher-kind {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.quick-switcher-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 12px;
}

.quick-switcher-hint span {
  border-radius: 4px;
  background: var(--surface);
  padding: 4px 7px;
}

.context-menu {
  position: fixed;
  z-index: 35;
  display: grid;
  min-width: 220px;
  max-height: calc(100vh - 16px);
  gap: 2px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #181c22;
  box-shadow: var(--shadow);
  padding: 6px;
}

.context-menu-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 34px;
  border-radius: 6px;
  padding: 0 9px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.context-menu-item:hover {
  background: var(--accent-strong);
  color: #061512;
}

.context-menu-item.danger {
  color: #ff9b9b;
}

.context-menu-item.danger:hover {
  background: var(--danger);
  color: #fff;
}

.context-menu-item .icon {
  width: 16px;
  height: 16px;
}

.context-menu-separator {
  height: 1px;
  margin: 5px;
  background: var(--line);
}

.utility-panel,
.settings-modal-list,
.channel-settings-form {
  display: grid;
  gap: 14px;
}

.utility-panel > h3 {
  margin: 8px 0 0;
  font-size: 14px;
}

.utility-list {
  display: grid;
  gap: 8px;
}

.utility-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 8px;
}

.utility-row-button {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.utility-row-button:hover {
  background: var(--surface-high);
}

.utility-row-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.utility-row-meta span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.utility-row-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
}

.help-panel {
  gap: 16px;
}

.help-hero {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.22), rgba(49, 208, 170, 0.12));
  padding: 14px;
}

.help-hero strong {
  font-size: 20px;
}

.help-hero span {
  color: var(--muted);
  font-size: 13px;
}

.help-command-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 8px;
}

.help-command-pill {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border-radius: 8px;
  background: var(--surface-high);
  color: var(--text);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.help-command-pill:hover {
  background: rgba(88, 101, 242, 0.2);
}

.help-command-pill span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-shortcut-row {
  grid-template-columns: 24px minmax(0, 1fr) auto;
}

.help-shortcut-row > .icon {
  width: 18px;
  height: 18px;
  color: var(--subtle);
}

.help-shortcut-keys {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.help-shortcut-keys kbd {
  min-width: 28px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 7px;
  text-align: center;
}

.inbox-toolbar {
  display: grid;
  gap: 10px;
}

.inbox-tabs {
  margin-bottom: 0;
}

.inbox-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.inbox-row {
  align-items: start;
}

.inbox-row .utility-row-actions {
  flex-wrap: wrap;
}

.threads-toolbar {
  display: grid;
  gap: 10px;
}

.threads-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.threads-summary .muted-note {
  margin: 0;
}

.thread-tabs {
  margin-bottom: 0;
}

.thread-row {
  align-items: start;
}

.thread-row .utility-row-actions {
  flex-wrap: wrap;
}

.notification-settings-panel {
  gap: 14px;
}

.notification-scope-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.notification-scope-card > .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

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

.notification-scope-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.notification-choice-group {
  justify-content: flex-end;
}

.notification-global-card {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.notification-global-card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.browse-channels-panel {
  gap: 12px;
}

.browse-channel-tools {
  display: grid;
  gap: 10px;
}

.browse-channel-search {
  width: 100%;
}

.browse-channel-tabs {
  margin-bottom: 0;
}

.browse-channel-summary {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.browse-channel-row {
  align-items: start;
}

.hidden-channel-row {
  opacity: 0.72;
}

.favorite-channel > .icon {
  color: #f4b45f;
}

.favorite-badge {
  background: rgba(244, 180, 95, 0.16);
  color: #ffd28a;
}

.browse-channel-meta {
  gap: 5px;
}

.browse-channel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.browse-channel-row .utility-row-actions {
  flex-wrap: wrap;
}

.invite-link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px;
}

.invite-link-box code {
  overflow: hidden;
  color: #dce7e3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-link-actions {
  display: flex;
  gap: 8px;
}

.invite-modal {
  width: min(760px, calc(100vw - 48px));
}

.invite-modal-panel {
  gap: 12px;
}

.invite-target-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.invite-target-icon {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 14px;
  font-size: 16px;
}

.invite-target-card strong,
.invite-target-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-target-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.invite-friend-search {
  width: 100%;
}

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

.invite-setting-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.invite-setting-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10161b;
  color: var(--text);
  padding: 10px;
}

.invite-toggle-list {
  display: grid;
  gap: 8px;
}

.invite-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}

.invite-toggle-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.invite-toggle-copy {
  display: grid;
  gap: 3px;
}

.invite-toggle-copy small {
  color: var(--muted);
}

.toggle-switch {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #303741;
}

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

.invite-toggle-row.active .toggle-switch {
  background: var(--accent-strong);
}

.invite-toggle-row.active .toggle-switch::after {
  transform: translateX(20px);
}

.invite-expiry-note {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.invite-friend-row.invited {
  border-color: rgba(49, 208, 170, 0.22);
  background: rgba(49, 208, 170, 0.08);
}

.invited-action {
  color: var(--accent);
}

.server-invite-modal {
  width: min(520px, calc(100vw - 48px));
}

.server-invite-panel {
  gap: 16px;
}

.server-invite-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.server-invite-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 22px;
}

.server-invite-copy h3 {
  margin: 4px 0;
  font-size: 22px;
}

.server-invite-copy p {
  margin: 0;
  color: var(--muted);
}

.server-invite-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.server-invite-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 9px;
}

.server-invite-stats small {
  color: var(--muted);
}

.events-panel {
  gap: 12px;
}

.events-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.event-tabs {
  margin-bottom: 0;
}

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

.event-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.event-card.live {
  border-color: rgba(35, 165, 90, 0.36);
  background:
    linear-gradient(90deg, rgba(35, 165, 90, 0.14), transparent 44%),
    rgba(255, 255, 255, 0.035);
}

.event-card.past {
  opacity: 0.72;
}

.event-date-tile {
  display: grid;
  width: 58px;
  min-height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10161b;
  padding: 6px;
  text-align: center;
}

.event-date-tile span {
  color: #ff8f9a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.event-date-tile strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
}

.event-meta {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.event-meta h3,
.event-meta p {
  margin: 0;
}

.event-meta h3 {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-meta p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-detail-line {
  overflow: hidden;
  color: var(--subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-badges,
.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.event-actions {
  justify-content: flex-end;
}

.live-badge {
  background: rgba(237, 66, 69, 0.18);
  color: #ffb4b6;
}

.modal.event-detail-modal,
.modal.event-editor-modal {
  width: min(720px, calc(100vw - 48px));
}

.event-detail-panel,
.event-editor-form {
  display: grid;
  gap: 14px;
}

.event-detail-hero {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.16), rgba(49, 208, 170, 0.08)),
    rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.event-detail-hero > .icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-high);
  color: var(--accent);
}

.event-detail-hero strong,
.event-detail-hero span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-detail-hero span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.event-detail-actions {
  flex-wrap: wrap;
}

.event-editor-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-editor-form input,
.event-editor-form select,
.event-editor-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10161b;
  color: var(--text);
  padding: 10px;
  text-transform: none;
}

.event-editor-form textarea {
  min-height: 104px;
  resize: vertical;
}

.channel-type-pill {
  border-radius: 999px;
  background: rgba(49, 208, 170, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.channel-state-badges,
.channel-settings-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.channel-state-badge {
  display: inline-grid;
  place-items: center;
  min-height: 18px;
  max-width: 76px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.16);
  color: #b7c0ff;
  font-size: 10px;
  font-weight: 900;
  padding: 0 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal.channel-settings-modal {
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.modal.channel-details-modal {
  width: min(680px, calc(100vw - 48px));
}

.channel-details-panel {
  gap: 14px;
}

.channel-details-hero {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.14), rgba(49, 208, 170, 0.08)),
    rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.channel-details-hero > .icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-high);
  color: var(--accent);
}

.channel-details-hero strong,
.channel-details-hero span {
  display: block;
}

.channel-details-hero span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.channel-details-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.channel-detail-stat,
.channel-topic-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.channel-detail-stat span {
  display: block;
  margin-bottom: 6px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.channel-detail-stat strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-topic-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.channel-topic-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.channel-details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.channel-settings-form {
  gap: 16px;
}

.channel-settings-hero {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.16), rgba(49, 208, 170, 0.08)),
    rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.channel-settings-hero > .icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.channel-settings-hero strong,
.channel-settings-hero span {
  display: block;
}

.channel-settings-hero span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.channel-settings-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.channel-settings-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.channel-settings-section label {
  margin: 0;
}

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

.channel-setting-row {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.035);
}

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

.channel-role-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

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

.channel-permission-choice {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 0 8px;
}

.channel-permission-choice.allow {
  border-color: rgba(35, 165, 90, 0.55);
  background: rgba(35, 165, 90, 0.14);
  color: var(--good);
}

.channel-permission-choice.deny {
  border-color: rgba(239, 68, 68, 0.52);
  background: rgba(239, 68, 68, 0.12);
  color: #ff9b9b;
}

.channel-permission-choice:hover {
  border-color: rgba(49, 208, 170, 0.5);
}

.reset-channel-permissions {
  justify-self: start;
}

.boost-banner {
  display: grid;
  gap: 5px;
  border-radius: 8px;
  background: linear-gradient(120deg, #5865f2, #ec4899);
  color: #fff;
  padding: 18px;
}

.member-profile-card {
  display: grid;
  gap: 16px;
}

.member-profile-banner {
  height: 110px;
  border-radius: 8px;
}

.member-profile-head {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-top: -52px;
  padding: 0 14px;
}

.member-profile-avatar {
  position: relative;
  width: 82px;
  height: 82px;
  border: 6px solid var(--panel);
  border-radius: 24px;
  color: #071614;
  font-size: 22px;
  font-weight: 900;
}

.member-profile-head div:last-child,
.member-profile-info {
  display: grid;
  gap: 4px;
}

.member-profile-head span,
.member-profile-info span {
  color: var(--muted);
}

.member-profile-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.member-profile-section {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.member-profile-section > strong {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0;
}

.member-profile-section > span {
  color: var(--muted);
  line-height: 1.45;
}

.member-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.member-role-pill i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.member-profile-note {
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font: inherit;
  padding: 10px;
  outline: none;
}

.member-profile-note:focus {
  border-color: rgba(88, 101, 242, 0.74);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.16);
}

.member-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal.member-role-modal {
  width: min(520px, calc(100vw - 48px));
}

.member-role-manager {
  display: grid;
  gap: 16px;
}

.member-role-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.member-role-summary > div:last-child {
  display: grid;
  gap: 3px;
}

.member-role-summary span {
  color: var(--muted);
  font-size: 13px;
}

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

.member-role-choice {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 9px 11px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
}

.member-role-choice:hover,
.member-role-choice.active {
  border-color: rgba(88, 101, 242, 0.74);
  background: rgba(88, 101, 242, 0.16);
}

.member-role-choice .member-role-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.member-role-choice span,
.member-role-choice small {
  min-width: 0;
}

.member-role-choice span {
  font-weight: 800;
}

.member-role-choice small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.35;
}

.rules-gate,
.composer-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(252, 164, 28, 0.42);
  border-radius: 8px;
  background: rgba(252, 164, 28, 0.09);
  padding: 12px 14px;
}

.rules-gate {
  display: grid;
  justify-items: start;
  margin: 16px 0;
}

.rules-gate span,
.composer-locked span {
  color: var(--muted);
}

.search-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
  padding: 10px 16px;
}

.search-results-bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(88, 101, 242, 0.08);
  padding: 10px 16px;
}

.search-results-copy {
  display: grid;
  gap: 2px;
}

.search-results-copy strong {
  font-size: 13px;
}

.search-results-copy span {
  color: var(--muted);
  font-size: 12px;
}

.search-results-position {
  color: #cdd3ff !important;
  font-weight: 800;
}

.search-query-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.search-query-pill,
.search-query-more {
  align-items: center;
  border: 1px solid rgba(88, 101, 242, 0.36);
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.16);
  color: var(--text);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  max-width: 180px;
  min-height: 22px;
  padding: 3px 7px;
}

.search-query-pill {
  cursor: pointer;
  gap: 5px;
}

.search-query-pill:hover {
  border-color: rgba(88, 101, 242, 0.62);
  background: rgba(88, 101, 242, 0.25);
}

.search-query-pill span {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-query-pill .icon {
  flex: 0 0 auto;
  height: 12px;
  width: 12px;
}

.search-query-more {
  color: var(--muted);
}

.search-results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-chip {
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.filter-chip:hover {
  background: var(--accent);
  color: #fff;
}

.filter-chip.active {
  background: rgba(88, 101, 242, 0.92);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.message.search-result-message {
  border-left: 2px solid rgba(88, 101, 242, 0.5);
}

.message.search-result-message.active-search-result {
  border-left-color: var(--accent);
  background: rgba(88, 101, 242, 0.11);
}

.search-match {
  border-radius: 3px;
  background: rgba(250, 166, 26, 0.45);
  color: #fff;
  font-weight: 900;
  padding: 0 2px;
}

.server-guide-panel,
.server-settings-panel,
.roles-panel,
.automod-panel,
.rules-panel,
.soundboard-panel,
.activity-picker-panel,
.thread-detail-panel,
.server-template-panel {
  display: grid;
  gap: 14px;
}

.server-settings-modal {
  width: min(760px, calc(100vw - 48px));
}

.server-settings-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(49, 208, 170, 0.08));
}

.server-settings-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  color: #fff;
  font-size: 23px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.server-settings-hero strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}

.server-settings-hero p,
.server-toggle-copy span,
.server-quick-action small,
.server-setting-note {
  color: var(--muted);
}

.server-settings-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.server-settings-section {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.server-settings-section h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.server-settings-form-grid label:first-child,
.server-settings-form-grid label:nth-child(3) {
  grid-column: 1 / -1;
}

.server-color-picker {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.server-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.server-color-choice {
  width: 42px;
  height: 42px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.server-color-choice.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--accent);
}

.server-toggle-grid,
.server-settings-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.server-toggle-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

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

.server-toggle-copy {
  display: grid;
  gap: 4px;
}

.server-toggle-copy strong {
  color: var(--text);
}

.server-toggle-visual {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px var(--line);
}

.server-toggle-visual::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease, background 0.18s ease;
}

.server-toggle-card input:checked + .server-toggle-visual {
  background: var(--accent);
}

.server-toggle-card input:checked + .server-toggle-visual::after {
  transform: translateX(20px);
}

.server-quick-action {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.server-quick-action:hover {
  background: rgba(255, 255, 255, 0.07);
}

.server-quick-action span {
  display: grid;
  gap: 3px;
}

.server-members-panel,
.server-audit-panel {
  display: grid;
  gap: 14px;
}

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

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

.server-member-stat strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.server-member-stat span,
.server-member-manage-meta span,
.server-audit-row span {
  color: var(--muted);
}

.server-members-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.server-members-tools .ghost-action {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.server-members-list,
.server-audit-list {
  display: grid;
  gap: 12px;
}

.server-member-group {
  display: grid;
  gap: 6px;
}

.server-member-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.server-member-manage-row,
.server-audit-row {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.server-member-manage-row {
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
}

.server-member-manage-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.server-member-manage-meta strong,
.server-audit-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-member-manage-actions {
  display: flex;
  gap: 6px;
}

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

.server-audit-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(88, 101, 242, 0.18);
  color: var(--accent);
}

.server-audit-icon .icon {
  width: 18px;
  height: 18px;
}

.server-audit-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.server-audit-row time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.server-settings-footer {
  justify-content: space-between;
}

.server-settings-footer .danger-action {
  margin-right: auto;
}

.server-settings-footer .danger-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .server-settings-hero,
  .server-settings-form-grid,
  .server-toggle-grid,
  .server-settings-actions,
  .server-members-summary,
  .server-member-manage-row,
  .server-audit-row {
    grid-template-columns: 1fr;
  }

  .server-member-manage-actions {
    flex-wrap: wrap;
  }
}

.guide-task-list,
.guide-resource-grid,
.soundboard-grid,
.activity-grid,
.permission-grid {
  display: grid;
  gap: 10px;
}

.guide-task-list,
.guide-resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-task,
.guide-resource,
.activity-card,
.sound-tile,
.permission-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.guide-task {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 10px;
  text-align: left;
}

.guide-task span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.guide-task.done span {
  background: var(--accent);
  color: #06201a;
  font-weight: 900;
}

.guide-resource,
.activity-card {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 12px;
  text-align: left;
}

.guide-resource {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
}

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

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

.role-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

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

.permission-pill {
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.permission-pill.active {
  border-color: rgba(49, 208, 170, 0.5);
  background: rgba(49, 208, 170, 0.14);
  color: var(--accent);
}

.automod-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.automod-rule div {
  display: grid;
  gap: 4px;
}

.automod-rule span {
  color: var(--muted);
  font-size: 12px;
}

.rules-list {
  display: grid;
  gap: 8px;
}

.rule-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.rule-item span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(49, 208, 170, 0.15);
  color: var(--accent);
  font-weight: 900;
}

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

.sound-tile {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 96px;
  background: radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--sound-color) 35%, transparent), rgba(255, 255, 255, 0.04));
}

.sound-tile span {
  font-size: 30px;
}

.activity-card .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.activity-card span {
  color: var(--muted);
  font-size: 12px;
}

.activity-card.active,
.activity-card:hover,
.guide-resource:hover,
.guide-task:hover,
.sound-tile:hover {
  border-color: rgba(49, 208, 170, 0.6);
  background-color: rgba(49, 208, 170, 0.09);
}

.thread-replies {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.thread-starter-card,
.thread-reply {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.thread-starter-card {
  border-color: rgba(88, 101, 242, 0.32);
  background: rgba(88, 101, 242, 0.08);
}

.thread-starter-card.deleted {
  opacity: 0.78;
}

.thread-starter-copy,
.thread-reply-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.thread-starter-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.thread-reply-time,
.thread-starter-head span {
  color: var(--muted);
  font-size: 12px;
}

.thread-starter-preview {
  color: #c8d2dc;
}

.thread-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.forum-view {
  min-height: 0;
  overflow: hidden;
}

.forum-scroll {
  display: grid;
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  padding: 22px 28px 30px;
  scrollbar-width: thin;
  scrollbar-color: #72757f transparent;
}

.forum-scroll::-webkit-scrollbar {
  width: 12px;
}

.forum-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.forum-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #72757f;
  background-clip: content-box;
}

.forum-hero {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  max-width: 980px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(49, 208, 170, 0.12)),
    var(--surface);
  padding: 18px;
}

.forum-hero > .icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.forum-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.forum-hero h3,
.forum-hero p,
.forum-post-body h3,
.forum-post-body p,
.forum-detail-intro p,
.forum-reply p {
  margin: 0;
}

.forum-hero h3 {
  font-size: 24px;
}

.forum-hero p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.forum-tag-row,
.forum-tags,
.forum-post-states {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.forum-tag-row {
  max-width: 980px;
}

.forum-channel-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 980px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px 12px;
}

.forum-channel-notice .ghost-action {
  margin-left: auto;
}

.forum-tag,
.forum-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

button.forum-tag {
  cursor: pointer;
}

.forum-tag.active,
button.forum-tag:hover {
  background: rgba(49, 208, 170, 0.16);
  color: var(--accent);
}

.forum-tag.label {
  min-height: 24px;
  background: rgba(88, 101, 242, 0.14);
  color: #b7c0ff;
}

.forum-state.solved {
  background: rgba(35, 165, 90, 0.18);
  color: var(--good);
}

.forum-state.locked {
  background: rgba(239, 68, 68, 0.14);
  color: #ff9b9b;
}

.forum-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-width: 980px;
}

.forum-post-grid > .empty-panel {
  grid-column: 1 / -1;
}

.forum-post-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  padding: 14px;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.forum-post-card:hover,
.forum-post-card:focus-visible {
  border-color: rgba(49, 208, 170, 0.55);
  background: var(--surface-high);
  outline: none;
  transform: translateY(-1px);
}

.forum-post-head,
.forum-detail-intro,
.forum-reply {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.forum-post-meta,
.forum-detail-intro > div,
.forum-reply > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.forum-post-meta span,
.forum-detail-intro span,
.forum-reply span {
  color: var(--muted);
  font-size: 12px;
}

.forum-post-body {
  display: grid;
  gap: 8px;
}

.forum-post-body h3 {
  font-size: 17px;
  line-height: 1.2;
}

.forum-post-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.forum-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}

.modal.forum-detail-modal {
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.forum-detail-panel {
  display: grid;
  gap: 16px;
}

.forum-detail-intro {
  grid-template-columns: 38px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.forum-detail-intro p,
.forum-reply p {
  color: var(--text);
  line-height: 1.45;
}

.forum-replies {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.forum-reply {
  grid-template-columns: 34px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
}

.forum-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.forum-locked-note {
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  color: #ffb3b3;
  padding: 10px 12px;
}

.forum-detail-actions {
  flex-wrap: wrap;
}

.template-grid,
.status-picker-grid {
  display: grid;
  gap: 10px;
}

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

.template-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.template-card:hover {
  border-color: var(--accent);
  background: rgba(88, 101, 242, 0.16);
}

.template-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.status-choice {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.status-choice.active,
.status-choice:hover {
  border-color: var(--accent);
  background: rgba(88, 101, 242, 0.18);
}

.screen-share-body {
  display: grid;
  gap: 18px;
}

.screen-share-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  padding: 5px;
}

.screen-share-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.screen-share-tab.active,
.screen-share-tab:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.screen-share-tab .icon {
  width: 16px;
  height: 16px;
}

.share-options {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.share-options span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 9px;
}

.share-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  max-height: min(52vh, 440px);
  overflow-y: auto;
  padding-right: 6px;
}

.share-source-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0 0 8px;
  text-align: left;
}

.share-source-card:hover,
.share-source-card.selected {
  border-color: var(--accent);
  background: rgba(49, 208, 170, 0.08);
}

.share-source-card strong,
.share-source-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 10px;
}

.share-source-card span {
  color: var(--muted);
  font-size: 12px;
}

.share-source-thumb {
  display: grid;
  place-items: center;
  height: 150px;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(145deg, #20333c, #3f334a);
  color: #fff;
  font-weight: 900;
}

.share-source-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-source-thumb.files {
  background: linear-gradient(145deg, #eef2f7, #dce6f7);
  color: #1f2937;
}

.share-source-thumb.browser {
  background: linear-gradient(145deg, #fff, #dbeafe);
  color: #111827;
}

.share-source-thumb.game {
  background: linear-gradient(145deg, #172554, #7e22ce);
}

.share-source-empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 170px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.screen-share-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.share-footer-info {
  display: grid;
  gap: 4px;
}

.share-footer-info span {
  color: var(--muted);
  font-size: 12px;
}

.share-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quality-choice {
  min-width: 44px;
  min-height: 36px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.quality-choice.active,
.quality-choice:hover {
  color: #fff;
  background: #050607;
}

.stream-start-action:disabled,
button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.55;
}

.nitro-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #8b3fd1, #ec6ab7);
  color: #fff;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 900;
}

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

.modal h2 {
  margin: 0;
  font-size: 20px;
}

.modal form {
  display: grid;
  gap: 13px;
}

.modal label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.modal input,
.modal textarea,
.modal select {
  padding: 0 12px;
}

.modal textarea {
  min-height: 82px;
  padding-top: 10px;
  resize: vertical;
}

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

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 30;
}

.toast {
  width: min(340px, calc(100vw - 40px));
  border: 1px solid rgba(49, 208, 170, 0.24);
  border-radius: 8px;
  background: var(--surface-high);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 12px 14px;
  font-size: 13px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  color: var(--muted);
  text-align: center;
}

.render-recovery {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #111214;
  color: var(--text);
}

.render-recovery-card {
  width: min(440px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.render-recovery-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.render-recovery-card .modal-actions {
  width: 100%;
  justify-content: center;
}

.hidden {
  display: none !important;
}

body.focus-mode .member-panel {
  display: none;
}

body.focus-mode .workspace {
  grid-template-columns: 72px 286px minmax(0, 1fr);
}

body.settings-open .member-panel {
  display: none;
}

body.settings-open .workspace {
  grid-template-columns: 72px 286px minmax(0, 1fr);
}

body.screen-sharing .member-panel {
  display: none;
}

body.screen-sharing .workspace {
  grid-template-columns: 72px 286px minmax(0, 1fr);
}

body.member-panel-closed .workspace {
  grid-template-columns: 72px 286px minmax(0, 1fr);
}

body.compact-messages .message {
  padding: 3px 0;
}

body.compact-messages .message-tools {
  margin-top: 4px;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 66px 260px minmax(0, 1fr);
  }

  .member-panel {
    display: none;
  }
}

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

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 64px auto minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
  }

  .server-rail {
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-separator {
    width: 1px;
    height: 36px;
  }

  .server-list {
    flex-direction: row;
    flex: 0 0 auto;
    width: auto;
  }

  .sidebar {
    max-height: 310px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main {
    min-height: 650px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 116px;
    padding: 14px;
  }

  .topbar-actions {
    width: 100%;
  }

  .dm-call-topbar-actions {
    flex-wrap: wrap;
  }

  .dm-call-topbar-control-group {
    flex: 1 1 100%;
    justify-content: center;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }

  .channel-details-hero,
  .channel-details-stats {
    grid-template-columns: 1fr;
  }

  .channel-details-actions {
    justify-content: stretch;
  }

  .channel-details-actions > button {
    flex: 1 1 160px;
  }

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

  .composer-assist {
    left: 14px;
    right: 14px;
    width: auto;
  }

  .composer-inner .ghost-action {
    display: none;
  }

  .settings-hub {
    position: relative;
    grid-template-columns: 1fr;
    overflow: auto;
  }

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

  .settings-mini-profile,
  .settings-search,
  .settings-nav-group {
    display: none;
  }

  .settings-nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 0 12px;
  }

  .settings-nav-child {
    flex: 0 0 auto;
    width: auto;
    margin-left: 0;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 0 12px;
  }

  .settings-nav-child.active {
    border-bottom-color: var(--accent);
  }

  .settings-detail {
    overflow: visible;
    padding: 18px;
  }

  .content,
  .settings-view,
  .settings-hub {
    height: auto;
    overflow: visible;
  }

  .voice-stage {
    min-height: 720px;
    grid-template-rows: auto auto;
    overflow: visible;
    padding: 18px 14px 92px;
  }

  .voice-stage-tiles,
  .screen-share-footer {
    grid-template-columns: 1fr;
  }

  .voice-activity-panel {
    width: 100%;
  }

  .call-dock {
    position: fixed;
    bottom: 16px;
  }

  .settings-scrollbar {
    display: none;
  }

  .profile-promo,
  .profile-layout,
  .profile-nitro-panel,
  .profile-widget-modal-body,
  .profile-picker-body {
    grid-template-columns: 1fr;
  }

  .profile-preview-column {
    position: static;
  }

  .avatar-chooser-grid {
    grid-template-columns: 1fr 1fr;
  }

  .avatar-upload-tile {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .account-body,
  .account-row,
  .settings-row {
    grid-template-columns: 1fr;
  }

  .inbox-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .inbox-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .inbox-row .utility-row-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .threads-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .thread-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .thread-row .utility-row-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .notification-choice-group {
    justify-content: flex-start;
  }

  .browse-channel-summary {
    flex-direction: column;
  }

  .browse-channel-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .browse-channel-row .utility-row-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .events-header,
  .event-card,
  .event-detail-hero,
  .event-detail-grid {
    grid-template-columns: 1fr;
  }

  .event-actions {
    justify-content: flex-start;
  }

  .choice-group {
    justify-content: flex-start;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .messages,
  .friends-view,
  .settings-view {
    padding: 16px;
  }

  .friends-hero {
    grid-template-columns: 1fr;
  }

  .composer {
    padding: 10px 12px 14px;
  }

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

  .composer-inner > .icon-button {
    display: none;
  }

  .composer-expression-tools {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .composer-tool-pill {
    flex: 1;
  }

  .expression-picker {
    left: 12px;
    right: 12px;
    bottom: 98px;
    width: auto;
  }

  .composer-assist {
    left: 12px;
    right: 12px;
    bottom: 98px;
    width: auto;
  }

  .gif-grid,
  .sticker-grid {
    grid-template-columns: 1fr 1fr;
  }

  .screen-share-tabs,
  .share-source-grid {
    grid-template-columns: 1fr;
  }

  .share-footer-actions,
  .nitro-banner {
    flex-wrap: wrap;
  }

  .welcome-card,
  .message {
    grid-template-columns: 1fr;
  }

  .welcome-action-row {
    grid-template-columns: 24px minmax(0, 1fr) 16px;
  }

  .welcome-action-copy span {
    white-space: normal;
  }

  .jump-present-button {
    right: 16px;
    bottom: 112px;
  }
}
