body .ai-chat-btn {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.15rem;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(17,17,17,0.94);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

body .ai-chat-btn:hover {
  background: rgba(30,30,30,0.98);
  transform: translateY(-1px);
}

body .ai-chat-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #b0eb22;
  box-shadow: 0 0 0 0 rgba(176,235,34,0.35);
  animation: aiChatPulse 1.8s ease-out infinite;
}

@keyframes aiChatPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(176,235,34,0.34);
    opacity: 1;
  }

  70% {
    transform: scale(1.04);
    box-shadow: 0 0 0 10px rgba(176,235,34,0);
    opacity: 0.95;
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(176,235,34,0);
    opacity: 1;
  }
}

body .ai-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: transparent;
  backdrop-filter: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
}

body .ai-panel {
  width: min(430px, 100%);
  height: min(720px, calc(100vh - 2rem));
  background: #111111;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.52);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body .ai-panel-header {
  padding: 1.15rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

body .ai-panel-title {
  gap: 0.85rem;
}

body .ai-avatar,
body .pulse-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(221,177,77,0.08);
  border: 1px solid rgba(221,177,77,0.22);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

body .ai-panel-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

body .ai-panel-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.56);
}

body .ai-close-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  color: #fff;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body .ai-close-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.16);
}

body .ai-sticky-calendly {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #111111;
}

body .ai-calendly-sticky-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 38px;
  padding: 0.45rem 0.78rem;
  border-radius: 13px;
  border: 1px solid rgba(221,177,77,0.24);
  background: rgba(221,177,77,0.08);
  color: #e2b95b;
  font-size: 0.74rem;
  font-weight: 500;
  text-decoration: none;
}

body .ai-calendly-sticky-btn:hover {
  background: rgba(221,177,77,0.12);
  border-color: rgba(221,177,77,0.34);
}

body .ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  gap: 0.95rem;
  scroll-behavior: smooth;
}

body .ai-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

body .ai-msg.user {
  flex-direction: row-reverse;
}

body .ai-msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(221,177,77,0.08);
  border: 1px solid rgba(221,177,77,0.2);
  color: #f0c568;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

body .ai-bubble,
body .typing-dots {
  max-width: calc(100% - 4rem);
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1f1f1f;
  color: rgba(255,255,255,0.92);
  font-size: 0.84rem;
  line-height: 1.75;
}

body .ai-msg.user .ai-bubble {
  background: rgba(221,177,77,0.14);
  border-color: rgba(221,177,77,0.2);
}

body .typing-dots {
  gap: 0.35rem;
}

body .typing-dot {
  width: 7px;
  height: 7px;
  background: rgba(255,255,255,0.65);
}

body .ai-suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-items: stretch;
  align-content: center;
  min-height: 96px;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  gap: 0.38rem;
}

body .ai-suggest-chip,
body .ai-suggest-chip-gradient {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.86);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.1;
  width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
}

body .ai-suggest-chip:hover,
body .ai-suggest-chip-gradient:hover {
  background: rgba(255,255,255,0.04);
}

body .ai-suggest-chip-gradient {
  position: relative;
  border: none;
  isolation: isolate;
  color: #fff;
}

body .ai-suggest-chip-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 1px;
  background: linear-gradient(135deg, #6b21a8, #ffffff);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

body .ai-suggest-chip-gradient:hover {
  background: rgba(107,33,168,0.1);
}

body .ai-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: #111111;
}

body .ai-input-wrap {
  flex: 1;
  display: flex;
}

body #ai-input {
  min-height: 54px;
  max-height: 120px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: #1b1b1b;
  color: #fff;
  padding: 0.95rem 1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  outline: none;
}

body #ai-input::placeholder {
  color: rgba(255,255,255,0.32);
}

body #ai-input:focus {
  border-color: #2f80ff;
  box-shadow: 0 0 0 3px rgba(47,128,255,0.16);
}

body .ai-send-btn {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 16px;
  border: 0;
  background: #ddb14d;
  color: #111;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

body .ai-send-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

body .ai-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

body .ai-send-btn svg {
  width: 18px;
  height: 18px;
}

body:not(.output-detail-page) .ai-input-wrap {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

body:not(.output-detail-page) .ai-send-btn {
  width: 54px;
  height: 54px;
  background: transparent;
  color: #fff;
}

body:not(.output-detail-page) .ai-send-btn svg,
body:not(.output-detail-page) .ai-send-btn path {
  color: #fff;
  fill: currentColor;
}

body:not(.output-detail-page) .ai-send-btn:hover {
  filter: none;
  transform: none;
  opacity: 0.82;
}

body .calendly-mini {
  border-radius: 16px;
  border: 1px solid rgba(221,177,77,0.18);
  background: rgba(221,177,77,0.06);
}

body .calendly-mini-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 768px) {
  body .ai-overlay {
    padding: 0;
  }

  body .ai-panel {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: none;
  }

  body .ai-chat-btn {
    right: 1rem;
    bottom: 1rem;
  }

  body .ai-panel-header,
  body .ai-input-row {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  body .ai-sticky-calendly,
  body .ai-messages,
  body .ai-suggestions {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  body .ai-sticky-calendly {
    min-height: 72px;
  }

  body .ai-suggestions {
    min-height: 88px;
  }

  body .ai-suggest-chip,
  body .ai-suggest-chip-gradient {
    min-height: 34px;
  }
}

@media (max-width: 560px) {
  body .ai-chat-btn {
    right: 0.85rem;
    bottom: 0.85rem;
    min-height: 44px;
    padding: 0.72rem 0.95rem;
  }

  body .ai-panel-header,
  body .ai-input-row,
  body .ai-sticky-calendly,
  body .ai-messages,
  body .ai-suggestions {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  body .ai-suggestions {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body .ai-input-row {
    gap: 0.55rem;
  }

  body .ai-send-btn,
  body:not(.output-detail-page) .ai-send-btn {
    width: 48px;
    height: 48px;
  }

  body #ai-input {
    min-height: 50px;
  }
}
