/* Discord-style DM home rail + sidebar */

.server-rail-slot {
  position: relative;
  display: flex;
  align-items: center;
  width: 72px;
  justify-content: center;
}

.server-rail-pill {
  position: absolute;
  left: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: #fff;
  opacity: 0;
  transition:
    height 0.15s ease,
    opacity 0.15s ease;
  pointer-events: none;
}

.server-rail-slot:hover .server-rail-pill,
.server-rail-slot.is-active .server-rail-pill {
  opacity: 1;
}

.server-rail-slot.is-active .server-rail-pill {
  height: 40px;
}

.server-rail-slot:hover:not(.is-active) .server-rail-pill {
  height: 20px;
}

.server-rail-guilds {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Standalone server icons — full bleed like Discord (not “folder preview”) */
button.server-pill[data-guild-id] {
  padding: 0;
  border: none;
  margin: 0;
  background: #313338;
  cursor: pointer;
  transition:
    border-radius 0.2s ease,
    background 0.2s ease;
}

button.server-pill[data-guild-id]:hover,
button.server-pill[data-guild-id].active {
  border-radius: 16px;
  background: var(--guild-icon-bg, #5865f2);
}

button.server-pill[data-guild-id] .server-pill-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: normal;
  border-radius: inherit;
}

button.server-pill[data-guild-id] .server-pill-initial {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

button.server-pill.is-dragging {
  opacity: 0.45;
}

.server-drop-target {
  outline: 2px solid #23a559;
  outline-offset: 2px;
  border-radius: 16px;
}

.guild-slot.server-drop-before {
  outline: none;
  box-shadow: 0 -3px 0 0 #5865f2;
  border-radius: 4px;
}

.server-rail-guilds.server-drop-rail {
  outline: 2px dashed #23a559;
  outline-offset: -4px;
  border-radius: 8px;
}

/* Real folder — only when 2+ servers grouped (drag one server onto another) */
.server-folder {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: none;
  padding: 6px;
  cursor: pointer;
  background: #313338;
  position: relative;
  display: block;
  transition: background 0.15s ease;
}

.server-folder:hover,
.server-folder.is-open {
  background: #232428;
}

.server-folder-pip {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  background: #2b2d31;
}

.server-folder-pip:nth-child(1) {
  top: 8px;
  left: 8px;
}

.server-folder-pip:nth-child(2) {
  bottom: 8px;
  right: 8px;
}

.server-folder-pip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.server-folder-pip .server-pill-initial {
  font-size: 0.65rem;
}

.server-folder-expanded {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.server-folder-expanded.hidden {
  display: none;
}

.server-rail-slot.is-folder-expanded {
  margin-bottom: 4px;
}

.server-pill-initial {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f2f3f5;
  line-height: 1;
}

.server-pill-add {
  background: #313338;
  color: #23a559;
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, color 0.15s ease, border-radius 0.2s ease;
}

.server-pill-add:hover {
  background: #23a559;
  color: #fff;
  border-radius: 16px;
}

.server-rail-add .server-rail-pill {
  opacity: 0;
}

.server-rail-add:hover .server-rail-pill {
  opacity: 0;
}

.add-server-card {
  max-width: 460px;
}

.add-server-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #3f4147;
  background: #2b2d31;
  color: #f2f3f5;
  cursor: pointer;
}

.add-server-choice:hover {
  background: #35373c;
}

.add-server-choice-ico {
  font-size: 1.4rem;
  width: 2rem;
  text-align: center;
}

.add-server-choice-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.add-server-back {
  background: none;
  border: none;
  color: #00a8fc;
  cursor: pointer;
  padding: 0 0 12px;
  font-size: 0.9rem;
}

.add-server-submit {
  margin-top: 16px;
  width: 100%;
}

.server-rail-divider {
  width: 32px;
  height: 2px;
  border-radius: 1px;
  background: #35373c;
  flex-shrink: 0;
}

.dm-home-pill {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  background: var(--dm-home-bg, #313338);
  transition:
    border-radius 0.2s ease,
    background 0.2s ease;
}

.dm-home-pill:hover,
.dm-home-pill.active {
  border-radius: 16px;
  background: var(--dm-home-bg-hover, #5865f2);
}

.dm-home-pill-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;
  mix-blend-mode: lighten;
}

.dm-home-pill-logo.is-custom {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: normal;
  border-radius: inherit;
}

.dm-rail-tooltip {
  position: fixed;
  z-index: 10002;
  padding: 8px 12px;
  background: #111214;
  color: #f2f3f5;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.dm-rail-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.dm-rail-tooltip::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: #111214;
}

.dm-home-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--bg-sidebar);
}

.dm-home-panel.hidden {
  display: none;
}

#channel-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.guild-ui {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dm-view #guild-ui {
  display: none !important;
}

