.story-profile-map {
  position: relative;
  width: var(--ks-story-map-viewport-width);
  max-width: var(--ks-story-map-viewport-width);
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.story-profile-map .leaflet-container {
  width: var(--ks-story-map-viewport-width) !important;
  max-width: var(--ks-story-map-viewport-width) !important;
  margin: 0;
}

.story-profile-map .story-replay-layer,
.story-profile-map .story-replay-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.story-profile-map .story-replay-preview {
  z-index: 730;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.2, 0.9, 0.24, 1);
  transform: scale(0.96);
}

.story-profile-map .story-replay-preview::after {
  content: none;
}

.story-profile-map .story-replay-preview.is-visible {
  opacity: 1;
  transform: scale(1);
}

.story-profile-map .story-replay-preview .story-map-popup::after {
  left: var(--story-map-popup-arrow-offset-x, 50%);
  top: auto;
  right: auto;
  bottom: -6px;
  transform: translateX(-50%) rotate(45deg);
}

.story-profile-map .story-replay-preview[data-placement="below"] .story-map-popup::after {
  left: var(--story-map-popup-arrow-offset-x, 50%);
  top: -6px;
  bottom: auto;
  transform: translateX(-50%) rotate(45deg);
}

.story-profile-map .story-replay-preview[data-placement="left"] .story-map-popup::after {
  left: auto;
  right: -6px;
  top: var(--story-map-popup-arrow-offset-y, 50%);
  bottom: auto;
  transform: translateY(-50%) rotate(45deg);
}

.story-profile-map .story-replay-preview[data-placement="right"] .story-map-popup::after {
  left: -6px;
  right: auto;
  top: var(--story-map-popup-arrow-offset-y, 50%);
  bottom: auto;
  transform: translateY(-50%) rotate(45deg);
}

.story-profile-map .story-replay-overlay__segment {
  fill: none;
  stroke: rgba(107, 114, 128, 0.46);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  will-change: opacity;
}

.story-profile-map .story-replay-overlay__segment.is-visible {
  opacity: var(--story-replay-segment-opacity, 1);
}

.story-profile-map .story-replay-overlay__segment.is-keep-trail {
  stroke: rgba(107, 114, 128, 0.36);
}

.story-profile-map .story-replay-overlay__segment--active {
  stroke: rgba(107, 114, 128, 0.38);
  stroke-width: 4;
  opacity: 1;
  transition: none;
}

.story-profile-map .story-replay-overlay__stop {
  fill: #50b0dc;
  stroke: none;
  stroke-width: 0;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.35);
  transition:
    opacity 260ms ease,
    transform 380ms cubic-bezier(0.2, 0.9, 0.24, 1);
}

.story-profile-map .story-replay-overlay__stop.is-visible {
  opacity: var(--story-replay-stop-opacity, 1);
  transform: scale(var(--story-replay-stop-scale, 1));
}

.story-profile-map .story-replay-overlay__stop.is-keep-trail {
  fill: #50b0dc;
  stroke: none;
}

.story-profile-map.story-static-map {
  height: auto;
  min-height: 0;
  display: block;
}

.story-profile-map .leaflet-tile-pane,
.story-profile-map .leaflet-tile {
  transition: opacity 220ms ease;
}

.story-map-toggle {
  display: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  margin: 0 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-pill-height);
  padding: 0 14px;
  border: 1px solid var(--color-button-primary);
  border-radius: var(--radius-pill);
  background: var(--color-button-primary);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
  letter-spacing: 0;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.story-map-toggle:hover {
  background: #ffffff;
  color: var(--color-button-primary);
  border-color: var(--color-button-primary);
}

.story-map-toggle:focus,
.story-map-toggle:focus-visible,
.story-map-toggle:active {
  outline: none;
  box-shadow: none;
}

.story-item.story-map-open .story-profile {
  margin-bottom: 0;
}

.story-map-card.story-map-open .story-profile-map-wrap {
  width: 100%;
  height: 300px;
  aspect-ratio: auto;
  box-shadow: 0 10px 18px -12px rgba(17, 24, 39, 0.22);
  background: transparent;
  overflow: visible;
}

