/*
 Theme Name:   Jongmo Theme
 Theme URI:    https://jongmolee.com
 Description:  Astro 블로그 스타일을 WP로 포팅한 자식 테마 (Twenty Twenty-Five 기반)
 Author:       jongmo
 Template:     twentytwentyfive
 Version:      1.1.0
 License:      MIT
*/

/* ══════════════════════════════════════
   Astro → WP 포팅 스타일
   기준: jongmolee-blog/src/styles/global.css
   ══════════════════════════════════════ */

/* ── Pretendard 폰트 (CDN은 functions.php에서 enqueue) ── */
body {
  font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ── 본문 타이포그래피 ── */
.entry-content {
  font-size: 1.125rem;
  line-height: 1.8;
}
.entry-content h2 {
  font-size: 1.75rem;
  line-height: 1.4;
  margin-top: 2.5em;
  margin-bottom: 0.75em;
}
.entry-content h3 {
  font-size: 1.375rem;
  line-height: 1.5;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

/* ── 이미지 라운드 ── */
.entry-content img {
  border-radius: 12px;
}
.entry-content .wp-block-image img {
  border-radius: 12px;
}

/* ── 코드블록 ── */
.entry-content pre {
  background: #1c1c20 !important;
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e4e4e7;
}
.entry-content pre code {
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: inherit;
  color: inherit;
}

/* ── 인라인 코드 ── */
.entry-content :not(pre) > code {
  background: #f3f4f6;
  padding: 0.2em 0.45em;
  border-radius: 6px;
  font-size: 0.875em;
  font-weight: 500;
}

/* ── blockquote 오렌지 보더 ── */
.entry-content blockquote,
.entry-content .wp-block-quote {
  border-left: 3px solid #ea580c;
  padding-left: 1rem;
  font-style: normal;
  color: #6b7280;
}

/* ── 테이블 ── */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.entry-content tr {
  border-bottom: 1px solid #e5e7eb;
}
.entry-content thead th {
  height: 2.5rem;
  padding: 0 0.5rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
  color: #374151;
  background: transparent;
  border: none;
}
.entry-content tbody td {
  padding: 0.5rem;
  vertical-align: middle;
  font-size: 1rem;
  border: none;
}
.entry-content tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* ── 리스트 ── */
.entry-content ul {
  list-style-type: disc;
}
.entry-content ol {
  list-style-type: decimal;
}
.entry-content li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
.entry-content li::marker {
  color: #9ca3af;
}

/* ── 링크 스타일 ── */
.entry-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #d1d5db;
  transition: text-decoration-color 0.2s;
}
.entry-content a:hover {
  text-decoration-color: currentColor;
}

/* ── 외부 링크 아이콘 ── */
.entry-content a[target="_blank"]::after,
.entry-content a[href^="http"]:not([href*="jongmolife.com"]):not([href*="jongmoit.com"]):not([href*="jongmowork.com"]):not([href*="jongmolee.com"])::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.2em;
  margin-bottom: -0.05em;
  background: currentColor;
  opacity: 0.4;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M15 3h6v6%27/%3E%3Cpath d=%27M10 14 21 3%27/%3E%3Cpath d=%27M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6%27/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M15 3h6v6%27/%3E%3Cpath d=%27M10 14 21 3%27/%3E%3Cpath d=%27M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6%27/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
}

/* ── 오렌지 프라이머리 컬러 ── */
:root {
  --wp--preset--color--primary: #ea580c;
  --wp--preset--color--contrast: #111827;
}
a:where(:not(.entry-content a)) {
  color: #ea580c;
}
a:where(:not(.entry-content a)):hover {
  color: #c2410c;
}

/* ── HR 스타일 ── */
.entry-content hr,
.entry-content .wp-block-separator {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2em 0;
}

/* ══════════════════════════════════════
   탑바 (Astro 동일)
   ══════════════════════════════════════ */
