
:root,
[data-theme="light"] {
  --color-default: #f9f9f9;
  --color-secondary: #f1f1f1;
  --color-obvious: #ffffff;
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f9f9f9;
  --color-text-primary: #343a40;
  --color-text-secondary: #9b9b9b;
  --color-border: rgba(0, 0, 0, 0.05);
  --color-border-light: rgba(0, 0, 0, 0.03);
  --color-active: #007bff;
  --color-active-bg: rgba(0, 123, 255, 0.08);
  --color-orange: #fd7e14;
  --color-green: #28a745;
  --color-red: #dc3545;
  --hover-overlay: rgba(0, 0, 0, 0.03);
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-side: 0 2px 8px rgba(0, 0, 0, 0.04);
  --scrollbar-thumb: rgba(0, 0, 0, 0.1);
  --md-text-color: #343a40;
  --md-heading-text: #2c2c2c;
  --md-border-color: rgba(0, 0, 0, 0.1);
  --md-hr-bg: rgba(0, 0, 0, 0.06);
  --md-code-bg: #384548;
  --md-code-text: #d1d2d2;
  --md-code-border: rgba(0, 0, 0, 0.15);
  --md-code-border-hover: rgba(0, 0, 0, 0.2);
  --md-code-header-border: rgba(255, 255, 255, 0.06);
  --md-dot-red: #ff5f56;
  --md-dot-yellow: #ffbd2e;
  --md-dot-green: #27c93f;
  --md-inline-code-bg: rgba(0, 123, 255, 0.08);
  --md-inline-code-text: #343a40;
  --md-inline-code-border: rgba(59, 130, 246, 0.2);
  --md-table-border: rgba(0, 0, 0, 0.1);
  --md-table-header-bg: rgba(64, 158, 255, 0.1);
  --md-table-row-bg: #ffffff;
  --md-table-row-even-bg: #f9f9f9;
  --md-table-row-hover-bg: rgba(64, 158, 255, 0.08);
  --color-search-border: #d9d9d9;
  --md-accent-blue: #3b82f6;
  --md-accent-blue-bg: rgba(59, 130, 246, 0.05);
  --md-link-color: #3b82f6;
  --md-link-hover: #2563eb;
  --md-scroll-track: rgba(255, 255, 255, 0.06);
  --md-scroll-thumb: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] {
  --color-default: #1e1e1e;
  --color-secondary: #252525;
  --color-obvious: #2d2d2d;
  --color-bg-primary: #2d2d2d;
  --color-bg-secondary: #1e1e1e;
  --color-text-primary: #e0e0e0;
  --color-text-secondary: #8b949e;
  --color-border: rgba(255, 255, 255, 0.05);
  --color-border-light: rgba(255, 255, 255, 0.03);
  --color-active: #4a9eff;
  --color-active-bg: rgba(74, 158, 255, 0.12);
  --color-orange: #ff8c2e;
  --color-green: #3fb950;
  --color-red: #f85149;
  --hover-overlay: rgba(255, 255, 255, 0.05);
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-side: 0 2px 8px rgba(0, 0, 0, 0.2);
  --scrollbar-thumb: rgba(255, 255, 255, 0.2);
  --md-text-color: #e0e0e0;
  --md-heading-text: #d4d4d4;
  --md-border-color: rgba(255, 255, 255, 0.1);
  --md-hr-bg: rgba(255, 255, 255, 0.06);
  --md-code-bg: #1e1e1e;
  --md-code-text: #e0e0e0;
  --md-code-border: rgba(255, 255, 255, 0.1);
  --md-code-border-hover: rgba(255, 255, 255, 0.2);
  --md-code-header-border: rgba(255, 255, 255, 0.06);
  --md-inline-code-bg: rgba(74, 158, 255, 0.15);
  --md-inline-code-text: #e0e0e0;
  --md-inline-code-border: rgba(74, 158, 255, 0.3);
  --md-table-border: rgba(255, 255, 255, 0.1);
  --md-table-header-bg: #1a1f28;
  --md-table-row-bg: #2d2d2d;
  --md-table-row-even-bg: #262626;
  --md-table-row-hover-bg: rgba(74, 158, 255, 0.1);
  --color-search-border: rgba(255, 255, 255, 0.15);
  --md-accent-blue: #60a5fa;
  --md-accent-blue-bg: rgba(96, 165, 250, 0.1);
  --md-link-color: #60a5fa;
  --md-link-hover: #93c5fd;
  --md-scroll-track: rgba(255, 255, 255, 0.06);
  --md-scroll-thumb: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-default);
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: var(--color-active); text-decoration: none; }
a:hover { opacity: 0.85; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }

