/* 模块化声境预设：共享 Canvas 壳层只负责分层、显隐和转场。 */
#soundscape-presets-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  pointer-events: none !important;
  user-select: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.008);
  transition:
    opacity 680ms cubic-bezier(.22, 1, .36, 1),
    visibility 680ms step-end,
    transform 900ms cubic-bezier(.22, 1, .36, 1),
    filter 720ms ease;
  contain: strict;
  will-change: auto;
}

#soundscape-presets-canvas.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition-delay: 0ms;
  will-change: opacity, transform;
}

#canvas-container > canvas:not(#soundscape-presets-canvas) {
  position: relative;
  z-index: 1;
}

body.soundscape-preset-active #canvas-container {
  pointer-events: auto;
}

body.soundscape-preset-active #album-bg {
  opacity: .08 !important;
}

body.soundscape-preset-active #idle-guide-canvas {
  opacity: 0 !important;
  visibility: hidden !important;
}

body.soundscape-preset-aurora #soundscape-presets-canvas {
  filter: saturate(1.06) contrast(1.02);
}

body.soundscape-preset-neon-rain #soundscape-presets-canvas {
  filter: saturate(1.12) contrast(1.04);
}

body.soundscape-preset-ink #soundscape-presets-canvas {
  filter: saturate(.86) contrast(1.015);
}

body.soundscape-preset-clean-stage #soundscape-presets-canvas {
  filter: saturate(.92);
}

html.visual-preset-switching #soundscape-presets-canvas.is-active {
  transform: scale(1.003);
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  #soundscape-presets-canvas,
  #soundscape-presets-canvas.is-active,
  html.visual-preset-switching #soundscape-presets-canvas.is-active {
    transform: none;
    filter: none !important;
    transition-duration: 360ms, 360ms, 480ms, 420ms;
    will-change: opacity;
  }
}

@media (prefers-reduced-motion: reduce) {
  #soundscape-presets-canvas,
  #soundscape-presets-canvas.is-active,
  html.visual-preset-switching #soundscape-presets-canvas.is-active {
    transform: none;
    transition: opacity 120ms linear, visibility 120ms step-end;
    will-change: auto;
  }
}
