:root{--telus-c:#2563eb;--telus-t:#fff}
#telus-btn{position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));width:56px;height:56px;border-radius:50%;border:0;background:var(--telus-c);color:var(--telus-t);font:700 18px/1 system-ui,sans-serif;letter-spacing:1px;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.25);z-index:99990}
#telus-p{position:fixed;bottom:90px;width:380px;max-width:calc(100vw - 40px);height:560px;max-height:calc(100dvh - 110px);display:none;flex-direction:column;background:#fff;color:#2d2d2d;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.3);overflow:hidden;font:15px/1.45 system-ui,sans-serif;z-index:99991}
#telus-p.on{display:flex}
.telus-h{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:14px 8px 14px 16px;background:var(--telus-c);color:var(--telus-t)}
.telus-h,.telus-h strong,.telus-h .telus-s{color:var(--telus-t)!important}
.telus-h strong{display:block;font-size:17px;line-height:1.25}
.telus-s{margin-top:3px;font-size:13px;line-height:1.35}
.telus-x{flex:none;width:44px;height:44px;margin-top:-6px;border:0;background:none;color:var(--telus-t);font-size:30px;line-height:1;cursor:pointer}
.telus-l{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px}
.telus-m{max-width:85%;padding:9px 12px;border-radius:14px;white-space:pre-wrap;word-break:break-word}
.telus-m.assistant{background:#f1f3f4;align-self:flex-start}
.telus-m.user{background:var(--telus-c);color:var(--telus-t);align-self:flex-end}
.telus-m a{color:inherit;text-decoration:underline}
.telus-n{padding:4px 12px;font-size:11px;color:#6b7280}
.telus-n a{color:inherit;font-weight:600;margin-left:6px}
.telus-f{display:flex;gap:8px;padding:10px;border-top:1px solid #e5e7eb}
.telus-f input{flex:1;min-width:0;padding:10px 12px;border:1px solid #d1d5db;border-radius:999px;font:16px system-ui,sans-serif}
.telus-f button{width:44px;height:44px;border:0;border-radius:50%;background:var(--telus-c);color:var(--telus-t);font-size:18px;cursor:pointer}
@media(max-width:640px){#telus-p{inset:0;width:auto;max-width:none;height:100dvh;max-height:none;border-radius:0}html.telus-on{overflow:hidden}html.telus-on #telus-btn{display:none}}
.telus-cta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.telus-btn{display:inline-block;padding:10px 16px;border-radius:999px;background:var(--telus-c);color:var(--telus-t)!important;font-weight:600;font-size:14px;text-decoration:none!important;text-align:center}
.telus-btn:hover{filter:brightness(.92)}
.telus-m .telus-btn{text-decoration:none}
.telus-f input:disabled{background:#f3f4f6;cursor:not-allowed}

/* ---- Personaje animado ---- */
.telus-h .telus-tt{flex:1;min-width:0}
.telus-av-wrap{flex:none;width:58px;height:58px;margin:-2px 4px 0 -4px}
.telus-av{width:100%;height:100%;display:block;overflow:visible}
.telus-av-img{object-fit:contain;border-radius:50%;background:#fff}
.telus-av .av-float{animation:telusFloat 3.4s ease-in-out infinite}
.telus-av .eye{transform-box:fill-box;transform-origin:center;animation:telusBlink 4.6s infinite}
.telus-av .av-eyes,.telus-av .av-brows{transition:transform .25s ease}
.telus-av .av-dots,.telus-av .m-half,.telus-av .m-open{display:none}
.telus-av[data-state="thinking"] .av-dots{display:block}
.telus-av[data-state="thinking"] .av-dots circle{animation:telusDot 1.1s infinite}
.telus-av[data-state="thinking"] .av-dots circle:nth-child(2){animation-delay:.18s}
.telus-av[data-state="thinking"] .av-dots circle:nth-child(3){animation-delay:.36s}
.telus-av[data-state="thinking"] .av-eyes{transform:translate(3px,-3px)}
.telus-av[data-state="listening"] .av-eyes{transform:translate(0,3px)}
.telus-av[data-state="speaking"] .av-float{animation-duration:2s}
.telus-av[data-mouth="1"] .m-closed{display:none}
.telus-av[data-mouth="1"] .m-half{display:block}
.telus-av[data-mouth="2"] .m-closed{display:none}
.telus-av[data-mouth="2"] .m-open{display:block}
.telus-av-img[data-state="speaking"]{animation:telusTalk .45s ease-in-out infinite}
.telus-av-img[data-state="thinking"]{animation:telusFloat 1.4s ease-in-out infinite}
.telus-v{flex:none;width:36px;height:36px;margin-top:-2px;border:0;border-radius:50%;background:rgba(255,255,255,.18);color:var(--telus-t);font-size:17px;line-height:1;cursor:pointer}
.telus-v:hover,.telus-v:focus-visible{background:rgba(255,255,255,.3)}
@keyframes telusFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes telusBlink{0%,92%,100%{transform:scaleY(1)}95%{transform:scaleY(.1)}}
@keyframes telusDot{0%,100%{opacity:.25}50%{opacity:1}}
@keyframes telusTalk{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
@media (prefers-reduced-motion:reduce){.telus-av .av-float,.telus-av .eye,.telus-av .av-dots circle,.telus-av-img{animation:none!important}}
.telus-v,.telus-x,.telus-f button{display:flex;align-items:center;justify-content:center;padding:0}
.telus-v svg,.telus-x svg,.telus-f button svg{display:block}