.item-header {
  height: 90px;
  background-color: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.header-left { display: flex; align-items: center; gap: 15px; }
.header-right { display: flex; align-items: center; gap: 10px; }

.icon-item {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--color-bg-primary);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--color-text-primary);
  font-size: 16px;
  margin: 0; padding: 0; border: none;
  font-family: inherit; font-weight: 400; line-height: 1;
  text-decoration: none; text-align: center;
  appearance: none; -webkit-appearance: none; background-image: none;
}
.icon-item i { color: var(--color-text-primary); font-size: 16px; }
.icon-item:hover { background-color: var(--hover-overlay); box-shadow: var(--shadow-sm); }
.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; max-width: 160px;
  text-decoration: none; line-height: 0;
}
.brand-logo img {
  max-height: 36px; max-width: 160px; width: auto; height: auto;
  display: block; object-fit: contain;
}
.item-name, a.item-name {
  font-size: 18px; font-weight: 600; color: var(--color-text-primary);
  line-height: 1;
}

.mobile-bar { display: none; }

.doc-container {
  display: flex;
  gap: 24px;
  padding: 110px 24px 24px 24px;
  min-height: 750px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: flex-start;
}

#left-side {
  width: 280px;
  min-width: 280px;
  background-color: var(--color-bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 100px;
  height: calc(100vh - 140px);
  align-self: flex-start;
  box-shadow: var(--shadow-side);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}
.catalog-tree { display: flex; flex-direction: column; height: 100%; padding: 12px; }

.search-input {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px; width: 100%;
  height: 47px; padding: 6.5px 11px;
  font-size: 16px;
  background: transparent;
  border: 1px solid var(--color-search-border);
  border-radius: 2px;
  transition: all 0.15s ease;
}
.search-input:hover { border-color: var(--color-active); }
.search-input:focus-within {
  border-color: var(--color-active);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}
[data-theme="dark"] .search-input:focus-within { box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15); }
.search-input { color: rgba(0, 0, 0, 0.85); }
[data-theme="dark"] .search-input { color: rgba(255, 255, 255, 0.85); }
.search-input .search-prefix { color: var(--color-text-secondary); font-size: 13px; line-height: 1; }
.search-input .search-prefix i { display: block; }
.search-input:focus-within .search-prefix { color: var(--color-active); }
.search-input input {
  border: none; outline: none; background: transparent;
  flex: 1; min-width: 0; height: 32px; font-size: 13px; line-height: 32px;
  padding: 0 12px; font-family: inherit;
  border-radius: 2px;
  color: rgba(0, 0, 0, 0.85);
}
[data-theme="dark"] .search-input input { color: rgba(255, 255, 255, 0.85); }
.search-input input::placeholder { color: var(--color-text-secondary); }

.tree-container { flex: 1; overflow-y: auto; overflow-x: auto; min-height: 0; }
.tree-children { display: none; margin-left: 24px; }
.tree-folder.open > .tree-children { display: block; }

.tree-node-row {
  display: flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 1px 0;
  position: relative;
  transition: background-color 0.15s ease;
}
.tree-folder.has-children > .tree-node-row { cursor: pointer; }
.tree-node-row:hover { background-color: var(--hover-overlay); }
.tree-node-row:hover .node-title { color: var(--color-active); }

