.portal-chat-trigger{position:fixed;right:18px;bottom:18px;z-index:80;background:#087b51;color:white;border:0;border-radius:28px;padding:14px 20px;min-height:48px;max-width:calc(100vw - 36px);box-shadow:0 8px 25px #193e3426;font:600 14px system-ui;cursor:pointer}
dialog.portal-chat-window[open]{display:flex;flex-direction:column;box-sizing:border-box;width:min(680px,calc(100vw - 24px));max-width:none;height:min(760px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #cfdfd6;border-radius:16px;background:#f3f8f5;overflow:hidden;color:#21463b}
.portal-chat-window::backdrop{background:#163d3455}.portal-chat-window *{box-sizing:border-box;min-width:0}.portal-chat-window [hidden]{display:none!important}
.portal-chat-window>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:white;border-bottom:1px solid #d8e4dd;flex:none}.portal-chat-window h2{font-size:20px;margin:0}.portal-chat-window>header button{width:44px;min-width:44px;height:44px;padding:0;border:1px solid #cfdfd6;border-radius:9px;background:#f4f8f6;font-size:24px}
.portal-chat-context{padding:12px 16px;background:white;flex:none}.portal-chat-context label{display:flex;flex-direction:column;gap:6px;font-size:13px}.portal-chat-context select{width:100%;max-width:100%;min-height:44px;padding:9px;border:1px solid #cfdfd6;border-radius:9px;font:inherit}
.portal-chat-log{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:10px;padding:16px}.portal-chat-log article{max-width:88%;background:white;border:1px solid #d5e3db;border-radius:12px;padding:10px;align-self:flex-start;overflow-wrap:anywhere;flex:none}.portal-chat-log article.portal-chat-own{align-self:flex-end;background:#ddf1e6}.portal-chat-log p{white-space:pre-wrap;margin:4px 0}.portal-chat-log strong{font-size:12px}
.portal-chat-status{flex:none;margin:0;padding:4px 14px;font-size:13px;overflow-wrap:anywhere}.portal-chat-status:empty{display:none}.portal-chat-compose{display:flex;flex:none;gap:8px;margin:0;padding:12px;background:white;border-top:1px solid #d5e3db}.portal-chat-compose textarea{flex:1;width:0;min-height:48px;max-height:100px;resize:vertical;border:1px solid #cfdfd6;border-radius:9px;font:16px system-ui;padding:9px}.portal-chat-compose button{min-height:44px;border:0;border-radius:9px;padding:10px;background:#087b51;color:white;font:600 14px system-ui}.portal-chat-window :focus-visible{outline:2px solid #087b51;outline-offset:2px}
@media(max-width:600px){dialog.portal-chat-window[open]{width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}.portal-chat-window>header{padding:8px 10px}.portal-chat-window h2{font-size:18px}.portal-chat-context{padding:8px 10px}.portal-chat-compose{padding:8px}.portal-chat-log{padding:10px}}
@media(max-height:500px){.portal-chat-window>header{padding:4px 10px}.portal-chat-context{padding:4px 10px}.portal-chat-context label{flex-direction:row;align-items:center}.portal-chat-context select{flex:1}.portal-chat-compose{padding:6px}}
