* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  -webkit-tap-highlight-color: transparent;
}

#scene {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  /* crisp nearest-neighbour when browser scales the element */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    transparent 28%,
    rgba(0,0,0,0.16) 60%,
    rgba(0,0,0,0.55) 100%
  );
}

.enter-gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0e6d2;
  font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 900ms ease;
}

.enter-gate .label {
  font-size: 1.5rem;
  letter-spacing: 0.7em;
  text-indent: 0.7em;
  opacity: 0.9;
  animation: gate-pulse 2.8s ease-in-out infinite;
}

.enter-gate.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes gate-pulse {
  0%, 100% { opacity: 0.95; }
  50%      { opacity: 0.5; }
}

.rotate-prompt {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  color: #f0e6d2;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.4rem;
  font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  text-align: center;
  padding: 2rem;
  letter-spacing: 0.04em;
}

.rotate-prompt .phone {
  width: 56px;
  height: 92px;
  border: 2px solid currentColor;
  border-radius: 10px;
  position: relative;
  animation: rotate-hint 2.8s ease-in-out infinite;
}

.rotate-prompt .phone::before {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 16px; height: 3px;
  background: currentColor;
  border-radius: 2px;
  transform: translateX(-50%);
  opacity: 0.75;
}

.rotate-prompt .title { font-size: 1.15rem; opacity: 1; }
.rotate-prompt p { font-size: 0.95rem; line-height: 1.7; opacity: 0.8; }

@keyframes rotate-hint {
  0%, 35%, 100% { transform: rotate(0deg); }
  60%, 85% { transform: rotate(-90deg); }
}

@media (orientation: portrait) and (pointer: coarse) {
  .rotate-prompt { display: flex; }
}
