#historyCountryListSlot {
  display: none;
  margin-top: 8px;
}

body.history-country-slot-active #historyCountryListSlot {
  display: block;
}

body.history-country-slot-active #sideContext .side-country-list {
  display: none;
}

.history-panel--overlay {
  position: absolute;
  z-index: 760;
  left: 16px;
  top: 72px;
  width: min(430px, calc(100% - 32px));
  max-height: calc(100% - 156px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--history-scrollbar-thumb) var(--history-scrollbar-track);
  border: 1px solid var(--history-line);
  border-radius: 8px;
  background: var(--history-panel);
  box-shadow: var(--history-panel-shadow);
  backdrop-filter: blur(7px);
}

.history-panel--overlay.is-dragging {
  user-select: none;
}

.history-panel--overlay.is-resizing {
  user-select: none;
}

.history-panel--overlay[hidden],
.history-toolbar--timeline[hidden] {
  display: none;
}

.history-splash-screen {
  display: block;
}

.history-panel--splashing > :not(.history-splash-screen) {
  display: none;
}

.history-splash-card {
  padding: 12px;
  background: var(--history-panel-solid);
}

.history-splash-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.history-splash-visual svg {
  display: block;
  width: min(110px, 42%);
  height: auto;
}

.history-splash-copy {
  min-width: 0;
}

.history-splash-label {
  margin: 0 0 8px;
  color: var(--history-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.history-splash-title {
  margin: 0;
  color: var(--history-ink);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 900;
}

.history-splash-subtitle {
  margin: 8px 0 0;
  color: var(--history-muted);
  font-size: 13px;
  line-height: 1.45;
}

.history-splash-facts {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
}

.history-splash-facts div {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid var(--history-line);
}

.history-splash-facts dt {
  color: var(--history-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.history-splash-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--history-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.history-splash-step-frame {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid var(--history-line);
  border-radius: 8px;
  background: var(--history-control-hover-bg);
}

.history-panel--overlay::-webkit-scrollbar,
.history-event-list::-webkit-scrollbar {
  width: 10px;
}

.history-panel--overlay::-webkit-scrollbar-track,
.history-event-list::-webkit-scrollbar-track {
  background: var(--history-scrollbar-track);
}

.history-panel--overlay::-webkit-scrollbar-thumb,
.history-event-list::-webkit-scrollbar-thumb {
  border: 2px solid var(--history-scrollbar-track);
  border-radius: 999px;
  background: var(--history-scrollbar-thumb);
}

.history-panel--overlay::-webkit-scrollbar-thumb:hover,
.history-event-list::-webkit-scrollbar-thumb:hover {
  background: var(--history-scrollbar-thumb-hover);
}

.history-panel--overlay::-webkit-scrollbar-button,
.history-event-list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.history-splash-step {
  display: grid;
  grid-template-columns: 28px 42px 1fr;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 6px;
  border: 1px solid var(--history-line);
  border-radius: 8px;
  background: var(--history-control-bg);
  color: var(--history-ink);
  font-size: 11px;
}

.history-splash-step.is-current {
  border-color: var(--history-action-border);
  box-shadow: inset 3px 0 0 var(--history-accent);
}

.history-splash-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--history-accent);
  color: var(--history-control-bg);
  font-weight: 900;
}

.history-splash-step-year {
  color: var(--history-accent);
  font-weight: 900;
}

.history-splash-step-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.history-splash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.history-splash-timer {
  color: var(--history-muted);
  font-size: 13px;
  font-weight: 800;
}

.history-splash-start {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--history-primary-text);
  border-radius: 8px;
  background: var(--history-accent);
  color: var(--history-control-bg);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.history-splash-start:hover,
.history-splash-start:focus-visible {
  background: var(--history-primary-text);
}

.history-splash-progress {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--history-progress-bg);
}

.history-splash-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rev), var(--history-accent));
  transform-origin: left center;
  animation-name: historySplashProgress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes historySplashProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.history-sidebar-slot:empty {
  display: none;
}

