.asa-chat-root { position: relative; z-index: 120; }
.asa-chat-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(22px, calc(18px + env(safe-area-inset-bottom)));
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(180deg, #2a6bff 0%, #1648d8 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(22, 72, 216, .42);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 121;
}
.asa-chat-fab svg { width: 26px; height: 26px; }
.asa-chat-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 32, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 122;
}
.asa-chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: #0e1621;
  color: #fff;
  transform: translateX(104%);
  transition: transform .24s ease;
  z-index: 123;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: -18px 0 50px rgba(0,0,0,.28);
}
.asa-chat-root.open .asa-chat-scrim {
  opacity: 1;
  pointer-events: auto;
}
.asa-chat-root.open .asa-chat-panel { transform: translateX(0); }
.asa-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  background: #17212b;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.asa-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3d7eff, #1a4fd6);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.asa-chat-meta { min-width: 0; flex: 1; }
.asa-chat-meta b { display: block; font-size: 15px; }
.asa-chat-meta span { display: block; font-size: 12px; color: #8b9bb0; margin-top: 2px; }
.asa-chat-x {
  border: 0;
  background: transparent;
  color: #9aa8b8;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
}
.asa-chat-msgs {
  overflow: auto;
  padding: 16px 12px 18px;
  background:
    radial-gradient(circle at 20% 10%, rgba(60, 90, 130, .18), transparent 40%),
    #0e1621;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.asa-chat-row { display: flex; width: 100%; }
.asa-chat-row.me { justify-content: flex-end; }
.asa-chat-row.them { justify-content: flex-start; }
.asa-chat-bubble {
  max-width: min(78%, 320px);
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.asa-chat-row.them .asa-chat-bubble {
  background: #182533;
  border-bottom-left-radius: 4px;
}
.asa-chat-row.me .asa-chat-bubble {
  background: #2b5278;
  border-bottom-right-radius: 4px;
}
.asa-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  background: #17212b;
  border-top: 1px solid rgba(255,255,255,.06);
}
.asa-chat-input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 18px;
  background: #242f3d;
  color: #fff;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  outline: none;
}
.asa-chat-input::placeholder { color: #8090a3; }
.asa-chat-send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #2aabee;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.asa-chat-send svg { width: 20px; height: 20px; }
.asa-chat-send:disabled { opacity: .55; cursor: wait; }

@media (max-width: 979px) {
  .asa-chat-fab { display: none !important; }
  .asa-chat-panel {
    width: 100%;
    top: auto;
    bottom: 0;
    height: min(78vh, 640px);
    border-radius: 18px 18px 0 0;
    transform: translateY(110%);
  }
  .asa-chat-root.open .asa-chat-panel { transform: translateY(0); }
}
@media (min-width: 980px) {
  body.is-pc .asa-chat-fab { display: inline-flex; }
  body.is-pc.asa-chat-open .asa-chat-fab { display: none; }
}