/* GT SERVERS - Discord layout, GT DM look (theme vars from css/vars.css). Served as /js/servers.css. */
body.srv-open { overflow: hidden; }
body.srv-open #superbody, body.srv-open footer { visibility: hidden; }

#srv-app {
  position: fixed; top: 50px; left: 0; right: 0; bottom: 0; z-index: 9000;
  display: flex; background: var(--bg-2, #fff); color: var(--highest-contrast-text-color, #222);
  font-family: Arial, sans-serif; font-size: 16px; line-height: 1.35;
}
#srv-app button { font-family: Arial, sans-serif; font-size: 16px; }
#srv-app *, .srv-ov * { box-sizing: border-box; }
.srv-faint { color: gray; opacity: .5; }
.srv-sub { color: var(--subtle-text-color, #8a8a8a); }

/* ---- server rail ---- */
.srv-rail { width: 72px; flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto; scrollbar-width: none; border-right: 1px solid var(--hl-faint-lines, #ddd); }
.srv-rail::-webkit-scrollbar { display: none; }
.srv-rail-item { position: relative; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; background: var(--hl-brighter, #f1f1f1) center/cover no-repeat; color: var(--highest-contrast-text-color); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; cursor: pointer; transition: border-radius .15s, background-color .15s; text-decoration: none; user-select: none; }
.srv-rail-item:hover, .srv-rail-item.active { border-radius: 16px; }
.srv-rail-item.active:not(.has-icon) { background-color: var(--theme-bg); color: #fff; }
.srv-rail-item::before { content: ''; position: absolute; left: -12px; top: 50%; width: 4px; height: 0; border-radius: 0 4px 4px 0; background: var(--highest-contrast-text-color); transform: translateY(-50%); transition: height .15s; }
.srv-rail-item.unread::before { height: 8px; }
.srv-rail-item:hover::before { height: 20px; }
.srv-rail-item.active::before { height: 40px; }
.srv-rail-badge { position: absolute; right: -6px; top: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #f23f43; color: #fff; font-size: 13px; line-height: 20px; text-align: center; border: 3px solid var(--bg-2, #fff); box-sizing: content-box; }
.srv-rail-sep { width: 32px; height: 2px; flex: 0 0 2px; border-radius: 1px; background: var(--hl-faint-lines, #ddd); }
.srv-rail-add { color: #23a55a; background: var(--hl-brighter); font-size: 26px; font-weight: 400; }
.srv-rail-add:hover { background: #23a55a; color: #fff; }
.srv-rail-item.dragover { outline: 2px dashed var(--theme-bg); outline-offset: 2px; }
.srv-rail-item svg { width: 24px; height: 24px; }

/* ---- channel sidebar ---- */
.srv-side { width: 240px; flex: 0 0 240px; display: flex; flex-direction: column; border-right: 1px solid var(--hl-faint-lines, #ddd); min-height: 0; }
.srv-side-head { height: 48px; flex: 0 0 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-weight: 700; cursor: pointer; border-bottom: 1px solid var(--hl-faint-lines, #ddd); user-select: none; }
.srv-side-head:hover { background: var(--hl, #f1f1f1); }
.srv-side-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-chans { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.srv-cat { display: flex; align-items: center; gap: 4px; margin: 16px 0 2px; padding: 0 2px; color: gray; font-size: 16px; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; user-select: none; }
.srv-cat:hover { color: var(--highest-contrast-text-color); }
.srv-cat .srv-caret { display: inline-block; transition: transform .15s; font-size: 12px; }
.srv-cat.collapsed .srv-caret { transform: rotate(-90deg); }
.srv-cat .srv-cat-add { margin-left: auto; opacity: 0; font-size: 20px; line-height: 1; padding: 0 4px; }
.srv-cat:hover .srv-cat-add { opacity: .7; }
.srv-chan { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin: 1px 0; border-radius: 6px; color: gray; cursor: pointer; text-decoration: none; }
.srv-chan:hover { background: var(--hl, #f1f1f1); color: var(--highest-contrast-text-color); }
.srv-chan.active { background: var(--hl-brighter, #eee); color: var(--highest-contrast-text-color); }
.srv-chan.unread { color: var(--highest-contrast-text-color); font-weight: 700; }
.srv-chan.unread::before { content: ''; position: absolute; left: -8px; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--highest-contrast-text-color); }
.srv-chan .srv-hash { opacity: .6; font-weight: 400; }
/* the channel hash (user 2026-11-20: Discord's hash icon next to channel names) */
.srv-hash { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.srv-hash svg { width: 20px; height: 20px; display: block; }
.srv-hash-lg { opacity: .55; }
.srv-hash-lg svg { width: 24px; height: 24px; }
/* DISCORD-LIKE TEXT (user 2026-11-20: "integrate the closest match to discord's font to our server message texts and channel names"):
   Discord's own font stack is "gg sans" (its private font), then Noto Sans - so Noto Sans (Google Fonts, loaded in new.html) is the
   closest open match, the same face Discord itself falls back to. */
#srv-side, #srv-main, #srv-app .srv-input { font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; }
#srv-main .srv-bubble { line-height: 1.375; }
.srv-chan .srv-chan-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-chan .srv-chan-gear { opacity: 0; font-size: 15px; padding: 0 2px; }
.srv-chan:hover .srv-chan-gear, .srv-chan.active .srv-chan-gear { opacity: .6; }
.srv-chan .srv-pill { background: #f23f43; color: #fff; border-radius: 10px; padding: 0 6px; font-size: 13px; line-height: 18px; font-weight: 700; }
.srv-me { height: 56px; flex: 0 0 56px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-top: 1px solid var(--hl-faint-lines, #ddd); }
.srv-me .srv-me-names { flex: 1; min-width: 0; line-height: 1.15; }
.srv-me .srv-me-names div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-iconbtn { background: transparent; border: 0; color: gray; cursor: pointer; padding: 6px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.srv-iconbtn:hover, .srv-iconbtn.on { color: var(--highest-contrast-text-color); background: var(--hl, #f1f1f1); }
.srv-iconbtn svg { width: 20px; height: 20px; }

/* ---- avatars ---- */
.srv-av { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11%; background: var(--hl-brighter) center/cover no-repeat; color: var(--highest-contrast-text-color); display: flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; position: relative; }
.srv-av.sm { width: 32px; height: 32px; flex-basis: 32px; font-size: 14px; }
.srv-av .srv-status { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--bg-2, #fff); background: #80848e; box-sizing: content-box; }
.srv-av .srv-status.on { background: #23a55a; }

/* ---- main chat column ---- */
.srv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.srv-main-head { height: 48px; flex: 0 0 48px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--hl-faint-lines, #ddd); min-width: 0; }
.srv-main-head .srv-title { font-weight: 700; white-space: nowrap; }
.srv-main-head .srv-topic { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--hl-faint-lines, #ddd); cursor: pointer; }
.srv-search { width: 180px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--hl-faint-lines, #ddd); background: var(--hl-brighter); color: var(--highest-contrast-text-color); font-size: 16px; transition: width .15s; }
.srv-search:focus { width: 260px; outline: none; border-color: var(--theme-bg); }
.srv-menu-btn { display: none; }
.srv-scroll { flex: 1; overflow-y: auto; padding: 16px 0 8px; min-height: 0; }
.srv-empty-chan { padding: 24px 16px; }
.srv-empty-chan .srv-big { width: 64px; height: 64px; border-radius: 50%; background: var(--hl-brighter); display: flex; align-items: center; justify-content: center; font-size: 34px; margin-bottom: 10px; }
.srv-empty-chan h2 { font-size: 26px; margin: 6px 0; }
.srv-loadmore { text-align: center; padding: 6px 0 12px; }

/* message rows: Discord grouping, DM bubbles */
.srv-msg { position: relative; display: flex; gap: 12px; padding: 4px 48px 2px 16px; align-items: flex-start; }
.srv-msg:not(.grouped) { margin-top: 12px; }
.srv-msg:hover { background: var(--hl, rgba(128,128,128,.06)); }
.srv-msg.mention { background: rgba(250,168,26,.10); box-shadow: inset 2px 0 0 #faa81a; }
.srv-msg.flash { animation: srv-flash 1.6s ease-out; }
@keyframes srv-flash { 0% { background: rgba(83,188,255,.35); } 100% { background: transparent; } }
.srv-msg .srv-hover-time { width: 40px; flex: 0 0 40px; text-align: right; font-size: 13px; color: gray; opacity: 0; padding-top: 12px; }
.srv-msg.grouped:hover .srv-hover-time { opacity: .6; }
.srv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.srv-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.srv-name { font-weight: 700; cursor: pointer; }
.srv-name:hover { text-decoration: underline; }
.srv-time { font-size: 16px; color: gray; opacity: .5; }
.srv-bubble {
  display: inline-block; max-width: 100%; padding: 10px 13px 10px 14px; border-radius: 14px; font-size: 17px; margin: 1px 0;
  background: var(--chat-recipient-bg-color, #ebeef0); color: var(--chat-text-color, #0f1419);
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
}
.srv-msg.mine .srv-bubble { background: var(--theme-bg); color: var(--chat-my-text-color, #fff); }
.srv-msg.mine .srv-bubble a { color: inherit; }
.srv-bubble .dm-yt-card { white-space: normal; }
.srv-edited { font-size: 13px; opacity: .6; margin-left: 6px; }
.srv-mention { background: rgba(83,188,255,.22); color: inherit; border-radius: 4px; padding: 0 2px; font-weight: 700; cursor: pointer; }
.srv-img { display: block; max-width: min(100%, 420px); height: auto; border-radius: 12px; margin: 4px 0; cursor: pointer; object-fit: contain; background: var(--hl-brighter); }
.srv-reply-quote { display: flex; gap: 6px; align-items: center; max-width: 100%; color: gray; cursor: pointer; margin: 0 0 3px; padding-left: 10px; border-left: 2px solid var(--hl-faint-lines); font-size: 16px; }
.srv-reply-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-sys { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 28px; color: gray; margin-top: 8px; }
.srv-sys b { color: var(--highest-contrast-text-color); }
.srv-sys .srv-sys-ic { color: #23a55a; font-size: 18px; }
.srv-new-div { display: flex; align-items: center; margin: 14px 16px 4px; color: #f23f43; font-size: 13px; font-weight: 700; }
.srv-new-div::before { content: ''; flex: 1; height: 1px; background: #f23f43; margin-right: 8px; }
#srv-app .dm-day-divider { margin: 18px 16px 6px; }

/* reactions */
/* REACTIONS, Discord's way (user 2026-11-20, with a screenshot: "remove that border, and make them softly integrate into the message space,
   verbatim like discord"): no outline at all, a small rounded tile one shade off the chat, 16 px emoji, a 14 px muted count.
   Your own reaction = the same tile tinted with the theme colour (still no outline). */
.srv-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.srv-reacts:empty { display: none; }
#srv-app .srv-react { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 2px 6px; border: 0 !important; outline: 0; box-shadow: none; border-radius: 8px;
  background: rgba(0,0,0,.05); cursor: pointer; font-size: 16px; line-height: 1; color: #4e5058; transition: background .12s; }
#srv-app .srv-react span { font: 600 14px/1 "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; min-width: 8px; text-align: center; }
#srv-app .srv-react:hover { background: rgba(0,0,0,.09); }
#srv-app .srv-react.me { background: color-mix(in srgb, var(--theme-bg) 16%, transparent); color: var(--theme-bg); }
#srv-app .srv-react.me:hover { background: color-mix(in srgb, var(--theme-bg) 24%, transparent); }
body.darkmode #srv-app .srv-react, body.dim #srv-app .srv-react { background: rgba(255,255,255,.06); color: #b5bac1; }
body.darkmode #srv-app .srv-react:hover, body.dim #srv-app .srv-react:hover { background: rgba(255,255,255,.1); }
body.darkmode #srv-app .srv-react.me, body.dim #srv-app .srv-react.me { background: color-mix(in srgb, var(--theme-bg) 18%, transparent); color: color-mix(in srgb, var(--theme-bg) 55%, #fff); }
.srv-react img { width: 16px; height: 16px; display: block; }
.srv-react.bump img { animation: dm-react-bump .42s ease-out; }

/* hover toolbar */
.srv-tools { position: absolute; right: 16px; top: -14px; display: none; gap: 2px; padding: 2px; border-radius: 8px; background: var(--bg-2, #fff); border: 1px solid var(--hl-faint-lines, #ddd); box-shadow: 0 2px 8px rgba(0,0,0,.08); z-index: 2; }
.srv-msg:hover .srv-tools, .srv-msg.tools-open .srv-tools { display: flex; }
.srv-tools button { background: transparent; border: 0; border-radius: 6px; padding: 4px 6px; cursor: pointer; color: gray; display: inline-flex; }
.srv-tools button:hover { background: var(--hl); color: var(--highest-contrast-text-color); }
.srv-tools button.danger:hover { color: #f23f43; }
.srv-tools svg { width: 18px; height: 18px; }
.srv-edit-box { width: 100%; }
.srv-edit-box textarea { width: 100%; min-height: 44px; }
.srv-edit-hint { font-size: 13px; color: gray; margin-top: 3px; }

/* composer: the DM send bar */
.srv-composer { padding: 0 16px 6px; flex: 0 0 auto; }
.srv-replying, .srv-pending { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px 10px 0 0; background: var(--hl-brighter); color: gray; }
.srv-replying b { color: var(--highest-contrast-text-color); }
.srv-replying .srv-x, .srv-pending .srv-x { margin-left: auto; }
.srv-pending img { height: 64px; border-radius: 8px; }
.srv-typebar { display: flex; align-items: flex-end; gap: 6px; }
.srv-attach { width: 30px; height: 30px; flex: 0 0 30px; margin: 0 2px 9px; background: var(--select-image-button); background-size: cover; cursor: pointer; opacity: .85; }
.srv-attach:hover { opacity: 1; }
.srv-input {
  flex: 1; min-height: 46px; max-height: 40vh; resize: none; padding: 12px 14px; border-radius: 14px; outline: none;
  background-color: var(--hl-brighter) !important; border: 1px solid var(--theme-bg) !important; color: var(--highest-contrast-text-color);
  font-family: Arial, sans-serif; font-size: 17px; line-height: 1.3;
}
.srv-input:focus { background: var(--bg-brighter, var(--bg-2)) !important; }
.srv-input:disabled { opacity: .6; border-color: var(--hl-faint-lines) !important; }
.srv-send { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; border: 0; background: var(--theme-bg); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.srv-send:disabled { opacity: .4; cursor: default; }
.srv-send svg { width: 20px; height: 20px; }
.srv-typing { min-height: 22px; padding: 3px 4px 0; font-size: 16px; color: gray; }
.srv-typing b { color: var(--highest-contrast-text-color); }
.srv-slow { font-size: 13px; color: gray; text-align: right; }

/* member list */
.srv-members { width: 240px; flex: 0 0 240px; overflow-y: auto; padding: 8px 8px 16px; border-left: 1px solid var(--hl-faint-lines, #ddd); }
#srv-app.hide-members .srv-members { display: none; }
.srv-mgroup { margin: 18px 6px 4px; color: gray; font-size: 16px; text-transform: uppercase; letter-spacing: .02em; }
.srv-mrow { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.srv-mrow:hover { background: var(--hl); }
.srv-mrow.off { opacity: .45; }
.srv-mrow .srv-mname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.srv-crown { color: #f0b232; font-size: 14px; margin-left: 4px; }

/* right-side panels (search results, pins) */
.srv-panel { width: 340px; flex: 0 0 340px; overflow-y: auto; border-left: 1px solid var(--hl-faint-lines, #ddd); padding: 12px 0; }
.srv-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px 16px; font-weight: 700; }
.srv-panel .srv-msg { padding-right: 12px; cursor: pointer; }
.srv-panel .srv-chip-chan { font-size: 13px; color: gray; margin: 10px 16px 0; }

/* empty / home / discover views */
.srv-home { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 60px 24px; text-align: center; }
.srv-home h1 { font-size: 26px; margin: 14px 0 8px; }
.srv-home .srv-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.srv-free { margin-top: 18px; color: gray; opacity: .7; }
.srv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; width: 100%; max-width: 980px; margin-top: 24px; text-align: left; }
.srv-card { border: 1px solid var(--hl-faint-lines); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.srv-card .srv-card-top { display: flex; gap: 12px; align-items: center; }
.srv-card .srv-card-ic { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 16px; background: var(--theme-bg) center/cover no-repeat; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* buttons + fields, GT modal style */
.srv-btn { padding: 10px 22px; border: 0; border-radius: 50px; background: var(--theme-bg, #53bcff); color: #fff; font-weight: 700; cursor: pointer; }
.srv-btn.ghost { background: transparent; color: var(--highest-contrast-text-color); border: 1px solid var(--hl-faint-lines); font-weight: 400; }
.srv-btn.danger { background: #da373c; }
.srv-btn.sm { padding: 6px 14px; }
.srv-btn:disabled { opacity: .5; cursor: default; }
.srv-field { display: block; width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--hl-faint-lines, #ccc); background: var(--hl-brighter); color: var(--highest-contrast-text-color); font-family: Arial, sans-serif; font-size: 16px; outline: none; }
.srv-field:focus { border-color: var(--theme-bg); }
textarea.srv-field { resize: vertical; min-height: 70px; }
.srv-label { display: block; margin: 16px 0 6px; font-weight: 700; }
.srv-hint { color: gray; opacity: .7; margin-top: 4px; }
.srv-row { display: flex; align-items: center; gap: 10px; }
.srv-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hl-faint-lines); cursor: pointer; }
.srv-toggle:last-child { border-bottom: 0; }
.srv-toggle .srv-tl { flex: 1; }
.srv-switch { position: relative; width: 40px; height: 24px; flex: 0 0 40px; border-radius: 12px; background: #80848e; transition: background .15s; }
.srv-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.srv-switch.on { background: #23a55a; }
.srv-switch.on::after { left: 19px; }
.srv-err { color: #e0622e; min-height: 20px; margin-top: 10px; }

/* overlays: the #reply-modal-overlay pattern */
.srv-ov { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99999; display: flex; align-items: flex-start; justify-content: center; padding: 70px 16px 16px; overflow-y: auto; font-family: Arial, sans-serif; font-size: 16px; color: var(--highest-contrast-text-color); }
.srv-modal { background: var(--bg, #fff); border-radius: 16px; width: 100%; max-width: 460px; padding: 24px; box-shadow: 0 8px 40px rgba(0,0,0,.18); position: relative; }
.srv-modal h2 { font-size: 22px; margin: 0 0 6px; }
.srv-modal .srv-close { position: absolute; top: 14px; right: 14px; }
.srv-modal .srv-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 22px; }
.srv-tpl { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-top: 8px; border-radius: 10px; border: 1px solid var(--hl-faint-lines); background: transparent; color: var(--highest-contrast-text-color); cursor: pointer; text-align: left; }
.srv-tpl:hover, .srv-tpl.on { border-color: var(--theme-bg); }
.srv-tpl .srv-tpl-ic { font-size: 24px; width: 34px; text-align: center; }
.srv-icon-pick { width: 84px; height: 84px; border-radius: 50%; border: 2px dashed var(--hl-faint-lines); margin: 14px auto 4px; display: flex; align-items: center; justify-content: center; text-align: center; color: gray; cursor: pointer; background: center/cover no-repeat; font-size: 13px; line-height: 1.2; padding: 6px; }
.srv-icon-pick.has { border-style: solid; color: transparent; }
.srv-copy { display: flex; gap: 8px; margin-top: 8px; }
.srv-copy input { flex: 1; }

/* popovers (menus, profile card, reaction picker) */
.srv-pop { position: fixed; z-index: 100001; background: var(--bg-2, #fff); border: 1px solid var(--hl-faint-lines); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 6px; min-width: 220px; max-width: 320px; font-family: Arial, sans-serif; font-size: 16px; color: var(--highest-contrast-text-color); }
.srv-pop .srv-mi { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.srv-pop .srv-mi:hover { background: #f0f1f3; color: inherit; }          /* (user 2026-11-22: the server menu highlight is the lightest gray in light mode, dark gray in dark mode - never the theme color) */
body.darkmode .srv-pop .srv-mi:hover, body.dim .srv-pop .srv-mi:hover { background: #3a3c41; color: #fff; }
.srv-pop .srv-mi.danger { color: #f23f43; }
.srv-pop .srv-mi.danger:hover { background: #da373c; color: #fff; }
.srv-pop .srv-msep { height: 1px; background: var(--hl-faint-lines); margin: 4px 6px; }
.srv-pop .srv-mi .srv-check { opacity: 0; }
.srv-pop .srv-mi.on .srv-check { opacity: 1; }
.srv-rgrid { display: grid; grid-template-columns: repeat(6, 36px); gap: 4px; padding: 4px; }
.srv-rgrid button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; padding: 4px; }
.srv-rgrid button:hover { background: var(--hl-brighter); }
.srv-rgrid img { width: 26px; height: 26px; }
.srv-card-pop { width: 300px; padding: 0; overflow: hidden; }
.srv-card-pop .srv-banner { height: 60px; background: var(--theme-bg); }
.srv-card-pop .srv-cp-body { padding: 0 16px 16px; }
.srv-card-pop .srv-av.lg { width: 80px; height: 80px; border-radius: 50%; border: 5px solid var(--bg-2, #fff); margin-top: -40px; font-size: 26px; }
.srv-card-pop .srv-av.lg .srv-status { width: 16px; height: 16px; right: 0; bottom: 0; }
.srv-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.srv-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; background: var(--hl-brighter); font-size: 14px; }
.srv-chip i { width: 10px; height: 10px; border-radius: 50%; background: #99aab5; display: inline-block; }
.srv-cp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* settings (Discord's full-page settings, drawn as a large GT modal) */
.srv-settings { background: var(--bg, #fff); border-radius: 16px; width: 100%; max-width: 1040px; min-height: 70vh; display: flex; box-shadow: 0 8px 40px rgba(0,0,0,.18); overflow: hidden; position: relative; }
.srv-set-nav { width: 220px; flex: 0 0 220px; padding: 22px 10px; border-right: 1px solid var(--hl-faint-lines); background: var(--bg-2); }
.srv-set-nav .srv-set-title { padding: 0 10px 8px; color: gray; text-transform: uppercase; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-set-nav .srv-set-item { padding: 8px 10px; border-radius: 6px; cursor: pointer; color: gray; }
.srv-set-nav .srv-set-item:hover { background: var(--hl); color: var(--highest-contrast-text-color); }
.srv-set-nav .srv-set-item.on { background: var(--hl-brighter); color: var(--highest-contrast-text-color); }
.srv-set-nav .srv-set-item.danger { color: #f23f43; }
.srv-set-body { flex: 1; min-width: 0; padding: 24px 32px 40px; overflow-y: auto; max-height: calc(100vh - 100px); }
.srv-set-body h2 { font-size: 22px; margin: 0 0 14px; }
.srv-set-body .srv-close { position: absolute; top: 14px; right: 14px; }
.srv-list-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--hl-faint-lines); }
.srv-list-row:last-child { border-bottom: 0; }
.srv-list-row .srv-grow { flex: 1; min-width: 0; }
.srv-list-row .srv-grow > div { overflow: hidden; text-overflow: ellipsis; }
.srv-roles-wrap { display: flex; gap: 20px; align-items: flex-start; }
.srv-role-list { width: 220px; flex: 0 0 220px; }
.srv-role-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.srv-role-item:hover { background: var(--hl); }
.srv-role-item.on { background: var(--hl-brighter); }
.srv-role-item.locked { cursor: default; opacity: .55; }
.srv-role-item.dragover { box-shadow: inset 0 2px 0 var(--theme-bg); }
.srv-role-item .srv-dot { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; background: #99aab5; }
.srv-role-item .srv-handle { margin-left: auto; cursor: grab; opacity: .4; }
.srv-role-edit { flex: 1; min-width: 0; }
.srv-palette { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.srv-sw { width: 30px; height: 30px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.srv-sw.on { border-color: var(--highest-contrast-text-color); }
.srv-sw.none { background: #99aab5; position: relative; }
.srv-colorinp { width: 46px; height: 34px; padding: 0; border: 1px solid var(--hl-faint-lines); border-radius: 6px; background: transparent; cursor: pointer; }
.srv-perm-group { margin-top: 20px; color: gray; text-transform: uppercase; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.srv-perm-all { width: 7px; height: 7px; margin: 0 4px 0 0; cursor: pointer; accent-color: #53bcff; }          /* (user 2026-11-18: half-size master checkbox at the right of each section title) */
.srv-audit-row { padding: 10px 6px; border-bottom: 1px solid var(--hl-faint-lines); }
.srv-audit-row .srv-audit-ch { color: gray; margin-top: 3px; overflow-wrap: anywhere; }
.srv-ow-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.srv-ow-table td, .srv-ow-table th { padding: 8px 6px; border-bottom: 1px solid var(--hl-faint-lines); text-align: left; font-weight: 400; }
.srv-ow-table th { color: gray; }
.srv-ow-table td:not(:first-child), .srv-ow-table th:not(:first-child) { text-align: center; width: 90px; }

/* GT left nav: "New Server" + my servers under it */
#gt-nav-servers { display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px 18px; }
#gt-nav-servers:empty { display: none; }
.gt-nav-srv { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 50px; color: var(--highest-contrast-text-color); text-decoration: none; font-family: Arial, sans-serif; font-size: 16px; cursor: pointer; position: relative; }
.gt-nav-srv:hover { background: var(--hl, #f1f1f1); }
.gt-nav-srv .gt-nav-srv-ic { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; background: var(--hl-brighter) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.gt-nav-srv .gt-nav-srv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 116px; }
.gt-nav-srv.unread .gt-nav-srv-name { font-weight: 700; }
.gt-nav-srv .gt-nav-srv-badge { background: #f23f43; color: #fff; border-radius: 10px; padding: 0 6px; font-size: 13px; line-height: 18px; font-weight: 700; }

/* ---- phone / narrow: rail + channels and members become drawers ---- */
@media (max-width: 860px) {
  .srv-members { position: absolute; right: 0; top: 48px; bottom: 0; z-index: 5; background: var(--bg-2); box-shadow: -6px 0 24px rgba(0,0,0,.15); }
  #srv-app:not(.show-members) .srv-members { display: none; }
  #srv-app.hide-members.show-members .srv-members { display: block; }
  .srv-panel { position: absolute; right: 0; top: 48px; bottom: 0; z-index: 6; background: var(--bg-2); width: min(340px, 100%); }
}
@media (max-width: 760px) {
  .srv-menu-btn { display: inline-flex; }
  .srv-rail, .srv-side { position: absolute; top: 0; bottom: 0; z-index: 7; background: var(--bg-2); transition: transform .2s; }
  .srv-rail { left: 0; }
  .srv-side { left: 72px; box-shadow: 6px 0 24px rgba(0,0,0,.15); }
  #srv-app:not(.show-side) .srv-rail, #srv-app:not(.show-side) .srv-side { transform: translateX(-320px); }
  .srv-search { width: 110px; }
  .srv-search:focus { width: 160px; }
  .srv-main-head .srv-topic { display: none; }
  .srv-msg { padding-right: 12px; }
  .srv-settings { flex-direction: column; }
  .srv-set-nav { width: 100%; flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 2px; padding: 12px; }
  .srv-set-nav .srv-set-title { width: 100%; }
  .srv-set-body { padding: 18px 16px 30px; max-height: none; }
  .srv-roles-wrap { flex-direction: column; }
  .srv-role-list { width: 100%; flex-basis: auto; }
}

/* Create server: wide card, avatar -> arrow -> icon, templates 2x2 (user 2026-11-18) */
.srv-modal.srv-create { max-width: 720px; padding: 28px 32px; }
.srv-create-hero { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 8px; }
.srv-create-hero .srv-icon-pick { margin: 0; }
.srv-me-av { width: 84px; height: 84px; border-radius: 50%; background: var(--theme-bg, #5865f2) center/cover no-repeat; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 26px; flex: 0 0 84px; }
.srv-create-arrow { width: 90px; height: 24px; color: var(--theme-bg, #5865f2); opacity: .8; flex: 0 0 90px; }
.srv-tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.srv-tpl-grid .srv-tpl { margin-top: 0; min-height: 76px; align-items: center; }
@media (max-width: 560px) { .srv-tpl-grid { grid-template-columns: 1fr; } .srv-modal.srv-create { padding: 22px 18px; } .srv-create-arrow { width: 54px; flex-basis: 54px; } }

/* New messages in another channel: the name keeps its normal color; a small red dot + the count sits on the right (user 2026-11-18) */
.srv-chan.unread:not(:hover) { color: gray; font-weight: 400; }
.srv-chan.unread::before { display: none; }
/* (user 2026-11-19) a small red circle with the number of new messages, right after the channel's name */
.srv-chan .srv-new { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; margin-left: 8px; margin-right: auto; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: #f23f43; color: #fff; font-family: Arial, sans-serif; font-size: 13px; font-weight: 700; line-height: 20px; }
.srv-chan .srv-new i { display: none; }
.srv-chan:has(.srv-new) .srv-chan-name { flex: 0 1 auto; }
.srv-chan .srv-new + .srv-pill { margin-left: 2px; }

/* ---- emoji (js/emoji-picker.js, 2026-11-19): message-box smiley, quick reactions, unicode reactions, jumbo emoji-only messages ---- */
.srv-emoji { width: 40px; height: 46px; flex: 0 0 40px; border: 0; background: transparent; cursor: pointer; font-size: 24px; line-height: 1; filter: grayscale(1); opacity: .6; transition: transform .12s, filter .12s, opacity .12s; }
.srv-emoji:hover { filter: none; opacity: 1; transform: scale(1.14); }
.srv-tools .srv-quick { font-size: 18px; line-height: 1; padding: 3px 5px; color: inherit; }
.srv-tools .srv-quick img { width: 20px; height: 20px; }
#srv-app .srv-react.uni { font-size: 16px; }
.srv-bubble.jumbo { font-size: 44px; line-height: 1.2; background: transparent !important; padding-left: 0 !important; padding-right: 0 !important; box-shadow: none !important; }

/* ---- softer light theme (user 2026-11-19: "make separator lines more dim, almost invisible, like discord theme white ... left side on discord
   where channels are, generally have a dimmer white bg ... copy that subtle style, rather than use harsh 1px line separators"). Light only:
   panels are told apart by soft greys (server rail darkest, channel list + member list a dim white, chat pure white), lines nearly invisible. ---- */
body:not(.darkmode):not(.dim) #srv-app { --srv-line: rgba(6,6,7,.07); }
body:not(.darkmode):not(.dim) #srv-app .srv-rail { background: #e9eaed; border-right: 0; }
body:not(.darkmode):not(.dim) #srv-app .srv-rail-item:not(.has-icon):not(.active):not(.srv-rail-add) { background-color: #fff; }
body:not(.darkmode):not(.dim) #srv-app .srv-rail-add { background-color: #fff; }
body:not(.darkmode):not(.dim) #srv-app .srv-rail-add:hover { background-color: #23a55a; }
body:not(.darkmode):not(.dim) #srv-app .srv-rail-sep { background: rgba(6,6,7,.1); }
body:not(.darkmode):not(.dim) #srv-app .srv-rail-badge { border-color: #e9eaed; }
body:not(.darkmode):not(.dim) #srv-app .srv-side { background: #f4f5f7; border-right: 0; }
body:not(.darkmode):not(.dim) #srv-app .srv-side-head { border-bottom: 0; box-shadow: 0 1px 0 var(--srv-line), 0 1.5px 0 rgba(6,6,7,.02); position: relative; z-index: 1; }
body:not(.darkmode):not(.dim) #srv-app .srv-me { background: #eceef1; border-top: 0; }
body:not(.darkmode):not(.dim) #srv-app .srv-main-head { border-bottom: 0; box-shadow: 0 1px 0 var(--srv-line), 0 1.5px 0 rgba(6,6,7,.02); position: relative; z-index: 1; }
body:not(.darkmode):not(.dim) #srv-app .srv-main-head .srv-topic { border-left-color: var(--srv-line); }
body:not(.darkmode):not(.dim) #srv-app .srv-search { border-color: transparent; background: #eceef1; }
body:not(.darkmode):not(.dim) #srv-app .srv-members { background: #f4f5f7; border-left: 0; }
body:not(.darkmode):not(.dim) #srv-app .srv-panel { border-left-color: var(--srv-line); }
body:not(.darkmode):not(.dim) #srv-app .srv-tools { border-color: var(--srv-line); box-shadow: 0 2px 10px rgba(6,6,7,.06); }
body:not(.darkmode):not(.dim) .srv-set-nav { background: #f4f5f7; border-right: 0; }
body:not(.darkmode):not(.dim) .srv-list-row, body:not(.darkmode):not(.dim) .srv-audit-row, body:not(.darkmode):not(.dim) .srv-toggle,
body:not(.darkmode):not(.dim) .srv-ow-table td, body:not(.darkmode):not(.dim) .srv-ow-table th { border-bottom-color: rgba(6,6,7,.06); }
body:not(.darkmode):not(.dim) .srv-pop { border-color: rgba(6,6,7,.08); }
body:not(.darkmode):not(.dim) #srv-app .srv-chan:hover { background: rgba(6,6,7,.05); }
body:not(.darkmode):not(.dim) #srv-app .srv-chan.active { background: rgba(6,6,7,.09); }

/* "Welcome to <server>" / "This is the beginning of this server." at the top of the server's first channel (Discord's new-server header) */
.srv-server-start { padding: 40px 16px 20px; }
.srv-server-start h1 { font-size: 32px; line-height: 1.2; font-weight: 800; margin: 0 0 8px; color: var(--highest-contrast-text-color); }
.srv-server-start .srv-sub { font-size: 16px; }

/* SERVER MANIFESTO (user 2026-11-22): the read-only front page of a server - left: icon, header image, title, creator + crown, intro;
   right (aligned to the right side): Invite on the title's row, then the server card. */
.srv-chan-mani .srv-hash { font-size: 14px; }
.srv-mani-scroll { padding: 0; }
.srv-mani { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "top card" "title card" "body card"; grid-template-rows: auto auto 1fr; column-gap: 28px; padding: 24px 28px 48px; max-width: 1180px; margin: 0 auto 0 0; }
.srv-mani-top { grid-area: top; position: relative; padding-bottom: 52px; }          /* (the icon hangs 48px below the header) */
.srv-mani-head { position: relative; }
.srv-mani-icon { position: absolute; left: 24px; bottom: -48px; width: 96px; height: 96px; border-radius: 26px;          /* (user 2026-11-22: a rounded square like the card's icon) */
  background: var(--theme-bg) center/cover no-repeat; color: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 700; box-shadow: 0 0 0 4px var(--bg-2, #fff); }
.srv-mani-icon.edit { cursor: pointer; }
.srv-mani-icon.edit:hover { filter: brightness(.85); }
.srv-mani-icon.busy { opacity: .5; }
.srv-mani-admin { position: absolute; left: 136px; bottom: 14px; font-size: 12px; color: gray; }
.srv-mani-admin a { color: gray; cursor: pointer; text-decoration: none; }
.srv-mani-admin a:hover { text-decoration: underline; }
.srv-mani-banner { width: 100%; aspect-ratio: 3 / 1; max-height: 260px; border-radius: 12px; background: center/cover no-repeat; }
.srv-mani-titlerow { grid-area: title; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.srv-mani-title { margin: 0; font-size: 30px; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.srv-mani-invite { flex: none; display: flex; align-items: center; }
.srv-mani-body { grid-area: body; min-width: 0; }
.srv-mani-by { display: flex; align-items: center; gap: 8px; margin: 12px 0 16px; }
.srv-mani-crown { display: inline-flex; color: #e3a008; margin-left: -2px; }          /* (the SVG crown, round dots on its tips) */
.srv-mani-crown svg { width: 18px; height: 18px; }
.srv-mani-text p { margin: 0 0 14px; line-height: 1.65; font-size: 15.5px; }
.srv-mani-card { grid-area: card; justify-self: end; align-self: start; width: 320px; margin-top: 0; border: 1px solid var(--hl-faint-lines); border-radius: 14px; overflow: visible; background: var(--bg-2, #fff); position: sticky; top: 12px; }
/* (user 2026-11-22: the card's server icon must never be cut by the card's top edge - it sits on the header's bottom edge, inside the card) */
.srv-mani-card-head { position: relative; }
.srv-mani-card-banner { aspect-ratio: 3 / 1; border-radius: 13px 13px 0 0; background: center/cover no-repeat; }
.srv-mani-card-icon { width: 64px; height: 64px; border-radius: 18px; position: absolute; left: 16px; bottom: -32px; margin: 0; background: var(--theme-bg) center/cover no-repeat; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; box-shadow: 0 0 0 4px var(--bg-2, #fff); }
.srv-mani-card-in { padding: 42px 16px 16px; }
.srv-mani-card-name { font-size: 18px; font-weight: 700; }
.srv-mani-card-meta { font-size: 13px; color: gray; margin-top: 2px; }
.srv-mani-card-desc { font-size: 14px; line-height: 1.5; margin-top: 10px; }
.srv-mani-avs { display: flex; margin-top: 12px; }
.srv-mani-avs .srv-av { margin-right: -6px; box-shadow: 0 0 0 2px var(--bg-2, #fff); }
.srv-mani-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.srv-mani-tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(128, 128, 128, .2); color: inherit; opacity: .85; }
body.darkmode .srv-mani-tag, body.dim .srv-mani-tag { border-color: rgba(255, 255, 255, .12); }
.srv-mf-banner { width: 100%; max-width: 520px; aspect-ratio: 3 / 1; border-radius: 10px; border: 1px dashed var(--hl-faint-lines); background: center/cover no-repeat; display: grid; place-items: center; color: gray; font-size: 13px; cursor: pointer; }
.srv-mf-banner.has { border-style: solid; }
.srv-mf-banner span { background: rgba(255, 255, 255, .85); color: #555; padding: 4px 12px; border-radius: 999px; }
body.darkmode .srv-mf-banner span, body.dim .srv-mf-banner span { background: rgba(0, 0, 0, .55); color: #ddd; }
@media (max-width: 900px) {
  .srv-mani { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "title" "card" "body"; grid-template-rows: none; padding: 16px; }
  .srv-mani-card { justify-self: stretch; width: auto; position: static; margin: 16px 0 4px; }
}

/* OPEN ROOM + GUESTS (user 2026-11-22) */
.srv-chan-open .srv-hash svg { width: 17px; height: 17px; }
.srv-chan-open .srv-chan-name { font-weight: 700; }
.srv-or-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--hl-faint-lines); font-size: 14px; background: color-mix(in srgb, var(--theme-bg) 6%, transparent); }
.srv-or-bar .srv-field { flex: 1 1 220px; min-width: 0; padding: 6px 10px; font-size: 13px; margin: 0; }
.srv-or-bar .srv-btn.sm { padding: 6px 14px; font-size: 14px; }
.srv-guest-tag { margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 999px; border: 1px solid rgba(128, 128, 128, .3); color: gray; vertical-align: middle; }
.srv-guest-join { padding: 14px 16px; margin: 0 16px 14px; border: 1px dashed var(--hl-faint-lines); border-radius: 10px; text-align: center; color: gray; cursor: pointer; }
.srv-guest-join b { color: var(--theme-bg); }
.srv-guest-card { max-width: 420px; }
.srv-guest-av { width: 96px; height: 96px; border-radius: 50%; margin: 16px auto 4px; background: var(--hl-faint-lines) center/cover no-repeat; display: grid; place-items: center; text-align: center; font-size: 13px; color: gray; cursor: pointer; }
.srv-guest-user { padding: 9px 12px; border-radius: 8px; background: color-mix(in srgb, var(--theme-bg) 6%, transparent); font-weight: 700; }
body.srv-guest #signupbar { display: none !important; }
.srv-mf-banner.has { cursor: grab; }
.srv-mf-banner.dragging { cursor: grabbing; }
.srv-mani-text { margin-top: 14px; }
.srv-mani-by + .srv-mani-text { margin-top: 0; }
