/* =========================================================
   Page : history
   ========================================================= */

.page-history {
  background: #ffffff;
}

.page-history__frame {
  max-width: var(--site-max);
  margin: 0 auto;
  min-height: 100vh;
  background: #ffffff;
}

.page-history__content {
  max-width: var(--site-max);
  margin: 0 auto;
  position: relative;
  padding: 0 0 90px;
}

.page-history .history-item__connector {
  min-width: 1px;
}

@media (min-width: 835px) {
  .page-history__content {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    align-items: start;
  }

}

@media (max-width: 768px) {
  .page-history__content {
    padding-bottom: 0;
  }
}

/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ */
/* ┃  Lead                               ┃ */
/* ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ */

.history-lead {
  margin: var(--section-mt) auto var(--section-mb);
  padding: 0 var(--universal-gutter);
}

.history-lead__title {
  margin: 0;
  text-align: left;
}

/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ */
/* ┃  Page : history                      ┃ */
/* ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ */

.page-history .history-lead,
.page-history .history-timeline {
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--universal-gutter);
}

.page-history .history-lead__title {
  margin: 0 0 110px 0;
  font-size: revert;
  line-height: revert;
}

/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ */
/* ┃  Lead (PC)                           ┃ */
/* ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ */

@media (min-width: 835px) {
  .page-history .history-lead {
    padding-bottom: 30px;
    display: flex;
    justify-content: center;
  }

  .page-history .history-lead .universal__jan {
    display: inline-block;
    text-align: left;
    margin: 0 auto;
  }

  .page-history .history-lead__title {
    text-align: right;
  }

  .page-history .history-timeline {
    padding-right: 0;
    padding-left: var(--universal-gutter);
  }

  .page-history .history-timeline__inner {
    width: min(930px, 100%);
    margin-left: auto;
    margin-right: 10px;
    position: relative;
    padding-bottom: 10px;
    container-type: inline-size;
    --pc-t: clamp(0, calc((100vw - 835px) / 445px), 1);
    --history-center-shift-min: 0ch;
    --history-center-shift-max: 8ch;
    --history-center-shift: calc(
      var(--history-center-shift-min) +
      (var(--history-center-shift-max) - var(--history-center-shift-min)) * var(--pc-t)
    );
  }
}

/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ */
/* ┃  Timeline (PC)                       ┃ */
/* ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ */

