:root {
  --bg: #0b0e13;
  --text: #e6ebf2;
  --muted: #9aa7b8;
  --faint: #5c6a7d;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 800px;
  height: 600px;
  transform-origin: center center;
}

canvas {
  display: block;
  background: #10141a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 24px 70px rgba(0, 0, 0, 0.55);
}

/* ---- HUD ------------------------------------------------------------------ */

#hud {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  font-size: 12px;
}

.title {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(230, 235, 242, 0.4);
  font-weight: 600;
}

#chips { display: flex; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.3s;
}

.chip i { width: 8px; height: 8px; border-radius: 50%; } /* color set inline */
.chip.dead { opacity: 0.3; }
.chip.dead span { text-decoration: line-through; }

/* ---- Overlays --------------------------------------------------------------- */

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(3px);
}

.hidden { display: none !important; }

h1 { font-size: 42px; margin: 0; letter-spacing: 0.05em; }
h2 { font-size: 34px; margin: 0; }

.tag { color: var(--muted); margin: 0 0 6px; max-width: 46ch; line-height: 1.45; }
.hint { color: var(--faint); font-size: 12px; margin: 0; }

.count-row { display: flex; gap: 8px; }

button {
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

button:hover { background: rgba(255, 255, 255, 0.12); }

.count-row button { width: 46px; padding: 8px 0; }
.count-row button.selected {
  background: rgba(77, 166, 255, 0.2);
  border-color: #4da6ff;
}

button.primary { font-size: 17px; padding: 10px 34px; }

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 480px;
  gap: 5px 22px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
