.fkc-root {
  --fkc-primary: #ff84e8;
  --fkc-primary-rgb: 255, 132, 232;
  --fkc-violet: #7f2ccb;
  --fkc-deep: #2a2d43;
  --fkc-bottom-offset: 96px;
  --fkc-text: #f8f8fb;
  --fkc-muted: rgba(248, 248, 251, 0.68);
  --fkc-border: rgba(255, 255, 255, 0.14);
  --fkc-glass: rgba(13, 13, 16, 0.72);
  --fkc-glass-strong: rgba(22, 22, 26, 0.82);
  position: fixed;
  z-index: 99999;
  right: 24px;
  bottom: var(--fkc-bottom-offset);
  color: var(--fkc-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: geometricPrecision;
}

.fkc-root[data-position="left"] {
  right: auto;
  left: 24px;
}

.fkc-root * {
  box-sizing: border-box;
}

.fkc-root button,
.fkc-root input {
  font: inherit;
}


.fkc-root .fkc-launcher-square,
.fkc-root .fkc-action,
.fkc-root .fkc-quick,
.fkc-root .fkc-send {
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  white-space: normal;
}

.fkc-root .fkc-quick span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fkc-launcher-square {
  position: relative;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 32px;
  background:
    radial-gradient(circle at 78% 18%, rgba(var(--fkc-primary-rgb), 0.15), transparent 42%),
    radial-gradient(circle at 18% 76%, rgba(127, 44, 203, 0.11), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.62),
    0 12px 28px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateZ(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.fkc-launcher-square::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 34%, rgba(var(--fkc-primary-rgb), 0.15));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  padding: 1px;
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.fkc-launcher-square:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(var(--fkc-primary-rgb), 0.64);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.68),
    0 14px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.fkc-launcher-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 13px;
  transition: opacity 420ms ease, transform 420ms ease;
}

.fkc-launcher-orb-face {
  animation: fkcLauncherOrb 5.8s ease-in-out infinite;
}

.fkc-launcher-text-face {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  animation: fkcLauncherText 5.8s ease-in-out infinite;
}

.fkc-launcher-text-face strong {
  max-width: 80px;
  display: block;
  color: #fff;
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-align: center;
}


@keyframes fkcLauncherOrb {
  0%, 41% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  49%, 91% { opacity: 0; transform: translateY(-8px) scale(0.94); filter: blur(5px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes fkcLauncherText {
  0%, 43% { opacity: 0; transform: translateY(10px) scale(0.96); filter: blur(5px); }
  52%, 88% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(10px) scale(0.96); filter: blur(5px); }
}

.fkc-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(440px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - var(--fkc-bottom-offset) - 24px));
  height: min(680px, calc(100vh - var(--fkc-bottom-offset) - 24px));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(12, 12, 15, 0.76);
  backdrop-filter: blur(30px) saturate(125%);
  -webkit-backdrop-filter: blur(30px) saturate(125%);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.72),
    0 12px 34px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-origin: bottom right;
  animation: fkcPanelIn 240ms ease both;
}

.fkc-root[data-position="left"] .fkc-panel {
  left: 0;
  right: auto;
  transform-origin: bottom left;
}

.fkc-root.is-open .fkc-launcher-square {
  display: none !important;
}

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

@keyframes fkcPanelIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.fkc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.fkc-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
}

.fkc-avatar,
.fkc-bubble-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(var(--fkc-primary-rgb), 0.68);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 0 16px rgba(var(--fkc-primary-rgb), 0.1), 0 8px 20px rgba(0,0,0,0.22);
}

.fkc-avatar {
  width: 58px;
  height: 58px;
}

.fkc-bubble-avatar {
  width: 34px;
  height: 34px;
  margin-top: 5px;
}

.fkc-avatar img,
.fkc-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fkc-title-wrap {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.fkc-title {
  color: #fff;
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.fkc-subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.fkc-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1;
}

.fkc-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22d66f;
  box-shadow: 0 0 12px rgba(34, 214, 111, 0.75);
}

.fkc-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.fkc-action {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.8);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.fkc-action svg {
  width: 18px;
  height: 18px;
  display: block;
}

.fkc-action:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.fkc-messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 20px 16px;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.fkc-messages::-webkit-scrollbar { width: 6px; height: 0; }
.fkc-messages::-webkit-scrollbar-track { background: transparent; }
.fkc-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 999px; }

.fkc-message-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  max-width: 100%;
}

.fkc-user {
  justify-content: flex-end;
}

.fkc-message {
  position: relative;
  flex: 0 1 auto;
  max-width: calc(100% - 44px);
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.52;
  font-weight: 400;
  white-space: pre-line;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


.fkc-user .fkc-message {
  max-width: 76%;
  border-color: rgba(var(--fkc-primary-rgb), 0.42);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(var(--fkc-primary-rgb), 0.48), rgba(81, 24, 58, 0.64));
  color: #fff;
}


