
/* ===== persistent shell ===== */
/* Rift 0.2.1 — desktop chat, presence and profile pass */
:root{--r-green:#23a55a;--r-idle:#f0b232;--r-dnd:#f23f43;--r-off:#80848e;--r-accent:#d94f52;--r-bg0:#0b0d10;--r-bg1:#111318;--r-bg2:#17191f;--r-bg3:#1e2128;--r-hover:#20232b;--r-sel:#262a33}
.app-shell{grid-template-columns:72px 240px minmax(440px,1fr) 240px;background:#0f1115}.server-rail{padding:12px 0;align-items:center;gap:8px;background:#090a0d}.server-list{width:100%;align-items:center}.server-button{position:relative;width:48px;height:48px;flex-basis:48px;border-radius:50%;font-weight:700}.server-button:after{content:"";position:absolute;left:-12px;top:50%;width:4px;height:0;border-radius:0 4px 4px 0;background:#fff;transform:translateY(-50%);transition:.14s}.server-button:hover:after{height:20px}.server-button.active:after{height:40px}.server-button:hover,.server-button.active{border-radius:16px}.rail-divider{width:32px;height:2px;margin:0 auto}
.channel-panel{grid-template-rows:48px minmax(0,1fr) auto auto;background:#111318}.server-header{background:#111318;box-shadow:0 1px 0 rgba(0,0,0,.3)}.server-header strong{font-size:14px}.channel-navigation{padding:8px 6px 10px;overflow-y:auto}.channel-category{margin-top:13px}.channel-category:first-child{margin-top:3px}.channel-category-title{min-height:22px;padding:0 4px 4px;display:flex;align-items:center}.r021-category-label{min-width:0;flex:1;display:flex;gap:3px;align-items:center;color:#8e929b;font-size:10px;font-weight:700;letter-spacing:.02em;cursor:pointer}.r021-category-label:hover{color:#d8dadd}.r021-category-label i{width:12px;font-style:normal;color:#727984;transition:transform .12s}.channel-category.collapsed .r021-category-label i{transform:rotate(-90deg)}.channel-category.collapsed>.channel-row{display:none}.channel-row{grid-template-columns:minmax(0,1fr) 26px}.channel-item{min-height:34px;padding:5px 8px;border-radius:4px;font-size:13px;position:relative}.channel-item:hover{background:#1b1e24}.channel-item.active{background:#252831;color:#fff}.channel-item.unread{color:#f2f3f5;font-weight:650}.channel-item.unread:before{content:"";position:absolute;left:-6px;width:4px;height:8px;border-radius:0 3px 3px 0;background:#fff}.channel-symbol-small{width:18px;height:18px;display:grid;place-items:center;font-size:19px}.channel-symbol-small svg,.voice-connection-actions svg{width:18px;height:18px}.channel-manage{opacity:0}.channel-row:hover .channel-manage{opacity:1}
.voice-member-list{grid-column:1/-1;padding:1px 0 2px 27px;display:flex;flex-direction:column}.voice-member-row{width:100%;height:30px;border:0;border-radius:4px;background:transparent;color:#969ca6;display:grid;grid-template-columns:24px minmax(0,1fr) 20px;align-items:center;gap:6px;text-align:left;padding:2px 7px;cursor:pointer}.voice-member-row:hover{background:#1b1e24;color:#dbdde1}.voice-member-avatar{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:8px}.voice-member-row span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.voice-member-row i{font-style:normal;font-size:9px;color:#949aa3;text-align:center}
.content-panel{background:#101216}.content-header{background:#101216;box-shadow:0 1px 0 #20232a}.member-panel{background:#111318;border-left:1px solid #20232a}.member-panel-heading{height:42px;padding:0 10px;color:#8e929b}.member-list{padding:7px}.member-group-title{padding:13px 6px 5px;color:#737984;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.member-item{width:100%;min-height:43px;border:0;border-radius:5px;background:transparent;color:#c7cbd1;display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:8px;padding:5px 6px;text-align:left;cursor:pointer}.member-item:hover{background:#1b1e24;color:#fff}.member-item.offline{opacity:.48}.member-item.offline:hover{opacity:.72}.member-avatar-wrap{position:relative}.member-avatar-wrap .avatar{width:32px;height:32px}.presence-dot,.self-presence-dot,.profile-presence,.dm-presence-dot{border-radius:50%;background:var(--r-off)}.presence-dot{position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border:3px solid #111318}.presence-online{background:var(--r-green)!important}.presence-idle{background:var(--r-idle)!important}.presence-dnd{background:var(--r-dnd)!important}.presence-offline,.presence-invisible{background:var(--r-off)!important}.member-copy{min-width:0}.member-copy strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.member-copy>span{display:block;color:#777e89;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.member-role-mini{display:flex;gap:3px;margin-top:3px}.member-role-mini i{width:6px;height:6px;border-radius:50%}
.current-user-panel{position:relative;grid-template-columns:34px minmax(0,1fr) auto 30px;gap:7px;min-height:56px;padding:7px 6px;background:#0b0d10}.current-user-panel:hover{background:#0d0f13}.self-presence-dot{position:absolute;left:31px;bottom:8px;width:12px;height:12px;border:3px solid #0b0d10}.quick-user-controls{display:flex}.quick-user-controls button{width:28px;height:28px;border:0;border-radius:4px;background:transparent;color:#9da3ad;cursor:pointer}.quick-user-controls button:hover,.quick-user-controls button.active{background:#1f2229;color:#fff}.current-user-copy strong{font-size:11px}.current-user-copy span{font-size:9px}
.voice-connection-panel{min-height:58px;padding:8px 7px;border-top:1px solid #252932;background:#0e1115;display:flex;align-items:center;justify-content:space-between;gap:8px}.voice-connection-panel.hidden{display:none}.voice-connection-panel>div:first-child{min-width:0;display:flex;flex-direction:column}.voice-connection-panel strong{color:#3ba55d;font-size:11px}.voice-connection-panel span{color:#8b929e;font-size:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.voice-connection-actions{display:flex;gap:3px}.voice-connection-actions button{width:28px;height:28px;border:0;border-radius:5px;background:transparent;color:#a7adb7;display:grid;place-items:center;cursor:pointer}.voice-connection-actions button:hover{background:#20232a;color:#fff}.voice-connection-actions button.danger:hover{color:#f23f43}
.voice-view{overflow:auto;background:#101216}.voice-stage{width:min(860px,calc(100% - 50px));margin:38px auto;display:flex;flex-direction:column;gap:16px}.voice-stage-heading{display:flex;align-items:center;justify-content:center;gap:12px;text-align:left}.voice-stage-icon{width:44px;height:44px;border-radius:14px;background:#1a1d23;border:1px solid #272b33;display:grid;place-items:center;color:#d8dbe0}.voice-stage-icon svg{width:22px;height:22px}.voice-stage-heading h2{margin:0;font-size:20px}.voice-stage-heading p{margin:3px 0 0;color:#7d848e;font-size:10px}.voice-participants{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.voice-person-card{width:100%;border:1px solid #252932;border-radius:9px;background:#15181d;color:#f1f2f4;display:flex;align-items:center;gap:10px;padding:11px;text-align:left;cursor:pointer}.voice-person-card:hover{background:#1a1d23}.voice-person-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;color:#fff;position:relative}.voice-person-copy{display:flex;flex-direction:column}.voice-person-copy strong{font-size:12px}.voice-person-copy span{font-size:9px;color:#838a95}.voice-stage-controls{display:flex;justify-content:center;gap:8px}.voice-stage-status{text-align:center;color:#7f8691;font-size:11px}
.profile-popout,.status-popout{position:fixed;z-index:300;width:300px;border:1px solid #2b3039;border-radius:9px;background:#111318;box-shadow:0 16px 44px rgba(0,0,0,.45);overflow:hidden}.profile-popout.hidden,.status-popout.hidden{display:none}.profile-banner{height:64px}.profile-popout-body{position:relative;padding:42px 14px 14px}.profile-avatar-large{position:absolute;left:14px;top:-34px;width:68px;height:68px;border:5px solid #111318;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:18px;font-weight:700}.profile-presence{position:absolute;right:0;bottom:1px;width:17px;height:17px;border:4px solid #111318}.profile-identity{display:flex;flex-direction:column;padding-bottom:10px;border-bottom:1px solid #262a32}.profile-identity strong{font-size:18px}.profile-identity span{color:#a2a7b0;font-size:11px}.profile-status-text{margin:10px 0;color:#e2e4e7;font-size:11px}.profile-section{margin-top:12px}.profile-section h4{margin:0 0 5px;color:#b4b9c1;font-size:9px;text-transform:uppercase;letter-spacing:.05em}.profile-section p{margin:2px 0;color:#d3d6da;font-size:10px;line-height:1.45}.profile-role-list{display:flex;gap:5px;flex-wrap:wrap}.profile-role{display:flex;align-items:center;gap:5px;border-radius:4px;background:#1c1f25;padding:3px 6px;color:#c8ccd2;font-size:9px}.profile-role i{width:7px;height:7px;border-radius:50%}
.status-popout{width:280px;padding:8px}.status-profile-row{display:flex;align-items:center;gap:9px;padding:7px}.status-profile-row>span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:10px}.status-profile-row div{display:flex;flex-direction:column}.status-profile-row strong{font-size:12px}.status-profile-row small{color:#7c838e;font-size:9px}.popover-separator{height:1px;background:#282c34;margin:5px}.status-option,.status-custom-action{width:100%;border:0;border-radius:5px;background:transparent;color:#d0d3d8;display:flex;align-items:center;gap:10px;padding:8px;cursor:pointer;text-align:left}.status-option:hover,.status-custom-action:hover{background:#1e2128}.status-option>i{width:11px;height:11px;border-radius:50%}.status-option span{display:flex;flex-direction:column}.status-option strong{font-size:11px}.status-option small{color:#777e88;font-size:9px;margin-top:1px}.status-custom-action{font-size:11px}
.dm-item{position:relative}.dm-presence-dot{position:absolute;left:31px;top:30px;width:9px;height:9px;border:2px solid #111318;pointer-events:none}.home-view{background:#101216}.home-toolbar.home-hero,.home-grid,.home-section-title,.home-server-grid{width:min(820px,100%)}.home-grid{display:flex;gap:8px;margin-bottom:8px}.home-server-card:hover{background:#171a20}.social-row{border-color:#22262e}.social-row:hover{background:#171a20}
.profile-modal-021{width:min(620px,calc(100vw - 32px));max-width:620px}.profile-extra-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.profile-extra-fields label{display:flex;flex-direction:column;gap:7px;color:#a8aeb8;font-size:11px}.profile-extra-fields select,#settings-form textarea{width:100%;border:1px solid #272c35;border-radius:6px;background:#0c0e12;color:#f1f2f4;padding:10px}.profile-extra-fields select{height:40px;padding:0 10px}
@media(max-width:1100px){.app-shell{grid-template-columns:64px 232px minmax(380px,1fr)}.member-panel{position:fixed;z-index:60;right:0;top:0;bottom:0;width:240px;box-shadow:-10px 0 28px rgba(0,0,0,.32)}.member-panel.closed{display:none}}
@media(max-width:760px){.app-shell{grid-template-columns:56px minmax(0,1fr)}.server-rail{width:56px}.server-button{width:42px;height:42px;flex-basis:42px}.channel-panel{width:min(280px,calc(100vw - 56px))}.profile-extra-fields{grid-template-columns:1fr}.voice-participants{grid-template-columns:1fr}}


/* ===== desktop shell ===== */
/* Rift 0.2.1 refinement — Discord-inspired desktop information architecture.
   Rift branding and original iconography are retained; layout and interaction density mirror
   the familiar desktop chat model much more closely. */
:root{
  --ref-bg-rail:#0a0b0e;
  --ref-bg-side:#111318;
  --ref-bg-side-2:#0d0f13;
  --ref-bg-main:#0f1115;
  --ref-bg-main-2:#15171c;
  --ref-bg-hover:#1d2026;
  --ref-bg-active:#252830;
  --ref-border:#23262d;
  --ref-border-soft:#1b1e24;
  --ref-text:#f2f3f5;
  --ref-text-2:#c7cad1;
  --ref-muted:#949ba5;
  --ref-muted-2:#6f7681;
  --ref-green:#23a55a;
  --ref-red:#f23f43;
  --ref-yellow:#f0b232;
  --ref-accent:#d84f52;
}

body{font-size:14px;background:var(--ref-bg-main);color:var(--ref-text)}
button{font:inherit}
.hidden{display:none!important}

/* APP GRID */
.app-shell{
  grid-template-columns:72px 248px minmax(520px,1fr) 248px!important;
  background:var(--ref-bg-main)!important;
}
.server-rail{
  width:72px!important;
  padding:12px 0!important;
  background:var(--ref-bg-rail)!important;
  border-right:0!important;
  gap:8px!important;
  overflow-x:hidden;
}
.server-list{gap:8px!important;align-items:center!important;width:100%!important}
.server-button{
  width:48px!important;height:48px!important;flex:0 0 48px!important;
  border-radius:50%!important;
  font-size:13px!important;font-weight:750!important;
  background:#1b1e24!important;color:#d4d7dc!important;
  transition:background .16s ease,border-radius .18s cubic-bezier(.2,.8,.2,1),color .16s ease!important;
  overflow:visible!important;
}
.server-button:hover,.server-button.active{border-radius:15px!important;color:#fff!important}
.server-button:hover{background:#2a2e36!important}
.server-button.active{background:var(--ref-accent)!important}
.server-button::before{
  content:""!important;position:absolute!important;left:-12px!important;top:50%!important;
  width:4px!important;height:0!important;border-radius:0 4px 4px 0!important;
  background:#fff!important;transform:translateY(-50%)!important;
  transition:height .18s cubic-bezier(.2,.8,.2,1)!important;
}
.server-button:hover::before{height:20px!important}.server-button.active::before{height:40px!important}
.server-button::after{display:none!important}
.home-button{background:#1b1e24!important;color:var(--ref-accent)!important}
.home-button:hover,.home-button.active{background:var(--ref-accent)!important;color:#fff!important}
.add-server,.join-server{border:0!important;background:#171a20!important;color:#8fa3a0!important}
.add-server:hover,.join-server:hover{background:#236a48!important;color:#fff!important}
.rail-divider{width:32px!important;height:2px!important;background:#272a31!important;margin:0 auto!important}
.rift-mark.mini{transform:scale(1.08)}

/* LEFT SIDEBAR */
.channel-panel{
  background:var(--ref-bg-side)!important;
  border-right:0!important;
  grid-template-rows:48px minmax(0,1fr) auto auto!important;
  min-width:0;
}
.server-header{
  height:48px!important;padding:0 12px 0 16px!important;
  background:var(--ref-bg-side)!important;
  border-bottom:1px solid rgba(0,0,0,.32)!important;
  box-shadow:0 1px 0 rgba(0,0,0,.25)!important;
  cursor:pointer;
}
.server-header strong{font-size:15px!important;font-weight:700!important;letter-spacing:-.01em}
.server-header .icon-button{width:28px!important;height:28px!important;font-size:0!important}
.server-header .icon-button svg{width:18px;height:18px}
.home-navigation,.channel-navigation{padding:8px!important;overflow-y:auto!important}
.home-navigation{gap:2px!important}
.r021-search-wrap{padding:0 2px 8px}
.r021-search{
  width:100%;height:30px;border:1px solid #292d35;border-radius:5px;
  background:#0b0d11;color:#dce0e5;padding:0 10px;font-size:11px;outline:none;
}
.r021-search::placeholder{color:#737b86}.r021-search:focus{border-color:#444b57}
.home-nav-item{
  min-height:42px!important;border-radius:5px!important;padding:0 10px!important;
  gap:12px!important;font-size:13px!important;font-weight:560!important;
  color:#a8adb5!important;
}
.home-nav-item:hover{background:#1b1e24!important;color:#e2e4e7!important}
.home-nav-item.active{background:#252830!important;color:#fff!important}
.home-nav-item>span{display:grid!important;place-items:center!important;width:22px!important;color:currentColor!important}
.home-nav-item svg{width:20px;height:20px}
.r021-home-placeholder{position:relative}.r021-home-placeholder[disabled]{opacity:.78;cursor:not-allowed}
.r021-coming{margin-left:auto;font-size:8px;color:#747b86;text-transform:uppercase;letter-spacing:.05em}
.section-heading{
  min-height:30px!important;margin:12px 8px 4px!important;padding:0!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  color:#8d949f!important;font-size:10px!important;font-weight:700!important;text-transform:none!important;letter-spacing:.02em!important;
}
.section-heading button{font-size:0!important;width:22px;height:22px;border-radius:4px!important}
.section-heading button svg{width:16px;height:16px}
.dm-list{gap:2px!important}
.dm-item{
  min-height:42px!important;padding:5px 8px!important;border-radius:5px!important;
  grid-template-columns:34px minmax(0,1fr) auto!important;gap:8px!important;
  color:#9da3ad!important;
}
.dm-item:hover,.dm-item.active{background:#1b1e24!important;color:#fff!important}
.dm-item .avatar{width:32px!important;height:32px!important;font-size:10px!important}
.dm-item-copy strong{font-size:13px!important;font-weight:550!important}.dm-item-copy span{font-size:10px!important}
.dm-presence-dot{left:31px!important;top:28px!important;width:11px!important;height:11px!important;border:3px solid var(--ref-bg-side)!important}

/* SERVER UTILITIES + CHANNELS */
.r021-server-utilities{padding:3px 0 2px;border-bottom:1px solid transparent}
.r021-server-utility{
  width:100%;min-height:34px;border:0;border-radius:4px;background:transparent;
  color:#949ba5;display:flex;align-items:center;gap:10px;padding:0 8px;text-align:left;font-size:13px;cursor:not-allowed;
}
.r021-server-utility:hover{background:#1b1e24;color:#cdd0d5}.r021-server-utility svg{width:19px;height:19px}.r021-server-utility small{margin-left:auto;color:#656d78;font-size:8px}
.channel-category{margin-top:13px!important}.channel-category:first-of-type{margin-top:8px!important}
.channel-category-title{min-height:24px!important;padding:0 2px 3px!important}
.r021-category-label{font-size:11px!important;color:#8e949e!important;text-transform:none!important;letter-spacing:.01em!important}
.r021-category-label i{width:14px!important;font-size:11px!important}
.channel-row{grid-template-columns:minmax(0,1fr) 28px!important;gap:1px!important}
.channel-item{
  min-height:34px!important;border-radius:4px!important;padding:4px 7px!important;
  grid-template-columns:22px minmax(0,1fr)!important;gap:5px!important;
  color:#949ba5!important;font-size:14px!important;font-weight:520!important;
  transition:background .08s ease,color .08s ease!important;
}
.channel-item:hover{background:#1b1e24!important;color:#d7d9dd!important}
.channel-item.active{background:#272a31!important;color:#fff!important}
.channel-item.unread{color:#f2f3f5!important;font-weight:650!important}
.channel-symbol-small{width:22px!important;height:22px!important;font-size:22px!important;color:#8d949f!important}
.channel-symbol-small svg{width:20px!important;height:20px!important;stroke-width:1.9}
.channel-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.channel-manage{width:28px!important;height:28px!important;font-size:0!important}.channel-manage svg{width:17px;height:17px}
.r021-channel-meta{margin-left:auto;display:flex;align-items:center;gap:6px;color:#5fbd78;font-size:9px;font-variant-numeric:tabular-nums}
.voice-member-list{padding:1px 0 2px 28px!important}
.voice-member-row{height:32px!important;grid-template-columns:26px minmax(0,1fr) 22px!important;padding:2px 6px!important;color:#9da3ad!important}
.voice-member-avatar{width:24px!important;height:24px!important}.voice-member-row span:nth-child(2){font-size:12px!important}
.voice-member-row i{font-size:0!important}.voice-member-row i svg{width:15px;height:15px}

/* VOICE CONNECTION + USER CONTROL DOCK */
.voice-connection-panel{
  min-height:112px!important;padding:8px!important;border-top:1px solid #23262d!important;
  background:#0c0e12!important;display:block!important;
}
.voice-connection-panel.hidden{display:none!important}
.r021-voice-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.r021-voice-summary-copy{display:flex;align-items:center;gap:8px;min-width:0}.r021-voice-quality{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:rgba(35,165,90,.12);color:#34c970}.r021-voice-quality svg{width:18px;height:18px}
.r021-voice-summary-copy>div{min-width:0;display:flex;flex-direction:column}.r021-voice-summary strong{font-size:12px!important;color:#35c26f!important}.r021-voice-summary span{font-size:9px!important;color:#8d949e!important}
.r021-voice-summary-actions{display:flex;gap:3px}.r021-voice-summary-actions button{width:28px;height:28px;border:0;border-radius:5px;background:transparent;color:#aab0b8;display:grid;place-items:center;cursor:pointer}.r021-voice-summary-actions button:hover{background:#20232a;color:#fff}.r021-voice-summary-actions button.danger:hover{color:#f23f43}.r021-voice-summary-actions svg{width:17px;height:17px}
.r021-voice-shortcuts{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.r021-voice-shortcuts button{height:31px;border:1px solid #2a2e36;border-radius:5px;background:#171a20;color:#c3c7ce;display:grid;place-items:center;cursor:pointer}.r021-voice-shortcuts button:hover:not(:disabled){background:#20242b;color:#fff}.r021-voice-shortcuts button:disabled{color:#696f79;cursor:not-allowed}.r021-voice-shortcuts svg{width:17px;height:17px}
.current-user-panel{
  min-height:58px!important;grid-template-columns:36px minmax(0,1fr) auto!important;gap:8px!important;
  padding:7px 7px!important;background:#0a0c10!important;border-top:1px solid #20232a!important;
  cursor:pointer;
}
.current-user-panel:hover{background:#101318!important}.current-user-panel>.avatar{width:34px!important;height:34px!important;font-size:10px!important}
.current-user-copy strong{font-size:12px!important;font-weight:650!important}.current-user-copy span{font-size:9px!important;color:#7f8691!important}
.self-presence-dot{left:31px!important;bottom:8px!important;width:13px!important;height:13px!important;border:3px solid #0a0c10!important}
.quick-user-controls{display:flex!important;gap:1px!important}.quick-user-controls button,#settings-button{width:31px!important;height:31px!important;font-size:0!important;display:grid!important;place-items:center!important}
.quick-user-controls button svg,#settings-button svg{width:19px;height:19px}.quick-user-controls button.muted{background:#40161b!important;color:#ff777d!important}.quick-user-controls button:hover,#settings-button:hover{background:#20232a!important;color:#fff!important}

/* CONTENT HEADER */
.content-panel{background:var(--ref-bg-main)!important}.content-header{height:48px!important;padding:0 12px 0 14px!important;background:var(--ref-bg-main)!important;border-bottom:1px solid #23262d!important;box-shadow:none!important}
.channel-heading{min-width:0!important;gap:8px!important}.channel-heading>.channel-symbol{width:24px!important;display:grid!important;place-items:center!important;font-size:22px!important;color:#a4abb4!important}.channel-heading>.channel-symbol svg{width:21px;height:21px}.channel-heading>div{min-width:0!important}.channel-heading strong{font-size:14px!important}.channel-heading span:last-child{font-size:10px!important;color:#777f89!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header-actions{gap:2px!important}.header-actions .icon-button,.r021-header-tool{width:32px!important;height:32px!important;font-size:0!important;border:0!important;border-radius:5px!important;background:transparent!important;color:#a6adb6!important;display:grid!important;place-items:center!important;cursor:pointer}.header-actions .icon-button:hover,.r021-header-tool:hover:not(:disabled){background:#1d2026!important;color:#fff!important}.header-actions svg,.r021-header-tool svg{width:20px;height:20px}.r021-header-tool:disabled{opacity:.42;cursor:not-allowed}.r021-header-search{width:180px;height:26px;border:0;border-radius:4px;background:#090b0e;color:#cfd3d8;padding:0 28px 0 8px;font-size:11px;outline:1px solid #252931}.r021-header-search:focus{outline-color:#3a404b}.r021-header-search-wrap{position:relative;display:flex;align-items:center}.r021-header-search-wrap svg{position:absolute;right:7px;width:15px;height:15px;color:#747b85;pointer-events:none}

/* HOME / FRIENDS */
.home-view{padding:0!important;background:var(--ref-bg-main)!important;overflow:auto!important}.home-toolbar.home-hero{display:none!important}.home-grid{display:none!important}.home-section-title{width:auto!important;margin:0!important;padding:0!important}.home-server-grid{width:auto!important;margin:0!important}
.r021-friends-shell{height:100%;display:grid;grid-template-columns:minmax(420px,1fr) 340px;min-height:0}.r021-friends-main{min-width:0;padding:16px 20px 30px;overflow:auto}.r021-friends-side{border-left:1px solid #23262d;padding:18px 14px;background:#101216;overflow:auto}.r021-friends-side h3{margin:0 0 14px;font-size:14px}.r021-friend-search{height:34px;width:100%;border:1px solid #292d34;border-radius:5px;background:#090b0e;color:#e2e5e8;padding:0 11px;margin-bottom:18px;outline:none}.r021-friend-search:focus{border-color:#444a55}.r021-friend-count{font-size:10px;color:#858c96;text-transform:uppercase;font-weight:700;margin:0 0 6px}.social-row{min-height:60px!important;padding:9px 4px!important;border-top:1px solid #23262d!important;border-bottom:0!important;grid-template-columns:40px minmax(0,1fr) auto!important;gap:10px!important}.social-row:hover{background:transparent!important}.social-row .avatar{width:36px!important;height:36px!important}.social-copy strong{font-size:14px!important}.social-copy span{font-size:10px!important}.social-actions .small-button{width:34px;height:34px;border-radius:50%!important;font-size:0!important;padding:0!important;display:grid;place-items:center;background:#1f2228!important}.social-actions .small-button::after{content:"•••";font-size:14px}.social-actions .small-button.primary::after{content:""}.social-actions .small-button.primary{background:#1f2228!important}.social-actions .small-button.primary svg{width:18px;height:18px}.r021-active-card{border:1px solid #252931;border-radius:8px;background:#15181d;padding:12px;margin-bottom:8px}.r021-active-user{display:flex;align-items:center;gap:9px}.r021-active-user .avatar{width:34px;height:34px}.r021-active-user strong{font-size:12px}.r021-active-user span{display:block;color:#818893;font-size:9px;margin-top:2px}.r021-active-empty{color:#737a85;font-size:11px;line-height:1.5;text-align:center;padding:44px 10px}.r021-active-empty strong{display:block;color:#c6cad0;font-size:13px;margin-bottom:4px}
.r021-home-tabs{display:none;align-items:center;gap:4px;min-width:0}.r021-home-tabs.active{display:flex}.r021-home-title{display:flex;align-items:center;gap:8px;padding-right:12px;margin-right:8px;border-right:1px solid #2a2e35;font-weight:700}.r021-home-title svg{width:20px;height:20px;color:#a3aab4}.r021-home-tab{height:30px;border:0;border-radius:4px;background:transparent;color:#a4abb4;padding:0 10px;font-size:12px;font-weight:600;cursor:pointer}.r021-home-tab:hover{background:#1c1f25;color:#e9eaed}.r021-home-tab.active{background:#272a31;color:#fff}.r021-home-tab.add{background:#248046;color:#fff}.r021-home-tab.add:hover{background:#1f7340}.r021-pending-badge{min-width:17px;height:17px;border-radius:9px;background:#da373c;color:#fff;font-size:9px;display:inline-grid;place-items:center;margin-left:5px;padding:0 4px}

/* CHAT */
.chat-view{background:var(--ref-bg-main)!important}.message-list{padding-top:14px!important}.message{padding:2px 118px 2px 16px!important}.message:hover{background:#121419!important}.message>.avatar{width:40px!important;height:40px!important;margin-right:12px!important}.message-author{font-size:14px!important;font-weight:650!important}.message-time{font-size:9px!important}.message-text{font-size:14px!important;line-height:1.45!important}.message-actions{top:-8px!important;background:#111318!important;border-color:#2a2e36!important}.composer{margin:0 16px 16px!important;border-radius:8px!important;min-height:44px!important;background:#1b1e24!important;border:1px solid #252931!important}.composer textarea{font-size:14px!important}.composer-action,.send-button{width:34px!important;height:34px!important;font-size:0!important;display:grid!important;place-items:center!important}.composer-action svg,.send-button svg{width:20px;height:20px}

/* MEMBERS */
.member-panel{background:var(--ref-bg-side)!important;border-left:1px solid #20232a!important}.member-panel-heading{height:42px!important;padding:0 10px!important}.member-list{padding:8px!important}.member-group-title{padding:12px 7px 5px!important;font-size:10px!important;color:#838a94!important}.member-item{min-height:44px!important;padding:5px 6px!important;grid-template-columns:36px minmax(0,1fr)!important}.member-avatar-wrap .avatar{width:34px!important;height:34px!important}.member-copy strong{font-size:13px!important}.member-copy>span{font-size:9px!important}.presence-dot{width:12px!important;height:12px!important;border:3px solid var(--ref-bg-side)!important}

/* VOICE STAGE */
.voice-view{background:#07080a!important;overflow:hidden!important;position:relative!important}.r021-voice-screen{height:100%;display:grid;grid-template-rows:42px minmax(0,1fr) 76px;background:#07080a}.r021-voice-topbar{display:flex;align-items:center;justify-content:space-between;padding:0 16px;color:#cdd0d6}.r021-voice-topbar>div{display:flex;align-items:center;gap:8px;font-weight:650}.r021-voice-topbar svg{width:19px;height:19px}.r021-voice-grid{min-height:0;overflow:auto;padding:8px 24px 120px;display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));grid-auto-rows:minmax(230px,1fr);gap:8px;align-content:center}.r021-video-tile{position:relative;min-height:230px;border-radius:8px;background:#2a2829;border:1px solid #333234;display:grid;place-items:center;overflow:hidden}.r021-video-avatar{width:76px;height:76px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:20px;font-weight:700;box-shadow:0 0 0 4px transparent}.r021-video-avatar.speaking{box-shadow:0 0 0 4px var(--ref-green)}.r021-video-name{position:absolute;left:10px;bottom:10px;background:rgba(0,0,0,.75);border-radius:4px;padding:4px 7px;font-size:11px;font-weight:650}.r021-activity-tile{background:radial-gradient(circle at 50% 25%,#311135 0,#160414 46%,#050505 100%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center}.r021-activity-art{display:flex;align-items:flex-end;gap:8px;font-size:54px;filter:saturate(1.15)}.r021-activity-actions{display:flex;gap:8px}.r021-activity-actions button{height:34px;border:1px solid #393d45;border-radius:5px;background:#17191e;color:#e3e5e8;padding:0 12px;font-size:11px;font-weight:650}.r021-activity-actions button:disabled{opacity:.7;cursor:not-allowed}.r021-voice-controls-floating{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:7px;border:1px solid #24272e;border-radius:12px;background:#0b0c0f;box-shadow:0 12px 30px rgba(0,0,0,.4)}.r021-call-group{display:flex;overflow:hidden;border:1px solid #2a2d34;border-radius:8px}.r021-call-group button,.r021-call-button{width:44px;height:42px;border:0;background:#15171b;color:#e2e4e7;display:grid;place-items:center;cursor:pointer}.r021-call-group button+button{border-left:1px solid #292c33}.r021-call-group button:hover:not(:disabled),.r021-call-button:hover:not(:disabled){background:#202329}.r021-call-group button:disabled{color:#686e78;cursor:not-allowed}.r021-call-group button.active{background:#50191e;color:#ff7f84}.r021-call-group svg,.r021-call-button svg{width:20px;height:20px}.r021-call-button.disconnect{background:#da373c!important;color:#fff;border-radius:8px}.r021-call-button.disconnect:hover{background:#bd2f34!important}.r021-voice-corner{position:absolute;right:20px;bottom:24px;display:flex;gap:6px}.r021-voice-corner button{width:34px;height:34px;border:0;border-radius:5px;background:transparent;color:#aeb4bc;display:grid;place-items:center}.r021-voice-corner svg{width:19px;height:19px}

/* PROFILE POPOUT */
.r021-profile-card,.r021-status-menu{position:fixed;z-index:900;width:320px;border:1px solid #282c34;border-radius:9px;background:#0f1115;box-shadow:0 18px 48px rgba(0,0,0,.58);overflow:hidden;animation:r021-pop .12s ease-out}
@keyframes r021-pop{from{opacity:0;transform:scale(.97) translateY(3px)}to{opacity:1;transform:scale(1) translateY(0)}}
.r021-profile-banner{height:72px;background:#231923}.r021-profile-body{position:relative;padding:48px 14px 14px}.r021-profile-avatar{position:absolute;left:14px;top:-42px;width:82px;height:82px;border:6px solid #0f1115;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:20px;font-weight:750}.r021-profile-presence{position:absolute;right:0;bottom:4px;width:20px;height:20px;border-radius:50%;border:5px solid #0f1115}.r021-profile-name{font-size:19px;font-weight:750;line-height:1.1}.r021-profile-user{font-size:11px;color:#b1b6be;margin-top:4px}.r021-profile-custom{display:flex;align-items:flex-start;gap:8px;margin:11px 0;padding:8px;border:1px solid #2a2e35;border-radius:8px;background:#17191e;color:#c6cad0;font-size:10px}.r021-profile-custom i{width:10px;height:10px;border-radius:50%;margin-top:2px}.r021-profile-actions{display:flex;gap:7px;margin:10px 0}.r021-profile-actions button{height:34px;border:0;border-radius:5px;background:#3134a9;color:#fff;padding:0 12px;font-size:11px;font-weight:650;cursor:pointer}.r021-profile-actions button.secondary{width:34px;padding:0;background:#20232a}.r021-profile-section{margin-top:12px}.r021-profile-section h4{margin:0 0 5px;color:#aeb3bb;font-size:9px;text-transform:none}.r021-profile-section p{margin:0;color:#d2d5da;font-size:10px;line-height:1.5}.r021-profile-roles{display:flex;gap:4px;flex-wrap:wrap}.r021-profile-role{display:flex;align-items:center;gap:5px;padding:3px 6px;border-radius:4px;background:#1d2026;color:#c8ccd2;font-size:9px}.r021-profile-role i{width:7px;height:7px;border-radius:50%}.r021-profile-menu{margin-top:12px;border-radius:6px;background:#17191e;padding:4px}.r021-profile-menu button{width:100%;min-height:34px;border:0;border-radius:4px;background:transparent;color:#bfc3ca;text-align:left;padding:0 9px;display:flex;align-items:center;justify-content:space-between;font-size:11px;cursor:pointer}.r021-profile-menu button:hover:not(:disabled){background:#24272e;color:#fff}.r021-profile-menu button:disabled{color:#626973;cursor:not-allowed}.r021-profile-menu button svg{width:17px;height:17px}.r021-status-menu{width:280px;padding:6px}.r021-status-option{width:100%;min-height:42px;border:0;border-radius:5px;background:transparent;color:#d5d8dc;display:grid;grid-template-columns:16px minmax(0,1fr);gap:9px;align-items:center;text-align:left;padding:6px 8px;cursor:pointer}.r021-status-option:hover{background:#20232a}.r021-status-option i{width:11px;height:11px;border-radius:50%}.r021-status-option strong{display:block;font-size:11px}.r021-status-option small{display:block;color:#787f8a;font-size:9px;margin-top:1px}.r021-status-divider{height:1px;background:#2a2d34;margin:5px}

/* FULL SETTINGS */
.r021-settings{position:fixed;z-index:850;inset:0;background:#101216;display:grid;grid-template-columns:minmax(220px,1fr) minmax(580px,820px) 72px;animation:r021-settings-in .13s ease-out}
@keyframes r021-settings-in{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:none}}
.r021-settings-nav-wrap{background:#0f1115;display:flex;justify-content:flex-end;overflow:auto}.r021-settings-nav{width:236px;padding:54px 10px 40px}.r021-settings-group{margin-bottom:14px}.r021-settings-label{padding:6px 10px;color:#7f8691;font-size:9px;font-weight:750;text-transform:uppercase}.r021-settings-nav button{width:100%;min-height:34px;border:0;border-radius:4px;background:transparent;color:#aeb4bc;text-align:left;padding:0 10px;font-size:12px;cursor:pointer}.r021-settings-nav button:hover{background:#1d2026;color:#e2e4e7}.r021-settings-nav button.active{background:#2a2d34;color:#fff}.r021-settings-nav button.danger{color:#ef7378}.r021-settings-main{padding:54px 32px 70px;overflow:auto}.r021-settings-main h1{margin:0 0 20px;font-size:20px}.r021-settings-close{padding-top:50px}.r021-settings-close button{width:36px;height:36px;border:2px solid #777e88;border-radius:50%;background:transparent;color:#adb3bb;display:grid;place-items:center;cursor:pointer}.r021-settings-close button:hover{color:#fff;border-color:#fff}.r021-settings-close small{display:block;margin-top:7px;width:36px;text-align:center;color:#777e88;font-size:8px;font-weight:700}
.r021-account-card{border-radius:9px;background:#191b21;overflow:hidden}.r021-account-banner{height:88px;background:#251a25}.r021-account-body{position:relative;padding:54px 16px 18px}.r021-account-avatar{position:absolute;top:-46px;left:16px;width:92px;height:92px;border-radius:50%;border:7px solid #191b21;display:grid;place-items:center;color:#fff;font-size:22px;font-weight:750}.r021-account-name{font-size:18px;font-weight:750}.r021-account-user{color:#a5abb4;font-size:11px;margin-top:3px}.r021-account-fields{margin-top:18px;border-radius:7px;background:#111318;padding:6px 14px}.r021-account-field{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #24272e}.r021-account-field:last-child{border-bottom:0}.r021-account-field span{display:block;color:#848b96;font-size:9px;text-transform:uppercase;font-weight:700}.r021-account-field strong{display:block;font-size:11px;margin-top:3px}.r021-account-field button{height:30px;border:0;border-radius:4px;background:#343842;color:#fff;padding:0 12px;font-size:10px;font-weight:650}.r021-account-field button:disabled{opacity:.55;cursor:not-allowed}
.r021-profile-settings-grid{display:grid;grid-template-columns:210px minmax(260px,360px) minmax(260px,1fr);gap:22px;align-items:start}.r021-profile-controls{display:flex;flex-direction:column;gap:16px}.r021-control-block>label{display:block;color:#c9cdd2;font-size:10px;font-weight:650;margin-bottom:6px}.r021-control-box{min-height:68px;border:1px solid #2b2f37;border-radius:7px;background:#191b21;padding:10px}.r021-control-box input,.r021-control-box textarea{width:100%;border:0;background:#0e1014;color:#f1f2f4;border-radius:5px;padding:8px;font-size:11px;outline:0}.r021-control-box textarea{min-height:72px;resize:vertical}.r021-swatch{width:100%;height:40px;border-radius:5px;border:1px solid #30343d}.r021-disabled-tile{height:82px;border:1px solid #2c3038;border-radius:7px;background:#191b21;color:#676e78;display:grid;place-items:center;font-size:10px;text-align:center;padding:8px}
.r021-profile-preview{border-radius:10px;background:#111318;overflow:hidden;border:1px solid #24272e}.r021-preview-banner{height:120px;background:#251a25}.r021-preview-body{position:relative;padding:58px 16px 20px}.r021-preview-avatar{position:absolute;left:18px;top:-54px;width:104px;height:104px;border-radius:50%;border:8px solid #111318;display:grid;place-items:center;color:#fff;font-size:24px;font-weight:750}.r021-preview-name{font-size:20px;font-weight:750}.r021-preview-user{margin-top:4px;color:#a2a8b1;font-size:11px}.r021-preview-actions{display:flex;gap:8px;margin:15px 0}.r021-preview-actions button{height:34px;border:0;border-radius:5px;background:#4144bd;color:#fff;padding:0 14px;font-size:10px}.r021-preview-actions button:disabled{opacity:.7}.r021-preview-bio{font-size:10px;color:#c9cdd2;line-height:1.5}.r021-preview-meta{margin-top:18px;color:#858c96;font-size:9px}.r021-preview-meta strong{display:block;color:#c5c9cf;font-size:10px;margin-top:4px}
.r021-widget-board{min-height:520px;border-left:1px solid #24272e;padding-left:22px}.r021-widget-tabs{display:flex;gap:18px;margin-bottom:30px}.r021-widget-tabs button{border:0;background:transparent;color:#777e88;font-size:11px;font-weight:650;padding:0 0 8px}.r021-widget-tabs button.active{color:#fff;border-bottom:2px solid #fff}.r021-widget-board h3{text-align:center;font-size:13px;margin:70px 0 6px}.r021-widget-board>p{text-align:center;color:#8a919b;font-size:10px;max-width:280px;margin:0 auto 22px;line-height:1.5}.r021-widget-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.r021-widget{height:92px;border:1px solid #292d35;border-radius:7px;background:#17191e;color:#8a919b;display:grid;place-items:center;font-size:10px;text-align:center;padding:8px}
.r021-settings-section{margin-bottom:24px}.r021-settings-section h2{font-size:14px;margin:0 0 8px}.r021-settings-section p{font-size:10px;color:#8c939d;line-height:1.55}.r021-setting-row{min-height:58px;border-bottom:1px solid #24272e;display:flex;align-items:center;justify-content:space-between;gap:14px}.r021-setting-row strong{display:block;font-size:11px}.r021-setting-row span{display:block;color:#7f8691;font-size:9px;margin-top:3px}.r021-setting-row select,.r021-setting-row input[type="text"]{height:34px;border:1px solid #2c3038;border-radius:5px;background:#0b0d10;color:#d6d9dd;padding:0 8px;min-width:180px}.r021-switch{width:38px;height:22px;border-radius:11px;background:#383c45;position:relative}.r021-switch::after{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:#fff}.r021-switch.on{background:#248046}.r021-switch.on::after{left:19px}.r021-settings-note{border:1px solid #2a2e36;border-radius:7px;background:#17191e;color:#9299a3;padding:12px;font-size:10px;line-height:1.5}

@media(max-width:1180px){.app-shell{grid-template-columns:68px 244px minmax(440px,1fr)!important}.member-panel{position:fixed!important;right:0;top:0;bottom:0;width:248px!important;z-index:80;box-shadow:-10px 0 30px rgba(0,0,0,.32)}.member-panel.closed{display:none!important}.r021-friends-shell{grid-template-columns:1fr}.r021-friends-side{display:none}.r021-profile-settings-grid{grid-template-columns:200px 1fr}.r021-widget-board{display:none}}
@media(max-width:780px){.app-shell{grid-template-columns:58px minmax(0,1fr)!important}.server-rail{width:58px!important}.server-button{width:44px!important;height:44px!important;flex-basis:44px!important}.channel-panel{width:min(286px,calc(100vw - 58px))!important}.r021-settings{grid-template-columns:190px minmax(0,1fr) 58px}.r021-settings-nav{width:185px}.r021-settings-main{padding:42px 20px}.r021-profile-settings-grid{grid-template-columns:1fr}.r021-profile-controls{order:2}.r021-voice-grid{grid-template-columns:1fr;padding:8px 12px 110px}.r021-video-tile{min-height:200px}.r021-header-search-wrap{display:none}}
.app-shell.r021-no-members{grid-template-columns:72px 248px minmax(520px,1fr)!important}
@media(max-width:1180px){.app-shell.r021-no-members{grid-template-columns:68px 244px minmax(440px,1fr)!important}}
@media(max-width:780px){.app-shell.r021-no-members{grid-template-columns:58px minmax(0,1fr)!important}}
/* Presence shapes: same colour language as Discord, without using Discord assets. */
.presence-idle,.presence-dnd,.presence-offline,.presence-invisible{overflow:hidden}
.presence-idle::after{content:"";position:absolute;width:70%;height:70%;border-radius:50%;right:-14%;top:-14%;background:var(--status-cutout,#111318)}
.presence-dnd::after{content:"";position:absolute;left:18%;right:18%;height:3px;top:50%;transform:translateY(-50%);border-radius:2px;background:var(--status-cutout,#111318)}
.presence-offline,.presence-invisible{background:var(--status-cutout,#111318)!important;box-shadow:inset 0 0 0 3px #80848e}
.current-user-panel .presence-idle,.current-user-panel .presence-dnd,.current-user-panel .presence-offline,.current-user-panel .presence-invisible{--status-cutout:#0a0c10}
.r021-profile-card .presence-idle,.r021-profile-card .presence-dnd,.r021-profile-card .presence-offline,.r021-profile-card .presence-invisible{--status-cutout:#0f1115}
.r021-status-menu .presence-idle,.r021-status-menu .presence-dnd,.r021-status-menu .presence-offline,.r021-status-menu .presence-invisible{--status-cutout:#0f1115}


/* ===== layout constraints ===== */
/* Rift 0.2.1 viewport/alignment hotfix. Loaded after all 0.2.1 UI layers. */
html,body{width:100%;height:100%;min-width:0;min-height:0;background:#0f1115!important;overflow:hidden!important}
body{position:relative}

/* Keep every primary pane in one explicit viewport row. This prevents a hidden/fourth grid
   item from being auto-placed beneath the app when the member column is collapsed. */
.app-shell{
  position:relative;
  width:100%!important;
  height:100dvh!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  grid-template-rows:minmax(0,1fr)!important;
  grid-auto-rows:0!important;
  grid-auto-flow:column!important;
}
.server-rail{grid-column:1!important;grid-row:1!important;min-height:0!important}
.channel-panel{grid-column:2!important;grid-row:1!important;min-height:0!important;height:100%!important;overflow:hidden!important}
.content-panel{grid-column:3!important;grid-row:1!important;min-height:0!important;height:100%!important;overflow:hidden!important}
.member-panel{grid-column:4!important;grid-row:1!important;min-height:0!important;height:100%!important;overflow:hidden!important}

/* Home/DMs do not use the legacy server member rail. */
.app-shell.r021-no-members,
.app-shell:has(.member-panel.closed){grid-template-columns:72px 248px minmax(0,1fr)!important}
.app-shell.r021-no-members .member-panel,
.member-panel.closed{display:none!important}

/* No accidental horizontal scrollbars in the channel/DM column. */
.home-navigation,.channel-navigation,.channel-list,.dm-list{overflow-x:hidden!important;max-width:100%!important}
.home-navigation,.channel-navigation{min-width:0!important}

/* The account dock contains avatar + identity + audio controls + settings: four columns. */
.current-user-panel{
  grid-template-columns:36px minmax(0,1fr) auto 31px!important;
  grid-auto-flow:column!important;
  grid-auto-rows:1fr!important;
  min-width:0!important;
  width:100%!important;
}
.current-user-panel>.avatar{grid-column:1!important;grid-row:1!important}
.current-user-copy{grid-column:2!important;grid-row:1!important;min-width:0!important}
#r021-user-controls{grid-column:3!important;grid-row:1!important;align-self:center!important}
#settings-button{grid-column:4!important;grid-row:1!important;align-self:center!important}
.self-presence-dot{z-index:2}

/* Voice dock should be part of the left column, never push outside it. */
.voice-connection-panel{width:100%!important;min-width:0!important;overflow:hidden!important}
.r021-voice-summary,.r021-voice-summary-copy,.r021-voice-summary-copy>div{min-width:0!important}
.r021-voice-summary span{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

/* Home/friends viewport is a true two-column content area, not another page-sized grid. */
.home-view{min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;overflow:hidden!important}
.r021-friends-shell{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;overflow:hidden!important}
.r021-friends-main,.r021-friends-side{min-height:0!important}
.r021-friends-main{min-width:0!important;overflow-y:auto!important;overflow-x:hidden!important}
.r021-friends-side{overflow-y:auto!important;overflow-x:hidden!important}

/* Tighten a few visible rough edges from the first refined pass. */
.content-header{min-width:0!important}
.header-actions{min-width:0!important;flex-shrink:0!important}
.r021-home-tabs{overflow:hidden!important}
.r021-home-tab{flex:0 0 auto!important}
.r021-friend-search{display:block!important}
.social-row{width:100%!important;min-width:0!important}
.social-copy{min-width:0!important}
.r021-active-empty{padding-top:54px!important}

/* Electron: lock the content exactly beneath the custom title bar. Matching the native
   BrowserWindow background makes live-resize repaint gaps visually disappear. */
body.desktop-runtime{padding-top:0!important;background:#0f1115!important}
body.desktop-runtime .app-shell,
body.desktop-runtime .auth-screen{
  position:fixed!important;
  inset:32px 0 0 0!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
body.desktop-runtime .desktop-titlebar{background:#090b0e!important}
body.desktop-runtime.resize-active *,
body.desktop-runtime.resize-active *::before,
body.desktop-runtime.resize-active *::after{transition:none!important;animation:none!important}

/* Collapse the server member rail cleanly before space becomes cramped. */
@media(max-width:1180px){
  .app-shell:not(.r021-no-members){grid-template-columns:68px 236px minmax(0,1fr)!important}
  .app-shell:not(.r021-no-members) .member-panel{display:none!important}
  .app-shell.r021-no-members,.app-shell:has(.member-panel.closed){grid-template-columns:68px 236px minmax(0,1fr)!important}
  .server-rail{width:68px!important}
}
@media(max-width:900px){
  .app-shell,.app-shell.r021-no-members,.app-shell:has(.member-panel.closed){grid-template-columns:64px 224px minmax(0,1fr)!important}
  .server-rail{width:64px!important}
  .r021-friends-shell{grid-template-columns:minmax(0,1fr)!important}
  .r021-friends-side{display:none!important}
  .r021-header-search-wrap{display:none!important}
}