body.dm-view #channel-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.dm-view #dm-home-panel:not(.hidden) {
  flex: 1;
  min-height: 0;
  display: flex !important;
}

body.dm-view .channel-dock {
  flex-shrink: 0;
  margin-top: auto;
}

body.dm-view .channel-dock .voice-connection:not(.hidden) {
  display: block;
}

#server-chat-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dm-conversation {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-chat);
}

.dm-conversation.hidden {
  display: none;
}

#server-chat-shell.hidden {
  display: none !important;
}

.dm-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #26272b;
  background: var(--bg-chat);
  flex-shrink: 0;
}

.dm-chat-head-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
  color: #f2f3f5;
}

.dm-head-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.dm-chat-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dm-head-ico {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #b5bac1;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.dm-head-ico:hover:not(:disabled) {
  background: #35373c;
  color: #dbdee1;
}

.dm-chat-split {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.dm-messages {
  flex: 1;
  min-width: 0;
}

.dm-profile-rail {
  width: 360px;
  flex-shrink: 0;
  background: #2b2d31;
  border-left: 1px solid #1e1f22;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.dm-profile-rail.collapsed {
  display: none;
}

.dm-profile-banner {
  height: 120px;
  background: linear-gradient(160deg, #9b2c4a 0%, #2c2f6b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
}

.dm-banner-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #f2f3f5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.dm-banner-brand strong {
  font-size: 22px;
  letter-spacing: 0.12em;
}

.dm-banner-brand span {
  font-size: 10px;
  color: #dbdee1;
  letter-spacing: 0.06em;
}

.dm-profile-card {
  padding: 0 16px 20px;
  margin-top: -40px;
  text-align: center;
}

.dm-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid #2b2d31;
  object-fit: cover;
  background: #1e1f22;
}

.dm-profile-name {
  margin: 8px 0 4px;
  font-size: 20px;
  color: #f2f3f5;
}

.dm-profile-handle {
  margin: 0 0 12px;
  color: #949ba4;
  font-size: 14px;
}

.dm-profile-mutual {
  margin: 0 0 16px;
  font-size: 13px;
  color: #949ba4;
}

.dm-profile-since {
  margin: 0 0 20px;
  font-size: 13px;
  color: #dbdee1;
  text-align: left;
}

.dm-profile-label {
  color: #949ba4;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dm-profile-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 4px;
  background: #4e5058;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.dm-profile-btn:hover {
  background: #5d6069;
}

#dm-composer {
  flex-shrink: 0;
  padding: 0 16px 24px;
  background: var(--bg-chat);
}

.dm-at-bar {
  margin: 0 0 4px 4px;
  font-size: 12px;
  color: #949ba4;
}

.dm-servers .dm-home-pill {
  z-index: 2;
  position: relative;
}

.dm-home-search {
  margin: 12px 12px 8px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #1e1f22;
  color: #949ba4;
  font-size: 14px;
  border: none;
  width: calc(100% - 24px);
  box-sizing: border-box;
}

.dm-home-search:focus {
  outline: none;
  color: #dbdee1;
}

.dm-home-nav {
  padding: 4px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-home-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #949ba4;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.dm-home-nav-item:hover {
  background: #35373c;
  color: #dbdee1;
}

.dm-home-nav-item .dm-nav-ico {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #b5bac1;
}

.dm-home-nav-item:hover .dm-nav-ico {
  color: #dbdee1;
}

.dm-home-nav-item .dm-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: #f2f3f5;
  color: #111214;
}

.dm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #949ba4;
}

.dm-section-head button {
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  color: #949ba4;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.dm-section-head button:hover {
  color: #dbdee1;
}

.dm-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.dm-list li {
  margin: 0;
}

.dm-thread {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: #949ba4;
}

.dm-thread:hover,
.dm-thread.active {
  background: #35373c;
  color: #dbdee1;
}

.dm-thread-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #5865f2;
}

.dm-thread-body {
  min-width: 0;
  flex: 1;
}

