.bloom-garden-section {
  --bg3d-edge: #030208;     /* = the scene's own background edge colour */
  --bg3d-prev-bg: #06030f;  /* = bottom of the particle-heart section above */
  --bg3d-title: #fff1f8;
  --bg3d-text: #e6dcff;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
  padding: clamp(3rem, 9vh, 5.5rem) 0 calc(1.25rem + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  color: var(--bg3d-text);
  background:
    linear-gradient(to bottom, var(--bg3d-prev-bg), transparent) top center / 100% 120px no-repeat,
    var(--bg3d-edge);   /* the purple glow is drawn inside the canvas, which fades to this colour at its border */
}
.bloom-garden-section .bg3d__title {
  position: relative; z-index: 2; margin: 0;
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem); letter-spacing: .06em;
  color: var(--bg3d-title);
  text-shadow: 0 1px 10px rgba(26, 16, 64, .6);
}
.bloom-garden-section .bg3d__stage {
  /* full width (no max-width): the canvas paints the purple glow itself, so it must reach both screen edges */
  position: relative; z-index: 0; width: 100%;
  height: clamp(420px, 72vh, 920px);
  height: clamp(420px, calc(100svh - 8.5rem), 920px);
  overflow: hidden;
}
.bloom-garden-section .bg3d__canvas {
  display: block; width: 100%; height: 100%;
  touch-action: pan-y pinch-zoom;
}
/* while the selected textures load, a soft glow sits where the flower will appear */
.bloom-garden-section.bg3d--loading .bg3d__stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 46%, rgba(255, 196, 120, .16), transparent 30%);
}
.bloom-garden-section .bg3d__fallback {
  display: none; position: absolute; inset: 0; margin: 0; padding: 1rem;
  align-items: flex-end; justify-content: center; text-align: center; font-size: .8rem; opacity: .8;
  background: url("assets/poster.jpg") center 42% / auto 70% no-repeat;
  mix-blend-mode: screen;
}
.bloom-garden-section.bg3d--fallback .bg3d__fallback { display: flex; }
.bloom-garden-section .bg3d__hint {
  position: relative; z-index: 2; margin: .35rem 1.5rem 0; text-align: center;
  font-size: clamp(.8rem, 1.2vw, .95rem); letter-spacing: .12em; opacity: .7;
}
@media (max-width: 640px) {
  .bloom-garden-section { padding-top: 2.5rem; }
  .bloom-garden-section .bg3d__title { font-size: 1.15rem; }
  .bloom-garden-section .bg3d__stage { height: clamp(420px, calc(100svh - 7rem), 760px); }
  .bloom-garden-section .bg3d__hint { font-size: .75rem; letter-spacing: .06em; }
}
