/* ============================================================================
   LESI AI CHATBOT — FLOATING ROBOT MASCOT & INTERACTIVE CHAT PANEL
   ============================================================================ */

.ai-chat-launcher-wrap {
  position: fixed;
  right: 26px;
  bottom: 22px;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
}

body.menu-open .ai-chat-launcher-wrap,
body.menu-open .ai-chat-widget {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(20px);
}

/* ── Mascot Speech Bubble ── */
.ai-mascot-speech {
  position: relative;
  margin-bottom: 6px;
  margin-right: 6px;
  background: linear-gradient(135deg, rgba(24, 32, 26, 0.96) 0%, rgba(10, 14, 11, 0.98) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(214, 182, 90, 0.45);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 18px 18px 4px 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  max-width: 240px;
  white-space: normal;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 20px rgba(214, 182, 90, 0.22);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: speechFloat 3.6s ease-in-out infinite;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}

.ai-mascot-speech:hover {
  transform: scale(1.03) translateY(-3px);
  border-color: var(--gold-lt);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.8), 0 0 26px rgba(214, 182, 90, 0.4);
}

.ai-mascot-speech.auto-minimized {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.95);
}

.ai-chat-launcher-wrap:hover .ai-mascot-speech.auto-minimized {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

body.ai-chat-open .ai-mascot-speech,
.ai-mascot-speech[hidden] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  visibility: hidden;
}

.ai-speech-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}
.ai-speech-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--gold-lt);
}
.ai-speech-text {
  color: #e5ede7;
  transition: opacity 0.25s ease;
}
.ai-speech-text strong {
  color: var(--gold-lt);
  font-weight: 700;
}

.ai-speech-dismiss {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #9ab0a0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.ai-speech-dismiss:hover {
  background: rgba(214, 182, 90, 0.3);
  color: var(--white);
  transform: scale(1.12);
}

@keyframes speechFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ── Floating Robot Mascot Button ── */
.ai-mascot-btn {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 104px;
  height: 116px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  perspective: 900px;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-mascot-thruster {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 82px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.85) 0%, rgba(214, 182, 90, 0.5) 45%, transparent 75%);
  filter: blur(2.5px);
  pointer-events: none;
  animation: thrusterPulseLife 3.6s ease-in-out infinite;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
@keyframes thrusterPulseLife {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.85; }
  50% { transform: translateX(-50%) scale(1.18); opacity: 0.55; }
}

.ai-mascot-sparkles {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 56px;
  pointer-events: none;
}
.ai-sparkle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 8px #facc15, 0 0 14px rgba(34, 197, 94, 0.8);
  opacity: 0;
}
.ai-sparkle.s1 { top: 0; left: 14px; animation: sparkleLife 3.2s ease-in-out infinite 0.2s; }
.ai-sparkle.s2 { top: 12px; right: 12px; animation: sparkleLife 3.6s ease-in-out infinite 1.4s; }
.ai-sparkle.s3 { top: 34px; left: 2px; animation: sparkleLife 3.4s ease-in-out infinite 2.2s; }
@keyframes sparkleLife {
  0%, 100% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 0.95; transform: scale(1.3) rotate(45deg); }
}

.ai-mascot-figure {
  position: relative;
  width: 104px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter:
    drop-shadow(0 14px 28px rgba(0, 0, 0, 0.75))
    drop-shadow(0 0 20px rgba(34, 197, 94, 0.38))
    drop-shadow(0 0 12px rgba(214, 182, 90, 0.28));
  animation: mascotFloatLife 3.8s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  will-change: transform;
}
@keyframes mascotFloatLife {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-6px) rotate(-1.5deg) scale(1.015); }
  50% { transform: translateY(-10px) rotate(0.8deg) scale(1.025); }
  75% { transform: translateY(-5px) rotate(1.8deg) scale(1.01); }
}

