:root {
  --bg: #18191f;
  --panel: #202229;
  --ink: #f4f5fb;
  --muted: #aeb2bf;
  --line: #2c2f38;
  --brand: #5865f2;
  --brand-strong: #7f8bff;
  --accent: #f2b84b;
  --danger: #c94b4b;
  --success: #2b8f68;
  --incoming: #2a2d36;
  --outgoing: #384052;
  --shadow: 0 18px 42px rgba(23, 32, 42, 0.12);
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.voice-call-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: grid;
  background: #050506;
}

.voice-call-card {
  position: relative;
  display: grid;
  min-height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 18px 24px 28px;
  background:
    radial-gradient(circle at 50% 42%, rgba(88, 101, 242, 0.11), transparent 28%),
    #050506;
  user-select: none;
}

.voice-call-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #d7dae5;
}

.voice-call-header strong,
.voice-call-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-call-header strong {
  color: #fff;
  font-size: 15px;
}

.voice-call-header span {
  color: #8f94a3;
  font-size: 13px;
}

.voice-call-chat-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  margin-left: auto;
  place-items: center;
  border-radius: 50%;
  background: #1f2128;
  color: #d7dae5;
}

.voice-call-chat-toggle:hover {
  background: #2d3038;
  color: #fff;
}

.voice-call-peer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #35b66b;
  box-shadow: 0 0 0 3px rgba(53, 182, 107, 0.16);
}

.voice-call-stage {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  min-height: 0;
  padding-bottom: 78px;
}

.voice-call-avatar {
  display: grid;
  width: clamp(96px, 12vw, 150px);
  height: clamp(96px, 12vw, 150px);
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 900;
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.04),
    0 22px 55px rgba(0, 0, 0, 0.42);
}

.voice-call-stage.is-two-users {
  align-content: center;
  padding-inline: 24px;
}

.voice-call-participants {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 320px));
  justify-content: center;
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
  width: 100%;
}

.voice-call-participant {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-width: 0;
}

.voice-call-participant.is-self .voice-call-avatar {
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.04),
    0 22px 55px rgba(0, 0, 0, 0.42);
}

.voice-call-overlay.is-connected .voice-call-avatar {
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.04),
    0 22px 55px rgba(0, 0, 0, 0.42);
}

.voice-call-overlay.is-connected .voice-call-participant.is-self .voice-call-avatar {
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.04),
    0 22px 55px rgba(0, 0, 0, 0.42);
}

.voice-call-overlay.is-connected .voice-call-participant.is-speaking .voice-call-avatar {
  outline: 3px solid #35b66b;
  outline-offset: 6px;
  animation: voiceSpeakingPulse 780ms ease-in-out infinite;
}

.voice-call-overlay.is-connected .voice-call-participant.is-speaking:not(.is-self) .voice-call-avatar {
  outline-color: #35b66b;
}

.voice-call-overlay.is-connected .voice-call-participant.is-speaking.is-self .voice-call-avatar {
  outline-color: #5865f2;
}

@keyframes voiceSpeakingPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 10px rgba(53, 182, 107, 0.12),
      0 0 0 18px rgba(53, 182, 107, 0.04),
      0 22px 55px rgba(0, 0, 0, 0.42);
    transform: scale(1);
  }

  50% {
    box-shadow:
      0 0 0 14px rgba(53, 182, 107, 0.34),
      0 0 0 26px rgba(53, 182, 107, 0.12),
      0 22px 55px rgba(0, 0, 0, 0.42);
    transform: scale(1.035);
  }
}

.voice-call-overlay.is-connected .voice-call-participant.is-speaking.is-self .voice-call-avatar {
  animation-name: voiceSpeakingPulseSelf;
}

@keyframes voiceSpeakingPulseSelf {
  0%,
  100% {
    box-shadow:
      0 0 0 10px rgba(88, 101, 242, 0.14),
      0 0 0 18px rgba(88, 101, 242, 0.05),
      0 22px 55px rgba(0, 0, 0, 0.42);
    transform: scale(1);
  }

  50% {
    box-shadow:
      0 0 0 14px rgba(88, 101, 242, 0.38),
      0 0 0 26px rgba(88, 101, 242, 0.14),
      0 22px 55px rgba(0, 0, 0, 0.42);
    transform: scale(1.035);
  }
}

.voice-call-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.voice-call-copy p,
.voice-call-copy strong,
.voice-call-copy span {
  display: block;
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-call-copy p {
  color: var(--muted);
  font-size: 14px;
}

.voice-call-copy strong {
  color: #fff;
  font-size: 22px;
}

.voice-call-copy span {
  color: #8f94a3;
  font-size: 12px;
}

.voice-call-status-card {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(400px, calc(100vw - 48px));
  min-height: 54px;
  margin: 0 auto 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(32, 34, 41, 0.92);
  color: #dce1ec;
}

.voice-call-peer-left-panel {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(440px, calc(100vw - 48px));
  min-height: 58px;
  margin: 0 auto 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 94, 105, 0.24);
  border-radius: 10px;
  background: rgba(32, 34, 41, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  color: #f4f5fb;
}

.voice-call-peer-left-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(201, 75, 75, 0.16);
  color: #ff6f7a;
}

.voice-call-peer-left-panel span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.voice-call-peer-left-panel strong,
.voice-call-peer-left-panel small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-call-peer-left-panel strong {
  font-size: 13px;
  font-weight: 900;
}

.voice-call-peer-left-panel small {
  color: #aeb2bf;
  font-size: 11px;
  font-weight: 800;
}

.voice-call-status-icon {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(45, 143, 96, 0.14);
}

.voice-call-status-icon::before {
  width: 24px;
  height: 24px;
  background: #3cce7a;
  content: "";
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.625 3.0625C3.41789 3.0625 3.25 3.23039 3.25 3.4375C3.25 3.64461 3.41789 3.8125 3.625 3.8125C12.417 3.8125 20.1875 11.5812 20.1875 20.4375C20.1875 20.6446 20.3554 20.8125 20.5625 20.8125C20.7696 20.8125 20.9375 20.6446 20.9375 20.4375C20.9375 11.1688 12.833 3.0625 3.625 3.0625ZM3.625 7C3.41789 7 3.25 7.16789 3.25 7.375C3.25 7.58211 3.41789 7.75 3.625 7.75C6.62329 7.75 9.76743 9.34479 12.1719 11.7569C14.5758 14.1685 16.1875 17.344 16.1875 20.4375C16.1875 20.6446 16.3554 20.8125 16.5625 20.8125C16.7696 20.8125 16.9375 20.6446 16.9375 20.4375C16.9375 17.0935 15.2055 13.7378 12.7031 11.2274C10.2013 8.71771 6.87671 7 3.625 7ZM3.625 11C3.41789 11 3.25 11.1679 3.25 11.375C3.25 11.5821 3.41789 11.75 3.625 11.75C5.75132 11.75 7.91046 12.8319 9.54612 14.4827C11.1817 16.1334 12.25 18.3089 12.25 20.4375C12.25 20.6446 12.4179 20.8125 12.625 20.8125C12.8321 20.8125 13 20.6446 13 20.4375C13 18.0661 11.8183 15.7103 10.0789 13.9548C8.33954 12.1994 5.99868 11 3.625 11ZM7.93304 18.9201C8.10172 19.3273 8.21828 19.7531 8.28071 20.1875H3.8125L3.8125 15.7193C4.24686 15.7817 4.67271 15.8983 5.07994 16.067C5.71955 16.3319 6.30071 16.7202 6.79025 17.2098C7.27978 17.6993 7.6681 18.2805 7.93304 18.9201ZM8.54906 20.9375C8.84468 20.9375 9.0868 20.6974 9.06056 20.4029C9.00641 19.7954 8.86016 19.1985 8.62595 18.6331C8.32332 17.9024 7.87976 17.2386 7.32058 16.6794C6.7614 16.1203 6.09756 15.6767 5.36695 15.3741C4.8015 15.1398 4.20464 14.9936 3.59707 14.9395C3.30262 14.9132 3.0625 15.1553 3.0625 15.4509V20.4022C3.0625 20.6979 3.30215 20.9375 3.59777 20.9375H8.54906Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.625 3.0625C3.41789 3.0625 3.25 3.23039 3.25 3.4375C3.25 3.64461 3.41789 3.8125 3.625 3.8125C12.417 3.8125 20.1875 11.5812 20.1875 20.4375C20.1875 20.6446 20.3554 20.8125 20.5625 20.8125C20.7696 20.8125 20.9375 20.6446 20.9375 20.4375C20.9375 11.1688 12.833 3.0625 3.625 3.0625ZM3.625 7C3.41789 7 3.25 7.16789 3.25 7.375C3.25 7.58211 3.41789 7.75 3.625 7.75C6.62329 7.75 9.76743 9.34479 12.1719 11.7569C14.5758 14.1685 16.1875 17.344 16.1875 20.4375C16.1875 20.6446 16.3554 20.8125 16.5625 20.8125C16.7696 20.8125 16.9375 20.6446 16.9375 20.4375C16.9375 17.0935 15.2055 13.7378 12.7031 11.2274C10.2013 8.71771 6.87671 7 3.625 7ZM3.625 11C3.41789 11 3.25 11.1679 3.25 11.375C3.25 11.5821 3.41789 11.75 3.625 11.75C5.75132 11.75 7.91046 12.8319 9.54612 14.4827C11.1817 16.1334 12.25 18.3089 12.25 20.4375C12.25 20.6446 12.4179 20.8125 12.625 20.8125C12.8321 20.8125 13 20.6446 13 20.4375C13 18.0661 11.8183 15.7103 10.0789 13.9548C8.33954 12.1994 5.99868 11 3.625 11ZM7.93304 18.9201C8.10172 19.3273 8.21828 19.7531 8.28071 20.1875H3.8125L3.8125 15.7193C4.24686 15.7817 4.67271 15.8983 5.07994 16.067C5.71955 16.3319 6.30071 16.7202 6.79025 17.2098C7.27978 17.6993 7.6681 18.2805 7.93304 18.9201ZM8.54906 20.9375C8.84468 20.9375 9.0868 20.6974 9.06056 20.4029C9.00641 19.7954 8.86016 19.1985 8.62595 18.6331C8.32332 17.9024 7.87976 17.2386 7.32058 16.6794C6.7614 16.1203 6.09756 15.6767 5.36695 15.3741C4.8015 15.1398 4.20464 14.9936 3.59707 14.9395C3.30262 14.9132 3.0625 15.1553 3.0625 15.4509V20.4022C3.0625 20.6979 3.30215 20.9375 3.59777 20.9375H8.54906Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-call-status-icon::after {
  content: none;
}

.voice-call-status-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.voice-call-status-copy strong,
.voice-call-status-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-call-status-copy strong {
  color: #49bd74;
  font-size: 15px;
}

.voice-call-status-copy small {
  color: #b0b4c0;
  font-size: 12px;
}

.voice-call-status-card .status-hover {
  display: none;
}

.voice-call-status-card:hover .status-normal {
  display: none;
}

.voice-call-status-card:hover .status-hover {
  display: inline;
}

.voice-call-stats-panel {
  position: fixed;
  top: 50%;
  right: 24px;
  z-index: 140;
  width: min(284px, calc(100vw - 32px));
  padding: 10px 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #202127;
  color: #d9dce5;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
}

.voice-call-stats-chart {
  position: relative;
  height: 92px;
  margin: -2px 0 12px;
  overflow: hidden;
  border-radius: 5px;
  background: #191a20;
}

.voice-call-stats-chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.voice-call-stats-chart .stats-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.045);
  stroke-width: 1;
}

.voice-call-stats-chart .stats-line {
  fill: none;
  stroke: #6875ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.stats-scale,
.stats-time {
  position: absolute;
  color: #f3f4fb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.stats-scale {
  right: 10px;
}

.stats-scale.top {
  top: 4px;
}

.stats-scale.middle {
  top: 34px;
}

.stats-scale.bottom {
  top: 64px;
}

.stats-time {
  bottom: 4px;
}

.stats-time.time-a {
  left: 34px;
}

.stats-time.time-b {
  left: 94px;
}

.stats-time.time-c {
  left: 154px;
}

.stats-time.time-d {
  right: 28px;
}

.voice-call-stats-id {
  display: block;
  margin: 0 0 12px;
  color: #f4f5fb;
  font-size: 15px;
}

.voice-call-stats-panel p {
  margin: 4px 0;
  color: #eef0f7;
  font-size: 12px;
  line-height: 1.2;
}

.voice-call-stats-panel b {
  color: #fff;
}

.voice-call-stats-panel .voice-call-stats-note {
  margin: 12px 0 10px;
  color: #999ea9;
  line-height: 1.35;
}

.voice-call-stats-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}

.voice-call-stats-actions button {
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 7px;
  background: #2b2c34;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-call-stats-secure {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(43, 143, 104, 0.14);
  color: #49bd74;
  font-size: 12px;
  font-weight: 800;
}

.voice-call-stats-secure::before {
  content: "▣";
  font-size: 10px;
}

.voice-call-actions {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(32, 34, 41, 0.86);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

.voice-call-actions button {
  display: grid;
  width: 84px;
  height: 52px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.voice-call-actions button span {
  display: none;
}

.voice-call-accept {
  background: #2b8f68;
}

.voice-call-end {
  background: #c94b4b;
}

.voice-call-end .ui-icon {
  transform: rotate(135deg);
}

.voice-call-tool {
  background: #1f2128;
}

.voice-call-tool.is-muted {
  background: #3a1f25;
  color: #ff7b86;
}

.voice-call-tool.is-active {
  background: #30323b;
}

.voice-call-more-wrap {
  position: relative;
  display: grid;
}

.voice-call-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 160;
  display: grid;
  width: 270px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #202127;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
}

.voice-call-settings-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 170;
  display: grid;
  gap: 10px;
  width: min(340px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: #202127;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
}

.voice-call-settings-menu header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voice-call-settings-menu header strong {
  color: #f4f5fb;
  font-size: 14px;
  line-height: 1.2;
}

.voice-call-settings-menu header button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 6px;
  background: #2b2d35;
  color: #f4f5fb;
}

.voice-call-settings-menu label {
  display: grid;
  gap: 6px;
  color: #c9ccd8;
  font-size: 12px;
  font-weight: 800;
}

.voice-call-settings-menu select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: #17181e;
  color: #f4f5fb;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.voice-call-settings-menu select:focus {
  border-color: rgba(116, 139, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(116, 139, 255, 0.16);
}

.voice-call-camera-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px;
  border-radius: 7px;
  background: #17181e;
  color: #d8dae4;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.voice-call-camera-preview .ui-icon {
  flex: 0 0 auto;
  color: #9da8ff;
}

.voice-call-settings-menu p {
  margin: 0;
  color: #ff9aa3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.voice-call-more-menu button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 5px;
  background: transparent;
  color: #f4f5fb;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}

.voice-call-more-menu button:hover {
  background: #2b2d35;
}

.voice-call-more-menu b {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.voice-call-menu-divider {
  display: block;
  height: 1px;
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.08);
}

.voice-call-tool:hover,
.voice-call-accept:hover,
.voice-call-end:hover {
  filter: brightness(1.1);
}

.voice-call-mini {
  position: fixed;
  left: 0;
  bottom: 8px;
  z-index: 130;
  display: grid;
  width: min(var(--sidebar-width, 320px), 100vw);
  gap: 10px;
}

.voice-call-mini-screen {
  display: grid;
  min-height: 178px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: #050506;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
}

.voice-call-mini-screen:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.voice-call-mini-participants {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
}

.voice-call-mini-avatar {
  display: grid;
  width: 44px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #2b2d35;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.voice-call-mini-avatar .ui-icon {
  width: 22px;
  height: 22px;
}

.voice-call-mini-avatar.is-self {
  border: 3px solid #5865f2;
}

.voice-call-mini.is-connected .voice-call-mini-avatar {
  outline: 2px solid #35b66b;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(53, 182, 107, 0.14);
}

.voice-call-mini.is-connected .voice-call-mini-avatar.is-self {
  outline-color: #5865f2;
  box-shadow: 0 0 0 6px rgba(88, 101, 242, 0.16);
}

.voice-call-mini-panel {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(32, 34, 41, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.4);
}

.voice-call-mini-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.voice-call-mini-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.voice-call-mini-status span:not(.voice-call-status-icon),
.voice-call-mini-user span:not(.voice-call-mini-user-avatar) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.voice-call-mini-status strong,
.voice-call-mini-user strong,
.voice-call-mini-status small,
.voice-call-mini-user small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-call-mini-status strong {
  color: #49bd74;
  font-size: 14px;
}

.voice-call-mini-status small,
.voice-call-mini-user small {
  color: #aeb2bf;
  font-size: 12px;
}

.voice-call-mini-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.voice-call-mini-btn,
.voice-call-mini-icon {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #2b2d35;
  color: #fff;
}

.voice-call-mini-btn {
  height: 34px;
}

.voice-call-mini-icon {
  width: 32px;
  height: 32px;
}

.voice-call-mini-btn.is-muted,
.voice-call-mini-icon.is-muted {
  background: #3a1f25;
  color: #ff7b86;
}

.voice-call-mini-user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #35b66b;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.voice-call-mini-user strong {
  color: #fff;
  font-size: 14px;
}

