.ac-fab { position:fixed; right:20px; bottom:20px; width:60px; height:60px; border-radius:50%; border:0; cursor:pointer; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; box-shadow:0 8px 28px rgba(37,99,235,.4); display:grid; place-items:center; z-index:1000; transition:transform .2s; }
.ac-fab:hover { transform:scale(1.07); }
.ac-fab svg { width:28px; height:28px; }
.ac-fab .ac-x { display:none; }
.ac-open .ac-fab .ac-x { display:block; }
.ac-open .ac-fab .ac-ico { display:none; }
.ac-win { position:fixed; right:20px; bottom:92px; width:370px; max-width:calc(100vw - 32px); height:540px; max-height:calc(100vh - 120px); background:var(--card); color:var(--text); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow-lg); display:flex; flex-direction:column; overflow:hidden; z-index:1000; opacity:0; visibility:hidden; transform:translateY(14px) scale(.98); transition:opacity .2s, transform .2s, visibility .2s; }
.ac-open .ac-win { opacity:1; visibility:visible; transform:none; }
.ac-head { padding:14px 16px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; display:flex; align-items:center; gap:10px; }
.ac-head b { display:block; font-size:15px; }
.ac-head small { opacity:.9; font-size:12px; }
.ac-dot { width:9px; height:9px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 3px rgba(74,222,128,.3); flex:none; }
.ac-log { flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:8px; background:var(--bg); }
.ac-m { max-width:85%; padding:9px 13px; border-radius:14px; font-size:14.5px; line-height:1.45; white-space:pre-wrap; word-wrap:break-word; }
.ac-bot { background:var(--card); border:1px solid var(--border); align-self:flex-start; border-bottom-left-radius:4px; }
.ac-me { background:var(--accent); color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }
.ac-sys { align-self:center; color:var(--muted); font-size:13px; text-align:center; }
.ac-typing::after { content:"…"; animation:acd 1s steps(3) infinite; }
@keyframes acd { 0%{content:"."} 33%{content:".."} 66%{content:"..."} }
.ac-chips { display:flex; flex-wrap:wrap; gap:6px; padding:8px 12px 0; background:var(--bg); }
.ac-chips:empty { display:none; }
.ac-chips button { font:inherit; font-size:13px; border:1px solid var(--accent); color:var(--accent); background:transparent; border-radius:99px; padding:5px 11px; cursor:pointer; }
.ac-chips button:hover { background:var(--accent); color:#fff; }
.ac-form { display:flex; gap:8px; padding:10px; border-top:1px solid var(--border); background:var(--card); }
.ac-form input { flex:1; min-width:0; font:inherit; font-size:15px; color:var(--text); background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:10px 12px; }
.ac-form input:focus { outline:2px solid var(--accent); outline-offset:-1px; }
.ac-form button { border:0; border-radius:10px; background:var(--accent); color:#fff; padding:0 14px; cursor:pointer; font:inherit; font-weight:600; }
.ac-form button:disabled { opacity:.5; cursor:default; }
@media (max-width:520px) {
  .ac-win { right:8px; left:8px; width:auto; max-width:none; bottom:84px; height:calc(100vh - 100px); max-height:none; }
  .ac-fab { right:14px; bottom:14px; }
}
