:root {
  --bg-rail: #1e1f22;
  --bg-side: #2b2d31;
  --bg-main: #313338;
  --bg-input: #383a40;
  --bg-hover: #35373c;
  --bg-active: #404249;
  --bg-dark: #232428;
  --text: #dbdee1;
  --text-strong: #f2f3f5;
  --muted: #949ba4;
  --brand: #5865f2;
  --brand-hover: #4752c4;
  --green: #23a55a;
  --red: #da373c;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text);
  font-size: 15px;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- login ---------- */
.login {
  height: 100%; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 20% 0%, #4752c4 0%, transparent 55%),
              radial-gradient(ellipse at 100% 100%, #7b2fbe 0%, transparent 50%), #1e1f22;
}
.login-card {
  width: min(440px, 100%); background: var(--bg-main); border-radius: 12px; padding: 32px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.login-logo { width: 64px; height: 64px; align-self: center; }
.login-card h1 { margin: 8px 0 0; text-align: center; color: var(--text-strong); font-size: 24px; }
.login-card > p { text-align: center; margin: 0 0 12px; }
.login-card label { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.login-card input {
  background: var(--bg-rail); border: 0; border-radius: 4px; padding: 11px 12px; outline: none;
}
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button {
  width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent;
}
.colors button.sel { border-color: #fff; }
.btn-primary {
  background: var(--brand); border: 0; border-radius: 4px; padding: 11px 16px; color: #fff;
  font-weight: 600; margin-top: 12px; transition: background .15s;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: none; border: 0; padding: 11px 16px; color: var(--text); }
.btn-ghost:hover { text-decoration: underline; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 72px 240px 1fr 240px; height: 100%; }
.app.no-members { grid-template-columns: 72px 240px 1fr 0; }
.app.no-members .members { display: none; }

.rail { background: var(--bg-rail); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 8px; }
.rail-item {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--bg-main); transition: border-radius .2s, background .2s; cursor: pointer; position: relative;
}
.rail-item img { width: 100%; height: 100%; }
.rail-item:hover, .rail-item.active { border-radius: 16px; }
.rail-item.letter { font-weight: 600; font-size: 15px; }
.rail-item.letter:hover { background: var(--brand); color: #fff; }
.rail-sep { width: 32px; height: 2px; background: var(--bg-active); border-radius: 1px; }

.sidebar { background: var(--bg-side); display: flex; flex-direction: column; min-width: 0; }
.server-name {
  height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; color: var(--text-strong); box-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.channels { flex: 1; overflow-y: auto; padding: 8px; }
.cat {
  font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  padding: 16px 8px 4px; letter-spacing: .02em;
}
.chan {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 4px; color: var(--muted);
  cursor: pointer; user-select: none;
}
.chan:hover { background: var(--bg-hover); color: var(--text); }
.chan.active { background: var(--bg-active); color: var(--text-strong); }
.chan .ic { width: 20px; text-align: center; font-size: 20px; line-height: 1; opacity: .8; }
.chan .unread { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--text-strong); }
.vusers { padding-left: 32px; display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.vuser { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 3px 6px; border-radius: 4px; }
.vuser .avatar { width: 24px; height: 24px; font-size: 11px; }
.vuser .avatar.speaking { box-shadow: 0 0 0 2px var(--green); }
.badge-live { background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; margin-left: auto; }
.vuser .icons { display: flex; gap: 2px; margin-left: auto; }
.vuser .icons svg { width: 14px; height: 14px; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: #fff; font-weight: 700; font-size: 14px; transition: box-shadow .1s;
}

.voice-panel { background: var(--bg-dark); border-bottom: 1px solid var(--bg-side); padding: 8px; }
.vp-row { display: flex; align-items: center; justify-content: space-between; }
.vp-status { color: var(--green); font-weight: 700; font-size: 13px; }
.vp-channel { font-size: 12px; color: var(--muted); }
.vp-actions { display: flex; gap: 8px; margin-top: 8px; }
.vp-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--bg-side);
  border: 0; border-radius: 4px; padding: 6px; font-size: 13px;
}
.vp-btn:hover { background: var(--bg-active); }
.vp-btn.on { background: var(--green); color: #fff; }

.userbar { background: var(--bg-dark); height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.userbar-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.userbar-name strong { font-size: 14px; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; border-radius: 4px; color: var(--muted);
}
.icon-btn:hover { background: var(--bg-active); color: var(--text); }
.icon-btn .off { display: none; }
.icon-btn.off .on { display: none; }
.icon-btn.off .off { display: inline; }
.icon-btn.off { color: var(--red); }
.icon-btn.danger { color: var(--text); }
.icon-btn.danger:hover { color: var(--red); }

/* ---------- main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  height: 48px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.25); z-index: 1;
}
.topbar strong { color: var(--text-strong); }
.hash { font-size: 22px; color: var(--muted); }
.topbar-sep { width: 1px; height: 24px; background: var(--bg-active); }
.spacer { flex: 1; }

.text-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages { flex: 1; overflow-y: auto; padding: 16px 0; }
.welcome { padding: 16px; }
.welcome .big { width: 68px; height: 68px; border-radius: 50%; background: var(--bg-active); display: grid; place-items: center; font-size: 40px; }
.welcome h2 { margin: 8px 0 4px; color: var(--text-strong); font-size: 28px; }
.msg { display: flex; gap: 16px; padding: 2px 16px; margin-top: 16px; }
.msg.cont { margin-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg:hover { background: rgba(0,0,0,.06); }
.msg .avatar { width: 40px; height: 40px; font-size: 16px; }
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-head strong { font-weight: 600; }
.msg-head time { font-size: 12px; color: var(--muted); }
.msg-text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.375; color: var(--text); }
.msg-text a { color: #00a8fc; }
.msg img.att { max-width: min(400px, 100%); max-height: 300px; border-radius: 8px; margin-top: 4px; display: block; cursor: zoom-in; }
.typing { height: 22px; padding: 0 16px; font-size: 12px; color: var(--muted); }
.composer { display: flex; align-items: center; gap: 12px; margin: 0 16px 8px; background: var(--bg-input); border-radius: var(--radius); padding: 0 16px; }
.composer input { flex: 1; background: none; border: 0; outline: none; padding: 11px 0; }
.attach { color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.attach:hover { color: var(--text); }
.attach svg { width: 24px; height: 24px; }

/* ---------- voz ---------- */
.voice-view { flex: 1; display: flex; flex-direction: column; background: #000; min-height: 0; position: relative; }
.stage {
  flex: 1; padding: 16px; display: grid; gap: 8px; align-content: center; min-height: 0; overflow: auto;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.tile {
  position: relative; background: var(--bg-side); border-radius: var(--radius); aspect-ratio: 16/9;
  display: grid; place-items: center; overflow: hidden; cursor: pointer; outline: 3px solid transparent; transition: outline-color .1s;
}
.tile.speaking { outline-color: var(--green); }
.stage.has-screen { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; }
.stage.has-screen .tile { width: 180px; }
.stage.has-screen .tile.screen { width: 100%; max-height: calc(100vh - 300px); }
.stage.has-screen .tile:not(.screen) .avatar { width: 48px; height: 48px; font-size: 20px; }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile.cam video { object-fit: cover; }
.tile.self.cam video { transform: scaleX(-1); }
.tile .avatar { width: 80px; height: 80px; font-size: 32px; }
.tile-label {
  position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 4px;
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.tile-label svg { width: 14px; height: 14px; color: var(--red); }
.tile .live { position: absolute; right: 8px; top: 8px; }
.voice-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: var(--bg-main); }
.voice-empty h2 { color: var(--text-strong); margin: 0 0 4px; }
.voice-controls { display: flex; justify-content: center; gap: 12px; padding: 16px; }
.round {
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: #2b2d31; color: #fff; display: grid; place-items: center;
  transition: background .15s;
}
.round:hover { background: #3a3c42; }
.round svg { width: 24px; height: 24px; }
.round.on { background: #fff; color: #000; }
.round.off { background: #fff; color: var(--red); }
.round.danger { background: var(--red); }
.round.danger:hover { background: #a12828; }

/* ---------- membros ---------- */
.members { background: var(--bg-side); overflow-y: auto; padding: 8px; }
.member { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 4px; }
.member:hover { background: var(--bg-hover); }
.member .avatar { position: relative; }
.member .avatar::after {
  content: ''; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 3px solid var(--bg-side);
}
.member small { display: block; font-size: 12px; color: var(--muted); }

/* ---------- modal seletor ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--bg-main); border-radius: 12px; width: min(760px, 100%); max-height: 90vh; display: flex; flex-direction: column; padding: 20px; gap: 12px; }
.modal-card h2 { margin: 0; color: var(--text-strong); }
.tabs { display: flex; gap: 8px; }
.tab { background: none; border: 0; padding: 6px 12px; border-radius: 4px; color: var(--muted); }
.tab.active { background: var(--bg-active); color: var(--text-strong); }
.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; overflow-y: auto; min-height: 160px; }
.source { background: var(--bg-side); border: 2px solid transparent; border-radius: 8px; padding: 8px; text-align: left; }
.source:hover { background: var(--bg-active); }
.source.sel { border-color: var(--brand); }
.source img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; border-radius: 4px; display: block; }
.source span { display: block; margin-top: 6px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions .btn-primary { margin: 0; }

.viewer { position: fixed; inset: 0; background: #000; z-index: 40; display: grid; place-items: center; }
.viewer video, .viewer img { width: 100%; height: 100%; object-fit: contain; }
.login-error { background: rgba(218,55,60,.15); color: #fa777c; border-radius: 4px; padding: 8px 10px; margin: 4px 0 0; font-size: 14px; }
.server-name { cursor: pointer; }
.viewer-label { position: absolute; left: 16px; bottom: 16px; background: rgba(0,0,0,.6); padding: 6px 10px; border-radius: 4px; font-weight: 600; }
.viewer-close { position: absolute; right: 16px; top: 16px; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--bg-rail); color: var(--text-strong);
  padding: 10px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.welcome .big-avatar { width: 80px; height: 80px; font-size: 32px; }

/* ---------- contas ---------- */
.center { text-align: center; }
.auth-tabs { display: flex; background: var(--bg-rail); border-radius: 6px; padding: 4px; gap: 4px; margin-bottom: 4px; }
.auth-tab { flex: 1; background: none; border: 0; border-radius: 4px; padding: 8px; color: var(--muted); font-weight: 600; }
.auth-tab.active { background: var(--bg-active); color: var(--text-strong); }
#registerExtra { display: flex; flex-direction: column; gap: 8px; }

/* ---------- barra de servidores ---------- */
.rail { overflow-y: auto; }
.rail-item { border: 0; padding: 0; color: var(--text); flex: none; }
.rail-item .pill {
  position: absolute; left: -16px; top: 50%; width: 8px; height: 0; border-radius: 0 4px 4px 0; background: #fff;
  transform: translateY(-50%); transition: height .15s;
}
.server-list { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.rail-item.unread .pill { height: 8px; }
.rail-item:hover .pill { height: 20px; }
.rail-item.active .pill { height: 40px; }
.rail-item.home.active, .rail-item.home:hover { background: var(--brand); }
.rail-item.add { color: var(--green); font-size: 26px; font-weight: 400; }
.rail-item.add:hover { background: var(--green); color: #fff; border-radius: 16px; }
.rail-item.server.active, .rail-item.server:hover { background: var(--brand); color: #fff; }
.rail-item { overflow: visible; }
.rail-item img { border-radius: inherit; }

.server-menu {
  position: absolute; z-index: 30; margin: 52px 0 0 8px; width: 224px; background: #111214; border-radius: 6px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); display: flex; flex-direction: column;
}
.sidebar { position: relative; }
.server-menu button { background: none; border: 0; text-align: left; padding: 8px; border-radius: 3px; font-size: 14px; color: var(--text); }
.server-menu button:hover { background: var(--brand); color: #fff; }
.server-menu button.invite { color: #949cf7; }
.server-menu button.danger { color: #f23f42; }
.server-menu button.danger:hover { background: var(--red); color: #fff; }
.server-menu hr { border: 0; border-top: 1px solid var(--bg-active); margin: 4px; }
.cat { display: flex; align-items: center; justify-content: space-between; }
.cat button { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 2px; }
.cat button:hover { color: var(--text); }
.chan .del { margin-left: auto; display: none; background: none; border: 0; color: var(--muted); padding: 0 2px; }
.chan:hover .del { display: block; }
.chan .del:hover { color: var(--red); }
.chan.dm { gap: 12px; padding: 6px 8px; }
.chan.dm .avatar { width: 32px; height: 32px; }
.chan.friends-link { font-weight: 600; gap: 12px; padding: 10px 8px; }

.status-dot { position: relative; }
.status-dot::after {
  content: ''; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%;
  background: #80848e; border: 3px solid var(--bg-side);
}
.status-dot.on::after { background: var(--green); }
.member.offline { opacity: .4; }
.member .avatar::after { content: none; }

/* ---------- amigos ---------- */
.friends-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.friend-tabs { display: flex; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--bg-active); flex-wrap: wrap; }
.friend-tabs button { background: none; border: 0; padding: 4px 10px; border-radius: 4px; color: var(--muted); font-weight: 500; }
.friend-tabs button:hover { background: var(--bg-hover); color: var(--text); }
.friend-tabs button.active { background: var(--bg-active); color: var(--text-strong); }
.friend-tabs .add-friend { background: var(--green); color: #fff; }
.friend-tabs .add-friend.active { background: none; color: #2dc770; }
.count { background: var(--red); color: #fff; border-radius: 8px; padding: 0 6px; font-size: 12px; font-weight: 700; margin-left: 4px; }
.add-friend-box { padding: 20px 16px; border-bottom: 1px solid var(--bg-active); }
.add-friend-box h3 { margin: 0 0 4px; color: var(--text-strong); font-size: 16px; }
.add-row { display: flex; gap: 8px; background: var(--bg-rail); border-radius: 8px; padding: 6px 6px 6px 12px; margin-top: 12px; }
.add-row input { flex: 1; background: none; border: 0; outline: none; min-width: 0; }
.add-row .btn-primary { margin: 0; padding: 8px 14px; font-size: 14px; }
.friend-list { flex: 1; overflow-y: auto; padding: 8px 16px; }
.friend-list .cat { padding: 8px 4px 12px; }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--bg-active); border-radius: 6px; }
.friend-row:hover { background: var(--bg-hover); }
.friend-row .info { flex: 1; min-width: 0; }
.friend-row .info strong { display: block; color: var(--text-strong); }
.friend-row .actions { display: flex; gap: 8px; }
.circle-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-side); color: var(--muted); display: grid; place-items: center; font-size: 16px; }
.circle-btn:hover { color: var(--text-strong); }
.circle-btn.ok:hover { color: var(--green); }
.circle-btn.no:hover { color: var(--red); }
.empty { text-align: center; padding: 48px 16px; }

/* ---------- modais ---------- */
.modal-card.narrow { width: min(440px, 100%); }
.modal-card label { font-size: 12px; font-weight: 700; color: var(--muted); }
.modal-card input:not([type]), .modal-card input[readonly], .modal-card #channelName {
  background: var(--bg-rail); border: 0; border-radius: 4px; padding: 10px 12px; outline: none; width: 100%;
}
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack .btn-primary { margin-top: 4px; }
.btn-primary.green { background: var(--green); }
.btn-primary.green:hover { background: #1a8a4a; }
.or { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--bg-active); }
.radio { display: flex; align-items: center; gap: 12px; background: var(--bg-side); border-radius: 6px; padding: 10px 12px; cursor: pointer; }
.radio span { display: flex; flex-direction: column; }
.radio strong { color: var(--text); font-size: 15px; }
.radio small { font-weight: 400; }
.invite-row { display: flex; gap: 8px; }
.invite-row .btn-primary { margin: 0; }

/* ---------- campo de senha ---------- */
.pass-row { position: relative; display: flex; }
.pass-row input { flex: 1; padding-right: 44px; }
.pass-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 18px; padding: 4px 8px; opacity: .6; }
.pass-eye:hover, .pass-eye.on { opacity: 1; }
#capsWarn { margin: 0; }

/* ---------- foto do servidor ---------- */
.rail-item.server img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.icon-edit { display: flex; align-items: center; gap: 20px; margin: 4px 0 8px; }
.icon-preview {
  width: 88px; height: 88px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center;
  font-size: 28px; font-weight: 700; overflow: hidden; flex: none;
}
.icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-btn { margin: 0 !important; cursor: pointer; text-align: center; font-size: 14px !important; color: #fff !important; }
.modal-card #editServerName { background: var(--bg-rail); border: 0; border-radius: 4px; padding: 10px 12px; outline: none; width: 100%; }

/* ---------- menu da conversa privada ---------- */
.topbar { position: relative; }
#btnDmMenu { font-size: 20px; line-height: 1; }
.dm-menu { right: 52px; top: 40px; margin: 0; width: 200px; }

/* ---------- conexão / link ---------- */
.conn-line { text-align: center; font-size: 13px; color: var(--muted); margin: 0; }
.link-btn { background: none; border: 0; color: #00a8fc; padding: 0; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }
.warn { color: #f0b232; margin: 6px 0 0; }
.friend-link-box { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--bg-active); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.friend-link-box h3 { margin: 0; color: var(--text-strong); font-size: 14px; }
.friend-link-box .invite-row { width: 100%; max-width: 560px; }
.friend-link-box input { flex: 1; background: var(--bg-rail); border: 0; border-radius: 4px; padding: 10px 12px; outline: none; min-width: 0; }
.host-panel { background: var(--bg-dark); border-radius: 8px; padding: 10px; margin: 4px 0 8px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.host-panel strong { color: var(--text-strong); font-size: 13px; }
.host-panel .addr { background: var(--bg-rail); border-radius: 4px; padding: 6px 8px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; word-break: break-all; cursor: pointer; }
.host-panel .addr:hover { color: var(--text-strong); }
.host-panel .btn-primary { margin: 0; padding: 7px 10px; font-size: 13px; }
.host-panel .on { color: var(--green); font-weight: 600; }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .app, .app.no-members { grid-template-columns: 0 200px 1fr 0; }
  .rail, .members { display: none; }
}
@media (max-width: 600px) {
  .app, .app.no-members { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { max-height: 40vh; }
  .stage { grid-template-columns: 1fr; }
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 4px; }
