.tfb-bubli {
  --bubli-plum: #4b237c;
  --bubli-violet: #9065c8;
  --bubli-paper: #faf7ff;
  --bubli-ink: #271536;
  position: fixed;
  inset: auto 16px calc(80px + env(safe-area-inset-bottom)) auto;
  z-index: 10000;
  color: var(--bubli-ink);
  font: 400 15px/1.5 Inter, system-ui, sans-serif;
}
body:has(.tfb-bubli .bubli-launch) .qlwapp__container--bottom-right:has(.qlwapp__button--bubble) {
  display: none !important;
}
.tfb-bubli *, .tfb-bubli *::before, .tfb-bubli *::after { box-sizing: border-box; }
.tfb-bubli button, .tfb-bubli input { font: inherit; }
.tfb-bubli button { cursor: pointer; }
.tfb-bubli :focus-visible { outline: 3px solid #a56eea; outline-offset: 2px; }
.tfb-bubli [hidden] { display: none !important; }
.tfb-bubli .bubli-launch {
  display: grid; place-items: center;
  width: 60px; height: 60px; min-height: 60px; padding: 0;
  border: 1px solid #ddcdee; border-radius: 50%;
  background: #faf7ff;
  color: var(--bubli-plum); font-weight: 700;
  box-shadow: 0 4px 14px #2c10482b;
}
.tfb-bubli .bubli-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: #ead8ff; color: var(--bubli-plum);
  font-size: 22px; line-height: 1; font-weight: 800;
}
.tfb-bubli .bubli-mascot {
  width: 53px;
  height: 53px;
  max-width: none;
  object-fit: contain;
  transition: transform 180ms ease;
}
.tfb-bubli .bubli-launch:is(:hover, :focus-visible) .bubli-mascot { transform: translateY(-3px); }
.tfb-bubli header .bubli-mascot { width: 44px; height: 44px; flex-shrink: 0; margin-inline-end: 5px; }
@media (prefers-reduced-motion: no-preference) {
  .tfb-bubli.bubli-visitor-typing .bubli-mascot {
    animation: bubli-listening 680ms ease-in-out infinite;
  }
}
@keyframes bubli-listening {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-4px) rotate(-5deg); }
  70% { transform: translateY(-1px) rotate(3deg); }
}
.tfb-bubli .bubli-panel {
  position: absolute; right: 0; bottom: 72px;
  width: min(370px, calc(100vw - 32px)); height: min(550px, calc(100dvh - 172px - env(safe-area-inset-bottom)));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #d9c8ed; border-radius: 20px; background: var(--bubli-paper);
  box-shadow: 0 16px 55px #24103842;
}
.tfb-bubli header {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px 10px 17px; background: var(--bubli-plum); color: white;
}
.tfb-bubli header div { margin-inline-end: auto; }
.tfb-bubli header strong { display: block; font: 800 26px/1.1 "Plus Jakarta Sans", Inter, system-ui, sans-serif; }
.tfb-bubli header small { color: #f3e7ff; font-size: 11px; }
.tfb-bubli header button { background: transparent; color: #fff; border: 0; min-width: 44px; min-height: 44px; }
.tfb-bubli .bubli-close { font-size: 24px; }
.tfb-bubli .bubli-reset { font-size: 13px; }
.tfb-bubli .bubli-log { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 14px; }
.tfb-bubli .bubli-message {
  margin: 0 0 10px; padding: 10px 12px; max-width: 94%;
  white-space: pre-wrap; overflow-wrap: anywhere; background: #fff;
  border: 1px solid #e7dcf1; border-radius: 4px 12px 12px; color: var(--bubli-ink);
}
.tfb-bubli .bubli-user { margin-left: auto; background: #efe1ff; border-radius: 12px 4px 12px 12px; }
.tfb-bubli .bubli-choices { display: grid; gap: 6px; }
.tfb-bubli .bubli-choices :is(button, a) {
  min-height: 44px; padding: 7px 11px; display: flex; align-items: center;
  border: 1px solid #d7bce9; border-radius: 9px; background: #fff;
  color: var(--bubli-plum); text-align: start; text-decoration: none; font-weight: 650;
}
.tfb-bubli .bubli-choices :is(button, a):hover { background: #efe1ff; }
.tfb-bubli .bubli-form { display: flex; gap: 6px; padding: 8px 10px; margin: 0; border-top: 1px solid #e2d3ef; }
.tfb-bubli .bubli-form input {
  flex: 1; min-width: 0; min-height: 44px; margin: 0; padding: 6px 9px;
  border: 1px solid #c9addf; border-radius: 8px; background: #fff; color: var(--bubli-ink); font-size: 16px;
}
.tfb-bubli .bubli-form button { border: 0; border-radius: 8px; padding: 0 11px; color: #fff; background: var(--bubli-plum); font-weight: 700; }
.tfb-bubli footer { padding: 1px 12px 8px; font-size: 12px; color: #5b4b68; }
.tfb-bubli footer a { color: var(--bubli-plum); text-decoration: underline; }
.tfb-bubli .bubli-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 767px) {
  .tfb-bubli .bubli-panel {
    height: min(510px, calc(100dvh - 172px - env(safe-area-inset-bottom)));
  }
}
