.timeline-page {
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 8%, rgba(245, 194, 208, 0.24), transparent 25rem),
    radial-gradient(circle at 92% 25%, rgba(184, 169, 232, 0.2), transparent 28rem),
    var(--bg);
}

.timeline-hero {
  position: relative;
  min-height: 340px;
  margin: 0;
  padding: 82px 24px 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 115%, rgba(245, 194, 208, 0.28), transparent 42%),
    linear-gradient(145deg, #201a30 0%, var(--bg-dark) 50%, #2c2441 100%);
}

.timeline-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52px;
  background: var(--bg);
  clip-path: ellipse(58% 38% at 50% 100%);
}

.timeline-hero-inner {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
}

.timeline-eyebrow {
  margin-bottom: 10px;
  color: rgba(245, 194, 208, 0.82);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.timeline-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-shadow: 0 4px 26px rgba(184, 169, 232, 0.26);
}

.timeline-intro {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.88rem, 2.5vw, 1rem);
  line-height: 1.9;
}

.hero-sparkle {
  position: absolute;
  color: var(--pink);
  opacity: 0.7;
  animation: sparkle 3.8s ease-in-out infinite;
}

.hero-sparkle-one { top: -24px; left: 7%; font-size: 1.4rem; }
.hero-sparkle-two { top: 42%; right: 2%; font-size: 1rem; animation-delay: -1.5s; }
.hero-sparkle-three { bottom: -22px; left: 19%; font-size: 0.75rem; animation-delay: -2.7s; }

@keyframes sparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 0.9; transform: scale(1.12) rotate(12deg); }
}

.timeline-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 58px 28px 0;
}

.origin-section {
  max-width: 680px;
  margin: 0 auto 92px;
}

.origin-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.origin-label h2,
.timeline-ending h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--lavender-deep);
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.origin-note {
  position: relative;
  margin: 0;
  padding: 30px 34px 24px;
  border: 1px solid rgba(184, 169, 232, 0.34);
  border-radius: 22px 22px 22px 6px;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(184, 169, 232, 0.1) 32px),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 38px var(--card-shadow);
  transform: rotate(-0.35deg);
}

.origin-note::before {
  content: "“";
  position: absolute;
  top: -24px;
  left: 18px;
  color: var(--pink);
  font-family: Georgia, serif;
  font-size: 4.8rem;
  line-height: 1;
  opacity: 0.85;
}

.origin-note > p {
  position: relative;
  color: var(--text);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.02rem, 3vw, 1.25rem);
  font-weight: 600;
  line-height: 2;
}

.origin-note footer {
  margin-top: 15px;
  padding: 0;
  color: var(--text-light);
  font-size: 0.75rem;
  text-align: right;
}

.origin-more {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
}

.origin-extra {
  padding: 20px 22px;
  border: 1px dashed rgba(184, 169, 232, 0.55);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.origin-extra-title {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--lavender-deep);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.origin-extra-quote {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-left: 3px solid var(--pink);
  border-radius: 0 10px 10px 0;
  background: rgba(245, 194, 208, 0.14);
}

.origin-extra-quote p {
  margin: 0;
  color: var(--text);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 0.86rem;
  line-height: 1.9;
}

.origin-extra-body {
  margin: 0;
  color: var(--text-light);
  font-size: 0.8rem;
  line-height: 1.9;
}

@media (max-width: 640px) {
  .origin-more {
    grid-template-columns: 1fr;
  }
}

.timeline-loading,
.timeline-message {
  margin: 38px auto 72px;
  padding: 20px;
  border: 1px solid rgba(184, 169, 232, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text-light);
  text-align: center;
}

.timeline-chapter {
  position: relative;
  margin: 0 -20px 72px;
  padding: 48px 54px 54px;
  border: 1px solid rgba(184, 169, 232, 0.15);
  border-radius: 32px;
  overflow: hidden;
}

.timeline-chapter::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  opacity: 0.55;
  pointer-events: none;
}

.chapter-tone-1 { background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(253, 232, 238, 0.36)); }
.chapter-tone-1::before { background: rgba(245, 194, 208, 0.3); }
.chapter-tone-2 { background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(226, 239, 255, 0.4)); }
.chapter-tone-2::before { background: rgba(173, 211, 242, 0.3); }
.chapter-tone-3 { background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(234, 226, 250, 0.5)); }
.chapter-tone-3::before { background: rgba(184, 169, 232, 0.32); }
.chapter-tone-4 { background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(229, 243, 232, 0.46)); }
.chapter-tone-4::before { background: rgba(166, 214, 181, 0.28); }

.chapter-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 38px;
  text-align: center;
}

.chapter-period {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(184, 169, 232, 0.15);
  color: var(--link-lavender);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chapter-title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  letter-spacing: 0.06em;
  line-height: 1.55;
}

.chapter-lead {
  max-width: 590px;
  margin: 13px auto 0;
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.8;
}

.event-list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-list::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 24px;
  left: 28px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--pink), var(--lavender), rgba(184, 169, 232, 0.2));
}

.timeline-event {
  position: relative;
  min-height: 58px;
  padding-left: 82px;
}

.timeline-event + .timeline-event {
  margin-top: 24px;
}

