/* ============================================================
   notion.css — Notion 官网风格共享组件库
   三页共用：index.html / characters.html / adaptation.html
   配色、字号、间距严格对齐 Notion 客户端
   ============================================================ */

/* ---------- 基础 ---------- */
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #37352f;
  background: #ffffff;
}
.dark body {
  color: rgba(255, 255, 255, 0.9);
  background: #191919;
}

/* Notion 文本灰阶 */
.n-text-strong { color: #37352f; }
.dark .n-text-strong { color: rgba(255, 255, 255, 0.9); }
.n-text { color: rgba(55, 53, 47, 0.75); }
.dark .n-text { color: rgba(255, 255, 255, 0.68); }
.n-text-dim { color: rgba(55, 53, 47, 0.48); }
.dark .n-text-dim { color: rgba(255, 255, 255, 0.42); }

/* ---------- 侧边栏 ---------- */
.n-sidebar {
  width: 250px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  background: #f7f7f5;
  border-right: 1px solid #ededec;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.dark .n-sidebar {
  background: #202020;
  border-right-color: #2f2f2f;
}

.n-sidebar-header {
  padding: 10px 8px 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.n-sidebar-workspace {
  font-size: 14px;
  font-weight: 600;
  color: #37352f;
}
.dark .n-sidebar-workspace { color: rgba(255, 255, 255, 0.9); }

.n-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px 16px;
}
.n-sidebar-section {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(55, 53, 47, 0.42);
  padding: 12px 8px 4px;
  user-select: none;
}
.dark .n-sidebar-section { color: rgba(255, 255, 255, 0.36); }

.n-sidebar-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #37352f;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
  line-height: 1.4;
}
.dark .n-sidebar-item { color: rgba(255, 255, 255, 0.85); }
.n-sidebar-item:hover { background: #efefee; }
.dark .n-sidebar-item:hover { background: rgba(255, 255, 255, 0.055); }
.n-sidebar-item.active { background: #e9e9e8; }
.dark .n-sidebar-item.active { background: rgba(255, 255, 255, 0.09); }
.n-sidebar-item.sub { padding-left: 26px; font-size: 13.5px; font-weight: 400; }
.n-sidebar-item .icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 14px; }
.n-sidebar-item .chev {
  width: 14px; flex-shrink: 0;
  font-size: 9px; text-align: center;
  color: rgba(55, 53, 47, 0.4);
  transition: transform 0.12s ease;
}
.dark .n-sidebar-item .chev { color: rgba(255, 255, 255, 0.35); }
.n-sidebar-item .chev.open { transform: rotate(90deg); }

.n-sidebar-footer {
  padding: 8px 10px 12px;
  border-top: 1px solid #ededec;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dark .n-sidebar-footer { border-top-color: #2f2f2f; }

/* ---------- 顶栏（面包屑） ---------- */
.n-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dark .n-topbar { background: rgba(25, 25, 25, 0.92); }
.n-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: rgba(55, 53, 47, 0.5);
  min-width: 0;
}
.dark .n-breadcrumb { color: rgba(255, 255, 255, 0.45); }
.n-breadcrumb a {
  color: rgba(55, 53, 47, 0.5);
  text-decoration: none;
  white-space: nowrap;
}
.dark .n-breadcrumb a { color: rgba(255, 255, 255, 0.45); }
.n-breadcrumb a:hover { color: #37352f; }
.dark .n-breadcrumb a:hover { color: rgba(255, 255, 255, 0.9); }
.n-breadcrumb .sep { color: rgba(55, 53, 47, 0.28); font-size: 12px; }
.dark .n-breadcrumb .sep { color: rgba(255, 255, 255, 0.25); }
.n-breadcrumb .current {
  color: #37352f;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.dark .n-breadcrumb .current { color: rgba(255, 255, 255, 0.9); }

/* ---------- 内容列 ---------- */
.n-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 120px;
}
.n-page--wide {
  max-width: 1060px;
}

/* 封面图（Notion 页面 cover） */
.n-cover {
  height: 240px;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  position: relative;
}
.n-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

/* 页面图标 + 标题 */
.n-page-icon {
  font-size: 72px;
  line-height: 1.1;
  user-select: none;
}
.n-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #37352f;
}
.dark .n-title { color: rgba(255, 255, 255, 0.9); }
.n-subtitle {
  font-size: 15px;
  color: rgba(55, 53, 47, 0.55);
  line-height: 1.6;
}
.dark .n-subtitle { color: rgba(255, 255, 255, 0.5); }

/* ---------- 标题块（正文层级） ---------- */
.n-h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  color: #37352f;
  margin: 44px 0 8px;
  letter-spacing: -0.01em;
}
.n-h1:first-child { margin-top: 0; }
.dark .n-h1 { color: rgba(255, 255, 255, 0.9); }