.voice-call-mini-end {
  background: #c94b4b;
}

.voice-call-mini-end .ui-icon {
  transform: rotate(135deg);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

:where(button, a, input, textarea, select, summary, [role="button"], [tabindex]):focus,
:where(button, a, input, textarea, select, summary, [role="button"], [tabindex]):focus-visible {
  outline: none;
}

.ui-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.loading-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
  font-weight: 400;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
  padding: 44px;
  background:
    linear-gradient(rgba(13, 55, 64, 0.62), rgba(13, 55, 64, 0.5)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 900'%3E%3Crect width='900' height='900' fill='%231f7a8c'/%3E%3Cg opacity='.22'%3E%3Ccircle cx='150' cy='180' r='92' fill='%23f2b84b'/%3E%3Ccircle cx='710' cy='240' r='138' fill='%23ffffff'/%3E%3Ccircle cx='520' cy='690' r='190' fill='%23125261'/%3E%3C/g%3E%3Cg fill='none' stroke='%23fff' stroke-width='7' opacity='.42'%3E%3Cpath d='M160 530c80-90 168-78 262-8s188 58 280-30'/%3E%3Cpath d='M210 610c78-54 156-49 232 12s170 66 270-4'/%3E%3C/g%3E%3Cg font-family='Arial' font-weight='700'%3E%3Ctext x='118' y='375' fill='%23fff' font-size='76'%3EMineWave%3C/text%3E%3Ctext x='121' y='436' fill='%23f2b84b' font-size='42'%3EMessenger%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  color: white;
}

.brand-mark {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.auth-visual h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

.auth-visual p {
  max-width: 540px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.auth-card {
  width: min(100%, 420px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 34, 41, 0.96);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: 0;
}

.subtext {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
}

.field input,
.composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15161b;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input {
  height: 46px;
  padding: 0 13px;
}

.primary-btn,
.secondary-btn,
.icon-btn,
.tab-btn {
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.primary-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 20px;
  background: #4c7fad;
  color: #fff;
  font-weight: 600;
}

.primary-btn:hover {
  background: #375e81;
}

.secondary-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #2a2d36;
  color: var(--ink);
  font-weight: 750;
}

.danger-btn {
  border-color: rgba(201, 75, 75, 0.28);
  color: var(--danger);
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.link-btn {
  padding: 0;
  background: transparent;
  color: var(--brand-strong);
  font-weight: 800;
}

.notice {
  display: none;
  margin: 0 0 16px;
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(31, 122, 140, 0.1);
  color: var(--brand-strong);
  font-size: 14px;
  line-height: 1.35;
}

.notice.is-visible {
  display: block;
}

.notice.error {
  background: rgba(201, 75, 75, 0.12);
  color: var(--danger);
}

body > .notice {
  position: fixed;
  right: 15px;
  bottom: 15px;
  z-index: 1000;
  max-width: min(360px, calc(100vw - 30px));
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #25262d;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

body > .notice.error {
  background: #2d2024;
}

.messenger {
  display: grid;
  grid-template-columns: var(--sidebar-width, 320px) minmax(0, 1fr) 335px;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(179deg, #1e242c66, #1a152066);
}

.messenger.is-details-collapsed {
  grid-template-columns: var(--sidebar-width, 320px) minmax(0, 1fr) 0;
}

.messenger.is-details-collapsed .details {
  display: none;
}

.friends-page {
  grid-template-columns: var(--sidebar-width, 320px) minmax(0, 1fr);
  background: var(--bg);
  color: var(--ink);
}

.friends-page .sidebar {
  background: linear-gradient(150deg, #1e242c, #1a1520);
  border-right-color: var(--line);
}

.friends-page .topbar,
.friends-page .search-wrap,
.friends-page .sidebar-nav {
  border-color: var(--line);
}

.friends-page .sidebar-link {
  border-color: #343743;
  background: #2a2d36;
  color: var(--ink);
}

.friends-page .sidebar-link.is-active {
  border-color: #5865f2;
  background: #343743;
  color: var(--ink);
}

.friends-page .search-wrap input {
  border-color: #343743;
  background: #15161b;
  color: var(--ink);
}

.friends-main {
  display: grid;
  min-width: 0;
  grid-template-rows: 49px minmax(0, 1fr);
  background: #18191f;
}

.friends-header {
  display: flex;
  align-items: center;
  height: 53px;
  gap: 18px;
  padding: 0px 18px;
  border-bottom: 1px solid #2c2f38;
}

.friends-title {
  padding-right: 18px;
  border-right: 1px solid #343743;
  color: #fff;
  font-weight: 600;
}

.friend-tab,
.friend-add {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  background: transparent;
  color: #c7cad4;
  font-weight: 800;
}

.friend-tab.is-active {
  background: #343743;
  color: #fff;
}

.friend-add {
  background: #5865f2;
  color: #fff;
}

.friend-add.is-active {
  background: #343b82;
  color: #dfe3ff;
}

.friends-content {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.friends-list-panel {
  min-width: 0;
  overflow: auto;
}

.add-friend-panel {
  padding: 2px 12px 20px;
  border-bottom: 1px solid var(--line);
}

.add-friend-panel h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 22px;
}

.add-friend-panel p,
.discover-panel p {
  margin: 0;
  color: #fff;
  line-height: 1.35;
}

.add-friend-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
  padding: 11px;
  border: 1px solid #343743;
  border-radius: 14px;
  background: #15161b;
}

.add-friend-form input {
  min-width: 0;
  height: 36px;
  border: 0;
  background: transparent;
  color: #f4f5fb;
  outline: 0;
}

.send-request {
  min-height: 32px;
}

.add-friend-results {
  margin-top: 12px;
}

.discover-panel {
  padding: 22px 12px;
}

.discover-panel h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
}

.discover-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  min-height: 56px;
  margin-top: 20px;
  padding: 8px 14px;
  border: 1px solid #343743;
  border-radius: 8px;
  background: #1f2128;
  color: #fff;
  text-align: left;
}

.discover-card span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: #3ba55d;
}

.discover-card b {
  color: #aeb2bf;
  font-size: 28px;
  line-height: 1;
}

.friends-notice {
  margin: 16px 16px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  margin-bottom: 20px;
  padding: 0 16px;
  border-radius: 6px;
  background: #111217;
  color: #fff;
  font-size: 14px;
}

.friends-notice .link-btn {
  color: #6da7ff;
}

.notice-close {
  margin-left: auto;
  background: transparent;
  color: #b5b8c2;
  font-size: 28px;
  line-height: 1;
}

.friends-search {
  margin: 16px 16px 28px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  height: 40px;
  margin-bottom: 22px;
  border: 1px solid #343743;
  border-radius: 8px;
  background: #15161b;
  color: #aeb2bf;
}

.friends-search .ui-icon {
  justify-self: center;
  width: 17px;
  height: 17px;
}

.friends-search input {
  min-width: 0;
  height: 38px;
  border: 0;
  padding: 0 10px 0 0;
  background: #1d1d2a8f;
  color: #f4f5fb;
  line-height: 38px;
  outline: 0;
  appearance: none;
}

.friends-section-title {
  margin: 30px 16px 10px;
  color: #f4f5fb;
  font-size: 13px;
  font-weight: 850;
}

.friends-list {
  margin: 16px 16px 28px;
  display: grid;
}

.friend-row {
  grid-template-columns: 44px minmax(0, 1fr) 40px 32px;
  border-bottom: 1px solid #ffffff14;
  border-top: 1px solid #ffffff14;
  border-radius: 15px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  color: #f4f5fb;
  display: grid;
  margin: 3px;
  gap: 10px;
}

.friend-row .avatar,
.active-contact .avatar {
  width: 44px;
  height: 44px;
}

.friend-row > div:not(.avatar):not(.friend-menu-wrap) {
  min-width: 0;
}

.friend-row .name-line,
.friend-row .meta-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-row:hover {
  background: #202229;
}

.friend-row .meta-line {
  color: #aeb2bf;
}

.friend-action,
.friend-more {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #b5b8c2;
  font-weight: 900;
}

.has-tooltip::before {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 10px);
  z-index: 30;
  padding: 8px 10px;
  border-radius: 6px;
  background: #2d2e35;
  color: #f4f5fb;
  content: attr(data-tooltip);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) translateY(4px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
  white-space: nowrap;
}

.has-tooltip::after {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 4px);
  z-index: 30;
  width: 10px;
  height: 10px;
  background: #2d2e35;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) rotate(45deg);
  transition: opacity 0.12s ease;
}

.has-tooltip:hover::before,
.has-tooltip:hover::after {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

.has-tooltip:hover::after {
  transform: translateX(50%) rotate(45deg);
}

.friend-menu-wrap {
  position: relative;
}

.friend-context-menu {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 190px;
  padding: 8px;
  border-radius: 6px;
  background: #25262d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.friend-context-menu[hidden] {
  display: none;
}

.friend-context-menu button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 4px;
  background: transparent;
  color: #f4f5fb;
  font-weight: 750;
  text-align: left;
}

.friend-context-menu button:hover {
  background: #343743;
}

.friend-context-menu .danger-menu-item {
  color: #ff6b73;
}

.friend-action:hover,
.friend-more:hover {
  background: #111217;
  color: #fff;
}

.accept-request {
  color: #3ba55d;
}

.decline-request {
  color: #ff5d68;
}

.request-pill {
  justify-self: end;
  padding: 5px 9px;
  border-radius: 999px;
  background: #2a2d36;
  color: #aeb2bf;
  font-size: 12px;
  font-weight: 800;
}

.friends-empty {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid #2c2f38;
  color: #aeb2bf;
  font-weight: 750;
}

.active-contacts {
  min-width: 0;
  padding: 18px 16px;
  border-left: 1px solid #2c2f38;
}

.active-contacts h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.active-card {
  overflow: hidden;
  border: 1px solid #343743;
  border-radius: 14px;
  background: #202229;
}

.active-empty {
  margin: 0;
  color: #aeb2bf;
  font-size: 14px;
}

.active-contact {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 10px 14px;
  background: transparent;
  color: #f4f5fb;
  text-align: left;
}

.active-contact:hover {
  background: #292c35;
}

.active-contact .meta-line,
.active-card .meta-line {
  color: #aeb2bf;
}

.sidebar,
.details {
  min-width: 0;
  border-color: var(--line);
  background: var(--panel);
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1 / 3;
  border-right: 1px solid var(--line);
  background: linear-gradient(150deg, #11181e, #100c14);
}

.sidebar > .topbar {
  display: none;
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 70;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
}

.sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 3px;
  width: 2px;
  height: 100%;
  background: transparent;
  transition: background 0.12s ease;
}

.sidebar-resizer:hover::after,
body.is-resizing-sidebar .sidebar-resizer::after {
  background: #5865f2;
}

.brand-mini {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.details {
  grid-column: 3;
  grid-row: 2;
  width: 335px;
  border: 1px solid #2d3038;
  background: transparent;
  padding: 64px 22px 22px;
}

.user-profile-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 8px;
  border-radius: 8px;
}

.user-profile-panel.is-group-chat > :not(.group-members-view) {
  display: none;
}

.group-members-view {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 16px 10px;
  overflow: auto;
  border-radius: 8px;
  background: #25242ea6;
}

.group-members-view h2 {
  margin: 0 0 12px;
  color: #aeb2bf;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.group-members-list {
  display: grid;
  gap: 4px;
}

.group-member-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 2px 4px;
  border-radius: 6px;
  color: #d9dbe3;
}

.group-member-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.group-member-row.is-offline {
  opacity: 0.48;
}

.group-member-avatar {
  position: relative;
  width: 34px;
  height: 34px;
}

.group-member-avatar .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 13px;
}

.group-member-presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border: 2px solid #24242d;
  border-radius: 50%;
  background: #747883;
}

.group-member-presence[data-presence="online"] {
  background: #23a56f;
}

.group-member-presence[data-presence="idle"] {
  background: #f0b232;
}

.group-member-presence[data-presence="dnd"] {
  background: #e34b59;
}

.group-member-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member-name-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.group-owner-badge {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: #f0b232;
}

.group-owner-badge .ui-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.group-member-context-menu {
  width: min(242px, calc(100vw - 16px));
  min-width: 242px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}

.group-member-context-menu button > span:first-child {
  display: grid;
  gap: 2px;
}

.group-member-context-menu button > span:first-child > small {
  display: block;
  height: auto;
  background: transparent;
  color: #8f94a1;
  font-size: 11px;
  font-weight: 500;
}

.group-member-context-menu .ui-icon {
  width: 16px;
  height: 16px;
  color: #aeb2bf;
}

.details-resizer {
  position: absolute;
  top: 0;
  left: -4px;
  z-index: 60;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
}

.details-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 3px;
  width: 2px;
  height: 100%;
  background: transparent;
  transition: background 0.12s ease;
}

.details-resizer:hover::after,
body.is-resizing-details .details-resizer::after {
  background: #5865f2;
}

body.is-resizing-details {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-sidebar {
  cursor: col-resize;
  user-select: none;
}

.user-profile-panel > h3,
.user-profile-panel > .detail-block,
.user-profile-panel > .tabs {
  display: none;
}

.profile-view {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  background: #25242ea6;
  border-radius: 8px;
  overflow: hidden;
}

.profile-view-content {
  display: flex;
  min-height: 100%;
  flex: 1 1 auto;
  flex-direction: column;
}

.profile-view.is-ignored-profile-guarded .profile-view-content {
  filter: blur(7px);
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}

.ignored-profile-guard {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px 24px;
  color: #fff;
  text-align: center;
}

.ignored-profile-guard-avatar-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  margin-bottom: 12px;
}

.ignored-profile-guard-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.ignored-profile-guard-avatar-wrap > span {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #202127;
  color: #aeb2bf;
}

.ignored-profile-guard-avatar-wrap .ui-icon {
  width: 20px;
  height: 20px;
}

.ignored-profile-guard h2 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.2;
}

.ignored-profile-guard p {
  max-width: 270px;
  margin: 0 0 16px;
  color: #f0f1f5;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.ignored-profile-guard p u {
  text-underline-offset: 2px;
}

.ignored-profile-show {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  background: #5865f2;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.ignored-profile-show:hover {
  background: #6b75f5;
}

.ignored-profile-never {
  margin-top: 8px;
  padding: 0;
  background: transparent;
  color: #7384ff;
  font-size: 12px;
}

.ignore-status-toast {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 3200;
  display: flex;
  min-height: 38px;
  max-width: min(520px, calc(100vw - 32px));
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid #145d34;
  border-radius: 999px;
  background: #07351d;
  color: #7bd79e;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ignore-status-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ignore-status-toast .ui-icon {
  width: 17px;
  height: 17px;
  color: #38bd70;
}

.ignore-status-toast span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-cover {
  border-radius: 8px 8px 0 0;
  display: block;
  height: 150px;
  background: #5f0719;
}

