/* v149 — profile taxonomy + working private messenger */
.portal-form-grid label small{display:block;margin-top:7px;color:rgba(255,255,255,.48);font-size:12px;line-height:1.35}
.portal-form-grid select{width:100%;min-height:50px;border:1px solid rgba(244,216,117,.18);border-radius:14px;background:#0d4a38;color:#fff;padding:0 14px;font:inherit;outline:none}
.portal-form-grid select:focus{border-color:rgba(244,216,117,.54);box-shadow:0 0 0 3px rgba(215,170,71,.08)}

/* Messenger — familiar two-pane chat layout in WIN styling. */
.portal-messenger-dialog{width:min(1180px,97vw);height:min(780px,92vh);padding:0;overflow:hidden;background:#073a2c}
.portal-messenger-shell{display:grid;grid-template-columns:350px minmax(0,1fr);height:100%;min-height:0;background:#073a2c}
.portal-messenger-sidebar{display:flex;flex-direction:column;min-height:0;padding:22px 14px 14px;background:linear-gradient(180deg,#052d23 0%,#06382a 100%);border-right:1px solid rgba(244,216,117,.15)}
.portal-messenger-sidebar h2{margin:6px 8px 14px;font:700 31px/1 "Cormorant Garamond","Times New Roman",serif;color:#fff}
.portal-messenger-mobile-brand{display:flex;align-items:center;gap:10px;padding:0 54px 12px 7px;border-bottom:1px solid rgba(244,216,117,.13);margin-bottom:14px}
.portal-messenger-mobile-brand img:first-child{width:34px;height:39px;object-fit:contain}.portal-messenger-mobile-brand img:last-child{width:150px;height:auto}
.portal-messenger-search{display:flex!important;align-items:center;gap:8px;height:44px!important;margin:0 7px 12px!important;padding:0 12px!important;border:1px solid rgba(244,216,117,.18)!important;border-radius:13px!important;background:rgba(255,255,255,.035)!important;color:#d8be70!important}
.portal-messenger-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:14px}.portal-messenger-search input::placeholder{color:rgba(255,255,255,.42)}
.portal-messenger-list{min-height:0;overflow:auto;display:grid;align-content:start;gap:5px;padding:0 3px 4px}
.portal-messenger-list .portal-empty{padding:25px 13px;text-align:center;color:rgba(255,255,255,.48);font-size:13px}
.portal-messenger-contact{appearance:none;width:100%;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 10px;border:0!important;border-radius:13px!important;background:transparent!important;color:#fff;text-align:left;cursor:pointer}
.portal-messenger-contact:hover,.portal-messenger-contact.active{background:rgba(215,170,71,.10)!important}.portal-messenger-contact.active{box-shadow:inset 3px 0 0 #d6ae4f}
.portal-contact-avatar{display:grid;place-items:center;width:48px;height:48px;min-width:48px;border-radius:50%;background:linear-gradient(145deg,#f6dc81,#bd8628);color:#07513d;font-weight:900;box-shadow:0 3px 10px rgba(0,0,0,.22)}
.portal-contact-copy{min-width:0}.portal-contact-copy b,.portal-contact-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portal-contact-copy b{font-size:14px}.portal-contact-copy small{margin-top:3px;color:rgba(255,255,255,.48);font-size:11px}
.portal-chat-unread{display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:20px;background:#d7a93f;color:#063b2d;font-size:11px;font-style:normal;font-weight:900}
.portal-messenger-main{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;background:radial-gradient(circle at 30% 20%,rgba(215,170,71,.055),transparent 26%),linear-gradient(180deg,#0a4a38,#07392c)}
.portal-messenger-brand{min-height:74px!important;padding:12px 64px!important;gap:12px!important;background:rgba(4,48,36,.72)!important}.portal-messenger-brand .portal-messenger-shield{width:38px!important;height:44px!important}.portal-messenger-brand .portal-messenger-wordmark{width:min(220px,45vw)!important}
.portal-chat-head{display:flex;align-items:center;gap:10px;min-height:70px;padding:9px 64px 9px 15px;border-bottom:1px solid rgba(244,216,117,.14);background:rgba(4,43,32,.88)}
.portal-chat-head .portal-contact-avatar{width:44px;height:44px;min-width:44px;font-size:12px}.portal-chat-head b,.portal-chat-head small{display:block}.portal-chat-head b{font-size:15px}.portal-chat-head small{margin-top:3px;color:#d9bd6f;font-size:12px}.portal-chat-back{display:none;border:0;background:transparent;color:#efd77e;font-size:34px;line-height:1;cursor:pointer;padding:0 3px}
.portal-messenger-empty{margin:auto;max-width:560px;text-align:center;padding:44px}.portal-messenger-empty h3{font-size:36px}.portal-messenger-empty .portal-future{max-width:520px}
.portal-chat-messages{flex:1;min-height:0;overflow:auto;padding:24px 28px 18px;background-image:radial-gradient(circle at center,rgba(244,216,117,.022),transparent 44%)}
.portal-chat-row{display:flex;margin:5px 0}.portal-chat-row.mine{justify-content:flex-end}.portal-chat-row.theirs{justify-content:flex-start}
.portal-chat-bubble{max-width:min(72%,640px);padding:9px 11px 6px;border-radius:15px 15px 15px 5px;background:#124f3d;border:1px solid rgba(244,216,117,.12);box-shadow:0 3px 10px rgba(0,0,0,.10);color:#fff;font-size:14px;line-height:1.42;overflow-wrap:anywhere}.portal-chat-row.mine .portal-chat-bubble{border-radius:15px 15px 5px 15px;background:#356b3f;border-color:rgba(244,216,117,.18)}
.portal-chat-bubble small{display:block;margin-top:3px;text-align:right;color:rgba(255,255,255,.52);font-size:9px}.portal-chat-row.mine .portal-chat-bubble small{color:#e7cf83}
.portal-chat-start{margin:auto;width:max-content;max-width:90%;padding:7px 12px;border-radius:12px;background:rgba(3,37,28,.72);color:rgba(255,255,255,.55);font-size:12px;text-align:center}
.portal-messenger-compose{display:flex!important;align-items:flex-end;gap:9px;padding:10px 12px!important;border-top:1px solid rgba(244,216,117,.13)!important;background:rgba(2,30,23,.78)!important}.portal-messenger-compose textarea{flex:1;min-height:44px;max-height:130px;resize:none;border:1px solid rgba(244,216,117,.17);border-radius:18px;background:rgba(255,255,255,.04);padding:11px 14px;color:#fff;font:inherit;line-height:1.35;outline:none}.portal-messenger-compose textarea:focus{border-color:rgba(244,216,117,.43)}.portal-messenger-compose button{width:44px;height:44px;min-width:44px!important;border:1px solid rgba(244,216,117,.35)!important;border-radius:50%!important;background:linear-gradient(145deg,#e6bd58,#a97520)!important;color:#063a2c!important;font-size:19px!important;font-weight:900;cursor:pointer}.portal-messenger-compose button:disabled{opacity:.5}

@media(max-width:760px){
  .portal-messenger-dialog{width:100vw!important;height:100dvh!important;max-height:none!important;border-radius:0!important}
  .portal-messenger-shell{grid-template-columns:1fr!important;height:100dvh!important;min-height:0!important}
  .portal-messenger-sidebar{grid-column:1;grid-row:1;display:flex!important;border:0!important;padding:14px 12px!important}
  .portal-messenger-main{grid-column:1;grid-row:1;display:none!important;height:100dvh!important}
  .portal-messenger-shell.chat-open .portal-messenger-sidebar{display:none!important}
  .portal-messenger-shell.chat-open .portal-messenger-main{display:flex!important}
  .portal-messenger-mobile-brand{padding:0 54px 10px 1px!important}.portal-messenger-mobile-brand img:first-child{width:27px!important;height:31px!important}.portal-messenger-mobile-brand img:last-child{width:126px!important}
  .portal-messenger-sidebar h2{font-size:28px!important;margin:5px 3px 11px!important}.portal-messenger-search{margin:0 1px 9px!important}
  .portal-messenger-contact{grid-template-columns:44px minmax(0,1fr) auto;padding:8px 7px!important}.portal-contact-avatar{width:44px;height:44px;min-width:44px}
  .portal-chat-head{padding:8px 54px 8px 8px!important;min-height:62px}.portal-chat-back{display:block}.portal-chat-head .portal-contact-avatar{width:40px;height:40px;min-width:40px}
  .portal-chat-messages{padding:15px 10px 12px!important}.portal-chat-bubble{max-width:86%;font-size:13.5px}
  .portal-messenger-compose{padding:8px!important}.portal-messenger-compose textarea{min-height:42px;padding:10px 12px}.portal-messenger-compose button{width:42px;height:42px;min-width:42px!important}
  .portal-messenger-dialog>.portal-dialog-close{top:9px!important;right:8px!important;z-index:15}
}

/* v151 — messenger search, Saved Messages, compact voice notes and messenger navigation */
.portal-messenger-shell{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important}
.portal-messenger-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:64px;padding:8px 14px 8px 16px;border-bottom:1px solid rgba(244,216,117,.16);background:linear-gradient(180deg,#052d23,#06382a);flex:0 0 auto;z-index:20}
.portal-messenger-topbrand{display:flex;align-items:center;gap:10px;min-width:0;text-decoration:none}.portal-messenger-topbrand img:first-child{width:32px;height:38px;object-fit:contain}.portal-messenger-topbrand img:last-child{width:154px;height:auto;max-width:30vw}
.portal-messenger-topnav{display:flex;align-items:center;gap:8px}.portal-messenger-topnav>a,.portal-messenger-topnav>button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;border:1px solid rgba(244,216,117,.28);border-radius:10px;background:rgba(255,255,255,.035);color:#f1d77d;text-decoration:none;font:700 12px/1 Arial,sans-serif;cursor:pointer;white-space:nowrap}.portal-messenger-topnav>a:hover,.portal-messenger-topnav>button:hover{background:rgba(215,170,71,.12)}.portal-messenger-topnav>.portal-messenger-close{width:36px;min-width:36px;padding:0;font-size:23px;font-weight:400;color:#fff}
.portal-messenger-body{display:grid;grid-template-columns:350px minmax(0,1fr);flex:1;min-height:0}
.portal-messenger-sidebar{padding-top:18px!important}.portal-messenger-main{height:auto!important;min-height:0!important}
.portal-chat-person{min-width:0;flex:1}.portal-chat-person b,.portal-chat-person small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal-avatar-photo{overflow:hidden;background:#0b4a38}.portal-avatar-photo img{width:100%;height:100%;object-fit:cover;display:block}.portal-saved-avatar{font-size:22px;background:linear-gradient(145deg,#f5dd89,#b77f23)}
.portal-messenger-contact.saved{margin-bottom:5px;border-bottom:1px solid rgba(244,216,117,.12)!important;border-radius:13px 13px 6px 6px!important}.portal-messenger-contact.saved .portal-contact-copy b{color:#f3da83}
.portal-pinned-filter{appearance:none;margin-left:auto;min-height:34px;padding:0 10px;border:1px solid rgba(244,216,117,.2);border-radius:10px;background:rgba(255,255,255,.035);color:#e4c86f;font:700 11px/1 Arial,sans-serif;cursor:pointer;white-space:nowrap}.portal-pinned-filter.active{background:rgba(215,170,71,.16);border-color:rgba(244,216,117,.42)}
.portal-chat-bubble{position:relative}.portal-chat-bubble.pinned{box-shadow:inset 0 0 0 1px rgba(244,216,117,.48),0 3px 10px rgba(0,0,0,.12)}.portal-message-pin{position:absolute;top:5px;right:6px;width:24px!important;height:24px!important;min-width:24px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:rgba(255,255,255,.42)!important;font-size:15px!important;line-height:1!important;cursor:pointer}.portal-message-pin.active{color:#f1d474!important;background:rgba(215,170,71,.13)!important}.portal-chat-bubble:has(.portal-message-pin)>div:first-of-type{padding-right:22px}
.portal-voice-message{display:flex;align-items:center;gap:8px;min-width:235px;padding:2px 24px 2px 0}.portal-voice-message audio{width:min(300px,54vw);height:34px}.portal-voice-message>span{font-size:10px;color:rgba(255,255,255,.6);white-space:nowrap}
.portal-messenger-compose{align-items:center!important}.portal-messenger-compose .portal-voice-btn,.portal-messenger-compose .portal-send-btn{flex:0 0 auto}.portal-messenger-compose .portal-voice-btn{font-size:14px!important}.portal-messenger-compose .portal-voice-btn.recording{background:linear-gradient(145deg,#e98472,#a63d32)!important;color:#fff!important;border-color:rgba(255,255,255,.35)!important}
.portal-recording-status{display:flex;align-items:center;gap:8px;flex:1;min-height:44px;padding:0 12px;border:1px solid rgba(244,216,117,.17);border-radius:18px;background:rgba(255,255,255,.04);color:#fff}.portal-recording-dot{width:9px;height:9px;border-radius:50%;background:#e66b5e;box-shadow:0 0 0 4px rgba(230,107,94,.12);animation:portalRecPulse 1.1s infinite}.portal-recording-status>span:nth-child(2){font:700 13px/1 Arial,sans-serif}.portal-recording-status button{width:auto!important;height:28px!important;min-width:0!important;margin-left:auto;padding:0 8px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#e7c96e!important;font-size:11px!important}.portal-recording-status[hidden]{display:none!important}@keyframes portalRecPulse{50%{opacity:.45}}

@media(max-width:760px){
  .portal-messenger-topbar{min-height:54px;padding:6px 7px 6px 9px;gap:6px}.portal-messenger-topbrand{gap:6px}.portal-messenger-topbrand img:first-child{width:25px;height:30px}.portal-messenger-topbrand img:last-child{width:102px;max-width:28vw}.portal-messenger-topnav{gap:4px}.portal-messenger-topnav>a,.portal-messenger-topnav>button{min-height:32px;padding:0 7px;border-radius:8px;font-size:10px}.portal-messenger-topnav>a{font-size:0}.portal-messenger-topnav>#messengerAccount{font-size:0}.portal-messenger-topnav>.portal-messenger-close{width:31px;min-width:31px;padding:0;font-size:20px}
  .portal-messenger-body{display:grid!important;grid-template-columns:1fr!important;flex:1;min-height:0;height:calc(100dvh - 54px)!important}.portal-messenger-sidebar,.portal-messenger-main{height:calc(100dvh - 54px)!important;min-height:0!important}.portal-messenger-shell.chat-open .portal-messenger-sidebar{display:none!important}.portal-messenger-shell.chat-open .portal-messenger-main{display:flex!important}
  .portal-chat-head{padding-right:8px!important}.portal-pinned-filter{max-width:105px;padding:0 7px;font-size:9px}.portal-voice-message{min-width:200px;padding-right:20px}.portal-voice-message audio{width:min(235px,58vw)}.portal-message-pin{right:4px}
  .portal-messenger-dialog>.portal-dialog-close{display:none!important}
}
.portal-avatar-photo{position:relative}.portal-avatar-photo>span{display:grid;place-items:center;width:100%;height:100%}.portal-avatar-photo>img{position:absolute;inset:0}

/* v152 — messenger reliability + Telegram-like mobile UX */
body.portal-page #messagesModal .portal-messenger-sidebar::after{content:none!important;display:none!important}
.portal-messenger-topbar{box-sizing:border-box!important;overflow:hidden}
.portal-messenger-topbrand{flex:1 1 auto;overflow:hidden}.portal-messenger-topbrand img{display:block}.portal-messenger-topnav{flex:0 0 auto}
.portal-messenger-topnav>a,.portal-messenger-topnav>button{gap:6px}.portal-messenger-topnav svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.portal-messenger-topnav svg circle{fill:none}
.portal-messenger-sidebar{position:relative!important;overflow:hidden}.portal-messenger-list{padding-bottom:82px!important}
.portal-new-chat{position:absolute;right:18px;bottom:18px;width:52px;height:52px;border:1px solid rgba(255,255,255,.2);border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#e8c25f,#ad7620);color:#063b2d;box-shadow:0 9px 24px rgba(0,0,0,.26);cursor:pointer;z-index:5}.portal-new-chat svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.portal-messenger-main{position:relative!important}.portal-messenger-compose{flex-wrap:wrap!important}.portal-reply-compose{order:-2;flex:0 0 100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;border-left:3px solid #d9b54c;border-radius:8px;background:rgba(217,181,76,.08);box-sizing:border-box}.portal-reply-compose[hidden]{display:none!important}.portal-reply-compose>div{min-width:0;display:flex;flex-direction:column}.portal-reply-compose b{font-size:11px;color:#f0d77c}.portal-reply-compose span{font-size:11px;color:rgba(255,255,255,.65);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portal-reply-compose button{width:28px!important;height:28px!important;min-width:28px!important;background:transparent!important;border:0!important;color:#fff!important;font-size:20px!important}
.portal-message-input-wrap{position:relative;flex:1;min-width:0}.portal-message-input-wrap textarea{width:100%;box-sizing:border-box;padding-right:48px!important}.portal-dictation-btn{position:absolute!important;right:7px;bottom:5px;width:34px!important;height:34px!important;min-width:34px!important;border:0!important;background:transparent!important;color:#d7c27a!important;box-shadow:none!important}.portal-dictation-btn svg,.portal-voice-btn svg,.portal-send-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.portal-dictation-btn.active{color:#fff!important;background:rgba(205,86,65,.72)!important;animation:portalPulse 1s ease-in-out infinite alternate}.portal-voice-btn,.portal-send-btn{display:grid!important;place-items:center}.portal-voice-btn svg,.portal-send-btn svg{pointer-events:none}
.portal-recording-status{flex:1;min-width:0;align-items:center;gap:8px}.portal-recording-status[hidden]{display:none!important}.portal-recording-label{font-size:11px;color:rgba(255,255,255,.55);white-space:nowrap}.portal-recording-status #messengerVoiceCancel{margin-left:auto;width:auto!important;min-width:62px!important;height:34px!important;border-radius:9px!important;padding:0 10px!important;background:transparent!important;color:#efb0a4!important;border:1px solid rgba(239,176,164,.22)!important;font-size:11px!important}
.portal-message-menu{position:absolute;top:4px;right:5px;width:26px!important;height:26px!important;min-width:26px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:rgba(255,255,255,.48)!important;font-size:18px!important;line-height:1!important;cursor:pointer;box-shadow:none!important}.portal-chat-bubble{padding-right:28px!important}.portal-message-actionbar{display:flex;flex-wrap:wrap;gap:4px;margin:7px 0 2px;padding-top:6px;border-top:1px solid rgba(255,255,255,.1)}.portal-message-actionbar[hidden]{display:none!important}.portal-message-actionbar button{display:inline-flex!important;align-items:center;gap:4px;width:auto!important;height:28px!important;min-width:0!important;padding:0 7px!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:8px!important;background:rgba(0,0,0,.08)!important;color:rgba(255,255,255,.78)!important;font-size:10px!important;font-weight:600!important;box-shadow:none!important}.portal-message-actionbar button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.portal-message-actionbar button[data-pin-message] svg{fill:none}.portal-chat-bubble.pinned .portal-message-actionbar button[data-pin-message]{color:#f1d474!important}
.portal-forwarded-label{margin:0 0 4px;color:#f1d474;font-size:10px;font-weight:700}.portal-reply-quote{display:flex;flex-direction:column;gap:1px;margin:0 0 6px;padding:4px 7px;border-left:2px solid #e0bd57;border-radius:5px;background:rgba(0,0,0,.09)}.portal-reply-quote b{font-size:10px;color:#efd77e}.portal-reply-quote span{max-width:260px;font-size:10px;color:rgba(255,255,255,.68);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal-forward-panel{position:absolute;z-index:30;left:50%;top:50%;transform:translate(-50%,-50%);width:min(430px,calc(100% - 30px));max-height:min(620px,78%);display:flex;flex-direction:column;padding:14px;border:1px solid rgba(244,216,117,.22);border-radius:18px;background:#073c2e;box-shadow:0 24px 70px rgba(0,0,0,.48)}.portal-forward-panel[hidden]{display:none!important}.portal-forward-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;color:#fff}.portal-forward-head b{font-size:17px}.portal-forward-head button{border:0;background:transparent;color:#fff;font-size:25px;cursor:pointer}.portal-forward-list{min-height:0;overflow:auto;margin-top:8px}.portal-forward-person{width:100%;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:10px;padding:8px;border:0;border-bottom:1px solid rgba(244,216,117,.08);background:transparent;color:#fff;text-align:left;cursor:pointer}.portal-forward-person>span{min-width:0}.portal-forward-person b,.portal-forward-person small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portal-forward-person small{margin-top:3px;color:rgba(255,255,255,.53);font-size:10px}
@keyframes portalPulse{from{opacity:.65}to{opacity:1}}

@media(max-width:720px){
  .portal-messenger-topbar{min-height:58px!important;height:58px!important;padding:7px 8px!important;gap:5px!important;overflow:hidden!important}.portal-messenger-topbrand{gap:6px!important;min-width:0!important;max-width:none!important}.portal-messenger-topbrand img:first-child{width:27px!important;height:32px!important;flex:0 0 auto}.portal-messenger-topbrand img:last-child{width:118px!important;max-width:calc(100vw - 170px)!important;height:auto!important;object-fit:contain!important}.portal-messenger-topnav{gap:4px!important}.portal-messenger-topnav>a,.portal-messenger-topnav>button{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;border-radius:9px!important}.portal-messenger-topnav>a span,.portal-messenger-topnav>button span{display:none!important}.portal-messenger-topnav svg{width:17px!important;height:17px!important}.portal-messenger-topnav>.portal-messenger-close{width:34px!important;min-width:34px!important;font-size:21px!important}
  .portal-messenger-body{height:calc(100dvh - 58px)!important}.portal-messenger-sidebar,.portal-messenger-main{height:calc(100dvh - 58px)!important}.portal-messenger-sidebar{padding:11px 10px 8px!important}.portal-messenger-sidebar .portal-kicker{margin:0 4px 1px!important;font-size:8px!important}.portal-messenger-sidebar h2{font-size:30px!important;line-height:1!important;margin:3px 4px 10px!important}.portal-messenger-search{height:50px!important;border-radius:17px!important;margin:0 2px 10px!important}.portal-messenger-search input{font-size:16px!important}.portal-messenger-contact{grid-template-columns:50px minmax(0,1fr) auto!important;gap:10px!important;padding:9px 5px!important;border-radius:0!important;border-bottom:1px solid rgba(244,216,117,.07)!important}.portal-messenger-contact.saved{border-radius:12px!important;margin-bottom:3px!important}.portal-contact-avatar{width:50px!important;height:50px!important;min-width:50px!important}.portal-contact-copy b{font-size:15px!important}.portal-contact-copy small{font-size:11px!important;margin-top:3px!important}.portal-new-chat{right:16px;bottom:16px;width:54px;height:54px}
  .portal-chat-head{min-height:60px!important;padding:7px 8px!important}.portal-chat-back{font-size:30px!important}.portal-chat-head .portal-contact-avatar{width:40px!important;height:40px!important;min-width:40px!important}.portal-chat-person b{font-size:14px!important}.portal-chat-person small{font-size:10px!important}.portal-pinned-filter{max-width:86px!important;height:30px!important;min-height:30px!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .portal-chat-messages{padding:12px 7px 10px!important}.portal-chat-bubble{max-width:88%!important;padding:8px 28px 5px 10px!important}.portal-voice-message{min-width:190px!important}.portal-voice-message audio{width:min(220px,56vw)!important}.portal-message-actionbar button span{display:none}.portal-message-actionbar button{width:30px!important;min-width:30px!important;padding:0!important;justify-content:center}.portal-reply-quote span{max-width:210px}
  .portal-messenger-compose{padding:7px!important;gap:6px!important}.portal-message-input-wrap textarea{min-height:42px!important;border-radius:20px!important;font-size:15px!important}.portal-voice-btn,.portal-send-btn{width:42px!important;height:42px!important;min-width:42px!important}.portal-dictation-btn{right:5px!important;bottom:4px!important}.portal-recording-label{display:none}.portal-recording-status #messengerVoiceCancel{min-width:58px!important;padding:0 7px!important}.portal-reply-compose{padding:5px 8px!important}.portal-forward-panel{width:calc(100% - 16px);max-height:82%;border-radius:15px;padding:10px}.portal-forward-head b{font-size:15px}
}

/* v153 — mobile thread navigation, readable top actions and Telegram-like pinned strip */
.portal-pinned-strip{display:flex;align-items:stretch;gap:4px;min-height:50px;padding:5px 8px;border-bottom:1px solid rgba(244,216,117,.13);background:rgba(4,50,38,.96);flex:0 0 auto;box-sizing:border-box}
.portal-pinned-strip[hidden]{display:none!important}.portal-pinned-main{display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0;flex:1;border:0;background:transparent;color:#fff;text-align:left;cursor:pointer;padding:2px 5px;border-radius:8px}.portal-pinned-main:hover{background:rgba(244,216,117,.055)}
.portal-pinned-icon{display:grid;place-items:center;width:26px;height:26px;color:#e5c65d}.portal-pinned-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.portal-pinned-copy{display:flex;flex-direction:column;min-width:0}.portal-pinned-copy b{font-size:10px;line-height:1.2;color:#edd77e}.portal-pinned-copy span{margin-top:2px;font-size:11px;line-height:1.2;color:rgba(255,255,255,.72);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portal-pinned-position{font-size:10px;color:rgba(255,255,255,.48)}
.portal-pinned-nav{display:flex;align-items:center;gap:2px}.portal-pinned-nav[hidden]{display:none!important}.portal-pinned-nav button{width:28px;height:34px;border:1px solid rgba(244,216,117,.12);border-radius:8px;background:rgba(255,255,255,.025);color:#e9d784;font-size:21px;line-height:1;cursor:pointer}.portal-pinned-nav button:hover{background:rgba(244,216,117,.08)}
.portal-chat-row.portal-pin-flash .portal-chat-bubble{box-shadow:0 0 0 2px rgba(238,204,91,.65),0 6px 18px rgba(0,0,0,.18)!important}
.portal-chat-head #messengerAvatar.portal-avatar-photo{overflow:hidden}.portal-chat-head #messengerAvatar.portal-avatar-photo img{width:100%;height:100%;object-fit:cover;display:block}
.portal-messenger-list{padding-bottom:12px!important}

@media(max-width:720px){
  body.portal-page #messagesModal .portal-messenger-shell{display:flex!important;flex-direction:column!important;width:100%!important;height:100dvh!important;min-height:100dvh!important}
  body.portal-page #messagesModal .portal-messenger-body{display:grid!important;grid-template-columns:1fr!important;flex:1!important;height:calc(100dvh - 62px)!important;min-height:0!important;overflow:hidden!important}
  body.portal-page #messagesModal .portal-messenger-sidebar{display:flex!important;visibility:visible!important;width:100%!important;height:calc(100dvh - 62px)!important;max-height:none!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:11px 10px 8px!important;box-sizing:border-box!important}
  body.portal-page #messagesModal .portal-messenger-main{display:none!important;visibility:hidden!important;width:100%!important;height:0!important;max-height:none!important;min-height:0!important;overflow:hidden!important}
  body.portal-page #messagesModal .portal-messenger-shell.chat-open .portal-messenger-sidebar{display:none!important;visibility:hidden!important;height:0!important;overflow:hidden!important}
  body.portal-page #messagesModal .portal-messenger-shell.chat-open .portal-messenger-main{display:flex!important;visibility:visible!important;flex-direction:column!important;height:calc(100dvh - 62px)!important;min-height:0!important;overflow:hidden!important}

  .portal-messenger-topbar{min-height:62px!important;height:62px!important;padding:7px 8px!important;gap:4px!important;overflow:hidden!important}
  .portal-messenger-topbrand{flex:1 1 auto!important;gap:5px!important;min-width:0!important;overflow:hidden!important}.portal-messenger-topbrand img:first-child{width:24px!important;height:29px!important;flex:0 0 auto!important}.portal-messenger-topbrand img:last-child{width:94px!important;max-width:94px!important;height:auto!important;object-fit:contain!important}
  .portal-messenger-topnav{display:flex!important;align-items:center!important;gap:3px!important;flex:0 0 auto!important}.portal-messenger-topnav>a,.portal-messenger-topnav>button{display:inline-flex!important;width:auto!important;height:36px!important;min-width:0!important;min-height:36px!important;padding:0 8px!important;border-radius:9px!important;font-size:10px!important;line-height:1!important}.portal-messenger-topnav>a span,.portal-messenger-topnav>button span{display:inline!important}.portal-messenger-topnav svg{display:none!important}.portal-messenger-topnav>.portal-messenger-close{display:inline-flex!important;width:34px!important;min-width:34px!important;padding:0!important;font-size:21px!important}
  .portal-messenger-topnav>a span{font-size:0}.portal-messenger-topnav>a span::after{content:"Сайт";font-size:10px}.portal-messenger-topnav>#messengerAccount span{font-size:0}.portal-messenger-topnav>#messengerAccount span::after{content:"Кабинет";font-size:10px}

  .portal-messenger-sidebar .portal-kicker{margin:0 4px 1px!important;font-size:8px!important}.portal-messenger-sidebar h2{font-size:30px!important;line-height:1!important;margin:3px 4px 10px!important}.portal-messenger-search{height:50px!important;border-radius:17px!important;margin:0 2px 10px!important}.portal-messenger-search input{font-size:16px!important}.portal-messenger-contact{grid-template-columns:50px minmax(0,1fr) auto!important;gap:10px!important;padding:9px 5px!important;border-radius:0!important;border-bottom:1px solid rgba(244,216,117,.07)!important}.portal-messenger-contact.saved{border-radius:12px!important;margin-bottom:3px!important}.portal-contact-avatar{width:50px!important;height:50px!important;min-width:50px!important}.portal-contact-copy b{font-size:15px!important}.portal-contact-copy small{font-size:11px!important;margin-top:3px!important}
  .portal-chat-head{min-height:58px!important;padding:6px 8px!important}.portal-chat-back{display:block!important;width:38px!important;min-width:38px!important;height:42px!important;font-size:31px!important}.portal-chat-head .portal-contact-avatar{width:40px!important;height:40px!important;min-width:40px!important}.portal-chat-person b{font-size:14px!important}.portal-chat-person small{font-size:10px!important}
  .portal-pinned-strip{min-height:48px!important;padding:4px 5px!important}.portal-pinned-main{grid-template-columns:22px minmax(0,1fr) auto!important;gap:5px!important;padding:2px 3px!important}.portal-pinned-icon{width:22px!important;height:22px!important}.portal-pinned-copy b{font-size:9px!important}.portal-pinned-copy span{font-size:10px!important}.portal-pinned-nav button{width:26px!important;height:32px!important}
  .portal-chat-messages{padding:10px 7px 9px!important}.portal-chat-bubble{max-width:88%!important;padding:8px 28px 5px 10px!important}.portal-voice-message{min-width:190px!important}.portal-voice-message audio{width:min(220px,56vw)!important}.portal-message-actionbar button span{display:none}.portal-message-actionbar button{width:30px!important;min-width:30px!important;padding:0!important;justify-content:center}.portal-reply-quote span{max-width:210px}
  .portal-messenger-compose{margin-top:auto!important;padding:7px!important;gap:6px!important;flex:0 0 auto!important}.portal-message-input-wrap textarea{min-height:42px!important;border-radius:20px!important;font-size:15px!important}.portal-voice-btn,.portal-send-btn{width:42px!important;height:42px!important;min-width:42px!important}.portal-dictation-btn{right:5px!important;bottom:4px!important}.portal-recording-label{display:none}.portal-recording-status #messengerVoiceCancel{min-width:58px!important;padding:0 7px!important}.portal-reply-compose{padding:5px 8px!important}.portal-forward-panel{width:calc(100% - 16px);max-height:82%;border-radius:15px;padding:10px}.portal-forward-head b{font-size:15px}
}

/* v154 — clean mobile labels + message delete confirmation */
.portal-message-delete-action{color:#ffd0c8!important}
.portal-message-delete-overlay{z-index:10040;background:rgba(0,18,13,.72);backdrop-filter:blur(4px)}
.portal-message-delete-dialog{width:min(420px,calc(100vw - 28px));padding:22px;border-radius:20px;background:#0b4434;border:1px solid rgba(220,177,66,.38);box-shadow:0 24px 70px rgba(0,0,0,.42)}
.portal-message-delete-dialog h3{margin:0 0 8px;color:#fff;font-size:22px}.portal-message-delete-dialog p{margin:0 0 16px;color:rgba(255,255,255,.74);line-height:1.45}
.portal-delete-everyone{display:flex;align-items:center;gap:10px;margin:4px 0 18px;color:#fff;font-weight:700}.portal-delete-everyone input{width:19px;height:19px;accent-color:#d7ad42}
.portal-message-delete-actions{display:flex;justify-content:flex-end;gap:10px}.portal-message-delete-actions .danger{background:#8f342f;border-color:#bd5d55;color:#fff}
@media(max-width:720px){.portal-messenger-topnav>a:after,.portal-messenger-topnav>#messengerAccount:after{content:none!important;display:none!important}.portal-messenger-topnav>a span,.portal-messenger-topnav>#messengerAccount span{font-size:0!important}.portal-messenger-topnav>a span::after{content:'Сайт';font-size:10px}.portal-messenger-topnav>#messengerAccount span::after{content:'Кабинет';font-size:10px}.portal-message-delete-dialog{padding:20px 18px 16px;border-radius:18px}}

/* v155 — WebRTC audio calls and call notification settings */
.portal-chat-head{gap:10px}
.portal-chat-person{min-width:0;flex:1}
.portal-call-btn{width:42px;height:42px;border-radius:50%;border:1px solid rgba(212,175,55,.42);background:rgba(212,175,55,.10);display:grid;place-items:center;cursor:pointer;color:#d9b84e;flex:0 0 auto;transition:.18s ease}
.portal-call-btn:hover{background:rgba(212,175,55,.18);transform:translateY(-1px)}
.portal-call-btn[hidden]{display:none!important}.portal-call-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.portal-call-overlay{z-index:12000;background:rgba(1,20,14,.84);backdrop-filter:blur(11px)}
.portal-call-dialog{width:min(430px,calc(100vw - 32px));min-height:500px;margin:auto;padding:38px 28px 32px;border-radius:28px;border:1px solid rgba(212,175,55,.30);background:linear-gradient(180deg,rgba(8,53,40,.98),rgba(3,34,25,.99));box-shadow:0 26px 80px rgba(0,0,0,.45);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff}
.portal-call-avatar{width:112px;height:112px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#cda83c,#896d20);box-shadow:0 0 0 5px rgba(212,175,55,.12),0 18px 45px rgba(0,0,0,.28);font-size:34px;font-weight:800;color:#082e23;margin-bottom:24px}
.portal-call-avatar img{width:100%;height:100%;object-fit:cover}.portal-call-dialog h2{margin:0 0 8px;font-size:28px}.portal-call-dialog p{margin:0;color:rgba(255,255,255,.68);font-size:16px}.portal-call-timer{margin-top:9px;color:#e4c45f;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:.08em}
.portal-call-actions{margin-top:42px;display:flex;align-items:flex-start;justify-content:center;gap:34px}.portal-call-actions[hidden]{display:none!important}
.portal-call-round{width:78px;border:0;background:none;color:#fff;display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;font:inherit}.portal-call-round svg{width:58px;height:58px;padding:16px;border-radius:50%;box-sizing:border-box;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.portal-call-round span{font-size:12px;color:rgba(255,255,255,.78)}
.portal-call-round.accept svg{background:#2aa66f}.portal-call-round.decline svg{background:#d85654}.portal-call-round.mute svg{background:rgba(255,255,255,.15)}.portal-call-round.mute.active svg{background:#d9b84e;stroke:#062f23}.portal-call-round:active svg{transform:scale(.94)}
.portal-call-push-row{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:18px 20px;border:1px solid rgba(212,175,55,.20);border-radius:18px;background:rgba(255,255,255,.035);cursor:pointer}.portal-call-push-row>span{display:grid;gap:5px}.portal-call-push-row b{color:#f3e5ae}.portal-call-push-row small{color:rgba(255,255,255,.62);line-height:1.4}.portal-call-push-row input{position:absolute;opacity:0;pointer-events:none}.portal-call-push-row i{position:relative;width:50px;height:28px;border-radius:999px;background:rgba(255,255,255,.16);flex:0 0 auto;transition:.2s ease}.portal-call-push-row i:before{content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:#fff;transition:.2s ease}.portal-call-push-row input:checked+i{background:#b99731}.portal-call-push-row input:checked+i:before{transform:translateX(22px)}.portal-call-push-row input:disabled+i{opacity:.45}
@media(max-width:720px){.portal-call-btn{width:38px;height:38px}.portal-call-dialog{width:100vw;min-height:100svh;border:0;border-radius:0;padding:28px 22px}.portal-call-avatar{width:104px;height:104px}.portal-call-actions{margin-top:38px}.portal-call-push-row{padding:16px}.portal-call-settings .portal-section-head p{font-size:13px}}


/* v156 — ringback/ringtone preferences, delivery/read receipts and mobile keyboard viewport */
.portal-message-ticks{display:inline-block;margin-left:2px;font-weight:900;letter-spacing:-2px;font-size:10px;vertical-align:baseline}.portal-message-ticks.delivered{color:rgba(236,216,149,.72)}.portal-message-ticks.read{color:#7fd9c1;text-shadow:0 0 8px rgba(127,217,193,.18)}
.portal-call-pref-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-bottom:12px}.portal-call-select{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border:1px solid rgba(212,175,55,.20);border-radius:18px;background:rgba(255,255,255,.035)}.portal-call-select>span{display:grid;gap:5px}.portal-call-select b{color:#f3e5ae}.portal-call-select small{color:rgba(255,255,255,.62);line-height:1.35}.portal-call-select select{min-width:150px;height:42px;border-radius:12px;border:1px solid rgba(212,175,55,.32);background:#0c4a38;color:#fff;padding:0 12px;font:inherit}.portal-call-pref-status{grid-column:1/-1;min-height:15px;color:#d8bf73;font-size:12px;padding-left:3px}
@media(max-width:720px){
  #messagesModal{inset:auto 0 auto 0!important;top:var(--portal-messenger-vtop,0px)!important;width:100vw!important;height:var(--portal-messenger-vh,100dvh)!important;max-height:var(--portal-messenger-vh,100dvh)!important;padding:0!important;place-items:stretch!important;overflow:hidden!important;overscroll-behavior:none!important}
  #messagesModal .portal-messenger-dialog,#messagesModal .portal-messenger-shell{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important}
  body.portal-page #messagesModal .portal-messenger-body{height:calc(100% - 62px)!important;min-height:0!important}
  body.portal-page #messagesModal .portal-messenger-sidebar{height:100%!important;min-height:0!important}
  body.portal-page #messagesModal .portal-messenger-shell.chat-open .portal-messenger-main{height:100%!important;min-height:0!important}
  #messagesModal .portal-chat-messages{overscroll-behavior:contain;scrollbar-gutter:stable}
  #messagesModal .portal-messenger-compose{position:relative;z-index:4;padding-bottom:max(7px,env(safe-area-inset-bottom))!important}
  #messagesModal .portal-message-input-wrap textarea{scroll-margin-bottom:12px}
  .portal-call-pref-grid{grid-template-columns:1fr}.portal-call-pref-status{grid-column:1}.portal-call-select{padding:14px;gap:10px}.portal-call-select select{min-width:128px;font-size:13px}
}


/* v157 — resilient audio calls across transient network changes */
.portal-call-dialog #callStatus{min-height:24px}.portal-call-dialog #callStatus:empty{min-height:0}
/* v158 — stable mobile scrolling, folders/groups and group audio rooms */
.portal-folder-tabs{display:flex;align-items:center;gap:7px;overflow-x:auto;scrollbar-width:none;margin:0 2px 9px;padding-bottom:2px;-webkit-overflow-scrolling:touch}.portal-folder-tabs::-webkit-scrollbar{display:none}.portal-folder-tabs button{flex:0 0 auto;border:1px solid rgba(244,216,117,.20);background:rgba(255,255,255,.035);color:#d8cfaa;border-radius:999px;padding:7px 11px;font-size:12px;cursor:pointer}.portal-folder-tabs button.active{background:linear-gradient(180deg,#e5c56d,#b98a36);color:#143b2d;border-color:transparent;font-weight:800}.portal-messenger-tools{display:flex;gap:7px;margin:0 2px 9px}.portal-messenger-tools button{border:1px solid rgba(244,216,117,.14);background:rgba(244,216,117,.06);color:#dfcc86;border-radius:10px;padding:7px 10px;font-size:11px;cursor:pointer}.portal-group-call-banner,.portal-thread-call-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid rgba(244,216,117,.24);background:rgba(197,149,56,.10);border-radius:13px;padding:9px 10px;margin:0 2px 9px}.portal-group-call-banner[hidden],.portal-thread-call-banner[hidden]{display:none!important}.portal-group-call-banner span,.portal-thread-call-banner span{display:flex;min-width:0;flex-direction:column}.portal-group-call-banner b,.portal-thread-call-banner b{font-size:12px;color:#f4d875}.portal-group-call-banner small,.portal-thread-call-banner small{font-size:10px;color:#9db7ad}.portal-group-call-banner button,.portal-thread-call-banner button{border:0;border-radius:999px;background:#d4aa52;color:#173d2e;font-weight:800;padding:7px 11px;cursor:pointer}.portal-thread-call-banner{margin:8px 14px 0;flex:0 0 auto}.portal-chat-folder-btn,.portal-group-info-btn{width:36px;height:36px;min-width:36px;border:1px solid rgba(244,216,117,.13);border-radius:50%;background:rgba(255,255,255,.035);color:#d8c478;font-size:15px;display:grid;place-items:center;cursor:pointer}.portal-group-info-btn{font-weight:800;font-family:Georgia,serif}.portal-contact-group .portal-contact-avatar{background:linear-gradient(145deg,rgba(218,181,91,.34),rgba(74,123,96,.35));font-weight:800}.portal-folder-dialog,.portal-group-dialog{width:min(520px,calc(100vw - 26px));padding:24px}.portal-folder-dialog h3,.portal-group-dialog h3{margin:0 0 7px;color:#f2db8a}.portal-folder-dialog p,.portal-group-dialog>small{color:#9cb3ab;font-size:12px}.portal-inline-form{display:flex;gap:8px;margin-top:14px}.portal-inline-form input,.portal-group-dialog input,.portal-group-invite input{width:100%;box-sizing:border-box;border:1px solid rgba(244,216,117,.14);background:rgba(0,0,0,.16);color:#fff;border-radius:11px;padding:10px 12px;outline:none}.portal-folder-manage-list,.portal-folder-assign-list,.portal-group-member-list,.portal-group-search-results{display:flex;flex-direction:column;gap:7px;margin-top:12px;max-height:280px;overflow:auto}.portal-folder-manage-row,.portal-folder-assign-row,.portal-group-search-row,.portal-group-member-row{display:flex;align-items:center;gap:9px;border:1px solid rgba(244,216,117,.10);background:rgba(255,255,255,.025);border-radius:11px;padding:9px 10px}.portal-folder-manage-row b,.portal-group-member-row b{flex:1}.portal-folder-manage-row button,.portal-group-search-row button,.portal-group-invite button{border:0;border-radius:8px;background:rgba(219,181,83,.13);color:#e6cc79;padding:6px 9px;cursor:pointer}.portal-folder-assign-row input{accent-color:#d2aa52}.portal-group-dialog label{display:block;color:#d8cfaa;font-size:12px;margin:11px 0 5px}.portal-group-selected{display:flex;gap:6px;flex-wrap:wrap;margin:9px 0}.portal-group-chip{display:inline-flex;align-items:center;gap:5px;padding:6px 8px;border-radius:999px;background:rgba(244,216,117,.10);color:#f0d781;font-size:11px}.portal-group-chip button{border:0;background:transparent;color:#fff;cursor:pointer}.portal-group-search-row{cursor:pointer}.portal-group-search-row .portal-contact-avatar{width:36px;height:36px;min-width:36px}.portal-group-search-row span:nth-child(2){min-width:0;flex:1}.portal-group-search-row small{display:block;color:#90aaa0}.portal-group-invite{display:flex;gap:7px;margin:12px 0}.portal-group-call-dialog{width:min(560px,calc(100vw - 18px));border:1px solid rgba(244,216,117,.18);background:linear-gradient(180deg,#073629,#05291f);border-radius:26px;padding:27px 22px;text-align:center;box-shadow:0 24px 80px rgba(0,0,0,.45)}.portal-group-call-icon{width:74px;height:74px;border-radius:50%;display:grid;place-items:center;margin:0 auto 13px;background:linear-gradient(145deg,#d5af59,#7e6029);color:#133b2c;font-size:34px}.portal-group-call-dialog h2{margin:0;color:#f4dc8a}.portal-group-call-dialog p{margin:6px 0;color:#9fb7ad}.portal-group-call-timer{font-variant-numeric:tabular-nums;color:#fff;font-size:18px;margin:8px 0 13px}.portal-group-call-members{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;min-height:32px;margin-bottom:16px}.portal-group-call-member{padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.055);color:#d8e6df;font-size:11px}.portal-group-call-member.speaking{outline:1px solid #ddbd63;color:#f4d875}.portal-group-call-actions{display:flex;justify-content:center;gap:14px}.portal-call-round.link{background:rgba(255,255,255,.08);color:#e3cf8a}.portal-group-link-symbol{font-size:23px;line-height:1}.portal-call-event{display:flex;justify-content:center;margin:9px 0}.portal-call-event-card{display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(244,216,117,.12);background:rgba(2,24,18,.64);color:#d8cfaa;border-radius:999px;padding:7px 11px;font-size:11px}.portal-call-event-card svg{width:15px;height:15px;fill:none;stroke:#d9bb65;stroke-width:1.8}.portal-group-message-sender{font-size:10px;font-weight:800;color:#d9bd67;margin-bottom:3px}.portal-message-input-wrap textarea{touch-action:manipulation}.portal-chat-messages{touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;overflow-y:auto!important;overflow-x:hidden!important;scroll-behavior:auto}.portal-dictation-btn{width:38px!important;height:38px!important;min-width:38px!important;border-radius:50%!important;right:4px!important;bottom:2px!important;background:rgba(215,194,122,.10)!important;display:grid!important;place-items:center!important;aspect-ratio:1/1!important;padding:0!important}.portal-dictation-btn.active{background:rgba(205,86,65,.78)!important}.portal-dictation-btn svg{width:20px!important;height:20px!important}.portal-message-input-wrap textarea{padding-right:48px!important}.portal-no-flicker{contain:content}
@media(max-width:720px){.portal-folder-tabs{margin:0 2px 7px}.portal-folder-tabs button{padding:6px 10px;font-size:11px}.portal-messenger-tools{margin-bottom:7px}.portal-messenger-tools button{padding:6px 9px}.portal-chat-folder-btn,.portal-group-info-btn{width:32px!important;height:32px!important;min-width:32px!important;font-size:13px}.portal-chat-head{gap:5px!important}.portal-chat-person{min-width:0}.portal-thread-call-banner{margin:6px 7px 0}.portal-dictation-btn{width:36px!important;height:36px!important;min-width:36px!important;right:3px!important;bottom:3px!important;border-radius:50%!important}.portal-message-input-wrap textarea{padding-right:44px!important}.portal-folder-dialog,.portal-group-dialog{padding:18px 15px}.portal-group-call-dialog{border-radius:20px;padding:22px 13px}.portal-group-call-actions{gap:9px}.portal-group-call-members{max-height:115px;overflow:auto}.portal-chat-messages{position:relative;z-index:1}}

/* v159 — mobile messenger viewport, contact actions, folder bulk management and video calls */
.portal-folder-bulk-results,.portal-folder-bulk-current{display:flex;flex-direction:column;gap:7px;margin-top:10px;max-height:260px;overflow:auto}
.portal-folder-bulk-row{display:flex;align-items:center;gap:9px;padding:9px 10px;border:1px solid rgba(244,216,117,.11);border-radius:11px;background:rgba(255,255,255,.025)}
.portal-folder-bulk-row .portal-contact-avatar{width:36px!important;height:36px!important;min-width:36px!important}.portal-folder-bulk-row>span:nth-child(2){flex:1;min-width:0}.portal-folder-bulk-row small{display:block;color:#91aaa1}.portal-folder-bulk-row button{border:0;border-radius:9px;background:rgba(219,181,83,.14);color:#efd177;padding:7px 9px;cursor:pointer}.portal-folder-bulk-row button.remove{color:#ffd0c8;background:rgba(173,76,65,.13)}
.portal-contact-menu-overlay{z-index:10080;background:rgba(0,18,13,.68);backdrop-filter:blur(4px)}.portal-contact-menu{width:min(390px,calc(100vw - 24px));padding:18px;display:grid;gap:8px}.portal-contact-menu-person{display:flex;align-items:center;gap:11px;margin:3px 0 8px}.portal-contact-menu-person .portal-contact-avatar{width:48px!important;height:48px!important;min-width:48px!important}.portal-contact-menu-person b,.portal-contact-menu-person small{display:block}.portal-contact-menu-person small{color:#bea65d;margin-top:3px}.portal-contact-menu>button:not(.portal-dialog-close){width:100%;text-align:left;border:1px solid rgba(244,216,117,.12);border-radius:12px;padding:11px 12px;background:rgba(255,255,255,.035);color:#fff;cursor:pointer}.portal-contact-menu>button.danger{color:#ffd0c8}.portal-contact-menu>small{color:#91aaa1;line-height:1.4;margin-top:4px}
.portal-video-call-btn{color:#e1c265}.portal-video-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;min-height:0}.portal-video-tile{position:relative;overflow:hidden;min-height:180px;border-radius:17px;background:linear-gradient(145deg,#0d503d,#073529);border:1px solid rgba(244,216,117,.13)}.portal-video-tile video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#041f18}.portal-video-tile.screen video{object-fit:contain;background:#071b16}.portal-video-tile .portal-video-avatar{position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(circle at 50% 35%,rgba(216,181,88,.16),transparent 34%)}.portal-video-tile .portal-video-avatar span{width:82px;height:82px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#dbb858,#8b692c);color:#07392c;font-weight:900;font-size:24px}.portal-video-tile .portal-video-avatar img{width:100%;height:100%;object-fit:cover}.portal-video-tile.has-video .portal-video-avatar{display:none}.portal-video-tile.speaking{outline:2px solid #e6c760;box-shadow:0 0 0 2px rgba(230,199,96,.12)}.portal-video-name{position:absolute;left:7px;right:7px;bottom:7px;padding:6px 8px;border-radius:9px;background:rgba(0,20,14,.70);color:#fff;font-size:11px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portal-video-self{position:absolute;right:8px;top:8px;padding:3px 6px;border-radius:999px;background:rgba(0,0,0,.5);color:#edd47f;font-size:9px}.portal-call-video-stage{width:min(760px,92vw);margin:0 auto 13px}.portal-direct-video-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-direct-call-dialog.video-active{width:min(820px,calc(100vw - 20px));max-width:820px;min-height:min(760px,94svh);justify-content:flex-start;padding-top:18px}.portal-direct-call-dialog.video-active>.portal-call-avatar{display:none}.portal-direct-call-dialog.video-active h2{font-size:20px;margin-top:8px}.portal-call-round.camera svg,.portal-call-round.screen svg{background:rgba(255,255,255,.15)}.portal-call-round.camera.active svg,.portal-call-round.screen.active svg{background:#d9b84e;stroke:#062f23}.portal-group-call-dialog.portal-video-room-dialog{width:min(980px,calc(100vw - 20px));max-height:94svh;overflow:auto}.portal-group-call-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;text-align:left;margin-bottom:10px}.portal-group-call-top h2,.portal-group-call-top p{margin-left:0}.portal-group-call-top .portal-group-call-timer{margin:3px 0 0}.portal-video-room-dialog .portal-video-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-bottom:10px}.portal-video-room-dialog .portal-video-tile{min-height:165px}.portal-video-room-dialog .portal-group-call-actions{flex-wrap:wrap}.portal-call-round[hidden]{display:none!important}
@media(max-width:720px){
  #messagesModal{position:fixed!important;inset:0 0 auto 0!important;top:0!important;left:0!important;right:0!important;width:100vw!important;height:var(--portal-messenger-vh,100dvh)!important;max-height:var(--portal-messenger-vh,100dvh)!important;overflow:hidden!important;transform:none!important}
  #messagesModal .portal-messenger-dialog,#messagesModal .portal-messenger-shell{height:100%!important;max-height:100%!important;overflow:hidden!important}
  #messagesModal .portal-messenger-shell{display:flex!important;flex-direction:column!important}
  #messagesModal .portal-messenger-topbar{position:relative!important;top:auto!important;flex:0 0 62px!important;height:62px!important;min-height:62px!important;z-index:30!important}
  body.portal-page #messagesModal .portal-messenger-body{flex:1 1 auto!important;height:auto!important;min-height:0!important;overflow:hidden!important}
  body.portal-page #messagesModal .portal-messenger-shell.chat-open .portal-messenger-main{display:flex!important;visibility:visible!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;overflow:hidden!important}
  #messagesModal .portal-chat-head{position:relative!important;top:auto!important;flex:0 0 58px!important;height:58px!important;min-height:58px!important;z-index:20!important;background:#073c2e!important}
  #messagesModal .portal-pinned-strip,#messagesModal .portal-thread-call-banner{flex:0 0 auto!important}
  #messagesModal .portal-chat-messages{position:relative!important;flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;overflow-y:scroll!important;overflow-x:hidden!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain!important;z-index:1!important}
  #messagesModal .portal-messenger-compose{position:relative!important;flex:0 0 auto!important;margin-top:0!important;z-index:25!important;background:#042f24!important}
  #messagesModal .portal-message-input-wrap{position:relative!important;flex:1 1 auto!important;min-width:0!important;height:42px!important}
  #messagesModal .portal-message-input-wrap textarea{height:42px!important;min-height:42px!important;max-height:42px!important;padding:9px 48px 9px 13px!important;overflow-y:auto!important}
  #messagesModal .portal-messenger-compose button.portal-dictation-btn{position:absolute!important;right:3px!important;top:3px!important;bottom:auto!important;width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;flex:0 0 36px!important;aspect-ratio:1/1!important;border-radius:999px!important;box-sizing:border-box!important;padding:0!important;display:grid!important;place-items:center!important}
  #messagesModal .portal-messenger-compose button.portal-dictation-btn svg{width:19px!important;height:19px!important}
  .portal-video-grid{grid-template-columns:1fr 1fr}.portal-video-tile{min-height:135px;border-radius:13px}.portal-video-tile .portal-video-avatar span{width:62px;height:62px;font-size:19px}.portal-video-name{font-size:10px}.portal-direct-call-dialog.video-active{width:100vw;max-width:none;min-height:100svh;height:100svh;border:0;border-radius:0;padding:12px 8px 10px;overflow:auto}.portal-call-video-stage{width:100%;margin-bottom:6px}.portal-direct-video-grid{grid-template-columns:1fr 1fr}.portal-video-room-dialog{width:100vw!important;max-width:none!important;height:100svh;max-height:100svh!important;border:0!important;border-radius:0!important;padding:12px 8px!important}.portal-video-room-dialog .portal-video-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.portal-video-room-dialog .portal-video-tile{min-height:128px}.portal-group-call-actions{gap:5px!important}.portal-group-call-actions .portal-call-round,.portal-call-active .portal-call-round{width:58px}.portal-group-call-actions .portal-call-round svg,.portal-call-active .portal-call-round svg{width:48px;height:48px;padding:13px}.portal-group-call-actions .portal-call-round span,.portal-call-active .portal-call-round span{font-size:9px}.portal-contact-menu{border-radius:18px}.portal-messenger-tools{flex-wrap:wrap}.portal-messenger-tools #messengerFolderAddUsers:not([hidden]){display:inline-flex!important}
}

/* v160 — reordered dialog controls, top-anchored mobile overlays, stable scroll and calmer video UI */
.portal-messenger-create-tools{margin-bottom:7px}
.portal-folder-action{margin:0 2px 9px}
.portal-folder-action[hidden]{display:none!important}
.portal-folder-action button{width:100%;display:flex;align-items:center;justify-content:center;min-height:38px;border:1px solid rgba(244,216,117,.22);border-radius:12px;background:linear-gradient(180deg,rgba(215,170,71,.14),rgba(215,170,71,.07));color:#f1d47a;font:800 12px/1 Arial,sans-serif;cursor:pointer}
.portal-folder-action button:active{transform:translateY(1px)}
.portal-group-info-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.portal-group-info-title-row h3{margin:0!important}.portal-mini-action{border:1px solid rgba(244,216,117,.18);border-radius:10px;background:rgba(244,216,117,.07);color:#e9ce75;padding:7px 9px;cursor:pointer}
.portal-group-member-copy{flex:1;min-width:0}.portal-group-member-copy b,.portal-group-member-copy small{display:block}.portal-group-member-copy small{color:#91aaa1;margin-top:2px}.portal-member-remove{border:1px solid rgba(232,115,97,.22)!important;border-radius:9px!important;background:rgba(173,76,65,.11)!important;color:#ffd1c9!important;padding:6px 8px!important;cursor:pointer}
.portal-call-invite-participants{margin:10px 0}.portal-call-participant-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.portal-group-chip.pending{opacity:.72}.portal-call-invite-dialog .portal-group-search-row em{font-style:normal;color:#e7ca70;font-size:11px;margin-left:auto}
.portal-call-round.invite svg{background:rgba(255,255,255,.15)}

/* Video tiles are persistent in v160; transitions no longer recreate the video element. */
.portal-video-tile{transform:translateZ(0);contain:layout paint;backface-visibility:hidden}
.portal-video-tile video{transform:translateZ(0);backface-visibility:hidden}
.portal-video-tile.speaking{outline-offset:-2px}
.portal-call-video-stage{max-height:55svh;overflow:auto}
.portal-direct-call-dialog.video-active{overflow:hidden}
.portal-direct-call-dialog.video-active .portal-call-active{flex:0 0 auto}

@media(max-width:720px){
  /* Follow Android's visual viewport when the keyboard pans the page. */
  #messagesModal{inset:auto 0 auto 0!important;left:0!important;right:0!important;top:var(--portal-messenger-vtop,0px)!important;width:100vw!important;height:var(--portal-messenger-vh,100dvh)!important;max-height:var(--portal-messenger-vh,100dvh)!important;overflow:hidden!important;transform:none!important;padding:0!important;place-items:stretch!important}
  #messagesModal .portal-messenger-dialog{width:100%!important;height:100%!important;max-height:100%!important;border-radius:0!important;overflow:hidden!important}
  #messagesModal .portal-messenger-shell{display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;max-height:100%!important;min-height:0!important;overflow:hidden!important}
  #messagesModal .portal-messenger-topbar{position:relative!important;inset:auto!important;flex:0 0 62px!important;height:62px!important;min-height:62px!important;z-index:40!important;background:#06392b!important}
  #messagesModal .portal-messenger-body{display:grid!important;grid-template-columns:1fr!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
  #messagesModal .portal-messenger-sidebar{height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important}
  #messagesModal .portal-messenger-main{height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;flex-direction:column!important}
  #messagesModal .portal-messenger-shell.chat-open .portal-messenger-main{display:flex!important;visibility:visible!important}
  #messagesModal .portal-chat-head{position:relative!important;inset:auto!important;flex:0 0 58px!important;height:58px!important;min-height:58px!important;max-height:58px!important;z-index:35!important;background:#073c2e!important}
  #messagesModal .portal-pinned-strip,#messagesModal .portal-thread-call-banner{flex:0 0 auto!important}
  #messagesModal .portal-chat-messages{display:block!important;position:relative!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:auto!important;scroll-behavior:auto!important;z-index:1!important}
  #messagesModal .portal-messenger-compose{position:relative!important;inset:auto!important;flex:0 0 auto!important;margin:0!important;z-index:35!important;background:#042f24!important}
  #messagesModal .portal-message-input-wrap{height:42px!important;min-height:42px!important}
  #messagesModal .portal-messenger-compose button.portal-dictation-btn{width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;flex:0 0 36px!important;aspect-ratio:1!important;border-radius:50%!important;padding:0!important;right:3px!important;top:3px!important;bottom:auto!important}

  .portal-messenger-create-tools{order:0;margin:0 2px 7px}.portal-folder-tabs{order:1;margin:0 2px 7px}.portal-folder-action{order:2;margin:0 2px 7px}.portal-group-call-banner{order:3}.portal-messenger-search{order:4}.portal-messenger-list{order:5}
  .portal-messenger-create-tools button{flex:1;min-height:36px;font-size:12px!important}
  .portal-folder-tabs button{font-size:13px!important;padding:7px 12px!important}
  .portal-folder-action button{min-height:40px;font-size:13px}

  /* Search/add dialogs stay at the top of the visible area instead of being hidden by the keyboard. */
  #folderBulkAddModal,#groupCreateModal,#groupInfoModal,#callInviteModal{inset:auto 0 auto 0!important;top:var(--portal-messenger-vtop,0px)!important;width:100vw!important;height:var(--portal-messenger-vh,100dvh)!important;max-height:var(--portal-messenger-vh,100dvh)!important;place-items:start center!important;overflow:hidden!important;padding:10px!important}
  #folderBulkAddModal .portal-dialog,#groupCreateModal .portal-dialog,#groupInfoModal .portal-dialog,#callInviteModal .portal-dialog{width:100%!important;max-width:none!important;max-height:calc(var(--portal-messenger-vh,100dvh) - 20px)!important;margin:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;border-radius:18px!important;padding:18px 14px!important}
  #folderBulkAddModal .portal-folder-bulk-results,#folderBulkAddModal .portal-folder-bulk-current,#groupInfoModal .portal-group-member-list,#groupInfoModal .portal-group-search-results,#callInviteModal .portal-group-search-results{max-height:none!important;overflow:visible!important}

  /* Direct call controls fit the phone and remain usable with 6 actions. */
  .portal-direct-call-dialog{height:100svh!important;min-height:100svh!important;max-height:100svh!important;width:100vw!important;max-width:none!important;border:0!important;border-radius:0!important;padding:14px 10px 12px!important;overflow:hidden!important;justify-content:flex-start!important}
  .portal-direct-call-dialog>.portal-call-avatar{margin-top:18px}
  .portal-direct-call-dialog h2{font-size:25px!important;margin-top:16px!important}.portal-direct-call-dialog p{font-size:15px!important}.portal-direct-call-dialog .portal-call-timer{margin-top:8px}
  .portal-direct-call-dialog.video-active>.portal-call-avatar{display:none!important}.portal-direct-call-dialog.video-active h2{font-size:18px!important;margin:6px 0 3px!important}.portal-direct-call-dialog.video-active p{font-size:13px!important}.portal-direct-call-dialog.video-active .portal-call-timer{margin:3px 0 5px!important}
  .portal-direct-call-dialog .portal-call-video-stage{width:100%!important;max-height:55svh!important;min-height:0!important;margin:0 0 5px!important;overflow:auto!important}
  .portal-direct-video-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.portal-direct-video-grid .portal-video-tile{min-height:150px!important}
  .portal-direct-call-dialog .portal-call-actions{width:100%!important;max-width:100%!important;margin:18px 0 0!important;padding:0 2px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px 4px!important;align-items:start!important;justify-items:center!important;overflow:visible!important}
  .portal-direct-call-dialog .portal-call-actions[hidden]{display:none!important}
  .portal-direct-call-dialog .portal-call-round{width:72px!important;min-width:0!important}.portal-direct-call-dialog .portal-call-round svg{width:50px!important;height:50px!important;padding:13px!important}.portal-direct-call-dialog .portal-call-round span{font-size:10px!important;line-height:1.1!important}
  .portal-direct-call-dialog.video-active .portal-call-active{margin-top:5px!important}

  .portal-video-room-dialog .portal-video-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.portal-video-room-dialog .portal-video-tile{min-height:140px!important}
  .portal-group-call-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px 4px!important;justify-items:center!important}
}
\n\n/* v162 — ONLY mobile chat header anchoring + real message scrolling. */\n@media(max-width:720px){\n  /* Chrome Android is instructed by account.html to resize the layout viewport for the\n     keyboard. The messenger therefore stays fixed to that resized viewport and must\n     not chase visualViewport.offsetTop. */\n  body.portal-page #messagesModal{\n    position:fixed!important;\n    inset:0!important;\n    top:0!important;\n    left:0!important;\n    right:0!important;\n    bottom:0!important;\n    width:100vw!important;\n    height:100dvh!important;\n    max-height:100dvh!important;\n    transform:none!important;\n    overflow:hidden!important;\n  }\n  body.portal-page #messagesModal .portal-messenger-dialog,\n  body.portal-page #messagesModal .portal-messenger-shell{\n    width:100%!important;\n    height:100%!important;\n    min-height:0!important;\n    max-height:100%!important;\n    overflow:hidden!important;\n  }\n  body.portal-page #messagesModal .portal-messenger-shell{\n    display:flex!important;\n    flex-direction:column!important;\n  }\n  body.portal-page #messagesModal .portal-messenger-topbar{\n    position:relative!important;\n    inset:auto!important;\n    flex:0 0 62px!important;\n    height:62px!important;\n    min-height:62px!important;\n    max-height:62px!important;\n    transform:none!important;\n  }\n  body.portal-page #messagesModal .portal-messenger-body{\n    display:block!important;\n    flex:1 1 0!important;\n    height:0!important;\n    min-height:0!important;\n    max-height:none!important;\n    overflow:hidden!important;\n  }\n  body.portal-page #messagesModal .portal-messenger-shell.chat-open .portal-messenger-main{\n    display:flex!important;\n    visibility:visible!important;\n    flex-direction:column!important;\n    width:100%!important;\n    height:100%!important;\n    min-height:0!important;\n    max-height:100%!important;\n    overflow:hidden!important;\n  }\n  body.portal-page #messagesModal .portal-chat-head{\n    position:relative!important;\n    inset:auto!important;\n    flex:0 0 58px!important;\n    height:58px!important;\n    min-height:58px!important;\n    max-height:58px!important;\n    transform:none!important;\n    z-index:50!important;\n  }\n  body.portal-page #messagesModal .portal-thread-call-banner,\n  body.portal-page #messagesModal .portal-pinned-strip{\n    flex:0 0 auto!important;\n  }\n  /* This is the only element that scrolls inside an open mobile chat. height:0 is\n     intentional: with flex:1 it forces a bounded scrollport instead of expanding\n     with all messages. */\n  body.portal-page #messagesModal .portal-chat-messages{\n    display:block!important;\n    position:relative!important;\n    flex:1 1 0!important;\n    height:0!important;\n    min-height:0!important;\n    max-height:none!important;\n    overflow-y:auto!important;\n    overflow-x:hidden!important;\n    -webkit-overflow-scrolling:touch!important;\n    touch-action:pan-y!important;\n    overscroll-behavior-y:contain!important;\n    scroll-behavior:auto!important;\n    z-index:1!important;\n  }\n  body.portal-page #messagesModal .portal-messenger-compose{\n    position:relative!important;\n    inset:auto!important;\n    flex:0 0 auto!important;\n    margin:0!important;\n    transform:none!important;\n    z-index:50!important;\n  }\n}\n
/* v162: no layout changes. Latest-message anchoring is handled in account-v162.js only. */


/* v164 — persistent mobile keyboard, internal messenger Back navigation, compact search. */
.portal-messenger-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 8px}.portal-messenger-title-row h2{margin:2px 0 0}.portal-messenger-search-toggle{width:42px;height:42px;min-width:42px;border-radius:50%;border:1px solid rgba(211,174,66,.45);background:rgba(5,61,46,.72);display:grid;place-items:center;color:#e2bb55;cursor:pointer}.portal-messenger-search-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.portal-messenger-search-toggle.active{background:linear-gradient(145deg,#efc75f,#c99527);color:#073a2d}.portal-messenger-search-collapsible[hidden]{display:none!important}.portal-messenger-search-collapsible{margin:0 2px 8px!important}
@media(max-width:720px){
  #messagesModal .portal-messenger-sidebar>.portal-kicker,#messagesModal .portal-messenger-sidebar>h2{display:none!important}
  #messagesModal .portal-messenger-title-row{flex:0 0 auto;margin:0 2px 7px!important;align-items:flex-end}
  #messagesModal .portal-messenger-title-row .portal-kicker{display:block!important}
  #messagesModal .portal-messenger-title-row h2{font-size:34px!important;line-height:1!important}
  #messagesModal .portal-messenger-search-toggle{width:40px!important;height:40px!important;min-width:40px!important;margin-bottom:1px}
  #messagesModal .portal-messenger-search-collapsible{order:4;flex:0 0 auto!important;margin:0 2px 7px!important}
  #messagesModal .portal-messenger-list{order:5;min-height:0!important;overflow-y:auto!important}
}

/* v164 — Telegram-like messenger actions, voice transcription, video focus. */
.portal-messenger-sidebar{position:relative}
.portal-messenger-title-row{position:relative;padding-right:54px}
.portal-messenger-search-toggle{position:absolute!important;right:0;top:50%;transform:translateY(-50%);margin:0!important}
.portal-messenger-create-fab{position:absolute;right:18px;bottom:18px;width:58px;height:58px;border-radius:50%;border:1px solid rgba(246,214,103,.65);background:linear-gradient(145deg,#efc75f,#c99125);color:#073a2d;font-size:36px;line-height:1;display:grid;place-items:center;box-shadow:0 12px 32px rgba(0,0,0,.3);cursor:pointer;z-index:20}
.portal-create-menu{width:min(460px,calc(100vw - 28px));display:grid;gap:10px}.portal-create-menu h3{margin:0 0 6px}.portal-create-action{width:100%;display:flex;align-items:center;gap:14px;text-align:left;border:1px solid rgba(235,201,91,.22);background:rgba(255,255,255,.035);color:#fff;border-radius:18px;padding:14px 16px;cursor:pointer}.portal-create-action:hover{background:rgba(235,201,91,.08)}.portal-create-action>span:last-child{display:grid;gap:3px}.portal-create-action b{font-size:15px;color:#f2e3a7}.portal-create-action small{font-size:12px;color:rgba(255,255,255,.62)}.portal-create-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#efc75f,#c99125);color:#073a2d;font-size:20px;font-weight:800;flex:0 0 auto}
.portal-group-members-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.portal-voice-message{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 8px}.portal-voice-message audio{grid-column:1}.portal-voice-message>span{grid-column:1;font-size:11px}.portal-voice-transcribe{grid-column:2;grid-row:1/3;width:38px;height:38px;border-radius:12px;border:0;background:rgba(223,188,81,.18);color:#e6c45d;font-weight:900;font-size:18px;cursor:pointer}.portal-voice-transcribe.loading{opacity:.6}.portal-voice-transcript{grid-column:1/-1;border-left:3px solid #d7b64c;padding:8px 10px;margin-top:3px;border-radius:0 10px 10px 0;background:rgba(255,255,255,.04);font-size:13px;line-height:1.45;color:#edf4ef}.portal-voice-transcript[hidden]{display:none!important}
.portal-video-grid.single-remote{display:block!important;position:relative!important;width:100%!important;height:100%!important}.portal-video-grid.single-remote .portal-video-tile{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;border-radius:0!important}.portal-video-grid.single-remote .portal-video-tile.local-self{width:112px!important;height:154px!important;min-height:0!important;inset:auto 14px 14px auto!important;border-radius:16px!important;z-index:6!important;box-shadow:0 8px 26px rgba(0,0,0,.42)}.portal-video-grid.single-remote .portal-video-tile.local-self .portal-video-name{font-size:10px}.portal-video-grid.single-remote .portal-video-tile video{object-fit:cover!important}
.portal-video-grid.multi-party .portal-video-tile.speaking{grid-column:span 2;min-height:250px}.portal-video-tile.focused{grid-column:1/-1!important;min-height:340px!important;order:-1}.portal-video-tile{cursor:pointer}
@media(max-width:720px){
  #messagesModal .portal-messenger-title-row{padding-right:52px!important}
  #messagesModal .portal-messenger-search-toggle{right:0!important;top:50%!important;transform:translateY(-50%)!important}
  #messagesModal .portal-messenger-create-fab{position:fixed;right:18px;bottom:22px;width:58px;height:58px;z-index:75}
  .portal-create-menu-overlay{align-items:flex-end!important}.portal-create-menu{width:100vw!important;max-width:none!important;border-radius:24px 24px 0 0!important;margin:auto 0 0!important;padding:24px 18px calc(22px + env(safe-area-inset-bottom))!important}
  .portal-call-dialog.video-active,.portal-video-room-dialog{padding:0!important;justify-content:flex-end!important;background:#03271e!important}
  .portal-call-dialog.video-active .portal-call-video-stage{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;margin:0!important;border-radius:0!important;overflow:hidden!important}
  .portal-call-dialog.video-active .portal-call-avatar,.portal-call-dialog.video-active>h2,.portal-call-dialog.video-active>#callStatus,.portal-call-dialog.video-active>#callTimer{position:relative;z-index:8}
  .portal-call-dialog.video-active .portal-call-active{position:relative;z-index:10;background:linear-gradient(180deg,transparent,rgba(0,25,19,.88));padding:26px 8px calc(16px + env(safe-area-inset-bottom))!important;margin:0!important}
  .portal-video-room-dialog .portal-video-grid{flex:1 1 auto!important;width:100%!important;min-height:0!important;margin:0!important}
  .portal-video-grid.multi-party .portal-video-tile.speaking{grid-column:span 2!important;min-height:210px!important}
}

#messagesModal .portal-messenger-shell.chat-open .portal-messenger-create-fab{display:none!important}


/* v165 — focused call-layer and compact messenger controls. */
.portal-messenger-create-tools{display:none!important}
.portal-messenger-create-fab{font-size:46px!important;font-weight:500!important;line-height:.82!important;padding:0 0 5px!important}
.portal-voice-message{gap:4px 5px!important}
.portal-voice-transcribe{width:28px!important;height:28px!important;min-width:28px!important;max-width:28px!important;padding:0!important;border-radius:8px!important;font-size:14px!important;line-height:28px!important;display:grid!important;place-items:center!important;align-self:center!important}
#callInviteModal.portal-over-call,#callInviteModal{z-index:14050!important;background:rgba(1,20,14,.90)!important;backdrop-filter:blur(14px)!important}
#callInviteModal .portal-call-invite-dialog{position:relative!important;z-index:14060!important}
#callModal{z-index:12000!important}
#callModal .portal-direct-call-dialog{position:relative!important;isolation:isolate!important}
#callModal .portal-call-video-stage{z-index:1!important}
#callModal .portal-call-avatar,#callModal #callTitle,#callModal #callStatus,#callModal #callTimer{position:relative!important;z-index:20!important}
#callModal .portal-call-active{position:relative!important;z-index:200!important;pointer-events:auto!important}
#callModal .portal-call-active .portal-call-round{position:relative!important;z-index:210!important;pointer-events:auto!important;touch-action:manipulation!important}
#callModal .portal-call-active .portal-call-round svg,#callModal .portal-call-active .portal-call-round span{pointer-events:none!important}
#callModal .portal-call-video-stage{pointer-events:none!important}
#callModal .portal-direct-video-grid.multi-party{pointer-events:auto!important}
#callModal .portal-direct-video-grid.multi-party .portal-video-tile{pointer-events:auto!important}
#callCamera.busy{opacity:.66!important;pointer-events:none!important}
@media(max-width:720px){
  #callInviteModal{inset:0!important;top:0!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;padding:10px!important;place-items:start center!important}
  #callInviteModal .portal-call-invite-dialog{width:100%!important;max-width:none!important;max-height:calc(100dvh - 20px)!important;overflow-y:auto!important;margin:0!important}
  .portal-voice-transcribe{width:26px!important;height:26px!important;min-width:26px!important;max-width:26px!important;border-radius:7px!important;font-size:13px!important;line-height:26px!important}
  #messagesModal .portal-messenger-create-fab{font-size:48px!important;padding-bottom:6px!important}
}


/* v166 — compact group controls, persistent messenger, human voice, fullscreen calls. */
.portal-group-member-fab{position:absolute;right:18px;bottom:82px;width:54px;height:54px;border-radius:50%;border:1px solid rgba(246,214,103,.62);background:linear-gradient(145deg,#efc75f,#c99125);color:#073a2d;display:grid;place-items:center;box-shadow:0 12px 30px rgba(0,0,0,.32);cursor:pointer;z-index:48}
.portal-group-member-fab[hidden]{display:none!important}.portal-group-member-fab svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
#messagesModal .portal-messenger-create-fab[hidden]{display:none!important}
#messagesModal .portal-chat-folder-btn[hidden],#messagesModal .portal-group-info-btn[hidden]{display:none!important}

/* Voice bubbles are intentionally compact: custom controls instead of the large native audio UI. */
.portal-chat-bubble:has(.portal-voice-message){max-width:min(310px,82vw)!important;padding:7px 26px 5px 9px!important}
.portal-voice-message{display:grid!important;grid-template-columns:minmax(0,1fr) 22px!important;gap:4px 5px!important;min-width:0!important;width:100%!important;padding:0!important}
.portal-voice-player{grid-column:1;display:grid;grid-template-columns:30px minmax(78px,1fr) 34px;align-items:center;gap:5px;min-width:0;height:30px}
.portal-voice-player audio{display:none!important}.portal-voice-play{width:30px;height:30px;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#173d2e;display:grid;place-items:center;padding:0;font-size:12px;cursor:pointer}
.portal-voice-progress{width:100%;min-width:78px;height:16px;margin:0;accent-color:#d8b750}.portal-voice-time{font-size:10px!important;color:rgba(255,255,255,.72)!important;text-align:right;white-space:nowrap}
.portal-voice-transcribe{grid-column:2!important;grid-row:1!important;width:22px!important;height:22px!important;min-width:22px!important;max-width:22px!important;border-radius:6px!important;font-size:11px!important;line-height:22px!important;align-self:center!important}
.portal-voice-transcript{grid-column:1/-1!important;padding:6px 8px!important;margin-top:2px!important;font-size:12px!important;line-height:1.35!important}

/* One-to-one video is a true full-screen canvas. */
#callModal .portal-direct-call-dialog.video-active{position:relative!important;width:100vw!important;max-width:none!important;height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:#111!important;overflow:hidden!important;justify-content:initial!important}
#callModal .portal-direct-call-dialog.video-active .portal-call-video-stage{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;margin:0!important;overflow:hidden!important;z-index:1!important}
#callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:block!important}
#callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.single-remote .portal-video-tile:not(.local-self),#callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.local-only .portal-video-tile.local-self{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;z-index:1!important}
#callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.single-remote .portal-video-tile.local-self{position:absolute!important;inset:auto 14px 92px auto!important;width:118px!important;height:164px!important;min-height:0!important;border-radius:16px!important;z-index:8!important;box-shadow:0 8px 30px rgba(0,0,0,.48)!important;transition:bottom .22s ease,opacity .22s ease}
#callModal .portal-direct-call-dialog.video-active .portal-video-tile video{width:100%!important;height:100%!important;object-fit:cover!important}
#callModal .portal-direct-call-dialog.video-active .portal-video-name{bottom:8px!important;left:8px!important;right:8px!important;padding:4px 7px!important;font-size:10px!important;background:rgba(0,0,0,.48)!important}
#callModal .portal-direct-call-dialog.video-active>#callTitle,#callModal .portal-direct-call-dialog.video-active>#callStatus,#callModal .portal-direct-call-dialog.video-active>#callTimer{position:absolute!important;left:14px!important;right:14px!important;z-index:220!important;text-align:center!important;color:#fff!important;text-shadow:0 2px 8px rgba(0,0,0,.75)!important;transition:opacity .2s ease!important}
#callModal .portal-direct-call-dialog.video-active>#callTitle{top:20px!important;margin:0!important;font-size:18px!important}#callModal .portal-direct-call-dialog.video-active>#callStatus{top:48px!important;margin:0!important;font-size:12px!important}#callModal .portal-direct-call-dialog.video-active>#callTimer{top:69px!important;margin:0!important;font-size:14px!important}
#callModal .portal-direct-call-dialog.video-active .portal-call-active{position:absolute!important;left:8px!important;right:8px!important;bottom:16px!important;z-index:230!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;gap:7px!important;transition:opacity .2s ease,transform .2s ease!important}
#callModal .portal-direct-call-dialog.video-active .portal-call-active[hidden]{display:none!important}
#callModal .portal-direct-call-dialog.video-active .portal-call-round{width:49px!important;min-width:49px!important;max-width:49px!important;padding:0!important;gap:3px!important}
#callModal .portal-direct-call-dialog.video-active .portal-call-round svg{width:45px!important;height:45px!important;padding:11px!important;background:rgba(28,44,39,.78)!important;backdrop-filter:blur(7px)!important}
#callModal .portal-direct-call-dialog.video-active .portal-call-round.decline svg{background:#e74f4f!important}#callModal .portal-direct-call-dialog.video-active .portal-call-round span{font-size:8px!important;color:#fff!important;white-space:nowrap}
#callModal .portal-direct-call-dialog.video-active.controls-hidden>#callTitle,#callModal .portal-direct-call-dialog.video-active.controls-hidden>#callStatus,#callModal .portal-direct-call-dialog.video-active.controls-hidden>#callTimer,#callModal .portal-direct-call-dialog.video-active.controls-hidden .portal-call-active{opacity:0!important;pointer-events:none!important;transform:translateY(8px)!important}
#callModal .portal-direct-call-dialog.video-active.controls-hidden .portal-direct-video-grid.single-remote .portal-video-tile.local-self{bottom:16px!important}

@media(max-width:720px){
  .portal-group-member-fab{position:absolute!important;right:15px!important;bottom:72px!important;width:52px!important;height:52px!important;z-index:55!important}
  .portal-chat-bubble:has(.portal-voice-message){max-width:min(270px,84vw)!important;padding:6px 24px 4px 8px!important}.portal-voice-player{grid-template-columns:28px minmax(70px,1fr) 31px;height:28px}.portal-voice-play{width:28px;height:28px}.portal-voice-transcribe{width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important;font-size:10px!important;line-height:20px!important;border-radius:5px!important}
  #callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.single-remote .portal-video-tile.local-self{width:104px!important;height:144px!important;right:12px!important;bottom:86px!important}
  #callModal .portal-direct-call-dialog.video-active .portal-call-active{bottom:12px!important;gap:5px!important;overflow-x:auto!important;justify-content:flex-start!important;padding:0 7px!important;scrollbar-width:none!important}#callModal .portal-direct-call-dialog.video-active .portal-call-active::-webkit-scrollbar{display:none}
  #callModal .portal-direct-call-dialog.video-active .portal-call-round{width:48px!important;min-width:48px!important;max-width:48px!important;flex:0 0 48px!important}#callModal .portal-direct-call-dialog.video-active .portal-call-round svg{width:44px!important;height:44px!important;padding:11px!important}#callModal .portal-direct-call-dialog.video-active .portal-call-round span{display:none!important}
}

/* v168 — group quick-add, group profile, folder FAB, white compact message cards. */
/* User folders use the same floating create button as Personal; the old wide add bar is gone. */
#messagesModal .portal-folder-action{display:none!important}
#messagesModal .portal-messenger-create-fab{display:grid!important}
#messagesModal .portal-messenger-shell.chat-open .portal-messenger-create-fab{display:none!important}

/* Group/channel header is the entry point to its profile. */
#messagesModal .portal-chat-person:has(+ .portal-chat-folder-btn[hidden]){cursor:pointer}
#messagesModal #messengerPartnerName,#messagesModal #messengerAvatar{cursor:pointer}
.portal-group-info-hero{display:flex;align-items:center;gap:12px;margin:2px 0 14px}.portal-group-info-avatar{width:64px;height:64px;min-width:64px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#e6bd55,#b88521);color:#0a3b2d;font-size:25px;font-weight:900}.portal-group-info-heading{min-width:0;flex:1}.portal-group-info-heading h3{margin:0 0 3px}.portal-group-info-heading small{color:#91a99f}.portal-group-info-section-title{margin:14px 0 7px;color:#d8bc68;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.portal-group-info-add{width:100%;min-height:40px;border:1px solid rgba(227,191,82,.35);border-radius:13px;background:rgba(227,191,82,.09);color:#e7c968;font-weight:800;cursor:pointer}.portal-group-quick-add{width:min(520px,calc(100vw - 22px))}.portal-group-quick-add h3{margin-bottom:12px}.portal-group-quick-search{display:block}.portal-group-quick-search input{width:100%;height:46px;border-radius:13px}.portal-group-search-add-row{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:9px!important;cursor:default!important}.portal-group-add-user-btn{min-height:32px!important;padding:0 12px!important;border:0!important;border-radius:10px!important;background:linear-gradient(145deg,#e6bd55,#b88521)!important;color:#08372b!important;font-weight:900!important;cursor:pointer!important}

/* White Telegram-like cards: clear text, quiet delivered tick, dark-green read tick. */
#messagesModal .portal-chat-bubble,#messagesModal .portal-chat-row.mine .portal-chat-bubble{background:#fff!important;color:#141414!important;border-color:rgba(0,0,0,.09)!important;box-shadow:0 2px 8px rgba(0,0,0,.10)!important}
#messagesModal .portal-chat-bubble .portal-message-text,#messagesModal .portal-chat-bubble .portal-forwarded-label,#messagesModal .portal-chat-bubble .portal-reply-quote span{color:#141414!important}
#messagesModal .portal-chat-bubble small{color:#777!important}#messagesModal .portal-message-ticks.delivered{color:#a0a0a0!important;font-weight:700!important}#messagesModal .portal-message-ticks.read{color:#155c42!important;font-weight:1000!important;letter-spacing:-1px!important}
#messagesModal .portal-message-menu{color:#555!important}.portal-group-message-sender{color:#155c42!important}.portal-reply-quote{background:#f2f5f3!important;color:#163d30!important}.portal-forwarded-label{color:#4f6d61!important}

/* Voice card: narrower still; transcript is white/black and closed by default on re-entry. */
#messagesModal .portal-chat-bubble:has(.portal-voice-message){max-width:min(248px,72vw)!important;padding:5px 22px 4px 7px!important}
#messagesModal .portal-voice-message{grid-template-columns:minmax(0,1fr) 18px!important;gap:3px 4px!important}
#messagesModal .portal-voice-player{grid-template-columns:27px minmax(58px,1fr) 29px!important;height:27px!important;gap:4px!important}
#messagesModal .portal-voice-play{width:27px!important;height:27px!important;font-size:11px!important;background:#f6f7f6!important;color:#153d2f!important}
#messagesModal .portal-voice-progress{min-width:58px!important;height:13px!important;accent-color:#cda63e!important}
#messagesModal .portal-voice-time{font-size:9px!important;color:#626262!important}
#messagesModal .portal-voice-transcribe{width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;border-radius:5px!important;background:#f0f1ef!important;color:#111!important;font-size:9px!important;line-height:18px!important;font-weight:900!important}
#messagesModal .portal-voice-transcript{grid-column:1/-1!important;background:#f4f6f4!important;color:#111!important;border-left:3px solid #1d684c!important;padding:5px 7px!important;margin-top:2px!important;border-radius:0 8px 8px 0!important;font-size:11.5px!important;line-height:1.34!important}
#messagesModal .portal-voice-transcript[hidden]{display:none!important}

@media(max-width:720px){
  #groupQuickAddModal{inset:0!important;top:0!important;width:100vw!important;height:100dvh!important;padding:10px!important;place-items:start center!important}
  #groupQuickAddModal .portal-group-quick-add{width:100%!important;max-width:none!important;margin:0!important;max-height:calc(100dvh - 20px)!important;overflow-y:auto!important}
  #messagesModal .portal-chat-bubble:has(.portal-voice-message){max-width:min(232px,72vw)!important;padding:5px 21px 4px 7px!important}
  #messagesModal .portal-voice-player{grid-template-columns:26px minmax(54px,1fr) 28px!important;height:26px!important}
  #messagesModal .portal-voice-play{width:26px!important;height:26px!important}
  #messagesModal .portal-voice-transcribe{width:17px!important;height:17px!important;min-width:17px!important;max-width:17px!important;font-size:8.5px!important;line-height:17px!important}
}


/* v168 — live dictation follow, messenger settings, scalable type, readable message actions, warmer voice UI. */
#messagesModal .portal-messenger-title-row{padding-right:102px!important}
#messagesModal .portal-messenger-title-actions{position:absolute;right:0;top:50%;transform:translateY(-50%);display:flex;gap:7px;align-items:center}
#messagesModal .portal-messenger-search-toggle{position:static!important;transform:none!important;margin:0!important}
#messagesModal .portal-messenger-settings-toggle{width:42px;height:42px;min-width:42px;border-radius:50%;border:1px solid rgba(211,174,66,.45);background:rgba(5,61,46,.72);display:grid;place-items:center;color:#e2bb55;cursor:pointer;padding:0}
#messagesModal .portal-messenger-settings-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.portal-messenger-settings-dialog{width:min(460px,calc(100vw - 24px));padding:22px}.portal-messenger-settings-dialog h3{margin:0 0 16px;color:#f2db8a}.portal-messenger-setting-block{display:grid;gap:9px;padding:13px 0;border-bottom:1px solid rgba(244,216,117,.12)}.portal-messenger-setting-block>b,.portal-messenger-setting-block label b{color:#f0dc94}.portal-messenger-setting-block small,.portal-messenger-setting-block label small{display:block;margin-top:3px;color:#9db2aa;font-size:11px}.portal-messenger-setting-block select{width:100%;height:42px;border-radius:11px;border:1px solid rgba(244,216,117,.18);background:#0a3b2e;color:#fff;padding:0 10px}.portal-font-size-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.portal-font-size-picker button{min-height:38px;border-radius:10px;border:1px solid rgba(244,216,117,.18);background:rgba(255,255,255,.035);color:#d8cfaa;cursor:pointer}.portal-font-size-picker button.active{background:linear-gradient(180deg,#e5c56d,#b98a36);color:#143b2d;border-color:transparent;font-weight:900}.portal-messenger-setting-status{min-height:18px;padding-top:9px;color:#d9c47c;font-size:11px}
#messagesModal .portal-chat-folder-btn{display:none!important}
#messagesModal .portal-message-text{font-weight:600!important;letter-spacing:.002em}
#messagesModal .portal-chat-bubble{font-weight:500!important}
#messagesModal .portal-message-actionbar{position:absolute!important;z-index:24!important;top:29px!important;right:7px!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:2px!important;width:158px!important;margin:0!important;padding:6px!important;border:1px solid rgba(0,0,0,.10)!important;border-radius:12px!important;background:#fff!important;box-shadow:0 10px 28px rgba(0,0,0,.22)!important}
#messagesModal .portal-message-actionbar[hidden]{display:none!important}
#messagesModal .portal-message-actionbar button{display:flex!important;width:100%!important;height:34px!important;min-width:0!important;justify-content:flex-start!important;gap:9px!important;padding:0 9px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#171717!important;font-size:12px!important;font-weight:700!important}
#messagesModal .portal-message-actionbar button:hover{background:#f1f3f1!important}
#messagesModal .portal-message-actionbar button svg{width:16px!important;height:16px!important;color:#171717!important;stroke:#171717!important}
#messagesModal .portal-message-actionbar button span{display:inline!important;color:#171717!important}
#messagesModal .portal-message-delete-action{color:#8e2d2d!important}
#messagesModal .portal-message-delete-action svg,#messagesModal .portal-message-delete-action span{stroke:#8e2d2d!important;color:#8e2d2d!important}
#messagesModal .portal-chat-bubble:has(.portal-voice-message){overflow:visible!important}

/* Standard / medium / maximum messenger text size. */
#messagesModal.messenger-font-medium .portal-chat-bubble{font-size:15.5px!important;line-height:1.46!important}
#messagesModal.messenger-font-medium .portal-message-text{font-size:15.5px!important}
#messagesModal.messenger-font-medium .portal-contact-copy b{font-size:16px!important}
#messagesModal.messenger-font-medium .portal-contact-copy small{font-size:12px!important}
#messagesModal.messenger-font-medium .portal-folder-tabs button{font-size:13px!important}
#messagesModal.messenger-font-medium .portal-chat-person b{font-size:16px!important}
#messagesModal.messenger-font-medium .portal-chat-person small{font-size:12px!important}
#messagesModal.messenger-font-medium .portal-group-message-sender{font-size:11px!important}
#messagesModal.messenger-font-medium .portal-chat-bubble small{font-size:10px!important}
#messagesModal.messenger-font-medium .portal-voice-time{font-size:10px!important}
#messagesModal.messenger-font-medium .portal-voice-transcript{font-size:12.5px!important}
#messagesModal.messenger-font-large .portal-chat-bubble{font-size:17.5px!important;line-height:1.5!important}
#messagesModal.messenger-font-large .portal-message-text{font-size:17.5px!important}
#messagesModal.messenger-font-large .portal-contact-copy b{font-size:18px!important}
#messagesModal.messenger-font-large .portal-contact-copy small{font-size:13px!important}
#messagesModal.messenger-font-large .portal-folder-tabs button{font-size:14.5px!important;padding:8px 13px!important}
#messagesModal.messenger-font-large .portal-chat-person b{font-size:18px!important}
#messagesModal.messenger-font-large .portal-chat-person small{font-size:13px!important}
#messagesModal.messenger-font-large .portal-group-message-sender{font-size:12px!important}
#messagesModal.messenger-font-large .portal-chat-bubble small{font-size:11px!important}
#messagesModal.messenger-font-large .portal-voice-time{font-size:11px!important}
#messagesModal.messenger-font-large .portal-voice-transcript{font-size:14px!important;line-height:1.42!important}
@media(max-width:720px){
 #messagesModal .portal-messenger-title-row{padding-right:96px!important}
 #messagesModal .portal-messenger-title-actions{gap:6px}
 #messagesModal .portal-messenger-settings-toggle,#messagesModal .portal-messenger-search-toggle{width:40px!important;height:40px!important;min-width:40px!important}
 #messagesModal .portal-message-actionbar{width:154px!important;top:28px!important;right:5px!important}
 #messagesModal .portal-message-actionbar button{height:35px!important;font-size:12px!important}
 #messagesModal.messenger-font-large .portal-chat-bubble{max-width:94%!important}
}


/* v169 — desktop round dictation, public profiles, silhouettes and messenger themes. */
#messagesModal .portal-message-input-wrap{position:relative!important}
#messagesModal .portal-messenger-compose .portal-message-input-wrap>#messengerDictation{position:absolute!important;right:5px!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important;flex:0 0 32px!important;aspect-ratio:1/1!important;padding:0!important;border-radius:50%!important;display:grid!important;place-items:center!important;line-height:1!important}
#messagesModal .portal-messenger-compose .portal-message-input-wrap>#messengerDictation svg{width:18px!important;height:18px!important}
.portal-avatar-fallback,.portal-group-avatar-fallback{display:grid!important;place-items:center!important;width:100%;height:100%}.portal-avatar-silhouette{width:68%!important;height:68%!important;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;opacity:.9}.portal-avatar-silhouette.female .hair{fill:currentColor;stroke:none;opacity:.22}.portal-avatar-silhouette.group{width:72%!important;height:72%!important}.portal-avatar-photo>.portal-avatar-fallback{position:absolute;inset:0}.portal-avatar-photo{position:relative!important;overflow:hidden}.portal-avatar-photo>img{position:relative;z-index:2}.portal-contact-avatar{color:#d7bb62}.portal-group-avatar-fallback{color:#d7bb62}
.portal-group-message-author{display:flex;align-items:center;gap:6px;border:0;background:transparent;padding:0;margin:0 0 4px;color:#155c42;cursor:pointer;font-weight:800;font-size:10px}.portal-group-message-author .portal-contact-avatar{width:24px!important;height:24px!important;min-width:24px!important}.portal-group-message-author span:last-child{text-align:left}.portal-group-member-profile{display:flex;align-items:center;gap:9px;min-width:0;flex:1;border:0;background:transparent;color:inherit;padding:0;cursor:pointer;text-align:left}.portal-group-member-profile .portal-group-member-copy{min-width:0;flex:1}
.portal-public-profile-dialog{width:min(560px,calc(100vw - 24px));padding:24px}.portal-public-profile-hero{display:flex;align-items:center;gap:15px}.portal-public-profile-avatar{width:84px!important;height:84px!important;min-width:84px!important}.portal-public-profile-hero h3{margin:0 0 5px;color:#f2db8a;font-size:24px}.portal-public-profile-hero small{color:#9fb5ac}.portal-public-profile-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px}.portal-public-profile-meta>div{padding:10px 12px;border:1px solid rgba(244,216,117,.12);border-radius:12px;background:rgba(255,255,255,.03)}.portal-public-profile-meta small{display:block;color:#8fa99f;font-size:10px;text-transform:uppercase;letter-spacing:.06em}.portal-public-profile-meta b{display:block;margin-top:3px;color:#fff;font-size:13px}.portal-public-profile-about{margin:14px 0 0;padding:12px 14px;border-radius:12px;background:rgba(255,255,255,.035);color:#d9e4df;line-height:1.5}.portal-public-profile-photos{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-top:14px}.portal-public-profile-photo{aspect-ratio:1;border:0;border-radius:11px;overflow:hidden;padding:0;background:rgba(255,255,255,.04)}.portal-public-profile-photo img{width:100%;height:100%;object-fit:cover}
.portal-theme-picker{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.portal-theme-picker button{display:grid;gap:5px;justify-items:center;border:1px solid rgba(244,216,117,.16);border-radius:10px;background:rgba(255,255,255,.025);padding:7px 4px;color:#d8cfaa;font-size:9px;cursor:pointer}.portal-theme-picker button i{display:block;width:100%;height:28px;border-radius:7px;border:1px solid rgba(255,255,255,.15)}.portal-theme-picker button.active{outline:2px solid #d8b54c;color:#f3d77c;font-weight:900}.portal-theme-picker [data-theme="green"] i{background:#07523e}.portal-theme-picker [data-theme="white"] i{background:#eef2ef}.portal-theme-picker [data-theme="blue"] i{background:#164f76}.portal-theme-picker [data-theme="graphite"] i{background:#252c31}.portal-theme-picker [data-theme="sand"] i{background:#92784d}.portal-theme-picker [data-theme="wine"] i{background:#6b263b}.portal-theme-picker [data-theme="lavender"] i{background:#665c87}.portal-theme-picker [data-theme="ocean"] i{background:linear-gradient(135deg,#064a58,#1487a0)}.portal-theme-picker [data-theme="forest"] i{background:linear-gradient(135deg,#142f22,#315d3e)}.portal-theme-picker [data-theme="cream"] i{background:#e7dfca}.portal-theme-picker [data-theme="shield"] i{background:#103f32 url("shield.png") center/28px no-repeat}.portal-theme-picker [data-theme="geometry"] i{background:linear-gradient(135deg,#183f35 25%,#0d3029 25% 50%,#9a7c34 50% 52%,#164538 52%)}
#messagesModal.messenger-theme-green .portal-messenger-main{background:radial-gradient(circle at 30% 20%,rgba(215,170,71,.055),transparent 26%),linear-gradient(180deg,#0a4a38,#07392c)!important}
#messagesModal.messenger-theme-white .portal-messenger-main,#messagesModal.messenger-theme-white .portal-chat-messages{background:#e9eeeb!important}#messagesModal.messenger-theme-white .portal-chat-head,#messagesModal.messenger-theme-white .portal-messenger-compose{background:#f5f7f5!important;color:#173b2e!important}#messagesModal.messenger-theme-white .portal-chat-person b,#messagesModal.messenger-theme-white .portal-chat-person small{color:#173b2e!important}
#messagesModal.messenger-theme-blue .portal-messenger-main,#messagesModal.messenger-theme-blue .portal-chat-messages{background:linear-gradient(180deg,#164f76,#0b3551)!important}
#messagesModal.messenger-theme-graphite .portal-messenger-main,#messagesModal.messenger-theme-graphite .portal-chat-messages{background:linear-gradient(180deg,#30383d,#1e2529)!important}
#messagesModal.messenger-theme-sand .portal-messenger-main,#messagesModal.messenger-theme-sand .portal-chat-messages{background:linear-gradient(180deg,#8a734f,#65563d)!important}
#messagesModal.messenger-theme-wine .portal-messenger-main,#messagesModal.messenger-theme-wine .portal-chat-messages{background:linear-gradient(180deg,#6f2d44,#431c2a)!important}
#messagesModal.messenger-theme-lavender .portal-messenger-main,#messagesModal.messenger-theme-lavender .portal-chat-messages{background:linear-gradient(180deg,#62597f,#403a57)!important}
#messagesModal.messenger-theme-ocean .portal-messenger-main,#messagesModal.messenger-theme-ocean .portal-chat-messages{background:linear-gradient(160deg,#0b5360,#0d7283 45%,#063d49)!important}
#messagesModal.messenger-theme-forest .portal-messenger-main,#messagesModal.messenger-theme-forest .portal-chat-messages{background:linear-gradient(160deg,#1c3b29,#315d3e 48%,#102b1d)!important}
#messagesModal.messenger-theme-cream .portal-messenger-main,#messagesModal.messenger-theme-cream .portal-chat-messages{background:#ddd2b8!important}
#messagesModal.messenger-theme-shield .portal-chat-messages{background:linear-gradient(rgba(4,52,40,.86),rgba(4,52,40,.86)),url("shield.png") center/48% auto no-repeat!important}
#messagesModal.messenger-theme-geometry .portal-chat-messages{background-color:#143d33!important;background-image:linear-gradient(30deg,rgba(222,187,86,.08) 12%,transparent 12.5%,transparent 87%,rgba(222,187,86,.08) 87.5%),linear-gradient(150deg,rgba(222,187,86,.08) 12%,transparent 12.5%,transparent 87%,rgba(222,187,86,.08) 87.5%)!important;background-size:34px 58px!important}
@media(max-width:720px){.portal-public-profile-meta{grid-template-columns:1fr}.portal-public-profile-photos{grid-template-columns:repeat(3,1fr)}.portal-theme-picker{grid-template-columns:repeat(3,1fr)}#messagesModal .portal-messenger-compose .portal-message-input-wrap>#messengerDictation{width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important}}


/* v171 — independent per-tab UX, independent shield layer and clearer avatar silhouettes. */
.portal-avatar-silhouette{width:72%!important;height:72%!important;fill:currentColor!important;stroke:none!important;opacity:.96!important}.portal-avatar-silhouette.group{width:76%!important;height:76%!important}.portal-avatar-silhouette.female,.portal-avatar-silhouette.male{transform:translateY(1px)}
#messagesModal .portal-messenger-contact:not(.saved):not(.portal-contact-group) .portal-contact-avatar:not(.portal-avatar-photo){background:linear-gradient(145deg,#0c604a,#074433)!important;color:#e0bd58!important;border:1px solid rgba(224,189,88,.22)!important}
#messagesModal .portal-chat-head .portal-contact-avatar:not(.portal-avatar-photo){background:linear-gradient(145deg,#f0cf6a,#b8821f)!important;color:#07513d!important;border:1px solid rgba(255,239,175,.55)!important}
#messagesModal .portal-contact-group .portal-contact-avatar{background:linear-gradient(145deg,#174f3e,#0b392c)!important;color:#dcb956!important;border:1px solid rgba(220,185,86,.22)!important}
.portal-messenger-shield-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.portal-messenger-shield-row span{display:grid;gap:3px}.portal-messenger-shield-row small{color:#8fa99f}.portal-messenger-shield-row input{position:absolute;opacity:0;pointer-events:none}.portal-messenger-shield-row i{width:44px;height:24px;border-radius:999px;background:#344c43;position:relative;flex:0 0 auto;border:1px solid rgba(244,216,117,.15);transition:.2s}.portal-messenger-shield-row i::after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;left:2px;top:2px;background:#c8d1cd;transition:.2s}.portal-messenger-shield-row input:checked+i{background:#c99f3f}.portal-messenger-shield-row input:checked+i::after{left:22px;background:#0b3b2d}
#messagesModal .portal-chat-messages{position:relative}
#messagesModal.messenger-shield-enabled .portal-chat-messages::before{content:"";position:sticky;display:block;top:calc(50% - min(24vw,190px));left:50%;width:min(48vw,380px);height:min(48vw,380px);margin:0 auto calc(-1 * min(48vw,380px));transform:translateX(0);pointer-events:none;z-index:0;background:url("shield-pristine.png") center/contain no-repeat;opacity:.13;filter:saturate(.75) contrast(.95)}
#messagesModal.messenger-shield-enabled .portal-chat-messages>.portal-chat-row,#messagesModal.messenger-shield-enabled .portal-chat-messages>.portal-empty,#messagesModal.messenger-shield-enabled .portal-chat-messages>.portal-call-event{position:relative;z-index:1}
#messagesModal.messenger-theme-shield .portal-chat-messages{background:linear-gradient(180deg,#0b4a39,#07372b)!important}
.portal-theme-picker [data-theme="shield"] i{background:linear-gradient(135deg,#0d5140,#173d32)!important}
@media(max-width:720px){#messagesModal.messenger-shield-enabled .portal-chat-messages::before{width:min(76vw,330px);height:min(76vw,330px);margin-bottom:calc(-1 * min(76vw,330px));opacity:.12}}


/* v171 — centered messenger shield, clearer male/female avatars, full-row profile open, stronger favorites */
.portal-saved-avatar{color:#0a3b2d!important;text-shadow:0 0 0 #0a3b2d,0 0 8px rgba(255,246,191,.25)!important;border:1px solid rgba(10,59,45,.18)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)!important}
.portal-avatar-silhouette{width:74%!important;height:74%!important;fill:currentColor!important;stroke:none!important;opacity:1!important}.portal-avatar-silhouette.female{transform:translateY(1px) scale(1.02)!important}.portal-avatar-silhouette.male{transform:translateY(1px)!important}.portal-avatar-silhouette.group{width:78%!important;height:78%!important}
.portal-group-member-row[data-user-profile-row]{cursor:pointer}.portal-group-member-row[data-user-profile-row]:hover{background:rgba(255,255,255,.04)}.portal-group-member-row[data-user-profile-row]>.portal-contact-avatar{flex:0 0 auto}.portal-group-member-profile{padding:2px 0!important}.portal-group-member-profile .portal-group-member-copy{display:grid;gap:2px}
#messagesModal .portal-messenger-main{position:relative}#messagesModal.messenger-shield-enabled .portal-chat-messages::before{content:none!important}#messagesModal.messenger-shield-enabled .portal-messenger-main::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(34vw,320px);height:min(34vw,320px);pointer-events:none;z-index:0;background:url("shield-pristine.png") center/contain no-repeat;opacity:.125;filter:saturate(.78) contrast(.96)}#messagesModal .portal-chat-head,#messagesModal .portal-thread-call-banner,#messagesModal .portal-pinned-strip,#messagesModal .portal-chat-messages,#messagesModal .portal-messenger-compose{position:relative;z-index:1}@media(max-width:720px){#messagesModal.messenger-shield-enabled .portal-messenger-main::before{width:min(62vw,280px);height:min(62vw,280px);opacity:.115}}


/* v172 — custom messenger background, shield on every theme, cleaner group info and public profile layering */
#messagesModal.messenger-theme-green .portal-chat-messages,
#messagesModal.messenger-theme-white .portal-chat-messages,
#messagesModal.messenger-theme-blue .portal-chat-messages,
#messagesModal.messenger-theme-graphite .portal-chat-messages,
#messagesModal.messenger-theme-sand .portal-chat-messages,
#messagesModal.messenger-theme-wine .portal-chat-messages,
#messagesModal.messenger-theme-lavender .portal-chat-messages,
#messagesModal.messenger-theme-ocean .portal-chat-messages,
#messagesModal.messenger-theme-forest .portal-chat-messages,
#messagesModal.messenger-theme-cream .portal-chat-messages,
#messagesModal.messenger-theme-shield .portal-chat-messages,
#messagesModal.messenger-theme-geometry .portal-chat-messages{background:transparent!important}
#messagesModal.messenger-theme-shield .portal-messenger-main{background:linear-gradient(180deg,#0b4a39,#07372b)!important}
#messagesModal.messenger-theme-geometry .portal-messenger-main{background-color:#143d33!important;background-image:linear-gradient(30deg,rgba(222,187,86,.08) 12%,transparent 12.5%,transparent 87%,rgba(222,187,86,.08) 87.5%),linear-gradient(150deg,rgba(222,187,86,.08) 12%,transparent 12.5%,transparent 87%,rgba(222,187,86,.08) 87.5%)!important;background-size:34px 58px!important}
#messagesModal.messenger-has-custom-background .portal-messenger-main{background:linear-gradient(180deg,rgba(4,48,36,.28),rgba(4,48,36,.42)),var(--messenger-custom-bg) center/cover no-repeat!important}
#messagesModal.messenger-has-custom-background .portal-chat-head{background:rgba(4,43,32,.88)!important}
#messagesModal.messenger-has-custom-background .portal-messenger-compose{background:rgba(2,30,23,.82)!important}
#messagesModal.messenger-shield-enabled .portal-messenger-main::before{z-index:0!important;opacity:.15!important}
#messagesModal .portal-chat-messages{background:transparent!important}
#messagesModal .portal-chat-messages>*{position:relative;z-index:1}
.portal-messenger-custom-bg-tools{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.portal-messenger-custom-bg-tools button{border:1px solid rgba(244,216,117,.18);border-radius:10px;background:rgba(244,216,117,.06);color:#e8d07d;padding:8px 11px;cursor:pointer;font:700 12px/1 Arial,sans-serif}
.portal-messenger-custom-bg-tools button:hover{background:rgba(244,216,117,.12)}
.portal-messenger-custom-bg-note{margin-top:9px;color:#91aaa1;font-size:12px;line-height:1.45}
.portal-group-info-avatar.portal-group-avatar-fallback{width:64px!important;height:64px!important;min-width:64px!important;flex:0 0 64px!important}
.portal-group-info-dialog{overflow:hidden}
.portal-group-info-dialog .portal-group-invite{align-items:center}
.portal-group-info-dialog .portal-group-invite input{min-width:0}
.portal-group-member-row>.portal-contact-avatar{flex:0 0 auto}
.portal-group-member-row .portal-contact-avatar:not(.portal-avatar-photo){background:linear-gradient(145deg,#0c604a,#074433)!important;color:#e0bd58!important;border:1px solid rgba(224,189,88,.22)!important}
.portal-public-profile-about{display:grid;gap:10px}
.portal-public-profile-about div{padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.03)}
.portal-public-profile-about small{display:block;color:#8fa99f;font-size:10px;text-transform:uppercase;letter-spacing:.06em}
.portal-public-profile-about b{display:block;margin-top:4px;color:#fff;font-size:13px;line-height:1.5;font-weight:600}
@media(max-width:720px){.portal-messenger-custom-bg-tools button{width:100%;justify-content:center}}


/* v173 — desktop create FAB stays in the contact sidebar even while a thread is open */
@media (min-width:721px){
  #messagesModal .portal-messenger-sidebar{position:relative!important}
  #messagesModal .portal-messenger-create-fab{display:grid!important;position:absolute!important;right:18px!important;bottom:18px!important;left:auto!important;z-index:35!important}
  #messagesModal .portal-messenger-shell.chat-open .portal-messenger-create-fab{display:grid!important}
  #messagesModal .portal-messenger-list{padding-bottom:92px!important}
}


/* v174 — public profile photo lightbox */
.portal-public-profile-photo{cursor:zoom-in;transition:transform .18s ease,box-shadow .18s ease}
.portal-public-profile-photo:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 10px 24px rgba(0,0,0,.2)}
.portal-public-photo-viewer-overlay{background:rgba(0,14,10,.94)!important;backdrop-filter:blur(8px)}
.portal-public-photo-viewer{position:relative;width:100vw;height:100dvh;display:flex;align-items:center;justify-content:center;overflow:hidden;background:rgba(0,12,9,.88)}
.portal-public-photo-stage{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:58px 82px 72px;box-sizing:border-box}
.portal-public-photo-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.42);user-select:none;-webkit-user-drag:none}
.portal-public-photo-close{position:fixed;top:max(18px,env(safe-area-inset-top));right:22px;z-index:4;width:48px;height:48px;border-radius:50%;border:1px solid rgba(244,216,117,.35);background:rgba(3,42,31,.78);color:#f2db8a;font-size:30px;line-height:1;cursor:pointer}
.portal-public-photo-nav{position:fixed;top:50%;transform:translateY(-50%);z-index:4;width:58px;height:58px;border-radius:50%;border:1px solid rgba(244,216,117,.32);background:rgba(3,42,31,.76);color:#f2db8a;font-size:42px;line-height:.9;cursor:pointer;display:flex;align-items:center;justify-content:center}
.portal-public-photo-nav.prev{left:22px}.portal-public-photo-nav.next{right:22px}
.portal-public-photo-nav:hover,.portal-public-photo-close:hover{background:rgba(20,88,65,.92)}
.portal-public-photo-caption{position:fixed;left:50%;bottom:max(20px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:4;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 150px);padding:10px 16px;border-radius:999px;background:rgba(2,31,23,.78);border:1px solid rgba(244,216,117,.18);color:#fff;white-space:nowrap}
.portal-public-photo-caption b{overflow:hidden;text-overflow:ellipsis}.portal-public-photo-caption span{color:#e8d07d;font-variant-numeric:tabular-nums}
@media(max-width:720px){
  .portal-public-photo-stage{padding:58px 10px 76px}
  .portal-public-photo-stage img{max-width:100%;max-height:calc(100dvh - 128px);border-radius:8px}
  .portal-public-photo-nav{width:46px;height:46px;font-size:34px;top:auto;bottom:max(18px,env(safe-area-inset-bottom));transform:none;background:rgba(3,42,31,.82)}
  .portal-public-photo-nav.prev{left:18px}.portal-public-photo-nav.next{right:18px}
  .portal-public-photo-caption{bottom:max(22px,env(safe-area-inset-bottom));max-width:calc(100vw - 150px);font-size:13px;padding:8px 12px}
  .portal-public-photo-close{width:44px;height:44px;right:14px;top:max(12px,env(safe-area-inset-top));font-size:27px}
}


/* v175 — action menu is present and visible on every normal message, including groups/channels */
#messagesModal .portal-chat-row .portal-chat-bubble>.portal-message-menu{display:grid!important;place-items:center!important;z-index:26!important}
#messagesModal .portal-chat-row .portal-chat-bubble>.portal-message-actionbar{z-index:27!important}
#messagesModal .portal-group-message-author{padding-right:24px!important}


/* v176 FIXED — an opened message action menu must stay above following messages.
   Rows become stacking contexts when the messenger shield is enabled, so the active
   row itself is elevated while its menu is open. */
#messagesModal .portal-chat-row.action-menu-open{position:relative!important;z-index:90!important}
#messagesModal .portal-chat-row.action-menu-open .portal-chat-bubble{z-index:91!important}
#messagesModal .portal-chat-row.action-menu-open .portal-message-actionbar{z-index:92!important}

/* v176 call-link invitations — direct video can ring now or share a secure one-person link. */
.portal-call-link-dialog{width:min(520px,calc(100vw - 30px));padding:28px!important}
.portal-call-link-dialog h3{margin:4px 0 8px;color:#f1d778;font-size:26px;line-height:1.15}
.portal-call-link-dialog>p{margin:0 0 18px;color:#d9e6df;line-height:1.55}
.portal-call-link-choice{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}
.portal-call-link-primary,.portal-call-link-secondary,.portal-call-link-copy button,.portal-call-link-telegram,.portal-call-link-cancel{min-height:46px;border-radius:12px;border:1px solid rgba(232,196,87,.34);font-weight:800;cursor:pointer;transition:.18s ease}
.portal-call-link-primary,.portal-call-link-copy button,.portal-call-link-telegram{background:linear-gradient(145deg,#e9c860,#ba8d27);color:#173a2f}
.portal-call-link-secondary,.portal-call-link-cancel{background:rgba(232,196,87,.07);color:#f0d77e}
.portal-call-link-primary:hover,.portal-call-link-copy button:hover,.portal-call-link-telegram:hover{filter:saturate(.75) brightness(1.12)}
.portal-call-link-secondary:hover,.portal-call-link-cancel:hover{background:rgba(218,224,225,.15);border-color:rgba(218,224,225,.45);color:#eef2f3}
.portal-call-link-note{font-size:13px!important;color:#91aaa1!important;margin-bottom:0!important}
.portal-call-link-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin:14px 0 12px}
.portal-call-link-copy input{width:100%;min-width:0;border:1px solid rgba(232,196,87,.23);border-radius:11px;background:rgba(0,0,0,.16);color:#fff;padding:12px 13px;font-size:13px}
.portal-call-link-copy button{padding:0 17px}
.portal-call-link-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.portal-call-link-telegram,.portal-call-link-cancel{padding:0 14px}
.portal-call-link-expiry{display:block;margin-top:14px;color:#8fa99f;line-height:1.45}
.portal-call-link-dialog.waiting #videoCallLinkStatus::before{content:'●';display:inline-block;margin-right:8px;color:#e9c860;animation:portalCallInvitePulse 1.25s ease-in-out infinite}
@keyframes portalCallInvitePulse{50%{opacity:.3}}
@media(max-width:620px){.portal-call-link-choice,.portal-call-link-actions,.portal-call-link-copy{grid-template-columns:1fr}.portal-call-link-copy button{min-height:44px}.portal-call-link-dialog{padding:24px 18px!important}.portal-call-link-dialog h3{font-size:23px}}

/* v177 — presence + immediate/stable video call controls. */
#messagesModal .portal-messenger-contact.presence-online>.portal-contact-avatar{position:relative!important}
#messagesModal .portal-messenger-contact.presence-online>.portal-contact-avatar::after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;background:#ffd84d;border:2px solid #07382b;box-shadow:0 0 8px rgba(255,216,77,.95),0 0 16px rgba(255,216,77,.38);z-index:8}
#messagesModal .portal-chat-person small.presence-online{color:#f0cc58!important;text-shadow:0 0 8px rgba(240,204,88,.25)}

#callModal .portal-call-preview-stage{position:absolute;inset:0;width:100%;height:100%;z-index:1;background:#111;overflow:hidden}
#callModal .portal-call-preview-stage[hidden]{display:none!important}
#callModal .portal-call-preview-stage video{width:100%;height:100%;object-fit:cover;background:#111;transform:scaleX(-1)}
#callModal .portal-call-preview-stage>span{position:absolute;right:14px;bottom:92px;padding:5px 9px;border-radius:999px;background:rgba(0,0,0,.52);color:#f4d875;font-size:11px;font-weight:800;z-index:4}

/* Enabled microphone/camera/speaker are bright. Disabled controls stay dark and receive a slash in the SVG. */
#callModal .portal-call-round.mute svg,#callModal .portal-call-round.camera svg,#callModal .portal-call-round.speaker svg{background:rgba(28,44,39,.78)!important;stroke:#fff!important}
#callModal .portal-call-round.mute.active svg,#callModal .portal-call-round.camera.active svg,#callModal .portal-call-round.speaker.active svg{background:#d9b84e!important;stroke:#062f23!important;box-shadow:0 0 14px rgba(217,184,78,.28)}
#callModal .portal-call-round.busy svg{opacity:.72;filter:saturate(.7)}

.portal-call-link-actions{display:flex!important;flex-wrap:wrap;gap:8px!important;align-items:center}.portal-call-link-actions>button{flex:1 1 118px;min-height:42px}
@media(max-width:720px){#callModal .portal-call-preview-stage>span{bottom:76px;right:10px}.portal-call-link-actions>button{flex:1 1 calc(50% - 8px)}}

/* v177 FIX: exact presence, no-flicker contact switching, messenger isolation, waiting invite flow */
.portal-inline-notice{position:fixed;left:50%;bottom:max(22px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:22000;max-width:min(560px,calc(100vw - 28px));padding:11px 16px;border-radius:13px;background:#0a4636;color:#fff;border:1px solid rgba(237,205,100,.45);box-shadow:0 14px 40px rgba(0,0,0,.35);font:700 13px/1.35 Arial,sans-serif;text-align:center}.portal-inline-notice[data-tone="error"]{background:#55342e;border-color:rgba(244,174,147,.42)}.portal-inline-notice[hidden]{display:none!important}
.portal-call-link-actions .portal-call-link-continue{grid-column:1/-1;min-height:54px;background:linear-gradient(145deg,#efd266,#b98622)!important;color:#17372d!important}
#messagesModal{background:#032a21!important;isolation:isolate!important}
@media(max-width:720px){body.messenger-active{overflow:hidden!important;overscroll-behavior:none!important}body.messenger-active .portal-top,body.messenger-active .portal-card{visibility:hidden!important;pointer-events:none!important}body.messenger-active #messagesModal{visibility:visible!important;position:fixed!important;inset:0!important;top:0!important;left:0!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;background:#032a21!important;z-index:20000!important}body.messenger-active #messagesModal .portal-messenger-dialog{background:#073a2c!important}}

/* v178 — remove phantom yellow circles; keep only intentional online marker beside avatar. */
#messagesModal .portal-chat-unread[hidden]{display:none!important}
#messagesModal .portal-messenger-contact:not(.presence-online)>.portal-contact-avatar::after{content:none!important}

/* v178 FIXED — safe controls while waiting on a video-call invitation. */
#callModal .portal-direct-call-dialog.waiting-preview .portal-call-preview-stage>span{display:none!important}
#callModal .portal-direct-call-dialog.waiting-preview .portal-call-active{display:flex!important;opacity:1;pointer-events:auto}
#callModal .portal-direct-call-dialog.waiting-preview.controls-hidden .portal-call-active{opacity:0!important;pointer-events:none!important;transform:translateY(8px)!important}
#callModal .portal-direct-call-dialog.waiting-preview #callHangup{display:flex!important}


/* v180 — central account / WIN Notebook devices + referral bonuses */
.portal-referral-tier{display:flex;gap:18px;align-items:center;justify-content:space-between;margin:18px 0 0;padding:16px 18px;border:1px solid rgba(244,216,117,.22);border-radius:18px;background:linear-gradient(145deg,rgba(8,71,52,.48),rgba(3,44,33,.68))}.portal-referral-tier div{display:grid;gap:3px}.portal-referral-tier span{font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:#c9b469}.portal-referral-tier b{font:700 28px/1 Georgia,serif;color:#f4d875}.portal-referral-tier p{margin:0;color:#b9c9c2;line-height:1.45}.portal-referral-purchases{margin-top:24px;padding:22px;border:1px solid rgba(218,184,88,.34);border-radius:20px;background:rgba(3,43,32,.34)}.portal-ref-filter input[type=month]{background:#06392c;color:#f4f0df;border:1px solid rgba(218,184,88,.35);border-radius:12px;padding:12px}.portal-ref-purchase-summary{display:flex;gap:18px;align-items:center;flex-wrap:wrap;padding:12px 0 16px;color:#b9c9c2}.portal-ref-purchase-summary b{color:#f4d875}.portal-ref-purchase-head,.portal-ref-purchase-row{display:grid;grid-template-columns:.8fr 1fr 1.5fr .8fr .55fr .65fr;gap:12px;align-items:center}.portal-ref-purchase-head{padding:10px 12px;border-bottom:1px solid rgba(244,216,117,.18);color:rgba(244,216,117,.68);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.portal-ref-purchase-row{padding:14px 12px;border-bottom:1px solid rgba(244,216,117,.12);color:#edf2ee}.portal-ref-purchase-row small{color:#96aba2}.portal-ref-purchase-row b{color:#f4d875}.portal-app-access-note{display:grid;gap:5px;margin:12px 0 18px;padding:16px 18px;border:1px solid rgba(244,216,117,.18);border-radius:16px;background:rgba(4,52,39,.44)}.portal-app-access-note span{color:#aebfb8}.portal-device-list{display:grid;gap:10px}.portal-device-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 16px;border:1px solid rgba(244,216,117,.16);border-radius:16px;background:rgba(4,52,39,.4)}.portal-device-row div{display:grid;gap:4px}.portal-device-row small{color:#99afa6}.portal-device-row button{white-space:nowrap}.app-connect-page{min-height:100vh;background:#052d22}.app-connect-wrap{min-height:100vh;display:grid;place-items:center;padding:24px}.app-connect-card{width:min(620px,96vw);padding:34px;border:1px solid rgba(244,216,117,.36);border-radius:28px;background:linear-gradient(145deg,#07503d,#042f25);box-shadow:0 28px 80px rgba(0,0,0,.4);text-align:center}.app-connect-logo{width:84px;height:84px;object-fit:contain;margin:0 auto 16px}.app-connect-card h1{font:700 clamp(32px,6vw,52px)/1 Georgia,serif;color:#fff;margin:10px 0 16px}.app-connect-card p{color:#bacbc4;line-height:1.55}.app-connect-device{display:grid;gap:5px;margin:20px 0;padding:18px;border:1px solid rgba(244,216,117,.2);border-radius:18px;background:rgba(0,0,0,.12)}.app-connect-device b{color:#fff;font-size:19px}.app-connect-device span{color:#d8c677}.app-connect-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.app-connect-security{font-size:12px;margin-top:20px}
@media(max-width:800px){.portal-referral-tier{display:grid}.portal-ref-purchase-head{display:none}.portal-ref-purchase-row{grid-template-columns:1fr}.portal-device-row{grid-template-columns:1fr}.app-connect-actions{display:grid}.app-connect-actions>*{width:100%}}


/* v180 referral history — separate page */
.referral-history-page{min-height:100vh;background:#052d22 url('../assets/patina-texture.png') center/cover fixed;color:#f3f4ed}
.referral-history-shell{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:34px 0 60px}
.referral-history-top{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px;padding:18px 22px;border:1px solid rgba(218,184,88,.34);border-radius:24px;background:linear-gradient(145deg,rgba(7,71,54,.92),rgba(4,45,35,.96));box-shadow:0 20px 55px rgba(0,0,0,.20)}
.referral-history-brand{display:flex;align-items:center;gap:14px;text-decoration:none;color:#f2d67b}.referral-history-brand img{width:54px;height:54px;object-fit:contain}.referral-history-brand strong{display:block;font:700 25px/1 Georgia,serif}.referral-history-brand span span{display:block;margin-top:4px;font-size:10px;text-transform:uppercase;letter-spacing:.12em}
.referral-history-back{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border:1px solid rgba(218,184,88,.48);border-radius:14px;color:#f2d67b;text-decoration:none;font-weight:800;background:rgba(3,48,37,.72)}
.referral-history-card{padding:28px;border:1px solid rgba(218,184,88,.34);border-radius:26px;background:linear-gradient(145deg,rgba(7,75,56,.92),rgba(4,46,35,.96));box-shadow:0 22px 60px rgba(0,0,0,.25)}
.referral-history-head{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;margin-bottom:22px}.referral-history-head h1{margin:5px 0 8px;font:700 clamp(34px,5vw,56px)/1 Georgia,serif;color:#fff}.referral-history-head p{margin:0;color:#b8c9c2;line-height:1.5}.referral-history-filter{display:grid;gap:7px;min-width:220px}.referral-history-filter span{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#d8c16d}.referral-history-filter input{min-height:46px;padding:0 14px;border:1px solid rgba(218,184,88,.34);border-radius:14px;background:#06392c;color:#fff}
.referral-history-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.referral-history-summary article{padding:18px;border:1px solid rgba(218,184,88,.24);border-radius:18px;background:rgba(2,39,30,.42)}.referral-history-summary span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#9fb2aa}.referral-history-summary b{display:block;margin-top:8px;font:700 28px/1 Georgia,serif;color:#f3d676}
.referral-history-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}.referral-history-table-head,.referral-history-row{display:grid;grid-template-columns:.8fr 1fr 1.6fr .8fr .55fr .7fr;gap:12px;align-items:center}.referral-history-table-head{padding:12px 14px;border-bottom:1px solid rgba(244,216,117,.18);color:#d2bd6d;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.referral-history-row{padding:15px 14px;border-bottom:1px solid rgba(244,216,117,.11)}.referral-history-row span{color:#edf2ee}.referral-history-row small{color:#9fb2aa}.referral-history-row b{color:#f3d676}.referral-history-empty{padding:28px 14px;text-align:center;color:#9fb2aa;border:1px dashed rgba(218,184,88,.22);border-radius:16px;margin-top:10px}
@media(max-width:800px){.referral-history-shell{width:min(100% - 22px,1180px);padding-top:12px}.referral-history-top{padding:12px 14px;border-radius:18px}.referral-history-brand img{width:42px;height:42px}.referral-history-brand strong{font-size:18px}.referral-history-brand span span{display:none}.referral-history-back{padding:0 13px;min-height:40px;font-size:13px}.referral-history-card{padding:18px 14px;border-radius:20px}.referral-history-head{display:grid;align-items:start}.referral-history-filter{min-width:0;width:100%}.referral-history-summary{grid-template-columns:1fr}.referral-history-table-head{display:none}.referral-history-row{grid-template-columns:1fr;gap:5px;margin-bottom:10px;border:1px solid rgba(244,216,117,.14);border-radius:14px;background:rgba(2,39,30,.28)}.referral-history-row>*::before{display:inline-block;min-width:92px;margin-right:8px;color:#b8a85f;font-size:10px;font-weight:800;text-transform:uppercase}.referral-history-row>[data-col="date"]::before{content:'Дата'}.referral-history-row>[data-col="user"]::before{content:'Пользователь'}.referral-history-row>[data-col="purchase"]::before{content:'Покупка'}.referral-history-row>[data-col="sum"]::before{content:'Сумма'}.referral-history-row>[data-col="rate"]::before{content:'Ставка'}.referral-history-row>[data-col="bonus"]::before{content:'Бонусы'}}


/* v180 FIX 2026-10-06 — desktop portrait-video fit, permission recovery, audio output routing. */
.portal-permission-overlay{z-index:24000!important;background:rgba(0,18,13,.72)!important;backdrop-filter:blur(8px)}
.portal-permission-dialog{width:min(520px,calc(100vw - 28px));margin:auto;padding:28px 24px;border-radius:24px;border:1px solid rgba(232,199,96,.35);background:linear-gradient(180deg,#0a4938,#053126);box-shadow:0 28px 90px rgba(0,0,0,.5);color:#fff;text-align:left}
.portal-permission-dialog h3{margin:0 0 10px;color:#f1d574;font:800 24px/1.08 Arial,sans-serif}.portal-permission-dialog p{margin:0;color:#d8e4df;font:600 14px/1.55 Arial,sans-serif}.portal-permission-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.portal-permission-actions>button{flex:1 1 170px;min-height:46px}
#callModal .portal-call-round.audio-route svg{background:rgba(28,44,39,.78)!important;stroke:#fff!important}#callModal .portal-call-round.audio-route.active svg{background:#d9b84e!important;stroke:#062f23!important}
@media(min-width:721px){
  #callModal{padding:22px!important;align-items:center!important;justify-content:center!important}
  #callModal .portal-direct-call-dialog.video-active{width:min(980px,calc(100vw - 48px))!important;height:min(86dvh,820px)!important;min-height:520px!important;max-height:86dvh!important;margin:auto!important;border:1px solid rgba(232,199,96,.32)!important;border-radius:24px!important;background:#000!important;box-shadow:0 28px 90px rgba(0,0,0,.58)!important;overflow:hidden!important}
  #callModal .portal-direct-call-dialog.video-active .portal-call-video-stage,#callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid{border-radius:23px!important;background:#000!important}
  #callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.single-remote .portal-video-tile:not(.local-self){background:#000!important}
  #callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.single-remote .portal-video-tile:not(.local-self) video{object-fit:contain!important;background:#000!important}
  #callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.local-only .portal-video-tile.local-self video{object-fit:contain!important;background:#000!important}
  #callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.single-remote .portal-video-tile.local-self video{object-fit:cover!important}
}
@media(max-width:720px){.portal-permission-dialog{padding:22px 18px}.portal-permission-actions{display:grid;grid-template-columns:1fr}.portal-permission-actions>button{width:100%}}


/* v180 FIX 2026-10-06b — remote video keeps native aspect ratio; local media buttons never alter remote tracks. */
#callModal .portal-direct-video-grid.single-remote .portal-video-tile:not(.local-self){display:flex!important;align-items:center!important;justify-content:center!important;background:#000!important;overflow:hidden!important}
#callModal .portal-direct-video-grid.single-remote .portal-video-tile:not(.local-self)>video{position:relative!important;inset:auto!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center center!important;background:#000!important;transform:none!important}
#callModal .portal-direct-video-grid.multi-party .portal-video-tile:not(.local-self)>video{object-fit:contain!important;background:#000!important}
#callModal .portal-direct-video-grid .portal-video-tile.local-self>video{object-fit:cover!important}

/* v180 DIRECT VIDEO REWRITE 2026-10-06c — one remote renderer + independent local self-view */
#callModal .portal-direct-video-grid.single-remote{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;background:#000!important}
#callModal .portal-direct-video-grid.single-remote [data-direct-key^="remote:"]{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;background:#000!important;overflow:hidden!important;z-index:1!important;display:flex!important;align-items:center!important;justify-content:center!important}
#callModal .portal-direct-video-grid.single-remote [data-direct-key^="remote:"]>video{position:relative!important;inset:auto!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center center!important;background:#000!important;transform:none!important}
#callModal .portal-direct-video-grid.single-remote [data-direct-key="local:self"]{position:absolute!important;inset:auto 14px 92px auto!important;width:118px!important;height:164px!important;min-height:0!important;border-radius:16px!important;overflow:hidden!important;z-index:8!important;box-shadow:0 8px 30px rgba(0,0,0,.48)!important;background:#08372a!important}
#callModal .portal-direct-video-grid.single-remote [data-direct-key="local:self"]>video{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;transform:scaleX(-1)!important;background:#08372a!important}
#callModal .portal-direct-video-grid.local-only [data-direct-key="local:self"]{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;background:#000!important}
#callModal .portal-direct-video-grid.local-only [data-direct-key="local:self"]>video{position:relative!important;inset:auto!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;transform:scaleX(-1)!important;background:#000!important}
#callModal .portal-direct-video-grid [data-direct-key] .portal-video-avatar{z-index:0!important}
#callModal .portal-direct-video-grid [data-direct-key].has-video .portal-video-avatar{display:none!important}
#callModal .portal-direct-video-grid [data-direct-key] .portal-video-name{z-index:3!important}
#callModal .portal-direct-video-grid [data-direct-key="local:self"] .portal-video-self{z-index:4!important}
#callModal .portal-call-round.mute.active svg,#callModal .portal-call-round.camera.active svg{background:#d9b84e!important;stroke:#062f23!important;box-shadow:0 0 14px rgba(217,184,78,.28)!important}
@media(max-width:720px){#callModal .portal-direct-video-grid.single-remote [data-direct-key="local:self"]{width:104px!important;height:144px!important;right:12px!important;bottom:86px!important}}


/* v180 CALL CONTROLS TWO-ROW GRID 2026-10-06 */
@media(max-width:720px){
  #callModal .portal-direct-call-dialog.video-active .portal-call-active{left:8px!important;right:8px!important;bottom:10px!important;width:auto!important;display:grid!important;grid-template-columns:repeat(4,48px)!important;grid-auto-rows:48px!important;gap:7px 12px!important;justify-content:center!important;align-items:center!important;justify-items:center!important;overflow:visible!important;padding:0 8px!important}
  #callModal .portal-direct-call-dialog.video-active .portal-direct-video-grid.single-remote .portal-video-tile.local-self{bottom:124px!important}
  #callModal .portal-direct-call-dialog.video-active .portal-call-round{width:48px!important;min-width:48px!important;max-width:48px!important;flex:none!important}
  #callModal .portal-direct-call-dialog.video-active .portal-call-round span{display:none!important}
}


/* v180 WIN-nick + Telegram privacy controls */
.portal-privacy-check{margin:0!important;padding:14px 16px!important;border:1px solid rgba(220,184,89,.18)!important;border-radius:14px!important;background:rgba(255,255,255,.025)!important;align-items:flex-start!important}
.portal-privacy-check>span{display:grid!important;gap:4px!important;margin:0!important;color:rgba(255,255,255,.78)!important}
.portal-privacy-check b{color:#f2d579!important;font-size:13px!important}
.portal-privacy-check small{color:rgba(255,255,255,.58)!important;line-height:1.4!important}

/* v180 FIX 2026-10-08 — compact Telegram privacy checkboxes on desktop + mobile.
   portal.css gives every form input width:100%/height:50px, so checkboxes must opt out explicitly. */
.portal-form-grid label.portal-privacy-check{display:flex!important;grid-column:1/-1!important;gap:11px!important;align-items:flex-start!important;cursor:pointer!important}
.portal-form-grid label.portal-privacy-check>input[type="checkbox"]{
  -webkit-appearance:auto!important;appearance:auto!important;accent-color:#d7ad42!important;
  width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;
  flex:0 0 18px!important;margin:2px 0 0!important;padding:0!important;
  border:0!important;border-radius:4px!important;background:transparent!important;box-shadow:none!important;
  cursor:pointer!important
}
.portal-form-grid label.portal-privacy-check>input[type="checkbox"]:focus{box-shadow:0 0 0 3px rgba(229,197,101,.16)!important}
.portal-form-grid label.portal-privacy-check>span{min-width:0!important;margin:0!important}
.portal-form-grid label.portal-privacy-check>span>b{display:block!important;margin:0!important;line-height:1.3!important}
.portal-form-grid label.portal-privacy-check>span>small{display:block!important;margin-top:4px!important}
@media(max-width:720px){
  .portal-privacy-check{padding:12px 13px!important;border-radius:13px!important}
  .portal-form-grid label.portal-privacy-check{gap:10px!important}
  .portal-form-grid label.portal-privacy-check>input[type="checkbox"]{width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;flex-basis:18px!important;margin-top:1px!important}
  .portal-privacy-check b{font-size:12px!important}.portal-privacy-check small{font-size:11px!important;line-height:1.35!important}
}

/* v182 messenger calls: static avatars; four-step live connection-quality display. */
#callModal #callAvatar,#callModal #callAvatar *,#callModal .portal-video-avatar,#callModal .portal-video-avatar *{animation:none!important;transition:none!important;transform:none!important}
.win-call-quality{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;align-items:center;margin:6px auto;position:relative;z-index:30;max-width:100%;font-size:12px;color:#e4ecdf}
.win-call-quality[hidden],.win-call-quality-alert[hidden],.win-call-wake-hint[hidden]{display:none!important}
.win-call-signal{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(214,179,91,.23);border-radius:12px;background:rgba(4,40,29,.86);padding:7px 9px;white-space:nowrap}
.win-call-signal b{color:#f1d887;font-weight:700}
.win-call-signal.weak{border-color:rgba(238,115,91,.8)}.win-call-signal.weak b{color:#f9a391}
.win-signal-bars{height:15px;width:20px;display:inline-flex;gap:2px;align-items:flex-end;flex:none}
.win-signal-bars i{width:4px;border-radius:2px 2px 0 0;background:#52685e;border:1px solid rgba(255,255,255,.09)}
.win-signal-bars i:nth-child(1){height:5px}.win-signal-bars i:nth-child(2){height:8px}.win-signal-bars i:nth-child(3){height:11px}.win-signal-bars i:nth-child(4){height:15px}
.win-signal-bars i.on{background:#e5c674}.win-call-signal.weak .win-signal-bars i.on{background:#e97f66}
.win-call-quality-alert{position:relative;z-index:30;margin:5px auto!important;padding:7px 10px!important;color:#ffd4bb!important;background:rgba(109,40,30,.92);border:1px solid rgba(239,135,114,.65);border-radius:11px;font-size:12px!important;max-width:94%;text-align:center}
.win-call-wake-hint{position:relative;z-index:30;display:block;text-align:center;color:#f1d887;max-width:320px;margin:5px auto;font-size:11px}
#callModal .portal-direct-call-dialog.video-active>.win-call-quality,#callModal .portal-direct-call-dialog.video-active>.win-call-quality-alert,#callModal .portal-direct-call-dialog.video-active>.win-call-wake-hint{position:relative;z-index:30}
@media(max-width:620px){.win-call-quality{font-size:11px;gap:5px}.win-call-signal{padding:6px 7px}.win-call-quality-alert{font-size:11px!important}}
