/* Messaging uses the existing graphite surfaces and typography. */
.msg-main{max-width:none!important;padding:20px!important}.messenger{display:grid;grid-template-columns:minmax(240px,300px) minmax(0,1fr);height:calc(100dvh - 120px);min-height:400px;background:#101922;border-radius:12px;overflow:hidden}.msg-sidebar{border-right:1px solid #29343d;padding:16px;display:flex;flex-direction:column;gap:12px;min-height:0}.msg-sidebar header,.msg-thread-head{display:flex;align-items:center;gap:12px}.msg-sidebar h1{font-size:24px;flex:1;margin:0}.msg-sidebar input{width:100%;min-height:44px}.msg-conversation{width:100%;display:grid;grid-template-columns:1fr auto;text-align:left;border:0;border-bottom:1px solid #26323b;background:transparent;padding:16px 8px;gap:6px;min-height:76px}.msg-conversation span{grid-column:1/-1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#aabcc9}.msg-conversation.selected{background:#213544}.msg-conversation b,[data-msg-unread]{background:#bfdced;color:#102331;border-radius:14px;min-width:22px;padding:2px 6px;font-size:12px}.msg-thread{display:flex;flex-direction:column;position:relative;min-height:0;min-width:0}.msg-thread-head{padding:14px 18px;border-bottom:1px solid #26323b;flex-shrink:0}.msg-thread-head>div{flex:1;min-width:0}.msg-thread-head h2{font-size:19px;margin:0}.msg-thread-head small{display:block;max-width:500px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#aabcc9}.msg-thread-head [data-msg-back]{display:none}.msg-history{overflow-y:auto;overscroll-behavior:contain;padding:16px;flex:1;min-height:0;scrollbar-gutter:stable}.msg-bubble{width:fit-content;max-width:82%;margin:0 auto 16px 0;padding:12px 16px;background:#1b2934;border-radius:12px}.msg-bubble.mine{margin-left:auto;margin-right:0;background:#213c4c}.msg-bubble>small{font-weight:600;color:#c4ddea}.msg-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 10px;font-size:16px;line-height:1.45}.msg-bubble blockquote{border-left:3px solid #b3d2e4;padding:6px 10px;margin:6px 0;background:#111c2680;overflow-wrap:anywhere}.msg-bubble img{width:240px;max-width:100%;max-height:260px;object-fit:cover;border-radius:8px;margin:8px 0}.msg-bubble footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;font-size:11px;color:#b4c4ce}.msg-bubble footer button{border:0;background:transparent;font-size:12px;min-height:36px;padding:4px 8px}.msg-reference{display:flex;flex-direction:column;text-align:left;width:100%;gap:5px;margin:8px 0;background:#0f1c26;border:0;border-left:3px solid #a7ccdf;padding:12px;border-radius:4px}.msg-reference small{color:#aabcc9;text-transform:capitalize}.msg-reference span{font-size:13px}.msg-reference:disabled{opacity:.7}.msg-empty{padding:32px;color:#aabcc9}.msg-thread>.msg-empty{margin:auto}#msg-conversations{flex:1;overflow:auto}#msg-composer{padding:12px 16px;background:#111f29;border-top:1px solid #26323b;flex-shrink:0}#msg-composer textarea{width:100%;min-height:48px;max-height:150px;resize:vertical;background:#172935;border:0;font-size:16px;padding:12px;color:#f0f4f7}.msg-compose-actions{display:flex;gap:6px;align-items:center;margin-top:6px}.msg-compose-actions button{min-height:44px;padding:8px 12px;border:0;background:transparent}.msg-compose-actions .primary{margin-left:auto;background:#bbd8e8;color:#0d202d}.msg-draft-ref{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;overflow-wrap:anywhere}.msg-draft-ref button{min-height:40px;border:0;background:transparent}#msg-status{font-size:13px;color:#d9caa3;padding:0 16px}#msg-status:not(:empty){padding:8px 16px}#msg-new{position:absolute;bottom:150px;left:50%;transform:translateX(-50%);background:#b7d6e7;color:#102230;box-shadow:0 4px 18px #0008}.msg-person{display:block;width:100%;text-align:left;padding:14px;min-height:48px;border:0;border-bottom:1px solid #29343d;background:transparent}.msg-member{display:flex;align-items:center;gap:12px;min-height:48px}.msg-member input{width:22px;height:22px}.msg-sidebar .quiet{flex-shrink:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[data-msg-open]{position:relative;display:flex;align-items:center;gap:5px;min-width:44px;min-height:44px}.msg-context{display:flex;gap:12px;margin-top:12px}.msg-context button{background:transparent;border:0;min-height:44px}.messenger input[hidden]{display:none!important}
@media(max-width:760px){.msg-main{padding:0!important;margin:0!important;overflow:hidden!important}.messenger{display:flex;height:calc(var(--field-vh,100dvh) - 138px - env(safe-area-inset-top) - env(safe-area-inset-bottom));min-height:240px;border-radius:0}.msg-sidebar{width:100%;border:0;padding:14px}.msg-thread{display:none;width:100%}.messenger.has-thread .msg-sidebar{display:none}.messenger.has-thread .msg-thread{display:flex}.msg-thread-head{padding:10px 12px;min-height:58px}.msg-thread-head [data-msg-back]{display:block;transform:rotate(180deg);border:0;background:transparent;min-width:44px;min-height:44px}.msg-thread-head h2{font-size:18px}.msg-thread-head small{max-width:210px}.msg-history{padding:12px}.msg-bubble{max-width:90%;padding:10px 12px}.msg-bubble footer button{min-height:44px}#msg-composer{padding:8px 10px}.msg-compose-actions{gap:0}.msg-compose-actions button{padding:8px 10px;font-size:13px}.msg-bubble img{max-height:240px}.field-top:has([data-msg-open]){gap:8px}.field-top .brand{flex:1}.msg-sidebar h1{font-size:26px}}
@media(max-height:500px){.messenger{height:calc(100dvh - 65px);min-height:160px}.msg-thread-head small{display:none}.msg-compose-actions button{min-height:40px}#msg-composer textarea{max-height:70px;min-height:40px}}
.msg-local-photo{display:inline-block;width:64px;height:64px;object-fit:cover;border-radius:6px;margin:4px}.msg-bubble .msg-local-photo{width:220px;height:auto;max-height:240px}.msg-compose-actions button:focus-visible,.msg-person:focus-visible,.msg-conversation:focus-visible{outline:2px solid #b8dced;outline-offset:2px}
.msg-reference{align-items:flex-start;justify-content:flex-start}.msg-conversation{justify-items:start;align-items:start}.msg-conversation b{justify-self:end}.msg-conversation strong,.msg-conversation span{text-align:left}.msg-sidebar .primary{background:#bbd8e8;color:#102331;background-image:none}.msg-thread-head h2{text-align:left;line-height:1.25}.msg-thread-head>div{flex:1 1 auto}.msg-compose-actions .icon{stroke:currentColor;fill:none}
@media(max-width:760px){.messenger{height:calc(var(--ux-vh) - var(--ux-head) - var(--ux-status) - var(--ux-nav) - env(safe-area-inset-bottom))}.ux-keyboard .messenger{height:calc(var(--ux-vh) - var(--ux-head) - var(--ux-status))}.ux-keyboard .shell-v2.field-shell main.msg-main{padding:0!important}}
.msg-thread-head>button{flex:0 0 auto;min-width:44px}.msg-sidebar header>button{flex:0 0 44px;width:44px;padding:10px}.msg-sidebar header .icon{stroke:currentColor;fill:none}
.msg-bubble .msg-card-photo{max-width:180px;max-height:140px;object-fit:cover;margin:2px 0 8px}.msg-call{display:inline-flex;align-items:center;min-height:44px;padding:6px 12px;color:#c3dfec}

/* v1.20 desktop Messenger dock */
.msg-dock{position:fixed;z-index:80;right:18px;top:74px;bottom:18px;width:min(440px,calc(100vw - 36px));display:flex;flex-direction:column;background:#0b131d;border:1px solid rgba(255,255,255,.11);border-radius:20px;box-shadow:0 24px 80px rgba(0,0,0,.42);overflow:hidden}
.msg-dock-head{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 16px;border-bottom:1px solid rgba(255,255,255,.08);flex:0 0 auto}
.msg-dock-head button{border-radius:999px;width:34px;height:34px;padding:0}
.msg-dock .messenger{min-height:0;height:100%;display:flex;grid-template-columns:none}
.msg-dock .msg-sidebar{width:100%;min-width:0;border-right:0}
.msg-dock .msg-thread{width:100%;min-width:0}
.msg-dock .messenger.has-thread .msg-sidebar{display:none}
.msg-dock .messenger:not(.has-thread) .msg-thread{display:none}
.msg-dock .msg-history{min-height:0}
.msg-dock .msg-compose-actions{gap:6px;flex-wrap:wrap}
.msg-dock .msg-compose-actions button{border-radius:999px}
.has-msg-dock .workspace{padding-right:0}
@media(max-width:899px){.msg-dock{display:none!important}.has-msg-dock .workspace{padding-right:0}}

/* v1.24 Messenger product rebuild */
.messenger{border:1px solid rgba(159,204,229,.1);background:linear-gradient(145deg,#0e1821,#0a1219);box-shadow:0 18px 48px rgba(0,0,0,.16)}
.msg-sidebar{padding:18px 14px;background:linear-gradient(180deg,rgba(19,34,45,.98),rgba(12,22,30,.98));border-right-color:rgba(255,255,255,.07)}
.msg-sidebar header{padding:2px 4px 6px}.msg-sidebar header>div{min-width:0;flex:1}.msg-sidebar header small{display:block;font-size:9px;letter-spacing:1.5px;font-weight:750;color:#7893a4}.msg-sidebar h1{font-size:25px;letter-spacing:-.65px}
.msg-search input{border:1px solid rgba(155,199,222,.12);border-radius:13px;background:#0b1720;padding:11px 13px;color:#edf6fa}
#msg-conversations{margin:0 -4px;padding:0 4px}
.msg-conversation{position:relative;grid-template-columns:46px minmax(0,1fr) auto;grid-template-rows:auto;align-items:center;gap:0 11px;min-height:78px;padding:11px 9px;border:0;border-radius:14px;margin:2px 0;transition:background .15s ease,transform .15s ease}
.msg-conversation:hover{background:rgba(143,194,221,.065)}.msg-conversation.selected{background:linear-gradient(135deg,rgba(74,143,181,.22),rgba(76,126,153,.09));box-shadow:inset 0 0 0 1px rgba(144,200,230,.10)}.msg-conversation.unread .msg-preview{color:#d9e8ef}
.msg-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#294b5e,#1a3443);border:1px solid rgba(181,220,240,.12);color:#dceef7;font-size:12px;font-weight:750;letter-spacing:.3px;flex:0 0 auto}
.msg-conversation-copy{min-width:0;display:grid;gap:2px}.msg-conversation-top{display:flex;gap:8px;align-items:baseline;min-width:0}.msg-conversation-top strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.msg-conversation-top time{margin-left:auto;color:#718897;font-size:10px;white-space:nowrap}.msg-conversation-copy small{font-size:10px;color:#78909f}.msg-preview{font-size:12px;color:#92a7b4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.msg-conversation b{grid-column:3;grid-row:1;align-self:center;justify-self:end}
.msg-thread{background:radial-gradient(circle at 50% -20%,rgba(91,157,191,.07),transparent 42%),#0d1720}.msg-thread-head{min-height:67px;padding:11px 16px;background:rgba(10,19,26,.76);backdrop-filter:blur(12px);border-bottom-color:rgba(255,255,255,.07)}.msg-thread-head .msg-avatar{width:38px;height:38px}.msg-thread-head h2{font-size:17px}.msg-thread-head small{font-size:10px}.msg-thread-head [data-msg-settings]{border:0;background:transparent;border-radius:50%;width:42px;height:42px;min-width:42px;padding:0;font-size:18px;letter-spacing:1px}
.msg-history{padding:18px 18px 12px;background-image:radial-gradient(circle at 20% 0%,rgba(255,255,255,.018),transparent 25%)}
#msg-messages{display:flex;flex-direction:column;min-height:100%}
.msg-bubble{position:relative;max-width:min(78%,560px);margin:0 auto 8px 0;padding:9px 12px 7px;border-radius:15px 15px 15px 5px;background:#192832;border:1px solid rgba(255,255,255,.035);box-shadow:0 5px 16px rgba(0,0,0,.10)}
.msg-bubble.mine{border-radius:15px 15px 5px 15px;background:linear-gradient(145deg,#244657,#203c4c);border-color:rgba(165,213,237,.08)}
.msg-bubble.grouped{margin-top:-4px}.msg-bubble.grouped .msg-sender{display:none}.msg-sender{display:block;margin-bottom:4px;font-size:10px!important;color:#a9c8d9!important}.msg-bubble p{margin:2px 0 5px;font-size:14px;line-height:1.5}.msg-bubble footer{gap:7px;opacity:.72;font-size:9px}.msg-bubble footer button{opacity:0;transition:opacity .12s ease}.msg-bubble:hover footer button,.msg-bubble:focus-within footer button{opacity:1}
.msg-date-separator,.msg-unread-divider{display:flex;align-items:center;gap:10px;margin:14px 0}.msg-date-separator:before,.msg-date-separator:after,.msg-unread-divider:before,.msg-unread-divider:after{content:"";height:1px;flex:1;background:rgba(255,255,255,.06)}.msg-date-separator span,.msg-unread-divider span{padding:4px 9px;border-radius:999px;background:#101e28;color:#8299a7;font-size:9px;font-weight:650;white-space:nowrap}.msg-unread-divider span{color:#bfe2f2;background:#183241}.msg-unread-divider:before,.msg-unread-divider:after{background:rgba(134,199,232,.18)}
.msg-photo-link{display:block;width:min(320px,100%);padding:0;border:0;background:transparent;border-radius:12px;overflow:hidden;min-height:0}.msg-photo-link:hover{background:transparent}.msg-photo-link img{display:block;width:100%;max-width:none;height:auto;max-height:320px;object-fit:cover;margin:4px 0 0;border-radius:12px}.msg-photo-view{text-align:center}.msg-photo-view img{max-width:100%;max-height:75dvh;object-fit:contain;border-radius:14px}
.msg-reference{border-left:0;border:1px solid rgba(153,202,228,.13);border-radius:12px;background:linear-gradient(135deg,rgba(79,145,180,.10),rgba(255,255,255,.025));padding:11px 12px;transition:transform .12s ease,border-color .12s ease}.msg-reference:hover{transform:translateY(-1px);border-color:rgba(157,214,242,.25)}
#msg-composer{padding:9px 12px 11px;background:rgba(12,23,31,.96);border-top-color:rgba(255,255,255,.07);padding-bottom:max(11px,env(safe-area-inset-bottom))}
.msg-compose-row{display:flex;align-items:flex-end;gap:7px}.msg-compose-row textarea{flex:1;min-width:0!important;min-height:44px!important;max-height:124px!important;resize:none!important;border-radius:18px!important;padding:11px 14px!important;background:#172832!important;line-height:1.4}.msg-compose-icon,.msg-send{width:44px;height:44px;min-width:44px!important;min-height:44px!important;border-radius:50%!important;padding:0!important}.msg-compose-icon{background:transparent!important;border:0!important}.msg-send{transform:rotate(-90deg);box-shadow:0 4px 14px rgba(54,145,197,.22)}.msg-compose-tools{display:flex;gap:6px;padding:5px 50px 0}.msg-compose-tools button{min-height:30px;padding:3px 8px;border:0;background:transparent;color:#8199a7;font-size:10px}.msg-attach-mobile{display:none}
#msg-draft-extras{display:flex;gap:7px;overflow-x:auto;padding:0 0 7px}.msg-draft-ref{flex:0 0 auto;max-width:260px;padding:5px 7px;border-radius:9px;background:#182b37}.msg-draft-ref button{min-height:28px;padding:2px 6px}
.msg-older{display:block;margin:0 auto 10px;border-radius:999px;background:#142631;color:#91adbc;font-size:10px;min-height:34px}
.msg-empty-state,.msg-thread-empty{display:grid;place-items:center;text-align:center;align-content:center;gap:8px;min-height:180px}.msg-empty-state p,.msg-thread-empty p{max-width:300px;font-size:12px;color:#7f94a2}.msg-empty-icon{width:50px;height:50px;display:grid;place-items:center;border-radius:50%;background:#152833;color:#9cc5d9}.msg-notification-link{font-size:11px;color:#8298a6}
.msg-dock{width:min(470px,calc(100vw - 36px));border-color:rgba(164,207,230,.13);background:#0b151d;box-shadow:0 28px 90px rgba(0,0,0,.48)}.msg-dock-head{height:50px;background:linear-gradient(90deg,#12232e,#0d1921)}.msg-dock-head>span{display:flex;align-items:center;gap:8px}.msg-live-dot{width:7px;height:7px;border-radius:50%;background:#66c9a5;box-shadow:0 0 0 4px rgba(102,201,165,.08)}.msg-dock-head button{font-size:17px}
@media(max-width:760px){
 .messenger{height:calc(var(--ux-vh) - var(--ux-head) - var(--ux-status) - var(--ux-nav) - env(safe-area-inset-bottom));background:#0c161e;border:0}
 .msg-sidebar{padding:13px 11px}.msg-sidebar header{padding:3px 3px 8px}.msg-sidebar h1{font-size:25px}.msg-conversation{min-height:74px;padding:9px 7px}.msg-avatar{width:44px;height:44px}.msg-thread-head{min-height:60px;padding:7px 8px}.msg-thread-head .msg-avatar{width:36px;height:36px}.msg-history{padding:12px 10px 8px}.msg-bubble{max-width:88%;font-size:14px}.msg-bubble footer button{opacity:1}.msg-compose-tools{display:none}.msg-attach-mobile{display:inline-flex}.msg-compose-row{gap:4px}.msg-compose-row textarea{min-height:46px!important;border-radius:19px!important}.msg-compose-icon,.msg-send{width:44px;height:44px;min-width:44px!important}.ux-keyboard #msg-composer{padding-bottom:7px}.ux-keyboard .messenger{height:calc(var(--ux-vh) - var(--ux-head) - var(--ux-status))}
}
@media(min-width:761px) and (max-width:1100px){.messenger{grid-template-columns:minmax(220px,275px) minmax(0,1fr)}.msg-sidebar{padding:14px 10px}.msg-conversation{grid-template-columns:42px minmax(0,1fr) auto}.msg-avatar{width:39px;height:39px}}


/* Defensive containment for real operational names and references. */
.msg-thread-head h2,.msg-reference strong,.msg-reference span,.msg-draft-ref{min-width:0;overflow-wrap:anywhere}
.msg-thread-head h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-reference{min-width:0;max-width:100%}
.msg-call{max-width:100%;overflow-wrap:anywhere}
@media(max-width:420px){.msg-thread-head{gap:7px}.msg-thread-head .msg-avatar{width:34px;height:34px}.msg-thread-head [data-msg-settings]{width:44px;height:44px;min-width:44px}.msg-compose-icon,.msg-send{width:42px;height:42px;min-width:42px!important}.msg-compose-row textarea{padding:10px 12px!important}.msg-bubble{max-width:92%}}

/* v1.24 visual QA refinements */
#msg-text::placeholder{color:#8096a4;opacity:1}
@media(min-width:900px) and (max-width:1100px){.msg-dock{width:min(420px,calc(100vw - 28px));right:14px;top:74px;bottom:14px}}
@media(max-width:420px){.msg-thread-head>div{min-width:0}.msg-thread-head h2{max-width:100%}}

/* Touch-tablet Messenger sizing. */
@media(min-width:761px) and (max-width:899px){
 .messenger{grid-template-columns:220px minmax(0,1fr)}
 .msg-sidebar{padding:14px 10px}
 .msg-bubble{max-width:88%}
 .msg-bubble footer button{min-height:44px;padding:7px 9px}
 .msg-compose-tools{padding-left:48px;padding-right:48px}
 .msg-compose-tools button{min-width:48px!important;min-height:44px;padding:6px 8px;flex-shrink:0}
}

/* Messenger file sharing and work-front polish */
.msg-file-link{display:flex;align-items:center;gap:10px;width:min(360px,100%);margin:6px 0 2px;padding:10px 11px;border:1px solid rgba(153,202,228,.12);border-radius:12px;background:rgba(12,25,34,.58);color:inherit;text-decoration:none;min-width:0}
.msg-file-link:hover{border-color:rgba(157,214,242,.24);background:rgba(24,47,61,.72)}
.msg-file-link.pending{opacity:.78}
.msg-file-icon{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:rgba(80,145,179,.15);color:#b9d9e8}
.msg-file-link>span:last-child{min-width:0;display:grid;gap:2px}.msg-file-link strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.msg-file-link small{font-size:9px;color:#89a0ae}
.msg-create-group{width:100%;margin-top:10px;justify-content:flex-start;background:rgba(61,119,151,.14);border-color:rgba(134,194,225,.14)}
@media(max-width:760px){
 .messenger{border-radius:0!important}
 .msg-thread{min-height:0}
 .msg-thread-head{position:sticky;top:0;z-index:3}
 .msg-history{scrollbar-width:none}
 .msg-history::-webkit-scrollbar{display:none}
 .msg-bubble{margin-bottom:5px}
 .msg-file-link{width:min(300px,100%)}
}


/* Messenger refinement — denser conversation list, stronger work-front identity, quieter chrome. */
.msg-sidebar{gap:8px!important}
.msg-sidebar header{padding:0 2px 4px!important;min-height:48px}
.msg-sidebar header small{font-size:8px!important;letter-spacing:1.7px!important;color:#6f8a99!important}
.msg-sidebar h1{font-size:23px!important;letter-spacing:-.55px!important}
.msg-search{display:block;margin:0 1px 5px}
.msg-search input{min-height:44px!important;border-radius:12px!important;padding:9px 12px!important;background:rgba(19,35,46,.88)!important;border:1px solid rgba(255,255,255,.055)!important;font-size:12px!important}
#msg-conversations{padding:1px 0 8px}
.msg-conversation{min-height:72px!important;padding:9px 7px!important;border-radius:12px!important;margin:1px 0!important}
.msg-conversation .msg-avatar{grid-column:1!important;grid-row:1!important;align-self:center;justify-self:start;background:linear-gradient(145deg,#254657,#1a3442)!important;border:1px solid rgba(174,215,235,.09)!important;color:#d9edf6!important}
.msg-conversation.group .msg-avatar{background:linear-gradient(145deg,#33435f,#24344e)!important;color:#dce3ff!important}
.msg-conversation.unread{background:rgba(70,130,162,.075)}
.msg-conversation.unread .msg-conversation-top strong{color:#f2f8fb}
.msg-conversation-copy{grid-column:2!important;grid-row:1!important;align-self:center;gap:1px!important}
.msg-conversation-top strong{font-size:13px!important;line-height:1.25}
.msg-conversation-top time{font-size:9px!important}
.msg-conversation-copy small{font-size:9px!important;letter-spacing:.05px}
.msg-preview{font-size:11px!important;line-height:1.3}
.msg-conversation b{min-width:19px!important;height:19px;display:grid;place-items:center;padding:0 5px!important;font-size:9px!important;background:#8bc7e7!important;color:#0a202d!important}
.msg-thread-head{min-height:58px!important;padding:8px 12px!important}
.msg-thread-head h2{font-size:16px!important;letter-spacing:-.15px}
.msg-thread-head small{font-size:9px!important}
.msg-history{padding-top:12px!important}
.msg-bubble{box-shadow:none!important;border-color:rgba(255,255,255,.03)!important}
.msg-bubble.mine{background:linear-gradient(145deg,#24485b,#1f3e4e)!important}
#msg-composer{padding-top:7px!important}
.msg-compose-row textarea{background:#162934!important;border:1px solid rgba(255,255,255,.045)!important}
.msg-compose-icon{color:#94adbb!important}
.msg-send{background:#9bcce5!important;color:#0b2230!important}

@media(max-width:760px){
 .msg-sidebar{padding:10px 10px 8px!important}
 .msg-sidebar header{min-height:44px;padding:0 1px 3px!important}
 .msg-sidebar h1{font-size:22px!important}
 .msg-sidebar header>button{width:42px!important;flex-basis:42px!important;min-width:42px!important;height:42px!important}
 .msg-search{margin-bottom:3px}
 .msg-search input{min-height:44px!important}
 .msg-conversation{min-height:68px!important;padding:8px 5px!important;grid-template-columns:42px minmax(0,1fr) auto!important;gap:0 9px!important}
 .msg-conversation .msg-avatar{width:42px!important;height:42px!important}
 .msg-thread-head{min-height:56px!important;padding:6px 7px!important}
 .msg-history{padding:10px 9px 7px!important}
 .msg-bubble{max-width:90%!important;padding:8px 10px 6px!important}
 .msg-bubble p{font-size:13px!important;line-height:1.45!important}
 #msg-composer{padding:7px 8px max(8px,env(safe-area-inset-bottom))!important}
 .msg-compose-row{gap:3px!important}
}


/* Desktop Messenger control-centre refinements */
.msg-filters{display:flex;gap:5px;overflow-x:auto;padding:0 1px 5px;scrollbar-width:none}
.msg-filters::-webkit-scrollbar{display:none}
.msg-filters button{min-height:44px;min-width:44px;padding:5px 10px;border:1px solid rgba(255,255,255,.06);border-radius:999px;background:transparent;color:#8097a5;font-size:10px;white-space:nowrap}
.msg-filters button:hover{background:rgba(132,190,220,.06);color:#bdd8e6}
.msg-filters button.selected{background:rgba(91,164,201,.14);border-color:rgba(140,203,235,.16);color:#d9edf7}
.msg-filters button b{margin-left:3px;font-size:9px;color:#9fd5f0}
.msg-conversation.system .msg-avatar{border-radius:13px!important;background:linear-gradient(145deg,#284d61,#1d3949)!important;box-shadow:inset 0 0 0 1px rgba(157,211,239,.06)}
.msg-conversation.system .msg-conversation-copy small{color:#8fb6c9}
.msg-dock.expanded{width:min(780px,calc(100vw - 280px))!important}
.msg-dock.expanded .messenger{display:grid!important;grid-template-columns:minmax(250px,300px) minmax(0,1fr)!important}
.msg-dock.expanded .messenger.has-thread .msg-sidebar{display:flex!important}
.msg-dock.expanded .messenger.has-thread .msg-thread{display:flex!important}
.msg-dock.expanded .msg-thread-head [data-msg-back]{display:none!important}
@media(min-width:1366px){
 .msg-main .messenger{grid-template-columns:minmax(280px,330px) minmax(0,1fr);height:calc(100dvh - 112px)}
 .msg-main .msg-sidebar{padding:18px 16px}
 .msg-main .msg-history{padding-inline:24px}
}
@media(max-width:760px){
 .msg-filters{padding-bottom:3px}
 .msg-filters button{min-width:44px;min-height:44px;padding-inline:11px}
}

.msg-system-group-note{display:grid;gap:4px;margin-bottom:14px;padding:12px 13px;border:1px solid rgba(139,201,232,.13);border-radius:12px;background:rgba(48,103,132,.10)}
.msg-system-group-note strong{font-size:14px;color:#e2f2f9}.msg-system-group-note span{font-size:11px;color:#9eb6c3}.msg-system-group-note small{font-size:9px;color:#758d9a;line-height:1.4}
.msg-member{justify-content:flex-start}.msg-member>small{margin-left:auto;font-size:9px;color:#718997}

/* v1.27.1 Messenger soft-surface polish */
.msg-conversation{border-radius:18px}.msg-conversation.system .msg-avatar{border-radius:14px;background:linear-gradient(145deg,#31566b,#1b3544);box-shadow:inset 0 0 0 1px rgba(194,226,242,.08)}.msg-conversation.group:not(.system) .msg-avatar{border-radius:14px;background:linear-gradient(145deg,#3a4558,#252f40)}.msg-conversation.system .msg-conversation-top strong{color:#eef8fd}.msg-conversation-copy small{letter-spacing:.01em}.msg-preview{line-height:1.45}.msg-thread-head .msg-avatar{border-radius:13px}.msg-bubble{border-radius:18px 18px 18px 6px;box-shadow:0 5px 16px rgba(0,0,0,.09)}.msg-bubble.mine{border-radius:18px 18px 6px 18px}.msg-reference,.msg-file,.msg-attachment,.msg-document{border-radius:14px!important;border-left-width:0!important;box-shadow:inset 0 0 0 1px rgba(173,213,234,.08)}#msg-composer{background:linear-gradient(180deg,#111f29,#0e1922)}#msg-composer textarea{border-radius:16px!important;border:1px solid rgba(151,199,224,.12)!important;background:#172a36!important;line-height:1.45}.msg-compose-row{align-items:flex-end}.msg-compose-icon,.msg-send,.msg-compose-tools button{border-radius:14px!important}.msg-filters button{border-radius:999px!important}.msg-search input{border-radius:16px!important}
@media(max-width:760px){.msg-sidebar{padding:16px 12px}.msg-sidebar h1{font-size:27px}.msg-conversation{min-height:82px;padding:12px 10px;margin:3px 0}.msg-conversation-top strong{font-size:15px}.msg-conversation-copy small{font-size:10px}.msg-preview{font-size:12.5px}.msg-thread-head{padding:10px 12px 10px 10px}.msg-thread-head h2{font-size:18px;letter-spacing:-.2px}.msg-history{padding:14px 11px}.msg-bubble{max-width:88%;padding:11px 13px}.msg-bubble p{font-size:15.5px}.msg-compose-tools{padding-top:7px}.msg-compose-tools button{min-height:42px}.msg-draft-ref{border-radius:12px}}


/* v1.40.16 Messenger mentions + composer polish */
.msg-mentions{display:flex;flex-direction:column;gap:2px;max-height:260px;overflow:auto;margin:0 0 7px;padding:5px;background:#0b151d;border:1px solid rgba(151,203,230,.16);border-radius:14px;box-shadow:0 -14px 34px rgba(0,0,0,.28)}
.msg-mentions[hidden]{display:none!important}
.msg-mentions button{display:grid;grid-template-columns:34px minmax(0,1fr) 24px;align-items:center;gap:9px;width:100%;min-height:48px;padding:6px 9px;border:0;border-radius:10px;background:transparent;text-align:left}
.msg-mentions button:hover,.msg-mentions button.selected,.msg-mentions button[aria-selected="true"]{background:rgba(117,183,218,.13)}
.msg-mentions .msg-avatar{width:34px;height:34px;font-size:10px}
.msg-mentions button>span:nth-child(2){min-width:0;display:flex;flex-direction:column}
.msg-mentions strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-mentions small{font-size:10px;color:#8199a8}
.msg-mentions button>b{justify-self:end;color:#8fd4f5;font-size:16px}
.msg-mention{display:inline;padding:1px 3px;border-radius:5px;color:#9ddcff;background:rgba(74,155,198,.12);font-weight:650}
.msg-mention.me{color:#d8f1ff;background:rgba(87,176,224,.24);box-shadow:inset 0 0 0 1px rgba(150,215,249,.14)}
.msg-bubble.mentions-me{border-color:rgba(116,197,238,.25);box-shadow:0 5px 18px rgba(0,0,0,.13),inset 3px 0 0 rgba(96,190,236,.48)}
.msg-send:disabled{opacity:.35;box-shadow:none;cursor:default}
#msg-text{overflow-y:auto}
@media(max-width:760px){
 .msg-mentions{max-height:min(230px,34dvh);margin-left:0;margin-right:0;border-radius:13px}
 .msg-mentions button{min-height:50px;padding:7px 8px}
 .msg-bubble.mentions-me{box-shadow:inset 3px 0 0 rgba(96,190,236,.48)}
}


/* v1.40.18 Messenger chat-experience */
.msg-reactions{display:flex;flex-wrap:wrap;gap:5px;margin:5px 0 2px}
.msg-reactions button{display:inline-flex;align-items:center;gap:4px;min-height:40px;padding:2px 8px;border:1px solid rgba(151,203,230,.15);border-radius:999px;background:#11212b;font-size:13px}
.msg-reactions button.mine{background:#1b3a4b;border-color:rgba(128,202,239,.35)}
.msg-reactions button b{font-size:10px;color:#9db3bf}
.msg-receipt{display:inline-flex;align-items:center;gap:4px;min-width:0}
.msg-receipt i{font-style:normal;letter-spacing:-3px;padding-right:3px}
.msg-receipt span{white-space:nowrap}
.msg-receipt.read i{color:#68c9f2}.msg-receipt.delivered i{color:#a8bac4}.msg-receipt.sent i{color:#7d929e}
.msg-more{opacity:.65!important;font-size:16px!important;line-height:1;min-width:44px!important;min-height:44px!important;flex-shrink:0}
.msg-action-sheet{position:fixed;inset:0;z-index:220;pointer-events:none}
.msg-action-sheet.open{pointer-events:auto}
.msg-action-scrim{position:absolute;inset:0;width:100%;height:100%;border:0!important;border-radius:0!important;background:rgba(0,0,0,.48)!important;opacity:0;transition:opacity .16s}
.msg-action-sheet.open .msg-action-scrim{opacity:1}
.msg-action-sheet>section{position:absolute;left:50%;bottom:max(14px,env(safe-area-inset-bottom));width:min(420px,calc(100vw - 24px));transform:translate(-50%,24px);opacity:0;background:#101c25;border:1px solid rgba(162,206,230,.15);border-radius:22px;box-shadow:0 24px 80px rgba(0,0,0,.5);padding:8px;transition:transform .18s ease,opacity .18s ease}
.msg-action-sheet.open>section{transform:translate(-50%,0);opacity:1}
.msg-action-grip{width:38px;height:4px;border-radius:99px;background:#4c6270;margin:3px auto 8px}
.msg-quick-reactions{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;padding:4px 4px 9px;border-bottom:1px solid rgba(255,255,255,.07)}
.msg-quick-reactions button{min-width:0;min-height:48px;border:0;border-radius:12px;background:transparent;font-size:23px}
.msg-quick-reactions button:hover,.msg-quick-reactions button:focus-visible{background:#182c38}
.msg-action-list{display:grid;gap:2px;padding-top:6px}
.msg-action-list button{display:flex;align-items:center;gap:12px;min-height:50px;padding:9px 12px;border:0;border-radius:12px;background:transparent;text-align:left}
.msg-action-list button:hover,.msg-action-list button:focus-visible{background:#172832}
.msg-action-list .icon{width:20px;height:20px}
.msg-gallery{position:fixed;inset:0;z-index:230;display:grid;grid-template-rows:auto 1fr auto;background:rgba(3,8,12,.97);backdrop-filter:blur(12px)}
.msg-gallery header{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:10px;padding:max(10px,env(safe-area-inset-top)) 14px 10px;border-bottom:1px solid rgba(255,255,255,.08)}
.msg-gallery header button{width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;font-size:30px}
.msg-gallery header div{min-width:0;display:flex;flex-direction:column}
.msg-gallery header strong,.msg-gallery header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.msg-gallery header small,.msg-gallery header>span{color:#91a6b2;font-size:11px}
.msg-gallery-stage{min-height:0;display:grid;grid-template-columns:52px 1fr 52px;align-items:center;gap:8px;padding:12px}
.msg-gallery-stage img{justify-self:center;max-width:100%;max-height:calc(100dvh - 150px);object-fit:contain;border-radius:10px}
.msg-gallery-stage button{width:46px;height:60px;border:0;border-radius:14px;background:rgba(255,255,255,.05);font-size:34px}
.msg-gallery-stage button:disabled{opacity:.18}
.msg-gallery footer{padding:10px 16px max(10px,env(safe-area-inset-bottom));text-align:center;color:#9db0ba;font-size:11px}
@media(max-width:760px){
 .msg-more{min-width:44px!important;min-height:44px!important;opacity:.8!important}
 .msg-action-sheet>section{bottom:max(8px,env(safe-area-inset-bottom));width:calc(100vw - 12px);border-radius:22px 22px 14px 14px}
 .msg-gallery-stage{grid-template-columns:0 1fr 0;padding:8px}
 .msg-gallery-stage>button{position:absolute;top:50%;z-index:2;width:42px;height:62px;background:rgba(0,0,0,.35)}
 .msg-gallery-stage>[data-chat-gallery-prev]{left:6px}.msg-gallery-stage>[data-chat-gallery-next]{right:6px}
 .msg-gallery-stage img{max-height:calc(100dvh - 130px)}
}


/* v1.40.29 Messenger composer + layout polish */
.msg-history{scroll-padding-bottom:18px}
.msg-bubble{margin-bottom:12px}
.msg-bubble.grouped{margin-top:-7px}
.msg-bubble footer{gap:7px}
.msg-bubble footer time{opacity:.78}
.msg-file-link{border-radius:13px!important}
#msg-composer{padding:10px 14px 12px!important}
.msg-compose-row{gap:8px!important;align-items:flex-end!important}
.msg-compose-row textarea{min-height:46px!important;padding:11px 14px!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.015)}
.msg-compose-icon{display:inline-flex!important;align-items:center;justify-content:center;color:#a9c3d2!important;transition:background .14s ease,color .14s ease,transform .14s ease}
.msg-compose-icon:hover{background:rgba(137,198,229,.09)!important;color:#d8effa!important}
.msg-compose-icon:active{transform:scale(.96)}
.msg-send{display:inline-flex!important;align-items:center;justify-content:center}
.msg-compose-tools{gap:4px!important;padding:6px 52px 0!important}
.msg-compose-tools button{color:#89a2b1!important;border-radius:10px!important;padding:4px 9px!important}
.msg-compose-tools button:hover{background:rgba(137,198,229,.07)!important;color:#bdd7e5!important}
#msg-draft-extras{display:grid;gap:5px;margin-bottom:5px}
.msg-draft-ref{min-height:38px;padding:6px 9px;background:rgba(132,188,218,.07);border:1px solid rgba(151,203,230,.10)}
.msg-draft-ref button{min-height:32px!important;padding:4px 7px!important}
.msg-thread-head{background:rgba(14,25,34,.72)}
.msg-thread-head [data-msg-settings]{border-radius:12px}
.msg-history{background:linear-gradient(180deg,rgba(8,15,21,.18),rgba(8,15,21,.04))}
.msg-mentions{margin-bottom:8px}

@media(max-width:760px){
 #msg-composer{padding:8px 9px max(9px,env(safe-area-inset-bottom))!important}
 .msg-compose-row{gap:5px!important}
 .msg-compose-icon,.msg-send{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
 .msg-compose-row textarea{min-height:44px!important;max-height:118px!important;padding:10px 13px!important}
 .msg-history{padding:13px 10px 10px!important}
 .msg-bubble{margin-bottom:10px}
 .msg-bubble.grouped{margin-top:-6px}
 .msg-compose-tools{display:none!important}
 #msg-draft-extras{margin:0 1px 5px}
}

@media(min-width:761px){
 .msg-compose-icon:first-child{background:rgba(137,198,229,.055)!important}
}


/* v1.40.64 Messenger + notification polish */
.msg-sidebar-summary{margin:2px 0 0;color:#7f96a5;font-size:10px;line-height:1.25}
.msg-new-conversation{width:auto!important;min-width:72px!important;gap:6px;padding-inline:12px!important;border-radius:12px!important}
.msg-new-conversation span{font-size:11px;font-weight:750;white-space:nowrap;flex-shrink:0}
.msg-dock-unread{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:#b9dced;color:#102331;font-size:10px;font-weight:800}
.msg-conversation.unread{background:linear-gradient(135deg,rgba(70,143,181,.12),rgba(255,255,255,.015))}
.msg-conversation.unread .msg-conversation-top strong{color:#eff9fd}
.msg-conversation.unread .msg-preview{font-weight:650;color:#cae0ea}
.msg-conversation.unread .msg-avatar{box-shadow:0 0 0 2px rgba(149,205,233,.18)}
.msg-conversation-settings{display:grid;gap:14px}
.msg-settings-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border:1px solid rgba(150,200,226,.11);border-radius:13px;background:rgba(18,34,44,.72)}
.msg-settings-card>div{display:grid;gap:3px;min-width:0}.msg-settings-card strong{font-size:13px}.msg-settings-card span{font-size:10px;color:#8399a7}
.msg-settings-search{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:9px}.msg-settings-search label{display:grid;gap:6px}.msg-settings-search input{min-height:42px}
.msg-open-new-tab{display:inline-flex!important;justify-content:center;align-items:center;min-height:42px;text-decoration:none}
.msg-notification-setup{display:grid;gap:12px}
.msg-notification-health{display:flex;align-items:center;gap:12px;padding:14px;border-radius:14px;border:1px solid rgba(150,200,226,.12);background:rgba(17,32,42,.8)}
.msg-notification-health.ready{border-color:rgba(102,201,165,.24);background:rgba(41,102,79,.14)}
.msg-notification-health.blocked{border-color:rgba(235,134,126,.24);background:rgba(129,52,47,.13)}
.msg-notification-health-icon{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:50%;background:rgba(158,207,232,.10);font-weight:850}
.msg-notification-health.ready .msg-notification-health-icon{background:rgba(102,201,165,.16);color:#a9e2cc}
.msg-notification-health.blocked .msg-notification-health-icon{background:rgba(235,134,126,.14);color:#f2aaa4}
.msg-notification-health strong{display:block;font-size:14px}.msg-notification-health p{margin:3px 0 0;color:#8ea3af;font-size:11px;line-height:1.4}
.msg-notification-card{display:grid;gap:11px;padding:14px;border:1px solid rgba(150,200,226,.10);border-radius:14px;background:rgba(12,25,34,.72)}
.msg-notification-card small{font-size:8px;letter-spacing:1.35px;color:#708997;font-weight:800}.msg-notification-card strong{display:block;margin-top:3px;font-size:13px}.msg-notification-card p{margin:4px 0 0;color:#8298a5;font-size:10.5px;line-height:1.4}
.msg-notification-actions{display:flex;gap:8px;flex-wrap:wrap}
.msg-notification-toggle{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 10px;border-radius:11px;background:rgba(255,255,255,.025)}
.msg-notification-toggle input{width:21px;height:21px}.msg-notification-toggle span{font-size:12px}
.msg-notification-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:3px}.msg-notification-foot>span{font-size:10px;color:#758c9a}.msg-notification-foot>div{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:760px){
 .msg-sidebar header{align-items:center!important}
 .msg-new-conversation{min-width:44px!important;width:44px!important;padding:0!important}.msg-new-conversation span{display:none}
 .msg-sidebar-summary{font-size:9px}
 .msg-settings-card{align-items:flex-start}.msg-settings-search{grid-template-columns:1fr}.msg-settings-search button{width:100%}
 .msg-notification-foot{align-items:stretch;flex-direction:column}.msg-notification-foot>div{display:grid;grid-template-columns:1fr 1fr}.msg-notification-foot button{width:100%}
 .msg-notification-actions{display:grid;grid-template-columns:1fr 1fr}.msg-notification-actions button{width:100%}
}
@media(max-width:390px){
 .msg-notification-actions,.msg-notification-foot>div{grid-template-columns:1fr}
 .msg-notification-card,.msg-notification-health{padding:12px}
}

.operational-notifications{display:grid;gap:12px}
.operational-notification-summary{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid rgba(150,200,226,.10);border-radius:13px;background:rgba(15,29,38,.72)}
.operational-notification-summary>span{display:grid;min-width:58px}.operational-notification-summary strong{font-size:17px}.operational-notification-summary small{font-size:9px;color:#78909e;text-transform:uppercase;letter-spacing:.8px}.operational-notification-summary>button{margin-left:auto}
.operational-notification-list{display:grid;gap:7px}
.operational-notification{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 12px;border:1px solid rgba(150,200,226,.08);border-radius:12px;background:rgba(12,24,32,.62)}
.operational-notification.unread{border-color:rgba(145,203,232,.16);background:linear-gradient(135deg,rgba(55,112,143,.12),rgba(12,24,32,.72))}
.operational-notification-dot{width:7px;height:7px;border-radius:50%;background:#51636e}.operational-notification.unread .operational-notification-dot{background:#9bd5ee;box-shadow:0 0 0 4px rgba(126,194,226,.08)}
.operational-notification>div{min-width:0}.operational-notification .text-action{display:block;padding:0;border:0;background:transparent;color:#e9f4f8;text-align:left;font-weight:700;overflow-wrap:anywhere}.operational-notification p{margin:3px 0 0;color:#7f95a2;font-size:10px}.operational-notification>small{color:#708591;font-size:9px}
.operational-notification-empty{display:grid;place-items:center;text-align:center;gap:7px;min-height:220px;color:#8398a5}.operational-notification-empty>span{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:rgba(100,190,155,.10);color:#a7ddc8}.operational-notification-empty strong{color:#e5f0f5}.operational-notification-empty p{margin:0;max-width:280px;font-size:11px}
@media(max-width:560px){.operational-notification-summary{display:grid;grid-template-columns:1fr 1fr}.operational-notification-summary>button{grid-column:1/-1;margin:0;width:100%}.operational-notification{grid-template-columns:8px minmax(0,1fr)}.operational-notification>button,.operational-notification>small{grid-column:2;justify-self:start}}

/* Messenger media, reactions and per-chat notification bells */
.msg-conversation-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 38px;align-items:center;border-radius:12px;transition:background .12s ease}
.msg-conversation-row:hover,.msg-conversation-row.selected{background:rgba(112,169,199,.055)}
.msg-conversation-row .msg-conversation{width:100%;background:transparent!important}
.msg-chat-bell{display:grid;place-items:center;width:42px;height:42px;min-height:42px;padding:0;border-radius:50%;border:1px solid transparent;background:transparent!important;color:#75909e;opacity:.62}
.msg-chat-bell .icon{width:16px;height:16px}
.msg-chat-bell.on{color:#b9d7e6;opacity:1;background:rgba(74,149,190,.11)!important;border-color:rgba(105,177,216,.16)}
.msg-chat-bell.off{opacity:.38}
.msg-chat-bell:hover{opacity:1;background:rgba(255,255,255,.055)!important}
.msg-thread-controls{display:flex;align-items:center;gap:4px;margin-left:auto}
.msg-thread-controls>button{flex:0 0 auto}
.msg-photo-item{margin:6px 0 2px;display:grid;gap:5px}
.msg-photo-item figcaption{font-size:12px;line-height:1.35;color:#b2c6d1;padding:0 2px;overflow-wrap:anywhere}
.msg-reaction-shortcuts{display:inline-flex;gap:2px;opacity:0;transition:opacity .12s ease}
.msg-bubble:hover .msg-reaction-shortcuts,.msg-bubble:focus-within .msg-reaction-shortcuts{opacity:1}
.msg-reaction-shortcuts button{min-height:25px!important;height:25px;padding:2px 5px!important;border:0!important;background:transparent!important;font-size:13px}
.msg-reaction-shortcuts button:hover{background:rgba(255,255,255,.075)!important}
.msg-draft-photo-card{display:grid;grid-template-columns:74px minmax(0,1fr);gap:9px;align-items:center;padding:8px;border:1px solid rgba(255,255,255,.065);border-radius:11px;background:rgba(255,255,255,.025);margin:6px 0}
.msg-draft-photo-card .msg-local-photo{width:74px;height:62px;object-fit:cover;border-radius:8px}
.msg-draft-photo-card>div{display:grid;gap:6px;min-width:0}.msg-draft-photo-card input{min-height:38px!important}
.msg-draft-photo-card>div>div{display:flex;gap:6px}.msg-draft-photo-card button{min-height:32px!important;padding:5px 8px!important;font-size:11px}
.msg-gallery{position:fixed;inset:0;z-index:10050;background:rgba(3,7,10,.96);display:grid;grid-template-rows:auto minmax(0,1fr) auto;color:#eef7fb}
.msg-gallery>header{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(8,16,22,.86);backdrop-filter:blur(12px)}
.msg-gallery>header button{width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;font-size:24px;background:transparent}
.msg-gallery>header div{display:grid;gap:2px}.msg-gallery>header small{color:#93aab6}
.msg-gallery-stage{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;min-height:0;overflow:hidden}
.msg-gallery-stage>button{z-index:2;width:42px;height:56px;min-height:56px;padding:0;margin:auto;border:0;background:rgba(0,0,0,.32);font-size:40px;color:white}
.msg-gallery-zoom{height:100%;min-height:0;display:grid;place-items:center;overflow:hidden;touch-action:none;user-select:none}
.msg-gallery-zoom img{max-width:100%;max-height:100%;object-fit:contain;transform-origin:center;will-change:transform}
.msg-gallery>footer{display:grid;gap:3px;padding:12px 18px max(14px,env(safe-area-inset-bottom));border-top:1px solid rgba(255,255,255,.08);background:rgba(8,16,22,.88)}
.msg-gallery>footer strong{font-size:14px}.msg-gallery>footer span,.msg-gallery>footer small{font-size:11px;color:#8ea4af}
.msg-annotator{display:grid;gap:12px}.msg-annotator-tools{display:flex;gap:7px;flex-wrap:wrap}
.msg-annotator canvas{display:block;width:100%;max-height:58dvh;object-fit:contain;background:#111;border:1px solid rgba(255,255,255,.1);border-radius:12px;touch-action:none}
.msg-reactions{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}.msg-reactions button{min-height:27px!important;padding:3px 7px!important;border-radius:999px;background:rgba(255,255,255,.05)!important}.msg-reactions button.mine{border-color:rgba(98,181,224,.4)!important;background:rgba(68,143,183,.14)!important}
@media(max-width:760px){
 .msg-conversation-row{grid-template-columns:minmax(0,1fr) 46px}.msg-chat-bell{width:42px;height:42px}
 .msg-reaction-shortcuts{opacity:1}.msg-reaction-shortcuts button{font-size:14px}
 .msg-gallery-stage{grid-template-columns:0 minmax(0,1fr) 0}.msg-gallery-stage>button{display:none}
 .msg-gallery>header{padding:10px 12px}.msg-gallery>footer{padding-left:14px;padding-right:14px}
 .msg-draft-photo-card{grid-template-columns:64px minmax(0,1fr)}.msg-draft-photo-card .msg-local-photo{width:64px;height:58px}
}

/* Keep Messenger header controls inside the pane after per-chat bell was added. */
.msg-thread-head{min-width:0;overflow:hidden}
.msg-thread-head>div:not(.msg-thread-controls){flex:1 1 0!important;min-width:0}
.msg-thread-head>.msg-thread-controls{flex:0 0 auto!important;min-width:0;margin-left:auto;gap:2px}
.msg-thread-controls .msg-chat-bell{width:34px;height:34px;min-width:34px;min-height:34px}
.msg-thread-controls [data-msg-settings]{width:38px!important;height:38px!important;min-width:38px!important}
@media(min-width:761px){.msg-thread-head{gap:8px!important;padding-right:10px!important}}

/* Touch-safe Messenger controls on phones and tablets. */
@media(max-width:1100px){
 .msg-thread-controls .msg-chat-bell{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
 .msg-thread-controls [data-msg-settings]{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
 .msg-reaction-shortcuts button{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:0!important}
 .msg-reactions button{min-width:40px!important;min-height:40px!important;padding:5px 9px!important}
}

/* v1.40.79 — Messenger conversation clarity */
.msg-filters{flex-wrap:wrap}
.msg-filters button b{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:rgba(150,205,233,.10);font-size:9px}
.msg-conversation-row:has(.msg-chat-bell.off) .msg-conversation-copy>small{color:#78909e}
@media(max-width:760px){
 .msg-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;overflow:visible}
 .msg-filters button{width:100%;min-width:0;min-height:44px;padding-inline:8px;justify-content:center}
}
@media(max-width:360px){
 .msg-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* v1.40.80 — operational notification triage */
.operational-notification-filters{display:flex;gap:7px}
.operational-notification-filters button{min-height:40px;padding:7px 11px;border:1px solid rgba(150,200,226,.12);border-radius:999px;background:rgba(15,29,38,.68);color:#9eb5c1;font-size:11px;font-weight:750}
.operational-notification-filters button[aria-pressed=true]{background:#d0e8f4;border-color:#d0e8f4;color:#102936}
.operational-notification-filters button b{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;margin-left:4px;padding:0 5px;border-radius:999px;background:rgba(255,255,255,.09);font-size:9px}
.operational-notification-filter-empty{display:grid;gap:5px;padding:24px 18px;border:1px dashed rgba(150,200,226,.12);border-radius:13px;text-align:center;color:#879da9}
.operational-notification-filter-empty strong{color:#dbeaf1}
.operational-notification-filter-empty p{margin:0;font-size:11px;line-height:1.45}
@media(max-width:560px){
 .operational-notification-filters{display:grid;grid-template-columns:1fr 1fr}
 .operational-notification-filters button{width:100%;min-height:44px}
}
/* Familiar emoji and media actions, using native OS emoji rendering. */
#chat-emoji-picker{color:var(--yt-text);background:var(--yt-surface);border:1px solid var(--yt-border);border-radius:var(--yt-r3);padding:20px;width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;box-sizing:border-box}
#chat-emoji-picker::backdrop{background:#02090dbb}#chat-emoji-picker header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}#chat-emoji-picker h2{font-size:20px;margin:0}#chat-emoji-picker header button{min-width:44px;min-height:44px;font-size:24px}#chat-emoji-picker .field{display:grid;gap:8px}#chat-emoji-picker input,#chat-emoji-picker select{min-height:44px;width:100%;min-width:0;box-sizing:border-box}
.chat-emoji-filters{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.chat-emoji-filters label{display:grid;gap:6px;font-size:12px;color:var(--yt-muted)}.chat-emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:6px;max-height:310px;overflow-y:auto;padding:4px}.chat-emoji-grid button{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:27px;min-height:48px;min-width:44px;padding:4px;background:var(--yt-surface-2);border:1px solid transparent;border-radius:12px}.chat-emoji-grid button:hover,.chat-emoji-grid button:focus-visible{border-color:var(--yt-primary);background:var(--yt-surface-3)}.chat-emoji-grid p{grid-column:1/-1;color:var(--yt-muted);line-height:1.6}.chat-emoji-hint{font-size:12px;line-height:1.5;color:var(--yt-muted);margin:14px 0 0}
.msg-bubble.emoji-only>p{font-size:36px!important;line-height:1.5!important;letter-spacing:3px}.msg-bubble>p,.msg-photo-item figcaption{user-select:text;-webkit-user-select:text}.chat-emoji-trigger{font-size:27px!important}.chat-media-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.chat-media-tools button,.chat-media-tools a{min-height:44px;padding:10px 14px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;border:1px solid var(--yt-border);background:var(--yt-surface-2);color:var(--yt-text);font-size:13px;text-decoration:none}.msg-gallery footer{max-height:38dvh;overflow-y:auto}#chat-media-status{font-size:13px;color:#f9cc8f;margin:8px 0 0;overflow-wrap:anywhere}#chat-manual-copy{width:100%;min-height:160px;user-select:text}.msg-quick-reactions{flex-wrap:wrap!important}.msg-quick-reactions button{min-width:44px;min-height:44px}
@media(max-width:760px){.msg-compose-row .chat-camera{display:none}.msg-compose-row .chat-emoji-trigger,.msg-compose-row .msg-attach-mobile,.msg-compose-row .msg-send{width:44px;height:44px;min-width:44px!important}.chat-media-tools{display:grid;grid-template-columns:1fr 1fr}.msg-gallery footer{padding-bottom:calc(12px + env(safe-area-inset-bottom))}#chat-emoji-picker{padding:16px}.chat-emoji-grid{max-height:min(310px,42dvh)}}

/* Keep the photo in the centre track when phone navigation buttons are hidden. */
.msg-gallery-zoom{grid-column:2;grid-row:1;min-width:0}
#chat-emoji-picker select{background:var(--yt-surface-2,#172a36);color:var(--yt-text,#edf6fb);border:1px solid var(--yt-border,#304653)}
/* Shared operational records use the same readable summary before and after Send. */
.msg-reference{min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal}
.msg-reference>small{font-size:11px;line-height:1.5;text-transform:none;color:#aac5d5}
.msg-reference-status{width:fit-content;max-width:100%;border-radius:8px;padding:4px 8px;background:#233d4d;color:#d5eaf5;font-size:12px}
.msg-reference-facts{display:grid;gap:8px;width:100%;margin:5px 0}
.msg-reference-facts>span{display:grid;gap:3px;border-top:1px solid #29414f;padding-top:6px}
.msg-reference-facts b{font-size:11px;color:#abc3d0;font-weight:600}
.msg-reference-facts>span>span{font-size:13px;line-height:1.45}
.msg-reference .msg-reference-open{font-size:11px;color:#a9cddd;margin-top:5px}
.msg-reference-unavailable{border-left-color:#667680;opacity:.8}
.msg-draft-record{position:relative;min-width:0;padding:0 0 8px}
.msg-draft-record .msg-reference{margin:0 0 5px;padding:10px;max-height:210px;overflow:auto;border:1px solid #365466;border-radius:10px}
.msg-draft-record .msg-card-photo{width:72px;max-height:60px;object-fit:cover}
.msg-draft-record>button{min-height:44px;padding:8px 12px}
#msg-draft-extras:has(.msg-draft-record){max-height:min(34dvh,300px);overflow:auto;overscroll-behavior:contain}
.msg-share-picker{display:grid;gap:12px;min-width:0}
.msg-share-picker>label{display:grid;gap:6px;min-width:0}
.msg-share-picker input,.msg-share-picker select{min-height:44px;width:100%;min-width:0}
.msg-share-picker .msg-person{display:grid;gap:5px;white-space:normal;overflow-wrap:anywhere}
.msg-share-picker .msg-person small,.msg-picker-help{color:#aac0cd;font-size:12px;line-height:1.5}
.msg-onsite-record{min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){.msg-share-picker .msg-reference{margin-top:0}#msg-draft-extras:has(.msg-draft-record){max-height:26dvh}.msg-reference-facts{gap:6px}}
