:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5a6573;
  --panel: rgba(255, 255, 255, 0.94);
  --line: #d7dee8;
  --accent: #0f766e;
}

* {
  box-sizing: border-box;
}

html,
body,
.map-shell,
#map {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

.map-shell {
  position: relative;
}

.map-panel {
  position: absolute;
  z-index: 500;
  top: 18px;
  left: 82px;
  width: min(360px, calc(100vw - 100px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(23, 32, 42, 0.16);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.1;
}

p {
  margin: 0;
  color: var(--muted);
}

.status {
  position: absolute;
  z-index: 500;
  right: 18px;
  bottom: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 0.88rem;
  box-shadow: 0 14px 32px rgba(23, 32, 42, 0.2);
}

.status.is-hidden {
  display: none;
}

.leaflet-control-layers {
  border-radius: 8px;
  border: 1px solid var(--line);
}

.trackmap-layer-sublayers {
  display: grid;
  gap: 5px;
  margin: 4px 0 8px 24px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.trackmap-layer-sublayers.is-collapsed {
  display: none;
}

.trackmap-layer-sublayer {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.25;
}

.trackmap-sublayer-toggle {
  margin-left: 8px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  font-weight: 800;
  line-height: 18px;
  cursor: pointer;
}

.trackmap-location-control {
  display: grid;
  place-items: center;
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  border-bottom: 1px solid #ccc;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
}

.trackmap-location-control:hover,
.trackmap-location-control:focus {
  background: #f4f7fb;
  color: #0b5ed7;
}

.trackmap-location-control span,
.trackmap-location-control::before,
.trackmap-location-control::after {
  position: absolute;
  display: block;
  content: "";
}

.trackmap-location-control span {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.trackmap-location-control span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.trackmap-location-control::before {
  width: 2px;
  height: 22px;
  background: linear-gradient(currentColor 0 4px, transparent 4px 18px, currentColor 18px 22px);
}

.trackmap-location-control::after {
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, currentColor 0 4px, transparent 4px 18px, currentColor 18px 22px);
}

.trackmap-user-location-icon {
  border-radius: 999px;
  background: #1d4ed8;
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.24), 0 2px 8px rgba(23, 32, 42, 0.3);
}

.trackmap-user-location-icon span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

@media (max-width: 720px) {
  .map-panel {
    top: 12px;
    left: 64px;
    width: calc(100vw - 76px);
    padding: 14px;
  }
}
