.hq-chat{background:#fff;border:1px solid #dce4ee;border-radius:16px;overflow:hidden;color:#16324c;min-width:0;box-shadow:0 3px 12px #122f4c08;scroll-margin-top:80px}
.hq-chat *{box-sizing:border-box}.hq-chat [hidden]{display:none!important}.hq-chat button,.hq-chat input,.hq-chat textarea{font:inherit}.hq-chat button{cursor:pointer;min-height:44px;touch-action:manipulation}.hq-chat button:disabled{cursor:wait;opacity:.65}.hq-chat button:focus-visible,.hq-chat textarea:focus-visible,.hq-chat input:focus-visible,.hq-chat a:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.hq-chat-head{display:flex;align-items:center;gap:10px;padding:16px;background:#f5f8fc;border-bottom:1px solid #e7edf4;flex-wrap:wrap}.hq-chat-head h2{font-size:1.05rem!important;margin:0;font-weight:850;color:#102c48}.hq-chat-head p{font-size:.76rem;color:#60758b;margin:3px 0 0}.hq-chat-mark{width:42px;height:42px;border-radius:13px;background:#143b61;color:#fff;display:grid;place-items:center;flex-shrink:0;font-weight:900;letter-spacing:.5px}.hq-chat-private{font-size:.65rem;font-weight:700;color:#39725d;background:#e7f3ec;border-radius:30px;padding:5px 8px;margin-left:auto}.hq-chat-intro{font-size:.78rem;line-height:1.5;padding:12px 16px 0;color:#62768b}.hq-chat-toolbar{display:flex;align-items:center;gap:6px;padding:4px 10px}.hq-chat-toolbar button{border:0;background:transparent;color:#245ea0;font-size:.75rem;font-weight:700;padding:5px 8px}.hq-chat-toolbar [data-refresh]{margin-left:auto}
.hq-chat-messages{height:350px;max-height:50dvh;min-height:220px;overflow-y:auto;overscroll-behavior-y:contain;padding:8px 12px 14px;scrollbar-gutter:stable}.hq-chat-empty{text-align:center;font-size:.85rem;color:#718397;padding:50px 12px;line-height:1.6}.hq-chat-item{display:flex;gap:8px;margin:0 0 16px;align-items:flex-start}.hq-chat-avatar{width:30px;height:30px;border-radius:50%;background:#e2ecf7;color:#28557c;display:grid;place-items:center;font-size:.65rem;font-weight:800;flex-shrink:0;margin-top:3px}.hq-chat-item.mine .hq-chat-avatar{background:#143b61;color:#fff}.hq-chat-bubble{min-width:0;max-width:calc(100% - 38px);background:#f2f4f7;border-radius:4px 16px 16px;padding:10px 12px;overflow-wrap:anywhere}.hq-chat-item.mine .hq-chat-bubble{background:#eaf1fc}.hq-chat-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;font-size:.77rem}.hq-chat-meta time{font-size:.66rem;color:#64788c}.hq-chat-body{white-space:pre-wrap;font-size:.9rem;line-height:1.5;margin:5px 0}.hq-chat-picture{display:block;margin-top:8px}.hq-chat-picture img{display:block;width:auto;max-width:100%;max-height:290px;height:auto;border-radius:10px}.hq-chat-announcement{display:inline-block;background:#fff2d7;color:#805612;border-radius:30px;padding:3px 7px;font-size:.64rem;font-weight:800;margin-top:6px}.hq-chat-reactions{display:flex;gap:6px;margin-top:4px;align-items:center}.hq-chat-reactions button{border:1px solid #d0dbe7;border-radius:14px;background:#fff;color:#5c7289;font-size:.73rem;padding:3px 10px;min-height:36px}.hq-chat-reactions button[aria-pressed=true]{color:#b4244c;background:#fff0f4;border-color:#df93a8}.hq-chat-reactions [data-remove]{border:0;background:transparent;margin-left:auto;font-size:.68rem;color:#718397}.hq-chat-item.is-focus .hq-chat-bubble{outline:3px solid #ed9a2b;outline-offset:2px}.hq-chat-removed{font-style:italic;color:#75869b;font-size:.82rem}.hq-chat-new{display:block;margin:4px auto;border:0;background:#eaf1fc;color:#245ea0;border-radius:20px;padding:5px 15px;font-size:.78rem;font-weight:750}.hq-chat-status{font-size:.78rem;padding:0 16px;color:#516d88;min-height:1em;margin:4px 0 10px}.hq-chat-status.error{color:#b42318}
.hq-chat-compose{border-top:1px solid #e7edf4;padding:12px;background:#fafbfd}.hq-chat-compose textarea{display:block;resize:vertical;min-height:64px;max-height:180px;width:100%;border:1px solid #ced9e5;border-radius:12px;padding:12px;color:#16324c;background:#fff;font-size:16px;line-height:1.4}.hq-chat-compose-row{display:flex;align-items:center;gap:10px;margin-top:8px}.hq-chat-photo{position:relative;overflow:hidden;display:flex;align-items:center;gap:4px;font-size:.8rem;font-weight:750;min-height:44px;padding:8px 10px;border:1px solid #ced9e5;border-radius:10px;color:#315f86;background:#fff;cursor:pointer}.hq-chat-photo input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.hq-chat-photo:focus-within{outline:3px solid #2563eb}.hq-chat-photo span{font-size:1.1rem}.hq-chat-count{font-size:.67rem;color:#62758a}.hq-chat-send{margin-left:auto;border:0;background:#ed641f;color:#fff;border-radius:11px;padding:9px 18px;font-size:.85rem!important;font-weight:800!important}.hq-chat-notify{display:flex;gap:10px;align-items:flex-start;margin-top:12px;padding:10px;background:#fff8e9;border:1px solid #f3dfaf;border-radius:10px;font-size:.8rem;cursor:pointer}.hq-chat-notify input{margin:3px 0 0;width:20px;height:20px;flex-shrink:0}.hq-chat-notify small{display:block;line-height:1.4;font-size:.7rem;color:#806a40;margin-top:2px}.hq-chat-help{font-size:.65rem;line-height:1.45;color:#748397;margin:9px 0 0}.hq-chat-preview{display:flex;align-items:center;gap:12px;margin-top:10px}.hq-chat-preview img{width:70px;height:70px;object-fit:cover;border-radius:8px}.hq-chat-preview button{border:0;background:transparent;color:#8a3540;font-size:.75rem}.hq-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(min-width:600px){.hq-chat-messages{height:390px;max-height:55dvh;padding:12px 18px}.hq-chat-bubble{max-width:85%}.hq-chat-head{padding:18px}.hq-chat-compose{padding:14px 18px}}@media(max-width:380px){.hq-chat-private{margin-left:52px;margin-top:-4px}.hq-chat-head{gap:7px}.hq-chat-send{padding:9px 12px}.hq-chat-count{font-size:.6rem}}

/* Keep the whole panel close to half a screen, including its composer. */
.hq-chat{display:flex;flex-direction:column;height:50dvh;min-height:320px;max-height:520px}
.hq-chat-head{padding:8px 12px;flex-shrink:0}.hq-chat-head p,.hq-chat-intro{display:none}.hq-chat-mark{width:32px;height:32px;border-radius:9px}.hq-chat-private{padding:4px 7px}
.hq-chat-toolbar{padding:0 6px;flex-shrink:0}.hq-chat-toolbar button{min-height:32px;font-size:.7rem}
.hq-chat-messages{flex:1 1 auto;height:auto;min-height:60px;max-height:none;padding:6px 10px;scrollbar-gutter:auto}.hq-chat-empty{padding:12px 4px}.hq-chat-item{margin-bottom:10px}.hq-chat-picture img{max-height:150px}.hq-chat-status{flex-shrink:0;margin:2px 0 4px;font-size:.72rem}.hq-chat-status:empty{display:none}.hq-chat-new{flex-shrink:0;min-height:28px!important;margin:0 auto;padding:2px 12px}
.hq-chat-compose{position:relative;flex-shrink:0;padding:8px 10px}.hq-chat-compose textarea{min-height:42px;max-height:42px;resize:none;padding:9px 10px}.hq-chat-compose-row{margin-top:5px;gap:6px}.hq-chat-help{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.hq-chat-notify{margin-top:5px;padding:5px;font-size:.72rem}.hq-chat-notify small{font-size:.65rem}.hq-chat-preview{margin-top:4px;gap:8px;min-height:32px}.hq-chat-preview img{width:36px;height:36px}.hq-chat-preview [data-photo-note]{font-size:.7rem}
.hq-chat-mentions{position:absolute;bottom:calc(100% - 2px);left:10px;right:10px;z-index:5;max-height:140px;overflow-y:auto;border:1px solid #9bb6d6;background:#fff;border-radius:10px;box-shadow:0 3px 12px #153b6030}.hq-chat-mentions button{display:block;width:100%;text-align:left;padding:8px 12px;border:0;border-bottom:1px solid #e7edf4;background:#fff;color:#16324c;font-size:.8rem;min-height:44px}.hq-chat-mentions button[aria-selected=true]{background:#e7f0ff;outline:2px solid #2563eb;outline-offset:-2px}
.hq-chat-mention{background:#dceafd;color:#174c90;border-radius:4px;padding:1px 3px;font-weight:700}.hq-chat-mentioned .hq-chat-bubble{border-left:3px solid #ed9a2b}.hq-chat-mentioned-label{display:block;font-size:.65rem;font-weight:800;color:#8a5300;margin-bottom:4px}.hq-chat-reactions{flex-wrap:wrap}.hq-chat-reactions [data-mute]{border:0;background:transparent;color:#805612;font-size:.68rem;margin-left:0;min-height:36px}.hq-chat-reactions [data-remove]{min-height:36px}
@media(max-width:380px){.hq-chat-private{margin-left:auto;margin-top:0}.hq-chat-head h2{font-size:.9rem!important}.hq-chat-head{gap:6px}.hq-chat-private{font-size:.58rem}}
.hq-chat-toolbar{overflow-x:auto;white-space:nowrap;min-height:34px}.hq-chat-toolbar>*{flex-shrink:0}.hq-chat-toolbar select{max-width:135px;min-height:32px;border:1px solid #ced9e5;border-radius:7px;color:#16324c;background:#fff;font:inherit;font-size:.73rem;padding:2px 5px}.hq-chat-room-dialog{max-width:min(420px,94vw);max-height:85dvh;border:1px solid #b8cade;border-radius:14px;padding:18px;color:#16324c;overflow-y:auto}.hq-chat-room-dialog::backdrop{background:#102c4866}.hq-chat-room-dialog h3{font-size:1.05rem;margin:0 0 14px}.hq-chat-room-dialog label{display:block;font-size:.8rem;margin:10px 0}.hq-chat-room-dialog input:not([type=checkbox]),.hq-chat-room-dialog select{display:block;width:100%;padding:10px;margin-top:4px;border:1px solid #b8cade;border-radius:7px;font-size:16px}.hq-chat-room-dialog button{padding:8px 14px;min-height:44px;border:1px solid #b8cade;border-radius:8px;background:#edf3fb;color:#153b60;margin-right:8px}.hq-chat-room-dialog button[type=submit]{background:#153b60;color:#fff}.hq-chat-room-dialog p{font-size:.73rem;line-height:1.5}.hq-chat-room-people{max-height:180px;overflow-y:auto}.hq-chat-room-people label{min-height:36px;display:flex;gap:8px;align-items:center}.hq-chat-room-people input{width:18px;height:18px}
