/* The map paints over the right edge. All five layers share the same footprint. */
.stage {isolation:isolate}
.scene-effects {mask-image:linear-gradient(to right,transparent 18%,#000 52%)}
.pitch-atmosphere {
  position:absolute;grid-area:1 / 1 / 2 / 2;inset:0 -3vw 0 -5vw;z-index:-1;
  overflow:hidden;pointer-events:none;
  mask-image:linear-gradient(to bottom,transparent,#000 10% 88%,transparent),
    linear-gradient(to right,#000 88%,transparent);
  mask-composite:intersect;
}
[data-atmosphere] {
  --dissolve:1.15s;
  position:absolute;inset:0;opacity:0;visibility:hidden;
  transition:opacity var(--dissolve) ease-in-out,visibility 0s linear var(--dissolve);
}
[data-atmosphere].is-current {opacity:1;visibility:visible;transition-delay:0s}
/* Keep the outgoing animation live through the dissolve, then skip its rendering. */
@supports (transition-behavior:allow-discrete) {
  [data-atmosphere] {
    content-visibility:hidden;
    transition:opacity var(--dissolve) ease-in-out,visibility 0s linear var(--dissolve),
      content-visibility var(--dissolve) allow-discrete;
  }
  [data-atmosphere].is-current {content-visibility:visible;transition-delay:0s}
}
[data-atmosphere]::before,[data-atmosphere]::after {content:"";position:absolute}
[data-atmosphere] i {position:absolute;left:var(--x);top:var(--y);border-radius:50%}
[data-atmosphere] i:nth-child(1) {--x:17%;--y:88%;--phase:-2s}
[data-atmosphere] i:nth-child(2) {--x:43%;--y:93%;--phase:-6s}
[data-atmosphere] i:nth-child(3) {--x:65%;--y:75%;--phase:-4s}
[data-atmosphere] i:nth-child(4) {--x:77%;--y:59%;--phase:-7s}
[data-atmosphere] i:nth-child(5) {--x:82%;--y:40%;--phase:-3s}
[data-atmosphere] i:nth-child(6) {--x:86%;--y:25%;--phase:-8s}

/* Leveling: two drifting banks of forest mist and slow fireflies. */
[data-atmosphere="level"] {--mist:#939568;--firefly:#ebda93}
body[data-faction="horde"] [data-atmosphere="level"] {--mist:#839c84;--firefly:#d1deb1}
[data-atmosphere="level"]::before,[data-atmosphere="level"]::after {
  mask:url("mist-veil.webp") center / 100% 100% no-repeat;background:var(--mist);
}
[data-atmosphere="level"]::before {
  width:116%;height:54%;left:15%;top:28%;opacity:.72;transform:rotate(-64deg);
  animation:mist-rise 16s ease-in-out -5s infinite alternate;
}
[data-atmosphere="level"]::after {
  width:118%;height:45%;left:-16%;bottom:-8%;opacity:.56;transform:rotate(-13deg);
  animation:mist-bank 21s ease-in-out -12s infinite alternate;
}
[data-atmosphere="level"] i {
  width:4px;height:4px;background:var(--firefly);box-shadow:0 0 7px 1px var(--mist);
  opacity:.45;animation:firefly 9s ease-in-out var(--phase) infinite;
}
@keyframes mist-rise {
  from {transform:translate(-4%,6%) rotate(-60deg) scaleY(.9)}
  to {transform:translate(5%,-6%) rotate(-70deg) scaleY(1.12)}
}
@keyframes mist-bank {
  from {transform:translate(-6%,4%) rotate(-10deg)}
  to {transform:translate(8%,-6%) rotate(-17deg) scaleY(1.14)}
}
@keyframes firefly {
  0% {opacity:0;transform:translate(0,12px) scale(.6)}
  30% {opacity:.85}
  60% {opacity:.55;transform:translate(-10px,-26px)}
  100% {opacity:0;transform:translate(9px,-62px) scale(.65)}
}

/* Light travels across the folds; the steel grain itself stays still. */
[data-atmosphere="gear"] {
  background:radial-gradient(ellipse at 84% 54%,#34465c5c,transparent 74%);
}
[data-atmosphere="gear"]::before {
  inset:-12%;
  background:radial-gradient(ellipse 24% 47% at 69% 53%,#9ebcdb30,transparent),
    radial-gradient(ellipse 31% 24% at 35% 84%,#9585b329,transparent);
  animation:steel-light 8s ease-in-out -2s infinite alternate;
}
.steel-surface {
  position:absolute;inset:0;overflow:hidden;
  mask-image:url("folded-steel.webp"),linear-gradient(110deg,#0003 10%,#0005 50%,#000 82%);
  mask-mode:luminance,alpha;mask-size:cover,100% 100%;mask-position:center;mask-repeat:no-repeat;
  mask-composite:intersect;
  background:linear-gradient(125deg,#8d9aae0d,#b7c4d32c 68%,#c0d1e522);
}
.steel-surface::before,.steel-surface::after {content:"";position:absolute;inset:-15% -40%}
.steel-surface::before {
  background:linear-gradient(119deg,transparent 26%,#8298bb38 37%,#def1fbaa 46%,#9bb2d25c 50%,transparent 63%);
  animation:steel-reflection 6.8s ease-in-out -2.2s infinite alternate;
}
.steel-surface::after {
  background:radial-gradient(ellipse 21% 32% at 54% 69%,#e9ceab85,transparent);
  animation:steel-reflection 9.6s ease-in-out -5.1s infinite alternate-reverse;
}
@keyframes steel-reflection {from {transform:translate(-22%,6%)} to {transform:translate(27%,-7%)}}
@keyframes steel-light {from {transform:translate(-10%,3%)} to {transform:translate(9%,-4%)}}

/* PvP: hot pinpoints lead long copper trails blown up and across the scene. */
[data-atmosphere="pvp"]::before {
  inset:0;background:radial-gradient(ellipse 74% 42% at 68% 99%,#ff792275,transparent),
    radial-gradient(ellipse 33% 50% at 86% 66%,#c84a2854,transparent);
}
[data-atmosphere="pvp"]::after {
  inset:62% -12% -17% -5%;z-index:-1;
  mask:url("mist-veil.webp") center / 100% 100% no-repeat;
  background:linear-gradient(25deg,#9e3219 12%,#ef6b22 45%,#ffb44e 57%,#ca3d19 84%);
  opacity:.68;transform-origin:70% 90%;animation:ember-updraft 5.4s ease-in-out -2s infinite alternate;
}
@keyframes ember-updraft {
  from {transform:translate(-2%,4%) rotate(-9deg) scaleY(.85);opacity:.48}
  to {transform:translate(3%,-8%) rotate(-15deg) scaleY(1.14);opacity:.78}
}
[data-atmosphere="pvp"] i {
  --carry:64px;--rise:150px;
  width:var(--length,22px);height:2px;opacity:.84;transform:rotate(-55deg);
  background:linear-gradient(90deg,transparent,#fa591f7d 30%,#ff9a39 73%,#fff3be);
  filter:drop-shadow(0 0 3px #ff753db8);
  animation:flying-ember var(--flight,3.2s) linear var(--phase) infinite;
}
[data-atmosphere="pvp"] i::before {
  content:"";position:absolute;right:0;top:-.5px;width:4px;height:3px;
  border-radius:50%;background:#fff1ab;box-shadow:0 0 5px 1px #ff963ead;
}
[data-atmosphere="pvp"] i:nth-child(3n + 1) {--length:11px;--carry:38px;--rise:116px;--flight:4.6s}
[data-atmosphere="pvp"] i:nth-child(3n + 2) {--length:37px;--carry:83px;--rise:175px;--flight:3.6s}
[data-atmosphere="pvp"] i:nth-child(3n + 1)::after {
  content:"";position:absolute;right:12px;top:7px;width:4px;height:2px;border-radius:50%;background:#ffbf79;
}
[data-atmosphere="pvp"] i:nth-child(7) {--x:69%;--y:93%;--phase:-.6s}
[data-atmosphere="pvp"] i:nth-child(8) {--x:55%;--y:64%;--phase:-1.8s}
[data-atmosphere="pvp"] i:nth-child(9) {--x:79%;--y:83%;--phase:-2.3s}
[data-atmosphere="pvp"] i:nth-child(10) {--x:11%;--y:68%;--phase:-1.4s}
[data-atmosphere="pvp"] i:nth-child(11) {--x:30%;--y:101%;--phase:-1.1s}
[data-atmosphere="pvp"] i:nth-child(12) {--x:52%;--y:86%;--phase:-.3s}
[data-atmosphere="pvp"] i:nth-child(13) {--x:68%;--y:52%;--phase:-2.1s}
[data-atmosphere="pvp"] i:nth-child(14) {--x:76%;--y:99%;--phase:-1.7s}
[data-atmosphere="pvp"] i:nth-child(15) {--x:84%;--y:72%;--phase:-2.6s}
[data-atmosphere="pvp"] i:nth-child(16) {--x:57%;--y:95%;--phase:-.8s}
[data-atmosphere="pvp"] i:nth-child(17) {--x:74%;--y:43%;--phase:-.45s}
[data-atmosphere="pvp"] i:nth-child(18) {--x:38%;--y:79%;--phase:-1.2s}
[data-atmosphere="pvp"] i:nth-child(19) {--x:83%;--y:95%;--phase:-3.2s}
[data-atmosphere="pvp"] i:nth-child(20) {--x:20%;--y:94%;--phase:-2.15s}
[data-atmosphere="pvp"] i:nth-child(21) {--x:71%;--y:63%;--phase:-.95s}
@keyframes flying-ember {
  0% {opacity:0;transform:translate(-12px,20px) rotate(-72deg) scaleX(.36)}
  16% {opacity:.98}
  61% {opacity:.9;transform:translate(calc(var(--carry) * .4),calc(var(--rise) * -.47)) rotate(-58deg)}
  100% {opacity:0;transform:translate(var(--carry),calc(0px - var(--rise))) rotate(-43deg) scaleX(.48)}
}

/* Dungeons: dust descends through broken shafts of lantern light. */
[data-atmosphere="mine"]::before {
  inset:0;background:conic-gradient(from 0deg at 95% -12%,transparent 183deg,#d9ad6f1c 188deg,
    transparent 190deg 196deg,#ffce8547 200deg,#ffd99024 202deg,transparent 205deg 213deg,#ddbb7a1f 216deg,transparent 218deg);
  mask-image:linear-gradient(#000 12%,#000b 58%,transparent 100%);
  transform-origin:95% 0;animation:lantern-shaft 9s ease-in-out infinite alternate;
}
[data-atmosphere="mine"] i {
  width:4px;height:2px;background:#edce9a;box-shadow:0 0 6px #f7d49c88;opacity:.55;
  animation:falling-dust 11s ease-in-out var(--phase) infinite;
}
@keyframes lantern-shaft {from {transform:rotate(-2deg);opacity:.65} to {transform:rotate(2deg);opacity:1}}
@keyframes falling-dust {
  0% {opacity:0;transform:translate(0,-44px)}
  28%,65% {opacity:.7}
  100% {opacity:0;transform:translate(14px,34px)}
}

/* Fishing: low reflections drift sideways and ripple rings spread on the water. */
[data-atmosphere="river"]::before {
  inset:44% -8% -10%;
  background:radial-gradient(ellipse 34% 1.2% at 79% 43%,#ccffdf63,transparent),
    radial-gradient(ellipse 21% 1.5% at 68% 50%,#a8f5d673,transparent),
    radial-gradient(ellipse 30% 2% at 40% 69%,#9be3cb59,transparent),
    repeating-radial-gradient(ellipse 80% 29% at 60% 100%,transparent 84%,#7edde144 94%,transparent 100%);
  mask:url("mist-veil.webp") center / 112% 120% no-repeat;
  animation:water-light 11s ease-in-out infinite alternate;
}
[data-atmosphere="river"] i {
  top:calc(45% + var(--y) / 2);width:70px;height:14px;
  border:1px solid #a5e5d88c;border-left-color:transparent;opacity:.48;
  animation:water-ring 6.4s ease-out var(--phase) infinite;
}
[data-atmosphere="river"] i::after {
  content:"";position:absolute;inset:2px 7px;border-radius:50%;
  border-bottom:1px solid #a0ead9a6;
}
@keyframes water-light {from {transform:translate(-3%,1%)} to {transform:translate(4%,-3%)}}
@keyframes water-ring {
  0% {opacity:0;transform:scale(.18)}
  24% {opacity:.8}
  100% {opacity:0;transform:scale(1.6)}
}

body[data-ambient-paused] [data-atmosphere] i,
body[data-ambient-paused] .steel-surface::before,
body[data-ambient-paused] .steel-surface::after,
body[data-ambient-paused] [data-atmosphere]::before,
body[data-ambient-paused] [data-atmosphere]::after {animation-play-state:paused}
@media (forced-colors:active) {.pitch-atmosphere {display:none}}
