body {
  margin: 0;
  background: #0e1116;
  color: #e6e6e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

h1 {
  font-size: 32px;
  font-weight: 500;
  margin: 0;
}

#sex-toggle button {
  background: none;
  border: 1px solid #444;
  color: #ccc;
  padding: 6px 10px;
  margin-left: 6px;
  cursor: pointer;
}

#sex-toggle button.active {
  background: #ccc;
  color: #111;
}

#container {
  position: relative;
}

#map {
  width: 100%;
  height: 75vh;
  z-index: 1;
}

.panel {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 10px 10px 12px 10px;
  backdrop-filter: blur(6px);
  z-index: 20;
  width: 260px;
}

#legend-toggle {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: #e6e6e6;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.2px;
}

#legend-body {
  margin-top: 10px;
}

#legend.collapsed #legend-body {
  display: none;
}

.legend-title {
  font-size: 12px;
  color: #e6e6e6;
  margin-bottom: 8px;
  font-weight: 600;
}

#legend-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #d6d6d6;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.12);
  flex: 0 0 14px;
}

.legend-note {
  margin-top: 10px;
  font-size: 11px;
  color: #a8a8a8;
  line-height: 1.25;
}


.note {
  font-size: 11px;
  color: #aaa;
}

#tooltip {
  position: absolute;
  pointer-events: auto; 
  background: #111;
  border: 1px solid #333;
  padding: 8px 10px;
  font-size: 12px;
  color: #eee;
  display: none;
  max-width: 240px;
}

footer {
  padding: 10px 24px;
  font-size: 11px;
  color: #777;
}

