/* ---- Fixed 3D scene ---- */
#scene-root {
  position: fixed; inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 120%, #0e1622 0%, #05070b 55%, #03040778 100%);
}

#scene-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#scene-canvas:active { cursor: grabbing; }

/* Vignette */
#scene-root::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* Film grain */
#grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 2; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.8'/></svg>");
}

/* ---- HUD overlays ---- */
.hud {
  position: fixed; z-index: 4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--ink-dim);
  letter-spacing: 0.04em;
  pointer-events: none;
}
.hud.tl { top: 80px; left: 40px; }
.hud.tr { top: 80px; right: 40px; text-align: right; }
.hud.bl { bottom: 32px; left: 40px; }
.hud.br { bottom: 32px; right: 40px; text-align: right; }
.hud .k { color: var(--ink-faint); }
.hud .v { color: var(--ink); }
.hud .line { display: block; }

.moon-phase {
  display: flex; align-items: center; gap: 10px;
  pointer-events: auto;
}
.moon-phase svg { overflow: visible; }

/* ---- Drag hint ---- */
.drag-hint {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.24em; text-transform: uppercase;
  pointer-events: none; z-index: 4;
  opacity: 0; transition: opacity .6s ease;
  display: flex; align-items: center; gap: 12px;
}
.drag-hint.show { opacity: 1; }
.drag-hint .arr { width: 28px; height: 1px; background: var(--ink-faint); position: relative; }
.drag-hint .arr::before,
.drag-hint .arr::after {
  content: ''; position: absolute; width: 6px; height: 1px; background: var(--ink-faint);
}
.drag-hint .arr::before { left: 0; top: -2px; transform: rotate(-20deg); transform-origin: left; }
.drag-hint .arr::after  { right: 0; top: -2px; transform: rotate(20deg);  transform-origin: right; }
