/* SpinZ CZ app motion, 12 Nov 2026 (owner: "go fully animated, no static interactions"). One file for the shell, every tool and the account pages.
   Timing comes from the transitions.dev scale (the tokens below). Rules of this file:
   - every rule sits in :where(), so it has NO weight: any tool rule that sets its own transition or animation wins, nothing existing is overridden;
   - only colour, opacity, shadow and the stand-alone scale / translate properties move (they add to a tool's own transform, they never replace it);
   - opens are 250 ms, closes 150 ms, never a bounce on a close; people who ask for less motion get none. */
:root{
  --duration-stagger:40ms;--duration-micro:80ms;--duration-quick:150ms;--duration-fast:250ms;--duration-medium:350ms;--duration-slow:400ms;--duration-very-slow:500ms;
  --ease-smooth-out:cubic-bezier(0.22,1,0.36,1);--ease-in-out:ease-in-out;--ease-out:ease-out;--ease-linear:linear;--ease-bounce:cubic-bezier(0.34,1.36,0.64,1);
  --distance-micro:4px;--distance-small:6px;--distance-base:8px;--distance-medium:12px;--distance-large:30px;
  --scale-large:0.96;--scale-medium:0.97;--scale-small:0.98;--scale-tiny:0.99;
  --blur-small:2px;--blur-medium:3px;--blur-large:8px;
  interpolate-size:allow-keywords;
}

/* 1. Hover, focus, chosen and disabled states ease instead of snapping (on the things you can press, and on rows and cards). */
:where(html[data-spinz-workspace],html.workspace-embedded) :where(a,button,summary,label,input,select,textarea,[role=button],[role=tab],[role=option],[role=menuitem],[role=switch],[role=checkbox],[role=radio],[tabindex],li,tr,article,details,.ui-btn,.ui-chip,.ui-ib,.ui-r,.ui-card,.ui-tile,.ui-q,.ui-big,.ui-cov){transition-property:color,background-color,border-color,outline-color,text-decoration-color,box-shadow,opacity,scale,translate;transition-duration:var(--duration-quick);transition-timing-function:var(--ease-smooth-out)}

/* 2. A press gives way a little. */
:where(html[data-spinz-workspace],html.workspace-embedded) :where(button,[role=button],summary,.ui-btn,.ui-chip,.ui-ib,.nav-item,.tool-card,.home-make-card,.home-finish-card):where(:active):where(:not(:disabled,[aria-disabled=true])){scale:var(--scale-medium);transition-duration:var(--duration-micro)}

/* 3. Pop-ups open and close (modal recipe: open 250 ms from 96%, close 150 ms), with their dark backdrop. */
:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog){opacity:0;scale:var(--scale-large);transition:opacity var(--duration-quick) var(--ease-smooth-out),scale var(--duration-quick) var(--ease-smooth-out),translate var(--duration-quick) var(--ease-smooth-out),overlay var(--duration-quick) allow-discrete,display var(--duration-quick) allow-discrete}
:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog[open]){opacity:1;scale:1;translate:0 0;transition-duration:var(--duration-fast)}
@starting-style{:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog[open]){opacity:0;scale:var(--scale-large)}}
:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog)::backdrop{opacity:0;transition:opacity var(--duration-quick) var(--ease-smooth-out),overlay var(--duration-quick) allow-discrete,display var(--duration-quick) allow-discrete}
:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog[open])::backdrop{opacity:1;transition-duration:var(--duration-fast)}
@starting-style{:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog[open])::backdrop{opacity:0}}
@media(max-width:760px){
 /* on phones a pop-up is a sheet: it rises from below instead of growing */
 :where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog){scale:1;translate:0 var(--distance-large)}
 :where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog[open]){scale:1;translate:0 0}
 @starting-style{:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog[open]){scale:1;translate:0 var(--distance-large)}}
}

/* 4. Things that open in place (accordion recipe, 250 ms both ways). Menus fade; plain disclosures also grow. */
:where(html[data-spinz-workspace],html.workspace-embedded) :where(details)::details-content{opacity:0;transition:opacity var(--duration-fast) var(--ease-smooth-out),block-size var(--duration-fast) var(--ease-smooth-out),content-visibility var(--duration-fast) allow-discrete}
:where(html[data-spinz-workspace],html.workspace-embedded) :where(details[open])::details-content{opacity:1}
:where(html[data-spinz-workspace],html.workspace-embedded) :where(details:not(.row-menu,.ui-more,[class*=menu],[class*=more]))::details-content{block-size:0;overflow:clip}
:where(html[data-spinz-workspace],html.workspace-embedded) :where(details[open]:not(.row-menu,.ui-more,[class*=menu],[class*=more]))::details-content{block-size:auto}
:where(html[data-spinz-workspace],html.workspace-embedded) :where(summary) :where(svg){transition:rotate var(--duration-fast) var(--ease-smooth-out)}

