:root {
  --bg0: #070a12;
  --bg1: #0d1220;
  --bg2: #131a2c;
  --bg3: #1a2238;
  --bg4: #232d48;
  --line: #222b44;
  --text: #e8ecfb;
  --text2: #a9b2d0;
  --text3: #6f789a;
  --accent: #2ee6c5;
  --accent2: #7c5cff;
  --grad: linear-gradient(135deg, #2ee6c5 0%, #4aa8ff 50%, #7c5cff 100%);
  --danger: #ff5470;
  --warn: #ffb547;
  --ok: #3ddc84;
  --idle: #ffc043;
  --dnd: #ff5470;
  --offline: #6f789a;
  --mention-bg: rgba(255, 181, 71, .09);
  --mention-line: #ffb547;
  --hover: rgba(255, 255, 255, .045);
  --active: rgba(124, 92, 255, .18);
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --radius: 14px;
  --font-scale: 1;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg0: #e9edf6;
  --bg1: #f6f8fd;
  --bg2: #ffffff;
  --bg3: #eef1f9;
  --bg4: #e1e6f3;
  --line: #dbe1ef;
  --text: #121729;
  --text2: #4a5373;
  --text3: #8890ad;
  --hover: rgba(10, 20, 60, .05);
  --active: rgba(124, 92, 255, .14);
  --mention-bg: rgba(255, 181, 71, .16);
  --shadow: 0 12px 40px rgba(20, 30, 70, .18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: calc(15px * var(--font-scale));
  background: var(--bg0);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: #5cc8ff; text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
::selection { background: rgba(124, 92, 255, .4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }
.muted { color: var(--text3); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.xs { width: 13px; height: 13px; }

/* ---------------- logo */
.logo-mark { width: 40px; height: 40px; border-radius: 13px; background: var(--grad); position: relative; flex: none; }
.logo-mark::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; border: 3.5px solid #fff; border-right-color: transparent; transform: rotate(-35deg); }
.logo-mark.big { width: 72px; height: 72px; border-radius: 22px; }
.logo-mark.big::after { inset: 19px; border-width: 6px; }
.boot { height: 100vh; display: grid; place-items: center; }
.boot .logo-mark { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .7; } }
.brand { font-weight: 800; font-size: 26px; letter-spacing: -.5px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- buttons/inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; font-weight: 600; background: var(--bg4); color: var(--text); transition: filter .15s, transform .1s; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: var(--text2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.input, .select, textarea.input { width: 100%; background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
textarea.input { resize: vertical; min-height: 80px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text2); margin-bottom: 7px; }
.field small { display: block; color: var(--text3); margin-top: 6px; font-size: 12px; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 8px; }
.toggle { position: relative; width: 42px; height: 24px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle i { position: absolute; inset: 0; background: var(--bg4); border-radius: 20px; transition: .2s; cursor: pointer; }
.toggle i::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle input:checked + i { background: var(--accent2); }
.toggle input:checked + i::after { transform: translateX(18px); }
.switch-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .grow b { display: block; font-weight: 600; }
.switch-row .grow small { color: var(--text3); font-size: 13px; }
input[type=range] { width: 100%; accent-color: var(--accent2); }
input[type=color] { width: 48px; height: 36px; border: 0; background: none; padding: 0; cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 20px; background: var(--bg3); font-size: 12px; font-weight: 600; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.kbd { display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--bg4); font-size: 12px; font-weight: 700; border-bottom: 2px solid rgba(0, 0, 0, .3); }

/* ---------------- auth */
.auth { height: 100vh; overflow: auto; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(900px 600px at 10% 0%, rgba(46, 230, 197, .14), transparent 60%),
  radial-gradient(900px 700px at 100% 100%, rgba(124, 92, 255, .18), transparent 60%), var(--bg0); }
.auth-card { width: 100%; max-width: 440px; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin: 18px 0 6px; letter-spacing: -.4px; }
.auth-card p.sub { color: var(--text2); margin: 0 0 24px; }
.auth-head { display: flex; align-items: center; gap: 12px; }
.auth-foot { margin-top: 18px; color: var(--text2); font-size: 14px; text-align: center; }
.auth-foot a { cursor: pointer; font-weight: 600; }
.code-boxes { display: flex; gap: 8px; justify-content: space-between; margin: 8px 0 4px; }
.code-boxes input { width: 100%; max-width: 54px; height: 62px; text-align: center; font-size: 26px; font-weight: 800; background: var(--bg1); border: 1px solid var(--line); border-radius: 12px; outline: none; }
.code-boxes input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
.dev-note { background: rgba(255, 181, 71, .1); border: 1px solid rgba(255, 181, 71, .35); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.pw-meter { height: 4px; border-radius: 4px; background: var(--bg4); margin-top: 8px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: .25s; }

/* ---------------- shell */
.shell { display: grid; grid-template-columns: 72px 270px minmax(0, 1fr) auto; height: 100vh; height: 100dvh; padding: 8px 8px 8px 0; gap: 8px; }
.panel { background: var(--bg1); border-radius: var(--radius); overflow: hidden; min-height: 0; display: flex; flex-direction: column; }

/* rail */
.rail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-sep { width: 32px; height: 2px; border-radius: 2px; background: var(--line); margin: 2px 0; flex: none; }
.rail-item { position: relative; width: 48px; height: 48px; flex: none; }
.rail-btn { width: 48px; height: 48px; border-radius: 16px; background: var(--bg2); display: grid; place-items: center; overflow: hidden; font-weight: 700; font-size: 15px; color: var(--text2); transition: border-radius .2s, background .2s, transform .15s; }
.rail-btn img { width: 100%; height: 100%; object-fit: cover; }
.rail-btn:hover { border-radius: 13px; background: var(--bg3); color: var(--text); }
.rail-item.active .rail-btn { border-radius: 13px; box-shadow: 0 0 0 2px var(--bg0), 0 0 0 4px var(--accent2); }
.rail-item.home .rail-btn { background: var(--grad); color: #fff; }
.rail-item.add .rail-btn { color: var(--accent); }
.rail-item.add .rail-btn:hover { background: var(--accent); color: #062; }
.rail-item .pip { position: absolute; left: -12px; top: 50%; width: 4px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: var(--text); transition: height .2s, margin .2s; }
.rail-item.active .pip { height: 36px; margin-top: -18px; background: var(--grad); }
.rail-item:not(.unread):not(.active) .pip { height: 0; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }
.rail-item .badge { position: absolute; right: -4px; bottom: -3px; box-shadow: 0 0 0 3px var(--bg0); }
.rail-item .voice-dot { position: absolute; right: -3px; top: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg0); color: #031; }
.rail-item .voice-dot svg { width: 11px; height: 11px; }

/* sidebar */
.side-head { height: 54px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.side-head.clickable { cursor: pointer; }
.side-head.clickable:hover { background: var(--hover); }
.side-banner { height: 90px; background-size: cover; background-position: center; position: relative; flex: none; }
.side-scroll { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.cat { display: flex; align-items: center; gap: 4px; padding: 16px 6px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--text3); cursor: pointer; user-select: none; }
.cat:hover { color: var(--text2); }
.cat svg { transition: transform .15s; }
.cat.collapsed svg.chev { transform: rotate(-90deg); }
.cat .add { margin-left: auto; opacity: 0; }
.cat:hover .add { opacity: 1; }
.ch { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; border-radius: 9px; color: var(--text3); cursor: pointer; position: relative; margin: 1px 0; }
.ch:hover { background: var(--hover); color: var(--text2); }
.ch.active { background: var(--active); color: var(--text); }
.ch.unread { color: var(--text); font-weight: 700; }
.ch.unread::before { content: ''; position: absolute; left: -8px; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--text); }
.ch .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch .tools { display: none; gap: 2px; }
.ch:hover .tools, .ch.active .tools { display: flex; }
.ch .tools button { color: var(--text3); padding: 2px; border-radius: 4px; }
.ch .tools button:hover { color: var(--text); }
.ch .cnt { font-size: 11px; color: var(--text3); }
.vc-users { padding: 2px 0 4px 26px; }
.vc-user { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 8px; color: var(--text2); font-size: 14px; cursor: pointer; }
.vc-user:hover { background: var(--hover); color: var(--text); }
.vc-user .icons { margin-left: auto; display: flex; gap: 4px; color: var(--text3); }
.vc-user .icons .red { color: var(--danger); }
.live { background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; letter-spacing: .4px; }
.dm-row { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px; border-radius: 10px; cursor: pointer; color: var(--text2); position: relative; }
.dm-row:hover { background: var(--hover); color: var(--text); }
.dm-row.active { background: var(--active); color: var(--text); }
.dm-row .x { display: none; margin-left: auto; color: var(--text3); }
.dm-row:hover .x { display: block; }
.dm-row .x:hover { color: var(--text); }
.dm-row .sub { font-size: 12px; color: var(--text3); }
.dm-row.unread .ellipsis:first-child { color: var(--text); font-weight: 700; }
.nav-row { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 10px; border-radius: 10px; cursor: pointer; color: var(--text2); font-weight: 600; }
.nav-row:hover { background: var(--hover); color: var(--text); }
.nav-row.active { background: var(--active); color: var(--text); }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 8px 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--text3); }
.section-title button { color: var(--text3); }
.section-title button:hover { color: var(--text); }

/* voice connection + user panel */
.vconn { margin: 0 8px; padding: 10px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.vconn-top { display: flex; align-items: center; gap: 8px; }
.vconn-top .state { color: var(--ok); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.vconn-top .state.bad { color: var(--warn); }
.vconn .where { font-size: 12px; color: var(--text3); cursor: pointer; }
.vconn .where:hover { text-decoration: underline; color: var(--text2); }
.vconn-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.vconn-actions button { height: 32px; border-radius: 8px; background: var(--bg3); display: grid; place-items: center; color: var(--text2); }
.vconn-actions button:hover { background: var(--bg4); color: var(--text); }
.vconn-actions button.on { background: var(--accent2); color: #fff; }
.ping { font-size: 11px; color: var(--text3); }
.upanel { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px; margin-top: 8px; background: var(--bg2); }
.upanel .me { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 4px; border-radius: 9px; cursor: pointer; }
.upanel .me:hover { background: var(--hover); }
.upanel .me .n { font-weight: 700; font-size: 14px; }
.upanel .me .s { font-size: 12px; color: var(--text3); }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--text2); position: relative; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.red { color: var(--danger); }
.icon-btn.on { color: var(--accent); }

/* avatar */
.av { position: relative; flex: none; border-radius: 50%; background: var(--bg4); display: grid; place-items: center; color: #fff; font-weight: 700; overflow: visible; }
.av > img, .av > .fb { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.av .st { position: absolute; right: -2px; bottom: -2px; width: 34%; height: 34%; min-width: 10px; min-height: 10px; border-radius: 50%; border: 3px solid var(--bg1); background: var(--offline); }
.av .st.online { background: var(--ok); }
.av .st.idle { background: var(--idle); }
.av .st.dnd { background: var(--dnd); }
.av.speaking > img, .av.speaking > .fb { box-shadow: 0 0 0 2px var(--bg1), 0 0 0 4px var(--ok); }
[data-speak].speaking .av > img, [data-speak].speaking .av > .fb { box-shadow: 0 0 0 2px var(--bg1), 0 0 0 4px var(--ok); }

/* main */
.main { position: relative; }
.main-head { height: 54px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); }
.main-head .title { font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.main-head .topic { color: var(--text3); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 12px; border-left: 1px solid var(--line); cursor: pointer; }
.main-head .actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.head-search { width: 200px; height: 32px; border-radius: 8px; background: var(--bg0); border: 1px solid var(--line); padding: 0 10px; outline: none; font-size: 13px; transition: width .2s; }
.head-search:focus { width: 260px; border-color: var(--accent2); }
.menu-toggle { display: none; }
.main-body { flex: 1; min-height: 0; display: flex; }
.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 0 8px; overscroll-behavior: contain; }
.welcome { padding: 24px 20px 12px; }
.welcome .big-ic { width: 68px; height: 68px; border-radius: 50%; background: var(--bg3); display: grid; place-items: center; margin-bottom: 12px; }
.welcome .big-ic svg { width: 36px; height: 36px; }
.welcome h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.5px; }
.welcome p { margin: 0; color: var(--text2); }
.day-sep { display: flex; align-items: center; gap: 10px; margin: 18px 16px 6px; color: var(--text3); font-size: 12px; font-weight: 700; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.unread-sep { display: flex; align-items: center; gap: 8px; margin: 8px 16px; color: var(--danger); font-size: 11px; font-weight: 800; }
.unread-sep::before { content: ''; flex: 1; height: 1px; background: var(--danger); }
.msg { position: relative; display: flex; gap: 14px; padding: 4px 56px 4px 16px; margin-top: 14px; }
.msg.cont { margin-top: 0; padding-top: 1px; padding-bottom: 1px; }
.msg:hover { background: var(--hover); }
.msg.mentioned { background: var(--mention-bg); box-shadow: inset 3px 0 0 var(--mention-line); }
.msg.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: rgba(124, 92, 255, .25); } }
.msg.pending { opacity: .55; }
.msg-gutter { width: 42px; flex: none; }
.msg.cont .msg-gutter .t { visibility: hidden; font-size: 10.5px; color: var(--text3); text-align: right; padding-top: 4px; white-space: nowrap; }
.msg.cont:hover .msg-gutter .t { visibility: visible; }
.msg-body { flex: 1; min-width: 0; }
.msg.has-reply .msg-gutter { padding-top: 22px; }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.author { font-weight: 700; cursor: pointer; }
.author:hover { text-decoration: underline; }
.role-tag { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--accent2); color: #fff; font-weight: 800; }
.msg-head .time { font-size: 12px; color: var(--text3); }
.msg-content { line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-content.jumbo { font-size: 44px; line-height: 1.15; }
.msg-content .edited { font-size: 11px; color: var(--text3); margin-left: 4px; }
.msg-content code.inline { background: var(--bg3); padding: 1px 5px; border-radius: 5px; font-family: Consolas, 'Cascadia Code', monospace; font-size: 88%; }
.msg-content pre.code { background: var(--bg0); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 6px 0; overflow-x: auto; font-family: Consolas, 'Cascadia Code', monospace; font-size: 13px; white-space: pre; max-width: 100%; }
.msg-content blockquote { margin: 2px 0; padding-left: 10px; border-left: 4px solid var(--bg4); }
.msg-content h1, .msg-content h2, .msg-content h3 { margin: 6px 0 2px; line-height: 1.2; }
.msg-content h1 { font-size: 1.5em; } .msg-content h2 { font-size: 1.3em; } .msg-content h3 { font-size: 1.12em; }
.spoiler { background: var(--bg4); color: transparent; border-radius: 4px; cursor: pointer; transition: .2s; }
.spoiler.shown { background: var(--bg3); color: inherit; }
.mention { background: rgba(124, 92, 255, .22); color: #b9a8ff; padding: 0 3px; border-radius: 4px; font-weight: 600; cursor: pointer; }
:root[data-theme="light"] .mention { color: #5a3ee6; }
.mention:hover { background: var(--accent2); color: #fff; }
.sys-msg { display: flex; align-items: center; gap: 12px; padding: 6px 56px 6px 16px; margin-top: 10px; color: var(--text2); font-size: 14px; }
.sys-msg:hover { background: var(--hover); }
.sys-msg .ic { width: 42px; display: flex; justify-content: center; color: var(--ok); flex: none; }
.sys-msg b { color: var(--text); cursor: pointer; }
.reply-ref { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text3); margin-bottom: 3px; cursor: pointer; position: relative; }
.reply-ref::before { content: ''; position: absolute; left: -36px; top: 9px; width: 30px; height: 10px; border-left: 2px solid var(--bg4); border-top: 2px solid var(--bg4); border-top-left-radius: 6px; }
.reply-ref b { color: var(--text2); }
.reply-ref .ellipsis { max-width: 60ch; }
.msg-tools { position: absolute; right: 14px; top: -14px; display: none; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); padding: 2px; z-index: 2; }
.msg:hover .msg-tools { display: flex; }
.msg-tools button { width: 32px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--text2); }
.msg-tools button:hover { background: var(--hover); color: var(--text); }
.msg-tools button.red:hover { color: var(--danger); }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.att-img { max-width: min(420px, 100%); max-height: 340px; border-radius: 10px; cursor: zoom-in; object-fit: contain; background: var(--bg2); }
.att-video { max-width: min(480px, 100%); max-height: 340px; border-radius: 10px; background: #000; }
.att-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); max-width: 420px; }
.att-file .meta { min-width: 0; }
.att-file .meta a { display: block; font-weight: 600; }
.att-file .meta small { color: var(--text3); }
.att-audio { width: 320px; max-width: 100%; }
.embed { margin-top: 6px; border-left: 4px solid var(--accent2); background: var(--bg2); border-radius: 8px; padding: 10px; max-width: 520px; }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; display: block; }
.reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.react { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); font-size: 14px; }
.react b { font-size: 12px; color: var(--text2); }
.react.me { background: rgba(124, 92, 255, .18); border-color: var(--accent2); }
.react:hover { border-color: var(--text3); }
.react.add { opacity: 0; }
.msg:hover .react.add { opacity: 1; }
.edit-box textarea { width: 100%; background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; resize: none; }
.edit-box small { color: var(--text3); font-size: 12px; }
.edit-box small a { cursor: pointer; }
.load-more { text-align: center; padding: 10px; color: var(--text3); font-size: 13px; }

/* composer */
.composer-wrap { padding: 0 16px 6px; flex: none; position: relative; }
.composer-top { background: var(--bg3); border-radius: 12px 12px 0 0; padding: 7px 12px; font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.composer-top + .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.pending-files { display: flex; gap: 10px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; overflow-x: auto; }
.pending-files + .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.pf { position: relative; width: 120px; flex: none; background: var(--bg3); border-radius: 10px; padding: 8px; font-size: 12px; }
.pf img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.pf .x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; }
.composer { display: flex; align-items: flex-end; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 4px 6px; }
.composer:focus-within { border-color: var(--bg4); }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; padding: 9px 4px; max-height: 40vh; line-height: 1.4; }
.composer .icon-btn { height: 38px; }
.composer.disabled { opacity: .6; }
.typing { height: 22px; padding: 2px 18px 0; font-size: 12.5px; color: var(--text2); display: flex; align-items: center; gap: 6px; flex: none; }
.typing .dots { display: inline-flex; gap: 3px; }
.typing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text2); animation: blink 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; } .typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.slow-note { font-size: 12px; color: var(--text3); }
.ac-pop { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 2px); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-height: 280px; overflow-y: auto; z-index: 20; }
.ac-pop .ttl { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text3); padding: 4px 8px 6px; letter-spacing: .6px; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.ac-item.sel, .ac-item:hover { background: var(--active); }
.ac-item small { color: var(--text3); }

/* members */
.members { width: 250px; }
.members .side-scroll { padding-top: 4px; }
.mem-group { padding: 18px 8px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--text3); }
.mem { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px; border-radius: 10px; cursor: pointer; }
.mem:hover { background: var(--hover); }
.mem.offline { opacity: .45; }
.mem .n { font-weight: 600; font-size: 14px; }
.mem .cs { font-size: 12px; color: var(--text3); }
.crown { color: var(--warn); }

/* home / friends */
.friends-head .tab { padding: 5px 11px; border-radius: 8px; color: var(--text2); font-weight: 600; font-size: 14px; }
.friends-head .tab:hover { background: var(--hover); color: var(--text); }
.friends-head .tab.active { background: var(--active); color: var(--text); }
.friends-head .tab.add { background: var(--ok); color: #032; }
.friends-head .tab.add.active { background: transparent; color: var(--ok); }
.friends-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.friend { display: flex; align-items: center; gap: 12px; padding: 10px; border-top: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.friend:hover { background: var(--hover); border-top-color: transparent; }
.friend .acts { display: flex; gap: 8px; }
.friend .acts button { width: 36px; height: 36px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; color: var(--text2); }
.friend .acts button:hover { color: var(--text); background: var(--bg3); }
.friend .acts button.ok:hover { color: var(--ok); }
.friend .acts button.no:hover { color: var(--danger); }
.empty { text-align: center; color: var(--text3); padding: 60px 20px; }
.empty .big { font-size: 54px; margin-bottom: 10px; }
.add-friend-box { display: flex; gap: 10px; padding: 8px; background: var(--bg0); border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; }
.add-friend-box input { flex: 1; background: transparent; border: 0; outline: none; padding: 0 8px; }
.activity { width: 320px; border-left: 1px solid var(--line); padding: 18px; overflow-y: auto; }
.activity h3 { margin: 0 0 14px; font-size: 18px; }
.act-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }

/* stage (voz/vídeo) */
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #05070d; position: relative; min-height: 0; }
:root[data-theme="light"] .stage { background: #11162a; }
.stage.dm-stage { flex: none; height: 46%; min-height: 240px; border-bottom: 1px solid var(--line); }
.tiles { flex: 1; min-height: 0; display: grid; gap: 10px; padding: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-rows: minmax(150px, 1fr); align-content: center; overflow-y: auto; }
.tiles.focus { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 110px; }
.tiles.focus .strip { display: flex; gap: 10px; overflow-x: auto; min-height: 0; }
.tiles.focus .strip .tile { width: 180px; flex: none; }
.tile { position: relative; background: #141a2b; border-radius: 14px; overflow: hidden; display: grid; place-items: center; min-height: 0; aspect-ratio: auto; transition: box-shadow .15s; cursor: pointer; }
.tile.speaking { box-shadow: inset 0 0 0 3px var(--ok); }
.tile video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; background: #000; }
.tile.screen video { object-fit: contain; }
.tile.self.cam video { transform: scaleX(-1); }
.tile .av { width: 84px; height: 84px; font-size: 30px; }
.tile .tag { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); color: #fff; padding: 4px 9px; border-radius: 8px; font-size: 13px; font-weight: 600; max-width: calc(100% - 20px); }
.tile .tag .red { color: #ff7a8e; }
.tile .tile-tools { position: absolute; right: 8px; top: 8px; display: none; gap: 6px; }
.tile:hover .tile-tools { display: flex; }
.tile .tile-tools button { width: 32px; height: 32px; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.tile .tile-tools button:hover { background: rgba(0, 0, 0, .8); }
.tile .conn { position: absolute; left: 10px; top: 10px; font-size: 11px; background: rgba(255, 84, 112, .85); color: #fff; padding: 2px 7px; border-radius: 6px; }
.stage-bar { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; flex-wrap: wrap; }
.sbtn { width: 52px; height: 52px; border-radius: 50%; background: #1f2740; color: #fff; display: grid; place-items: center; transition: .15s; position: relative; }
.sbtn:hover { background: #2a3456; }
.sbtn.on { background: #fff; color: #111; }
.sbtn.off { background: #3a2230; color: #ff7a8e; }
.sbtn.leave { background: var(--danger); width: 64px; border-radius: 26px; }
.sbtn.leave:hover { filter: brightness(1.1); }
.sbtn .caret { position: absolute; right: -4px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: #2a3456; display: grid; place-items: center; border: 2px solid #05070d; }
.stage-empty { color: #8a93b5; text-align: center; padding: 40px; }
.stage-empty h2 { color: #fff; margin: 12px 0 6px; }
.stage-top { position: absolute; left: 14px; top: 12px; z-index: 3; color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 700; text-shadow: 0 1px 4px #000; }
.side-chat { width: 360px; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg1); }

/* overlays */
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
#layer > * { pointer-events: auto; }
.backdrop { position: fixed; inset: 0; z-index: 130; background: rgba(3, 5, 12, .72); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-head { padding: 22px 22px 8px; position: relative; }
.modal-head h2 { margin: 0; font-size: 21px; letter-spacing: -.3px; }
.modal-head p { margin: 6px 0 0; color: var(--text2); font-size: 14px; }
.modal-head .close { position: absolute; right: 14px; top: 14px; }
.modal-body { padding: 14px 22px; }
.modal-foot { padding: 14px 22px; display: flex; justify-content: flex-end; gap: 10px; background: var(--bg1); border-radius: 0 0 18px 18px; }
.choice { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin-bottom: 10px; background: var(--bg1); }
.choice:hover { border-color: var(--accent2); }
.choice.sel { border-color: var(--accent2); background: var(--active); }
.choice .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg3); }
.choice b { display: block; }
.choice small { color: var(--text3); }
.icon-upload { width: 88px; height: 88px; border-radius: 50%; border: 2px dashed var(--text3); margin: 4px auto 18px; display: grid; place-items: center; cursor: pointer; overflow: hidden; color: var(--text3); background-size: cover; background-position: center; }
.icon-upload:hover { border-color: var(--accent); color: var(--accent); }
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; align-items: center; }
.toast { background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; font-size: 14px; animation: pop .2s; max-width: 90vw; }
.toast.err { border-color: var(--danger); }
.toast.ok { border-color: var(--ok); }

.ctx { position: fixed; min-width: 220px; max-width: 280px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 150; animation: pop .12s; max-height: 80vh; overflow-y: auto; }
.ctx-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--text2); font-weight: 500; }
.ctx-item:hover { background: var(--accent2); color: #fff; }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: var(--danger); color: #fff; }
.ctx-item .r { margin-left: auto; display: flex; }
.ctx-item.check .box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--text3); margin-left: auto; display: grid; place-items: center; }
.ctx-item.check.on .box { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.ctx-label { padding: 6px 10px 2px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--text3); }
.ctx-slider { padding: 4px 10px 8px; }
.ctx-slider .row { justify-content: space-between; font-size: 12px; color: var(--text3); }

.popout { position: fixed; width: 320px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; z-index: 140; animation: pop .14s; }
.popout .banner { height: 90px; }
.popout .pav { margin: -44px 0 0 16px; }
.popout .pav .av { width: 86px; height: 86px; font-size: 32px; }
.popout .pav .av .st { border-color: var(--bg2); border-width: 5px; }
.popout .pbody { padding: 10px 16px 16px; }
.popout .pname { font-size: 20px; font-weight: 800; }
.popout .puser { color: var(--text2); font-size: 14px; }
.popout .pbox { background: var(--bg1); border-radius: 12px; padding: 12px; margin-top: 12px; font-size: 14px; }
.popout .pbox h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text3); }
.popout .pbox + .pbox { margin-top: 8px; }
.popout .roles { display: flex; flex-wrap: wrap; gap: 5px; }
.popout input.dm { width: 100%; margin-top: 12px; }

.emoji-picker { position: fixed; width: 352px; height: 400px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 160; animation: pop .12s; }
.emoji-picker .top { padding: 10px; border-bottom: 1px solid var(--line); }
.emoji-picker .cats { display: flex; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.emoji-picker .cats button { flex: 1; height: 30px; border-radius: 7px; font-size: 17px; }
.emoji-picker .cats button:hover, .emoji-picker .cats button.on { background: var(--hover); }
.emoji-picker .grid { flex: 1; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); align-content: start; gap: 2px; }
.emoji-picker .grid .lbl { grid-column: 1 / -1; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text3); padding: 8px 4px 4px; }
.emoji-picker .grid button { font-size: 24px; height: 40px; border-radius: 8px; }
.emoji-picker .grid button:hover { background: var(--hover); }

.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); display: grid; place-items: center; z-index: 180; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.lightbox a { position: absolute; bottom: 20px; color: #fff; }

/* settings fullscreen */
.settings { position: fixed; inset: 0; background: var(--bg1); display: flex; z-index: 120; animation: fade .15s; }
.settings-nav { width: 280px; background: var(--bg0); padding: 50px 12px 20px 30px; overflow-y: auto; flex: none; }
.settings-nav .grp { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--text3); padding: 14px 10px 6px; }
.settings-nav .it { padding: 8px 10px; border-radius: 8px; color: var(--text2); cursor: pointer; font-weight: 600; margin-bottom: 2px; }
.settings-nav .it:hover { background: var(--hover); color: var(--text); }
.settings-nav .it.on { background: var(--active); color: var(--text); }
.settings-nav .it.danger { color: var(--danger); }
.settings-nav .sep { height: 1px; background: var(--line); margin: 10px; }
.settings-main { flex: 1; overflow-y: auto; padding: 50px 40px 80px; position: relative; }
.settings-main > .inner { max-width: 760px; }
.settings-main h2 { margin: 0 0 22px; font-size: 22px; }
.settings-main h3 { margin: 28px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--text2); }
.settings-close { position: fixed; top: 46px; right: 40px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--text3); display: grid; place-items: center; color: var(--text2); z-index: 2; background: var(--bg1); }
.settings-close:hover { color: var(--text); border-color: var(--text); }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.card-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.card-row:last-child { border-bottom: 0; }
.card-row .lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text3); }
.profile-preview { width: 300px; border-radius: 16px; overflow: hidden; background: var(--bg0); border: 1px solid var(--line); flex: none; }
.profile-preview .banner { height: 80px; }
.profile-preview .body { padding: 0 16px 16px; }
.profile-preview .av { width: 80px; height: 80px; margin-top: -40px; font-size: 30px; border: 5px solid var(--bg0); }
.meter { height: 10px; border-radius: 6px; background: var(--bg4); position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); width: 0; transition: width .06s linear; }
.meter b { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--warn); }
.role-list { width: 220px; flex: none; }
.role-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text2); font-weight: 600; }
.role-item:hover { background: var(--hover); }
.role-item.on { background: var(--active); color: var(--text); }
.role-item .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.perm-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.perm-row b { display: block; font-weight: 600; }
.perm-row small { color: var(--text3); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td, .table th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { font-size: 11px; text-transform: uppercase; color: var(--text3); letter-spacing: .6px; }
.call-modal { text-align: center; padding: 30px 24px; }
.call-modal .av { width: 96px; height: 96px; margin: 0 auto 14px; font-size: 36px; animation: ring 1.4s infinite; border-radius: 50%; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); } 100% { box-shadow: 0 0 0 26px rgba(61, 220, 132, 0); } }
.call-modal .acts { display: flex; justify-content: center; gap: 24px; margin-top: 22px; }
.call-modal .acts button { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.qs input { font-size: 18px; padding: 14px; }
.qs-list { max-height: 50vh; overflow-y: auto; margin-top: 10px; }
.search-results { width: 400px; border-left: 1px solid var(--line); display: flex; flex-direction: column; background: var(--bg1); min-height: 0; }
.search-results .hd { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.search-results .bd { flex: 1; overflow-y: auto; padding: 8px; }
.search-results .msg { margin: 0 0 8px; background: var(--bg2); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.search-results .msg .msg-tools { display: none !important; }
.drop-overlay { position: absolute; inset: 0; background: rgba(124, 92, 255, .25); border: 3px dashed var(--accent2); border-radius: var(--radius); display: grid; place-items: center; font-size: 22px; font-weight: 800; z-index: 30; pointer-events: none; }
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.install-card { background: var(--bg1); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.install-card h4 { margin: 8px 0 4px; }
.install-card p { margin: 0 0 12px; color: var(--text3); font-size: 13px; }
.compact .msg { margin-top: 4px; }
.compact .msg .msg-gutter { width: 0; display: none; }

.invite-embed { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; max-width: 420px; }
.invite-embed .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--bg3); display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none; }
.invite-embed .ico img { width: 100%; height: 100%; object-fit: cover; }
.invite-embed small { color: var(--text3); }
@media (max-width: 1250px) {
  .members { width: 220px; }
  .head-search { width: 130px; }
  .head-search:focus { width: 180px; }
}

/* ---------------- mobile */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .shell .panel { border-radius: 0; }
  .nav-drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(372px, 88vw); z-index: 60; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0; background: var(--bg0); transform: translateX(-100%); transition: transform .22s ease; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .shell.drawer-open .nav-drawer { transform: none; box-shadow: var(--shadow); }
  .nav-drawer .panel { border-radius: 0; }
  .nav-drawer .rail { padding-top: 8px; }
  .main { height: 100dvh; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .menu-toggle { display: grid; }
  .members { position: fixed; right: 0; top: 0; bottom: 0; z-index: 55; width: min(300px, 85vw); box-shadow: var(--shadow); }
  .head-search { width: 120px; }
  .head-search:focus { width: 160px; }
  .main-head .topic { display: none; }
  .msg { padding-right: 12px; }
  .msg-tools { right: 8px; }
  .side-chat, .search-results, .activity { position: fixed; inset: 0; width: auto; z-index: 58; }
  .settings { flex-direction: column; }
  .settings-nav { width: auto; padding: 16px; display: flex; overflow-x: auto; gap: 4px; flex: none; }
  .settings-nav .grp, .settings-nav .sep { display: none; }
  .settings-nav .it { white-space: nowrap; }
  .settings-main { padding: 20px 16px 80px; }
  .settings-close { top: 10px; right: 10px; width: 34px; height: 34px; }
  .profile-preview { display: none; }
  .install-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding: 8px; gap: 8px; }
  .sbtn { width: 48px; height: 48px; }
  .role-list { width: 100%; }
}
@media (min-width: 901px) {
  .nav-drawer { display: contents; }
  .scrim { display: none; }
}
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 50; }