.story-replay-console {
  --story-replay-tab-height: 68px;
  --story-replay-open-height: 260px;
  --story-replay-shell-line: #d1d5db;
  --story-replay-shell-muted: #9ca3af;
  --story-replay-shell-muted-dark: #4b5563;
  --story-replay-shell-surface: #ffffff;
  --story-replay-select-surface: #f7f8fb;
  --story-replay-select-surface-hover: #ffffff;
  --story-replay-select-border: rgba(203, 213, 225, 0.96);
  --story-replay-select-border-hover: rgba(148, 163, 184, 0.96);
  --story-replay-select-text: var(--story-replay-shell-muted);
  --story-replay-select-text-hover: var(--story-replay-shell-muted-dark);
  --story-replay-select-caret: var(--story-replay-shell-muted);
  --story-replay-select-caret-hover: var(--story-replay-shell-muted-dark);
  --story-replay-select-text-shadow: none;
  --story-replay-select-shadow: none;
  --story-replay-select-shadow-hover: none;
  --story-replay-select-shadow-focus:
    inset 0 0 0 1px rgba(100, 116, 139, 0.52),
    0 0 0 2px rgba(59, 130, 246, 0.14);
  --story-replay-select-shadow-active: none;
  width: 100%;
  margin: 0 0 25px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--story-replay-shell-line);
  border-top: 0;
  border-radius: 0 0 var(--ks-shell-radius-card-md) var(--ks-shell-radius-card-md);
  background: var(--story-replay-shell-surface);
  background-image: var(--ks-card-material-surface);
  height: var(--story-replay-tab-height);
  transition: height 1500ms cubic-bezier(0.32, 0.94, 0.18, 1);
  will-change: height;
  box-shadow: var(--ks-shadow-card-plastic);
}

.story-replay-console::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.42);
  transform: none;
  pointer-events: none;
}

.story-replay-console::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.34);
  transform: none;
  opacity: 1;
  pointer-events: none;
}

.story-replay-console.is-open {
  height: var(--story-replay-open-height);
}

.story-replay-console:not(.is-ready) {
  transition: none;
}

.story-replay-console__drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--story-replay-open-height);
  display: flex;
  flex-direction: column;
}

.story-replay-console.is-dragging,
.story-replay-console.is-animating {
  transition: none;
}

.story-replay-console__tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--story-replay-tab-height);
  padding: 20px 18px 20px;
  border: 0;
  border-radius: 0 0 var(--ks-shell-radius-card-md) var(--ks-shell-radius-card-md);
  background: transparent;
  color: #9ca3af;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
  user-select: none;
}

.story-replay-console__tab:active {
  cursor: grabbing;
}

.story-replay-console__tab-copy {
  position: absolute;
  left: 50%;
  top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  transform: translateX(-50%);
  opacity: 1;
  transition: none;
  pointer-events: none;
}

.story-replay-console__tab-copy[hidden] {
  display: inline-flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.story-replay-console__tab-copy--open {
  display: none !important;
}

.story-replay-console__tab-label,
.story-replay-console__tab-helper-text {
  color: rgba(75, 85, 99, 0.82);
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 -1px 0 rgba(75, 85, 99, 0.18),
    1px 0 0 rgba(255, 255, 255, 0.18),
    -1px 0 0 rgba(75, 85, 99, 0.08);
}

.story-replay-console__tab-handle {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: block;
  width: var(--ks-sheet-handle-width);
  height: var(--ks-sheet-handle-height);
  border-radius: var(--ks-sheet-handle-radius);
  background: var(--ks-sheet-handle-fill);
  box-shadow: var(--ks-shadow-sheet-handle);
  color: var(--story-replay-shell-muted-dark);
}

.story-replay-console__tab:focus,
.story-replay-console__tab:focus-visible {
  outline: none;
  box-shadow: none;
}

.story-replay-console__panel {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
}

.story-replay-console__body {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 12px 20px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 0;
}

.story-replay-console__playback {
  display: grid;
  justify-items: center;
  gap: 0;
}

.story-replay-console__transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.story-replay-btn__speed {
  min-width: 44px;
  color: rgba(75, 85, 99, 0.82);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 -1px 0 rgba(75, 85, 99, 0.18),
    1px 0 0 rgba(255, 255, 255, 0.18),
    -1px 0 0 rgba(75, 85, 99, 0.08);
}

.story-replay-console__status {
  margin: 10px 0 10px;
  min-height: 12px;
  color: rgba(75, 85, 99, 0.82);
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 -1px 0 rgba(75, 85, 99, 0.18),
    1px 0 0 rgba(255, 255, 255, 0.18),
    -1px 0 0 rgba(75, 85, 99, 0.08);
  visibility: hidden;
  opacity: 0;
  transition: opacity 220ms ease;
}

.story-replay-console.is-open .story-replay-console__status,
.story-replay-console.is-opening .story-replay-console__status {
  visibility: visible;
  opacity: 1;
}

.story-replay-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--story-replay-shell-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, filter 160ms ease;
}

