/* One real fixed coop-photo element behind every page. The Worker injects it as the first body child. */
html {
  min-height: 100%;
  background: #000;
}

body {
  min-height: 100%;
  margin: 0;
  position: relative;
  background: transparent !important;
  background-image: none !important;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}

/* Verified full background source: /assets/coop-background.webp. Retired corrupt source: /assets/coop-background.png. */
.site-background > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
}

/* The vignette lives inside the fixed background layer, below every page element. */
.site-background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0) 32%,
      rgba(0, 0, 0, .10) 52%,
      rgba(0, 0, 0, .42) 76%,
      rgba(0, 0, 0, .74) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, .72) 0%,
      rgba(0, 0, 0, .22) 15%,
      rgba(0, 0, 0, .06) 42%,
      rgba(0, 0, 0, .08) 58%,
      rgba(0, 0, 0, .28) 82%,
      rgba(0, 0, 0, .80) 100%
    );
}

@media (max-width: 700px) {
  .site-background::after {
    background:
      radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0) 28%,
        rgba(0, 0, 0, .08) 48%,
        rgba(0, 0, 0, .34) 74%,
        rgba(0, 0, 0, .66) 100%
      ),
      linear-gradient(
        to bottom,
        rgba(0, 0, 0, .66) 0%,
        rgba(0, 0, 0, .18) 14%,
        rgba(0, 0, 0, .04) 43%,
        rgba(0, 0, 0, .06) 58%,
        rgba(0, 0, 0, .24) 82%,
        rgba(0, 0, 0, .74) 100%
      );
  }
}

/* Keep every actual page root above the real background element and its vignette. */
body > :not(.site-background):not(script):not(style) {
  position: relative;
  z-index: 1;
}

/* Disable older pseudo-element and page-level image copies. */
html::before,
html::after,
body::before,
body::after {
  content: none !important;
  display: none !important;
  background: none !important;
  filter: none !important;
  transform: none !important;
}

.coop {
  background: transparent !important;
  background-image: none !important;
}

/* Keep the Mod workbench character without hiding the site-wide photo underneath it. */
.desktop {
  background:
    linear-gradient(rgba(17, 15, 11, .72), rgba(11, 12, 10, .84)),
    repeating-linear-gradient(
      91deg,
      rgba(61, 52, 37, .72) 0 72px,
      rgba(43, 37, 27, .72) 72px 76px,
      rgba(75, 61, 41, .72) 76px 145px,
      rgba(37, 31, 24, .72) 145px 149px
    ) !important;
}
