
:root{
  --cu-burgundy:#8f1d21;
  --cu-burgundy-2:#b7272a;
  --cu-ink:#162338;
  --cu-muted:#64748b;
  --cu-line:#e3e8f0;
  --cu-card:#ffffff;
  --cu-soft:#f7f9fc;
  --cu-whatsapp:#dcfce7;
  --cu-whatsapp-ink:#166534;
  --cu-contact:#fee2e2;
  --cu-contact-ink:#991b1b;
  --cu-sky:#dbeafe;
  --cu-sky-ink:#0c4a6e;
  --cu-shadow:0 20px 55px rgba(15,23,42,.18);
}

.cu-assistant-launcher,
.cu-assistant-panel,
.cu-assistant-nudge{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}

.cu-assistant-launcher{
  position:fixed;
  right:16px;
  bottom:86px;
  z-index:90;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  transition:transform .24s ease, opacity .24s ease;
}
.cu-assistant-launcher.is-docked{opacity:.96;transform:translateY(2px)}
.cu-assistant-launcher.is-docked .cu-boty-hint{opacity:0;transform:translateY(8px);pointer-events:none}
.cu-boty-trigger,.cu-boty-hint,.cu-assistant-head-mascot{border:0;cursor:pointer}
.cu-boty-trigger{background:transparent;padding:0;position:relative}
.cu-boty-hint{
  position:relative;
  max-width:min(248px,calc(100vw - 42px));
  text-align:left;
  background:rgba(255,255,255,.98);
  color:var(--cu-ink);
  border-radius:18px;
  padding:10px 12px 11px;
  box-shadow:0 14px 34px rgba(15,23,42,.12);
  transition:transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.cu-boty-hint::after{
  content:"";
  position:absolute;
  right:34px;
  bottom:-7px;
  width:16px;
  height:16px;
  background:rgba(255,255,255,.98);
  transform:rotate(45deg);
  border-radius:4px;
}
.cu-boty-hint-label{display:block;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--cu-muted);margin-bottom:2px}
.cu-boty-hint-title{display:block;font-size:13px;line-height:1.2;color:var(--cu-ink);margin-bottom:2px}
.cu-boty-hint-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:11px;line-height:1.4;color:#475569}
.cu-assistant-launcher.is-hovering .cu-boty-hint,
.cu-assistant-launcher.is-speaking .cu-boty-hint{transform:translateY(-2px);box-shadow:0 18px 42px rgba(15,23,42,.16)}

.cu-boty-character{position:relative;display:block;width:min(138px,26vw);min-width:98px}
.cu-boty-character img,.cu-boty-fallback{display:block;width:100%;height:auto;position:relative;z-index:2}
.cu-boty-fallback{aspect-ratio:.64/1;border-radius:26px;background:linear-gradient(135deg,#fff7ed,#fee2e2);display:grid;place-items:center;font-size:44px;color:var(--cu-burgundy)}
.cu-boty-shadow{position:absolute;left:24px;right:24px;bottom:8px;height:18px;border-radius:999px;background:radial-gradient(circle at center, rgba(15,23,42,.28), rgba(15,23,42,0) 70%);filter:blur(5px);transform-origin:center;animation:cuShadowFloat 3.8s ease-in-out infinite}
@keyframes cuShadowFloat{0%,100%{transform:scaleX(1)}50%{transform:scaleX(.9)}}
.cu-boty-trigger{filter:drop-shadow(0 12px 20px rgba(15,23,42,.15))}
.cu-boty-trigger .cu-boty-character{animation:cuFloat 3.8s ease-in-out infinite;transform-origin:center bottom;transition:transform .18s ease, filter .18s ease}
.cu-assistant-launcher.is-hovering .cu-boty-trigger .cu-boty-character{transform:translateY(-4px) rotate(-1.4deg) scale(1.015)}
@keyframes cuFloat{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-7px) rotate(-.9deg)}}

