/* Mode transitions (mode-transitions.mjs; owner, 1 Oct 2026: "more like a smooth transition"). Every mode page links this
   in its <head>, so both sides of a navigation opt in: the old page fades out with the slightest push forward and the new
   one fades in. Same-origin navigations only (the browser's rule); browsers without cross-document view transitions just
   navigate. Scoped to the "uw-mode" transition type so the Command Deck's own in-page transitions (ui-panels.css) keep
   their timing. Reduced motion: no zoom, a short plain fade. */
@view-transition{navigation:auto;types:uw-mode}
html:active-view-transition-type(uw-mode)::view-transition-group(root){animation-duration:.36s}
html:active-view-transition-type(uw-mode)::view-transition-old(root){animation:uw-mode-out .3s cubic-bezier(.4,0,1,1) both}
html:active-view-transition-type(uw-mode)::view-transition-new(root){animation:uw-mode-in .36s cubic-bezier(0,0,.2,1) both}
@keyframes uw-mode-out{to{opacity:0;transform:scale(1.02)}}
@keyframes uw-mode-in{from{opacity:0}}
/* (!important: ui-panels.css stops every view-transition animation under reduced motion; a mode change still fades) */
@media (prefers-reduced-motion:reduce){
 html:active-view-transition-type(uw-mode)::view-transition-group(root){animation-duration:.15s!important}
 html:active-view-transition-type(uw-mode)::view-transition-old(root){animation:uw-mode-fade .15s linear both!important}
 html:active-view-transition-type(uw-mode)::view-transition-new(root){animation:uw-mode-fade .15s linear reverse both!important}
}
@keyframes uw-mode-fade{to{opacity:0}}
