#baigbot-root { --bb-ink:#0A0A0A; --bb-page:#FAFAFA; --bb-platinum:#E5E4E2; --bb-silver:#a8a9ad;
  font-family:'Montserrat',system-ui,sans-serif; font-size:14px; line-height:1.5; color:var(--bb-ink); }
#baigbot-root *, #baigbot-root *::before, #baigbot-root *::after { box-sizing:border-box; }
#baigbot-root [hidden] { display:none !important; }
#baigbot-root button, #baigbot-root textarea { font:inherit; color:inherit; }
#baigbot-root button:focus-visible, #baigbot-root textarea:focus-visible, #baigbot-root a:focus-visible { outline:2px solid var(--bb-silver); outline-offset:2px; }

#baigbot-root .bb-launcher { position:fixed; right:20px; bottom:20px; z-index:2147483000; width:56px; height:56px; border-radius:50%;
  background:var(--bb-ink); border:1px solid var(--bb-silver); cursor:pointer; display:flex; align-items:center; justify-content:center; }
#baigbot-root .bb-mono { font-family:'Cormorant Garamond',Georgia,serif; font-weight:300; font-size:30px; line-height:1; color:var(--bb-page); }

#baigbot-root .bb-panel { position:fixed; right:20px; bottom:20px; z-index:2147483001; width:380px; height:560px; max-height:calc(100vh - 40px);
  display:flex; flex-direction:column; background:var(--bb-page); border:1px solid var(--bb-platinum); border-top:3px solid var(--bb-silver);
  box-shadow:0 8px 32px rgba(10,10,10,.18); animation:bb-in .2s ease-out; }
#baigbot-root .bb-head { display:flex; align-items:center; gap:8px; padding:12px 14px; border-bottom:1px solid var(--bb-platinum); }
#baigbot-root .bb-title { flex:1; margin:0; font-family:'Cormorant Garamond',Georgia,serif; font-weight:300; font-size:20px; line-height:1.2; color:var(--bb-ink); }
#baigbot-root .bb-link { background:none; border:0; padding:4px; cursor:pointer; font-size:12px; text-decoration:underline; color:var(--bb-ink); }
#baigbot-root .bb-close { background:none; border:0; padding:0 6px; cursor:pointer; font-size:24px; line-height:1; color:var(--bb-ink); }

#baigbot-root .bb-list { flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; }
#baigbot-root .bb-msg { max-width:85%; padding:9px 12px; border:1px solid var(--bb-platinum); overflow-wrap:anywhere; }
#baigbot-root .bb-assistant { align-self:flex-start; background:#fff; }
#baigbot-root .bb-user { align-self:flex-end; background:var(--bb-ink); border-color:var(--bb-ink); color:var(--bb-page); }
#baigbot-root .bb-a { color:inherit; text-decoration:underline; text-decoration-color:var(--bb-silver); text-underline-offset:3px; }
#baigbot-root .bb-chip { display:inline-block; margin:8px 6px 0 0; padding:3px 10px; border:1px solid var(--bb-silver); color:var(--bb-ink); text-decoration:none; font-size:12px; }

#baigbot-root .bb-typing { display:flex; gap:4px; }
#baigbot-root .bb-dot { width:6px; height:6px; border-radius:50%; background:var(--bb-silver); animation:bb-blink 1s infinite ease-in-out; }
#baigbot-root .bb-dot:nth-child(2) { animation-delay:.15s; }
#baigbot-root .bb-dot:nth-child(3) { animation-delay:.3s; }

#baigbot-root .bb-card { align-self:stretch; padding:10px 12px; background:#fff; border:1px solid var(--bb-silver); }
#baigbot-root .bb-card-sum, #baigbot-root .bb-card-res { margin:0 0 8px; }
#baigbot-root .bb-card-row { display:flex; gap:8px; }
#baigbot-root .bb-yes, #baigbot-root .bb-no, #baigbot-root .bb-send { padding:8px 16px; cursor:pointer; border:1px solid var(--bb-ink); }
#baigbot-root .bb-yes, #baigbot-root .bb-send { background:var(--bb-ink); color:var(--bb-page); }
#baigbot-root .bb-no { background:transparent; color:var(--bb-ink); }
#baigbot-root button:disabled { opacity:.45; cursor:not-allowed; }

#baigbot-root .bb-form { display:flex; gap:8px; padding:10px 14px; border-top:1px solid var(--bb-platinum); }
#baigbot-root .bb-input { flex:1; resize:none; padding:8px 10px; background:#fff; border:1px solid var(--bb-silver); }
#baigbot-root .bb-note { margin:0; padding:0 14px 10px; font-size:11px; color:#555; }

#baigbot-root .bb-intro { position:fixed; right:20px; bottom:88px; z-index:2147483000; width:300px; max-width:calc(100vw - 40px);
  padding:20px 22px 18px; background:var(--bb-ink); color:var(--bb-page); border:1px solid var(--bb-silver);
  box-shadow:0 12px 40px rgba(10,10,10,.28); transform-origin:calc(100% - 28px) 100%; animation:bb-rise .45s cubic-bezier(.2,.8,.2,1); }
#baigbot-root .bb-intro::after { content:''; position:absolute; right:27px; bottom:-9px; width:1px; height:8px; background:var(--bb-silver); }
#baigbot-root .bb-intro-rule { display:block; width:36px; height:1px; margin:0 0 14px; background:var(--bb-silver); }
#baigbot-root .bb-intro-hi { margin:0 0 10px; font-family:'Cormorant Garamond',Georgia,serif; font-weight:300; font-size:32px; line-height:1.05; letter-spacing:-.01em; color:var(--bb-page); }
#baigbot-root .bb-intro-body { margin:0 0 18px; font-size:13px; line-height:1.6; color:var(--bb-platinum); }
#baigbot-root .bb-intro-row { display:flex; align-items:center; gap:14px; }
#baigbot-root .bb-intro-go { padding:9px 16px; cursor:pointer; background:var(--bb-page); color:var(--bb-ink); border:1px solid var(--bb-page); }
#baigbot-root .bb-intro-no { padding:4px 0; cursor:pointer; background:none; border:0; color:var(--bb-silver); text-decoration:underline; text-underline-offset:3px; font-size:12px; }
#baigbot-root .bb-intro-x { position:absolute; top:8px; right:10px; padding:0 4px; cursor:pointer; background:none; border:0; font-size:20px; line-height:1; color:var(--bb-silver); }
#baigbot-root .bb-intro button:focus-visible { outline-color:var(--bb-page); }

@keyframes bb-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes bb-rise { from { opacity:0; transform:translateY(10px) scale(.96); } to { opacity:1; transform:none; } }
@keyframes bb-blink { 0%,80%,100% { opacity:.25; } 40% { opacity:1; } }

@media (max-width:480px) {
  #baigbot-root .bb-panel { right:0; bottom:0; left:0; top:0; width:100%; height:100%; max-height:none; }
}
@media (prefers-reduced-motion: reduce) {
  #baigbot-root .bb-panel, #baigbot-root .bb-dot, #baigbot-root .bb-intro { animation:none; }
}