.profile-actions {
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.profile-actions .dm-header-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(10, 10, 14, 0.62);
  color: #fff;
}

.profile-identity {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  min-height: 72px;
  margin-top: -38px;
  padding: 0 14px 12px;
}

.profile-hero {
  position: relative;
  width: 78px;
  height: 78px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border: 6px solid #202127;
  border-radius: 50%;
  font-size: 24px;
}

.profile-status-dot {
  position: absolute;
  right: 15px;
  bottom: 15px;
  width: 17px;
  height: 17px;
  border: 3px solid #202127;
  border-radius: 50%;
  background: #747883;
}

.profile-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
}

.profile-summary .profile-name {
  display: block;
  margin: 0;
  color: #fff;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-summary p {
  margin: 0;
  color: #b7bbc7;
  font-size: 11px;
  font-weight: 700;
}

.profile-card {
  margin: 0 14px 10px;
  padding: 13px 12px;
  border-radius: 6px;
  background: #2a2c33;
}

.profile-card p {
  margin: 0 0 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.profile-card strong {
  color: #fff;
  font-size: 14px;
}

.profile-links {
  padding: 0;
}

.profile-links button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 13px 12px;
  border-bottom: 1px solid #383b44;
  background: transparent;
  color: #fff;
  font-weight: 800;
}

.profile-links button:last-child {
  border-bottom: 0;
}

.profile-links .ui-icon {
  color: #aeb2bf;
  transform: rotate(180deg);
}

.profile-full-btn {
  margin-top: auto;
  background: transparent;
  color: #fff;
  font-weight: 600;
  padding: 15px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.profile-mini {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.avatar {
  background: transparent;
  border-radius: 35%;
  place-items: center;
  display: grid;
  flex: 0 0 auto;
  height: 64px;
  width: 64px;
  color: #fff;
  font-weight: 900;
}

.avatar.gold {
  background: transparent;
  color: #34240b;
}

.avatar.green {
  background: transparent;
}

.avatar.is-favorites-avatar {
  border-radius: 50%;
  background: #5865f2;
  color: #fff;
}

.favorites-avatar-icon {
  width: 56%;
  height: 56%;
  stroke-width: 2.2;
}

.avatar.red {
  background: transparent;
}

.name-line {
  overflow: hidden;
  margin: 0;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-line {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #2a2d36;
  color: var(--ink);
  font-weight: 900;
}

.icon-btn:hover,
.secondary-btn:hover,
.tab-btn:hover {
  transform: translateY(-1px);
  background: #ffffff0d;
}

.official-badge {
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  border-radius: 50%;
  background: #4ca3ffc7;
  color: #fff;
  font-size: 10px;
  font-weight: 300;
  line-height: 1;
  position: relative;
  top: -1px;
  vertical-align: middle;
  place-items: center;
}

.official-badge-icon {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(0.5px);
}

.chat-row:hover {
  background: #ffffff0d;
}

.danger-icon {
  color: var(--danger);
}

.search-wrap {
  order: -1;
  padding: 10px 8px 8px;
  border-bottom: 1px solid var(--line);
}

.sidebar-nav {
  padding: 8px 8px 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #aeb2bf;
  text-align: left;
}

.sidebar-link.is-active {
  border-color: transparent;
  background: #25262c;
  color: var(--ink);
}

.sidebar-link .ui-icon {
  width: 18px;
  height: 18px;
}

.chat-search-button {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #2c2f38;
  border-radius: 8px;
  background: #24252b;
  color: #f4f5fb;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.chat-search-button:hover {
  background: #2c2e35;
}

.conversation-finder-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: min(12vh, 96px) 16px 24px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}

.conversation-finder-modal {
  display: grid;
  width: min(680px, 100%);
  max-height: min(650px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid #383a44;
  border-radius: 14px;
  background: #23242b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.conversation-finder-modal > input {
  height: 68px;
  margin: 20px 20px 10px;
  padding: 0 16px;
  border: 1px solid #3b3d47;
  border-radius: 9px;
  background: #202127;
  color: #f4f5fb;
  font-size: 21px;
  outline: none;
}

.conversation-finder-modal > input:focus {
  border-color: #5865f2;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.18);
}

.conversation-finder-results {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 120px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 20px;
}

.conversation-finder-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 7px 10px;
  border-radius: 7px;
  background: transparent;
  color: #d8dae3;
  text-align: left;
}

.conversation-finder-result:hover,
.conversation-finder-result:focus-visible {
  background: #3a3b43;
  color: #fff;
}

.conversation-finder-result strong,
.conversation-finder-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-finder-result small {
  margin-top: 3px;
  color: #989ca9;
  font-size: 12px;
}

.conversation-finder-symbol {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #32343d;
  color: #b8bcc8;
  font-size: 17px;
  font-weight: 800;
}

.conversation-finder-empty {
  margin: 18px 8px;
  color: #989ca9;
  text-align: center;
}

.conversation-finder-hint {
  display: grid;
  gap: 2px;
  padding: 13px 20px 17px;
  border-top: 1px solid #353740;
  color: #adb1bd;
  font-size: 12px;
}

.conversation-finder-hint strong {
  color: #43c978;
  font-size: 11px;
}

.conversation-finder-hint kbd {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 5px;
  background: #111217;
  color: #fff;
  font: 700 12px/1 "Segoe UI", sans-serif;
  box-shadow: inset 0 -1px 0 #4b4e59;
}

.search-wrap input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15161b;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 4px;
  color: #9ba1ae;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-section-title button {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  color: #aeb2bf;
  font-size: 20px;
  line-height: 1;
}

.sidebar-section-title button:hover {
  background: #2b2e37;
  color: #fff;
}

.chat-list {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  grid-auto-rows: min-content;
  gap: 5px;
  overflow: auto;
  padding: 0 6px 12px;
}

.chat-list,
.messages {
  scrollbar-color: #4b4e59 transparent;
  scrollbar-width: thin;
}

.chat-list::-webkit-scrollbar,
.messages::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.chat-list::-webkit-scrollbar-track,
.messages::-webkit-scrollbar-track,
.chat-list::-webkit-scrollbar-corner,
.messages::-webkit-scrollbar-corner {
  background: transparent;
}

.chat-list::-webkit-scrollbar-thumb,
.messages::-webkit-scrollbar-thumb {
  border: 0;
  border-radius: 999px;
  background: #4b4e59;
}

.chat-list::-webkit-scrollbar-thumb:hover,
.messages::-webkit-scrollbar-thumb:hover {
  background: #656976;
}

.chat-list::-webkit-scrollbar-button,
.messages::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.user-dock {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: auto 8px 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: linear-gradient(165deg, #1d1624, #151520);
  box-shadow: 0 0 10px 0 rgb(0 0 0 / 20%);
  border: 1px solid #1c1c1c;
  color: #f4f5fb;
}

.user-dock-avatar {
  position: relative;
  width: 40px;
  height: 40px;
}

.user-dock-avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border: 3px solid #1b1d24;
  border-radius: 50%;
}

.user-dock-info {
  min-width: 0;
}

.user-dock .name-line {
  color: #fff;
  font-size: 12px;
}

.user-dock .meta-line {
  color: #aeb2bf;
  font-size: 10px;
}

.user-dock-actions {
  display: flex;
  gap: 6px;
}

.presence-select,
.settings-view select {
  min-width: 0;
  height: 32px;
  border: 1px solid #343743;
  border-radius: 8px;
  background: #15161b;
  color: #f4f5fb;
  font-size: 12px;
  font-weight: 700;
  outline: none;
}

.presence-select {
  width: 118px;
  padding: 0 6px;
}

.presence-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: inherit;
}

.presence-dot,
.profile-status-dot {
  background: #747883;
}

.presence-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

[data-presence="online"] .presence-dot,
.profile-status-dot[data-presence="online"],
[data-self-presence="online"] .user-dock-avatar::after {
  background: #23a55a;
}

[data-presence="idle"] .presence-dot,
.profile-status-dot[data-presence="idle"],
[data-self-presence="idle"] .user-dock-avatar::after {
  background: #f0b232;
}

[data-presence="dnd"] .presence-dot,
.profile-status-dot[data-presence="dnd"],
[data-self-presence="dnd"] .user-dock-avatar::after {
  background: #f23f43;
}

[data-presence="invisible"] .presence-dot,
.profile-status-dot[data-presence="invisible"],
[data-self-presence="invisible"] .user-dock-avatar::after,
[data-presence="offline"] .presence-dot,
.profile-status-dot[data-presence="offline"],
[data-self-presence="offline"] .user-dock-avatar::after {
  background: #747883;
}

.dock-btn {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #d7dae3;
  font-weight: 900;
}

.dock-btn:hover {
  background: #2b2e37;
}

.dock-btn.muted {
  background: rgba(201, 75, 75, 0.18);
  color: #ff5d68;
}

.sidebar-empty {
  margin: 12px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.chat-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 4px 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.chat-row.has-unread::before {
  position: absolute;
  top: 50%;
  left: -6px;
  width: 4px;
  height: 10px;
  border-radius: 0 4px 4px 0;
  background: #f2f3f5;
  content: "";
  transform: translateY(-50%);
}

.chat-row.is-active {
  background: #1e1e2c;
}

.chat-row.is-ignored .chat-row-avatar,
.chat-row.is-ignored > div:nth-child(2) {
  opacity: 0.42;
  transition: opacity 0.16s ease;
}

.chat-row.is-ignored.is-active .chat-row-avatar,
.chat-row.is-ignored.is-active > div:nth-child(2),
.chat-row.is-ignored:hover .chat-row-avatar,
.chat-row.is-ignored:hover > div:nth-child(2),
.chat-row.is-ignored:focus-visible .chat-row-avatar,
.chat-row.is-ignored:focus-visible > div:nth-child(2) {
  opacity: 1;
}

.chat-row-ignore-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #a4a7b0;
  opacity: 0.72;
  transition: opacity 0.14s ease;
}

.chat-row-ignore-mark .ui-icon {
  width: 18px;
  height: 18px;
}

.chat-row.is-ignored .chat-row-close {
  position: absolute;
  right: 8px;
  z-index: 2;
}

.chat-row.is-ignored:hover .chat-row-ignore-mark,
.chat-row.is-ignored:focus-visible .chat-row-ignore-mark {
  opacity: 0;
}

.chat-row time {
  display: none;
}

.chat-row-close {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  color: #aeb2bf;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.chat-row:hover .chat-row-close,
.chat-row:focus-visible .chat-row-close {
  opacity: 1;
  pointer-events: auto;
}

.chat-row-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.chat-row-close.is-hiding {
  opacity: 0.4;
  pointer-events: none;
}

.chat-row-close .ui-icon {
  width: 16px;
  height: 16px;
}

.chat-row-avatar {
  position: relative;
  width: 32px;
  height: 32px;
}

.chat-row .avatar {
  width: 32px;
  height: 32px;
  border-radius: 35%;
  font-size: 13px;
}

.chat-row-status {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 13px;
  height: 13px;
  border: 3px solid #202127;
  border-radius: 50%;
  background: #747883;
}

.chat-row-status[data-presence="online"] {
  background: #23a55a;
}

.chat-row-status[data-presence="idle"] {
  background: #f0b232;
}

.chat-row-status[data-presence="dnd"] {
  background: #f23f43;
}

.chat-row-status[data-presence="offline"],
.chat-row-status[data-presence="invisible"] {
  background: #747883;
}

.chat-row .name-line {
  display: block;
  min-width: 0;
  color: #f4f5fb;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
  height: 21px;
}

.chat-row .meta-line {
  overflow: hidden;
  color: #aeb2bf;
  font-size: 12px;
  font-weight: 200;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 2;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: transparent;
}

.chat-row-name-text {
  display: inline-block;
  overflow: hidden;
  max-width: calc(100% - 21px);
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.chat-row .official-badge {
  vertical-align: middle;
}

.chat-row .official-badge-icon {
  transform: translateY(1.5px);
}

.chat-file-drop-overlay {
  position: absolute;
  z-index: 80;
  inset: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 2px dashed rgba(137, 146, 255, 0.9);
  border-radius: 14px;
  background: rgba(24, 26, 36, 0.94);
  color: #f7f8ff;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.985);
  transition: opacity 140ms ease, transform 140ms ease;
}

.main-chat.is-file-drag-over .chat-file-drop-overlay {
  opacity: 1;
  transform: scale(1);
}

.chat-file-drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #5865f2, #7f8cff);
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.35);
}

.chat-file-drop-icon .ui-icon {
  width: 28px;
  height: 28px;
}

.chat-file-drop-overlay strong {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
}

.chat-file-drop-overlay small {
  color: #b9becd;
  font-size: 13px;
}

.empty-chat {
  display: grid;
  place-items: center;
  padding: 24px;
}

.people-panel {
  width: min(680px, 100%);
}

.people-panel h2 {
  margin: 0 0 8px;
  font-size: 34px;
  letter-spacing: 0;
}

.people-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  margin: 22px 0 14px;
}

.people-search input {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  outline: none;
}

.people-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 122, 140, 0.12);
}

.people-results {
  display: grid;
  gap: 8px;
}

.friends-list {
  display: grid;
  gap: 8px;
}

.friends-page .friends-list {
  gap: 0;
}

.person-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: auto;
  min-height: 62px;
  padding: 10px;
  margin: 3px;
  border-top: 1px solid #ffffff14;
  border-right: 0;
  border-bottom: 1px solid #ffffff14;
  border-left: 0;
  border-radius: 15px;
  background: transparent;
  color: #f4f5fb;
  text-align: left;
}

.person-row:hover {
  background: #202229;
}

.person-row .avatar {
  width: 44px;
  height: 44px;
  font-size: 14px;
  font-weight: 900;
}

.person-row > div:not(.avatar) {
  min-width: 0;
}

.person-row .name-line {
  font-size: 14px;
  font-weight: 600;
}

.person-row .meta-line {
  margin-top: 3px;
  color: #aeb2bf;
  font-size: 13px;
  font-weight: 400;
}

.person-row span {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 850;
}

.person-row:disabled {
  cursor: wait;
  opacity: 0.66;
}

.add-friend-results {
  gap: 0;
}

.empty-hint {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.chat-header {
  grid-column: 2 / 4;
  grid-row: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 46px;
  padding: 10px 15px 10px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 15;
}

.messenger.is-details-collapsed .chat-header {
  width: 100%;
}

.chat-header > .profile-mini,
.chat-header > .header-actions {
  display: none;
}

.dm-header-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  flex: 1 1 auto;
}

.dm-header-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
}

.dm-header-user .name-line {
  color: #f4f5fb;
  font-size: 15px;
  font-weight: 900;
}

.joinable-voice-header-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d8dae4;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.joinable-voice-header-status[hidden] {
  display: none;
}

.joinable-voice-header-status .ui-icon {
  width: 16px;
  height: 16px;
  color: #37b66b;
}

.dm-header-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3a3d47;
}

.dm-header-aka {
  color: #f4f5fb;
  font-size: 12px;
  font-weight: 900;
}

.dm-header-handle {
  overflow: hidden;
  color: #f4f5fb;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.dm-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  line-height: 0;
  border-radius: 5px;
  background: transparent;
  color: #aeb2bf;
}

.dm-header-btn[hidden] {
  display: none;
}

.dm-header-actions .dm-header-btn .ui-icon {
  display: block;
  flex: 0 0 18px;
  margin: 0;
  transform: none;
}

.dm-header-actions .dm-header-btn:nth-child(3) .ui-icon {
  transform: rotate(45deg);
}

.dm-header-btn:hover {
  background: #25262d;
  color: #fff;
}

.dm-header-btn.is-active {
  background: #2f3139;
  color: #fff;
}

.friend-remove-popover {
  position: fixed;
  z-index: 1200;
  padding: 6px;
  border: 1px solid #3a3d47;
  border-radius: 8px;
  background: #24262d;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}

.friend-remove-popover button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: #ff707a;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.friend-remove-popover button:hover {
  background: rgba(242, 63, 67, 0.14);
  color: #ff8b93;
}

