:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
}

#experience {
  position: fixed;
  inset: 0;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#scene.dragging {
  cursor: grabbing;
}

#scene:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.55);
  outline-offset: -4px;
}

.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;
}

#hint {
  position: fixed;
  left: 50%;
  bottom: calc(40px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.26);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  transition: opacity 3s ease;
}

html[data-locale="zh"] #hint {
  letter-spacing: 0.5em;
  text-indent: 0.5em;
}

#hint.dim {
  opacity: 0.05;
}

#credits {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.45em;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#credits a {
  color: inherit;
  text-decoration: none;
}

#credits a:hover,
#credits a:focus-visible {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

#fallback {
  position: fixed;
  inset: 0;
  z-index: 10;
  box-sizing: border-box;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 24px;
  background: #05070b;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

#fallback[hidden] {
  display: none;
}

#fallback h2 {
  margin: 0 0 12px;
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 500;
}

#fallback p {
  max-width: 34rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 560px) {
  #hint {
    bottom: calc(48px + env(safe-area-inset-bottom));
  }

  #credits {
    bottom: calc(12px + env(safe-area-inset-bottom));
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hint {
    transition: none;
  }
}
