.chat-count{display:inline-flex;align-items:center;justify-content:center;min-width:21px;padding:2px 6px;border-radius:12px;background:#ece8fc;color:#51429a;font-size:11px;font-weight:700}.chat-count[hidden]{display:none}.chat-shell{display:grid;grid-template-columns:270px minmax(0,1fr);height:min(740px,calc(100dvh - 220px));min-height:430px;background:#fff;border:1px solid #dce3f0;border-radius:16px;overflow:hidden}.chat-list{overflow:auto;background:#fafbfe;border-right:1px solid #dce3f0;padding:12px}.chat-room{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:10px;padding:16px 12px;color:#223047;cursor:pointer;margin-bottom:5px}.chat-room.selected{background:#eeeafb}.chat-room>span{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-room strong{font-size:14px;overflow-wrap:anywhere}.chat-room small{display:block;margin-top:8px;color:#78859e;line-height:1.4;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-conversation{position:relative;display:flex;flex-direction:column;min-height:0;min-width:0}.chat-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid #e8edf5}.chat-heading h2{font-size:18px;margin:0 0 7px;overflow-wrap:anywhere}.chat-heading summary{color:#7a86a1;font-size:12px;cursor:pointer}.chat-heading details p{max-width:600px;font-size:12px;margin-top:8px}.chat-messages{flex:1;min-height:0;overflow:auto;padding:22px;overscroll-behavior:contain;background:#f7f8fc}.chat-message{width:fit-content;max-width:86%;padding:12px 15px;background:#fff;border:1px solid #e4e9f4;border-radius:13px 13px 13px 3px;margin-bottom:13px}.chat-message.mine{margin-left:auto;background:#eeeafb;border-color:#e2dcf5;border-radius:13px 13px 3px 13px}.chat-message-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;font-size:11px;margin-bottom:7px;color:#6f7891}.chat-message-meta strong{color:#514887}.chat-message-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.55}.chat-compose{display:grid;grid-template-columns:1fr auto;gap:9px;padding:12px 18px 16px;border-top:1px solid #e8edf5}.chat-compose textarea{min-width:0;resize:vertical;max-height:180px;min-height:62px;padding:12px;border:1px solid #ced7e7;border-radius:10px;font:inherit}.chat-compose button{align-self:end}.chat-compose small{grid-column:1/-1;color:#7a86a1;font-size:10px}.chat-input-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.chat-connection{font-size:11px;color:#78859e;margin:0;padding:7px 18px;min-height:25px}.chat-members{display:grid;gap:12px;margin:15px 0 25px}.chat-members label{display:flex;gap:12px;align-items:center}.chat-members input{width:18px;height:18px;accent-color:#5848a5}.chat-history{text-align:center;margin-bottom:16px}.chat-empty{color:#7a86a1;text-align:center;margin:50px 15px;line-height:1.7}.chat-back{display:none}.chat-jump{position:absolute;bottom:145px;left:50%;transform:translateX(-50%);box-shadow:0 2px 15px #26304720}.chat-jump[hidden]{display:none}
@media(max-width:700px){.chat-shell{grid-template-columns:1fr;min-height:450px;height:calc(100dvh - 170px)}.chat-shell .chat-conversation{display:none}.chat-shell.chat-open .chat-list{display:none}.chat-shell.chat-open .chat-conversation{display:flex}.chat-back{display:inline-block;margin-bottom:10px}.chat-heading{padding:12px}.chat-heading h2{font-size:17px}.chat-messages{padding:12px}.chat-message{max-width:94%;padding:10px}.chat-compose{padding:10px;gap:7px}.chat-compose .btn{padding:10px 12px}.chat-compose textarea{min-height:58px}.chat-compose small{display:none}.chat-connection{padding:6px 10px}.chat-shell .chat-list{border:0}.chat-jump{bottom:120px}body:has(.chat-shell) .content{padding:16px}body:has(.chat-shell) .page-head{margin-bottom:12px}}
@media(max-width:700px){body:has(.chat-shell) .sidebar .brand,body:has(.chat-shell) .topbar{display:none}body:has(.chat-shell) .sidebar{padding:8px 12px}}
@media(max-width:700px){body:has(.chat-shell) .nav{height:44px;max-height:44px;align-items:center}body:has(.chat-shell) .nav>button{height:40px;flex-shrink:0}.chat-shell{min-height:220px}}
.chat-shell{grid-template-columns:280px minmax(0,1fr);height:calc(100dvh - 215px);max-height:1100px;border-radius:20px;box-shadow:0 12px 40px #19263f08}.chat-list{background:#f8f9fc;padding:14px 10px}.chat-room-search{display:grid;gap:7px;font-size:12px;color:#75819a;padding:0 6px 12px}.chat-room-search input,.chat-search input{width:100%;box-sizing:border-box;border:1px solid #dce1ed;border-radius:10px;padding:10px;background:white;font:inherit}.chat-list-filters{display:flex;gap:5px;margin-bottom:12px}.chat-list-filters button{border:1px solid #e0e4ef;background:white;border-radius:15px;padding:7px;font-size:11px;color:#5848a5;cursor:pointer}.chat-room{display:flex;align-items:center;gap:10px;padding:13px 9px}.chat-room>span{display:block}.chat-room-copy{min-width:0;flex:1}.chat-avatar{display:grid!important;place-items:center;flex-shrink:0;width:38px;height:38px;border-radius:13px;background:#e8e3f7;color:#51429a;font-size:12px;font-weight:700}.chat-room small{margin-top:5px}.chat-room strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-heading{align-items:center;padding:14px 18px}.chat-heading>div{flex:1}.chat-heading h2{font-size:17px}.chat-search{display:flex;gap:8px;padding:9px 18px;background:#fafbfe;border-bottom:1px solid #e8edf5}.chat-search input{font-size:12px}.chat-search .btn{padding:8px 12px;font-size:12px}.chat-pins{background:#f0edf8;font-size:12px}.chat-pins details{padding:10px 18px;max-height:150px;overflow:auto}.chat-pins summary{cursor:pointer;color:#5848a5;font-weight:600}.chat-pins p{border-top:1px solid #ded8ed;padding-top:10px;white-space:pre-wrap}.chat-messages{background:#f3f4f9;scrollbar-gutter:stable}.chat-message{max-width:min(86%,640px);min-width:125px;border-radius:15px 15px 15px 4px;box-shadow:0 3px 8px #19263f04}.chat-message.mine{border-radius:15px 15px 4px 15px;background:#ece7f8}.chat-message-text a{color:#5542a0;overflow-wrap:anywhere}.chat-message-footer{text-align:right;font-size:10px;color:#7b7d94;margin-top:5px}.chat-message-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:8px}.chat-message-actions button{border:0;background:none;color:#6c638c;font-size:11px;cursor:pointer;padding:4px}.chat-message-actions .chat-reaction{border:1px solid #ded8ee;border-radius:16px;background:#f6f4fb;padding:4px 8px;font-size:12px}.chat-reaction.active{background:#dcd3f3!important}.chat-message-menu{position:relative;margin-left:auto}.chat-message-menu summary{cursor:pointer;padding:2px 8px;list-style:none}.chat-message-menu>div{position:absolute;right:0;bottom:24px;background:white;border:1px solid #dce1ed;border-radius:12px;padding:9px;box-shadow:0 6px 24px #19263f20;z-index:4;width:190px;display:grid;gap:5px}.chat-emoji{display:flex;flex-wrap:wrap}.chat-emoji button{font-size:19px}.chat-quote{display:grid;gap:4px;border-left:3px solid #a494cd;background:#f5f2fb;border-radius:5px;padding:8px 10px;font-size:11px;margin:8px 0;color:#74658d}.chat-quote span{white-space:pre-wrap}.chat-image{display:block;margin:10px 0}.chat-image img{max-width:100%;max-height:240px;border-radius:10px;object-fit:contain}.chat-file{display:grid;gap:5px;background:#f8f6fc;border:1px solid #ddd7eb;border-radius:10px;padding:12px;margin-top:8px;overflow-wrap:anywhere;font-size:13px}.chat-file small{font-size:10px}.chat-message audio{max-width:100%;width:290px;margin-top:10px}.chat-compose{display:block;padding:12px 16px;background:white}.chat-compose textarea{width:100%;box-sizing:border-box;min-height:60px;resize:vertical;background:#fafbfe}.chat-compose-actions{display:flex;align-items:center;gap:8px;margin-top:8px}.chat-compose-actions small{flex:1;font-size:10px;min-width:0}.chat-compose-actions .btn{font-size:12px;padding:9px 12px}.chat-attach{position:relative;overflow:hidden;cursor:pointer}.chat-attach input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}#chat-pending{font-size:12px}#chat-pending>span{display:inline-block;padding:6px;margin:0 6px 7px 0;background:#eeeaf8;border-radius:7px}#chat-pending button{border:0;background:none;cursor:pointer}.chat-reply{background:#f2eefb;padding:8px;border-radius:7px;margin-bottom:7px}.chat-reply button{float:right}#chat-tools{display:flex;gap:8px;flex-wrap:wrap}.chat-connection:empty{display:none}
@media(max-width:700px){.chat-shell{grid-template-columns:1fr;border-radius:14px;min-height:280px}.chat-heading{padding:10px}.chat-heading h2{font-size:15px}.chat-heading .chat-back{margin:0}.chat-search{padding:8px 10px}.chat-compose{padding:9px 10px max(9px,env(safe-area-inset-bottom))}.chat-compose-actions{gap:5px;flex-wrap:wrap}.chat-compose-actions small{display:none}.chat-compose-actions .primary{margin-left:auto}.chat-message{max-width:94%}.chat-message audio{width:235px}.chat-room{min-height:64px}.chat-messages{padding:12px 9px}.chat-list{padding:12px}.page-head:has(#chat-tools){display:block}.page-head:has(#chat-tools) h1{font-size:22px;margin:0 0 8px}.page-head:has(#chat-tools) p{display:none}#chat-tools .btn{font-size:11px;padding:8px}body:has(.chat-shell) .content{padding:10px}body:has(.chat-shell) .sidebar{padding:4px 10px}}