.profile-more-menu {
  position: fixed;
  z-index: 1200;
  display: grid;
  min-width: 290px;
  padding: 8px;
  border: 1px solid #3a3d47;
  border-radius: 8px;
  background: #24262d;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.profile-more-menu button {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: #f4f5fb;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.profile-more-menu button:hover {
  background: #30323a;
}

.profile-more-menu .danger-menu-item {
  color: #ff707a;
}

.profile-more-menu small {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 4px;
  background: #aeb2bf;
  color: #25262d;
  font-size: 10px;
  font-weight: 900;
}

.profile-more-menu hr {
  width: 100%;
  height: 1px;
  margin: 6px 0;
  border: 0;
  background: #343743;
}

.pinned-panel {
  display: none;
  position: absolute;
  top: 46px;
  right: 8px;
  z-index: 40;
  width: min(420px, calc(100% - 16px));
  border: 1px solid #343743;
  border-radius: 8px;
  background: #24262d;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.pinned-panel.is-visible {
  display: block;
}

#joinableVoiceCallPanel[hidden] {
  display: none;
}

.joinable-voice-panel {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 92px;
  min-height: 350px;
  border-bottom: 1px solid #20232a;
  background: #050506;
  color: #f4f5fb;
  text-align: center;
}

.joinable-voice-avatar {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: #5865f2;
  color: #fff;
  font-size: 48px;
  font-weight: 900;
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.04),
    0 22px 55px rgba(0, 0, 0, 0.42);
}

.joinable-voice-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.joinable-voice-actions button {
  display: grid;
  width: 66px;
  height: 50px;
  place-items: center;
  border-radius: 10px;
  background: #3aa166;
  color: #fff;
}

.joinable-voice-actions button:hover {
  background: #43b874;
}

.joinable-voice-actions .ui-icon {
  width: 22px;
  height: 22px;
}

.group-voice-panel {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 12px 18px;
  border-bottom: 1px solid #2d3038;
  background: rgba(18, 19, 27, 0.92);
  color: #f4f5fb;
}

.group-voice-copy {
  display: grid;
  gap: 3px;
}

.group-voice-copy span {
  color: #aeb2bf;
  font-size: 12px;
}

.group-voice-participants {
  display: flex;
  min-width: 0;
  align-items: center;
  padding-left: 8px;
}

.group-voice-avatar {
  width: 38px;
  height: 38px;
  margin-left: -8px;
  border: 2px solid #17181f;
  border-radius: 50%;
}

.group-voice-toggle {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 8px;
  background: #2fa36b;
  color: #fff;
  font-weight: 700;
}

.group-voice-toggle.is-leave {
  background: #d04d58;
}

.group-voice-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.group-voice-toggle .ui-icon {
  width: 18px;
  height: 18px;
}

.pinned-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #343743;
}

.pinned-panel-header .ui-icon {
  width: 22px;
  height: 22px;
  color: #d8dae4;
  transform: rotate(45deg);
}

.pinned-panel-header h3 {
  margin: 0;
  color: #f4f5fb;
  font-size: 18px;
  font-weight: 850;
}

.pinned-panel-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}

.pinned-message-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid #343743;
  border-radius: 8px;
  background: #292b32;
  color: #f4f5fb;
  text-align: left;
}

.pinned-message-card:hover {
  background: #30323a;
}

.pinned-message-avatar {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.pinned-message-content {
  min-width: 0;
}

.pinned-message-content p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 4px;
}

.pinned-message-content strong {
  color: #f4f5fb;
  font-weight: 850;
}

.pinned-message-content time {
  color: #9da2b1;
  font-size: 12px;
}

.pinned-message-content span {
  display: block;
  color: #f2f3f7;
  line-height: 1.42;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pinned-message-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.pinned-message-card:hover .pinned-message-actions,
.pinned-message-card:focus-within .pinned-message-actions {
  opacity: 1;
  pointer-events: auto;
}

.pinned-message-actions button {
  display: grid;
  min-height: 32px;
  place-items: center;
  border-radius: 6px;
  background: #343743;
  color: #f4f5fb;
  font-size: 13px;
  font-weight: 800;
}

.pinned-message-actions [data-pinned-jump] {
  padding: 0 12px;
}

.pinned-message-unpin {
  width: 32px;
}

.pinned-message-actions button:hover {
  background: #424653;
}

.pinned-panel-empty {
  margin: 0;
  padding: 18px 12px;
  color: #aeb2bf;
  font-weight: 700;
}

.dm-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  width: 246px;
  height: 32px;
  border: 1px solid #30323a;
  border-radius: 8px;
  background: #15161b;
  color: #aeb2bf;
}

.dm-search input {
  min-width: 0;
  height: 30px;
  border: 0;
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  line-height: 30px;
  outline: none;
  appearance: none;
}

.dm-search input::placeholder {
  color: #8c909e;
}

.dm-search .ui-icon {
  width: 17px;
  height: 17px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.new-messages-notice {
  flex: 0 0 auto;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.new-messages-notice[hidden] {
  display: none;
}

.new-messages-notice button {
  flex: 0 0 auto;
  background: transparent;
  color: #fff;
  font-weight: 850;
}

.new-messages-notice button:hover {
  text-decoration: underline;
}

.old-messages-notice {
  position: absolute;
  left: 50%;
  bottom: 78px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, calc(100% - 32px));
  padding: 8px 9px 8px 18px;
  border: 1px solid #484b56;
  border-radius: 16px;
  background: #32343c;
  color: #f4f5fb;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
  font-size: 13px;
  font-weight: 800;
  transform: translateX(-50%);
}

.old-messages-notice[hidden] {
  display: none;
}

.old-messages-notice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.old-messages-notice button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  background: #5865f2;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.old-messages-notice button:hover {
  background: #6870ff;
}

.messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 16px 0 32px;
  scroll-padding-top: 56px;
  scroll-padding-bottom: 116px;
}

.ignored-message-block {
  display: block;
  width: 100%;
  background: #24252b;
}

.ignored-message-toggle {
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-top: 1px solid #30323a;
  border-bottom: 1px solid #30323a;
  background: #24252b;
  color: #dfe1e7;
  text-align: left;
}

.ignored-message-toggle:hover {
  background: #292a31;
}

.ignored-message-toggle > .ui-icon {
  width: 18px;
  height: 18px;
  color: #9397a3;
}

.ignored-message-toggle span {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ignored-message-toggle strong {
  color: #f0f1f5;
  font-weight: 700;
}

.ignored-message-toggle em {
  color: #9b9faa;
  font-style: normal;
}

.ignored-message-content {
  padding: 2px 0 10px;
}

.message {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 8px 22px;
  border-radius: 0;
  background: transparent;
  line-height: 1.45;
}

.message.mine {
  align-self: stretch;
  background: transparent;
}

.message.mine:has(.message-status) {
  padding-right: 58px;
}

.message:hover {
  background: rgba(255, 255, 255, 0.025);
}

.message.has-mention {
  background: rgba(242, 184, 75, 0.1);
  box-shadow: inset 3px 0 0 #f2b84b;
}

.message.has-mention:hover {
  background: rgba(242, 184, 75, 0.14);
}

.message.is-linked {
  background: rgba(88, 101, 242, 0.14);
  box-shadow: inset 3px 0 0 #5865f2;
}

.message.is-linked:hover {
  background: rgba(88, 101, 242, 0.18);
}

.message.is-flashing {
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.18s ease;
}

.message.is-flashing:hover {
  background: rgba(255, 255, 255, 0.15);
}

.message-date-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 16px 10px;
  color: #8d92a0;
  font-size: 11px;
  font-weight: 850;
}

.message-date-divider::before,
.message-date-divider::after {
  content: "";
  height: 1px;
  background: #2c2f38;
}

.message-date-divider span {
  white-space: nowrap;
}

.unread-divider {
  position: relative;
  display: flex;
  align-items: center;
  margin: 8px 15px 6px;
  border-top: 1px solid #e34b59;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.unread-divider span {
  position: absolute;
  top: -7px;
  right: 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e34b59;
  color: #fff;
}

.message-system-event {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  color: #aeb2c0;
  font-size: 14px;
  line-height: 1.35;
}

.message-system-event .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #aeb2c0;
}

.message-system-event span {
  min-width: 0;
}

.message-system-event strong {
  color: #f4f5fb;
  font-weight: 850;
}

.message-system-content {
  min-width: 0;
  flex: 1 1 auto;
}

.message-system-line {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: baseline;
  gap: 8px;
}

.message-system-line span {
  flex: 0 1 auto;
}

.message-system-event button {
  display: inline;
  padding: 0;
  background: transparent;
  color: #f4f5fb;
  font: inherit;
  font-weight: 850;
  vertical-align: baseline;
}

.message-system-event button:hover {
  text-decoration: underline;
}

.message-system-event .message-system-link {
  color: #f4f5fb;
}

.message-system-event time {
  flex: 0 0 auto;
  color: #8d92a0;
  font-size: 12px;
}

.message-system-event .message-system-more {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: #8d92a0;
  opacity: 0;
}

.message-system-event:hover .message-system-more,
.message-system-more:focus-visible {
  opacity: 1;
}

.message-system-event .message-system-more:hover {
  background: #343743;
  color: #fff;
}

.message-system-event .pin-event-menu {
  text-align: left;
}

.message-system-event.voice-call-message .ui-icon {
  color: #35b66b;
}

.message-system-event.voice-call-message.is-missed .ui-icon {
  color: #9aa7b8;
}

.message-system-event.voice-call-message {
  padding-top: 8px;
  padding-bottom: 8px;
}

.message-system-event.traffic-control-message {
  align-items: flex-start;
  padding-top: 10px;
  padding-bottom: 10px;
  border-left: 3px solid var(--brand);
  background: rgba(88, 101, 242, 0.08);
}

.message-system-event.traffic-control-message .ui-icon {
  margin-top: 2px;
  color: #8ea0ff;
}

.message-system-event.traffic-control-message span {
  flex: 1 1 auto;
  color: #d7dae5;
}

.message-system-event.traffic-control-message time {
  align-self: flex-end;
  white-space: nowrap;
}

.pin-event-actions {
  position: absolute;
  top: -8px;
  right: 28px;
  z-index: 10;
  display: flex;
  overflow: visible;
  border: 1px solid #343743;
  border-radius: 8px;
  background: #25262d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.pin-event-reactions {
  margin-top: 5px;
  margin-left: 0;
}

.message-system-event:hover .pin-event-actions,
.message-system-event:focus-within .pin-event-actions {
  opacity: 1;
  pointer-events: auto;
}

.message-system-event .pin-event-actions button {
  display: grid;
  min-width: 32px;
  height: 32px;
  margin: 0;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: #d7dae3;
  font-size: 15px;
  font-weight: 700;
}

.message-system-event .pin-event-actions button:hover {
  background: #343743;
  color: #fff;
  text-decoration: none;
}

.message-system-event .pin-event-actions .ui-icon {
  width: 17px;
  height: 17px;
  color: currentColor;
}

.message-avatar {
  width: 38px;
  height: 38px;
  margin-top: 2px;
  font-size: 14px;
}

.message-compact-time {
  display: none;
  align-self: start;
  justify-self: end;
  padding-top: 1px;
  color: #8d92a0;
  font-size: 11px;
  font-weight: 600;
}

.message.is-compact {
  padding-top: 2px;
  padding-bottom: 2px;
}

.message.is-compact .message-avatar {
  display: none;
}

.message.is-compact:hover .message-compact-time,
.message.is-compact:focus-within .message-compact-time {
  display: none;
}

.message-body {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 1px;
}

.message-meta strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.message-meta time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.message-actions {
  position: absolute;
  top: -8px;
  right: 28px;
  z-index: 10;
  display: flex;
  overflow: visible;
  border: 1px solid #343743;
  border-radius: 8px;
  background: #25262d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
  pointer-events: auto;
}

.message-actions button {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  background: transparent;
  color: #d7dae3;
  font-size: 15px;
}

.message-actions button:hover {
  background: #343743;
  color: #fff;
}

.message-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.emoji-picker {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 32px);
  gap: 4px;
  padding: 8px;
  border: 1px solid #343743;
  border-radius: 8px;
  background: #25262d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.message.mine .emoji-picker {
  right: auto;
  left: 0;
}

.emoji-picker[hidden] {
  display: none;
}

.emoji-picker button {
  min-width: 32px;
}

.message-context-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: min(258px, calc(100vw - 32px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 10px 8px;
  border: 1px solid #3a3d47;
  border-radius: 8px;
  background: #292b32;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.message-context-menu[hidden] {
  display: none;
}

.message-menu-reactions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 6px 8px 10px;
}

.message-menu-reactions button {
  width: 40px;
  height: 44px;
  border-radius: 7px;
  background: #343641;
  font-size: 20px;
}

.message-context-menu > button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  border-radius: 5px;
  background: transparent;
  color: #f4f5fb;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
}

.message-context-menu > button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-context-menu > button:hover {
  background: #5865f2;
  color: #fff;
}

.message-context-menu > button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.message-context-menu hr {
  height: 1px;
  margin: 8px;
  border: 0;
  background: #3a3d47;
}

.message-context-menu .ui-icon {
  width: 17px;
  height: 17px;
  color: #b8bbc6;
}

.message-context-menu .danger-menu-item {
  color: #ff6b6b;
}

.message-context-menu .danger-menu-item .ui-icon {
  color: #ff6b6b;
}

.message-context-menu .danger-menu-item:hover {
  background: #da3f45;
  color: #fff;
}

.delete-message-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.66);
}

.delete-message-modal {
  --delete-message-preview-lines: 12;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 24px;
  border: 1px solid #3a3d47;
  border-radius: 10px;
  background: #24262d;
  color: #f5f6fb;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  overflow: hidden;
}

.delete-message-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.delete-message-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
}

.delete-message-modal-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: #b8bbc6;
}

.delete-message-modal-close:hover {
  background: #31333c;
  color: #fff;
}

.delete-message-modal-subtitle {
  margin: 0;
  color: #b8bbc6;
  font-size: 15px;
}

.delete-message-preview {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  margin: 22px 0;
  padding: 14px;
  border: 1px solid #353843;
  border-radius: 7px;
  background: #202229;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.delete-message-preview > .avatar {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.delete-message-preview-content {
  min-width: 0;
}

.delete-message-preview-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}

.delete-message-preview-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-message-preview-meta time {
  flex: 0 0 auto;
  color: #9498a6;
  font-size: 12px;
}

.delete-message-preview-content p {
  display: -webkit-box;
  margin: 0;
  color: #e6e8f0;
  line-height: 1.42;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--delete-message-preview-lines);
}

@media (max-height: 760px) {
  .delete-message-modal {
    --delete-message-preview-lines: 7;
  }
}

@media (max-height: 560px) {
  .delete-message-modal {
    --delete-message-preview-lines: 3;
    padding: 18px;
  }

  .delete-message-preview {
    margin: 14px 0;
  }

  .delete-message-hint {
    margin-bottom: 14px;
  }
}

.delete-message-hint {
  margin: 0 0 20px;
  color: #eceef6;
  font-size: 13px;
  line-height: 1.35;
}

.delete-message-hint strong {
  display: block;
  margin-bottom: 4px;
  color: #62c47f;
  font-weight: 900;
  text-transform: uppercase;
}

.delete-message-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.delete-message-modal-actions button {
  min-height: 40px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.delete-message-cancel {
  background: #30323a;
}

.delete-message-cancel:hover {
  background: #3a3d47;
}

.delete-message-confirm {
  background: #d83345;
}

.delete-message-confirm:hover {
  background: #e04455;
}

.reply-preview {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 7px 9px;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: #1b1d24;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.reply-preview span {
  margin-right: 6px;
  color: var(--ink);
  font-weight: 800;
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.message-reactions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #25262d;
  border-radius: 5px;
  min-height: 24px;
  padding: 0 8px;
  font-size: 13px;
  color: #f4f5fb;
}

.message-reactions button.is-active {
  background: #352f424f;
  outline: 1px solid rgb(157 88 242 / 20%);
}

.message p {
  margin: 0;
  color: #f2f3f7;
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-inline-gif-wrap {
  position: relative;
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin-top: 4px;
  vertical-align: top;
}

.message-inline-gif {
  display: block;
  width: auto;
  max-width: min(420px, 100%);
  height: auto;
  max-height: 360px;
  border-radius: 8px;
  object-fit: contain;
  object-position: left center;
  -webkit-user-drag: none;
}

.message-inline-gif-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 21, 26, 0.86);
  color: #d7dae3;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms ease, visibility 120ms ease, background-color 120ms ease;
}

