:root{--bg: #0a0e14;--bg-elev: #161b22;--bg-elev-2: #1c2330;--border: #30363d;--border-soft: #21262d;--text: #e6edf3;--text-muted: #8b949e;--accent: #22d3ee;--accent-dim: rgba(34, 211, 238, .15);--amber: #f59e0b;--danger: #f85149;--ok: #3fb950;--bubble-mine: #54eaff;--bubble-other: #3dff9a;--radius: 12px;--font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:var(--font);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit;color:inherit}input,select,textarea{background:var(--bg);border:1px solid var(--border);border-radius:10px;padding:8px 10px}button{cursor:pointer}a{color:var(--accent)}.stage{min-height:100%;height:100%;display:flex;flex-direction:column;background:radial-gradient(900px 520px at 12% 18%,rgba(34,211,238,.18),transparent 58%),radial-gradient(820px 480px at 88% 8%,rgba(245,158,11,.14),transparent 55%),linear-gradient(160deg,#070a10,#0d1117 48%,#0a0c12)}.topbar{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--border-soft);background:#0d1117db;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.logo{display:flex;align-items:center;gap:8px;font-weight:750;letter-spacing:.02em}.logo svg{display:block;filter:drop-shadow(0 0 8px rgba(34,211,238,.45))}.spacer{flex:1}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--text-muted)}.status-dot.on{background:var(--ok);box-shadow:0 0 8px var(--ok)}.who{color:var(--text-muted);font-size:13px}.btn{border:1px solid var(--border);background:var(--bg-elev);color:var(--text);border-radius:10px;padding:8px 12px;line-height:1.2}.btn:hover{border-color:#22d3ee73;color:var(--accent)}.btn.primary{background:var(--accent-dim);border-color:#22d3ee73;color:var(--accent);font-weight:700}.btn.ghost{background:transparent}.btn.danger{color:var(--danger);border-color:#f8514973}.btn.sm{padding:4px 8px;font-size:12px;border-radius:8px}.btn:disabled{opacity:.5;cursor:default}.shell{flex:1;min-height:0;display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr)}.sidebar,.main{min-height:0;min-width:0;display:flex;flex-direction:column}.sidebar{border-right:1px solid var(--border-soft);background:#0d111773}.side-tools,.chat-head,.composer,.search-row{padding:10px 12px;display:flex;gap:8px;align-items:center}.side-tools{border-bottom:1px solid var(--border-soft)}.chatlist,.messages,.drawer,.panel{overflow:auto}.chatlist{flex:1;padding:6px}.chat-item{width:100%;text-align:left;border:0;background:transparent;border-radius:12px;padding:10px;display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center}.chat-item.on,.chat-item:hover{background:#22d3ee14}.chat-item .title{font-weight:650}.chat-item .preview{color:var(--text-muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unread{min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--danger);color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}.ava{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-weight:750;background:#10202b;border:1px solid rgba(84,234,255,.35);color:var(--bubble-mine);flex:none}.ava.bot{border-color:#f59e0b8c;color:var(--amber)}.ava.sm{width:22px;height:22px;border-radius:6px;font-size:11px}.main{background:#0d111747}.chat-head{border-bottom:1px solid var(--border-soft)}.chat-head .grow{flex:1;min-width:0}.sub{color:var(--text-muted);font-size:12px}.messages{flex:1;display:flex;flex-direction:column;gap:8px;padding:14px}.messages:before{content:"";margin-top:auto}.msg{position:relative;width:fit-content;max-width:min(720px,78%);padding:8px 12px 6px;border-radius:16px;border:1px solid var(--bubble-other);background:#0f1d19;box-shadow:0 0 0 1px #3dff9a1f,0 0 14px #3dff9a1f;overflow-wrap:anywhere;white-space:pre-wrap}.msg.mine{align-self:flex-end;border-bottom-right-radius:6px;border-color:var(--bubble-mine);background:#10202b;box-shadow:0 0 0 1px #54eaff24,0 0 14px #54eaff2e}.msg:not(.mine){align-self:flex-start;border-bottom-left-radius:6px}.msg .meta{display:flex;gap:6px;align-items:center;margin-bottom:4px;font-size:12px;color:var(--text-muted)}.msg .body{line-height:1.45}.msg.deleted .body{color:var(--text-muted);font-style:italic}.msg-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:4px;font-size:11px;color:var(--text-muted)}.msg.mine .msg-foot{color:#54eaffbf}.ticks.read{color:var(--bubble-mine)}.quote{display:block;width:100%;text-align:left;border:0;border-left:3px solid var(--bubble-other);background:#3dff9a14;color:inherit;border-radius:8px;padding:4px 8px;margin-bottom:6px}.msg.mine .quote{border-left-color:var(--bubble-mine);background:#54eaff1a}.quote b{display:block;font-size:12px}.quote span{color:var(--text-muted);font-size:12px}.msg-actions{position:absolute;top:-12px;display:flex;gap:2px;padding:2px;border:1px solid var(--border);border-radius:10px;background:#0d1117;opacity:0;pointer-events:none}.msg.mine .msg-actions{right:8px}.msg:not(.mine) .msg-actions{left:8px}.msg:hover .msg-actions,.msg:focus-within .msg-actions{opacity:1;pointer-events:auto}@media(hover:none){.msg-actions{position:static;opacity:1;pointer-events:auto;margin-bottom:4px;background:transparent;border:0;padding:0}}.file-row,.shot{margin-top:6px}.file-row{display:flex;justify-content:space-between;gap:8px;padding:6px 8px;border-radius:8px;background:#00000040;border:0;width:100%;text-align:left}.shot{max-width:min(360px,100%);border-radius:10px;display:block}.composer{border-top:1px solid var(--border-soft);display:flex;flex-direction:column;gap:8px}.composer textarea,.field input,.field textarea,.search-row input{width:100%;border:1px solid var(--border);background:var(--bg);border-radius:12px;padding:10px 12px;outline:none;resize:none}.composer textarea:focus,.field input:focus,.search-row input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-dim)}.search-row input{flex:1;min-width:0;width:auto}.replybar,.upload-list,.error,.hint,.queue-note{padding:0 12px}.replybar,.queue-note{color:var(--text-muted);font-size:13px;display:flex;justify-content:space-between;gap:8px}.error{color:#ff6b63;font-size:13px}.hint{color:var(--text-muted);font-size:13px}.chip{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--text-muted);padding:4px 0}progress{width:100%;height:6px;accent-color:var(--accent)}.auth-wrap{flex:1;display:grid;place-items:center;padding:24px}.auth-card,.panel,.modal-card{width:min(440px,100%);background:#161b22eb;border:1px solid var(--border);border-radius:16px;padding:18px;box-shadow:0 16px 50px #00000059}.auth-card h1{margin:8px 0 4px;font-size:28px}.field{display:flex;flex-direction:column;gap:6px;margin-top:12px;font-size:13px;color:var(--text-muted)}.modal{position:fixed;inset:0;background:#0000008c;display:grid;place-items:center;padding:16px;z-index:20}.modal-card{width:min(560px,100%);max-height:min(80vh,720px);overflow:auto}.modal-card h2{margin:0 0 8px}.person{width:100%;text-align:left;background:transparent;border:0;border-radius:10px;padding:8px;display:flex;gap:8px;align-items:center}.person:hover{background:#22d3ee14}.checks{display:flex;flex-direction:column;gap:4px;margin:8px 0}.row{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border-soft)}.badge{font-size:11px;border:1px solid var(--border);border-radius:999px;padding:1px 7px;color:var(--text-muted)}.badge.bot{color:var(--amber);border-color:#f59e0b66}.badge.admin{color:var(--accent);border-color:#22d3ee66}.empty{margin:auto;color:var(--text-muted);text-align:center}.typing{color:var(--text-muted);font-size:13px;padding:0 14px 8px}.token-box{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;word-break:break-all;background:#0a0e14;padding:8px;border-radius:8px}@media(max-width:800px){.shell{grid-template-columns:1fr}.shell.chat-open .sidebar{display:none}.shell:not(.chat-open) .main{display:none}.msg{max-width:88%}.topbar .who{display:none}}.emoji-img{display:inline-block;width:1.25em;height:1.25em;vertical-align:-.28em;object-fit:contain}.msg .body.emoji-big{line-height:1.15}.msg .body.emoji-big .emoji-img,.msg .body.emoji-big .emoji-glyph{width:2.6em;height:2.6em;font-size:1em;vertical-align:middle}.msg .body.emoji-big.n1 .emoji-img{width:3.4em;height:3.4em}.msg .body.emoji-big .emoji-glyph{font-size:2.6em;width:auto;height:auto}.quote .emoji-img{width:1.1em;height:1.1em}.composer-emoji{padding:4px 8px;line-height:1}.composer-emoji .emoji-img{width:1.35em;height:1.35em;vertical-align:middle}.composer-emoji.on{border-color:#22d3ee99;background:var(--accent-dim)}.emoji-popover{position:fixed;z-index:70;max-width:calc(100vw - 16px)}.emoji-popover .emoji-panel{display:flex;flex-direction:column;margin:0;height:100%;box-sizing:border-box;padding:8px 8px 6px;gap:6px;background:#0f141cfa;box-shadow:0 12px 40px #0000008c;border-radius:14px;overflow:hidden;border:1px solid rgba(148,163,184,.16);white-space:normal}.emoji-search-row{display:flex;align-items:center;gap:2px;flex:0 0 auto;min-width:0;background:#ffffff0d;border:1px solid rgba(148,163,184,.22);border-radius:18px;padding:0 2px 0 0}.emoji-panel .emoji-search{flex:1 1 auto;min-width:0;min-height:34px;border:0;border-radius:16px;padding:0 10px;font-size:14px;background:transparent;color:inherit;outline:none}.emoji-panel .emoji-search::placeholder{color:var(--text-muted)}.emoji-quick{display:flex;gap:0;flex:0 0 auto}.emoji-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.emoji-scroll section{margin:0 0 4px}.emoji-scroll h3{margin:6px 4px 2px;font-size:13px;color:var(--text-muted);font-weight:600}.emoji-scroll .hint{margin:4px 2px;font-size:12px}.emoji-panel .emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:1px}.emoji-cell{border:0;background:transparent;color:var(--text);cursor:pointer;border-radius:8px;padding:0;min-width:0;min-height:38px;display:grid;place-items:center}.emoji-cell:hover,.emoji-cell:focus-visible{background:#22d3ee26;outline:none}.emoji-cell .emoji-img{width:32px;height:32px}.emoji-quick .emoji-cell{min-height:30px;width:28px;border-radius:999px}.emoji-quick .emoji-cell .emoji-img{width:22px;height:22px}.emoji-cats{display:flex;justify-content:space-between;gap:2px;flex:0 0 auto;border-top:1px solid rgba(148,163,184,.18);padding-top:4px}.emoji-cats button{border:0;background:transparent;border-radius:999px;width:32px;height:30px;display:grid;place-items:center;cursor:pointer;padding:0;color:var(--text-muted)}.emoji-cats button.on{color:var(--accent);background:#22d3ee2e}.emoji-cats svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.emoji-cats svg .fill{fill:currentColor;stroke:none}.msg-actions .quick-react{display:flex;gap:0;align-items:center;padding-right:2px;border-right:1px solid var(--border-soft);margin-right:2px}.react-btn{border:0;background:transparent;padding:2px 3px;border-radius:8px;cursor:pointer;line-height:1}.react-btn:hover,.react-btn.on{background:#22d3ee2e}.react-btn .emoji-img{width:20px;height:20px;vertical-align:middle}.react-more .emoji-img{width:1.1em;height:1.1em;vertical-align:-.2em}@media(hover:none){.msg-actions .quick-react{display:none}}.reaction-bar{position:fixed;z-index:75;display:flex;gap:2px;align-items:center;padding:4px 6px;border-radius:999px;background:#0f141cfa;border:1px solid rgba(148,163,184,.22);box-shadow:0 10px 30px #0000008c}.reaction-bar .emoji-cell{width:38px;min-height:38px;border-radius:999px}.reaction-bar .emoji-cell .emoji-img{width:28px;height:28px}.reaction-bar .emoji-cell.on{background:#22d3ee38}.reaction-bar .emoji-cell.more{font-size:20px;color:var(--text-muted)}.msg-reactions{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px;white-space:normal}.msg-reactions button{position:relative;display:inline-flex;align-items:center;gap:4px;min-height:26px;padding:1px 8px 1px 6px;border-radius:999px;border:1px solid var(--border);background:#ffffff0a;color:var(--text);font-size:12px;cursor:pointer}.msg-reactions button:hover{border-color:#22d3ee73}.msg-reactions button.mine{border-color:#22d3eeb3;background:var(--accent-dim);color:var(--accent);font-weight:700}.msg-reactions .emoji-img{width:1.2em;height:1.2em;vertical-align:middle}.msg-reactions button[data-names]:not([data-names=""]):hover:after{content:attr(data-names);position:absolute;bottom:calc(100% + 6px);left:0;z-index:5;max-width:240px;width:max-content;padding:4px 8px;border-radius:8px;background:#0d1117;border:1px solid var(--border);color:var(--text);font-weight:400;font-size:12px;white-space:normal;pointer-events:none}@media(hover:none){.msg-reactions button{min-height:32px}.msg{-webkit-touch-callout:none}}.composer>.side-tools{align-self:stretch;border-bottom:0}.typing-now{color:var(--accent);font-style:italic}.preview.typing-now{color:var(--accent)}.head-title,.link-btn{border:0;background:transparent;color:inherit;padding:0;font:inherit;cursor:pointer;text-align:left}.head-title{font-weight:700}.head-title:hover,.link-btn:hover{color:var(--accent)}.profile{display:flex;gap:12px;align-items:center}.profile .ava{width:44px;height:44px;font-size:18px}
