:root{--bg: #ffffff;--bg2: #f4f4f5;--hover: #f4f4f5;--active: #3390ec;--active-text: #fff;--text: #000000;--muted: #707579;--border: #dadce0;--accent: #3390ec;--accent-soft: rgba(51, 144, 236, .12);--danger: #e53935;--in: #ffffff;--out: #e3fee0;--out-meta: #4fae4e;--in-meta: #a0acb6;--chat-bg: linear-gradient(160deg, #d4e1b8 0%, #a7c69a 45%, #d2dba4 100%);--service: rgba(0, 0, 0, .22);--shadow: 0 1px 2px rgba(16, 35, 47, .15);--menu-bg: rgba(255, 255, 255, .96);--badge-muted: #c4c9cc;--code: rgba(0, 0, 0, .06);--link-out: #3a8c3a;--sel: rgba(51, 144, 236, .18);color-scheme:light}[data-theme=dark]{--bg: #212121;--bg2: #181818;--hover: #2c2c2c;--active: #8774e1;--active-text: #fff;--text: #ffffff;--muted: #aaaaaa;--border: #303030;--accent: #8774e1;--accent-soft: rgba(135, 116, 225, .16);--danger: #ff595a;--in: #212121;--out: #766ac8;--out-meta: rgba(255, 255, 255, .6);--in-meta: #8d8d8d;--chat-bg: linear-gradient(160deg, #1b2a24 0%, #121a18 50%, #22281c 100%);--service: rgba(0, 0, 0, .35);--shadow: 0 1px 2px rgba(0, 0, 0, .3);--menu-bg: rgba(33, 33, 33, .97);--badge-muted: #5a5a5a;--code: rgba(255, 255, 255, .1);--link-out: #fff;--sel: rgba(135, 116, 225, .25);color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:15px;line-height:1.35;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;overflow:hidden;overscroll-behavior:none}button{font:inherit;color:inherit;cursor:pointer}input,textarea{font:inherit;color:inherit}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}.muted{color:var(--muted)}.small{font-size:13px}.accent{color:var(--accent)}.danger,.danger-text{color:var(--danger)!important}.center{text-align:center}.mono{font-family:ui-monospace,Menlo,Consolas,monospace}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.pre-wrap{white-space:pre-wrap;word-break:break-word}.center-pad{display:flex;justify-content:center;padding:16px}.empty-note{color:var(--muted);text-align:center;padding:24px 16px;font-size:14px}.section-title{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:14px;font-weight:500;padding:12px 16px 6px}.icon{flex-shrink:0;display:block}.icon-btn{border:0;background:transparent;width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:var(--muted);flex-shrink:0;transition:background .15s}.icon-btn:hover{background:var(--hover)}.icon-btn:disabled{opacity:.4;cursor:default}.btn{border:0;background:transparent;padding:10px 16px;border-radius:10px;font-weight:500;color:var(--accent);display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px}.btn:hover{background:var(--accent-soft)}.btn:disabled{opacity:.5;cursor:default}.btn.primary{background:var(--accent);color:#fff}.btn.primary:hover{filter:brightness(1.06)}.btn.wide{width:100%}.btn.link{padding:6px 8px;min-height:0;font-weight:400}.spinner{display:inline-block;border:2.5px solid var(--accent-soft);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}.btn.primary .spinner{border-color:#ffffff4d;border-top-color:#fff}@keyframes spin{to{transform:rotate(360deg)}}.boot{height:100%;display:flex;align-items:center;justify-content:center}.auth{height:100%;overflow:auto;display:flex;align-items:center;justify-content:center;padding:24px 16px}.auth-card{width:100%;max-width:380px;display:flex;flex-direction:column;gap:14px;text-align:center}.auth-logo{width:120px;height:120px;margin:0 auto 4px}.auth h1{margin:0;font-size:28px}.auth p{margin:0 0 8px}.auth-err{color:var(--danger);font-size:14px}.field{position:relative;display:block;text-align:left;margin:6px 0}.field input{width:100%;height:54px;padding:18px 14px 6px;border:1px solid var(--border);border-radius:12px;background:var(--bg);outline:none;transition:border-color .15s}.field input:focus{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}.field-label{position:absolute;left:15px;top:17px;color:var(--muted);pointer-events:none;transition:all .15s;font-size:15px}.field input:focus+.field-label,.field input:not(:placeholder-shown)+.field-label{top:6px;font-size:12px}.field input:focus+.field-label{color:var(--accent)}.field-hint{display:block;font-size:12px;color:var(--muted);margin:4px 4px 0}.app{display:flex;height:100%;height:100dvh;overflow:hidden}.sidebar{width:380px;min-width:300px;max-width:40vw;flex-shrink:0;border-right:1px solid var(--border);display:flex;flex-direction:column;background:var(--bg);position:relative}.chat-view{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--chat-bg);position:relative}.chat-view.empty{align-items:center;justify-content:center}.empty-hint span{background:var(--service);color:#fff;padding:4px 12px;border-radius:14px;font-size:14px}.info-panel{width:360px;flex-shrink:0;border-left:1px solid var(--border);background:var(--bg);display:flex;flex-direction:column}.mobile-only{display:none}.side-head{display:flex;align-items:center;gap:8px;padding:8px 12px;min-height:56px;flex-shrink:0}.side-title{font-size:19px;font-weight:600;flex:1;padding-left:8px}.search-box{flex:1;display:flex;align-items:center;gap:8px;height:42px;border-radius:21px;background:var(--bg2);padding:0 6px 0 14px;color:var(--muted);border:2px solid transparent}.search-box:focus-within{border-color:var(--accent);background:var(--bg)}.search-box:focus-within>.icon{color:var(--accent)}.search-box input{flex:1;border:0;background:transparent;outline:none;min-width:0;color:var(--text)}.search-box .icon-btn{width:30px;height:30px}.chat-list,.search-results,.settings-body,.info-body{flex:1;overflow-y:auto;overflow-x:hidden}.chat-list{padding:0 8px 80px}.search-results{padding:0 8px}.chat-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;position:relative}.chat-item:hover{background:var(--hover)}.chat-item.active{background:var(--active);color:var(--active-text)}.chat-item.active .muted,.chat-item.active .chat-item-time,.chat-item.active .chat-item-last,.chat-item.active .sender,.chat-item.active .accent,.chat-item.active .type-icon,.chat-item.active .pin-icon,.chat-item.active .muted-icon,.chat-item.active .ticks{color:var(--active-text)!important}.chat-item.active .badge{background:#fff;color:var(--active)}.chat-item-body{flex:1;min-width:0}.chat-item-top,.chat-item-bottom{display:flex;align-items:center;gap:4px}.chat-item-title{font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;gap:4px}.chat-item-title .type-icon{color:var(--text)}.muted-icon{color:var(--muted)}.chat-item-time{font-size:12px;color:var(--muted);flex-shrink:0}.chat-item-last{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:14.5px;margin-top:2px}.chat-item-last .sender{color:var(--text)}.badge{min-width:22px;height:22px;border-radius:11px;background:#4fae4e;color:#fff;font-size:12.5px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;padding:0 7px;flex-shrink:0}[data-theme=dark] .badge{background:var(--accent)}.badge.muted{background:var(--badge-muted)}.pin-icon{color:var(--badge-muted)}.ticks{color:#4fae4e;font-size:12px;letter-spacing:-3px;padding-right:3px;font-weight:600;flex-shrink:0}[data-theme=dark] .ticks{color:var(--accent)}.archive-row .chat-item-title{font-weight:600}.fab{position:absolute;right:20px;bottom:20px;width:56px;height:56px;border-radius:50%;border:0;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #00000040}.avatar{position:relative;border-radius:50%;flex-shrink:0}.avatar>img,.avatar-fill{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.avatar-fill{display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;background-image:linear-gradient(#ffffff1f,#0000000d)}.avatar.clickable{cursor:pointer}.online-dot{position:absolute;right:1px;bottom:1px;width:14px;height:14px;border-radius:50%;background:#4fae4e;border:2.5px solid var(--bg)}.chat-item.active .online-dot{border-color:var(--active);background:#fff}.menu{position:fixed;z-index:1000;min-width:200px;background:var(--menu-bg);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:12px;padding:6px;box-shadow:0 4px 24px #0003;animation:pop .12s ease-out}@keyframes pop{0%{opacity:0;transform:scale(.95)}}.menu-item{display:flex;align-items:center;gap:14px;width:100%;border:0;background:transparent;padding:9px 14px 9px 10px;border-radius:8px;text-align:left;font-size:14.5px;font-weight:500;white-space:nowrap}.menu-item .icon{color:var(--muted)}.menu-item:hover{background:var(--hover)}.menu-item.danger,.menu-item.danger .icon{color:var(--danger)}.menu-foot{font-size:12px;color:var(--muted);padding:8px 10px 4px;text-align:center}.quick-reactions{display:flex;flex-wrap:wrap;gap:2px;padding:2px 2px 6px;border-bottom:1px solid var(--border);margin-bottom:4px;max-width:290px}.quick-reactions button{border:0;background:transparent;font-size:22px;width:34px;height:34px;border-radius:50%;transition:transform .1s}.quick-reactions button:hover{transform:scale(1.25);background:var(--hover)}.chat-head{display:flex;align-items:center;gap:6px;padding:6px 10px 6px 14px;min-height:56px;background:var(--bg);border-bottom:1px solid var(--border);flex-shrink:0;z-index:2}.chat-head-main{flex:1;min-width:0;display:flex;align-items:center;gap:12px;cursor:pointer}.chat-head-text{min-width:0}.chat-head-title{font-weight:600;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-head-status{font-size:13.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-head-status.accent{color:var(--accent)}.pinned-bar{display:flex;align-items:center;gap:10px;padding:6px 10px 6px 14px;background:var(--bg);border-bottom:1px solid var(--border);cursor:pointer;flex-shrink:0;z-index:1}.pinned-line{width:2px;align-self:stretch;background:var(--accent);border-radius:1px}.pinned-bar img{width:36px;height:36px;border-radius:4px;object-fit:cover}.pinned-body{flex:1;min-width:0;font-size:14px}.pinned-body .accent{font-weight:500}.messages-wrap{flex:1;min-height:0;position:relative}.messages{position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}.messages-inner{max-width:760px;margin:0 auto;padding:8px 14px 10px;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.day-sep,.unread-sep,.service-msg{display:flex;justify-content:center;margin:8px 0;position:sticky;top:6px;z-index:1}.unread-sep,.service-msg{position:static}.day-sep span,.service-msg span{background:var(--service);color:#fff;font-size:13.5px;font-weight:500;padding:3px 10px;border-radius:14px;text-align:center;max-width:80%}.unread-sep{background:var(--bg);opacity:.9;margin:8px -14px;padding:4px}.unread-sep span{color:var(--muted);font-size:13.5px;font-weight:500}.empty-chat{margin:auto;background:var(--service);color:#fff;border-radius:18px;padding:16px 22px;display:flex;flex-direction:column;align-items:center;gap:8px;max-width:280px;text-align:center;font-size:14px}.big-wave{font-size:64px;line-height:1}.msg-row{display:flex;align-items:flex-end;gap:6px;margin-top:2px;position:relative;padding:0 2px;border-radius:8px}.msg-row.last{margin-bottom:6px}.msg-row.out{justify-content:flex-end}.msg-row.selecting{cursor:pointer;padding-left:36px}.msg-row.selected{background:var(--sel)}.msg-row.highlight .bubble{animation:flash 1.5s}@keyframes flash{0%,60%{filter:brightness(.82)}}.sel-check{width:22px;height:22px;border-radius:50%;border:2px solid var(--muted);display:inline-flex;align-items:center;justify-content:center;color:transparent;flex-shrink:0}.msg-row .sel-check{position:absolute;left:6px;bottom:8px;border-color:#fff;background:#00000026}.sel-check.on{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff}.msg-avatar{width:36px;flex-shrink:0;align-self:flex-end}.bubble{position:relative;max-width:min(480px,82%);background:var(--in);border-radius:15px;padding:6px 9px 6px 10px;box-shadow:var(--shadow);word-wrap:break-word;overflow-wrap:anywhere;min-width:56px;-webkit-touch-callout:none}.out .bubble{background:var(--out)}[data-theme=dark] .out .bubble{color:#fff}.in .bubble.tail{border-bottom-left-radius:4px}.out .bubble.tail{border-bottom-right-radius:4px}.in .bubble.tail:before,.out .bubble.tail:before{content:"";position:absolute;bottom:0;width:10px;height:16px;background:inherit}.in .bubble.tail:before{left:-6px;clip-path:path("M10 0 V16 H0 C5 14 9 10 10 0Z")}.out .bubble.tail:before{right:-6px;clip-path:path("M0 0 V16 H10 C5 14 1 10 0 0Z")}.bubble.bare{background:transparent!important;box-shadow:none;padding:0}.bubble.bare:before{display:none}.bubble.media-only{padding:0;overflow:hidden}.bubble.media-only:before{display:none}.bubble.media-only .media{border-radius:15px}.sender-name{font-weight:600;font-size:14px;margin-bottom:2px;cursor:pointer}.fwd-from{font-size:14px;color:var(--accent);margin-bottom:4px;cursor:pointer}.out .fwd-from{color:var(--out-meta)}[data-theme=dark] .out .fwd-from{color:#fff}.text{white-space:pre-wrap;font-size:15.5px;line-height:1.38}.text pre{background:var(--code);border-radius:6px;padding:6px 8px;margin:4px 0;white-space:pre-wrap;font-size:13.5px;font-family:ui-monospace,Menlo,Consolas,monospace}.text code{background:var(--code);border-radius:4px;padding:0 4px;font-size:13.5px;font-family:ui-monospace,Menlo,Consolas,monospace}.out .text a{color:var(--link-out);text-decoration:underline}.spoiler{background:var(--muted);color:transparent;border-radius:4px;cursor:pointer;transition:all .2s}.spoiler a,.spoiler code{color:transparent!important}.spoiler.open{background:transparent;color:inherit;cursor:auto}.meta{float:right;display:inline-flex;align-items:center;gap:3px;font-size:12px;color:var(--in-meta);margin:6px 0 -4px 10px;position:relative;top:2px;white-space:nowrap;-webkit-user-select:none;user-select:none;line-height:1}.out .meta,.out .meta .ticks{color:var(--out-meta)}[data-theme=dark] .out .meta .ticks{color:#fff}.meta .fail{color:var(--danger)}.meta.overlay{float:none;position:absolute;right:6px;bottom:6px;background:#0006;color:#fff!important;padding:3px 6px;border-radius:10px;margin:0;top:auto}.meta.overlay .ticks{color:#fff!important}.bubble:not(.media-only):not(.bare)>.meta:not(.overlay){display:flex;justify-content:flex-end;float:none;margin:2px -2px -2px 10px}.bubble.voice-b>.meta,.bubble:has(.filebox)>.meta{margin-top:-14px!important}.reply-quote{display:flex;gap:8px;align-items:center;border-left:3px solid var(--qc, var(--accent));background:var(--accent-soft);border-radius:5px;padding:3px 8px 3px 7px;margin:2px 0 5px;cursor:pointer;font-size:14px;min-width:0}.out .reply-quote{border-color:var(--out-meta);background:#4fae4e1f}[data-theme=dark] .out .reply-quote{border-color:#fff;background:#ffffff1f}.reply-quote img{width:34px;height:34px;border-radius:4px;object-fit:cover}.reply-body{min-width:0}.reply-name{font-weight:600;color:var(--qc, var(--accent));font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.out .reply-name{color:var(--out-meta)}[data-theme=dark] .out .reply-name{color:#fff}.reply-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.media{position:relative;border-radius:10px;overflow:hidden;margin:2px -5px 4px -6px;cursor:pointer;background:#00000014;max-width:calc(100% + 11px)}.bubble.media-only .media{margin:0}.media img,.media video{width:100%;height:100%;object-fit:cover;display:block}.play-overlay{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:54px;height:54px;border-radius:50%;background:#00000073;color:#fff;display:flex;align-items:center;justify-content:center}.media-badge{position:absolute;left:6px;top:6px;background:#00000073;color:#fff;font-size:12px;padding:2px 6px;border-radius:10px}.upload-progress{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:50%;background:#00000073;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}.upload-progress svg{position:absolute;top:0;right:0;bottom:0;left:0;transform:rotate(-90deg)}.upload-progress circle{fill:none;stroke-width:3}.upload-progress .track{stroke:transparent}.upload-progress .bar{stroke:#fff;stroke-linecap:round;transition:stroke-dasharray .2s}.file-icon .upload-progress{position:static;transform:none;background:transparent}.sticker{width:180px;height:180px;cursor:pointer}.sticker img{width:100%;height:100%;object-fit:contain}.big-emoji{line-height:1.15;padding:2px 0 10px}.big-emoji.n1{font-size:72px}.big-emoji.n2{font-size:56px}.big-emoji.n3{font-size:44px}.filebox{display:flex;align-items:center;gap:10px;padding:3px 0 2px;color:inherit;text-decoration:none!important;min-width:220px}.filebox audio{width:260px;max-width:100%;height:40px}.filebox:has(audio){flex-direction:column;align-items:flex-start;gap:4px}.file-icon{width:48px;height:48px;border-radius:12px;background:var(--accent);color:#fff;flex-shrink:0;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10px;font-weight:700}.out .file-icon{background:#4fae4e}[data-theme=dark] .out .file-icon{background:#fff;color:var(--out)}.file-meta{min-width:0;padding-right:46px}.file-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}.file-size{font-size:13px;color:var(--in-meta)}.out .file-size{color:var(--out-meta)}.voice{display:flex;align-items:center;gap:10px;padding:2px 0;min-width:230px}.voice-play{width:46px;height:46px;border-radius:50%;border:0;background:var(--accent);color:#fff;flex-shrink:0;display:flex;align-items:center;justify-content:center}.out .voice-play{background:#4fae4e}[data-theme=dark] .out .voice-play{background:#fff;color:var(--out)}.voice-main{flex:1;min-width:0;padding-right:40px}.waveform{display:flex;align-items:flex-end;gap:2px;height:24px;cursor:pointer}.waveform span{width:3px;border-radius:2px;background:var(--in-meta);opacity:.55;flex-shrink:0}.waveform span.on{background:var(--accent);opacity:1}.out .waveform span{background:var(--out-meta)}.out .waveform span.on{background:#4fae4e;opacity:1}[data-theme=dark] .out .waveform span.on{background:#fff}.voice-time{font-size:12.5px;color:var(--in-meta);margin-top:3px}.out .voice-time{color:var(--out-meta)}.reactions{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px;clear:both}.reaction{display:inline-flex;align-items:center;gap:4px;border:0;background:var(--accent-soft);color:var(--accent);border-radius:14px;padding:2px 8px 2px 6px;height:28px;font-weight:600;font-size:13px}.out .reaction{background:#4fae4e2e;color:#3a8c3a}[data-theme=dark] .out .reaction{background:#ffffff2e;color:#fff}.reaction.mine{background:var(--accent);color:#fff}.out .reaction.mine{background:#4fae4e;color:#fff}[data-theme=dark] .out .reaction.mine{background:#fff;color:var(--out)}.r-emoji{font-size:16px}.r-avatars{display:inline-flex}.r-avatars .avatar{margin-left:-5px;border:1.5px solid var(--in);font-size:8px!important}.r-avatars .avatar:first-child{margin-left:0}.bubble.bare .reactions .reaction{background:var(--service);color:#fff}.bubble.bare .reactions .reaction.mine{background:var(--accent)}.failed-bar{display:flex;gap:6px;margin-top:6px;clear:both}.failed-bar button{border:0;background:var(--accent-soft);color:var(--accent);border-radius:8px;padding:3px 10px;font-size:13px}.to-bottom{position:absolute;right:18px;bottom:14px;width:48px;height:48px;border-radius:50%;border:0;background:var(--bg);color:var(--muted);box-shadow:0 1px 6px #0003;display:flex;align-items:center;justify-content:center;z-index:3}.to-bottom .badge{position:absolute;top:-6px;right:-4px}.composer-wrap{position:relative;padding:6px 14px 12px;padding-bottom:max(12px,env(safe-area-inset-bottom));flex-shrink:0}.composer{max-width:732px;margin:0 auto;background:var(--bg);border-radius:16px;box-shadow:var(--shadow)}.composer-row{display:flex;align-items:flex-end;gap:2px;padding:4px}.composer textarea{flex:1;border:0;outline:none;resize:none;background:transparent;padding:10px 6px;max-height:200px;line-height:1.35;font-size:16px;min-height:42px}.send-btn{width:42px;height:42px;border-radius:50%;border:0;background:transparent;color:var(--accent);display:flex;align-items:center;justify-content:center;flex-shrink:0}.send-btn:hover{background:var(--accent-soft)}.send-btn.mic{color:var(--muted)}.composer-reply{display:flex;align-items:center;gap:10px;padding:6px 4px 0 12px}.composer-reply-body{flex:1;min-width:0;border-left:2px solid var(--accent);padding-left:8px;font-size:14px}.composer-reply-body .accent{font-weight:500}.composer-bar{padding:8px 14px 12px;padding-bottom:max(12px,env(safe-area-inset-bottom));display:flex;justify-content:center}.composer-bar .join-btn{max-width:732px;background:var(--bg);box-shadow:var(--shadow);border-radius:14px;height:50px}.recording{align-items:center;padding:4px 4px 4px 16px;min-height:50px}.rec-dot{width:12px;height:12px;border-radius:50%;background:var(--danger);transition:transform .1s;flex-shrink:0}.rec-time{font-variant-numeric:tabular-nums;margin-left:10px}.rec-hint{flex:1;margin-left:10px}.emoji-panel{position:absolute;left:14px;bottom:calc(100% - 4px);width:360px;max-width:calc(100% - 28px);height:380px;background:var(--menu-bg);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:14px;box-shadow:0 4px 24px #0003;display:flex;flex-direction:column;overflow:hidden;z-index:20;animation:pop .12s ease-out}.emoji-tabs,.tabs{display:flex;border-bottom:1px solid var(--border);flex-shrink:0}.emoji-tabs button,.tabs button{flex:1;border:0;background:transparent;padding:10px;font-weight:500;color:var(--muted);border-bottom:2px solid transparent}.emoji-tabs button.on,.tabs button.on{color:var(--accent);border-bottom-color:var(--accent)}.emoji-cats{display:flex;gap:2px;padding:4px;overflow-x:auto;flex-shrink:0}.emoji-cats button{border:0;background:transparent;font-size:20px;width:36px;height:34px;border-radius:8px;opacity:.6;flex-shrink:0}.emoji-cats button.on{background:var(--hover);opacity:1}.emoji-grid{flex:1;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(40px,1fr));padding:4px 6px;align-content:start}.emoji-grid button{border:0;background:transparent;font-size:26px;height:42px;border-radius:8px;padding:0}.emoji-grid button:hover{background:var(--hover)}.sticker-grid{flex:1;overflow-y:auto;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:6px;align-content:start}.sticker-grid button{border:0;background:transparent;aspect-ratio:1;border-radius:10px;padding:4px}.sticker-grid button:hover{background:var(--hover)}.sticker-grid img{width:100%;height:100%;object-fit:contain}.sticker-add{color:var(--accent);display:flex;align-items:center;justify-content:center;border:2px dashed var(--border)!important}.sticker-hint{grid-column:1 / -1;padding:8px}.selection-bar{display:flex;align-items:center;gap:8px;padding:8px 14px 12px;padding-bottom:max(12px,env(safe-area-inset-bottom));max-width:760px;width:100%;margin:0 auto}.selection-bar>*{background:var(--bg)}.selection-bar .icon-btn{background:var(--bg);box-shadow:var(--shadow)}.sel-count{flex:1;background:transparent!important;color:#fff;font-weight:600;text-shadow:0 1px 2px rgba(0,0,0,.3)}.selection-bar .btn{box-shadow:var(--shadow)}.info-body{padding-bottom:24px}.info-top{display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px;text-align:center}.info-avatar{cursor:pointer}.info-title{font-size:20px;font-weight:600;margin-top:8px;word-break:break-word}.info-row{display:flex;align-items:center;gap:22px;padding:10px 20px;color:var(--text)}.info-row>.icon{color:var(--muted)}.info-row.clickable,.row-item.clickable{cursor:pointer}.info-row.clickable:hover,.row-item.clickable:hover{background:var(--hover)}.info-actions{padding:12px 12px 0;display:flex;flex-direction:column;gap:4px}.row-item{display:flex;align-items:center;gap:14px;padding:9px 16px;border-radius:10px;color:var(--text);text-decoration:none!important}.row-item>.icon{color:var(--muted)}.row-item.danger>.icon{color:var(--danger)}.row-main{flex:1;min-width:0}.role{font-size:13px;color:var(--muted)}.switch{width:34px;height:14px;border-radius:7px;background:var(--badge-muted);position:relative;flex-shrink:0;transition:background .2s}.switch:after{content:"";position:absolute;left:-2px;top:-3px;width:20px;height:20px;border-radius:50%;background:#fff;border:2px solid var(--badge-muted);transition:all .2s;box-sizing:border-box}.switch.on{background:var(--accent)}.switch.on:after{left:16px;border-color:var(--accent)}.shared{margin-top:12px;border-top:8px solid var(--bg2)}.media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;padding:2px}.media-cell{position:relative;aspect-ratio:1;cursor:pointer;overflow:hidden;background:var(--bg2)}.media-cell img,.media-cell video{width:100%;height:100%;object-fit:cover;display:block}.settings{display:flex;flex-direction:column;height:100%}.settings-body{padding:8px 12px 24px}.profile-card{display:flex;align-items:center;gap:16px;padding:12px 8px 16px;cursor:pointer}.profile-name{font-size:19px;font-weight:600}.avatar-edit{position:relative;cursor:pointer;width:fit-content;margin:8px auto 12px;border-radius:50%}.avatar-edit-overlay{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;background:#00000059;color:#fff;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s}.avatar-edit:hover .avatar-edit-overlay{opacity:1}.avatar-placeholder{width:84px;height:84px;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center}.inline-row{display:flex;gap:8px;align-items:center}.inline-row .field{flex:1}.modal-bg{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;z-index:900;display:flex;align-items:center;justify-content:center;padding:16px;animation:fade .15s}@keyframes fade{0%{opacity:0}}.modal{background:var(--bg);border-radius:16px;width:100%;max-width:440px;max-height:calc(100dvh - 32px);overflow-y:auto;padding:12px 18px 14px;box-shadow:0 8px 40px #0000004d;animation:pop .15s ease-out;display:flex;flex-direction:column;gap:6px}.small-modal{max-width:380px}.list-modal{height:min(600px,calc(100dvh - 32px));padding:12px 8px}.list-modal .modal-head,.list-modal .modal-search,.list-modal .chips,.list-modal .modal-actions{margin-left:8px;margin-right:8px}.modal-head{display:flex;align-items:center;gap:10px;margin:-4px -8px 4px}.modal-title{font-size:19px;font-weight:600;flex:1}.modal-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:8px}.confirm-text{font-size:16px;padding:10px 4px 4px;white-space:pre-wrap}.check-row{display:flex;align-items:center;gap:10px;padding:8px 4px;cursor:pointer;font-size:14.5px}.check-row input{width:18px;height:18px;accent-color:var(--accent)}.modal-search{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--border);padding:6px 6px 10px;color:var(--muted)}.modal-search input{flex:1;border:0;outline:none;background:transparent;font-size:16px;color:var(--text)}.modal-list{flex:1;overflow-y:auto;min-height:0}.chips{display:flex;flex-wrap:wrap;gap:6px;padding:4px 4px 10px;border-bottom:1px solid var(--border)}.chip{display:inline-flex;align-items:center;gap:6px;background:var(--bg2);border-radius:16px;padding-right:8px;font-size:14px;cursor:pointer}.chip .icon{color:var(--muted)}.chips-input{flex:1;min-width:120px;border:0;outline:none;background:transparent;font-size:15px;padding:4px;color:var(--text)}.newchat-head{display:flex;align-items:center;gap:16px}.newchat-head .avatar-edit{margin:0}.newchat-head .field{flex:1}.user-card .info-row{padding:8px 4px}.upload-previews{display:flex;flex-direction:column;gap:6px;max-height:50vh;overflow-y:auto}.upload-previews img,.upload-previews video{width:100%;max-height:320px;object-fit:contain;border-radius:10px;background:var(--bg2)}.viewer{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000eb;z-index:950;display:flex;flex-direction:column;animation:fade .15s}.viewer-top{display:flex;align-items:center;gap:6px;padding:8px 12px;color:#fff}.viewer-top .icon-btn{color:#fff}.viewer-top .icon-btn:hover{background:#ffffff1a}.viewer-info{flex:1;display:flex;flex-direction:column;font-size:14px}.viewer-info span{opacity:.7;font-size:13px}.viewer-body{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:8px}.viewer-body img,.viewer-body video{max-width:100%;max-height:100%;object-fit:contain}.viewer-caption{color:#fff;text-align:center;padding:12px 16px 20px;white-space:pre-wrap}.toast{position:fixed;left:50%;top:18px;transform:translate(-50%);background:#000000d1;color:#fff;padding:10px 18px;border-radius:12px;z-index:2000;font-size:14.5px;max-width:calc(100% - 32px);animation:fade .2s;text-align:center}.conn-bar{position:fixed;left:50%;bottom:84px;transform:translate(-50%);background:#000000bf;color:#fff;padding:6px 14px;border-radius:12px;font-size:13px;z-index:50;pointer-events:none}@media (max-width: 1100px){.info-panel{position:absolute;right:0;top:0;bottom:0;z-index:30;box-shadow:-4px 0 20px #00000026}}@media (max-width: 760px){.sidebar{width:100%;max-width:none;border-right:0}.chat-view{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(100%);transition:transform .22s ease;z-index:10}.app.has-chat .chat-view{transform:none}.app.has-chat .sidebar{visibility:hidden;transition:visibility 0s .22s}.chat-view.empty{display:none}.info-panel{width:100%;z-index:40}.mobile-only{display:inline-flex}.chat-head{padding-left:4px}.messages-inner{padding:6px 8px 8px}.composer-wrap{padding:4px 8px 8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.bubble{max-width:86%}.emoji-panel{left:8px;right:8px;width:auto;max-width:none;height:330px}.to-bottom{right:12px}.modal-bg{align-items:flex-end;padding:0}.modal{border-radius:16px 16px 0 0;max-height:92dvh;padding-bottom:max(14px,env(safe-area-inset-bottom))}.list-modal{height:92dvh}}@media (hover: none){.icon-btn:hover,.chat-item:hover,.btn:hover,.menu-item:hover,.send-btn:hover{background:transparent}.btn.primary:hover{background:var(--accent)}.chat-item.active{background:transparent;color:inherit}.chat-item.active .chat-item-time,.chat-item.active .chat-item-last{color:var(--muted)!important}.chat-item.active .chat-item-title,.chat-item.active .sender{color:var(--text)!important}.chat-item.active .badge{background:#4fae4e;color:#fff}}
