/* Fit the supplied 600 × 420 drawings into the existing icon slots. */
.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure] {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}

.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure] > .ymb-illustration {
  --ymb-ink: #b9b9b9;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure] > .ymb-illustration > .ymb-figure {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  stroke: none;
  pointer-events: none;
  transition: color .2s ease-in-out;
}

.pullupSlider[data-ym-scrobbling-cards][data-bg="grey"] .item-icon[data-ym-scrobbling-figure] > .ymb-illustration,
.pullupSlider[data-ym-scrobbling-cards][data-bg="orange"] .item-icon[data-ym-scrobbling-figure] > .ymb-illustration,
.pullupSlider[data-ym-scrobbling-cards] .pullupSlider-item:hover .item-icon[data-ym-scrobbling-figure] > .ymb-illustration {
  --ymb-ink: #202020;
}

/* One SVG remains mounted at all times: pause preserves its current frame. */
:where(.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure]) > .ymb-illustration > .ymb-figure,
:where(.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure]) > .ymb-illustration > .ymb-figure * {
  animation-play-state: paused !important;
}

/* Intentional pointer hover follows the other feature cards. A touch does
   not start motion, including a sticky :hover on hybrid devices. */
@media (any-hover: hover) {
  :where(.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure][data-ym-scrobbling-hover="true"]) > .ymb-illustration > .ymb-figure,
  :where(.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure][data-ym-scrobbling-hover="true"]) > .ymb-illustration > .ymb-figure * {
    animation-play-state: running !important;
  }
}

/* Supplied runtime owns visibility pause; it always wins over hover. */
:where(.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure]) > .ymb-illustration > .ymb-figure[data-ymb-paused="true"],
:where(.pullupSlider[data-ym-scrobbling-cards] .item-icon[data-ym-scrobbling-figure]) > .ymb-illustration > .ymb-figure[data-ymb-paused="true"] * {
  animation-play-state: paused !important;
}

/* Queue continuity: native CSS, same 2.4 s step, no visible node handoff. */
.ymb-figure--queue[data-ymb-queue-cycle="continuous"] :is(.ymb-queue-step,.ymb-queue-front,.ymb-queue-enter,.ymb-queue-leave) {
  animation-name: ymb-queue-travel, ymb-queue-visibility;
  animation-duration: calc(var(--ymb-queue-duration,2.4s) * 7);
  animation-delay: calc(var(--ymb-queue-duration,2.4s) * var(--ymb-queue-phase,0));
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}
@keyframes ymb-queue-travel {
  0% { transform:translate(-46px,23.685047px); animation-timing-function:linear; }
  71.428571428571% { transform:translate(184px,-94.740188px); animation-timing-function:cubic-bezier(.333333,.166667,.666667,.5); }
  85.714285714286% { transform:translate(276px,-142.110282px); animation-timing-function:cubic-bezier(.333333,.5,.666667,.833333); }
  100% { transform:translate(368px,-189.480376px); }
}
@keyframes ymb-queue-visibility {
  0% { opacity:0; animation-timing-function:ease-in-out; }
  14.285714285714% { opacity:1; animation-timing-function:linear; }
  85.714285714286% { opacity:1; animation-timing-function:ease-in-out; }
  100% { opacity:0; }
}