.story-replay-btn:focus,
.story-replay-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.story-replay-btn__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.story-replay-btn__glyph--double-left,
.story-replay-btn__glyph--double-right {
  gap: 2px;
  width: 28px;
  justify-content: center;
}

.story-replay-btn__glyph--double-left span,
.story-replay-btn__glyph--double-right span {
  display: block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.story-replay-btn__glyph--double-left span {
  border-right: 13px solid var(--story-replay-shell-muted);
  filter: none;
}

.story-replay-btn__glyph--double-right span {
  border-left: 13px solid var(--story-replay-shell-muted);
  filter: none;
}

.story-replay-btn--rewind,
.story-replay-btn--forward {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: #ffffff;
  box-shadow: none;
}

.story-replay-btn__play-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 75px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: none;
}

.story-replay-btn__glyph--play {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid var(--story-replay-shell-muted);
  filter: none;
}

.story-replay-btn__glyph--pause {
  display: none;
  gap: 4px;
}

.story-replay-btn__glyph--pause span {
  display: block;
  width: 6px;
  height: 26px;
  border-radius: 999px;
  background: var(--story-replay-shell-muted);
  box-shadow: none;
}

.story-replay-btn.is-playing .story-replay-btn__glyph--play {
  display: none;
}

.story-replay-btn.is-playing .story-replay-btn__glyph--pause {
  display: inline-flex;
}

.story-replay-btn:hover .story-replay-btn__glyph--double-left span {
  border-right-color: var(--story-replay-shell-muted-dark);
}

.story-replay-btn:hover .story-replay-btn__glyph--double-right span {
  border-left-color: var(--story-replay-shell-muted-dark);
}

.story-replay-btn:hover .story-replay-btn__play-ring {
  background: #f8fafc;
  box-shadow: none;
}

.story-replay-btn:hover .story-replay-btn__glyph--play {
  border-left-color: var(--story-replay-shell-muted-dark);
}

.story-replay-btn:hover .story-replay-btn__glyph--pause span {
  background: var(--story-replay-shell-muted-dark);
}

.story-replay-btn.is-active .story-replay-btn__glyph--double-left span {
  border-right-color: var(--story-replay-shell-muted-dark);
}

.story-replay-btn.is-active .story-replay-btn__glyph--double-right span {
  border-left-color: var(--story-replay-shell-muted-dark);
}

.story-replay-btn:hover {
  transform: translateY(-1px);
}

.story-replay-btn:active {
  transform: translateY(1px);
}

.story-replay-btn--rewind:active,
.story-replay-btn--forward:active {
  box-shadow: none;
}

.story-replay-btn--play:active .story-replay-btn__play-ring {
  box-shadow: none;
}

.story-replay-console:not(.is-open):not(.is-opening) .story-replay-btn--rewind,
.story-replay-console:not(.is-open):not(.is-opening) .story-replay-btn--forward,
.story-replay-console.is-closing .story-replay-btn--rewind,
.story-replay-console.is-closing .story-replay-btn--forward {
  transform: translateY(2px);
  box-shadow: none;
}

.story-replay-console:not(.is-open):not(.is-opening) .story-replay-btn--play,
.story-replay-console.is-closing .story-replay-btn--play {
  transform: translateY(2px);
}

.story-replay-console:not(.is-open):not(.is-opening) .story-replay-btn--play .story-replay-btn__play-ring,
.story-replay-console.is-closing .story-replay-btn--play .story-replay-btn__play-ring {
  box-shadow: none;
}

.story-replay-console__settings {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 20px;
  width: 100%;
  padding: 0;
  margin-top: -2px;
}

