.timeline {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}
.timeline__stage {
  position: relative;
  flex: 1;
  min-height: 320px;
  overflow: hidden;
  touch-action: none;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 36, 48, 0.55), rgba(8, 18, 26, 0.2) 36px, rgba(8, 18, 26, 0.35));
}
.timeline__corner,
.timeline__tickbar {
  position: absolute;
  top: 0;
  height: 36px;
  z-index: 3;
}
.timeline__corner {
  left: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #102433;
  color: #d5e6ee;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.timeline__tickbar {
  right: 0;
  overflow: hidden;
  background: rgba(16, 36, 51, 0.94);
  border-bottom: 1px solid var(--line);
}
.timeline__tickworld,
.timeline__world,
.timeline__labels {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}
.timeline__tick {
  position: absolute;
  top: 8px;
  color: #d5e6ee;
  font-size: 0.75rem;
  white-space: nowrap;
  transform: translateX(8px);
}
.timeline__tick::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 18px;
  width: 1px;
  height: 8px;
  background: rgba(180, 210, 220, 0.45);
}
.timeline__today-tick {
  position: absolute;
  top: 6px;
  color: #f5b942;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateX(6px);
}
.timeline__labels {
  top: 36px;
  bottom: 0;
  z-index: 2;
  background: rgba(10, 24, 34, 0.94);
  border-right: 1px solid var(--line);
}
.timeline__time {
  position: absolute;
  top: 36px;
  right: 0;
  bottom: 0;
  overflow: hidden;
}
.timeline__lane {
  position: relative;
  border-bottom: 1px solid rgba(180, 210, 220, 0.08);
}
.timeline__lane.is-group { background: rgba(255, 255, 255, 0.03); }
.timeline__label {
  display: flex;
  align-items: center;
  padding: 0 10px;
  min-width: 0;
  border-bottom: 1px solid rgba(180, 210, 220, 0.08);
}
.timeline__group {
  color: #8aa3ad;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline__name,
.timeline__empty {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #f4fafc;
  padding: 0;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.timeline__name.is-quiet,
.timeline__empty,
.timeline__muted { color: #d5e6ee; }
.timeline__marker {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.timeline__marker::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--phase, #5ec8ff);
  border: 2px solid var(--phase, #5ec8ff);
  box-shadow: 0 0 0 2px rgba(8, 18, 26, 0.85);
}
.timeline__marker[data-status="planned"]::before { background: transparent; }
.timeline__marker[data-status="at-risk"]::before { box-shadow: 0 0 0 2px #f5b942; }
.timeline__today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f5b942;
  transform: translateX(-1px);
  pointer-events: none;
}
.timeline__demo {
  margin: 0 0 8px;
  color: #f5b942;
  font-size: 0.85rem;
}
.timeline__map-link { margin-left: auto; }
@media (max-width: 720px) {
  .timeline__sheet.world-map__sheet {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    width: auto;
    max-height: min(52dvh, 460px);
    border-radius: 18px 18px 0 0;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 640px) {
  .timeline { height: auto; gap: 6px; }
  .timeline__stage { height: 68vh; min-height: 68vh; flex: none; }
  .timeline__name,
  .timeline__empty { font-size: 0.84rem; }
  .timeline .world-map__count { display: none; }
}