.message-inline-gif-wrap:hover .message-inline-gif-favorite,
.message-inline-gif-wrap:focus-within .message-inline-gif-favorite {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.message-inline-gif-favorite:hover {
  background: rgba(30, 32, 39, 0.96);
}

.message-inline-gif-favorite.is-active {
  color: #ffd45c;
}

.message-inline-gif-favorite svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.message-inline-code,
.message-text-block {
  padding: 1px 4px;
  border-radius: 4px;
  background: #181a20;
  color: #e4e6ec;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.message-text-block {
  border: 1px solid #3b3e48;
}

.message-text-spoiler {
  border-radius: 3px;
  background: #111217;
  color: transparent;
  cursor: pointer;
  user-select: none;
}

.message-text-spoiler:hover,
.message-text-spoiler:focus {
  background: #343741;
  color: inherit;
  outline: none;
  user-select: text;
}

.message-inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: baseline;
}

.message-inline-meta .message-status {
  flex: 0 0 auto;
}

.message-inline-meta .message-edited {
  display: inline;
  margin: 0;
  font-size: 11px;
  line-height: inherit;
}

.message-search-mark {
  border-radius: 3px;
  background: rgba(242, 184, 75, 0.28);
  color: #fff;
  padding: 0 2px;
}

.message-mention {
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.28);
  color: #cfd4ff;
  padding: 0 3px;
  font-weight: 750;
}

.link-preview-card {
  position: relative;
  width: min(432px, 100%);
  margin-top: 6px;
  padding: 12px 14px 14px;
  border: 1px solid #363944;
  border-left: 4px solid #5865f2;
  border-radius: 4px;
  background: #24262d;
  color: #dcdee7;
  overflow: hidden;
}

.link-preview-card.has-thumbnail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  grid-template-areas:
    "site thumb"
    "author thumb"
    "title thumb"
    "desc thumb";
  column-gap: 14px;
  width: min(420px, 100%);
}

.link-preview-close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 4px;
  background: rgba(31, 33, 40, 0.86);
  color: #aeb2c0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  z-index: 3;
}

.link-preview-close:hover {
  background: #3a3d47;
  color: #fff;
}

.link-preview-card.is-youtube {
  border-left-color: #ff2638;
}

.link-preview-card.is-coub {
  border-left-color: #7c8cff;
}

.link-preview-card.is-google {
  border-left-color: #5f6368;
  width: min(236px, 100%);
}

.link-preview-card.is-sketchfab {
  border-left-color: #2fb7e9;
  width: min(520px, 100%);
}

.link-preview-site,
.link-preview-author,
.link-preview-description {
  margin: 0;
}

.link-preview-site {
  grid-area: site;
  color: #b6bac6;
  font-size: 12px;
  font-weight: 650;
}

.link-preview-author {
  grid-area: author;
  margin-top: 12px;
  color: #f4f5fb;
  font-size: 14px;
  font-weight: 850;
}

.link-preview-title {
  grid-area: title;
  display: block;
  margin-top: 12px;
  color: #4d9cff;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.link-preview-title:hover {
  text-decoration: underline;
}

.link-preview-description {
  grid-area: desc;
  margin-top: 8px;
  color: #edeff5;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.link-preview-media {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #15161b;
  cursor: pointer;
}

.link-preview-media::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
}

.link-preview-media::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 0;
  height: 0;
  margin: auto;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #eef1f8;
  transform: translateX(3px);
}

.link-preview-media img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.link-preview-thumbnail {
  grid-area: thumb;
  align-self: center;
  display: block;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 4px;
  background: #15161b;
}

.link-preview-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-preview-card.is-youtube .link-preview-media img {
  max-height: 360px;
}

.link-preview-player {
  position: relative;
  width: 100%;
  margin-top: 14px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #101116;
}

.link-preview-card.is-youtube.is-playing,
.link-preview-card.is-coub.is-playing {
  width: min(560px, 100%);
}

.link-preview-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.link-preview-card.is-google .link-preview-title {
  font-size: 15px;
}

.link-preview-card.is-google .link-preview-thumbnail,
.link-preview-card.is-sketchfab .link-preview-media::before,
.link-preview-card.is-sketchfab .link-preview-media::after {
  display: none;
}

.link-preview-card.is-loading {
  min-height: 88px;
}

.link-preview-skeleton {
  height: 62px;
  border-radius: 4px;
  background: linear-gradient(90deg, #2b2e37, #343743, #2b2e37);
  background-size: 220% 100%;
  animation: link-preview-loading 1.2s ease-in-out infinite;
}

@keyframes link-preview-loading {
  from {
    background-position: 120% 0;
  }

  to {
    background-position: -120% 0;
  }
}

.message-attachments {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-width: min(560px, 100%);
}

.message-attachment {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.message-attachment-image {
  display: inline-grid;
  width: auto;
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
  justify-self: start;
}

.message-attachment-image img {
  display: block;
  width: auto;
  max-width: min(420px, 100%);
  max-height: 360px;
  object-fit: contain;
}

.message-image-grid {
  display: grid;
  gap: 4px;
  width: min(552px, 100%);
  max-width: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.message-image-grid.count-1 {
  display: inline-grid;
  width: fit-content;
  justify-self: start;
}

.message-image-grid.count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.message-image-grid.count-3 {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 350px;
}

.message-image-grid.count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 350px;
}

.message-image-grid.count-3 .is-main {
  grid-row: 1 / span 2;
}

.message-image-grid-item {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  background: #15161b;
}

.message-image-grid.count-1 .message-image-grid-item {
  width: fit-content;
  max-width: 100%;
  border-radius: 6px;
  background: transparent;
}

.message-image-grid-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.message-image-grid.count-1 .message-image-grid-item img {
  width: auto;
  max-width: min(520px, 100%);
  max-height: 360px;
  object-fit: contain;
}

.message-image-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}

.message-attachment-video {
  position: relative;
  display: block;
  width: min(420px, 100%);
  overflow: hidden;
  border-radius: 6px;
  background: #15161b;
}

.message-attachment-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 360px;
  background: #090a0d;
  object-fit: contain;
}

.message-video-controls {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 7;
  display: grid;
  grid-template-columns: 32px auto minmax(50px, 1fr) 32px 32px;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 2px 4px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(20, 21, 26, 0.9), rgba(20, 21, 26, 0.72));
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.message-attachment-video.has-started .message-video-controls,
.message-attachment-video.is-app-fullscreen .message-video-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.message-video-controls button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
}

.message-video-controls button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.message-video-controls button .ui-icon {
  width: 20px;
  height: 20px;
}

.message-video-time {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #e5e6ea;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.message-video-time b {
  color: #fff;
  font-weight: 750;
}

.message-video-controls > input[type="range"] {
  width: 100%;
  min-width: 0;
  height: 18px;
  margin: 0;
  accent-color: #5865f2;
  cursor: pointer;
}

.message-video-controls > input[type="range"]:disabled {
  cursor: wait;
  opacity: 0.6;
}

.message-video-volume {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
}

.message-video-volume-popover {
  position: absolute;
  bottom: 30px;
  left: 50%;
  display: grid;
  width: 32px;
  height: 90px;
  place-items: center;
  border-radius: 5px 5px 0 0;
  background: rgba(24, 25, 31, 0.94);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.message-video-volume:hover .message-video-volume-popover,
.message-video-volume:focus-within .message-video-volume-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.message-video-volume-popover input[type="range"] {
  width: 12px;
  height: 68px;
  margin: 0;
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
}

.message-video-volume-popover input[type="range"]::-webkit-slider-runnable-track {
  width: 4px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to top, #5865f2 0 var(--video-volume, 100%), #6f727b var(--video-volume, 100%) 100%);
}

.message-video-volume-popover input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-left: -3px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #6571ff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.message-attachment-video.is-playing video {
  accent-color: #5865f2;
}

.message-attachment-video.is-playing video::-webkit-media-controls-panel {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
}

.message-attachment-video video::-webkit-media-controls-overflow-button {
  display: none !important;
}

.message-attachment-video video::-webkit-media-controls-fullscreen-button {
  visibility: hidden !important;
}

.message-video-actions,
.message-audio-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 4;
  display: flex;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(27, 28, 35, 0.94);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.message-attachment-video:hover .message-video-actions,
.message-attachment-video:focus-within .message-video-actions,
.message-attachment-audio:hover .message-audio-actions,
.message-attachment-audio:focus-within .message-audio-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.message-video-actions button,
.message-video-actions a,
.message-audio-actions button,
.message-audio-actions a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c9cbd3;
}

.message-video-actions button:hover,
.message-video-actions a:hover,
.message-audio-actions button:hover,
.message-audio-actions a:hover {
  background: #343640;
  color: #fff;
}

.message-video-actions .ui-icon,
.message-audio-actions .ui-icon {
  width: 19px;
  height: 19px;
}

.message-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(24, 20, 35, 0.78);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%);
  transition: background 0.15s ease, transform 0.15s ease;
}

.message-video-play:hover {
  background: rgba(46, 38, 62, 0.92);
  transform: translate(-50%, -50%) scale(1.06);
}

.message-attachment-video.has-started .message-video-play {
  display: none;
}

.message-video-play .ui-icon {
  width: 28px;
  height: 28px;
  margin: 0;
}

.message-video-fullscreen {
  position: static;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: rgba(16, 17, 22, 0.76);
  color: #fff;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.message-video-fullscreen:hover {
  background: rgba(255, 255, 255, 0.12);
}

.message-video-fullscreen .ui-icon {
  width: 19px;
  height: 19px;
}

.message-video-spoiler {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: none;
  padding: 9px 14px;
  border: 0;
  border-radius: 7px;
  background: rgba(20, 21, 27, 0.9);
  color: #fff;
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.message-attachment-video.is-spoiler video {
  filter: blur(28px) brightness(0.45);
}

.message-attachment-video.is-spoiler .message-video-play {
  display: none;
}

.message-attachment-video.is-spoiler .message-video-controls {
  pointer-events: none;
  opacity: 0;
}

.message-attachment-video.is-spoiler .message-video-spoiler {
  display: block;
}

.message-attachment-video:fullscreen {
  display: grid;
  width: 100vw;
  height: 100vh;
  place-items: center;
  border-radius: 0;
  background: #000;
}

.message-attachment-video:fullscreen video {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

body.video-app-fullscreen-open {
  overflow: hidden;
}

.message-attachment-video.is-app-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  width: 100vw;
  height: 100vh;
  max-width: none;
  place-items: center;
  border-radius: 0;
  background: #000;
}

.message-attachment-video.is-app-fullscreen video {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
}

.message-attachment-video.is-app-fullscreen .message-video-fullscreen {
  display: grid;
  opacity: 1;
  pointer-events: auto;
}

.edit-attachment-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.68);
}

.file-too-large-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2800;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.file-too-large-modal {
  position: relative;
  width: min(480px, calc(100vw - 24px));
  overflow: hidden;
  padding: 34px 32px 32px;
  border: 1px solid #454854;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(91, 28, 100, 0.72) 0, rgba(41, 37, 105, 0.76) 18%, #25262d 55%);
  color: #f4f5f7;
  text-align: center;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.68);
}

.file-too-large-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.file-too-large-close .ui-icon {
  width: 24px;
  height: 24px;
}

.file-too-large-illustration {
  display: grid;
  height: 145px;
  place-items: center;
  margin: 0 0 10px;
}

.file-too-large-sheet {
  position: relative;
  display: grid;
  width: 76px;
  height: 96px;
  place-items: center;
  border-radius: 7px 18px 7px 7px;
  background: linear-gradient(145deg, #5e78ff 5%, #9a42ff 48%, #ff3ca9 82%);
  color: #fff;
  filter: drop-shadow(18px 18px 0 rgba(255, 36, 185, 0.13));
  transform: perspective(220px) rotateY(-18deg) rotateZ(8deg);
}

.file-too-large-sheet::after {
  content: "";
  position: absolute;
  inset: auto 7px -18px 13px;
  height: 25px;
  background: linear-gradient(90deg, rgba(255, 41, 180, 0.72), transparent);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 8% 74%);
}

.file-too-large-sheet .ui-icon {
  width: 37px;
  height: 37px;
  stroke-width: 1.7;
}

.file-too-large-modal h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.28;
  font-weight: 850;
}

.file-too-large-modal > p {
  margin: 0;
  color: #b9bbc4;
  font-size: 15px;
  line-height: 1.45;
}

.file-too-large-modal > p strong {
  color: #e9eaf0;
}

.file-too-large-list {
  display: grid;
  gap: 5px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.file-too-large-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(13, 14, 19, 0.36);
  color: #d9dae0;
  font-size: 13px;
}

.file-too-large-list li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-too-large-list li b {
  flex: none;
  color: #ff8ca9;
}

.file-too-large-list li.is-more {
  justify-content: center;
  color: #aeb1bb;
}

.file-too-large-confirm {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: #5865f2;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  box-shadow: 0 7px 22px rgba(88, 101, 242, 0.28);
}

.file-too-large-confirm:hover {
  background: #6874f7;
}

.edit-attachment-modal {
  width: min(480px, calc(100vw - 24px));
  padding: 24px;
  border: 1px solid #3b3e48;
  border-radius: 11px;
  background: #24252c;
  color: #f2f3f5;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.58);
}

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

.edit-attachment-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.edit-attachment-modal-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b5b7c0;
}

.edit-attachment-modal-close:hover {
  color: #fff;
}

.edit-attachment-field {
  display: grid;
  gap: 9px;
  margin-bottom: 17px;
}

.edit-attachment-field > span,
.edit-attachment-spoiler > span {
  color: #e7e8ed;
  font-size: 14px;
  font-weight: 700;
}

.edit-attachment-field input,
.edit-attachment-field textarea {
  width: 100%;
  border: 1px solid #393c46;
  border-radius: 7px;
  background: #202127;
  color: #f4f5f7;
  outline: none;
}

.edit-attachment-field input {
  height: 40px;
  padding: 0 12px;
}

.edit-attachment-field textarea {
  min-height: 89px;
  padding: 12px;
  resize: vertical;
}

.edit-attachment-field input:focus,
.edit-attachment-field textarea:focus {
  border-color: #5865f2;
}

.edit-attachment-spoiler {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  cursor: pointer;
}

.edit-attachment-spoiler input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #5865f2;
}

.edit-attachment-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.edit-attachment-modal-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-weight: 750;
}

.edit-attachment-cancel {
  background: #35363e;
}

.edit-attachment-save {
  background: #5865f2;
}

.edit-attachment-save:hover {
  background: #6873f4;
}

.edit-attachment-save:disabled {
  cursor: wait;
  opacity: 0.65;
}

.message-attachment-file {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(432px, 100%);
  min-height: 72px;
  padding: 10px;
  border: 1px solid #343743;
  border-radius: 6px;
  background: #24262d;
  color: #f4f5fb;
  text-decoration: none;
}

.message-file-list {
  display: grid;
  gap: 8px;
  width: min(432px, 100%);
}

.message-attachment-file .ui-icon {
  width: 28px;
  height: 28px;
  color: #9da2b1;
}

.message-attachment-file strong,
.message-attachment-file small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment-file small {
  margin-top: 2px;
  color: #9da2b1;
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 72px 80px 88px;
  background: rgba(0, 0, 0, 0.9);
}

.media-viewer-top {
  position: fixed;
  top: 36px;
  right: 36px;
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid #343743;
  border-radius: 10px;
  background: #24262d;
}

.media-viewer-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #d7dae3;
}