.story-replay-field {
  display: grid;
  gap: 6px;
  min-width: 125px;
  width: 125px;
}

.story-replay-field__label {
  color: var(--story-replay-shell-muted);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92),
    0 -1px 0 rgba(107, 114, 128, 0.18),
    1px 0 0 rgba(255, 255, 255, 0.16),
    -1px 0 0 rgba(107, 114, 128, 0.08);
}

.story-replay-field__select {
  width: 100%;
  min-height: 32px;
  height: 32px;
  padding: 0 28px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--story-replay-select-border);
  background-color: var(--story-replay-select-surface);
  color: var(--story-replay-select-text);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  white-space: nowrap;
  text-shadow: var(--story-replay-select-text-shadow);
  box-shadow: var(--story-replay-select-shadow);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--story-replay-select-caret) 50%),
    linear-gradient(135deg, var(--story-replay-select-caret) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 13px,
    calc(100% - 10px) 13px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.story-replay-field__select option {
  color: #111827;
  background: #f8fdff;
}

.story-replay-field__select:hover,
.story-replay-field__select:focus,
.story-replay-field__select:focus-visible {
  background-color: var(--story-replay-select-surface-hover);
  border-color: var(--story-replay-select-border-hover);
  box-shadow: var(--story-replay-select-shadow-hover);
  outline: none;
}

.story-replay-field__select:active {
  box-shadow: var(--story-replay-select-shadow-active);
}

@media (min-width: 768px) {
  .story-map-card,
  .story-map-card.story-map-open {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px;
    margin-inline: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .story-map-card {
    overflow: hidden;
  }

  .story-profile-map-wrap,
  .story-map-card.story-map-open .story-profile-map-wrap {
    width: 100%;
    height: 300px;
    min-height: 300px;
  }

  .story-replay-console {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 24px;
    --story-replay-open-height: 260px;
  }
}

@media (max-width: 767px) {
  .bill-journey-map-host {
    --journey-console-story-gap: 48px;
    position: relative;
    margin-bottom: var(--journey-console-story-gap);
  }

  .bill-journey-map-host::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--journey-console-story-gap) / -2);
    border-bottom: 2px dotted #d1d5db;
    pointer-events: none;
  }

  .story-map-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 20px 0 0;
    margin-bottom: 0;
    border-top: 1px solid #e8e6dc;
    border-bottom: 0;
  }

  .story-profile-map-wrap,
  .story-map-card.story-map-open .story-profile-map-wrap {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .story-replay-console {
    margin-top: 0;
    margin-bottom: 0;
  }

  .story-replay-console__transport {
    gap: 14px;
  }

  .story-replay-field__label {
    font-size: 10px;
  }

  .story-replay-field__select {
    min-height: 30px;
    height: 30px;
    font-size: 13px;
    background-position:
      calc(100% - 16px) 12px,
      calc(100% - 10px) 12px;
  }

  .story-static-pin {
    width: 19px;
    height: 28px;
  }

  .story-static-pin img {
    width: 19px;
    height: 28px;
  }
}

@media (min-width: 1200px) {
  .story-profile-map-wrap {
    width: 100%;
    height: 300px;
    min-height: 300px;
    justify-self: stretch;
  }
}

.story-profile-map .leaflet-tile-pane {
  z-index: 200;
}

.story-profile-map .story-replay-layer {
  z-index: 350;
}

.story-profile-map .leaflet-overlay-pane {
  z-index: 400;
}

.story-profile-map .leaflet-shadow-pane {
  z-index: 500;
}

.story-profile-map .leaflet-marker-pane {
  z-index: 600;
}

.story-profile-map .leaflet-tooltip-pane {
  z-index: 650;
}

.story-profile-map .leaflet-popup,
.story-profile-map .leaflet-popup-pane {
  z-index: 700;
}

html.theme-dark .story-map-card {
  background: transparent;
}

html.theme-dark .story-profile-map-wrap,
html.theme-dark .story-map-card.story-map-open .story-profile-map-wrap {
  border-color: rgba(127, 149, 184, 0.34);
  box-shadow: none;
  background: #132033;
}

html.theme-dark .story-profile-map .story-replay-overlay__segment {
  stroke: rgba(214, 230, 248, 0.58);
  stroke-width: 3.75;
}

