:root {
  --tl-bg: #0b0b0c;
  --tl-surface: rgba(255, 255, 255, 0.06);
  --tl-surface-strong: rgba(255, 255, 255, 0.1);
  --tl-text: #f5f7fb;
  --tl-muted: #a9b1c2;
  --tl-accent: #72d8ff;
  --tl-accent-2: #5b8dff;
  --tl-border: rgba(255, 255, 255, 0.16);
  --tl-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  --tl-radius-scale: 0.8;
  --tl-radius: calc(16px * var(--tl-radius-scale));
}

.tl-section {
  margin-top: 2rem;
}

.tl {
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--tl-text);
  background:
    radial-gradient(1100px 300px at 10% 20%, rgba(114, 216, 255, 0.12), transparent 60%),
    radial-gradient(1100px 320px at 90% 80%, rgba(91, 141, 255, 0.12), transparent 62%),
    var(--tl-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(24px * var(--tl-radius-scale));
  padding: 1rem;
  overflow: hidden;
}

.tl::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0.8px, transparent 0.8px);
  background-size: 32px 32px;
  opacity: 0.1;
  pointer-events: none;
  animation: tl-float 24s linear infinite;
}

@keyframes tl-float {
  from { transform: translateX(0); }
  to { transform: translateX(-32px); }
}

.tl-header {
  order: 0;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.tl-title {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
}

.tl-subtitle {
  margin: 0.35rem 0 0;
  color: var(--tl-muted);
}

.tl-ufo-wrap {
  order: 1;
  margin-top: 0.7rem;
  position: relative;
  z-index: 2;
}

.tl-ufo-rail {
  position: relative;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(20, 28, 40, 0.86), rgba(14, 20, 28, 0.7));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tl-ufo-fill {
  position: absolute;
  inset: 4px auto 4px 4px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(114, 216, 255, 0.55), rgba(91, 141, 255, 0.55));
  box-shadow: 0 0 22px rgba(114, 216, 255, 0.45);
  transition: width 0.22s ease;
}

.tl-ufo {
  position: absolute;
  top: 50%;
  left: 0;
  width: 46px;
  height: 22px;
  transform: translateY(-50%);
  border: 1px solid rgba(201, 236, 255, 0.8);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(207, 226, 245, 0.9), rgba(124, 158, 194, 0.88));
  box-shadow:
    0 4px 18px rgba(69, 161, 255, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
  pointer-events: auto;
  cursor: grab;
  transition: left 0.24s ease;
  animation: tl-ufo-bob 2.8s ease-in-out infinite;
}

.tl-ufo.is-dragging {
  cursor: grabbing;
  transition: none;
}

.tl-ufo::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 18px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(226, 241, 255, 0.95), rgba(146, 187, 227, 0.9));
  border: 1px solid rgba(199, 224, 247, 0.82);
}

.tl-ufo::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -7px;
  height: 5px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 50%, rgba(114, 216, 255, 0.9), transparent 55%),
              radial-gradient(circle at 80% 50%, rgba(91, 141, 255, 0.85), transparent 55%);
  filter: blur(1px);
  opacity: 0.85;
  animation: tl-ufo-thruster 1.1s ease-in-out infinite;
}

.tl-ufo-glow {
  position: absolute;
  top: 50%;
  left: 0;
  width: 52px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(114, 216, 255, 0.32), transparent 70%);
  pointer-events: none;
  transition: left 0.24s ease;
}

@keyframes tl-ufo-bob {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 2px)); }
}

@keyframes tl-ufo-thruster {
  0%, 100% { opacity: 0.75; transform: scaleX(0.9); }
  50% { opacity: 1; transform: scaleX(1); }
}

.tl-viewport {
  order: 2;
  margin-top: 0.8rem;
  position: relative;
}

.tl-viewport::before,
.tl-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.6rem;
  z-index: 3;
  pointer-events: none;
}

.tl-viewport::before {
  left: 0;
  background: linear-gradient(90deg, rgba(11, 11, 12, 0.95), rgba(11, 11, 12, 0));
}

.tl-viewport::after {
  right: 0;
  background: linear-gradient(270deg, rgba(11, 11, 12, 0.95), rgba(11, 11, 12, 0));
}

.tl-track {
  list-style: none;
  margin: 0;
  padding: 2rem 0.6rem 1.35rem;
  display: flex;
  gap: clamp(0.45rem, 1vw, 0.8rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.6rem;
  position: relative;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
}

.tl-track::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.tl-track.is-dragging {
  cursor: grabbing;
}

.tl-track::before,
.tl-track::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  top: 1.08rem;
  height: 2px;
  border-radius: 999px;
}

.tl-track::before {
  background: transparent;
}

.tl-track::after {
  right: auto;
  width: calc(var(--tl-progress, 0) * 100%);
  background: linear-gradient(90deg, var(--tl-accent), var(--tl-accent-2));
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.55);
}

.tl-item {
  min-width: clamp(126px, 18vw, 168px);
  max-width: clamp(126px, 18vw, 168px);
  position: relative;
  scroll-snap-align: center;
}

.tl-node {
  position: absolute;
  left: 0.52rem;
  top: 1.08rem;
  width: 0.72rem;
  height: 0.72rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tl-accent), var(--tl-accent-2));
  box-shadow: 0 0 0 3px rgba(114, 216, 255, 0.2), 0 0 10px rgba(96, 165, 250, 0.45);
}

.tl-card-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--tl-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--tl-shadow);
  color: var(--tl-text);
  text-align: left;
  padding: 0.55rem 0.62rem;
  margin-top: 1.62rem;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.26s ease, transform 0.26s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  cursor: pointer;
  min-height: 72px;
}

