.isa-welcome,.isa-chat{font-family:Inter,Arial,sans-serif;color:#182230}.isa-welcome{position:fixed;inset:0;background:rgba(16,36,62,.58);z-index:9998;display:grid;place-items:center;padding:18px}.isa-welcome-card{width:min(560px,100%);background:#fff;border-radius:20px;padding:28px;box-shadow:0 24px 70px rgba(0,0,0,.25)}.isa-welcome h2{margin:0 0 10px;color:#1769aa}.isa-welcome p,.isa-welcome li{line-height:1.55}.isa-welcome button,.isa-send{border:0;border-radius:10px;padding:12px 18px;background:#1769aa;color:white;font-weight:800;cursor:pointer}.isa-chat{position:fixed;right:18px;bottom:18px;z-index:9997}.isa-launch{border:0;border-radius:999px;background:linear-gradient(135deg,#1769aa,#2aa7c9);color:white;padding:14px 18px;font-weight:800;box-shadow:0 12px 30px rgba(23,105,170,.3);cursor:pointer}.isa-panel{width:min(390px,calc(100vw - 24px));height:min(650px,82vh);background:#fff;border:1px solid #dfe6ee;border-radius:18px;box-shadow:0 18px 55px rgba(16,36,62,.24);display:flex;flex-direction:column;overflow:hidden;margin-bottom:10px}.isa-hidden{display:none!important}.isa-head{padding:15px 17px;background:#10243e;color:white;display:flex;justify-content:space-between;align-items:center}.isa-head button{background:none;border:0;color:white;font-size:24px;cursor:pointer}.isa-messages{padding:16px;overflow:auto;flex:1;background:#f5f8fa}.isa-msg{padding:11px 13px;border-radius:14px;margin:0 0 10px;line-height:1.45;white-space:pre-wrap}.isa-msg.assistant{background:#fff;border:1px solid #dfe6ee}.isa-msg.user{background:#1769aa;color:#fff;margin-left:35px}.isa-compose{display:flex;gap:8px;padding:12px;border-top:1px solid #dfe6ee}.isa-compose textarea{flex:1;resize:none;border:1px solid #cfd8e3;border-radius:10px;padding:10px;font:inherit}.isa-contact{padding:12px;border-top:1px solid #dfe6ee;background:#fbfdff}.isa-contact summary{cursor:pointer;font-weight:800;color:#1769aa}.isa-contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.isa-contact input{width:100%;padding:9px;border:1px solid #cfd8e3;border-radius:8px}.isa-contact .isa-send{width:100%;margin-top:8px}.isa-status{font-size:12px;color:#667085;margin:7px 0 0}@media(max-width:600px){.isa-chat{right:8px;bottom:8px}.isa-panel{height:86vh}.isa-contact-grid{grid-template-columns:1fr}}
.isa-followup{display:grid;gap:7px;margin:4px 0 12px}.isa-followup button{border:1px solid #9ccfe0;border-radius:9px;padding:10px;background:#fff;color:#1769aa;font-weight:800;cursor:pointer}.isa-followup button:nth-child(2){background:#1769aa;color:#fff}.isa-followup button:last-child{border-color:#dfe6ee;color:#667085}

/* Mobile viewport fix v3.9.1 */
@media (max-width: 600px) {
  .isa-welcome {
    box-sizing: border-box;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    align-items: center;
    justify-items: center;
    overflow: hidden;
  }
  .isa-welcome-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 440px;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 20px 20px 18px;
    border-radius: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .isa-welcome h2 { font-size: clamp(26px, 8vw, 34px); line-height: 1.08; margin-bottom: 14px; }
  .isa-welcome p, .isa-welcome li { font-size: 16px; line-height: 1.42; }
  .isa-welcome ul { padding-left: 24px; margin: 12px 0; }
  .isa-welcome button { width: 100%; margin-top: 4px; }
  .isa-chat { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .isa-launch { display: block; margin-left: auto; max-width: calc(100vw - 24px); }
  .isa-panel { width: 100%; max-width: none; height: min(72dvh, 620px); max-height: calc(100dvh - 90px); margin: 0 0 10px; }
}


/* ==========================================================
   Asistente especializado IA · floating responsive v2.1
   ========================================================== */
.isa-chat{
  position:fixed!important;
  right:18px!important;
  bottom:max(18px,env(safe-area-inset-bottom))!important;
  width:min(420px,calc(100vw - 28px));
  z-index:10050!important;
  pointer-events:none;
}
.isa-chat>*{pointer-events:auto}
.isa-launch{
  display:flex!important;
  align-items:center;
  justify-content:center;
  gap:9px;
  width:max-content;
  max-width:100%;
  min-width:235px;
  min-height:60px;
  margin-left:auto!important;
  padding:16px 23px!important;
  border-radius:999px!important;
  font-size:16px!important;
  line-height:1.15;
  letter-spacing:.01em;
  box-shadow:0 14px 34px rgba(16,36,62,.32)!important;
  white-space:normal;
  text-align:center;
}
.isa-launch::before{
  content:"✦";
  display:grid;
  place-items:center;
  flex:0 0 28px;
  width:28px;
  height:28px;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  font-size:17px;
}
.isa-launch:hover{transform:translateY(-2px)}
.isa-launch:focus-visible{outline:4px solid rgba(42,167,201,.32);outline-offset:3px}
.isa-panel{
  width:100%!important;
  height:min(690px,78dvh)!important;
  max-height:calc(100dvh - 92px)!important;
  margin:0 0 12px!important;
}
.isa-head{min-height:58px}
.isa-head strong{font-size:1rem}
.isa-compose textarea{min-height:48px;max-height:120px;font-size:16px}
.isa-compose button,.isa-send,.isa-followup button{min-height:48px}
.isa-material-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.isa-secondary{background:#eef5f7!important;color:#1769aa!important;border:1px solid #9ccfe0!important}

@media(max-width:680px){
  .isa-chat{
    left:12px!important;
    right:12px!important;
    bottom:max(12px,env(safe-area-inset-bottom))!important;
    width:auto!important;
  }
  .isa-launch{
    min-width:0;
    width:min(100%,290px)!important;
    min-height:58px;
    padding:15px 18px!important;
    font-size:15.5px!important;
  }
  .isa-panel{
    width:100%!important;
    height:min(74dvh,650px)!important;
    max-height:calc(100dvh - 86px)!important;
    border-radius:18px!important;
  }
  .isa-messages{padding:13px}
  .isa-msg{font-size:.96rem;line-height:1.43}
  .isa-compose{padding:10px}
  .isa-contact{max-height:42dvh;overflow:auto}
  .isa-contact-grid{grid-template-columns:1fr!important}
  .isa-material-actions{grid-template-columns:1fr!important}
}
@media(max-width:390px){
  .isa-chat{left:8px!important;right:8px!important}
  .isa-launch{width:min(100%,270px)!important;font-size:15px!important}
  .isa-panel{height:min(72dvh,610px)!important}
}


/* Platform Core v2.2 · mobile launcher adjustment
   Same existing button; smaller footprint, no second launcher. */
@media(max-width:680px){
  .isa-chat{
    left:auto!important;
    right:10px!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    width:min(390px,calc(100vw - 20px))!important;
  }
  .isa-launch{
    width:auto!important;
    min-width:0!important;
    max-width:205px!important;
    min-height:46px!important;
    padding:10px 13px!important;
    font-size:13.5px!important;
    line-height:1.12!important;
    gap:7px!important;
    border-radius:23px!important;
  }
  .isa-launch::before{
    flex-basis:22px!important;
    width:22px!important;
    height:22px!important;
    font-size:13px!important;
  }
  .isa-panel{
    width:100%!important;
    max-width:390px!important;
  }
}
@media(max-width:390px){
  .isa-chat{right:7px!important;width:calc(100vw - 14px)!important}
  .isa-launch{
    max-width:190px!important;
    min-height:44px!important;
    padding:9px 12px!important;
    font-size:13px!important;
  }
}

/* v2.5 · launcher must never block questionnaire controls */
.isa-chat{pointer-events:none!important}.isa-launch,.isa-panel{pointer-events:auto!important}
@media(max-width:780px){body:has(.question-panel.active) .isa-chat,body:has(#questionStep:not(.hidden)) .isa-chat{bottom:calc(82px + env(safe-area-inset-bottom))!important}}