.cu-boty-face-fx{display:none !important}
.cu-boty-eye{
  position:absolute;
  width:11%;
  height:4%;
  top:23.6%;
  border-radius:999px;
  background:#f2bc84;
  box-shadow:0 1px 0 rgba(0,0,0,.04) inset;
  transform-origin:center center;
  transform:scaleY(1);
  opacity:0;
  animation:cuBlink 4.8s infinite ease-in-out;
}
.cu-boty-eye.eye-left{left:34.1%}
.cu-boty-eye.eye-right{left:54.4%}
@keyframes cuBlink{
  0%,87%,100%{transform:scaleY(1);opacity:0}
  88.5%,90%{transform:scaleY(.08);opacity:1}
  91.5%,93%{transform:scaleY(1);opacity:0}
  94.5%,96%{transform:scaleY(.08);opacity:1}
}

.cu-boty-chip,
.cu-launcher-unread{position:absolute;display:inline-flex;align-items:center;justify-content:center;gap:6px;box-shadow:0 10px 22px rgba(15,23,42,.14)}
.cu-boty-chip{padding:7px 11px;border-radius:999px;background:linear-gradient(135deg,var(--cu-burgundy),var(--cu-burgundy-2));font-size:11px;font-weight:800;color:#fff;z-index:4}
.cu-boty-chip.is-name{left:50%;bottom:0;transform:translateX(-50%)}
.cu-launcher-unread{top:1px;right:10px;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#111827;color:#fff;font-size:11px;font-weight:800;z-index:6}

.cu-assistant-panel{
  position:fixed;
  right:18px;
  bottom:76px;
  z-index:91;
  width:min(380px,calc(100vw - 28px));
  height:min(68vh,620px);
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  border-radius:24px;
  background:rgba(255,255,255,.99);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:var(--cu-shadow);
  opacity:0;
  pointer-events:none;
  transform:translateY(14px) scale(.96);
  transform-origin:calc(100% - 44px) calc(100% - 96px);
  transition:all .22s cubic-bezier(.2,.8,.2,1);
}
.cu-assistant-panel.is-open{opacity:1;pointer-events:auto;transform:none}

.cu-assistant-launcher.is-muted-by-nav{
  opacity:0 !important;
  pointer-events:none !important;
  transform:translateY(10px) !important;
}

.cu-assistant-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--cu-line)}
.cu-assistant-head-main{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.cu-assistant-head-mascot{position:relative;flex:0 0 auto;width:46px;height:58px;padding:0;background:transparent;overflow:visible}
.cu-assistant-head-mascot img,.cu-assistant-head-mascot .cu-boty-fallback{width:100%;height:100%;object-fit:contain;display:block}
.cu-head-live{display:none !important}
.cu-assistant-head-copy{display:flex;flex-direction:column;min-width:0}
.cu-assistant-head-copy small{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--cu-muted);margin-bottom:4px}
.cu-assistant-head-copy strong{font-size:20px;line-height:1.05;color:var(--cu-ink)}
.cu-assistant-head-copy span{margin-top:4px;font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cu-assistant-head-tools{display:flex;gap:8px}
.cu-assistant-head-tools button{width:38px;height:38px;border:0;border-radius:12px;background:#f1f5f9;color:#334155;cursor:pointer;font-size:15px;transition:background .16s ease, transform .16s ease}
.cu-assistant-head-tools button:hover{background:#e2e8f0;transform:translateY(-1px)}

.cu-assistant-scene-wrap{display:flex;flex-direction:column;gap:4px}
.cu-assistant-scene,.cu-assistant-dock,.cu-assistant-quick,.cu-assistant-inline-actions,.cu-assistant-cards,.cu-assistant-sections{display:flex;flex-wrap:wrap;gap:8px}
.cu-assistant-scene{padding:0 1px}
.cu-assistant-dock{display:none !important}
.cu-scene-pill,.cu-assistant-chip,.cu-assistant-action{display:inline-flex;align-items:center;gap:6px;border:0;text-decoration:none;cursor:pointer;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:800;transition:transform .16s ease, box-shadow .16s ease, background .16s ease}
.cu-scene-pill{background:#eef2ff;color:#334155}
.cu-scene-pill.alt{background:#f8fafc;color:#475569}
.cu-assistant-chip{background:#f1f5f9;color:#0f172a;padding:8px 11px}
.cu-assistant-action{background:#eef2ff;color:#1f2937}
.cu-assistant-action.whatsapp{background:var(--cu-whatsapp);color:var(--cu-whatsapp-ink)}
.cu-assistant-action.contact{background:var(--cu-contact);color:var(--cu-contact-ink)}
.cu-assistant-action.secondary{background:#e0f2fe;color:#075985}
.cu-assistant-chip:hover,.cu-assistant-action:hover{transform:translateY(-1px)}

.cu-assistant-body{flex:1;overflow:auto;padding:0 2px 2px;display:flex;flex-direction:column;gap:8px;min-height:0;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
.cu-assistant-message{display:flex}
.cu-assistant-message.is-user{justify-content:flex-end}
.cu-assistant-bubble{max-width:92%;padding:11px 12px;border-radius:18px;background:#fff;border:1px solid var(--cu-line)}
.cu-assistant-message.is-user .cu-assistant-bubble{background:linear-gradient(135deg,#111827,#334155);color:#fff;border-color:transparent;border-bottom-right-radius:8px}
.cu-assistant-message.is-bot .cu-assistant-bubble{background:#fbfdff;border-bottom-left-radius:8px}
.cu-assistant-answer,.cu-assistant-message p{margin:0;font-size:14px;line-height:1.52;color:inherit}
.cu-assistant-cards,.cu-assistant-sections,.cu-assistant-inline-actions{margin-top:8px}
.cu-assistant-card{display:flex;justify-content:space-between;gap:8px;padding:9px 10px;border-radius:14px;background:#f8fafc;border:1px solid var(--cu-line)}
.cu-assistant-card strong{display:block;font-size:12px;color:var(--cu-ink);margin-bottom:1px}
.cu-assistant-card small{display:block;font-size:11px;color:var(--cu-muted);margin-bottom:4px}
.cu-assistant-card p{margin:0;font-size:11px;color:#334155}
.cu-assistant-card-link{display:inline-flex;align-items:center;white-space:nowrap;text-decoration:none;color:var(--cu-burgundy);font-size:12px;font-weight:800}
.cu-assistant-section{padding:8px 10px;border-radius:14px;background:#fff;border:1px solid var(--cu-line)}
.cu-assistant-section span{display:block;font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#7c2d12;margin-bottom:3px}
.cu-assistant-section p{margin:0;font-size:11px;color:#334155}
.cu-assistant-bubble-typing{display:flex;gap:5px;align-items:center}
.cu-assistant-bubble-typing span{width:7px;height:7px;border-radius:50%;background:#94a3b8;animation:cuTyping 1.2s infinite ease-in-out}
.cu-assistant-bubble-typing span:nth-child(2){animation-delay:.15s}.cu-assistant-bubble-typing span:nth-child(3){animation-delay:.3s}
@keyframes cuTyping{0%,80%,100%{transform:scale(.7);opacity:.45}40%{transform:scale(1);opacity:1}}

.cu-assistant-form{display:flex;flex-direction:column;gap:4px;margin-top:auto;padding-top:0}
.cu-assistant-quick{display:none !important}
.cu-assistant-form-inner{display:flex;align-items:flex-end;gap:8px;padding:7px 8px;border-radius:16px;background:#fff;border:1px solid var(--cu-line);box-shadow:0 6px 14px rgba(15,23,42,.05)}
.cu-assistant-form textarea{flex:1;border:0;outline:0;resize:none;background:transparent;padding:5px 4px;min-height:40px;max-height:88px;font-size:14px;line-height:1.45;color:#0f172a}
.cu-assistant-send{flex:0 0 auto;width:42px;height:42px;border:0;cursor:pointer;border-radius:13px;color:#fff;background:linear-gradient(135deg,var(--cu-burgundy),var(--cu-burgundy-2));display:inline-flex;align-items:center;justify-content:center;font-size:15px;box-shadow:0 8px 16px rgba(143,29,33,.18)}
.cu-assistant-send:hover{transform:translateY(-1px)}
.cu-assistant-actions-bar,.cu-assistant-footnote{display:none !important}

@media (max-width: 768px){
  .cu-assistant-launcher{right:10px;bottom:90px}
  .cu-boty-hint{max-width:min(220px,calc(100vw - 28px));padding:9px 11px 10px}
  .cu-boty-character{width:min(122px,32vw);min-width:88px}
  .cu-assistant-panel{left:10px;right:10px;bottom:78px;width:auto;height:min(66vh,560px);padding:12px;border-radius:22px;transform-origin:calc(100% - 34px) calc(100% - 90px)}
  .cu-assistant-head-copy strong{font-size:19px}
  .cu-assistant-head-copy span{white-space:normal}
  .cu-assistant-head-mascot{width:42px;height:54px}
  .cu-assistant-form textarea{min-height:38px;max-height:78px}
}


/* v12 ultralimpia: conversación primero */
.cu-assistant-panel{
  width:min(372px,calc(100vw - 22px));
  height:min(72vh,620px);
  gap:8px;
  padding:12px;
  border-radius:22px;
}
.cu-assistant-head{padding-bottom:8px}
.cu-assistant-head-main{gap:8px}
.cu-assistant-head-mascot{width:34px;height:44px}
.cu-assistant-head-copy small{font-size:9px;margin-bottom:2px}
.cu-assistant-head-copy strong{font-size:17px}
.cu-assistant-head-copy span{font-size:11px;margin-top:2px}
.cu-assistant-head-tools{gap:6px}
.cu-assistant-head-tools button{width:34px;height:34px;border-radius:11px;font-size:14px}
.cu-assistant-scene-wrap{gap:0}
.cu-assistant-scene{padding:0;min-height:0}
.cu-scene-pill,.cu-assistant-chip,.cu-assistant-action{padding:6px 10px;font-size:11px}
.cu-assistant-body{gap:6px;padding:0 1px 1px}
.cu-assistant-bubble{max-width:94%;padding:9px 10px;border-radius:16px}
.cu-assistant-answer,.cu-assistant-message p{font-size:13px;line-height:1.46}
.cu-assistant-inline-actions,.cu-assistant-cards,.cu-assistant-sections{margin-top:6px;gap:6px}
.cu-assistant-section{padding:7px 9px;border-radius:12px}
.cu-assistant-section span{font-size:9px;margin-bottom:2px}
.cu-assistant-section p,.cu-assistant-card p{font-size:10px}
.cu-assistant-card{padding:8px 9px;border-radius:12px}
.cu-assistant-card strong{font-size:11px}
.cu-assistant-card small{font-size:10px}
.cu-assistant-form{gap:2px;padding-top:0}
.cu-assistant-form-inner{gap:6px;padding:6px 7px;border-radius:15px}
.cu-assistant-form textarea{padding:4px 3px;min-height:32px;max-height:56px;font-size:13px;line-height:1.38}
.cu-assistant-send{width:44px;height:44px;border-radius:14px;font-size:16px;box-shadow:none}
.cu-assistant-send i{transform:translateX(1px)}
.cu-assistant-quick.is-compact{display:flex !important;gap:6px;flex-wrap:nowrap;overflow:auto hidden;padding:0 1px 2px;scrollbar-width:none}
.cu-assistant-quick.is-compact::-webkit-scrollbar{display:none}
.cu-assistant-quick.is-compact .cu-assistant-chip{white-space:nowrap;background:#f5f7fb;color:#24324a;font-weight:700}
.cu-assistant-panel.has-conversation .cu-assistant-quick.is-compact{display:none !important}
.cu-assistant-panel.has-conversation .cu-assistant-scene{opacity:.8}
.cu-assistant-panel.has-conversation .cu-assistant-head-copy span{display:none}
@media (max-width:640px){
  .cu-assistant-panel{width:min(356px,calc(100vw - 16px));height:min(70vh,560px);right:8px;bottom:74px;padding:11px}
  .cu-assistant-body{gap:5px}
  .cu-assistant-form textarea{min-height:30px;max-height:52px}
  .cu-assistant-send{width:42px;height:42px}
}


/* v13 pulido final: menos interfaz, mas conversación */

.cu-assistant-launcher{right:14px;bottom:96px;gap:6px}
.cu-boty-hint{max-width:min(210px,calc(100vw - 34px));padding:8px 10px 9px;border-radius:16px}
.cu-boty-hint::after{right:28px;width:14px;height:14px;bottom:-6px}
.cu-boty-hint-label{font-size:9px;margin-bottom:1px}
.cu-boty-hint-title{font-size:12px;margin-bottom:1px}
.cu-boty-hint-text{font-size:10px;line-height:1.32}
.cu-boty-character{width:min(124px,23vw);min-width:90px}
.cu-boty-chip{padding:6px 10px;font-size:10px;bottom:2px}

.cu-assistant-panel{width:min(356px,calc(100vw - 18px));height:min(70vh,598px);gap:7px;padding:11px 11px 10px;border-radius:21px}
.cu-assistant-head{padding-bottom:7px}
.cu-assistant-head-main{gap:7px}
.cu-assistant-head-mascot{width:30px;height:40px}
.cu-assistant-head-copy small{font-size:8px;letter-spacing:.06em;margin-bottom:1px}
.cu-assistant-head-copy strong{font-size:16px}
.cu-assistant-head-copy span{font-size:10px;margin-top:1px}
.cu-assistant-head-tools button{width:32px;height:32px;border-radius:10px;font-size:13px}

.cu-assistant-scene-wrap{gap:0}
.cu-assistant-scene{padding:0;margin-bottom:1px}
.cu-scene-pill,.cu-assistant-chip,.cu-assistant-action{padding:5px 9px;font-size:10.5px;border-radius:999px}
.cu-assistant-quick.is-compact{padding:0 0 1px}
.cu-assistant-quick.is-compact .cu-assistant-chip{padding:5px 9px;font-size:10.5px}

.cu-assistant-body{gap:5px;padding:1px 1px 0}
.cu-assistant-bubble{max-width:95%;padding:9px 10px;border-radius:15px}
.cu-assistant-answer,.cu-assistant-message p{font-size:13px;line-height:1.42}
.cu-assistant-inline-actions,.cu-assistant-cards,.cu-assistant-sections{margin-top:5px;gap:5px}
.cu-assistant-card{padding:7px 8px;border-radius:11px}
.cu-assistant-card strong{font-size:10.5px}
.cu-assistant-card small,.cu-assistant-card p{font-size:10px}
.cu-assistant-section{padding:7px 8px;border-radius:11px}
.cu-assistant-section span{font-size:8.5px;margin-bottom:2px}
.cu-assistant-section p{font-size:10px}

.cu-assistant-form{gap:1px}
.cu-assistant-form-inner{gap:6px;padding:5px 6px;border-radius:14px}
.cu-assistant-form textarea{padding:3px 2px;min-height:28px;max-height:44px;font-size:13px;line-height:1.34}
.cu-assistant-send{width:40px;height:40px;border-radius:13px;font-size:14px}
.cu-assistant-send i{transform:translateX(.5px)}

.cu-assistant-panel.has-conversation .cu-assistant-scene-wrap{display:none}
.cu-assistant-panel.has-conversation .cu-assistant-head{padding-bottom:6px}

@media (max-width:640px){
  .cu-assistant-launcher{right:10px;bottom:92px}
  .cu-boty-character{width:min(112px,28vw);min-width:82px}
  .cu-boty-hint{max-width:min(188px,calc(100vw - 24px));padding:7px 9px 8px}
  .cu-assistant-panel{width:min(340px,calc(100vw - 14px));height:min(68vh,548px);right:7px;bottom:72px;padding:10px 10px 9px;border-radius:19px}
  .cu-assistant-head-copy strong{font-size:15px}
  .cu-assistant-head-copy span{font-size:9.5px}
  .cu-assistant-form textarea{min-height:26px;max-height:40px;font-size:12.5px}
  .cu-assistant-send{width:38px;height:38px}
}

/* Ajuste final mobile: evita empalme con CTA del hero */
@media (max-width: 767px){
  .cu-assistant-launcher{
    right:8px !important;
    bottom:12px !important;
    z-index:85;
  }
  .cu-boty-hint{
    display:none !important;
  }
  .cu-boty-character{
    width:min(96px,24vw) !important;
    min-width:72px !important;
  }
  .cu-boty-chip{
    font-size:9px;
    padding:5px 8px;
  }
  .cu-assistant-panel{
    right:8px !important;
    left:8px !important;
    bottom:68px !important;
    width:auto !important;
    max-height:64vh;
  }
}