html.theme-dark .story-profile-map .story-replay-overlay__segment.is-keep-trail {
  stroke: rgba(159, 191, 223, 0.46);
}

html.theme-dark .story-profile-map .story-replay-overlay__segment--active {
  stroke: rgba(239, 246, 255, 0.88);
  stroke-width: 4.25;
}

html.theme-dark .story-profile-map .story-replay-overlay__stop,
html.theme-dark .story-profile-map .story-replay-overlay__stop.is-keep-trail {
  fill: #7fc6ea;
}

html.theme-dark .story-replay-console {
  --story-replay-shell-line: rgba(165, 188, 220, 0.22);
  --story-replay-shell-muted: #c7d7ec;
  --story-replay-shell-muted-dark: #eef6ff;
  --story-replay-shell-surface: #1d2b42;
  --story-replay-select-surface: #223149;
  --story-replay-select-surface-hover: #2a3a54;
  --story-replay-select-border: rgba(219, 234, 254, 0.28);
  --story-replay-select-border-hover: rgba(239, 246, 255, 0.42);
  --story-replay-select-text: #eef6ff;
  --story-replay-select-text-hover: #ffffff;
  --story-replay-select-caret: #ffffff;
  --story-replay-select-caret-hover: #ffffff;
  --story-replay-select-text-shadow: none;
  --story-replay-select-shadow: none;
  --story-replay-select-shadow-hover: none;
  --story-replay-select-shadow-focus:
    inset 0 0 0 1px rgba(239, 246, 255, 0.44),
    0 0 0 2px rgba(80, 176, 220, 0.22);
  --story-replay-select-shadow-active: none;
  background-image: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(8, 15, 28, 0.34),
    0 18px 32px rgba(3, 8, 18, 0.28);
}

html.theme-dark .story-replay-field__select option {
  color: #eef6ff;
  background: #223149;
}

html.theme-dark .story-replay-console::before {
  background: rgba(255, 255, 255, 0.1);
}

html.theme-dark .story-replay-console::after {
  background: rgba(4, 10, 20, 0.46);
}

html.theme-dark .story-replay-console__tab-label,
html.theme-dark .story-replay-console__tab-helper-text,
html.theme-dark .story-replay-btn__speed,
html.theme-dark .story-replay-console__status,
html.theme-dark .story-replay-field__label {
  color: #eef4fb;
  text-shadow: none;
}

html.theme-dark .story-replay-btn--rewind,
html.theme-dark .story-replay-btn--forward,
html.theme-dark .story-replay-btn__play-ring {
  background: #1f2c43;
  color: #eef4fb;
  border: 1px solid rgba(231, 244, 251, 0.28);
  box-shadow: none;
}

html.theme-dark .story-replay-btn__glyph--double-left span {
  border-right-color: #d7e7fb;
  filter: none;
}

html.theme-dark .story-replay-btn__glyph--double-right span {
  border-left-color: #d7e7fb;
  filter: none;
}

html.theme-dark .story-replay-btn__glyph--play {
  border-left-color: #d7e7fb;
  filter: none;
}

html.theme-dark .story-replay-btn__glyph--pause span {
  background: #d7e7fb;
  box-shadow: none;
}

html.theme-dark .story-replay-btn:hover .story-replay-btn__glyph--double-left span {
  border-right-color: #ffffff;
}

html.theme-dark .story-replay-btn:hover .story-replay-btn__glyph--double-right span {
  border-left-color: #ffffff;
}

html.theme-dark .story-replay-btn:hover .story-replay-btn__play-ring {
  background: #27374f;
  box-shadow: none;
}

html.theme-dark .story-replay-btn:hover .story-replay-btn__glyph--play {
  border-left-color: #ffffff;
}

html.theme-dark .story-replay-btn:hover .story-replay-btn__glyph--pause span {
  background: #ffffff;
}

html.theme-dark .story-replay-console__tab-handle {
  color: #eef4fb;
}

html.theme-dark .story-profile-map .leaflet-control-zoom {
  border-color: rgba(165, 188, 220, 0.2);
  background: #1d2b42;
  box-shadow: none;
}