/* 5. Menus, messages and panels arrive instead of appearing (dropdown recipe: 250 ms from 97%; text reveal: 12 px). */
:where(html[data-spinz-workspace],html.workspace-embedded) :where(.ui-menu,.row-menu-panel,[role=menu],[role=listbox]){transform-origin:top right;transition:opacity var(--duration-fast) var(--ease-smooth-out),scale var(--duration-fast) var(--ease-smooth-out),translate var(--duration-fast) var(--ease-smooth-out)}
@starting-style{:where(html[data-spinz-workspace],html.workspace-embedded) :where(.ui-menu,.row-menu-panel,[role=menu],[role=listbox]){opacity:0;scale:var(--scale-medium);translate:0 calc(var(--distance-micro) * -1)}}
:where(html[data-spinz-workspace],html.workspace-embedded) :where([role=tabpanel],[role=alert],.ui-toast,.ui-note,.ui-empty,.ui-sheet){transition:opacity var(--duration-fast) var(--ease-smooth-out),translate var(--duration-fast) var(--ease-smooth-out)}
@starting-style{:where(html[data-spinz-workspace],html.workspace-embedded) :where([role=tabpanel],[role=alert],.ui-toast,.ui-note,.ui-empty,.ui-sheet){opacity:0;translate:0 var(--distance-base)}}

/* 6. The app shell: toast, docked player, bell panel, picture cards. */
html[data-spinz-workspace] :where(#app-toast,#app-player){transition:opacity var(--duration-fast) var(--ease-smooth-out),translate var(--duration-fast) var(--ease-smooth-out),display var(--duration-medium) allow-discrete}
html[data-spinz-workspace] :where(#app-toast,#app-player):where([hidden]){opacity:0;translate:0 var(--distance-medium);transition-duration:var(--duration-medium)}
@starting-style{html[data-spinz-workspace] :where(#app-toast,#app-player):where(:not([hidden])){opacity:0;translate:0 var(--distance-medium)}}
html[data-spinz-workspace] :where(.ntc-sheet){transition:translate var(--duration-slow) var(--ease-smooth-out)}
@starting-style{html[data-spinz-workspace] :where(dialog[open] .ntc-sheet){translate:var(--distance-large) 0}}
html[data-spinz-workspace] :where(.home-art){transition:scale var(--duration-slow) var(--ease-smooth-out)}
html[data-spinz-workspace] :where(.home-make-card:hover .home-art){scale:1.04}
html[data-spinz-workspace] :where(.tool-list-arrow,.out-arrow){transition:translate var(--duration-fast) var(--ease-smooth-out)}
html[data-spinz-workspace] :where(a:hover>.tool-list-arrow){translate:3px 0}
html[data-spinz-workspace] :where(a:hover>.out-arrow){translate:2px -2px}
html[data-spinz-workspace] :where(.ntc-badge,.tool-new-badge){transition:scale var(--duration-very-slow) var(--ease-bounce),opacity var(--duration-fast) var(--ease-smooth-out)}
@starting-style{html[data-spinz-workspace] :where(.ntc-badge:not([hidden])){scale:0;opacity:0}}

/* 6b. The shell's lists arrive: rows and cards rise in one after another (40 ms apart, first eight only). */
@keyframes ui-arrive{from{opacity:0;translate:0 var(--distance-base)}}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item){animation:ui-arrive var(--duration-fast) var(--ease-smooth-out) backwards}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item):where(:nth-child(2)){animation-delay:40ms}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item):where(:nth-child(3)){animation-delay:80ms}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item):where(:nth-child(4)){animation-delay:120ms}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item):where(:nth-child(5)){animation-delay:160ms}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item):where(:nth-child(6)){animation-delay:200ms}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item):where(:nth-child(7)){animation-delay:240ms}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item):where(:nth-child(8)){animation-delay:280ms}
html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item):where(:nth-child(n+9)){animation-delay:320ms}

/* 7. People who ask their device for less motion get none of this. */
@media(prefers-reduced-motion:reduce){
 html[data-spinz-workspace] :where(.library-row,.home-make-card,.home-finish-card,.tool-card,.ntc-item){animation:none}
 :where(html[data-spinz-workspace],html.workspace-embedded) :where(*,::before,::after){transition-duration:.01ms!important;transition-delay:0s!important}
 :where(html[data-spinz-workspace],html.workspace-embedded) :where(details)::details-content,:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog)::backdrop{transition-duration:.01ms!important}
 :where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog),:where(html[data-spinz-workspace],html.workspace-embedded) :where(dialog[open]){scale:1;translate:0 0}
}
