* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #1a0e14; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(30,15,25,0.55), rgba(10,5,12,0.85));
  cursor: pointer;
  transition: opacity 0.9s ease;
}
#overlay.hidden { opacity: 0; pointer-events: none; }
#overlay-card {
  text-align: center; color: #f5e3cf;
  font-family: Georgia, 'Times New Roman', serif;
  padding: 2rem 3rem;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
  user-select: none;
}
#overlay-card h1 { font-size: 3.2rem; font-weight: normal; letter-spacing: 0.35em; text-transform: uppercase; }
#overlay-card .sub { font-style: italic; opacity: 0.8; margin-top: 0.3rem; font-size: 1.1rem; }
#overlay-card .hint { margin-top: 2.2rem; font-size: 0.95rem; opacity: 0.9; font-family: system-ui, sans-serif; }
#overlay-card .tiny { margin-top: 0.8rem; font-size: 0.75rem; opacity: 0.55; font-family: system-ui, sans-serif; }
.mobile-hint { display: none; }
@media (pointer: coarse) {
  .desktop-hint { display: none; }
  .mobile-hint { display: inline; }
  #overlay-card h1 { font-size: 2.1rem; }
}

/* Shown only while pointer lock is gone mid-walk. Sits low and centred so it
   doesn't cover the horizon, and fades rather than snapping — the whole piece is
   slow and a hint that pops is a hint that startles. */
#lock-hint {
  position: fixed; z-index: 16; left: 50%; bottom: 8%;
  transform: translateX(-50%);
  padding: 0.55rem 1.1rem; border-radius: 999px;
  background: rgba(20, 8, 16, 0.5);
  color: #f5e3cf; font-family: system-ui, sans-serif; font-size: 0.85rem;
  letter-spacing: 0.02em; white-space: nowrap;
  opacity: 0; pointer-events: none; user-select: none;
  transition: opacity 0.5s ease;
}
#lock-hint.show { opacity: 0.85; }
@media (pointer: coarse) { #lock-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { #lock-hint { transition: none; } }

#vignette {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(20,8,16,0.35) 100%);
}

#mute-btn {
  position: fixed; top: 14px; right: 14px; z-index: 15;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(0,0,0,0.35); color: #f5e3cf;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer; user-select: none;
  transition: background 0.2s;
}
#mute-btn:hover { background: rgba(0,0,0,0.55); }