.tree-switcher {
  width: 20px; flex: 0 0 20px; align-self: stretch; min-height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-secondary); font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tree-switcher:hover { color: var(--color-active); }
.tree-switcher i { transition: transform 0.15s ease; }
.tree-folder.open > .tree-node-row .tree-switcher i { transform: rotate(0deg); }
.tree-folder:not(.open) > .tree-node-row .tree-switcher i { transform: rotate(-90deg); }
.tree-switcher-leaf { visibility: hidden; }

.node-icon { width: 18px; flex: 0 0 18px; align-self: stretch; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; }
.node-icon .fa-folder { color: var(--color-orange); }
.tree-folder.open > .tree-node-row .node-icon .fa-folder::before { content: "\f07c"; }
.node-icon .fa-file-lines { color: var(--color-active); }

.site-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2px 24px 10px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text-secondary);
}
.site-footer a { color: var(--color-text-secondary); text-decoration: underline; }
.site-footer a:hover { color: var(--color-active); }

.node-title {
  flex: 1; min-width: 0; max-width: 180px;
  font-size: 13px; color: var(--color-text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.5;
}

.tree-page.active > .tree-node-row {
  background-color: var(--color-active-bg);
}
.tree-page.active > .tree-node-row::before {
  content: ''; position: absolute;
  left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--color-active); border-radius: 2px;
}
.tree-page.active > .tree-node-row .node-title { color: var(--color-active); font-weight: 500; }
.tree-folder.active > .tree-node-row .node-title { color: var(--color-active); }

.tree-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-border-light); }
.tree-section-title {
  font-size: 12px; color: var(--color-text-secondary);
  padding: 4px 4px 6px; letter-spacing: 0.3px;
}

#content-side {
  flex: 1;
  min-width: 0;
  max-width: 900px;
  background-color: var(--color-bg-primary);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  padding: 24px 32px 32px 32px;
  min-height: calc(100vh - 140px);
  border: 1px solid var(--color-border);
}
#p-content { min-height: 100%; }

.doc-title-box {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
  margin-bottom: 6px;
  text-align: center;
  position: relative;
}
.doc-title { display: block; font-size: 26px; font-weight: 600; color: var(--color-text-primary); line-height: 1.4; }

.doc-body { margin: 0; }
.page-content-main { margin: 0; }

.welcome-text { font-size: 15px; color: var(--color-text-primary); }

.doc-empty-state {
  margin: 5% auto;
  width: 400px; max-width: 100%;
  text-align: center;
  min-height: 50vh;
  padding: 40px;
  opacity: 0.7;
}
.doc-empty-state > i { font-size: 80px; color: var(--color-text-secondary); display: block; margin-bottom: 20px; }
.doc-empty-state p { margin: 6px 0; font-size: 14px; line-height: 1.6; color: var(--color-text-secondary); text-align: center; }
.doc-empty-state strong { color: var(--color-text-secondary); }
.doc-empty-state code { background: var(--color-bg-secondary); padding: 1px 5px; border-radius: 3px; font-size: 12px; }

.archive-post-list { list-style: none; padding: 0; margin: 16px 0; }
.archive-post-list li { padding: 8px 0; border-bottom: 1px solid var(--color-border-light); display: flex; align-items: center; gap: 8px; }
.archive-post-list li i { color: var(--color-active); }
.archive-post-list li a { color: var(--color-text-primary); }
.archive-post-list li a:hover { color: var(--color-active); }

