/* A confirmed market interaction blooms above its place on the map. */
.map-feedback-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.map-feedback-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.map-heat-gain {
  position: absolute;
  top: 0;
  left: 0;
  width: 208px;
  margin-left: -104px;
  text-align: center;
  opacity: 1;
  transition: opacity 220ms ease-out;
}

.map-heat-gain.is-leaving {
  opacity: 0;
}

.map-heat-gain-art {
  position: relative;
  width: 144px;
  height: 154px;
  margin-inline: auto;
  transform-origin: 50% 92%;
}

.map-heat-gain-flame {
  width: 132px;
  height: 154px;
  overflow: visible;
  filter: drop-shadow(0 8px 13px rgb(148 63 27 / 0.28));
}

.gain-flame-outer {
  fill: #c34d2a;
  stroke: #fff8e7;
  stroke-width: 0.7;
}

.gain-flame-inner {
  fill: #ffd887;
}

.map-heat-gain-number {
  position: absolute;
  inset: 57px 0 auto;
  color: #fffdf5;
  font-size: 36px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 5px #79361e;
}

.map-heat-gain-caption {
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  background: var(--surface, #fbf9f3);
  color: var(--moss-dark, #263f30);
  box-shadow: 0 5px 16px rgb(44 39 21 / 0.16);
  border-radius: 5px;
}

.map-heat-gain-caption strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 16px;
}

.map-heat-gain-caption span {
  color: #7d3d1c;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* One constant-bright frame moves between candidates; it never flashes. */
.map-draw-frame {
  position: absolute;
  top: 0;
  left: 0;
  border: 3px solid #a56517;
  border-radius: 12px;
  background: rgb(255 226 153 / 0.1);
  box-shadow: 0 0 0 3px rgb(255 249 230 / 0.94), 0 6px 22px rgb(168 109 26 / 0.34);
}

.map-draw-frame.is-landed {
  border-color: var(--moss-dark, #263f30);
  background: rgb(211 230 200 / 0.12);
  box-shadow: 0 0 0 3px #fff8dc, 0 8px 26px rgb(53 84 65 / 0.28);
}

.map-draw-caption {
  position: absolute;
  bottom: max(94px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: min(82%, 400px);
  padding: 8px 16px;
  color: #fff8e7;
  background: var(--moss-dark, #263f30);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgb(24 38 29 / 0.2);
  font-family: var(--serif);
  font-size: 16px;
  text-align: center;
  text-wrap: balance;
}

.leaflet-custom-pin-wrap.blindbox-landed .stall-pin {
  transform: translate(-50%, -50%) scale(1.25);
}

.leaflet-custom-pin-wrap.blindbox-landed .stall-marker {
  border-color: var(--amber, #9a6216);
  background: #fff6d9;
}

@media (prefers-reduced-motion: no-preference) {
  .map-heat-gain-art {
    animation: market-heat-bloom 580ms ease-out both;
    animation-timing-function: linear(0, 0.48 15%, 1.1 43%, 0.98 70%, 1);
  }

  .map-draw-frame {
    transition: transform 85ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .leaflet-custom-pin-wrap.blindbox-landed .stall-pin {
    animation: market-draw-land 650ms ease-out both;
  }
}

@keyframes market-heat-bloom {
  from { transform: scale(0.36); }
  to { transform: scale(1); }
}

@keyframes market-draw-land {
  0% { transform: translate(-50%, -50%) scale(1); }
  44% { transform: translate(-50%, -50%) scale(1.52); }
  70% { transform: translate(-50%, -50%) scale(1.18); }
  100% { transform: translate(-50%, -50%) scale(1.25); }
}

@media (prefers-reduced-motion: reduce) {
  .leaflet-custom-pin-wrap.blindbox-landed .stall-pin {
    transform: translate(-50%, -50%);
    transition: none;
  }

  .stall-pin.hot .heat-flame svg,
  .stall-pin.voice-active .stall-marker::after {
    animation: none;
  }
}

@media (max-width: 540px) {
  .map-draw-caption {
    bottom: 108px;
    font-size: 14px;
  }
}
