/* Asistente flotante: mismos tokens que la calculadora. */
.bt-lanzar{position:fixed;right:20px;bottom:20px;z-index:50;display:flex;align-items:center;gap:10px;font:600 .95rem var(--body);min-height:52px;padding:0 20px 0 16px;border:0;border-radius:999px;background:var(--ink);color:var(--bg);box-shadow:0 12px 32px rgba(0,0,0,.22);cursor:pointer}
.bt-lanzar svg{flex:none}
.bt-panel{position:fixed;right:20px;bottom:20px;z-index:51;width:min(400px,calc(100vw - 24px));height:min(620px,calc(100vh - 40px));display:flex;flex-direction:column;background:var(--paper);border:1px solid var(--rule);border-top:3px solid var(--gold);box-shadow:0 24px 60px rgba(0,0,0,.25)}
.bt-panel[hidden]{display:none}
.bt-cab{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-bottom:1px solid var(--rule)}
.bt-cab h2{font-size:1.25rem}
.bt-cab small{display:block;font-family:var(--body);font-size:.74rem;color:var(--muted);font-weight:400}
.bt-x{font:inherit;width:40px;height:40px;border:1px solid var(--rule);border-radius:50%;background:transparent;color:var(--ink);cursor:pointer}
.bt-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}
.bt-m{max-width:88%;padding:10px 13px;font-size:.9rem;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.bt-u{align-self:flex-end;background:var(--ink);color:var(--bg);border-radius:14px 14px 2px 14px}
.bt-a{align-self:flex-start;background:var(--bg);border:1px solid var(--rule);border-radius:14px 14px 14px 2px}
.bt-a.bt-err{border-color:var(--bad);color:var(--bad)}
.bt-fuentes{margin:8px 0 0;padding:8px 0 0;border-top:1px solid var(--rule);font-size:.76rem;color:var(--muted);white-space:normal;display:grid;gap:3px}
.bt-fuentes a{color:var(--gold)}
.bt-acc{margin-top:8px;display:inline-block;font:600 .82rem var(--body);padding:8px 14px;border-radius:999px;border:1px solid var(--ink);background:transparent;color:var(--ink);cursor:pointer;text-decoration:none}
.bt-chips{display:flex;flex-wrap:wrap;gap:6px}
.bt-chips button{font:.8rem var(--body);padding:7px 11px;border-radius:999px;border:1px solid var(--rule);background:var(--paper);color:var(--ink);cursor:pointer;text-align:left}
.bt-pie{border-top:1px solid var(--rule);padding:10px 12px;display:grid;gap:6px}
.bt-form{display:flex;gap:8px;align-items:flex-end}
.bt-form textarea{flex:1;font:.92rem var(--body);resize:none;min-height:44px;max-height:120px;padding:10px 11px;border:1px solid var(--rule);border-radius:4px;background:var(--bg);color:var(--ink)}
.bt-form button{flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--ink);color:var(--bg);cursor:pointer;display:flex;align-items:center;justify-content:center}
.bt-form button:disabled{opacity:.5;cursor:wait}
.bt-aviso{margin:0;font-size:.7rem;color:var(--muted);line-height:1.4}
.bt-aviso a{color:var(--muted)}
.bt-pensando{display:flex;gap:4px}
.bt-pensando i{width:6px;height:6px;border-radius:50%;background:var(--muted);opacity:.4}
@media (prefers-reduced-motion:no-preference){.bt-pensando i{animation:bt 1s infinite}.bt-pensando i:nth-child(2){animation-delay:.15s}.bt-pensando i:nth-child(3){animation-delay:.3s}@keyframes bt{50%{opacity:1}}}
.bt-lanzar:focus-visible,.bt-x:focus-visible,.bt-form textarea:focus-visible,.bt-form button:focus-visible,.bt-chips button:focus-visible,.bt-acc:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media (max-width:520px){.bt-panel{right:0;bottom:0;width:100vw;height:100dvh;border:0}.bt-lanzar{right:12px;bottom:12px}}
