* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #0c0c12; }
body {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: #e7ecf5; user-select: none; -webkit-tap-highlight-color: transparent;
}
#c { display: block; width: 100vw; height: 100vh; cursor: crosshair; image-rendering: pixelated; }

#bar {
  position: fixed; top: 0; left: 0; right: 0; height: 46px; z-index: 10;
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: rgba(12, 14, 24, 0.82); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(120, 160, 255, 0.18);
}
.brand { font-weight: 800; letter-spacing: 1px; color: #fff; text-shadow: 0 0 12px #5b8cff; }
.stats { display: flex; gap: 8px; font-size: 12.5px; color: #9fb4d8; flex: 1; flex-wrap: wrap; }
.stats .sep { opacity: 0.4; }
#online { color: #6fe0a0; }
#placed { color: #ffd36e; }
.conn { font-size: 11px; color: #7fd; }

#palette {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 12;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 8px 10px; max-width: 94vw;
  background: rgba(12, 14, 24, 0.9); border: 1px solid rgba(120, 160, 255, 0.22); border-radius: 14px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}
#palette .sw {
  width: 30px; height: 30px; border-radius: 7px; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.18); transition: transform .08s;
}
#palette .sw:hover { transform: scale(1.1); }
#palette .sw.active { border-color: #fff; box-shadow: 0 0 0 2px #5b8cff, 0 0 14px #5b8cff; transform: scale(1.12); }

#help {
  position: fixed; bottom: 62px; left: 50%; transform: translateX(-50%); z-index: 11;
  font-size: 11px; color: #6f86aa; background: rgba(12, 14, 24, 0.6); padding: 5px 12px;
  border-radius: 20px; white-space: nowrap; max-width: 96vw; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
@media (max-width: 640px) { #help { font-size: 9.5px; } .stats { font-size: 11px; } }