.dm-thread-name {
  font-size: 15px;
  font-weight: 500;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dm-thread-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #4e5058;
  color: #dbdee1;
}

.dm-thread-status {
  font-size: 12px;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#main-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

#server-chat-shell:not(.hidden),
#dm-conversation:not(.hidden),
#dm-friends-home:not(.hidden),
#dm-shop-home:not(.hidden) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#server-chat-shell.hidden,
#dm-conversation.hidden,
#dm-friends-home.hidden,
#dm-shop-home.hidden {
  display: none !important;
}

#dm-shop-home:not(.hidden) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-chat);
}

.dm-shop-home {
  overflow-y: auto;
}

.dm-shop-title {
  margin: 0;
}

.dm-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 24px 32px;
}

.dm-shop-card {
  background: #2b2d31;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #1e1f22;
}

.dm-shop-card h3 {
  margin: 0 0 8px;
  color: #f2f3f5;
  font-size: 16px;
}

.dm-shop-card p {
  margin: 0 0 12px;
  color: #949ba4;
  font-size: 14px;
}

.dm-shop-cta {
  border: none;
  background: #5865f2;
  color: #fff;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: not-allowed;
  opacity: 0.7;
}

.dm-friends-home {
  background: var(--bg-chat);
  overflow: hidden;
}

.dm-friends-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #26272b;
  flex-shrink: 0;
}

.dm-friends-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dm-friends-tab {
  border: none;
  background: transparent;
  color: #949ba4;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.dm-friends-tab:hover,
.dm-friends-tab.active {
  color: #f2f3f5;
  background: #404249;
}

.dm-friends-new-dm {
  border: none;
  background: #248046;
  color: #fff;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.dm-friends-new-dm:hover {
  background: #1a6334;
}

.dm-friends-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  min-height: 0;
}

.dm-friends-panel.hidden {
  display: none;
}

.dm-friends-heading {
  margin: 0 0 8px;
  font-size: 20px;
  color: #f2f3f5;
}

.dm-friends-sub,
.dm-friends-note {
  margin: 0 0 20px;
  color: #949ba4;
  font-size: 14px;
}

.dm-friends-quick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 520px;
}

.dm-friends-quick {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.dm-friends-quick:hover {
  background: #404249;
}

.dm-friends-quick-av {
  border-radius: 50%;
  object-fit: cover;
  background: #1e1f22;
}

.dm-friends-quick-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dm-friends-quick-name {
  color: #f2f3f5;
  font-weight: 600;
}

.dm-friends-quick-sub {
  color: #949ba4;
  font-size: 13px;
}

.dm-add-friend-inline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}

.dm-add-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #b5bac1;
}

.dm-add-friend-inline input {
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #1e1f22;
  background: #1e1f22;
  color: #f2f3f5;
  font-size: 16px;
}

.dm-add-submit {
  align-self: flex-start;
  border: none;
  background: #5865f2;
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.dm-add-submit:hover {
  background: #4752c4;
}

.dm-add-friend-results {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  border-radius: 4px;
  background: #2b2d31;
  border: 1px solid #1e1f22;
}

.dm-add-friend-results:empty {
  display: none;
}

.dm-add-friend-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #1e1f22;
}

.dm-add-friend-result:last-child {
  border-bottom: none;
}

.dm-add-friend-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dm-add-friend-result-body {
  flex: 1;
  min-width: 0;
}

.dm-add-friend-result-name {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #f2f3f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-add-friend-result-id {
  display: block;
  font-size: 12px;
  color: #949ba4;
}

.dm-add-quick-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #248046;
  color: #fff;
}

.dm-add-quick-btn:hover:not(:disabled) {
  background: #1a6334;
}

.dm-add-quick-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.dm-add-quick-btn.is-friend {
  background: #4e5058;
  color: #b5bac1;
}

.dm-add-friend-empty {
  padding: 16px 12px;
  font-size: 14px;
  color: #949ba4;
  text-align: center;
}

.dm-new-msg-card {
  width: min(432px, 100%);
  max-width: 432px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(640px, 90vh);
}

.dm-new-msg-head {
  position: relative;
  padding: 16px 16px 8px;
  flex-shrink: 0;
}

.dm-new-msg-head .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.dm-new-msg-titles h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #f2f3f5;
}

.dm-new-msg-sub {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #b5bac1;
  line-height: 1.35;
}

.dm-new-msg-search-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 16px 0;
  padding: 8px 10px;
  min-height: 44px;
  border-radius: 4px;
  background: #1e1f22;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}

