.sai-root{position:fixed;bottom:18px;left:18px;z-index:99999;font-family:inherit;direction:rtl}
.sai-fab{width:56px;height:56px;border-radius:50%;border:0;background:var(--sai-color,#2563eb);color:#fff;font-size:26px;cursor:grab;touch-action:none;box-shadow:0 4px 14px rgba(0,0,0,.25);padding:0;line-height:1}
.sai-fab:active{cursor:grabbing}
.sai-panel{display:none;position:absolute;bottom:68px;left:0;width:340px;max-width:calc(100vw - 20px);height:480px;max-height:calc(100vh - 110px);background:#fff;border-radius:14px;box-shadow:0 8px 30px rgba(0,0,0,.25);flex-direction:column;overflow:hidden}
.sai-root.sai-right .sai-panel{left:auto;right:0}
.sai-root.sai-down .sai-panel{bottom:auto;top:68px}
.sai-root.sai-open .sai-panel{display:flex}
.sai-head{background:var(--sai-color,#2563eb);color:#fff;padding:12px 14px;display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:14px}
.sai-close{background:none;border:0;color:#fff;font-size:20px;cursor:pointer;line-height:1}
.sai-msgs{flex:1;overflow-y:auto;padding:12px;background:#f5f6f8;display:flex;flex-direction:column;gap:8px}
.sai-m{max-width:85%;padding:8px 11px;border-radius:12px;font-size:13px;line-height:1.7;white-space:pre-wrap;word-wrap:break-word}
.sai-m.bot{background:#fff;color:#222;align-self:flex-start;border:1px solid #e5e7eb}
.sai-m.user{background:var(--sai-color,#2563eb);color:#fff;align-self:flex-end}
.sai-note{font-size:11px;color:#6b7280;padding:4px 12px;background:#fff;border-top:1px solid #eee;line-height:1.6}
.sai-tools{display:flex;gap:6px;padding:6px 10px;background:#fff;border-top:1px solid #eee}
.sai-link{background:none;border:0;color:var(--sai-color,#2563eb);font-size:12px;cursor:pointer;padding:2px 4px}
.sai-track{display:none;padding:8px 10px;background:#fff;border-top:1px solid #eee;gap:6px;flex-direction:column}
.sai-track.sai-show{display:flex}
.sai-track input,.sai-foot input{border:1px solid #d1d5db;border-radius:8px;padding:8px;font-size:13px;font-family:inherit;direction:rtl;width:100%;box-sizing:border-box}
.sai-btn{background:var(--sai-color,#2563eb);color:#fff;border:0;border-radius:8px;padding:8px 12px;font-size:13px;cursor:pointer;font-family:inherit}
.sai-btn:disabled{opacity:.5;cursor:default}
.sai-foot{display:flex;gap:6px;padding:10px;background:#fff;border-top:1px solid #eee}
