.acs-collage{
  --acs-gap:14px;
  display:flex;
  flex-direction:column;
  gap:var(--acs-gap);
  width:100%;
  overflow:hidden;
}
.acs-collage.has-fade{
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 7%,#000 93%,transparent 100%);
          mask-image:linear-gradient(90deg,transparent 0,#000 7%,#000 93%,transparent 100%);
}
.acs-lane{
  position:relative;
  height:220px;
  overflow:hidden;
}
.acs-track{
  display:flex;
  width:max-content;
  height:100%;
  will-change:transform;
  transform:translate3d(0,0,0);
  backface-visibility:hidden;
  animation:acs-scroll var(--acs-dur,40s) linear infinite;
  animation-delay:var(--acs-delay,0s);
}
.acs-lane[data-dir="right"] .acs-track{ animation-direction:reverse; }
.acs-collage.is-pausable:hover .acs-track{ animation-play-state:paused; }

.acs-group{
  display:flex;
  flex:0 0 auto;
  height:100%;
}
.acs-collage .acs-lane .acs-tile{
  position:relative;
  flex:0 0 auto;
  height:100%;
  aspect-ratio:var(--ar,1.4);
  margin:0 var(--acs-gap) 0 0;
  border-radius:16px;
  box-sizing:border-box;
  overflow:hidden;
  background:#e9ecf1;
  transform:translateZ(0);
}
.acs-tile img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  max-width:none;
  user-select:none;
  -webkit-user-drag:none;
  transition:transform .6s cubic-bezier(.2,.7,.2,1);
}
.acs-collage.has-zoom .acs-tile:hover img{ transform:scale(1.06); }

@keyframes acs-scroll{
  from{ transform:translate3d(0,0,0); }
  to{   transform:translate3d(calc(var(--acs-shift,1000px) * -1),0,0); }
}

@media (prefers-reduced-motion:reduce){
  .acs-track{ animation:none; }
  .acs-lane{ overflow-x:auto; }
}

/* ---------- Collage layout (stacked columns, no cropping) ---------- */
.acs-lane--collage{ --acs-h:480px; height:480px; }
.acs-collage .acs-col{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  gap:var(--acs-gap);
  box-sizing:border-box;
  height:100%;
  /* width so that stacked images (own ratios) exactly fill the column height */
  width:calc(
    (var(--acs-h) * (1 - var(--pt,0) - var(--pb,0)) - var(--acs-gap) * (var(--n,1) - 1))
    / var(--inv,1)
  );
  margin:0 var(--acs-gap) 0 0;
  padding-top:calc(var(--acs-h) * var(--pt,0));
  padding-bottom:calc(var(--acs-h) * var(--pb,0));
}
.acs-collage .acs-col .acs-tile{
  flex:0 0 auto;
  width:100%;
  height:auto;
  aspect-ratio:var(--ar,1.5);
  margin:0;
}
.acs-collage .acs-col .acs-tile img{ object-fit:cover; }
