/* Whole image sprites: only uniform scale, translation and opacity animate. */
.candle-trail {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.candle-trail__sprite {
  position: absolute;
  display: block;
  width: 24px;
  height: auto;
  max-width: none;
  opacity: 0;
  transform-origin: center;
  pointer-events: none;
  user-select: none;
}

.candle-sound {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 1px solid var(--rim);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-dim);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.candle-sound:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.candle-sound svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.candle-sound__mute,
.candle-sound[aria-pressed='false'] .candle-sound__waves,
.candle-sound[hidden] {
  display: none;
}

.candle-sound[aria-pressed='false'] .candle-sound__mute {
  display: block;
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .candle-sound,
  .candle-trail {
    display: none;
  }
}
