:root {
  --bg: #272930;
  --panel: #202228;
  --panel-dark: #191b20;
  --line: #35373f;
  --muted: #9499a5;
  --accent: #bfa67f;
  --red: #df858b;
  background: #191b20;
  color: #dfe1e7;
  color-scheme: dark;
}
body { background: #191b20; }
button, input, textarea, select { font: inherit; }
button { transition: background-color .15s, color .15s, border-color .15s; }
button:focus-visible, a:focus-visible { outline: 2px solid #c5af8b; outline-offset: 3px; }
.titlebar { background: #191b20; color: #a0a4af; font-weight: 600; }
.titlebar .build { opacity: .6; font-size: 9px; letter-spacing: .08em; }
.rail { background: #191b20; padding-top: 12px; gap: 11px; }
.rail-divider { background: #34363e; width: 26px; }
.server-button { background: #2b2d35; color: #b8bdc9; border-radius: 17px; box-shadow: none; }
.server-button:hover { background: #42444e; color: #f1f2f5; border-radius: 15px; }
.server-button.selected { background: #b9a282; color: #242321; border-radius: 15px; }
.server-button.utility { background: #25292b; color: #9abca9; }
.server-button.utility:hover { background: #32413a; color: #d3e9dc; }
.sidebar { background: #202228; border: 1px solid #2c2f36; border-radius: 15px; margin: 0 8px 8px 0; overflow: hidden; }
.main { background: #272930; border: 1px solid #34363e; border-radius: 15px; margin: 0 8px 8px 0; overflow: hidden; }
.topbar { height: 56px; background: #272930; border-color: #35373f; box-shadow: 0 1px 0 #35373f; padding-inline: 20px; }
.topbar h1 { font-size: 15px; font-weight: 650; }
.topbar .topic { color: #8f95a2; font-size: 12px; }
.topbar .divider { background: #3b3d46; }
.icon-btn { border-radius: 9px; color: #a7acb8; }
.icon-btn:hover { background: #3a3d47; color: #f1f2f5; }
.icon-btn.danger:hover { background: #513036; color: #f0a4aa; }
.search-box { background: #1d1f25; border: 1px solid #333640; border-radius: 9px; }
.nav-item { border-radius: 8px; margin: 3px 0; color: #a3a8b4; }
.nav-item:hover { background: #2d3039; color: #e2e4e9; }
.nav-item.selected, .nav-item.active { background: #383b45; color: #f0f1f4; }
.category { color: #858b98; letter-spacing: .045em; font-size: 10px; }
.user-panel { background: #1b1d23; border-color: #30323a; padding: 10px; }
.voice-panel { background: #232a28; border-color: #34443b; }
.voice-title { color: #90c5a8; }
.members { background: #22242b; border-left: 1px solid #32353d; padding-top: 24px; }
.community-card { background: #292c34; border: 1px solid #383b44; border-radius: 12px; box-shadow: none; }
.member-footer { opacity: .7; }
.conversation { background: #272930; }
.message-scroll { padding: 24px 24px 12px; scrollbar-color: #444853 transparent; }
.message { border-radius: 8px; margin: 2px -10px; padding: 9px 10px; gap: 13px; }
.message:hover { background: #2e313a; }
.message-head strong { color: #e3e5ec; font-size: 14px; font-weight: 600; }
.message-head time { color: #818895; font-size: 10px; }
.message-content { color: #cdd1dc; line-height: 1.65; }
.message-content a { color: #92b6de; }
.message-tools { background: #24262e; border: 1px solid #414550; border-radius: 10px; box-shadow: 0 4px 12px #0003; padding: 3px; }
.date-divider { color: #858d9b; font-size: 10px; }
.date-divider:before, .date-divider:after { background: #353841; }
.composer-area { position: relative; padding: 12px 20px 10px; }
.composer { background: #32353f; border: 1px solid #414550; border-radius: 13px; padding: 10px 12px; box-shadow: 0 3px 12px #0000000d; }
.composer:focus-within { border-color: #656978; }
.composer textarea { color: #e0e3eb; font-size: 14px; }
.composer textarea::placeholder { color: #8d94a3; }
.composer-hint { color: #747d8e; font-size: 9px; padding-top: 8px; }
.composer .send { color: #c8b395; }
.composer .send:hover { background: #4b4439; }
.btn { border-radius: 9px; background: #bba486; color: #222326; font-weight: 600; box-shadow: none; }
.btn:hover { background: #ceb99d; transform: none; }
.btn.secondary { background: #3c404b; color: #dbe0eb; }
.btn.secondary:hover { background: #4a505d; }
.btn.danger { background: #a94e59; color: #fff; }
.btn.danger:hover { background: #bd5b68; }
.modal-backdrop { background: #0c0d11b8; backdrop-filter: blur(6px); }
.modal { background: #282b33; border: 1px solid #424651; border-radius: 18px; box-shadow: 0 24px 90px #0007; }
.modal h2 { font-size: 22px; letter-spacing: -.4px; }
.field input, .field textarea, .field select { background: #1e2027; border: 1px solid #393d48; border-radius: 9px; padding: 12px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #b49d7e; box-shadow: 0 0 0 2px #b49d7e12; }
.context-menu { background: #202229; border: 1px solid #41444f; border-radius: 13px; padding: 7px; box-shadow: 0 12px 40px #0006; }
.context-item { border-radius: 7px; }
.context-item:hover { background: #3b404c; }
.context-item.danger:hover { background: #532f36; color: #f2a7b0; }
.quick-reactions button, .emoji-grid button { border-radius: 9px; }
.reaction { border-radius: 7px; }
.main-page { background: #272930; padding: 30px; }
.tabs { border-color: #383c46; gap: 6px; }
.tab { border-radius: 8px; }
.tab.active { background: #3a3e49; }
.friend-row { border-color: #373b45; border-radius: 10px; padding: 13px 10px; }
.friend-row:hover { background: #2e323c; }
.discover-card { background: #252831; border: 1px solid #3b3f4b; border-radius: 15px; box-shadow: none; }
.discover-art { background: #353a47; }
.call-stage { background: #1c1e24; border-radius: 12px; margin: 10px; }
.call-tile { border-radius: 13px; overflow: hidden; border: 1px solid #41444c; }
.voice-chat { background: #272930; border-color: #353841; }
.call-controls .icon-btn { border-radius: 13px; }
.auth-page { background: radial-gradient(ellipse at 23% 43%,#75694e12,transparent 55%),#191b21; }
.auth-card { background: #252831; border: 1px solid #3b404c; border-radius: 19px; box-shadow: 0 24px 80px #0004; }
.toaster { background: #2d313b; border-color: #505664; border-radius: 11px; box-shadow: 0 10px 30px #0004; }
.server-settings-tabs button { border-radius: 8px; }
.server-banner-preview, .profile-card, .server-icon-preview { border-radius: 12px; }
.server-delete-link { color: #df929c; padding: 12px 8px; border-radius: 8px; text-align: center; }
.server-delete-link:hover { color: #ffbec6; background: #482c33; }
.delete-server-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.message.message-emphasis { background: #c5a34c0a; border-left: 2px solid #b39550; padding-left: 8px; }
.message.message-emphasis:hover { background: #c5a34c12; }
.message.message-attention { background: #d5ad4c16; border-left-color: #e0bc66; }
.message.message-attention:hover { background: #d5ad4c20; }
.message-content .mention { display: inline; color: #e7c77e; background: #c5a34c21; border-radius: 5px; padding: 1px 4px; font-weight: 550; line-height: inherit; cursor: pointer; }
.message-content .mention:hover { background: #c5a34c3a; color: #ffe4a6; }
.message-reply { display: flex; align-items: center; gap: 7px; max-width: 100%; color: #bba269; font-size: 11px; line-height: 1.6; margin: 0 0 5px; text-align: left; }
.message-reply svg { width: 14px; height: 14px; flex-shrink: 0; }
.message-reply strong { color: #d6bb7f; font-size: 11px; white-space: nowrap; }
.message-reply span { color: #a9a390; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 440px; }
.message-reply:hover:not(:disabled) span { color: #e3d1a9; }
.message-reply:disabled { opacity: .65; cursor: default; }
.reply-preview { display: flex; align-items: center; gap: 10px; background: #343127; color: #d7bb7c; border: 1px solid #655737; border-bottom: 0; border-radius: 11px 11px 0 0; padding: 9px 12px; }
.reply-preview>svg { width: 17px; height: 17px; flex-shrink: 0; }
.reply-preview>div { min-width: 0; flex: 1; }
.reply-preview strong { display: block; font-size: 11px; font-weight: 600; }
.reply-preview span { display: block; font-size: 10px; color: #aea68f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-preview .icon-btn { flex-shrink: 0; }
.composer-area:has(.reply-preview) .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.mention-picker { position: absolute; bottom: calc(100% - 5px); left: 20px; right: 20px; background: #23262e; border: 1px solid #484d5a; border-radius: 13px; box-shadow: 0 -8px 35px #0005; z-index: 20; padding: 7px; max-height: min(380px,50dvh); overflow-y: auto; }
.mention-picker-heading { color: #a3aab8; text-transform: uppercase; letter-spacing: .07em; font-size: 9px; font-weight: 650; padding: 8px 10px; }
.mention-picker [role=option] { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: #ccd2de; }
.mention-picker [role=option]:hover { background: #343944; }
.mention-picker [aria-selected=true] { background: #414039; color: #f0dfbd; }
.mention-picker [role=option]>span:last-child { min-width: 0; display: flex; align-items: center; flex: 1; justify-content: space-between; gap: 15px; }
.mention-picker strong { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mention-picker small { color: #929aa9; font-size: 10px; }
.mention-picker-footer { padding: 8px 10px 3px; color: #7d879a; font-size: 9px; }
.history-banner { position: sticky; top: 0; z-index: 3; background: #373329; border: 1px solid #635537; border-radius: 9px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: #d7bf88; }
.history-banner button { color: #e7ce98; font-weight: 600; }
.message.message-highlight { background: #d1ab542a!important; outline-color: #bda06588; }
@media(max-width:1000px) {
  .members { width: 185px; }
  .message-scroll { padding: 20px 18px 10px; }
}
@media(max-width:720px) {
  .main { margin: 0 5px 5px 0; border-radius: 12px; }
  .sidebar { margin: 0; border-radius: 0 13px 13px 0; }
  .topbar { height: 52px; padding-inline: 10px; }
  .message-scroll { padding: 18px 14px 10px; }
  .composer-area { padding: 10px 10px 8px; }
  .composer { padding: 9px; border-radius: 11px; }
  .composer-hint>span:last-child { display: none; }
  .mention-picker { left: 10px; right: 10px; }
  .mention-picker [role=option]>span:last-child { align-items: flex-start; flex-direction: column; gap: 2px; }
  .message-reply span { max-width: 180px; }
  .main-page { padding: 22px 16px; }
  .modal { border-radius: 15px; }
  .call-stage { margin: 5px; border-radius: 10px; }
  .members.mobile-show { width: 215px; }
}
@media(prefers-reduced-motion:reduce) { button { transition: none; } }