.ai-mascot-btn:hover .ai-mascot-figure {
  transform: translateY(-12px) scale(1.09) rotate(-3deg);
  filter:
    drop-shadow(0 18px 34px rgba(0, 0, 0, 0.85))
    drop-shadow(0 0 32px rgba(34, 197, 94, 0.72))
    drop-shadow(0 0 18px rgba(251, 146, 60, 0.52));
}
.ai-mascot-btn:hover .ai-mascot-thruster {
  transform: translateX(-50%) scale(1.35);
  opacity: 1;
}
.ai-mascot-btn:active .ai-mascot-figure {
  transform: translateY(-2px) scale(0.96);
}

.ai-mascot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.ai-mascot-status {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-lt);
  border: 2px solid #070908;
  box-shadow: 0 0 12px rgba(61, 184, 42, 0.95);
  pointer-events: none;
  animation: statusBlink 3s ease-in-out infinite;
  z-index: 3;
}
@keyframes statusBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.88); }
}

.ai-mascot-close-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(239, 68, 68, 0.5);
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
}
body.ai-chat-open .ai-mascot-close-badge {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ── Chat Window Panel ── */
.ai-chat-widget {
  position: fixed;
  right: 134px;
  bottom: 24px;
  width: 400px;
  max-width: calc(100vw - 160px);
  height: 580px;
  max-height: calc(100dvh - 48px);
  z-index: 1003;
  background: linear-gradient(165deg, rgba(16, 23, 18, 0.98) 0%, rgba(6, 9, 7, 0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(214, 182, 90, 0.35);
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.85), 0 0 46px rgba(214, 182, 90, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
  transform-origin: bottom right;
  overscroll-behavior: contain;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.ai-chat-widget.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  padding: 13px 16px;
  background: linear-gradient(90deg, rgba(214, 182, 90, 0.16) 0%, rgba(13, 19, 15, 0.95) 100%);
  border-bottom: 1px solid rgba(214, 182, 90, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.ai-chat-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ai-chat-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: #070b07;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(214, 182, 90, 0.35), inset 0 0 8px rgba(61, 184, 42, 0.2);
}
.ai-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.ai-chat-avatar::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(214, 182, 90, 0.5);
  animation: avatarAura 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes avatarAura {
  0%, 100% { transform: scale(1); opacity: 0.6; border-color: rgba(214, 182, 90, 0.6); }
  50% { transform: scale(1.08); opacity: 0.25; border-color: rgba(61, 184, 42, 0.8); }
}

.ai-chat-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.ai-chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(214, 182, 90, 0.25) 0%, rgba(214, 182, 90, 0.08) 100%);
  border: 1px solid rgba(214, 182, 90, 0.45);
  color: var(--gold-lt);
  letter-spacing: 0.03em;
}
.ai-chat-subtitle {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}
.ai-chat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-lt);
  box-shadow: 0 0 6px var(--green-lt);
  display: inline-block;
  animation: statusBlink 2.2s ease-in-out infinite;
}

.ai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-chat-hdr-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(214, 182, 90, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  padding: 0;
  font-size: 14px;
}
.ai-chat-hdr-btn:hover,
.ai-chat-hdr-btn.active {
  background: rgba(214, 182, 90, 0.18);
  border-color: var(--gold);
  color: var(--gold-lt);
  transform: scale(1.05);
}

/* ── Messages Area ── */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.ai-chat-messages::-webkit-scrollbar {
  width: 5px;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(214, 182, 90, 0.25);
  border-radius: 999px;
}

.ai-welcome-card {
  background: linear-gradient(160deg, rgba(22, 32, 25, 0.95) 0%, rgba(9, 13, 10, 0.98) 100%);
  border: 1px solid rgba(214, 182, 90, 0.35);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 24px rgba(214, 182, 90, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: aiMsgIn 0.3s ease forwards;
}
.ai-welcome-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-welcome-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: #070b07;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(214, 182, 90, 0.35);
}
.ai-welcome-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ai-welcome-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ai-welcome-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-lt);
}
.ai-welcome-tagline {
  font-size: 11px;
  color: var(--muted);
}
.ai-welcome-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #e5ede7;
}
.ai-welcome-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ai-welcome-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 182, 90, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  color: #d6e2d8;
}
.ai-welcome-chip strong {
  color: var(--gold-lt);
}

/* ── Message Bubbles ── */
.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  animation: aiMsgIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  gap: 3px;
}
@keyframes aiMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-msg.bot { align-self: flex-start; }
.ai-msg.user { align-self: flex-end; }

