:root{
  --bg:#0f1115; --panel:#171a20; --panel2:#1e222a; --panel3:#252a34;
  --line:#2b313d; --text:#f5f7fb; --muted:#8e98a8; --accent:#6d5dfc;
  --accent2:#8b7cff; --green:#35d07f; --danger:#ff647c;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial;background:var(--bg);color:var(--text);overflow:hidden}
button,input{font:inherit}
button{color:inherit}
.hidden{display:none!important}
.muted{color:var(--muted)} .small{font-size:12px}.strong{font-weight:700}.grow{flex:1}
.brand{font-weight:800;display:flex;align-items:center;gap:8px;letter-spacing:-.3px}
.brand-big{font-size:28px}.brand-dot{width:10px;height:10px;border-radius:50%;background:linear-gradient(135deg,var(--accent),#3ed6ff);box-shadow:0 0 18px #6d5dfc88}
.auth-shell{min-height:100vh;display:grid;place-items:center;background:
radial-gradient(circle at 30% 20%,#6d5dfc22,transparent 30%),
radial-gradient(circle at 80% 70%,#1fb6ff15,transparent 28%),var(--bg)}
.auth-card{width:min(420px,92vw);background:#171a20dd;border:1px solid var(--line);padding:28px;border-radius:22px;box-shadow:0 30px 80px #0007;backdrop-filter:blur(20px)}
.tabs{display:flex;background:#101218;border:1px solid var(--line);border-radius:12px;padding:4px;margin:24px 0 16px}
.tab{flex:1;background:transparent;border:0;padding:10px;border-radius:9px;cursor:pointer;color:var(--muted)}
.tab.active{background:var(--panel3);color:white}
.auth-card form{display:flex;flex-direction:column;gap:12px}
.auth-card input,.composer input,.modal-card input{width:100%;border:1px solid var(--line);background:#101218;color:white;padding:13px 14px;border-radius:11px;outline:none}
.auth-card input:focus,.composer input:focus,.modal-card input:focus{border-color:var(--accent)}
.user-input{display:flex;align-items:center;border:1px solid var(--line);background:#101218;border-radius:11px;padding-left:14px}
.user-input:focus-within{border-color:var(--accent)} .user-input span{color:var(--muted)}
.user-input input{border:0;background:transparent;padding-left:4px}
.primary{border:0;background:linear-gradient(135deg,var(--accent),var(--accent2));font-weight:750;border-radius:10px;cursor:pointer}
.primary:hover{filter:brightness(1.08)}.wide{padding:13px}.error{color:var(--danger);min-height:20px;font-size:13px}
.app{height:100vh;display:grid;grid-template-columns:72px 280px minmax(0,1fr) 250px;background:var(--bg)}
.rail{background:#0b0d11;border-right:1px solid var(--line);padding:12px 10px;display:flex;flex-direction:column;align-items:center;gap:9px;overflow-y:auto}
.rail-btn{width:48px;height:48px;border:1px solid transparent;border-radius:16px;background:var(--panel2);cursor:pointer;font-size:20px;transition:.18s}
.rail-btn:hover,.rail-btn.active{border-color:#7166ff;background:#292641;transform:translateY(-1px)}
.rail-btn.add{color:#5de59a;background:#14261e}.rail-sep{width:30px;height:1px;background:var(--line);margin:2px 0}
.sidebar{background:var(--panel);border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0}
.sidebar-head{height:72px;padding:14px 14px 12px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.section-title{font-size:11px;letter-spacing:.12em;color:#7e8998;font-weight:800;padding:16px 14px 8px}
.search-btn{margin:0 10px 8px;border:1px solid var(--line);background:#11141a;color:#b7bfcb;padding:10px 12px;border-radius:10px;text-align:left;cursor:pointer;width:calc(100% - 20px)}
.list{padding:0 8px;overflow:auto}.list-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;cursor:pointer;color:#cbd2dc;margin:2px 0}
.list-item:hover,.list-item.active{background:var(--panel3);color:white}
.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#6d5dfc,#2bb6ff);font-weight:800;flex:none}
.avatar.lg{width:64px;height:64px;font-size:22px}
.profile-strip{margin-top:auto;border-top:1px solid var(--line);padding:10px 12px;display:flex;align-items:center;gap:10px;background:#14171d}
.status-dot{width:9px;height:9px;border-radius:50%;background:var(--green);box-shadow:0 0 10px #35d07f66}
.icon-btn{background:transparent;border:1px solid transparent;border-radius:9px;padding:7px 9px;cursor:pointer;color:#aab3c1}
.icon-btn:hover{background:var(--panel3);color:white}
.server-title-row{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 0}.server-title{font-weight:800;font-size:17px}
.chat{display:flex;flex-direction:column;min-width:0;background:linear-gradient(180deg,#11141a,#0f1115)}
.chat-head{height:72px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:#12151b}
.chat-title{font-weight:800;font-size:18px}
.empty{flex:1;display:grid;place-items:center;align-content:center;text-align:center;color:#cbd2dc;padding:20px}
.empty-icon{font-size:50px;color:#7c70ff;text-shadow:0 0 30px #6d5dfc77}.empty h2{margin:10px 0 5px}.empty p{color:var(--muted)}
.messages{flex:1;overflow:auto;padding:20px 22px 10px}
.msg{display:flex;gap:11px;padding:8px 4px}.msg:hover{background:#ffffff03}
.msg-body{min-width:0}.msg-meta{display:flex;align-items:baseline;gap:8px}.msg-name{font-weight:750}.msg-time{font-size:11px;color:#6f7886}.msg-text{margin-top:3px;color:#dce1e8;white-space:pre-wrap;word-break:break-word;line-height:1.42}
.composer{padding:12px 16px 16px;display:flex;gap:8px;align-items:center}.composer input{background:#1a1e26;border-color:#2b313d}.send{width:44px;height:44px}
.details{background:#13161c;border-left:1px solid var(--line);overflow:auto}.details-content{padding:8px 14px}.user-card{text-align:center;padding:16px 8px}.user-card .avatar{margin:0 auto 10px}
.modal{position:fixed;inset:0;background:#0009;display:grid;place-items:center;z-index:20;padding:20px}
.modal-card{width:min(460px,94vw);background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 30px 80px #0009}
.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head h3{margin:0}
.modal-card .list{max-height:340px;margin-top:10px}.modal-card form{display:flex;gap:8px;margin-top:14px}.modal-card form .primary{padding:0 16px}
.badge{font-size:10px;background:#2a2842;color:#b7b0ff;padding:3px 6px;border-radius:999px}
@media(max-width:1050px){.app{grid-template-columns:68px 260px minmax(0,1fr)}.details{display:none}}
@media(max-width:700px){.app{grid-template-columns:60px 1fr}.sidebar{position:absolute;left:60px;width:260px;height:100vh;z-index:5;box-shadow:20px 0 50px #0008}.chat{grid-column:2}.details{display:none}}

.mini{padding:8px 10px;margin-top:12px}
.secondary{border:1px solid var(--line);background:var(--panel3);color:white;border-radius:10px;cursor:pointer}
.stack{display:flex;flex-direction:column;gap:10px}
.invite-box{text-align:center;padding:14px}
.invite-code{font-size:28px;font-weight:900;letter-spacing:.14em;margin:10px 0;color:#b9b2ff}
.msg-actions{opacity:0;display:flex;gap:3px}.msg:hover .msg-actions{opacity:1}
.edited{font-size:10px;color:var(--muted)}
.member-row{padding-right:4px}

.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f7fb !important;
  -webkit-box-shadow: 0 0 0 1000px #101218 inset !important;
  transition: background-color 9999s ease-out 0s;
}
.error.show, .error:not(:empty){
  display:block;
  background:#ff647c18;
  border:1px solid #ff647c55;
  border-radius:9px;
  padding:9px 10px;
  margin-top:2px;
}

/* v0.3 polish */
body{background:#0b0e13}
.app{grid-template-columns:76px 292px minmax(0,1fr) 292px}
.rail{background:linear-gradient(180deg,#090b10,#0d1016)}
.sidebar,.details{background:#12161d}
.chat{background:
 radial-gradient(circle at 70% 10%,rgba(109,93,252,.08),transparent 35%),
 linear-gradient(180deg,#0f1319,#0d1015)}
.chat-head{background:rgba(16,20,27,.92);backdrop-filter:blur(16px)}
.rail-btn{box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)}
.list-item,.member-card{transition:.15s ease}
.list-item:hover,.member-card:hover{transform:translateX(2px)}
.avatar{overflow:hidden;background-size:cover;background-position:center}
.avatar.photo{background-size:cover;background-position:center;color:transparent}
.avatar-btn{border:0;cursor:pointer;color:white}
.avatar.xl{width:88px;height:88px;font-size:28px;margin:0 auto 14px}
.server-card{margin:12px 14px 8px;padding:14px;background:linear-gradient(135deg,#202535,#171b24);border:1px solid var(--line);border-radius:15px;display:flex;align-items:center;gap:12px}
.server-emblem{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#6d5dfc,#3c9cff);font-weight:900}
.primary.soft{margin:8px 14px;width:calc(100% - 28px);background:#6d5dfc22;border:1px solid #6d5dfc55;color:#c5c0ff}
.member-card{display:flex;align-items:center;gap:10px;margin:2px 8px;padding:9px 9px;border-radius:11px;cursor:pointer}
.member-card:hover{background:#1d222c}
.member-name{font-weight:650}.alias-mark{font-size:9px;color:#9d95ff;background:#6d5dfc22;padding:2px 5px;border-radius:999px}
.role-pill{font-size:9px;text-transform:uppercase;padding:4px 6px;border-radius:999px;background:#252a34;color:#9ca6b5}
.role-pill.owner{background:#f1b9441c;color:#f1c561}.role-pill.admin{background:#6d5dfc22;color:#aaa2ff}
.profile-card{text-align:center;padding:22px 16px}
.profile-name{font-size:20px;font-weight:850;margin-top:4px}
.profile-actions{display:flex;flex-direction:column;gap:8px;margin-top:18px}
.alias-note{margin-top:8px;font-size:11px;color:var(--muted)}
.danger-btn{border:1px solid #ff647c55;background:#ff647c16;color:#ff8799;padding:10px;border-radius:10px;cursor:pointer}
.context-menu{position:fixed;z-index:1000;width:220px;background:#171b23;border:1px solid #303744;border-radius:13px;padding:6px;box-shadow:0 18px 55px #000b;animation:ctxIn .12s ease}
@keyframes ctxIn{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}
.context-menu button{width:100%;border:0;background:transparent;color:#dfe4eb;text-align:left;padding:9px 10px;border-radius:8px;cursor:pointer}
.context-menu button:hover{background:#252b36}.context-menu .warn{color:#ffc66d}.context-menu .danger{color:#ff7c90}
.ctx-sep{height:1px;background:#2b313d;margin:5px}
.blocked-dot{color:#ff6f85;font-weight:900}
.hash{color:#6d7480}.dm-row{min-height:52px}
.auth-card{border-color:#303744;background:linear-gradient(180deg,#171b22,#14171d)}
.auth-card input{color:#f5f7fb!important}

/* v0.3.1 UI polish */
button svg,.ui-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.rail-btn svg{width:21px;height:21px}
.send svg{width:19px;height:19px}
.search-btn{display:flex;align-items:center;gap:9px}
.context-menu button{display:flex;align-items:center;gap:10px}
.ui-icon{display:inline-flex;align-items:center;justify-content:center;flex:none}
.ui-icon.xl-icon svg{width:30px;height:30px}
.profile-actions button{display:flex;align-items:center;justify-content:center;gap:8px}
.icon-avatar{display:grid!important;place-items:center!important}
.icon-avatar .ui-icon svg{width:18px;height:18px}
.modal-card{width:min(500px,94vw);padding:20px 20px 18px;border-radius:20px;background:linear-gradient(180deg,#171b22,#13171d);border:1px solid #303744}
.modal-head{padding-bottom:12px}
.modal-head h3{font-size:20px;letter-spacing:-.02em}
.form-stack{display:flex;flex-direction:column;gap:12px}
.field-label{font-size:12px;color:#8d97a5;font-weight:700}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}
.modal-actions button{padding:10px 16px}
.modal-user-preview{display:flex;align-items:center;gap:12px;padding:12px;background:#10141a;border:1px solid var(--line);border-radius:14px}
.people-picker{max-height:320px;overflow:auto;border:1px solid var(--line);background:#10141a;border-radius:14px;padding:6px}
.picker-head{display:flex;justify-content:space-between;align-items:center;padding:2px 2px 0;font-size:12px;font-weight:750}
.person-pick{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;cursor:pointer}
.person-pick:hover{background:#1a1f27}
.person-pick input{position:absolute;opacity:0;pointer-events:none}
.fake-check{width:20px;height:20px;border-radius:6px;border:1px solid #394150;display:grid;place-items:center;color:transparent;background:#0f1318}
.fake-check svg{width:13px;height:13px}
.person-pick input:checked + .fake-check{background:var(--accent);border-color:var(--accent);color:white}
.empty-picker{padding:26px;text-align:center;color:var(--muted);font-size:13px}
.primary:disabled{opacity:.45;cursor:not-allowed;filter:none}
.invite-modern{text-align:center;padding:8px 8px 4px}
.invite-symbol{width:58px;height:58px;margin:0 auto 10px;border-radius:18px;background:linear-gradient(135deg,#6d5dfc22,#3c9cff18);border:1px solid #6d5dfc44;display:grid;place-items:center;color:#a9a1ff}
.invite-server{font-weight:850;font-size:18px;margin-bottom:14px}
.invite-code-wrap{display:flex;align-items:center;gap:8px;margin:10px auto 0;max-width:320px;background:#0f1318;border:1px solid #343b47;border-radius:12px;padding:7px 7px 7px 14px}
.invite-code-wrap code{flex:1;font:800 22px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.12em;color:#c6c0ff}
.copy-btn{width:38px;height:38px;border:0;border-radius:9px;background:#232936;color:#bcc5d2;display:grid;place-items:center;cursor:pointer}
.copy-btn:hover{background:#2b3240;color:white}
.copy-status{height:18px;margin-top:7px;color:#62d99b;font-size:12px}
.context-menu{width:236px;padding:7px;background:#171b22;border-color:#333b48}
.context-menu button{font-size:13px;padding:9px 10px}
.context-menu .ctx-sep{margin:5px 4px}
.auth-card .muted{max-width:330px}

/* v0.3.2 participant picker */
.modal-card{width:min(470px,94vw)}
.group-create{display:flex;flex-direction:column;gap:14px}
.group-name-input{height:48px!important;border-radius:13px!important;background:#0f1319!important;border:1px solid #2d3541!important;padding:0 15px!important;font-size:14px}
.group-name-input:focus{border-color:#7165ff!important;box-shadow:0 0 0 3px rgba(109,93,252,.10)}
.picker-title-row{display:flex;align-items:center;justify-content:space-between;padding:0 2px;color:#9da7b6;font-size:12px;font-weight:750}
.selected-count{min-width:24px;height:22px;padding:0 7px;display:grid;place-items:center;border-radius:999px;background:#1d222b;border:1px solid #303744;color:#7f8998;transition:.15s ease}
.selected-count.active{color:#c8c3ff;border-color:#6d5dfc55;background:#6d5dfc1f}
.modern-picker{max-height:310px;overflow-y:auto;padding:6px;border-radius:15px;background:#0f1319;border:1px solid #29313c}
.person-select-card{min-height:62px;display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:12px;cursor:pointer;position:relative;transition:background .14s ease,transform .14s ease,box-shadow .14s ease;user-select:none}
.person-select-card:hover{background:#181d25}
.person-select-card:active{transform:scale(.995)}
.person-select-card input{position:absolute!important;opacity:0!important;pointer-events:none!important;width:0!important;height:0!important}
.person-avatar-wrap{position:relative;flex:none}
.picker-avatar{width:42px;height:42px;font-size:14px}
.presence-dot{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;background:#35d07f;border:2px solid #0f1319}
.person-info{min-width:0;flex:1}
.person-name{color:#f3f5f8;font-weight:720;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.person-username{margin-top:2px;color:#7f8998;font-size:12px}
.select-control{width:28px;height:28px;border-radius:9px;border:1px solid #394250;background:#12171e;display:grid;place-items:center;color:transparent;transition:.16s ease;flex:none}
.select-control-inner{display:grid;place-items:center}
.select-control svg{width:15px;height:15px;stroke-width:2.4}
.person-select-card input:checked ~ .select-control{color:#fff;background:linear-gradient(135deg,#6d5dfc,#8175ff);border-color:#8175ff;box-shadow:0 0 0 3px rgba(109,93,252,.12),0 5px 16px rgba(77,61,220,.22)}
.person-select-card:has(input:checked){background:linear-gradient(90deg,rgba(109,93,252,.10),rgba(109,93,252,.035));box-shadow:inset 0 0 0 1px rgba(109,93,252,.18)}
.group-actions{margin-top:0}
.group-actions .primary,.group-actions .secondary{height:42px}
.group-actions .primary{min-width:145px}

/* v0.3.4 */
.self-member{cursor:default!important}
.self-member:hover{transform:none!important;background:transparent!important}
.profile-panel-head{height:46px;display:flex;align-items:center;gap:7px;padding:8px 10px 4px;border-bottom:1px solid #252c36;color:#aab3bf;font-size:12px;font-weight:750}
.profile-close-btn{width:32px;height:32px;padding:0;display:grid;place-items:center}
.self-profile-note{display:inline-flex;margin:14px auto 0;padding:6px 10px;border-radius:999px;background:#1d222a;border:1px solid #313947;color:#8e98a8;font-size:11px}
.details-empty{height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.details-empty-icon{width:42px;height:42px;border-radius:13px;background:#181d25;border:1px solid #2a313c;display:grid;place-items:center;color:#7f8998}

.composer{position:relative;padding:10px 14px 14px;gap:8px}
.composer input#messageInput{min-height:46px;padding-right:124px}
.composer-icon,.composer-tool{border:0;background:transparent;color:#8e98a8;cursor:pointer;display:grid;place-items:center;border-radius:8px}
.composer-icon{width:38px;height:38px}
.composer-icon:hover,.composer-tool:hover{background:#242a34;color:#e6e9ee}
.composer-tools{position:absolute;right:65px;bottom:20px;display:flex;align-items:center;gap:2px}
.composer-tool{height:29px;min-width:29px;padding:0 5px}
.composer-tool svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
.gif-label{font-size:10px;font-weight:900}

.quick-profile{position:fixed;z-index:1200;width:310px;background:#1b1f26;border:1px solid #353d49;border-radius:14px;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.68);animation:qpIn .12s ease}
@keyframes qpIn{from{opacity:0;transform:translateY(5px) scale(.98)}to{opacity:1;transform:none}}
.qp-banner{height:96px;background:radial-gradient(circle at 82% 18%,rgba(145,116,255,.7),transparent 24%),radial-gradient(circle at 18% 82%,rgba(62,158,255,.45),transparent 30%),linear-gradient(135deg,#30235f,#15141e 72%)}
.qp-top-actions{position:absolute;right:10px;top:10px;display:flex;gap:6px}
.qp-round{width:34px;height:34px;border-radius:50%;border:1px solid #303744;background:#0d0f13de;color:#dbe0e7;display:grid;place-items:center;cursor:pointer}
.qp-round:hover{background:#191d23}
.qp-avatar-wrap{height:0;position:relative;padding-left:17px}
.qp-avatar{position:absolute;top:-36px;width:74px;height:74px;border:5px solid #1b1f26;font-size:21px}
.qp-online{position:absolute;top:21px;left:73px;width:15px;height:15px;border-radius:50%;background:#35d07f;border:3px solid #1b1f26}
.qp-body{padding:46px 16px 14px}
.qp-name{font-size:20px;font-weight:850}
.qp-username{margin-top:2px;font-size:12px;color:#9ba5b2}
.qp-summary{margin-top:10px;display:flex;align-items:center;gap:6px;font-size:10px;color:#b6bec8}
.qp-dot{width:8px;height:8px;border-radius:50%;background:#52b7d1}
.qp-sep{color:#67717e}
.qp-section{margin-top:14px}
.qp-label{margin-bottom:7px;color:#7f8997;font-size:9px;font-weight:900}
.qp-chips{display:flex;gap:6px;flex-wrap:wrap}
.qp-chip{padding:5px 8px;border-radius:999px;background:#252b34;border:1px solid #39414d;color:#d7dce3;font-size:9px;font-weight:800}
.secondary-chip{background:#24223a;border-color:#443e6c;color:#bcb5ff}
.qp-activity{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;background:#15191f;border:1px solid #2b323d;color:#aeb6c1;font-size:10px}
.qp-message{margin-top:14px;display:flex;align-items:center;background:#20252d;border:1px solid #353c48;border-radius:10px;padding:5px 6px}
.qp-message input{min-width:0;flex:1;background:transparent;border:0;outline:none;color:#e8ecf1;padding:8px;font-size:11px}
.qp-message button{border:0;background:transparent;color:#a9b1bd;font-size:18px;cursor:pointer}

.emoji-picker{position:fixed;z-index:1300;width:240px;background:#171b22;border:1px solid #343c48;border-radius:14px;padding:10px;box-shadow:0 18px 55px #000a}
.emoji-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}
.emoji-item{width:32px;height:32px;border:0;border-radius:8px;background:transparent;cursor:pointer;font-size:20px}
.emoji-item:hover{background:#252b34}
.feature-soon{text-align:center;padding:22px 8px}
.feature-badge{width:60px;height:60px;border-radius:18px;margin:0 auto 12px;display:grid;place-items:center;background:#6d5dfc20;border:1px solid #6d5dfc45;color:#c3bdff;font-weight:900}

/* v0.3.5 clean auth */
.auth-card{
  padding-top:32px;
}
.auth-card .brand-big{
  margin-bottom:24px;
}
.auth-card .tabs{
  margin-top:0;
}
.auth-card input::-webkit-contacts-auto-fill-button,
.auth-card input::-webkit-credentials-auto-fill-button{
  visibility:hidden;
  display:none!important;
  pointer-events:none;
  position:absolute;
  right:0;
}

/* v0.4 */
.member-avatar-wrap{position:relative;flex:none}
.member-presence{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;background:#59616e;border:2px solid #12161d}
.member-presence.online{background:#35d07f}
.qp-online{background:#59616e!important}
.qp-online.online{background:#35d07f!important}
.channel-category{padding:14px 10px 5px;color:#778190;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.top-mini{padding:7px 10px;margin-left:6px;font-size:11px}
.fc-select{height:44px;border:1px solid var(--line);background:#10141a;color:#e8ecf1;border-radius:11px;padding:0 12px;outline:none}
.fc-select:focus{border-color:var(--accent)}
.reply-bar{margin:0 14px -4px 60px;min-height:38px;border:1px solid #323947;border-bottom:0;border-radius:10px 10px 0 0;background:#171c24;display:flex;align-items:center;justify-content:space-between;padding:7px 9px 7px 12px}
.reply-bar-text{display:flex;align-items:center;gap:7px;min-width:0}
.reply-bar-text strong{font-size:11px;color:#bcb6ff}
.reply-bar-text span:last-child{font-size:11px;color:#8d97a5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reply-preview{display:flex;align-items:center;gap:6px;margin-bottom:4px;color:#818b99;font-size:11px}
.reply-preview strong{color:#aaa3ff}
.pin-mark{font-size:9px;color:#f0c66a;background:#f0c66a14;border:1px solid #f0c66a33;border-radius:999px;padding:2px 5px}
.reaction-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.reaction-chip{border:1px solid #343b47;background:#191e25;color:#cbd2dc;border-radius:999px;padding:4px 7px;display:flex;gap:5px;align-items:center;cursor:pointer;font-size:11px}
.reaction-chip.mine{background:#6d5dfc1d;border-color:#6d5dfc66;color:#d5d0ff}
.reaction-chip b{font-size:10px}
.reaction-picker{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;padding:8px}
.reaction-pick{border:1px solid #303744;background:#171b22;border-radius:10px;font-size:24px;padding:8px;cursor:pointer}
.reaction-pick:hover{background:#252b35}
.voice-stage{text-align:center}
.voice-orb{width:74px;height:74px;border-radius:50%;display:grid;place-items:center;margin:0 auto 14px;background:radial-gradient(circle,#7e72ff,#3d356f);box-shadow:0 0 40px #6d5dfc55;font-size:28px}
.voice-stage .danger-btn{padding:10px 16px;margin-top:10px}

/* v0.5 category redesign */
.channel-create-form{gap:10px}
.field-label{font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:#8993a3;margin:6px 2px 1px}
.channel-name-field{height:50px;border:1px solid #303744;background:#0f1319;border-radius:13px;display:flex;align-items:center;padding:0 13px;transition:.15s}
.channel-name-field:focus-within{border-color:#7568ff;box-shadow:0 0 0 3px #7568ff12}
.channel-name-field input{border:0!important;background:transparent!important;box-shadow:none!important;padding:0 8px!important;height:100%;flex:1}
.channel-type-icon{font-size:18px;color:#707b8b;font-weight:700}
.category-picker{border:1px solid #303744;border-radius:14px;background:#0f1319;padding:6px;display:flex;flex-direction:column;gap:3px;max-height:250px;overflow:auto}
.category-choice{width:100%;min-height:48px;border:0;background:transparent;color:#dce1e8;border-radius:10px;padding:8px 10px;display:flex;align-items:center;gap:11px;text-align:left;cursor:pointer;transition:.13s}
.category-choice:hover{background:#1a2029}
.category-choice.selected{background:#7668ff18}
.category-radio{width:18px;height:18px;border-radius:50%;border:2px solid #596373;display:grid;place-items:center;flex:none}
.category-radio span{width:8px;height:8px;border-radius:50%;background:#8175ff;transform:scale(0);transition:.13s}
.category-choice.selected .category-radio{border-color:#8175ff}
.category-choice.selected .category-radio span{transform:scale(1)}
.category-choice-name{font-size:14px;font-weight:650;flex:1}
.category-choice-note{font-size:10px;color:#6f7988}
.channel-modal-actions{margin-top:10px;padding-top:14px;border-top:1px solid #272d36}
.channel-category-block{margin-top:8px}
.channel-category{width:100%;border:0;background:transparent;color:#7e8999;display:flex;align-items:center;gap:6px;padding:7px 9px 5px;cursor:pointer;text-align:left}
.channel-category:hover{color:#c8ced7}
.category-chevron{font-size:13px;transition:transform .15s}
.category-title{font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}
.category-count{font-size:9px;background:#202630;color:#778291;border-radius:999px;min-width:19px;height:18px;display:grid;place-items:center;padding:0 5px}
.channel-category-block.collapsed .category-chevron{transform:rotate(-90deg)}
.channel-category-block.collapsed .category-channels{display:none}
.category-channels{display:flex;flex-direction:column;gap:2px}

/* v0.6 real voice */
.voice-dock{
  position:fixed;
  left:84px;
  bottom:14px;
  z-index:900;
  width:270px;
  min-height:62px;
  border:1px solid #303844;
  background:rgba(20,24,31,.94);
  backdrop-filter:blur(18px);
  border-radius:15px;
  box-shadow:0 16px 45px #0008;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 10px 10px 12px;
}
.voice-dock-main{display:flex;align-items:center;gap:10px;min-width:0}
.voice-live-dot{width:10px;height:10px;border-radius:50%;background:#35d07f;box-shadow:0 0 14px #35d07f88;flex:none}
.voice-dock-info{min-width:0}
.voice-dock-channel{font-size:12px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.voice-dock-status{font-size:10px;color:#7f8997;margin-top:2px}
.voice-dock-actions{display:flex;gap:6px}
.voice-action{width:36px;height:36px;border:1px solid #303844;background:#1a1f27;color:#cfd5de;border-radius:10px;display:grid;place-items:center;cursor:pointer}
.voice-action:hover{background:#252b35}
.voice-action svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.voice-action.muted{color:#ffbd6a;background:#2b241b;border-color:#57442b}
.voice-action.danger{color:#ff7f92}
.voice-action.danger:hover{background:#321a20;border-color:#61303b}

.voice-room{width:min(540px,90%);margin:auto;text-align:left}
.voice-room-head{display:flex;align-items:center;gap:14px;margin-bottom:18px}
.voice-room-head h2{margin:0;font-size:22px}
.voice-room-head p{margin:3px 0 0;color:#7f8997;font-size:12px}
.voice-room-icon{width:54px;height:54px;border-radius:17px;display:grid;place-items:center;background:linear-gradient(135deg,#6d5dfc,#3d8dff);box-shadow:0 12px 35px #5d51f344;font-size:20px}
.voice-participants{display:flex;flex-direction:column;gap:7px}
.voice-person{display:flex;align-items:center;gap:11px;padding:10px 12px;background:#151a21;border:1px solid #29313c;border-radius:13px}
.voice-you{font-size:9px;color:#aaa2ff;background:#6d5dfc22;border:1px solid #6d5dfc44;border-radius:999px;padding:2px 5px}
.voice-wave{height:20px;display:flex;align-items:center;gap:2px}
.voice-wave i{display:block;width:3px;height:5px;border-radius:999px;background:#5d6673}
.voice-wave.active i{background:#35d07f;animation:voiceBar .7s ease-in-out infinite alternate}
.voice-wave.active i:nth-child(2){animation-delay:.15s}
.voice-wave.active i:nth-child(3){animation-delay:.3s}
@keyframes voiceBar{from{height:5px}to{height:16px}}

.voice-dock-status{transition:color .15s}
.voice-dock-status[data-error="1"]{color:#ff7f92}

/* v0.6.2 sync polish */
.voice-person.self{
  background:linear-gradient(90deg,rgba(109,93,252,.09),#151a21);
  border-color:#453f72;
}
.voice-person .avatar{flex:none}
.voice-person .muted.small{font-size:10px}
.voice-wave:not(.active){opacity:.38}

/* v0.6.3 voice fixes */
.voice-dock{
  left:84px!important;
  bottom:82px!important;
  width:270px!important;
  z-index:950!important;
}
.voice-unlock{
  color:#8fd0ff!important;
  border-color:#35536a!important;
  background:#162431!important;
}
.voice-unlock:hover{
  background:#1d3040!important;
}
#remoteAudioContainer{
  position:fixed;
  width:1px;
  height:1px;
  overflow:hidden;
  opacity:.001;
  pointer-events:none;
}
@media(max-width:700px){
  .voice-dock{
    left:68px!important;
    bottom:82px!important;
    width:min(270px,calc(100vw - 82px))!important;
  }
}

/* v0.6.4 persistent voice navigation */
.voice-dock-main{
  cursor:pointer;
  border-radius:10px;
  padding:3px 5px 3px 2px;
}
.voice-dock-main:hover{
  background:rgba(255,255,255,.035);
}
.voice-dock-channel{
  cursor:pointer;
}
.voice-room .voice-person{
  transition:border-color .15s,background .15s;
}

/* v0.7 messaging UX */
.dm-main{min-width:0}
.dm-name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dm-preview{margin-top:2px;color:#6f7987;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.unread-badge{min-width:20px;height:20px;border-radius:999px;padding:0 6px;display:grid;place-items:center;background:#6d5dfc;color:white;font-size:10px;font-weight:850;flex:none}
.channel-unread{height:18px;min-width:18px;font-size:9px}
.typing-indicator{height:22px;margin:-5px 18px 0 62px;color:#7e8997;font-size:10px;display:flex;align-items:center}
.toast-stack{position:fixed;right:18px;bottom:18px;z-index:1800;width:300px;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast{opacity:0;transform:translateY(8px);transition:.18s ease;display:flex;gap:10px;padding:11px 12px;background:#181d24;border:1px solid #303844;border-radius:13px;box-shadow:0 14px 45px #0008}
.toast.show{opacity:1;transform:none}
.toast-dot{width:9px;height:9px;border-radius:50%;background:#6d5dfc;margin-top:4px;box-shadow:0 0 12px #6d5dfc88}
.toast-title{font-size:12px;font-weight:800}
.toast-text{margin-top:2px;color:#8f99a7;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pinned-panel{position:fixed;right:14px;top:86px;z-index:850;width:330px;max-height:calc(100vh - 110px);background:#151a21;border:1px solid #303844;border-radius:15px;box-shadow:0 18px 55px #0009;overflow:hidden}
.pinned-head{height:48px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #29313c}
.pinned-head strong{font-size:12px}
.pinned-list{padding:8px;overflow:auto;max-height:calc(100vh - 160px)}
.pinned-item{padding:10px;border-radius:10px;background:#10151b;border:1px solid #272e38;margin-bottom:7px}
.pinned-author{font-size:11px;font-weight:800;color:#aaa3ff}
.pinned-text{margin:4px 0 6px;font-size:12px;line-height:1.35;color:#d4dae2}
.pinned-empty{padding:28px;text-align:center;color:#778190;font-size:12px}

/* v0.8 media + search */
.attachment-tray{margin:0 14px -5px 60px;padding:8px;display:flex;gap:8px;overflow-x:auto;background:#151a21;border:1px solid #303844;border-bottom:0;border-radius:12px 12px 0 0}
.pending-attachment{min-width:210px;max-width:270px;height:54px;display:flex;align-items:center;gap:8px;padding:6px 7px;border-radius:9px;background:#10151b;border:1px solid #29313c}
.pending-attachment img{width:42px;height:42px;border-radius:7px;object-fit:cover}
.pending-file-icon{width:40px;height:40px;border-radius:8px;display:grid;place-items:center;background:#202631;color:#9da7b4}
.pending-file-meta{min-width:0;display:flex;flex-direction:column}
.pending-file-meta strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pending-file-meta span{font-size:9px;color:#778190;margin-top:2px}
.message-attachments{display:flex;flex-direction:column;align-items:flex-start;gap:7px;margin-top:6px}
.message-image-link{display:block;max-width:min(440px,70vw)}
.message-image{display:block;max-width:100%;max-height:360px;object-fit:contain;border-radius:11px;border:1px solid #303844;background:#0b0e12}
.message-file{width:min(390px,70vw);display:flex;align-items:center;gap:10px;padding:10px 11px;border-radius:11px;background:#161b22;border:1px solid #303844;color:#dbe0e7;text-decoration:none}
.message-file:hover{background:#1c222b;border-color:#3b4553}
.message-file-icon{width:38px;height:38px;border-radius:9px;display:grid;place-items:center;background:#252b35;color:#aab3c0}
.message-file strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.message-file span{display:block;font-size:9px;color:#7d8794;margin-top:2px}
.file-download{font-size:15px!important;color:#a59eff!important}
.chat.drag-active:after{content:"Отпусти файлы, чтобы прикрепить";position:absolute;inset:86px 18px 82px;border:2px dashed #6d5dfc88;border-radius:18px;background:#6d5dfc0c;color:#b9b3ff;display:grid;place-items:center;font-weight:800;z-index:20;pointer-events:none}
.chat{position:relative}
.search-panel{position:fixed;right:14px;top:86px;z-index:860;width:360px;max-height:calc(100vh - 110px);background:#151a21;border:1px solid #303844;border-radius:15px;box-shadow:0 18px 55px #0009;overflow:hidden}
.search-panel-head{height:48px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #29313c}
.search-panel-head strong{font-size:12px}
.search-panel-input-wrap{padding:10px;border-bottom:1px solid #252c36}
.search-panel-input-wrap input{width:100%;height:38px;border:1px solid #303844;background:#0f141a;color:#e7ebf0;border-radius:9px;padding:0 11px;outline:none}
.search-panel-input-wrap input:focus{border-color:#6d5dfc}
.search-results-list{padding:8px;overflow:auto;max-height:calc(100vh - 205px)}
.search-result{width:100%;border:0;background:transparent;color:#dce1e8;text-align:left;padding:10px;border-radius:9px;cursor:pointer}
.search-result:hover{background:#1d232c}
.search-result-head{display:flex;justify-content:space-between;gap:8px}
.search-result-head strong{font-size:10px;color:#aaa3ff}
.search-result-head span{font-size:9px;color:#6f7987}
.search-result-text{margin-top:5px;font-size:11px;line-height:1.35;color:#c5ccd5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.message-highlight{animation:messageFlash 1.6s ease}
@keyframes messageFlash{0%,100%{background:transparent}25%,65%{background:#6d5dfc18}}

/* v0.9 settings + management */
#meName,#meUser{cursor:pointer}
#meName:hover{color:#b7b1ff}
.server-description{font-size:10px;color:#7d8794;margin-top:5px;line-height:1.35;max-width:180px}
.settings-form textarea{width:100%;min-height:82px;resize:vertical;border:1px solid #303744;background:#0f1319;color:#e4e8ee;border-radius:12px;padding:11px 12px;font:inherit;outline:none}
.settings-form textarea:focus{border-color:#7568ff;box-shadow:0 0 0 3px #7568ff12}
.settings-profile-preview{display:flex;align-items:center;gap:11px;padding:10px;background:#10151b;border:1px solid #29313c;border-radius:12px}
.settings-avatar{width:46px;height:46px}
.settings-note{font-size:10px;color:#707a88;line-height:1.4}
.settings-section-title{font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:#8993a3;margin-top:9px}
.permissions-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.permission-row{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;background:#10151b;border:1px solid #29313c;border-radius:10px;cursor:pointer}
.permission-row span{display:flex;flex-direction:column;gap:2px}
.permission-row strong{font-size:10px}
.permission-row small{font-size:9px;color:#6f7988}
.permission-row input{position:absolute;opacity:0;pointer-events:none}
.permission-row i{width:34px;height:19px;border-radius:999px;background:#2a313c;position:relative;transition:.15s;flex:none}
.permission-row i:after{content:"";position:absolute;width:13px;height:13px;left:3px;top:3px;border-radius:50%;background:#87919f;transition:.15s}
.permission-row input:checked+i{background:#6256d9}
.permission-row input:checked+i:after{transform:translateX(15px);background:white}
.context-menu .danger-menu{color:#ff8292}
.context-menu .danger-menu:hover{background:#351c22}
.confirm-box p{color:#9ca5b2;font-size:12px;line-height:1.5;margin:0 0 12px}
button.danger.solid{background:#cf4056;color:white;border:1px solid #e2566c}
button.danger.solid:hover{background:#e14b62}
#serverSettingsBtn .ui-icon{width:14px;height:14px}
.invite-code-wrap code{user-select:all;cursor:pointer}
.copy-status{min-height:16px}
@media(max-width:800px){.permissions-grid{grid-template-columns:1fr}}

/* v0.9.1 invite copy hotfix */
#copyInvite{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:150px;
}
#copyInvite.copied{
  border-color:#3da56e;
  color:#73d59d;
  background:#183025;
}
#inviteCodeText{
  cursor:pointer;
  user-select:all;
  -webkit-user-select:all;
}
#inviteCodeText:hover{
  color:#d6d1ff;
}

/* FriendChat v1.0 */
.server-rail-photo{padding:0!important;overflow:hidden}
.server-rail-photo img{width:100%;height:100%;object-fit:cover;display:block}
.server-emblem.photo{background-size:cover!important;background-position:center!important;color:transparent}
.server-identity-editor{display:flex;align-items:center;gap:12px;padding:11px;background:#10151b;border:1px solid #29313c;border-radius:13px}
.server-icon-picker{width:62px;height:62px;border:1px solid #394250;border-radius:18px;background:#242a34;color:#e1e5eb;font-weight:850;font-size:18px;display:grid;place-items:center;position:relative;overflow:hidden;cursor:pointer;background-size:cover;background-position:center}
.server-icon-picker.photo{color:transparent}
.server-icon-edit{position:absolute;right:4px;bottom:4px;width:22px;height:22px;border-radius:7px;background:#11161dde;color:#dfe4ea;display:grid;place-items:center;border:1px solid #3a424f}
.server-icon-edit svg{width:12px;height:12px}
.text-button{border:0;background:transparent;color:#aaa3ff;padding:5px 0;font-size:10px;cursor:pointer}
.text-button:hover{text-decoration:underline}
.danger-zone{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:12px;padding:12px;border:1px solid #572a35;background:#2a171c;border-radius:12px}
.danger-zone>div{display:flex;flex-direction:column;gap:3px}
.danger-zone strong{font-size:11px;color:#ff9aaa}
.danger-zone span{font-size:9px;color:#a77c84;line-height:1.35}
.delete-server-confirm{text-align:center;padding:5px}
.delete-server-confirm .danger-symbol{width:54px;height:54px;margin:0 auto 10px;border-radius:16px;display:grid;place-items:center;background:#381a21;color:#ff7f92;border:1px solid #63303b}
.delete-server-confirm .danger-symbol svg{width:22px;height:22px}
.delete-server-confirm>strong{font-size:17px}
.delete-server-confirm p{color:#8f99a7;font-size:11px;line-height:1.45;margin:9px 0 12px}
.role-editor{display:flex;flex-direction:column;gap:12px}
.role-options{display:flex;flex-direction:column;gap:6px}
.role-option{border:1px solid #303844;background:#10151b;color:#dfe3e9;border-radius:11px;padding:11px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer}
.role-option:hover{background:#181e26}
.role-option.selected{border-color:#6d5dfc;background:#6d5dfc13}
.role-option>span:last-child{display:flex;flex-direction:column;gap:2px}
.role-option strong{font-size:11px}
.role-option small{font-size:9px;color:#778190}
.role-radio{width:18px;height:18px;border:2px solid #536070;border-radius:50%;display:grid;place-items:center;flex:none}
.role-radio i{width:8px;height:8px;background:#8175ff;border-radius:50%;transform:scale(0);transition:.13s}
.role-option.selected .role-radio{border-color:#8175ff}
.role-option.selected .role-radio i{transform:scale(1)}
.move-channel-box{display:flex;flex-direction:column;gap:10px}
button:disabled{opacity:.45;cursor:not-allowed}

/* FriendChat v1.1 — Discord-like local audio controls */
.profile-strip{
  gap:8px;
  padding:8px 9px!important;
}
.profile-avatar-status{position:relative;flex:none}
.profile-online-dot{
  position:absolute;
  width:10px;height:10px;
  right:-1px;bottom:0;
  border-radius:50%;
  background:#36c982;
  border:3px solid #11161d;
  box-sizing:content-box;
}
.profile-self-info{min-width:0;overflow:hidden}
.profile-self-info .strong,.profile-self-info .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-audio-actions{display:flex;align-items:center;gap:2px;flex:none}
.profile-audio-btn{
  width:30px;height:30px;
  display:grid;place-items:center;
  border:0;border-radius:7px;
  background:transparent;color:#b6bec9;
  cursor:pointer;padding:0;
  transition:background .12s,color .12s,transform .08s;
}
.profile-audio-btn:hover{background:#252c36;color:#f0f2f5}
.profile-audio-btn:active{transform:scale(.95)}
.profile-audio-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.profile-audio-btn.muted,.profile-audio-btn.deafened{color:#ff6f7f;background:#351c23}
.profile-audio-btn.muted svg,.profile-audio-btn.deafened svg{filter:none}
.profile-audio-btn.disabled-by-deafen{opacity:.7}
.profile-audio-btn.muted::after,
.profile-audio-btn.deafened::after{
  content:"";
  position:absolute;
  width:20px;height:2px;
  background:#ff6f7f;
  transform:rotate(-45deg);
  border-radius:2px;
}
.profile-audio-btn{position:relative}
.voice-dock-actions{gap:5px}
.audio-settings{display:flex;flex-direction:column;gap:10px}
.audio-setting-block{
  display:flex;align-items:center;gap:11px;
  padding:11px;
  border:1px solid #2d3540;
  background:#10151b;
  border-radius:12px;
}
.audio-setting-icon{
  width:40px;height:40px;border-radius:11px;
  background:#222934;color:#aeb7c4;
  display:grid;place-items:center;flex:none
}
.audio-setting-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.fc-select{
  width:100%;height:38px;
  border:1px solid #343d49;
  border-radius:9px;
  background:#0d1117;
  color:#e1e5eb;
  padding:0 10px;
  outline:none;
  font:inherit;
}
.fc-select:focus{border-color:#7568ff;box-shadow:0 0 0 3px #7568ff14}
.fc-select:disabled{opacity:.5}
.audio-warning{
  display:flex;flex-direction:column;gap:3px;
  padding:10px 11px;
  border-radius:10px;
  border:1px solid #5a4726;
  background:#2a2216;
}
.audio-warning strong{font-size:10px;color:#e8ba67}
.audio-warning span{font-size:9px;color:#a89168;line-height:1.4}
.audio-settings-hint{
  color:#7f8997;
  font-size:9px;
  line-height:1.45;
  padding:2px 3px
}
.member-presence.online{
  background:#39d98a!important;
  box-shadow:0 0 0 2px #11161d,0 0 8px #39d98a55;
}

/* FriendChat v1.2 — icon/readability polish */
.ui-icon svg,
.icon-btn svg,
.composer-icon svg,
.composer-tool svg,
.profile-audio-btn svg,
.voice-action svg{
  stroke-width:2!important;
}
.ui-icon{width:17px!important;height:17px!important}
.context-menu button{min-height:36px;gap:10px}
.context-menu button .ui-icon{color:#c7ced8}
.context-menu button:hover .ui-icon{color:#fff}
.profile-audio-btn{width:32px!important;height:32px!important;border-radius:8px!important}
.profile-audio-btn svg{width:18px!important;height:18px!important}
.icon-btn{min-width:30px;min-height:30px}
.message-actions button{width:30px;height:30px;border-radius:8px}
.message-actions button svg{width:15px;height:15px}
.copy-btn{min-width:38px;min-height:36px;border-radius:9px}

/* FriendChat v1.2.1 — softer icon language */
.ui-icon svg,
.icon-btn svg,
.composer-icon svg,
.composer-tool svg,
.profile-audio-btn svg,
.voice-action svg,
.message-actions button svg,
.copy-btn svg{
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.55!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

.profile-audio-actions{gap:1px!important}
.profile-audio-btn{
  width:29px!important;
  height:29px!important;
  border-radius:9px!important;
  color:#7f8999!important;
  background:transparent!important;
  border:1px solid transparent!important;
}
.profile-audio-btn:hover{
  color:#c7c3f5!important;
  background:#181d25!important;
  border-color:#252c37!important;
}
.profile-audio-btn svg{
  width:15px!important;
  height:15px!important;
}
.profile-audio-btn.muted,
.profile-audio-btn.deafened{
  color:#df6d7b!important;
  background:#25181d!important;
  border-color:#3b222a!important;
}
.profile-audio-btn.muted::after,
.profile-audio-btn.deafened::after{
  width:15px!important;
  height:1.3px!important;
  background:#df6d7b!important;
}

.message-actions button{
  width:26px!important;
  height:26px!important;
  border-radius:8px!important;
  color:#707b8c!important;
  background:transparent!important;
}
.message-actions button:hover{
  color:#b0a9ec!important;
  background:#171c23!important;
}
.message-actions button svg{
  width:12.5px!important;
  height:12.5px!important;
}

.icon-btn{
  color:#7d8796!important;
}
.icon-btn:hover{
  color:#c6c2e9!important;
  background:#171c23!important;
}

.context-menu button .ui-icon{
  color:#808a99!important;
}
.context-menu button:hover .ui-icon{
  color:#bcb6ef!important;
}

.copy-btn{
  color:#8e88d3!important;
  background:#141820!important;
  border-color:#262c36!important;
}
.copy-btn:hover{
  color:#bdb7f3!important;
  background:#1a2029!important;
}


/* FriendChat v1.2.3 — UI polish */
.app{grid-template-columns:76px clamp(250px,18vw,292px) minmax(0,1fr) clamp(250px,18vw,292px)!important}
.chat-head{height:68px!important;padding:0 18px!important}
.sidebar-head{height:68px!important}
.messages{padding:16px 18px 10px!important}
.msg{width:min(100%,980px);padding:10px 12px!important;border-radius:14px;align-items:flex-start!important;transition:background .12s ease,transform .12s ease}
.msg:hover{background:#141922!important;transform:translateX(1px)}
.msg-body{min-width:0;flex:1}
.msg-meta{gap:7px!important;min-height:20px}
.msg-name{font-size:14px!important}
.msg-time{font-size:10px!important;letter-spacing:.02em}
.msg-text{margin-top:4px!important}
.msg-actions{margin-left:auto;display:flex;align-items:center;gap:4px;opacity:.0;transition:opacity .14s ease}
.msg:hover .msg-actions{opacity:1}
.msg-actions .icon-btn{width:28px;height:28px;padding:0;display:grid;place-items:center;border-radius:9px;color:#748093;background:transparent;border:1px solid transparent}
.msg-actions .icon-btn:hover{background:#1b212b;color:#c4bcff;border-color:#2d3440}
.msg-actions .icon-btn .ui-icon{width:15px!important;height:15px!important}
.msg-actions .icon-btn svg{width:15px!important;height:15px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.65!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.profile-strip{padding:10px 12px!important;min-height:60px;background:linear-gradient(180deg,#131820,#11161d)!important}
.profile-self-info .strong{font-size:14px!important;font-weight:750}
.profile-self-info .small{font-size:11px!important}
.profile-audio-actions{gap:4px!important;padding-left:6px;border-left:1px solid #252c36}
.profile-audio-btn{width:31px!important;height:31px!important;border-radius:10px!important}
.server-card{padding:13px!important;border-radius:16px!important}
.member-card{padding:10px 10px!important;border-radius:12px!important}
.role-pill{font-size:8px!important;letter-spacing:.04em}
.details-content{padding:10px 14px 16px!important}
@media (max-width: 1050px){.app{grid-template-columns:68px 260px minmax(0,1fr)!important}}


/* FriendChat v1.3 — responsive/mobile overhaul */
.msg{position:relative!important;width:100%!important;max-width:none!important;border-radius:10px!important;padding:9px 10px!important}
.msg:hover{background:#131821!important;transform:none!important}
.msg-actions{position:absolute!important;right:8px;top:7px;margin:0!important;padding:3px!important;border-radius:10px;background:#11161ddd;border:1px solid #252d38;box-shadow:0 8px 24px #0004;opacity:0!important;pointer-events:none;z-index:2}
.msg:hover .msg-actions,.msg:focus-within .msg-actions{opacity:1!important;pointer-events:auto}
.msg-more-mobile{display:none!important}
.msg-actions .icon-btn{width:27px!important;height:27px!important}
.msg-body{padding-right:8px}
.messages{padding:14px 16px 10px!important}
.mobile-sidebar-btn{display:none;border:0;background:transparent;color:#8d97a6;width:36px;height:36px;border-radius:9px;padding:0;place-items:center;cursor:pointer;flex:none}
.mobile-sidebar-btn:hover{background:#1a2029;color:#d6dae0}
.mobile-sidebar-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.chat-head-copy{min-width:0;flex:1}
.mobile-sidebar-backdrop{display:none}

@media (hover:none),(pointer:coarse){
  .msg-actions{opacity:1!important;pointer-events:auto}
}

@media (max-width:900px){
  .app{grid-template-columns:64px 250px minmax(0,1fr)!important}
  .details{display:none!important}
  .chat-head{padding:0 14px!important}
  .messages{padding-left:12px!important;padding-right:12px!important}
}

@media (max-width:760px){
  body{overflow:hidden}
  .app{grid-template-columns:56px minmax(0,1fr)!important;position:relative}
  .rail{width:56px;padding:10px 6px!important;z-index:52}
  .rail-btn{width:42px!important;height:42px!important;border-radius:14px!important}
  .sidebar{
    position:fixed!important;
    left:56px!important;top:0!important;bottom:0!important;
    width:min(82vw,310px)!important;height:100dvh!important;
    transform:translateX(calc(-100% - 58px));
    transition:transform .2s ease;
    z-index:51!important;
    box-shadow:18px 0 45px #0009!important;
  }
  body.mobile-sidebar-open .sidebar{transform:translateX(0)}
  .mobile-sidebar-backdrop{position:fixed;display:block;inset:0;background:#0008;z-index:50}
  .chat{grid-column:2!important;min-width:0;width:100%}
  .mobile-sidebar-btn{display:grid}
  .chat-head{height:60px!important;padding:0 10px!important;gap:8px}
  .chat-title{font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .chat-head .small{font-size:10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #topActions{display:flex;gap:4px;flex:none}
  #topActions .top-mini{font-size:0!important;width:34px;height:34px;padding:0!important;display:grid;place-items:center}
  #topActions .top-mini .ui-icon{margin:0}
  .messages{padding:8px 6px 6px!important}
  .msg{gap:8px!important;padding:9px 7px!important;border-radius:8px!important}
  .msg>.avatar{width:32px!important;height:32px!important;font-size:11px!important}
  .msg-name{font-size:13px!important}
  .msg-time{font-size:9px!important}
  .msg-text{font-size:14px!important;line-height:1.4!important;padding-right:30px}
  .msg-actions{right:4px!important;top:6px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;opacity:1!important;pointer-events:auto}
  .msg-action-desktop{display:none!important}
  .msg-more-mobile{display:grid!important;background:#171c24!important;border:1px solid #28303b!important;width:30px!important;height:30px!important}
  .msg-more-mobile .ui-icon{width:15px!important;height:15px!important}
  .composer{padding:7px 8px 9px!important;gap:5px!important;background:#0f1319}
  .composer input#messageInput{min-height:42px!important;padding:10px 78px 10px 11px!important;font-size:14px}
  .composer-icon{width:34px!important;height:34px!important;flex:none}
  .composer-tools{right:57px!important;bottom:15px!important}
  #gifBtn,#stickerBtn{display:none!important}
  .composer-tool{min-width:27px!important;height:27px!important}
  .send{width:40px!important;height:40px!important;flex:none}
  .send svg{width:18px;height:18px}
  .profile-strip{min-height:58px!important;padding:8px 10px!important}
  .profile-audio-btn{width:30px!important;height:30px!important}
  .context-menu{width:min(240px,calc(100vw - 16px))!important}
  .modal{padding:10px!important}
  .modal-card{width:100%!important;max-height:92dvh;overflow:auto;border-radius:16px!important}
  .quick-profile{width:calc(100vw - 20px)!important;max-width:340px!important}
  .search-panel,.pinned-panel{left:56px!important;right:0!important;width:auto!important}
}

@media (max-width:480px){
  .rail{width:50px!important}
  .app{grid-template-columns:50px minmax(0,1fr)!important}
  .sidebar{left:50px!important;width:min(86vw,300px)!important}
  .rail-btn{width:38px!important;height:38px!important}
  .chat-head{padding-right:7px!important}
  .chat-title{font-size:15px!important}
  .msg-text{font-size:13.5px!important}
  .composer input#messageInput{padding-right:70px!important}
  .search-panel,.pinned-panel{left:50px!important}
}

/* FriendChat v1.4 — Message Context UX */
.msg{
  position:relative!important;
  display:flex!important;
  gap:10px!important;
  width:100%!important;
  padding:8px 10px!important;
  margin:1px 0!important;
  border-radius:9px!important;
  background:transparent!important;
  transition:background .12s ease,box-shadow .12s ease!important;
}
.msg:hover{
  background:#12171f!important;
  transform:none!important;
}
.msg.context-active{
  background:#171d27!important;
  box-shadow:inset 2px 0 0 #7568ff!important;
}
.msg-actions{display:none!important}
.msg-body{padding-right:0!important}
.msg>.avatar{margin-top:2px}
.msg-text{padding-right:0!important}
.msg-meta{min-height:18px!important}
.msg-name{font-size:13px!important}
.msg-time{font-size:9px!important}
.msg-text{font-size:14px!important;line-height:1.42!important}

.message-context{
  width:248px!important;
  padding:6px!important;
  background:#171b22!important;
  border:1px solid #313946!important;
  border-radius:13px!important;
  box-shadow:0 18px 55px #000b!important;
}
.message-context button{
  width:100%;
  min-height:36px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px!important;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#cbd2dc;
  cursor:pointer;
  text-align:left;
}
.message-context button:hover{background:#222832;color:#fff}
.message-context button .ui-icon{width:16px!important;height:16px!important;color:#8e98a8}
.message-context button:hover .ui-icon{color:#bdb7ff!important}
.message-context button span:not(.ui-icon){flex:1}
.message-context kbd{
  padding:2px 5px;
  border:1px solid #343c48;
  border-radius:5px;
  background:#10141a;
  color:#727d8d;
  font:10px ui-monospace,SFMono-Regular,Consolas,monospace;
}
.message-context .danger-menu{color:#ef7787!important}
.message-context .danger-menu:hover{background:#311c22!important}
.message-context .ctx-sep{height:1px;background:#2c333e;margin:5px 4px}

.reaction-popover{
  position:fixed;
  z-index:1400;
  width:220px;
  padding:8px;
  border-radius:13px;
  border:1px solid #313946;
  background:#171b22;
  box-shadow:0 18px 55px #000a;
}
.reaction-popover-title{
  padding:2px 4px 7px;
  color:#7f8997;
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
}
.reaction-popover-grid{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:3px;
}
.reaction-popover-item{
  width:23px;height:28px;
  border:0;
  border-radius:7px;
  background:transparent;
  font-size:18px;
  cursor:pointer;
}
.reaction-popover-item:hover{background:#252b35;transform:scale(1.08)}

.message-edit-form textarea{
  width:100%;
  min-height:120px;
  max-height:42vh;
  resize:vertical;
  border:1px solid #303844;
  border-radius:12px;
  background:#0f1319;
  color:#e5e8ed;
  padding:12px 13px;
  outline:none;
  font:inherit;
  line-height:1.45;
}
.message-edit-form textarea:focus{
  border-color:#7568ff;
  box-shadow:0 0 0 3px #7568ff14;
}
.message-edit-hint{
  color:#697485;
  font-size:10px;
  margin-top:-4px;
}
.delete-message-dialog p{
  color:#8d97a5;
  font-size:12px;
  line-height:1.45;
}
.delete-message-preview{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:11px 12px;
  border:1px solid #303844;
  border-radius:11px;
  background:#10151b;
}
.delete-message-preview strong{font-size:12px}
.delete-message-preview span{
  color:#aeb6c2;
  font-size:12px;
  line-height:1.4;
  max-height:90px;
  overflow:hidden;
}

.reply-preview .ui-icon{
  width:12px!important;height:12px!important;
  display:inline-grid!important;
  place-items:center!important;
}

@media (max-width:760px){
  .msg{padding:8px 7px!important;gap:8px!important}
  .msg>.avatar{width:31px!important;height:31px!important}
  .msg-name{font-size:12.5px!important}
  .msg-text{font-size:14px!important}
  .message-context{
    width:min(300px,calc(100vw - 16px))!important;
    max-height:70dvh;
    overflow:auto;
  }
  .message-context button{
    min-height:44px;
    font-size:14px;
  }
  .message-context kbd{display:none}
  .reaction-popover{
    width:min(300px,calc(100vw - 16px));
  }
  .reaction-popover-grid{
    grid-template-columns:repeat(8,1fr);
  }
  .reaction-popover-item{
    width:100%;
    height:34px;
  }
}

@media (max-width:480px){
  .messages{padding:6px 4px 4px!important}
  .msg{border-radius:7px!important}
  .msg>.avatar{width:29px!important;height:29px!important}
  .reaction-popover-grid{grid-template-columns:repeat(4,1fr)}
  .reaction-popover-item{height:42px;font-size:20px}
}

/* FriendChat v1.4.1 — live reaction feedback */
.reaction-chip{animation:reactionIn .14s ease}
@keyframes reactionIn{
  from{opacity:0;transform:translateY(2px) scale(.96)}
  to{opacity:1;transform:none}
}


/* FriendChat v1.5.6 — self identity visibility */
.profile-strip{
  min-width:0;
}
.profile-self-info{
  flex:1 1 auto!important;
  min-width:70px!important;
  max-width:100%;
  display:flex!important;
  flex-direction:column;
  justify-content:center;
  overflow:hidden;
}
.profile-self-info #meName{
  display:block!important;
  color:#f0f2f5!important;
  line-height:1.2;
  min-height:16px;
}
.profile-self-info #meUser{
  display:block!important;
  color:#7f8a99!important;
  line-height:1.2;
  min-height:13px;
}
.sidebar-head #meTag{
  display:block!important;
  min-height:13px;
  color:#7f8a99!important;
}
.profile-audio-actions{
  margin-left:auto;
  flex:0 0 auto!important;
}

@media(max-width:760px){
  .profile-self-info{
    min-width:82px!important;
  }
}


/* FriendChat 2.0 stable identity/sidebar sizing */
.sidebar{min-width:0}
.sidebar-head>div:first-child{min-width:0;flex:1}
#meTag,#meName,#meUser{visibility:visible!important;opacity:1!important}
.profile-self-info{display:block!important;flex:1 1 0!important;min-width:0!important}
.profile-self-info #meName,.profile-self-info #meUser{
  display:block!important;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* FriendChat 2.1 reliability feedback */
#messageInput:disabled{
  opacity:.72;
  cursor:wait;
}


/* FriendChat 2.2 — server settings redesign */
.server-settings-modal{
  width:min(860px,96vw)!important;
  max-height:88dvh;
  padding:0!important;
  overflow:hidden!important;
}
.server-settings-modal .modal-head{
  padding:18px 20px 14px;
  border-bottom:1px solid #252b34;
}
.server-settings-modal #modalBody{
  min-height:540px;
}
.server-settings-pro{
  display:grid!important;
  grid-template-columns:190px minmax(0,1fr);
  gap:0!important;
  margin:0!important;
  min-height:540px;
  max-height:calc(88dvh - 65px);
}
.settings-nav{
  background:#11151b;
  border-right:1px solid #272e38;
  padding:14px 10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.settings-nav-item{
  border:0;
  background:transparent;
  color:#929cab;
  min-height:40px;
  border-radius:9px;
  padding:0 11px;
  display:flex;
  align-items:center;
  gap:9px;
  text-align:left;
  font-weight:650;
  cursor:pointer;
}
.settings-nav-item:hover{
  background:#1a2028;
  color:#e9edf3;
}
.settings-nav-item.active{
  background:#252d38;
  color:#fff;
}
.settings-nav-item .ui-icon{
  width:17px;
  height:17px;
}
.settings-nav-spacer{flex:1}
.settings-nav-item.danger-nav{color:#e27888}
.settings-nav-item.danger-nav.active{
  color:#ff9eac;
  background:#2c191f;
}
.settings-content{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#151a21;
}
.settings-pane{
  display:none;
  padding:24px 26px 10px;
  overflow:auto;
  flex:1;
}
.settings-pane.active{display:block}
.settings-pane-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:22px;
}
.settings-pane-head h4{
  margin:0 0 5px;
  font-size:19px;
  letter-spacing:-.02em;
}
.settings-pane-head p{
  margin:0;
  color:#87919f;
  font-size:12px;
}
.server-profile-editor{
  display:flex;
  align-items:center;
  gap:16px;
  padding:16px;
  background:#11161c;
  border:1px solid #2b333e;
  border-radius:14px;
  margin-bottom:18px;
}
.server-icon-picker.large{
  width:76px;
  height:76px;
  border-radius:22px;
  flex:0 0 76px;
  font-size:20px;
}
.server-profile-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.server-profile-copy>span{
  color:#818c9b;
  font-size:11px;
}
.server-icon-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:9px;
}
.secondary.compact{
  padding:7px 11px;
  min-height:auto;
}
.settings-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-bottom:16px;
}
.settings-field label{
  color:#aeb7c4;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.settings-field input,
.settings-field textarea{
  width:100%;
  box-sizing:border-box;
  color:#eef2f7!important;
  background:#0f141a!important;
  border:1px solid #2b333e!important;
  border-radius:10px!important;
  padding:11px 12px!important;
  outline:none;
  resize:vertical;
}
.settings-field textarea{
  min-height:96px;
  max-height:180px;
}
.settings-field input:focus,
.settings-field textarea:focus{
  border-color:#7067eb!important;
  box-shadow:0 0 0 2px #7067eb20;
}
.field-hint{
  color:#697484;
  font-size:10px;
  align-self:flex-end;
}
.role-permission-card{
  background:#10151b;
  border:1px solid #2a323c;
  border-radius:14px;
  padding:14px;
  margin-bottom:12px;
}
.role-permission-head{
  display:flex;
  gap:11px;
  align-items:center;
  padding-bottom:12px;
  margin-bottom:5px;
  border-bottom:1px solid #242b34;
}
.role-permission-head>div:last-child{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.role-permission-head span{
  color:#7f8997;
  font-size:10px;
}
.role-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#222937;
}
.role-icon.admin{color:#9187ff}
.role-icon.member{color:#70a8ff}
.role-icon .ui-icon{width:18px;height:18px}
.role-permission-card .permission-row{
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid #20262e!important;
  border-radius:0!important;
  padding:10px 2px!important;
}
.role-permission-card .permission-row:last-child{border-bottom:0!important}
.danger-heading h4{color:#ff9eac}
.danger-card-large{
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid #5a2d36;
  background:#28171c;
  border-radius:14px;
  padding:16px;
}
.danger-card-large p{
  margin:4px 0 0;
  color:#aa7d85;
  font-size:11px;
  line-height:1.45;
}
.danger-card-icon{
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  color:#ff8fa1;
  background:#401f27;
}
.danger-card-icon .ui-icon{width:20px;height:20px}
.settings-footer{
  padding:12px 18px;
  border-top:1px solid #272e38;
  background:#12171d;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.settings-footer .modal-actions{margin:0}
.settings-save-hint{
  color:#66717f;
  font-size:10px;
}
.settings-save-hint.dirty{color:#d1b36f}

/* Composer upload state */
.composer.is-uploading{
  opacity:.76;
}
.composer.is-uploading::after{
  content:"Загрузка…";
  position:absolute;
  right:92px;
  bottom:100%;
  margin-bottom:7px;
  padding:5px 8px;
  border-radius:7px;
  background:#222936;
  color:#ccd3dc;
  font-size:10px;
  box-shadow:0 6px 18px #0005;
}

@media(max-width:700px){
  .server-settings-modal{
    width:100%!important;
    max-height:94dvh!important;
  }
  .server-settings-pro{
    grid-template-columns:1fr;
    max-height:calc(94dvh - 60px);
  }
  .settings-nav{
    flex-direction:row;
    border-right:0;
    border-bottom:1px solid #272e38;
    padding:8px;
    overflow:auto;
  }
  .settings-nav-spacer{display:none}
  .settings-nav-item{
    white-space:nowrap;
    flex:0 0 auto;
  }
  .settings-pane{
    padding:18px 16px 8px;
  }
  .settings-footer{
    position:sticky;
    bottom:0;
  }
  .danger-card-large{
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .danger-card-large .danger{width:100%}
}


/* FriendChat 2.2.1 — instant race-free navigation */
.channel-item,
.dm-row{
  transition:background-color .08s ease,color .08s ease,transform .08s ease;
  cursor:pointer;
}
.channel-item:active,
.dm-row:active{
  transform:translateY(1px);
}
.channel-item.active,
.dm-row.active{
  background:#242b35!important;
  color:#f4f6f9!important;
}
.channel-item.active .hash{
  color:#8e85ff!important;
}
.channel-item.active::before{
  content:"";
  width:3px;
  align-self:stretch;
  margin:-3px 4px -3px -5px;
  border-radius:5px;
  background:#746cff;
}
.chat-loading{
  min-height:120px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  color:#778292;
  font-size:12px;
}
.chat-loading-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#746cff;
  animation:fc-loading-pulse .75s ease-in-out infinite alternate;
}
@keyframes fc-loading-pulse{
  from{opacity:.35;transform:scale(.75)}
  to{opacity:1;transform:scale(1.15)}
}

/* FriendChat 2.3 — Product UI pass */
.server-title-button{appearance:none;border:0;background:transparent;color:inherit;font:inherit;text-align:left;padding:0;cursor:pointer;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.server-title-button:hover{color:#fff}.server-title-button::after{content:"⌄";font-size:12px;color:#778292;margin-left:7px}.context-sep{height:1px;background:#303742;margin:5px 6px}.context-menu{min-width:225px;padding:7px;border:1px solid #343b47;background:#171c23;box-shadow:0 18px 48px #0008;border-radius:12px}.context-menu button{min-height:37px;border-radius:8px;padding:0 10px;gap:9px}.context-menu button:hover{background:#252c36}.context-menu .danger-menu{color:#ff7f91}
.settings-workspace-modal{width:min(1180px,98vw)!important;height:min(820px,94dvh)!important;max-height:94dvh!important;border-radius:16px!important}.settings-workspace-modal .modal-head{min-height:62px}.settings-workspace-modal #modalBody{height:calc(100% - 62px);min-height:0}.settings-workspace-modal .server-settings-pro{height:100%;max-height:none!important;grid-template-columns:230px minmax(0,1fr)}.settings-workspace-modal .settings-nav{padding:20px 12px;background:#10141a}.settings-workspace-modal .settings-pane{padding:32px 42px 18px;max-width:820px;width:100%;box-sizing:border-box}.settings-workspace-modal .settings-content{overflow:hidden}.settings-workspace-modal .settings-pane.active{overflow:auto}.settings-workspace-modal .settings-footer{padding:13px 24px}
.member-card{border-radius:8px;padding:7px 8px;margin:2px 0;transition:background .08s ease}.member-card:hover{background:#202630}.member-name{font-weight:650;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.role-pill{font-size:9px;letter-spacing:.04em}.quick-profile{border:1px solid #3a4350;box-shadow:0 22px 70px #000b;border-radius:16px;overflow:hidden}.qp-banner{height:76px;background:linear-gradient(135deg,#473f8c,#26283b 65%,#172129)}.qp-body{padding:54px 14px 14px}.qp-name{font-size:20px;font-weight:850;letter-spacing:-.02em}
.audio-device-menu{width:300px;padding:7px 6px 4px;display:flex;flex-direction:column;gap:7px}.audio-menu-title{font-size:13px;font-weight:800;padding:4px 3px 8px}.audio-device-menu label{font-size:9px;font-weight:800;color:#7d8796;text-transform:uppercase;letter-spacing:.08em}.audio-device-menu select{width:100%;background:#0f141a;color:#eef2f7;border:1px solid #303844;border-radius:8px;padding:9px 10px;outline:none}.audio-menu-hint{font-size:9px;line-height:1.4;color:#687484;padding:4px 2px}
@media(max-width:760px){.settings-workspace-modal{width:100%!important;height:96dvh!important;max-height:96dvh!important;border-radius:14px 14px 0 0!important}.settings-workspace-modal .server-settings-pro{grid-template-columns:1fr}.settings-workspace-modal .settings-nav{padding:8px;flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid #2b323c}.settings-workspace-modal .settings-pane{padding:20px 16px 12px}}

/* FriendChat 2.3.7 — notifications disabled */
.unread-badge,
.server-unread,
.channel-unread,
.mention-badge,
.notification-badge,
.badge.unread,
[data-unread-count] {
  display: none !important;
}


/* FriendChat 2.4.1 — no toast + UI start */
.toast-stack{display:none!important}
body{background:#090b10}
.app{grid-template-columns:72px 254px minmax(0,1fr) 284px;background:#090b10}
.rail{padding:12px 10px;background:linear-gradient(180deg,#08090d,#0b0d12)}
.rail-btn{width:46px;height:46px;border-radius:14px;background:#161a22;border:1px solid #232935;box-shadow:none}
.rail-btn:hover,.rail-btn.active{background:#222838;border-color:#5964f2;transform:none;box-shadow:0 0 0 1px rgba(95,105,255,.08),0 10px 24px rgba(0,0,0,.22)}
.sidebar{background:#11141b;border-right:1px solid #202530}
.sidebar-head{height:68px;padding:14px 14px 12px 16px;background:#11141b}
.brand{font-weight:820}
.search-btn{height:40px;border-radius:12px;background:#0d1016;border:1px solid #222833;color:#9ca6b5}
.server-title-row{padding:14px 12px 6px}
.section-title{padding:14px 14px 8px;color:#8a93a1;font-size:11px;letter-spacing:.11em}
.list{padding:0 8px 10px}
.list-item{min-height:44px;padding:10px 12px;border-radius:12px;color:#c3cbd8}
.list-item:hover,.list-item.active{background:#1c212b;color:#fff;transform:none}
.profile-strip{background:#0f1218;border-top:1px solid #202530;padding:10px 12px}
.chat{background:radial-gradient(circle at 75% 0%,rgba(87,98,255,.10),transparent 30%),linear-gradient(180deg,#0d1016,#0a0d12)}
.chat-head{height:66px;padding:0 16px;background:rgba(12,15,21,.92);border-bottom:1px solid #202530;backdrop-filter:blur(18px)}
.chat-title{font-size:19px;font-weight:860;letter-spacing:-.02em}
#topActions{display:flex;gap:8px}
.top-mini{height:34px;padding:0 12px;border-radius:10px;background:#171b24;border:1px solid #252c38;color:#d9deea}
.top-mini:hover{background:#202633}
.messages{padding:14px 18px 10px}
.msg{padding:10px 10px;border-radius:12px;transition:background .12s ease,box-shadow .12s ease}
.msg:hover{background:rgba(255,255,255,.03)}
.msg-body{padding-top:2px}
.msg-name{font-size:14px;font-weight:780}
.msg-time{font-size:10px;color:#7d8796}
.msg-text{margin-top:4px;line-height:1.48;color:#e4e8ef}
.message-jump{background:rgba(109,93,252,.12)!important;box-shadow:0 0 0 1px rgba(109,93,252,.24) inset}
.composer{margin:0 16px 16px;padding:8px 10px;background:#11151c;border:1px solid #232a36;border-radius:16px;gap:8px}
.composer input#messageInput{background:transparent!important;border:0!important;box-shadow:none!important;min-height:44px;padding-left:4px;padding-right:124px}
.composer input#messageInput:focus{border:0!important}
.composer-icon,.composer-tool{color:#919baa}
.composer-icon:hover,.composer-tool:hover{background:#1f2530;color:#eef2f7}
.send{width:42px;height:42px;border-radius:12px}
.details{background:#0f1218;border-left:1px solid #202530}
.details-content{padding:14px}
.user-card,.server-card{border:1px solid #242a35;border-radius:16px;background:#141923;box-shadow:0 14px 34px rgba(0,0,0,.18)}
.member-card{margin:3px 6px;border-radius:12px}
.search-panel,.pinned-panel{top:78px;right:18px;border-radius:18px;border:1px solid #242a36;background:#11151c;box-shadow:0 22px 60px rgba(0,0,0,.4)}
.search-panel-head,.pinned-head{height:50px;padding:0 12px;border-bottom:1px solid #202530;background:#0f1319}
.search-panel-input-wrap{padding:10px;border-bottom:1px solid #202530}
.search-panel-input-wrap input{height:40px;border-radius:11px;background:#0b0e14;border:1px solid #252c38}
.search-results-list,.pinned-list{padding:8px;display:flex;flex-direction:column;gap:8px}
.search-result-item,.pinned-message-card{width:100%;text-align:left;border:1px solid #252c38;background:#131923;color:#e8ecf2;border-radius:14px;padding:11px 12px;cursor:pointer}
.search-result-item:hover,.pinned-message-card:hover{background:#1a2130;border-color:#333c4d}
.search-result-top{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:6px}
.search-result-top strong{font-size:12px;font-weight:800}
.search-result-top span{font-size:11px;color:#8d97a6;white-space:nowrap}
.search-result-text{font-size:13px;line-height:1.4;color:#d5dbe5;word-break:break-word}
.search-empty{padding:18px 14px;text-align:center;color:#8a94a3;font-size:13px;border:1px dashed #2a3140;border-radius:14px;background:#10141b}
.empty h2{font-size:34px;letter-spacing:-.03em}
.empty p{max-width:460px}
@media(max-width:1050px){.app{grid-template-columns:68px 248px minmax(0,1fr)}}
@media(max-width:700px){.chat-head{padding:0 12px}.composer{margin:0 10px 10px}.messages{padding:12px 10px 8px}.search-panel,.pinned-panel{left:68px!important;right:10px!important;width:auto!important;top:74px}}


/* FriendChat 2.4.2 — chat scroll fix */
html,body{height:100%;overflow:hidden}
body{min-height:100vh;min-height:100dvh;overflow:hidden}
#appView.app{height:100vh!important;height:100dvh!important;max-height:100vh!important;max-height:100dvh!important;overflow:hidden!important}
#appView.app > aside,#appView.app > main{min-height:0}
.sidebar,.chat,.details{min-height:0;height:100%;overflow:hidden}
.sidebar{display:flex;flex-direction:column}
#homePanel,#serverPanel{min-height:0;overflow:hidden;display:flex;flex-direction:column}
#directList,#channelList{min-height:0;overflow:auto}
.profile-strip{flex:none}
.chat{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.chat-head,.typing-indicator,.reply-bar,.attachment-tray,.composer{flex:none}
#emptyState,.messages{min-height:0}
.messages{flex:1 1 auto;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}
.empty{flex:1 1 auto;overflow:auto}
.details{display:flex;flex-direction:column}
.details-content{min-height:0;overflow:auto}
.search-panel,.pinned-panel{max-height:calc(100dvh - 96px);overflow:hidden}
.search-results-list,.pinned-list{min-height:0;overflow:auto}
@supports not (height: 100dvh){#appView.app{height:100vh!important;max-height:100vh!important}}


/* FriendChat 2.4.3 — themed scrollbars */
:root{
  --scroll-track:#0b0e13;
  --scroll-thumb:#2b3240;
  --scroll-thumb-hover:#3a4354;
  --scroll-thumb-active:#5963d8;
}

/* Firefox */
*{
  scrollbar-width:thin;
  scrollbar-color:var(--scroll-thumb) var(--scroll-track);
}

/* Chromium / Edge / Safari */
*::-webkit-scrollbar{
  width:10px;
  height:10px;
}
*::-webkit-scrollbar-track{
  background:var(--scroll-track);
}
*::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#303849,#252c39);
  border:2px solid var(--scroll-track);
  border-radius:999px;
  min-height:42px;
}
*::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,#414b60,#343d4f);
}
*::-webkit-scrollbar-thumb:active{
  background:linear-gradient(180deg,#6872f4,#5963d8);
}
*::-webkit-scrollbar-corner{
  background:var(--scroll-track);
}

/* Important scroll areas: keep them subtle */
.messages::-webkit-scrollbar,
#directList::-webkit-scrollbar,
#channelList::-webkit-scrollbar,
.details-content::-webkit-scrollbar,
.search-results-list::-webkit-scrollbar,
.pinned-list::-webkit-scrollbar,
.rail::-webkit-scrollbar{
  width:8px;
}
.messages::-webkit-scrollbar-track,
#directList::-webkit-scrollbar-track,
#channelList::-webkit-scrollbar-track,
.details-content::-webkit-scrollbar-track,
.search-results-list::-webkit-scrollbar-track,
.pinned-list::-webkit-scrollbar-track,
.rail::-webkit-scrollbar-track{
  background:transparent;
}
.messages::-webkit-scrollbar-thumb,
#directList::-webkit-scrollbar-thumb,
#channelList::-webkit-scrollbar-thumb,
.details-content::-webkit-scrollbar-thumb,
.search-results-list::-webkit-scrollbar-thumb,
.pinned-list::-webkit-scrollbar-thumb,
.rail::-webkit-scrollbar-thumb{
  border:2px solid transparent;
  background-clip:padding-box;
  background-color:#2b3342;
  border-radius:999px;
}
.messages::-webkit-scrollbar-thumb:hover,
#directList::-webkit-scrollbar-thumb:hover,
#channelList::-webkit-scrollbar-thumb:hover,
.details-content::-webkit-scrollbar-thumb:hover,
.search-results-list::-webkit-scrollbar-thumb:hover,
.pinned-list::-webkit-scrollbar-thumb:hover,
.rail::-webkit-scrollbar-thumb:hover{
  background-color:#424c60;
}


/* FriendChat 2.4.6 — drag & drop */
.server-rail,.channel-draggable{user-select:none;-webkit-user-drag:element}
.server-rail.dragging,.channel-item.dragging{opacity:.42;filter:saturate(.7)}
.server-rail.server-drop-target{box-shadow:0 0 0 2px #7568ff,0 8px 22px rgba(82,68,255,.28)!important;transform:scale(1.04)}
.channel-item.channel-drop-before{box-shadow:inset 0 2px 0 #786bff}
.channel-item.channel-drop-after{box-shadow:inset 0 -2px 0 #786bff}
.channel-item.channel-drop-before,.channel-item.channel-drop-after{background:#1d2230}
.server-rail{cursor:grab}
.server-rail:active,.channel-draggable:active{cursor:grabbing}
.channel-draggable{cursor:grab}


/* FriendChat 2.4.7 — voice messages */
.voice-message-btn{position:relative}
.voice-message-btn.recording{
  color:#ff6b7f!important;
  background:rgba(255,77,105,.12)!important;
  box-shadow:0 0 0 1px rgba(255,77,105,.25) inset;
  animation:voiceRecordPulse 1.15s ease-in-out infinite;
}
@keyframes voiceRecordPulse{
  0%,100%{box-shadow:0 0 0 1px rgba(255,77,105,.22) inset,0 0 0 rgba(255,77,105,0)}
  50%{box-shadow:0 0 0 1px rgba(255,77,105,.38) inset,0 0 18px rgba(255,77,105,.18)}
}
.voice-record-status{
  position:absolute;
  left:54px;
  bottom:50%;
  transform:translateY(50%);
  display:flex;
  align-items:center;
  gap:7px;
  z-index:4;
  padding:5px 9px;
  border-radius:999px;
  background:#26151b;
  border:1px solid #5e2a37;
  color:#ff9baa;
  font-size:11px;
  font-weight:800;
  pointer-events:none;
}
.voice-record-dot{
  width:7px;height:7px;border-radius:50%;
  background:#ff5570;
  box-shadow:0 0 10px rgba(255,85,112,.65);
  animation:voiceDot 1s ease-in-out infinite;
}
@keyframes voiceDot{50%{opacity:.35}}
.voice-message{
  width:min(420px,100%);
  margin-top:7px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#141a23;
  border:1px solid #283140;
}
.voice-message-icon{
  width:36px;height:36px;flex:none;
  display:grid;place-items:center;
  border-radius:50%;
  background:linear-gradient(135deg,#6d5dfc,#5368ff);
  color:#fff;
}
.voice-message-icon .ui-icon svg{width:18px;height:18px}
.voice-message-body{min-width:0;flex:1}
.voice-message-label{
  margin-bottom:5px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  color:#9ca7b7;
}
.voice-message audio{
  width:100%;
  height:34px;
  display:block;
  color-scheme:dark;
  accent-color:#7165ff;
}
@media(max-width:700px){
  .voice-record-status{left:46px}
  .voice-message{width:100%}
}


/* FriendChat 2.4.8 — channel picker + secure media guard */
.channel-type-picker{
  display:grid;
  gap:10px;
}
.channel-type-card{
  width:100%;
  border:1px solid #2a3240;
  background:#141922;
  color:#eef2f7;
  border-radius:15px;
  padding:14px;
  display:flex;
  align-items:center;
  gap:13px;
  text-align:left;
  cursor:pointer;
}
.channel-type-card:hover{
  border-color:#5e5bf0;
  background:#1a2030;
}
.channel-type-card-icon{
  width:44px;height:44px;
  flex:none;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:#202737;
  color:#9c94ff;
  font-size:22px;
  font-weight:900;
}
.channel-type-card-icon.voice .ui-icon svg{width:22px;height:22px}
.channel-type-card strong{display:block;font-size:14px;margin-bottom:4px}
.channel-type-card span{display:block;color:#8e99a9;font-size:11px;line-height:1.35}
.media-security-card{text-align:center;padding:4px 4px 2px}
.media-security-icon{
  width:58px;height:58px;
  margin:0 auto 12px;
  border-radius:18px;
  display:grid;place-items:center;
  background:rgba(109,93,252,.13);
  border:1px solid rgba(109,93,252,.34);
  color:#aaa2ff;
}
.media-security-icon .ui-icon svg{width:26px;height:26px}
.media-security-card h3{margin:0 0 10px;font-size:18px}
.media-security-card p{line-height:1.45;margin:7px 0}
.media-security-card code{
  padding:2px 5px;
  border-radius:6px;
  background:#0c1016;
  border:1px solid #262e3a;
  color:#bdc5d1;
}
.media-security-actions{
  margin-top:16px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}


/* FriendChat 2.4.10 — stable server rail / canonical domain layout */
html,body{width:100%;height:100%;max-width:100%;overflow:hidden}
#appView.app{
  width:100vw!important;
  max-width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  overflow:hidden!important;
}
.rail{min-width:76px;width:76px;flex:none}
#serverRail{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:9px;
  flex:0 0 auto;
}
#serverRail .rail-btn{
  display:grid;
  place-items:center;
  flex:0 0 48px;
  margin:0!important;
}
@media(max-width:1050px){
  .rail{min-width:68px;width:68px}
}
@media(max-width:760px){
  .rail{min-width:56px!important;width:56px!important}
  #serverRail{gap:8px}
  #serverRail .rail-btn{flex-basis:42px}
}
@media(max-width:480px){
  .rail{min-width:50px!important;width:50px!important}
  #serverRail .rail-btn{flex-basis:38px}
}
