/* 목차 박스: 내용에 맞춰 폭 결정 */
nav.toc{
  position: fixed;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  /* 핵심 */
  inline-size: fit-content;           /* = width: fit-content; */
  /* 크로스브라우저 보강 */
  width: -moz-fit-content;
  width: fit-content;

  /* 안전 캡(너무 길어질 경우를 대비해 선택 사항) */
  max-inline-size: 320px;             /* 필요 없으면 이 줄 삭제 */
  min-inline-size: 100px;

  background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  box-shadow:0 10px 28px rgba(0,0,0,.10);
  font-size:14px; z-index:20000; overflow:hidden; text-align:center;
}

/* 헤더 중앙 정렬(버튼만 있을 때) */
nav.toc header{
  display:flex; justify-content:center; align-items:center;
  gap:8px; padding:10px 12px; border-bottom:1px solid #f1f5f9;
}

/* 링크가 줄바꿈 되지 않도록 → 폭이 가장 긴 항목에 맞춰짐 */
nav.toc .toc-list{
  list-style:none; padding:8px 10px; margin:0;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  max-height: calc(100vh - 180px); overflow-y:auto;
}
nav.toc .toc-list a{
  display:block; padding:8px 10px; border-radius:8px;
  color:#111827; text-decoration:none;
  white-space: nowrap;          /* ★ 줄바꿈 금지: 가로폭을 내용에 맞춤 */
}
nav.toc .toc-list a:hover{ background:#f3f4f6 }
nav.toc .toc-list a[aria-current="true"]{ background:#e8f0fe; font-weight:700 }

/* 신청 버튼(가운데) */
nav.toc .apply-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 14px; border:1px solid #0b1c5f; border-radius:9999px;
  color:#0b1c5f; text-decoration:none; font-weight:700; font-size:13px; background:#fff;
}
nav.toc .apply-btn:hover{ background:#0b1c5f; color:#fff }

/* 점 인디케이터를 쓰지 않을 경우 */
nav.toc .dot-indicators{ display:none !important }