.n-h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #37352f;
  margin: 36px 0 6px;
}
.dark .n-h2 { color: rgba(255, 255, 255, 0.9); }

.n-h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #37352f;
  margin: 28px 0 4px;
}
.dark .n-h3 { color: rgba(255, 255, 255, 0.9); }

.n-p {
  font-size: 16px;
  line-height: 1.75;
  margin: 6px 0;
  color: rgba(55, 53, 47, 0.85);
}
.dark .n-p { color: rgba(255, 255, 255, 0.75); }
.n-p strong { color: #37352f; font-weight: 600; }
.dark .n-p strong { color: rgba(255, 255, 255, 0.92); }
.n-p a { color: inherit; text-decoration: underline; text-decoration-color: rgba(55, 53, 47, 0.3); text-underline-offset: 3px; }
.n-p a:hover { text-decoration-color: currentColor; }

.n-small { font-size: 13px; line-height: 1.65; color: rgba(55, 53, 47, 0.65); }
.dark .n-small { color: rgba(255, 255, 255, 0.58); }

/* ---------- Callout（Notion 标注块） ---------- */
.n-callout {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.7;
  margin: 10px 0;
  align-items: flex-start;
}
.n-callout .co-icon { font-size: 19px; line-height: 1.4; flex-shrink: 0; user-select: none; }
.n-callout .co-body { flex: 1; min-width: 0; }
.n-callout .co-body strong { font-weight: 600; }

/* Notion callout 官方色板（浅色） */
.co-gray   { background: #f7f6f3; }
.co-brown  { background: #f4eeee; }
.co-orange { background: #faebdd; }
.co-yellow { background: #fbf3db; }
.co-green  { background: #edf3ec; }
.co-blue   { background: #e7f3f8; }
.co-purple { background: #f6f3f9; }
.co-pink   { background: #faf1f5; }
.co-red    { background: #fdebec; }

/* Notion callout 官方色板（深色） */
.dark .co-gray   { background: rgba(255, 255, 255, 0.055); }
.dark .co-brown  { background: rgba(84, 44, 14, 0.28); }
.dark .co-orange { background: rgba(145, 77, 14, 0.25); }
.dark .co-yellow { background: rgba(157, 133, 16, 0.25); }
.dark .co-green  { background: rgba(80, 131, 63, 0.25); }
.dark .co-blue   { background: rgba(44, 106, 155, 0.3); }
.dark .co-purple { background: rgba(105, 63, 166, 0.28); }
.dark .co-pink   { background: rgba(158, 76, 120, 0.26); }
.dark .co-red    { background: rgba(170, 41, 27, 0.28); }

.n-callout.co-gray   { color: #37352f; }
.dark .n-callout { color: rgba(255, 255, 255, 0.82); }

/* ---------- 引用块（Quote） ---------- */
.n-quote {
  border-left: 3px solid #37352f;
  padding: 2px 0 2px 14px;
  margin: 10px 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(55, 53, 47, 0.85);
}
.dark .n-quote { border-left-color: rgba(255, 255, 255, 0.85); color: rgba(255, 255, 255, 0.72); }
.n-quote .q-src { font-size: 13px; color: rgba(55, 53, 47, 0.45); margin-top: 6px; }
.dark .n-quote .q-src { color: rgba(255, 255, 255, 0.4); }

/* ---------- 分割线 ---------- */
.n-divider {
  border: none;
  border-top: 1px solid #e9e9e7;
  margin: 28px 0;
}
.dark .n-divider { border-top-color: #2f2f2f; }

/* ---------- Toggle 折叠块 ---------- */
.n-toggle { margin: 4px 0; }
.n-toggle > summary {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(55, 53, 47, 0.85);
  list-style: none;
  border-radius: 4px;
  padding: 3px 6px 3px 2px;
  user-select: none;
}
.dark .n-toggle > summary { color: rgba(255, 255, 255, 0.78); }
.n-toggle > summary::-webkit-details-marker { display: none; }
.n-toggle > summary::before {
  content: '▸';
  flex-shrink: 0;
  color: rgba(55, 53, 47, 0.4);
  font-size: 13px;
  width: 16px;
  margin-top: 3px;
  transition: transform 0.12s ease;
}
.dark .n-toggle > summary::before { color: rgba(255, 255, 255, 0.35); }
.n-toggle[open] > summary::before { transform: rotate(90deg); }
.n-toggle > summary:hover { background: rgba(55, 53, 47, 0.045); }
.dark .n-toggle > summary:hover { background: rgba(255, 255, 255, 0.05); }
.n-toggle-body {
  padding: 4px 0 6px 24px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(55, 53, 47, 0.8);
}
.dark .n-toggle-body { color: rgba(255, 255, 255, 0.7); }

/* ---------- Notion 简单表格 ---------- */
.n-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  border-radius: 4px;
}
.n-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  background: #ffffff;
}
.dark .n-table { background: #191919; }
.n-table th, .n-table td {
  border: 1px solid #e9e9e7;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  color: rgba(55, 53, 47, 0.85);
}
.dark .n-table th, .dark .n-table td { border-color: #2f2f2f; color: rgba(255, 255, 255, 0.75); }
.n-table th {
  background: #f7f6f3;
  font-weight: 600;
  color: #37352f;
  white-space: nowrap;
}
.dark .n-table th { background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.88); }
.n-table td strong { color: #37352f; font-weight: 600; }
.dark .n-table td strong { color: rgba(255, 255, 255, 0.92); }
.n-table tr:hover td { background: rgba(55, 53, 47, 0.02); }
.dark .n-table tr:hover td { background: rgba(255, 255, 255, 0.025); }

/* ---------- Tag Pills（Notion select 色板） ---------- */
.pill-green  { background: #eef6ee; color: #1e6b37; border: 1px solid #d0e7d2; }
.pill-red    { background: #fdf0ee; color: #b5382b; border: 1px solid #f8d3cf; }
.pill-purple { background: #f5f0fb; color: #623696; border: 1px solid #e5d8f6; }
.pill-blue   { background: #edf4fb; color: #1f5f96; border: 1px solid #d4e5f7; }
.pill-gray   { background: #f3f3f4; color: #4b4b52; border: 1px solid #e1e2e4; }
.pill-yellow { background: #fcf6e8; color: #8f6200; border: 1px solid #f6e6c2; }
.pill-orange { background: #fbecdd; color: #9a4b12; border: 1px solid #f5d6b8; }
.pill-pink   { background: #fbf0f5; color: #963c62; border: 1px solid #f3d3e2; }
.pill-teal   { background: #eaf4f4; color: #186f6c; border: 1px solid #cfe8e7; }
.pill-brown  { background: #f6efe9; color: #6f4a2c; border: 1px solid #e7d8c8; }

.dark .pill-green  { background: rgba(30, 107, 55, 0.25); color: #85e8a0; border: 1px solid rgba(46, 160, 67, 0.3); }
.dark .pill-red    { background: rgba(181, 56, 43, 0.25); color: #ff9b91; border: 1px solid rgba(218, 54, 51, 0.3); }
.dark .pill-purple { background: rgba(98, 54, 150, 0.25); color: #d2a8ff; border: 1px solid rgba(137, 87, 229, 0.3); }
.dark .pill-blue   { background: rgba(31, 95, 150, 0.25); color: #79c0ff; border: 1px solid rgba(56, 139, 253, 0.3); }
.dark .pill-gray   { background: rgba(110, 118, 129, 0.2); color: #c9d1d9; border: 1px solid rgba(110, 118, 129, 0.3); }
.dark .pill-yellow { background: rgba(143, 98, 0, 0.25); color: #f2cc60; border: 1px solid rgba(187, 128, 9, 0.3); }
.dark .pill-orange { background: rgba(154, 75, 18, 0.3); color: #ffb380; border: 1px solid rgba(222, 120, 37, 0.35); }
.dark .pill-pink   { background: rgba(150, 60, 98, 0.3); color: #ff9ecb; border: 1px solid rgba(206, 84, 141, 0.35); }
.dark .pill-teal   { background: rgba(24, 111, 108, 0.28); color: #6fe0dc; border: 1px solid rgba(35, 136, 133, 0.35); }
.dark .pill-brown  { background: rgba(111, 74, 44, 0.3); color: #d8b08c; border: 1px solid rgba(150, 105, 66, 0.35); }

/* ---------- 卡片 / 数据库视图 ---------- */
.notion-card {
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.notion-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); }
.dark .notion-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }

/* 数据库视图 Tab（Notion database view tabs） */
.n-viewtab {
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(55, 53, 47, 0.55);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.1s ease, color 0.1s ease;
  cursor: pointer;
}
.dark .n-viewtab { color: rgba(255, 255, 255, 0.5); }
.n-viewtab:hover { background: rgba(55, 53, 47, 0.055); }
.dark .n-viewtab:hover { background: rgba(255, 255, 255, 0.055); }
.n-viewtab.active {
  background: rgba(55, 53, 47, 0.075);
  color: #37352f;
}
.dark .n-viewtab.active { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.9); }

/* ---------- 按钮 ---------- */
.n-btn {
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(55, 53, 47, 0.06);
  color: rgba(55, 53, 47, 0.85);
  transition: background 0.1s ease;
  cursor: pointer;
}
.n-btn:hover { background: rgba(55, 53, 47, 0.1); }
.dark .n-btn { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.8); }
.dark .n-btn:hover { background: rgba(255, 255, 255, 0.13); }
.n-btn.active {
  background: #37352f;
  color: #ffffff;
}
.dark .n-btn.active { background: rgba(255, 255, 255, 0.9); color: #191919; }

/* ---------- 页面链接块（Notion sub-page link） ---------- */
.n-pagelink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: #37352f;
  border: 1px solid #e9e9e7;
  background: #ffffff;
  transition: background 0.12s ease;
}
.n-pagelink:hover { background: #f7f6f3; }
.dark .n-pagelink {
  color: rgba(255, 255, 255, 0.88);
  border-color: #2f2f2f;
  background: #1f1f1f;
}
.dark .n-pagelink:hover { background: rgba(255, 255, 255, 0.05); }
.n-pagelink .icon { font-size: 20px; }
.n-pagelink .desc { font-size: 12.5px; font-weight: 400; color: rgba(55, 53, 47, 0.5); margin-left: auto; text-align: right; }
.dark .n-pagelink .desc { color: rgba(255, 255, 255, 0.42); }

/* ---------- 滚动条 ---------- */
.custom-scroll::-webkit-scrollbar { width: 5px; height: 5px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(55, 53, 47, 0.2); border-radius: 9999px; }
.dark .custom-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); }

/* ---------- 家族谱系树 ---------- */
.n-tree { font-size: 14.5px; }
.n-tree details { margin: 2px 0; }
.n-tree summary {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  cursor: pointer;
  list-style: none;
  padding: 3px 8px 3px 4px;
  border-radius: 4px;
  user-select: none;
}
.n-tree summary::-webkit-details-marker { display: none; }
.n-tree summary:hover { background: rgba(55, 53, 47, 0.045); }
.dark .n-tree summary:hover { background: rgba(255, 255, 255, 0.05); }
.n-tree summary .t-arrow { font-size: 11px; color: rgba(55, 53, 47, 0.4); }
.dark .n-tree summary .t-arrow { color: rgba(255, 255, 255, 0.35); }
.n-tree .t-node { cursor: pointer; font-weight: 500; color: #37352f; }
.dark .n-tree .t-node { color: rgba(255, 255, 255, 0.88); }
.n-tree .t-node:hover { text-decoration: underline; text-underline-offset: 3px; }
.n-tree .t-rel { font-size: 12px; color: rgba(55, 53, 47, 0.45); }
.dark .n-tree .t-rel { color: rgba(255, 255, 255, 0.4); }
.n-tree .t-children {
  margin-left: 15px;
  padding-left: 14px;
  border-left: 1.5px solid #e9e9e7;
}
.dark .n-tree .t-children { border-left-color: #2f2f2f; }

/* ---------- 占位图块（官方剧照暂缺） ---------- */
.n-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: repeating-linear-gradient(45deg, #f4f4f2, #f4f4f2 8px, #ececea 8px, #ececea 16px);
  color: rgba(55, 53, 47, 0.4);
  font-size: 11px;
  text-align: center;
  padding: 8px;
}
.dark .n-photo-placeholder {
  background: repeating-linear-gradient(45deg, #232323, #232323 8px, #2a2a2a 8px, #2a2a2a 16px);
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- 抽屉 ---------- */
.n-drawer-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 15, 15, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.n-drawer-mask.open { opacity: 1; pointer-events: auto; }
.n-drawer {
  position: fixed; top: 0; right: 0; z-index: 70;
  height: 100%;
  width: 100%; max-width: 620px;
  background: #ffffff;
  border-left: 1px solid #e9e9e7;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  transform: translateX(105%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
.dark .n-drawer {
  background: #1f1f1f;
  border-left-color: #2f2f2f;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}
.n-drawer.open { transform: translateX(0); }

/* 属性行（Notion properties） */
.n-prop {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(55, 53, 47, 0.06);
  font-size: 13.5px;
  line-height: 1.6;
}
.dark .n-prop { border-bottom-color: rgba(255, 255, 255, 0.06); }
.n-prop .p-name {
  width: 92px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(55, 53, 47, 0.45);
}
.dark .n-prop .p-name { color: rgba(255, 255, 255, 0.4); }
.n-prop .p-value { flex: 1; color: rgba(55, 53, 47, 0.85); }
.dark .n-prop .p-value { color: rgba(255, 255, 255, 0.78); }

/* ---------- 图标（单色 SVG） ---------- */
[data-icon] svg, .co-icon svg, .icon svg { display: block; }
.n-viewtab [data-icon] svg { width: 14px; height: 14px; }
.n-callout .co-icon svg { width: 18px; height: 18px; }
.n-pagelink .icon svg { width: 20px; height: 20px; }
.n-sidebar-header > svg { flex-shrink: 0; }
.n-sidebar-item .icon svg { display: block; }
.n-topbar button svg { width: 15px; height: 15px; }

/* ---------- ⌘K 快速搜索 ---------- */
.n-qf-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 15, 15, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
}
.n-qf {
  position: fixed; z-index: 81; top: 13vh; left: 50%;
  transform: translateX(-50%) scale(.98);
  width: min(560px, 92vw);
  background: #ffffff;
  border: 1px solid #e9e9e7;
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.dark .n-qf { background: #202020; border-color: #2f2f2f; }
#qf-root { display: none; }
#qf-root.open { display: block; }
#qf-root.open .n-qf-mask { opacity: 1; pointer-events: auto; }
#qf-root.open .n-qf { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(1); }
.n-qf-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #ededec;
  color: rgba(55, 53, 47, 0.45);
}
.dark .n-qf-head { border-color: #2f2f2f; color: rgba(255, 255, 255, 0.4); }
.n-qf-head input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; color: #37352f; font-family: inherit;
}
.dark .n-qf-head input { color: rgba(255, 255, 255, 0.9); }
.n-qf-esc {
  font-size: 10.5px; padding: 2px 6px; border-radius: 4px;
  border: 1px solid #e3e3e1; color: rgba(55, 53, 47, 0.4);
}
.dark .n-qf-esc { border-color: #3a3a3a; color: rgba(255, 255, 255, 0.35); }
.n-qf-results { max-height: 54vh; overflow-y: auto; padding: 6px; }
.n-qf-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 6px; cursor: pointer;
}
.n-qf-item.sel, .n-qf-item:hover { background: #f1f1ef; }
.dark .n-qf-item.sel, .dark .n-qf-item:hover { background: rgba(255, 255, 255, 0.07); }
.n-qf-item .qf-ph {
  width: 38px; height: 38px; border-radius: 4px; object-fit: cover;
  flex-shrink: 0; background: #f2f1ee;
}
.dark .n-qf-item .qf-ph { background: #2a2a2a; }
.n-qf-item .qf-ic {
  width: 34px; height: 34px; border-radius: 4px;
  background: #f1f1ef; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: rgba(55, 53, 47, 0.5);
}
.dark .n-qf-item .qf-ic { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.5); }
.n-qf-item .qf-t { font-size: 13.5px; font-weight: 500; color: #37352f; line-height: 1.3; }
.n-qf-item .qf-s { font-size: 11px; color: rgba(55, 53, 47, 0.45); }
.dark .n-qf-item .qf-t { color: rgba(255, 255, 255, 0.88); }
.dark .n-qf-item .qf-s { color: rgba(255, 255, 255, 0.4); }
.n-qf-item .qf-tag { flex-shrink: 0; }
.n-qf-empty { padding: 28px; text-align: center; font-size: 13px; color: rgba(55, 53, 47, 0.4); }
.dark .n-qf-empty { color: rgba(255, 255, 255, 0.35); }
.n-qf-item .min-w-0 { min-width: 0; flex: 1; }
.qf-tag { font-size: 10px; font-weight: 500; padding: 1.5px 6px; border-radius: 4px; }

/* ---------- 侧边栏：折叠树 / 收起窄栏 ---------- */
.n-sidebar-header { position: relative; gap: 8px; flex-wrap: nowrap; }
.sb-burger { display: none; }
.sb-logo { display: flex; align-items: center; cursor: pointer; color: #37352f; flex-shrink: 0; }
.dark .sb-logo { color: rgba(255, 255, 255, 0.85); }
.sb-workspace-text { flex: 1; min-width: 0; }
.sb-collapse {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border: none; background: none;
  border-radius: 4px; color: rgba(55, 53, 47, 0.4); cursor: pointer;
  display: none; align-items: center; justify-content: center; flex-shrink: 0;
}
.n-sidebar-header:hover .sb-collapse { display: flex; }
.sb-collapse:hover { background: rgba(55, 53, 47, 0.08); color: #37352f; }
.dark .sb-collapse:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.n-sidebar-wrap { display: flex; align-items: stretch; border-radius: 6px; margin: 0; }
.n-sidebar-wrap:hover { background: #efefee; }
.dark .n-sidebar-wrap:hover { background: rgba(255, 255, 255, 0.055); }
.n-sidebar-wrap .n-sidebar-item { flex: 1; }
.n-sidebar-wrap .n-sidebar-item.active { background: transparent; }
.n-sidebar-wrap.active-wrap { background: #e9e9e8; }
.dark .n-sidebar-wrap.active-wrap { background: rgba(255, 255, 255, 0.09); }
.n-chev {
  width: 18px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: rgba(55, 53, 47, 0.35);
  cursor: pointer; flex-shrink: 0; border-radius: 3px; margin-left: 4px; padding: 0;
}
.dark .n-chev { color: rgba(255, 255, 255, 0.3); }
.n-chev:hover { color: #37352f; }
.dark .n-chev:hover { color: #fff; }
.n-chev svg { transition: transform .12s ease; }
.n-chev.open svg { transform: rotate(90deg); }

.n-sidebar-search {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 8px 2px; padding: 5.5px 8px;
  border-radius: 6px; font-size: 13.5px;
  color: rgba(55, 53, 47, 0.55); cursor: pointer;
}
.dark .n-sidebar-search { color: rgba(255, 255, 255, 0.5); }
.n-sidebar-search:hover { background: #efefee; color: #37352f; }
.dark .n-sidebar-search:hover { background: rgba(255, 255, 255, 0.055); color: rgba(255, 255, 255, 0.85); }
.n-sidebar-search .s-label { flex: 1; }
.n-sidebar-search kbd {
  font-size: 10px; padding: 1px 5px; border-radius: 4px;
  border: 1px solid #e1e1df; color: rgba(55, 53, 47, 0.4); font-family: inherit; flex-shrink: 0;
}
.dark .n-sidebar-search kbd { border-color: #3a3a3a; color: rgba(255, 255, 255, 0.35); }

@media (min-width: 901px) {
  body.sb-collapsed .n-sidebar { width: 56px; }
  body.sb-collapsed .sb-workspace-text,
  body.sb-collapsed .n-sidebar-search .s-label,
  body.sb-collapsed .n-sidebar-search kbd,
  body.sb-collapsed .n-sidebar-section,
  body.sb-collapsed .n-sidebar-item span:last-child,
  body.sb-collapsed .n-chev,
  body.sb-collapsed .n-sidebar-footer > span { display: none !important; }
  body.sb-collapsed .n-sidebar-header { justify-content: center; gap: 6px; padding: 10px 4px; flex-wrap: wrap; }
  body.sb-collapsed .sb-burger { display: none; }
  body.sb-collapsed .n-sidebar-search { justify-content: center; padding: 7px 0; margin: 4px 10px 2px; }
  body.sb-collapsed .n-sidebar-item { justify-content: center; padding: 6px 0; }
  body.sb-collapsed .n-sidebar-item.sub { padding-left: 0; }
  body.sb-collapsed .n-sidebar-footer { justify-content: center; }
  body.sb-collapsed .n-sidebar-wrap { justify-content: center; }
}

/* ---------- 克制动效 ---------- */
.view-enter { animation: n-fade-up .16s ease both; }
.card-pre { opacity: 0; transform: translateY(8px); }
.card-in {
  opacity: 1; transform: none;
  transition: opacity .18s ease var(--d, 0ms), transform .18s ease var(--d, 0ms);
}
.char-cover img { transition: opacity .16s ease; }
.char-cover img.pre { opacity: 0; }
@keyframes skel { 0%, 100% { opacity: .5; } 50% { opacity: .95; } }
.char-cover:has(img.pre) { animation: skel 1.2s ease infinite; }
#drawer-body { transition: opacity .14s ease; }
#drawer-body.fade-swap { opacity: 0; }
.d-crumb { font-size: 11px; color: rgba(55, 53, 47, 0.45); }
.dark .d-crumb { color: rgba(255, 255, 255, 0.38); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 动画 ---------- */
@keyframes n-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.n-fade-up { animation: n-fade-up 0.3s ease both; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .n-sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.08);
  }
  .n-sidebar.mobile-open { transform: translateX(0); }
  .n-page { padding: 16px 16px 100px; }
  .n-title { font-size: 32px; }
  .n-cover { height: 180px; }
}