.doc-center-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.doc-center-card { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: 8px; padding: 16px 18px; }
.doc-center-card .dcc-head { font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.doc-center-card .dcc-head i { color: var(--color-orange); }
.doc-center-card ul { list-style: none; margin: 0; padding: 0; }
.doc-center-card li { padding: 4px 0; }
.doc-center-card li a { color: var(--color-text-primary); font-size: 13px; }
.doc-center-card li.sub { padding-left: 8px; }
.doc-center-card li.sub i { color: var(--color-orange); margin-right: 4px; }

.markdown-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--md-text-color);
  word-wrap: break-word;
  overflow-x: auto;
  padding: 20px;
  text-align: left;
  background-color: var(--color-bg-primary);
}
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin-top: 24px; margin-bottom: 16px;
  font-weight: 600; line-height: 1.35;
  color: var(--md-heading-text);
  border-bottom: none;
}
.markdown-body h1 { font-size: 1.857em; padding-bottom: 0.3em; border-bottom: 2px solid var(--md-hr-bg); margin-top: 28px; margin-bottom: 18px; }
.markdown-body h2 { font-size: 1.571em; padding-bottom: 0.3em; border-bottom: 1px solid var(--md-hr-bg); margin-top: 24px; margin-bottom: 16px; }
.markdown-body h3 { font-size: 1.286em; margin-top: 20px; margin-bottom: 14px; }
.markdown-body h4 { font-size: 1.143em; margin-top: 18px; margin-bottom: 12px; }
.markdown-body h5 { font-size: 1em; margin-top: 16px; margin-bottom: 10px; }
.markdown-body h6 { font-size: 0.929em; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 14px; margin-bottom: 10px; }
.markdown-body h1 + p, .markdown-body h2 + p, .markdown-body h3 + p, .markdown-body h4 + p { margin-top: 0; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p { margin: 0 0 14px; line-height: 1.7; }
.markdown-body a { color: var(--md-link-color); border-bottom: 1px solid transparent; font-weight: 500; }
.markdown-body a:hover {
  color: var(--md-link-hover);
  border-bottom-color: var(--md-link-hover);
  text-decoration: underline;
}
.markdown-body img { max-width: 100%; margin: 8px 0; border-radius: 4px; }
.markdown-body ul, .markdown-body ol { margin: 0 0 14px; padding-left: 2em; }
.markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ul, .markdown-body ol ol { margin-bottom: 0; }
.markdown-body li { line-height: 1.75; margin: 3.5px 0; }

.markdown-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--md-accent-blue);
  background-color: var(--md-accent-blue-bg);
  border-radius: 0 4px 4px 0;
  color: var(--md-text-color);
  font-style: normal;
}
.markdown-body blockquote p { margin: 0 0 8px; line-height: 1.7; }
.markdown-body blockquote p:last-child { margin-bottom: 0; }

.markdown-body code:not(pre code) {
  padding: 0.2em 0.4em;
  margin: 0 0.2em;
  font-size: 85%;
  font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Monaco, 'Courier New', monospace;
  background-color: var(--md-inline-code-bg);
  color: var(--md-inline-code-text);
  border-radius: 4px;
  font-weight: 500;
  border: 1px solid var(--md-inline-code-border);
}

.markdown-body pre {
  position: relative;
  padding: 0 !important;
  padding-top: 36px !important;
  font-size: 85%;
  line-height: 1.6;
  font-family: 'YaHei Consolas Hybrid', Consolas, 'Meiryo UI', 'Malgun Gothic', 'Segoe UI', 'Trebuchet MS', Helvetica, monospace;
  background-color: var(--md-code-bg);
  border-radius: 6px;
  overflow: visible;
  margin: 16px 0;
  border: 1px solid var(--md-code-border);
  transition: border-color 0.15s ease;
}
.markdown-body pre:hover { border-color: var(--md-code-border-hover); }
.markdown-body pre::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 36px;
  background: transparent;
  border-bottom: 1px solid var(--md-code-header-border);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
