.step .routine-art {
  order: 1;
  width: min(100%, clamp(178px, 16vw, 218px));
  aspect-ratio: 1;
  padding: 0;
  position: relative;
  border: 6px solid white;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 3px #d6e7ba;
  overflow: hidden;
}
.step .routine-art img, .routine-art canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; box-shadow: none; border-radius: 0;
}
.routine-art canvas { pointer-events: none; }
@media (max-width: 800px) {
  .steps .step { gap: 14px; }
  .steps .step h3 { margin-top: 0; }
}
/* Each label leads for one third of the shared routine. */
.steps {
  --step-beat: .95s;
  --routine-cycle: calc(3 * var(--step-beat));
}
.steps.in-flow .step { --step-delay: 0s; }
.steps.in-flow .step:nth-child(2) { --step-delay: calc(-2 * var(--step-beat)); }
.steps.in-flow .step:nth-child(3) { --step-delay: calc(-1 * var(--step-beat)); }
.steps.in-flow .step h3 {
  animation: routine-label var(--routine-cycle) ease-in-out var(--step-delay) infinite;
}
.steps.in-flow .step p {
  animation: routine-description var(--routine-cycle) ease-in-out var(--step-delay) infinite;
}
@keyframes routine-label {
  33.333%, 91% {
    transform: translateY(0) scale(1);
    color: white;
    background-color: var(--purple);
  }
  0%, 24%, 100% {
    transform: translateY(-1px) scale(1.015);
    color: #341265;
    background-color: #ade600;
  }
}
@keyframes routine-description {
  0%, 33.333%, 100% { transform: translateY(0); }
  7%, 27% { transform: translateY(-1px); }
}
.motion-off .steps.in-flow .step :is(h3, p) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .steps.in-flow .step :is(h3, p) { animation: none; }
}
