#app:has(.web-messenger){max-width:none;padding:16px;min-height:calc(100vh - 140px)}
#app .web-messenger{display:grid;grid-template-columns:280px minmax(0,1fr);height:calc(100dvh - 150px);min-height:600px;border:1px solid var(--site-border,#37313f);border-radius:16px;overflow:hidden;background:var(--site-bg,#101016)}
#app .web-chat-sidebar{display:flex;flex-direction:column;padding:20px 12px;background:var(--site-panel,#1b1722);border-right:1px solid var(--site-border,#37313f);gap:18px;min-height:0}#app .web-chat-sidebar>header{display:flex;align-items:center;justify-content:space-between;padding:0 6px}#app .web-messenger h2{font-size:20px;letter-spacing:-.04em;margin:0}#app .web-chat-sidebar input{width:100%}#app #web-chat-rooms{overflow:auto;flex:1;display:flex;flex-direction:column;gap:7px}#app #web-chat-rooms>button{display:flex;align-items:center;gap:12px;text-align:left;border:1px solid transparent;border-radius:10px;padding:13px 10px;width:100%}#app #web-chat-rooms>button.selected{background:color-mix(in srgb,var(--site-accent,#b093ef) 15%,transparent);border-color:var(--site-accent,#b093ef)}#app #web-chat-rooms>button>span:not(.web-chat-avatar){flex:1}#app #web-chat-rooms small{display:block;font-size:10px;opacity:.65;margin-top:5px}#app #web-chat-rooms strong{font-size:10px;border-radius:20px;background:var(--site-accent,#b093ef);color:#111;padding:4px 6px}
.web-chat-avatar{width:40px;height:40px;flex-shrink:0;border-radius:12px;background:color-mix(in srgb,var(--site-accent,#b093ef) 15%,var(--site-panel,#1b1722));display:inline-grid;place-items:center;overflow:hidden;position:relative;font-size:14px}.web-chat-avatar img{position:absolute;inset:0;object-fit:cover;width:100%;height:100%}.web-chat-avatar.small{width:20px;height:20px;font-size:9px;border-radius:50%}
#app .web-chat-main{display:flex;flex-direction:column;min-height:0;min-width:0;position:relative}#app .web-chat-main>header{display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--site-border,#37313f);padding:20px 26px;background:var(--site-panel,#1b1722)}#app .web-chat-main>header>div{flex:1}#app .web-chat-main>header small{display:block;margin-top:5px;opacity:.6;font-size:10px}#app .web-chat-main>header button{font-size:11px}#app .web-chat-history{flex:1;min-height:0;overflow:auto;padding:30px;display:flex;flex-direction:column;gap:24px;scrollbar-gutter:stable}
#app .web-chat-message{display:flex;align-items:flex-start;gap:12px;align-self:flex-start;max-width:80%;font-size:14px}#app .web-chat-message.mine{align-self:flex-end;flex-direction:row-reverse}#app .web-chat-message>div{min-width:0;display:flex;flex-direction:column;align-items:flex-start}#app .web-chat-message.mine>div{align-items:flex-end}#app .web-chat-message header{display:flex;align-items:center;gap:8px;font-size:11px;margin-bottom:8px;flex-wrap:wrap}#app .web-chat-message header small{font-size:9px;opacity:.6}#app .web-chat-role{font-size:9px;color:var(--site-accent,#b093ef)}#app .web-chat-bubble{background:var(--site-panel,#1b1722);padding:13px 16px;border:1px solid var(--site-border,#37313f);border-radius:3px 14px 14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}#app .mine .web-chat-bubble{border-radius:14px 3px 14px 14px;background:color-mix(in srgb,var(--site-accent,#b093ef) 12%,var(--site-panel,#1b1722))}#app .web-chat-bubble>img,#app .web-chat-bubble>video{display:block;max-width:min(400px,100%);max-height:320px;border-radius:9px;margin-top:8px}#app .web-chat-tools{display:flex;gap:6px;margin-top:6px}#app .web-chat-tools button{font-size:10px;opacity:.6;padding:4px;border:0}#app .web-chat-tools button:hover{opacity:1}#app .web-chat-reactions{display:flex;gap:5px}#app .web-chat-reactions button{padding:3px 8px;font-size:13px}#app .web-chat-reactions button[aria-pressed=true]{border-color:var(--site-accent,#b093ef)}#app .web-chat-quote{font-size:10px;max-width:100%;border-left:3px solid var(--site-accent,#b093ef);margin:0 0 8px;text-align:left;opacity:.8}#app .web-chat-seen{display:flex;gap:4px;margin-top:5px}#app .web-chat-seen>span{position:relative}#app .web-chat-seen [role=tooltip]{position:absolute;bottom:calc(100% + 8px);right:0;white-space:nowrap;border:1px solid var(--site-border,#37313f);background:var(--site-panel,#1b1722);border-radius:6px;padding:7px 10px;font-size:10px;visibility:hidden;z-index:8}#app .web-chat-seen>span:hover [role=tooltip],#app .web-chat-seen>span:focus [role=tooltip]{visibility:visible}
#app #web-chat-compose{position:relative;flex-shrink:0;margin:0 22px 20px;padding:12px;border:1px solid var(--site-border,#37313f);border-radius:13px;background:var(--site-panel,#1b1722)}#app #web-chat-compose textarea{width:100%;resize:vertical;min-height:65px;max-height:150px;border:0;background:transparent;box-shadow:none;padding:8px}#app .web-chat-compose-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-top:10px;border-top:1px solid var(--site-border,#37313f)}#app .web-chat-compose-tools>button{font-size:11px}#app .web-chat-compose-tools>button.primary{margin-left:auto}#app .web-chat-compose-tools label{font-size:11px;max-width:200px;display:flex;align-items:center;gap:7px}#app .web-chat-compose-tools input{font-size:9px;width:120px;border:0;padding:0}#app #web-chat-reply-banner{font-size:11px;padding:5px 26px}#app #web-chat-suggestions{position:absolute;bottom:100%;left:0;display:flex;flex-direction:column;border-radius:10px;background:var(--site-panel,#1b1722);box-shadow:0 8px 30px #0006;min-width:230px}#app #web-chat-suggestions button{text-align:left;padding:10px;font-size:13px}
#app .web-chat-welcome{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:40px}#app .web-chat-welcome h1{font-size:38px;letter-spacing:-.05em}#app .web-chat-welcome p{opacity:.6;margin-top:0}
.web-chat-backdrop{position:fixed;inset:0;z-index:500;background:#000a;display:grid;place-items:center;padding:25px;backdrop-filter:blur(7px)}.web-chat-dialog{width:min(600px,95vw);max-height:85dvh;overflow:auto;border:1px solid var(--site-border,#37313f);border-radius:16px;padding:25px;background:var(--site-panel,#1b1722)}.web-chat-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.web-chat-dialog h2{margin:0;font-size:22px}.web-chat-dialog form{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}.web-chat-dialog p{font-size:12px;opacity:.6}.web-chat-create-list{display:flex;flex-direction:column;gap:7px;max-height:320px;overflow:auto}.web-chat-create-list label{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--site-border,#37313f);border-radius:9px}.web-chat-create-list input{margin-left:auto}.web-chat-create-list label[hidden]{display:none}.web-chat-dialog input{width:100%;min-width:0}.web-chat-create-list input[type=checkbox]{width:18px}.web-chat-member-list article{display:flex;align-items:center;gap:10px;padding:14px 0;border-bottom:1px solid var(--site-border,#37313f);flex-wrap:wrap}.web-chat-member-list article>span:not(.web-chat-avatar){flex:1}.web-chat-member-list small{display:block;margin-top:5px;opacity:.6;font-size:10px}.web-chat-member-list article>div{display:flex;gap:5px;flex-wrap:wrap}.web-chat-member-list button{font-size:10px;padding:7px}.web-chat-dialog>button{margin-top:14px}.web-chat-context{position:fixed;z-index:600;width:225px;padding:8px;background:var(--site-panel,#1b1722);border:1px solid var(--site-border,#37313f);box-shadow:0 16px 40px #0007;border-radius:12px}.web-chat-context button{border:0;display:block;width:100%;text-align:left;padding:11px 12px;font-size:12px}.web-chat-context button:hover{background:color-mix(in srgb,var(--site-accent,#b093ef) 12%,transparent)}.web-chat-context hr{border:0;border-top:1px solid var(--site-border,#37313f);margin:7px}.web-chat-emoji-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-top:15px}.web-chat-emoji-grid button{font-size:24px;border:0;padding:8px}.web-chat-media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:18px}.web-chat-media-grid button{padding:0;overflow:hidden}.web-chat-media-grid img{width:100%;height:140px;object-fit:cover}.web-chat-media-grid small{display:block;font-size:9px;padding:8px}
@media(max-width:800px){#app:has(.web-messenger){padding:5px}#app .web-messenger{grid-template-columns:1fr;height:calc(100dvh - 155px);min-height:450px;border-radius:12px}#app .web-chat-sidebar{display:none}#app .web-messenger:not(:has(#web-chat-compose)){display:block}#app .web-messenger:not(:has(#web-chat-compose)) .web-chat-sidebar{display:flex;height:100%}#app .web-messenger:not(:has(#web-chat-compose)) .web-chat-main{display:none}#app .web-chat-main>header{padding:13px}#app .web-chat-main>header h2{font-size:16px}#app .web-chat-main>header button{padding:7px;font-size:9px}#app .web-chat-history{padding:18px 12px}#app .web-chat-message{max-width:95%;gap:7px;font-size:13px}#app .web-chat-message>.web-chat-avatar{width:27px;height:27px;font-size:11px}#app #web-chat-compose{margin:0 9px 8px;padding:9px}#app .web-chat-compose-tools{gap:4px}#app .web-chat-compose-tools>button{font-size:10px;padding:7px}#app .web-chat-compose-tools label{max-width:130px}#app .web-chat-compose-tools input{max-width:75px}#app .web-chat-message header small{font-size:8px}.web-chat-dialog{padding:17px}.web-chat-media-grid{grid-template-columns:repeat(2,1fr)}}

#app .web-chat-compose-tools label{padding:8px 10px;border:1px solid var(--site-border,#37313f);border-radius:8px;cursor:pointer;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#app .web-chat-compose-tools input[type=file]{display:none}#app .web-chat-compose-tools>button{min-height:34px}#app .web-chat-compose-tools>button.primary{max-height:40px;padding:8px 14px;min-height:36px}#app .web-chat-compose-tools{flex-direction:row;align-items:center;justify-content:flex-start}#app .web-chat-compose-tools label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#app #web-chat-compose textarea{resize:none}
