@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--green:#087e70;--deep:#075e54;--mint:#dff5ed;--bg:#f3f7f6;--ink:#203431;--muted:#82918e;--line:#e6eeeb;--white:#fff;--shadow:0 24px 70px #153d3214}*{box-sizing:border-box}body{margin:0;font-family:'DM Sans',sans-serif;background:var(--bg);color:var(--ink)}button,input,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #43b8a4;outline-offset:2px}.hidden{display:none!important}.auth-wrap{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 18px;background:radial-gradient(ellipse at 20% 10%,#d5f3e7 0,transparent 38%),radial-gradient(ellipse at 85% 85%,#e3eefa 0,transparent 35%),#f7faf9}.auth-brand{display:flex;align-items:center;gap:13px;margin-bottom:24px}.brand-icon{width:47px;height:47px;border-radius:16px;background:linear-gradient(135deg,#0e9f88,#075e54);display:grid;place-items:center;color:white;font-size:27px;box-shadow:0 8px 22px #087e7033}.brand-name{font:800 25px Manrope,sans-serif;letter-spacing:-1px}.brand-tag{font-size:12px;color:var(--muted);margin-top:3px}.auth-card{width:min(100%,440px);background:white;border:1px solid #e7efeb;border-radius:26px;padding:28px 32px 22px;box-shadow:var(--shadow)}.auth-tabs{display:flex;gap:6px;background:#f2f7f5;padding:5px;border-radius:13px;margin-bottom:27px}.tab{border:0;background:transparent;color:#748580;padding:10px;border-radius:9px;flex:1;font-weight:700;font-size:13px}.tab.active{background:#fff;color:var(--deep);box-shadow:0 2px 8px #143d3010}.auth-form h1{font:800 25px Manrope,sans-serif;letter-spacing:-.8px;margin:0 0 8px}.muted{font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 23px}.auth-form label,.modal label{display:block;font-size:12px;font-weight:700;color:#425a54;margin-bottom:15px}.auth-form input,.modal input,.modal textarea{display:block;width:100%;border:1px solid #dfe9e5;background:#fbfdfc;border-radius:11px;padding:13px 14px;margin-top:7px;outline:none;font-size:13px;color:var(--ink);transition:.2s}.auth-form input:focus,.modal input:focus{border-color:#7acbb9;box-shadow:0 0 0 3px #e2f7f0}.primary{border:0;border-radius:12px;background:linear-gradient(135deg,#0c9a82,#076b5d);color:white;padding:14px 17px;font-weight:700;box-shadow:0 7px 17px #087e7028}.primary span{float:right;font-size:18px;line-height:15px}.full{width:100%;margin-top:4px}.auth-foot{text-align:center;border-top:1px solid var(--line);padding-top:17px;margin-top:23px;font-size:11px;color:#9aa8a4}.auth-note{font-size:12px;color:#899c96;margin-top:22px}.text-btn{display:block;border:0;background:transparent;color:var(--green);font-size:12px;font-weight:700;margin:15px auto 0}.app-shell{height:100dvh;min-height:560px;display:grid;grid-template-columns:365px minmax(0,1fr);padding:18px;gap:16px;max-width:1700px;margin:auto}.sidebar,.chat-panel{background:white;border:1px solid #e4ece8;border-radius:21px;overflow:hidden;box-shadow:0 8px 30px #183a3010;min-width:0}.sidebar{display:flex;flex-direction:column}.side-header{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 21px;border-bottom:1px solid #eff3f1}.mini-brand{display:flex;align-items:center;gap:9px;font:800 18px Manrope;letter-spacing:-.5px}.brand-icon.small{width:30px;height:30px;border-radius:10px;font-size:18px}.head-actions{display:flex;gap:8px}.head-actions button,.chat-header-actions button{width:34px;height:34px;border:1px solid var(--line);border-radius:11px;background:#fff;color:#5b746d;font-size:19px}.profile-strip{display:flex;align-items:center;gap:11px;padding:17px 20px 13px}.avatar{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,#d9f4e9,#a8dfd0);color:#087460;font-weight:800;font-size:15px;flex-shrink:0}.avatar.me{background:linear-gradient(135deg,#087e70,#075e54);color:white}.profile-info{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.profile-info b{font-size:13px}.profile-info small{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}.online-dot{width:8px;height:8px;border-radius:50%;background:#2cb78d;box-shadow:0 0 0 4px #e1f7ed}.search-row{margin:7px 17px 14px;padding:0 12px;height:42px;border-radius:12px;background:#f3f7f5;display:flex;align-items:center;gap:8px;color:#8da19a}.search-row span{font-size:23px}.search-row input{min-width:0;flex:1;border:0;outline:0;background:transparent;font-size:12px;color:var(--ink)}.list-tabs{display:flex;gap:6px;padding:0 17px 11px;border-bottom:1px solid var(--line)}.list-tab{border:0;background:transparent;color:#879792;padding:8px 12px;border-radius:9px;font-size:11px;font-weight:700}.list-tab.active{background:#e3f6ef;color:#087663}.chat-list{overflow-y:auto;flex:1;padding:8px}.empty-list{padding:30px 20px;text-align:center;color:#93a19c;font-size:12px;line-height:1.6}.chat-item{display:flex;gap:11px;align-items:center;padding:12px;border-radius:14px;cursor:pointer;transition:.15s}.chat-item:hover{background:#f6faf8}.chat-item.active{background:#e9f7f1}.chat-item .avatar{width:44px;height:44px;border-radius:15px}.chat-meta{flex:1;min-width:0}.chat-meta-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.chat-meta-top b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-meta-top time{font-size:9px;color:#9aa9a3;white-space:nowrap}.chat-preview{font-size:11px;color:#84948e;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-bottom{padding:13px 17px 17px;border-top:1px solid var(--line)}.contact-action{width:100%;display:flex;align-items:center;gap:9px;padding:12px 14px;border:1px dashed #abd9cc;border-radius:12px;background:#f5fbf8;color:#087764;font-weight:700;font-size:12px}.contact-action span{font-size:19px}.secure-note{text-align:center;color:#a0ada8;font-size:10px;margin-top:12px}.chat-panel{position:relative;display:flex;flex-direction:column;background:#fbfdfc}.welcome-panel{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;background:radial-gradient(ellipse at 50% 45%,#e8f7f1 0,transparent 48%)}.welcome-art{height:205px;width:230px;position:relative;display:grid;place-items:center;margin-bottom:22px}.art-orbit{position:absolute;border:1px solid #c5e9dc;border-radius:50%;transform:rotate(-24deg)}.orbit-one{width:220px;height:100px}.orbit-two{width:180px;height:155px;transform:rotate(38deg)}.art-main{width:112px;height:112px;display:grid;place-items:center;border-radius:38px;background:linear-gradient(145deg,#0e9d85,#075e54);color:white;font-size:48px;box-shadow:0 18px 40px #087e7035;transform:rotate(-7deg)}.art-bubble{position:absolute;display:grid;place-items:center;width:42px;height:42px;border-radius:15px;background:white;box-shadow:0 8px 25px #1b6c5019;color:#15947d;font-size:21px}.bubble-one{left:12px;top:44px;transform:rotate(-13deg)}.bubble-two{right:14px;bottom:36px;transform:rotate(11deg)}.welcome-panel h1{font:800 clamp(27px,3vw,39px) Manrope;letter-spacing:-1.6px;line-height:1.2;margin:0 0 13px}.welcome-panel>p{font-size:13px;color:#82948d;max-width:370px;line-height:1.7;margin:0}.welcome-pills{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:26px}.welcome-pills span{font-size:10px;color:#598077;border:1px solid #dcefe7;border-radius:30px;background:#ffffffa8;padding:9px 12px}.encryption-note{margin-top:45px;color:#9aaba4;font-size:10px}.conversation-panel{display:flex;flex-direction:column;height:100%;min-height:0}.chat-header{height:75px;display:flex;align-items:center;gap:12px;padding:0 23px;background:#fff;border-bottom:1px solid var(--line);flex-shrink:0}.chat-header .avatar{width:42px;height:42px}.chat-title-wrap{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}.chat-title-wrap b{font-size:13px}.chat-title-wrap small{font-size:10px;color:#81958c}.chat-header-actions button{font-size:17px}.mobile-back{display:none;border:0;background:transparent;font-size:28px;color:var(--green)}.message-list{flex:1;overflow-y:auto;padding:24px clamp(14px,4vw,54px);display:flex;flex-direction:column;gap:11px;background-color:#f4f9f6;background-image:radial-gradient(#c9e7dc 0.7px,transparent .7px);background-size:18px 18px}.date-divider{align-self:center;background:#ffffffd9;border:1px solid #e6f0eb;border-radius:9px;padding:6px 11px;color:#8ca099;font-size:9px;margin:5px 0 10px}.message-row{display:flex;flex-direction:column;align-items:flex-start;max-width:min(76%,520px)}.message-row.mine{align-self:flex-end;align-items:flex-end}.message-author{font-size:10px;color:#0b8b73;margin:0 0 4px 8px}.bubble{border:1px solid #e5eee9;border-radius:4px 15px 15px 15px;padding:10px 13px;background:white;box-shadow:0 2px 5px #163f3010;min-width:72px;overflow-wrap:anywhere}.mine .bubble{background:#d9f7e7;border-color:#c7ecd8;border-radius:15px 4px 15px 15px}.message-body{font-size:12px;line-height:1.65;white-space:pre-wrap}.message-time{font-size:9px;color:#9baaa4;text-align:right;margin-top:5px}.file-link{display:flex;gap:10px;align-items:center;color:var(--deep);text-decoration:none;font-size:11px;font-weight:700;max-width:250px}.file-icon{width:38px;height:38px;border-radius:12px;background:#e7f5ef;display:grid;place-items:center;font-size:18px;flex-shrink:0}.file-link small{display:block;color:#8da098;font-size:9px;font-weight:400;margin-top:4px}.message-media{display:block;max-width:min(300px,100%);max-height:260px;border-radius:10px;margin-top:6px}.composer-wrap{padding:13px 20px 12px;background:#fff;border-top:1px solid var(--line);flex-shrink:0}.composer{display:flex;align-items:flex-end;gap:10px;background:#f4f8f6;border:1px solid #e9f0ec;border-radius:15px;padding:7px}.attach-btn{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;color:#789189;font-size:25px;cursor:pointer;flex-shrink:0}.attach-btn:hover{background:#e3f4ec;color:var(--green)}.composer textarea{resize:none;flex:1;min-width:0;max-height:120px;border:0;background:transparent;outline:none;padding:10px 2px;font-size:12px;line-height:1.5;color:var(--ink)}.send-btn{width:37px;height:37px;border:0;border-radius:12px;background:linear-gradient(145deg,#0b9b82,#076859);color:white;font-size:17px;box-shadow:0 4px 12px #087e702b;flex-shrink:0}.composer-hint{text-align:center;font-size:9px;color:#a2afa9;margin-top:8px}.attachment-preview{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;margin-bottom:8px;background:#f1f9f5;border-radius:10px;font-size:11px;color:#4b7467}.attachment-preview button{border:0;background:transparent;color:#a15a5a;font-size:17px}.modal-layer{position:fixed;inset:0;background:#16372e6b;backdrop-filter:blur(4px);display:grid;place-items:center;padding:20px;z-index:10}.modal{width:min(100%,430px);background:white;border-radius:22px;padding:30px;position:relative;box-shadow:0 30px 100px #0b2e2340}.modal-close{position:absolute;right:16px;top:13px;border:0;background:#f2f7f4;width:30px;height:30px;border-radius:10px;font-size:22px;color:#6d8179}.modal h2{font:800 22px Manrope;letter-spacing:-.7px;margin:0 0 7px}.modal p{font-size:12px;color:#879790;line-height:1.6;margin:0 0 21px}.modal .primary{margin-top:4px;width:100%}.modal .modal-members{font-size:11px;color:#6b8178;line-height:1.8}.toast{position:fixed;z-index:30;left:50%;top:18px;transform:translate(-50%,-15px);opacity:0;pointer-events:none;background:#203b33;color:white;border-radius:12px;padding:12px 17px;box-shadow:0 8px 30px #173d3029;font-size:12px;transition:.2s;max-width:calc(100% - 30px)}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error{background:#8c3e3e}@media(max-width:850px){.app-shell{grid-template-columns:310px minmax(0,1fr);padding:8px;gap:8px}.side-header{padding:0 14px}.profile-strip{padding-left:14px;padding-right:14px}.search-row{margin-left:12px;margin-right:12px}.list-tabs{padding-left:10px}.chat-header{padding:0 14px}.message-list{padding:18px 14px}.composer-wrap{padding:10px}.welcome-panel{padding:15px}.welcome-pills{gap:5px}.welcome-pills span{padding:7px 9px}}@media(max-width:620px){.app-shell{display:block;height:100dvh;min-height:0;padding:0}.sidebar,.chat-panel{height:100%;border:0;border-radius:0;box-shadow:none}.sidebar{width:100%}.chat-panel{display:none}.app-shell.chat-open .sidebar{display:none}.app-shell.chat-open .chat-panel{display:flex}.side-header{height:62px}.chat-header{height:67px}.mobile-back{display:block}.message-list{padding:16px 12px}.message-row{max-width:88%}.composer-wrap{padding:10px 9px calc(8px + env(safe-area-inset-bottom))}.composer-hint{display:none}.auth-card{padding:24px 22px 20px;border-radius:22px}.auth-form h1{font-size:23px}.welcome-art{transform:scale(.86);margin-bottom:8px}.welcome-panel h1{font-size:29px}.encryption-note{margin-top:30px}.modal{padding:27px 22px}.chat-list{padding:6px}.chat-item{padding:11px}.secure-note{padding-bottom:2px}}

