:root {
  --void: #070a0f;
  --panel: #0b1220;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --mist: #e2e8f0;
  --hairline: rgba(255, 255, 255, 0.1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--void); color: var(--mist); overflow: hidden; font-family: "Helvetica Neue", Inter, "Segoe UI", Arial, sans-serif; }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
#boot {
  position: fixed; inset: 0; display: grid; place-items: center; background: var(--void);
  color: var(--mist); letter-spacing: 0.18em; text-transform: uppercase; font-size: 12px; z-index: 5;
  transition: opacity 0.6s ease; 
}
#boot.done { opacity: 0; pointer-events: none; }
/* The only DOM chrome: one small button and one line, bottom edge, far under 15% of the view. */
.nl-chrome {
  position: fixed; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 4;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 18px;
  pointer-events: none; transition: opacity 0.4s ease;
}
body[data-hud="hidden"] .nl-chrome { opacity: 0; }
body[data-hud="hidden"] .nl-chrome * { pointer-events: none; }
.nl-status { margin: 0; font-size: 13px; line-height: 1.4; color: rgba(226, 232, 240, 0.72); max-width: 60ch; }
.nl-enter {
  pointer-events: auto; appearance: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--mist); background: rgba(11, 18, 32, 0.82); border: 1.5px solid var(--cyan);
  padding: 12px 22px; border-radius: 999px; min-height: 44px;
}
.nl-enter:hover:not(:disabled) { background: rgba(34, 211, 238, 0.14); }
.nl-enter:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; }
.nl-enter:disabled { opacity: 0.45; cursor: default; border-color: var(--hairline); }
#nl-fallback { position: fixed; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; padding: 24px; z-index: 6; background: var(--void); }
#nl-fallback h1 { font-weight: 300; margin: 0; font-size: 28px; letter-spacing: 0.06em; }
#nl-fallback .nl-phrase { color: var(--cyan); margin: 0 0 12px; font-size: 18px; }
#nl-fallback[hidden] { display: none; }
@media (max-width: 640px) {
  .nl-chrome { flex-direction: column; align-items: stretch; }
  .nl-status { font-size: 12px; }
}

/* Presenter / expo slideshow. Opt-in overlay (P or ?present=1); the room stays visible behind it. */
.nl-actions { display: flex; gap: 10px; align-items: center; pointer-events: none; }
.nl-present-toggle[aria-pressed="true"] { border-color: var(--violet-soft); }
.nl-present {
  position: fixed; z-index: 7; left: clamp(20px, 3vw, 64px); top: 50%; transform: translateY(-50%);
  width: min(38vw, 760px); max-height: 86vh; overflow: hidden;
  padding: clamp(24px, 2.6vw, 52px) clamp(24px, 2.8vw, 56px);
  background: rgba(11, 18, 32, 0.74); border: 1px solid var(--hairline); border-radius: 22px;
  backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; gap: clamp(10px, 1.1vw, 20px);
  transition: opacity 0.35s ease, transform 0.35s ease; cursor: pointer;
}
.nl-present[hidden] { display: none; }
.nl-present.is-hidden { opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(-12px); }
.nlp-eyebrow { margin: 0; font-size: clamp(13px, 1vw, 20px); letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; color: var(--cyan); }
.nlp-title { margin: 0; font-weight: 650; font-size: clamp(34px, 3.6vw, 76px); line-height: 1.04; letter-spacing: -0.01em; color: #fff; }
.nlp-line { margin: 0; font-size: clamp(17px, 1.45vw, 30px); line-height: 1.35; color: #94a3b8; }
.nlp-points { margin: 0; padding: 0; list-style: none; display: grid; gap: clamp(6px, 0.6vw, 12px); }
.nlp-points li { font-size: clamp(16px, 1.3vw, 27px); line-height: 1.3; color: var(--mist); padding-left: 22px; position: relative; }
.nlp-points li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.nlp-points li:nth-child(even)::before { background: var(--violet); }
.nlp-badge { margin: 0; display: flex; gap: 12px; align-items: baseline; font-size: clamp(13px, 1vw, 20px); color: #94a3b8; }
.nlp-badge[hidden] { display: none; }
.nlp-badge b { border: 1.5px solid var(--cyan); color: var(--cyan); border-radius: 999px; padding: 2px 12px; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.9em; white-space: nowrap; }
.nlp-badge[data-kind="sim"] b, .nlp-badge[data-kind="concept"] b { border-color: var(--violet-soft); color: var(--violet-soft); }
.nlp-nav { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.nlp-count { color: #94a3b8; font-size: clamp(14px, 1.1vw, 22px); min-width: 7ch; text-align: center; }
.nlp-btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: clamp(14px, 1.1vw, 22px); color: var(--mist);
  background: rgba(11, 18, 32, 0.6); border: 1.5px solid rgba(255, 255, 255, 0.28); border-radius: 999px; padding: 10px 24px; min-height: 44px;
}
.nlp-btn.nlp-primary { border-color: var(--cyan); }
.nlp-btn.nlp-quiet { margin-left: auto; border-color: var(--violet-soft); }
.nlp-btn:hover:not(:disabled) { background: rgba(34, 211, 238, 0.14); }
.nlp-btn:disabled { opacity: 0.35; cursor: default; }
.nlp-btn:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; }
.nlp-hint { margin: 0; font-size: clamp(11px, 0.85vw, 16px); color: rgba(148, 163, 184, 0.8); }
body[data-present="1"] .nl-chrome .nl-status { display: none; }
@media (max-width: 760px) {
  .nl-present { left: 10px; right: 10px; top: auto; bottom: 64px; transform: none; width: auto; max-height: 62vh; }
  .nl-present.is-hidden { transform: translateX(-12px); }
}

/* Autoplay (?auto=1 or /expo/play): no controls, no cursor, a thin progress line. */
.nlp-progress { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 2px; }
.nlp-progress[hidden] { display: none; }
.nlp-progress i { display: block; height: 100%; width: 0; background: var(--cyan); }
body[data-auto="1"] { cursor: none; }
body[data-auto="1"] #stage canvas { cursor: none !important; }
body[data-auto="1"] .nlp-nav, body[data-auto="1"] .nlp-hint { display: none; }
body[data-auto="1"] .nl-present { cursor: none; }
body[data-auto="1"] .nl-chrome { opacity: 0; pointer-events: none; }
body[data-auto="1"] .nl-chrome * { pointer-events: none; }