html.theme-dark .story-profile-map .leaflet-control-zoom a {
  color: #ffffff;
  border-color: rgba(231, 244, 251, 0.24);
  background: #1f2c43;
  box-shadow: none;
  text-shadow: none;
}

html.theme-dark .story-profile-map .leaflet-control-zoom a:hover,
html.theme-dark .story-profile-map .leaflet-control-zoom a:focus-visible {
  background: #27374f;
  box-shadow: none;
}

html.theme-dark .story-profile-map .leaflet-control-zoom a:active {
  box-shadow: none;
}

html.theme-dark .story-profile-map .leaflet-popup-content-wrapper,
html.theme-dark .story-profile-map .leaflet-popup-tip {
  background: #1d2b42;
  color: #eef4fb;
}

html.theme-dark .story-profile-map .leaflet-popup-content-wrapper {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

html.theme-dark .story-profile-map .story-map-popup {
  background: #1d2b42;
  color: #eef4fb;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.24));
}

html.theme-dark .story-profile-map .story-map-popup::after {
  background: #1d2b42;
}

html.theme-dark .story-profile-map .story-map-popup__meta-label,
html.theme-dark .story-profile-map .story-map-popup__stop-label {
  color: #eef4fb;
}

html.theme-dark .story-profile-map .story-map-popup__click-pill {
  border-color: #ffb703;
  color: #ffb703;
}

html.theme-dark .story-profile-map .story-map-popup__click-pill:hover,
html.theme-dark .story-profile-map .story-map-popup__click-pill:focus-visible,
html.theme-dark .story-profile-map .story-map-popup__click-pill:active {
  background: #ffb703;
  border-color: #ffb703;
  color: #ffffff;
}

.story-profile-map .leaflet-popup-content-wrapper,
.story-profile-map .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.99);
}

.story-profile-map .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.story-profile-map .leaflet-popup-tip {
  box-shadow: none;
}

.story-profile-map .leaflet-popup-content {
  margin: 0;
}

.story-profile-map .story-map-popup-layer {
  position: absolute;
  z-index: 720;
  min-width: 168px;
  max-width: min(220px, calc(100% - 32px));
  pointer-events: auto;
  opacity: 0;
  transition: opacity 120ms ease;
  will-change: left, top, opacity;
}

.story-profile-map .story-map-popup-layer.is-visible {
  opacity: 1;
}

.story-profile-map .story-map-popup {
  position: relative;
  z-index: 1;
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  filter: drop-shadow(0 10px 24px rgba(15, 23, 42, 0.18));
  pointer-events: auto;
  cursor: default;
}

.story-profile-map .story-map-popup__media-layout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.story-profile-map .story-map-popup__action-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 50px;
}

.story-profile-map .story-map-popup__person-photo {
  display: block;
  width: 50px;
  min-width: 50px;
  height: 50px;
  border-radius: 999px;
  object-fit: cover;
  max-width: none;
  flex: 0 0 50px;
}

.story-profile-map .story-map-popup__person-photo--fallback {
  display: grid;
  place-items: center;
  background: var(--ks-color-primary-500);
  color: #ffffff;
  border: 2px solid #374151;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -2px 3px rgba(15, 23, 42, 0.18),
    0 3px 8px rgba(15, 23, 42, 0.14);
  box-sizing: border-box;
}

.story-profile-map .story-map-popup__person-photo-logo {
  width: 72%;
  height: 72%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-profile-map .story-map-popup__person-photo-ks {
  width: 75%;
  height: 75%;
  color: #ffffff;
}

.story-profile-map .story-map-popup__person-photo-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  display: block;
}

.story-profile-map .story-map-popup__text {
  min-width: 0;
}

