/* Lantern Harbor: the same dense upper mist as the Highlands.
   Self-contained texture, with two drifting layers and a clear lower edge.
   Loaded after harbor.css; scoped to the harbor to avoid existing mist rules. */
#world .harbor-upper-mist {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: var(--harbor-mist-opacity, .96);
  mix-blend-mode: screen;
  overflow: hidden;
  contain: layout paint;
  background: linear-gradient(to bottom,
    rgba(238, 248, 255, .40) 0%,
    rgba(238, 248, 255, .30) 24%,
    rgba(238, 248, 255, .16) 50%,
    rgba(238, 248, 255, .05) 76%,
    rgba(238, 248, 255, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 48%, rgba(0, 0, 0, .55) 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 48%, rgba(0, 0, 0, .55) 75%, transparent 100%);
}

#world .harbor-upper-mist::before, #world .harbor-upper-mist::after {
  content: "";
  position: absolute;
  left: -122px;
  top: -156px;
  width: 920px;
  height: 560px;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22920%22%20height%3D%22560%22%20viewBox%3D%220%200%20920%20560%22%3E%0A%3Cdefs%3E%0A%20%20%3CradialGradient%20id%3D%22haze%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23eef8ff%22%20stop-opacity%3D%22.48%22%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%22.30%22%20stop-color%3D%22%23dcefff%22%20stop-opacity%3D%22.30%22%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%22.65%22%20stop-color%3D%22%23dcefff%22%20stop-opacity%3D%22.10%22%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23dcefff%22%20stop-opacity%3D%220%22%2F%3E%0A%20%20%3C%2FradialGradient%3E%0A%20%20%3Cfilter%20id%3D%22soft%22%20x%3D%22-20%25%22%20y%3D%22-40%25%22%20width%3D%22140%25%22%20height%3D%22180%25%22%20color-interpolation-filters%3D%22sRGB%22%3E%0A%20%20%20%20%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.010%20.017%22%20numOctaves%3D%222%22%20seed%3D%2212%22%20result%3D%22noise%22%2F%3E%0A%20%20%20%20%3CfeDisplacementMap%20in%3D%22SourceGraphic%22%20in2%3D%22noise%22%20scale%3D%2242%22%20xChannelSelector%3D%22R%22%20yChannelSelector%3D%22G%22%2F%3E%0A%20%20%20%20%3CfeGaussianBlur%20stdDeviation%3D%2210%22%2F%3E%0A%20%20%3C%2Ffilter%3E%0A%3C%2Fdefs%3E%0A%3Cg%20fill%3D%22url%28%23haze%29%22%20filter%3D%22url%28%23soft%29%22%3E%0A%20%20%3Cellipse%20cx%3D%22200%22%20cy%3D%22250%22%20rx%3D%22250%22%20ry%3D%2295%22%2F%3E%0A%20%20%3Cellipse%20cx%3D%22610%22%20cy%3D%22340%22%20rx%3D%22280%22%20ry%3D%2280%22%2F%3E%0A%20%20%3Cellipse%20cx%3D%22660%22%20cy%3D%22140%22%20rx%3D%22210%22%20ry%3D%2265%22%2F%3E%0A%20%20%3Cellipse%20cx%3D%22360%22%20cy%3D%22440%22%20rx%3D%22240%22%20ry%3D%2270%22%2F%3E%0A%3C%2Fg%3E%0A%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  will-change: transform;
}

#world .harbor-upper-mist::before {
  opacity: .96;
  transform: translate3d(-28px, -8px, 0);
  animation: harbor-upper-mist-near-drift 52s ease-in-out -16s infinite alternate;
}

#world .harbor-upper-mist::after {
  opacity: .64;
  transform: translate3d(34px, 10px, 0) scaleX(-1);
  animation: harbor-upper-mist-far-drift 68s ease-in-out -31s infinite alternate;
}

@keyframes harbor-upper-mist-near-drift {
  from {
    transform: translate3d(-28px, -8px, 0);
  }

  to {
    transform: translate3d(36px, 8px, 0);
  }

}

@keyframes harbor-upper-mist-far-drift {
  from {
    transform: translate3d(34px, 10px, 0) scaleX(-1);
  }

  to {
    transform: translate3d(-32px, -6px, 0) scaleX(-1);
  }

}


.scene-paused #world .harbor-upper-mist::before,
.scene-paused #world .harbor-upper-mist::after {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  #world .harbor-upper-mist::before,
  #world .harbor-upper-mist::after {
    animation: none !important;
  }
}
