@charset "UTF-8";
/* ==========================================================================
   沿革ページ（Figma 99:86）
   年ごとに見出しを付ける（了承済み）。縦線は1本で、年の見出しの部分だけ途切れる
   余白は8pxスケールに丸め（見出し帯〜見出し83→80 / 見出し〜年30→32 / 年〜最初の行36→32 /
   行の上下20→16 / 日付〜出来事86→88 / 年表の左端〜縦線43→40・〜表186→184 /
   最後の行〜縦線の終わり108→104 / 縦線〜関連ページ100→96 / 年のまとまりの間40）
   SP：日付と出来事を縦に積む（了承済み）。PCは768px〜
   ========================================================================== */
.p-history {
  padding-block: var(--space-10) var(--space-12);
}

.p-history__title {
  justify-content: center;
}

/* 年表：縦線（サブカラー）は最後の行より104px下まで伸ばす */
.p-history__timeline {
  position: relative;
  max-width: var(--history-width);
  margin: var(--space-4) auto 0;
  padding-bottom: var(--space-13);
}

.p-history__timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--history-dot-size) / 2);
  width: var(--line);
  background-color: var(--color-sub);
}

.p-history__group + .p-history__group {
  margin-top: var(--space-5);
}

/* 年の見出し：背景色で縦線を隠す（縦線が見出しのところで途切れる） */
.p-history__year {
  position: relative;
  display: inline-block;
  background-color: var(--color-base);
  color: var(--color-sub);
  font-size: var(--fs-history-year);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-wide);
}

.p-history__list {
  margin: var(--space-4) 0 0 var(--history-list-offset-sp);
}

.p-history__row {
  position: relative;
  padding-block: var(--space-2);
  border-bottom: var(--line) solid var(--color-sub);
}

.p-history__row:first-child {
  padding-top: 0;
}

/* 行の丸（縦線の上） */
.p-history__row::before {
  content: "";
  position: absolute;
  top: calc(var(--history-dot-top) + var(--space-2));
  left: calc(var(--history-list-offset-sp) * -1);
  width: var(--history-dot-size);
  height: var(--history-dot-size);
  border-radius: 50%;
  background-color: var(--color-sub);
}

.p-history__row:first-child::before {
  top: var(--history-dot-top);
}

/* 日付（Figma「沿革 日付」：15px Bold・サブカラー） */
.p-history__date {
  color: var(--color-sub);
  font-size: var(--fs-card-text);
  font-weight: var(--fw-bold);
  line-height: var(--lh-card-text);
  letter-spacing: var(--ls-card-text);
}

.p-history__text {
  font-size: var(--fs-card-text);
  line-height: var(--lh-card-text);
  letter-spacing: var(--ls-card-text);
}

/* PC（768px〜）：日付（右揃え）｜出来事 の横並び */
@media (min-width: 768px) {
  .p-history__timeline::before {
    left: var(--history-line-x);
  }

  .p-history__list {
    max-width: var(--history-list-width);
    margin-left: var(--history-list-offset);
  }

  .p-history__row {
    display: grid;
    grid-template-columns: var(--history-date-width) 1fr;
    column-gap: var(--space-11);
  }

  .p-history__row::before {
    left: calc(var(--history-line-x) - var(--history-list-offset) - var(--history-dot-size) / 2);
  }

  .p-history__date {
    text-align: right;
  }
}
