#clewis-chat{position:fixed;right:22px;bottom:78px;z-index:99998;font:14px/1.5 Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#17324a}#clewis-chat *{box-sizing:border-box}.cw-chat-launch{display:flex;align-items:center;gap:9px;min-height:50px;padding:8px 18px 8px 9px;border:0;border-radius:27px;background:linear-gradient(135deg,#1687f1,#0d62c4);color:#fff;box-shadow:0 12px 34px rgba(0,70,150,.3);font:inherit;font-size:14px;font-weight:700;cursor:pointer}.cw-chat-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.18);font-size:21px}.cw-chat-launch b{position:absolute;right:-2px;top:-5px;min-width:21px;height:21px;padding:0 5px;border:2px solid #fff;border-radius:12px;background:#ef5360;font-size:10px;line-height:17px}.cw-chat-panel{position:absolute;right:0;bottom:62px;width:min(380px,calc(100vw - 28px));overflow:hidden;border:1px solid #d7e3ec;border-radius:18px;background:#fff;box-shadow:0 22px 70px rgba(4,30,54,.26)}.cw-chat-panel[hidden]{display:none}.cw-chat-panel>header{display:flex;align-items:center;justify-content:space-between;padding:19px 20px;background:linear-gradient(120deg,#071f35,#0b4c7d);color:#fff}.cw-chat-panel header strong{display:block;font-size:16px}.cw-chat-panel header small{display:flex;align-items:center;gap:6px;margin-top:3px;color:#b9d1e4}.cw-chat-panel header small i{width:7px;height:7px;border-radius:50%;background:#4cdb9b;box-shadow:0 0 0 4px rgba(76,219,155,.13)}.cw-chat-close{width:34px;height:34px;border:1px solid rgba(255,255,255,.2);border-radius:9px;background:rgba(255,255,255,.08);color:#fff;font-size:22px;cursor:pointer}.cw-chat-messages{height:300px;padding:18px;overflow:auto;background:#f5f8fb;scroll-behavior:smooth}.cw-chat-welcome{margin:0 36px 13px 0;padding:11px 13px;border:1px solid #dbe6ef;border-radius:5px 13px 13px;background:#fff;color:#536d82}.cw-chat-message{max-width:82%;margin:9px 0;padding:10px 12px;border-radius:13px;word-break:break-word}.cw-chat-message.visitor{margin-left:auto;border-radius:13px 5px 13px 13px;background:#1677e8;color:#fff}.cw-chat-message.admin{margin-right:auto;border:1px solid #dbe6ef;border-radius:5px 13px 13px;background:#fff}.cw-chat-message time{display:block;margin-top:4px;font-size:9px;opacity:.68}.cw-chat-profile{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px 12px 0;background:#fff}.cw-chat-profile input{min-width:0;height:34px;padding:7px 9px;border:1px solid #d7e1e9;border-radius:8px;outline:none}.cw-chat-panel form{display:grid;grid-template-columns:1fr auto;gap:8px;padding:9px 12px 10px}.cw-chat-panel textarea{min-height:54px;max-height:120px;padding:9px 10px;border:1px solid #ccd9e3;border-radius:9px;resize:none;outline:none;font:14px inherit}.cw-chat-panel input:focus,.cw-chat-panel textarea:focus{border-color:#2785e4;box-shadow:0 0 0 3px rgba(39,133,228,.1)}.cw-chat-panel form button{align-self:stretch;padding:0 15px;border:0;border-radius:9px;background:#1677e8;color:#fff;font-weight:750;cursor:pointer}.cw-chat-panel footer{padding:0 14px 12px;color:#8295a5;font-size:10px}@media(max-width:600px){#clewis-chat{right:14px;bottom:72px}.cw-chat-launch>span:last-of-type{display:none}.cw-chat-launch{padding-right:9px}.cw-chat-panel{position:fixed;right:10px;bottom:70px;left:10px;width:auto}.cw-chat-messages{height:min(320px,45vh)}.cw-chat-profile{grid-template-columns:1fr}}
#clewis-chat .cw-chat-compose{position:relative;display:grid;grid-template-columns:36px minmax(0,1fr);gap:6px;padding:9px 12px 10px}#clewis-chat .cw-chat-compose form{padding:0;min-width:0}#clewis-chat .cw-emoji-toggle{width:36px;height:36px;padding:0;border:1px solid #d2dee7;border-radius:9px;background:#f7fafc;color:#405d74;font-size:20px;cursor:pointer}#clewis-chat .cw-emoji-picker{position:absolute;left:0;bottom:44px;display:grid;grid-template-columns:repeat(6,36px);gap:4px;padding:9px;border:1px solid #d6e1e9;border-radius:12px;background:#fff;box-shadow:0 14px 38px rgba(10,43,70,.2)}#clewis-chat .cw-emoji-picker[hidden]{display:none}#clewis-chat .cw-emoji-picker button{width:36px;height:34px;padding:0;border:0;border-radius:7px;background:transparent;font-size:20px;cursor:pointer}#clewis-chat .cw-emoji-picker button:hover{background:#edf6ff}
#clewis-chat .cw-chat-panel{width:380px;max-width:calc(100vw - 44px);min-width:320px}#clewis-chat .cw-chat-panel>header{width:100%}#clewis-chat .cw-chat-panel header>div{min-width:0;padding-right:12px}#clewis-chat .cw-chat-panel header strong,#clewis-chat .cw-chat-panel header small{white-space:normal;word-break:normal}#clewis-chat .cw-chat-profile,#clewis-chat .cw-chat-compose,#clewis-chat .cw-chat-compose form{width:100%}#clewis-chat .cw-chat-panel textarea{width:100%;min-width:0;font:inherit;font-size:14px}#clewis-chat .cw-chat-panel form button{min-width:74px;white-space:nowrap}@media(max-width:600px){#clewis-chat .cw-chat-panel{width:auto;max-width:none;min-width:0}}
.backtop,.back-to-top{bottom:145px!important;z-index:99999!important}@media(max-width:600px){.backtop,.back-to-top{bottom:132px!important}}

