:root {
  --ui-bg: rgba(20, 20, 20, 0.6);
  --ui-fg: #fff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: #111;
  font-family: system-ui, sans-serif;
  overflow: hidden;
}

#stage {
  width: 100%;
  height: 100%;
  background: #fff;

  & svg {
    display: block;
    width: 100%;
    height: 100%;
  }
}

/* The design assembles by fading its layers in, staggered (see main.ts). The
   background layer is left untouched so there's never a gap behind the rest. */
@keyframes design-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Honour reduced-motion: no staggered reveal. */
  #stage svg > * {
    animation: none !important;
  }
}

#refresh {
  position: fixed;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: var(--ui-fg);
  background: var(--ui-bg);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, background 0.2s ease;

  &:hover {
    background: rgba(40, 40, 40, 0.8);
  }

  &:active {
    transform: rotate(-180deg);
  }
}
