:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#213b35;background:#eaf0ec;font-synthesis:none;--green:#155b4c;--muted:#708078;--border:#e0e8e1}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:9px;padding:10px 14px;font-weight:600;color:inherit;min-height:42px}button:disabled{cursor:wait;opacity:.6}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #78b3a3;outline-offset:2px}.primary{background:var(--green);color:#fff}.primary:hover{background:#104a3e}.danger{background:#b83b3b;color:white}.soft{background:#edf2ee;color:#345b4c}.text-button{background:none;color:#61736a}.icon-button{background:transparent;font-size:25px;padding:4px 11px}.wide{width:100%}.small,small{font-size:12px}.muted{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:750;color:#6d8a79;margin:0 0 8px}.stand-banner{height:31px;background:#e2e3c7;color:#5c6043;display:flex;align-items:center;justify-content:center;gap:14px;font-size:10px;font-weight:750;letter-spacing:1.5px}.stand-banner span{font-weight:450;letter-spacing:.2px}.workspace{height:calc(100dvh - 31px);max-width:1560px;margin:auto;display:grid;grid-template-columns:330px minmax(0,1fr);box-shadow:0 0 70px #173b3310}.sidebar{background:#fff;display:flex;flex-direction:column;border-right:1px solid var(--border);min-height:0}.brand{display:flex;align-items:center;gap:10px;padding:24px 20px 22px;border-bottom:1px solid var(--border)}.brand strong{display:block;font-size:20px}.brand small{display:block;color:#7c8e84;font-size:10px;margin-top:3px}.status{margin-left:auto;border-radius:10px;background:#f0f3ee;color:#65826e;font-size:10px;max-width:85px;padding:5px 7px}.status.offline{background:#fff2d9;color:#8e6b28}.list-heading{padding:17px 18px 9px;display:flex;align-items:center;justify-content:space-between}.list-heading h1{font-size:17px;margin:0}.chat-list{overflow:auto;flex:1}.chat-button,.contact-button{width:100%;border-radius:0;background:white;display:flex;gap:12px;text-align:left;align-items:center;border-bottom:1px solid #f2f4f0;padding:15px 18px}.chat-button.active{background:#eaf3ed;border-left:3px solid var(--green);padding-left:15px}.chat-button:hover,.contact-button:hover{background:#f0f5ef}.avatar{width:41px;height:41px;border-radius:50%;background:#e8eee0;color:#47664f;display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;flex-shrink:0}.avatar.mine{background:#dcece6}.chat-label strong{font-size:13px;display:block}.chat-label small{font-size:11px;font-weight:450;color:#869187;display:block;margin-top:6px}.contacts{background:#f8faf5;border-block:1px solid var(--border);padding:13px 0}.contacts .eyebrow{padding:0 18px}.contact-button{padding-block:10px;background:transparent;font-size:13px}.list-empty{padding:25px 22px;color:#819087;font-size:13px;line-height:1.6}.profile{padding:16px 17px;background:#f9fbf7;border-top:1px solid var(--border)}.identity{display:flex;align-items:center;gap:10px;margin-bottom:12px}.identity strong{font-size:12px;display:block}.identity small{display:block;color:#8a958b;margin-top:4px}.profile-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}.profile-actions button{font-size:10px;min-height:34px;padding:7px 8px}.conversation{min-width:0;background:#f2f5ee;position:relative}.empty-state{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:32px}.empty-symbol{height:90px;width:90px;border:1px solid #d7e3d6;background:#e6eee1;color:#72957a;border-radius:27px;display:grid;place-items:center;font-size:44px;margin-bottom:32px}.empty-state h2{font-size:31px;font-weight:550;letter-spacing:-1px;margin:7px 0 4px}.empty-state p:not(.eyebrow){font-size:13px;color:#819080;line-height:1.9}.empty-tags{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:26px}.empty-tags span{font-size:10px;border:1px solid #dce5d8;border-radius:20px;padding:8px 12px;color:#7f927c}.chat-view{height:100%;display:flex;flex-direction:column;min-width:0}.chat-header{height:83px;flex-shrink:0;padding:14px 24px;display:flex;align-items:center;gap:12px;background:#ffffffdf;border-bottom:1px solid var(--border)}.peer-title{flex:1;min-width:0}.peer-title h2{font-size:15px;margin:0 0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.peer-title small{color:#8a968d;font-size:10px}.chat-header button{font-size:11px}.message-scroll{overflow:auto;flex:1;padding:0 30px 24px;min-height:0;scroll-behavior:smooth}.chat-divider{text-align:center;font-size:10px;color:#9aa697;padding:15px}.message-row{display:flex;margin:10px 0;justify-content:flex-start}.message-row.mine{justify-content:flex-end}.bubble{max-width:min(78%,660px);background:white;border:1px solid #e1e8df;border-radius:3px 13px 13px;padding:13px 16px 8px;box-shadow:0 2px 3px #49664b04}.mine .bubble{background:#dcecdf;border-color:#d0e2d3;border-radius:13px 3px 13px 13px}.bubble.important{border-left:3px solid #b49138}.bubble-author{font-size:10px;font-weight:700;color:#5f8065;margin-bottom:6px}.bubble-text{font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.bubble-foot{font-size:9px;color:#8a988a;display:flex;gap:8px;justify-content:flex-end;margin-top:7px}.bubble-label{font-size:9px;letter-spacing:.2px;color:#9c7f28;margin-bottom:6px}.ack{font-size:11px;margin-top:10px;background:#f5efd9;color:#7c6726}.pending{opacity:.75}.pending .bubble{border-style:dashed}.pending button{font-size:10px;min-height:30px;padding:4px 8px;margin-top:8px}.notice{background:#fff3d9;color:#8d6923;padding:10px 24px;font-size:12px;border-bottom:1px solid #eeddaa}.composer{padding:14px 25px 10px;background:#fff;border-top:1px solid var(--border);flex-shrink:0;padding-bottom:max(10px,env(safe-area-inset-bottom))}.compose-options{display:flex;gap:18px;align-items:center;margin-bottom:10px}.check{font-size:11px;display:flex;align-items:center;gap:6px;color:#6b7f70;cursor:pointer}.check input{accent-color:var(--green);width:15px;height:15px;margin:0}.compose-row{display:flex;gap:10px;align-items:stretch}textarea{resize:vertical;border:1px solid #dce5d9;border-radius:9px;background:#fafcf8;padding:11px 12px;min-height:54px;max-height:160px;flex:1;min-width:0;font-size:13px;color:#284334}.send-button{font-size:12px;padding-inline:20px}.send-button span{font-size:19px;margin-left:6px}.compose-hint{font-size:9px;color:#a0aa9c;margin:8px 0 0}.mobile-only{display:none}.login-wrap{min-height:calc(100dvh - 31px);display:grid;place-items:center;padding:30px}.login-card{max-width:390px;width:100%;padding:35px;background:white;border:1px solid #dbe5d9;border-radius:16px;box-shadow:0 15px 60px #173b3310}.login-card img{margin-bottom:24px}.login-card h1{font-size:35px;letter-spacing:-1.2px;margin:4px 0 12px}.login-card label{display:block;font-size:12px;font-weight:650;margin:17px 0}.login-card input{display:block;width:100%;margin-top:8px;border:1px solid #d7e1d6;border-radius:8px;padding:12px}.login-card p{line-height:1.7}.error{color:#a74236;font-size:12px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#243f34;color:white;padding:12px 20px;border-radius:10px;box-shadow:0 8px 35px #0002;z-index:100;max-width:calc(100vw - 32px);font-size:13px}.call-panel{position:fixed;z-index:30;right:28px;bottom:26px;width:min(520px,calc(100vw - 32px));background:#183f36;color:white;border-radius:15px;box-shadow:0 20px 100px #0a291f66;overflow:hidden}.call-panel>header{padding:18px 20px;display:flex;justify-content:space-between}.call-panel header h2{margin:0;font-size:18px}.call-panel header p:not(.eyebrow){font-size:12px;color:#b4c7be;margin:7px 0 0}.call-panel .eyebrow{color:#90b39f;font-size:9px}.call-panel .icon-button{color:#c4d5ca;align-self:flex-start}.videos{height:285px;background:#102b25;position:relative}.videos video{object-fit:contain;background:#102b25}.videos #remote-video{width:100%;height:100%}.videos #local-video{position:absolute;right:12px;bottom:12px;width:118px;height:90px;object-fit:cover;border:2px solid #ffffff30;border-radius:7px;z-index:2;transform:scaleX(-1)}#video-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:40px;color:#789e8e;font-size:12px}.call-controls{display:flex;gap:7px;padding:14px 15px;flex-wrap:wrap}.call-controls button{font-size:11px;flex:1}.call-panel .soft{background:#345e50;color:#d9e9df}.call-panel .relay{color:#a2beae;padding:0 16px 10px}.call-panel>p{padding:0 16px 14px;margin:0;color:#87a995}.call-panel .primary{background:#3a9566}.call-panel .danger{background:#b64b48}dialog{width:min(720px,calc(100vw - 24px));border:1px solid #d6e3d5;border-radius:14px;padding:22px;color:#294432;background:#fbfdf9}dialog::backdrop{background:#18352a88}.dialog-header{display:flex;align-items:center;justify-content:space-between}.dialog-header h2{font-size:20px;margin:0}dialog p{font-size:12px;line-height:1.7;color:#6a806e}.dialog-actions{display:flex;gap:8px;flex-wrap:wrap}.dialog-actions button{font-size:11px}pre{font-size:10px;background:#edf2e9;border:1px solid #dfe9d9;padding:14px;max-height:48vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:8px}
@media(max-width:900px){.workspace{grid-template-columns:280px minmax(0,1fr)}.brand{padding:19px 15px}.chat-header{padding-inline:16px}.message-scroll{padding-inline:18px}.composer{padding-inline:16px}.chat-header #mute-chat{max-width:76px;padding:7px;font-size:10px}.chat-header #call-start{padding:8px;font-size:10px}.bubble{max-width:90%}.compose-options{gap:12px}.send-button{padding-inline:13px}}
@media(max-width:640px){.stand-banner{font-size:9px;letter-spacing:.7px;gap:8px;height:27px}.stand-banner span{font-size:8px}.workspace{height:calc(100dvh - 27px);display:block}.sidebar{height:100%}.conversation{display:none;height:100%}.workspace.chat-open .sidebar{display:none}.workspace.chat-open .conversation{display:block}.mobile-only{display:block}.brand{padding:18px 20px}.chat-header{height:74px;padding:10px;gap:8px}.chat-header .avatar{width:34px;height:34px;font-size:12px}.peer-title h2{font-size:12px}.peer-title small{font-size:9px}.chat-header #mute-chat{font-size:9px;max-width:59px;min-height:35px}.chat-header #call-start{max-width:74px;min-height:35px;font-size:9px}.message-scroll{padding:0 12px 15px}.composer{padding:12px 12px 10px}.compose-options{gap:14px}.check{font-size:10px}.bubble{max-width:88%;padding:10px 12px 7px}.bubble-text{font-size:13px}.compose-hint{font-size:8px;line-height:1.4}.send-button{font-size:0;padding:6px 15px}.send-button span{font-size:23px;margin:0}.call-panel{right:10px;bottom:12px;width:calc(100vw - 20px)}.videos{height:255px}.profile{padding-bottom:max(14px,env(safe-area-inset-bottom))}.login-card{padding:27px}.login-wrap{padding:22px}}

.relay-next{margin-top:10px;font-size:10px}

/* MSG-UI-02: the call occupies the available viewport, including standalone PWA. */
body:has(#call-root:not([hidden])){overflow:hidden}
.call-panel{
 inset:0;right:0;bottom:0;width:100%;height:100vh;height:100dvh;
 border-radius:0;box-shadow:none;display:grid;
 grid-template-rows:auto minmax(0,1fr) auto auto auto;
 padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);
 overflow:hidden;overscroll-behavior:contain;background:#102b25;
}
.call-panel>header{padding:14px 18px;background:#183f36;gap:12px;min-width:0}
.call-panel>header>div{min-width:0}
.call-panel header h2{overflow-wrap:anywhere}
.call-panel .videos{height:auto;min-height:0;overflow:hidden}
.call-panel .videos #remote-video{display:block;object-fit:contain}
.call-panel .videos #local-video{width:clamp(84px,26vw,152px);height:clamp(64px,20vw,114px)}
.call-panel .call-controls{width:min(100%,680px);justify-self:center;padding:12px 16px;gap:8px}
.call-panel .call-controls button{min-height:44px;font-size:12px}
.call-panel>.relay,.call-panel>#call-route{width:min(100%,680px);justify-self:center;margin:0}
.call-panel>.relay{padding:0 16px 8px;font-size:10px}
.call-panel>#call-route{padding:0 16px 10px;font-size:10px}
@media(max-width:640px){
 .call-panel>header{padding:12px 16px}
 .call-panel header h2{font-size:18px}
 .call-panel header p:not(.eyebrow){font-size:11px}
 .call-panel .call-controls{padding:10px 12px}
 .call-panel .call-controls button{padding:9px 8px;font-size:11px}
}
@media(max-height:500px) and (orientation:landscape){
 .call-panel{grid-template-columns:minmax(0,1fr) minmax(220px,32%);grid-template-rows:minmax(0,1fr) auto auto auto;grid-template-areas:'video header' 'video controls' 'video relay' 'video route'}
 .call-panel>header{grid-area:header;padding:10px 12px}
 .call-panel .videos{grid-area:video}
 .call-panel .call-controls{grid-area:controls;flex-wrap:wrap;padding:8px}
 .call-panel>.relay{grid-area:relay;padding:0 10px 6px}
 .call-panel>#call-route{grid-area:route;padding:0 10px 8px}
 .call-panel .videos #local-video{width:96px;height:72px;right:8px;bottom:8px}
}
