.aisa {
  --aisa-base-bottom: 24px;
  --aisa-bottom: var(--aisa-base-bottom);
  --aisa-base-right: 24px;
  --aisa-right: var(--aisa-base-right);
  /* Розміри приходять з налаштувань в атрибуті style кореневого блока.
     Окремі імена для десктопа й мобільного дають медіа-запиту нижче обрати потрібний,
     чого не сталося б, якби PHP підставляв --aisa-launcher-size напряму. */
  --aisa-launcher-size: var(--aisa-launcher-size-desktop, 68px);
  --aisa-accent: #584dd3;
  --aisa-accent-hover: #4c41bf;
  --aisa-accent-soft: #f0efff;
  --aisa-text: #17171a;
  --aisa-muted: #77777f;
  --aisa-line: #e8e8ec;
  --aisa-surface: #ffffff;
  --aisa-canvas: #fafafd;
  position: fixed;
  right: var(--aisa-right);
  bottom: var(--aisa-bottom);
  z-index: 999999;
  transition: bottom .2s ease, right .2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.aisa * { box-sizing: border-box; }

/* Launcher */
.aisa-launcher {
  position: relative;
  width: var(--aisa-launcher-size);
  height: var(--aisa-launcher-size);
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ececf0;
  color: var(--aisa-text);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0,0,0,.24), 0 2px 8px rgba(0,0,0,.12);
  overflow: visible;
  transform: translateZ(0);
  transition: transform .18s ease, box-shadow .18s ease, opacity .15s ease, visibility .15s ease;
}
.aisa-launcher:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 16px 38px rgba(0,0,0,.27), 0 3px 10px rgba(0,0,0,.12);
}
.aisa-launcher:active { transform: scale(.98); }
.aisa-launcher:focus-visible { outline: 3px solid rgba(88,77,211,.28); outline-offset: 3px; }
.aisa-launcher__avatar {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #19191d center/cover no-repeat;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  overflow: hidden;
}
.aisa-online-dot {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #28a745;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
/* Поки чат згорнутий, крапка «дихає»: інакше аватар виглядає як просте фото.
   Пульс зроблено через box-shadow, а не окремий елемент — він малюється
   назовні від білої рамки й не втручається в порядок накладання. */
.aisa:not(.aisa--open) .aisa-online-dot {
  animation: aisa-online-pulse 2.6s cubic-bezier(.25, 0, .35, 1) infinite;
}
@keyframes aisa-online-pulse {
  0% {
    box-shadow: 0 1px 4px rgba(0,0,0,.18), 0 0 0 0 rgba(40,167,69,.55);
  }
  62% {
    box-shadow: 0 1px 4px rgba(0,0,0,.18), 0 0 0 10px rgba(40,167,69,0);
  }
  100% {
    box-shadow: 0 1px 4px rgba(0,0,0,.18), 0 0 0 0 rgba(40,167,69,0);
  }
}
.aisa--open .aisa-launcher {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(.92);
}

.aisa-unread {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: 10px;
  line-height: 17px;
  font-weight: 750;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
.aisa-unread[hidden] { display: none !important; }

/* Проактивна підказка біля аватара */
.aisa-teaser {
  position: absolute;
  right: 0;
  bottom: calc(var(--aisa-launcher-size) + 14px);
  width: min(292px, calc(100vw - 40px));
  display: flex;
  align-items: flex-start;
  padding: 0;
  border-radius: 16px;
  background: var(--aisa-surface);
  border: 1px solid rgba(20,20,24,.08);
  box-shadow: 0 16px 44px rgba(0,0,0,.20), 0 3px 12px rgba(0,0,0,.10);
  animation: aisa-teaser-in .34s cubic-bezier(.2,.8,.25,1);
}
.aisa-teaser[hidden] { display: none !important; }
@keyframes aisa-teaser-in {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* хвостик у бік аватара */
.aisa-teaser::after {
  content: '';
  position: absolute;
  right: 24px;
  bottom: -7px;
  width: 13px;
  height: 13px;
  background: var(--aisa-surface);
  border-right: 1px solid rgba(20,20,24,.08);
  border-bottom: 1px solid rgba(20,20,24,.08);
  transform: rotate(45deg);
}
.aisa-teaser__open {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 13px 30px 13px 13px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--aisa-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.aisa-teaser__open:hover { background: #fafafd; }
.aisa-teaser__open:focus-visible { outline: 2px solid rgba(88,77,211,.3); outline-offset: -2px; }
.aisa-avatar--teaser { width: 34px; height: 34px; font-size: 12px; flex: 0 0 auto; }
.aisa-teaser__text { display: block; min-width: 0; }
.aisa-teaser__name {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2px;
}
.aisa-teaser__message {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.42;
  color: #3f3f47;
}
.aisa-teaser__close {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--aisa-muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.aisa-teaser__close:hover { background: #f1f1f4; color: var(--aisa-text); }
.aisa--open .aisa-teaser { display: none !important; }

/* Main panel */
.aisa-panel {
  color: var(--aisa-text);
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(400px, calc(100vw - 32px));
  height: auto;
  max-height: min(640px, calc(100vh - 40px));
  background: var(--aisa-surface);
  border: 1px solid rgba(20,20,24,.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0,0,0,.28), 0 6px 22px rgba(0,0,0,.12);
  transform-origin: right bottom;
}
.aisa-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  animation: aisa-panel-in .2s cubic-bezier(.2,.75,.25,1);
}
@keyframes aisa-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.aisa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 11px 10px 14px;
  border-bottom: 1px solid var(--aisa-line);
  background: rgba(255,255,255,.98);
}
.aisa-person {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}
.aisa-person__text {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: start;
  column-gap: 7px;
  min-width: 0;
}
.aisa-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #19191d center/cover no-repeat;
  color: #fff;
  font-weight: 700;
  overflow: hidden;
}
.aisa-avatar--header {
  width: 46px;
  height: 46px;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.aisa-avatar--message { width: 28px; height: 28px; margin-top: 2px; font-size: 10px; }
.aisa-avatar--tiny { width: 28px; height: 28px; font-size: 9px; }
.aisa-title {
  grid-column: 1 / -1;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #151518;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: -.01em;
}
.aisa-role {
  display: block;
  margin-top: 2px;
  color: var(--aisa-muted);
  font-size: 11.5px;
  line-height: 1.25;
  white-space: nowrap;
}
.aisa-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: #5f6067;
  font-size: 11.5px;
  line-height: 1.25;
  white-space: nowrap;
}
.aisa-status::before { content: none; }
.aisa-status__dot { width: 6px; height: 6px; border-radius: 50%; background: #28a745; }
.aisa-header__actions { display: flex; align-items: center; gap: 2px; }
.aisa-menu-wrap { position: relative; }
.aisa-menu-button,
.aisa-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2d2d31;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.aisa-menu-button { font-size: 23px; line-height: 1; padding-bottom: 2px; }
.aisa-close { font-size: 25px; line-height: 1; font-weight: 300; }
.aisa-menu-button:hover,
.aisa-close:hover { background: #f1f1f4; }
.aisa-menu-button:active,
.aisa-close:active { transform: scale(.94); }
.aisa-menu-button:focus-visible,
.aisa-close:focus-visible { outline: 2px solid rgba(88,77,211,.25); outline-offset: 1px; }
.aisa-menu {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 4;
  width: 194px;
  padding: 6px;
  border: 1px solid #e7e7eb;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(0,0,0,.17);
}
.aisa-menu[hidden] { display: none !important; }
.aisa-menu button {
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #242429;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.aisa-menu button:hover { background: #f5f5f7; }

/* Conversation */
.aisa-messages {
  flex: 0 1 auto;
  min-height: 220px;
  max-height: min(454px, calc(100vh - 205px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 17px 14px 10px;
  background: var(--aisa-canvas);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #d0d0d7 transparent;
}
.aisa-messages::-webkit-scrollbar { width: 6px; }
.aisa-messages::-webkit-scrollbar-track { background: transparent; }
.aisa-messages::-webkit-scrollbar-thumb { background: #d0d0d7; border-radius: 999px; }
.aisa-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0 0 12px;
  animation: aisa-message-in .18s ease-out both;
}
@keyframes aisa-message-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.aisa-row--user { justify-content: flex-end; }
.aisa-row--assistant + .aisa-row--assistant { margin-top: -5px; }
.aisa-row--assistant + .aisa-row--assistant .aisa-avatar--message { visibility: hidden; }
.aisa-message-stack { display: flex; flex-direction: column; max-width: 83%; }
.aisa-row--user .aisa-message-stack { align-items: flex-end; }
.aisa-message {
  width: fit-content;
  max-width: 100%;
  padding: 10px 13px;
  border-radius: 17px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: -.003em;
  box-shadow: none;
}
.aisa-message--assistant {
  color: #1e1e22;
  background: #fff;
  border: 1px solid rgba(26,26,32,.065);
  border-top-left-radius: 6px;
}
.aisa-message--user {
  color: #fff;
  background: var(--aisa-accent);
  border: 1px solid rgba(65,53,183,.12);
  border-top-right-radius: 6px;
  box-shadow: 0 1px 4px rgba(88,77,211,.12);
}
.aisa-message-time {
  margin: 3px 6px 0;
  color: #aaaab2;
  font-size: 9px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.aisa-message a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.aisa-message--user a { color: #fff; }


/* First-open quick replies */
.aisa-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -2px 0 14px 35px;
  animation: aisa-message-in .18s ease-out both;
}
.aisa-quick-reply {
  appearance: none;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(88,77,211,.22);
  border-radius: 999px;
  background: #fff;
  color: #4f45c6;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  line-height: 1.25;
  /* Підписи задає адміністратор, тому довгий текст переносимо, а не обрізаємо. */
  white-space: normal;
  max-width: 100%;
  text-align: left;
  box-shadow: 0 1px 2px rgba(18,18,22,.025);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.aisa-quick-reply:hover {
  background: var(--aisa-accent-soft);
  border-color: rgba(88,77,211,.34);
  color: var(--aisa-accent-hover);
  transform: translateY(-1px);
}
.aisa-quick-reply:active { transform: scale(.98); }
.aisa-quick-reply:focus-visible { outline: 2px solid rgba(88,77,211,.25); outline-offset: 2px; }

/* Typing */
.aisa-typing {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 14px 12px;
  background: var(--aisa-canvas);
}
.aisa-typing[hidden] { display: none !important; }
.aisa-typing__bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(26,26,32,.065);
  border-radius: 16px 16px 16px 6px;
  background: #fff;
  box-shadow: none;
}
.aisa-typing__bubble > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9898a1;
  animation: aisa-dot 1.05s infinite ease-in-out;
}
.aisa-typing__bubble > span:nth-child(2) { animation-delay: .13s; }
.aisa-typing__bubble > span:nth-child(3) { animation-delay: .26s; }
@keyframes aisa-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* Постійна кнопка заявки */
.aisa-callcta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 11px 2px;
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-radius: 13px;
  background: var(--aisa-accent);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(88,77,211,.26);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.aisa-callcta[hidden] { display: none !important; }
.aisa-callcta:hover { background: var(--aisa-accent-hover); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(88,77,211,.3); }
.aisa-callcta:active { transform: scale(.99); }
.aisa-callcta:focus-visible { outline: 2px solid rgba(88,77,211,.4); outline-offset: 2px; }
.aisa-callcta__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.aisa-callcta__icon svg { width: 13px; height: 13px; display: block; }
.aisa-callcta__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Composer */
.aisa-compose {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 10px 11px 11px;
  padding: 5px 5px 5px 13px;
  border: 1px solid #dedee4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(18,18,22,.035);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.aisa-compose:focus-within {
  border-color: rgba(88,77,211,.52);
  box-shadow: 0 0 0 3px rgba(88,77,211,.08), 0 2px 8px rgba(18,18,22,.035);
}
.aisa-compose textarea {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 108px;
  padding: 10px 0 8px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1d1d21;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  scrollbar-width: none;
}
.aisa-compose textarea::-webkit-scrollbar { display: none; }
.aisa-compose textarea::placeholder { color: #9a9aa2; opacity: 1; }
.aisa-compose button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--aisa-accent);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
.aisa-compose button:hover:not(:disabled) { background: var(--aisa-accent-hover); transform: translateY(-1px); }
.aisa-compose button:active:not(:disabled) { transform: scale(.96); }
.aisa-compose button svg { width: 17px; height: 17px; display: block; transform: translate(-1px, 1px); }
.aisa-compose.is-busy button,
.aisa-compose button:disabled {
  background: #d5d5da;
  color: #fff;
  opacity: 1;
  cursor: default;
  transform: none;
}

/* Lead card */
.aisa-lead {
  margin: 14px 0 15px 35px;
  padding: 15px;
  background: #fff;
  border: 1px solid #e3e3e8;
  border-radius: 17px;
  box-shadow: 0 6px 18px rgba(18,18,22,.045);
}
.aisa-lead__title {
  color: #17171a;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 11px;
}
.aisa-lead form { display: grid; gap: 9px; }
.aisa-lead input[name="name"],
.aisa-lead input[name="phone"] {
  width: 100%;
  min-height: 42px;
  color: #17171a;
  background: #fafafd;
  padding: 10px 11px;
  border: 1px solid #dedee5;
  border-radius: 11px;
  outline: 0;
  font: inherit;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.aisa-lead input[name="name"]:focus,
.aisa-lead input[name="phone"]:focus {
  border-color: rgba(88,77,211,.55);
  box-shadow: 0 0 0 3px rgba(88,77,211,.08);
}
.aisa-lead button[type="submit"] {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  padding: 11px 13px;
  background: var(--aisa-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  transition: background .15s ease, transform .15s ease;
}
.aisa-lead button[type="submit"]:hover:not(:disabled) { background: var(--aisa-accent-hover); transform: translateY(-1px); }
.aisa-lead button[type="submit"]:disabled { opacity: .58; cursor: default; transform: none; }
.aisa-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #707078;
  font-size: 10.5px;
  line-height: 1.35;
  cursor: pointer;
}
.aisa-consent input { margin: 1px 0 0; accent-color: var(--aisa-accent); }
.aisa-lead__error { color: #b42318; font-size: 12px; line-height: 1.35; }
.aisa-lead__success {
  position: relative;
  padding-left: 27px;
  color: #232329;
  font-size: 13.5px;
  line-height: 1.45;
}
.aisa-lead__success::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eaf7ee;
  color: #21883d;
  font-size: 12px;
  font-weight: 800;
}
.aisa-contact-confirm {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #e4e4e9;
  border-radius: 11px;
  background: #f8f8fb;
  color: #17171a;
}
.aisa-contact-confirm strong { font-size: 13.5px; }
.aisa-contact-confirm span { color: #63636b; font-size: 12.5px; }
.aisa-contact-known {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #e4e4e9;
  border-radius: 11px;
  background: #f8f8fb;
}
.aisa-contact-known__label {
  color: var(--aisa-muted);
  font-size: 11.5px;
  flex: 0 0 auto;
}
.aisa-contact-known strong {
  color: var(--aisa-text);
  font-size: 13.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aisa-contact-known .aisa-link-button { margin-left: auto; flex: 0 0 auto; }

.aisa-link-button {
  justify-self: start;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--aisa-accent) !important;
  font-size: 11.5px !important;
  text-decoration: none;
  cursor: pointer;
}
.aisa-link-button:hover { text-decoration: underline; }

/* Retry/fallback */
.aisa-retry {
  max-width: 82%;
  padding: 11px 12px;
  border: 1px solid #e7e7eb;
  border-radius: 16px 16px 16px 6px;
  background: #fff;
  color: #33333a;
  font-size: 13px;
  line-height: 1.4;
}
.aisa-retry button {
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid #d9d9df;
  border-radius: 9px;
  background: #fff;
  color: var(--aisa-accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .aisa *, .aisa *::before, .aisa *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 480px) {
  .aisa {
    --aisa-base-bottom: 14px;
    --aisa-base-right: 14px;
    --aisa-launcher-size: var(--aisa-launcher-size-mobile, 64px);
    right: var(--aisa-right);
    bottom: var(--aisa-bottom);
  }
  .aisa-panel {
    position: fixed;
    inset: max(7px, env(safe-area-inset-top)) max(7px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 18px;
  }
  .aisa-header { min-height: 70px; padding-left: 12px; }
  .aisa-avatar--header { width: 42px; height: 42px; }
  .aisa-messages {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding: 15px 12px 9px;
  }
  .aisa-message-stack { max-width: 86%; }
  .aisa-quick-replies { margin-left: 34px; margin-right: 4px; gap: 6px; }
  .aisa-quick-reply { font-size: 11px; padding-inline: 10px; }
  .aisa-compose {
    margin: 9px 9px max(9px, env(safe-area-inset-bottom));
  }
  .aisa-callcta { margin: 0 9px; min-height: 44px; }
  .aisa-lead { margin-left: 34px; }
  .aisa-teaser {
    width: calc(100vw - 28px);
    bottom: calc(var(--aisa-launcher-size) + 12px);
  }
  .aisa-teaser::after { right: 22px; }
}
