html, body { margin: 0; padding: 0; height: 100%; }
#map { width: 100%; height: 100vh; }

/* Year slider — centred at bottom */
.ag-year-control {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 28, 0.85);
  color: #e8e8e8;
  padding: 10px 18px 12px;
  border-radius: 6px;
  z-index: 10;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.ag-year-control label { display: block; margin-bottom: 6px; }
.ag-year-control input[type=range] { width: 200px; accent-color: #41b6c4; cursor: pointer; }

/* Mode switcher — top right */
.ag-mode-control {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(20, 20, 28, 0.85);
  color: #e8e8e8;
  padding: 10px 14px;
  border-radius: 6px;
  z-index: 10;
  font-size: 13px;
  backdrop-filter: blur(4px);
}
.ag-mode-control label {
  display: block;
  margin: 5px 0;
  cursor: pointer;
}
.ag-mode-control input[type=radio] { cursor: pointer; }
.ag-mode-title {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  margin-bottom: 8px;
}

/* Legend — bottom left */
.ag-legend {
  position: absolute;
  bottom: 36px;
  left: 10px;
  background: rgba(20, 20, 28, 0.85);
  color: #e8e8e8;
  padding: 10px 14px;
  border-radius: 6px;
  z-index: 10;
  font-size: 12px;
  max-height: 55vh;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}
.ag-legend-title {
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}
.ag-legend-title small { font-weight: 400; color: #aaa; }
.ag-swatch {
  display: flex;
  align-items: center;
  margin: 3px 0;
  line-height: 1.3;
}
.ag-swatch span {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 2px;
  margin-right: 7px;
  flex-shrink: 0;
}

/* Tooltip */
.ag-tooltip {
  position: absolute;
  background: rgba(20, 20, 28, 0.92);
  color: #e8e8e8;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
