html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.neon-yellow {
  color: #fff4c2;
  text-shadow: 0 0 4px #ffd35a, 0 0 14px #ffb300, 0 0 32px #ff9d00;
}

.neon-purple {
  color: #efe8ff;
  text-shadow: 0 0 4px #c7b4ff, 0 0 14px #9a7fe0, 0 0 30px #8169af;
}

#loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  animation: buzz 2.4s infinite steps(1);
}

@keyframes buzz {
  0%, 100% { opacity: 1; }
  41% { opacity: 1; }
  42% { opacity: 0.25; }
  44% { opacity: 1; }
  46% { opacity: 0.4; }
  48% { opacity: 1; }
}

/* Sign-mounted chain follows the scene’s tilt. */
#chain {
  position: fixed;
  left: 0;
  top: 0;
  width: 44px;
  margin-left: -22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 0;
}

.pull {
  position: absolute;
  inset: 0;
}

.pull::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 12px;
  width: 3px;
  margin-left: -1.5px;
  background: radial-gradient(circle, #a8966c 45%, transparent 55%) 0 0 / 3px 5px repeat-y;
}

.bead {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 8px;
  height: 13px;
  margin-left: -4px;
  border-radius: 45% 45% 50% 50%;
  background: #ffe7a0;
  box-shadow: 0 0 5px #ffc640, 0 0 14px #ff9d00, 0 0 28px #ff8a00;
  animation: bead-glow 2.2s ease-in-out infinite;
}

@keyframes bead-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

#chain.pulled .bead {
  animation: none;
  background: #a8966c;
  box-shadow: none;
  transition: background 0.6s, box-shadow 0.6s;
}

#dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1.2rem);
  display: flex;
  justify-content: center;
  pointer-events: none;
}

#rsvp {
  padding: 0.55rem 2.4rem;
  border: 2px solid #d9ccff;
  border-radius: 999px;
  box-shadow: 0 0 6px #b9a3ff, 0 0 18px #8169af, inset 0 0 10px #8169af;
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s;
}

#rsvp.on {
  opacity: 1;
  pointer-events: auto;
  animation: buzz 5.3s infinite steps(1);
}

#safe-top {
  position: fixed;
  top: 0;
  width: 0;
  height: env(safe-area-inset-top, 0px);
  visibility: hidden;
}

.offscreen {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
