:root {
  color-scheme: dark;

  --background: #161616;
  --panel: rgba(28, 28, 28, 0.94);
  --panel-border: rgba(255, 255, 255, 0.14);
  --text: #f2f2f2;
  --muted: #b8b8b8;
  --accent: #f0a329;
  --error: #ff6961;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);
  background: var(--background);
}

body {
  display: flex;
  flex-direction: column;
}

.toolbar {
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  min-height: 76px;
  padding: 12px 18px;

  background: var(--panel);
  border-bottom: 1px solid var(--panel-border);
}

.title-area {
  min-width: 0;
}

.title-area h1 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.title-area p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.surface-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.surface-controls label {
  color: var(--muted);
  font-size: 0.9rem;
}

.surface-controls select {
  min-width: 230px;
  max-width: 360px;
  padding: 9px 34px 9px 12px;

  color: var(--text);
  font: inherit;

  background: #292929;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

.surface-controls select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

main {
  position: relative;
  flex: 1;
  min-height: 0;
}

#map {
  width: 100%;
  height: 100%;
  background: #101010;
}

.map-information {
  position: absolute;
  z-index: 900;
  right: 14px;
  bottom: 20px;

  width: min(330px, calc(100vw - 28px));
  padding: 14px 16px;

  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  backdrop-filter: blur(6px);
}

.information-title {
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.map-information dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.map-information dl > div {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 10px;
}

.map-information dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.map-information dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  text-align: right;
}

.loading-message,
.error-message {
  position: absolute;
  z-index: 1100;
  top: 20px;
  left: 50%;

  max-width: calc(100vw - 40px);
  padding: 10px 16px;

  transform: translateX(-50%);

  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 7px;
}

.error-message {
  color: var(--error);
}

.leaflet-container {
  font: inherit;
}

.leaflet-control-zoom a {
  color: #222;
}

@media (max-width: 720px) {
  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px;
  }

  .surface-controls {
    justify-content: space-between;
  }

  .surface-controls select {
    flex: 1;
    min-width: 0;
  }

  .map-information {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }
}