.fkc-quick-buttons {
  flex: 0 0 calc(100% - 44px);
  max-width: calc(100% - 44px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 2px 0 4px 44px;
}

.fkc-quick {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid rgba(var(--fkc-primary-rgb), 0.78);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-transform: none !important;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.fkc-quick:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(var(--fkc-primary-rgb), 1);
  background: var(--fkc-primary);
  box-shadow: 0 10px 22px rgba(var(--fkc-primary-rgb), 0.22);
}

.fkc-quick span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fkc-form {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 10px;
  padding: 12px 18px 8px;
}

.fkc-input {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  outline: none;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.fkc-input::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

.fkc-input:focus {
  border-color: rgba(var(--fkc-primary-rgb), 0.8);
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 0 4px rgba(var(--fkc-primary-rgb), 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.fkc-send {
  width: 54px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 10%, rgba(255, 255, 255, 0.32), transparent 36%),
    linear-gradient(180deg, color-mix(in srgb, var(--fkc-primary), #fff 8%), color-mix(in srgb, var(--fkc-primary), #000 12%));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(var(--fkc-primary-rgb), 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 160ms ease, filter 160ms ease;
}

.fkc-send svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.fkc-send:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.fkc-send:disabled,
.fkc-input:disabled {
  opacity: 0.64;
  cursor: wait;
}

.fkc-footer {
  padding: 3px 18px 16px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.fkc-typing {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 68px;
  min-height: 34px;
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.fkc-typing i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--fkc-primary);
  box-shadow: 0 0 12px rgba(var(--fkc-primary-rgb), 0.6);
  animation: fkcTyping 1s ease-in-out infinite;
}

.fkc-typing i:nth-child(2) { animation-delay: 0.14s; }
.fkc-typing i:nth-child(3) { animation-delay: 0.28s; }

@keyframes fkcTyping {
  0%, 100% { opacity: 0.35; transform: translateY(0) scale(0.86); }
  50% { opacity: 1; transform: translateY(-4px) scale(1); }
}


.fkc-orb {
  --orb-size: 54px;
  --fkc-orb-pink: #ff84e8;
  --fkc-orb-violet: #7f2ccb;
  position: relative;
  width: var(--orb-size);
  height: var(--orb-size);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 50%;
  rotate: 90deg;
  cursor: inherit;
  filter:
    drop-shadow(0 0 calc(var(--orb-size) * 0.09) rgba(255, 132, 232, 0.42))
    drop-shadow(0 0 calc(var(--orb-size) * 0.09) rgba(127, 44, 203, 0.34));
  transition: all 0.3s ease;
  transform: translateZ(0);
}

.fkc-orb-core {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #060606;
  filter: blur(calc(var(--orb-size) * 0.13));
  transition: all 0.3s ease;
}

.fkc-orb-inner {
  position: absolute;
  left: -120%;
  top: -25%;
  width: 160%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--fkc-orb-pink);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: fkcOrbRotate 6s linear infinite;
  transition: all 0.3s ease;
}

.fkc-orb-inner:nth-child(2) {
  left: auto;
  right: -120%;
  top: auto;
  bottom: -25%;
  background: var(--fkc-orb-violet);
  animation-duration: 8s;
  clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);
}

.fkc-orb .fkc-orb-core {
  width: 104%;
  animation: fkcOrbHalfTurn 9s linear infinite;
}

.fkc-orb .fkc-orb-inner {
  width: 164%;
}

.fkc-bubble-avatar .fkc-orb { --orb-size: 27px; }
.fkc-launcher-square .fkc-orb { --orb-size: 64px; }

@keyframes fkcOrbRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fkcOrbHalfTurn {
  50% { transform: rotate(180deg); }
}


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

@media (max-width: 520px) {
  .fkc-root {
    right: 14px;
    bottom: max(18px, var(--fkc-bottom-offset));
  }

  .fkc-root[data-position="left"] {
    left: 14px;
    right: auto;
  }

  .fkc-launcher-square {
    width: 88px;
    height: 88px;
    border-radius: 26px;
  }

  .fkc-launcher-square .fkc-orb { --orb-size: 52px; }

  .fkc-panel {
    width: calc(100vw - 28px);
    height: min(660px, calc(100vh - var(--fkc-bottom-offset) - 20px));
    border-radius: 24px;
  }

  .fkc-header {
    padding: 18px 16px 14px;
  }

  .fkc-avatar {
    width: 50px;
    height: 50px;
  }

  .fkc-title {
    font-size: 18px;
  }

  .fkc-actions {
    gap: 6px;
  }

  .fkc-action {
    width: 36px;
    height: 36px;
  }

  .fkc-messages {
    padding: 14px 14px 12px;
  }

  .fkc-message {
    max-width: 82%;
    font-size: 13px;
  }

  .fkc-quick-buttons {
    flex-basis: calc(100% - 44px);
    max-width: calc(100% - 44px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 44px;
  }
}

@supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
  .fkc-panel,
  .fkc-launcher-square {
    background: rgba(15, 15, 18, 0.96);
  }
}
