:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface2: #eaeef2;
  --border: #d0d7de;
  --text: #1f2328;
  --text-muted: #656d76;
  --accent: #0969da;
}

.map-wrapper {
  position: relative;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
}

.map-wrapper svg {
  display: block;
  width: 100%;
  height: auto;
}

.station {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: r 0.15s ease, stroke-width 0.15s ease, filter 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.station:hover, .station:focus {
  r: 7;
  outline: none;
  stroke: #fff;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.7));
}
.station[width]:hover, .station[width]:focus,
polygon.station:hover, polygon.station:focus {
  transform: scale(1.55);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.7));
}

#tooltip {
  position: fixed;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.78rem;
  pointer-events: none;
  z-index: 1000;
  display: none;
  max-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#tooltip .tt-tok   { color: var(--accent); font-size: 0.78rem; font-weight: 600; margin-bottom: 2px; }
#tooltip .tt-name  { font-weight: 600; color: var(--text); margin-bottom: 6px; font-size: 0.83rem; }
#tooltip .tt-row   { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
#tooltip .tt-label { color: var(--text-muted); }
#tooltip .tt-val   { font-weight: 500; color: var(--text); }
#tooltip .tt-status {
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
}
#tooltip .tt-aktualizace {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  color: var(--text-muted);
}

@keyframes pulse {
  0%   { r: 4.5; opacity: 1; }
  50%  { r: 7;   opacity: 0.7; }
  100% { r: 4.5; opacity: 1; }
}
.station.selected { animation: pulse 1.5s ease infinite; }