.history-panel--sidebar {
  position: static;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  margin: 8px 0 10px;
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
}

.history-panel--sidebar .history-drag-handle {
  cursor: default;
  touch-action: auto;
}

.history-panel--sidebar .history-resize-handle {
  display: none;
}

.history-panel--sidebar .history-panel-main {
  padding: 10px 10px 8px;
}

.history-panel--sidebar .history-title {
  font-size: 14px;
}

.history-panel--sidebar .history-event-text {
  font-size: 13px;
}

.history-panel--sidebar .history-event-text--conclusio {
  padding: 16px 14px 16px 16px;
  font-size: 14px;
  line-height: 1.55;
}

.history-panel--sidebar .history-event-list {
  max-height: min(240px, 32vh);
  overflow: auto;
  padding-inline: 10px;
}

.history-panel--sidebar .history-event-jump {
  grid-template-columns: 22px 40px 1fr 20px;
  gap: 5px;
  padding-inline: 6px;
}

.history-panel--sidebar .history-event-jump-title {
  font-size: 11px;
}

.history-panel-main {
  padding: 12px 12px 10px;
}

.history-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--history-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.history-drag-handle {
  cursor: move;
  touch-action: none;
}

.history-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 3;
}

.history-resize-handle::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--history-signature-rule);
  border-bottom: 2px solid var(--history-signature-rule);
}

.history-dock-button,
.history-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid var(--history-line);
  border-radius: 8px;
  background: var(--history-control-bg);
  color: var(--history-muted);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.history-dock-button {
  margin-left: auto;
  font-size: 14px;
  font-weight: 900;
}

.history-dock-button[hidden] {
  display: none;
}

.history-dock-button:hover,
.history-dock-button:focus-visible,
.history-close-button:hover,
.history-close-button:focus-visible {
  border-color: var(--history-action-border);
  color: var(--history-primary-text);
  background: var(--history-control-hover-bg);
}

.history-title {
  margin: 7px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--history-ink);
  line-height: 1.3;
}

.history-event-title {
  margin: 12px 0 0;
  padding-left: 8px;
  border-left: 3px solid var(--history-accent);
  color: var(--history-ink);
  font-size: 13px;
  font-weight: 800;
}

.history-event-year {
  color: var(--history-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.history-event-text {
  margin: 10px 0 0;
  color: var(--history-ink);
  font-size: 14px;
  line-height: 1.6;
}

.history-event-text p {
  margin: 0;
}

.history-event-text p + p {
  margin-top: .85em;
}

.history-text-story {
  display: grid;
  gap: 10px;
}

.history-text-story-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--history-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.history-text-story-label span {
  color: var(--history-accent);
}

.history-text-story-body {
  min-height: 0;
}

.history-text-story-ellipsis {
  display: block;
  color: var(--history-accent);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.history-text-story-ellipsis:first-child {
  margin-bottom: 6px;
}

.history-text-story-ellipsis:last-child {
  margin-top: 6px;
}

.history-text-story-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.history-text-story-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--history-line);
  border-radius: 999px;
  background: var(--history-control-bg);
  color: var(--history-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.history-text-story-button:hover,
.history-text-story-button:focus-visible {
  border-color: var(--history-action-border);
  color: var(--history-primary-text);
  background: var(--history-control-hover-bg);
}

.history-text-story-button.is-active {
  border-color: var(--history-accent);
  background: var(--history-accent);
  color: var(--history-control-bg);
}

.history-event-text--conclusio {
  position: relative;
  margin-top: 16px;
  padding: 18px 18px 18px 20px;
  overflow: hidden;
  border: 1px solid var(--history-conclusio-border);
  border-radius: 8px;
  background: var(--history-conclusio-bg);
  color: var(--history-conclusio-text);
  font-size: 20px;
  font-weight: normal;
  line-height: 1.55;
  letter-spacing: 0;
  box-shadow:
    inset 4px 0 0 var(--history-accent),
    var(--history-conclusio-shadow);
}

.history-event-text--conclusio::before {
  content: "Fazit";
  display: inline-flex;
  margin: 0 0 10px;
  padding: 4px 9px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: var(--history-primary-text);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.history-event-text--conclusio::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(37, 99, 235, .10);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(45, 212, 191, .12), rgba(37, 99, 235, 0) 64%);
  pointer-events: none;
}

.history-event-text--conclusio p {
  position: relative;
  z-index: 1;
}

.history-event-text--conclusio p + p {
  margin-top: 1em;
}

.history-event-signature[hidden] {
  display: none;
}

.history-event-signature--conclusio {
  margin: 12px 2px 0 auto;
  max-width: 82%;
  color: var(--history-signature-text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-align: right;
}

.history-event-signature--conclusio::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--history-signature-rule);
}

.history-event-media {
  position: relative;
  --history-event-media-max-height-ratio: .60;
  container-type: inline-size;
  max-height: calc(100cqw * var(--history-event-media-max-height-ratio));
  margin: 10px 0 0;
  overflow: hidden;
  border: 1px solid var(--history-line);
  border-radius: 8px;
  background: var(--history-media-bg);
}

.history-event-media[hidden],
.history-plant-links[hidden],
.history-plant-link[hidden],
.history-marker-index[hidden] {
  display: none;
}

.history-event-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100cqw * var(--history-event-media-max-height-ratio));
  object-fit: cover;
}

