:root {
  --bg: #0d1117;
  --panel: #111827;
  --ink: #cbd5e1;
  --muted: #8b949e;
  --accent: #58a6ff;
  --grid: #1f2937;
  --card: #0f172a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
}
header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--grid);
  position: sticky;
  top: 0;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(8px);
}
.title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.subtitle {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 64px;
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--card));
  border: 1px solid var(--grid);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
h2,
h3 {
  margin: 0 0 8px 0;
  font-weight: 600;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
  gap: 16px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0 0;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--grid);
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--ink);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-item.inactive {
  opacity: 0.45;
}
canvas {
  display: block;
  image-rendering: auto;
}
.case-banner {
  margin-bottom: 20px;
}
