:root {
  --bg: #07090E;
  --panel: #0B0E14;
  --type: #D6D4CC;
  --muted: #8B8A84;
  --rule: #2A2E36;
  --conflict: #E05448;
  --choke: #3DB8E8;
  --resource: #3CCF7A;
  --drone: #C46BE0;
}
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--type);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}
#app {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 840px;
  overflow: hidden;
  background: var(--bg);
}
#globe { position: absolute; inset: 0; }
.chrome { position: absolute; z-index: 2; pointer-events: none; }
.chrome * { pointer-events: auto; }
header.chrome {
  top: 16px;
  left: 16px;
  right: 16px;
  max-width: 460px;
}
.kicker {
  color: var(--muted);
  letter-spacing: 0.16em;
  font-size: 10px;
  text-transform: uppercase;
}
h1 {
  margin: 4px 0 8px;
  font-size: 18px;
  font-weight: 560;
  letter-spacing: 0.01em;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
}
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--rule);
  padding: 4px 8px;
  cursor: pointer;
}
.swatch.off { opacity: 0.38; }
.swatch i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.swatch i.route {
  border-radius: 0;
  height: 2px;
  width: 14px;
}
.status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}
#sidebar {
  position: absolute;
  top: 16px;
  right: 16px;
  width: min(340px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  z-index: 3;
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 16px 16px 18px;
  display: none;
}
#sidebar.open { display: block; }
#sidebar .meta {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
#sidebar h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 560;
}
#sidebar .block { margin: 0 0 14px; }
#sidebar p {
  margin: 0;
  color: var(--type);
  white-space: pre-wrap;
}
#sidebar a {
  color: var(--type);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  display: inline-block;
  margin: 2px 0;
}
#sidebar a:hover { border-bottom-color: var(--type); }
#close {
  float: right;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}
#empty {
  display: none;
  position: absolute;
  left: 16px;
  bottom: 16px;
  color: var(--muted);
  z-index: 2;
}
@media (max-width: 720px) {
  header.chrome { top: 10px; left: 12px; right: 12px; max-width: none; }
  h1 { font-size: 16px; }
  #sidebar {
    top: auto; right: 0; left: 0; bottom: 0;
    width: 100%; max-height: 46vh;
    border-left: 0; border-right: 0; border-bottom: 0;
    border-radius: 12px 12px 0 0;
  }
}
