/* Lightweight library motion: short, local and never blocks navigation or images. */
@keyframes libraryPageArrive{
  from{opacity:.96;transform:translateY(3px)}
  to{opacity:1;transform:none}
}

@keyframes libraryCardEnter{
  from{opacity:0;transform:translateY(5px)}
  to{opacity:1;transform:translateY(0)}
}

body.library-shell>header,
body.library-shell>main,
body.library-shell>footer{
  animation:libraryPageArrive 140ms cubic-bezier(.22,1,.36,1) both;
}

@keyframes libraryFilterPanelEnter{
  from{opacity:0;transform:translateY(-4px) scale(.992)}
  to{opacity:1;transform:none}
}

.library-shell .material-card-shell{
  transition:transform 180ms cubic-bezier(.22,1,.36,1);
}

.library-shell .material-card-shell.is-reveal-pending{
  opacity:0;
  transform:translateY(5px);
}

.library-shell .material-card-shell.is-entering{
  will-change:opacity,transform;
  animation:libraryCardEnter 200ms cubic-bezier(.22,1,.36,1) both;
  animation-delay:var(--card-enter-delay,0ms);
}

.library-shell .library-grid .card{
  transition:box-shadow 180ms ease;
}

.library-shell .library-grid .card img{
  transition:transform 180ms cubic-bezier(.22,1,.36,1);
}

.library-shell .compact-filter-panel:not([hidden]){
  transform-origin:top right;
  animation:libraryFilterPanelEnter 180ms cubic-bezier(.22,1,.36,1) both;
}

@media(hover:hover) and (pointer:fine){
  .library-shell .material-card-shell:hover{transform:translateY(-2px)}
  .library-shell .material-card-shell:hover>.card{box-shadow:0 12px 28px rgba(52,45,35,.12)}
  .library-shell .library-grid .card:hover img{transform:scale(1.012)}
}

@media(prefers-reduced-motion:reduce){
  body.library-shell>header,
  body.library-shell>main,
  body.library-shell>footer,
  .library-shell .material-card-shell,
  .library-shell .material-card-shell.is-reveal-pending,
  .library-shell .material-card-shell.is-entering,
  .library-shell .library-grid .card,
  .library-shell .library-grid .card img,
  .library-shell .compact-filter-panel:not([hidden]){
    animation:none!important;
    transition:none!important;
    transform:none!important;
  }
}
