:root{--brand:#1e3a8a;--brand-hover:#1e40af;--brand-contrast:#fff;--brand-gradient:linear-gradient(135deg, #2156c9 0%, #1e40af 55%, #1e3a8a 100%);--accent:#2563eb;--accent-soft:#eef3ff;--alert:#e11d1d;--success:#22c55e;--bg:#fff;--surface:#f3f6fc;--border:#e3e8f2;--text:#1f2937;--muted:#6b7280;--danger:#b42318;--font:"Inter", system-ui, -apple-system, "Segoe UI", sans-serif;--radius:10px;--radius-sm:6px;--radius-pill:999px;--shadow:0 12px 40px #1e3a8a38;--shadow-sm:0 2px 10px #1e3a8a14}
*,:before,:after{box-sizing:border-box}html,body{color:var(--text);font-family:var(--font);background:#f5f7fb;margin:0}.demo{place-items:center;min-height:100vh;padding:24px 16px;display:grid}.demo-hero{text-align:center;border-radius:var(--radius);background:var(--brand-gradient);color:#fff;width:100%;max-width:1100px;box-shadow:var(--shadow-sm);padding:56px 24px}.demo-hero h1{margin:14px 0 10px;font-size:clamp(26px,4.5vw,38px);font-weight:700}.demo-hero p{opacity:.9;max-width:560px;margin:0 auto;line-height:1.6}.demo-badge{border-radius:var(--radius-pill);background:#ffffff26;border:1px solid #ffffff4d;padding:6px 14px;font-size:13px;font-weight:500;display:inline-block}.dhc-launcher{z-index:9999;background:var(--brand-gradient);width:60px;height:60px;color:var(--brand-contrast);cursor:pointer;box-shadow:var(--shadow);border:0;border-radius:50%;place-items:center;transition:transform .2s,background .2s;display:grid;position:fixed;bottom:22px;right:22px}.dhc-launcher:hover{filter:brightness(1.08);transform:scale(1.05)}.dhc-launcher:not(.is-open):after{content:"";background:var(--alert);border:2px solid var(--bg);border-radius:50%;width:12px;height:12px;position:absolute;top:6px;right:6px}.dhc-panel{z-index:9998;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);width:390px;height:min(620px,100vh - 120px);box-shadow:var(--shadow);font-family:var(--font);flex-direction:column;animation:.22s ease-out dhc-in;display:flex;position:fixed;bottom:94px;right:22px;overflow:hidden}@keyframes dhc-in{0%{opacity:0;transform:translateY(12px)scale(.98)}}.dhc-header{background:var(--brand-gradient);color:var(--brand-contrast);align-items:center;gap:10px;padding:14px 12px 14px 16px;display:flex}.dhc-avatar{width:38px;height:38px;color:var(--brand);background:#fff;border-radius:50%;flex-shrink:0;place-items:center;display:grid;box-shadow:0 0 0 2px #ffffff59}.dhc-title{flex:1;min-width:0;line-height:1.25}.dhc-title strong{font-size:15px;font-weight:600;display:block}.dhc-title span{opacity:.85;font-size:12px}.dhc-dot{background:var(--success);border-radius:50%;width:7px;height:7px;margin-right:4px;display:inline-block}.dhc-icon-btn{width:34px;height:34px;color:inherit;cursor:pointer;opacity:.85;background:0 0;border:0;border-radius:8px;place-items:center;display:grid}.dhc-icon-btn:hover{opacity:1;background:#ffffff24}.dhc-messages{flex-direction:column;flex:1;gap:10px;padding:16px 14px;display:flex;overflow-y:auto}.dhc-row{display:flex}.dhc-row.user{justify-content:flex-end}.dhc-bubble{border-radius:var(--radius);overflow-wrap:anywhere;max-width:85%;padding:10px 14px;font-size:14px;line-height:1.55}.dhc-row.user .dhc-bubble{background:var(--brand);color:var(--brand-contrast);white-space:pre-wrap;border-bottom-right-radius:4px}.dhc-row.assistant .dhc-bubble{background:var(--surface);border:1px solid var(--border);color:var(--text);border-bottom-left-radius:4px}.dhc-bubble.error{color:var(--danger);background:#fdecea}.dhc-bubble p{margin:0 0 8px}.dhc-bubble p:last-child,.dhc-bubble ul:last-child,.dhc-bubble ol:last-child{margin-bottom:0}.dhc-bubble ul,.dhc-bubble ol{margin:4px 0 8px;padding-left:20px}.dhc-bubble li{margin:3px 0}.dhc-bubble a{color:var(--accent);text-underline-offset:2px;font-weight:600;-webkit-text-decoration:underline #2563eb59;text-decoration:underline #2563eb59}.dhc-bubble strong{font-weight:600}.dhc-bubble table{border-collapse:collapse;width:100%;margin:6px 0;font-size:13px;display:block;overflow-x:auto}.dhc-bubble th,.dhc-bubble td{border:1px solid var(--border);text-align:left;white-space:nowrap;padding:5px 7px}.dhc-bubble th{background:var(--accent-soft)}.dhc-retry{border-radius:var(--radius-pill);color:inherit;font:inherit;cursor:pointer;background:0 0;border:1px solid;margin-top:8px;padding:5px 12px;font-size:12px;display:block}.dhc-typing{flex-wrap:wrap;align-items:center;gap:5px;display:flex}.dhc-typing span{background:var(--muted);border-radius:50%;width:7px;height:7px;animation:1.2s infinite dhc-bounce}.dhc-typing span:nth-child(2){animation-delay:.15s}.dhc-typing span:nth-child(3){animation-delay:.3s}.dhc-typing em{color:var(--muted);flex-basis:100%;margin-top:4px;font-size:12px;font-style:normal}@keyframes dhc-bounce{0%,60%,to{opacity:.5;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}.dhc-chips{flex-wrap:wrap;gap:8px;margin-top:4px;display:flex}.dhc-chips button{border-radius:var(--radius-pill);background:var(--accent-soft);color:var(--brand);font-weight:500;font:inherit;cursor:pointer;border:1px solid #d6e2ff;padding:7px 12px;font-size:13px;transition:border-color .15s,background .15s}.dhc-chips button:hover{border-color:var(--brand);background:var(--brand);color:var(--brand-contrast)}.dhc-input{border-top:1px solid var(--border);align-items:flex-end;gap:8px;padding:10px 12px;display:flex}.dhc-input textarea{resize:none;border:1px solid var(--border);border-radius:var(--radius-sm);font:inherit;color:var(--text);background:var(--bg);outline:none;flex:1;max-height:120px;padding:10px 12px;font-size:14px}.dhc-input textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #2563eb26}.dhc-input button{border-radius:var(--radius-sm);background:var(--brand);width:42px;height:42px;color:var(--brand-contrast);cursor:pointer;border:0;flex-shrink:0;place-items:center;display:grid}.dhc-input button:hover:not(:disabled){background:var(--brand-hover)}.dhc-input button:disabled{opacity:.4;cursor:not-allowed}.dhc-foot{color:var(--muted);text-align:center;margin:0;padding:0 12px 10px;font-size:11px}@media (max-width:480px){.dhc-panel{border:0;border-radius:0;width:100%;height:100%;inset:0}.dhc-launcher.is-open{display:none}}
