.tour-spotlight {
  --tour-ring: rgb(168 85 247 / 0.9);
  --tour-halo: rgb(168 85 247 / 0.25);
  --tour-dim: rgb(15 23 42 / 0.62);
  box-shadow:
    0 0 0 2px var(--tour-ring),
    0 0 0 6px var(--tour-halo),
    0 0 0 200vmax var(--tour-dim);
  transition:
    top 450ms cubic-bezier(0.22, 1, 0.36, 1),
    left 450ms cubic-bezier(0.22, 1, 0.36, 1),
    width 450ms cubic-bezier(0.22, 1, 0.36, 1),
    height 450ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 300ms ease-out;
}

.tour-marker {
  box-shadow:
    0 0 0 2px rgb(168 85 247 / 0.9),
    0 0 0 6px rgb(168 85 247 / 0.25);
  transition:
    top 450ms cubic-bezier(0.22, 1, 0.36, 1),
    left 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

#tour[data-empty] .tour-spotlight {
  --tour-ring: transparent;
  --tour-halo: transparent;
}

.tour-card {
  transition:
    transform 450ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms ease-out;
}

@starting-style {
  .tour-card {
    opacity: 0;
  }

  .tour-spotlight {
    --tour-dim: transparent;
  }
}

.tour-progress {
  transition: scale 250ms linear;
}

#tour[data-instant] .tour-spotlight,
#tour[data-instant] .tour-marker,
#tour[data-instant] .tour-card,
#tour[data-instant] .tour-progress {
  transition: none;
}

.tour-avatar::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid rgb(168 85 247);
  border-radius: 9999px;
  opacity: 0;
}

#tour[data-playing="true"] .tour-avatar::after {
  animation: tour-ring 1800ms ease-out infinite;
}

.tour-equalizer {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

#tour[data-playing="true"] .tour-equalizer {
  display: inline-flex;
}

.tour-equalizer i {
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
  transform-origin: bottom;
  animation: tour-equalizer 900ms ease-in-out infinite;
}

.tour-equalizer i:nth-child(2) {
  animation-delay: -300ms;
}

.tour-equalizer i:nth-child(3) {
  animation-delay: -650ms;
}

.tour-equalizer i:nth-child(4) {
  animation-delay: -150ms;
}

@keyframes tour-ring {
  from {
    transform: scale(0.92);
    opacity: 0.7;
  }

  to {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes tour-equalizer {
  0%,
  100% {
    transform: scaleY(0.3);
  }

  50% {
    transform: scaleY(1);
  }
}

@media (prefers-color-scheme: dark) {
  .tour-spotlight {
    --tour-dim: rgb(2 6 23 / 0.72);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tour-spotlight,
  .tour-marker,
  .tour-card,
  .tour-progress {
    transition: none;
  }

  #tour[data-playing="true"] .tour-avatar::after {
    animation: none;
    opacity: 0.7;
  }

  .tour-equalizer i {
    animation: none;
    transform: scaleY(0.6);
  }

  .tour-equalizer i:nth-child(odd) {
    transform: scaleY(1);
  }
}
