/* Motion communicates a user action, never a background message refresh.
   No JS, persistent compositor layers, staggered lists or layout-changing keyframes. */
:root { --motion-fast:120ms; --motion-enter:160ms; --motion-panel:200ms; --motion-ease:cubic-bezier(.2,.65,.3,1); }
@keyframes wob-surface-enter {
 from { opacity:.65; translate:0 4px; }
 to { opacity:1; translate:0 0; }
}
@keyframes wob-menu-enter {
 from { opacity:.5; }
 to { opacity:1; }
}
/* Independent translate leaves existing centering and PDF zoom transforms intact. */
dialog[open] { animation:wob-surface-enter var(--motion-enter) var(--motion-ease); }
dialog[open]::backdrop { animation:interface-fade var(--motion-enter) ease-out; }
:is(.react-pop,.dm-menu,#status-menu,.emoji-grid):not([hidden]),
:is(.phone-badge-panel,.dm-peer-badge-panel,.badge-label-popover):popover-open,
.badge-overflow-panel.open {
 animation:wob-menu-enter var(--motion-fast) ease-out;
}
/* Keep touch targets, icon positions and scroll anchors exactly where they are. */
:where(button,summary,.thread-row,.news-card,.conversation-button,.member-button) {
 transition:background-color var(--motion-fast) ease,color var(--motion-fast) ease,
  border-color var(--motion-fast) ease,box-shadow var(--motion-fast) ease,
  filter var(--motion-fast) ease,opacity var(--motion-fast) ease;
}
:where(button:enabled,summary):active { opacity:.82; }
.inline-chat-list { transition-duration:var(--motion-panel),var(--motion-enter),var(--motion-panel),var(--motion-enter); }
.inline-chat-list-inner { transition-duration:var(--motion-enter),var(--motion-panel); transition-delay:0s; }
.inline-chat-list .chat-channel { transition-duration:var(--motion-enter),var(--motion-fast),var(--motion-fast); }
/* Polling may reconstruct details: do not animate every newly rendered child. */
details[open]:not(.online-badge-group)>:not(summary) { animation:none; }
.profile-thread-list:not([hidden]),.admin-panel { animation:interface-fade var(--motion-enter) ease-out; }
@media(min-width:921px) {
 #app.forum-online-available { transition-duration:var(--motion-panel); }
 #app.forum-online-available .forum-online-panel { transition-duration:var(--motion-enter),var(--motion-panel),var(--motion-panel),var(--motion-panel); }
 /* Resizing is direct manipulation, not a panel-opening animation. */
 .sidebar-resizing #app { transition:none; }
}
@media(max-width:650px) {
 .channel-rail { transition-duration:var(--motion-enter),var(--motion-panel),var(--motion-panel); }
 .mobile-nav-scrim { transition-duration:var(--motion-enter),var(--motion-panel); }
 .mobile-admin-nav-open .admin-nav { animation:wob-menu-enter var(--motion-enter) ease-out; }
 .chat-online-open .chat-members { animation:wob-menu-enter var(--motion-enter) ease-out; }
}
/* Saving data also avoids decorative perpetual work, without hiding status text. */
.data-saver .typing-dots i,.data-saver .admin-skeleton { animation:none; }
@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
 :where(button:enabled,summary):active { opacity:1; }
}
