:root{--qq-blue:#0867e8;--qq-blue-soft:#eaf2ff;--ink:#1c293d;--muted:#748198;--line:#e7ebf1;--desk:#f6f8fb;--paper:#fff;--incoming:#f1f4f8;--outgoing:#eaf2ff;--online:#29a677;--warning:#986615;--danger:#c23c49;--radius:10px;--font:"Segoe UI","Microsoft YaHei",system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--desk);font:14px/1.6 var(--font)}[hidden]{display:none!important}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #89bafd;outline-offset:3px}button{border:0;transition:background .15s,color .15s}svg{height:20px;width:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.symbol-library{position:absolute;width:0;height:0}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin:0}h1{font-size:27px;font-weight:650;letter-spacing:-.6px}h2{font-size:17px;font-weight:650}h3{font-size:15px;font-weight:650}.muted{color:var(--muted)}.tiny{font-size:12px}.mono{font-family:Consolas,monospace}.eyebrow{color:var(--muted);font-size:11px;letter-spacing:1.6px;display:block;margin-bottom:8px}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:7px;padding:10px 17px;font-weight:550;white-space:nowrap}.primary{background:var(--qq-blue);color:white}.primary:hover{background:#0757c5}.secondary{border:1px solid var(--line);background:var(--paper);color:var(--ink)}.secondary:hover{background:var(--desk)}.full{width:100%}.compact{padding:6px 12px;font-size:12px}.text-button{background:none;color:var(--muted);padding:5px}.text-button:hover{color:var(--qq-blue)}.icon-button{background:none;color:var(--muted);font-size:24px;padding:2px 8px}.brand{display:flex;align-items:center;gap:10px;font-weight:650;font-size:17px;white-space:nowrap}.brand small{font-size:10px;font-weight:500;letter-spacing:.4px;color:var(--muted)}.brand-mark{display:grid;place-items:center;border-radius:9px;background:var(--qq-blue);color:white;width:34px;height:34px}.brand-mark svg{width:23px;height:23px}.avatar{display:grid;place-items:center;flex-shrink:0;width:39px;height:39px;border-radius:12px;background:var(--qq-blue-soft);color:var(--qq-blue);font-weight:650}.avatar.small{width:30px;height:30px;font-size:12px;border-radius:50%}.notice{background:#f4f7fc;border:1px solid #e4eaf5;color:#64748b;padding:13px 16px;border-radius:8px;font-size:12px}.dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--online);flex-shrink:0}.dot.offline{background:#a1a8b5}.status-tag,.role-tag{font-size:11px;padding:3px 8px;border-radius:5px;background:var(--desk);color:var(--muted);white-space:nowrap}.status-tag.waiting{background:#fff5e0;color:var(--warning)}.status-tag.active{background:#edf8f3;color:var(--online)}.mode-badge{border:1px solid #ead8ac;color:#8b651a;background:#fff9e9;font-size:11px;padding:2px 8px;border-radius:4px}.topbar{height:66px;background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:18px}.topbar nav{height:100%;display:flex;align-items:stretch;gap:24px}.nav-button{display:flex;align-items:center;gap:7px;font-size:13px;background:none;color:var(--muted);padding:0 2px;position:relative}.nav-button.active{color:var(--qq-blue)}.nav-button.active:after{content:"";position:absolute;height:2px;background:var(--qq-blue);left:0;right:0;bottom:0}.nav-button svg{width:17px;height:17px}.user-area{display:flex;align-items:center;gap:9px;font-size:12px}.workspace-bar{height:52px;padding:0 25px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:var(--paper);font-size:12px}.workspace-bar>div{display:flex;align-items:center;gap:12px}.workspace-bar select{border:0;background:transparent;color:var(--ink);max-width:290px;font-size:12px}.connection{color:var(--muted)}.inbox-layout{height:calc(100dvh - 150px);min-height:500px;display:grid;grid-template-columns:292px minmax(350px,1fr) 256px;background:var(--paper)}.conversation-panel{border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.panel-heading{padding:24px 20px 14px;display:flex;justify-content:space-between;align-items:center}.panel-heading h2 span{font-size:11px;color:var(--muted);margin-left:7px}.search-box{display:flex;align-items:center;background:var(--desk);border-radius:7px;margin:0 18px 10px;padding:6px 11px;color:var(--muted);gap:7px}.search-box input{width:100%;border:0;outline:0;background:transparent;font-size:12px}.conversation-panel>select{margin:0 18px 12px;width:calc(100% - 36px);font-size:12px;border:1px solid var(--line);border-radius:6px;padding:7px 9px;background:white;color:var(--muted)}.filter-tabs{display:flex;gap:20px;padding:0 20px;border-bottom:1px solid var(--line)}.filter-tabs button{background:none;font-size:12px;padding:8px 0 11px;color:var(--muted);border-bottom:2px solid transparent}.filter-tabs button.active{color:var(--qq-blue);border-color:var(--qq-blue);font-weight:600}.conversation-list{flex:1;overflow-y:auto;padding:8px}.conversation-item{width:100%;display:flex;gap:11px;text-align:left;background:transparent;padding:14px 10px;border-radius:8px;margin:2px 0}.conversation-item:hover{background:var(--desk)}.conversation-item.selected{background:var(--qq-blue-soft)}.conversation-body{flex:1;min-width:0}.conversation-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:4px}.conversation-top strong{font-size:13px;font-weight:600}.conversation-top time{font-size:10px;color:var(--muted)}.conversation-body p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--muted);font-size:12px;margin:5px 0}.conversation-meta{display:flex;justify-content:space-between;font-size:10px;color:var(--muted)}.unread-badge{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;border-radius:8px;background:var(--qq-blue);color:white;padding:0 4px}.list-footer{padding:12px 20px;border-top:1px solid var(--line);font-size:10px;color:var(--muted)}.list-footer .dot{margin-right:5px}.chat-panel{display:flex;flex-direction:column;min-width:0;min-height:0}.empty-state{margin:auto;text-align:center;padding:28px;color:var(--muted)}.empty-state .empty-icon{display:grid;place-items:center;width:76px;height:76px;border-radius:22px;margin:0 auto 24px;color:var(--qq-blue);background:var(--qq-blue-soft)}.empty-icon svg{width:37px;height:37px;stroke-width:1.3}.empty-state h2{color:var(--ink);margin-bottom:12px;font-size:21px}.empty-state p{font-size:13px;line-height:1.9;margin-bottom:24px}.empty-list{padding:36px 16px;text-align:center;color:var(--muted);font-size:12px}#active-chat{height:100%;display:flex;flex-direction:column;min-height:0}.chat-heading{height:81px;display:flex;align-items:center;gap:12px;padding:0 25px;flex-shrink:0}.chat-contact{flex:1;min-width:0}.chat-contact h2{font-size:15px}.chat-contact p{font-size:11px;color:var(--muted);margin-top:3px}.target-strip{display:flex;align-items:center;gap:8px;background:#f8fafd;color:#7a8ba5;font-size:11px;padding:8px 25px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);flex-shrink:0}.target-strip svg{width:15px;height:15px}.target-strip strong{font-weight:550}.message-list{flex:1;min-height:160px;overflow-y:auto;padding:23px 26px;background:#fcfdff}.date-marker{text-align:center;color:#9ca7b8;font-size:10px;margin-bottom:20px}.message{max-width:85%;margin-bottom:23px;display:flex;gap:10px}.message.out{margin-left:auto;flex-direction:row-reverse}.message .avatar{width:29px;height:29px;font-size:11px;border-radius:9px}.message-content{min-width:0}.message-author{font-size:10px;color:var(--muted);margin:0 0 5px}.message.out .message-author{text-align:right}.bubble{padding:11px 14px;border-radius:0 10px 10px 10px;background:var(--incoming);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}.message.out .bubble{background:var(--outgoing);border-radius:10px 0 10px 10px;color:#224772}.message-status{font-size:10px;color:var(--muted);margin-top:5px;text-align:right}.message-status.error{color:var(--danger)}.composer{flex-shrink:0;border-top:1px solid var(--line);padding:0 24px 18px}.reply-window{font-size:11px;color:var(--muted);padding:10px 0}.reply-window.warning{color:var(--warning)}.composer textarea{display:block;width:100%;height:90px;resize:none;border:0;background:transparent;padding:4px 0;outline:0;font-size:13px;color:var(--ink)}.composer textarea:disabled{background:var(--desk)}.composer-footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.composer-footer span{font-size:10px;color:#98a3b6}.composer-footer .primary{padding:8px 16px;font-size:12px}.composer-footer svg{height:15px;width:15px}.detail-panel{border-left:1px solid var(--line);padding:24px 22px;overflow-y:auto;background:#fdfefe}.detail-panel h3{margin-bottom:23px}.details-empty{color:var(--muted);font-size:12px}.detail-row{margin-bottom:18px}.detail-row dt{font-size:11px;color:var(--muted);margin-bottom:5px}.detail-row dd{font-size:12px;margin:0;overflow-wrap:anywhere}.detail-row .mono{font-size:10px;color:#8190a6}.detail-panel select{max-width:100%;width:100%;background:white;border:1px solid var(--line);border-radius:5px;padding:7px;font-size:12px}.detail-note{border-top:1px solid var(--line);margin-top:24px;padding-top:20px;font-size:11px;color:var(--muted)}.detail-note svg{display:block;margin-bottom:10px}.detail-note strong{display:block;font-weight:500;color:#60718c;margin-bottom:6px}.detail-note p{line-height:1.9}.detail-panel #demo-controls{margin-top:24px}.app-footer{height:32px;display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#94a0b1;border-top:1px solid var(--line);padding:0 24px;background:var(--paper)}.content-page{min-height:calc(100dvh - 150px);padding:36px 42px;max-width:1600px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}.page-heading p{font-size:12px;margin-top:8px}.actions{display:flex;gap:9px}.bot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:20px;margin-top:24px}.bot-card{border:1px solid var(--line);background:var(--paper);border-radius:10px;padding:23px}.bot-card-head{display:flex;gap:12px;align-items:center;margin-bottom:20px}.bot-card-head h3{font-size:14px}.bot-card-head p{font-size:11px;color:var(--muted);margin-top:4px}.bot-facts{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;padding:12px 0;border-top:1px solid var(--line)}.bot-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.table-wrap{background:var(--paper);border:1px solid var(--line);border-radius:9px;overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}th{text-align:left;font-weight:500;color:var(--muted);background:#fbfcfe}th,td{padding:14px 18px;border-bottom:1px solid var(--line)}tr:last-child td{border-bottom:0}td.mono{font-size:10px}.team-layout{display:grid;grid-template-columns:minmax(400px,1fr) 300px;gap:24px;align-items:start}.forms-stack{display:grid;gap:20px}.form-card{background:var(--paper);border:1px solid var(--line);border-radius:9px;padding:22px}.form-card h3{margin-bottom:18px}label{display:block;color:#53637b;font-size:12px;margin:15px 0}label input,label select{display:block;width:100%;margin-top:7px;padding:10px 12px;border:1px solid #dce3ed;border-radius:6px;color:var(--ink);background:white}input::placeholder,textarea::placeholder{color:#a0aaba}.form-error{min-height:24px;color:var(--danger);font-size:12px}.auth-screen{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;background:white}.auth-story{padding:42px 52px;background:#f4f8ff;display:flex;flex-direction:column;border-right:1px solid #e7edf8}.story-content{margin:auto 0}.story-content .eyebrow{color:#6695d1;font-size:12px;margin-bottom:23px}.story-content h1{font-size:44px;line-height:1.5;letter-spacing:-1.5px}.story-content p{margin-top:25px;color:#7d8ea7;font-size:14px;line-height:2}.story-flow{display:flex;gap:20px;align-items:center;margin-top:48px;font-size:12px;color:#5986bd}.story-flow span{display:flex;align-items:center;gap:10px;background:#ffffffb0;padding:14px 18px;border:1px solid #e0eaf8;border-radius:8px}.story-flow i{color:#a7bcd8;font-style:normal}.story-foot{font-size:11px;color:#8fa2bc}.auth-panel{display:grid;place-items:center;padding:48px}.auth-panel form{width:100%;max-width:350px}.auth-panel h2{font-size:28px;letter-spacing:-.5px;margin-bottom:10px}.auth-panel .muted{font-size:13px;margin-bottom:32px}.auth-panel label{margin:22px 0}.auth-panel input{padding:12px}.auth-note{font-size:11px;color:#a0aabc;text-align:center;margin-top:24px}.auth-panel .notice{margin-top:18px}dialog{border:1px solid var(--line);border-radius:13px;padding:27px;max-width:440px;width:calc(100% - 32px);color:var(--ink)}dialog::backdrop{background:rgba(20,36,60,.35)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.dialog-heading h2{font-size:18px}dialog .muted{font-size:12px;line-height:1.9}dialog .notice{margin:18px 0}dialog textarea{width:100%;border:1px solid var(--line);border-radius:6px;padding:12px;margin:18px 0;resize:none;font-size:12px;overflow-wrap:anywhere}.qr-area{height:300px;display:grid;place-items:center;margin:20px 0 8px;color:var(--muted);font-size:12px}.qr-area img{height:280px;width:280px;max-width:100%;object-fit:contain}.binding-status{text-align:center;font-size:12px;color:var(--qq-blue)}.checkbox-label{display:flex;align-items:flex-start;gap:8px;font-size:11px}.checkbox-label input{width:auto;margin:5px 0}#toast{position:fixed;bottom:48px;left:50%;transform:translateX(-50%);z-index:100;background:#23344b;color:white;font-size:12px;padding:12px 20px;border-radius:8px;max-width:90vw}#older-audit{margin-top:20px}
@media(min-width:1600px){.inbox-layout{grid-template-columns:330px minmax(350px,1fr) 300px}.message-list{padding:30px 40px}.chat-heading,.target-strip{padding-left:40px}.composer{padding-left:40px;padding-right:40px}}
@media(max-width:1150px){.brand small{display:none}.topbar{padding:0 16px}.topbar nav{gap:16px}.inbox-layout{grid-template-columns:250px minmax(330px,1fr)}.detail-panel{display:none}.content-page{padding:28px}.workspace-bar{padding:0 16px}.team-layout{grid-template-columns:1fr 280px}}
@media(max-width:760px){.topbar{height:auto;min-height:64px;flex-wrap:wrap;padding:12px 16px;gap:8px}.topbar nav{order:3;width:100%;height:40px;justify-content:space-between;gap:7px}.nav-button{font-size:11px}.nav-button svg{width:14px}.workspace-bar .muted{display:none}.workspace-bar select{max-width:170px}.workspace-bar{gap:6px}.connection{font-size:10px;gap:6px!important}.inbox-layout{height:calc(100dvh - 208px);grid-template-columns:180px minmax(0,1fr);min-height:480px}.conversation-item{padding:12px 5px;gap:7px}.conversation-item>.avatar{display:none}.panel-heading{padding:18px 12px 10px}.panel-heading h2{font-size:13px}.search-box{margin:0 10px 10px}.conversation-panel>select{margin-left:10px;width:calc(100% - 20px)}.filter-tabs{padding:0 12px;gap:15px}.filter-tabs button{font-size:10px}.chat-heading{height:auto;min-height:90px;padding:12px;flex-wrap:wrap;gap:7px}.chat-contact{min-width:100px}.chat-contact h2{font-size:13px}.target-strip{padding:8px 12px;font-size:10px}.message-list{padding:15px 12px}.message{max-width:98%;gap:5px}.message .avatar{display:none}.bubble{font-size:12px;padding:9px}.composer{padding:0 12px 12px}.composer-footer span{display:none}.composer-footer{justify-content:flex-end}.content-page{padding:24px 16px}.page-heading{display:block}.page-heading .actions{margin-top:18px}.page-heading h1{font-size:23px}.team-layout{grid-template-columns:1fr}.auth-screen{grid-template-columns:1fr}.auth-story{display:none}.auth-panel{padding:40px 24px}.app-footer{padding:0 12px}.app-footer>span:nth-child(2){display:none}.list-footer{font-size:9px;padding:10px}.mode-badge{font-size:9px;padding:1px 4px}.empty-state{padding:18px}.empty-state h2{font-size:17px}.empty-state p{font-size:11px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.official-link{display:inline-block;color:var(--qq-blue);font-size:12px;margin:12px 0;text-decoration:underline;text-underline-offset:3px}
.friend-deleted-bar{background:#fff2f2;color:#b42318;font-size:12px;padding:8px 25px;border-bottom:1px solid #f0c4c0}
#chat-find{max-width:160px;margin-left:auto;border:1px solid var(--line);border-radius:6px;padding:6px 8px;font-size:12px;background:white}
.chat-find-hit{outline:2px solid #f5c518;background:#fff7d6}
@media(max-width:760px){.friend-deleted-bar{padding:8px 12px}#chat-find{max-width:110px;font-size:11px}}

/* Help is an overlay, never a row consuming the chat viewport. */
.setup-guide{margin:auto;max-width:760px;width:calc(100% - 32px);max-height:calc(100dvh - 32px);overflow:auto;background:var(--paper)}.guide-steps{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}.guide-steps b{color:var(--qq-blue);font-size:13px}.guide-steps p{color:var(--muted);font-size:12px;line-height:1.8;margin-top:6px}.guide-next{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-top:16px;border-top:1px solid var(--line)}.pair-steps{padding-left:22px;font-size:13px;line-height:1.8}.pair-steps li{margin:10px 0}
/* One viewport shell. Lists and content scroll independently; composer stays put. */
#app{height:100dvh;display:flex;flex-direction:column;overflow:hidden;min-height:0}
.topbar,.workspace-bar,.app-footer{flex-shrink:0}
#app>.page{flex:1;min-height:0;height:auto;min-width:0}
#app>.inbox-layout{overflow:hidden}
#app>.content-page{overflow:auto;width:100%;margin:0 auto}
#active-chat{flex:1;height:auto;overflow:hidden}
.message-list{min-height:0;overflow:auto;overscroll-behavior:contain}
.conversation-list{min-height:0;overscroll-behavior:contain}
.composer{background:var(--paper)}
#open-guide{white-space:nowrap;color:var(--qq-blue)}
@media(max-width:760px){.guide-steps{grid-template-columns:1fr}.workspace-bar{height:auto;min-height:52px;flex-wrap:wrap;padding-top:6px;padding-bottom:6px;row-gap:4px}.composer textarea{height:64px}.reply-window{padding:6px 0;font-size:10px}.chat-heading{min-height:64px}.app-footer{height:26px}.inbox-layout{grid-template-columns:140px minmax(0,1fr)}}
@media(max-height:600px){.composer textarea{height:46px}.composer{padding-bottom:8px}.chat-heading{height:auto;min-height:0}.reply-window{padding:5px 0}.app-footer{height:24px}.target-strip{padding-top:5px;padding-bottom:5px}}

.captcha-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.captcha-row img{max-width:100%;height:80px;border:1px solid #d8e2ee;border-radius:8px;background:#fff}.captcha-row button{white-space:nowrap}#captcha-field{margin:18px 0}

/* Media and admin additions preserve the existing three-column desktop desk. */
.media-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:4px 0}.media-toolbar #media-draft{overflow-wrap:anywhere;max-width:45%}.attachment{display:flex;flex-direction:column;gap:5px;padding:8px 0;max-width:100%}.attachment-file{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#f7f9fc;max-width:min(360px,100%)}.attachment-file strong{font-size:12px;color:#3b4d66}.attachment-file p{margin:0;font-size:13px;overflow-wrap:anywhere}.attachment img,.attachment video{width:auto;max-width:min(360px,100%);max-height:300px;border-radius:8px;object-fit:contain}.attachment audio{max-width:100%;width:290px}.attachment a{overflow-wrap:anywhere}.contact-image{width:100%;height:100%;border-radius:inherit;object-fit:cover}.admin-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,360px);gap:24px}.admin-user{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px;border-bottom:1px solid var(--line)}.admin-user>div{flex:1;min-width:130px}.form-card textarea,#contact-form textarea{width:100%;border:1px solid var(--line);border-radius:6px;padding:10px;resize:vertical}.admin-layout .form-card{margin-top:16px}#mobile-back{display:none}.chat-contact{min-width:0}.chat-contact h2{overflow-wrap:anywhere}.operator-only .topbar nav{display:flex}.operator-only .role-tag{display:none}.operator-only .brand small{display:none}#contact-dialog{width:min(520px,94vw)}#contact-form{margin-top:16px}.content-page{overflow:auto;min-height:0}.media-error{color:var(--danger)}
@media(max-width:760px){
 #app>.inbox-layout{display:flex;flex:1;min-height:0;height:auto;overflow:hidden}.inbox-layout .conversation-panel{display:flex;width:100%;min-width:0;flex:1}.inbox-layout .chat-panel{display:none;width:100%;min-width:0;flex:1}.mobile-chat .inbox-layout .conversation-panel{display:none}.mobile-chat .inbox-layout .chat-panel{display:flex;flex-direction:column}.mobile-chat #mobile-back{display:block}.conversation-item>.avatar{display:grid}.conversation-item{padding:14px}.conversation-list{min-height:0}.chat-heading{gap:8px;padding:8px;flex-wrap:wrap;height:auto;min-height:60px}.chat-heading .chat-contact{flex:1}.chat-heading h2{font-size:14px}.chat-heading .avatar{display:none}.chat-heading button{min-height:36px}.chat-heading #conversation-status{display:none}.target-strip{font-size:11px;padding:6px 12px}.message-list{padding:14px 10px}.composer{padding:6px 10px max(8px,env(safe-area-inset-bottom))}.composer textarea{height:70px;font-size:16px}.composer-footer{gap:8px}.composer-footer #compose-hint{font-size:10px}.composer-footer button{min-height:42px}.media-toolbar button{min-height:36px}.topbar .brand{font-size:15px}.topbar nav{overflow-x:auto;justify-content:flex-start}.topbar .nav-button{flex-shrink:0;min-height:40px}.workspace-bar{min-height:42px}.workspace-bar select{max-width:180px}.workspace-bar .connection{margin-left:auto}.workspace-bar #connection-label{display:none}.app-footer{display:none}.admin-layout,.team-layout{display:block}.content-page{padding:16px}.page-heading{gap:12px;flex-wrap:wrap}.page-heading h1{font-size:22px}.admin-user{padding:12px;gap:8px}.form-card input,.form-card select,.form-card textarea,dialog input,dialog textarea{font-size:16px}dialog{max-height:90dvh;overflow:auto}.attachment img,.attachment video{max-width:100%}#contact-info{min-height:36px}.operator-only .topbar{min-height:56px}.operator-only .workspace-bar select{max-width:190px}.detail-panel{display:none}
}

.operator-only .topbar nav{display:none}.account-enabled{color:#13835f;border-color:#89cfb5;background:#effaf5}.send-mode-label{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted);margin:4px 0}.send-mode-label select{max-width:260px;min-height:32px}#sending-policy-form select{width:100%}

/* Friendship metadata is separate from customer message bubbles. */
.voice-transcript{max-width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--paper)}.voice-transcript summary{cursor:pointer}.voice-transcript-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;margin:8px 0 0}
.friend-notice{max-width:560px;margin:18px auto 26px;padding:16px 20px;border:1px solid #dbe8f5;border-radius:12px;background:#f3f8fe;color:#526780;line-height:1.8;font-size:13px;white-space:pre-line;overflow-wrap:anywhere}

.media-toolbar .secondary.compact,.media-toolbar .call-toolbar-btn{border-radius:999px;background:#f4f7fb;border:1px solid var(--line);color:#2b3d55}
.media-toolbar .secondary.compact:hover,.media-toolbar .call-toolbar-btn:hover{background:#eaf2ff;border-color:#c5d8f3;color:var(--qq-blue)}
.composer textarea{border-radius:12px}
.composer-footer .primary{border-radius:999px}

@media(min-width:761px){
 .conversation-item{padding:12px;border-radius:10px}
 .conversation-top strong{font-size:14px}
 .conversation-top time{font-size:11px}
 .chat-heading{border-bottom:1px solid var(--line)}
 .message-list{background:#f7f9fc}
 .composer{padding:10px 20px 16px}
 .composer textarea{height:84px;background:var(--desk);padding:10px 12px;margin:4px 0 8px}
 .composer textarea:focus{background:#fff;box-shadow:0 0 0 2px #d6e6fb}
 .media-toolbar{gap:6px;padding:6px 0 2px}
 .send-mode-label{margin:2px 0 6px}
 .send-mode-label select{border:1px solid var(--line);border-radius:8px;padding:4px 8px;background:#fff}
}

.detail-identity{display:flex;align-items:center;gap:12px;margin:0 0 16px;min-width:0}
.detail-identity .avatar{width:56px;height:56px;flex:0 0 56px}
.detail-identity strong{display:block}
.detail-identity p{margin:0;overflow:hidden;text-overflow:ellipsis}
.chat-contact{min-width:0;flex:1 1 140px}
.chat-contact h2,.chat-contact p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
@media(max-width:760px){
 .chat-heading{display:flex;flex-wrap:wrap;align-items:center;height:auto!important;min-height:0;padding:8px 10px;gap:6px 8px}
 .chat-heading .avatar{display:none}
 .chat-heading .chat-contact{flex:1 1 0;min-width:0;order:2}
 .chat-heading #mobile-back{order:1;flex:0 0 auto}
 .chat-heading #contact-info,.chat-heading #close-conversation,.chat-heading #reopen-conversation,.chat-heading #auto-reply-mute{order:3;flex:0 0 auto;min-height:34px;padding:6px 10px}
 .chat-heading #conversation-status{display:none}
 .chat-heading #chat-find{order:4;flex:1 1 100%;max-width:none;width:100%;margin:0;min-height:36px}
 .chat-heading h2{font-size:15px}
 .chat-heading p{font-size:11px}
 .composer{padding:8px 12px max(12px,env(safe-area-inset-bottom))}
 .composer textarea{height:72px;font-size:16px;padding:10px 12px;margin:0 0 8px;background:var(--desk)}
 .message-list{padding:12px 10px}
 .conversation-item{padding:12px}
 .media-toolbar{flex-wrap:nowrap;overflow-x:auto;gap:8px;-webkit-overflow-scrolling:touch}
 .media-toolbar .secondary.compact,.media-toolbar .call-toolbar-btn{flex:0 0 auto;min-height:40px}
 .send-mode-label{flex-wrap:wrap}
 .send-mode-label select{max-width:100%;min-height:40px}
}

/* One visible control surface for a whole fleet, without affecting the chat viewport. */
.proactive-settings{margin-bottom:24px}.proactive-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.proactive-heading h2{font-size:20px;margin:6px 0 10px}.proactive-heading #proactive-summary{font-size:13px;color:var(--qq-blue);overflow-wrap:anywhere}.proactive-settings>p{line-height:1.8;margin:8px 0}.proactive-settings fieldset{border:0;padding:0;margin:16px 0;min-width:0}.proactive-settings form,.proactive-batch-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.proactive-settings form{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--line)}.proactive-settings .checkbox-label{margin:0;flex:1;min-width:220px}.proactive-settings button{min-height:40px}.proactive-settings fieldset:disabled{opacity:.6}.proactive-settings #proactive-result{color:var(--qq-blue);min-height:1.5em}.proactive-settings .sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:760px){.proactive-settings .checkbox-label{min-width:0;width:100%;flex-basis:100%}.proactive-settings form button,.proactive-batch-actions button{width:100%}.proactive-heading{gap:0}.proactive-heading h2{font-size:19px}}

.visitor-face{display:block;width:100%;height:100%;border-radius:inherit;object-fit:cover}

.conv-menu{position:fixed;z-index:50;min-width:196px;padding:6px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 10px 28px rgba(28,41,61,.16)}
.conv-menu[hidden]{display:none!important}
.conv-menu-item{display:block;width:100%;text-align:left;padding:9px 12px;border-radius:8px;background:transparent;color:var(--ink);font-size:13px}
.conv-menu-item:hover{background:var(--qq-blue-soft);color:var(--qq-blue)}
.conv-menu-item.is-danger:hover{background:#fdecee;color:var(--danger)}
#contact-info.secondary{min-height:36px}

/* Customer attention is separate from message unread counts. */
.new-customer-dot{display:inline-block;width:8px;height:8px;margin-right:7px;vertical-align:middle;border-radius:50%;background:#1677ff;box-shadow:0 0 0 3px #1677ff15;flex-shrink:0}
.qq-face{font-size:1.65em;line-height:1.35;vertical-align:middle;margin:0 .08em}
.qq-face-fallback{display:inline-block;padding:1px 5px;border-radius:5px;background:#eef4fc;color:#405574;font-size:.92em;overflow-wrap:anywhere}
#sound-toggle,#sound-test{white-space:nowrap;font-size:12px}
