html, body {
  margin: 0;
  height: 100%;
  background: #05060a;
  color: #cfd3dc;
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
}

#space {
  display: block;
  width: 100vw;
  height: 100vh;
}

#hud > * {
  position: fixed;
  pointer-events: none;
}

#hud button {
  pointer-events: auto;
  background: rgba(20, 22, 32, 0.8);
  color: #cfd3dc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 5px 10px;
  font: inherit;
  cursor: pointer;
}

#hud button:hover { border-color: rgba(255, 255, 255, 0.4); }
#hud button.active { background: #cfd3dc; color: #05060a; border-color: #cfd3dc; }

#title {
  top: 16px;
  left: 20px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}
#title span {
  margin-left: 10px;
  font-size: 13px;
  font-weight: 400;
  color: #8a90a0;
}

#help {
  top: 44px;
  left: 20px;
  color: #6a7080;
  font-size: 12px;
}

#modes {
  top: 64px;
  left: 20px;
  display: flex;
  gap: 6px;
}

#hover-info {
  top: 108px;
  left: 20px;
  max-width: 360px;
  padding: 8px 10px;
  background: rgba(12, 14, 22, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
#hover-info[hidden] { display: none; }
#hover-info .name { color: #fff; font-weight: 600; }
#hover-info .details { margin-top: 2px; color: #9ba1b1; font-size: 12px; }

#bottom {
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#readouts {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

#levels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

#time {
  top: 16px;
  right: 20px;
  text-align: right;
}
#speeds { display: flex; gap: 6px; justify-content: flex-end; }
#date { margin-top: 6px; color: #8a90a0; font-variant-numeric: tabular-nums; }

#scalebar {
  min-width: 0;
}
#scalebar .bar {
  height: 0;
  border-top: 2px solid #cfd3dc;
  position: relative;
}
#scalebar .bar::before, #scalebar .bar::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 2px;
  height: 8px;
  background: #cfd3dc;
}
#scalebar .bar::before { left: 0; }
#scalebar .bar::after { right: 0; }
#scalebar .label { display: block; margin-top: 6px; }

#caption {
  color: #6a7080;
  font-size: 12px;
}

@media (max-width: 700px) {
  #help { display: none; }
  #caption { display: none; }
  #bottom { bottom: 12px; }
}