.jongmo-topbar {
  position: sticky;
  top: 0;
  z-index: 9999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.3s, border-color 0.3s;
}
.dark .jongmo-topbar {
  background: rgba(28, 28, 32, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.jongmo-topbar__inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jongmo-topbar__logo {
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #111827;
  transition: color 0.2s;
}
.jongmo-topbar__logo:hover {
  color: #ea580c;
}
.dark .jongmo-topbar__logo {
  color: #e4e4e7;
}
.dark .jongmo-topbar__logo:hover {
  color: #fb923c;
}
.jongmo-topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.jongmo-topbar__toggle {
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jongmo-topbar__toggle:hover {
  background: #f3f4f6;
  color: #111827;
}
.dark .jongmo-topbar__toggle {
  color: #8b8b92;
}
.dark .jongmo-topbar__toggle:hover {
  background: #2c2c30;
  color: #e4e4e7;
}

/* 탑바 네비 링크 */
.jongmo-topbar__link {
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none !important;
  transition: color 0.2s;
}
.jongmo-topbar__link:hover {
  color: #111827;
}
.dark .jongmo-topbar__link {
  color: #8b8b92;
}
.dark .jongmo-topbar__link:hover {
  color: #fff;
}

/* 아이콘 토글: 라이트→달, 다크→해 */
.jongmo-icon-sun { display: none; }
.jongmo-icon-moon { display: block; }
.dark .jongmo-icon-sun { display: block; }
.dark .jongmo-icon-moon { display: none; }

/* ══════════════════════════════════════
   푸터 (Astro 동일)
   ══════════════════════════════════════ */
.jongmo-footer {
  border-top: 1px solid #e5e7eb;
  transition: border-color 0.3s;
}
.dark .jongmo-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
}
.jongmo-footer__inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 32px 24px;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}
.dark .jongmo-footer__inner {
  color: #8b8b92;
}

/* ══════════════════════════════════════
   다크모드 전역 (Astro 동일: #1c1c20 배경, #b6b7bc 본문)
   ══════════════════════════════════════ */

/* 다크모드 CSS 변수 오버라이드 */
html.dark {
  --wp--preset--color--base: #1c1c20 !important;
  --wp--preset--color--contrast: #b6b7bc !important;
}

/* 기본 배경 + 텍스트 (WP 인라인 스타일 덮기) */
html.dark body,
html.dark body.wp-theme-twentytwentyfive {
  background-color: #1c1c20 !important;
  color: #b6b7bc !important;
}
html.dark .wp-site-blocks,
html.dark .site,
html.dark #page,
html.dark main {
  background-color: #1c1c20 !important;
  color: #b6b7bc;
}
/* wp-block-group는 has-background일 때만 따로 처리 (아래 콜아웃 섹션) */
html.dark .wp-block-group:not(.has-background) {
  background-color: #1c1c20 !important;
}

/* 모든 WP 텍스트 색상 오버라이드 */
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6 {
  color: #e4e4e7 !important;
}
html.dark p, html.dark span, html.dark div:not(.wp-block-group.has-background) {
  color: inherit;
}

/* 포스트 제목 — 밝은 흰색 */
.dark .wp-block-post-title,
.dark h1.wp-block-post-title,
.dark h1.wp-block-post-title a {
  color: #f4f4f5 !important;
}

/* 본문 컨테이너 */
.dark .entry-content,
.dark .wp-block-post-content {
  color: #b6b7bc;
}

/* 헤딩 — 밝은 흰색 */
.dark .entry-content h1,
.dark .entry-content h2,
.dark .entry-content h3,
.dark .entry-content h4 {
  color: #e4e4e7 !important;
}

/* bold — 약간 더 밝게 */
.dark .entry-content strong {
  color: #d4d4d8;
}

/* 링크 */
.dark .entry-content a {
  color: #fb923c;
  text-decoration-color: #404040;
}
.dark .entry-content a:hover {
  text-decoration-color: #fb923c;
}

/* 일반 링크 (entry-content 밖) */
.dark a:where(:not(.entry-content a)):where(:not(.jongmo-topbar__logo)) {
  color: #fb923c !important;
}

/* blockquote */
/* 본문 상단 요약 블록쿼트 */
.entry-content blockquote:first-child,
.entry-content .wp-block-quote:first-child,
.entry-content blockquote,
.entry-content .wp-block-quote {
  font-size: 19px;
}
.dark .entry-content blockquote,
.dark .entry-content .wp-block-quote {
  border-left-color: #fb923c;
  color: #8b8b92;
}

/* 인라인 코드 */
.dark .entry-content :not(pre) > code {
  background: #2c2c30;
  color: #d4d4d8;
}

/* 테이블 */
.dark .entry-content table,
.dark .wp-block-table table {
  background-color: transparent !important;
}
.dark .entry-content tr,
.dark .wp-block-table tr {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
.dark .entry-content thead th,
.dark .wp-block-table thead th,
html.dark .wp-block-table thead th {
  color: #e4e4e7 !important;
  background-color: transparent !important;
  font-weight: 700;
}
.dark .entry-content tbody td,
.dark .wp-block-table tbody td,
.dark .entry-content table td,
.dark .entry-content table th {
  color: #d4d4d8 !important;
  background-color: transparent !important;
}
.dark .entry-content tbody tr:hover,
.dark .wp-block-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}
.dark .wp-block-table figcaption {
  color: #6b6b72;
}

/* 리스트 마커 */
.dark .entry-content li::marker {
  color: #52525b;
}
.dark .entry-content li {
  color: #b6b7bc;
}

/* HR */
.dark .entry-content hr,
.dark .entry-content .wp-block-separator,
.dark hr.wp-block-separator {
  border-top-color: rgba(255, 255, 255, 0.06) !important;
}

/* 콜아웃 박스 다크모드 */
.dark .wp-block-group.has-background {
  background-color: #252529 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
.dark .wp-block-group.has-background p,
.dark .wp-block-group.has-background li {
  color: #b6b7bc;
}
.dark .wp-block-group.has-background strong {
  color: #d4d4d8;
}

/* figure / figcaption */
.dark .entry-content figcaption {
  color: #6b6b72;
}

/* 패턴: written-by, 날짜 등 메타 */
.dark .wp-block-post-date,
.dark .wp-block-post-terms,
.dark .wp-block-post-author-name {
  color: #8b8b92 !important;
}

/* WP 사이트 전체 배경 보장 */
.dark .wp-block-template-part {
  background-color: #1c1c20 !important;
  color: #b6b7bc;
}

/* 포스트 네비게이션 (이전/다음 글) */
.dark .wp-block-post-navigation-link a {
  color: #8b8b92;
}
.dark .wp-block-post-navigation-link a:hover {
  color: #fb923c;
}

/* 댓글 섹션 */
.dark .wp-block-comments,
.dark .comment-respond {
  color: #b6b7bc;
}
.dark .comment-form input,
.dark .comment-form textarea {
  background-color: #2c2c30;
  border-color: rgba(255, 255, 255, 0.1);
  color: #b6b7bc;
}

/* 홈 리스트: 포스트 제목 링크 */
.dark .wp-block-post-title a {
  color: #e4e4e7 !important;
}
.dark .wp-block-post-title a:hover {
  color: #fb923c !important;
}

/* WP 기본 헤더/푸터 숨기기 (자체 탑바/푸터 사용) */
.wp-site-blocks > header.wp-block-template-part,
body header.wp-block-template-part,
header.wp-block-template-part {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}
.wp-site-blocks > footer.wp-block-template-part,
body footer.wp-block-template-part,
footer.wp-block-template-part {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── 홈 포스트 리스트 (columns 레이아웃) ── */
.jongmo-post-row.wp-block-columns {
  flex-wrap: nowrap !important;
  gap: 20px !important;
  align-items: flex-start !important;
}
.jongmo-post-thumb-col {
  flex-basis: 120px !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
}
/* 모바일 반응형: WP 동적 클래스가 flex-basis:100% 강제하므로 최대 specificity로 오버라이드 */
@media (max-width: 781px) {
  .jongmo-post-row.wp-block-columns.is-layout-flex {
    flex-wrap: nowrap !important;
  }
  .jongmo-post-row .jongmo-post-thumb-col.wp-block-column,
  .jongmo-post-row > .jongmo-post-thumb-col,
  .jongmo-post-card .jongmo-post-thumb-col {
    flex-basis: 100px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    min-width: 100px !important;
    max-width: 100px !important;
  }
  .jongmo-post-thumb-col .wp-block-post-featured-image img {
    width: 100px !important;
    height: 100px !important;
  }
  .jongmo-post-row .jongmo-post-text-col.wp-block-column,
  .jongmo-post-row > .jongmo-post-text-col {
    flex-basis: 0 !important;
    flex-grow: 1 !important;
  }
}
@media (max-width: 480px) {
  .jongmo-post-row .jongmo-post-thumb-col.wp-block-column,
  .jongmo-post-row > .jongmo-post-thumb-col,
  .jongmo-post-card .jongmo-post-thumb-col {
    flex-basis: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
  }
  .jongmo-post-thumb-col .wp-block-post-featured-image img {
    width: 80px !important;
    height: 80px !important;
  }
}
/* 싱글 포스트 헤더 모바일 */
@media (max-width: 600px) {
  .jongmo-post-header .wp-block-post-title {
    font-size: 1.5rem !important;
  }
}
.jongmo-post-thumb-col .wp-block-post-featured-image {
  margin: 0 !important;
}
.jongmo-post-thumb-col .wp-block-post-featured-image img {
  width: 120px !important;
  height: 120px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}
/* 대표이미지 없으면 컬럼 숨기기 */
.jongmo-post-thumb-col:empty {
  display: none !important;
}
.jongmo-post-text-col {
  flex-grow: 1 !important;
  min-width: 0;
}
/* 날짜+태그 메타 행 */
.jongmo-post-meta {
  flex-wrap: nowrap !important;
}
.jongmo-post-meta .wp-block-post-date {
  white-space: nowrap !important;
  flex-shrink: 0;
}
.jongmo-post-meta .wp-block-post-terms {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 홈 메타 상단 (카테고리 + 날짜) ── */
.jongmo-post-meta-top {
  align-items: center !important;
}
.jongmo-home-category a {
  color: #ea580c !important;
  text-decoration: none !important;
}
.jongmo-home-category a::before {
  content: "📂 ";
}
html.dark .jongmo-home-category a {
  color: #fb923c !important;
}

/* ── 홈 포스트 리스트 다크모드 ── */
.dark .wp-block-query .wp-block-group[style*="border-bottom"] {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
.dark .wp-block-post-excerpt__excerpt {
  color: #8b8b92 !important;
}
.dark .wp-block-post-date,
.dark .wp-block-post-terms {
  color: #6b6b72 !important;
}
.dark .wp-block-query-pagination a {
  color: #8b8b92;
}
.dark .wp-block-query-pagination a:hover {
  color: #fb923c;
}

/* ══════════════════════════════════════
   포스트 헤더 (Astro 동일: 카테고리 → 제목 → 설명 → 날짜 → 태그칩)
   ══════════════════════════════════════ */
.jongmo-post-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 32px;
}
.dark .jongmo-post-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* 카테고리 라벨 (시리즈 위치) */
.jongmo-post-category {
  margin-bottom: 0;
}
.jongmo-post-category a {
  color: #ea580c !important;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 500;
}
.jongmo-post-category a::before {
  content: "📂 ";
}
.dark .jongmo-post-category a {
  color: #fb923c !important;
}

/* 포스트 제목 */
.jongmo-post-header .wp-block-post-title {
  color: #111827;
}
.dark .jongmo-post-header .wp-block-post-title {
  color: #f4f4f5 !important;
}

/* 발췌 (description) */
.jongmo-post-header .wp-block-post-excerpt .wp-block-post-excerpt__excerpt {
  color: #6b7280;
}
.dark .jongmo-post-header .wp-block-post-excerpt .wp-block-post-excerpt__excerpt {
  color: #8b8b92;
}

/* 날짜 */
.dark .jongmo-post-header .wp-block-post-date {
  color: #6b6b72 !important;
}

/* 태그 칩 (Astro rounded pill 스타일) */
.jongmo-post-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 16px !important;
}
/* WP 쉼표 구분자 숨기기 */
.jongmo-post-tags .wp-block-post-terms__separator {
  display: none !important;
}
.jongmo-post-tags a {
  display: inline-block !important;
  padding: 4px 12px !important;
  font-size: 0.75rem !important;
  border-radius: 9999px !important;
  background: #f3f4f6 !important;
  color: #374151 !important;
  text-decoration: none !important;
  transition: background-color 0.2s;
  line-height: 1.5;
}
.jongmo-post-tags a:hover {
  background: #e5e7eb !important;
}
html.dark .jongmo-post-tags a {
  background: #2c2c30 !important;
  color: #b6b7bc !important;
}
html.dark .jongmo-post-tags a:hover {
  background: #3a3a40 !important;
}

/* featured image 숨기기 (Astro와 동일 — 텍스트 중심) */
.jongmo-post-header + .wp-block-group .wp-block-post-featured-image {
  display: none;
}

/* ══════════════════════════════════════
   태그 인덱스 페이지 (/tags/)
   ══════════════════════════════════════ */
.jongmo-tags-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 50px 24px;
}
.jongmo-tags-inner {}
.jongmo-tags-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: #111827;
}
.dark .jongmo-tags-title {
  color: #e4e4e7;
}
.jongmo-tags-empty {
  text-align: center;
  color: #9ca3af;
  padding: 80px 0;
}
/* 태그 클라우드 (jongmo-post-tags 칩 재사용) */
.jongmo-tags-cloud {
  gap: 10px !important;
}
.jongmo-tags-cloud a {
  font-size: 18px !important;
  padding: 6px 16px !important;
}
.jongmo-tags-cloud .jongmo-tag-count {
  font-size: 18px;
  color: #ea580c;
  margin-left: 2px;
}
html.dark .jongmo-tags-cloud .jongmo-tag-count {
  color: #fb923c;
}

/* 태그 아카이브 제목 (#태그명) */
.dark .wp-block-query-title {
  color: #e4e4e7 !important;
}

/* ── transition ── */
body, .entry-content, .jongmo-topbar, .jongmo-footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ══════════════════════════════════════
   Sticky Scroll-Spy TOC
   ══════════════════════════════════════ */
/* 앵커 이동 시 탑바에 가리지 않도록 */
.entry-content h2[id],
.entry-content h3[id] {
  scroll-margin-top: 84px;
}

/* 모바일: 숨김 상태 (플로팅 버튼으로 토글) */
.toc-aside {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: min(280px, calc(100vw - 40px));
  max-height: 60vh;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 100;
  overflow: hidden;
}
.toc-aside.toc-mobile-open {
  display: block;
}
html.dark .toc-aside {
  background: #1c1c20;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.toc-aside .toc-nav {
  padding: 16px;
  max-height: calc(60vh - 32px);
  overflow-y: auto;
}

/* 플로팅 TOC 버튼 */
.toc-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ea580c;
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(234,88,12,0.3);
  cursor: pointer;
  z-index: 101;
  transition: transform 0.2s, box-shadow 0.2s;
}
.toc-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(234,88,12,0.4);
}
.toc-fab svg {
  width: 22px;
  height: 22px;
}

