/* A shared, short motion vocabulary. Existing layout and drag transforms stay intact. */
/* The pill stays behind the controls and never intercepts a tap. */
.mobile-nav.nyvi-sliding-nav{isolation:isolate}
.mobile-nav.nyvi-sliding-nav>button{position:relative;z-index:1}
.calm-shell .mobile-nav.nyvi-sliding-nav>button{background:transparent;transition:color .16s ease,scale .16s ease}
.calm-shell .mobile-nav.nyvi-sliding-nav>button.selected{background:transparent}
.nyvi-nav-indicator{position:absolute;z-index:0;pointer-events:none;border-radius:16px;background:var(--soft);border:1px solid color-mix(in srgb,var(--accent) 20%,transparent)}
.nyvi-nav-indicator::after{content:'';position:absolute;bottom:3px;left:calc(50% - 8px);width:16px;height:3px;border-radius:6px;background:var(--accent-strong)}
/* Only the content changes scenes; the navigation remains live and stationary. */
:root{view-transition-name:none}
#view-content{view-transition-name:nyvi-content;background:var(--bg)}
/* The browser's transition layer is above normal z-index stacks: clip it before
   the fixed menu, including its safe-area padding. Never animate page height. */
::view-transition{pointer-events:none;clip-path:inset(0 0 var(--nyvi-scene-bottom,0px) 0)}
::view-transition-group(nyvi-content){animation:none}
::view-transition-image-pair(nyvi-content){isolation:isolate;background:var(--bg)}
::view-transition-old(nyvi-content){height:auto;mix-blend-mode:normal;animation:nyvi-scene-out 180ms ease both}
::view-transition-new(nyvi-content){height:auto;mix-blend-mode:normal;animation:nyvi-scene-in 180ms cubic-bezier(.22,1,.36,1) both}
@keyframes nyvi-scene-out{from{opacity:1;translate:0 0}45%,100%{opacity:0;translate:0 -4px}}
@keyframes nyvi-scene-in{0%,40%{opacity:0;translate:0 4px}to{opacity:1;translate:0 0}}
/* These dots exist only beside an actual loading message. */
#app p.loading::before{content:'';display:inline-block;width:6px;height:6px;margin:0 24px 2px 2px;border-radius:50%;background:var(--accent);box-shadow:9px 0 var(--accent),18px 0 var(--accent)}
@media(prefers-reduced-motion:no-preference){
 #app p.loading::before{animation:nyvi-loading 1s ease-in-out infinite}
 :where(#app,dialog,.account-shell) :where(button,.primary,.secondary,[role="button"]){transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,scale .16s ease}
 :where(#app,dialog,.account-shell) :where(button,.primary,.secondary,[role="button"]):not(:disabled):not([aria-disabled="true"]):active{scale:.97}
 :where(#app,dialog,.account-shell) :where(input,textarea,select){transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease}
 :where(#app,dialog,.account-shell) progress::-webkit-progress-value{transition:width .25s ease}
 dialog[open]{animation:nyvi-dialog .22s cubic-bezier(.22,1,.36,1)}
 dialog[open]::backdrop{animation:nyvi-backdrop .18s ease}
 #toast.visible{animation:nyvi-notice .22s ease-out}
 .mobile-nav button.selected{transition:background-color .2s ease,color .2s ease}
 @media(hover:hover) and (pointer:fine){
  :where(#app,dialog,.account-shell) :where(button,.primary,.secondary):not(:disabled):hover{box-shadow:0 3px 10px #0000000d}
 }
}
@keyframes nyvi-loading{0%,100%{opacity:.35}50%{opacity:1}}
/* Browsers supporting discrete display transitions can also animate a native close. */
@supports (transition-behavior:allow-discrete){
 @media(prefers-reduced-motion:no-preference){
  dialog{opacity:0;translate:0 10px;transition:opacity .18s ease,translate .18s ease,display .18s allow-discrete,overlay .18s allow-discrete}
  dialog[open]{opacity:1;translate:0 0;animation:none}
  dialog::backdrop{background-color:#0000;transition:background-color .18s ease,display .18s allow-discrete,overlay .18s allow-discrete}
  dialog[open]::backdrop{background-color:#0006;animation:none}
  @starting-style{dialog[open]{opacity:0;translate:0 10px}dialog[open]::backdrop{background-color:#0000}}
 }
}
@keyframes nyvi-dialog{from{opacity:.4;translate:0 12px}to{opacity:1;translate:0 0}}
@keyframes nyvi-backdrop{from{opacity:0}to{opacity:1}}
@keyframes nyvi-notice{from{opacity:.5;translate:0 8px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){
 ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
 :where(#app,dialog,.account-shell,#toast),:where(#app,dialog,.account-shell) *,dialog::backdrop{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
