.lt-stage {
  position: absolute;
  inset: 0;
}

.lt-stage .scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lt-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.lt-bulb {
  cursor: pointer;
}

.lt-bulb__glow {
  opacity: 0;
}

.lt-bulb__body {
  transform-box: fill-box;
  transform-origin: center;
}

.lt-bulb.is-new .lt-bulb__body {
  animation: lt-place 420ms var(--ease-emphasis);
}

@keyframes lt-place {
  0% {
    transform: scale(0.3);
  }
  60% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

.is-lit .lt-bulb__body {
  animation: lt-on 500ms var(--ease-emphasis) calc(var(--i) * 60ms) both;
}

@keyframes lt-on {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1.12);
  }
}

.is-lit .lt-bulb__glow {
  animation: lt-glow-in 400ms ease-out calc(var(--i) * 60ms) both, lt-glow 1.6s ease-in-out calc(400ms + var(--i) * 60ms) infinite;
}

@keyframes lt-glow-in {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lt-glow {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

.lt-bulb__glow {
  transform-box: fill-box;
  transform-origin: center;
}

.lt-sweep {
  pointer-events: none;
  animation: lt-sweep 1.4s ease-in-out both;
}

@keyframes lt-sweep {
  0% {
    transform: translateY(300px);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateY(-80px);
    opacity: 0;
  }
}

.lt-palette {
  display: flex;
  gap: var(--s-2);
}

.lt-swatch {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lt-swatch span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(58, 48, 44, 0.15);
}

.lt-swatch.is-on {
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.lt-swatch:active {
  transform: scale(0.94);
}

.lt-swatch:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 1.5px var(--accent);
}

.lt-count {
  flex: 1;
  align-self: center;
}

@media (prefers-reduced-motion: reduce) {
  .is-lit .lt-bulb__glow {
    animation: none;
    opacity: 0.8;
  }

  .is-lit .lt-bulb__body,
  .lt-bulb.is-new .lt-bulb__body,
  .lt-sweep {
    animation: none;
  }
}