.dm-new-msg-search-wrap:focus-within {
  border-color: #00a8fc;
}

.dm-new-msg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dm-new-msg-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 2px;
  border-radius: 4px;
  background: #383a40;
  font-size: 14px;
  color: #f2f3f5;
}

.dm-new-msg-chip img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.dm-new-msg-chip button {
  border: none;
  background: transparent;
  color: #b5bac1;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}

.dm-new-msg-chip button:hover {
  color: #f2f3f5;
}

.dm-new-msg-search {
  flex: 1 1 120px;
  min-width: 80px;
  border: none;
  background: transparent;
  color: #f2f3f5;
  font-size: 16px;
  outline: none;
}

.dm-new-msg-search::placeholder {
  color: #949ba4;
}

.dm-new-msg-hint {
  margin: 8px 16px 4px;
  font-size: 12px;
  font-weight: 500;
  color: #949ba4;
  flex-shrink: 0;
}

.dm-new-msg-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 360px;
}

.dm-new-msg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #f2f3f5;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.dm-new-msg-row:hover,
.dm-new-msg-row:focus-visible {
  background: #3f4147;
  outline: none;
}

.dm-new-msg-av-wrap {
  position: relative;
  flex-shrink: 0;
}

.dm-new-msg-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.dm-new-msg-av-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.dm-new-msg-presence {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid #313338;
  background: #80848e;
}

.dm-new-msg-presence.online {
  background: #23a559;
}

.dm-new-msg-presence.dnd {
  background: #f23f43;
}

.dm-new-msg-presence.idle {
  background: #f0b232;
}

.dm-new-msg-meta {
  flex: 1;
  min-width: 0;
}

.dm-new-msg-name {
  display: block;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-new-msg-handle {
  display: block;
  font-size: 13px;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-new-msg-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 2px solid #4e5058;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background 0.12s, border-color 0.12s;
}

.dm-new-msg-row.is-selected .dm-new-msg-check {
  border-color: #5865f2;
  background: #5865f2;
  color: #fff;
}

.dm-new-msg-check svg {
  width: 14px;
  height: 14px;
}

.dm-new-msg-empty {
  padding: 24px 16px;
  text-align: center;
  color: #949ba4;
  font-size: 14px;
}

.dm-new-msg-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #2b2d31;
  flex-shrink: 0;
}

.dm-new-msg-btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.dm-new-msg-btn.cancel {
  background: transparent;
  color: #f2f3f5;
}

.dm-new-msg-btn.cancel:hover {
  text-decoration: underline;
}

.dm-new-msg-btn.create {
  background: #5865f2;
  color: #fff;
}

.dm-new-msg-btn.create:hover:not(:disabled) {
  background: #4752c4;
}

.dm-new-msg-btn.create:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.friend-req-pop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10004;
  max-width: min(360px, calc(100vw - 48px));
}

.friend-req-pop.hidden {
  display: none !important;
}

.friend-req-card {
  background: #313338;
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid #1e1f22;
}

.friend-req-title {
  margin: 0 0 14px;
  font-size: 15px;
  color: #f2f3f5;
  line-height: 1.4;
}

.friend-req-title strong {
  font-weight: 600;
}

.friend-req-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.friend-req-btn {
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.friend-req-btn.no {
  background: #4e5058;
  color: #fff;
}

.friend-req-btn.no:hover {
  background: #6d6f78;
}

.friend-req-btn.yes {
  background: #5865f2;
  color: #fff;
}

.friend-req-btn.yes:hover {
  background: #4752c4;
}

.dm-icon-modal {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  padding: 24px;
}

.dm-icon-modal.hidden {
  display: none;
}

.dm-icon-card {
  width: min(400px, 100%);
  background: #313338;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.dm-icon-card h3 {
  margin: 0 0 16px;
  font-size: 18px;
  color: #f2f3f5;
}

.dm-icon-preview-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.dm-icon-preview {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #5865f2;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.dm-icon-preview img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  mix-blend-mode: lighten;
}

.dm-icon-preview img.is-custom {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: normal;
}

.dm-icon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dm-icon-actions .settings-btn-primary,
.dm-icon-actions .settings-btn-ghost {
  font-size: 13px;
  padding: 8px 14px;
}

.dm-icon-hint {
  font-size: 12px;
  color: #949ba4;
  margin: 0;
}