/* Home-specific overrides (most layout is coordinate-driven) */
.poster-stage--home {
  background: #fff;
}

/* Classic map-marker bounce — all pins in sync, subtle but noticeable */
@keyframes pin-marker-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 4px 8px rgba(255, 160, 40, 0.35));
  }
  50% {
    transform: translateY(-72px) scale(1.06);
    filter: drop-shadow(0 10px 14px rgba(255, 170, 45, 0.55));
  }
}

.poster-stage--home .pin-pulse {
  animation: pin-marker-bounce 1.6s ease-in-out infinite;
}

/* ── Spot selection FX (home → spot navigation) ── */
.spot-illus--concealed {
  visibility: hidden;
}

html.spot-select-fx-lock,
html.spot-select-fx-lock body {
  overflow: hidden;
  touch-action: none;
}

.spot-select-fx {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
}

/* PC hover: hit-test illustration bounds on mousemove */
.spot-hover-root {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
  overflow: visible;
}

.spot-hover-root__figure {
  position: absolute;
  margin: 0;
  transform: scale(1);
  transform-origin: center center;
  opacity: 0;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.28));
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease-out,
    filter 320ms ease-out;
}

.spot-hover-root__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.spot-hover-root--visible .spot-hover-root__figure {
  opacity: 1;
  transform: scale(1.12);
  filter: drop-shadow(0 22px 48px rgba(0, 0, 0, 0.45));
}

/* Click FX: image pop only (no backdrop) */
.spot-select-fx__backdrop {
  display: none;
}

.spot-select-fx__figure {
  position: fixed;
  left: var(--fx-left, 0);
  top: var(--fx-top, 0);
  width: var(--fx-width, 0);
  height: var(--fx-height, 0);
  margin: 0;
  z-index: 2;
  transform-origin: center center;
  transform: scale(1);
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.28));
  background: transparent;
  isolation: isolate;
}

.spot-select-fx__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.spot-select-fx__glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 55%,
    rgba(255, 220, 140, 0.55) 0%,
    rgba(255, 180, 60, 0.22) 42%,
    transparent 72%
  );
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

.spot-select-fx__shine {
  position: absolute;
  inset: -8%;
  background: linear-gradient(
    125deg,
    transparent 30%,
    rgba(255, 255, 255, 0.72) 48%,
    transparent 62%
  );
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes spot-select-pop {
  0% {
    transform: scale(1) translateZ(0);
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.28));
  }
  16% {
    transform: scale(1.08) translateZ(0);
    filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.38));
  }
  30% {
    transform: scale(1.15) translateZ(0);
    filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.5)) brightness(1.18);
  }
  42% {
    transform: scale(1.12) translateZ(0);
    filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.46)) brightness(1.38);
  }
  54% {
    transform: scale(1.1) translateZ(0);
    filter: drop-shadow(0 20px 42px rgba(0, 0, 0, 0.4)) brightness(1.12);
  }
  72% {
    transform: scale(1.04) translateZ(0);
    filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.32));
  }
  100% {
    transform: scale(1) translateZ(0);
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.28));
  }
}

@keyframes spot-select-glow-pulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.85);
  }
  34% {
    opacity: 0.95;
    transform: scale(1.05);
  }
  48% {
    opacity: 0.7;
    transform: scale(1);
  }
  72% {
    opacity: 0.15;
    transform: scale(0.95);
  }
}

@keyframes spot-select-shine-flash {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-30%) skewX(-8deg);
  }
  38% {
    opacity: 0.85;
    transform: translateX(8%) skewX(-8deg);
  }
  50% {
    opacity: 0;
    transform: translateX(24%) skewX(-8deg);
  }
}

.spot-select-fx--click.spot-select-fx--active .spot-select-fx__figure {
  animation: spot-select-pop 640ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.spot-select-fx--click.spot-select-fx--active .spot-select-fx__shine {
  animation: spot-select-shine-flash 640ms ease-out forwards;
}

.spot-select-fx--exit .spot-select-fx__figure,
.spot-select-fx--exit .spot-select-fx__shine {
  animation: none;
  opacity: 0;
  transition: opacity 0ms;
}

@media (prefers-reduced-motion: reduce) {
  .spot-select-fx,
  .spot-hover-root,
  .spot-illus--concealed {
    display: none !important;
    visibility: visible !important;
  }
}
