/* ============================
   Company Page - 会社概要
============================ */

/* Page Container */
#page-company {
  position: relative;
}

/* Company Page Specific Spacing */
#page-company.page-top-under {
  padding-bottom: 0;
}

/* ============================
   会社概要セクション
============================ */

/* Section Container */
.company-info-section {
  margin-top: 3.75rem; /* 60px - タイトルの下 */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Info Container */
.company-info-container {
  display: flex;
  width: clamp(19.375rem, 9.976rem + 38.56vw, 56.25rem); /* 310px at 390px, 900px at 1920px */
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 0.873rem + 0.52vw, 1.5rem); /* 16px at 390px, 24px at 1920px */
}

/* Info Item */
.company-info-item {
  width: 100%;
}

/* Info Row - タイトルと内容を含む */
.company-info-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-start;
}

/* タイトル（左側） */
.company-info-title {
  position: absolute;
  left: 0;
  top: 0;
  color: #000;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(0.875rem, 0.843rem + 0.13vw, 1rem); /* 14px at 390px, 16px at 1920px */
  font-style: normal;
  font-weight: 400;
  line-height: 160%;
  margin: 0;
  white-space: nowrap;
}

/* 内容テキスト（右側） */
.company-info-content {
  margin-left: clamp(6.875rem, 5.218rem + 6.8vw, 13.375rem); /* 110px at 390px, 214px at 1920px */
  color: #000;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(0.875rem, 0.843rem + 0.13vw, 1rem); /* 14px at 390px, 16px at 1920px */
  font-style: normal;
  font-weight: 400;
  line-height: clamp(1.5rem, 1.421rem + 0.33vw, 1.6rem); /* 24px at 390px, 25.6px (160%) at 1920px */
  letter-spacing: clamp(0.044rem, 0.021rem + 0.09vw, 0rem); /* 0.7px at 390px, 0px at 1920px */
  margin-top: 0;
  margin-bottom: 0;
  flex: 1;
}

/* 390px時のletter-spacingを保証 */
@media screen and (max-width: 390px) {
  .company-info-content {
    letter-spacing: 0.044rem; /* 0.7px */
  }
}

/* 1920px時のletter-spacingを0にする */
@media screen and (min-width: 1920px) {
  .company-info-content {
    letter-spacing: 0;
  }
}

