:root{font-family:system-ui,-apple-system,"PingFang SC",sans-serif;color:#20272c;background:#f2f4f5;letter-spacing:0;font-size:15px}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}[hidden]{display:none!important}#app{height:100dvh;min-height:320px;max-width:1100px;margin:auto;display:flex;background:#fff}.conversation{flex:1;min-width:0;display:flex;flex-direction:column}header{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid #e0e5e7;flex:none}header img{width:42px;height:42px;border-radius:6px;object-fit:cover}.heading{flex:1;min-width:0}h1,h2{margin:0;font-size:18px;line-height:1.4;font-weight:600}#connection{display:block;font-size:12px;color:#687278;margin-top:3px}.icon{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:1px solid #dce2e5;border-radius:6px;background:#fff;color:#4e5b62;flex-shrink:0}.icon svg{width:19px;height:19px}.send{background:#087f76;border-color:#087f76;color:#fff}#notice{padding:10px 20px;color:#a83c22;background:#fff2ed;border-bottom:1px solid #f0d3c8;font-size:13px}#messages{margin:0;list-style:none;padding:20px;overflow:auto;flex:1;min-height:0;background:#f7f9fa;display:flex;flex-direction:column;gap:14px}.message{max-width:80%;align-self:flex-start;min-width:80px}.message.mine{align-self:flex-end}.message p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;padding:10px 13px;background:#fff;border:1px solid #e2e7e9;border-radius:6px}.message.mine p{background:#e2f3ef;border-color:#cae7df}.meta{font-size:11px;color:#77838a;margin:5px 2px}.mine .meta{text-align:right}.failed{color:#b84231}#composer{padding:12px 16px calc(12px + env(safe-area-inset-bottom));display:flex;align-items:flex-end;gap:12px;border-top:1px solid #e0e5e7}textarea{flex:1;min-width:0;resize:none;border:1px solid #dce2e5;border-radius:6px;padding:10px;line-height:1.4;min-height:62px;max-height:140px;outline:none}textarea:focus,input:focus{border-color:#087f76;box-shadow:0 0 0 2px #087f761c}#visitors{width:255px;flex:none;border-right:1px solid #e0e5e7;background:#fbfcfc;overflow:auto}#visitors h2{font-size:14px;padding:21px 16px;border-bottom:1px solid #e0e5e7}#visitor-list button{display:block;width:100%;text-align:left;overflow-wrap:anywhere;border:0;border-bottom:1px solid #e6e9eb;background:transparent;padding:16px;font-size:14px;border-radius:0}#visitor-list button.active{background:#e4f1ee;color:#07635c}dialog{border:1px solid #d8dfe3;border-radius:8px;padding:28px;width:min(360px,calc(100% - 32px));color:#20272c}dialog::backdrop{background:#242f3659}dialog label{display:block;margin-top:24px;font-size:13px}dialog input{width:100%;margin-top:8px;padding:11px;border:1px solid #cfd8dc;border-radius:5px}dialog button{width:100%;padding:11px;background:#087f76;color:white;border:0;border-radius:5px}#login-error,#account-error{font-size:13px;color:#a83c22;min-height:18px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:650px){header{padding:12px}#messages{padding:16px 12px}.message{max-width:90%}#visitors{width:110px}#visitors h2{padding:19px 10px;font-size:13px}#visitor-list button{padding:12px 10px}#composer{padding:10px 12px calc(10px + env(safe-area-inset-bottom));gap:8px}}
/* 客服管理只占用本页对话框，不改聊天和 PHP 后台的布局。 */
#accounts-dialog{width:min(680px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:20px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-heading .icon{width:36px;height:36px;padding:0;color:#4e5b62;background:#fff;border:1px solid #dce2e5}.account-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid #e0e5e7}.account-row strong,.account-username{display:block;overflow-wrap:anywhere}.account-row strong{font-size:14px}.account-username{font-size:13px;color:#687278;margin-top:4px}.account-status{font-size:12px;color:#687278}.account-status.online{color:#087f76}#account-create{margin-top:24px}#account-create h3{font-size:15px;margin:0}#account-create label{margin-top:16px}#chat-title{overflow-wrap:anywhere}@media(max-width:650px){header{gap:7px}header img{width:32px;height:32px}header .icon{width:34px;height:34px}#chat-title{font-size:15px}#accounts-dialog{padding:16px}.account-row{gap:8px}.account-status{max-width:90px;text-align:right;overflow-wrap:anywhere}}
