.tab-wrapper {
  display: block;
  width: 100%;
  /* auto にすることで、はみ出した時だけ表示される */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* スクロールバー全体の太さ */
.tab-wrapper::-webkit-scrollbar {
  height: 3px;
}
/* スクロールバーの「ベースの線（背景）」 */
.tab-wrapper::-webkit-scrollbar-track {
  background: #CDD6DD;
}
/* スクロールバーの「動く線（ツマミ）」 */
.tab-wrapper::-webkit-scrollbar-thumb {
  background: #2071BD;
}
/* タブを並べるコンテナ */
.tab-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding-bottom: 8px !important;
  box-sizing: border-box;
  width: 100%;
  /* 念のため、子要素の重なりを制御 */
  isolation: isolate;
}
.tab-list p {
  color: #2071BD;
  font-weight: bold;
}
/* 各タブの基本設定（2〜4つのとき） */
.tab-item {
  flex: 1 0 150px;
  padding: 10px;
  box-sizing: border-box;
  white-space: normal;
  word-break: break-all;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  line-height: 1.4;

  /* デフォルトのボーダー（薄い色） */
  border: 1px solid #CDD6DD;
  background-color: #fff;
  color: #333; /* 文字色は通常時グレー系 */

  /* 隣り合うボーダーが太くならないようにマイナスマージンで重ねる */
  margin-left: -1px;
}
/* 最初のタブのマイナスマージンを解除 */
.tab-item:first-child {
  margin-left: 0;
}
.tab-item:hover {
  opacity: 0.7;
  cursor: pointer;
}

/* アクティブなタブのスタイル */
/* :first-child 固定ではなく、クラス名で指定するように変更 */
.tab-item.segment__item--active {
  border: 1px solid #2071BD;
  border-top: 4px solid #2071BD;
  border-bottom: none; /* アクティブな方の下線を消す */
  color: #2071BD;
  font-weight: bold;
  background-color: #fff;
  z-index: 1;
}
/* タブが5つ以上の時（既存設定） */
.tab-item:nth-last-child(n+5),
.tab-item:nth-last-child(n+5) ~ .tab-item {
  flex: 0 0 40%;
  min-width: 150px;
  max-width: 240px;
}

.segment__panel {
  display: none; /* 基本は非表示 */
}
.segment__panel.show {
  display: block; /* showクラスがついたら表示 */
}


