.zcb-app{--blue:#2563eb;--ink:#172033;--muted:#65748a;--line:#e8edf4;color:var(--ink);font-family:inherit}
html.zcb-chat-open{overflow:hidden}
.zcb-app .zcb-launcher,.zcb-app .zcb-close{box-sizing:border-box;display:grid;place-items:center;margin:0;padding:0;border:0;min-height:0;min-width:0;cursor:pointer}
.zcb-app .zcb-launcher{position:fixed;z-index:10000;right:calc(22px + env(safe-area-inset-right,0px));bottom:calc(22px + env(safe-area-inset-bottom,0px));width:54px;height:54px;border-radius:50%;background:var(--blue);color:white;box-shadow:0 4px 16px rgba(24,68,154,.26);touch-action:none;cursor:grab}
.zcb-app .zcb-launcher.zcb-launcher-custom{right:auto;bottom:auto}
.zcb-app .zcb-launcher.zcb-launcher-dragging{cursor:grabbing;user-select:none}
.zcb-app .zcb-launcher:hover{background:#1d4ed8}
.zcb-app :is(.zcb-launcher,.zcb-close)>svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.zcb-app .zcb-dialog:not([open]),.zcb-app .zcb-composer .zcb-attach[hidden]{display:none}
.zcb-app .zcb-dialog[open]{position:fixed;inset:0;margin:auto;box-sizing:border-box;display:block;width:min(600px,calc(100% - 26px));height:min(570px,calc(100vh - 26px));height:min(570px,calc(100dvh - 26px));max-width:none;max-height:none;padding:0;border:1px solid var(--line);border-radius:17px;overflow:hidden;background:#fff;color:var(--ink);box-shadow:0 18px 55px rgba(0,0,0,.2)}
.zcb-dialog::backdrop{background:rgba(15,23,42,.46)}
.zcb-dialog .zcb-shell{height:100%;display:flex;flex-direction:column;background:#fff}
.zcb-dialog .zcb-header{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line);background:#fff}
.zcb-headings{flex:1;min-width:0}
.zcb-dialog .zcb-title{font-size:17px;font-weight:700;line-height:1.4;margin:0;color:inherit}
.zcb-status:not(:empty){font-size:12px;color:var(--muted);margin-top:4px}
.zcb-app .zcb-close{width:36px;height:36px;flex:0 0 36px;border-radius:9px;background:transparent;color:#596579;box-shadow:none}
.zcb-app .zcb-close:hover{background:#f1f5fa}
.zcb-app .zcb-close>svg{width:18px;height:18px}
.zcb-dialog .zcb-messages{padding:18px 20px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;background:#fff}
.zcb-app .zcb-message{display:flex;justify-content:flex-start;margin:0 0 18px;animation:zcb-message-in .35s ease-out both}
.zcb-app .zcb-message.customer{justify-content:flex-end}
.zcb-content{display:flex;flex-direction:column;max-width:min(82%,650px)}.zcb-message.customer .zcb-content{align-items:flex-end}
.zcb-bubble{padding:12px 15px;border-radius:5px 18px 18px 18px;background:#f0f4f9;color:#29364a;font-size:14px;line-height:1.8;overflow-wrap:anywhere}
.zcb-message.customer .zcb-bubble{background:linear-gradient(135deg,#2563eb,#3478ef);color:#fff;border-radius:18px 5px 18px 18px}
.zcb-message.customer .zcb-bubble{white-space:pre-line}
.zcb-bubble.zcb-rich-answer p{margin:0 0 .65em}
.zcb-bubble.zcb-rich-answer :is(ul,ol){padding-inline-start:1.5em;margin:.4em 0}
.zcb-bubble.zcb-rich-answer>:first-child{margin-top:0}
.zcb-bubble.zcb-rich-answer>:last-child{margin-bottom:0}
.zcb-bubble.zcb-rich-answer a{color:#1d4ed8;text-decoration:underline}
.zcb-typing .zcb-typing-bubble{display:flex;align-items:center;gap:5px;padding:13px 15px}
.zcb-typing-bubble span{display:block;width:6px;height:6px;border-radius:50%;background:#65748a;animation:zcb-typing-dot .9s ease-in-out infinite}
.zcb-typing-bubble span:nth-child(2){animation-delay:.12s}
.zcb-typing-bubble span:nth-child(3){animation-delay:.24s}
.zcb-time{font-size:10px;color:#a0aaba;margin:5px 4px 0}.zcb-message.customer .zcb-time{text-align:right}
.zcb-suggestions{margin:8px 0 18px}.zcb-suggestion-label{font-size:12px;color:var(--muted);margin:0 0 10px 2px}.zcb-suggestion-list{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.zcb-suggestion{display:flex;justify-content:space-between;padding:12px 14px;background:#fff;border:1px solid var(--line);border-radius:13px;color:#344256;font-size:13px;cursor:pointer;text-align:left}.zcb-suggestion:hover{border-color:#a9c5fb;color:var(--blue)}.zcb-suggestion:disabled{opacity:.65;cursor:wait}
.zcb-composer{display:flex;align-items:center;gap:9px;margin:0 20px 10px;padding:8px 9px 8px 12px;border:1px solid #dfe6ef;border-radius:18px;background:#fff;box-shadow:0 5px 18px rgba(30,50,80,.05);position:relative}
.zcb-composer:focus-within{border-color:#a9c5fb;box-shadow:0 0 0 3px rgba(37,99,235,.07)}
.zcb-tools{display:flex;align-items:center;gap:3px;position:relative}
.zcb-app .zcb-composer button:is(.zcb-tool,.zcb-send){box-sizing:border-box;width:var(--zcb-button-size);height:var(--zcb-button-size);min-width:0;min-height:0;flex:0 0 var(--zcb-button-size);display:grid;place-items:center;line-height:1;padding:0;margin:0;border:0;cursor:pointer}
.zcb-app .zcb-composer .zcb-tool{--zcb-button-size:36px;border-radius:10px;background:transparent;color:#65748a;box-shadow:none}
.zcb-app .zcb-composer .zcb-tool:hover{background:#f1f5fa;color:var(--blue)}
.zcb-app .zcb-composer button:is(.zcb-tool,.zcb-send)>svg{display:block;width:21px;height:21px;max-width:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.zcb-input{flex:1;min-width:0;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;padding:9px 0!important;font-size:14px!important;color:var(--ink)!important}
.zcb-app .zcb-composer .zcb-send{--zcb-button-size:34px;border-radius:50%;background:var(--blue);color:#fff;box-shadow:0 2px 6px rgba(37,99,235,.18)}
.zcb-app .zcb-composer .zcb-send:hover{background:#1d4ed8}
.zcb-app .zcb-composer .zcb-send>svg{width:17px;height:17px;stroke-width:2}
.zcb-app .zcb-composer button:is(.zcb-tool,.zcb-send):disabled{opacity:.55;cursor:wait}.zcb-file{display:none!important}
.zcb-footnote{text-align:center;font-size:11px;color:#a0a9b6;padding:0 10px 15px}
.zcb-emoji-panel{position:absolute;bottom:45px;left:0;width:270px;max-height:230px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 35px rgba(20,35,60,.16);padding:10px;z-index:10;grid-template-columns:repeat(7,1fr);gap:4px}
.zcb-emoji-panel:not([hidden]){display:grid}.zcb-emoji{border:0;background:transparent;border-radius:7px;font-size:21px;padding:5px;cursor:pointer}.zcb-emoji:hover{background:#eff5ff}
.zcb-upload-preview{padding:0 22px 10px;color:#657286;font-size:12px;white-space:pre-line;overflow-wrap:anywhere}.zcb-upload-preview:not([hidden]){display:block}.zcb-upload-preview.is-error{color:#b42318}
.zcb-attachment{display:block;max-width:min(300px,100%);border-radius:12px;margin-top:5px}.zcb-attachment-video{width:min(340px,100%);max-height:240px;background:#111}
@keyframes zcb-message-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes zcb-typing-dot{0%,65%,100%{transform:translateY(0);opacity:.55}30%{transform:translateY(-4px);opacity:1}}
@media(prefers-reduced-motion:reduce){.zcb-app .zcb-message,.zcb-typing-bubble span{animation:none}}
@media(max-width:600px){.zcb-app .zcb-launcher{right:calc(14px + env(safe-area-inset-right,0px));bottom:calc(14px + env(safe-area-inset-bottom,0px));width:48px;height:48px}.zcb-app .zcb-dialog[open]{width:calc(100% - 16px);height:min(610px,calc(100vh - 16px));height:min(610px,calc(100dvh - 16px))}.zcb-dialog .zcb-header{padding:10px 13px}.zcb-dialog .zcb-messages{padding:14px 12px}.zcb-suggestion-list{grid-template-columns:1fr}.zcb-composer{margin:0 9px 8px;gap:5px}.zcb-content{max-width:88%}.zcb-app .zcb-input{font-size:16px!important}.zcb-app .zcb-composer .zcb-tool{--zcb-button-size:34px}.zcb-app .zcb-composer .zcb-send{--zcb-button-size:32px}.zcb-emoji-panel{width:min(250px,calc(100vw - 64px))}}
/* 给手机端固定底部导航留出空间，并保留系统安全区。 */
@media(max-width:767px){.zcb-app .zcb-launcher{bottom:calc(84px + env(safe-area-inset-bottom,0px))}}
