*{box-sizing:border-box;margin:0;padding:0}body,html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:#f6f7f9;color:#1a1d21}.bw-root{display:flex;flex-direction:column;height:100vh;height:100dvh;width:100%;background:#fff;overflow:hidden}.bw-header{background:#1f2937;color:#fff;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.bw-header h1{font-size:15px;font-weight:600}.bw-header .bw-sub{font-size:12px;opacity:.75;margin-top:2px}.bw-brand{display:flex;align-items:center;min-height:30px}.bw-logo{height:30px;width:auto;max-width:170px;object-fit:contain;display:block}.bw-status-pill{font-size:11px;padding:3px 10px;border-radius:999px;white-space:nowrap;font-weight:600}.bw-header-right{display:flex;align-items:center;gap:8px;flex-shrink:0}.bw-icon-btn{background:hsla(0,0%,100%,.12);border:none;color:#fff;width:26px;height:26px;border-radius:6px;font-size:13px;line-height:1;cursor:pointer;flex-shrink:0}.bw-icon-btn:hover{background:hsla(0,0%,100%,.25)}.bw-pill-bot{background:#3b82f6;color:#fff}.bw-pill-human{background:#10b981;color:#fff}.bw-pill-resolved{background:#6b7280;color:#fff}.bw-messages{flex:1 1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#f6f7f9}.bw-msg{max-width:85%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.45;white-space:pre-wrap;word-break:break-word}.bw-msg-user{align-self:flex-end;background:#2563eb;color:#fff;border-bottom-right-radius:4px}.bw-msg-assistant{align-self:flex-start;background:#fff;border:1px solid #e5e7eb;border-bottom-left-radius:4px}.bw-msg-agent{align-self:flex-start;background:#ecfdf5;border:1px solid #a7f3d0;border-bottom-left-radius:4px}.bw-msg-system{align-self:center;background:#fef9c3;border:1px solid #fde68a;font-size:12.5px;color:#713f12;text-align:center;max-width:95%;border-radius:10px}.bw-msg-label{display:block;font-size:11px;font-weight:600;margin-bottom:3px;opacity:.7}.bw-msg-pending{opacity:.65}.bw-md>:first-child{margin-top:0}.bw-md>:last-child{margin-bottom:0}.bw-md p{margin:0 0 8px}.bw-md h3,.bw-md h4,.bw-md h5{margin:12px 0 6px;line-height:1.3;font-weight:700}.bw-md h3{font-size:15px}.bw-md h4{font-size:14px}.bw-md h5{font-size:13px}.bw-md strong{font-weight:700}.bw-md ol,.bw-md ul{margin:0 0 8px;padding-left:20px}.bw-md li{margin:2px 0}.bw-md li::marker{color:#6b7280}.bw-md hr{margin:10px 0;border:none;border-top:1px solid #e5e7eb}.bw-md blockquote{margin:0 0 8px;padding:6px 10px;border-left:3px solid #fbbf24;background:#fffbeb;border-radius:0 6px 6px 0}.bw-md code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:4px;padding:1px 4px}.bw-md a{color:#2563eb}.bw-msg-sending{display:block;font-size:11px;margin-top:3px;opacity:.8}.bw-attach-img{display:block;margin-top:8px}.bw-attach-img img{display:block;max-width:100%;max-height:280px;border-radius:10px;border:1px solid #e5e7eb}.bw-attach-file{display:flex;align-items:center;gap:8px;margin-top:8px;padding:8px 10px;border-radius:10px;border:1px solid #d1d5db;background:#fff;color:#1f2937;text-decoration:none;font-size:13px}.bw-attach-file:hover{background:#f3f4f6}.bw-attach-icon{flex-shrink:0}.bw-attach-name{font-weight:600;word-break:break-all}.bw-attach-size{color:#6b7280;font-size:11.5px;white-space:nowrap;margin-left:auto}.bw-typing{align-self:flex-start;font-size:12px;color:#6b7280;padding:4px 6px}.bw-senderror{padding:6px 12px;background:#fef2f2;border-top:1px solid #fecaca;color:#b91c1c;font-size:12px;flex-shrink:0}.bw-actions{display:flex;gap:8px;padding:8px 12px;border-top:1px solid #e5e7eb;background:#fff;flex-shrink:0}.bw-actions button{flex:1 1;font-size:12px;padding:7px 8px;border-radius:8px;border:1px solid #d1d5db;background:#fff;cursor:pointer;color:#374151}.bw-actions button:hover{background:#f3f4f6}.bw-actions .bw-btn-human{border-color:#10b981;color:#047857;font-weight:600}.bw-actions .bw-btn-resolve{border-color:#6b7280}.bw-inputbar{display:flex;gap:8px;padding:10px 12px;background:#fff;border-top:1px solid #e5e7eb;flex-shrink:0}.bw-inputbar input{flex:1 1;padding:10px 12px;border:1px solid #d1d5db;border-radius:10px;font-size:16px;outline:none}.bw-inputbar input:focus{border-color:#2563eb}.bw-inputbar button{padding:10px 18px;background:#2563eb;color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer}.bw-inputbar button:disabled{background:#93c5fd;cursor:not-allowed}.bw-inputbar .bw-attach-btn{padding:10px 12px;background:#fff;border:1px solid #d1d5db;color:#374151;font-size:16px;font-weight:400;line-height:1}.bw-inputbar .bw-attach-btn:hover:not(:disabled){background:#f3f4f6}.bw-inputbar .bw-attach-btn:disabled{background:#f9fafb;opacity:.5}.bw-pending-files{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px 0;background:#fff;flex-shrink:0}.bw-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 6px 4px 9px;border-radius:999px;border:1px solid #d1d5db;background:#f9fafb;font-size:12px;color:#374151;word-break:break-all}.bw-chip button{border:none;background:transparent;color:#6b7280;font-size:15px;line-height:1;padding:0 2px;cursor:pointer}.bw-chip button:hover{color:#b91c1c}.bw-form{flex:1 1;display:flex;flex-direction:column;justify-content:center;padding:28px 24px;gap:12px;background:#fff}.bw-form h2{font-size:17px}.bw-form p{font-size:13px;color:#6b7280;margin-bottom:6px}.bw-form label{font-size:12.5px;font-weight:600;color:#374151}.bw-form input{width:100%;padding:10px 12px;border:1px solid #d1d5db;border-radius:10px;font-size:16px;margin-top:4px;outline:none}.bw-form input:focus{border-color:#2563eb}.bw-form button{margin-top:8px;padding:12px;background:#2563eb;color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer}.bw-form .bw-error{color:#dc2626;font-size:12.5px}.bw-resolvedbar{padding:14px;text-align:center;background:#fff;border-top:1px solid #e5e7eb;flex-shrink:0}.bw-resolvedbar button{padding:10px 20px;background:#1f2937;color:#fff;border:none;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer}.demo-page{max-width:760px;margin:0 auto;padding:48px 24px}.demo-page h1{font-size:26px;margin-bottom:8px}.demo-page p{margin:10px 0;line-height:1.6;color:#374151}.demo-page pre{background:#1f2937;color:#e5e7eb;padding:16px;border-radius:10px;font-size:13px;overflow-x:auto;margin:12px 0}