:root{--bg-app:#0b0e14;--bg-sidebar:#11151e;--bg-user:#0e121a;--bg-main:#161b26;--bg-raised:#1c2230;--bg-input:#222939;--bg-active:#313a50;--line:#222939;--line-soft:#283043;--line-strong:#3f4962;--accent:#7182f8;--accent-hover:#8f9dff;--accent-soft:#232a52;--accent-text:#aeb8ff;--online:#3dd68c;--danger:#f2555a;--warning:#f5b53d;--warning-soft:#3a2e16;--text:#f2f4f8;--text-2:#c5cbd8;--text-muted:#929aae;--text-faint:#6e768a;--r-sm:4px;--r-md:6px;--r-lg:8px;--r-xl:16px;--shadow-pop:0 12px 32px #00000073, 0 2px 6px #0000004d;--mono:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;color:var(--text);background:var(--bg-app);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;-webkit-font-smoothing:antialiased;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;line-height:1.4}*{box-sizing:border-box}html,body,#root{background:var(--bg-app);height:100%;margin:0;overflow:hidden}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer;background:0 0;border:0;padding:0}button:disabled{cursor:not-allowed}:focus-visible{outline:2px solid var(--accent-hover);outline-offset:2px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:var(--bg-active);border-radius:4px}::-webkit-scrollbar-track{background:0 0}.mono{font-family:var(--mono)}.small{font-size:11px}.muted{color:var(--text-muted)}.ellipsis{white-space:nowrap;text-overflow:ellipsis;min-width:0;overflow:hidden}.hint{color:var(--text-muted);margin:4px 8px;font-size:13px}.glass{box-shadow:inset 0 1px 0 #ffffff0f, var(--shadow-pop);-webkit-backdrop-filter:blur(16px)saturate(140%);background:#283043b8;border:1px solid #ffffff14}.btn{border-radius:var(--r-lg);background:var(--bg-active);height:36px;color:var(--text);padding:0 16px;font-weight:600;transition:background .12s}.btn:hover:not(:disabled){background:var(--line-strong)}.btn.primary{background:var(--accent);color:#fff}.btn.primary:hover:not(:disabled){background:var(--accent-hover)}.btn:disabled{opacity:.55}.btn.lg{height:44px;font-size:15px}.btn.sm{border-radius:var(--r-md);height:26px;padding:0 10px;font-size:12px}.icon-btn{border-radius:var(--r-md);width:32px;height:32px;color:var(--text-2);flex:none;place-items:center;transition:background .12s,color .12s;display:inline-grid}.icon-btn:hover,.icon-btn.on{background:var(--bg-input);color:var(--text)}.icon-btn.sm{width:26px;height:26px}.link{color:inherit;font-weight:600;text-decoration:underline}.avatar{color:#fff;-webkit-user-select:none;user-select:none;border-radius:50%;flex:none;place-items:center;font-weight:700;line-height:1;display:inline-grid}.spinner{border:2px solid #ffffff26;border-top-color:currentColor;border-radius:50%;flex:none;width:12px;height:12px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.field{letter-spacing:.04em;text-transform:uppercase;color:var(--text-2);flex-direction:column;gap:6px;font-size:11px;font-weight:700;display:flex}.field .opt{text-transform:none;letter-spacing:0;color:var(--text-muted);font-weight:500}.field input{border:1px solid var(--bg-active);border-radius:var(--r-lg);background:var(--bg-sidebar);height:44px;color:var(--text);text-transform:none;letter-spacing:0;outline:none;padding:0 12px;font-size:15px;font-weight:400;transition:border-color .12s}.field input.mono{font-size:14px}.field input::placeholder{color:var(--text-faint)}.field input:focus{border-color:var(--accent-hover)}.field.invalid{color:var(--danger)}.field.invalid input{border-color:var(--danger)}.field-error{text-transform:none;letter-spacing:0;color:var(--danger);margin:0;font-size:12px;font-weight:500}.login{background:var(--bg-app);height:100%;padding:24px 0;display:flex;position:relative;overflow-y:auto}.login-glow{pointer-events:none;border-radius:50%;position:fixed}.login-glow.a{background:var(--accent-soft);opacity:.55;filter:blur(120px);width:760px;height:760px;top:-260px;left:-200px}.login-glow.b{background:var(--bg-main);filter:blur(100px);width:700px;height:700px;bottom:-300px;right:-240px}.login-card{border-radius:var(--r-xl);background:#1c2230b8;flex-direction:column;gap:20px;width:min(440px,100% - 32px);margin:auto;padding:40px;display:flex;position:relative}.login-brand{text-align:center;flex-direction:column;align-items:center;gap:12px;display:flex}.login-brand h1{letter-spacing:-.02em;margin:0;font-size:24px;font-weight:700}.login-brand p{color:var(--text-2);margin:0;font-size:14px;line-height:20px}.brand-tile{background:linear-gradient(145deg,#2a3350,#11151e);border:1px solid #ffffff1a;border-radius:18px;place-items:center;width:64px;height:64px;display:grid;box-shadow:inset 0 1px #ffffff1f,0 8px 24px #7182f82e}.brand-tile img{object-fit:contain;width:44px;height:44px}.login-foot{color:var(--text-muted);justify-content:space-between;gap:12px;font-size:12px;display:flex}.app{flex-direction:column;height:100%;display:flex}.banner{background:var(--warning-soft);border-bottom:1px solid var(--warning);height:28px;color:var(--warning);flex:none;justify-content:center;align-items:center;gap:8px;font-size:12px;font-weight:600;display:flex}.shell{flex:1;min-height:0;display:flex}.rail{background:var(--bg-app);scrollbar-width:none;flex-direction:column;flex:none;align-items:center;gap:8px;width:72px;padding:12px 0;display:flex;overflow-y:auto}.rail::-webkit-scrollbar{display:none}.rail-sep{background:var(--line);border-radius:2px;flex:none;width:32px;height:2px}.rail-item{flex:none;justify-content:center;width:72px;display:flex;position:relative}.rail-pill{background:var(--text);border-radius:0 4px 4px 0;width:4px;height:0;transition:height .15s;position:absolute;top:50%;left:0;transform:translateY(-50%)}.rail-item:hover .rail-pill{height:20px}.rail-item.active .rail-pill{height:36px}.rail-btn{background:var(--bg-raised);width:48px;height:48px;color:var(--text-2);border-radius:24px;place-items:center;font-weight:600;transition:border-radius .15s,background .15s,color .15s;display:grid;overflow:hidden}.rail-btn:hover,.rail-item.active .rail-btn{background:var(--accent-soft);color:var(--accent-text);border-radius:16px}.rail-btn.home{background:linear-gradient(145deg,#2a3350,#151a26)}.rail-item.active .rail-btn.home,.rail-btn.home:hover{background:linear-gradient(145deg,#3a4680,#1c2230)}.rail-btn.home img{object-fit:contain;width:32px;height:32px}.rail-btn.add{border:1px dashed var(--line-strong);color:var(--online);background:0 0}.rail-btn.add:hover{background:var(--online);border-color:var(--online);color:var(--bg-app)}.sidebar{background:var(--bg-sidebar);flex-direction:column;flex:none;width:240px;display:flex}.sidebar-head{border-bottom:1px solid var(--line);flex:none;align-items:center;height:48px;padding:0 16px;font-size:15px;font-weight:600;display:flex;box-shadow:0 1px #00000047}.sidebar-scroll{flex-direction:column;flex:1;gap:16px;padding:12px 8px;display:flex;overflow-y:auto}.section{flex-direction:column;gap:2px;display:flex}.section-head{justify-content:space-between;align-items:center;min-height:26px;padding:0 0 4px 8px;display:flex}.section-head h2{letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);margin:0;font-size:11px;font-weight:700}.row{border-radius:var(--r-md);width:100%;min-height:32px;color:var(--text-muted);text-align:left;align-items:center;gap:8px;padding:0 8px;font-size:14px;font-weight:500;transition:background .1s,color .1s;display:flex;position:relative}.row:has(.avatar){min-height:40px}.row:hover{background:var(--bg-input);color:var(--text-2)}.row.active{background:var(--bg-active);color:#fff}.row.unread{color:var(--text);font-weight:600}.row.unread:not(.active):before{content:"";background:var(--text);border-radius:0 4px 4px 0;width:4px;height:8px;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.row>svg{opacity:.8;flex:none}.row-name{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.row-lock{color:var(--online);display:inline-flex}.row.invite{color:var(--text);background:var(--accent-soft)}.badge{background:var(--danger);color:#fff;text-align:center;border-radius:9px;min-width:18px;height:18px;padding:0 5px;font-size:11px;font-weight:700;line-height:18px}.user-card{background:var(--bg-user);flex:none;align-items:center;gap:8px;height:56px;padding:0 8px;display:flex}.user-meta{flex:1;min-width:0}.user-name{font-size:13px;font-weight:600;line-height:16px}.presence{flex:none;display:inline-flex;position:relative}.presence:after{content:"";border:2px solid var(--bg-sidebar);background:var(--text-faint);border-radius:50%;width:10px;height:10px;position:absolute;bottom:-2px;right:-2px}.presence.online:after{background:var(--online)}.presence.unavailable:after{background:var(--warning)}.presence.offline:after{background:var(--bg-sidebar);box-shadow:inset 0 0 0 2px var(--text-faint)}.user-card .presence:after{border-color:var(--bg-user)}.row:hover .presence:after{border-color:var(--bg-input)}.row.active .presence:after{border-color:var(--bg-active)}.main{background:var(--bg-main);flex-direction:column;flex:1;min-width:0;display:flex}.chat-head{border-bottom:1px solid var(--line);flex:none;align-items:center;gap:8px;height:48px;padding:0 8px 0 16px;display:flex;box-shadow:0 1px #00000047}.chat-head h1{flex:none;max-width:40%;margin:0;font-size:15px;font-weight:600}.e2ee{color:var(--online);display:inline-flex}.vsep{background:var(--bg-active);flex:none;width:1px;height:20px;margin:0 4px}.topic{color:var(--text-muted);font-size:13px}.head-actions{gap:4px;margin-left:auto;display:flex}.empty-state{text-align:center;justify-content:center;align-items:center;gap:12px;padding:24px}.empty-state img{object-fit:contain;opacity:.85;width:72px;height:72px}.empty-state h2{margin:0;font-size:18px;font-weight:600}.empty-state p{color:var(--text-2);margin:0 0 8px}.timeline{flex-direction:column-reverse;flex:1;min-height:0;display:flex;overflow-y:auto}.timeline-inner{padding:16px 0 8px}.timeline-start{padding:16px 16px 8px}.timeline-start .start-icon{background:var(--bg-input);width:68px;height:68px;color:var(--text);border-radius:50%;place-items:center;display:grid}.timeline-start h2{letter-spacing:-.02em;margin:12px 0 4px;font-size:24px;font-weight:700}.timeline-start p{color:var(--text-muted);margin:0}.loading-older{color:var(--text-muted);justify-content:center;align-items:center;gap:8px;padding:12px;font-size:12px;display:flex}.day-sep{align-items:center;gap:12px;margin:16px 0 8px;padding:0 16px;display:flex}.day-sep:before,.day-sep:after{content:"";background:var(--line-soft);flex:1;height:1px}.day-sep span{color:var(--text-muted);font-size:11px;font-weight:600}.msg{gap:16px;margin-top:16px;padding:2px 48px 2px 16px;display:flex;position:relative}.msg.grouped{margin-top:0}.msg:hover,.msg:focus-within{background:var(--bg-raised)}.msg.mentioned{background:var(--warning-soft);box-shadow:inset 2px 0 0 var(--warning)}.msg.mentioned:hover{background:#45371a}.msg-gutter{width:40px;color:var(--text-muted);text-align:right;visibility:hidden;flex:none;padding-top:4px;font-size:10px}.msg:hover .msg-gutter{visibility:visible}.msg-content{flex:1;min-width:0}.msg-head{align-items:baseline;gap:8px;display:flex}.msg-author{color:var(--text);font-size:15px;font-weight:600}.msg-head time{color:var(--text-muted);font-size:11px}.msg-body{color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text;font-size:15px;line-height:22px}.msg-body.pending{color:var(--text-muted)}.msg-body.failed{color:var(--danger)}.msg-body.muted{color:var(--text-muted);font-size:14px;font-style:italic}.msg-body svg{vertical-align:-2px}.msg-failed{color:var(--danger);font-size:12px;font-weight:600}.msg-reply{color:var(--text-muted);align-items:center;gap:6px;margin-bottom:2px;font-size:13px;display:flex}.msg-reply b{color:var(--text-2);flex:none;font-weight:600}.msg-actions{border-radius:var(--r-lg);gap:2px;padding:2px;display:none;position:absolute;top:-14px;right:16px}.msg:hover .msg-actions,.msg:focus-within .msg-actions{display:flex}.composer-wrap{flex:none;padding:0 16px 20px}.typing{height:20px;color:var(--text-muted);align-items:center;gap:4px;font-size:12px;display:flex}.typing b{color:var(--text-2);font-weight:600}.reply-bar{border-radius:var(--r-lg) var(--r-lg) 0 0;background:var(--bg-raised);color:var(--text-muted);align-items:center;gap:4px;padding:6px 8px 6px 12px;font-size:13px;display:flex}.reply-bar b{color:var(--text-2)}.reply-bar .icon-btn{margin-left:auto}.composer{border-radius:var(--r-lg);background:var(--bg-input);align-items:flex-end;gap:4px;min-height:44px;padding:6px 6px 6px 16px;display:flex}.composer.replying{border-radius:0 0 var(--r-lg) var(--r-lg)}.composer textarea{resize:none;background:0 0;border:0;outline:none;flex:1;min-width:0;max-height:240px;padding:5px 0;font-size:15px;line-height:22px}.composer textarea::placeholder{color:var(--text-muted)}.send-btn{border-radius:var(--r-md);background:var(--accent);color:#fff;flex:none;place-items:center;width:32px;height:32px;transition:background .12s,opacity .12s;display:grid}.send-btn:hover:not(:disabled){background:var(--accent-hover)}.send-btn:disabled{opacity:.35}.members{background:var(--bg-sidebar);border-left:1px solid var(--line);flex:none;width:240px;padding:16px 8px;overflow-y:auto}.member{border-radius:var(--r-md);align-items:center;gap:10px;height:44px;padding:0 8px;font-size:14px;font-weight:500;display:flex}.member:hover{background:var(--bg-input)}.member-meta{flex-direction:column;flex:1;min-width:0;display:flex}.role{border-radius:var(--r-sm);background:var(--accent-soft);color:var(--accent-text);text-transform:uppercase;letter-spacing:.04em;padding:1px 6px;font-size:10px;font-weight:700}.scrim{z-index:50;background:#0000009e;place-items:center;padding:16px;animation:.12s ease-out fade;display:grid;position:fixed;inset:0}.modal{border-radius:var(--r-xl);background:var(--bg-raised);border:1px solid var(--bg-active);width:min(460px,100%);box-shadow:var(--shadow-pop);animation:.14s ease-out pop;overflow:hidden}.modal-head{justify-content:space-between;align-items:center;padding:20px 16px 8px 24px;display:flex}.modal-head h2{margin:0;font-size:18px;font-weight:600}.modal-lede{color:var(--text-2);margin:0;font-size:14px;line-height:20px}.modal-body{flex-direction:column;gap:16px;padding:12px 24px 20px;display:flex}.modal-foot{background:var(--bg-main);justify-content:flex-end;gap:8px;padding:16px 24px;display:flex}.segmented{border-radius:var(--r-lg);background:var(--bg-sidebar);gap:2px;margin:4px 24px 0;padding:2px;display:flex}.segmented button{border-radius:var(--r-md);height:30px;color:var(--text-muted);flex:1;font-size:13px;font-weight:600}.segmented button.on{background:var(--bg-active);color:var(--text)}@keyframes fade{0%{opacity:0}}@keyframes pop{0%{opacity:0;transform:scale(.97)}}.toast{z-index:60;border-radius:var(--r-lg);max-width:360px;padding:10px 14px;font-size:13px;font-weight:500;animation:.14s ease-out pop;position:fixed;bottom:20px;right:20px}.toast.error{color:#ffd5d6;border-color:#f2555a80}.avatar{overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%;display:block}.rail-btn .avatar{border-radius:inherit;color:inherit;background:0 0!important;width:100%!important;height:100%!important}.btn.danger,.icon-btn.danger{background:var(--danger);color:#fff}.btn.danger:hover:not(:disabled){background:#ff6b70}.icon-btn:disabled{opacity:.4;cursor:not-allowed}.icon-btn:disabled:hover{background:0 0}.user-button{border-radius:var(--r-md);text-align:left;flex:1;align-items:center;gap:8px;min-width:0;margin-left:-4px;padding:4px;display:flex}.user-button:hover{background:var(--bg-input)}.user-meta{flex-direction:column;display:flex}.badge-host{position:relative}.badge.mini{min-width:16px;height:16px;padding:0 4px;font-size:10px;line-height:16px;position:absolute;top:0;right:0}.segmented.flush{margin:0}.segmented button{justify-content:center;align-items:center;gap:6px;display:inline-flex}.dot{background:var(--text-faint);border-radius:50%;width:8px;height:8px}.dot.online{background:var(--online)}.dot.unavailable{background:var(--warning)}.dot.offline{box-shadow:inset 0 0 0 2px var(--text-faint);background:0 0}.notice{border-radius:var(--r-lg);color:var(--text);background:#3dd68c1a;border:1px solid #3dd68c59;gap:10px;padding:12px;font-size:14px;line-height:20px;display:flex}.notice svg{color:var(--online);flex:none;margin-top:1px}.request{border-radius:var(--r-lg);background:var(--bg-sidebar);align-items:center;gap:10px;padding:10px;display:flex}.request-meta{flex-direction:column;flex:1;gap:1px;min-width:0;font-weight:500;display:flex}.modal-body:has(.request){max-height:60vh;overflow-y:auto}.profile-avatar{align-items:center;gap:16px;display:flex}.profile-avatar-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.profile-avatar-actions .small{flex-basis:100%}label.btn{cursor:pointer;align-items:center;display:inline-flex}.toggle-row{border-radius:var(--r-lg);background:var(--bg-sidebar);cursor:pointer;justify-content:space-between;align-items:center;gap:12px;padding:12px;display:flex}.toggle-row>span{flex-direction:column;display:flex}.toggle-title{font-size:14px;font-weight:600}.switch{appearance:none;background:var(--line-strong);cursor:pointer;border-radius:12px;flex:none;width:40px;height:24px;margin:0;transition:background .15s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:20px;height:20px;transition:transform .15s;position:absolute;top:2px;left:2px}.switch:checked{background:var(--online)}.switch:checked:after{transform:translate(16px)}.switch:disabled{opacity:.4;cursor:not-allowed}.msg.editing{background:var(--accent-soft)}.msg-body.notice{color:var(--text-2)}.edited{color:var(--text-muted);font-size:11px}.msg-actions.open{display:flex}.quick-reactions{border-right:1px solid var(--line-strong);gap:2px;margin-right:2px;padding-right:4px;display:flex}.quick-reactions .icon-btn{font-size:16px}.reactions{flex-wrap:wrap;gap:4px;margin-top:4px;display:flex}.reaction{border-radius:var(--r-lg);background:var(--bg-input);height:24px;color:var(--text-2);border:1px solid #0000;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:600;display:inline-flex}.reaction span{font-size:14px}.reaction:hover{border-color:var(--line-strong)}.reaction.mine{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-text)}.media{border-radius:var(--r-lg);background:var(--bg-input);cursor:zoom-in;place-items:center;min-width:80px;max-width:min(400px,100%);min-height:60px;margin-top:4px;display:grid;overflow:hidden}.media img{object-fit:cover;width:100%;height:100%;display:block}.lightbox{cursor:zoom-out}.lightbox img{border-radius:var(--r-lg);max-width:92vw;max-height:92vh;box-shadow:var(--shadow-pop)}.file-card{border-radius:var(--r-lg);background:var(--bg-sidebar);border:1px solid var(--line);max-width:400px;color:var(--accent-text);align-items:center;gap:12px;margin-top:4px;padding:10px 12px;display:flex}.file-meta{min-width:0;color:var(--text);flex:1;font-weight:500}.composer .icon-btn{align-self:flex-end}.composer{padding-left:6px}.composer.disabled{opacity:.6}.member{height:48px}.member.is-offline{opacity:.55}.member-dm{visibility:hidden}.member:hover .member-dm,.member:focus-within .member-dm{visibility:visible}.members .section+.section{margin-top:16px}@media (width<=1100px){.members{display:none}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation:none!important}}
