:root{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#17251b;background:#edf2ee;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh}.app{height:100dvh;max-width:1180px;margin:0 auto;background:#fff;display:flex;flex-direction:column;box-shadow:0 12px 42px #18382418}.topbar{height:70px;flex:none;background:#299d3e;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 22px}.brand{display:flex;align-items:center;gap:11px}.brand-mark{height:38px;width:38px;border-radius:12px;background:#fff;color:#22983a;display:grid;place-items:center;font-size:21px;font-weight:800}.brand strong,.brand small{display:block}.brand strong{font-size:17px}.brand small{font-size:12px;opacity:.82;margin-top:2px}.connection{font-size:13px;display:flex;align-items:center;gap:8px}.dot{height:9px;width:9px;border-radius:50%;background:#ffe17b;box-shadow:0 0 0 3px #fff2}.dot.online{background:#c9ffca}.dot.offline{background:#ffb7a9}.layout{min-height:0;flex:1;display:grid;grid-template-columns:330px minmax(0,1fr)}.chat-list-pane{border-right:1px solid #e5ebe6;display:flex;flex-direction:column;min-height:0}.list-heading{height:56px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0ed}.list-heading strong{font-size:15px}.list-heading span{color:#758077;font-size:12px}.chat-list{overflow:auto}.chat-row{width:100%;border:0;border-bottom:1px solid #edf0ed;background:#fff;text-align:left;padding:14px 16px;cursor:pointer;color:inherit;display:block}.chat-row:hover,.chat-row.active{background:#eef8ef}.chat-row.active{box-shadow:inset 3px 0 #299d3e}.chat-row-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.chat-row-title strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-row-title span{font-size:11px;color:#607267;white-space:nowrap}.chat-row-meta{margin-top:5px;font-size:11px;color:#728078}.chat-row-preview{margin-top:7px;font-size:13px;color:#536259;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty-list{padding:24px 18px;color:#748078;font-size:13px;line-height:1.5}.conversation-pane{min-width:0;display:flex;flex-direction:column;min-height:0;background:#f8faf8}.conversation-header{height:66px;flex:none;background:#fff;border-bottom:1px solid #e5ebe6;display:flex;align-items:center;padding:0 20px;gap:14px}.conversation-header[hidden],.reply-form[hidden],.welcome[hidden]{display:none}.back-button{display:none;border:0;background:transparent;color:#268e39;font-size:30px;line-height:1;cursor:pointer}.contact-title{min-width:0}.contact-title strong,.contact-title span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contact-title strong{font-size:15px}.contact-title span{font-size:11px;color:#748078;margin-top:4px}.profile-chip{margin-left:auto;font-size:12px;color:#2c7839;background:#eaf5eb;border-radius:14px;padding:7px 11px;white-space:nowrap}.message-list{flex:1;overflow:auto;padding:24px clamp(14px,4vw,44px);display:flex;flex-direction:column;gap:10px}.welcome{margin:auto;display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center;color:#718078;padding:24px}.welcome strong{color:#304237;font-size:17px}.welcome span{font-size:13px}.welcome-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:50%;background:#eaf5eb;color:#299d3e;font-size:25px}.message{max-width:min(78%,650px);padding:10px 13px 7px;border-radius:15px;background:#fff;border:1px solid #e4e9e5;box-shadow:0 1px 2px #00000008;overflow-wrap:anywhere}.message.incoming{align-self:flex-start;border-top-left-radius:5px}.message.outgoing{align-self:flex-end;background:#e4f3e5;border-color:#d7ebd8;border-top-right-radius:5px}.message-text{font-size:15px;line-height:1.42;white-space:pre-wrap}.message-time{margin-top:5px;text-align:right;font-size:10px;color:#829087}.reply-form{flex:none;background:#fff;border-top:1px solid #e5ebe6;padding:12px 16px max(12px,env(safe-area-inset-bottom))}.reply-form textarea{width:100%;resize:vertical;min-height:48px;max-height:160px;border:1px solid #cbd6cd;border-radius:10px;padding:11px 12px;font:inherit;line-height:1.4;outline:none}.reply-form textarea:focus{border-color:#299d3e;box-shadow:0 0 0 3px #299d3e1c}.reply-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;min-height:38px}.reply-footer span{font-size:12px;color:#617167}.reply-footer span.error{color:#b33a2d}.reply-footer button{border:0;border-radius:9px;padding:10px 17px;background:#299d3e;color:#fff;font:600 14px inherit;cursor:pointer}.reply-footer button:disabled{opacity:.55;cursor:wait}.pair-notice{position:fixed;inset:0;background:#142017b8;display:grid;place-items:center;padding:20px;z-index:4}.pair-notice[hidden]{display:none}.pair-card{max-width:400px;background:#fff;border-radius:16px;padding:24px;box-shadow:0 20px 70px #0004}.pair-card h1{font-size:19px;margin:0 0 10px}.pair-card p{font-size:14px;line-height:1.5;color:#5c6b60}.pair-card button{background:#299d3e;color:#fff;border:0;border-radius:8px;padding:10px 14px;font:600 14px inherit}@media(max-width:680px){.app{height:100dvh}.topbar{height:60px;padding:0 14px}.layout{grid-template-columns:1fr}.chat-list-pane,.conversation-pane{grid-column:1;grid-row:1}.conversation-pane{display:none}.app.has-chat .chat-list-pane{display:none}.app.has-chat .conversation-pane{display:flex}.conversation-header{height:60px;padding:0 12px;gap:10px}.back-button{display:block}.profile-chip{padding:6px 8px;font-size:11px}.message-list{padding:16px 12px}.message{max-width:88%}.reply-form{padding:10px 10px max(10px,env(safe-area-inset-bottom))}.chat-row{padding:14px}.connection{font-size:11px}.list-heading{height:48px}}
.topbar-actions{display:flex;align-items:center;gap:14px}.topbar-actions>button{border:1px solid #ffffff78;background:#ffffff18;color:#fff;border-radius:7px;padding:7px 10px;font:600 12px system-ui,sans-serif;cursor:pointer}.topbar-actions>button[hidden]{display:none}@media(max-width:680px){.topbar{padding:0 12px}.topbar-actions{gap:8px}.topbar-actions>button{padding:6px 8px}.connection{font-size:11px}}
.reply-footer button,.pair-card button{font:600 14px system-ui,sans-serif}

.chat-section-label{position:sticky;top:0;z-index:1;padding:10px 16px 7px;background:#f6f8f6;color:#287b39;font-size:12px;font-weight:750;letter-spacing:.02em}.chat-section-label.secondary{margin-top:4px;color:#758078}.chat-row{min-height:82px;padding:13px 16px 12px}.chat-row.needs-reply{background:#fff}.chat-row.needs-reply.active,.chat-row.needs-reply:hover{background:#f0f8f1}.chat-row-title{min-height:22px}.chat-row-title strong{font-size:15px}.chat-row-trailing{flex:none;display:flex;align-items:center;gap:8px}.chat-row-trailing time{color:#7c8980;font-size:11px}.unanswered-badge{min-width:22px;height:22px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#e53935;color:#fff;font-size:12px;font-weight:800;line-height:1;box-shadow:0 1px 3px #a20d0d30}.chat-row.needs-reply .chat-row-meta{color:#607568}.chat-row-preview{max-width:100%;line-height:1.35}@media(max-width:680px){.chat-section-label{padding:10px 16px 7px}.chat-row{min-height:84px;padding:14px 16px 12px}.chat-row-preview{font-size:13px}}
.chat-row-trailing .wait-age{color:#bb302a;font-size:11px;font-weight:700}.reply-actions{display:flex;align-items:center;gap:8px}.reply-actions button{font:600 14px system-ui,sans-serif}.reply-footer .copilot-button{background:#edf5ee;color:#287b39;border:1px solid #d5e7d7}.copilot-suggestions{display:grid;gap:7px;margin-top:8px;max-height:27vh;overflow:auto}.copilot-suggestions[hidden]{display:none}.copilot-choice{padding:10px 12px;border:1px solid #d8e5da;border-radius:10px;background:#f4faf5;color:#25372a;text-align:left;font:14px/1.4 system-ui,sans-serif;cursor:pointer}.copilot-choice:hover{border-color:#299d3e;background:#eaf6ec}@media(max-width:680px){.reply-actions{gap:6px}.reply-actions button{padding:9px 11px}.reply-footer{align-items:flex-end}.reply-footer>span{max-width:48%;line-height:1.35}}
.next-chat-button{flex:none;border:1px solid #cfe2d1;border-radius:8px;background:#f0f7f1;color:#287b39;padding:7px 10px;font:600 12px system-ui,sans-serif;cursor:pointer}.next-chat-button:disabled{opacity:.45;cursor:default}@media(max-width:680px){.conversation-header{gap:7px}.profile-chip{max-width:34vw;overflow:hidden;text-overflow:ellipsis}.next-chat-button{padding:7px 8px;font-size:11px}}
.previous-chat-button{flex:none;width:30px;height:32px;padding:0;border:1px solid #cfe2d1;border-radius:8px;background:#f0f7f1;color:#287b39;font:700 19px/1 system-ui,sans-serif;cursor:pointer}.previous-chat-button:disabled{opacity:.4;cursor:default}@media(max-width:680px){.previous-chat-button{width:28px;height:30px;font-size:18px}}
.message.translatable{cursor:pointer}.message.translatable:active{transform:scale(.995)}.translation-hint{margin-top:6px;padding-top:5px;border-top:1px solid #e7eee8;color:#6c8672;font-size:11px}.translation-hint.loading{color:#277b39}.translation-hint.error{color:#b33a2d}.message-translation{margin-top:7px;padding-top:7px;border-top:1px solid #d8e8da;color:#1f4d2a;white-space:pre-wrap}.message-translation small{display:block;margin-bottom:4px;color:#388249;font-size:10px;font-weight:700}
.history-notice{align-self:center;max-width:95%;margin:0 0 4px;padding:6px 10px;border:1px solid #dce9de;border-radius:999px;background:#f1f8f2;color:#568060;font:11px system-ui,sans-serif}.history-notice.error{cursor:pointer;border-color:#ebc9c5;background:#fff5f3;color:#ad3a31}.history-notice:disabled{opacity:.85}@media(max-width:680px){body{overflow:hidden}.app{position:fixed;top:var(--visual-offset-top,0px);left:0;right:0;width:100%;height:var(--visual-height,100dvh);max-height:var(--visual-height,100dvh);overflow:hidden}.layout,.conversation-pane{min-height:0}.message-list{min-height:0;overscroll-behavior:contain}.reply-form{flex:0 0 auto;padding-bottom:max(8px,env(safe-area-inset-bottom))}.reply-form textarea{resize:none;max-height:20dvh;overflow:auto;scroll-margin-bottom:8px}}
.send-confirm-dialog{width:min(440px,calc(100vw - 28px));max-width:440px;border:0;border-radius:16px;padding:20px;background:#fff;color:#17251b;box-shadow:0 20px 70px #0004}.send-confirm-dialog::backdrop{background:#112016a8;backdrop-filter:blur(2px)}.send-confirm-dialog h2{margin:0 0 12px;font-size:18px}.send-confirm-to{margin:0 0 12px;color:#56675c;font-size:12px;line-height:1.45}.send-confirm-to strong{color:#24372a}.send-confirm-text{max-height:35vh;overflow:auto;padding:12px;border:1px solid #dce7de;border-radius:10px;background:#f7faf7;color:#1c2b21;font-size:15px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}.send-confirm-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:16px}.send-confirm-actions button{border:0;border-radius:9px;padding:11px 15px;font:600 14px system-ui,sans-serif;cursor:pointer}.cancel-send-button{background:#eef2ef;color:#26392b}.confirm-send-button{background:#299d3e;color:#fff}@media(max-width:680px){.send-confirm-dialog{padding:18px}.send-confirm-text{max-height:28vh}.send-confirm-actions button{min-height:44px}}