/* 区切り線 */
.company-info-divider {
  margin-top: clamp(1rem, 0.873rem + 0.52vw, 1.5rem); /* 16px at 390px, 24px at 1920px */
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

/* 区切り線SVG */
.company-divider-line {
  display: block;
  width: clamp(19.375rem, 9.976rem + 38.56vw, 56.25rem); /* 310px at 390px, 900px at 1920px */
  height: 1px;
  flex-shrink: 0;
}

/* SVG線の太さ調整（390px時は0.6px相当） */
@media screen and (max-width: 768px) {
  .company-divider-line path {
    stroke-width: 0.6;
  }
}

/* ============================
   複数行テキスト対応
============================ */

/* デスクトップ: タイトルは1行目と同じ高さ（デフォルトのtop: 0のまま） */
@media screen and (min-width: 769px) {
  .company-info-row-multiline .company-info-title {
    top: 0;
  }
}

/* モバイル: タイトルを2行の真ん中に配置 */
@media screen and (max-width: 768px) {
  .company-info-row-multiline .company-info-title {
    top: 50%;
    transform: translateY(-50%);
  }
}

/* 3行テキスト用: デスクトップは1行目、モバイルは2行目（真ん中） */
@media screen and (min-width: 769px) {
  .company-info-row-multiline-3 .company-info-title {
    top: 0;
  }
}

@media screen and (max-width: 768px) {
  .company-info-row-multiline-3 .company-info-title {
    top: 1.5rem; /* 24px (2行目の位置) */
  }
}

/* TEL注釈テキストのフォントサイズ調整 */
.tel-note {
  font-size: clamp(0.875rem, 0.843rem + 0.13vw, 1rem);
}

@media screen and (max-width: 768px) {
  .tel-note {
    font-size: clamp(0.75rem, 0.712rem + 0.16vw, 0.875rem); /* 12px at 390px, 14px at 1920px */
}
}

/* 事業内容の改行制御 */
.business-desktop {
  display: inline;
}

.business-mobile {
  display: none;
}

@media screen and (max-width: 768px) {
  .business-desktop {
    display: none;
  }

  .business-mobile {
    display: inline;
  }
}

/* 取引銀行の改行制御 */
.bank-desktop {
  display: inline;
}

.bank-mobile {
  display: none;
}

@media screen and (max-width: 768px) {
  .bank-desktop {
    display: none;
  }

  .bank-mobile {
    display: inline;
  }
}

/* 主要取引先の改行制御 */
.client-desktop {
  display: inline;
}

.client-mobile {
  display: none;
}

@media screen and (max-width: 768px) {
  .client-desktop {
    display: none;
  }

  .client-mobile {
    display: inline;
  }
}

/* 所在地の改行制御 */
.address-desktop {
  display: inline;
}

.address-mobile {
  display: none;
}

@media screen and (max-width: 768px) {
  .address-desktop {
    display: none;
  }

  .address-mobile {
    display: inline;
  }
}

/* 最後の項目: デスクトップではSVG非表示、モバイルでは表示 */
@media screen and (min-width: 769px) {
  .company-info-item-last .company-info-divider {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .company-info-item-last .company-info-divider {
    display: flex;
  }
}

/* ============================
   アクセスセクション
============================ */

/* Section Container */
.company-access-section {
  margin-top: clamp(3.75rem, 2.418rem + 5.46vw, 10rem); /* 60px at 390px, 160px at 1920px */
}

/* Access Item Container */
.access-item {
  display: flex;
  align-items: flex-start;
  padding-left: clamp(0rem, -2.549rem + 10.46vw, 10rem); /* 0px at 390px, 160px at 1920px */
  padding-right: clamp(0rem, -2.549rem + 10.46vw, 10rem); /* 0px at 390px, 160px at 1920px */
}

/* 最初のアクセス項目: タイトルからの間隔 */
.access-item:first-of-type {
  margin-top: clamp(2.5rem, 2.054rem + 1.83vw, 3.75rem); /* 40px at 390px, 60px at 1920px */
}

/* 2番目以降のアクセス項目 */
.access-item:nth-of-type(n+2) {
  margin-top: 2.5rem; /* 40px */
}

/* デスクトップ: 横並び */
@media screen and (min-width: 769px) {
  .access-item {
    flex-direction: row;
    gap: clamp(0.75rem, -1.883rem + 10.78vw, 5rem); /* 12px at 390px, 80px at 1920px */
  }
}

/* モバイル: 縦並び */
@media screen and (max-width: 768px) {
  .access-item {
    flex-direction: column;
    gap: 0.75rem; /* 12px */
    align-items: center; /* 中央揃え */
  }

  /* アクセス情報はマップの幅に合わせて左揃え */
  .access-info {
    width: clamp(19.375rem, 11.569rem + 32.03vw, 50rem); /* マップと同じ幅 */
    text-align: left;
  }
}

/* Access Map */
.access-map {
  flex-shrink: 0;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  width: clamp(19.375rem, 11.569rem + 32.03vw, 50rem); /* 310px at 390px, 800px at 1920px */
  height: clamp(9.688rem, 5.785rem + 16.01vw, 25rem); /* 155px at 390px, 400px at 1920px */
}

.access-map iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* Access Info Container */
.access-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

/* ============================
   医療機器製造業者セクション
============================ */

/* Section Container */
.company-certificate-section {
  margin-top: clamp(3.75rem, 2.418rem + 5.46vw, 10rem); /* 80px at 390px, 160px at 1920px */
  background: #F3F3F3;
  width: 100%;
  padding-top: clamp(3.75rem, 2.418rem + 5.46vw, 10rem); /* 60px at 390px, 160px at 1920px */
  padding-bottom: clamp(3.75rem, 2.418rem + 5.46vw, 10rem); /* 沿革セクションのmargin-topと同じ */
  flex-shrink: 0;
}

/* Certificate Content Container */
.certificate-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Certificate Description */
.certificate-description {
  margin-top: 3.75rem; /* 60px */
  color: #000;
  font-family: "Noto Sans JP", sans-serif;
  font-style: normal;
  text-align: left;
  margin-bottom: 0;
  font-size: clamp(1rem, 0.873rem + 0.52vw, 1.5rem); /* 16px at 390px, 24px at 1920px */
  font-weight: 500;
  line-height: clamp(1.75rem, 1.67rem + 0.33vw, 2.063rem); /* 28px at 390px, 33px at 1920px */
}

/* デスクトップ: 説明文表示切替 */
@media screen and (min-width: 769px) {
  .certificate-description-desktop {
    display: inline;
  }

  .certificate-description-mobile {
    display: none;
  }
}

/* モバイル: 説明文表示切替 */
@media screen and (max-width: 768px) {
  .certificate-description {
    letter-spacing: 0.04rem; /* 0.64px */
  }

  .certificate-description-desktop {
    display: none;
  }

  .certificate-description-mobile {
    display: inline;
  }
}

/* Certificate Images Container */
.certificate-images {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* デスクトップ: 画像コンテナ */
@media screen and (min-width: 769px) {
  .certificate-images {
    margin-top: 3.75rem; /* 60px */
    gap: 3.75rem; /* 60px */
  }
}

/* モバイル: 画像コンテナ */
@media screen and (max-width: 768px) {
  .certificate-images {
    margin-top: 1.875rem; /* 30px */
    gap: 1.875rem; /* 30px */
  }
}

/* Certificate Image */
.certificate-image {
  flex-shrink: 0;
  display: block;
  width: clamp(8.813rem, 4.384rem + 18.17vw, 26.188rem); /* 141px at 390px, 419px at 1920px */
  height: clamp(12.5rem, 6.239rem + 25.69vw, 37.063rem); /* 200px at 390px, 593px at 1920px */
  object-fit: contain;
}

/* ============================
   沿革セクション
============================ */

/* Section Container */
.company-history-section {
  margin-top: clamp(3.75rem, 2.418rem + 5.46vw, 10rem); /* 80px at 390px, 160px at 1920px */
  position: relative;
  z-index: 0;
}

/* PC版: 医療機器セクションのpaddingと同じ値に統一 */
@media screen and (min-width: 769px) {
  .company-history-section {
    margin-top: clamp(3.75rem, 2.418rem + 5.46vw, 10rem); /* 60px at 390px, 160px at 1920px */
  }
}

/* 沿革タイトル専用のフォントサイズ設定 */
.company-history-title {
  font-size: clamp(1.25rem, 0.931rem + 1.307vw, 2.5rem) !important; /* 20px at 390px, 40px at 1920px */
}

/* History Timeline Container */
.history-timeline {
  margin-top: clamp(1rem, 0.299rem + 2.88vw, 3.75rem); /* 16px at 390px, 60px at 1920px */
  position: relative;
  min-height: 2550px; /* デスクトップの縦線の高さ + 余白 */
}

@media screen and (max-width: 768px) {
  .history-timeline {
    min-height: unset;
    position: relative;
  }
}

@media screen and (max-width: 768px) {
  .history-timeline::before {
    content: "";
    position: absolute;
    left: clamp(5.90625rem, -2.693rem + 35.24vw, 39.5625rem);
    top: 0;
    bottom: 0;
    width: 1px;
    background: #B7B7B7;
    z-index: 0;
  }

  .history-timeline::after {
    content: "";
    position: absolute;
    left: calc(clamp(5.90625rem, -2.693rem + 35.24vw, 39.5625rem) - 0.6px);
    width: 1.2px;
    height: 1.2px;
    border-radius: 50%;
    background: #B7B7B7;
    box-shadow: 0 4.8px 0 #B7B7B7, 0 9.6px 0 #B7B7B7, 0 14.4px 0 #B7B7B7;
    z-index: 1;
  }

  .history-line-svg-mobile,
  .history-dots-svg-bottom-mobile {
    display: none;
  }

  .history-item {
    position: relative;
    z-index: 1;
  }
}

/* History Item */
.history-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  --year-font-size: clamp(1.125rem, 0.902rem + 0.92vw, 2rem); /* 18px at 390px, 32px at 1920px */
  --text-font-size: clamp(0.75rem, 0.686rem + 0.26vw, 1rem); /* 12px at 390px, 16px at 1920px */
}


/* 1番目の年号項目（2008年） */
.history-item:nth-child(1) {
  margin-top: clamp(2.625rem, 1.574rem + 4.31vw, 6.75rem); /* 42px at 390px, 108px at 1920px */
}

/* 2番目以降の年号項目 */
.history-item:nth-child(n+2) {
  margin-top: clamp(0.75rem, 0.304rem + 1.83vw, 2.5rem); /* 12px at 390px, 40px at 1920px */
}

/* 12月エントリー（2021年の2番目）- 逆のclamp（390px時15px、1920px時6px） */
.history-item.history-item-december {
  margin-top: clamp(0.375rem, 1.081rem + -0.59vw, 0.938rem) !important; /* 6px at 1920px, 15px at 390px */
}

/* 同年内の2項目目以降（共通クラス） */
.history-item.history-item-same-year {
  margin-top: clamp(0.375rem, 1.081rem + -0.59vw, 0.938rem) !important; /* 6px at 1920px, 15px at 390px */
}

/* 画像エントリー */
.history-item.history-item-image {
  margin-top: 5px !important; /* 固定5px */
}

/* 画像の下のエントリー（画像から特殊な間隔） */
.history-item.history-item-after-image {
  margin-top: clamp(0.75rem, 0.304rem + 1.83vw, 2.5rem) !important; /* 12px at 390px, 40px at 1920px */
}

/* 複数行テキストの下のエントリー */
.history-item.history-item-after-multiline-text {
  margin-top: clamp(0.938rem, 0.540rem + 1.63vw, 2.5rem) !important; /* 15px at 390px, 40px at 1920px */
}

/* Year Number */
.history-year {
  position: absolute;
  left: clamp(1.875rem, -5.772rem + 31.37vw, 31.875rem); /* 30px at 390px, 510px at 1920px */
  top: 0;
  color: #BA2A20;
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--year-font-size);
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  letter-spacing: clamp(0.113rem, 0.09rem + 0.09vw, 0.2rem); /* 1.8px at 390px, 3.2px at 1920px */
}

/* 2008年だけ48px下げる */
.history-item:nth-child(1) .history-year {
  top: clamp(2.625rem, 2.529rem + 0.39vw, 3rem); /* 42px at 390px, 48px at 1920px */
}

/* Line Container (SVG + Red Circle) */
.history-line-container {
  position: absolute;
  left: clamp(5.90625rem, -2.693rem + 35.24vw, 39.5625rem); /* 94.5px at 390px, 633px at 1920px */
  /* vw係数: (633-94.5)/1530*100 = 35.19vw, 切片: 94.5 - 35.19*3.9 = -42.741px = -2.671rem */
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Dots SVG (上部) */
.history-dots-svg {
  flex-shrink: 0;
  display: block;
}

/* デスクトップ用ドットSVG */
.history-dots-svg-desktop {
  width: 2px;
  height: 26px;
}

/* モバイル用ドットSVG */
.history-dots-svg-mobile {
  width: 1.2px;
  height: 15.6px;
}

@media screen and (min-width: 769px) {
  .history-dots-svg-desktop {
    display: block;
  }

  .history-dots-svg-mobile {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .history-dots-svg-desktop {
    display: none;
  }

  .history-dots-svg-mobile {
    display: block;
  }
}

/* 下部ドットSVG（デスクトップ） */
.history-dots-svg-bottom-desktop {
  width: 2px;
  height: 26px;
  margin-top: 6px; /* 縦線との間隔（上部と同じ） */
}

/* 下部ドットSVG（モバイル） */
.history-dots-svg-bottom-mobile {
  width: 1.2px;
  height: 15.6px;
  margin-top: 3px; /* 縦線との間隔（上部と同じ） */
}

@media screen and (min-width: 769px) {
  .history-dots-svg-bottom-desktop {
    display: block;
  }

  .history-dots-svg-bottom-mobile {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .history-dots-svg-bottom-desktop {
    display: none;
  }

  .history-dots-svg-bottom-mobile {
    display: block;
  }
}

/* Line SVG (縦線) */
.history-line-svg {
  width: 2px;
  flex-shrink: 0;
  display: block;
}

/* デスクトップ用縦線SVG */
.history-line-svg-desktop {
  height: clamp(160rem, 144.55rem + 32.146vw, 183.125rem); /* 2550px at 769px, 2950px at 1920px */
  margin-top: 6px;
  z-index: 9;
}

/* モバイル用縦線SVG */
.history-line-svg-mobile {
  height: clamp(162rem, 156.325rem + 23.28vw, 167.5rem);
  margin-top: 3px;
  z-index: 9;
}

@media screen and (min-width: 769px) {
  .history-line-svg-desktop {
    display: block;
  }

  .history-line-svg-mobile {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .history-line-svg-desktop {
    display: none;
  }

  .history-line-svg-mobile {
    display: block;
  }

  .history-dots-svg-bottom-mobile {
    margin-top: 0;
  }
}

/* Red Circle */
.history-red-circle {
  position: absolute;
  /* 年号の視覚的中心に配置（フォントのベースライン調整で-1px） */
  top: calc(var(--year-font-size) / 2 - 0.0625rem);
  left: 0%;
  transform: translateX(-38%) rotate(-90deg);
  width: clamp(0.5rem, 0.436rem + 0.26vw, 0.75rem); /* 8px at 390px, 12px at 1920px */
  height: clamp(0.5rem, 0.436rem + 0.26vw, 0.75rem); /* 8px at 390px, 12px at 1920px */
  flex-shrink: 0;
  z-index: 99;
}

/* 2008年だけ48px下げる */
.history-item:nth-child(1) .history-red-circle {
  top: calc(clamp(2.625rem, 2.529rem + 0.39vw, 3rem) + var(--year-font-size) / 2 - 0.0625rem);
  z-index: 99;
}

/* モバイル時のstroke-width調整 */
@media screen and (max-width: 768px) {
  .history-red-circle path {
    stroke-width: 0.6;
  }
  .history-red-circle {
    transform: translateX(-45%) rotate(-90deg);
  }
}

/* Black Circle (同年内の2項目目以降) */
.history-black-circle {
  position: absolute;
  /* テキストフォントサイズの中心に配置 */
  top: calc(var(--text-font-size) / 2 - 0.0625rem);
  left: 50%;
  transform: translateX(-33%) rotate(-90deg);
  flex-shrink: 0;
  aspect-ratio: 1/1;
}

/* デスクトップ用黒丸 */
.history-black-circle-desktop {
  width: 8px;
  height: 8px;
  z-index: 99;
}

/* モバイル用黒丸 */
.history-black-circle-mobile {
  width: 6px;
  height: 6px;
  z-index: 99;
}

@media screen and (min-width: 769px) {
  .history-black-circle-desktop {
    display: block;
  }

  .history-black-circle-mobile {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .history-black-circle-desktop {
    display: none;
  }

  .history-black-circle-mobile {
    display: block;
  }
  .history-black-circle {
    transform: translateX(-45%) rotate(-90deg);
  }
}

/* History Content */
.history-content {
  position: relative;
  margin-left: clamp(7.013rem, -1.81rem + 36.2vw, 41.625rem); /* 112.2px at 390px, 666px at 1920px - SVG + 幅 + 16/30px */
  /* 年号の視覚的中心にテキストフォントサイズの中心を揃える */
  margin-top: calc(var(--year-font-size) / 2 - var(--text-font-size) / 2);
  /* 幅を指定（月 + margin + description） */
  width: clamp(16.125rem, 8.239rem + 32.35vw, 47.063rem); /* 258px at 390px, 753px at 1920px */
}

/* 2008年だけ48px下げる */
.history-item:nth-child(1) .history-content {
  margin-top: calc(clamp(2.625rem, 2.529rem + 0.39vw, 3rem) + var(--year-font-size) / 2 - var(--text-font-size) / 2);
}

/* 同年内の2項目目以降（年号なし）はmargin-topを0に */
.history-item-december .history-content,
.history-item-same-year .history-content {
  margin-top: 0;
}

/* 画像エントリーのhistory-contentもmargin-topを0に */
.history-item-image .history-content {
  margin-top: 0;
}

/* 画像の下のエントリーもmargin-topを0に */
.history-item-after-image .history-content {
  margin-top: 0;
}

/* 複数行テキストの下のエントリーもmargin-topを0に */
.history-item-after-multiline-text .history-content {
  margin-top: 0;
}

/* 黒丸エントリー（年号なし）はmargin-topを0に - 年号がない場合 */
.history-item:not(:has(.history-year)):has(.history-black-circle) .history-content {
  margin-top: 0 !important;
}

/* History Image */
.history-image {
  display: block;
  flex-shrink: 0;
  object-fit: cover;
}

/* デスクトップ: 画像サイズ */
@media screen and (min-width: 769px) {
  .history-image {
    width: 200px;
    height: 133px;
    aspect-ratio: 200/133;
  }
}

/* モバイル: 画像サイズとテキスト位置に合わせる */
@media screen and (max-width: 768px) {
  .history-image {
    width: 211px;
    height: 140px;
    aspect-ratio: 211/140;
    /* テキストの左端に合わせる（月の幅 + margin-right分を左にずらす） */
    margin-left: calc(clamp(1.5rem, 1.373rem + 0.52vw, 2rem) + clamp(0.813rem, 0.652rem + 0.66vw, 1.313rem));
  }
}

/* 特殊サイズの画像（2024年12月） */
.history-image-special {
  /* デスクトップでもテキストの左端に合わせる */
  margin-left: calc(clamp(1.5rem, 1.373rem + 0.52vw, 2rem) + clamp(0.813rem, 0.652rem + 0.66vw, 1.313rem));
}

/* デスクトップ: 特殊サイズ画像 */
@media screen and (min-width: 769px) {
  .history-image-special {
    width: 89px;
    height: 127px;
    aspect-ratio: 89/127;
  }
}

/* モバイル: 特殊サイズ画像 */
@media screen and (max-width: 768px) {
  .history-image-special {
    width: 92px;
    height: 130px;
    aspect-ratio: 46/65;
  }
}

/* 画像エントリーの区切り線 */
.history-item-image .history-divider {
  display: block;
  /* 画面全幅に対して中央揃え */
  margin-left: calc(-1 * clamp(7.013rem, -1.81rem + 36.2vw, 41.625rem));
  margin-right: auto;
  width: 100vw;
  /* 画像の下の余白 */
  margin-top: clamp(1rem, 0.618rem + 1.57vw, 2.5rem); /* 16px at 390px, 40px at 1920px */
  height: 1px;
  flex-shrink: 0;
  /* SVGを画面中央に配置 */
  padding-left: calc(48vw - clamp(21.875rem, 7.461rem + 59.15vw, 68.75rem) / 2);
  padding-right: calc(50vw - clamp(21.875rem, 7.461rem + 59.15vw, 68.75rem) / 2);
  box-sizing: border-box;
}

/* Description Container */
.history-description {
  flex: 0 0 clamp(13.813rem, 6.181rem + 31.31vw, 43.75rem); /* 221px at 390px, 700px at 1920px */
  min-width: 0; /* flexアイテムの最小幅を0にして縮小を許可 */
}

/* History Text */
.history-text {
  margin: 0;
  display: flex;
  align-items: flex-start; /* 上揃え（1行目基準） */
  flex-wrap: nowrap; /* 月とテキストの折り返しを防ぐ */
  color: #050505;
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: 160%; /* デスクトップのデフォルト */
}

/* モバイル */
@media screen and (max-width: 768px) {
  .history-text {
    letter-spacing: -0.015rem; /* -0.24px */
    line-height: 166.667%; /* モバイルは166.667% (20px at 12px) */
  }
}

/* Month */
.history-month {
  width: clamp(1.5rem, 1.373rem + 0.52vw, 2rem); /* 24px at 390px, 32px at 1920px */
  margin-right: clamp(0.813rem, 0.652rem + 0.66vw, 1.313rem); /* 13px at 390px, 21px at 1920px */
  white-space: nowrap; /* 折り返さない */
  flex-shrink: 0; /* 縮小しない */
}

/* デスクトップ: 月のline-height */
@media screen and (min-width: 769px) {
  .history-month {
    line-height: 160%; /* 25.6px at 16px, 相当于text-font-sizeの160% */
  }
}

/* モバイル: 月のline-height */
@media screen and (max-width: 768px) {
  .history-month {
    line-height: 166.667%; /* 20px at 12px */
  }
}

/* Description Desktop */
.history-description-desktop {
  display: flex;
  flex-direction: column;
  word-wrap: break-word; /* 長い単語を改行 */
  overflow-wrap: break-word; /* 長い単語を改行 */
}

.history-description-mobile {
  display: none;
}

.history-description-tablet {
  display: none;
}

/* デスクトップの行設定 */
.history-description-desktop .history-description-line1,
.history-description-desktop .history-description-line2,
.history-description-desktop .history-description-line3 {
  line-height: 160%; /* 25.6px at 16px */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 769px〜1350px: タブレット表示 */
@media screen and (min-width: 769px) and (max-width: 1350px) {
  .history-description-desktop.history-2023-merger {
    display: none;
  }

  .history-description-tablet.history-2023-merger {
    display: flex;
    flex-direction: column;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .history-description-tablet .history-description-line1,
  .history-description-tablet .history-description-line2 {
    line-height: 160%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* 768px以下: モバイル表示 */
@media screen and (max-width: 768px) {
  .history-description-desktop {
    display: none;
  }

  .history-description-tablet {
    display: none;
  }

  .history-description-mobile {
    display: flex;
    flex-direction: column;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* モバイルの行設定 */
  .history-description-mobile .history-description-line1,
  .history-description-mobile .history-description-line2,
  .history-description-mobile .history-description-line3 {
    line-height: 166.667%; /* 20px at 12px */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* History Divider */
.history-divider {
  width: clamp(21.875rem, 7.461rem + 59.15vw, 68.75rem); /* 350px at 390px, 1100px at 1920px */
  height: 3px;
  flex-shrink: 0;
}

/* 2008年と2017年の区切り線（history-content内、画面中央に配置） */
.history-item:nth-child(1) .history-divider,
.history-item:nth-child(2) .history-divider {
  display: block;
  /* 画面全幅に対して中央揃え */
  margin-left: calc(-1 * clamp(7.013rem, -1.81rem + 36.2vw, 41.625rem));
  margin-right: auto;
  width: 100vw;
  /* テキストの下の余白 */
  margin-top: clamp(1rem, 0.618rem + 1.57vw, 2.5rem); /* 16px at 390px, 40px at 1920px */
  height: 1px;
  flex-shrink: 0;
  /* SVGを画面中央に配置 */
  padding-left: calc(48vw - clamp(21.875rem, 7.461rem + 59.15vw, 68.75rem) / 2);
  padding-right: calc(50vw - clamp(21.875rem, 7.461rem + 59.15vw, 68.75rem) / 2);
  box-sizing: border-box;
}

/* 2008年だけ46px下に配置 */
.history-item:nth-child(1) .history-divider {
  margin-top: clamp(1rem, 0.523rem + 1.96vw, 2.875rem); /* 16px at 390px, 46px at 1920px */
}

/* 12月（2021年最後）の区切り線 */
.history-item-december .history-divider,
.history-item-2023-december .history-divider,
.history-item-2024-december .history-divider {
  display: block;
  /* 画面全幅に対して中央揃え */
  margin-left: calc(-1 * clamp(7.013rem, -1.81rem + 36.2vw, 41.625rem));
  margin-right: auto;
  width: 100vw;
  /* テキストの下の余白 */
  margin-top: clamp(1rem, 0.618rem + 1.57vw, 2.5rem); /* 16px at 390px, 40px at 1920px */
  height: 1px;
  flex-shrink: 0;
  /* SVGを画面中央に配置 */
  padding-left: calc(48vw - clamp(21.875rem, 7.461rem + 59.15vw, 68.75rem) / 2);
  padding-right: calc(50vw - clamp(21.875rem, 7.461rem + 59.15vw, 68.75rem) / 2);
  box-sizing: border-box;
}

/* モバイル時のstroke-width調整 */
@media screen and (max-width: 768px) {
  .history-divider path {
    stroke-width: 0.6;
  }
}

/* Access Title */
.access-title {
  color: #000;
  font-family: "Noto Sans JP", sans-serif;
  font-style: normal;
  margin: 0;
}

/* Contact Section Spacing - Company Page Only (PC) */
@media screen and (min-width: 769px) {
  #page-company ~ #contact {
    margin-top: clamp(15rem, 11.66rem + 6.95vw, 20rem); /* 240px at 769px, 320px at 1920px */
  }
}

/* デスクトップ: タイトル */
@media screen and (min-width: 769px) {
  .access-title {
    font-size: 1.25rem; /* 20px */
    font-weight: 400;
    line-height: 180%; /* 36px */
    letter-spacing: 0.063rem; /* 1px */
  }
}

/* モバイル: タイトル */
@media screen and (max-width: 768px) {
  .access-title {
    font-size: 1rem; /* 16px */
    font-weight: 500;
    line-height: 180%; /* 28.8px */
    letter-spacing: 0.05rem; /* 0.8px */
  }
}

/* Access Address */
.access-address {
  color: #000;
  font-family: "Noto Sans JP", sans-serif;
  font-style: normal;
  margin: 0;
}

/* デスクトップ: 住所 */
@media screen and (min-width: 769px) {
  .access-address {
    margin-top: 0.5rem; /* 8px */
    font-size: 1rem; /* 16px */
    font-weight: 400;
    line-height: 160%; /* 25.6px */
  }
}

/* モバイル: 住所 */
@media screen and (max-width: 768px) {
  .access-address {
    margin-top: 0.25rem; /* 4px */
    font-size: 0.875rem; /* 14px */
    font-weight: 400;
    line-height: 160%; /* 22.4px */
  }
}

/* Access Station */
.access-station {
  color: #000;
  font-family: "Noto Sans JP", sans-serif;
  font-style: normal;
  margin: 0;
}

/* デスクトップ: 最寄駅 */
@media screen and (min-width: 769px) {
  .access-station {
    margin-top: 1.375rem; /* 22px */
    font-size: 1rem; /* 16px */
    font-weight: 400;
    line-height: 160%; /* 25.6px */
  }
}

/* モバイル: 最寄駅 */
@media screen and (max-width: 768px) {
  .access-station {
    margin-top: 0.75rem; /* 12px */
    font-size: 0.75rem; /* 12px */
    font-weight: 400;
    line-height: 160%; /* 19.2px */
  }
}

/* History timeline line behavior on SP (ensure line reaches last text) */
@media screen and (max-width: 768px) {
  .history-line-svg-mobile,
  .history-dots-svg-bottom-mobile {
    display: none !important;
  }

  .history-timeline::before {
    bottom: 0;
  }

  .history-timeline::after {
    top: calc(100% + 8px);
  }
}

/* iOS data detectors: disable auto-linked address/phone on company page */
#page-company a[x-apple-data-detectors],
#page-company a[x-apple-data-detectors-type="address"],
#page-company a[x-apple-data-detectors-type="telephone"] {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none;
  cursor: text;
}