.history-event-source-hint {
  position: absolute;
  bottom: 1%;
  right: 1%;
  font-size: 0.58rem;
  color: rgba(255,255,255,0.75);
  padding: 2px 5px;
  line-height: 1;
  pointer-events: none;
}

.history-event-source-hint[hidden] { display: none; }

.history-event-media.is-cropped img {
  position: absolute;
  inset: 0 auto auto 0;
  margin: 0;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  object-fit: initial;
  transform-origin: 0 0;
}

.history-event-media.is-cropped {
  margin: 10px auto 0;
}

.history-panel--sidebar .history-event-media {
  --history-event-media-max-height-ratio: .60;
}

.history-plant-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.history-plant-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--history-action-border);
  border-radius: 8px;
  padding: 5px 8px;
  background: var(--history-control-primary-bg);
  color: var(--history-primary-text);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.history-progress {
  width: calc(100% - 24px);
  height: 7px;
  margin: 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--history-progress-bg);
}

.history-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--history-accent);
  transition: width .22s ease;
}

.history-panel-controls {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 8px;
  padding: 10px 12px 8px;
}

.history-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--history-line);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--history-control-bg);
  color: var(--history-ink);
  font: inherit;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}

.history-button.primary {
  border-color: var(--history-action-border);
  background: var(--history-control-primary-bg);
  color: var(--history-primary-text);
  font-weight: 800;
}

.history-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.history-year-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--history-year-pill-border);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--acc-strong) 0%, var(--history-accent) 100%);
  color: var(--history-control-bg);
  font-size: 14px;
  font-weight: 900;
}

.history-arrow-button {
  width: 38px;
  min-height: 36px;
  padding: 0;
  font-size: 18px;
}

.history-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 10px;
}

.history-toolbar--timeline {
  grid-template-columns: minmax(46px, 1fr) minmax(52px, 1fr) minmax(62px, 20%) minmax(34px, auto);
  align-items: center;
  padding: 10px 0 0;
}

.history-toolbar--timeline .history-button {
  min-height: 32px;
  padding-inline: 8px;
}

.history-playback-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-width: 0;
}

.history-playback-group .history-button:not([hidden]) {
  display: inline-flex;
}

.history-playback-group .history-button[hidden] {
  display: none;
}

.history-playback-group #playPauseBtn:not([hidden]) {
  grid-column: 1 / -1;
}

.history-speed-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: end;
}

.history-speed-slider {
  width: 100%;
  min-width: 0;
  accent-color: var(--history-accent);
}

