:root {
  /* --slide-width: 14px;  */
  --year-font: 14px;
  --active-font: 28px;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: system-ui, Segoe UI, Roboto, "Helvetica Neue", Arial;
  background: #fff;
}

.wrap {
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.timeline-container {
  position: relative;
  width: 92%;
  max-width: 1100px;
  height: 160px;
  overflow: hidden;
  margin-top: 80px;
}

.highlight-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 20px;
  width: 2px;
  background: #e11;
  transform: translateX(-50%);
  z-index: 12;
  pointer-events: none;
}

.timeline-swiper {
  width: 100%;
  height: 100%;
}

.timeline-swiper-wrapper {
  align-items: flex-start;
}

.timeline-swiper {
  .swiper-slide {
    width: var(--slide-width);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
  }
}

.tick {
  width: 1px;
  height: 20px;
  background: #222;
  opacity: 0.28;
  position: relative;
}

.tick.year {
  height: 36px;
  opacity: 1;
}

.tick.year span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 40px;
  font-size: var(--year-font);
  color: #9aa;
  white-space: nowrap;
  transition: all 0.22s ease;
  pointer-events: none;
}

.tick.year.active span {
  font-size: var(--active-font);
  top: 56px;
  color: #e11;
  font-weight: 700;
}

.tick.year.highlight span {
  color: #e11;
}

.controls {
  display: flex;
  gap: 20px;
}

button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #333;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #555;
}

button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* Ensure timeline ticks are horizontal */
.timeline-container .swiper-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.timeline-container .swiper-slide {
  flex: 0 0 auto;
  /* Adjust width as needed */
  width: 14px;
  /* margin-right: 14px; */
}

.history-slider {
  overflow: hidden;
  width: 100%;
}

.history-slider-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  /* gap: 20px; */
}

.history-swiper-slide {
  width: 100%;
  flex: 0 0 auto;
}
