#huellita-btn{
  position:fixed;
  right:20px;
  bottom:20px;
  width:220px;
  height:78px;
  border-radius:28px;
  background:linear-gradient(135deg,#0f9a93,#08736f);
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 18px 10px 70px;
  box-shadow:0 16px 40px rgba(0,0,0,.24);
  z-index:10050;
  cursor:pointer;
  border:4px solid #ffffff;
  color:white;
}

.huellita-peek-mini{
  position:absolute;
  left:14px;
  bottom:16px;
  width:54px;
  height:54px;
  border-radius:50%;
  background:white;
  object-fit:contain;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
  animation:huellitaFloat 1.8s ease-in-out infinite;
}

.huellita-btn-text strong{
  display:block;
  font-size:18px;
  line-height:1.1;
}

.huellita-btn-text span{
  display:block;
  font-size:12px;
  opacity:.92;
  margin-top:3px;
}

.huellita-alert{
  position:absolute;
  top:-9px;
  right:-9px;
  background:#ef4444;
  color:white;
  width:28px;
  height:28px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-weight:900;
  font-size:13px;
  border:3px solid white;
}

#huellita-chat{
  position:fixed;
  right:20px;
  bottom:105px;
  width:360px;
  max-width:calc(100vw - 28px);
  height:500px;
  max-height:72vh;
  background:#ffffff;
  border-radius:30px;
  box-shadow:0 24px 70px rgba(0,0,0,.30);
  z-index:10051;
  display:none;
  overflow:visible;
  border:2px solid rgba(15,154,147,.22);
}

#huellita-chat.active{
  display:flex;
  flex-direction:column;
}

.huellita-mascot-wrap{
  position:absolute;
  left:18px;
  top:-62px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  z-index:5;
}

.huellita-mascot{
  width:78px;
  height:78px;
  border-radius:50%;
  background:white;
  object-fit:contain;
  box-shadow:0 14px 35px rgba(0,0,0,.22);
  border:4px solid #e9fffc;
  animation:huellitaWave 2.2s ease-in-out infinite;
  transition:transform .25s ease, filter .25s ease;
}

.huellita-mascot.hablando{
  animation:hablarAnim .35s infinite;
}

.huellita-bubble{
  margin-top:8px;
  background:white;
  border:2px solid rgba(15,154,147,.18);
  border-radius:22px;
  padding:10px 12px;
  width:185px;
  box-shadow:0 10px 28px rgba(0,0,0,.12);
  color:#1f2933;
  position:relative;
}

.huellita-bubble:before{
  content:"";
  position:absolute;
  left:-9px;
  top:24px;
  width:16px;
  height:16px;
  background:white;
  border-left:2px solid rgba(15,154,147,.18);
  border-bottom:2px solid rgba(15,154,147,.18);
  transform:rotate(45deg);
}

.huellita-bubble strong{
  display:block;
  color:#0f9a93;
  font-size:15px;
  margin-bottom:2px;
}

.huellita-bubble span{
  display:block;
  font-size:12px;
  line-height:1.2;
}

.huellita-header{
  background:linear-gradient(135deg,#0f9a93,#08736f);
  color:white;
  padding:18px 16px 15px 116px;
  border-top-left-radius:27px;
  border-top-right-radius:27px;
  min-height:78px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.huellita-header strong{
  display:block;
  font-size:21px;
  line-height:1.05;
}

.huellita-header span{
  display:block;
  font-size:12px;
  opacity:.92;
  margin-top:4px;
  font-weight:650;
}

.huellita-close{
  width:34px;
  height:34px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,.92);
  color:#0f9a93;
  font-weight:900;
  font-size:18px;
  cursor:pointer;
}

.huellita-quick-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:12px 14px 10px;
  background:#ffffff;
}

.huellita-quick-actions button{
  border:1px solid rgba(15,154,147,.20);
  border-radius:16px;
  padding:10px 8px;
  background:#f8fffe;
  color:#08736f;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
  font-family:inherit;
  box-shadow:0 6px 15px rgba(15,154,147,.08);
}

.huellita-quick-actions button:hover{
  transform:translateY(-1px);
  background:#e9fffc;
}

#huellita-messages{
  flex:1;
  padding:10px 14px;
  overflow-y:auto;
  background:#f4fffd;
}