.ai-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}
.ai-msg.user .ai-msg-row {
  justify-content: flex-end;
}

.ai-msg-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(214, 182, 90, 0.5);
  background: #070b07;
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 2px;
}
.ai-msg-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ai-msg-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}
.ai-msg.user .ai-msg-body {
  align-items: flex-end;
}

.ai-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  padding-left: 2px;
}
.ai-msg-author {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-lt);
}
.ai-msg-timestamp,
.ai-msg-user-timestamp {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.8;
}
.ai-msg-user-timestamp {
  margin-top: 3px;
  padding-right: 4px;
}

.ai-msg-bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.ai-msg.bot .ai-msg-bubble {
  background: linear-gradient(145deg, rgba(22, 32, 25, 0.92) 0%, rgba(10, 15, 12, 0.98) 100%);
  border: 1px solid rgba(214, 182, 90, 0.24);
  color: #f1f5f2;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.ai-msg.user .ai-msg-bubble {
  background: linear-gradient(135deg, #a88432 0%, #c9a84c 50%, #e8c96a 100%);
  color: #070908;
  font-weight: 600;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(214, 182, 90, 0.28);
}
.ai-msg-bubble strong {
  color: var(--gold-lt);
  font-weight: 700;
}
.ai-msg.user .ai-msg-bubble strong {
  color: #070908;
}

.ai-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 4px 0;
}
.ai-bullet-icon {
  color: var(--gold-lt);
  font-size: 9px;
  margin-top: 5px;
  flex-shrink: 0;
}
.ai-msg-bubble a.ai-inline-link {
  color: var(--gold-lt);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.ai-msg-bubble a.ai-inline-link:hover {
  color: #ffffff;
}

.ai-msg-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-left: 2px;
}
.ai-msg-copy-btn {
  background: transparent;
  border: 1px solid rgba(214, 182, 90, 0.18);
  color: var(--muted);
  font-size: 10.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.ai-msg-copy-btn:hover {
  color: var(--gold-lt);
  border-color: var(--gold);
  background: rgba(214, 182, 90, 0.12);
}
.ai-msg-copy-btn.copied {
  color: var(--green-lt);
  border-color: var(--green-lt);
  background: rgba(61, 184, 42, 0.12);
}
.ai-msg-copy-btn svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.ai-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ai-chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(214, 182, 90, 0.14);
  border: 1px solid rgba(214, 182, 90, 0.42);
  color: var(--gold-lt);
  transition: all 0.2s ease;
}
.ai-chat-action-btn:hover {
  background: var(--gold);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(214, 182, 90, 0.35);
}

/* ── Typing Indicator ── */
.ai-typing-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  align-self: flex-start;
  animation: aiMsgIn 0.2s ease forwards;
}
.ai-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(145deg, rgba(22, 32, 25, 0.92) 0%, rgba(10, 15, 12, 0.98) 100%);
  border: 1px solid rgba(214, 182, 90, 0.22);
  border-radius: 16px 16px 16px 4px;
}
.ai-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: aiDotBounce 1.3s infinite ease-in-out;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes aiDotBounce {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.45; }
  40% { transform: scale(1.15); opacity: 1; }
}
.ai-typing-label {
  font-size: 11px;
  color: var(--muted);
  margin-left: 2px;
}

/* ── Quick Suggestion Chips ── */
.ai-chat-chips-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(7, 10, 8, 0.85);
  border-top: 1px solid rgba(214, 182, 90, 0.15);
  flex-shrink: 0;
  width: 100%;
  overflow: hidden;
}
.ai-chat-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  flex: 1;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 182, 90, 0.35) transparent;
}
.ai-chat-chips.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.ai-chat-chips::-webkit-scrollbar {
  height: 3px;
}
.ai-chat-chips::-webkit-scrollbar-thumb {
  background: rgba(214, 182, 90, 0.35);
  border-radius: 999px;
}

