:root {
  color-scheme: dark;
  font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #313338;
  color: #f2f3f5;
  font-synthesis: none;
  --rail: #1e1f22;
  --sidebar: #2b2d31;
  --chat: #313338;
  --muted: #949ba4;
  --accent: #5865f2;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100svh; overflow: hidden; }
button, input { font: inherit; }
.app-shell { width: 100%; height: 100svh; display: flex; overflow: hidden; }
.server-rail { width: 72px; flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; background: var(--rail); }
.server-icon { position: relative; width: 48px; height: 48px; flex: 0 0 48px; border: 0; border-radius: 16px; background: var(--accent); color: white; font-size: 22px; font-weight: 800; cursor: default; transition: border-radius .15s; }
.server-icon::before { content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 0; transform: translateY(-50%); border-radius: 0 4px 4px 0; background: white; transition: height .15s; }
.server-icon.selected { border-radius: 16px; }
.server-icon.selected::before { height: 36px; }
.rail-divider { width: 32px; height: 2px; border-radius: 2px; background: #35363c; }
.channel-sidebar { width: 240px; flex: 0 0 240px; display: flex; flex-direction: column; background: var(--sidebar); }
.server-header { height: 49px; flex: 0 0 49px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #202125; box-shadow: 0 1px 2px #0002; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.chevron { font-size: 18px; color: #b5bac1; transform: translateY(-2px); }
.channel-category { display: flex; justify-content: space-between; align-items: center; margin: 21px 10px 6px 16px; color: #949ba4; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.channel-category span:last-child { font-size: 20px; font-weight: 400; line-height: 14px; }
.channel-item { height: 34px; margin: 0 8px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border-radius: 4px; color: #b5bac1; font-size: 15px; font-weight: 500; }
.channel-item.active { background: #404249; color: #f2f3f5; }
.hash { color: #80848e; font-size: 22px; line-height: 1; font-weight: 500; }
.channel-item .hash { font-size: 21px; }
.sidebar-fill { flex: 1; }
.user-panel { min-height: 53px; display: flex; align-items: center; gap: 9px; padding: 6px 9px; background: #232428; }
.self-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; object-fit: cover; background: #404249; }
.self-details { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.self-details > span:first-child { max-width: 160px; overflow: hidden; color: #f2f3f5; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.self-status { display: flex; align-items: center; gap: 5px; color: #b5bac1; font-size: 10px; }
.self-status i { width: 7px; height: 7px; border-radius: 50%; background: #23a55a; }
.chat { min-width: 0; flex: 1; display: flex; flex-direction: column; background: var(--chat); }
.topbar { height: 49px; flex: 0 0 49px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid #26272c; box-shadow: 0 1px 2px #0002; }
.channel-name { display: flex; align-items: center; gap: 9px; }
.channel-name h1 { margin: 0; color: #f2f3f5; font-size: 15px; font-weight: 700; }
.channel-name .hash { font-size: 23px; }
.header-rule { width: 1px; height: 24px; background: #41434a; }
.channel-subtitle { overflow: hidden; color: #b5bac1; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.connection-wrap { display: flex; align-items: center; gap: 6px; margin-left: auto; color: #b5bac1; font-size: 11px; text-transform: lowercase; }
.signal { width: 7px; height: 7px; border-radius: 50%; background: #ed4245; }
.signal.online { background: #23a55a; }
.messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 20px 0 10px; scrollbar-color: #1a1b1e transparent; scrollbar-width: thin; }
.message { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; padding: 4px 16px; }
.message:hover { background: #2e3035; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #404249; }
.message-body { min-width: 0; }
.message-lines { display: flex; flex-direction: column; gap: 2px; }
.message-meta { display: flex; align-items: baseline; gap: 8px; margin: 0 0 2px; }
.username { color: #f2f3f5; font-size: 15px; font-weight: 500; cursor: default; }
.message:hover .username { text-decoration: underline; }
.time { color: #949ba4; font-size: 11px; font-weight: 400; }
.message-text { margin: 0; color: #dbdee1; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { margin: auto 16px 0; padding-bottom: 18px; color: #949ba4; font-size: 14px; }
.composer { min-height: 44px; display: flex; align-items: center; gap: 12px; margin: 0 16px 24px; padding: 0 12px; border-radius: 8px; background: #383a40; }
.composer:focus-within { background: #3b3d44; }
.composer input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: #f2f3f5; font-size: 14px; }
.composer input::placeholder { color: #6d7078; }
.attach, .send-button { width: 25px; height: 30px; flex: 0 0 25px; padding: 0; border: 0; background: transparent; color: #b5bac1; font-size: 24px; line-height: 1; }
.attach { color: #b5bac1; font-size: 25px; }
.send-button { width: 30px; flex-basis: 30px; border-radius: 5px; color: #dbdee1; font-size: 22px; cursor: pointer; }
.send-button:hover:not(:disabled) { background: var(--accent); color: white; }
.send-button:disabled { color: #6d7078; cursor: default; }
.notice { margin: -16px 16px 12px; color: #faa61a; font-size: 12px; }
.notice[hidden] { display: none; }
@media (max-width: 700px) {
  .server-rail { width: 58px; flex-basis: 58px; }
  .channel-sidebar { width: 190px; flex-basis: 190px; }
  .channel-subtitle, .header-rule { display: none; }
}
@media (max-width: 520px) {
  .server-rail { display: none; }
  .channel-sidebar { width: 64px; flex-basis: 64px; }
  .server-header { justify-content: center; padding: 0 4px; overflow: hidden; font-size: 0; }
  .server-header > span:first-child { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: white; font-size: 17px; }
  .chevron, .channel-category, .self-details { display: none; }
  .channel-item { justify-content: center; margin: 0 8px; padding: 0; font-size: 0; }
  .channel-item .hash { color: #f2f3f5; font-size: 24px; }
  .user-panel { justify-content: center; padding: 7px 0; }
  .topbar { padding: 0 12px; }
  .messages { padding-top: 14px; }
  .message { grid-template-columns: 36px minmax(0, 1fr); gap: 11px; padding-right: 12px; padding-left: 12px; }
  .avatar { width: 36px; height: 36px; }
  .composer { margin: 0 10px 12px; }
}
.members-sidebar { width: 232px; flex: 0 0 232px; overflow-y: auto; padding: 21px 8px 16px; background: var(--chat); scrollbar-color: #1a1b1e transparent; scrollbar-width: thin; }
.members-heading { margin: 0 8px 9px; color: #949ba4; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.member-list { display: flex; flex-direction: column; gap: 1px; }
.member-row { min-width: 0; min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 4px 7px; border-radius: 4px; }
.member-row:hover { background: #393b42; }
.member-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; object-fit: cover; background: #404249; }
.member-name { flex: 1; min-width: 0; overflow: hidden; color: #b5bac1; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 2px 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 8px; font-weight: 800; line-height: 1.2; letter-spacing: .04em; vertical-align: middle; }
.message-meta .role-badge { margin-left: 1px; transform: translateY(-1px); }
.self-role { margin-left: auto; }
.grant-admin { flex: 0 0 auto; padding: 4px 5px; border: 0; border-radius: 4px; background: #404249; color: #dbdee1; font-size: 9px; cursor: pointer; }
.grant-admin:hover:not(:disabled) { background: var(--accent); color: white; }
.grant-admin:disabled { color: #949ba4; cursor: default; }
.members-toggle { display: none; flex: 0 0 auto; padding: 5px 8px; border: 1px solid #4b4d55; border-radius: 5px; background: transparent; color: #c4c7cd; font-size: 11px; cursor: pointer; }
.members-toggle:hover { background: #404249; color: #fff; }
.ping-toggle { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #4b4d55; border-radius: 5px; background: transparent; color: #c4c7cd; font-size: 11px; cursor: pointer; }
.ping-toggle:hover:not(:disabled) { background: #404249; color: #fff; }
.ping-toggle.enabled { border-color: #3ba55d; color: #57d17d; }
.ping-toggle:disabled { opacity: .55; cursor: default; }
.composer-wrap { position: relative; margin: 0 16px 24px; }
.composer-wrap .composer { margin: 0; }
.mention-suggestions { position: absolute; z-index: 5; right: 0; bottom: calc(100% + 8px); left: 0; max-width: 360px; overflow: hidden; padding: 6px; border: 1px solid #202125; border-radius: 8px; background: #232428; box-shadow: 0 8px 24px #0005; }
.mention-suggestions[hidden] { display: none; }
.mention-option { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 9px; padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: #dbdee1; text-align: left; cursor: pointer; }
.mention-option.selected, .mention-option:hover { background: #404249; }
.mention-option img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.mention-option > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mention { padding: 0 2px; border-radius: 3px; background: #5865f255; color: #c9cdfb; }
@media (max-width: 900px) {
  .members-sidebar { display: none; }
  .members-sidebar.open { position: absolute; z-index: 8; top: 49px; right: 0; bottom: 0; width: min(232px, calc(100vw - 64px)); display: block; box-shadow: -8px 0 24px #0004; }
  .members-toggle { display: block; }
}
@media (max-width: 520px) { .composer-wrap { margin: 0 10px 12px; } .ping-toggle { padding: 5px 6px; font-size: 10px; } .connection-wrap { gap: 4px; font-size: 10px; } .connection { display: none; } .members-toggle { padding: 5px 6px; font-size: 10px; } .topbar { gap: 7px; } .channel-name { gap: 5px; } .channel-name h1 { font-size: 14px; } }
.chat[hidden], .directory-view[hidden], .dm-view[hidden] { display: none; }
.server-list { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.server-rail { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3b3d44 transparent; }
.dm-rail-home { position: relative; width: 48px; height: 48px; flex: 0 0 48px; border: 0; border-radius: 16px; background: #313338; color: #b5bac1; font-size: 23px; cursor: pointer; transition: border-radius .15s, background .15s, color .15s; }
.dm-rail-home:hover, .dm-rail-home.selected { border-radius: 15px; background: #5865f2; color: #fff; }
.rail-unread { position: absolute; top: -5px; right: -7px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--rail); border-radius: 10px; background: #ed4245; color: #fff; font-size: 9px; font-weight: 800; line-height: 1; }
.rail-unread[hidden] { display: none; }
.dm-rail-list { width: 100%; max-height: min(32vh, 260px); display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 9px; overflow-y: auto; padding: 3px 0; scrollbar-width: none; }
.dm-rail-person { position: relative; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.dm-rail-person img { width: 44px; height: 44px; display: block; border-radius: 50%; object-fit: cover; transition: border-radius .15s; }
.dm-rail-person:hover img, .dm-rail-person.active img { border-radius: 15px; }
.dm-rail-person.active::before { content: ""; position: absolute; z-index: 1; top: 4px; bottom: 4px; left: -12px; width: 4px; border-radius: 0 4px 4px 0; background: white; }
.rail-person-badge { position: absolute; right: -7px; bottom: -4px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--rail); border-radius: 10px; background: #ed4245; color: #fff; font-size: 9px; font-weight: 800; line-height: 1; }
.dm-rail-divider { flex: 0 0 2px; margin: 1px 0; }
.dm-sidebar { min-height: 0; overflow-y: auto; }
.dm-sidebar[hidden] { display: none; }
.dm-sidebar-heading { margin-top: 14px; }
.dm-sidebar-list { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.dm-sidebar-item { width: 100%; min-width: 0; min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: #b5bac1; text-align: left; cursor: pointer; }
.dm-sidebar-item:hover, .dm-sidebar-item.active { background: #404249; color: #fff; }
.dm-sidebar-item img { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; object-fit: cover; }
.dm-sidebar-item > span:nth-child(2) { min-width: 0; flex: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.server-add, .server-discover { width: 48px; height: 48px; flex: 0 0 48px; border: 0; border-radius: 16px; background: #313338; color: #23a55a; font-size: 28px; cursor: pointer; transition: border-radius .15s, background .15s, color .15s; }
.server-add:hover, .server-discover:hover { border-radius: 14px; background: #23a55a; color: #fff; }
.server-discover { color: #b5bac1; font-size: 26px; }
.server-icon { cursor: pointer; }
.server-icon:hover, .server-icon.selected { border-radius: 16px; }
.side-nav { display: grid; gap: 4px; padding: 12px 8px 6px; border-bottom: 1px solid #232428; }
.side-nav button { min-height: 34px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: #b5bac1; text-align: left; font-size: 13px; cursor: pointer; }
.side-nav button:hover, .side-nav button.active { background: #404249; color: #fff; }
.directory-view, .dm-view { min-width: 0; flex: 1; overflow-y: auto; padding: clamp(22px, 5vw, 54px); background: #313338; }
.directory-header { max-width: 1000px; display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 auto 28px; }
.directory-kicker { margin: 0 0 8px; color: #949ba4; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.directory-header h1 { margin: 0; font-size: clamp(24px, 4vw, 36px); letter-spacing: -.04em; }
.create-server-button { min-height: 40px; padding: 0 15px; border: 0; border-radius: 6px; background: #23a55a; color: white; font-size: 13px; font-weight: 700; cursor: pointer; }
.create-server-button:hover { background: #1a8d4b; }
.server-grid { max-width: 1000px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: auto; }
.server-card { min-height: 106px; display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid #44464d; border-radius: 9px; background: #2b2d31; }
.server-card-mark { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, #5865f2, #7983ff); color: #fff; font-size: 21px; font-weight: 800; }
.server-card-detail { min-width: 0; flex: 1; }
.server-card-detail h2 { overflow: hidden; margin: 0 0 6px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.server-card-detail p { overflow: hidden; margin: 0 0 6px; color: #949ba4; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.server-creator { width: fit-content; display: flex; align-items: center; gap: 5px; color: #b5bac1; font-size: 10px; text-decoration: none; }
.server-creator:hover, .member-profile-name:hover { color: #fff; text-decoration: underline; }
.server-creator img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.member-profile { flex: 0 0 auto; display: flex; }
.member-profile-name { color: #b5bac1; text-decoration: none; }
.server-card-action { min-width: 56px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 5px; background: #404249; color: #e3e5e8; font-size: 12px; font-weight: 700; cursor: pointer; }
.server-card-action:hover { background: #5865f2; color: #fff; }
.directory-empty { grid-column: 1 / -1; margin: 25px 0; color: #949ba4; font-size: 14px; }
.dm-inbox { max-width: 760px; margin: auto; }
.side-nav #dm-nav { display: none; align-items: center; justify-content: space-between; gap: 8px; }
.tab-badge { min-width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border-radius: 10px; background: #ed4245; color: white; font-size: 10px; font-weight: 800; line-height: 1; }
.tab-badge[hidden] { display: none; }
.conversation-badge { align-self: center; flex: 0 0 auto; margin-left: auto; }
.friends-view { min-width: 0; flex: 1; overflow-y: auto; padding: clamp(22px, 5vw, 54px); background: #313338; }
.friend-search-wrap { max-width: 1000px; display: grid; gap: 8px; margin: 0 auto 20px; color: #b5bac1; font-size: 12px; font-weight: 700; }
.friend-search-wrap input { height: 42px; padding: 0 12px; border: 1px solid #202125; border-radius: 6px; outline: 0; background: #232428; color: #f2f3f5; font-size: 14px; }
.friend-search-wrap input:focus { border-color: #5865f2; }
.friend-columns { max-width: 1000px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); align-items: start; gap: 14px; margin: auto; }
.friend-section { min-width: 0; overflow: hidden; padding: 14px; border: 1px solid #41434a; border-radius: 8px; background: #2b2d31; }
.friend-section h2 { margin: 0 0 10px; color: #949ba4; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.friend-row { min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid #3b3d44; }
.friend-profile { flex: 0 0 auto; display: flex; }
.friend-profile img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.friend-name { min-width: 0; flex: 1; overflow: hidden; color: #dbdee1; font-size: 12px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.friend-name:hover { color: white; text-decoration: underline; }
.friend-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.friend-action { min-height: 29px; padding: 0 8px; border: 0; border-radius: 4px; background: #404249; color: #dbdee1; font-size: 10px; font-weight: 700; cursor: pointer; }
.friend-action:hover:not(:disabled) { background: #5865f2; color: white; }
.friend-action.primary { background: #3ba55d; color: white; }
.friend-action.primary:hover:not(:disabled) { background: #2d8d4e; }
.friend-action:disabled { opacity: .55; cursor: default; }
.friend-pending, .friend-empty { color: #949ba4; font-size: 11px; }
.friend-empty { margin: 10px 0; line-height: 1.4; }
.dm-inbox-row { width: 100%; min-height: 68px; display: flex; align-items: center; gap: 13px; padding: 10px 13px; border: 0; border-bottom: 1px solid #41434a; background: transparent; color: #f2f3f5; text-align: left; cursor: pointer; }
.dm-inbox-row:hover { background: #393b42; }
.dm-inbox-row img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.dm-inbox-detail { min-width: 0; display: grid; gap: 5px; }
.dm-inbox-detail strong { font-size: 14px; }
.dm-inbox-detail span { overflow: hidden; color: #949ba4; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.member-message { display: none; flex: 0 0 auto; padding: 5px 7px; border: 0; border-radius: 4px; background: #404249; color: #c9cdfb; font-size: 10px; cursor: pointer; }
.member-row:hover .member-message { display: block; }
@media (max-width: 900px) { .member-message { display: block; } }
.back-to-inbox { padding: 5px 8px; border: 1px solid #4b4d55; border-radius: 5px; background: transparent; color: #c4c7cd; font-size: 11px; cursor: pointer; }
.back-to-inbox:hover { background: #404249; color: #fff; }
.notice { position: fixed; z-index: 20; left: 50%; bottom: 16px; max-width: calc(100vw - 28px); transform: translateX(-50%); margin: 0; padding: 10px 14px; border: 1px solid #795516; border-radius: 7px; background: #27231b; color: #f0c36b; line-height: 1.35; box-shadow: 0 8px 24px #0005; }
.friends-view[hidden] { display: none; }
.typing-indicator { min-width: 0; overflow: hidden; color: #b5bac1; font-size: 11px; font-style: italic; text-overflow: ellipsis; white-space: nowrap; }
.typing-indicator { width: fit-content; max-width: 100%; min-height: 20px; margin: 0 16px 4px; padding: 3px 2px; }
.typing-indicator::after { content: "..."; display: inline-block; width: 0; overflow: hidden; vertical-align: bottom; animation: typing-dots 1s steps(4, end) infinite; }
@keyframes typing-dots { to { width: 1.3em; } }
.attachment-preview { min-height: 36px; display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 5px 10px; border-radius: 6px; background: #27282d; color: #dbdee1; font-size: 12px; }
.attachment-preview[hidden] { display: none; }
.attachment-preview span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-preview button { width: 26px; height: 26px; border: 0; border-radius: 4px; background: transparent; color: #949ba4; font-size: 18px; cursor: pointer; }
.attachment-preview button:hover { background: #404249; color: white; }
.attach { cursor: pointer; }
.attach:disabled { opacity: .5; cursor: wait; }
.message-attachment { max-width: min(100%, 560px); margin-top: 8px; }
.message-attachment img { max-width: 100%; max-height: 420px; display: block; border-radius: 8px; object-fit: contain; background: #232428; }
.message-attachment video { width: min(100%, 560px); max-height: 420px; display: block; border-radius: 8px; background: #111; }
.message-attachment audio { width: min(100%, 420px); max-width: 100%; display: block; }
@media (max-width: 520px) { .typing-indicator { margin-right: 10px; margin-left: 10px; } .message-attachment video { max-height: 300px; } }
.reply-preview { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 0 0 6px; padding: 0 10px; border-left: 3px solid #5865f2; border-radius: 4px; background: #27282d; color: #c6c8ce; font-size: 11px; }
.reply-preview[hidden] { display: none; }
.reply-preview span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-preview button { width: 24px; height: 24px; border: 0; border-radius: 4px; background: transparent; color: #949ba4; font-size: 18px; cursor: pointer; }
.reply-preview button:hover { background: #404249; color: #fff; }
.message { position: relative; }
.message-actions { position: absolute; top: -8px; right: 14px; z-index: 2; display: flex; padding: 3px; border: 1px solid #202125; border-radius: 6px; background: #232428; opacity: 0; pointer-events: none; transition: opacity .12s; }
.message:hover .message-actions, .message:focus-within .message-actions { opacity: 1; pointer-events: auto; }
.message-reply { padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: #dbdee1; font-size: 11px; cursor: pointer; }
.message-reply:hover { background: #404249; }
.reply-reference { display: block; max-width: min(100%, 560px); overflow: hidden; margin: 0 0 5px; padding: 0; border: 0; border-left: 2px solid #6d71d8; background: transparent; color: #b5bac1; font-size: 11px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.reply-reference:hover { color: #fff; }
.message.reply-target { background: #5865f233; }
.mention { border-radius: 3px; background: #5865f255; color: #c9cdfb; }
@media (max-width: 900px) { .message-actions { opacity: 1; pointer-events: auto; } }
@media (max-width: 520px) { .friends-view { padding: 22px 15px; } .friend-row { gap: 6px; } .friend-action { padding: 0 6px; font-size: 9px; } .side-nav #dm-nav { display: flex; } }
[hidden] { display: none !important; }
@media (max-width: 520px) { .channel-sidebar { width: 180px; flex-basis: 180px; } .channel-item .channel-label { display: inline; } .channel-item { justify-content: flex-start; font-size: 14px; } .channel-item .hash { font-size: 21px; } .channel-category { justify-content: space-between; margin: 14px 10px 6px 12px; } .channel-category > span:first-child { display: inline; font-size: 9px; } .channel-actions { flex-direction: row; } .server-header { justify-content: flex-start; padding: 0 12px; font-size: 13px; } .server-header > span:first-child { width: auto; height: auto; background: none; font-size: 13px; } #server-name::before { content: none; } .self-details { display: flex; } .directory-view, .dm-view { padding: 22px 15px; } .directory-header { align-items: start; flex-direction: column; } .create-server-button { width: 100%; } }
.channel-item { width: calc(100% - 16px); border: 0; background: transparent; text-align: left; cursor: pointer; }
.channel-category button { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #b5bac1; font-size: 18px; line-height: 1; cursor: pointer; }
.channel-category button:hover { background: #404249; color: #fff; }
.channel-actions { display: flex; align-items: center; gap: 4px; }
.server-header { min-width: 0; }
#server-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .channel-category { display: flex; justify-content: center; margin: 12px 0 6px; }
  .channel-category > span:first-child { display: none; }
  .channel-actions { flex-direction: column; }
  .channel-item .channel-label { display: none; }
  .server-header > span:first-child { overflow: hidden; font-size: 0; }
  #server-name::before { content: "W"; color: white; font-size: 17px; }
}
.channel-category button[hidden] { display: none; }
.admin-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid #454750; border-radius: 12px; background: #2b2d31; color: #f2f3f5; box-shadow: 0 20px 60px #0008; }
.admin-dialog::backdrop { background: #111216bb; backdrop-filter: blur(2px); }
.dialog-form { display: flex; flex-direction: column; padding: 24px; }
.dialog-eyebrow { color: #949ba4; font-size: 10px; font-weight: 700; letter-spacing: .09em; }
.dialog-form h2 { margin: 8px 0 20px; font-size: 20px; }
.dialog-form label { margin-bottom: 7px; color: #b5bac1; font-size: 12px; font-weight: 600; }
.dialog-form input { height: 42px; padding: 0 11px; border: 1px solid #1e1f22; border-radius: 5px; outline: 0; background: #1e1f22; color: #f2f3f5; font-size: 14px; }
.dialog-form input:focus { border-color: var(--accent); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.dialog-actions button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 5px; background: transparent; color: #dbdee1; font-size: 13px; font-weight: 600; cursor: pointer; }
.dialog-actions button:hover { text-decoration: underline; }
.dialog-actions .dialog-submit { background: var(--accent); color: white; }
.dialog-actions .dialog-submit:hover { background: #4752c4; text-decoration: none; }

/* Local profile setup */
.profile-dialog { width: min(440px, calc(100vw - 28px)); max-height: calc(100svh - 28px); overflow-y: auto; padding: 0; border: 1px solid #454750; border-radius: 16px; background: #2b2d31; color: #f2f3f5; box-shadow: 0 24px 80px #0009; }
.profile-dialog::backdrop { background: #111216dd; backdrop-filter: blur(7px); }
.profile-form { display: flex; flex-direction: column; padding: 30px; }
.profile-brand { color: #aeb5ff; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.profile-form h1 { margin: 10px 0 7px; font-size: 26px; letter-spacing: -.03em; }
.profile-intro { margin: 0 0 20px; color: #b5bac1; font-size: 13px; line-height: 1.5; }
.profile-preview-wrap { display: flex; align-items: center; flex-direction: column; gap: 10px; margin: 4px 0 22px; }
.profile-preview { width: 92px; height: 92px; border: 3px solid #454750; border-radius: 50%; object-fit: cover; background: #404249; }
.avatar-picker { padding: 7px 11px; border: 1px solid #4b4d55; border-radius: 6px; color: #dbdee1; font-size: 12px; cursor: pointer; }
.avatar-picker:hover { background: #404249; }
.profile-form > label:not(.avatar-picker) { margin-bottom: 7px; color: #dbdee1; font-size: 12px; font-weight: 700; }
.profile-form > input { height: 44px; padding: 0 12px; border: 1px solid #1e1f22; border-radius: 7px; outline: 0; background: #1e1f22; color: #f2f3f5; font-size: 14px; }
.profile-form > input:focus { border-color: #5865f2; }
.profile-hint, .profile-local-note { color: #949ba4; font-size: 11px; line-height: 1.5; }
.profile-hint { margin: 7px 0 16px; }
.profile-local-note { margin: 14px 0 0; text-align: center; }
.profile-error { margin: 0 0 12px; color: #ff8a8a; font-size: 12px; }
.profile-submit { min-height: 44px; border: 0; border-radius: 7px; background: #5865f2; color: white; font-size: 14px; font-weight: 700; cursor: pointer; }
.profile-submit:hover { background: #4752c4; }
#current-user-avatar { cursor: default; }
.profile-edit { margin-left: auto; padding: 4px 6px; border: 1px solid #41434a; border-radius: 4px; background: transparent; color: #b5bac1; font-size: 10px; cursor: pointer; }
.profile-edit:hover { background: #404249; color: white; }
@media (max-width: 520px) { .profile-form { padding: 24px; } .profile-form h1 { font-size: 23px; } }