.markdown-body pre::after {
  content: '';
  position: absolute;
  top: 13px; left: 14px;
  width: 10px; height: 10px;
  background-color: var(--md-dot-red);
  border-radius: 50%;
  box-shadow:
    16px 0 0 var(--md-dot-yellow),
    32px 0 0 var(--md-dot-green);
  transition: opacity 0.15s ease;
}
.markdown-body pre:hover::after { opacity: 0.85; }
.markdown-body pre code {
  display: block;
  padding: 12px 16px 14px 16px !important;
  background-color: transparent !important;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  color: var(--md-code-text);
  line-height: 1.65;
  font-size: 13px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Monaco, 'Courier New', monospace;
  font-weight: 400;
}
.markdown-body pre code::-webkit-scrollbar { height: 6px; }
.markdown-body pre code::-webkit-scrollbar-thumb { background: var(--md-scroll-thumb); border-radius: 3px; }
.markdown-body pre code::-webkit-scrollbar-track { background: var(--md-scroll-track); }

.markdown-body table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%; min-width: 100%;
  table-layout: fixed;
  margin: 16px 0;
  border-radius: 4px;
  border: 1px solid var(--md-border-color);
  font-size: 0.929em;
}
.markdown-body table th {
  background-color: var(--md-table-header-bg);
  border: 1px solid var(--md-table-border);
  padding: 10px 14px;
  line-height: 1.6;
  text-align: left;
  font-weight: 600;
  color: var(--md-text-color);
}
.markdown-body table td {
  border: 1px solid var(--md-table-border);
  padding: 10px 14px;
  line-height: 1.6;
  color: var(--md-text-color);
  vertical-align: top;
  word-break: break-word;
}
.markdown-body table tbody tr:nth-child(odd) { background-color: var(--md-table-row-bg); }
.markdown-body table tbody tr:nth-child(even) { background-color: var(--md-table-row-even-bg); }
.markdown-body table tbody tr:hover { background-color: var(--md-table-row-hover-bg); }

.markdown-body hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--md-accent-blue), transparent);
  margin: 24px 0;
}
.markdown-body kbd { background: var(--color-secondary); border-radius: 4px; padding: 2px 6px; font-size: 85%; border: 1px solid var(--color-border); box-shadow: inset 0 -1px 0 var(--color-border); }

#right-side {
  width: 260px; min-width: 260px; flex-shrink: 0;
  position: sticky; top: 100px;
  height: fit-content;
  align-self: flex-start;
}
.toc-container { position: relative; z-index: 100; width: 100%; }

.doc-container.no-toc #right-side { display: none; }
.doc-container.no-toc #content-side { max-width: none; }
.toc-toggle {
  width: 40px; height: 40px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}
.toc-toggle i { color: var(--color-active); font-size: 16px; transition: color 0.15s ease; }
.toc-toggle:hover { box-shadow: var(--shadow-sm); border-color: var(--color-active); background: var(--hover-overlay); }

.toc-list {
  position: absolute;
  top: 50px; left: 0;
  width: 220px;
  max-height: calc(100vh - 250px);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.15s ease;
}
.toc-list.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.toc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  line-height: 1;
  border-bottom: 1px solid var(--color-border);
  background: rgba(0, 123, 255, 0.05);
  font-weight: 600;
  color: var(--color-text-primary);
}
[data-theme="dark"] .toc-header { background: rgba(74, 158, 255, 0.08); }
.toc-header span { color: var(--color-active); }
.toc-header i { cursor: pointer; color: var(--color-text-secondary); transition: color 0.15s ease; }
.toc-header i:hover { color: var(--color-red); }
.toc-content { padding: 8px 0; max-height: calc(100vh - 320px); overflow-y: auto; }
.toc-item {
  padding: 8px 12px 8px 36px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--color-text-primary);
  font-size: 13px;
  line-height: 1;
  border-radius: 4px;
  margin: 2px 8px;
  position: relative;
  display: block;
}
.toc-item:hover { background-color: var(--color-active-bg); color: var(--color-active); }
.toc-item.active {
  background: rgba(0, 123, 255, 0.12);
  color: var(--color-active);
  font-weight: 500;
}
[data-theme="dark"] .toc-item.active { background: rgba(74, 158, 255, 0.15); }
.toc-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px;
  background: var(--color-active);
  border-radius: 0 2px 2px 0;
}
.toc-level-1 { padding-left: 12px; font-size: 14px; font-weight: 600; }
.toc-level-2 { padding-left: 20px; font-size: 13px; font-weight: 500; }
.toc-level-3 { padding-left: 28px; font-size: 12px; font-weight: 400; }
.toc-level-4 { padding-left: 36px; font-size: 12px; font-weight: 400; opacity: 0.8; }
.toc-empty { padding: 20px; text-align: center; color: var(--color-text-secondary); font-size: 13px; }

