/* Sniketor navigation: quiet surfaces, clear hierarchy, controls close to context. */
:root{--nav-bg:#191e1b;--nav-line:#303a32;--nav-text:#e8eee7;--nav-muted:#94a393;--nav-hover:#263028;--nav-active:#31482b}
#app{grid-template-columns:72px 276px minmax(0,1fr) 238px}#app.home-mode{grid-template-columns:72px 276px minmax(0,1fr)}
.rail{padding:20px 10px;background:#101512;gap:10px;border-right:1px solid #222c24}.rail .logo{width:42px;height:42px;border-radius:14px;font-size:30px}.rail-line{margin:5px 0;background:#30392e;width:24px}.rail-button{width:44px;height:44px;border-radius:15px;background:#232d25;color:#aebbab;margin-bottom:9px;position:relative;transition:border-radius .15s,background .15s}.rail-button:hover{border-radius:12px;background:#35422e;color:#e6f5d8}.rail-button.active{background:#bcfa75;color:#1a2d13;box-shadow:none;border-radius:14px}.rail-button.active:before{content:'';position:absolute;left:-11px;top:12px;width:3px;height:20px;background:#bcfa75;border-radius:0 3px 3px 0}.rail-bottom{letter-spacing:1px;opacity:.6}
.sidebar{background:var(--nav-bg);border-right:1px solid var(--nav-line);color:var(--nav-text)}.community-head{padding:24px 20px 14px;min-height:0;background:linear-gradient(145deg,#2d3c27 0%,var(--nav-bg) 85%)}.community-head small{font-size:9px;color:#a6bd94;letter-spacing:2px}.community-head h2{font-size:23px;letter-spacing:-.7px;margin:8px 0 0;line-height:1.25}.community-presence{font-size:11px;color:var(--nav-muted);margin:10px 0 0;display:flex;align-items:center;gap:6px}.community-presence:before{content:'';width:6px;height:6px;flex-shrink:0;background:#a7e272;border-radius:50%}
.sidebar-actions{display:flex;gap:8px;padding:0 16px 18px}.sidebar-actions #invite{margin:0;flex:1;min-height:37px;padding:8px 10px;border:1px solid #435c37;background:#253421;color:#d2edbc;font-size:12px;font-weight:600;border-radius:9px}.sidebar-actions #manage-community{margin:0;width:38px;min-height:37px;flex-shrink:0;padding:0;font-size:18px;border-radius:9px;border-color:var(--nav-line);color:var(--nav-muted);letter-spacing:2px}
.channel-search-wrap{padding:0 16px 16px}#channel-search{margin:0;padding:10px 12px;font-size:12px;min-height:38px;background:#121813;border:1px solid #303e2f;border-radius:9px;color:var(--nav-text)}#channel-search::placeholder{color:#83967e}.channel-section{padding:0 12px 14px;scrollbar-width:thin;scrollbar-color:#41503b transparent}.section-label{padding:0 3px;margin:0 0 6px;gap:3px;letter-spacing:1px}.section-label .section-toggle{font-size:10px;text-transform:uppercase;font-weight:700;letter-spacing:1.1px;color:var(--nav-muted);text-align:left;flex:1;padding:10px 3px;min-width:0}.section-toggle[aria-expanded=false]{opacity:.65}.section-label>button:not(.section-toggle){width:28px;height:28px;border-radius:7px;font-size:19px;color:#a4b49b}.section-label>button:hover{background:var(--nav-hover)}.voice-label{margin-top:24px}
.channel{min-height:43px;padding:10px 11px;gap:10px;border-radius:9px;font-size:14px;color:#aebba7;margin:3px 0;border:1px solid transparent;position:relative}.channel:hover{background:var(--nav-hover)}.channel.selected{background:var(--nav-active);border-color:#48613b;color:#e5f9d5}.channel.selected:before{content:'';position:absolute;left:-1px;top:10px;bottom:10px;width:3px;border-radius:2px;background:#bcfa75}.channel>span{font-size:19px;color:#809576}.channel>.channel-title{font-size:14px;font-weight:500;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}.channel.selected>.channel-title{color:#e5f9d5}.channel small{font-size:10px;border-radius:5px;background:#10191055;padding:3px 5px;white-space:nowrap;color:#90a885}.channel i{width:5px;height:5px;flex-shrink:0;background:#c1f596}.channel.in-voice{border-color:#405e35;background:#233a22;color:#c3efa5}.voice-note{color:#7f9179;font-size:10px;padding:5px 12px;line-height:1.5}.no-channels{font-size:12px;color:var(--nav-muted);padding:12px}
.voice-roster{padding:1px 6px 5px 22px}.voice-person{position:relative;padding:7px 6px;gap:9px;border-left:1px solid #35442e;margin-left:7px}.voice-person>.avatar{width:26px;height:26px;border-radius:9px;font-size:10px}.voice-person-dot{position:absolute;left:24px;bottom:7px;width:7px;height:7px;border:1px solid var(--nav-bg)}.voice-person>span:last-child{min-width:0}.voice-person small{font-size:9px}.voice-person.speaking>.avatar{outline:2px solid #bcfa75;outline-offset:2px}.voice-person.speaking{background:#25392077;border-radius:7px}
#voice-panel{margin:8px 10px 0;padding:13px;border:1px solid #405c36;border-radius:12px;background:linear-gradient(125deg,#283d22,#1d2b20)}#voice-panel .voice-heading{gap:3px}#voice-panel strong{font-size:13px;color:#c2efa5}#voice-status{color:#9bb78d;font-size:10px;margin:7px 0 11px}#voice-panel .voice-controls{display:grid;grid-template-columns:1fr 1fr 42px;gap:5px;margin:0}#voice-panel .voice-controls button{min-height:36px;padding:6px 3px;font-size:9px;border:1px solid #3b5233;border-radius:7px;background:#ffffff06}#voice-panel #hangup{color:#ffc1b3;border-color:#774f42;background:#4a2e2580}#voice-panel .voice-reconnect{border:0;font-size:10px;color:#a8bb9a;padding:6px;margin-top:6px}
.audio-settings-open{margin:10px 10px 0;border:1px solid var(--nav-line);border-radius:9px;min-height:38px;padding:9px 12px;font-size:11px;color:#adc699;background:#202920}.audio-settings-open:before{content:'◖';font-size:17px;margin-right:9px;vertical-align:middle}.audio-settings-open:after{content:'Настройки устройств';font-size:10px;float:right;color:#7f9776;margin-top:3px}
.profile{margin:8px 10px 12px;padding:10px 7px;border:1px solid var(--nav-line);border-radius:12px;background:#222b23;gap:8px}.profile .avatar{width:34px;height:34px;border-radius:11px;cursor:pointer}.profile strong{font-size:12px}.profile small{font-size:10px;color:#9aa991;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile button{font-size:20px;width:30px;height:34px;min-width:30px;padding:0;margin:0;border-radius:8px;color:#9cad91}.profile button:hover{background:#35432d;color:#dff4cd}.profile #settings{margin-left:auto}.profile #logout{font-size:22px;opacity:.65}
html[data-theme=light]{--nav-bg:#edf2e8;--nav-line:#ccd8c1;--nav-text:#26351f;--nav-muted:#627756;--nav-hover:#dfe9d6;--nav-active:#d8e9cb}html[data-theme=light] .community-head{background:linear-gradient(145deg,#d8e8c8,var(--nav-bg))}html[data-theme=light] .community-head small{color:#587341}html[data-theme=light] #channel-search{background:#f9fcf5;border-color:#c7d7b9;color:#26351f}html[data-theme=light] .sidebar-actions #invite{background:#dcebcf;border-color:#b1c89b;color:#375626}html[data-theme=light] .channel.selected>.channel-title{color:#28481b}html[data-theme=light] .channel.selected{border-color:#b1cb99}html[data-theme=light] .profile,html[data-theme=light] .audio-settings-open{background:#e3edd9}html[data-theme=light] #voice-panel{background:#e0efd5;border-color:#aecb98}html[data-theme=light] #voice-panel strong{color:#365b25}html[data-theme=light] .profile button{color:#567346}
@media(max-width:1100px) and (min-width:701px){#app,#app.home-mode{grid-template-columns:64px 250px minmax(0,1fr)}}
@media(max-width:700px){#app,#app.home-mode{display:block}.sidebar{width:min(300px,calc(100vw - 80px))}.community-head{padding:20px 42px 14px 16px}.community-head h2{font-size:21px}.sidebar-actions{padding:0 12px 12px}.sidebar-actions #invite,.sidebar-actions #manage-community{min-height:44px}.channel-search-wrap{padding:0 12px 12px}#channel-search{font-size:16px;min-height:44px}.channel{min-height:46px}.section-label .section-toggle{min-height:44px;font-size:9px}.section-label>button:not(.section-toggle){min-width:36px;min-height:44px}.profile{margin:6px 8px 8px;padding:6px;gap:5px}.profile button{min-width:36px;min-height:44px}.profile .avatar{width:30px;height:30px}.profile strong{font-size:11px}.audio-settings-open{margin:6px 8px 0;min-height:44px}.audio-settings-open:after{display:none}#voice-panel{margin:6px 8px 0;padding:9px}#voice-panel .voice-controls button{min-height:44px}.voice-label{margin-top:14px}}
@media(max-width:700px) and (max-height:500px){.community-head{padding-top:6px;padding-bottom:6px}.community-presence{margin-top:4px}.sidebar-actions{padding-bottom:4px}.channel-search-wrap{padding-bottom:4px}.profile{margin-top:4px;margin-bottom:4px}.audio-settings-open{margin-top:4px}.voice-note{display:none}}
.rail{overflow-x:hidden}.rail>*{flex-shrink:0}.rail #communities{width:44px}.channel>.channel-title{display:block}.channel[title]{cursor:pointer}
@media(max-width:700px){.rail{padding-left:9px;padding-right:9px}}
/* Consistent scrollbars across dialogs, chat and navigation. */
:root{--scroll-thumb:#526348;--scroll-hover:#789463;--scroll-track:transparent}
html[data-theme=light]{--scroll-thumb:#afc39e;--scroll-hover:#799968}
*{scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) var(--scroll-track)}
*::-webkit-scrollbar{width:7px;height:7px}
*::-webkit-scrollbar-track{background:var(--scroll-track);border-radius:10px}
*::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border-radius:10px;border:2px solid transparent;background-clip:padding-box}
*::-webkit-scrollbar-thumb:hover{background-color:var(--scroll-hover)}
*::-webkit-scrollbar-button{display:none;width:0;height:0}
*::-webkit-scrollbar-corner{background:transparent}
#messages,.channel-section{scrollbar-color:var(--scroll-thumb) transparent}
#user-settings{overflow:hidden}
#user-settings .settings-content{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
#user-settings>.close-settings{background:inherit;border-radius:8px;width:36px;height:36px;right:12px;top:10px}
@media(min-width:701px){
 #user-settings{height:min(760px,90dvh)}
 #user-settings .settings-layout{height:100%;min-height:0}
 #user-settings .settings-layout>nav{min-height:0;overflow-y:auto}
 #user-settings .settings-content{padding-top:42px;padding-right:32px}
}
@media(max-width:700px){
 #user-settings>.close-settings{width:44px;height:44px;top:calc(4px + env(safe-area-inset-top));right:env(safe-area-inset-right)}
}

.channel-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #ffffff12}.channel-setting strong{min-width:0;overflow-wrap:anywhere}.channel-setting-actions{display:flex;gap:6px;flex-shrink:0}.channel-setting button{min-height:40px;padding:8px 12px;border:1px solid #b7fa6133;border-radius:9px;background:#b7fa610b;color:inherit;cursor:pointer}.channel-setting button:hover:not(:disabled){background:#b7fa6126}.channel-setting button:disabled{opacity:.3;cursor:default}@media(max-width:700px){.channel-setting{align-items:flex-start;flex-wrap:wrap}.channel-setting-actions{width:100%;flex-wrap:wrap}.channel-setting button{min-height:44px;min-width:44px}}

body:has(#gate){overflow:auto}body:has(#gate) main{max-width:1000px;margin:24px auto;padding:24px}#gate form,#panel>form{max-width:500px;margin:24px 0}body:has(#gate) button{border:1px solid #b7fa6144;border-radius:8px;padding:12px;margin:8px 0}#audit p{overflow-wrap:anywhere;font-size:13px}#users span{overflow-wrap:anywhere;min-width:0}

#startup{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#10140f;color:#bafa78}#startup strong{font-size:36px}#startup p{color:#a8b69c}#startup button{padding:14px 22px;border:1px solid #bafa7855;border-radius:10px}

.video-card{width:min(100%,480px);border:1px solid #687e4540;border-left:3px solid #bcfa75;border-radius:10px;padding:12px;margin-top:10px;background:#20271e;overflow:hidden}.video-card>strong{font-size:12px;color:#b9c8ad}.video-player{aspect-ratio:16/9;min-height:200px;margin:10px 0;background:linear-gradient(135deg,#35452b,#141b10);border-radius:8px;overflow:hidden}.video-player>button{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;color:#e9f5df}.video-player button>span{font-size:36px;color:#bcfa75}.video-card small{display:block;font-size:11px;color:#aab89f;line-height:1.5}.video-card>a{display:block;font-size:13px;color:#bcfa75;margin:8px 0}.video-player iframe{display:block;width:100%;height:100%;border:0}@media(max-width:500px){.video-player{min-height:200px}.video-card{padding:8px}}

.screen-panel{position:fixed;z-index:50;bottom:20px;right:20px;width:min(800px,90vw);padding:14px;background:#172012;border:1px solid #bcfa7570;border-radius:14px;box-shadow:0 16px 60px #0009}.screen-panel video{display:block;width:100%;max-height:65dvh;margin:12px 0;background:#000}.screen-panel strong{font-size:13px}.screen-panel button,#share-screen{padding:10px;color:#bcfa75}

.report-card{padding:18px;margin:12px 0;border:1px solid #bafa7830;border-radius:12px}.report-card p{white-space:pre-wrap;overflow-wrap:anywhere}.report-card button{margin-right:10px!important}

/* Unified account footer and tighter channel navigation. */
.sidebar .community-head{padding-top:20px;padding-bottom:12px;background:var(--nav-bg)}
.sidebar .community-head small{letter-spacing:1.4px;font-size:8px}.sidebar .community-head h2{font-size:21px;margin-top:6px}
.sidebar-actions{padding-bottom:12px}.channel-search-wrap{padding-bottom:8px}.channel-section .voice-label{margin-top:16px}
.channel-section .channel{min-height:38px;padding:8px 10px;border-radius:7px}.channel.selected{border-color:transparent;background:var(--nav-active)}
.channel-section .voice-note{margin-top:8px;font-size:10px;opacity:.75}
.sidebar .profile{display:grid;grid-template-columns:36px minmax(0,1fr);gap:8px 10px;flex-shrink:0;margin:0;padding:14px 14px 12px;border:0;border-top:1px solid var(--nav-line);border-radius:0;background:var(--nav-bg)}
.sidebar .profile>div{min-width:0}.sidebar .profile strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.sidebar .profile small{margin-top:3px}
.account-tools{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px 36px;gap:4px;padding-top:4px}
.profile .account-tools button{margin:0;min-width:0;width:100%;height:36px;padding:0 6px;border:0;border-radius:7px;background:var(--nav-hover);color:var(--nav-muted);font-size:12px;min-height:36px;white-space:nowrap}
.profile .account-tools #settings{margin:0;font-size:19px}.profile .account-tools #logout{font-size:20px}.account-tools .audio-settings-open:before,.account-tools .audio-settings-open:after{content:none}
.profile .account-tools button:hover{background:var(--nav-active);color:var(--nav-text)}
@media(max-width:700px){.sidebar .profile{padding:10px}.account-tools{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px 40px}.profile .account-tools button{height:44px;min-height:44px}.channel-section .channel{min-height:44px}.sidebar .community-head{padding-right:42px}}

/* Compact channel rows: selection is a single soft highlight. */
.channel-section{padding:0 8px 8px}.channel-section .section-label{margin-bottom:2px}.channel-section .section-toggle{font-size:9px;letter-spacing:.8px;padding:7px 4px}.channel-section .voice-label{margin-top:12px}
.channel-section .channel{min-height:32px;padding:5px 8px;margin:1px 0;border:0;border-radius:5px;gap:8px}.channel-section .channel>.channel-title{font-size:13px}.channel-section .channel.selected{background:var(--nav-hover)}.channel-section .channel.selected:before{display:none}.channel-section .channel i{display:none}
.channel-section .channel.in-voice{background:transparent;color:#bcfa75}.channel-section .channel.in-voice:hover{background:var(--nav-hover)}.channel-section .channel small{background:transparent;padding:0;color:var(--nav-muted)}.channel-section .voice-note{display:none}
.voice-roster{padding:0 4px 3px 22px}.voice-person{border:0;padding:4px 3px;margin:0;gap:7px}.voice-person>.avatar{width:22px;height:22px;border-radius:50%;font-size:9px}.voice-person small{display:none}.voice-person-dot{left:19px;bottom:3px;width:6px;height:6px}
.sidebar #voice-panel{margin:0;padding:10px 12px;border:0;border-top:1px solid var(--nav-line);border-radius:0;background:var(--nav-bg);display:grid;grid-template-columns:1fr auto;gap:5px 8px;flex-shrink:0}.sidebar #voice-panel .voice-heading{min-width:0;margin:0}.sidebar #voice-panel #voice-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.sidebar #voice-status{grid-column:1/-1;margin:0 0 3px;font-size:10px}.sidebar #voice-panel .voice-controls{grid-column:1/-1;grid-template-columns:1fr 1fr 48px;gap:4px}.sidebar #voice-panel .voice-controls button{min-height:30px;padding:5px 3px;border:0;border-radius:5px;background:var(--nav-hover);font-size:10px}.sidebar #voice-panel #hangup{background:#5b302b;color:#ffd1c7}.sidebar #voice-panel #share-screen{grid-column:1/-1;padding:6px 8px;text-align:left;font-size:11px;border:0;border-radius:5px;background:var(--nav-hover)}.sidebar #voice-panel .voice-reconnect{grid-column:1/-1;margin:0;padding:4px;text-align:left}.sidebar #voice-panel>button:not(#share-screen):not(.voice-reconnect){grid-column:1/-1;font-size:11px;padding:5px;text-align:left}
@media(max-width:700px){.channel-section .channel{min-height:40px}.sidebar #voice-panel .voice-controls button{min-height:40px}.sidebar #voice-panel #share-screen{min-height:40px}.channel-section .section-toggle{min-height:40px}}

#settings-dialog .channel-setting{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:16px 0}#settings-dialog .channel-setting>strong{display:block;width:100%;min-width:0;line-height:1.5;word-break:normal;overflow-wrap:anywhere}#settings-dialog .channel-setting-actions{display:flex;flex-wrap:wrap;width:100%;min-width:0;gap:7px}#settings-dialog .channel-setting-actions button{flex:0 0 auto}#settings-dialog .channel-setting-actions button[data-move-channel]{padding:8px;width:38px;min-width:38px}
/* Creator controls stay separate from the channel navigation button. */
.channel-row{position:relative;min-width:0}
.channel-row>.channel{padding-right:64px!important;width:100%}
.channel-row-actions{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;gap:1px;opacity:0}
.channel-row:hover .channel-row-actions,.channel-row:focus-within .channel-row-actions{opacity:1}
.channel-row-actions>button{width:27px;height:28px;padding:0;border:0;background:transparent;color:var(--muted,#a7b09e);border-radius:6px}
.channel-row-actions>button:hover{background:#35442c;color:#b9ff70}
dialog.channel-editor{box-sizing:border-box;width:min(960px,calc(100vw - 28px));max-width:960px;height:min(760px,90dvh);max-height:90dvh;padding:0;overflow:hidden;background:#1b231a;border:1px solid #3c4b32;border-radius:18px;color:#edf1e9}
.channel-editor[open]{display:grid;grid-template-columns:210px minmax(0,1fr)}
.channel-editor nav{padding:40px 18px;background:#151c14;display:flex;flex-direction:column;gap:8px;overflow:auto}
.channel-editor nav strong{overflow-wrap:anywhere;margin:0 8px 20px;color:#b1bdab}
.channel-editor nav button{text-align:left;border:0;padding:12px;border-radius:8px;background:transparent;color:inherit}
.channel-editor nav button[aria-current=true]{background:#33472a;color:#b9ff70}
.channel-editor .danger{color:#ffaaa3}
.channel-editor-content{padding:38px 38px 28px;overflow:auto;min-width:0;scrollbar-width:thin;scrollbar-color:#4a5b3e transparent}
.channel-editor-content h2{margin:0 35px 28px 0}
.channel-editor-content label{display:block;margin:18px 0}
.channel-editor-content input,.channel-editor-content textarea{box-sizing:border-box;width:100%;margin-top:8px}
.channel-editor-content textarea{resize:vertical;min-height:100px;max-height:240px}
.channel-editor-content>button{display:block;margin:14px 0}
.channel-editor-content p{line-height:1.6;color:#aebaa6}
.channel-editor-hint{font-size:12px}.channel-permission-card{padding:20px;border:1px solid #415337;border-radius:12px}
.channel-editor-content .avatar-upload-card{margin-top:26px}
.channel-editor .close-settings{position:absolute;right:14px;top:12px;z-index:1}
@media(hover:none){.channel-row-actions{opacity:1}}
@media(max-width:600px){.channel-editor[open]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.channel-editor nav{padding:18px 42px 12px 12px;flex-direction:row;flex-wrap:wrap;gap:3px}.channel-editor nav strong{width:100%;margin:0 0 6px}.channel-editor nav button{padding:8px;font-size:12px}.channel-editor-content{padding:20px}}
.channel-role-row{display:flex;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid #36442e}
.channel-role-row>div{flex:1;min-width:0;overflow-wrap:anywhere}.channel-role-row small{display:block;color:#aebaa6;margin-top:6px}
.channel-role-row>button{flex:none}.channel-role-form fieldset{border:1px solid #3c4b32;border-radius:10px;padding:14px;margin:20px 0;min-width:0}
.channel-role-form .role-check{display:flex;align-items:center;gap:10px;font-size:14px;margin:14px 0;line-height:1.5}
.channel-role-form .role-check[hidden]{display:none}.channel-role-form .role-check input{width:18px;height:18px;flex:0 0 18px;margin:0;accent-color:#b9ff70}
.role-people{max-height:280px;overflow:auto;scrollbar-width:thin}.role-buttons{display:flex;gap:10px;flex-wrap:wrap}.role-buttons button{flex:1;min-width:110px}
.channel-editor [data-tab][hidden]{display:none}
.permission-row{display:flex!important;align-items:center;justify-content:space-between;gap:20px;padding:18px 0;border-bottom:1px solid #35432d;margin:0!important}.permission-row>span{min-width:0;flex:1}.permission-row strong,.permission-row small{display:block}.permission-row small{color:#aebaa6;font-weight:normal;line-height:1.5;margin-top:7px;font-size:13px}.permission-row select{width:155px!important;flex:0 0 155px;margin:0!important;padding:9px}.permission-fields h3{margin-top:28px}.channel-overrides{border-top:1px solid #35432d;margin:26px 0;padding-top:15px}.access-editor .channel-role-row{flex-wrap:wrap}.access-editor .role-check{display:flex;gap:10px;align-items:center}.access-editor .role-check input{width:18px!important;height:18px;margin:0!important}.access-editor .role-check[hidden]{display:none}.access-editor .role-people{border:1px solid #35432d;border-radius:10px;margin:24px 0;padding:15px}.access-editor form>button{margin:12px 8px 0 0}
@media(max-width:600px){.permission-row{gap:10px;align-items:flex-start;flex-direction:column}.permission-row select{flex:auto;width:100%!important}}
.permission-tristate{display:flex;flex:none;gap:0;border:1px solid #45543c;border-radius:8px;overflow:hidden}.permission-tristate button{width:38px;height:34px;border:0!important;border-radius:0!important;padding:0!important;background:#222c20;color:#b4bcaf;font-size:19px}.permission-tristate [data-value='-1'][aria-checked=true]{background:#823d38;color:white}.permission-tristate [data-value='0'][aria-checked=true]{background:#56634d;color:white}.permission-tristate [data-value='1'][aria-checked=true]{background:#477728;color:white}.permission-tristate button:focus-visible{outline:2px solid #b9ff70;outline-offset:-3px}
/* Keep the dialog grid bounded; only its content column scrolls. */
.channel-editor[open]{grid-template-rows:minmax(0,1fr)}
.channel-editor-content,.channel-editor nav{min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable}
.channel-editor-content{overflow-x:hidden;overflow-y:auto;scroll-behavior:auto}
.access-target-picker{position:relative;margin:0 0 24px;min-width:0}
.access-target-toggle{width:100%;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #4b5e3d;border-radius:9px;padding:12px 14px;background:#20291d;color:#ecf2e6;min-height:44px;overflow-wrap:anywhere}
.access-target-toggle:after{content:'⌄';flex:none;color:#b9ff70}
.access-target-panel{border:1px solid #4b5e3d;border-radius:10px;background:#161e14;padding:10px;margin-top:8px}
.access-target-panel>input{margin:0 0 8px!important}.access-target-options{max-height:220px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#4a5b3e transparent}
.access-target-options button{display:block;width:100%;text-align:left;background:transparent;border:0;padding:10px 12px;border-radius:6px;overflow-wrap:anywhere;color:#e4eadf}
.access-target-options button:hover,.access-target-options button[aria-pressed=true]{background:#35472b;color:#b9ff70}
.access-target-panel[hidden],.access-target-options button[hidden]{display:none}
.channel-row-actions{opacity:1;right:3px;gap:0}
.channel-row-actions>button{width:25px;height:28px;display:grid;place-items:center;color:#bdc8b7}
.channel-row-actions svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.channel-row>.channel{padding-right:57px!important}.channel-row:has(.channel.selected) .channel-row-actions>button{color:#edf3e8}
.channel-row>.channel .channel-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){.channel-editor[open]{grid-template-rows:auto minmax(0,1fr)}.channel-row-actions>button{width:30px;height:36px}.channel-row>.channel{padding-right:66px!important}.access-target-options{max-height:180px}}

.rail-button .community-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}

.rules-checkbox{display:flex;align-items:flex-start;gap:10px;margin:16px 0}.rules-checkbox input{width:18px;min-width:18px;height:18px;margin:3px 0}.rules-checkbox[hidden]{display:none}.safety-dialog{width:min(520px,calc(100vw - 32px));max-height:85dvh;overflow:auto}.safety-dialog form{display:grid;gap:14px}.safety-dialog textarea{min-height:100px}.rules-page{max-width:780px;margin:40px auto;padding:24px;line-height:1.7}.rules-page h2{margin-top:32px}

.auth-form .rules-checkbox,.safety-dialog .rules-checkbox{display:flex;gap:10px}.public-help{font-size:13px;text-align:center}.public-help a,.rules-checkbox a,.rules-page a,.safety-dialog a{color:var(--lime,#bcfa75)}
/* Compact navigation with consistent icons and a clear selected state. */
.rail{gap:12px;padding-top:18px}.rail-button{display:flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid #344232;border-radius:50%;background:#1c271f;color:#acc39d;margin-bottom:0;transition:background .15s,border-radius .15s,box-shadow .15s}.rail #communities{display:flex;flex-direction:column;gap:12px;margin:2px 0}.rail-button:hover{background:#30432a;border-color:#698855;border-radius:15px;color:#dcf5c6}.rail-button.active{border-radius:15px;border-color:#bafa78;box-shadow:0 0 0 3px #bafa7810}.rail-button.active:before{left:-10px;top:10px;height:24px;width:3px}.rail-button:focus-visible{outline:2px solid #bafa78;outline-offset:3px}.rail-button.add{background:#1c2b1b;color:#bafa78;border-style:dashed}.rail .logo{margin-bottom:0;box-shadow:0 4px 16px #bafa7810}.rail-line{margin:2px 0}.rail-tooltip{position:fixed;z-index:50;background:#293626;border:1px solid #4d6340;border-radius:9px;padding:9px 13px;color:#edf5e8;font-size:12px;box-shadow:0 8px 24px #0006;pointer-events:none;max-width:min(260px,70vw);overflow-wrap:anywhere}.rail-bottom{margin-top:auto;padding-top:20px}.rail-button svg{pointer-events:none}@media(prefers-reduced-motion:reduce){.rail-button{transition:none}}
.rail-count{position:absolute;right:-3px;bottom:-3px;background:#bafa78;color:#16210f;border:2px solid #101512;border-radius:12px;padding:1px 4px;min-width:18px;font-size:10px;font-weight:800}
#contacts-panel{padding:0 12px 18px;min-height:0;scrollbar-color:#42553a transparent}.friends-controls{position:sticky;top:0;z-index:2;background:#19211b;padding:6px 0 14px}.friend-add{display:block;width:100%;border:1px solid #6e944e;border-radius:10px;background:#bafa78;color:#1b2c12;padding:12px;font-size:12px;font-weight:700}.friend-search{display:block;margin-top:12px}.friend-search>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.friend-search input{display:block;width:100%;margin:0;padding:10px 12px;background:#111a14;border:1px solid #34462e;border-radius:9px;color:#e6f0dd;font-size:12px}.friends-list-label{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:18px 2px 10px;font-size:9px;letter-spacing:1.2px;color:#9aaf8d;font-weight:700}.friends-list-label span{letter-spacing:0;padding:2px 6px;background:#2d3a28;border-radius:6px}.friends-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:22px 14px;border:1px dashed #37482e;border-radius:14px;background:#1c271b}.friends-empty img{margin-bottom:14px}.friends-empty strong{font-size:14px;color:#d9ebcc}.friends-empty p{font-size:12px;line-height:1.7;color:#96a78b;margin:10px 0 0}.friend-row{position:relative;border-radius:10px;margin:5px 0;background:transparent}.friend-row:hover{background:#263323}.friend-row.selected{background:#30432a;box-shadow:inset 3px 0 #bafa78}.friend-open{display:flex;align-items:center;gap:10px;padding:11px 30px 11px 9px;width:100%;text-align:left;border-radius:10px}.friend-open .avatar{width:34px;height:34px;flex-shrink:0;font-size:11px}.friend-info{flex:1;min-width:0}.friend-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#e4eedd}.friend-info small{display:block;margin-top:4px;font-size:10px;color:#9baf8e}.friend-menu{position:absolute;right:5px;top:15px;z-index:1}.friend-menu summary{cursor:pointer;list-style:none;font-size:18px;color:#aabd9a;padding:0 5px}.friend-menu[open]{z-index:4;border:1px solid #4e6740;border-radius:8px;background:#1e2a1c;padding:5px;box-shadow:0 8px 20px #0006}.friend-menu button{display:block;padding:9px;font-size:11px;white-space:nowrap;color:#d5e8c6}.friend-request{background:#243020;border:1px solid #3a5030;border-radius:10px;padding:12px;margin-bottom:8px}.friend-request>.profile-link{font-size:13px;color:#e0edd6}.friend-request small{display:block;color:#9bad8e;margin:6px 0 10px;font-size:11px}.friend-request>div{display:flex;gap:8px}.friend-request>div button{font-size:11px;background:#354c29;color:#d2f7ae;padding:7px 9px;border-radius:6px}.friend-request .muted-action{background:transparent;color:#b4bfae}@media(max-width:700px){.friend-open{min-height:54px}.friend-menu summary{padding:6px}.friends-controls{padding-top:8px}}
@media(min-width:1101px){#app.home-mode.direct-chat{grid-template-columns:72px 276px minmax(0,1fr) 280px}}.direct-profile{min-height:0;overflow-y:auto;padding:18px 14px;background:#141d16;border-left:1px solid #2b3829;scrollbar-color:#46563a transparent}.direct-profile-card{display:flex;flex-direction:column;min-height:100%;border:1px solid #35462c;border-radius:14px;background:#1e2a1e;overflow:hidden}.direct-profile-cover{height:100px;flex-shrink:0;background:radial-gradient(circle at 80% 10%,#779d46 0,transparent 48%),linear-gradient(135deg,#283c20,#415d2d);padding:16px;text-align:right}.direct-profile-cover span{font-size:10px;letter-spacing:3px;color:#cee7ad;opacity:.6}.direct-profile-content{padding:0 18px 20px}.direct-large-avatar{width:74px;height:74px;border:5px solid #1e2a1e;border-radius:24px;margin-top:-36px;font-size:24px;position:relative}.direct-profile h2{font-size:21px;margin:14px 0 5px;overflow-wrap:anywhere}.direct-presence{font-size:12px;color:#a7b89a;margin:0}.direct-custom-status{font-size:13px;border-left:2px solid #83af57;padding-left:10px;overflow-wrap:anywhere}.direct-profile-section{border-top:1px solid #35462c;margin-top:22px;padding-top:18px}.direct-profile-section h3{font-size:9px;letter-spacing:1px;color:#a7b89a;margin:0 0 12px}.direct-profile-section p{font-size:12px;line-height:1.7;color:#c3d0b9;white-space:pre-wrap;overflow-wrap:anywhere}.direct-shared{display:flex;align-items:center;gap:9px;margin-top:10px}.direct-shared>span{display:grid;place-items:center;width:30px;height:30px;flex-shrink:0;border-radius:10px;background:#384a2c;color:#ccecaa;font-size:10px}.direct-shared strong{font-size:12px;overflow-wrap:anywhere}.direct-full-profile{margin:auto 14px 16px;padding:11px!important;font-size:12px}.direct-profile-note{padding:14px;font-size:12px;color:#a4b496}.direct-header-avatar{flex-shrink:0;width:32px;height:32px;font-size:11px}.direct-chat .chat-head>.hash{display:none}.direct-chat .chat-head .alpha{display:none}.direct-chat .chat-head{gap:12px}.direct-profile-toggle{font-size:12px}.direct-chat .channel-intro{padding-top:20px}@media(max-width:1100px){.direct-profile{display:none}}@media(max-width:700px){.direct-chat .chat-head{gap:8px}.direct-profile-toggle{font-size:11px;padding:8px}.direct-header-avatar{width:28px;height:28px}}
/* Shared mute/deafen badges remain visible in narrow voice rosters. */
.voice-indicators{display:inline-flex;align-items:center;gap:5px;margin-left:auto;flex-shrink:0;color:#b6bcb5}.voice-indicators:empty{display:none}.voice-state-icon{display:inline-flex;width:16px;height:18px}.voice-state-icon svg{width:16px;height:18px}.voice-slash{stroke:#ee9f92;stroke-width:2.2}.voice-person-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.voice-person>.voice-indicators{flex:0 0 auto}.member>.voice-indicators{overflow:visible}.member:has(.voice-indicators)>.ban{margin-left:2px}
.sidebar #voice-panel{margin:8px;padding:12px;border:1px solid #3b5034;border-radius:12px;background:linear-gradient(145deg,#243122,#1a251c);gap:8px;box-shadow:0 4px 14px #0002}
.sidebar #voice-panel .voice-heading{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-start;gap:9px}.voice-connection-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#bcfa7512;color:#bcfa75;flex-shrink:0}.voice-connection-icon svg{width:21px;height:21px}.voice-heading>div{min-width:0;display:grid;gap:3px}.voice-caption{font-size:8px;letter-spacing:1px;color:#a1b497}.sidebar #voice-panel #voice-name{display:block;font-size:13px;color:#e8f2e2}.sidebar #voice-panel #voice-status{margin:0;font-size:11px;line-height:1.5;color:#a5b69b}
.sidebar #voice-panel .voice-controls{grid-template-columns:1fr 1fr 1fr;gap:6px}.sidebar #voice-panel .voice-controls button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:56px;padding:8px 3px;border:1px solid #43533b;border-radius:9px;background:#ffffff05;font-size:10px;line-height:1.2}.sidebar #voice-panel .voice-controls svg{width:20px;height:20px}.sidebar #voice-panel .voice-controls button[aria-pressed=true]{background:#5b302b66;border-color:#805248;color:#ffd1c7}.sidebar #voice-panel #mute:disabled{opacity:.8}.sidebar #voice-panel #hangup{border-color:#75473e;background:#5b302b66;color:#ffc1b3}.sidebar #voice-panel #hangup:hover{background:#813d34}.sidebar #voice-panel #share-screen{min-height:36px;padding:9px 10px;text-align:center;border:1px solid #405336;border-radius:8px;font-size:11px;background:#bcfa750a;color:#c7e4b5}.sidebar #voice-panel .voice-reconnect{color:#ffd1a0;text-align:center}
html[data-theme=light] .sidebar #voice-panel{background:#e2edd9;border-color:#b4c9a4}html[data-theme=light] .sidebar #voice-panel #voice-name{color:#243c1a}html[data-theme=light] .voice-caption,html[data-theme=light] .sidebar #voice-panel #voice-status{color:#536a47}html[data-theme=light] .voice-indicators{color:#5b6953}html[data-theme=light] .voice-slash{stroke:#ad4639}html[data-theme=light] .sidebar #voice-panel #share-screen{color:#38572a}html[data-theme=light] .voice-connection-icon{color:#497624}html[data-theme=light] .sidebar #voice-panel .voice-controls button[aria-pressed=true],html[data-theme=light] .sidebar #voice-panel #hangup{background:#f1d6ce;color:#813c30;border-color:#c18b7b}
.voice-connection-icon[data-quality="0"]{color:#9ba397;background:#9ba39712}.voice-connection-icon[data-quality="1"]{color:#f29686;background:#f2968614}.voice-connection-icon[data-quality="2"]{color:#efbd6c;background:#efbd6c14}.voice-connection-icon[data-quality="3"]{color:#bedb88}.voice-connection-icon[data-quality="4"]{color:#bcfa75}
.sidebar #voice-panel #voice-quality-label{grid-column:1/-1;margin:0 0 3px;font-size:10px;line-height:1.5;color:var(--nav-muted);overflow-wrap:anywhere}
.sidebar #voice-panel .voice-caption{font-size:11px;letter-spacing:0;line-height:1.35;color:#bcfa75}.sidebar #voice-panel .voice-caption[data-connection="connecting"]{color:#efbd6c}.sidebar #voice-panel .voice-caption[data-connection="failed"]{color:#f29686}.sidebar #voice-panel .voice-caption[data-connection="offline"]{color:#9ba397}
.member-context-menu{position:fixed;z-index:1000;width:258px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow-y:auto;padding:7px;background:#222b22;border:1px solid #49563e;border-radius:12px;box-shadow:0 16px 50px #0008}.member-menu-title{padding:9px 10px;color:#a5b79c;font-size:11px;overflow-wrap:anywhere}.member-context-menu button{display:block;width:100%;padding:11px 10px;text-align:left;border-radius:7px;font-size:13px;color:#e6eedf}.member-context-menu button:hover,.member-context-menu button:focus-visible{background:#36482d;outline-offset:-2px}.member-context-menu button[aria-checked=true]:after{content:'✓';float:right;color:#bcfa75}.member-context-menu button.danger{color:#ffab9c}.member-context-menu button.danger:hover{background:#5b302b}.member-menu-divider{height:1px;margin:6px;background:#3b4735}html[data-theme=light] .member-context-menu{background:#eff5e8;border-color:#bacdad}html[data-theme=light] .member-context-menu button{color:#263e20}html[data-theme=light] .member-context-menu button:hover{background:#d7e8c9}html[data-theme=light] .member-context-menu button.danger{color:#a5382b}
.rules-summary{padding:20px 24px;background:#222e20;border:1px solid #425638;border-radius:14px;margin:24px 0}.rules-summary p:last-child{margin-bottom:0}.rules-page nav{padding:12px 0;border-block:1px solid var(--border)}.rules-page li{margin:12px 0}.rules-page h2{scroll-margin-top:20px}

#voice-panel .screen-sound-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;grid-column:1/-1;width:100%;box-sizing:border-box;margin:8px 0 0;padding:10px 12px;border:1px solid #435638;border-radius:10px;background:#ffffff04;color:inherit;font-size:12px;line-height:1.4;cursor:pointer}
#voice-panel .screen-sound-toggle input{appearance:none;-webkit-appearance:none;position:relative;display:block;flex:0 0 34px;width:34px;height:20px;min-height:0;margin:0;padding:0;border:1px solid #65745d;border-radius:20px;background:#394333;cursor:pointer;transition:background .15s}
#voice-panel .screen-sound-toggle input::before{content:'';position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background:#d5ddcf;transition:transform .15s}
#voice-panel .screen-sound-toggle input:checked{background:#bafa78;border-color:#bafa78}
#voice-panel .screen-sound-toggle input:checked::before{transform:translateX(14px);background:#233018}
#voice-panel .screen-sound-toggle:focus-within{outline:2px solid #bafa78;outline-offset:2px}
@media(prefers-reduced-motion:reduce){#voice-panel .screen-sound-toggle input,#voice-panel .screen-sound-toggle input::before{transition:none}}

/* Compact voice controls: icon buttons and screen action in one row. */
.sidebar #voice-panel{padding:9px 10px;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;}
.sidebar #voice-panel .voice-heading{grid-column:1/-1;grid-row:1;gap:7px}
.sidebar #voice-panel .voice-connection-icon{width:26px;height:26px;border-radius:7px}
.sidebar #voice-panel .voice-connection-icon svg{width:17px;height:17px}
.sidebar #voice-panel .voice-caption{font-size:10px}
.sidebar #voice-panel #voice-status{grid-column:1/-1;grid-row:2;font-size:10px;line-height:1.3}
.sidebar #voice-panel .voice-controls{display:contents}
.sidebar #voice-panel .voice-controls button{grid-row:3;min-height:32px;height:32px;padding:6px;gap:0;border-radius:7px}
.sidebar #voice-panel .voice-controls button span{display:none}
.sidebar #voice-panel .voice-controls svg{width:18px;height:18px}
.sidebar #voice-panel #mute{grid-column:1}.sidebar #voice-panel #deafen{grid-column:2}.sidebar #voice-panel #hangup{grid-column:3}
.sidebar #voice-panel #share-screen{grid-column:4;grid-row:3;min-height:32px;height:32px;padding:4px;font-size:10px;border-radius:7px}
.sidebar #voice-panel .screen-options{grid-column:1/-1;min-width:0;font-size:10px;color:var(--nav-muted);margin:0}
.sidebar #voice-panel .screen-options summary{cursor:pointer;padding:3px 0;line-height:1.4}
.sidebar #voice-panel .screen-options .screen-sound-toggle{margin:5px 0 0;padding:7px 9px;font-size:11px}
.sidebar #voice-panel .voice-reconnect{font-size:10px;padding:3px;min-height:0}
@media(pointer:coarse){.sidebar #voice-panel .voice-controls button,.sidebar #voice-panel #share-screen{height:44px;min-height:44px}.sidebar #voice-panel .screen-options summary{padding:8px 0}}

/* Compact, consistent account footer. */
.sidebar .profile{margin:8px;padding:12px 10px 8px;border:1px solid var(--nav-line);border-radius:15px;background:var(--nav-bg);grid-template-columns:38px minmax(0,1fr);gap:8px 10px}
.sidebar .profile>#my-avatar{width:38px;height:38px;border-radius:12px;box-shadow:0 0 0 1px var(--nav-line)}
.sidebar .profile>div:not(.account-tools){min-width:0;align-self:center}.sidebar .profile #my-name{display:flex;align-items:center;gap:5px;font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar .profile small{font-size:10px;margin-top:4px;color:var(--nav-muted)}
.sidebar .profile .account-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding-top:8px;border-top:1px solid var(--nav-line)}
.sidebar .profile .account-tools button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;height:46px;min-height:46px;width:100%;min-width:0;margin:0;padding:5px 1px;background:transparent;border-radius:9px;color:var(--nav-muted);opacity:1}
.sidebar .profile .account-tools button span{font-size:9px;line-height:12px;font-weight:500}.sidebar .profile .account-tools button svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sidebar .profile .account-tools button:hover{background:var(--nav-hover);color:var(--nav-text)}.sidebar .profile .account-tools #logout:hover{background:#ed876b12;color:#e9a38e}
@media(max-width:700px){.sidebar .profile{margin:6px 8px;padding:10px 8px 6px}.sidebar .profile .account-tools button{height:44px;min-height:44px}}

/* Community header, actions and discovery share one rhythm. */
.sidebar .community-head{padding:18px 16px 12px;background:transparent;border:0}.sidebar .community-head>small{font-size:8px;letter-spacing:1.6px;color:var(--nav-muted)}.sidebar .community-head h2{font-size:21px;line-height:1.3;letter-spacing:-.4px;margin-top:7px;overflow-wrap:anywhere}.sidebar .community-presence{font-size:10px;line-height:16px;margin-top:7px;gap:6px;color:var(--nav-muted)}.sidebar .community-presence:before{width:5px;height:5px}
.sidebar .sidebar-actions{padding:0 12px 10px;gap:6px}.sidebar .sidebar-actions #invite{display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 10px;border-radius:10px;background:var(--nav-hover);border:1px solid var(--nav-line);color:var(--nav-text);font-size:11px;font-weight:500}.sidebar .sidebar-actions #invite:hover{background:var(--nav-active)}.sidebar .sidebar-actions #manage-community{display:grid;place-items:center;width:36px;min-height:36px;border:1px solid var(--nav-line);border-radius:10px;background:transparent;letter-spacing:0}.sidebar .sidebar-actions #manage-community:hover{background:var(--nav-hover)}
.sidebar .sidebar-actions svg,.sidebar .community-news-button svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.sidebar .channel-search-wrap{padding:0 12px 8px;position:relative}.sidebar .channel-search-wrap:before{content:'';position:absolute;left:24px;top:12px;width:10px;height:10px;border:1.5px solid var(--nav-muted);border-radius:50%;pointer-events:none}.sidebar .channel-search-wrap:after{content:'';position:absolute;left:34px;top:22px;width:5px;height:1.5px;background:var(--nav-muted);transform:rotate(45deg);pointer-events:none}.sidebar #channel-search{height:36px;min-height:36px;padding:8px 10px 8px 34px;font-size:11px;border:1px solid var(--nav-line);border-radius:10px;background:transparent;color:var(--nav-text)}.sidebar #channel-search:focus{border-color:#7ba64e;outline:none}
.sidebar .community-news-button{display:flex;align-items:center;gap:9px;margin:0 12px 14px;padding:9px 11px;min-height:36px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--nav-text);font-size:11px;text-align:left}.sidebar .community-news-button svg{color:var(--nav-muted)}.sidebar .community-news-button:after{content:'›';margin-left:auto;font-size:18px;color:var(--nav-muted)}.sidebar .community-news-button:hover{background:var(--nav-hover);border-color:var(--nav-line)}
@media(max-width:700px){.sidebar .community-head{padding:16px 44px 12px 16px}.sidebar .sidebar-actions #invite,.sidebar .sidebar-actions #manage-community,.sidebar #channel-search,.sidebar .community-news-button{min-height:40px}.sidebar .channel-search-wrap:before{top:14px}.sidebar .channel-search-wrap:after{top:24px}.sidebar #channel-search{font-size:16px}}

/* Calm channel list with consistent icons and contextual controls. */
.sidebar .channel-section{padding:0 10px 10px}.sidebar .channel-section .section-label{margin:0 0 4px;padding:0 3px;align-items:center}.sidebar .channel-section .section-toggle{font-size:9px;letter-spacing:.8px;padding:8px 3px;color:var(--nav-muted);font-weight:600}.sidebar .channel-section .voice-label{margin-top:22px}.sidebar .section-label>button:not(.section-toggle){width:26px;height:26px;min-width:26px;min-height:26px;border-radius:8px;color:var(--nav-muted)}
.sidebar .channel-row{position:relative;margin:3px 0;border-radius:10px}.sidebar .channel-section .channel{display:flex;align-items:center;min-height:38px;margin:0;padding:7px 9px;gap:9px;border-radius:10px;background:transparent;color:var(--nav-muted);transition:background .15s,color .15s}.sidebar .channel-section .channel:hover,.sidebar .channel-row:focus-within>.channel{background:var(--nav-hover);color:var(--nav-text)}.sidebar .channel-section .channel.selected{background:var(--nav-active);color:var(--nav-text)}.sidebar .channel-section .channel.in-voice{background:var(--nav-hover);color:var(--lime)}.sidebar .channel-section .channel.selected:before{display:block;left:0;top:11px;bottom:11px;width:3px;background:var(--lime);border-radius:4px}.sidebar .channel-section .channel>.channel-title{font-size:12px;font-weight:500}.sidebar .channel-section .channel.selected>.channel-title{font-weight:600;color:var(--nav-text)}
.sidebar .channel-symbol{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;opacity:.8}.sidebar .channel.selected .channel-symbol,.sidebar .channel.in-voice .channel-symbol{color:var(--lime);opacity:1}.sidebar .channel small{font-size:9px;font-variant-numeric:tabular-nums;padding:3px 5px;border-radius:6px;background:var(--nav-hover);color:var(--nav-muted);min-width:27px;text-align:center}.sidebar .channel-image{width:20px;height:20px;border-radius:6px;object-fit:cover}
.sidebar .channel-row-actions{right:4px;gap:1px;opacity:.35;transition:opacity .15s}.sidebar .channel-row:hover .channel-row-actions,.sidebar .channel-row:focus-within .channel-row-actions{opacity:1}.sidebar .channel-row-actions>button{width:25px;height:28px;border-radius:7px;color:var(--nav-muted)}.sidebar .channel-row-actions>button:hover{background:var(--nav-active);color:var(--nav-text)}.sidebar .channel-row-actions svg{width:14px;height:14px;stroke-width:1.6}.sidebar .channel-row>.channel{padding-right:59px!important}
@media(hover:none),(pointer:coarse){.sidebar .channel-row-actions{opacity:.8}.sidebar .channel-section .channel{min-height:44px}.sidebar .channel-row-actions>button{height:40px;width:28px}.sidebar .channel-row>.channel{padding-right:65px!important}}

.members{padding:20px 12px 12px;gap:0}.members>#member-count{font-size:9px;letter-spacing:1px;margin:0 8px 18px;color:var(--nav-muted)}#member-list{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin}.member-group{margin:0 0 16px}.member-group>summary{cursor:pointer;display:flex;align-items:center;gap:6px;list-style:none;padding:5px 8px 8px;font-size:10px;font-weight:600;color:var(--nav-muted)}.member-group>summary::-webkit-details-marker{display:none}.member-group>summary:before{content:'›';font-size:14px;transform:rotate(0deg)}.member-group[open]>summary:before{transform:rotate(90deg)}.member-group>summary>span{margin-left:auto;font-size:9px;font-variant-numeric:tabular-nums;padding:2px 6px;border-radius:6px;background:var(--nav-hover)}
#member-list .member{display:flex;align-items:center;gap:9px;padding:9px 7px;min-height:56px;border-radius:10px;position:relative}#member-list .member:hover,#member-list .member:focus-within{background:var(--nav-hover)}#member-list .member>.avatar{width:34px;height:34px;flex:none;border-radius:11px;font-size:11px}#member-list .member-copy{flex:1;min-width:0;overflow:visible}.member-name-line{display:flex;align-items:center;gap:4px;min-width:0}#member-list .profile-link{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;min-width:0;text-align:left}#member-list .member small{display:block;font-size:10px;margin-top:4px;color:var(--nav-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#member-list .member-more{width:26px;height:30px;flex:none;border-radius:8px;font-size:22px;padding:0;color:var(--nav-muted);opacity:.35}#member-list .member:hover .member-more,#member-list .member:focus-within .member-more{opacity:1}#member-list .member-more:hover{background:var(--nav-active);color:var(--nav-text)}
.members .members-invite-compact{padding:10px 0 0;margin:8px 0 0;background:transparent;border:0;border-top:1px solid var(--nav-line);border-radius:0;flex:none}.members-invite-compact>span,.members-invite-compact>h3,.members-invite-compact>p{display:none}.members .members-invite-compact button{width:100%;padding:11px 8px;border:1px solid var(--nav-line);border-radius:10px;background:transparent;font-size:11px;color:var(--nav-text)}.members .members-invite-compact button:hover{background:var(--nav-hover)}.members-invite-compact:has(button[hidden]){display:none}@media(hover:none){#member-list .member-more{opacity:.8}}

/* Friends directory follows the community navigation rhythm. */
.sidebar #contacts-panel{padding:0 12px 12px;scrollbar-width:thin}.sidebar .friends-controls{padding:0 0 10px;background:var(--nav-bg)}.sidebar .friend-add{display:flex;align-items:center;justify-content:center;min-height:36px;padding:8px 10px;background:var(--nav-hover);color:var(--nav-text);border:1px solid var(--nav-line);border-radius:10px;font-size:11px;font-weight:500}.sidebar .friend-add:hover{background:var(--nav-active)}.sidebar .friend-search{position:relative;margin-top:10px}.sidebar .friend-search:before{content:'';position:absolute;left:12px;top:12px;width:10px;height:10px;border:1.5px solid var(--nav-muted);border-radius:50%;pointer-events:none}.sidebar .friend-search:after{content:'';position:absolute;left:22px;top:22px;width:5px;height:1.5px;background:var(--nav-muted);transform:rotate(45deg);pointer-events:none}.sidebar .friend-search input{height:36px;min-height:36px;padding:8px 10px 8px 34px;border-radius:10px;background:transparent;border-color:var(--nav-line);color:var(--nav-text);font-size:11px}.sidebar .friend-search input:focus{outline:none;border-color:#7ba64e}
.sidebar .friends-list-label{margin:16px 5px 8px;font-size:9px;letter-spacing:.8px;color:var(--nav-muted);font-weight:600}.sidebar .friends-list-label span{background:var(--nav-hover);font-size:9px;min-width:20px;text-align:center;padding:2px 5px}.sidebar .friend-request{padding:12px;border:1px solid var(--nav-line);background:transparent;border-radius:12px;margin-bottom:8px}.sidebar .friend-request>.profile-link{font-size:12px;font-weight:600;color:var(--nav-text);padding:0;overflow-wrap:anywhere}.sidebar .friend-request small{font-size:10px;line-height:1.5;color:var(--nav-muted);margin:5px 0 10px}.sidebar .friend-request>div{gap:6px}.sidebar .friend-request>div button{padding:7px 10px;min-height:30px;border:1px solid var(--nav-line);border-radius:8px;background:var(--nav-hover);font-size:10px;color:var(--nav-text)}.sidebar .friend-request>div button[data-accept]{background:var(--nav-active);color:var(--lime)}.sidebar .friend-request>div button.muted-action{background:transparent;color:var(--nav-muted)}
.sidebar .friend-row{margin:3px 0;border-radius:11px}.sidebar .friend-row:hover,.sidebar .friend-row:focus-within{background:var(--nav-hover)}.sidebar .friend-row.selected{background:var(--nav-active);box-shadow:inset 3px 0 var(--lime)}.sidebar .friend-open{padding:10px 34px 10px 9px;min-height:56px;gap:10px;border-radius:11px}.sidebar .friend-open .avatar{width:34px;height:34px;border-radius:11px}.sidebar .friend-info strong{font-size:12px;font-weight:600;color:var(--nav-text)}.sidebar .friend-info small{font-size:10px;line-height:14px;color:var(--nav-muted);margin-top:3px}.sidebar .friend-actions-trigger{width:26px;height:30px;padding:0;border-radius:8px;color:var(--nav-muted);opacity:.4}.sidebar .friend-row:hover .friend-actions-trigger,.sidebar .friend-row:focus-within .friend-actions-trigger{opacity:1}.sidebar .friend-actions-trigger:hover{background:var(--nav-active);color:var(--nav-text)}
@media(hover:none){.sidebar .friend-actions-trigger{opacity:.85}}@media(max-width:700px){.sidebar .friend-add{min-height:40px}.sidebar .friend-search input{font-size:16px;min-height:40px}.sidebar .friend-search:before{top:14px}.sidebar .friend-search:after{top:24px}.sidebar .friend-request>div button{min-height:38px}}

#app.home-mode .community-head{position:relative;padding-right:56px}.sidebar .community-head .friend-add-compact{position:absolute;right:14px;top:30px;display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;font-size:23px;border-radius:10px;background:var(--nav-hover);border:1px solid var(--nav-line);color:var(--lime)}.sidebar .community-head .friend-add-compact:hover{background:var(--nav-active)}.sidebar .friends-controls .friend-search{margin-top:0}
.friend-request-group{margin:10px 0 14px}.friend-request-group>summary{display:flex;align-items:center;gap:7px;cursor:pointer;list-style:none;font-size:10px;color:var(--nav-muted);padding:8px 4px}.friend-request-group>summary::-webkit-details-marker{display:none}.friend-request-group>summary:before{content:'›';font-size:14px}.friend-request-group[open]>summary:before{transform:rotate(90deg)}.friend-request-group>summary>span{margin-left:auto;padding:2px 6px;border-radius:6px;background:var(--nav-hover);font-size:9px}.friend-request-group[data-request-group=incoming]>summary>span{color:var(--lime);background:var(--nav-active)}.sidebar .friend-request-group .friend-request{padding:10px;margin-top:4px}.friend-inbox-heading{display:flex;align-items:center;gap:6px;min-width:0}.friend-inbox-heading strong{flex:1;min-width:0}.friend-inbox-heading time{flex:none;font-size:9px;font-weight:400;color:var(--nav-muted);font-variant-numeric:tabular-nums}.sidebar .friend-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar .friend-open{padding-right:30px}.sidebar .friend-actions-trigger{right:2px;width:23px}.sidebar .friend-open>.unread-badge{flex:none}

/* Keep the time above the contextual menu; improve preview legibility. */
.sidebar .friend-open{padding:10px 10px 10px 9px;min-height:62px;align-items:center}.sidebar .friend-info small{font-size:11px;line-height:16px;color:var(--nav-text);opacity:.78;padding-right:30px;margin-top:5px}.sidebar .friend-inbox-heading{min-height:16px;align-items:center}.sidebar .friend-inbox-heading time{font-size:10px;line-height:14px;margin-left:4px}.sidebar .friend-actions-trigger{position:absolute;right:5px;top:auto;bottom:4px;transform:none;width:26px;height:26px;min-height:26px;display:grid;place-items:center;line-height:1;font-size:20px;z-index:1}.sidebar .friend-open>.unread-badge{margin-right:27px}@media(pointer:coarse){.sidebar .friend-actions-trigger{width:30px;height:30px;bottom:2px}.sidebar .friend-info small{padding-right:34px}}

/* Explicit friend action and readable request disclosures. */
#app.home-mode .community-head{padding-right:20px}
.sidebar .friends-controls .friend-add{width:100%;min-height:42px;gap:9px;font-size:13px;font-weight:650;background:var(--lime);color:#172010;border-color:transparent;border-radius:11px}
.sidebar .friends-controls .friend-add:hover{filter:brightness(1.06);background:var(--lime)}
.sidebar .friend-add svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sidebar .friends-controls .friend-search{margin-top:12px}
.sidebar .friend-request-group>summary{min-height:42px;padding:10px 9px;font-size:12px;line-height:18px;font-weight:600;color:var(--nav-text);background:var(--nav-hover);border:1px solid var(--nav-line);border-radius:9px;gap:9px}
.sidebar .friend-request-group>summary:before{content:'';width:6px;height:6px;flex:none;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);margin-right:2px}
.sidebar .friend-request-group[open]>summary:before{transform:rotate(45deg)}
.sidebar .friend-request-group>summary>span{font-size:11px;line-height:18px;min-width:22px;padding:0 5px;text-align:center;color:var(--lime);background:var(--nav-active)}
.sidebar .friend-request-group>summary:focus-visible,.sidebar .friend-add:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
.sidebar .friend-request-group .friend-request{margin-top:8px}

/* Stream viewer: controls stay visible in fullscreen and on narrow screens. */
.screen-panel{padding:0;overflow:hidden;background:#121a17;border:1px solid #40523a;border-radius:18px;box-shadow:0 24px 80px #0009;color:#edf4e9}
.screen-panel[hidden]{display:none!important}.stream-header{display:flex;align-items:center;gap:12px;padding:15px 18px;min-width:0}.stream-header strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stream-live{display:inline-flex;flex-shrink:0;align-items:center;gap:5px;border-radius:5px;background:#d73554;color:white;padding:3px 6px;font-size:10px;font-weight:800;line-height:1.2;white-space:nowrap}.stream-live:before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor}.voice-live{margin-left:auto;font-size:8px;padding:3px 4px}.voice-person-name{min-width:0}
.screen-panel video{width:100%;height:auto;max-height:65dvh;object-fit:contain;margin:0;background:#080c0a}.stream-toolbar{display:flex;align-items:center;gap:8px;padding:12px 16px;flex-wrap:wrap}.screen-panel .stream-toolbar button{min-height:40px;border:1px solid #40523a;border-radius:10px;background:#233021;color:#dcebd5;font-size:12px;padding:8px 12px}.stream-toolbar button:hover{background:#33462c}.stream-toolbar button:focus-visible,.stream-toolbar input:focus-visible{outline:2px solid #bcfa75;outline-offset:3px}.stream-toolbar button:disabled{opacity:.45;cursor:default}.stream-toolbar input[type=range]{width:110px;accent-color:#bcfa75;cursor:pointer}.stream-hint{display:block;padding:0 18px 12px;color:#a5b09d;font-size:11px}.stream-hint:empty{display:none}
.screen-panel:fullscreen,.screen-panel.stream-expanded{inset:0;width:100%;height:100dvh;max-width:none;border:0;border-radius:0;display:flex;flex-direction:column;z-index:10000}.screen-panel:fullscreen video,.screen-panel.stream-expanded video{flex:1;min-height:0;height:0;max-height:none}.screen-panel:fullscreen .stream-header,.screen-panel:fullscreen .stream-toolbar,.screen-panel.stream-expanded .stream-header,.screen-panel.stream-expanded .stream-toolbar{flex-shrink:0}
@media(max-width:600px){.screen-panel{right:8px;bottom:8px;width:calc(100vw - 16px)}.stream-header{padding:12px;gap:8px}.stream-toolbar{padding:10px;gap:6px}.stream-toolbar input[type=range]{width:85px}.screen-panel .stream-toolbar button{min-height:44px}.stream-header strong{font-size:11px}}

.screen-panel .stream-toolbar{padding:16px 18px;gap:10px;border-top:1px solid #30402c}.screen-panel .stream-toolbar .stream-leave{background:#47242a;border-color:#75404b;color:#ffccd3;margin-left:auto}.screen-panel .stream-toolbar .stream-leave:hover{background:#60313a}.stream-toolbar [hidden]{display:none!important}.voice-person .voice-live{font-size:9px;letter-spacing:.35px;padding:5px 7px;border-radius:6px;background:#49252e;color:#ffacbe;border:1px solid #874353;box-shadow:none}.voice-person .voice-live:before{width:6px;height:6px;color:#ff668b}.stream-hint{line-height:1.6;padding-bottom:16px}

.stream-mixer{display:grid;grid-template-columns:minmax(100px,1fr) 38px;align-items:center;gap:3px 8px;min-width:155px;margin:0;padding:0 4px;border:0;border-radius:0;background:transparent}.stream-mixer span{grid-column:1/-1;font-size:10px;color:#a5b09d}.stream-toolbar .stream-mixer input[type=range]{width:100%;min-width:100px;margin:0;height:18px;appearance:none;background:transparent;border:0;padding:0;box-shadow:none}.stream-mixer output{font-size:11px;color:#dfeece;font-variant-numeric:tabular-nums;text-align:right}.stream-mixer[hidden]{display:none!important}

.stream-mixer input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:#45573d}.stream-mixer input[type=range]::-webkit-slider-thumb{appearance:none;width:12px;height:12px;margin-top:-4px;border:0;border-radius:50%;background:#bcfa75;box-shadow:none}.stream-mixer input[type=range]::-moz-range-track{height:4px;border-radius:4px;background:#45573d}.stream-mixer input[type=range]::-moz-range-thumb{width:12px;height:12px;border:0;border-radius:50%;background:#bcfa75}.stream-toolbar .stream-mixer input:focus-visible{outline:2px solid #bcfa75;outline-offset:4px;border-radius:4px}

/* YouTube card with thumbnail (Discord-style). */
.video-card{display:grid;gap:6px;width:min(100%,432px);padding:12px 16px 16px;border:0;border-left:4px solid #bcfa75;border-radius:4px;background:#1b2219}
.video-card>.video-source{font-size:12px;color:#a3b09f}
.video-card>.video-author{font-size:14px;font-weight:650;color:#eef3ea}
.video-card>.video-title{display:block;margin:0;font-size:15px;font-weight:600;line-height:1.35;color:#5eb5ff;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.video-card>.video-title:hover{text-decoration:underline}
.video-card .video-player{position:relative;min-height:0;margin:6px 0 0;border-radius:6px;background:#11160f}
.video-player>button[data-youtube],.video-player>.video-open{position:absolute;inset:0;display:block;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:pointer}
.video-thumb{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.video-controls{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;gap:6px;padding:6px;border-radius:999px;background:#000b;pointer-events:none}
.video-controls>*{pointer-events:auto}
.video-play,.video-external{position:relative;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;color:#fff}
.video-play::after{content:"";margin-left:3px;border-style:solid;border-width:8px 0 8px 13px;border-color:transparent transparent transparent #fff}
.video-external svg{width:18px;height:18px}
.video-external:hover{background:#ffffff26}
.video-player>button[data-youtube]:hover~.video-controls .video-play,.video-player>.video-open:hover .video-play{background:#ffffff26}
.video-controls>.video-play{pointer-events:none}
.video-unavailable .video-controls{opacity:.6}

.video-card>.video-fullscreen{justify-self:end;display:inline-flex;align-items:center;gap:6px;margin:2px 0 0;padding:4px 8px;min-height:0;border:0;border-radius:6px;background:transparent;color:#a3b09f;font-size:12px;font-weight:600;cursor:pointer}
.video-card>.video-fullscreen:hover{color:#e8f2e2;background:#ffffff12}
.video-card>.video-fullscreen svg{width:15px;height:15px}
.video-player:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;border-radius:0;background:#000}
.video-player:fullscreen iframe{width:100%;height:100%}

.link-card{display:flex;gap:14px;align-items:flex-start;max-width:520px;margin-top:8px;padding:12px 14px;border-left:4px solid #bcfa75;border-radius:8px;background:#141a14;color:inherit;text-decoration:none!important}.link-card:hover{background:#182018}.link-text{display:grid;gap:4px;min-width:0;flex:1}.link-site{font-size:12px;color:var(--muted,#94a28f)}.link-title{font-weight:700;color:#bcfa75;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.link-description{font-size:13px;color:#c9d3c4;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.link-image{flex:none;width:96px;height:96px;object-fit:cover;border-radius:8px;background:#0b0f0c}@media (max-width:600px){.link-image{width:64px;height:64px}}
