.bw-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 1000;
  display: flex; align-items: center; gap: 10px;
  background: #2b211c; color: #fffaf3;
  border: 0; border-radius: 999px; padding: 12px 18px 12px 14px;
  font: 600 15px -apple-system, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 8px 24px rgba(43, 33, 28, 0.25); cursor: pointer;
}
.bw-launcher .bw-dot { width: 10px; height: 10px; border-radius: 50%; background: #6fd08c; box-shadow: 0 0 0 3px rgba(111, 208, 140, 0.25); }

.bw-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 1001;
  width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 40px));
  display: none; flex-direction: column;
  background: #fff; color: #2b211c; border-radius: 18px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(43, 33, 28, 0.3);
  font: 15px/1.45 -apple-system, "Segoe UI", system-ui, sans-serif;
}
.bw-panel.bw-open { display: flex; }
@media (max-width: 480px) {
  .bw-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
}

.bw-head { background: #2b211c; color: #fffaf3; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.bw-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e9873d; display: grid; place-items: center; font-weight: 700; }
.bw-title { flex: 1; min-width: 0; }
.bw-title strong { display: block; font-size: 15px; }
.bw-title span { font-size: 12px; opacity: 0.8; }
.bw-close, .bw-reset { background: transparent; border: 0; color: inherit; cursor: pointer; font-size: 13px; opacity: 0.8; padding: 4px 6px; }
.bw-close { font-size: 22px; line-height: 1; }
.bw-close:hover, .bw-reset:hover { opacity: 1; }

.bw-log { flex: 1; overflow-y: auto; padding: 16px; background: #fbf6ef; display: flex; flex-direction: column; gap: 10px; }
.bw-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bw-msg.bw-guest { align-self: flex-end; background: #e9873d; color: #fff; border-bottom-right-radius: 4px; }
.bw-msg.bw-bot { align-self: flex-start; background: #fff; border: 1px solid #eadfd2; border-bottom-left-radius: 4px; }
.bw-msg.bw-bot:empty::after { content: "…"; color: #b0a092; }
.bw-status { align-self: flex-start; font-size: 12px; color: #8a776a; padding: 0 4px; }
.bw-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #e9873d; animation: bw-pulse 1s infinite ease-in-out; }
@keyframes bw-pulse { 50% { opacity: 0.3; } }

.bw-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; background: #fbf6ef; }
.bw-chip { border: 1px solid #eadfd2; background: #fff; color: #2b211c; border-radius: 999px; padding: 6px 10px; font: 13px -apple-system, "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.bw-chip:hover { border-color: #e9873d; }

.bw-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eadfd2; background: #fff; }
.bw-input { flex: 1; resize: none; border: 1px solid #eadfd2; border-radius: 12px; padding: 10px 12px; font: inherit; max-height: 120px; }
.bw-input:focus { outline: 2px solid #e9873d; outline-offset: -1px; border-color: transparent; }
.bw-send { border: 0; border-radius: 12px; background: #2b211c; color: #fff; padding: 0 16px; font: 600 14px -apple-system, "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.bw-send:disabled { opacity: 0.4; cursor: default; }
.bw-foot { font-size: 11px; color: #8a776a; text-align: center; padding: 0 12px 8px; background: #fff; }