.event-node {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 0;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(184, 169, 232, 0.48);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 5px 16px var(--card-shadow);
  font-size: 1.45rem;
  line-height: 1;
}

.event-card {
  position: relative;
  padding: 20px 22px 19px;
  border: 1px solid rgba(184, 169, 232, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 7px 22px rgba(123, 107, 164, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 31px;
  left: -9px;
  width: 16px;
  height: 16px;
  border-bottom: 1px solid rgba(184, 169, 232, 0.22);
  border-left: 1px solid rgba(184, 169, 232, 0.22);
  background: rgba(255, 255, 255, 0.88);
  transform: rotate(45deg);
}

.event-card:hover {
  border-color: rgba(184, 169, 232, 0.5);
  box-shadow: 0 12px 28px var(--card-shadow);
  transform: translateY(-2px);
}

.event-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.event-date {
  color: var(--text-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(184, 169, 232, 0.16);
  color: var(--lavender-deep);
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1.4;
}

.category-birth { background: #fbe3eb; color: #8a3f59; }
.category-feature { background: #e5e0f7; color: #594987; }
.category-work { background: #fff0cf; color: #765514; }
.category-voice { background: #dff2ec; color: #286752; }
.category-incident { background: #fde3dc; color: #8b402f; }
.category-infra { background: #deedf8; color: #335f7e; }

.event-title {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.55;
  letter-spacing: 0.025em;
}

.event-description {
  margin-top: 7px;
  color: var(--text-light);
  font-size: 0.86rem;
  line-height: 1.75;
}

.event-photo {
  width: min(420px, 100%);
  margin: 18px auto 5px;
  padding: 9px 9px 11px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 8px 20px rgba(73, 61, 104, 0.16);
  transform: rotate(-1.5deg);
  transform-origin: center center;
}

.timeline-event:nth-child(3n + 2) .event-photo {
  transform: rotate(1deg);
}

.timeline-event:nth-child(3n) .event-photo {
  transform: rotate(-0.5deg);
}

.event-photo-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.event-photo-caption {
  margin: 9px 4px 0;
  color: #696175;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Yu Gothic", sans-serif;
  font-size: 0.72rem;
  line-height: 1.55;
  letter-spacing: 0.025em;
  text-align: center;
}

.event-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--link-lavender);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 3px;
}

.event-link:hover,
.event-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.timeline-ending {
  position: relative;
  margin: 100px auto 68px;
  text-align: center;
}

.ending-mark {
  display: block;
  margin-bottom: 13px;
  color: var(--pink);
  font-size: 1.3rem;
}

.timeline-ending h2 {
  color: var(--text);
  font-size: 1.5rem;
}

.timeline-ending p {
  margin: 16px 0 20px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.timeline-ending a {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid rgba(184, 169, 232, 0.4);
  border-radius: 999px;
  color: var(--link-lavender);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.timeline-ending a:hover,
.timeline-ending a:focus-visible {
  background: var(--white);
  transform: translateY(-2px);
}

.timeline-footer {
  padding: 0 0 48px;
}

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .timeline-hero {
    min-height: 300px;
    padding: 68px 20px 66px;
  }

  .timeline-hero h1 {
    letter-spacing: 0.09em;
  }

  .desktop-break { display: none; }

  .timeline-main {
    padding: 44px 16px 0;
  }

  .origin-section {
    margin-bottom: 68px;
  }

  .origin-note {
    padding: 27px 21px 21px;
  }

  .origin-note footer {
    text-align: left;
  }

  .timeline-chapter {
    margin: 0 -6px 52px;
    padding: 38px 16px 42px;
    border-radius: 24px;
  }

  .chapter-heading {
    margin-bottom: 31px;
    padding: 0 6px;
  }

  .chapter-lead {
    font-size: 0.82rem;
  }

  .event-list::before {
    left: 21px;
  }

  .timeline-event {
    padding-left: 57px;
  }

  .timeline-event + .timeline-event {
    margin-top: 19px;
  }

  .event-node {
    top: 15px;
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }

  .event-card {
    padding: 17px 16px 16px;
    border-radius: 14px;
  }

  .event-card::before {
    top: 28px;
    left: -7px;
    width: 12px;
    height: 12px;
  }

  .event-title {
    font-size: 0.97rem;
  }

  .event-description {
    font-size: 0.81rem;
  }

  .event-photo {
    width: 100%;
    margin-top: 15px;
    padding: 7px 7px 9px;
  }

  .event-photo-caption {
    margin-top: 7px;
    font-size: 0.68rem;
  }

  .timeline-ending {
    margin-top: 78px;
  }
}

@media (max-width: 380px) {
  .timeline-main { padding-right: 12px; padding-left: 12px; }
  .timeline-chapter { margin-right: 0; margin-left: 0; padding-right: 12px; padding-left: 12px; }
  .timeline-event { padding-left: 52px; }
  .event-list::before { left: 19px; }
  .event-node { width: 40px; height: 40px; font-size: 1.05rem; }
  .event-card { padding-right: 13px; padding-left: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sparkle { animation: none; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .event-card,
  .timeline-ending a { transition: none; }
}
