html[data-scene-paused] :is(.cosmos, .hero) *,
html[data-scene-paused] :is(.cosmos, .hero) *::before,
html[data-scene-paused] :is(.cosmos, .hero) *::after,
html[data-scene-paused] .cosmos::before,
html[data-scene-paused] .cosmos::after {
  animation-play-state: paused !important;
}

html[data-optimized] *,
html[data-optimized] *::before,
html[data-optimized] *::after {
  animation-duration: 80ms !important;
  animation-delay: 0ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 80ms !important;
  transition-delay: 0ms !important;
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

html[data-optimized] :is(.background-planets, .comet, .winter-layer) {
  display: none !important;
}

html[data-optimized] :is(.planet, .planet::before, .satellite, .orbital-art) {
  animation: none !important;
}

html[data-optimized] .spin,
html[data-optimized] .assignment-saving .assignment-spinner::after {
  animation-duration: 1s !important;
  animation-iteration-count: infinite !important;
}

body dialog.material-modal .settings-menu > .settings-menu-row.performance-setting:not(.danger-button) {
  grid-column: 1 / -1 !important;
  justify-content: flex-start !important;
  gap: 10px;
}

body dialog.material-modal .settings-menu > .performance-setting > span {
  flex: 1 1 auto !important;
}

.performance-setting .toggle-switch {
  flex: none;
  margin-inline-start: auto;
}


body .cosmos::before {
  display: block !important;
  content: "";
  position: absolute;
  inset: 0;
  background: url("./scene-assets/fog.png") center / cover no-repeat;
  opacity: .28;
  transform: none;
  animation: none !important;
  filter: none !important;
  will-change: auto;
}

body .cosmos::after {
  display: none !important;
  content: none !important;
  background: none !important;
  animation: none !important;
  filter: none !important;
  will-change: auto;
}

body .site-shell > .cosmos {
  filter: none !important;
}


.star-twinkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star-twinkles > span {
  position: absolute;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: radial-gradient(circle, #e1f0ffbd 0 1px, transparent 2px),
    radial-gradient(circle, #cce5ff59, #81b5ff1c 25%, transparent 70%);
  opacity: .15;
  animation: star-point-twinkle 6s ease-in-out infinite alternate;
}

@keyframes star-point-twinkle {
  from { opacity: .05; }
  to { opacity: .6; }
}

html[data-optimized] .star-twinkles {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .star-twinkles { display: none; }
}

/* Keep decorative layers in viewport coordinates at every aspect ratio. */
body .site-shell>.cosmos,body .star-field{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;transform:none}
body .star-field canvas{width:100%;height:100%;max-width:none}
body .cosmos::before{background-size:100% 100%;background-position:center}
body .winter-snow{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;pointer-events:none}
