:root {
  --bg: #000000;
  --neon: #00ffd5;
  --hot: #ff6a00;
  --ink: #eafaf5;
  --dim: rgba(234, 250, 245, 0.55);
  --line: rgba(0, 255, 213, 0.30);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

/* borderless: no scrollbars anywhere */
html { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#stage { position: fixed; inset: 0; display: block; }

body.idle { cursor: none; }

/* ---- auto-hiding overlay ---- */
.ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.7s ease;
}
body.idle .ui { opacity: 0; }

.hud { position: absolute; }

/* top left — wordmark */
.hud-tl { top: clamp(16px, 3vh, 40px); left: clamp(18px, 3vw, 48px); }
.wordmark {
  font-family: "Michroma", sans-serif;
  font-weight: 400;
  font-size: clamp(17px, 1.6vw, 26px);
  letter-spacing: 0.34em;
  color: var(--ink);
  text-shadow: 0 0 24px rgba(0, 255, 213, 0.35);
}
.wordmark em { font-style: normal; color: var(--neon); }
.sub {
  margin-top: 7px;
  font-size: clamp(9px, 0.62vw, 11px);
  letter-spacing: 0.46em;
  color: var(--dim);
}

/* top right — live readout */
.hud-tr { top: clamp(16px, 3vh, 40px); right: clamp(18px, 3vw, 48px); text-align: right; }
.readout div { margin-bottom: 9px; }
.readout dt {
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--dim);
}
.readout dd {
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--neon);
}

/* bottom center — mode pills + hints */
.hud-bc {
  bottom: clamp(18px, 4vh, 48px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.pills { display: inline-flex; gap: 10px; pointer-events: auto; }
.pill {
  font-family: inherit;
  font-size: clamp(10px, 0.72vw, 12px);
  letter-spacing: 0.22em;
  padding: 11px 22px;
  color: var(--dim);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pill:hover { color: var(--ink); }
.pill.is-active {
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(0, 255, 213, 0.25), inset 0 0 10px rgba(0, 255, 213, 0.08);
}
.hints {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--dim);
}

/* bottom right — fullscreen */
.hud-br { bottom: clamp(18px, 4vh, 48px); right: clamp(18px, 3vw, 48px); }
#fs {
  pointer-events: auto;
  font-family: inherit;
  font-size: clamp(10px, 0.72vw, 12px);
  letter-spacing: 0.22em;
  padding: 11px 22px;
  color: #000;
  background: var(--neon);
  border: 1px solid var(--neon);
  cursor: pointer;
  box-shadow: 0 0 26px rgba(0, 255, 213, 0.4);
  transition: background 0.25s, color 0.25s;
}
#fs:hover { background: #000; color: var(--neon); }

/* bottom left — palette cycler */
.hud-bl { bottom: clamp(18px, 4vh, 48px); left: clamp(18px, 3vw, 48px); }
#palette-btn {
  pointer-events: auto;
  font-family: inherit;
  font-size: clamp(10px, 0.72vw, 12px);
  letter-spacing: 0.22em;
  padding: 11px 22px;
  color: var(--neon);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 255, 213, 0.1);
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
#palette-btn:hover {
  background: rgba(0, 255, 213, 0.08);
  border-color: var(--neon);
  box-shadow: 0 0 24px rgba(0, 255, 213, 0.25);
}

@media (max-width: 900px) {
  .hud-tr { display: none; }
  .hud-bl { display: none; }
  .hints { display: none; }
}
