#earth {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 1px;
  isolation: isolate;
  overflow: hidden;
  background: #000;
  contain: layout paint;
}

#earth::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000 var(--earth-poster, url("poster.webp")) center / cover no-repeat;
}

#earth .earth-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

#earth[data-status="ready"] .earth-canvas {
  opacity: 1;
}

#earth::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,.15) 65%, #000 88%);
}
