*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0f1117;
  color: #e0e0e0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
}

#sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 240px;
  flex-shrink: 0;
  padding-top: 8px;
}

h1 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #c9d8f0;
  line-height: 1.4;
}

#district-select {
  width: 100%;
  background: #1e2435;
  color: #c9d8f0;
  border: 1px solid #2a3a5c;
  border-radius: 6px;
  padding: 7px 32px 7px 12px;
  font-size: 0.88rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  margin-top: 5px;
  margin-bottom: 5px;
}

#district-select:focus {
  outline: none;
  border-color: #4e79a7;
}

.hint {
  font-size: 0.75rem;
  color: #555;
}

#map-container {
  display: flex;
}

#map {
  display: block;
  background: #161b27;
  border-radius: 8px;
  cursor: grab;
}

#map:active {
  cursor: grabbing;
}

.district {
  stroke: #0f1117;
  stroke-width: 0.4px;
  transition: stroke-width 0.1s, stroke 0.1s;
}

.district:hover {
  stroke: #ffffff;
  stroke-width: 1.2px;
}

/* Tooltip */
#tooltip {
  position: fixed;
  background: rgba(10, 12, 20, 0.92);
  border: 1px solid #2a3a5c;
  color: #e0e0e0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  line-height: 1.6;
  z-index: 10;
}

#tooltip strong {
  color: #a8c4f0;
  display: block;
  margin-bottom: 2px;
}

#tooltip .region-name {
  color: #888;
  font-size: 0.75rem;
}
