.shl-timeline-map {
  --shl-card-bg: rgba(255, 252, 244, 0.96);
  --shl-accent: #c8612f;
  --shl-text: #1d3128;
  --shl-border: rgba(29, 49, 40, 0.12);
  --shl-shadow: 0 16px 40px rgba(29, 49, 40, 0.1);
  display: grid;
  gap: 1rem;
}

.shl-timeline-map__header {
  background: linear-gradient(135deg, rgba(214, 231, 225, 0.88), rgba(251, 247, 235, 0.98));
  border: 1px solid var(--shl-border);
  border-radius: 24px;
  box-shadow: var(--shl-shadow);
  padding: 1.5rem;
}

.shl-timeline-map__header h2,
.shl-timeline-map__list h3 {
  color: var(--shl-text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  margin: 0 0 0.5rem;
}

.shl-timeline-map__header p {
  color: rgba(29, 49, 40, 0.82);
  margin: 0;
}

.shl-timeline-map__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.shl-timeline-map__filter {
  appearance: none;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--shl-border);
  border-radius: 999px;
  color: var(--shl-text);
  cursor: pointer;
  font: inherit;
  padding: 0.75rem 1rem;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.shl-timeline-map__filter:hover,
.shl-timeline-map__filter:focus-visible {
  border-color: rgba(200, 97, 47, 0.45);
  outline: none;
  transform: translateY(-1px);
}

.shl-timeline-map__filter.is-active {
  background: rgba(200, 97, 47, 0.12);
  border-color: rgba(200, 97, 47, 0.5);
  color: #8f441e;
  font-weight: 700;
}

.shl-timeline-map__canvas {
  border: 1px solid var(--shl-border);
  border-radius: 28px;
  box-shadow: var(--shl-shadow);
  height: 520px;
  overflow: hidden;
}

.shl-timeline-map__canvas .leaflet-popup-content-wrapper {
  border-radius: 16px;
}

.shl-timeline-map__popup h4 {
  color: var(--shl-text);
  margin: 0 0 0.35rem;
}

.shl-timeline-map__popup p {
  color: rgba(29, 49, 40, 0.78);
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
}

.shl-timeline-map__popup a {
  color: var(--shl-accent);
  font-weight: 600;
  text-decoration: none;
}

.shl-timeline-map__legend {
  color: rgba(29, 49, 40, 0.72);
  font-size: 0.95rem;
}

.shl-timeline-map__list {
  background: var(--shl-card-bg);
  border: 1px solid var(--shl-border);
  border-radius: 24px;
  box-shadow: var(--shl-shadow);
  padding: 1.35rem;
}

.shl-timeline-map__cards {
  display: grid;
  gap: 0.9rem;
}

.shl-timeline-map__card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(29, 49, 40, 0.08);
  border-radius: 18px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 120px 1fr;
  overflow: hidden;
  padding: 0.75rem;
}

.shl-timeline-map__card img {
  border-radius: 12px;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.shl-timeline-map__card-body {
  display: grid;
  gap: 0.45rem;
}

.shl-timeline-map__card-body h4 {
  color: var(--shl-text);
  margin: 0;
}

.shl-timeline-map__period {
  color: var(--shl-accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.shl-timeline-map__excerpt {
  color: rgba(29, 49, 40, 0.78);
  margin: 0;
}

.shl-timeline-map__link {
  color: var(--shl-accent);
  font-weight: 700;
  text-decoration: none;
}

.shl-timeline-map--empty {
  background: var(--shl-card-bg);
  border: 1px solid var(--shl-border);
  border-radius: 20px;
  padding: 1rem 1.2rem;
}

@media (max-width: 780px) {
  .shl-timeline-map__canvas {
    height: 420px;
  }

  .shl-timeline-map__card {
    grid-template-columns: 1fr;
  }

  .shl-timeline-map__card img {
    aspect-ratio: 16 / 9;
  }
}
