/* STEP54B — Launcher visibile IA DoriSan */

.d54b-launcher{
  position:fixed;
  right:22px;
  bottom:24px;
  z-index:2147483000;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid rgba(244,199,120,.68);
  background:
    radial-gradient(circle at 0% 0%, rgba(255,48,79,.45), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(89,183,255,.42), transparent 42%),
    linear-gradient(135deg, rgba(2,5,10,.98), rgba(7,22,46,.96));
  color:#fff;
  border-radius:999px;
  padding:13px 18px 13px 13px;
  cursor:pointer;
  box-shadow:
    0 20px 56px rgba(0,0,0,.58),
    0 0 28px rgba(89,183,255,.22),
    0 0 18px rgba(255,48,79,.14);
  font-family:Arial,Helvetica,sans-serif;
  font-weight:950;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.d54b-launcher:hover{
  transform:translateY(-2px);
  box-shadow:
    0 24px 64px rgba(0,0,0,.62),
    0 0 36px rgba(89,183,255,.28),
    0 0 26px rgba(255,48,79,.18);
}

.d54b-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:
    linear-gradient(135deg, rgba(255,48,79,.92), rgba(89,183,255,.88));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22), 0 0 18px rgba(89,183,255,.22);
  color:#fff;
  font-size:1.22rem;
}

.d54b-label{
  display:grid;
  line-height:1.08;
}

.d54b-label strong{
  font-size:.92rem;
}

.d54b-label span{
  color:#f4c778;
  font-size:.62rem;
  letter-spacing:.12em;
}

.d54b-panel{
  position:fixed;
  right:22px;
  bottom:94px;
  z-index:2147483001;
  width:min(470px,calc(100vw - 28px));
  max-height:min(720px,calc(100vh - 118px));
  display:none;
  overflow:hidden;
  border-radius:28px;
  border:1px solid rgba(89,183,255,.38);
  background:
    radial-gradient(circle at 0% 0%, rgba(255,48,79,.16), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(89,183,255,.20), transparent 36%),
    rgba(2,5,10,.98);
  box-shadow:0 28px 84px rgba(0,0,0,.72), 0 0 32px rgba(89,183,255,.15);
  font-family:Arial,Helvetica,sans-serif;
}

.d54b-panel.open{
  display:grid;
  grid-template-rows:auto 1fr auto auto;
}

.d54b-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px 15px;
  border-bottom:1px solid rgba(89,183,255,.20);
}

.d54b-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.d54b-mark{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(135deg, rgba(255,48,79,.90), rgba(89,183,255,.90));
  color:#fff;
  font-weight:950;
  box-shadow:0 0 20px rgba(89,183,255,.16);
}

.d54b-title{
  display:grid;
  line-height:1.08;
}

.d54b-title strong{
  color:#fff;
  font-size:1.05rem;
}

.d54b-title span{
  color:#f4c778;
  font-size:.70rem;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.d54b-close{
  width:36px;
  height:36px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:50%;
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  font-weight:950;
}

.d54b-chat{
  padding:16px;
  display:grid;
  gap:12px;
  align-content:start;
  overflow:auto;
  max-height:430px;
}

.d54b-msg{
  border-radius:18px;
  padding:13px 14px;
  line-height:1.48;
  font-weight:760;
  color:#eaf6ff;
}

.d54b-msg.bot{
  border:1px solid rgba(89,183,255,.23);
  background:rgba(89,183,255,.085);
}

.d54b-msg.user{
  justify-self:end;
  max-width:86%;
  border:1px solid rgba(255,48,79,.28);
  background:rgba(255,48,79,.13);
  color:#fff;
}

.d54b-msg-title{
  color:#f4c778;
  font-weight:950;
  margin-bottom:4px;
}

.d54b-msg a{
  color:#59b7ff;
  font-weight:950;
}

.d54b-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 16px 14px;
}

.d54b-chip{
  border:1px solid rgba(89,183,255,.28);
  background:rgba(0,0,0,.28);
  color:#f7f9ff;
  border-radius:999px;
  padding:8px 10px;
  font-weight:900;
  cursor:pointer;
}

.d54b-chip:hover{
  border-color:rgba(244,199,120,.60);
  color:#fff0c8;
}

.d54b-inputrow{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:8px;
  padding:15px 16px 16px;
  border-top:1px solid rgba(89,183,255,.18);
}

.d54b-input{
  min-width:0;
  border-radius:999px;
  border:1px solid rgba(89,183,255,.30);
  background:rgba(0,0,0,.34);
  color:#fff;
  padding:12px 14px;
  outline:none;
  font-weight:850;
}

.d54b-btn{
  border:0;
  border-radius:999px;
  padding:12px 14px;
  cursor:pointer;
  font-weight:950;
  color:#07111f;
  background:linear-gradient(135deg,#59b7ff,#f4c778);
}

.d54b-voice{
  background:linear-gradient(135deg,#ff304f,#59b7ff);
  color:white;
}

.d54b-top-cta{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border-radius:999px;
  border:1px solid rgba(244,199,120,.48);
  background:linear-gradient(135deg, rgba(255,48,79,.20), rgba(89,183,255,.20));
  color:#fff;
  padding:10px 14px;
  font-weight:950;
  cursor:pointer;
  margin-top:16px;
}

@media(max-width:720px){
  .d54b-launcher{
    right:14px;
    bottom:14px;
    padding:11px 14px 11px 11px;
  }

  .d54b-icon{
    width:38px;
    height:38px;
  }

  .d54b-label strong{
    font-size:.80rem;
  }

  .d54b-panel{
    right:10px;
    bottom:76px;
    width:calc(100vw - 20px);
    max-height:calc(100vh - 92px);
  }

  .d54b-inputrow{
    grid-template-columns:1fr;
  }

  .d54b-btn{
    width:100%;
  }
}
