[data-hall-light] {
  --hall-grade: brightness(1.06) saturate(1.04);
  --hall-sky: #fbe0ab24;
  --hall-shadow: #12272314;
  --hall-glow-strength: .68;
}
[data-hall-light="dawn"] {
  --hall-grade: brightness(.94) saturate(.86);
  --hall-sky: #ffc4a452;
  --hall-shadow: #26213d47;
  --hall-glow-strength: .81;
}
[data-hall-light="evening"] {
  --hall-grade: brightness(.91) saturate(1.14) sepia(.12);
  --hall-sky: #ffb16552;
  --hall-shadow: #2915144d;
  --hall-glow-strength: .91;
}
[data-hall-light="night"] {
  --hall-grade: brightness(.77) saturate(.87);
  --hall-sky: #7694d03e;
  --hall-shadow: #0d1d4b61;
  --hall-glow-strength: 1;
}
.entrance-panorama[data-hall-light] > img,
#office[data-hall-light] .scene-img {
  filter: var(--hall-grade);
  transition: filter .7s ease;
}
.entrance-panorama[data-hall-light] { isolation: isolate; }
.entrance-panorama[data-hall-light] .office-door { z-index: 4; }
#office[data-hall-light] .scene > :is(.firelight, .steam) { display: none; }

.entrance-panorama {
  --hall-window-x: 37%;
  --hall-window-y: 58%;
  --hall-hearth-x: 86%;
  --hall-hearth-y: 66%;
  --hall-candle-x: 14%;
  --hall-candle-y: 74%;
  --hall-vapour-x: 61%;
  --hall-vapour-y: 44%;
}
#office .scene {
  --hall-window-x: 64%;
  --hall-window-y: 24%;
  --hall-hearth-x: 46%;
  --hall-hearth-y: 40%;
  --hall-candle-x: 2%;
  --hall-candle-y: 79%;
  --hall-vapour-x: 41%;
  --hall-vapour-y: 59%;
}
.hall-atmosphere {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at var(--hall-window-x) var(--hall-window-y), var(--hall-sky), transparent 43%),
    linear-gradient(155deg, var(--hall-shadow), transparent 59%, var(--hall-shadow));
}
.hall-glow,
.hall-vapour {
  position: absolute;
  transform: translate(-50%, -50%);
}
.hall-glow {
  border-radius: 50%;
  opacity: var(--hall-glow-strength);
  animation: hall-flame 3.4s ease-in-out infinite alternate;
}
.hall-hearth {
  left: var(--hall-hearth-x);
  top: var(--hall-hearth-y);
  width: 21%;
  height: 38%;
  background: radial-gradient(ellipse, #ffbc5359, #ee8c321c 47%, transparent 71%);
}
.hall-candle {
  left: var(--hall-candle-x);
  top: var(--hall-candle-y);
  width: 8%;
  height: 18%;
  background: radial-gradient(ellipse, #ffce6b58, #ffb6501e 41%, transparent 71%);
  animation-duration: 2.6s;
  animation-delay: -1.1s;
}
@keyframes hall-flame {
  0%, 62% { opacity: calc(var(--hall-glow-strength) * .63); transform: translate(-50%, -50%) scale(.92); }
  35%, 100% { opacity: var(--hall-glow-strength); transform: translate(-50%, -50%) scale(1.05); }
}
.hall-vapour {
  left: var(--hall-vapour-x);
  top: var(--hall-vapour-y);
  width: 6%;
  height: 18%;
}
.hall-wisp {
  position: absolute;
  left: 23%;
  bottom: 4%;
  width: 52%;
  height: 48%;
  border-radius: 42% 58% 48% 52%;
  background: radial-gradient(ellipse, #e6e2ca53, #e6e2ca25 41%, transparent 72%);
  opacity: .48;
  animation: hall-vapour-rise 4.8s ease-out infinite;
}
.hall-wisp-later { left: 36%; animation-delay: -2.5s; }
@keyframes hall-vapour-rise {
  0% { opacity: 0; transform: translate(0) rotate(-10deg) scale(.54); }
  32% { opacity: .78; }
  100% { opacity: 0; transform: translate(23%, -140%) rotate(24deg) scale(1.32); }
}

.hall-weather { position: absolute; inset: 0; display: none; }
[data-hall-weather="snow"] .hall-weather,
[data-hall-weather="leaves"] .hall-weather { display: block; }
.hall-weather .hall-particle {
  position: absolute;
  left: var(--x);
  top: 0;
  width: var(--size);
  height: 100%;
  animation: hall-snowfall var(--duration) linear var(--delay) infinite;
}
.hall-weather .hall-particle::after {
  content: '';
  display: block;
  width: 100%;
  height: var(--size);
  border-radius: 50%;
  background: #f5f3e9c9;
  box-shadow: 0 0 4px #d1d8e74d;
}
[data-hall-weather="leaves"] .hall-weather .hall-particle { animation-name: hall-leaf-fall; }
[data-hall-weather="leaves"] .hall-particle::after {
  width: 170%;
  height: calc(var(--size) * 1.25);
  border-radius: 85% 4% 85% 9%;
  background: #d88d4ac9;
  box-shadow: none;
  animation: hall-leaf-turn 2.5s ease-in-out var(--delay) infinite alternate;
}
[data-hall-weather="leaves"] .hall-particle:nth-child(3n)::after { background: #bb5934ca; }
@keyframes hall-snowfall {
  from { opacity: 0; transform: translate(-8px, -5%); }
  18%, 76% { opacity: .88; }
  to { opacity: 0; transform: translate(19px, 101%); }
}
@keyframes hall-leaf-fall {
  from { opacity: 0; transform: translate(0, -5%); }
  20%, 70% { opacity: .87; }
  48% { transform: translate(33px, 48%); }
  to { opacity: 0; transform: translate(14px, 101%); }
}
@keyframes hall-leaf-turn {
  from { transform: rotate(-32deg) scaleX(.63); }
  to { transform: rotate(82deg) scaleX(1); }
}
.hall-door-sparks { position: absolute; inset: 0; pointer-events: none; }
.hall-door-sparks .hall-particle {
  position: absolute;
  left: var(--x);
  bottom: 14%;
  width: max(2px, calc(var(--size) * .57));
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffde91;
  box-shadow: 0 0 6px 1px #ffc257af;
  opacity: 0;
  animation: hall-door-spark calc(var(--duration) * .64) ease-out var(--delay) infinite;
}
@keyframes hall-door-spark {
  0% { opacity: 0; transform: scale(.65); }
  24% { opacity: .96; }
  100% { opacity: 0; transform: translate(7px, -36px) scale(.34); }
}
.entrance-panorama:not([data-atmosphere-visible]) :is(.hall-atmosphere, .hall-door-sparks) *,
#office .scene:not([data-atmosphere-visible]) .hall-atmosphere * {
  animation-play-state: paused;
}
@media (max-width: 640px) {
  .hall-weather .hall-particle:nth-child(n+7),
  .hall-door-sparks .hall-particle:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .entrance-panorama[data-hall-light] > img,
  #office[data-hall-light] .scene-img { transition: none; }
  .hall-atmosphere *, .hall-door-sparks * { animation: none; }
  [data-hall-weather] .hall-weather, .hall-door-sparks { display: none; }
}
