.ai-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 70;
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--lime); color: var(--ink);
  border: none; padding: .85rem 1.2rem .85rem 1rem; border-radius: 9999px;
  font-family: inherit; font-weight: 700; font-size: .9rem;
  box-shadow: 0 8px 28px rgba(198,242,78,.35), 0 2px 6px rgba(0,0,0,.4);
  cursor: pointer; transition: transform .15s;
}
.ai-fab:hover { transform: translateY(-1px); }
.ai-fab:active { transform: scale(.98); }
.ai-fab svg { flex-shrink: 0; }
.ai-fab-label { white-space: nowrap; }
@media (max-width: 480px) { .ai-fab-label { display: none; } .ai-fab { padding: .85rem; } }

.ai-panel {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 80;
  width: 380px; max-width: calc(100vw - 2rem); height: 560px; max-height: calc(100vh - 2rem);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 1.2rem; box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: none; flex-direction: column; overflow: hidden;
  animation: aiSlide .25s cubic-bezier(.2,.7,.3,1);
}
.ai-panel.open { display: flex; }
@keyframes aiSlide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.ai-head { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--line); background: var(--panel2); }
.ai-title { display: flex; align-items: center; gap: .65rem; }
.ai-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-size: 1.1rem; font-weight: 800; }
.ai-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.1; }
.ai-sub { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.ai-sub::before { content: '●'; color: var(--green); font-size: .7rem; margin-right: 4px; }
.ai-close { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: .5rem; padding: .25rem .5rem; cursor: pointer; font-size: .9rem; }

.ai-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.ai-msg { padding: .6rem .85rem; border-radius: 1rem; font-size: .9rem; line-height: 1.45; max-width: 85%; word-wrap: break-word; white-space: pre-wrap; }
.ai-msg.user { align-self: flex-end; background: var(--lime); color: var(--ink); border-bottom-right-radius: .3rem; }
.ai-msg.bot { align-self: flex-start; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: .3rem; }
.ai-msg a { color: var(--lime); text-decoration: underline; }
.ai-msg.bot.typing { color: var(--muted); font-style: italic; }
.ai-msg.bot.typing::after { content: '...'; animation: dots 1.3s infinite; }
@keyframes dots { 0%,33%{content:'.'} 34%,66%{content:'..'} 67%,100%{content:'...'} }

.ai-chips { display: flex; gap: .4rem; padding: .5rem 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); background: var(--panel2); }
.ai-chip { background: var(--ink); border: 1px solid var(--line); color: var(--muted); border-radius: 9999px; padding: .3rem .7rem; font-family: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s; }
.ai-chip:hover { color: var(--text); border-color: rgba(198,242,78,.4); }

.ai-input { display: flex; gap: .5rem; padding: .85rem 1rem; border-top: 1px solid var(--line); background: var(--panel); }
.ai-text { flex: 1; background: var(--ink); border: 1px solid var(--line); color: var(--text); border-radius: .7rem; padding: .65rem .85rem; font-family: inherit; font-size: .92rem; outline: none; }
.ai-text:focus { border-color: rgba(198,242,78,.5); }
.ai-send { background: var(--lime); color: var(--ink); border: none; border-radius: .7rem; padding: 0 .85rem; font-family: inherit; cursor: pointer; display: grid; place-items: center; }
.ai-send:disabled { opacity: .5; cursor: not-allowed; }

.ai-greeting { background: linear-gradient(180deg, rgba(198,242,78,.06), transparent); border: 1px solid rgba(198,242,78,.18); border-radius: .8rem; padding: .85rem; font-size: .88rem; line-height: 1.5; margin-bottom: .5rem; }
.ai-greeting strong { color: var(--lime); }