.tl-item.is-visible .tl-card-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tl-card-btn:hover {
  border-color: rgba(114, 216, 255, 0.55);
}

.tl-item.is-active .tl-card-btn {
  transform: translateY(0) scale(1.08);
  border-color: rgba(114, 216, 255, 0.78);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(114, 216, 255, 0.32);
}

.tl-item.is-active .tl-node {
  box-shadow: 0 0 0 4px rgba(114, 216, 255, 0.3), 0 0 16px rgba(96, 165, 250, 0.65);
}

.tl-date {
  margin: 0;
  font-size: 0.69rem;
  color: var(--tl-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.tl-title-text {
  margin: 0.33rem 0 0;
  font-size: 0.81rem;
  line-height: 1.26;
}

.tl-detail {
  order: 3;
  margin-top: 0.7rem;
  border-radius: calc(16px * var(--tl-radius-scale));
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  padding: 0.9rem;
  position: relative;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.tl-detail.is-changing {
  opacity: 0.42;
}

.tl-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.8rem;
}

.tl-detail-year {
  margin: 0;
  color: var(--tl-accent);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.tl-detail-title {
  margin: 0;
  font-size: 1.02rem;
}

.tl-detail-media {
  margin: 0.75rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(12px * var(--tl-radius-scale));
  overflow: hidden;
  background: rgba(16, 21, 29, 0.62);
}

.tl-detail-media img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.tl-detail-media figcaption {
  margin: 0;
  padding: 0.45rem 0.6rem;
  color: var(--tl-muted);
  font-size: 0.8rem;
}

.tl-detail-media figcaption a {
  color: #d8f7ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(114, 216, 255, 0.4);
}

.tl-detail-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.6rem;
}

.tl-detail-actions {
  margin-top: 0.85rem;
  display: flex;
  justify-content: flex-end;
}

.tl-deep-dive-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(114, 216, 255, 0.58);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 48, 70, 0.92), rgba(22, 38, 56, 0.92));
  color: #d9f8ff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.62rem 1.05rem;
  box-shadow: 0 0 0 1px rgba(114, 216, 255, 0.16), 0 8px 18px rgba(8, 17, 30, 0.35);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tl-deep-dive-btn:hover,
.tl-deep-dive-btn:focus-visible {
  border-color: rgba(114, 216, 255, 0.86);
  background: linear-gradient(180deg, rgba(35, 56, 82, 0.96), rgba(25, 43, 64, 0.96));
  box-shadow: 0 0 0 1px rgba(114, 216, 255, 0.26), 0 10px 22px rgba(8, 17, 30, 0.45);
  transform: translateY(-1px) scale(1.02);
}

.tl-detail-block {
  grid-column: span 6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(12px * var(--tl-radius-scale));
  background: rgba(16, 21, 29, 0.62);
  padding: 0.6rem 0.68rem;
}

.tl-detail-block--narrative,
.tl-detail-block--images {
  grid-column: span 12;
}

.tl-detail-block h4 {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tl-accent);
}

.tl-detail-block p {
  margin: 0.42rem 0 0;
  color: var(--tl-muted);
  line-height: 1.42;
  font-size: 0.9rem;
}

.tl-detail-list {
  margin: 0.42rem 0 0;
  padding-left: 1rem;
  color: var(--tl-muted);
}

.tl-detail-list li + li {
  margin-top: 0.2rem;
}

.tl-detail-list a {
  color: #d8f7ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(114, 216, 255, 0.4);
}

.tl-detail-list a:hover {
  color: #ffffff;
  border-bottom-color: rgba(114, 216, 255, 0.85);
}

.tl-detail-placeholder {
  margin: 0.42rem 0 0;
  color: var(--tl-muted);
  font-size: 0.88rem;
}

.tl-image-grid {
  margin-top: 0.48rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.tl-image-card {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(10px * var(--tl-radius-scale));
  overflow: hidden;
  background: rgba(20, 25, 34, 0.72);
}

.tl-image-card img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.tl-image-card figcaption {
  padding: 0.4rem 0.5rem;
  color: var(--tl-muted);
  font-size: 0.78rem;
}

.back-to-top-saucer {
  position: fixed;
  left: 50%;
  bottom: 1.3rem;
  transform: translateX(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(7, 16, 31, 0.75);
  color: var(--tl-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 14px 28px rgba(2, 8, 20, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.24s ease, transform 0.24s ease, background-color 0.24s ease;
  z-index: 12;
}

.back-to-top-saucer.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.back-to-top-saucer:hover,
.back-to-top-saucer:focus-visible {
  background: rgba(11, 28, 46, 0.92);
  transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 1000px) {
  .tl-item {
    min-width: clamp(118px, 30vw, 154px);
    max-width: clamp(118px, 30vw, 154px);
  }

  .tl-detail-block {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  .tl {
    padding: 0.8rem;
    border-radius: calc(20px * var(--tl-radius-scale));
  }

  .tl-track {
    padding-top: 1.7rem;
  }

  .tl-item {
    min-width: clamp(112px, 42vw, 146px);
    max-width: clamp(112px, 42vw, 146px);
  }

  .tl-card-btn {
    min-height: 68px;
  }

  .tl-ufo {
    width: 42px;
    height: 20px;
  }

  .tl-ufo-glow {
    width: 46px;
  }

  .back-to-top-saucer {
    bottom: 1rem;
    width: 2.8rem;
    height: 2.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl::before,
  .tl-ufo,
  .tl-ufo::after,
  .tl-card-btn,
  .tl-detail,
  .tl-ufo-fill,
  .tl-ufo-glow {
    animation: none;
    transition: none;
  }
}