/* 데스크탑: 우측 고정 사이드바 */
@media (min-width: 1200px) {
  .toc-aside {
    display: block;
    position: fixed;
    top: 80px;
    width: 220px;
    left: calc(50% + 384px + 40px);
    bottom: auto;
    right: auto;
    max-height: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    z-index: auto;
  }
  .toc-aside .toc-nav {
    padding: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .toc-aside .toc-nav::-webkit-scrollbar {
    display: none;
  }
  html.dark .toc-aside {
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .toc-fab {
    display: none !important;
  }
  .toc-link {
    font-size: 16px !important;
  }
  .toc-level-3 .toc-link {
    font-size: 14px !important;
  }
}

.toc-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 12px;
}
html.dark .toc-title {
  color: #6b6b72;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  border-left: 2px solid transparent;
  transition: border-color 0.2s, background-color 0.2s;
}
.toc-item.toc-level-3 {
  padding-left: 12px;
}

.toc-link {
  display: block;
  padding: 4px 10px;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5;
  color: #6b7280 !important;
  text-decoration: none !important;
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toc-level-3 .toc-link {
  font-size: 14px !important;
}
.toc-link:hover {
  color: #111827;
}

/* active 상태 */
.toc-item.toc-active {
  border-left-color: #ea580c;
  background-color: #fff7ed;
  border-radius: 0 4px 4px 0;
}
.toc-item.toc-active .toc-link {
  color: #ea580c;
  font-weight: 500;
}

/* 다크모드 */
html.dark .toc-link {
  color: #8b8b92 !important;
}
html.dark .toc-link:hover {
  color: #e4e4e7 !important;
}
html.dark .toc-item.toc-active {
  border-left-color: #fb923c;
  background-color: rgba(251, 146, 60, 0.08);
}
html.dark .toc-item.toc-active .toc-link {
  color: #fb923c !important;
}
