:root {
  --bg: #061018;
  --panel: #0c1c28cc;
  --cyan: #3ee8ff;
  --amber: #ffb347;
  --mag: #ff4d8d;
  --lime: #9dff6a;
  --text: #d7f4ff;
  --muted: #7aa0b4;
  --line: #1e4a5e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text);
  font-family: "Share Tech Mono", ui-monospace, monospace; overflow: hidden; }
#app { position: relative; min-height: 100%; }
.vignette {
  pointer-events: none; position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, #000a 100%);
  z-index: 5;
}
#bgfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.topbar {
  position: relative; z-index: 6; display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0a1822ee, #061018aa);
}
.logo { display: flex; gap: 10px; align-items: center; }
.logo-mark { color: var(--cyan); font-size: 28px; text-shadow: 0 0 16px var(--cyan); }
h1 { font-family: Orbitron, sans-serif; letter-spacing: .28em; font-size: 18px; }
.tag { color: var(--muted); font-size: 10px; letter-spacing: .2em; }
.hud-cluster { display: flex; gap: 18px; margin-left: auto; }
.stat { min-width: 72px; }
.stat label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.stat b { font-family: Orbitron, sans-serif; font-size: 18px; color: var(--cyan); }
.stat.warn b { color: var(--amber); }
.icon-btn {
  margin-left: 8px; background: #0e2430; border: 1px solid var(--line);
  color: var(--cyan); width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
}
.screen {
  position: relative; z-index: 4; display: none; min-height: calc(100vh - 64px);
  align-items: center; justify-content: center; padding: 24px;
  flex-direction: column;
}
.screen.active { display: flex; }
.hud-cluster[hidden] { display: none !important; }
.hero { text-align: center; max-width: 640px; }
.hero-pipe {
  height: 8px; width: 220px; margin: 0 auto 24px; border-radius: 8px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--amber), var(--cyan), transparent);
  box-shadow: 0 0 24px var(--cyan); animation: flow 2.4s linear infinite;
  background-size: 200% 100%;
}
@keyframes flow { to { background-position: 200% 0; } }
.hero h2, .panel h2 {
  font-family: Orbitron, sans-serif; font-size: 28px; letter-spacing: .12em; margin-bottom: 8px;
}
.lede { color: var(--muted); margin-bottom: 28px; }
.menu-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.btn {
  font-family: Orbitron, sans-serif; letter-spacing: .14em; cursor: pointer;
  background: #102836; color: var(--text); border: 1px solid var(--line);
  padding: 12px 22px; min-width: 240px; border-radius: 4px;
}
.btn:hover { border-color: var(--cyan); box-shadow: 0 0 12px #3ee8ff44; }
.btn.primary { background: linear-gradient(180deg, #145a6e, #0a3344); border-color: var(--cyan); color: var(--cyan); }
.btn.small { min-width: 0; width: 100%; padding: 8px; font-size: 11px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.hint { margin-top: 22px; color: var(--muted); font-size: 12px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); padding: 28px;
  max-width: 520px; width: 100%; backdrop-filter: blur(8px);
}
.brief { padding-left: 18px; line-height: 1.7; color: #c5e6f3; }
.brief em { color: var(--cyan); font-style: normal; }
.row { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; gap: 16px; }
.row input[type=range] { width: 160px; }
.scores { list-style: none; margin: 12px 0 20px; }
.scores li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #163040; }
.play-layout { display: flex; gap: 16px; align-items: stretch; }
.queue-col {
  background: #081820cc; border: 1px solid var(--line); padding: 10px; width: 110px;
}
.queue-label { text-align: center; color: var(--amber); letter-spacing: .2em; font-size: 11px; margin-bottom: 8px; }
.board-wrap { position: relative; }
#board, #queue { display: block; background: #07141c; border: 1px solid var(--line); }
#toast {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  color: var(--amber); text-shadow: 0 0 8px #000; pointer-events: none; font-family: Orbitron, sans-serif;
}
.play-bar { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.play-bar .btn { min-width: 140px; }
.overlay {
  position: fixed; inset: 0; z-index: 20; background: #0008;
  display: flex; align-items: center; justify-content: center;
}
.overlay[hidden] { display: none !important; }
.overlay-card { text-align: center; }
#ov-name {
  margin: 12px 0; padding: 8px 12px; width: 80%; background: #081018; color: var(--cyan);
  border: 1px solid var(--line); font-family: inherit;
}
@media (max-width: 820px) {
  .play-layout { flex-direction: column; align-items: center; }
  .queue-col { width: 100%; display: flex; align-items: center; gap: 10px; }
  #queue { width: 280px; height: 72px; }
  #board { width: min(96vw, 720px); height: auto; }
}
