  body{
    font-family:
      "Hiragino Sans",
      "Yu Gothic",
      "YuGothic",
      sans-serif;

  }

.header-logo {
  margin-left:30px;
}
.history-section {
  padding: 80px 20px;
  background: #f6f6f4;
}

.history-section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.history-section__header {
  text-align: center;
  margin-bottom: 72px;
}

.history-section__title {
  margin: 0;
  color: #0f1830;
  font-size: clamp(1.8rem, 3vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
}

.history-section__subtitle {
  margin: 14px 0 0;
  color: #6d7686;
  font-size: clamp(1rem, 1.6vw, 1.8rem);
  letter-spacing: 0.12em;
}


.history-item__list li {
  position: relative;
  padding-right: 6.2em;
}
.history-item__list li a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 24, 48, 0.18);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.history-item__list li a:hover {
  border-bottom-color: rgba(15, 24, 48, 0.55);
  opacity: 0.9;
}
.history-item__list li a:focus-visible {
  outline: 2px solid #0f1830;
  outline-offset: 2px;
  border-bottom-color: transparent;
}

.history-label {
  position: absolute;
  right: 0;
  top: .15em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.8em;
  padding: .28em .62em;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .04em;
  color: #fff;
  white-space: nowrap;
}
.history-label.open { background: #d79515; }
.history-label.edu { background: #4b78c7; }
.history-label.research { background: #4a9b61; }
.history-label.industry { background: #7c63c9; }
.history-label.region { background: #c85f5f; }
.history-label.other { background: #7c838f; }

@media (max-width: 900px) {
  .history-item__list li {
    padding-right: 0;
  }
  .history-label {
    position: static;
    margin-left: .6em;
    margin-top: .35em;
    vertical-align: middle;
  }
}

.history-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.history-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #d89511;
}

.history-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  align-items: center;
}

.history-item__image,
.history-item__card {
  position: relative;
  z-index: 1;
}

.history-item__image img {
  width: 450px;
  height: auto;
  object-fit: contain;
  object-position: bottom;
}
.history-item__image img.portrait {
  width: auto;
  height: 450px;
  object-fit: contain;
  object-position: bottom;
}

.history-item__card {
  background: #fff;
  border-radius: 28px;
  padding: 34px 38px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  max-width: 500px;
}

.history-item__year {
  margin: 0 0 10px;
  color: #d77d00;
  font-size: clamp(2rem, 3vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
}

.history-item__heading {
  margin: 0 0 16px;
  color: #0f1830;
  font-size: clamp(1.3rem, 1.7vw, 2rem);
  font-weight: 700;
  line-height: 1.4;
}

.history-item__text {
  margin: 0;
  color: #2d3548;
  font-size: 1rem;
  line-height: 1.9;
}

/* 右配置 */
.history-item--right .history-item__image {
  grid-column: 3;
  justify-self: start;
  margin-left: -60px;
  margin-bottom: 40px;
}

.history-item--right .history-item__card {
  grid-column: 3;
  justify-self: center;
  width: 100%;
}

/* 左配置 */
.history-item--left .history-item__image {
  grid-column: 1;
  justify-self: end;
  margin-right: -60px;
  margin-bottom: 40px;
}

.history-item--left .history-item__card {
  grid-column: 1;
  justify-self: center;
  width: 100%;
}

/* スマホ・タブレット */
@media (max-width: 900px) {
  .history-section {
    padding: 52px 12px;
  }

  .history-section__header {
    margin-bottom: 48px;
  }

  .history-timeline {
    gap: 36px;
  }

  .history-timeline::before {
    left: 5px;
    transform: none;
  }

  .history-item {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-left: 34px;
  }

  .history-item__image,
  .history-item__card {
    grid-column: auto !important;
    justify-self: stretch !important;
  }

  .history-item__image {
    order: 1;
    margin: 0 !important;
  }

.history-item__image img {
  width: 95%;
  height: auto;
  object-fit: contain;
  object-position: bottom;
}


.history-item__card {
  order: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 18px 16px;
  border-radius: 18px;
  box-sizing: border-box;
}

  .history-item::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 28px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d89511;
    z-index: 2;
  }
}

.history-item__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item__list li {
  position: relative;
  margin-top: 12px;
  padding-left: 1.1em;
  color: #2d3548;
  font-size: 1rem;
  line-height: 1.85;
}

.history-item__list li:first-child {
  margin-top: 0;
}

.history-item__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d89511;
  transform: translateY(-50%);
}

@media (max-width: 900px) {
  .history-item__list li {
    font-size: 0.96rem;
    line-height: 1.75;
  }
}
/* カード本体だけアニメーション */
.history-section .history-item {
  opacity: 0;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  will-change: opacity, transform;
}

.history-section .history-item--left {
  transform: translateX(-22px);
}

.history-section .history-item--right {
  transform: translateX(22px);
}

.history-section .history-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* 画像も少しだけ遅れて出す */
.history-section .history-item__image {
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.35s ease 0.05s,
    transform 0.35s ease 0.05s;
}

.history-section .history-item.is-visible .history-item__image {
  opacity: 1;
  transform: scale(1);
}

/* カード本文 */
.history-section .history-item__card {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.35s ease 0.08s,
    transform 0.35s ease 0.08s;
}

.history-section .history-item.is-visible .history-item__card {
  opacity: 1;
  transform: translateY(0);
}

/* 縦線は消さない・動かさない */
.history-section .history-timeline::before {
  opacity: 1;
}

/* スマホでは左右スライドをやめて下から軽く */
@media (max-width: 900px) {
  .history-section .history-item {
    transform: translateY(18px);
  }

  .history-section .history-item--left,
  .history-section .history-item--right {
    transform: translateY(18px);
  }

  .history-section .history-item.is-visible {
    transform: translateY(0);
  }
}

/* 動きを減らしたい環境向け */
@media (prefers-reduced-motion: reduce) {
  .history-section .history-item,
  .history-section .history-item__image,
  .history-section .history-item__card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* to top */

html {
  scroll-behavior: smooth;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(216, 149, 17, 0.95);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: rgba(190, 126, 9, 0.98);
}

.back-to-top:focus-visible {
  outline: 2px solid #0f1830;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
    font-size: 20px;
  }
}
.back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}