/* Scrolling belongs to the message list. DOM updates preserve its own anchor. */
#messages{overflow-anchor:none;scroll-behavior:auto;overscroll-behavior:contain}
.chat,.chat-list,.expression-panel,.emoji-tone-popover,.share-recipient{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.chat input,.chat textarea,[contenteditable=true],#system-share-dialog input{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
.emoji-choice,.emoji-tone-choice,.expression-choice,.emoji-category{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important;cursor:pointer}
.emoji-tone-popover{touch-action:manipulation;z-index:10100}.emoji-section{pointer-events:none}
.bubble .reply-quote,.bubble .message-reactions{flex-shrink:0}.album-captions:empty{display:none}.album-captions .album-caption{margin:0}.message-album>.meta>.meta{padding:0}
#system-share-dialog{width:min(460px,100%);max-height:90dvh;display:flex;flex-direction:column;gap:10px;padding:16px;overflow:hidden}
#system-share-dialog:not([open]){display:none}#system-share-dialog header{display:flex;align-items:center;justify-content:space-between;margin:0}
.share-account{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}.share-account .avatar{width:26px;height:26px;min-width:26px;font-size:12px}
.share-summary{border-radius:14px;background:#ffffff08;padding:12px;font-size:14px;line-height:1.35;white-space:pre-wrap;max-height:100px;overflow:auto;overflow-wrap:anywhere}
#system-share-search{border-radius:14px;min-height:40px;margin:0;flex:none}#system-share-recipients{overflow:auto;min-height:160px;flex:1;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.share-recipient{display:flex;align-items:center;gap:12px;width:100%;min-height:72px;padding:9px 4px;background:none;border-radius:14px;text-align:left;color:var(--text)}.share-recipient.selected{background:#409cff13}
.share-recipient .avatar{width:50px;height:50px;min-width:50px;font-size:21px}.share-recipient-body{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.share-recipient-body strong{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.share-recipient-body small{color:var(--muted);font-size:12px}.share-recipient-check{width:24px;height:24px;border:1.5px solid #7776;border-radius:50%;text-align:center;color:white}.share-recipient.selected .share-recipient-check{background:var(--blue);border-color:var(--blue)}
#system-share-send{margin:0;flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#system-share-status:empty{display:none}
@media(max-width:700px){#system-share-dialog{width:100%;max-width:100%;height:85dvh;margin:auto 0 0;border-radius:24px 24px 0 0;padding-bottom:max(16px,env(safe-area-inset-bottom))}}
.theme-light .share-summary{background:#00000005}
