/* Cloud sky: the backdrop behind the whole app. Pair with sky.js and
   <html data-cloud-sky="auto|day|night">. The gradients below are the same
   palette as the WebGL sky and show wherever WebGL is unavailable. */

html[data-cloud-sky] {
  --sky-day: linear-gradient(to bottom, rgb(79 140 219), rgb(184 214 240));
  --sky-night: linear-gradient(to bottom, rgb(16 22 37), rgb(37 52 83));
  background: rgb(79 140 219);
}
html[data-cloud-sky] body { background: transparent; }

html[data-cloud-sky] body::before,
html[data-cloud-sky] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
html[data-cloud-sky] body::before { background: var(--sky-day); }
html[data-cloud-sky] body::after { background: var(--sky-night); opacity: 0; }
html[data-cloud-sky-mode="night"] body::after { opacity: 1; }

.cloud-sky {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
html[data-cloud-sky-state="webgl"] .cloud-sky { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html[data-cloud-sky] body::before,
  html[data-cloud-sky] body::after,
  .cloud-sky { transition-duration: 0.9s; }
}
