:root {
  --bg: #0b0b0d;
  --bar: #141417;
  --chip: #232327;
  --chip-hover: #2f2f35;
  --text: #f2f2f2;
  --muted: #9a9aa2;
  --accent: #E20074;
  --warn: #ffb000;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: "TeleNeo", system-ui, -apple-system, "Segoe UI", sans-serif; }
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
#stagebox { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
#stage { display: block; width: 100%; height: 100%; }
#overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 18px; text-align: center; padding: 16px; pointer-events: none; }

#bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom)); background: var(--bar);
  border-top: 1px solid #222; }
#boards { flex: 1 1 auto; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin;
  scroll-snap-type: x proximity; padding: 2px 0; }
#boards::-webkit-scrollbar { height: 6px; }
#boards::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; }
.board, .mode { flex: 0 0 auto; scroll-snap-align: start; background: var(--chip); border-radius: 6px;
  padding: 8px 12px; font-size: 14px; white-space: nowrap; line-height: 1.1; }
.board:hover, .mode:hover { background: var(--chip-hover); }
.board.on { background: var(--accent); color: #fff; }
.board.air { box-shadow: inset 0 -3px 0 var(--accent); }
.mode { display: inline-flex; align-items: center; gap: 8px; font-family: "TeleNeo ExtraBold", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: .02em; }
.mode.on { background: #fff; color: #000; }
.mode .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.mode.on .dot { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#status { flex: 0 0 auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
#status.off { color: var(--warn); }
.icon { background: transparent; padding: 6px; border-radius: 6px; color: var(--muted); }
.icon:hover { color: var(--text); background: var(--chip); }

body.nobar #bar { display: none; }
:fullscreen #bar { display: none; }

@media (max-width: 640px) {
  #bar { flex-wrap: wrap; padding: 8px 16px; }
  #boards { order: 3; flex-basis: 100%; }
  #status { margin-left: auto; }
  .board, .mode { font-size: 13px; padding: 9px 11px; }
}
@media (prefers-reduced-motion: reduce) { .mode.on .dot { animation: none; } }