/* Audio/video calling */
.call-actions{display:flex;gap:6px}.call-actions button{font-size:17px!important}.call-panel{position:fixed;z-index:25;right:22px;bottom:22px;width:min(620px,calc(100vw - 24px));background:#10231f;color:#fff;border:1px solid #2d5148;border-radius:20px;box-shadow:0 20px 70px #071d18a8;overflow:hidden}.call-top{display:flex;align-items:center;justify-content:space-between;padding:14px 17px}.call-top div{display:flex;flex-direction:column;gap:4px}.call-top b{font-size:14px}.call-top small{font-size:11px;color:#b4cec5}.call-top button{border:0;border-radius:9px;background:#29443d;color:white;width:30px;height:30px;font-size:20px}.call-videos{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 10px 10px;min-height:150px}.call-videos video{width:100%;height:clamp(150px,27vw,300px);object-fit:cover;background:#203a33;border-radius:12px}.call-videos.audio-only{display:block;min-height:75px}.call-videos.audio-only video{display:none}.call-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;padding:8px 12px 14px}.call-controls button,.incoming-call-buttons button{border:0;border-radius:11px;padding:10px 12px;background:#29443d;color:#fff;font-size:11px;font-weight:700}.call-controls button:disabled{opacity:.45}.call-controls .end-call,.reject-call{background:#c93e4e!important}.incoming-call-layer{position:fixed;z-index:28;inset:0;display:grid;place-items:center;background:#071c17a6;backdrop-filter:blur(7px);padding:20px}.incoming-call-card{width:min(360px,100%);background:#fff;border-radius:24px;text-align:center;padding:28px;box-shadow:0 24px 80px #0003}.incoming-call-icon{margin:auto;width:66px;height:66px;display:grid;place-items:center;border-radius:22px;background:#dff6eb;color:#087e70;font-size:30px}.incoming-call-card h2{font-size:20px;margin:18px 0 7px}.incoming-call-card p{font-size:12px;color:#7e9189;margin:0 0 22px}.incoming-call-buttons{display:flex;gap:10px}.incoming-call-buttons button{flex:1;padding:13px}.accept-call{background:#07866f!important}@media(max-width:620px){.call-panel{right:8px;bottom:8px;width:calc(100vw - 16px);border-radius:16px}.call-videos video{height:36vw;min-height:130px}.call-controls{gap:5px}.call-controls button{padding:9px 10px}.call-actions button{width:30px!important;height:30px!important}}
.call-panel.call-minimized .call-videos,.call-panel.call-minimized .call-controls{display:none}.call-panel.call-minimized{width:min(320px,calc(100vw - 24px))}

/* MailChat extras: profile, three-dot menus, attachment picker and voice notes */
.menu-wrap,.attach-wrap{position:relative;display:flex;align-items:center}.popup-menu{position:absolute;z-index:40;min-width:190px;right:0;top:calc(100% + 8px);padding:7px;background:#fff;border:1px solid #e3eee8;border-radius:14px;box-shadow:0 14px 45px #163d3024;display:flex;flex-direction:column;gap:3px}.popup-menu button{border:0;background:transparent;text-align:left;padding:11px 12px;border-radius:9px;color:#24483d;font-size:12px;white-space:nowrap}.popup-menu button:hover{background:#eff8f3}.attach-menu{right:auto;left:0;bottom:calc(100% + 10px);top:auto}.avatar-img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}.avatar{overflow:hidden}.profile-large{width:76px;height:76px;margin:0 auto 12px;font-size:25px}.profile-detail{text-align:center;padding:10px 0 15px}.profile-detail h2{margin-bottom:5px}.profile-detail p{margin-bottom:5px}.detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.detail-actions button{flex:1;min-width:120px;border:1px solid #dcebe3;border-radius:10px;background:#f6fbf8;color:#245c4d;padding:10px;font-size:11px;font-weight:700}.shared-media{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 16px}.shared-media a{min-height:72px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:6px;border-radius:10px;background:#f0f7f3;color:#356758;text-decoration:none;font-size:10px;overflow-wrap:anywhere}.shared-media img{width:100%;height:68px;object-fit:cover;border-radius:7px}.modal h3{font-size:13px;margin:16px 0 8px}.modal-members span{display:block;color:#8b9c94;font-size:10px}.device-card{display:flex;flex-direction:column;gap:5px;background:#f3f8f5;padding:14px;border-radius:12px;margin:12px 0}.device-card small{color:#80938a}.voice-btn{width:37px;height:37px;flex-shrink:0;border:0;border-radius:12px;background:#e5f3ed;color:#087764;font-size:17px}.voice-btn.recording{background:#c83e4e;color:white;animation:voicePulse 1s infinite alternate}@keyframes voicePulse{to{transform:scale(1.08);box-shadow:0 0 0 5px #c83e4e22}}#mainMenuBtn,#chatMoreBtn{font-size:22px!important}.chat-header-actions{display:flex;align-items:center;gap:5px}

/* WhatsApp-style desktop right-click and mobile long-press menus */
.mc-action-menu{position:fixed;z-index:1000;min-width:190px;max-width:calc(100vw - 16px);padding:6px;background:#fff;border:1px solid #dce9e3;border-radius:13px;box-shadow:0 14px 45px #173d3030;display:flex;flex-direction:column;gap:2px}.mc-action-menu button{border:0;background:transparent;text-align:left;padding:11px 13px;border-radius:8px;color:#24463d;font-size:12px;white-space:nowrap}.mc-action-menu button:hover,.mc-action-menu button:focus{background:#e8f7f0;color:#075e54}@media(max-width:620px){.mc-action-menu{min-width:210px}.chat-item,.message-row{-webkit-touch-callout:none;user-select:none}}

/* Context menus: force visibility above the chat UI */
.mc-action-menu{position:fixed!important;z-index:2147483000!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
.mc-action-menu button{display:block!important;width:100%!important;cursor:pointer!important}
/* Voice recording controls and tappable profile header */
.voice-controls{display:flex;align-items:center;gap:5px;flex-shrink:0;background:#eaf7f0;border:1px solid #d7eee2;border-radius:12px;padding:4px 5px;}
.voice-controls.hidden{display:none!important}
.voice-controls span{font-size:10px;color:#286a57;min-width:65px;text-align:center;white-space:nowrap}
.voice-controls button{width:32px;height:32px;border:0;border-radius:9px;background:#fff;color:#087764;font-size:16px;display:grid;place-items:center}
.voice-controls button:hover{background:#d4f0e2}
#voiceDeleteBtn{color:#b23d4c}#voiceSendBtn{background:#087e70;color:#fff}
#myAvatar,#chatAvatar,#chatTitle,#myName{cursor:pointer}
.profile-strip .avatar:hover,.chat-header .avatar:hover{box-shadow:0 0 0 3px #d9f4e8}
@media(max-width:620px){.voice-controls{gap:3px;padding:3px}.voice-controls span{min-width:50px;font-size:9px}.voice-controls button{width:29px;height:30px}}

/* Screen sharing, camera picture-in-picture and call-state controls */
.call-videos{position:relative;display:block;min-height:170px}.call-videos #remoteVideo{display:block;width:100%;height:clamp(220px,42vw,440px);object-fit:contain;background:#07130f}.call-videos #remoteCameraVideo{display:none;position:absolute;right:18px;bottom:18px;width:clamp(88px,17vw,150px);height:clamp(110px,20vw,180px);object-fit:cover;border:2px solid #fff;border-radius:12px;box-shadow:0 4px 18px #0008;z-index:2}.call-videos #localVideo{position:absolute;right:18px;top:12px;width:clamp(70px,13vw,112px);height:clamp(90px,16vw,140px);object-fit:cover;border:1px solid #8db5a7;border-radius:10px;z-index:3;opacity:.88}.call-videos.screen-and-camera #remoteCameraVideo{display:block}.call-videos.audio-only{min-height:60px}.call-videos.audio-only video{display:none}.screen-share-options{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;padding:12px}.screen-share-options span{width:100%;text-align:center;font-size:12px;color:#d3e6df}.screen-share-options button{border:0;border-radius:10px;padding:10px 12px;background:#29443d;color:#fff;font-size:12px;font-weight:700}.call-controls button.active{background:#087e70;box-shadow:inset 0 0 0 1px #8ce0c7}.call-controls button:disabled{opacity:.4;cursor:not-allowed}@media(max-width:620px){.call-videos #remoteVideo{height:58vw;min-height:200px}.call-videos #localVideo{right:12px;top:10px}.call-videos #remoteCameraVideo{right:12px;bottom:12px}}

/* Full-screen call view */
.call-top-actions{display:flex;align-items:center;gap:8px}.call-top #callFullscreenBtn{width:auto;height:32px;padding:0 11px;font-size:12px;font-weight:700;white-space:nowrap}.call-panel.call-fullscreen{position:fixed!important;inset:0!important;right:0!important;bottom:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;border-radius:0!important;border:0!important;display:flex;flex-direction:column;overflow:hidden;z-index:9999!important}.call-panel.call-fullscreen .call-top{flex:0 0 auto;padding:12px 18px}.call-panel.call-fullscreen .call-videos{flex:1 1 auto;min-height:0;height:auto;padding:0 12px 12px;overflow:hidden}.call-panel.call-fullscreen .call-videos #remoteVideo{height:100%;min-height:0;max-height:none;object-fit:contain}.call-panel.call-fullscreen .call-videos #remoteCameraVideo{right:24px;bottom:24px;width:clamp(110px,18vw,220px);height:clamp(140px,24vh,260px)}.call-panel.call-fullscreen .call-videos #localVideo{right:24px;top:18px;width:clamp(90px,14vw,170px);height:clamp(115px,20vh,210px)}.call-panel.call-fullscreen .call-controls{flex:0 0 auto;padding:12px 14px max(16px,env(safe-area-inset-bottom));gap:9px}.call-panel.call-fullscreen .call-controls button{font-size:13px;padding:12px 15px}.call-panel.call-fullscreen .screen-share-options{flex:0 0 auto}.call-panel:fullscreen{width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;inset:0!important;border-radius:0!important;display:flex;flex-direction:column;background:#07130f}.call-panel:fullscreen .call-videos{flex:1 1 auto;min-height:0;height:auto}.call-panel:fullscreen .call-videos #remoteVideo{height:100%;min-height:0;max-height:none}
@media(max-width:620px){.call-panel.call-fullscreen .call-top{padding:10px 12px}.call-panel.call-fullscreen .call-videos{padding:0 6px 6px}.call-panel.call-fullscreen .call-videos #localVideo{right:10px;top:8px}.call-panel.call-fullscreen .call-videos #remoteCameraVideo{right:10px;bottom:10px}.call-panel.call-fullscreen .call-controls{gap:5px;padding:8px 6px max(12px,env(safe-area-inset-bottom))}.call-panel.call-fullscreen .call-controls button{padding:10px 8px;font-size:11px}.call-top-actions{gap:5px}.call-top #callFullscreenBtn{padding:0 8px;font-size:11px}}


/* Tap-to-focus layout for the three video tiles during screen + camera sharing. */
.call-videos.screen-and-camera.focus-remote #remoteVideo,
.call-videos.screen-and-camera.focus-remote-camera #remoteCameraVideo,
.call-videos.screen-and-camera.focus-local #localVideo{display:block!important;position:absolute;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;border:0!important;border-radius:0!important;opacity:1!important;z-index:1!important;background:#07130f}
.call-videos.screen-and-camera.focus-remote #remoteCameraVideo,
.call-videos.screen-and-camera.focus-remote #localVideo,
.call-videos.screen-and-camera.focus-remote-camera #remoteVideo,
.call-videos.screen-and-camera.focus-remote-camera #localVideo,
.call-videos.screen-and-camera.focus-local #remoteVideo,
.call-videos.screen-and-camera.focus-local #remoteCameraVideo{display:block!important;position:absolute!important;inset:auto 14px 14px auto!important;width:clamp(84px,14vw,150px)!important;height:clamp(100px,17vw,170px)!important;object-fit:cover!important;border:2px solid #fff!important;border-radius:12px!important;opacity:1!important;z-index:3!important;box-shadow:0 4px 18px #0008}
.call-videos.screen-and-camera.focus-remote #localVideo,
.call-videos.screen-and-camera.focus-remote-camera #localVideo,
.call-videos.screen-and-camera.focus-local #remoteCameraVideo{inset:auto auto 14px 14px!important}
.call-videos.screen-and-camera.focus-remote-camera #remoteCameraVideo{z-index:1!important}
.call-videos.screen-and-camera.focus-local #localVideo{z-index:1!important}
.call-videos.screen-and-camera.focus-remote-camera #remoteVideo,
.call-videos.screen-and-camera.focus-local #remoteVideo{object-fit:contain!important}
.call-videos.screen-and-camera.focus-remote,
.call-videos.screen-and-camera.focus-remote-camera,
.call-videos.screen-and-camera.focus-local{height:100%;min-height:220px}
@media(max-width:620px){.call-videos.screen-and-camera.focus-remote #remoteCameraVideo,.call-videos.screen-and-camera.focus-remote #localVideo,.call-videos.screen-and-camera.focus-remote-camera #remoteVideo,.call-videos.screen-and-camera.focus-remote-camera #localVideo,.call-videos.screen-and-camera.focus-local #remoteVideo,.call-videos.screen-and-camera.focus-local #remoteCameraVideo{width:clamp(70px,22vw,110px)!important;height:clamp(88px,27vw,135px)!important;inset:auto 8px 8px auto!important}.call-videos.screen-and-camera.focus-remote #localVideo,.call-videos.screen-and-camera.focus-remote-camera #localVideo,.call-videos.screen-and-camera.focus-local #remoteCameraVideo{inset:auto auto 8px 8px!important}}

/* Compact left navigation rail, chat search and contact stories */
.app-shell{grid-template-columns:52px 360px minmax(0,1fr)!important;gap:10px!important;padding-left:8px!important}.nav-rail{display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 5px;background:#fff;border:1px solid #e6efe9;border-radius:18px;box-shadow:0 8px 30px #183a3010;min-width:0}.nav-rail button{width:40px;height:40px;border:0;border-radius:13px;background:transparent;color:#648078;font-size:20px;display:grid;place-items:center;cursor:pointer}.nav-rail button:hover,.nav-rail button.active{background:#e2f6ed;color:#087764}.nav-rail .nav-profile{margin-top:auto;border-radius:50%;background:#087e70;color:white;font-size:14px;font-weight:800}.search-result,.story-item{width:100%;display:flex;flex-direction:column;gap:5px;text-align:left;padding:12px;border:1px solid #e5eee9;border-radius:11px;background:#f8fcfa;color:#24463d;margin:5px 0;cursor:pointer}.search-result span,.story-item span{font-size:12px;overflow-wrap:anywhere}.search-result small,.story-item small{font-size:10px;color:#8b9c94}.story-list{max-height:42vh;overflow:auto;margin-top:12px}.call-shortcut{display:flex;align-items:center;gap:6px;padding:8px 0;border-bottom:1px solid #edf2ef}.call-shortcut span{flex:1;font-size:12px}.call-shortcut button{border:0;border-radius:8px;padding:8px 10px;background:#e4f6ed;color:#087764;font-size:11px}.story-viewer{display:block;width:100%;max-height:60vh;object-fit:contain;background:#101b17;border-radius:12px;margin:10px 0}.search-hit .bubble{outline:3px solid #f5bd4f;box-shadow:0 0 0 6px #f5bd4f33}
@media(max-width:850px){.app-shell{grid-template-columns:48px 300px minmax(0,1fr)!important;gap:7px!important}.nav-rail button{width:36px;height:36px}}
@media(max-width:620px){.app-shell{display:block!important;padding:0!important}.nav-rail{position:fixed;z-index:12;left:8px;right:8px;bottom:8px;height:48px;flex-direction:row;justify-content:space-around;padding:4px 8px;border-radius:16px}.nav-rail .nav-profile{margin-top:0}.app-shell:not(.chat-open) .sidebar{padding-bottom:60px}.app-shell.chat-open .nav-rail{display:none}.sidebar,.chat-panel{width:100%}.sidebar-bottom{padding-bottom:65px}}
