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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #02030a;
  font-family: Georgia, 'Times New Roman', serif;
  color: #f5edd8;
  user-select: none;
  -webkit-user-select: none;
}

#scene {
  position: fixed; inset: 0;
  display: block;
  cursor: crosshair;
}

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

#caption {
  position: fixed;
  left: 50%; bottom: 12%;
  transform: translateX(-50%);
  max-width: 82%;
  text-align: center;
  font-style: italic;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  letter-spacing: 0.04em;
  color: #f5edd8;
  text-shadow: 0 2px 14px rgba(0,0,0,0.9);
  opacity: 0;
  transition: opacity 1.6s ease;
  pointer-events: none;
  line-height: 1.5;
}
#caption.show { opacity: 1; }

#progress {
  position: fixed; left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}
#progressBar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffdf8a, #fff6d8);
  box-shadow: 0 0 8px #ffdf8a;
  transition: width 0.3s linear;
}

#intro {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  background: rgba(2,3,10,0.72);
  backdrop-filter: blur(3px);
  transition: opacity 1.2s ease;
  z-index: 10;
  padding: 1.5rem;
}
#intro.gone { opacity: 0; pointer-events: none; }

#intro h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: normal;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: #ffe9a8;
  text-shadow: 0 0 30px rgba(255,220,130,0.45);
  margin-bottom: 1.2rem;
}
#intro .sub {
  font-style: italic;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.7;
  color: #cfc6a8;
  margin-bottom: 2.2rem;
}
#intro button {
  font-family: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  padding: 0.85rem 2.4rem;
  margin: 0.4rem;
  border-radius: 999px;
  border: 1px solid #ffdf8a;
  background: #ffdf8a;
  color: #1a1405;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
#intro button:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255,223,138,0.35); }
#intro button.ghost {
  background: transparent;
  color: #ffdf8a;
}
#intro .tiny {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #6f6a58;
  font-style: italic;
}

#controls {
  position: fixed; top: 1.1rem; right: 1.1rem;
  display: flex; gap: 0.5rem;
  z-index: 5;
  transition: opacity 0.8s;
}
#controls.hidden, #hint.hidden { opacity: 0; pointer-events: none; }
#controls button {
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  border: 1px solid rgba(255,223,138,0.4);
  background: rgba(10,12,25,0.55);
  color: #ffdf8a;
  font-size: 1.05rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
#controls button:hover { background: rgba(255,223,138,0.15); }

#hint {
  position: fixed; top: 1.4rem; left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem; font-style: italic;
  color: rgba(245,237,216,0.55);
  letter-spacing: 0.05em;
  pointer-events: none;
  transition: opacity 1.5s;
  z-index: 5;
  white-space: nowrap;
}