.huellita-msg{
  padding:10px 12px;
  border-radius:18px;
  margin-bottom:9px;
  font-size:13px;
  line-height:1.36;
  max-width:88%;
  box-shadow:0 5px 14px rgba(0,0,0,.06);
  white-space:pre-line;
}

.huellita-msg.bot{
  background:#ffffff;
  color:#1f2933;
  border-bottom-left-radius:6px;
  border:1px solid rgba(15,154,147,.08);
}

.huellita-msg.bot:before{
  content:"🐶 ";
}

#huellita-chat.modo-gato .huellita-msg.bot:before{
  content:"🐱 ";
}

.huellita-msg.user{
  background:#0f9a93;
  color:white;
  margin-left:auto;
  border-bottom-right-radius:6px;
}

.huellita-msg.thinking{
  opacity:.8;
  font-style:italic;
}

.huellita-options{
  display:grid;
  gap:7px;
  margin:4px 0 10px;
}

.huellita-option-link{
  display:block;
  background:#ff971e;
  color:white;
  padding:10px 12px;
  border-radius:15px;
  font-size:12px;
  font-weight:900;
  text-align:center;
  box-shadow:0 8px 18px rgba(255,151,30,.22);
}

.huellita-input-area{
  padding:10px;
  display:flex;
  gap:8px;
  background:#ffffff;
  border-top:1px solid #e5e7eb;
  border-bottom-left-radius:27px;
  border-bottom-right-radius:27px;
}

#huellita-input{
  flex:1;
  border:1px solid #d1d5db;
  border-radius:999px;
  padding:11px 13px;
  outline:none;
  font-size:13px;
  font-family:inherit;
}

#huellita-input:focus{
  border-color:#0f9a93;
  box-shadow:0 0 0 3px rgba(15,154,147,.12);
}

.huellita-send,
.huellita-voice{
  border:none;
  border-radius:50%;
  min-width:40px;
  width:40px;
  height:40px;
  background:#ff971e;
  color:white;
  font-size:17px;
  cursor:pointer;
  display:grid;
  place-items:center;
}

.huellita-voice{
  background:#0f9a93;
}

#huellita-chat.modo-gato .huellita-header{
  background:linear-gradient(135deg,#8b5cf6,#6d4cc2);
}

#huellita-chat.modo-gato .huellita-bubble strong{
  color:#7c3aed;
}

#huellita-chat.modo-gato .huellita-quick-actions button{
  color:#6d4cc2;
  border-color:rgba(139,92,246,.22);
}

#huellita-chat.modo-gato .huellita-msg.user{
  background:#8b5cf6;
}

@keyframes huellitaFloat{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-6px);}
}

@keyframes huellitaWave{
  0%,100%{transform:rotate(0deg) translateY(0);}
  25%{transform:rotate(-4deg) translateY(-4px);}
  50%{transform:rotate(3deg) translateY(0);}
  75%{transform:rotate(-2deg) translateY(-3px);}
}

@keyframes hablarAnim{
  0%{transform:scale(1) rotate(0deg);}
  50%{transform:scale(1.06) rotate(2deg);}
  100%{transform:scale(1) rotate(0deg);}
}

@media(max-width:520px){
  #huellita-btn{
    width:72px;
    height:72px;
    border-radius:50%;
    padding:0;
    right:14px;
    bottom:14px;
  }

  .huellita-btn-text,
  .huellita-alert{
    display:none;
  }

  .huellita-peek-mini{
    position:static;
    width:58px;
    height:58px;
  }

  #huellita-chat{
    right:10px;
    bottom:96px;
    width:calc(100vw - 20px);
    height:610px;
    max-height:74vh;
  }

  .huellita-mascot-wrap{
    left:14px;
    top:-76px;
  }

  .huellita-mascot{
    width:88px;
    height:88px;
  }

  .huellita-bubble{
    width:190px;
    margin-top:8px;
    padding:11px 13px;
  }

  .huellita-header{
    padding-left:118px;
    min-height:82px;
  }

  .huellita-header strong{
    font-size:20px;
  }

  .huellita-quick-actions{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .huellita-quick-actions button{
    font-size:12px;
    padding:10px 8px;
  }
}