/* Standalone, inline iframe and floating mobile chat share the same layout. */
:root{--accent:#6254e8;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;color:#3b3d54;font-size:14px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
*{box-sizing:border-box}html{height:100%}body{margin:0;background:#f2f1fa;display:flex;justify-content:center;align-items:center;min-height:100vh;min-height:100dvh}[hidden]{display:none!important}
button,input,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible{outline:3px solid #b9acf5;outline-offset:2px}
.visitor-shell{width:440px;max-width:100%;background:white;box-shadow:0 10px 80px #423e6915;height:96vh;max-height:820px;height:min(820px,96dvh);border-radius:18px;overflow:hidden;display:flex;flex-direction:column;min-height:0;padding-bottom:env(safe-area-inset-bottom,0px)}
.visitor-header{background:var(--accent);color:white;padding:20px;display:flex;gap:12px;align-items:center;flex:none}
.service-avatar{width:42px;height:42px;flex:none;border-radius:14px;background:#ffffff24;border:1px solid #ffffff25;display:grid;place-items:center;position:relative;font-size:18px}
.service-avatar span{width:9px;height:9px;border-radius:100%;background:#7edeb3;border:2px solid var(--accent);position:absolute;right:-2px;bottom:-1px}
.visitor-header>div:nth-child(2){min-width:0;flex:1}.visitor-header h1{font-size:16px;margin:0 0 5px;font-weight:600;overflow-wrap:anywhere;max-height:48px;overflow:auto;line-height:1.4}
.visitor-header p{font-size:12px;color:#eeebff;margin:0;line-height:1.5;max-height:36px;overflow:auto;overflow-wrap:anywhere}
.visitor-header button{margin-left:auto;flex:none;min-width:44px;min-height:44px;border:0;color:white;background:none;font-size:26px}
.service-banner{padding:10px 18px;background:#faf9ff;border-bottom:1px solid #f1eefb;color:#817794;font-size:12px;line-height:1.5;flex:none;max-height:64px;overflow:auto;overflow-wrap:anywhere}.service-banner>span:first-child{margin-right:6px;color:#b2a5e4}
.visitor-messages{flex:1 1 0;overflow:auto;padding:16px;min-height:0;background:linear-gradient(#fcfcff,#fff);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.v-message{margin:14px 0;display:flex;flex-direction:column;align-items:flex-start;min-width:0}.v-meta{font-size:11px;color:#788095;margin-bottom:6px;overflow-wrap:anywhere}
.v-bubble{background:#f0f1f6;color:#47546e;line-height:1.8;padding:10px 13px;border-radius:0 12px 12px 12px;max-width:90%;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
.v-message.self{align-items:flex-end}.v-message.self .v-bubble{background:var(--accent);color:white;border-radius:12px 0 12px 12px}.v-message.system{align-items:center;font-size:11px;color:#7f869c;text-align:center;line-height:1.7}
.v-bubble button{border:1px solid #bbb6cd40;color:inherit;background:#ffffff20;border-radius:5px;font-size:13px;padding:8px;min-height:44px;max-width:100%;overflow-wrap:anywhere;word-break:break-word}.v-bubble img{display:block;max-width:100%;max-height:220px;border-radius:6px;margin-top:8px}
.faq-heading{flex:none;font-size:12px;font-weight:600;padding:7px 16px;color:#77728a;max-height:46px;overflow:auto;overflow-wrap:anywhere}
.faq-list{display:flex;flex-wrap:wrap;gap:7px;padding:0 16px 8px;max-height:146px;overflow:auto;flex:none;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.faq-list button{font-size:13px;line-height:1.4;border:1px solid #e9e3ff;min-height:44px;max-width:100%;padding:9px 12px;border-radius:15px;color:var(--accent);background:#fcfbff;text-align:left;overflow-wrap:anywhere;word-break:break-word}
.visitor-status{font-size:12px;color:#807398;padding:0 16px;line-height:1.6;max-height:48px;overflow:auto;flex:none;overflow-wrap:anywhere}.visitor-status:empty{display:none}.visitor-status.error{color:#b73547}
.visitor-tools{display:flex;gap:8px;padding:4px 12px;align-items:center;flex:none}.visitor-tools button{min-height:44px;border:0;background:none;color:#746b8b;font-size:13px;padding:8px 5px;overflow-wrap:anywhere;max-width:60%;line-height:1.4}.visitor-tools button:hover{color:var(--accent)}.visitor-tools #human-button{margin-left:auto;background:var(--accent);color:#fff;padding:9px 14px;border-radius:8px}
#visitor-composer{border-top:1px solid #f0eff5;padding:8px 16px 8px;flex:none;background:white}
textarea{display:block;width:100%;resize:none;border:0;outline:none;background:white;color:#50556a;font-size:16px;line-height:1.5}textarea::placeholder{color:#9094a8}#visitor-input{height:48px;max-height:96px}
.compose-bottom{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-top:4px}.compose-bottom>div{display:flex;gap:6px;align-items:center;min-width:0}.compose-bottom>div button{background:none;border:none;color:#7b8199;font-size:24px;min-width:44px;min-height:44px;padding:0}.compose-bottom small{color:#8d91a5;font-size:10px;white-space:nowrap}
#visitor-send{flex:none;min-width:76px;min-height:44px;background:var(--accent);border:0;color:white;border-radius:8px;padding:8px 16px;font-size:14px}.touch-hint{display:none}.touch-input .touch-hint{display:inline}.touch-input .desktop-hint{display:none}
.visitor-shell footer{flex:none;padding:5px 12px;text-align:center;font-size:10px;line-height:1.4;color:#9093a7;background:white;overflow-wrap:anywhere;max-height:40px;overflow:auto}
.load-older{display:block;margin:0 auto 16px;border:1px solid #ded7fa;border-radius:20px;padding:8px 14px;min-height:44px;background:white;color:var(--accent);font-size:13px}
dialog{position:fixed;inset:12px 0 auto;margin:0 auto;border:0;border-radius:15px;padding:20px;width:360px;max-width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(var(--chat-height,100vh) - 24px);top:calc(var(--chat-top,0px) + 12px);overflow:auto;overscroll-behavior:contain;box-shadow:0 20px 60px #24203930;color:#545365;background:white;z-index:51}
dialog:not([open]){display:none}dialog::backdrop{background:#30264766}.dialog-open .visitor-shell{pointer-events:none}.dialog-open::after{content:"";position:fixed;inset:0;background:#30264755;z-index:50}.dialog-title{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}.dialog-title h2{font-size:17px;margin:0}.dialog-title button{min-width:44px;min-height:44px;border:0;background:none;color:#81869b;font-size:26px}
label{display:block;font-size:14px;margin:12px 0;color:#6c697b}label input,label textarea{display:block;width:100%;border:1px solid #e4e2ec;border-radius:7px;padding:10px;margin-top:7px;font-size:16px;min-height:44px}form .save{background:var(--accent);color:white;border:0;padding:10px;border-radius:7px;width:100%;font-size:15px;min-height:44px}form .hint{font-size:12px;color:#827c91;line-height:1.7}.stars{display:flex;justify-content:space-between;gap:3px}.stars label{display:flex;align-items:center;gap:3px;min-height:44px;color:#99771e}.stars input{width:auto;min-height:0;margin:0;accent-color:var(--accent)}.form-error{font-size:12px;color:#b73547;line-height:1.7;margin:12px 0}
body.embedded{background:white;min-height:0;height:100vh;height:var(--chat-height,100vh);overflow:hidden}.embedded .visitor-shell{width:100%;height:100%;max-height:none;border-radius:0;box-shadow:none}
@media(max-width:520px),(max-height:520px) and (pointer:coarse){
 body{position:fixed;top:var(--chat-top,0px);left:0;right:0;min-height:0;height:100vh;height:var(--chat-height,100vh);overflow:hidden;align-items:stretch}
 .visitor-shell{width:100%;height:100%;max-height:none;border-radius:0;box-shadow:none}
 .visitor-header{padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top,0px));padding-left:calc(16px + env(safe-area-inset-left,0px));padding-right:calc(16px + env(safe-area-inset-right,0px))}
 .visitor-messages,.faq-list,.faq-heading,.visitor-status,#visitor-composer{padding-left:calc(16px + env(safe-area-inset-left,0px));padding-right:calc(16px + env(safe-area-inset-right,0px))}
 .visitor-tools{padding-left:calc(12px + env(safe-area-inset-left,0px));padding-right:calc(12px + env(safe-area-inset-right,0px))}
 body.embedded{top:0}
}
.compact-viewport .visitor-header{padding-top:6px;padding-top:calc(6px + env(safe-area-inset-top,0px));padding-bottom:6px;gap:8px}.compact-viewport .service-avatar{width:32px;height:32px}.compact-viewport .visitor-header h1{font-size:14px;margin-bottom:0;max-height:20px}.compact-viewport .visitor-header p{max-height:18px;font-size:11px}.compact-viewport .service-banner,.compact-viewport .faq-heading,.compact-viewport footer{display:none}.compact-viewport .faq-list{max-height:56px;flex-wrap:nowrap;padding-top:4px}.compact-viewport .faq-list button{flex:none;max-width:80%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.compact-viewport .visitor-messages{padding-top:5px;padding-bottom:5px}.compact-viewport #visitor-input{height:30px}.compact-viewport #visitor-composer{padding-top:5px}.compact-viewport .visitor-status{max-height:36px}
.keyboard-open .service-banner,.keyboard-open .faq-heading,.keyboard-open .faq-list,.keyboard-open footer{display:none}.keyboard-open #visitor-composer{padding-bottom:6px}.keyboard-open .visitor-shell{padding-bottom:0}
@media(max-width:340px){.compose-bottom small{display:none}.visitor-tools button{font-size:12px}.visitor-header{padding-left:12px;padding-right:12px}.visitor-messages{padding-left:12px;padding-right:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.ui-icon{width:21px;height:21px;display:inline-block;vertical-align:middle;flex:none;pointer-events:none}
.ui-emoji-popover{position:fixed;z-index:90001;background:#fff;border:1px solid #e7e3f3;border-radius:20px;box-shadow:0 16px 60px #32235d30;padding:12px;display:flex;flex-direction:column;overflow:hidden;color:#30324b;font:14px -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;box-sizing:border-box}
.ui-popover-title{display:flex;align-items:center;justify-content:space-between;flex:none;padding-left:6px}.ui-popover-title b{font-size:13px}.ui-popover-title button{border:0;border-radius:12px;background:#f5f3fc;color:#625b78;font-size:24px;width:44px;height:44px;cursor:pointer}
.ui-emoji-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:auto;overscroll-behavior:contain;gap:3px;padding-top:8px}.ui-emoji-grid button{border:0;background:transparent;border-radius:12px;min-height:44px;min-width:0;font-size:25px;cursor:pointer;padding:4px}.ui-emoji-grid button:hover,.ui-emoji-grid button:focus-visible{background:#efecff;outline:2px solid #b8acf6;outline-offset:-2px}
.ui-image-viewer{position:fixed;inset:0;z-index:90002;background:#141627f5;color:white;display:flex;flex-direction:column;padding:env(safe-area-inset-top,0px) 12px env(safe-area-inset-bottom,0px);font:14px -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;box-sizing:border-box}
.ui-viewer-bar{display:flex;align-items:center;gap:8px;flex:none;min-height:64px}.ui-viewer-bar strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500}.ui-viewer-bar button,.ui-viewer-bar a{display:grid;place-items:center;min-width:44px;min-height:44px;color:#fff;background:#ffffff15;border:1px solid #ffffff20;border-radius:12px;cursor:pointer;text-decoration:none;font:inherit;padding:0 8px}.ui-viewer-bar button{font-size:24px}.ui-image-stage{min-height:0;flex:1;display:flex;align-items:center;justify-content:center;overflow:auto;overscroll-behavior:contain}.ui-image-stage img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px}.ui-image-viewer.zoomed .ui-image-stage{display:block}.ui-image-viewer.zoomed img{max-width:none;max-height:none;width:150%;height:auto}.ui-image-viewer>p{font-size:12px;color:#b9bacb;text-align:center;flex:none}.image-open{border:0!important;padding:0!important;display:block;background:transparent!important;cursor:zoom-in;min-height:0!important}.image-open img{display:block;max-width:100%;max-height:260px;border-radius:12px;object-fit:contain}.image-open:focus-visible{outline:3px solid #c8baff;outline-offset:3px}

/* Mobile first visual system. Functional viewport rules remain in chat.css. */
body{background:radial-gradient(ellipse at 15% 10%,#e9e4ff,transparent 60%),#f2f4fa;color:#34334d}
.visitor-shell{border:1px solid #ffffffb0;box-shadow:0 24px 80px #36286420;border-radius:24px}
.visitor-header{position:relative;background:linear-gradient(120deg,#ffffff12,#00000008),var(--accent);padding:22px;gap:13px;isolation:isolate;overflow:hidden}
.visitor-header:after{content:"";position:absolute;width:150px;height:150px;right:-50px;top:-95px;border:25px solid #ffffff0d;border-radius:50%;pointer-events:none;z-index:-1}
.service-avatar{width:48px;height:48px;border-radius:17px;box-shadow:inset 0 1px 0 #ffffff30,0 5px 15px #27205216;background:#ffffff20}.service-avatar .service-mark{position:static;background:transparent;border:0;width:auto;height:auto;border-radius:0;display:grid;place-items:center}.service-mark .ui-icon{width:27px;height:27px}.service-avatar i{position:absolute;right:-2px;bottom:-1px;width:11px;height:11px;border:2px solid var(--accent);border-radius:50%;background:#8be4c3}
.visitor-header h1{font-size:17px;font-weight:650;letter-spacing:.3px}.visitor-header p{font-size:12px;color:#ffffffe0}
.service-banner{padding:10px 20px;background:#faf9fe;border-bottom:1px solid #eeebf7;color:#8b809c;display:flex;align-items:center;gap:3px}.service-banner>span:first-child{display:grid;place-items:center;width:20px;height:20px;border-radius:7px;background:#eee9fa;color:var(--accent);flex:none}
.visitor-messages{padding:18px;background:radial-gradient(ellipse at 0 0,#f4f1ff70,transparent 70%),#fdfdff}
.v-message{margin:14px 0 20px}.v-meta{color:#91869f;font-size:11px;margin:0 0 7px 3px}.v-message:not(.self):not(.system) .v-meta:before{content:"✦";display:inline-grid;place-items:center;width:17px;height:17px;margin-right:5px;color:var(--accent);background:#ede8fb;border-radius:6px;font-size:10px}
.v-bubble{background:white;border:1px solid #ebe8f2;box-shadow:0 3px 10px #38304d04;color:#45445d;border-radius:5px 18px 18px 18px;padding:13px 15px;font-size:14px;max-width:94%;line-height:1.85}
.v-message.self .v-bubble{border:1px solid #ffffff16;background:linear-gradient(120deg,#ffffff0c,#00000006),var(--accent);box-shadow:0 5px 14px #6454d51a;border-radius:18px 5px 18px 18px}.v-message.system{padding:0 16px;font-size:11px;color:#9690a3}
.v-bubble:has(.image-open){padding:7px;max-width:88%}.v-bubble .image-open img{max-height:230px;margin-top:5px;border-radius:12px}.v-bubble [data-file]{background:#f6f4fd;color:#66577e;border:0;border-radius:10px;padding:8px 10px;font-size:12px;min-height:38px}.self .v-bubble [data-file]{background:#ffffff18;color:white}
.faq-heading{font-size:12px;color:#898297;padding:7px 18px 9px;display:flex;align-items:center;gap:7px}.faq-heading:before{content:"✧";font-size:17px;color:var(--accent)}
.faq-list{padding:0 18px 8px;gap:7px;max-height:145px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}.faq-list button{flex:none;display:flex;align-items:center;gap:8px;max-width:82%;min-height:46px;border-radius:14px;border:1px solid #eae5f6;background:linear-gradient(140deg,#faf8ff,#fff);padding:9px 11px;font-size:12px;color:#6a5797;box-shadow:0 2px 5px #35235b03;white-space:normal}.faq-list button>span:nth-child(2){display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.faq-mark{display:grid;place-items:center;background:#ebe5f9;color:var(--accent);border-radius:8px;font-size:12px;font-weight:600;width:23px;height:23px;flex:none}.faq-list .ui-icon{width:14px;height:14px;opacity:.5}.faq-list button:hover{border-color:#b6a5e2;background:#f6f1ff}
.visitor-tools{padding:6px 16px 10px;border-bottom:1px solid #f0edf6;gap:8px}.visitor-tools button{font-size:12px;color:#867991;min-height:44px}.visitor-tools #contact-button:before{content:"✉";margin-right:6px;font-size:16px;color:#a194b5}.visitor-tools #human-button{background:#f0ebfb;color:var(--accent);border:1px solid #e6def6;border-radius:13px;font-weight:600;padding:9px 13px}.visitor-tools #human-button:before{content:"☏";font-size:17px;font-weight:400;margin-right:6px}.visitor-tools #rate-button:before{content:"☆";font-size:17px;margin-right:4px}
#visitor-composer{border-top:0;padding:12px 16px 6px;background:white}.input-row{border:1px solid #eae6f1;background:#faf9fd;border-radius:15px;transition:border-color .15s,box-shadow .15s}.input-row:focus-within{border-color:#b4a5ed;box-shadow:0 0 0 3px #7360d70b}#visitor-input{height:50px;background:transparent;padding:12px 13px;font-size:16px;color:#49425f}textarea::placeholder{color:#aaa1b8;font-size:14px}
.compose-bottom{margin-top:5px}.compose-bottom>div{gap:3px}.compose-bottom>div button{color:#8b7e9e;border-radius:12px;display:grid;place-items:center}.compose-bottom>div button:hover{background:#f2eefb;color:var(--accent)}.compose-bottom small{color:#aca3b8}
#visitor-send{border-radius:13px;box-shadow:0 4px 12px #6050c923;display:flex;align-items:center;gap:8px;padding:10px 15px;font-weight:500}#visitor-send .ui-icon{width:17px;height:17px}.visitor-shell footer{padding:5px 12px 8px;color:#b1a8bc;font-size:10px}.visitor-status{padding-top:4px;color:#8b769d}.visitor-status.error{background:#fff3f4;padding-top:6px;padding-bottom:6px;color:#b63e52}
.attachment-preview{margin:8px 16px 0;padding:10px;border:1px solid #ddd5f1;border-radius:16px;background:#f9f6ff;flex:none;max-height:170px;overflow:auto}.attachment-summary{display:flex;gap:10px;align-items:center}.attachment-summary>img{width:52px;height:52px;border-radius:9px;object-fit:cover;border:1px solid #ece5f6}.attachment-summary>span{width:44px;height:44px;display:grid;place-items:center;background:#ebe3fb;border-radius:11px;color:var(--accent)}.attachment-summary>div{min-width:0;flex:1}.attachment-summary b{display:block;font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#645671}.attachment-summary small{display:block;font-size:11px;color:#9483a5;margin-top:5px}.attachment-summary button{width:44px;height:44px;flex:none;border:0;border-radius:12px;color:#8c7a9e;background:transparent;font-size:24px}.attachment-preview>button{background:var(--accent);border:0;color:#fff;width:100%;border-radius:10px;min-height:44px;margin-top:7px;font-size:13px}.attachment-preview>p{color:#b23e57;font-size:12px;line-height:1.6;margin:5px 0}.attachment-preview>p:empty{display:none}
dialog{border-radius:22px;box-shadow:0 25px 80px #30244635;border:1px solid #ffffffaa}.dialog-title h2{font-size:18px;color:#46385e}.dialog-title button{background:#f5f1fb;border-radius:13px}form .save{border-radius:12px}label input,label textarea{border-radius:12px;background:#fcfbff;border-color:#e5dfed}
@media(max-width:520px),(max-height:520px) and (pointer:coarse){.visitor-shell{border:0;border-radius:0}.visitor-header{padding:16px;padding-top:calc(16px + env(safe-area-inset-top,0px))}.visitor-messages{padding-top:14px}.visitor-tools{padding-bottom:6px}.visitor-header h1{font-size:16px}.v-bubble{font-size:14px}#visitor-composer{padding-top:9px}}
.compact-viewport .visitor-header{padding-top:6px;padding-bottom:6px}.compact-viewport .service-mark .ui-icon{width:21px;height:21px}.compact-viewport .visitor-tools{padding-top:0;padding-bottom:0}.compact-viewport .faq-list{max-height:55px;padding-bottom:3px}.compact-viewport .faq-list button{min-height:44px;max-width:82%}.compact-viewport #visitor-input{height:40px;padding:7px 10px}.compact-viewport #visitor-composer{padding-top:5px}.compact-viewport .attachment-summary>img{height:36px;width:36px}.compact-viewport .attachment-preview{max-height:115px;padding:6px;margin-top:4px}.compact-viewport .attachment-preview>button{margin-top:3px}.compact-viewport .v-message{margin:8px 0 12px}
.keyboard-open .faq-heading,.keyboard-open .faq-list,.keyboard-open .service-banner{display:none}.keyboard-open .visitor-header{padding-top:7px;padding-bottom:7px}.keyboard-open .visitor-tools{padding-top:0;padding-bottom:0}.keyboard-open #visitor-input{height:42px;padding:8px 10px}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.faq-list{scrollbar-width:none}.faq-list::-webkit-scrollbar{display:none}.faq-heading:after{content:"左右滑动";font-size:10px;font-weight:400;color:#aea5bb;margin-left:auto;white-space:nowrap}

/* Shared type scale: 600 for headings, 500 for actions, 400 for reading. */
:root{
  --ui-font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --type-strong:#302d46;
  --type-body:#4d485f;
  --type-muted:#797186;
  font-family:var(--ui-font);
  font-weight:400;
  line-height:1.6;
}
button,input,textarea,select{font-family:inherit}
.ui-emoji-popover,.ui-image-viewer{font-family:var(--ui-font)}
.ui-popover-title b{font-size:14px;font-weight:600;line-height:1.5}
.ui-viewer-bar strong{font-size:13px;font-weight:500;line-height:1.6}

/* Visitor: keep reading comfortable without making the controls taller. */
.visitor-header h1{font-size:18px;font-weight:600;line-height:1.45;letter-spacing:.1px;max-height:52px;margin:0 0 4px}
.visitor-header p{font-size:12px;font-weight:400;line-height:1.6;color:#ffffffed;max-height:39px}
.service-banner{font-size:12px;font-weight:400;line-height:1.65;color:var(--type-muted)}
.v-meta{font-size:12px;font-weight:400;line-height:1.5;color:var(--type-muted);margin-bottom:7px}
.v-bubble{font-size:15px;font-weight:400;line-height:1.75;letter-spacing:.05px;color:var(--type-body);padding:12px 14px}
.v-message{margin:14px 0 19px}
.v-message.system{font-size:12px;font-weight:400;line-height:1.7;color:var(--type-muted)}
.v-bubble [data-file]{font-size:13px;font-weight:500;line-height:1.55}
.faq-heading{font-size:13px;font-weight:600;line-height:1.5;color:#655a7c;padding-top:7px;padding-bottom:8px}
.faq-heading:after{font-size:11px;font-weight:400;line-height:1.5;color:#82778f}
.faq-list button{font-size:13px;font-weight:500;line-height:1.55;padding:9px 11px}
.faq-mark{font-weight:600}
.visitor-tools button{font-size:13px;font-weight:500;line-height:1.5;color:#726480}
.visitor-tools #human-button{font-size:13px;font-weight:600;line-height:1.5}
#visitor-input{font-size:16px;font-weight:400;line-height:1.6;color:#463e59;padding-top:11px;padding-bottom:11px}
#visitor-input::placeholder{font-size:15px;font-weight:400;line-height:1.6;color:#8b8198}
#visitor-send{font-size:14px;font-weight:600;line-height:1.5;letter-spacing:.25px}
.compose-bottom small{font-size:11px;font-weight:400;color:#857a94;line-height:1.5}
.visitor-status,.attachment-preview>p{font-size:12px;line-height:1.65;font-weight:400}
.visitor-shell footer{font-size:11px;font-weight:400;line-height:1.5;color:#8a8097;padding-top:4px;padding-bottom:7px}
.attachment-summary b{font-size:13px;font-weight:600;line-height:1.5}
.attachment-summary small{font-size:12px;line-height:1.5;color:var(--type-muted);margin-top:3px}
.attachment-preview>button{font-size:14px;font-weight:500;line-height:1.5}
.dialog-title h2{font-size:19px;font-weight:600;line-height:1.45;letter-spacing:0}
#visitor-dialog label{font-size:14px;font-weight:500;line-height:1.6}
#visitor-dialog label input,#visitor-dialog label textarea{font-size:16px;font-weight:400;line-height:1.5}
#visitor-dialog .hint{font-size:12px;font-weight:400;line-height:1.75;color:var(--type-muted)}
#visitor-dialog .save{font-size:15px;font-weight:600;line-height:1.5}
@media(max-width:520px),(max-height:520px) and (pointer:coarse){
  .visitor-header h1{font-size:17px;max-height:50px}
  .v-bubble{font-size:15px;line-height:1.75}
  .visitor-messages{padding-top:12px;padding-bottom:12px}
}
.compact-viewport .visitor-header h1{font-size:15px;line-height:1.35;max-height:21px}
.compact-viewport .visitor-header p{font-size:11px;line-height:1.55;max-height:18px}
.compact-viewport .v-message{margin:8px 0 12px}
.compact-viewport #visitor-input,.keyboard-open #visitor-input{font-size:16px;line-height:1.5;padding-top:7px;padding-bottom:7px}
.compact-viewport .faq-list button{padding-top:7px;padding-bottom:7px;line-height:1.45}

/* Workspace: readable tables and forms, quieter metadata, stable heading weights. */
.app{font-size:14px;line-height:1.6}
.sidebar .brand{font-weight:600;letter-spacing:.3px}
.nav-item{font-size:14px;font-weight:400;line-height:1.5}
.nav-item.active{font-weight:600}
.nav-label{font-size:11px;font-weight:500;letter-spacing:.5px;color:#777286}
.workspace-label{font-size:13px;line-height:1.5}
.workspace-label small,.local-badge,.storage-note,.user-label small{font-size:11px;line-height:1.6;color:#7c738c}
.sidebar-bottom,.demo-link,.logout{font-size:12px;line-height:1.6}
.top-title{font-size:13px;line-height:1.5}.top-title strong{font-weight:600}
.connection{font-size:11px;color:#7c738c}.top-actions select{font-size:13px;line-height:1.5}
.page-head h2{font-size:25px;font-weight:600;line-height:1.35;letter-spacing:0;margin-bottom:8px;color:#302d46}
.page-head p{font-size:13px;font-weight:400;line-height:1.75;color:#797186;margin-top:0}
.page-head .actions button,.button-link,.page-head .actions a{font-size:13px;font-weight:500;line-height:1.5}
.card h3,.settings-layout h3,.panel h3{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}
.card p,.settings-section p,.panel p,.info-note,.notice,.confirm-copy{font-size:13px;font-weight:400;line-height:1.8;color:#726a7d}
.card small,.hint,.card-footer button,.card-footer a,.embed-option{font-size:12px;line-height:1.65}
.settings-section h4,.ticket h4{font-size:14px;font-weight:600;line-height:1.5}
.ticket p{font-size:13px;line-height:1.65;max-height:43px}.ticket-meta{font-size:12px;line-height:1.5}
.table-wrap th{font-size:12px;font-weight:500;line-height:1.6;color:#756b84}
.table-wrap td{font-size:13px;font-weight:400;line-height:1.7;color:#524a60}
.table-wrap td strong,.table-wrap td b{font-weight:600}
.pill,.tag{font-size:11px;font-weight:500;line-height:1.5}
.metric>span,.metric small{font-size:12px;line-height:1.6;color:#797186}
.metric strong,.desk-summary b{font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:0}
.desk-summary{font-size:12px;line-height:1.5}.desk-summary b{font-size:22px}
.pane-title{font-size:14px;font-weight:600;line-height:1.5}.pane-title small{font-size:12px;font-weight:400}
.search-wrap input,.filters button{font-size:13px;line-height:1.5}
.conv-title{font-size:14px;font-weight:600;line-height:1.5}.conv-title time{font-size:11px;line-height:1.5}
.conv-preview{font-size:13px;font-weight:400;line-height:1.65;margin-top:6px;margin-bottom:7px}
.conv-meta,.wait-chip,.conv-flags .pill,.pagination{font-size:11px;line-height:1.5}
.chat-person b{font-size:15px;font-weight:600;line-height:1.5}.chat-person small{font-size:12px;line-height:1.5}
.chat-actions button{font-size:12px;font-weight:500;line-height:1.5}
.message-meta,.message.system{font-size:12px;font-weight:400;line-height:1.6;color:#797186}
.message-bubble{font-size:15px;font-weight:400;line-height:1.75;letter-spacing:.05px}
.composer-tools button{font-size:13px;font-weight:500;line-height:1.5}
.composer-tools label,.composer-footer small{font-size:12px;font-weight:400;line-height:1.5}
.composer textarea{font-size:15px;font-weight:400;line-height:1.7}.composer textarea::placeholder{color:#8b8198}
.composer-footer button{font-size:14px;font-weight:600;line-height:1.5}
.inspector h3{font-size:14px;font-weight:600;line-height:1.5}.info-section h4{font-size:13px;font-weight:600;line-height:1.5}
.info-row,.inspector button{font-size:12px;line-height:1.7}
.empty strong{font-weight:600}.empty,.hint,.toast{line-height:1.75}
.login-form-wrap h2{font-size:28px;font-weight:600;line-height:1.35;letter-spacing:0}
.login-form-wrap p{font-size:14px;line-height:1.7;color:#797186;margin-bottom:28px}
.login-form-wrap label,#modal label{font-size:14px;font-weight:500;line-height:1.5}
.login-form-wrap input{font-size:16px;font-weight:400;line-height:1.5}
.login-form-wrap form>button{font-size:15px;font-weight:600;line-height:1.5}
.login-tip{font-size:12px;color:#797186}.login-form-wrap>small{font-size:12px;color:#797186}
.modal-head h2{font-size:20px;font-weight:600;line-height:1.4;letter-spacing:0}
#modal input,#modal textarea,#modal select{font-size:14px;font-weight:400;line-height:1.6}
.modal-footer button{font-size:14px;font-weight:500;line-height:1.5}
@media(max-width:700px){
  .sidebar .brand{font-size:0}
  .top-title{font-size:12px}.top-actions select{font-size:12px}
  .page-head{flex-wrap:wrap;gap:10px;margin-bottom:16px}
  .page-head h2{font-size:22px;line-height:1.35;margin-bottom:6px}
  .page-head p{font-size:12px;line-height:1.7;max-width:100%}
  .page-head .actions{flex-direction:row;flex-wrap:wrap;gap:7px;width:100%}
  .page-head .actions button,.page-head .actions a{font-size:12px;line-height:1.5;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .desk-summary{font-size:11px;line-height:1.5;gap:8px 12px}.desk-summary b{font-size:18px}
  .chat-person b{font-size:14px}.chat-actions button{font-size:12px}
  .message-bubble{font-size:15px;line-height:1.75}
  .composer textarea,.page-toolbar input,.search-wrap input,#modal input,#modal textarea,#modal select{font-size:16px}
  .composer-tools button{font-size:12px}.composer-tools label{font-size:11px}
  .modal-head h2{font-size:18px}.login-form-wrap h2{font-size:27px}
}

.sound-button{display:inline-flex;align-items:center;gap:6px;position:relative;min-width:42px;min-height:42px}
.sound-button .sound-label{font-size:12px;font-weight:500;white-space:nowrap}
.sound-button[data-sound-state="ready"]{color:#147566;background:#eaf7f2;border-color:#c6e9dc}
.sound-button[data-sound-state="locked"]{color:#94620d;background:#fff8e7;border-color:#efd7a5}
.sound-button[data-sound-state="muted"]{color:#7f879b;background:#f3f4f8}
.sound-settings{display:grid;gap:18px;max-width:520px}
.sound-status{padding:13px 15px;border:1px solid #e0ddf9;border-radius:12px;background:#f7f5ff;font-size:13px;line-height:1.8;color:#4e4680}
.sound-setting-row{display:flex;gap:16px;align-items:center;justify-content:space-between}
.sound-setting-row h4{font-size:14px;font-weight:600;margin:0 0 5px}
.sound-setting-row p,.sound-help{font-size:12px;line-height:1.8;color:#718099;margin:0}
.sound-setting-row input[type="checkbox"]{width:20px;height:20px;flex:none;accent-color:var(--accent,#6254e8)}
.sound-volume{display:flex;align-items:center;gap:12px}.sound-volume input{flex:1;min-height:32px;accent-color:var(--accent,#6254e8)}
.sound-volume output{font-size:13px;min-width:38px;font-variant-numeric:tabular-nums}
.sound-actions{display:flex;flex-wrap:wrap;gap:8px}.sound-actions button{min-height:42px}
.sound-section{border-top:1px solid #e9edf5;padding-top:14px}
.sound-live{font-size:12px;color:#147566;min-height:20px;line-height:1.6}
.visitor-tools .visitor-sound{display:inline-flex;align-items:center;justify-content:center;width:40px;min-height:40px;padding:8px;flex:none;border-radius:10px}
.visitor-tools .visitor-sound[aria-pressed="true"]{background:#eeeaff;color:var(--accent)}
.visitor-tools{flex-wrap:wrap;gap:6px}
@media(max-width:600px){.sound-button .sound-label{display:none}.top-actions{gap:6px}.sound-settings{gap:15px}.sound-setting-row{gap:12px}.sound-actions button{flex:1}.sound-help{font-size:12px}}