.media-viewer-btn:hover {
  background: #343743;
  color: #fff;
}

.media-viewer-btn .ui-icon {
  width: 20px;
  height: 20px;
}

.media-viewer-content {
  display: grid;
  max-width: 96vw;
  max-height: 82vh;
  place-items: center;
}

.media-viewer-content img,
.media-viewer-content video {
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 160px);
  border-radius: 4px;
  object-fit: contain;
}

.media-viewer-nav {
  position: fixed;
  top: 50%;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #343743;
  border-radius: 12px;
  background: rgba(36, 38, 45, 0.9);
  color: #d7dae3;
  transform: translateY(-50%);
}

.media-viewer-nav:hover {
  background: #343743;
  color: #fff;
}

.media-viewer-nav[hidden] {
  display: none;
}

.media-viewer-nav .ui-icon {
  width: 24px;
  height: 24px;
}

.media-viewer-nav.is-previous {
  left: 24px;
}

.media-viewer-nav.is-previous .ui-icon {
  transform: rotate(180deg);
}

.media-viewer-nav.is-next {
  right: 24px;
}

.media-viewer-thumbs {
  position: fixed;
  left: 50%;
  bottom: 20px;
  display: flex;
  max-width: min(620px, calc(100vw - 80px));
  gap: 6px;
  padding: 6px;
  overflow-x: auto;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}

.media-viewer-thumbs[hidden] {
  display: none;
}

.media-viewer-thumbs button {
  flex: 0 0 54px;
  width: 54px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #24262d;
  opacity: 0.72;
}

.media-viewer-thumbs button:hover,
.media-viewer-thumbs button.is-active {
  border-color: #d7dae3;
  opacity: 1;
}

.media-viewer-thumbs img,
.media-viewer-thumbs video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
}

.message.mine .message-footer:has(.message-status) {
  position: static;
  width: fit-content;
  margin-top: 4px;
}

.message.mine .message-footer:has(.message-status) .message-footer-meta {
  position: absolute;
  right: 22px;
  bottom: 8px;
  margin-left: 0;
}

.message-footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.message-status {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: #8f95a3;
}

.message-status.is-read {
  color: #79a7ff;
}

.message-status svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.message-edited {
  font-family: system-ui;
  color: var(--muted);
  text-align: right;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2px;
  font-size: 9px;
  display: block;
}

.composer {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  padding: 8px 7px 8px 8px;
  position: relative;
}

.composer-emoji-picker {
  position: absolute;
  right: 12px;
  bottom: 70px;
  z-index: 80;
  width: min(500px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #393c46;
  border-radius: 8px;
  background: #24262d;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.composer-emoji-picker.is-reaction-picker {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 130;
}

.composer-emoji-picker[hidden],
.composer-emoji-grid[hidden] {
  display: none;
}

.composer-emoji-media-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px 10px;
}

.composer-emoji-media-tabs button {
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  background: transparent;
  color: #e1e3e9;
  font-size: 14px;
  font-weight: 750;
}

.composer-emoji-media-tabs button:hover,
.composer-emoji-media-tabs button.is-active {
  background: #393b44;
  color: #fff;
}

.composer-emoji-search {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  margin: 0 16px 14px;
  padding: 0 10px;
  border: 1px solid #3a3d47;
  border-radius: 7px;
  background: #1d1f25;
  color: #aeb2bf;
}

.composer-emoji-search span {
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 22px;
}

.composer-emoji-search input {
  min-width: 0;
  height: 38px;
  border: 0;
  background: transparent;
  color: #f1f2f6;
  outline: none;
  font: inherit;
}

.composer-emoji-search input::placeholder {
  color: #858996;
}

.composer-emoji-browser {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  border-bottom: 1px solid #353842;
  border-top: 1px solid #353842;
}

.composer-emoji-browser[hidden],
.composer-emoji-footer[hidden] {
  display: none;
}

.composer-gif-browser {
  position: relative;
  min-height: 330px;
  border-top: 1px solid #353842;
}

.composer-gif-browser[hidden] {
  display: none;
}

.composer-gif-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  height: min(340px, 50vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: #626774 transparent;
}

.composer-gif-featured[hidden] {
  display: none;
}

.composer-gif-catalog-header {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #353842;
  color: #f1f2f6;
}

.composer-gif-catalog-header[hidden] {
  display: none;
}

.composer-gif-catalog-header button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  color: #b7bac5;
  font-size: 22px;
}

.composer-gif-catalog-header button:hover {
  background: #343741;
  color: #fff;
}

.composer-gif-catalog-header button svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-gif-catalog-header strong {
  font-size: 15px;
}

.composer-emoji-picker.is-gif-catalog .composer-emoji-search {
  display: none;
}

.composer-emoji-picker.is-gif-catalog .composer-gif-grid {
  height: min(380px, 56vh);
  padding-top: 10px;
}

.composer-gif-featured-card {
  position: relative;
  height: 110px;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(145deg, #535bd6, #4048bd);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.composer-gif-featured-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.composer-gif-featured-card img[hidden] {
  display: none;
}

.composer-gif-featured-card span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.composer-gif-featured-card.is-active {
  outline: 2px solid #6870ff;
  outline-offset: -2px;
}

.composer-gif-folder-card {
  height: 110px;
  background: linear-gradient(145deg, #343743, #292c35);
  text-transform: lowercase;
}

.composer-gif-folder-card:hover {
  background: linear-gradient(145deg, #404451, #31343e);
}

.composer-gif-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
  height: min(245px, 36vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: #626774 transparent;
}

.composer-gif-grid[hidden] {
  display: none;
}

.composer-gif-column {
  display: flex;
  min-width: 0;
  height: max-content;
  align-self: start;
  flex-direction: column;
  gap: 8px;
}

.composer-emoji-picker:not(.is-gif-catalog) .composer-gif-featured[hidden] + .composer-gif-grid {
  height: min(330px, 48vh);
  padding-top: 8px;
}

.composer-gif-card {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  height: auto;
  margin: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #191b21;
  flex: 0 0 auto;
}

.composer-gif-send,
.composer-gif-send img {
  display: block;
  width: 100%;
  height: 100%;
}

.composer-gif-send {
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  background: transparent;
}

.composer-gif-send img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.composer-gif-send span {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: calc(100% - 28px);
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-shadow: 0 1px 5px #000, 0 0 10px #000;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.composer-gif-favorite {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 21, 26, 0.82);
  color: #d7dae3;
  font-size: 17px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms ease, visibility 120ms ease, background-color 120ms ease;
}

.composer-gif-card:hover .composer-gif-favorite,
.composer-gif-card:focus-within .composer-gif-favorite {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.composer-gif-favorite > svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.composer-gif-favorite.is-active {
  color: #ffd45c;
}

.composer-gif-status {
  position: absolute;
  inset: 70px 12px 28px;
  display: grid;
  place-items: center;
  color: #aeb2bf;
  pointer-events: none;
}

.composer-gif-status[hidden] {
  display: none;
}

.composer-emoji-categories {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-right: 1px solid #353842;
  background: #202229;
}

.composer-emoji-category {
  display: grid;
  height: 34px;
  width: 34px;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: #aeb2bf;
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 19px;
}

.composer-emoji-category:hover,
.composer-emoji-category.is-active {
  background: #343741;
  color: #f1f2f6;
}

.composer-emoji-category-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-emoji-content {
  min-width: 0;
  padding: 8px 8px 0;
}

.composer-emoji-content h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px 6px;
  color: #f1f2f6;
  font-size: 14px;
  font-weight: 800;
}

.composer-emoji-panels {
  position: relative;
  height: min(300px, 43vh);
  overflow-y: auto;
  padding: 2px 4px 10px;
  scrollbar-width: thin;
  scrollbar-color: #626774 transparent;
}

.composer-emoji-section {
  padding-bottom: 10px;
}

.composer-emoji-section[hidden] {
  display: none;
}

.composer-emoji-section + .composer-emoji-section {
  padding-top: 4px;
}

.composer-emoji-section-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(36px, 1fr));
  gap: 4px;
}

.composer-emoji-grid button {
  display: grid;
  min-width: 0;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  font-family: "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  font-size: 22px;
}

.composer-emoji-grid button[hidden] {
  display: none;
}

.twemoji-flag {
  display: inline-block;
  width: 1.35em;
  height: 1.35em;
  object-fit: contain;
  -webkit-user-drag: none;
  vertical-align: -0.24em;
}

.composer-emoji-picker .twemoji-flag,
.composer-input-visual .twemoji-flag {
  user-select: none;
}

.message .twemoji-flag {
  user-select: auto;
  -webkit-user-drag: auto;
}

.message-selection-drag-preview {
  position: fixed;
  top: 0;
  left: -10000px;
  z-index: 9999;
  display: inline-block;
  max-width: 520px;
  max-height: 180px;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid #4b4f5d;
  border-radius: 5px;
  background: #202228;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  overflow-wrap: anywhere;
  pointer-events: none;
  white-space: pre-wrap;
}

.message-selection-drag-preview .twemoji-flag {
  -webkit-user-drag: none;
}

.message img,
.message video {
  -webkit-user-drag: none;
}

.composer-emoji-grid .twemoji-flag {
  width: 25px;
  height: 25px;
  vertical-align: middle;
}

.composer-emoji-grid button:hover {
  background: #373a44;
  filter: brightness(1.08);
}

.composer-emoji-footer {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  color: #d9dbe2;
}

.composer-emoji-footer span {
  font-size: 28px;
}

.composer-emoji-footer strong {
  font-size: 13px;
}

.composer-formatting-toolbar {
  position: fixed;
  z-index: 120;
  display: flex;
  align-items: center;
  padding: 3px 5px;
  border: 1px solid #343743;
  border-radius: 5px;
  background: #202228;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  transform: translate(-50%, -100%);
}

.composer-formatting-toolbar[hidden] {
  display: none;
}

.composer-formatting-toolbar::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 9px;
  height: 9px;
  background: #202228;
  content: "";
  transform: translate(-50%, -5px) rotate(45deg);
}

.composer-formatting-toolbar button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 4px;
  background: transparent;
  color: #d9dbe2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.composer-formatting-toolbar button:nth-child(5) {
  margin-left: 4px;
  border-left: 1px solid #3b3e48;
  border-radius: 0 4px 4px 0;
}

.composer-formatting-toolbar button:hover {
  background: #363943;
  color: #fff;
}

.composer-formatting-toolbar .is-bold {
  font-weight: 900;
}

.composer-formatting-toolbar .is-italic {
  font-style: italic;
}

.composer-formatting-toolbar .is-underline {
  text-decoration: underline;
}

.composer-formatting-toolbar .is-strike {
  text-decoration: line-through;
}

@media (max-width: 560px) {
  .composer-emoji-picker {
    right: 4px;
    width: calc(100vw - 16px);
  }

  .composer-emoji-grid {
    grid-template-columns: repeat(6, minmax(32px, 1fr));
  }
}

.message-audio-list {
  display: grid;
  gap: 8px;
  width: min(432px, 100%);
}

.message-attachment-audio {
  position: relative;
  display: grid;
  gap: 9px;
  width: min(432px, 100%);
  padding: 10px 12px 12px;
  border: 1px solid #343743;
  border-radius: 8px;
  background: #202127;
  color: #f4f5fb;
}

.message-reactions .twemoji-flag {
  width: 18px;
  height: 18px;
  margin: 0;
  vertical-align: middle;
}

.message-attachment-audio:has(.message-audio-actions) .message-audio-file {
  padding-right: 72px;
}

.message-attachment-audio > audio {
  display: none;
}

.message-audio-file {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.message-audio-file-icon {
  display: grid;
  width: 42px;
  height: 48px;
  place-items: center;
  background: transparent;
}

.message-audio-file-icon .ui-icon {
  width: 38px;
  height: 46px;
  stroke-width: 1.55;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.message-audio-file-meta {
  min-width: 0;
}

.message-audio-file-meta a,
.message-audio-file-meta small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-audio-file-meta a {
  color: #5da9ff;
  font-weight: 700;
  text-decoration: none;
}

.message-audio-file-meta a:hover {
  text-decoration: underline;
}

.message-audio-file-meta small {
  margin-top: 1px;
  color: #9da2b1;
}

.message-audio-controls {
  display: grid;
  grid-template-columns: 28px auto minmax(70px, 1fr) 28px;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 3px 5px;
  border-radius: 8px;
  background: #121318;
}

.message-audio-controls button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #f5f6f8;
}

.message-audio-controls button:hover {
  background: #292b34;
}

.message-audio-controls button .ui-icon {
  width: 21px;
  height: 21px;
}

.message-audio-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #d8d9df;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.message-audio-time b {
  color: #fff;
  font-weight: 750;
}

.message-audio-controls input[type="range"] {
  width: 100%;
  min-width: 0;
  height: 18px;
  margin: 0;
  accent-color: #5865f2;
  cursor: pointer;
}

.message-audio-controls input[type="range"]:disabled {
  cursor: wait;
  opacity: 0.55;
}

.message-attachment-audio.is-playing {
  border-color: #464a5a;
}

.message-attachment-audio.is-spoiler {
  min-height: 126px;
  overflow: hidden;
}

.message-attachment-audio.is-spoiler .message-audio-file,
.message-attachment-audio.is-spoiler .message-audio-controls {
  filter: blur(10px) brightness(0.48);
  pointer-events: none;
  user-select: none;
}

.message-audio-spoiler {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  padding: 9px 14px;
  border: 0;
  border-radius: 7px;
  background: rgba(20, 21, 27, 0.92);
  color: #fff;
  font-weight: 750;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.message-audio-spoiler:hover {
  background: rgba(43, 45, 55, 0.98);
}

.pending-attachments {
  display: flex;
  gap: 8px;
  min-height: 236px;
  overflow-x: auto;
  padding: 20px 8px 10px;
  border: 1px solid #343743;
  border-radius: 6px;
  background: #24262d;
}

.pending-attachments[hidden] {
  display: none;
}

.pending-attachment {
  position: relative;
  flex: 0 0 220px;
  display: grid;
  grid-template-rows: 150px auto;
  gap: 12px;
  padding: 40px 8px 10px;
  border: 1px solid #3a3d47;
  border-radius: 6px;
  background: #24262d;
}

.pending-attachment-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  border-bottom-left-radius: 5px;
  background: #30323a;
  overflow: hidden;
}

.pending-attachment-actions button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  background: transparent;
  color: #c7cad4;
}

.pending-attachment-actions button:hover {
  background: #3a3d47;
  color: #fff;
}

.pending-attachment-actions .is-danger {
  color: #ff6b6b;
}

.pending-attachment-actions .ui-icon {
  width: 17px;
  height: 17px;
}

.pending-attachment-preview {
  display: grid;
  width: 100%;
  height: 150px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #16181f;
}

.pending-attachment-preview img,
.pending-attachment-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-file-icon .ui-icon {
  width: 44px;
  height: 44px;
  color: #9da2b1;
}

.pending-attachment p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #f4f5fb;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress-message {
  align-items: flex-start;
}

.upload-progress-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  width: min(432px, 100%);
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #343743;
  border-radius: 7px;
  background: #24262d;
}

.upload-progress-card > .ui-icon {
  width: 32px;
  height: 40px;
  color: #c8c9ff;
}

.upload-progress-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.upload-progress-title {
  display: flex;
  gap: 4px;
  min-width: 0;
  color: #dfe2ec;
}

.upload-progress-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress-title span {
  flex: 0 0 auto;
  color: #9da2b1;
}

.upload-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #41434e;
}

.upload-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6470ff;
  transition: width 0.12s ease;
}

.upload-progress-card [data-upload-cancel] {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  color: #b8bbc6;
}

.upload-progress-card [data-upload-cancel]:hover {
  background: #343743;
  color: #fff;
}

.upload-progress-card [data-upload-cancel] .ui-icon {
  width: 20px;
  height: 20px;
}