.history-speed-value {
  color: var(--history-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.history-story-timing-control {
  position: relative;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 6px;
  background: var(--history-timing-bg);
  cursor: pointer;
}

.history-story-timing-control input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--history-accent);
}

.history-story-timing-control span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.history-status {
  padding: 0 12px 12px;
  color: var(--history-muted);
  font-size: 11px;
}

.history-status-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.history-status-actions[hidden] {
  display: none;
}

.history-status-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--history-line);
  border-radius: 8px;
  padding: 4px 7px;
  background: var(--history-control-bg);
  color: var(--history-ink);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.history-status-button.primary {
  border-color: var(--history-action-border);
  background: var(--history-control-primary-bg);
  color: var(--history-primary-text);
  font-weight: 800;
}

.history-status-button[hidden] {
  display: none;
}

#statusPauseBtn:not([hidden]) {
  grid-column: auto;
}

.history-event-list {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--history-scrollbar-thumb) var(--history-scrollbar-track);
  padding: 0 12px 12px;
}

.history-event-jump {
  position: relative;
  display: grid;
  grid-template-columns: 24px 44px 1fr 22px;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--history-line);
  border-radius: 8px;
  padding: 7px 7px 8px;
  background: var(--history-control-bg);
  color: var(--history-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.history-event-jump[hidden] {
  display: none;
}

.history-event-jump:hover {
  border-color: var(--history-action-border);
  background: var(--history-control-hover-bg);
}

.history-event-jump.is-current {
  border-color: var(--history-current-border);
  background: var(--history-current-bg);
  box-shadow: inset 3px 0 0 var(--history-accent);
}

.history-event-jump-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  align-self: center;
  border-radius: 999px;
  background: var(--history-control-primary-bg);
  color: var(--history-primary-text);
  font-size: 11px;
  font-weight: 900;
  opacity: 0;
  transform: scale(.86);
  transition: opacity .18s ease, transform .18s ease;
}

.history-event-jump.is-reached .history-event-jump-index {
  opacity: 1;
  transform: scale(1);
}

.history-event-jump.is-current .history-event-jump-index {
  background: var(--history-accent);
  color: var(--history-control-bg);
}

.history-event-jump-year {
  color: var(--history-accent);
  font-size: 11px;
  font-weight: 800;
}

.history-event-jump-main {
  min-width: 0;
}

.history-event-jump-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.history-event-ok {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  align-self: center;
  color: var(--history-ok);
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: scale(.82);
  transition: opacity .18s ease, transform .18s ease;
}

.history-event-ok svg {
  display: block;
  width: 20px;
  height: 20px;
}

.history-event-jump.is-reached .history-event-ok {
  opacity: 1;
  transform: scale(1);
}

.history-event-row-timer {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, .18);
  background: var(--history-row-timer-bg);
  opacity: 0;
  margin-top: 2px;
}

.history-event-jump.is-current .history-event-row-timer {
  opacity: 1;
}

.history-event-row-timer-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--history-row-timer-bar);
  box-shadow: var(--history-row-timer-glow);
  transition: width linear;
}

.history-marker-wrap {
  position: relative;
  width: var(--history-marker-size, 36px);
  height: var(--history-marker-size, 36px);
}

.history-marker-index {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  min-width: calc(var(--history-marker-size, 36px) * .92);
  height: calc(var(--history-marker-size, 36px) * .84);
  border: 1px solid rgba(37, 99, 235, .35);
  border-radius: 999px;
  padding: 0 8px;
  background: var(--history-marker-bg);
  color: var(--history-primary-text);
  font-size: var(--history-marker-font-size, 13px);
  font-weight: 900;
  line-height: var(--history-marker-line-height, 24px);
  text-align: center;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
}

.history-marker-wrap.is-active .history-marker-index {
  z-index: 3;
  border-color: rgba(225, 29, 72, .45);
  color: var(--history-current);
  animation: historyCurrentPulse 1.1s ease-out infinite;
}

