.mbf-ai-root {
  --mbf-accent: #6b2fa0;
  --mbf-accent-dark: #421467;
  --mbf-gold: #d6a84b;
  --mbf-primary: #161616;
  --mbf-text: #38333d;
  --mbf-paper: #fffaf1;
  --mbf-ink: #111114;
  --mbf-muted: #8f8b82;
  --mbf-border: rgba(215,181,109,.28);
  font-family: inherit;
  position: relative;
  z-index: 99998;
}
.mbf-ai-root * { box-sizing: border-box; }
.mbf-ai-root:not(.mbf-ai-inline) { position: fixed; right: 22px; bottom: 22px; }
.mbf-ai-launch {
  border: 1px solid var(--mbf-border);
  background: linear-gradient(135deg, #171719, #080809);
  color: #fff;
  border-radius: 999px;
  padding: 10px 15px 10px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 44px rgba(0,0,0,.28);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  letter-spacing: .02em;
}
.mbf-ai-launch-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mbf-accent-dark), var(--mbf-accent));
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}
.mbf-ai-panel {
  display: none;
  width: min(390px, calc(100vw - 28px));
  height: min(650px, calc(100vh - 110px));
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--mbf-border);
  border-radius: 22px;
  background: #0d0d0f;
  color: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
}
.mbf-ai-root.is-open .mbf-ai-panel { display: flex; flex-direction: column; }
.mbf-ai-root.is-open .mbf-ai-launch { display: none; }
.mbf-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 19px 20px 17px;
  border-bottom: 1px solid var(--mbf-border);
  background: radial-gradient(circle at 10% 0%, rgba(107,47,160,.18), transparent 42%), #0d0d0f;
}
.mbf-ai-kicker { color: var(--mbf-accent); font-size: 10px; font-weight: 800; letter-spacing: .19em; }
.mbf-ai-title { margin-top: 4px; font-size: 22px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.mbf-ai-subtitle { margin-top: 5px; color: #aaa69e; font-size: 12px; }
.mbf-ai-close { border: 0; background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 0 8px 12px; }
.mbf-ai-messages { flex: 1; overflow-y: auto; padding: 18px; scroll-behavior: smooth; }
.mbf-ai-message { max-width: 88%; margin: 0 0 12px; padding: 11px 13px; border-radius: 16px; line-height: 1.48; font-size: 14px; white-space: pre-wrap; }
.mbf-ai-message.assistant { background: #19191c; border: 1px solid rgba(255,255,255,.07); color: #f6f1e8; border-bottom-left-radius: 5px; }
.mbf-ai-message.user { margin-left: auto; background: linear-gradient(135deg, var(--mbf-accent-dark), var(--mbf-accent)); color: #fff; font-weight: 600; border-bottom-right-radius: 5px; }
.mbf-ai-message a { color: inherit; text-decoration: underline; font-weight: 800; }
.mbf-ai-status { min-height: 18px; padding: 0 18px; color: #a8a39a; font-size: 12px; }
.mbf-ai-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); background: #0a0a0c; }
.mbf-ai-input { resize: none; width: 100%; min-height: 46px; max-height: 110px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: #17171a; color: #fff; padding: 11px 12px; font: inherit; font-size: 14px; outline: none; }
.mbf-ai-input:focus { border-color: var(--mbf-accent); box-shadow: 0 0 0 2px rgba(215,181,109,.12); }
.mbf-ai-send { align-self: end; min-height: 46px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--mbf-accent-dark), var(--mbf-accent)); color: #fff; padding: 0 16px; font: inherit; font-weight: 900; cursor: pointer; }
.mbf-ai-send:disabled { opacity: .55; cursor: wait; }
.mbf-ai-footer { padding: 0 15px 12px; text-align: center; color: #77736d; background: #0a0a0c; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.mbf-ai-inline { display: inline-block; z-index: 5; }
.mbf-ai-inline .mbf-ai-panel { position: absolute; right: 0; bottom: calc(100% + 12px); }
@media (max-width: 520px) {
  .mbf-ai-root:not(.mbf-ai-inline) { right: 10px; bottom: 10px; }
  .mbf-ai-panel { width: calc(100vw - 20px); height: min(72vh, 650px); border-radius: 18px; }
  .mbf-ai-launch-text { display: none; }
  .mbf-ai-launch { padding: 8px; }
  .mbf-ai-launch-mark { width: 42px; height: 42px; }
}
