.kefu-root,.kefu-root *{box-sizing:border-box}.kefu-root{position:fixed;z-index:var(--kefu-z);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans SC",sans-serif;color:#111827}.kefu-right{right:var(--kefu-x);bottom:calc(var(--kefu-y) + env(safe-area-inset-bottom,0px))}.kefu-left{left:var(--kefu-x);bottom:calc(var(--kefu-y) + env(safe-area-inset-bottom,0px))}.kefu-fab{min-width:88px;height:56px;border:0!important;border-radius:999px!important;background:#111827!important;color:#fff!important;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 18px!important;box-shadow:0 12px 32px rgba(0,0,0,.22);cursor:pointer;font:600 14px/1 inherit!important}.kefu-fab svg{width:22px;height:22px;fill:currentColor}.kefu-badge{position:absolute;right:-4px;top:-4px;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;font:700 11px/20px inherit;text-align:center}.kefu-panel{position:absolute;right:0;bottom:72px;width:380px;height:560px;max-height:calc(var(--kefu-vvh,100dvh) - 110px);border:1px solid #e5e7eb;border-radius:18px;background:#fff;box-shadow:0 18px 60px rgba(15,23,42,.24);overflow:hidden;display:flex;flex-direction:column}.kefu-panel[hidden]{display:none!important}.kefu-left .kefu-panel{left:0;right:auto}.kefu-header{display:flex;align-items:flex-start;justify-content:space-between;padding:14px 16px;background:#111827;color:#fff}.kefu-title{display:inline;font-size:15px}.kefu-title-wrap{min-width:0;flex:1}.kefu-title-line{display:flex;align-items:center;gap:4px;min-width:0}.kefu-scope-wrap{font-size:12px;color:#d1d5db;white-space:nowrap}.kefu-scope-select{max-width:150px;border:1px solid rgba(255,255,255,.28)!important;border-radius:999px!important;background:rgba(255,255,255,.12)!important;color:#fff!important;padding:2px 20px 2px 8px!important;font:600 12px/1.2 inherit!important;cursor:pointer}.kefu-scope-select:disabled{cursor:default;opacity:.72}.kefu-scope-select option{color:#111827;background:#fff}.kefu-scope-help{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-left:4px;border:1px solid rgba(255,255,255,.32)!important;border-radius:999px!important;background:rgba(255,255,255,.12)!important;color:#fff!important;font:700 12px/1 inherit!important;cursor:pointer;padding:0!important}.kefu-scope-help:hover{background:rgba(255,255,255,.2)!important}.kefu-scope-pop{margin:8px 0 0;max-width:100%;border:1px solid rgba(255,255,255,.22);border-radius:10px;background:rgba(255,255,255,.1);color:#f9fafb;padding:7px 9px;font-size:10px!important;line-height:1.35!important;font-weight:400!important;font-family:inherit!important;white-space:normal}.kefu-scope-pop div{font-size:inherit!important;line-height:inherit!important}.kefu-scope-help-divider{height:1px;margin:6px 0;border-top:1px solid rgba(255,255,255,.26)}.kefu-scope-pop[hidden],.kefu-scope-help[hidden]{display:none!important}.kefu-tip{display:block;margin-top:4px;color:#d1d5db;font-size:12px;line-height:1.35}.kefu-close{width:32px;height:32px;border:0!important;border-radius:8px!important;background:rgba(255,255,255,.12)!important;color:#fff!important;font-size:24px!important;line-height:28px!important;cursor:pointer}.kefu-status{padding:8px 12px;background:#eff6ff;color:#1d4ed8;font-size:12px}.kefu-status[data-kind="error"]{background:#fef2f2;color:#b91c1c}.kefu-status[data-kind="warning"]{background:#fffbeb;color:#92400e}.kefu-pairs{flex:1;min-height:0;overflow:auto;padding:16px;background:#f8fafc;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.kefu-message{display:flex;margin:0 0 10px}.kefu-message-user{justify-content:flex-end}.kefu-bubble{max-width:84%;padding:10px 12px;border-radius:13px;background:#fff;color:#1f2937;box-shadow:0 1px 2px rgba(15,23,42,.08);white-space:pre-wrap;overflow-wrap:anywhere;font:400 14px/1.55 inherit}.kefu-message-user .kefu-bubble{background:#111827;color:#fff;border-bottom-right-radius:4px}.kefu-message-assistant .kefu-bubble{border-bottom-left-radius:4px}.kefu-pending .kefu-bubble{color:#6b7280}.kefu-suggestions{margin:0 0 12px 6px;display:flex;flex-direction:column;align-items:flex-start;gap:7px}.kefu-suggestions-hint{font-size:12px;color:#6b7280}.kefu-suggestion{max-width:88%;text-align:left;border:1px solid #bfdbfe!important;background:#eff6ff!important;color:#1d4ed8!important;border-radius:999px!important;padding:7px 11px!important;font:500 13px/1.35 inherit!important;cursor:pointer;white-space:normal}.kefu-suggestion:hover{background:#dbeafe!important}.kefu-feedback{margin:2px 0 12px 6px;font-size:12px;color:#6b7280}.kefu-feedback button{margin-left:6px;border:1px solid #d1d5db!important;background:#fff!important;border-radius:999px!important;padding:4px 10px!important;color:#374151!important;font-size:12px!important;cursor:pointer}.kefu-pair-divider{margin:12px 0 16px;border-top:1px dashed #cbd5e1}.kefu-pair:last-child .kefu-pair-divider{margin-bottom:4px}.kefu-form{display:block;padding:12px;margin:0;border:0;border-top:1px solid #e5e7eb;background:#fff}.kefu-input{display:block;width:100%!important;min-width:0!important;min-height:66px;max-height:130px;resize:vertical;padding:10px 11px!important;border:1px solid #d1d5db!important;border-radius:10px!important;background:#fff!important;color:#111827!important;font:400 16px/1.5 inherit!important}.kefu-form-row{display:flex;align-items:center;justify-content:space-between;margin-top:8px}.kefu-count{color:#6b7280;font-size:11px}.kefu-count[data-over="1"]{color:#b91c1c}.kefu-send{min-width:70px;height:36px;padding:0 16px!important;border:0!important;border-radius:9px!important;background:#2563eb!important;color:#fff!important;cursor:pointer;font:600 14px/1 inherit!important}.kefu-send:hover{background:#1d4ed8!important}.kefu-send:disabled{opacity:.55;cursor:not-allowed}.kefu-shortcut{display:inline-flex;align-items:baseline;gap:.18em;vertical-align:baseline;border:0!important;background:transparent!important;color:#dc2626!important;padding:0 .05em!important;cursor:pointer;font:600 1em/1.35 inherit!important;text-decoration:none!important;border-radius:0!important;box-shadow:none!important}.kefu-shortcut-label{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-thickness:1px;text-underline-offset:3px}.kefu-shortcut::before{content:"›";font-size:.9em;opacity:.68}.kefu-shortcut::after{content:"‹";font-size:.9em;opacity:.68}.kefu-shortcut:hover{opacity:.86}.kefu-shortcut:focus{outline:2px solid rgba(220,38,38,.35);outline-offset:2px}.kefu-mobile .kefu-panel{position:fixed;left:0!important;right:0!important;bottom:env(safe-area-inset-bottom,0px)!important;width:auto;height:calc(var(--kefu-vvh,100dvh) - env(safe-area-inset-top,0px));max-height:calc(var(--kefu-vvh,100dvh) - env(safe-area-inset-top,0px));border-radius:18px 18px 0 0}.kefu-mobile.kefu-admin-bar .kefu-panel{height:calc(var(--kefu-vvh,100dvh) - 46px - env(safe-area-inset-top,0px));max-height:calc(var(--kefu-vvh,100dvh) - 46px - env(safe-area-inset-top,0px))}.kefu-mobile.kefu-open .kefu-fab{display:none!important}.kefu-mobile .kefu-fab-label{display:none}.kefu-mobile .kefu-fab{min-width:56px;padding:0!important}@media(prefers-reduced-motion:no-preference){.kefu-fab{transition:transform .15s ease}.kefu-panel{animation:kefu-in .15s ease-out}@keyframes kefu-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}}
.kefu-new-reply{position:absolute;left:50%;bottom:96px;transform:translateX(-50%);z-index:2;border:0!important;border-radius:999px!important;background:#2563eb!important;color:#fff!important;box-shadow:0 8px 24px rgba(37,99,235,.25);padding:7px 13px!important;font:600 12px/1 inherit!important;cursor:pointer}.kefu-new-reply[hidden]{display:none!important}.kefu-suggest-bubble{width:auto}.kefu-suggestions-title{margin-bottom:6px}.kefu-suggestions-list{display:flex;flex-direction:column;align-items:stretch;gap:2px;margin:0 0 6px}.kefu-suggestion-line{display:block;width:100%;text-align:left;border:0!important;background:transparent!important;color:#1d4ed8!important;border-radius:6px!important;padding:4px 2px!important;font:500 14px/1.5 inherit!important;cursor:pointer;white-space:normal}.kefu-suggestion-line:hover{background:#eff6ff!important}.kefu-message-suggest .kefu-bubble{max-width:88%}

.kefu-answer-line{margin:0 0 4px}.kefu-answer-line:last-child{margin-bottom:0}.kefu-answer-tag{display:inline-flex;vertical-align:baseline;margin-right:6px;border-radius:999px;padding:2px 7px;background:#fff8e1;color:#92400e;font:700 12px/1.2 inherit}
.kefu-root .kefu-input{font-size:16px!important;-webkit-text-size-adjust:100%!important;-webkit-appearance:none!important;appearance:none!important;touch-action:manipulation;transform:translateZ(0)}
.kefu-answer-text{white-space:pre-wrap;margin:0 0 8px}.kefu-answer-text:last-child{margin-bottom:0}
.kefu-message-user{flex-direction:row;align-items:flex-end;justify-content:flex-end}.kefu-user-meta{margin:0 6px 2px 0;color:#9ca3af;font:500 10px/1.2 inherit}.kefu-thinking-dots{display:inline-flex;gap:2px;margin-left:2px;vertical-align:baseline}.kefu-thinking-dots i{display:block;width:3px;height:3px;border-radius:999px;background:currentColor;opacity:.35;animation:kefu-dot 1.05s infinite ease-in-out}.kefu-thinking-dots i:nth-child(2){animation-delay:.15s}.kefu-thinking-dots i:nth-child(3){animation-delay:.3s}@keyframes kefu-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}

/* v0.7.15: read marker outside the user bubble, lower-left like chat apps */
.kefu-message-user{flex-direction:row;align-items:flex-end;justify-content:flex-end}
.kefu-message-user .kefu-bubble{display:block}
.kefu-user-read{display:inline-flex;align-items:center;margin:0 4px 1px 0;color:#9ca3af;font:500 6px/1.1 inherit;white-space:nowrap;user-select:none}
.kefu-user-meta{display:none!important}


/* 人工客服联系方式卡片 */
.kefu-contact-card{margin-top:10px;border:1px solid #dbe3ee;border-radius:14px;background:#f8fafc;overflow:hidden;white-space:normal}
.kefu-answer-text+.kefu-contact-card{margin-top:12px}
.kefu-contact-title{padding:10px 12px;background:#eef2ff;color:#312e81;text-align:center;font:700 14px/1.35 inherit;border-bottom:1px solid #dbe3ee}
.kefu-contact-notice{padding:11px 12px 4px;color:#475569;font:400 13px/1.55 inherit;white-space:pre-wrap}
.kefu-contact-methods{display:flex;flex-direction:column;gap:10px;padding:10px 12px 12px}
.kefu-contact-method{border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:10px}
.kefu-contact-method-title{margin-bottom:8px;color:#0f172a;text-align:center;font:700 13px/1.35 inherit}
.kefu-contact-account-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border-radius:9px;background:#f1f5f9}
.kefu-contact-account{min-width:0;color:#0f172a;font:600 13px/1.4 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;overflow-wrap:anywhere;user-select:all}
.kefu-contact-copy{flex:0 0 auto;border:1px solid #bfdbfe!important;border-radius:999px!important;background:#eff6ff!important;color:#1d4ed8!important;padding:5px 9px!important;font:600 12px/1 inherit!important;cursor:pointer}
.kefu-contact-copy:hover{background:#dbeafe!important}
.kefu-contact-copy:disabled{opacity:.72;cursor:default}
.kefu-contact-qr-wrap{display:flex;flex-direction:column;align-items:center;margin:10px 0 0}
.kefu-contact-qr{display:block;width:min(160px,65vw);max-width:100%;aspect-ratio:1/1;object-fit:contain;box-sizing:border-box;padding:8px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;box-shadow:0 4px 14px rgba(15,23,42,.08)}
.kefu-contact-qr[hidden]{display:none!important}
.kefu-contact-qr-caption{margin-top:7px;color:#64748b;text-align:center;font:400 11px/1.4 inherit}
.kefu-contact-qr-error{padding:12px;color:#b45309;text-align:center;font:500 12px/1.4 inherit}
.kefu-contact-qr-error[hidden]{display:none!important}
.kefu-contact-hours{padding:9px 12px;border-top:1px solid #e2e8f0;background:#fff;color:#64748b;text-align:center;font:500 11px/1.35 inherit}
.kefu-contact-empty{padding:12px;border-radius:10px;background:#fff7ed;color:#9a3412;text-align:center;font:500 12px/1.5 inherit}

/* 单问题处理中的输入区域状态 */
.kefu-composer-fields[hidden],.kefu-composer-thinking[hidden]{display:none!important}
.kefu-form-thinking{padding:10px 12px}
.kefu-composer-thinking{position:relative;display:flex;min-height:92px;align-items:center;justify-content:center;gap:14px;overflow:hidden;border:1px solid #dbeafe;border-radius:14px;background:linear-gradient(135deg,#f8fafc 0%,#eff6ff 52%,#eef2ff 100%);color:#1e3a8a;padding:16px 18px}
.kefu-composer-thinking::before{content:"";position:absolute;inset:-45%;background:conic-gradient(from 90deg,transparent,rgba(59,130,246,.08),transparent 35%);animation:kefu-thinking-sheen 3.6s linear infinite;pointer-events:none}
.kefu-thinking-orbit{position:relative;z-index:1;display:block;flex:0 0 42px;width:42px;height:42px;border:2px solid rgba(37,99,235,.16);border-radius:999px}
.kefu-thinking-orbit::before{content:"";position:absolute;inset:7px;border-radius:999px;background:rgba(37,99,235,.08);animation:kefu-thinking-pulse 1.35s ease-in-out infinite}
.kefu-thinking-orbit i{position:absolute;left:50%;top:50%;width:7px;height:7px;margin:-3.5px;border-radius:999px;background:#2563eb;transform-origin:3.5px 3.5px}
.kefu-thinking-orbit i:nth-child(1){animation:kefu-orbit-a 1.4s linear infinite}
.kefu-thinking-orbit i:nth-child(2){opacity:.72;animation:kefu-orbit-b 1.4s linear infinite}
.kefu-thinking-orbit i:nth-child(3){opacity:.42;animation:kefu-orbit-c 1.4s linear infinite}
.kefu-thinking-copy{position:relative;z-index:1;display:flex;min-width:0;flex-direction:column;gap:4px}
.kefu-thinking-copy strong{color:#1e3a8a;font:700 14px/1.35 inherit}
.kefu-thinking-copy small{color:#64748b;font:400 12px/1.45 inherit}
@keyframes kefu-orbit-a{from{transform:rotate(0deg) translateX(16px)}to{transform:rotate(360deg) translateX(16px)}}
@keyframes kefu-orbit-b{from{transform:rotate(120deg) translateX(16px)}to{transform:rotate(480deg) translateX(16px)}}
@keyframes kefu-orbit-c{from{transform:rotate(240deg) translateX(16px)}to{transform:rotate(600deg) translateX(16px)}}
@keyframes kefu-thinking-pulse{0%,100%{transform:scale(.82);opacity:.45}50%{transform:scale(1);opacity:1}}
@keyframes kefu-thinking-sheen{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.kefu-composer-thinking::before,.kefu-thinking-orbit::before,.kefu-thinking-orbit i{animation:none!important}.kefu-thinking-orbit i:nth-child(1){transform:translateX(14px)}.kefu-thinking-orbit i:nth-child(2){transform:rotate(120deg) translateX(14px)}.kefu-thinking-orbit i:nth-child(3){transform:rotate(240deg) translateX(14px)}}
