.game-loading {
  position: fixed;
  z-index: 2147483640;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #101a51;
  color: #fff4cb;
  font: 16px system-ui, sans-serif;
  transition: opacity .24s ease;
}
.game-loading::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -22px;
  background: linear-gradient(#10184b65,#10184bc0), url("assets/p0/loading-novogodsk.webp") center / cover;
  filter: blur(16px);
}
.game-loading[hidden], .game-loading [hidden] { display: none !important; }
.game-loading.is-leaving { opacity: 0; pointer-events: none; }
.game-loading-scene {
  position: absolute;
  width: min(100vw, 177.683dvh);
  aspect-ratio: 1672 / 941;
}
.game-loading-scene img, .loading-jar {
  display: block;
  width: 100%;
  height: 100%;
  mask-image: linear-gradient(transparent, black 2%, black 98%, transparent);
}
.loading-jar { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
#loading-sparks use { animation: loading-twinkle 1.7s ease-in-out infinite alternate; }
@keyframes loading-twinkle { from { opacity: .55; } to { opacity: 1; } }
#loading-falling-sparks use {
  opacity: 0;
  animation: loading-spark-fall 1.1s linear infinite;
}
@keyframes loading-spark-fall {
  0% { opacity: 0; }
  15%, 75% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--spark-drift), var(--spark-fall, 175px)); }
}
.loading-help-button {
  position: absolute;
  left: 77.7%;
  top: 84%;
  width: 20.4%;
  height: 10%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff2bc;
  cursor: pointer;
}
.loading-help-button span, .loading-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.loading-help-button:focus-visible, .loading-help button:focus-visible { outline: 3px solid #fff3a6; outline-offset: 3px; }
.loading-help {
  position: absolute;
  z-index: 1;
  width: min(420px, calc(100% - 32px));
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  background: #17184e;
  border: 2px solid #ffc75e;
  border-radius: 20px;
  box-shadow: 0 12px 45px #060c33b0;
}
.loading-help strong { font-size: 20px; }
.loading-help button {
  margin: 4px;
  padding: 8px 13px;
  border: 1px solid #f7c36b;
  border-radius: 999px;
  color: #fff4cb;
  background: #30306e;
  cursor: pointer;
}
@media (max-aspect-ratio: 4/5) {
  .game-loading-scene { width: min(190vw, 155dvh); }
  .game-loading-scene img, .loading-jar { mask-image: linear-gradient(transparent, black 5%, black 97%, transparent); }
  .loading-help-button {
    position: fixed;
    top: auto;
    left: auto;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    padding: 9px 15px;
    border: 2px solid #f7c36b;
    background: linear-gradient(#363477,#18174c);
  }
  .loading-help-button span { position: static; width: auto; height: auto; clip-path: none; font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) {
  .game-loading { transition: none; }
  #loading-sparks use { animation: none; }
  #loading-falling-sparks { display: none; }
}
