.w-root{font-family:'Inter',-apple-system,sans-serif;font-size:14px;color:#1a1a1a;line-height:1.5;position:fixed;bottom:16px;right:16px;z-index:2147483647}
.w-root *{-webkit-font-smoothing:antialiased}

/* FAB */
.w-fab{width:48px;height:48px;border-radius:50%;background:#1a1a1a;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,0.2);border:none;transition:transform .2s ease;position:relative;z-index:2147483647}
.w-fab:hover{transform:translateY(-2px) scale(1.03)}
.w-fab:active{transform:scale(0.95)}
.w-fab svg{width:20px;height:20px;stroke-width:2;position:absolute;transition:opacity .2s ease,transform .2s ease}
.w-fab .w-fab-close{opacity:0;transform:rotate(-45deg) scale(0.7)}
.w-fab.open .w-fab-chat{opacity:0;transform:rotate(45deg) scale(0.7)}
.w-fab.open .w-fab-close{opacity:1;transform:rotate(0deg) scale(1)}

/* Panel */
.w-panel{position:fixed;bottom:72px;right:16px;width:380px;height:560px;max-height:calc(100dvh - 90px);background:#fff;border-radius:20px;box-shadow:0 16px 48px rgba(0,0,0,0.12),0 0 0 1px rgba(0,0,0,0.03);display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(10px) scale(0.98);pointer-events:none;transition:opacity .3s ease,transform .3s ease;z-index:2147483647}
.w-panel.open{opacity:1;transform:translateY(0) scale(1);pointer-events:all}

/* Header */
.w-header{flex-shrink:0;padding:14px 18px;background:#fff;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between}
.w-header-left{display:flex;align-items:center;gap:10px}
.w-avatar{width:32px;height:32px;border-radius:50%;background:#1a1a1a;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:#fff}
.w-title{font-size:14px;font-weight:600;color:#1a1a1a;letter-spacing:-.01em}
.w-subtitle{font-size:11px;color:#999;margin-top:1px}
.w-close{width:28px;height:28px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#999;cursor:pointer;border:none;background:transparent;transition:all .15s ease}
.w-close:hover{background:#f5f5f5;color:#333}
.w-close svg{width:14px;height:14px;stroke-width:2}

/* Body */
.w-body{flex:1;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;background:#fafafa;scroll-behavior:smooth}
.w-body::-webkit-scrollbar{width:6px}
.w-body::-webkit-scrollbar-thumb{background:#e0e0e0;border-radius:10px}

/* Welcome */
.w-welcome{padding:18px 18px 10px}
.w-welcome-text{font-size:13px;line-height:1.65;color:#555;padding:0 2px}
.w-welcome-text strong{color:#1a1a1a;font-weight:600}

/* Chips */
.w-chips{display:flex;flex-wrap:wrap;gap:8px;padding:8px 18px 14px}
.w-chip{display:inline-flex;align-items:center;padding:7px 13px;border-radius:8px;border:1px solid #e5e5e5;background:#fff;font-size:12px;font-weight:500;color:#555;cursor:pointer;transition:all .15s ease;white-space:nowrap;line-height:1.3}
.w-chip:hover{border-color:#ccc;background:#f5f5f5;color:#1a1a1a}
.w-chip:active{transform:scale(0.97)}

/* Divider */
.w-divider{display:flex;align-items:center;gap:12px;padding:6px 18px;font-size:10px;color:#bbb;font-weight:600;text-transform:uppercase;letter-spacing:.08em}
.w-divider::before,.w-divider::after{content:'';flex:1;height:1px;background:#eee}

/* Messages */
.w-msg{display:flex;padding:6px 18px;animation:msgIn .3s ease both}
@keyframes msgIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.w-msg-user{justify-content:flex-end}
.w-msg-bot{justify-content:flex-start;background:#f5f5f5;border-bottom:1px solid #eee}

/* Bubbles */
.w-bubble-user{background:#e8e8e8;color:#1a1a1a;border-radius:16px;border-bottom-right-radius:4px;padding:9px 13px;font-size:13px;line-height:1.55;max-width:85%;word-wrap:break-word}
.w-bubble-bot{color:#1a1a1a;padding:8px 0;font-size:13px;line-height:1.65;max-width:100%;word-wrap:break-word}
.w-bubble-bot strong{font-weight:600}
.w-bubble-bot em{font-style:italic;color:#555}
.w-bubble-bot a{color:#1a1a1a;text-decoration:underline;text-underline-offset:2px;text-decoration-color:#bbb;font-weight:500}
.w-bubble-bot a:hover{text-decoration-color:#1a1a1a}
.w-bubble-bot ul,.w-bubble-bot ol{padding-left:20px;margin:8px 0}
.w-bubble-bot li{margin-bottom:3px}
.w-bubble-bot p{margin-bottom:8px}
.w-bubble-bot p:last-child{margin-bottom:0}
.w-bubble-bot code{background:#eee;padding:2px 5px;border-radius:4px;font-size:12px;font-family:monospace;color:#555}

/* Typing */
.w-typing{display:flex;padding:14px 18px;background:#f5f5f5;border-bottom:1px solid #eee;animation:msgIn .3s ease both}
.w-typing-dots{display:flex;align-items:center;gap:4px}
.w-typing-dot{width:6px;height:6px;border-radius:50%;background:#bbb;animation:typingBounce 1.4s ease-in-out infinite}
.w-typing-dot:nth-child(2){animation-delay:.2s}
.w-typing-dot:nth-child(3){animation-delay:.4s}
@keyframes typingBounce{0%,70%,100%{transform:translateY(0);opacity:.3}35%{transform:translateY(-4px);opacity:1}}

/* Cursor */
.w-cursor{display:inline-block;width:2px;height:1.1em;background:#999;margin-left:2px;vertical-align:text-bottom;animation:blink 1s step-end infinite;border-radius:1px}
@keyframes blink{50%{opacity:0}}

/* Nudge */
.w-nudge{display:flex;align-items:center;gap:10px;padding:10px 12px;margin-top:10px;background:#fff;border:1px solid #e5e5e5;border-radius:10px;text-decoration:none;color:#1a1a1a;transition:all .15s ease;cursor:pointer;max-width:280px}
.w-nudge:hover{border-color:#ccc;background:#fafafa}
.w-nudge-img:empty::before{content:'\u2726';font-size:14px;color:#fff}
.w-nudge-body{flex:1;min-width:0}
.w-nudge-label{font-size:9px;font-weight:700;color:#999;text-transform:uppercase;letter-spacing:.06em;margin-bottom:1px}
.w-nudge-title{font-size:12px;font-weight:600;color:#1a1a1a;line-height:1.3}
.w-nudge-desc{font-size:11px;color:#555;line-height:1.4;margin-top:2px}
.w-nudge-arrow{color:#999;font-size:14px;flex-shrink:0;transition:transform .15s ease}
.w-nudge:hover .w-nudge-arrow{transform:translateX(3px);color:#1a1a1a}

/* Feedback */
.w-feedback{display:flex;gap:3px;margin-top:6px;opacity:0;transition:opacity .15s ease}
.w-msg-bot:hover .w-feedback{opacity:1}
.w-fb-btn{width:22px;height:22px;border-radius:5px;display:flex;align-items:center;justify-content:center;font-size:11px;color:#bbb;background:transparent;border:none;cursor:pointer;transition:all .15s ease}
.w-fb-btn:hover{background:#eee;color:#555}
.w-fb-btn.sel{background:#eee;color:#1a1a1a}

/* Input */
.w-input-area{flex-shrink:0;padding:12px 18px 14px;background:#fff;border-top:1px solid #f0f0f0}
.w-input-box{display:flex;align-items:flex-end;gap:8px;background:#f5f5f5;border:1px solid #e5e5e5;border-radius:16px;padding:8px 10px 8px 14px;transition:all .15s ease}
.w-input-box:focus-within{border-color:#ccc;background:#fff;box-shadow:0 0 0 3px rgba(0,0,0,0.03)}
.w-textarea{flex:1;border:none;background:none;color:#1a1a1a;font-size:13px;font-family:'Inter',sans-serif;font-weight:400;outline:none;resize:none;min-height:20px;max-height:90px;line-height:1.5;padding:4px 0}
.w-textarea::placeholder{color:#bbb;font-weight:400}
.w-send{width:28px;height:28px;border-radius:50%;background:#e5e5e5;color:#999;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .15s ease;cursor:pointer;border:none}
.w-send.ready{background:#1a1a1a;color:#fff}
.w-send.ready:hover{background:#333;transform:scale(1.05)}
.w-send.ready:active{transform:scale(0.95)}
.w-send svg{width:14px;height:14px;stroke-width:2}
.w-footer{font-size:10px;color:#bbb;text-align:center;padding-top:8px;font-weight:400}

/* Responsive */
@media(max-width:480px){
.w-root{bottom:0;right:0;left:0}
.w-fab{position:fixed;bottom:14px;right:14px;z-index:2147483647}
.w-panel{position:fixed;inset:0;width:100%;height:100dvh;max-height:100dvh;border-radius:0;transform:translateY(100%);z-index:2147483647;overflow:hidden}
.w-panel.open{transform:translateY(0)}
.w-body{flex:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
.w-header{padding-top:max(14px,env(safe-area-inset-top))}
.w-input-area{padding-bottom:max(12px,env(safe-area-inset-bottom))}
.w-textarea{font-size:16px}
}
</style>
