html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1c2530;
}

.app { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; }

.panel {
  position: absolute;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.controls {
  left: 12px;
  right: 12px;
  bottom: 38px;
  padding: 10px 14px 12px;
}

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row + .row { margin-top: 8px; }

.controls button {
  font: inherit;
  padding: 6px 12px;
  border: 1px solid #b8c2cc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.controls button:hover:not(:disabled) { background: #eef3f8; }
.controls button:disabled { opacity: 0.45; cursor: default; }
.controls button.active { background: #1c6dd0; border-color: #1c6dd0; color: #fff; }
.controls button.danger { border-color: #c0392b; color: #c0392b; }

.speed { min-width: 52px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 8px; }
.clock small { font-size: 13px; font-weight: 400; color: #5b6875; margin-left: 6px; }
.spacer { flex: 1; }
.status { font-size: 12px; color: #5b6875; font-variant-numeric: tabular-nums; }
.status.warn { color: #b7791f; }
.status.error { color: #c0392b; }

.timeline { flex: 1; min-width: 200px; margin: 0; }
.tick { font-size: 12px; color: #5b6875; font-variant-numeric: tabular-nums; }

.legend {
  top: 12px;
  left: 12px;
  max-height: calc(100% - 205px);
  overflow-y: auto;
  padding: 8px 10px;
  font-size: 12px;
}
.legend h4 { margin: 0 0 6px; font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.legend-item.idle { opacity: 0.35; }
.chip { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }

.legend.ranking { min-width: 190px; }
.task-name { margin: -2px 0 6px; color: #5b6875; max-width: 230px; }
.rank { width: 24px; text-align: right; font-weight: 600; }
.who { width: 28px; font-weight: 600; }
.dist { flex: 1; text-align: right; white-space: nowrap; }
.tps { width: 28px; text-align: right; color: #5b6875; }
