:root {
  --rail: #1e1f22; --side: #2b2d31; --main: #313338; --raise: #232428; --input: #383a40; --hover: #35373c; --active: #404249;
  --text: #dbdee1; --bright: #f2f3f5; --muted: #949ba4; --faint: #6d6f78;
  --accent: #5865f2; --accent-h: #4752c4; --green: #23a55a; --red: #f23f43; --yellow: #f0b232;
  --radius: 8px; --font: "gg sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--main); color: var(--text); font: 15px/1.4 var(--font); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: #00a8fc; text-decoration: none; } a:hover { text-decoration: underline; }
svg { width: 20px; height: 20px; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; }
code { background: var(--raise); padding: 1px 5px; border-radius: 4px; font-size: 0.88em; font-family: Consolas, "SF Mono", Menlo, monospace; }
.grow { flex: 1; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 4px; } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- generic controls ---------- */
input:not([type]), input[type=text], select, textarea { background: #1e1f22; border: 0; border-radius: 4px; padding: 10px 12px; width: 100%; outline: none; color: var(--bright); }
input:focus, select:focus { box-shadow: 0 0 0 2px var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 4px; background: #4e5058; color: #fff; font-weight: 500; transition: background .15s; }
.btn:hover { background: #6d6f78; } .btn.small { padding: 6px 12px; font-size: 14px; } .btn.small svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); } .btn.primary:hover { background: var(--accent-h); }
.btn.green { background: var(--green); } .btn.green:hover { background: #1a8a4a; }
.btn.danger { background: var(--red); } .btn.danger:hover { background: #c62f33; }
.btn.wide { width: 100%; margin-top: 16px; padding: 12px; }
.btn.in-voice { background: var(--green); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 4px; color: #b5bac1; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--bright); }
.icon-btn.off { color: var(--red); } .icon-btn.on { color: var(--bright); }
.icon-btn.big { width: 40px; height: 40px; background: var(--bright); color: #111; border-radius: 50%; }
.icon-btn.big:hover { background: #fff; color: #000; transform: scale(1.05); }
.field-label { display: block; font-size: 12px; font-weight: 700; color: #b5bac1; text-transform: uppercase; letter-spacing: .02em; margin: 14px 0 8px; }
.field-label .val { float: right; color: var(--muted); text-transform: none; font-weight: 500; }
.error-text { color: #fa777c; font-size: 13px; min-height: 18px; margin-top: 6px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; background: #4e5058; border-radius: 4px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 22px; border-radius: 3px; background: #fff; border: 1px solid #ccc; cursor: grab; }
input[type=range]::-moz-range-thumb { width: 10px; height: 20px; border-radius: 3px; background: #fff; border: 1px solid #ccc; }
.switch { -webkit-appearance: none; appearance: none; width: 40px; height: 24px; border-radius: 12px; background: #80848e; position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch:checked { background: var(--green); } .switch:checked::after { left: 19px; }
.switch:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- auth / home ---------- */
.screen { position: fixed; inset: 0; }
.center-screen { display: flex; align-items: center; justify-content: center; background: radial-gradient(1200px 600px at 20% 10%, #3b3f9a 0%, transparent 60%), radial-gradient(900px 600px at 90% 90%, #5b2c83 0%, transparent 60%), #1e1f22; overflow: auto; padding: 20px; }
.card { background: var(--main); border-radius: 10px; padding: 28px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.auth-card { width: 420px; max-width: 100%; text-align: center; }
.auth-card form { text-align: left; margin-top: 18px; }
.auth-card h1 { margin: 8px 0 4px; color: var(--bright); font-size: 24px; }
.logo { font-size: 52px; line-height: 1; } .logo.small { font-size: 28px; }
.home-wrap { width: 760px; max-width: 100%; }
.home-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--muted); }
.home-head b { color: var(--bright); }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.home-grid h2 { margin: 0 0 6px; color: var(--bright); font-size: 20px; }
.code-input { text-transform: uppercase; letter-spacing: .25em; font-weight: 700; font-family: Consolas, Menlo, monospace; }
.section-title { color: var(--muted); font-size: 12px; text-transform: uppercase; margin: 22px 0 10px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 10px; }
.recent-item { display: flex; align-items: center; gap: 10px; background: var(--main); padding: 8px 14px 8px 8px; border-radius: 8px; }
.recent-item:hover { background: var(--active); }
.recent-item .ri-code { color: var(--muted); font-size: 12px; font-family: Consolas, Menlo, monospace; }
@media (max-width: 700px) { .home-grid { grid-template-columns: 1fr; } }

/* ---------- app layout ---------- */
.app { display: flex; }
.rail { width: 72px; background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 8px; overflow-y: auto; flex: none; }
.rail-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--main); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--bright); transition: border-radius .15s, background .15s; position: relative; font-size: 15px; }
.rail-btn:hover, .rail-btn.active { border-radius: 16px; background: var(--accent); }
.rail-btn.home { font-size: 22px; }
.rail-btn.add { color: var(--green); } .rail-btn.add:hover { background: var(--green); color: #fff; }
.rail-btn.active::before { content: ""; position: absolute; left: -14px; width: 4px; height: 40px; border-radius: 0 4px 4px 0; background: #fff; }
.rail-btn .rb-voice { position: absolute; bottom: -2px; right: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: 3px solid var(--rail); }
.rail-sep { width: 32px; height: 2px; background: #35363c; border-radius: 1px; }
#rail-rooms { display: flex; flex-direction: column; gap: 8px; }

.sidebar { width: 240px; background: var(--side); display: flex; flex-direction: column; flex: none; }
.side-head { height: 48px; display: flex; align-items: center; padding: 0 16px; font-weight: 600; color: var(--bright); box-shadow: 0 1px 0 rgba(0,0,0,.25); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-head:hover { background: var(--hover); }
.side-scroll { flex: 1; overflow-y: auto; padding: 8px; }
.invite-box { background: var(--raise); border-radius: 6px; padding: 10px; margin-bottom: 8px; }
.invite-label { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.invite-code { display: flex; align-items: center; justify-content: space-between; width: 100%; font: 700 20px/1 Consolas, Menlo, monospace; letter-spacing: .2em; color: var(--bright); padding: 4px 0; }
.invite-code svg { width: 16px; height: 16px; color: var(--muted); } .invite-code:hover svg { color: var(--bright); }
.cat { font-size: 12px; font-weight: 700; color: var(--muted); 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; }
.chan:hover { background: var(--hover); color: var(--text); }
.chan.active { background: var(--active); color: var(--bright); }
.chan.voice.connected { color: var(--bright); }
.voice-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.voice-users { padding-left: 24px; }
.vu { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 4px; cursor: pointer; color: var(--muted); font-size: 14px; }
.vu:hover { background: var(--hover); color: var(--text); }
.vu .avatar { width: 24px; height: 24px; font-size: 11px; }
.vu .vu-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu .vu-icons { display: flex; gap: 2px; color: var(--muted); } .vu .vu-icons svg { width: 16px; height: 16px; }
.vu .vu-icons .red { color: var(--red); }
.live { background: var(--red); color: #fff; font-size: 10px; font-weight: 800; border-radius: 8px; padding: 1px 6px; letter-spacing: .03em; }
.vu.offline { opacity: .5; }

.avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; flex: none; text-transform: uppercase; transition: box-shadow .08s; }
.avatar.big { width: 80px; height: 80px; font-size: 32px; }
.avatar.speaking { box-shadow: 0 0 0 2px var(--side), 0 0 0 4px var(--green); }

.voice-bar { background: var(--raise); border-bottom: 1px solid #1e1f22; padding: 8px; }
.vb-top { display: flex; align-items: center; gap: 4px; }
.vb-status { display: flex; align-items: center; gap: 8px; flex: 1; text-align: left; padding: 2px; border-radius: 4px; min-width: 0; }
.vb-status:hover .vb-title { text-decoration: underline; }
.vb-status .sig { color: var(--green); width: 18px; height: 18px; }
.vb-status.warn .sig, .vb-status.warn .vb-title { color: var(--yellow); }
.vb-status.bad .sig, .vb-status.bad .vb-title { color: var(--red); }
.vb-title { color: var(--green); font-weight: 600; font-size: 14px; }
.vb-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vb-hangup:hover { color: var(--red); }
.vb-actions { display: flex; gap: 8px; margin-top: 8px; }
.vb-act { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; background: #2b2d31; border-radius: 6px; padding: 6px; color: #b5bac1; font-size: 13px; }
.vb-act:hover { background: var(--active); color: var(--bright); }
.vb-act.on { background: var(--green); color: #fff; }
.vb-act svg { width: 18px; height: 18px; }

.user-panel { height: 52px; background: var(--raise); display: flex; align-items: center; padding: 0 8px; gap: 2px; flex: none; }
.avatar-wrap { position: relative; margin-right: 8px; }
.avatar-wrap::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 3px solid var(--raise); }
.up-names { flex: 1; min-width: 0; }
.up-name { font-weight: 600; color: var(--bright); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-status { font-size: 12px; color: var(--muted); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; background: var(--main); }
.main-head { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; box-shadow: 0 1px 0 rgba(0,0,0,.25); flex: none; z-index: 1; }
.main-head .hash { color: var(--faint); width: 22px; height: 22px; }
.mh-title { font-weight: 600; color: var(--bright); }
.mh-sub { color: var(--muted); font-size: 13px; border-left: 1px solid #3f4147; padding-left: 10px; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn.toggled { color: var(--bright); background: var(--active); }

.stage { background: #000; display: grid; gap: 6px; padding: 6px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); max-height: 55vh; overflow: auto; flex: none; }
.tile { position: relative; background: #111; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; }
.tile video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.tile .tile-name { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); padding: 3px 8px; border-radius: 4px; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.tile .tile-fs { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; }
.tile.focus { grid-column: 1 / -1; }

.messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.msg-list { margin-top: auto; padding: 16px 0 8px; }
.welcome { padding: 16px 16px 8px; }
.welcome .wl-icon { width: 68px; height: 68px; border-radius: 50%; background: var(--active); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.welcome .wl-icon svg { width: 40px; height: 40px; color: var(--bright); }
.welcome h1 { margin: 0 0 4px; color: var(--bright); font-size: 30px; }
.msg { display: flex; gap: 16px; padding: 2px 48px 2px 16px; position: relative; }
.msg:hover { background: #2e3035; }
.msg.head { margin-top: 16px; }
.msg .avatar { width: 40px; height: 40px; font-size: 16px; margin-top: 2px; }
.msg .gutter { width: 40px; flex: none; color: var(--faint); font-size: 11px; text-align: right; padding-top: 3px; visibility: hidden; }
.msg:hover .gutter { visibility: visible; }
.msg-body { min-width: 0; flex: 1; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; }
.msg-author { font-weight: 600; color: var(--bright); }
.msg-time { font-size: 12px; color: var(--muted); }
.msg-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; color: var(--text); }
.msg-text pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px; white-space: pre-wrap; margin: 4px 0; }
.msg-text .mention { background: rgba(88,101,242,.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.msg.mentioned { background: rgba(240,178,50,.08); box-shadow: inset 2px 0 0 var(--yellow); }
.msg.system .msg-text { color: var(--text); }
.bot-tag { background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 3px; vertical-align: 2px; }
.ephemeral-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg-actions { position: absolute; right: 16px; top: -12px; background: var(--main); border: 1px solid #26272b; border-radius: 6px; display: none; }
.msg:hover .msg-actions { display: flex; }
.msg-actions button { width: 30px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.msg-actions button:hover { color: var(--red); }
.msg-actions svg { width: 16px; height: 16px; }
.attach img, .attach video { max-width: min(420px, 100%); max-height: 320px; border-radius: 8px; margin-top: 4px; display: block; cursor: zoom-in; }
.attach video { cursor: auto; }
.attach audio { margin-top: 4px; }
.file-card { display: inline-flex; align-items: center; gap: 10px; background: #2b2d31; border: 1px solid #1e1f22; border-radius: 8px; padding: 10px 14px; margin-top: 4px; }
.file-card .fc-size { font-size: 12px; color: var(--muted); }
.date-sep { display: flex; align-items: center; margin: 20px 16px 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.date-sep::before, .date-sep::after { content: ""; flex: 1; height: 1px; background: #3f4147; margin: 0 8px; }

.typing { height: 22px; padding: 0 16px; font-size: 13px; color: var(--text); flex: none; }
.composer { margin: 0 16px 20px; background: var(--input); border-radius: 8px; display: flex; align-items: flex-start; padding: 0 12px; flex: none; }
.attach-btn { color: #b5bac1; padding: 11px 12px 0 0; cursor: pointer; } .attach-btn:hover { color: var(--bright); }
.attach-btn svg { width: 22px; height: 22px; }
.composer textarea { background: transparent; resize: none; padding: 11px 0; max-height: 40vh; box-shadow: none !important; line-height: 1.4; }
.drop-overlay { position: absolute; inset: 0; background: rgba(88,101,242,.85); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; z-index: 10; pointer-events: none; }

.right { width: 300px; background: var(--side); display: flex; flex-direction: column; flex: none; overflow-y: auto; }
.panel-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 16px 16px 8px; }
.panel-title svg { width: 16px; height: 16px; }
.music { border-bottom: 1px solid #1f2023; padding-bottom: 12px; }
.player-box { position: relative; margin: 0 12px; aspect-ratio: 16/9; background: #111214; border-radius: 8px; overflow: hidden; }
#yt-player, .player-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 14px; color: var(--muted); font-size: 13px; background: linear-gradient(135deg, #2a2c58, #1d1e21); }
.pe-icon { font-size: 28px; }
.player-cover { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; background: linear-gradient(transparent 50%, rgba(0,0,0,.8)); background-size: cover; background-position: center; font-size: 13px; color: #fff; font-weight: 600; }
.player-cover span { background: rgba(0,0,0,.6); padding: 4px 10px; border-radius: 12px; }
.np { padding: 10px 16px 0; }
.np-title { font-weight: 600; color: var(--bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; }
.progress { height: 4px; background: #4e5058; border-radius: 2px; margin-top: 10px; cursor: pointer; position: relative; }
.progress:hover { height: 6px; margin-top: 9px; }
.progress .bar { height: 100%; background: var(--bright); border-radius: 2px; width: 0; }
.progress:hover .bar { background: var(--green); }
.np-times { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.np-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
.np-controls .icon-btn.active { color: var(--green); }
.np-vol { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); }
.np-vol svg { width: 16px; height: 16px; } .np-vol input { height: 4px; }
.music-add { display: flex; gap: 6px; margin: 12px 12px 0; }
.music-add input { padding: 6px 10px; font-size: 14px; }
.queue-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 14px 16px 6px; }
.queue { padding: 0 8px; }
.qi { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 4px; }
.qi:hover { background: var(--hover); }
.qi .qi-n { width: 16px; color: var(--muted); font-size: 12px; text-align: right; flex: none; }
.qi img, .qi .qi-ph { width: 40px; height: 30px; border-radius: 3px; object-fit: cover; flex: none; background: #1e1f22; }
.qi .qi-text { flex: 1; min-width: 0; }
.qi .qi-title { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .qi-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi button { visibility: hidden; color: var(--muted); } .qi:hover button { visibility: visible; } .qi button:hover { color: var(--red); }
.qi button svg { width: 16px; height: 16px; }
.src { font-size: 10px; font-weight: 700; border-radius: 3px; padding: 0 4px; margin-right: 4px; }
.src.spotify { background: #1db954; color: #000; } .src.youtube { background: #f00; color: #fff; }
.members { padding-bottom: 16px; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 16px; margin: 0 8px; border-radius: 4px; }
.member:hover { background: var(--hover); }
.member .m-name { color: var(--text); font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .m-sub { font-size: 12px; color: var(--muted); }
.member.offline { opacity: .45; }
.member .avatar-wrap { margin-right: 0; }
.member .avatar-wrap::after { border-color: var(--side); }
.member.offline .avatar-wrap::after { background: #80848e; }

/* ---------- popovers, modals, toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { width: 460px; max-width: 94vw; }
.modal h2 { margin: 0 0 6px; color: var(--bright); }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.popover { position: fixed; z-index: 60; background: #111214; border-radius: 8px; padding: 12px; width: 260px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.popover h4 { margin: 0 0 8px; color: var(--bright); display: flex; align-items: center; gap: 8px; }
.popover .pop-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; margin: 8px 0; }
.popover table { width: 100%; font-size: 12px; border-collapse: collapse; }
.popover td { padding: 3px 0; color: var(--muted); } .popover td:last-child { text-align: right; color: var(--text); }
.popover .peer-head td { color: var(--bright); font-weight: 600; padding-top: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #111214; color: var(--bright); padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 100; font-size: 14px; max-width: 90vw; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 90; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; }

/* ---------- settings ---------- */
.settings { position: fixed; inset: 0; z-index: 40; display: flex; background: var(--main); }
.set-side { flex: 1 0 218px; background: var(--side); display: flex; justify-content: flex-end; overflow-y: auto; }
.set-side-inner { width: 218px; padding: 60px 6px 20px 20px; }
.set-cat { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 10px; }
.set-tab { display: block; width: 100%; text-align: left; padding: 6px 10px; border-radius: 4px; color: #b5bac1; margin-bottom: 2px; font-weight: 500; }
.set-tab:hover { background: var(--hover); color: var(--text); }
.set-tab.active { background: var(--active); color: var(--bright); }
.set-main { flex: 1 1 800px; display: flex; overflow-y: auto; position: relative; }
.set-content { width: 740px; max-width: 100%; padding: 60px 40px 80px; }
.set-content h2 { color: var(--bright); margin: 0 0 16px; font-size: 20px; }
.set-content h3 { color: var(--bright); font-size: 16px; margin: 0 0 8px; }
.set-close { position: sticky; top: 60px; margin: 60px 20px 0 0; height: 60px; display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 12px; font-weight: 600; gap: 6px; flex: none; }
.set-close svg { width: 36px; height: 36px; border: 2px solid currentColor; border-radius: 50%; padding: 6px; }
.set-close:hover { color: var(--bright); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.divider { height: 1px; background: #3f4147; margin: 28px 0 20px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; cursor: pointer; }
.toggle-row + .toggle-row { border-top: 1px solid #3a3c42; }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio { display: flex; align-items: center; gap: 10px; background: #2b2d31; padding: 10px 12px; border-radius: 4px; cursor: pointer; }
.radio:hover { background: var(--hover); }
.radio input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.sub-block { margin-top: 6px; }
.mic-test { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.meter { height: 10px; background: #4e5058; border-radius: 5px; position: relative; overflow: hidden; margin: 10px 0; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--yellow); transition: width 50ms linear; }
.meter-fill.open { background: var(--green); }
.sens-wrap { position: relative; }
.sens-meter { height: 8px; margin: 10px 0 -14px; pointer-events: none; }
.sens-wrap input[type=range] { background: transparent; position: relative; }
.thr { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }
.sens-wrap.auto input { opacity: .3; pointer-events: none; }
.keybind { min-width: 160px; background: #1e1f22; border-radius: 4px; padding: 10px 14px; text-align: left; color: var(--bright); font-family: Consolas, Menlo, monospace; font-size: 14px; border: 1px solid transparent; }
.keybind.recording { border-color: var(--red); color: #fa777c; }
.kb-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #3a3c42; }
.acct-card { display: flex; align-items: center; gap: 18px; background: var(--raise); padding: 18px; border-radius: 8px; margin-bottom: 20px; }
.acct-name { font-size: 20px; font-weight: 700; color: var(--bright); }

@media (max-width: 1180px) { .right { position: absolute; right: 0; top: 48px; bottom: 0; z-index: 5; box-shadow: -4px 0 20px rgba(0,0,0,.4); } .right.collapsed-auto { display: none; } }
@media (max-width: 760px) { .sidebar { width: 200px; } .rail { width: 60px; } .rail-btn { width: 42px; height: 42px; } .row2 { grid-template-columns: 1fr; } .set-side { display: none; } }
