/* AE1: chat-only styling. Width/height never depend on image download or animation. */
.staff-message-body .ae1-emoji,.rx-emoji .ae1-emoji{display:inline-block;position:relative;inline-size:1.35em;block-size:1.35em;vertical-align:-.25em;line-height:1;white-space:nowrap;pointer-events:none}
.ae1-emoji>.ae1-image{position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none!important;object-fit:contain;opacity:0;pointer-events:none;user-select:none}
.ae1-emoji>.ae1-fallback{display:inline-grid;place-items:center;width:100%;height:100%;line-height:1;font:inherit}
.ae1-emoji.ae1-loaded>.ae1-image{opacity:1}
/* AE2: color emoji glyphs can ignore transparent text color. Hide the fallback paint while preserving text and geometry. */
.ae1-emoji.ae1-loaded>.ae1-fallback{opacity:0}
.staff-message.ae1-single .staff-message-body{display:flex;align-items:center;justify-content:center;min-height:88px;margin-block:5px;line-height:1;font-size:72px}
.staff-message.ae1-single .staff-message-body .ae1-emoji{inline-size:80px;block-size:80px;vertical-align:baseline;font-size:72px;flex:none}
html body.staff-chat-active #app .staff-message.staff-message.ae1-single:not(.system):not(.deleted):not(.client-error)>.staff-message-bubble{background:transparent!important;box-shadow:none!important;border-color:transparent!important;outline:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html body.staff-chat-active #app .staff-message.staff-message.ae1-single:not(.system):not(.deleted):not(.client-error)>.staff-message-bubble::before,html body.staff-chat-active #app .staff-message.staff-message.ae1-single:not(.system):not(.deleted):not(.client-error)>.staff-message-bubble::after{display:none!important}
.em1-grid button .ae1-picker-emoji{display:inline-block;position:relative;width:32px;height:32px;font-size:27px;pointer-events:none}
.em1-grid button:hover,.em1-grid button:focus-visible{background:#dcf3fa;border-radius:10px}
.em1-panel .em1-tabs button[data-ae1-tab]{font-size:20px}
.em1-grid .ae1-more{grid-column:1/-1;display:block;height:20px;color:#64848e;text-align:center;font-size:11px;line-height:20px;overflow:hidden}
@media(max-width:350px){.staff-message.ae1-single .staff-message-body .ae1-emoji{inline-size:72px;block-size:72px}.em1-grid button .ae1-picker-emoji{width:29px;height:29px}}

/* AE3: reaction artwork fits inside the chip, without text baseline displacement. */
html body.staff-chat-active #app .rx-reaction .rx-emoji{display:flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;line-height:1}
html body.staff-chat-active #app .rx-reaction .rx-emoji .ae1-emoji{display:block;inline-size:24px;block-size:24px;vertical-align:0;flex:none;line-height:1}
/* Single-emoji founder messages keep readable identity and metadata on the chat background. */
html body.staff-chat-active #app .staff-chat-page .staff-message.founder-message-fv1.ae1-single .staff-message-name,
html body.staff-chat-active #app .staff-chat-page .staff-message.founder-message-fv1.ae1-single .chat-sender-name-nr1,
html body.staff-chat-active #app .staff-chat-page .staff-message.founder-message-fv1.ae1-single .founder-title-block-fv4,
html body.staff-chat-active #app .staff-chat-page .staff-message.founder-message-fv1.ae1-single .founder-title-fv4,
html body.staff-chat-active #app .staff-chat-page .staff-message.founder-message-fv1.ae1-single .founder-note-fv1,
html body.staff-chat-active #app .staff-chat-page .staff-message.founder-message-fv1.ae1-single .chat-sender-role-nr1,
html body.staff-chat-active #app .staff-chat-page .staff-message.founder-message-fv1.ae1-single .cm-meta,
html body.staff-chat-active #app .staff-chat-page .staff-message.founder-message-fv1.ae1-single .rx-bar .rx-add{color:#215a6c!important}

/* AE4: standalone emoji has a Telegram-sized canvas and no sender heading. */
html body.staff-chat-active #app .staff-chat-page .staff-message.staff-message.ae1-single:not(.system):not(.deleted):not(.client-error)>.staff-message-bubble>.staff-message-name{display:none!important}
html body.staff-chat-active #app .staff-message.ae1-single .staff-message-body{min-height:132px;font-size:116px!important}
html body.staff-chat-active #app .staff-message.ae1-single .staff-message-body .ae1-emoji{inline-size:128px;block-size:128px;font-size:116px}
@media(max-width:350px){
 html body.staff-chat-active #app .staff-message.ae1-single .staff-message-body{min-height:116px;font-size:104px!important}
 html body.staff-chat-active #app .staff-message.ae1-single .staff-message-body .ae1-emoji{inline-size:112px;block-size:112px;font-size:104px}
}

/* AE6: center inline emoji on the text axis rather than the native fallback baseline. */
html body.staff-chat-active #app .staff-message:not(.ae1-single) .staff-message-body .ae1-emoji{vertical-align:middle}

/* AE7: native inline glyph reserves original preview geometry while animation overlays it. */
body.cg-directory-gd1 #app .cg-list .tl1-preview .ae1-emoji{display:inline;position:relative;vertical-align:baseline;line-height:inherit;white-space:nowrap;pointer-events:none}
body.cg-directory-gd1 #app .cg-list .tl1-preview .ae1-emoji>.ae1-fallback{display:inline;line-height:inherit}
body.cg-directory-gd1 #app .cg-list .tl1-preview .ae1-emoji>.ae1-image{top:50%;bottom:auto;height:1em!important;transform:translateY(-50%)}

/* AE8: standalone emoji follows its sender side, including wide reply previews. */
html body.staff-chat-active #app .staff-message.ae1-single .staff-message-body{direction:rtl;justify-content:flex-end}
html body.staff-chat-active #app .staff-message.ae1-single.own .staff-message-body{justify-content:flex-start}

/* AE10: match native emoji artwork size; compensate the normalized WebP's 10% transparent margin. */
html body.staff-chat-active #app .staff-message:not(.ae1-single) .staff-message-body .ae1-emoji>.ae1-image,
body.cg-directory-gd1 #app .cg-list .tl1-preview .ae1-emoji>.ae1-image{
 left:50%;right:auto;top:50%;bottom:auto;width:calc(100% / .9)!important;height:auto!important;aspect-ratio:1;transform:translate(-50%,-50%);
}