.composer-bar {
  grid-template-columns: 35px minmax(0, 1fr) auto;
  border: 1px solid #2d3038;
  background: linear-gradient(165deg, #1d162466, #15152091);
  border-radius: 8px;
  align-items: center;
  min-height: 40px;
  display: grid;
  position: relative;
}

.composer-bar.is-expanded {
  align-items: start;
}

.composer-bar.is-expanded .composer-tools {
  align-self: start;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  z-index: 1;
}

.composer-bar.is-expanded textarea,
.composer-bar.is-expanded .composer-input-visual {
  grid-column: 2 / -1;
  grid-row: 1;
  padding-right: 105px;
}

.composer-character-counter {
  position: absolute;
  right: 16px;
  bottom: 10px;
  z-index: 2;
  color: #d9dbe2;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  margin-right: 15px;
}

.composer-character-counter[hidden] {
  display: none;
}

.composer-character-counter.is-over-limit {
  color: #f06a72;
}

.composer-plus {
  background: transparent;
  justify-content: center;
  place-items: center;
  border-radius: 5px;
  align-items: center;
  min-height: 25px;
  color: #aeb2bf;
  display: grid;
  margin: 10px;
  height: 25px;
  width: 25px;
}

.composer textarea {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  height: 48px;
  min-height: 48px;
  max-height: 340px;
  border: 1px solid transparent;
  border-radius: 8px;
  resize: none;
  padding: 10px 10px;
  background: #00000000;
  color: transparent;
  caret-color: var(--ink);
  -webkit-text-fill-color: transparent;
  outline: none;
  overflow-x: hidden;
  overflow-y: hidden;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: #666b78 transparent;
  margin: 5px 0;
}

.composer-input-visual {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 340px;
  margin: 5px 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  overflow-wrap: anywhere;
  pointer-events: none;
  white-space: pre-wrap;
}

.composer-input-visual .twemoji-flag {
  width: auto;
  height: 1.25em;
  margin: 0;
  object-fit: contain;
  vertical-align: -0.24em;
}

.composer-input-selection-gap {
  visibility: visible;
  filter: brightness(0.82) saturate(0.9);
}

.composer textarea::-webkit-scrollbar {
  width: 6px;
}

.composer textarea::-webkit-scrollbar-track {
  background: transparent;
}

.composer textarea::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #666b78;
}

.composer textarea::placeholder {
  color: #8c909e;
  -webkit-text-fill-color: #8c909e;
}

.composer textarea::selection {
  background: rgba(49, 91, 182, 0.42);
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: stretch;
  margin: 10px 20px;
}

.composer-tools button,
.send-btn {
  background: transparent;
  justify-content: center;
  place-items: center;
  border-radius: 5px;
  align-items: center;
  min-height: 25px;
  font-weight: 100;
  color: #b8bbc6;
  font-size: 8px;
  display: grid;
  height: 25px;
  width: 25px;
}

.composer-tools button:hover,
.composer-plus:hover,
.send-btn:hover {
  background: #30323a;
  color: #fff;
}

.send-btn {
  display: none;
}

.mention-menu {
  overflow: hidden;
  border: 1px solid #30323a;
  border-radius: 8px;
  background: #25262d;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.mention-menu[hidden] {
  display: none;
}

.mention-menu p {
  margin: 0;
  padding: 10px 12px 6px;
  color: #aeb2bf;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mention-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 7px 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.mention-menu button:hover {
  background: #30323a;
}

.mention-menu .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
}

.mention-menu small {
  color: var(--muted);
}

.composer-context {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1d24;
  color: var(--muted);
  font-size: 13px;
}

.composer-context[hidden] {
  display: none;
}

.composer-context span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-context button {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.composer-context button:hover {
  background: #25262d;
  color: #fff;
}

.details h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.detail-block {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.detail-block:first-of-type {
  border-top: 0;
}

.action-stack {
  display: grid;
  gap: 8px;
}

.action-stack .secondary-btn {
  width: 100%;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.tab-btn {
  min-height: 38px;
  border-radius: 8px;
  background: #2a2d36;
  color: var(--ink);
  font-weight: 800;
}

.tab-btn.is-active {
  background: var(--brand);
  color: white;
}

.profile-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 6px;
  background: rgba(4, 5, 8, 0.86);
}

.profile-editor {
  position: relative;
  display: grid;
  grid-template-columns: 240px minmax(360px, 440px) minmax(360px, 1fr);
  width: min(1500px, calc(100vw - 12px));
  height: min(900px, calc(100vh - 12px));
  min-height: 0;
  overflow: hidden;
  border: 1px solid #32343d;
  border-radius: 12px;
  background: #18191e;
  color: #f4f5f8;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.profile-editor-tools {
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px 18px;
  border-right: 1px solid #30313a;
  background: #222329;
}

.profile-editor-select {
  display: flex;
  width: calc(100% + 32px);
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  margin: 0 -16px 16px;
  padding: 0 16px;
  border-bottom: 1px solid #353740;
  background: transparent;
  color: #f2f3f7;
  text-align: left;
}

.profile-editor-select .ui-icon {
  transform: rotate(180deg);
}

.profile-editor-tool-group {
  margin: 0 0 21px;
}

.profile-editor-tool-group h3 {
  margin: 0 0 9px;
  color: #f1f2f5;
  font-size: 13px;
  font-weight: 600;
}

.profile-editor-badge-card,
.profile-editor-name-style {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 9px;
  background: #34353d;
  color: #d9dbe2;
}

.profile-editor-mini-avatar,
.profile-editor-avatar-option,
.profile-editor-hero-avatar,
.profile-editor-widget-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #5967e9, #8d43b9);
  color: #fff;
  font-weight: 900;
}

.profile-editor-mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 12px;
}

.profile-editor-placeholder-line {
  width: 55%;
  height: 12px;
  border-radius: 999px;
  background: #64666f;
}

.profile-editor-add,
.profile-editor-name-style span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  margin-left: auto;
  border-radius: 50%;
  background: #f4f5f7;
  color: #2b2d34;
}

.profile-editor-add .ui-icon,
.profile-editor-name-style span .ui-icon {
  width: 15px;
  height: 15px;
}

.profile-editor-avatar-options {
  display: grid;
  grid-template-columns: repeat(2, 84px);
  justify-content: space-between;
  gap: 0;
}

.profile-editor-avatar-option,
.profile-editor-decoration-option {
  height: 86px;
  border-radius: 8px;
  background-color: #34353d;
}

.profile-editor-avatar-option {
  width: 84px;
  height: 84px;
  min-width: 84px;
  min-height: 84px;
  padding: 0;
  border: 0;
  overflow: hidden;
  font-size: 25px;
}

.profile-editor-avatar-option .avatar-image {
  width: 84px;
  height: 84px;
}

.profile-editor-decoration-option {
  display: grid;
  width: 84px;
  min-width: 84px;
  height: 84px;
  min-height: 84px;
  place-items: center;
  justify-self: end;
  box-sizing: border-box;
  padding: 0;
  border: 2px dashed #555761;
  color: #d9dbe2;
}

.profile-editor-banner-color {
  width: 100%;
  height: 42px;
  border-radius: 8px;
  background: #4f4139;
}

.profile-editor-effect {
  width: 100%;
  height: 88px;
  padding: 10px 52px 10px 10px;
  border-radius: 8px;
  background: #34353d;
}

.message-file-download {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: rgba(27, 28, 35, 0.94);
  color: #c9cbd3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.message-attachment-file:hover .message-file-download,
.message-attachment-file:focus-visible .message-file-download,
.message-attachment-file:focus-within .message-file-download {
  opacity: 1;
  transform: translateY(0);
}

.message-attachment-file:hover .message-file-download {
  background: #343640;
  color: #fff;
}

.message-attachment-file .message-file-download .ui-icon {
  width: 19px;
  height: 19px;
  color: currentColor;
}

.profile-editor-effect span {
  display: block;
  width: 64px;
  height: 100%;
  margin: auto;
  border-radius: 5px;
  background: linear-gradient(150deg, #2b104f, #b21fdb 47%, #111d51);
  box-shadow: 0 0 18px rgba(177, 33, 224, 0.42);
}

.profile-editor-name-style {
  justify-content: space-between;
  min-height: 48px;
  color: #c8c9d0;
  font-size: 18px;
  font-weight: 850;
}

.profile-editor-preview-column {
  min-width: 0;
  overflow-y: auto;
  padding: 48px 26px 30px;
  background: #18191e;
}

.profile-editor-preview {
  min-height: 680px;
  overflow: hidden;
  border-radius: 20px;
  background: #282235;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.profile-editor-cover {
  height: 140px;
  background: linear-gradient(130deg, #32154f, #683d6a 55%, #513a5b);
}

.profile-editor-preview-body {
  position: relative;
  padding: 76px 32px 36px;
  background: linear-gradient(180deg, #29233a, #211d2d);
}

.profile-editor-hero-avatar {
  position: absolute;
  top: -45px;
  left: 30px;
  width: 86px;
  height: 86px;
  border: 7px solid #29233a;
  border-radius: 20%;
  font-size: 32px;
}

.profile-editor-preview-body h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.profile-editor-handle {
  margin: 0 0 12px;
  color: #f0f0f4;
  font-size: 14px;
}

.profile-editor-handle em,
.profile-editor-bio {
  color: #999aa5;
  font-style: italic;
}

.profile-editor-badges {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
  color: #6ee7df;
}

.profile-editor-preview-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
}

.profile-editor-preview-actions button {
  min-height: 36px;
  padding: 0 15px;
  border-radius: 8px;
  background: #5c65c5;
  color: #e7e8ed;
  font-weight: 750;
}

.profile-editor-preview-actions button:last-child {
  display: grid;
  width: 38px;
  padding: 0;
  place-items: center;
  background: #353442;
}

.profile-editor-bio {
  min-height: 65px;
  margin: 0 0 26px;
  line-height: 1.45;
}

.profile-editor-member-since,
.profile-editor-links {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.profile-editor-member-since small,
.profile-editor-links small {
  color: #999ba5;
  font-weight: 700;
}

.profile-editor-links button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  background: transparent;
  color: #d9dae1;
  text-align: left;
}

.profile-editor-board {
  min-width: 0;
  overflow-y: auto;
  padding: 60px 48px 35px 32px;
  background: #18191e;
}

.profile-editor-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #2d2f37;
}

.profile-editor-tabs button {
  position: relative;
  padding: 0 0 14px;
  background: transparent;
  color: #9597a2;
  font-weight: 800;
}

.profile-editor-tabs button.is-active {
  color: #f3f4f7;
}

.profile-editor-tabs button.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #fff;
  content: "";
}

.profile-editor-board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 16px;
  color: #a5a7b0;
  font-size: 12px;
  font-weight: 750;
}

.profile-editor-board-heading button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #303138;
  color: #f0f1f4;
  font-weight: 750;
}

.profile-editor-widget {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #2b2c32;
}

.profile-editor-widget header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.profile-editor-widget header span,
.profile-editor-widget p {
  color: #a6a8b1;
}

.profile-editor-widget-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.profile-editor-widget-icon {
  width: 86px;
  height: 86px;
  border-radius: 10px;
  font-size: 25px;
}

.profile-editor-widget-row p,
.profile-editor-widget-empty p {
  margin: 7px 0 0;
  line-height: 1.4;
}

.profile-editor-widget-empty header button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #373840;
  color: #b7b9c2;
}

.profile-editor-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #292a30;
  color: #c6c8d0;
}

.profile-editor-close:hover {
  background: #373840;
  color: #fff;
}

.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.avatar-picker-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 6, 9, 0.78);
  backdrop-filter: blur(2px);
}

.avatar-picker-modal {
  width: min(456px, calc(100vw - 40px));
  padding: 22px 24px 24px;
  border: 1px solid #3a3c45;
  border-radius: 14px;
  background: #24252b;
  color: #f3f4f7;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.avatar-picker-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.avatar-picker-modal > header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.avatar-picker-modal > header button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  color: #aeb0b9;
}

.avatar-picker-modal > header button:hover {
  background: #34353d;
  color: #fff;
}

.avatar-upload-tile {
  display: grid;
  width: 100%;
  min-height: 176px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #3c3e47;
  border-radius: 10px;
  background: #32333a;
  color: #f4f5f7;
}

.avatar-upload-tile:hover {
  border-color: #626570;
  background: #393a42;
}

.avatar-upload-tile.is-loading {
  cursor: wait;
  opacity: 0.68;
}

.avatar-upload-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #42444d;
}

.avatar-upload-icon .ui-icon {
  width: 25px;
  height: 25px;
}

.avatar-upload-tile strong {
  font-size: 14px;
}

.avatar-upload-tile small {
  color: #a3a5ae;
  font-size: 12px;
}

.avatar-picker-recent {
  margin-top: 22px;
}

.avatar-picker-recent h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.avatar-picker-recent p {
  margin: 0 0 16px;
  color: #999ba5;
  font-size: 13px;
}

.chat-row .avatar.is-favorites-avatar {
  background: #5865f2;
  color: #fff;
}

.avatar-picker-list {
  display: flex;
  gap: 10px;
}

.avatar-picker-list > button,
.avatar-picker-list > span {
  display: grid;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  flex: 0 0 48px;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #34353d;
  color: #777a84;
}

.avatar-picker-recent-item .avatar-image {
  width: 48px;
  height: 48px;
}

.avatar-picker-recent-item:not(.has-image) {
  background: linear-gradient(145deg, #5967e9, #8d43b9);
  color: #fff;
  font-weight: 800;
}

.avatar-picker-empty .ui-icon {
  width: 27px;
  height: 27px;
  opacity: 0.7;
}

.banner-color-picker-backdrop {
  position: absolute;
  inset: 0;
  z-index: 22;
  background: rgba(5, 6, 9, 0.36);
}

.banner-color-picker {
  position: absolute;
  top: 250px;
  left: 220px;
  width: 256px;
  padding: 14px;
  border: 1px solid #454751;
  border-radius: 6px;
  background: #25262c;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.58);
}

.banner-color-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 10px;
}

.banner-color-mode button {
  min-height: 30px;
  border-radius: 6px;
  background: #34353d;
  color: #aeb0b9;
}

.banner-color-mode button.is-active {
  background: #5865f2;
  color: #fff;
}

.banner-gradient-stops {
  display: grid;
  grid-template-columns: repeat(3, 34px) 1fr;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.banner-gradient-stops[hidden] {
  display: none;
}

.banner-gradient-stops > button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
}

.banner-gradient-stops > button.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px #5865f2;
}

.banner-gradient-stops label {
  display: grid;
  gap: 5px;
  color: #aeb0b9;
  font-size: 10px;
}

.banner-gradient-stops input {
  width: 100%;
}

.banner-color-field {
  position: relative;
  height: 146px;
  overflow: hidden;
  border-radius: 3px;
  cursor: crosshair;
  touch-action: none;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--picker-hue) 100% 50%));
}

.banner-color-cursor {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px #000;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.banner-hue-slider {
  width: 100%;
  height: 12px;
  margin: 9px 0 12px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}

.banner-hue-slider::-webkit-slider-thumb {
  width: 10px;
  height: 20px;
  appearance: none;
  border: 2px solid #fff;
  border-radius: 4px;
  background: transparent;
  box-shadow: 0 1px 3px #000;
}

.banner-hex-field {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border: 2px solid #5865f2;
  border-radius: 7px;
  color: #dfe1e7;
}

.banner-hex-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dfe1e7;
  font-size: 15px;
}

.banner-hex-field .ui-icon {
  width: 17px;
  height: 17px;
}

.banner-color-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.banner-color-presets button {
  height: 34px;
  padding: 0;
  border: 1px solid #737680;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .banner-color-picker {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 1100px) {
  .profile-editor {
    grid-template-columns: 220px minmax(360px, 1fr);
  }

  .profile-editor-board {
    display: none;
  }
}

@media (max-width: 720px) {
  .profile-editor {
    grid-template-columns: 1fr;
  }

  .profile-editor-tools {
    display: none;
  }

  .profile-editor-preview-column {
    padding: 48px 14px 20px;
  }
}

.settings-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.72);
}