.story-profile-map .story-map-popup__click-pill {
  appearance: none;
  -webkit-appearance: none;
  min-width: 42px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid #00a1ce;
  border-radius: 999px;
  background: transparent;
  color: #00a1ce;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.story-profile-map .story-map-popup__click-pill:hover,
.story-profile-map .story-map-popup__click-pill:focus-visible,
.story-profile-map .story-map-popup__click-pill:active {
  background: #00a1ce;
  border-color: #00a1ce;
  color: #ffffff;
}

.story-static-popup .story-map-popup__person-photo {
  width: 50px !important;
  min-width: 50px !important;
  height: 50px !important;
  max-width: none !important;
  flex: 0 0 50px;
}

.story-profile-map .story-map-popup__stop-link {
  cursor: pointer;
}

.story-profile-map .story-map-popup__stop-link {
  cursor: default;
  font-weight: 400;
  text-decoration: none;
}

.story-profile-map .story-map-popup__meta-label,
.story-profile-map .story-map-popup__stop-label {
  color: #111827;
  font-weight: 700;
}

.story-profile-map .story-map-popup__totals-value {
  color: #e48a1f;
  font-weight: 700;
}

.story-profile-map .story-map-popup__gave-value {
  color: #68b81f;
  font-weight: 700;
}

.story-profile-map .story-map-popup__stop-number {
  color: #00a1ce;
  font-weight: 700;
}

.story-profile-map .story-map-popup::after {
  content: '';
  position: absolute;
  left: var(--story-map-popup-arrow-offset-x, 50%);
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 1px;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: none;
}

.story-profile-map .story-map-popup-layer[data-placement="below"] .story-map-popup::after {
  top: -6px;
  bottom: auto;
}

.story-profile-map .story-map-popup-layer[data-placement="left"] .story-map-popup::after {
  left: auto;
  right: -6px;
  top: var(--story-map-popup-arrow-offset-y, 50%);
  bottom: auto;
  transform: translateY(-50%) rotate(45deg);
}

.story-profile-map .story-map-popup-layer[data-placement="right"] .story-map-popup::after {
  left: -6px;
  right: auto;
  top: var(--story-map-popup-arrow-offset-y, 50%);
  bottom: auto;
  transform: translateY(-50%) rotate(45deg);
}

.story-profile-map .leaflet-top,
.story-profile-map .leaflet-bottom {
  z-index: 800;
}

.story-profile-map .leaflet-control-container {
  display: block;
}

.story-profile-map .leaflet-left {
  left: 20px;
}

.story-profile-map .leaflet-top {
  top: auto;
  bottom: 20px;
}

.story-profile-map .leaflet-control-zoom {
  display: grid;
  gap: 0;
  padding: 6px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 22px;
  overflow: visible;
  background: #f8fafc;
  box-shadow: none;
}

.story-profile-map .leaflet-control-zoom a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  line-height: 1;
  font-size: 18px;
  font-weight: 700;
  color: var(--story-replay-shell-muted);
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: none;
  text-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.story-profile-map .leaflet-control-zoom a:first-child,
.story-profile-map .leaflet-control-zoom-in {
  border-radius: 999px 999px 0 0 !important;
}

.story-profile-map .leaflet-control-zoom a:last-child,
.story-profile-map .leaflet-control-zoom-out {
  margin-top: -1px;
  border-radius: 0 0 999px 999px !important;
}

.story-profile-map .leaflet-control-zoom a:hover,
.story-profile-map .leaflet-control-zoom a:focus-visible {
  background: #f8fafc;
  border-color: rgba(17, 24, 39, 0.2);
  transform: translateY(-1px);
}

.story-profile-map .leaflet-control-zoom a:active {
  transform: translateY(0);
  box-shadow: none;
}

.story-map-marker-image {
  width: 30px !important;
  height: 44px !important;
}

.story-map-dot-icon {
  background: transparent;
  border: 0;
}

.story-map-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #50b0dc;
}

.story-map-dot--active {
  background: #ff6b6b;
}

.story-map-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(80, 176, 220, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}

.story-map-cluster span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  min-height: 100%;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.story-profile-map .marker-cluster-small,
.story-profile-map .marker-cluster-medium,
.story-profile-map .marker-cluster-large {
  background: transparent;
}

html.theme-dark .story-map-dot {
  background: #ffb703;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 2px 8px rgba(255, 183, 3, 0.28);
}

html.theme-dark .story-map-dot--active {
  background: #ff6b6b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 2px 10px rgba(255, 107, 107, 0.28);
}

html.theme-dark .story-map-cluster {
  background: rgba(255, 183, 3, 0.94);
  border-color: rgba(255, 248, 220, 0.95);
  box-shadow: 0 3px 12px rgba(255, 183, 3, 0.26);
}

html.theme-dark .story-map-cluster span {
  color: #1b1300;
}
