/* 見出しクリック時にヘッダー下へ余白を持たせる */
.page__content h2,
.page__content h3 {
  scroll-margin-top: 90px;
}

/* ==============================
   記事ページ左固定TOCパネル
   ============================== */

body .ott-left-toc {
  position: fixed !important;
  top: 100px !important;
  left: max(1rem, calc((100vw - 1320px) / 2 + 1rem)) !important;
  width: 270px !important;

  height: calc(100vh - 115px) !important;
  min-height: 520px !important;
  max-height: calc(100vh - 115px) !important;
  overflow-y: auto !important;

  z-index: 20 !important;

  padding: 1rem 0.95rem !important;
  border: 1px solid #d8e6e2 !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;

  font-size: 0.82rem !important;
  line-height: 1.45 !important;
}

/* タイトル */
body .ott-left-toc .ott-left-toc__title {
  margin-bottom: 0.7rem !important;
  padding-bottom: 0.55rem !important;
  border-bottom: 1px solid #d8e6e2 !important;

  color: #0f766e !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

/* リスト全体 */
body .ott-left-toc .ott-left-toc__list {
  display: block !important;
  margin: 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
}

/* 各項目 */
body .ott-left-toc .ott-left-toc__item {
  display: block !important;
  margin: 0.12rem 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* リンク */
body .ott-left-toc .ott-left-toc__link,
body .ott-left-toc .ott-left-toc__link:link,
body .ott-left-toc .ott-left-toc__link:visited {
  display: block !important;
  padding: 0.35rem 0.45rem !important;
  border-left: 3px solid transparent !important;
  border-radius: 8px !important;

  color: #3f5551 !important;
  background-color: transparent !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* hover */
body .ott-left-toc .ott-left-toc__link:hover {
  background-color: #f0faf7 !important;
  color: #0f766e !important;
  text-decoration: none !important;
}

/* 現在読んでいる場所のハイライト */
body .ott-left-toc .ott-left-toc__link.is-active,
body .ott-left-toc .ott-left-toc__link.is-active:link,
body .ott-left-toc .ott-left-toc__link.is-active:visited {
  background-color: #e5f6f1 !important;
  border-left-color: #0f766e !important;
  color: #0f766e !important;
  font-weight: 700 !important;
}

/* 狭い画面では非表示 */
@media (max-width: 1280px) {
  body .ott-left-toc {
    display: none !important;
  }
}

/* ==============================
   トップページ左側：はじめにパネル
   index.md 内の .ott-home-sidebar-panel 用
   ============================== */

body .ott-home-sidebar-panel {
  position: fixed !important;
  top: 245px !important;
  left: max(1rem, calc((100vw - 1320px) / 2 + 1rem)) !important;
  width: 270px !important;
  z-index: 20 !important;

  background: linear-gradient(135deg, #fcfcfc 0%, #f7faf8 100%) !important;
  border: 1px solid #dfe6e2 !important;
  border-radius: 16px !important;
  padding: 1rem 1rem 0.95rem 1rem !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;

  font-size: 0.92rem !important;
  line-height: 1.75 !important;
  color: #4a5a54 !important;
}

body .ott-home-sidebar-panel__label {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #1d7f6b !important;
  margin: 0 0 0.6rem 0 !important;
  padding-bottom: 0.55rem !important;
  border-bottom: 1px solid #d8e6e2 !important;
  letter-spacing: 0.02em !important;
}

body .ott-home-sidebar-panel p {
  margin: 0 0 0.8rem 0 !important;
}

body .ott-home-sidebar-panel p:last-child {
  margin-bottom: 0 !important;
}

body .ott-home-sidebar-panel strong {
  color: #2f4a42 !important;
}

/* 狭い画面では非表示 */
@media (max-width: 1280px) {
  body .ott-home-sidebar-panel {
    display: none !important;
  }
}

/* ==============================
   旧sidebar用パネル
   もし使っていなければ残っていても問題なし
   ============================== */

.sidebar-site-panel {
  background: linear-gradient(135deg, #fcfcfc 0%, #f7faf8 100%);
  border: 1px solid #dfe6e2;
  border-radius: 16px;
  padding: 1rem 1rem 0.95rem 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  font-size: 1.05rem;
  line-height: 1.85;
  color: #4a5a54;
}

.sidebar-site-panel-label {
  font-size: 1rem;
  font-weight: 700;
  color: #1d7f6b;
  margin: 0 0 0.6rem 0;
  letter-spacing: 0.02em;
}

.sidebar-site-panel p {
  margin: 0 0 0.8rem 0;
}

.sidebar-site-panel p:last-child {
  margin-bottom: 0;
}

.sidebar-site-panel strong {
  color: #2f4a42;
}

/* ==============================
   管理人コメント
   ============================== */

.admin-comment-box {
  display: flex !important;
  align-items: flex-start !important;
  gap: 1rem !important;

  margin: 1.5rem 0 !important;
  padding: 1rem 1.2rem !important;

  border: 1px solid #dfe6e2 !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

.admin-comment-icon {
  flex: 0 0 64px !important;
  width: 64px !important;
  height: 64px !important;
}

.admin-comment-icon img {
  display: block !important;

  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;

  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;

  object-fit: cover !important;
  border-radius: 50% !important;
}

.admin-comment-body {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.admin-comment-label {
  margin: 0 0 0.45rem 0 !important;
  font-weight: 700 !important;
  color: #2f4a42 !important;
  font-size: 1rem !important;
}

.admin-comment-text {
  color: #3f5551 !important;
  font-size: 0.98rem !important;
  line-height: 1.8 !important;
}