.settings-modal {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  width: min(1400px, calc(100vw - 32px));
  height: min(888px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid #2b2d34;
  border-radius: 10px;
  background: #1f2026;
  color: #f4f5fb;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.settings-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  padding: 22px 16px;
  background: #17181f;
  border-right: 1px solid #292b33;
}

.settings-self {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.settings-self .avatar {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.settings-self strong,
.settings-self button,
.settings-menu-item span,
.settings-row span,
.settings-toggle-row small {
  overflow-wrap: anywhere;
}

.settings-self strong {
  display: block;
  color: #f8f8fb;
  font-size: 14px;
}

.settings-self button {
  margin-top: 3px;
  padding: 0;
  background: transparent;
  color: #a5a8b4;
  font-size: 13px;
  text-align: left;
}

.settings-self button:hover {
  color: #fff;
}

.settings-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #30323b;
  border-radius: 8px;
  background: #111219;
  color: #b9bcc7;
}

.settings-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f4f5fb;
  outline: 0;
}

.settings-menu {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow: auto;
  padding-right: 2px;
}

.settings-menu-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  color: #aaaeba;
  text-align: left;
  font-weight: 500;
}

.settings-menu-item:hover,
.settings-menu-item.is-active {
  background: #33343c;
  color: #fff;
}

.settings-submenu {
  --settings-submenu-line-width: 3px;
  --settings-submenu-indent: 12px;
  display: none;
  margin: 0 0 0 17px;
  padding: 0 0 0 var(--settings-submenu-indent);
  border-left: var(--settings-submenu-line-width) solid #343641;
}

.settings-submenu.is-open {
  display: grid;
  gap: 2px;
}

.settings-submenu-item {
  position: relative;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 6px;
  background: transparent;
  color: #aeb2bf;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.25;
  text-align: left;
}

.settings-submenu-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc((var(--settings-submenu-indent) + var(--settings-submenu-line-width)) * -1 + 0px);
  width: var(--settings-submenu-line-width);
  border-radius: 15px;
  background: transparent;
}

.settings-submenu-item:hover,
.settings-submenu-item.is-active {
  color: #fff;
}

.settings-submenu-item.is-active::before {
  background: #fff;
}

.settings-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #202126;
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px 0 16px;
}

.settings-panel-header h1 {
  margin: 0;
  color: #f4f5fb;
  font-size: 14px;
  font-weight: 900;
}

.settings-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #b9bcc7;
}

.settings-close:hover {
  background: #30323b;
  color: #fff;
}

.settings-panel-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #4b4e59 transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  padding: 44px min(12vw, 210px) 80px;
  scroll-behavior: smooth;
}

.settings-panel-body::-webkit-scrollbar {
  width: 8px;
}

.settings-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.settings-panel-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #4b4e59;
  background-clip: padding-box;
}

.settings-panel-body::-webkit-scrollbar-thumb:hover {
  background: #656976;
  background-clip: padding-box;
}

.settings-panel-body::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.group-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
}

.group-chat-modal {
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto;
  width: min(480px, 100%);
  max-height: min(800px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid #363841;
  border-radius: 12px;
  background: #23242a;
  color: #f2f3f5;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.group-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 14px;
}

.group-chat-header h2 {
  margin: 0 0 5px;
  font-size: 21px;
}

.group-chat-header p {
  margin: 0;
  color: #aeb1bc;
  font-size: 14px;
}

.group-chat-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #aeb1bc;
}

.group-chat-close:hover {
  color: #fff;
}

.group-chat-search {
  height: 42px;
  margin: 0 24px 12px;
  padding: 0 13px;
  border: 1px solid #3b3e48;
  border-radius: 8px;
  background: #1b1c22;
  color: #f2f3f5;
  outline: none;
}

.group-chat-friends {
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px 10px;
  scrollbar-color: #4b4e59 transparent;
  scrollbar-width: thin;
}

.group-chat-friends::-webkit-scrollbar {
  width: 6px;
}

.group-chat-friends::-webkit-scrollbar-track,
.group-chat-friends::-webkit-scrollbar-corner {
  background: transparent;
}

.group-chat-friends::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #4b4e59;
}

.group-chat-friends::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.group-chat-friend {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  color: #f2f3f5;
  text-align: left;
}

.group-chat-friend:hover,
.group-chat-friend.is-selected {
  background: #303138;
}

.group-chat-friend:disabled {
  opacity: 0.45;
}

.group-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.group-chat-friend-copy {
  display: grid;
  min-width: 0;
}

.group-chat-friend-copy strong,
.group-chat-friend-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-chat-friend-copy small {
  color: #aeb1bc;
  font-size: 12px;
}

.group-chat-checkbox {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #666a75;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
}

.group-chat-friend.is-selected .group-chat-checkbox {
  border-color: #5865f2;
  background: #5865f2;
}

.group-chat-empty {
  padding: 36px 12px;
  color: #aeb1bc;
  text-align: center;
}

.group-chat-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid #363841;
  background: #202127;
}

.group-chat-create {
  width: 100%;
  min-height: 44px;
  border-radius: 7px;
  background: #5865f2;
  color: #fff;
  font-weight: 700;
}

.group-chat-create:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.group-leave-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.74);
}

.group-leave-modal {
  width: min(480px, 100%);
  padding: 22px 24px 24px;
  border: 1px solid #383a44;
  border-radius: 10px;
  background: #23242a;
  color: #f2f3f5;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.group-leave-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.group-leave-modal h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.group-leave-modal > header button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #aeb1bc;
}

.group-leave-modal > p {
  margin: 22px 0 14px;
  color: #e1e2e6;
  font-size: 14px;
  line-height: 1.4;
}

.group-leave-silent {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #aeb1bc;
  cursor: pointer;
  font-size: 14px;
}

.group-leave-silent input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #5865f2;
}

.group-leave-modal > footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 24px;
}

.group-leave-modal > footer button {
  min-height: 40px;
  border-radius: 7px;
  color: #fff;
  font-weight: 700;
}

.group-leave-cancel {
  background: #34353d;
}

.group-leave-confirm {
  background: #da3443;
}

.group-leave-confirm:hover {
  background: #e14452;
}

.friend-remove-confirm-modal {
  width: min(400px, 100%);
}

.friend-remove-confirm-modal > p {
  margin-bottom: 0;
}

.ignore-user-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.74);
}

.ignore-user-modal {
  position: relative;
  width: min(444px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 24px 18px;
  border: 1px solid #3a3d47;
  border-radius: 10px;
  background: #24252b;
  color: #f3f4f7;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.ignore-user-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #aeb2bf;
}

.ignore-user-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
}

.ignore-user-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
}

.ignore-user-avatar-wrap > span {
  position: absolute;
  right: -4px;
  bottom: -2px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #24252b;
  color: #aeb2bf;
}

.ignore-user-avatar-wrap > span .ui-icon {
  width: 22px;
  height: 22px;
}

.ignore-user-modal h2 {
  margin: 0;
  text-align: center;
  font-size: 23px;
  line-height: 1.22;
}

.ignore-user-subtitle {
  margin: 6px 0 22px;
  color: #e0e2e7;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.ignore-user-effects {
  display: grid;
}

.ignore-user-effect {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #30323a;
}

.ignore-user-effect > .ui-icon {
  width: 23px;
  height: 23px;
  color: #b9bdc8;
}

.ignore-user-effect div,
.ignore-user-block-card > div {
  display: grid;
  gap: 4px;
}

.ignore-user-effect strong,
.ignore-user-block-card strong {
  font-size: 14px;
  line-height: 1.35;
}

.ignore-user-effect small,
.ignore-user-block-card small {
  color: #9da1ac;
  font-size: 11px;
  line-height: 1.35;
}

.ignore-user-more-title {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 800;
}

.ignore-user-block-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 7px;
  background: #191a1f;
}

.ignore-user-block-card button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  background: #2d2f36;
  color: #f3f4f7;
  font-size: 12px;
  font-weight: 700;
}

.ignore-user-guide {
  display: block;
  margin: 10px auto 16px;
  background: transparent;
  color: #55a7ff;
  font-size: 12px;
}

.ignore-user-modal > footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ignore-user-modal > footer button {
  min-width: 100px;
  min-height: 40px;
  border-radius: 7px;
  color: #fff;
  font-weight: 700;
}

.ignore-user-cancel {
  background: #34353d;
}

.ignore-user-confirm {
  background: #5865f2;
}

.ignore-user-confirm:hover {
  background: #6b75f5;
}

.block-user-modal .ignore-user-subtitle {
  margin-bottom: 18px;
}

.block-user-modal .ignore-user-effect:last-child > .ui-icon {
  fill: #b9bdc8;
}

.block-user-modal .block-user-confirm,
.block-user-modal .block-user-confirm:hover {
  background: #da2d3f;
}

@media (max-width: 520px) {
  .ignore-user-modal {
    padding-inline: 18px;
  }

  .ignore-user-block-card {
    grid-template-columns: 1fr;
  }
}

.settings-content-section {
  display: grid;
  gap: 22px;
  max-width: 700px;
}

.settings-content-section h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
}
.settings-content-section h2[id] {
  scroll-margin-top: 18px;
}

.settings-section-divider {
  height: 1px;
  margin: 26px 0 18px;
  background: #30313a;
}

.settings-row,
.settings-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: #f4f5fb;
  text-align: left;
}

.settings-row strong,
.settings-toggle-row strong {
  display: block;
  color: #f7f7fb;
  font-size: 14px;
  font-weight: 900;
}

.settings-row span,
.settings-toggle-row small {
  display: block;
  margin-top: 6px;
  color: #b2b5c1;
  font-size: 13px;
}

.settings-row-button {
  width: 100%;
  cursor: pointer;
}

.settings-row-button:hover strong,
.settings-row-button:hover > span {
  color: #fff;
}

.settings-form {
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding-top: 4px;
}

.settings-form .field {
  margin: 0;
}

.settings-toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.settings-edit-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.48);
}

.settings-edit-modal {
  display: grid;
  gap: 18px;
  width: min(480px, calc(100vw - 36px));
  padding: 24px;
  border: 1px solid #333541;
  border-radius: 10px;
  background: #24252b;
  color: #f6f7fb;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
}

.settings-edit-modal header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.settings-edit-modal h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
}

.settings-edit-modal p {
  margin: 8px 0 0;
  color: #b8bbc6;
  font-size: 15px;
}

.settings-edit-modal .field {
  display: grid;
  gap: 8px;
  margin: 0;
}

.settings-edit-modal label {
  color: #f4f5fb;
  font-size: 14px;
  font-weight: 850;
}

.settings-edit-modal input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #3a3c46;
  border-radius: 8px;
  background: #1b1c22;
  color: #fff;
  font-size: 15px;
  outline: 0;
}

.settings-edit-modal input:focus {
  border-color: #5865f2;
  box-shadow: 0 0 0 1px #5865f2;
}

.settings-edit-modal small {
  color: #aeb2bf;
  font-size: 12px;
}

.settings-edit-modal footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.settings-edit-modal footer button {
  min-height: 40px;
}

.settings-phone-current {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.settings-phone-current strong,
.settings-phone-current span {
  display: block;
}

.settings-phone-current span {
  margin-top: 3px;
  color: #f6f7fb;
}

.settings-phone-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #30313a;
  color: #f6f7fb;
}

.danger-text-btn {
  color: #ff7b7b;
}

.danger-primary-btn {
  background: #c94b4b;
}

.required-star {
  color: #ff7b7b;
}

.settings-view {
  display: none;
  padding: 20px;
  border-top: 1px solid var(--line);
}

.settings-view.is-visible {
  display: block;
}

.empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1040px) {
  .messenger {
    grid-template-columns: var(--sidebar-width, 300px) minmax(0, 1fr);
  }

  .voice-call-mini {
    width: min(var(--sidebar-width, 300px), 100vw);
  }

  .chat-header {
    grid-column: 2;
    width: 100%;
  }

  .details {
    display: none;
  }

  .details-resizer {
    display: none;
  }
}

@media (max-width: 760px) {
  .settings-modal-backdrop {
    padding: 0;
  }

  .settings-modal {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100vw;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .settings-sidebar {
    grid-template-rows: auto auto auto;
    gap: 10px;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #292b33;
  }

  .settings-menu {
    display: grid;
    gap: 4px;
    overflow-x: hidden;
    padding: 0 0 2px;
  }

  .settings-menu-item {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .settings-panel-body {
    padding: 24px 18px 56px;
  }

  .settings-content-section h2 {
    font-size: 21px;
  }

  .settings-row,
  .settings-toggle-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 34vh;
    padding: 28px;
  }

  .auth-panel {
    align-items: start;
  }

  .messenger {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .voice-call-mini {
    right: 8px;
    left: 8px;
    width: auto;
  }

  .voice-call-participants {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar {
    min-height: 42vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-chat {
    height: 58vh;
    min-height: 58vh;
  }

  .old-messages-notice {
    width: calc(100% - 24px);
    justify-content: space-between;
    bottom: 72px;
    padding-left: 12px;
    font-size: 12px;
  }

  .old-messages-notice button {
    max-width: 58%;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .people-search {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .auth-card {
    padding: 22px;
  }

  .auth-panel,
  .messages {
    padding: 16px;
  }

  .chat-header,
  .topbar {
    padding-inline: 14px;
  }

  .dm-header-actions {
    gap: 4px;
  }

  .dm-search {
    width: min(190px, 38vw);
  }
}

.settings-privacy-section {
  gap: 28px;
}

.settings-privacy-block {
  display: grid;
  gap: 14px;
}

.settings-privacy-block h3 {
  margin: 0;
  color: #f4f5fb;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
}

.settings-privacy-block p,
.settings-privacy-block small {
  margin: 0;
  color: #aeb2bf;
  font-size: 13px;
  line-height: 1.45;
}

.settings-privacy-block > strong {
  color: #f4f5fb;
  font-size: 14px;
  font-weight: 900;
}

.settings-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 56px;
  color: #f4f5fb;
}

.settings-switch-row strong {
  display: block;
  margin-bottom: 6px;
  color: #f4f5fb;
  font-size: 14px;
  font-weight: 900;
}

.settings-switch-row input {
  appearance: none;
  position: relative;
  width: 48px;
  height: 24px;
  border-radius: 999px;
  background: #2b2d35;
  box-shadow: inset 0 0 0 1px #3a3d47;
  cursor: pointer;
}

.settings-switch-row input::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.16s ease;
}

.settings-switch-row input:checked {
  background: #5865f2;
  box-shadow: none;
}

.settings-switch-row input:checked::after {
  transform: translateX(24px);
}

.settings-request-data {
  width: fit-content;
  min-width: 166px;
}

.settings-info-callout {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #4d8cff;
  border-radius: 8px;
  background: rgba(77, 140, 255, 0.12);
}

.settings-info-callout span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #5da1ff;
  color: #10213d;
  font-size: 12px;
  font-weight: 900;
}
.settings-notifications-section {
  gap: 28px;
}

.settings-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 286px);
  align-items: center;
  gap: 20px;
  min-height: 56px;
}

.settings-select-row strong {
  color: #f4f5fb;
  font-size: 14px;
  font-weight: 900;
}

.settings-select-row select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #3a3c46;
  border-radius: 8px;
  background: #202126;
  color: #f4f5fb;
  font-size: 14px;
}

.settings-related-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 0;
  background: transparent;
  color: #f4f5fb;
  text-align: left;
}

.settings-related-row strong {
  display: block;
  margin-bottom: 6px;
  color: #f4f5fb;
  font-size: 14px;
  font-weight: 900;
}

.settings-related-row small {
  color: #aeb2bf;
  font-size: 13px;
  line-height: 1.4;
}

.settings-related-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #2b2d35;
  color: #fff;
}

.settings-unsubscribe {
  justify-self: end;
  color: #f17f7f;
}
.settings-logout-btn {
  display: inline-grid;
  grid-template-columns: 20px auto;
  align-items: center;
  justify-content: start;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  color: #ff7b77;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
}

.settings-logout-btn .ui-icon {
  color: #ff7b77;
}

.settings-logout-btn:hover {
  background: rgba(255, 123, 119, 0.1);
  color: #ff9a96;
}
