.ha-fab{position:fixed;right:24px;bottom:24px;width:52px;height:52px;border-radius:50%;border:0;background:#2457C5;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px rgba(23,32,51,.25);z-index:60}
.ha-fab[hidden],.ha-panel[hidden]{display:none}
.ha-fab:hover{background:#1c4499}
.ha-fab:focus-visible,.ha-panel button:focus-visible,.ha-panel textarea:focus-visible{outline:3px solid #7ba3ff;outline-offset:2px}
.ha-panel{position:fixed;right:24px;bottom:92px;width:400px;max-width:calc(100vw - 32px);height:min(600px,calc(100vh - 120px));background:#fff;border:1px solid #E2E6EC;border-radius:8px;box-shadow:0 8px 28px rgba(23,32,51,.22);display:flex;flex-direction:column;z-index:70;color:#202938}
.ha-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start;padding:12px 14px;border-bottom:1px solid #E2E6EC}
.ha-head h2{font-size:17px;margin:0}
.ha-context{font-size:14px;color:#4B5565;margin:2px 0 0}
.ha-head-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.ha-head-actions .btn{min-height:44px;padding:0 12px;font-size:14px}
.ha-log{flex:1;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.ha-intro{font-size:14px;color:#4B5565;margin:4px 0 0}
.ha-quick{display:grid;gap:8px}
.ha-quick .btn{min-height:44px;text-align:left;justify-content:flex-start;font-size:15px;white-space:normal}
.ha-msg{font-size:15px;line-height:1.5;border-radius:8px;padding:10px 12px;max-width:92%;overflow-wrap:anywhere}
.ha-msg p{margin:0 0 6px}.ha-msg p:last-child{margin:0}.ha-msg ol{margin:4px 0 6px;padding-left:20px}
.ha-user{align-self:flex-end;background:#2457C5;color:#fff}
.ha-bot{align-self:flex-start;background:#F5F6F8;border:1px solid #E2E6EC}
.ha-error{align-self:stretch;max-width:100%;background:#FDECEC;border:1px solid #E8B4B4;color:#7A1F1F}
.ha-links{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.ha-link,.ha-error .btn{min-height:44px;font-size:14px}
.ha-meta{font-size:13px;color:#4B5565;margin-top:6px}
.ha-dots::after{content:"…";}
.ha-form{display:flex;gap:8px;align-items:flex-end;padding:10px 14px;border-top:1px solid #E2E6EC}
.ha-form textarea{flex:1;resize:none;min-height:44px;font-size:16px}
.ha-form .btn{min-height:44px}
@media(max-width:640px){
  .ha-fab{right:16px;bottom:calc(16px + env(safe-area-inset-bottom))}
  .ha-panel{right:0;left:0;bottom:0;width:100%;max-width:none;height:min(86dvh,100dvh - 24px);border-radius:12px 12px 0 0;padding-bottom:env(safe-area-inset-bottom)}
}
@media(prefers-reduced-motion:no-preference){.ha-panel{animation:ha-in .12s ease-out}@keyframes ha-in{from{opacity:0}to{opacity:1}}}
.ha-panel [hidden]{display:none!important}
.ha-form .btn{flex:0 0 auto;width:auto;padding:0 16px}
.ha-form textarea{min-width:0;flex:1 1 auto}
.ha-head-actions .btn{width:auto}
.ha-form textarea{height:44px;max-height:96px}
