#fc-ask-leo {
  --leo-pink: #ed3478;
  --leo-ink: #19161a;
  --leo-paper: #fffafb;
  --leo-muted: #6e646a;
  --leo-line: rgba(25, 22, 26, 0.15);
  position: fixed;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  z-index: 1000200;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fc-leo-launcher {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--leo-pink);
  box-shadow: 0 14px 36px rgba(92, 18, 50, 0.28);
  font: inherit;
  font-size: 17px;
  font-weight: 750;
  cursor: pointer;
}

.fc-leo-launcher span {
  width: 25px;
  height: 20px;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: #fff;
  font-size: 0;
}

.fc-leo-launcher span::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 14px 0 0 1px;
  background: #fff;
  transform: rotate(36deg);
}

.fc-leo-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(430px, calc(100vw - 28px));
  max-height: min(720px, calc(100svh - 110px));
  overflow: hidden;
  border: 1px solid var(--leo-line);
  border-radius: 26px;
  color: var(--leo-ink);
  background: var(--leo-paper);
  box-shadow: 0 24px 80px rgba(20, 10, 16, 0.28);
}

.fc-leo-panel[hidden] { display: none !important; }

.fc-leo-panel > header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 112px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--leo-line);
  background: #fff;
  color: var(--leo-ink);
}

.fc-leo-brand {
  grid-column: 2;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.fc-leo-brand > img {
  display: block;
  width: 128px;
  height: 92px;
  flex: 0 0 128px;
  object-fit: contain;
  object-position: center;
}

.fc-leo-brand-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.fc-leo-panel header small {
  display: block;
  margin-bottom: 3px;
  color: #f58db4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.fc-leo-panel h2 {
  margin: 0;
  color: var(--leo-ink);
  font-size: 25px;
  font-weight: 650;
  line-height: 1.1;
}

.fc-leo-close {
  grid-column: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(25, 22, 26, 0.22);
  border-radius: 50%;
  color: var(--leo-ink);
  background: #f6f1f3;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}

.fc-leo-close:hover,
.fc-leo-close:focus-visible {
  border-color: rgba(163, 33, 82, 0.46);
  color: #8c2049;
  background: #f8e9ef;
}

.fc-leo-messages {
  max-height: min(350px, 42svh);
  overflow: auto;
  padding: 18px;
}

.fc-leo-message {
  width: fit-content;
  max-width: 92%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.48;
}

.fc-leo-answer {
  border-bottom-left-radius: 5px;
  background: #eee7ea;
}

.fc-leo-question {
  margin-left: auto;
  border-bottom-right-radius: 5px;
  color: #fff;
  background: #ad285b;
}

.fc-leo-message a {
  color: #9d194c;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fc-leo-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 18px 14px;
  scrollbar-width: none;
}

.fc-leo-suggestions button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #d7bec8;
  border-radius: 999px;
  color: #7e2448;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.fc-leo-form {
  padding: 0 18px;
}

.fc-leo-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.fc-leo-form > div {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
}

.fc-leo-form input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #cfc2c7;
  border-radius: 14px;
  color: var(--leo-ink);
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.fc-leo-form button {
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--leo-pink);
  font-size: 23px;
  cursor: pointer;
}

.fc-leo-note {
  margin: 11px 18px 17px;
  color: var(--leo-muted);
  font-size: 11px;
  line-height: 1.35;
}

html.fc-v89-gateway-active #fc-ask-leo {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 600px) {
  #fc-ask-leo {
    right: 14px;
    bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  }

  .fc-leo-launcher {
    min-height: 54px;
    padding: 12px 20px;
    font-size: 16px;
  }

  .fc-leo-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(78px, calc(env(safe-area-inset-bottom, 0px) + 70px));
    width: auto;
    max-height: calc(100svh - 108px);
    border-radius: 22px;
  }

  .fc-leo-messages {
    max-height: 39svh;
  }

  .fc-leo-panel > header {
    min-height: 104px;
    padding: 8px 16px;
  }

  .fc-leo-brand {
    justify-content: center;
  }

  .fc-leo-brand > img {
    width: 122px;
    height: 86px;
    flex-basis: 122px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #fc-ask-leo * { scroll-behavior: auto !important; }
}