#comment-area, #feedback-area {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--color-border);
}
.doc-comments .comments-title { font-size: 16px; font-weight: 600; margin: 0 0 16px; display: flex; align-items: center; gap: 8px; }
.comment-list { margin-bottom: 24px; }
.comment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--color-border-light); }
.comment-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-active-bg); color: var(--color-active);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
  user-select: none;
}
.comment-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.comment-author { font-weight: 600; color: var(--color-text-primary); }
.comment-date { font-size: 12px; color: var(--color-text-secondary); }
.comment-content { color: var(--color-text-primary); font-size: 13px; }
.comment-form-wrap label { display: block; font-size: 13px; color: var(--color-text-primary); margin: 8px 0 4px; }
.comment-form-wrap input[type="text"], .comment-form-wrap textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 6px;
  background: var(--color-bg-primary); color: var(--color-text-primary); font-size: 13px; outline: none;
}
.comment-form-wrap input:focus, .comment-form-wrap textarea:focus { border-color: var(--color-active); }
.comment-form-wrap .submit { margin-top: 10px; }

.comment-login-tip { font-size: 13px; color: var(--color-text-secondary); margin: 0 0 10px; }
.comment-form-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.c-input, .c-textarea {
  width: 100%; padding: 8px 12px; font-size: 13px; outline: none;
  border: 1px solid var(--color-border); border-radius: 6px;
  background: var(--color-bg-primary); color: var(--color-text-primary);
  font-family: inherit;
}
.comment-form-row .c-input { flex: 1; min-width: 150px; }
.c-input:focus, .c-textarea:focus {
  border-color: var(--color-active);
  box-shadow: 0 0 0 2px var(--color-active-bg);
}
.c-textarea { margin-bottom: 10px; resize: vertical; line-height: 1.6; }
.c-submit {
  padding: 8px 20px; font-size: 13px; cursor: pointer;
  color: #fff; background: var(--color-active);
  border: 1px solid var(--color-active); border-radius: 6px;
  transition: opacity 0.15s ease;
}
.c-submit:hover { opacity: 0.85; }

.common-top {
  position: fixed; display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; right: 40px; bottom: 100px; z-index: 999;
  background-color: var(--color-bg-primary); border: 1px solid var(--color-border);
  border-radius: 8px; cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.common-top.show { display: flex; }
.common-top i { color: var(--color-text-primary); font-size: 18px; }
.common-top:hover { border-color: var(--color-active); background: var(--hover-overlay); }
.common-top:hover i { color: var(--color-active); }

.drawer-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 998; display: none;
}
.drawer-mask.show { display: block; }

@media (max-width: 1200px) {
  #right-side { display: none !important; }
  #content-side { max-width: none; }
}
@media (max-width: 1100px) {
  #left-side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000;
    height: 100vh; width: 300px; min-width: 300px; border-radius: 0;
    transform: translateX(-100%); box-shadow: var(--shadow-card);
  }
  #left-side.open { transform: translateX(0); }
  #content-side { max-width: none; width: 100%; }
  .mobile-bar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 997;
    background: var(--color-bg-secondary); border-bottom: 1px solid var(--color-border);
    padding: 0 16px;
  }
  .mobile-bar .icon-item { width: 36px; height: 36px; }
  .mobile-title { font-size: 16px; font-weight: 600; color: var(--color-text-primary); }
  .doc-container { padding: 76px 16px 20px 16px; display: block; }
  .item-header { display: none; }
}
@media (max-width: 768px) {
  #content-side { padding: 20px 16px; }
  .doc-title { font-size: 20px; }
}
