:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #030407;
  color: #f5f7fb;
}

* {
  box-sizing: border-box;
}

html,
body,
.experience {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #030407;
}

.experience {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
}

#night-sky {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  outline: none;
  touch-action: manipulation;
}

#night-sky:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.intro {
  position: absolute;
  z-index: 2;
  top: 32px;
  left: 40px;
  pointer-events: none;
  mix-blend-mode: screen;
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(230, 236, 248, 0.48);
  font-size: 0.45rem;
  font-weight: 600;
  letter-spacing: 0.26em;
}

.intro-title {
  margin: 0;
  color: rgba(248, 250, 255, 0.94);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.08;
  text-shadow: 0 0 32px rgba(183, 204, 255, 0.12);
}

.hint {
  margin: 8px 0 0 3px;
  color: rgba(230, 236, 248, 0.52);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
}

.controls {
  position: absolute;
  z-index: 3;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 10, 15, 0.52);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: scale(0.666667);
  transform-origin: right bottom;
}

.controls button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(246, 248, 255, 0.78);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.controls button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.controls button:active {
  transform: scale(0.92);
}

.controls button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.controls svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.play-icon,
.is-paused .pause-icon {
  display: none;
}

.is-paused .play-icon {
  display: block;
}

.music-on-icon {
  display: none;
}

.is-music-on .music-off-icon {
  display: none;
}

.is-music-on .music-on-icon {
  display: block;
}

.controls button[aria-pressed="true"] {
  color: #fff;
  background: rgba(205, 220, 255, 0.12);
  box-shadow: inset 0 0 18px rgba(183, 207, 255, 0.07);
}

.music-credit {
  position: absolute;
  z-index: 2;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: calc(100% - 144px);
  margin: 0;
  color: rgba(230, 236, 248, 0.55);
  font-size: 10px;
  line-height: 1.4;
}

.music-credit a {
  color: inherit;
  text-decoration: none;
}

.music-credit a:hover,
.music-credit a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .intro {
    top: 12px;
    left: 16px;
  }

  .eyebrow {
    margin-bottom: 4px;
  }

  .intro-title {
    font-size: 1.25rem;
  }

  .hint {
    margin-top: 4px;
    font-size: 0.56rem;
  }

  #music,
  #pause + .divider {
    display: none;
  }
}

@media (max-width: 319px) {
  .intro {
    top: 8px;
    left: 12px;
  }

  .eyebrow {
    margin-bottom: 2px;
    font-size: 0.4rem;
  }

  .intro-title {
    font-size: 1rem;
  }

  .hint {
    margin-top: 3px;
    font-size: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .controls button {
    transition: none;
  }
}
