.vm-map-state-control.leaflet-bar {
  display: grid;
  gap: 4px;
  min-width: 214px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: var(--radius-md, 12px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--text);
  box-shadow: var(--shadow, 0 12px 32px rgb(18 29 25 / 18%));
  font-family: var(--font-ui);
  backdrop-filter: blur(12px);
}

.vm-map-state-control__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.vm-map-state-control__coordinates {
  display: block;
  color: var(--text);
  font-size: 0.79rem;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.vm-map-state-control__copy {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 58%, var(--border));
  border-radius: var(--radius-sm, 8px);
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.vm-map-state-control__copy:hover {
  filter: brightness(1.08);
}

.vm-map-state-control__copy:focus-visible,
.vm-progress-timeline__range:focus-visible,
.vm-progress-timeline__advance:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.vm-progress-timeline {
  display: grid;
  gap: 12px;
  margin-block: 20px 12px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: var(--radius-lg, 18px);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--bg) 88%, transparent)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgb(255 255 255 / 2%) 18px 19px);
}

.vm-progress-timeline__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vm-progress-timeline__heading h2,
.vm-progress-timeline__subtitle {
  margin: 0;
  color: var(--text);
}

.vm-progress-timeline__heading h2 {
  font-size: 1rem;
}

.vm-progress-timeline__heading time,
.vm-progress-timeline__event time,
.vm-progress-timeline__advance time {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.vm-progress-timeline__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.vm-progress-timeline__range {
  width: 100%;
  height: 6px;
  margin-block: 4px;
  border-radius: 999px;
  accent-color: var(--primary);
  cursor: pointer;
}

.vm-progress-timeline__event {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  border-inline-start: 3px solid var(--primary);
  border-radius: var(--radius-sm, 8px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}

.vm-progress-timeline__event p,
.vm-progress-timeline__event small {
  margin: 0;
}

.vm-progress-timeline__event p {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.85;
}

.vm-progress-timeline__event small {
  color: var(--muted);
}

.vm-progress-timeline__subtitle {
  margin-block-start: 4px;
  font-size: 0.86rem;
}

.vm-progress-timeline__advances {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vm-progress-timeline__advance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.vm-progress-timeline__advance:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
}

.vm-progress-timeline__advance span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vm-progress-timeline--error {
  color: var(--danger);
}

@media (max-width: 720px) {
  .vm-map-state-control.leaflet-bar {
    min-width: 0;
    max-width: min(248px, calc(100vw - 92px));
    padding: 8px 10px;
  }

  .vm-map-state-control__coordinates {
    font-size: 0.68rem;
  }

  .vm-progress-timeline {
    padding: 12px;
  }

  .vm-progress-timeline__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vm-map-state-control *,
  .vm-progress-timeline * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  body[data-mode="capsule"] .vm-brand {
    flex: 0 0 auto;
    min-width: 0;
  }

  body[data-mode="capsule"] .vm-brand > span:not(.vm-brand__mark) {
    display: none;
  }
}
@media (max-width: 640px) {
  body[data-mode="capsule"] .vm-brand,
  body[data-mode="capsule"] .vm-nav > a[href="#capsulePanel"] {
    display: none;
  }

  body[data-mode="capsule"] .vm-nav {
    width: 100%;
    min-width: 0;
  }
}