.ai-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(214, 182, 90, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.ai-chip:hover {
  border-color: var(--gold);
  background: rgba(214, 182, 90, 0.16);
  color: var(--gold-lt);
  transform: translateY(-1px);
}

.ai-chips-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(14, 20, 15, 0.95);
  border: 1px solid rgba(214, 182, 90, 0.4);
  color: var(--gold-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
  opacity: 0;
  pointer-events: none;
}
.ai-chips-nav-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
.ai-chips-nav-btn:hover {
  background: rgba(28, 38, 30, 0.98);
  border-color: var(--gold);
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}
.ai-chips-nav-btn.prev { left: 6px; }
.ai-chips-nav-btn.next { right: 6px; }

.ai-chat-chips-wrapper::before,
.ai-chat-chips-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.25s ease;
  opacity: 0;
}
.ai-chat-chips-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, rgba(7, 10, 8, 0.95), transparent);
}
.ai-chat-chips-wrapper::after {
  right: 0;
  background: linear-gradient(270deg, rgba(7, 10, 8, 0.95), transparent);
}
.ai-chat-chips-wrapper.has-overflow-left::before,
.ai-chat-chips-wrapper.has-overflow-right::after {
  opacity: 1;
}

/* ── Input Bar & Privacy Footer ── */
.ai-chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(214, 182, 90, 0.2);
  background: rgba(7, 9, 8, 0.96);
  flex-shrink: 0;
}
.ai-chat-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(214, 182, 90, 0.25);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--white);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ai-chat-input::placeholder {
  color: rgba(165, 176, 166, 0.72);
}
.ai-chat-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 182, 90, 0.15);
}

.ai-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold), var(--gold-lt));
  color: #070908;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(214, 182, 90, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}
.ai-chat-send:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 6px 20px rgba(214, 182, 90, 0.5);
}
.ai-chat-send:active {
  transform: scale(0.94);
}
.ai-chat-send svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #070908;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-chat-privacy-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(4, 7, 5, 0.94);
  border-top: 1px solid rgba(214, 182, 90, 0.12);
  color: #9ab0a0;
  font-size: 11px;
  flex-shrink: 0;
  user-select: none;
}
.ai-chat-privacy-notice svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--gold-lt);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Responsive Breakpoints ── */
@media (max-width: 1024px) {
  .ai-chat-widget {
    right: 20px;
    bottom: 24px;
    width: 376px;
    max-width: calc(100vw - 40px);
    height: 530px;
    max-height: calc(100dvh - 48px);
  }
}

@media (max-width: 768px) {
  .ai-chat-launcher-wrap {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .ai-mascot-btn {
    width: 74px;
    height: 82px;
  }
  .ai-mascot-figure {
    width: 74px;
    height: 80px;
  }
  .ai-mascot-thruster {
    width: 58px;
    height: 14px;
    bottom: 0;
  }
  .ai-mascot-sparkles {
    width: 64px;
    height: 36px;
  }
  .ai-mascot-status {
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
  }
  .ai-mascot-close-badge {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  .ai-mascot-speech {
    display: none;
  }

  body.ai-chat-open .ai-chat-launcher-wrap {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
  }

  .ai-chat-widget {
    right: 8px;
    left: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    height: min(600px, calc(100dvh - 56px));
    max-height: calc(100dvh - 56px);
    border-radius: 20px;
  }
  .ai-chat-header {
    padding: 12px 14px;
  }
  .ai-chat-hdr-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .ai-chips-nav-btn,
  .ai-chat-chips-wrapper::before,
  .ai-chat-chips-wrapper::after {
    display: none;
  }
  .ai-chat-chips {
    scrollbar-width: none;
    cursor: default;
  }
  .ai-chat-chips::-webkit-scrollbar {
    display: none;
  }
  .ai-welcome-highlights {
    grid-template-columns: 1fr;
  }
  .ai-msg {
    max-width: 94%;
  }
  .ai-msg-bubble {
    font-size: 13px;
    padding: 10px 13px;
  }
  .ai-chat-input {
    font-size: 16px;
    padding: 9px 14px;
  }
  .ai-chat-send {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .ai-mascot-btn {
    width: 64px;
    height: 72px;
  }
  .ai-mascot-figure {
    width: 64px;
    height: 70px;
  }
}