@media (min-width: 835px) {
  .page-history .history-timeline__inner::before {
    content: "";
    position: absolute;
    left: calc(50% - var(--history-center-shift));
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(26, 26, 26, 0.7);
    transform: translateX(-50%);
    z-index: 0;
  }

  .page-history .history-timeline__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .page-history .history-item {
    --history-pitch: 90px;
    --history-dot: 5px;
    --history-gap: 16px;
    --history-date-slot: 128px;
    --pc-t: clamp(0, calc((100vw - 835px) / 445px), 1);
    --history-line-left-max: 245px;
    --history-line-right-max: 185px;
    --history-line-left-min: 33px;
    --history-line-right-min: 15px;
    --history-line-left-fluid: calc(
      var(--history-line-left-min) +
      (var(--history-line-left-max) - var(--history-line-left-min)) * var(--pc-t)
    );
    --history-line-right-fluid: calc(
      var(--history-line-right-min) +
      (var(--history-line-right-max) - var(--history-line-right-min)) * var(--pc-t)
    );
    --history-text-max: 330px;
    --history-head-h: 32px;
    position: relative;
    display: grid;
    grid-template-columns:
      calc(50% - var(--history-center-shift)) 0
      calc(50% + var(--history-center-shift));
    height: var(--history-pitch);
  }

  .page-history .history-item::before {
    content: "";
    position: absolute;
    left: calc(50% - var(--history-center-shift));
    top: 50%;
    width: var(--history-dot);
    height: var(--history-dot);
    border-radius: 50%;
    background: #1a1a1a;
    transform: translate(-50%, -50%);
    z-index: 2;
  }

  .page-history .history-item__col {
    position: relative;
    min-width: 0;
    z-index: 1;
  }

  .page-history .history-item__mid {
    display: none;
  }

  .page-history .history-item--left .history-item__col--left { grid-column: 1 / 2; }
  .page-history .history-item--left .history-item__col--right { grid-column: 3 / 4; }

  .page-history .history-item--right .history-item__col--left { grid-column: 1 / 2; }
  .page-history .history-item--right .history-item__col--right { grid-column: 3 / 4; }

  .page-history .history-item__body {
    position: absolute;
    top: calc(50% - (var(--history-head-h) / 2));
    left: 0;
    right: 0;
  }

  .page-history .history-item__head {
    display: flex;
    align-items: center;
    gap: var(--history-gap);
    height: var(--history-head-h);
    line-height: 1;
    white-space: nowrap;
    width: 100%;
  }

  .page-history .history-item--left .history-item__head {
    justify-content: flex-end;
  }

  .page-history .history-item--right .history-item__head {
    justify-content: flex-start;
  }

  .page-history .history-item__date {
    width: var(--history-date-slot);
    flex: 0 0 auto;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1;
    white-space: nowrap;
    text-align: left;
  }

  .page-history .history-item__connector {
    display: block;
    height: 1px;
    background: rgba(26, 26, 26, 0.75);
    flex: 0 0 auto;
  }

  .page-history .history-item--left {
    --history-line-left: min(
      var(--history-line-left-fluid),
      calc(100% - var(--history-date-slot) - var(--history-gap))
    );
    --history-left-pad: calc(
      100% - (var(--history-date-slot) + var(--history-gap) + var(--history-line-left))
    );
  }

  .page-history .history-item--left .history-item__connector {
    width: var(--history-line-left);
  }

  .page-history .history-item--right {
    --history-line-right: min(
      var(--history-line-right-fluid),
      calc(100% - var(--history-date-slot) - var(--history-gap))
    );
  }

  .page-history .history-item--right .history-item__connector {
    width: var(--history-line-right);
  }

  .page-history .history-item__text {
    position: absolute;
    top: calc(var(--history-head-h) + 12px);
    margin: 0;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.9;
    letter-spacing: 0.1em;

    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .page-history .history-item--left .history-item__text {
    left: var(--history-left-pad);
    width: min(var(--history-text-max), calc(100% - var(--history-left-pad)));
  }

  .page-history .history-item--right .history-item__text {
    left: calc(var(--history-line-right) + var(--history-gap));
    width: min(var(--history-text-max), calc(100% - (var(--history-line-right) + var(--history-gap))));
  }
}

/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ */
/* ┃  Timeline (SP)                       ┃ */
/* ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ */

@media (max-width: 834px) {

  .page-history .history-lead {
    padding-bottom: 30px;
  }

  .page-history .history-lead__title {
    margin-bottom: 70px;
  }

  .page-history .history-timeline__inner {
    position: relative;
    padding-left: 28px;
  }

  .page-history .history-timeline__inner::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(26, 26, 26, 0.6);
  }

  .page-history .history-timeline__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .page-history .history-item {
    position: relative;
    padding: 18px 0 18px 0;
  }

  .page-history .history-item::before {
    content: "";
    position: absolute;
    left: -17px;
    top: 30px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1a1a1a;
    transform: translateX(-50%);
  }

  .page-history .history-item__col--left,
  .page-history .history-item__col--right {
    position: relative;
    padding-left: 0.5%;
  }

  .page-history .history-item__body {
    position: static;
  }

  .page-history .history-item__connector {
    display: none;
  }

  .page-history .history-item__head {
    display: block;
    height: auto;
  }

  .page-history .history-item__date {
    display: inline-block;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.2;
  }

  .page-history .history-item__text {
    position: static;
    width: auto;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 400;
    line-height: 2.0;
    letter-spacing: 0.1em;
  }
}
