/* サイドバー内で追従するラッパー */
.c-floating-toc-wrapper {
  position: sticky;
  top: 160px; /* ヘッダー分の余白。お好みで調整 */
}

.side-ban .c-floating-toc-wrapper ul{
  padding: 10px 0;
}

.side-ban .c-floating-toc-wrapper ul li{
  margin:5px 0 12px 0;
 }



/* 右メニューの目次ボックス */
.c-floating-toc {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 160px);
  overflow: auto;
  background: #EFF6FB;       /* ← 背景色（お好みで） */
  border-radius: 4px;
  padding: 10px 18px;
  font-size: 14px;
  line-height: 1.6;
}

/* タイトル */
.c-floating-toc__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* 番号付きリスト（右目次専用） */
.c-floating-toc__list {
  counter-reset: toc-counter;
  margin: 0;
  padding-left: 0;
}

.c-floating-toc__list > li {
  counter-increment: toc-counter;
  list-style: none;
  margin: 4px 0;
  display: flex;
  align-items: flex-start;
}

/* 左側の「1. / 2. / 3.」部分 */
.c-floating-toc__list > li::before {
  content: counter(toc-counter) ".";
  margin-right: 0.5em;
  color: #0070c9;            /* 番号の色（リンクのブルーに合わせる） */
  font-weight: 700;
}

/* ネストがある場合は少しインデント */
.c-floating-toc__list > li > ul,
.c-floating-toc__list > li > ol {
  margin-top: 4px;
  margin-left: 1.5em;
}

/* リンクスタイル */
.c-floating-toc a {
  text-decoration: none;
}

.c-floating-toc a:hover {
  text-decoration: underline;
}

/* 現在位置 */
.c-floating-toc a.is-active {
  font-weight: 700;
}

/* スマホでは非表示にしたい場合 */
@media (max-width: 1024px) {
  .c-floating-toc-wrapper {
    display: none;
  }
}