.history-next-arrow {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--history-action-border);
  background: var(--history-next-bg);
  color: var(--history-accent);
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(15, 23, 42, .18);
}

.history-route-active {
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, .22));
}

.history-route-dash {
  animation: historyRouteDash 1.15s linear infinite;
  stroke-dasharray: 10 10;
}

.history-route-pulse {
  animation: historyRoutePulse 1.5s ease-in-out infinite;
}

.history-route-comet {
  opacity: .42;
}

.history-route-comet-dot {
  width: 14px;
  height: 14px;
  border: 3px solid var(--history-marker-outline);
  border-radius: 50%;
  background: var(--history-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .22), 0 6px 14px rgba(15, 23, 42, .28);
}

.history-route-pulse-dot {
  width: 18px;
  height: 18px;
  border: 3px solid var(--history-marker-outline);
  border-radius: 50%;
  background: var(--history-route-target);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .55), 0 0 0 0 rgba(245, 158, 11, .25), 0 7px 16px rgba(15, 23, 42, .25);
  animation: historyTargetPulse 1.4s ease-out infinite;
}

@keyframes historyRouteDash {
  to {
    stroke-dashoffset: -20;
  }
}

@keyframes historyRoutePulse {
  0%,
  100% {
    opacity: .55;
    stroke-width: 4;
  }

  50% {
    opacity: 1;
    stroke-width: 7;
  }
}

@keyframes historyTargetPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, .55), 0 0 0 0 rgba(245, 158, 11, .25), 0 7px 16px rgba(15, 23, 42, .25);
  }

  60% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0), 0 0 0 20px rgba(245, 158, 11, 0), 0 7px 16px rgba(15, 23, 42, .25);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0), 0 0 0 0 rgba(245, 158, 11, 0), 0 7px 16px rgba(15, 23, 42, .25);
  }
}

@keyframes historyCurrentPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, .6), 0 0 0 0 rgba(225, 29, 72, .3), 0 4px 10px rgba(15, 23, 42, .18);
  }

  60% {
    box-shadow: 0 0 0 10px rgba(225, 29, 72, 0), 0 0 0 22px rgba(225, 29, 72, 0), 0 4px 10px rgba(15, 23, 42, .18);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0), 0 0 0 0 rgba(225, 29, 72, 0), 0 4px 10px rgba(15, 23, 42, .18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-route-dash,
  .history-route-pulse,
  .history-route-pulse-dot,
  .history-marker-wrap.is-active .history-marker-index {
    animation: none;
  }
}

.history-popup {
  min-width: 230px;
  max-width: 310px;
}

.history-popup h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.2;
}

.history-popup p {
  margin: 0;
  color: var(--history-popup-text);
  font-size: 13px;
  line-height: 1.42;
}

.history-popup-meta {
  margin-top: 8px;
  color: var(--history-muted);
  font-size: 12px;
}

.history-popup-controls {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 7px;
  margin-top: 10px;
}

.history-popup-controls button {
  min-height: 34px;
  border: 1px solid var(--history-line);
  border-radius: 8px;
  background: var(--history-control-bg);
  color: var(--history-ink);
  font: inherit;
  cursor: pointer;
}

.history-popup-controls button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.history-popup-controls .history-popup-step {
  font-weight: 700;
  color: var(--history-muted);
  cursor: default;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

@media (max-width: 700px) {
  .history-splash-visual svg {
    width: min(96px, 38%);
  }

  .history-splash-title {
    font-size: 16px;
  }

  .history-splash-subtitle {
    font-size: 13px;
  }

  .history-splash-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .history-splash-start {
    width: 100%;
  }

  .history-panel--overlay:not(.history-panel--sidebar) {
    left: 10px;
    right: 10px;
    top: 68px;
    width: auto;
    max-height: calc(100% - 170px);
  }

  .history-event-media {
    --history-event-media-max-height-ratio: .60;
  }
}
