.cw-root { --cw-accent: #6fa8ff; --cw-bg: #10162a; --cw-fg: #e6eaf4; position: fixed; right: 20px; bottom: 20px; z-index: 9999; font-family: system-ui, sans-serif; }
.cw-fab { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--cw-accent); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.cw-panel { position: absolute; right: 0; bottom: 68px; width: 340px; max-width: 90vw; height: 460px; max-height: 70vh; display: flex; flex-direction: column; background: var(--cw-bg); color: var(--cw-fg); border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
/* Must out-specify `.cw-panel { display:flex }` so the `hidden` attribute actually hides the panel. */
.cw-panel[hidden] { display: none; }
.cw-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: rgba(255,255,255,.06); font-weight: 600; }
.cw-close { background: none; border: none; color: inherit; font-size: 20px; cursor: pointer; }
.cw-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cw-msg { padding: 8px 12px; border-radius: 12px; max-width: 85%; line-height: 1.45; white-space: pre-wrap; }
.cw-msg p { margin: 0 0 6px; white-space: normal; }
.cw-msg p:last-child { margin-bottom: 0; }
.cw-msg ul { margin: 4px 0 6px; padding-left: 18px; white-space: normal; }
.cw-msg li { margin: 2px 0; }
.cw-msg strong { font-weight: 700; }
.cw-msg em { font-style: italic; }
.cw-error { background: rgba(220, 80, 80, .18) !important; color: #ffd9d9 !important; }
.cw-typing { display: inline-flex; gap: 5px; align-items: center; padding: 2px 0; }
.cw-typing span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .4; animation: cw-bounce 1.2s infinite ease-in-out both; }
.cw-typing span:nth-child(2) { animation-delay: .16s; }
.cw-typing span:nth-child(3) { animation-delay: .32s; }
@keyframes cw-bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .35; } 40% { transform: scale(1); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .cw-typing span { animation: none; opacity: .6; }
}
.cw-user { align-self: flex-end; background: var(--cw-accent); color: #fff; }
.cw-assistant { align-self: flex-start; background: rgba(255,255,255,.08); }
.cw-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.cw-input { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.2); color: inherit; }
.cw-send { padding: 0 14px; border: none; border-radius: 10px; background: var(--cw-accent); color: #fff; cursor: pointer; }
