html, body {
  margin: 0; padding: 0; height: 100%;
  background: #000; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#canvas-mount {
  position: fixed; inset: 0;
}

/* Diegetic rapport vignette — never a number, just atmosphere.
 * Tension reads as a warm/oppressive haze creeping in from the edges.
 * Calm rapport fades it out. JS drives --tension on :root. */
#vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(180, 70, 20, calc(var(--tension, 0.6) * 0.55)) 100%
  );
  transition: background 1.5s ease;
  mix-blend-mode: multiply;
}

/* Caption layer — distant subject's words, typewriter rendered */
#caption-layer {
  position: fixed;
  top: 12%;
  left: calc(50% + 162px);
  transform: translateX(-50%);
  width: min(80%, 720px);
  text-align: center;
  pointer-events: none;
  z-index: 10;
}
#caption-text {
  display: inline-block;
  color: #000;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 0.5px;
  font-style: italic;
  min-height: 1.4em;
  opacity: 0.95;
  transition: opacity 0.6s;
}

/* Megaphone input — player's bullhorn */
#megaphone {
  position: fixed;
  bottom: 28px;
  left: calc(50% + 162px);
  transform: translateX(-50%);
  width: min(94%, 680px);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.62);
  border: 1px solid rgba(255,200,80,0.25);
  border-radius: 32px;
  backdrop-filter: blur(6px);
  z-index: 10;
}
#megaphone-icon {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  color: rgba(255, 200, 130, 0.85);
  flex-shrink: 0;
}
#megaphone-icon svg { width: 22px; height: 22px; display: block; }
#megaphone-input {
  flex: 1;
  background: transparent; border: 0; outline: none;
  color: #fff; font-size: 16px; font-family: inherit;
  caret-color: #ffcc66;
}
#megaphone-input::placeholder { color: rgba(255,255,255,0.5); font-style: italic; }
#megaphone-input:disabled { opacity: 0.5; }
#megaphone-counter {
  font-size: 11px; opacity: 0.5; font-variant-numeric: tabular-nums;
  min-width: 50px; text-align: right;
}

#hud-debug {
  position: fixed; top: 8px; right: 8px;
  font: 11px monospace;
  color: #aaa;
  background: rgba(0,0,0,0.5);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 20;
  text-align: right;
}
#hud-debug div { margin: 2px 0; }