/* Mobile chat uses the actual visual viewport so Safari chrome and the keyboard never crop it. */
@media(max-width:600px){
html.cw-chat-open,html.cw-chat-open body{overflow:hidden!important;overscroll-behavior:none}
#clewis-chat{right:max(10px,env(safe-area-inset-right));bottom:max(70px,calc(env(safe-area-inset-bottom) + 58px))}
#clewis-chat .cw-chat-panel{position:fixed;z-index:100000;top:calc(var(--cw-vv-top,0px) + max(8px,env(safe-area-inset-top)));right:max(8px,env(safe-area-inset-right));bottom:auto;left:max(8px,env(safe-area-inset-left));display:grid;width:auto;min-width:0;max-width:none;height:calc(var(--cw-vv-height,100dvh) - max(16px,calc(env(safe-area-inset-top) + env(safe-area-inset-bottom))));max-height:none;grid-template-rows:auto minmax(96px,1fr) auto auto auto;overflow:hidden;border-radius:18px;box-shadow:0 18px 60px rgba(0,20,40,.35)}
#clewis-chat .cw-chat-panel[hidden]{display:none}
#clewis-chat .cw-chat-panel>header{position:relative;z-index:2;min-height:68px;padding:12px 14px 12px 16px;box-shadow:0 3px 14px rgba(0,25,50,.13)}
#clewis-chat .cw-chat-panel header strong{font-size:16px;line-height:1.25}
#clewis-chat .cw-chat-panel header small{font-size:11px}
#clewis-chat .cw-chat-close{flex:none;width:40px;height:40px;font-size:24px}
#clewis-chat .cw-chat-messages{height:auto;min-height:0;padding:14px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#clewis-chat .cw-chat-welcome{margin-right:18px;padding:10px 12px;font-size:14px;line-height:1.65}
#clewis-chat .cw-chat-profile{grid-template-columns:1fr 1fr;gap:7px;padding:8px 10px 0}
#clewis-chat .cw-chat-profile input{width:100%;height:42px;padding:9px 10px;font-size:16px}
#clewis-chat .cw-chat-compose{grid-template-columns:40px minmax(0,1fr);gap:7px;padding:8px 10px}
#clewis-chat .cw-emoji-toggle{width:40px;height:40px;font-size:20px}
#clewis-chat .cw-chat-compose form{grid-template-columns:minmax(0,1fr) auto;gap:7px}
#clewis-chat .cw-chat-panel textarea{min-height:48px;max-height:82px;padding:10px 11px;font-size:16px;line-height:1.45}
#clewis-chat .cw-chat-panel form button{min-width:68px;padding:0 11px;font-size:14px}
#clewis-chat .cw-chat-panel footer{padding:1px 12px max(9px,env(safe-area-inset-bottom));font-size:10px;line-height:1.4}
#clewis-chat .cw-emoji-picker{position:fixed;right:12px;bottom:calc(env(safe-area-inset-bottom) + 112px);left:12px;grid-template-columns:repeat(6,1fr);max-height:190px;overflow:auto}
}
@media(max-width:360px){#clewis-chat .cw-chat-profile{grid-template-columns:1fr}#clewis-chat .cw-chat-panel>header{min-height:62px}#clewis-chat .cw-chat-panel header small{display:none}}
