/* ===== 百科皮肤 v2（2026-11-12 重做）=====
   版式参考 WikiWand：纸面无卡片、留白分层、左侧常驻目录、正文内「快速信息」。
   版心 848px = 普通文章内页（max-w-4xl 896 − 左右 px-6 24×2）的正文宽度，两边观感一致。
   结构由 functions/blog/[slug].js 的 wikiMain 提供：
     .wiki-grid > aside.wk-rail（目录）
                > .wiki-main（标题 / 快速信息 / 正文 / 工具 / 分类 / 许可）
   字体：标题衬线（思源宋体一系），正文黑体；强调色沿用站内链接蓝 #2563eb。
   ★ 编辑器那套（.wiki-editor）在文件末尾，未改动。 */

/* ---------- 令牌 ---------- */
.wiki-page {
  --wk-paper: #ffffff;
  --wk-bg: #ffffff;
  --wk-text: #14181d;
  --wk-dim: #5f6b7a;
  --wk-faint: #8d97a3;
  --wk-link: #2563eb;
  --wk-line: #e7eaee;
  --wk-line-soft: #f1f3f5;
  --wk-ash: #f7f8f9;
  --wk-paper2: #f7f8f9;
  --wk-code: #f1f3f5;
  --wk-ash2: #eef1f4;
  --wk-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, "SimSun",
              ui-serif, Georgia, "Times New Roman", serif;
  --wk-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
             "Microsoft YaHei", "Noto Sans CJK SC", Meiryo, system-ui, sans-serif;
  --wk-r-s: 6px;
  --wk-r-m: 8px;
  --wk-r-l: 12px;
  --wk-measure: 848px;
  --wk-toc-w: 208px;
  color: var(--wk-text);
  background: var(--wk-bg) !important;
  font-family: var(--wk-sans);
}
.dark .wiki-page {
  --wk-paper: #121212;
  --wk-bg: #121212;
  --wk-text: #e6e8ea;
  --wk-dim: #a2a9b3;
  --wk-faint: #737b86;
  --wk-link: #7db2ff;
  --wk-line: #2a2d31;
  --wk-line-soft: #212427;
  --wk-ash: #1b1e21;
  --wk-paper2: #1b1e21;
  --wk-code: #242424;
  --wk-ash2: #24282c;
}
.wiki-page, .wiki-page *, .wiki-page *::before, .wiki-page *::after { box-sizing: border-box; }
.wiki-page > header > div { max-width: 1136px !important; }

/* ---------- 外壳：左目录 + 右正文 ---------- */
.wiki-shell {
  width: 100%;
  max-width: 1136px;
  margin: 0 auto;
  /* 站点页头是 position:fixed，桌面高约 66px、手机两行约 97px，留够高度别被压住 */
  padding: 88px 24px 92px;
}
.wiki-grid {
  display: grid;
  grid-template-columns: var(--wk-toc-w) minmax(0, 1fr);
  column-gap: 32px;
  align-items: start;
}
.wiki-main { grid-column: 2; min-width: 0; width: 100%; max-width: var(--wk-measure); margin-inline: auto; }

/* 顶部工具条：搜索 + 编辑/历史/源码，去胶囊、去底色 */
.wiki-topbar {
  display: flex; align-items: center; gap: 18px;
  margin: 0 0 40px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--wk-line-soft);
  position: static;
}
.wiki-brand {
  display: inline-flex; align-items: center; gap: 8px;
  flex: 0 0 auto; text-decoration: none; color: var(--wk-text);
}
.wiki-brand-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  object-position: center 22%; background: var(--wk-ash); flex: 0 0 auto;
}
.wiki-brand-text b { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.wiki-brand:hover .wiki-brand-text b { color: var(--wk-link); }
.wiki-brand-text span { display: none; }
.wiki-search { flex: 0 1 260px; position: relative; min-width: 0; }
.wiki-search input {
  width: 100%; height: 34px; padding: 0 12px 0 32px;
  border: 0; border-radius: var(--wk-r-m);
  background: var(--wk-ash); color: var(--wk-text);
  font: inherit; font-size: 13px; outline: 0;
  transition: background .15s, box-shadow .15s;
}
.wiki-search input::placeholder { color: var(--wk-faint); }
.wiki-search input:focus { background: var(--wk-ash2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--wk-link) 22%, transparent); }
.wiki-search svg { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--wk-faint); pointer-events: none; }
.wiki-search button { display: none; }

/* ---------- 标题区 ---------- */
.wiki-head { padding: 0; border: 0; margin: 0 0 30px; }
.wiki-head h1 {
  margin: 0;
  font-family: var(--wk-serif);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 600; line-height: 1.24; letter-spacing: -.01em;
  color: var(--wk-text);
}
.wiki-head .wiki-subtitle { margin-top: 10px; font-size: 13.5px; color: var(--wk-dim); }
.wiki-head .wiki-subtitle::before { content: none; }
.wiki-head .wiki-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
  margin-top: 14px; font-family: var(--wk-sans); font-size: 12px; color: var(--wk-faint);
}
.wiki-head .wiki-meta .dot { opacity: .5; }
/* 「百科」徽章：直接套站内 tag 胶囊（blog.css 的 .tag-memo：琥珀字 + 淡琥珀底 + 细边） */
.wiki-head .wiki-meta .wiki-badge {
  padding: 2px 8px; border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, .5);
  background: rgba(254, 243, 199, .5);
  color: #b45309;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px; font-weight: 600; line-height: 1.4;
  text-decoration: none; white-space: nowrap;
  transition: background .16s, border-color .16s;
}
.wiki-head .wiki-meta .wiki-badge:hover {
  background: rgba(254, 243, 199, .95);
  border-color: rgba(251, 191, 36, .85);
}
.dark .wiki-head .wiki-meta .wiki-badge {
  color: #f59e0b;
  background: rgba(120, 53, 15, .2);
  border-color: rgba(146, 64, 14, .3);
}
.dark .wiki-head .wiki-meta .wiki-badge:hover {
  background: rgba(120, 53, 15, .45);
  border-color: rgba(146, 64, 14, .6);
}

/* 标题区顶部：返回链接 + 作者行（2026-11-12 跟普通文章页对齐） */
.wk-back {
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 16px;
  font-size: 12.5px; color: var(--wk-faint); text-decoration: none;
  transition: color .14s;
}
.wk-back:hover { color: var(--wk-link); }
.wk-byline {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--wk-line-soft);
}
.wk-ava {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  background: var(--wk-ash); flex: 0 0 auto;
}
.wk-by { min-width: 0; flex: 1 1 auto; }
.wk-author {
  display: inline-block; font-size: 13.5px; font-weight: 600;
  color: var(--wk-text); text-decoration: none;
}
.wk-author:hover { color: var(--wk-link); }
.wk-byline .wiki-meta { margin-top: 4px; }
.wk-head-tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.wk-tool {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px;
  border: 0; border-radius: var(--wk-r-s);
  background: var(--wk-ash); color: var(--wk-dim);
  font: inherit; font-size: 12.5px; text-decoration: none; cursor: pointer;
  transition: color .14s, background .14s;
}
.wk-tool:hover { color: var(--wk-text); background: var(--wk-ash2); }

/* ---------- 题图（hero）：一张干净的照片（2026-11-12 二次调整） ----------
   条目在 /assets/img/wiki/<slug>.json 里声明 hero 才启用，两种形态：
     band —— 只在正文列顶部（左目录位置不变）
     full —— 通栏，目录整体下移
   ★ 不在图上压字了：白字要读得清，就必须盖一层暗色渐变，那层膜怎么调都是一块脏玻璃。
   现在题图就是照片本身，标题 / 作者 / 徽章都回到纸面（.wiki-head）。 */
.wk-hero {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--wk-r-l); background: var(--wk-ash);
}
.wk-hero-media {
  position: absolute; inset: 0; z-index: 0; display: block;
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--hero-focus, 50% 50%);
}
.wk-hero-band { min-height: clamp(180px, 25vh, 270px); margin: 0 0 26px; }
.wk-hero-full { min-height: clamp(260px, 38vh, 380px); margin: 0 0 30px; }
.wk-hero-credit {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; color: rgba(255, 255, 255, .82);
  background: rgba(0, 0, 0, .34);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

/* ---------- 快速信息（折叠面板） ----------
   ★ 2026-11-12 六调：<details> 换成 button + div。
   <details> 的内容槽在 Chrome 里带 content-visibility: hidden，导致整块内容
   在收起时仍占布局、展开时过渡又不跑；换成普通元素后 max-height 过渡是稳的。
   展开 = 这张卡自己长高，正文整体往下走；卡内不限高、不套第二层滚动条。 */
.wk-facts {
  margin: 0 0 34px;
  background: var(--wk-paper);
  border: 1px solid var(--wk-line);
  border-radius: 12px;
  overflow: hidden;
}
.wk-facts-sum {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 0; padding: 14px 20px;
  background: none; border: 0; border-radius: 0;
  font: inherit; color: var(--wk-text); text-align: left;
  cursor: pointer;
  transition: background .14s;
}
.wk-facts-sum:hover { background: var(--wk-ash2); }
/* 展开后摘要条与内容之间留一条细线，别让「快速信息」和字段粘在一起 */
.wk-facts.is-open .wk-facts-sum { border-bottom: 1px solid var(--wk-line-soft); }
/* 暗色下页面底就是 #121212，纯白的卡会「消失」，用比底略亮一档的卡片色 */
.dark .wk-facts { background: var(--wk-ash); }
.wk-facts-t { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; flex: 0 0 auto; }
.wk-facts-p {
  flex: 1 1 auto; min-width: 0;
  font-size: 12.5px; color: var(--wk-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wk-facts-chev { flex: 0 0 auto; width: 16px; height: 16px; color: var(--wk-faint); transition: transform .28s cubic-bezier(.22, 1, .36, 1); }
.wk-facts.is-open .wk-facts-chev { transform: rotate(180deg); }
.wk-facts-sum:hover .wk-facts-p { color: var(--wk-text); }
/* 收起时 max-height: 0，展开时由 JS 写具体像素值（内容再多也能动） */
.wk-facts-body {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .34s cubic-bezier(.22, 1, .36, 1), opacity .22s ease;
}
.wk-facts.is-open .wk-facts-body { opacity: 1; }
.wk-facts .wiki-rail-card { padding: 0 20px 6px; }
@media (prefers-reduced-motion: reduce) {
  .wk-facts-body, .wk-facts-chev { transition: none; }
}

/* 信息栏 = 规格表：124px 标签列 + 极细行分割线，无外框、无竖线、无斑马纹 */
.wiki-infobox {
  width: 100%; border: 0; border-collapse: collapse; table-layout: fixed;
  font-size: 13.5px; line-height: 1.65; color: var(--wk-text);
  background: transparent;
}
.wiki-infobox th, .wiki-infobox td {
  border: 0; border-bottom: 1px solid var(--wk-line-soft);
  padding: 12px 0; text-align: left; vertical-align: top;
  overflow-wrap: anywhere;
}
.wiki-infobox tr:last-child th, .wiki-infobox tr:last-child td { border-bottom: 0; }
.wiki-infobox th { width: 124px; padding-right: 18px; font-weight: 400; font-size: 12px; color: var(--wk-faint); }
.wiki-infobox td { padding-left: 0; color: var(--wk-text); }
.wiki-infobox a { color: var(--wk-link); text-decoration: none; }
.wiki-infobox a:hover { text-decoration: underline; }
.wiki-infobox tbody tr:hover th { color: var(--wk-text); }
/* 有图片行时退回自动布局：图片行 / 图注行都是 colspan 单元格，
   固定布局会把两列平分，标签列被撑成一大坨 */
.wiki-infobox:has(tr.wiki-infobox-title.has-photo) { table-layout: auto; }
/* 人名注音：不给 ruby 留行高，注音会压到上一行文字上 */
.wiki-infobox rt { font-size: 9.5px; color: var(--wk-faint); line-height: 1.1; }
.wiki-infobox ruby { ruby-align: center; }
.wiki-infobox td:has(rt) { line-height: 2.3; padding-top: 16px; }

/* 标题行 = 条目主图，弱化遮罩、名字压在左下 */
/* 标题行：没图就整行不要（H1 已经有名字），有图就当方形主图放在面板左上 */
.wiki-infobox tr.wiki-infobox-title:not(.has-photo) { display: none; }
.wiki-infobox tr.wiki-infobox-title.has-photo th {
  display: block; width: 208px; height: 208px;
  padding: 0; margin: 2px 0 14px;
  border: 0; border-radius: var(--wk-r-m); overflow: hidden;
  background-size: cover; background-position: center 22%; background-repeat: no-repeat;
}
.wiki-infobox tr.wiki-infobox-title.has-photo th::after { content: none;
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .62) 100%);
}
/* 名字压在照片上的那层不要了：H1 已经写过，面板里重复 */
.wiki-infobox .wiki-title-name { display: none; }
.wiki-infobox-imagecell { padding: 0 0 12px !important; }
.wiki-infobox-image img { display: block; width: 100%; height: auto; border-radius: var(--wk-r-s); }
.wiki-infobox-group th {
  width: auto; background: transparent; color: var(--wk-faint);
  text-align: left; font-weight: 700; font-size: 11px; letter-spacing: .1em;
  padding: 20px 0 4px; border-bottom: 0;
}
/* 图片行 / 图注行都在表格里做成 block：否则它们的 colspan 单元格会让
   table-layout: fixed 按「两列平分」算列宽，标签列就被撑成一大坨。 */
.wiki-infobox-captioncell { display: block; background: transparent; padding: 8px 0 0 !important; }
.wiki-infobox-caption { margin: 0; font-size: 11.5px; color: var(--wk-faint); line-height: 1.6; }
.wiki-infobox-noimg { display: none; }

/* ---------- 左栏：目录 + 页面工具 ---------- */
.wk-rail {
  grid-column: 1; grid-row: 1;
  position: sticky; top: 88px;
  display: flex; flex-direction: column; gap: 26px;
  max-height: calc(100vh - 120px);
  overflow-y: auto; overflow-x: hidden;
  padding-right: 6px; min-width: 0;
}
/* 滚动条：跟站内 .custom-scroll / .custom-scrollbar 同一套口径（4px、透明轨道、#cbd5e1，暗色 #444）。
   ★ 2026-11-12：这里原本写的是 scrollbar-width: thin —— Chrome 121+ 认了这条标准属性之后
   就整段忽略 ::-webkit-scrollbar，暗色下露出系统那根带箭头、白轨道的滚动条，很难看。
   所以标准属性只在「不支持 webkit 伪元素」的浏览器（Firefox）里开，Chrome/Safari 走伪元素。 */
.wk-rail::-webkit-scrollbar,
.wiki-toc-body::-webkit-scrollbar { width: 4px; height: 4px; }
.wk-rail::-webkit-scrollbar-track,
.wiki-toc-body::-webkit-scrollbar-track { background: transparent; }
.wk-rail::-webkit-scrollbar-thumb,
.wiki-toc-body::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: var(--wk-r-m); }
.wk-rail::-webkit-scrollbar-thumb:hover,
.wiki-toc-body::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }
.dark .wk-rail::-webkit-scrollbar-thumb,
.dark .wiki-toc-body::-webkit-scrollbar-thumb { background-color: #444; }
.dark .wk-rail::-webkit-scrollbar-thumb:hover,
.dark .wiki-toc-body::-webkit-scrollbar-thumb:hover { background-color: #5c5c5c; }
@supports not selector(::-webkit-scrollbar) {
  .wk-rail, .wiki-toc-body { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
  .dark .wk-rail, .dark .wiki-toc-body { scrollbar-color: #444 transparent; }
}

.wk-toc { padding: 0; background: none; border: 0; box-shadow: none; }
.wiki-toc-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 0 10px; border-bottom: 1px solid var(--wk-line-soft);
}
.wiki-toc-head span { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--wk-faint); text-transform: uppercase; }
/* 收起按钮换成箭头：文字由 wiki-article.js 写「[收起]」，这里不显示 */
.wiki-toc-toggle { display: none; }
.wiki-toc-head { cursor: pointer; user-select: none; }
.wiki-toc-head::after {
  content: ""; flex: 0 0 auto; margin-right: 3px;
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--wk-faint); border-bottom: 1.5px solid var(--wk-faint);
  transform: rotate(-135deg); transition: transform .2s, border-color .15s;
}
.wiki-toc-head:hover::after { border-color: var(--wk-link); }
.wiki-toc.is-collapsed .wiki-toc-head::after { transform: rotate(45deg); }
.wiki-toc-body { max-height: none; overflow: visible; margin-top: 8px; }
.wiki-toc ol { list-style: none; margin: 0; padding: 0; columns: 1; position: relative; }
.wiki-toc li { margin: 0; line-height: 1.45; }
.wiki-toc li a {
  display: block; padding: 4px 0 4px 12px;
  border-left: 2px solid transparent;
  font-size: 13.5px; color: var(--wk-dim); text-decoration: none;
  transition: color .14s, border-color .14s;
}
.wiki-toc li a:hover { color: var(--wk-text); }
.wiki-toc li a.on { color: var(--wk-text); font-weight: 600; }
.wiki-toc li a::before { content: none !important; }
/* 当前小节指示条：一根会滑动的竖线，而不是每个链接自己刷边框（切换时是硬切，很生硬） */
.wiki-toc-ind {
  position: absolute; left: 0; top: 0; width: 2px; height: 0;
  background: var(--wk-link); border-radius: 2px; opacity: 0;
  pointer-events: none;
  transition: top .26s cubic-bezier(.22,1,.36,1),
              height .26s cubic-bezier(.22,1,.36,1),
              opacity .18s linear;
}
.wiki-toc li.wiki-toc-lv1 a { padding-left: 24px; font-size: 13px; color: var(--wk-faint); }
.wiki-toc li.wiki-toc-lv2 { display: none; }
.wiki-toc.is-collapsed .wiki-toc-body { display: none; }

/* 页面工具 / 主题色：卡片降级成一行行小灰字 */
.wk-rail .wiki-rail-card { background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.wk-rail .wiki-rail-title {
  padding: 0 0 8px; background: none; border-bottom: 1px solid var(--wk-line-soft);
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--wk-faint); text-transform: uppercase;
}
.wk-rail .wiki-tools { padding: 8px 0 0; gap: 1px; }
.wk-rail .wiki-tools a, .wk-rail .wiki-tools button {
  padding: 6px 0 6px 12px; border-radius: 0; border-left: 2px solid transparent;
  font-size: 13px; color: var(--wk-dim);
}
.wk-rail .wiki-tools a:hover, .wk-rail .wiki-tools button:hover {
  background: none; color: var(--wk-text); border-left-color: var(--wk-line);
}
.wk-rail .wiki-tools svg { display: none; }
.wk-rail .wiki-tool-note { padding: 8px 0 0 12px; border: 0; font-size: 11.5px; color: var(--wk-faint); line-height: 1.6; }
.wk-rail .wiki-theme-wrap { padding: 10px 0 0; }
.wk-rail .wiki-theme-lab { display: none; }
.wk-rail .wiki-theme-grp { padding-top: 6px; }
.wk-rail .wiki-theme-dots { gap: 7px; }
.wk-rail .wiki-theme-dot { width: 16px; height: 16px; }

/* ---------- 正文 ---------- */
.wiki-body {
  background: none; border: 0; border-radius: 0; box-shadow: none;
  padding: 0; overflow: visible;
  font-size: 16px; line-height: 1.78; color: var(--wk-text);
  font-family: var(--wk-sans);
  overflow-wrap: break-word;
}
.wiki-body > p { font-size: 16px; margin: 0 0 1.15em; }
.wiki-body p { margin: 0 0 1.15em; }
.wiki-body p:empty { display: none; }
.wiki-body a {
  color: var(--wk-link); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--wk-link) 32%, transparent);
  transition: border-color .14s;
}
.wiki-body a:hover { border-bottom-color: var(--wk-link); }
.wiki-body a:visited { color: var(--wk-link); }
.wiki-body strong { color: var(--wk-text); font-weight: 700; }
.wiki-body em { font-style: italic; }
.wiki-body h2, .wiki-body h3, .wiki-body h4, .wiki-body h5 {
  font-family: var(--wk-serif);
  color: var(--wk-text);
  scroll-margin-top: 96px;
  position: relative;
}
.wiki-body h2 {
  margin: 2.1em 0 .7em; padding: 0; border: 0;
  font-size: 27px; font-weight: 600; line-height: 1.35; letter-spacing: -.005em;
}
.wiki-body h3 { margin: 1.9em 0 .55em; font-size: 21px; font-weight: 600; line-height: 1.4; }
.wiki-body h4 { margin: 1.6em 0 .5em; font-size: 17.5px; font-weight: 600; font-family: var(--wk-sans); }
.wiki-body h5 { margin: 1.4em 0 .4em; font-size: 15.5px; font-weight: 700; color: var(--wk-dim); font-family: var(--wk-sans); }
/* 章节后的 [编辑]：去掉方括号，做成右侧悬浮的浅灰小字 */
.wiki-body h2 .wiki-ed, .wiki-body h3 .wiki-ed, .wiki-body h4 .wiki-ed {
  position: absolute; top: .55em; right: 0;
  font-family: var(--wk-sans); font-size: 11.5px; font-weight: 400;
  opacity: 0; transition: opacity .15s;
}
.wiki-body h2:hover .wiki-ed, .wiki-body h3:hover .wiki-ed, .wiki-body h4:hover .wiki-ed { opacity: 1; }
.wiki-body h2 .wiki-ed a, .wiki-body h3 .wiki-ed a, .wiki-body h4 .wiki-ed a {
  color: var(--wk-faint); border: 0; text-decoration: none; white-space: nowrap;
}
.wiki-body h2 .wiki-ed a:hover, .wiki-body h3 .wiki-ed a:hover, .wiki-body h4 .wiki-ed a:hover { color: var(--wk-link); }
.wiki-body h2 .wiki-ed a::before, .wiki-body h3 .wiki-ed a::before, .wiki-body h4 .wiki-ed a::before,
.wiki-body h2 .wiki-ed a::after, .wiki-body h3 .wiki-ed a::after, .wiki-body h4 .wiki-ed a::after { content: none; }

.wiki-body ul, .wiki-body ol { margin: 0 0 1.15em; padding-left: 1.35em; }
.wiki-body ul { list-style: disc; }
.wiki-body ol { list-style: decimal; }
.wiki-body li { margin: .3em 0; }
.wiki-body li > ul, .wiki-body li > ol { margin: .25em 0; }
.wiki-body blockquote {
  margin: 1.7em 0; padding: 2px 0 2px 20px;
  border-left: 2px solid var(--wk-line);
  background: none; border-radius: 0;
  font-family: var(--wk-serif); font-size: 17px; line-height: 1.75;
  color: var(--wk-dim);
}
.wiki-body blockquote p:last-child { margin-bottom: 0; }
.wiki-body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--wk-line-soft); }
.wiki-body pre, .wiki-pre {
  margin: 1.5em 0; padding: 14px 16px; overflow-x: auto;
  background: var(--wk-ash); border: 0; border-radius: var(--wk-r-m);
  font-size: 12.5px; line-height: 1.75;
}
.wiki-body code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .89em;
  background: var(--wk-ash); padding: .12em .36em; border-radius: var(--wk-r-s);
}
.wiki-body pre code { background: none; padding: 0; }
.wiki-body img { max-width: 100%; height: auto; border-radius: var(--wk-r-s); }
.wiki-body figure { margin: 1.8em 0; }
.wiki-body figure figcaption,
.wiki-body figcaption { margin-top: 8px; font-size: 12.8px; line-height: 1.55; color: var(--wk-faint); text-align: left; }
.wiki-body sup, .wiki-body .wiki-ref { font-size: .72em; line-height: 1; color: var(--wk-link); }

/* 表格：真正能横滑的容器（宽度不再由 100% 锁死），去竖线、只留细横线 */
.wiki-table-wrap {
  position: relative;
  margin: 1.6em 0; padding: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background-image:
    linear-gradient(90deg, var(--wk-bg) 40%, transparent),
    linear-gradient(270deg, var(--wk-bg) 40%, transparent),
    linear-gradient(90deg, rgba(0, 0, 0, .07), transparent),
    linear-gradient(270deg, rgba(0, 0, 0, .07), transparent);
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 28px 100%, 28px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll;
}
.dark .wiki-table-wrap {
  background-image:
    linear-gradient(90deg, var(--wk-bg) 40%, transparent),
    linear-gradient(270deg, var(--wk-bg) 40%, transparent),
    linear-gradient(90deg, rgba(255, 255, 255, .07), transparent),
    linear-gradient(270deg, rgba(255, 255, 255, .07), transparent);
}
.wiki-body .wiki-table-wrap > table.wikitable {
  width: max-content; min-width: 100%; margin: 0;
  border: 0; border-collapse: collapse; border-spacing: 0;
  font-size: 14px; line-height: 1.7; background: none;
}
.wiki-body > table.wikitable {
  width: max-content; min-width: 100%; margin: 1.6em 0;
  border: 0; border-collapse: collapse;
  font-size: 14px; line-height: 1.7;
}
.wiki-body table.wikitable th,
.wiki-body table.wikitable td {
  border: 0; border-bottom: 1px solid var(--wk-line-soft);
  padding: 9px 14px 9px 0;
  text-align: left; vertical-align: top;
  /* 不 nowrap，但给每列一个保底宽度：否则窄屏会把「1989年2月15日」拆成一字一行，
     表格宁可横向滚，也不要把日期和名字压碎。 */
  white-space: normal;
}
.wiki-body table.wikitable td { max-width: 22em; }
.wiki-body table.wikitable th { max-width: 12em; }
.wiki-body table.wikitable th:first-child,
.wiki-body table.wikitable td:first-child { padding-left: 0; }
.wiki-body table.wikitable th:last-child,
.wiki-body table.wikitable td:last-child { padding-right: 0; }
.wiki-body table.wikitable tr:last-child th,
.wiki-body table.wikitable tr:last-child td { border-bottom: 0; }
.wiki-body table.wikitable th {
  background: none; color: var(--wk-dim);
  font-weight: 600; font-size: 12.5px; letter-spacing: .02em;
  border-bottom: 1px solid var(--wk-line);
}
.wiki-body table.wikitable tbody tr:nth-child(even) td { background: none; }
.wiki-body table.wikitable tbody tr:hover td { background: color-mix(in srgb, var(--wk-text) 3%, transparent); }
.wiki-body table.wikitable td:first-child { white-space: normal; }
.wiki-body table.wikitable caption { caption-side: top; padding: 0 0 8px; font-size: 12.5px; color: var(--wk-faint); text-align: left; }

/* 正文里的裸 table（Notion / 手写 HTML 混进来的）同样处理 */
.wiki-body > table:not(.wikitable):not(.wiki-infobox) {
  display: block; width: 100%; overflow-x: auto;
  margin: 1.6em 0; border: 0; border-collapse: collapse;
  font-size: 14px;
}
.wiki-body > table:not(.wikitable):not(.wiki-infobox) th,
.wiki-body > table:not(.wikitable):not(.wiki-infobox) td {
  border: 0; border-bottom: 1px solid var(--wk-line-soft);
  padding: 9px 14px 9px 0; text-align: left; white-space: normal;
}
.wiki-body > table:not(.wikitable):not(.wiki-infobox) th { background: none; color: var(--wk-dim); font-weight: 600; font-size: 12.5px; }

/* 导航框 */
.wiki-navbox { margin: 2.2em 0 1.2em; border: 0; border-top: 1px solid var(--wk-line); border-bottom: 1px solid var(--wk-line); background: none; font-size: 13px; }
.wiki-navbox-title { padding: 10px 0; background: none; color: var(--wk-text); font-weight: 700; text-align: left; letter-spacing: 0; }
.wiki-navbox table { width: 100%; border-collapse: collapse; }
.wiki-navbox th, .wiki-navbox td { border-top: 1px solid var(--wk-line-soft); padding: 8px 10px 8px 0; vertical-align: top; text-align: left; }
.wiki-navbox-group { width: 84px; background: none; color: var(--wk-dim); font-weight: 600; }

/* 文章主图 / 图库 */
.wiki-body > .wiki-cover-fig { margin: 0 0 26px; }
.wiki-body > .wiki-cover-fig img { display: block; width: 100%; height: auto; border-radius: var(--wk-r-m); }
.wiki-body > .wiki-cover-fig figcaption { padding: 8px 0 0; font-size: 12.8px; color: var(--wk-faint); line-height: 1.55; text-align: left; }
.wiki-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 1.2em 0 0; }
.wiki-gallery figure { margin: 0; min-width: 0; }
.wiki-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--wk-r-s); background: var(--wk-ash); }
.wiki-gallery figcaption { padding: 7px 0 0; font-size: 12.5px; color: var(--wk-faint); }
.wiki-stack-note { margin: 8px 0 0; font-size: 12px; color: var(--wk-faint); line-height: 1.65; }
.wiki-media { margin: 1.2em 0; }
.wiki-media img, .wiki-media video { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--wk-r-s); }
.wiki-media audio { display: block; width: 100%; }
.wiki-file { display: block; max-width: 100%; margin: .6em auto; }

/* ---------- 页脚：分类 / 许可 ---------- */
.wiki-cats {
  margin-top: 44px; padding: 16px 0 0;
  border: 0; border-top: 1px solid var(--wk-line);
  border-radius: 0; background: none;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px;
  font-size: 13px;
}
.wiki-cats b { color: var(--wk-dim); font-weight: 500; }
.wiki-cat {
  display: inline; height: auto; padding: 0;
  border: 0; border-radius: 0; background: none;
  color: var(--wk-link); font-size: 13px; text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--wk-link) 30%, transparent);
}
.wiki-cat:hover { border-bottom-color: var(--wk-link); background: none; }
.wiki-license {
  margin-top: 18px; padding: 0;
  border: 0; color: var(--wk-faint); font-size: 12px; line-height: 1.75;
}
.wiki-license p { margin: 6px 0 0; }
.wiki-license a { color: var(--wk-dim); text-decoration: none; border-bottom: 1px solid var(--wk-line); }
.wiki-license a:hover { color: var(--wk-link); }
.wiki-lastmod { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-family: var(--wk-sans); font-size: 12px; color: var(--wk-faint); }
.wiki-lastmod .dot { opacity: .5; }
.wiki-disclaimer {
  margin: 12px 0 0; padding: 12px 14px;
  border: 0; border-radius: var(--wk-r-m);
  background: var(--wk-ash); color: var(--wk-dim);
  font-size: 11.5px; line-height: 1.7;
}
.wiki-disclaimer b { color: var(--wk-text); }
.wiki-after { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--wk-line); }
.wiki-after .post-tools { justify-content: flex-start; }

/* ---------- 响应式 ---------- */
@media (max-width: 1099px) {
  .wiki-grid { display: block; }
  .wk-rail { position: static; max-height: none; overflow: visible; width: 100%; max-width: var(--wk-measure); margin: 0 auto 22px; padding: 0; }
  .wk-rail .wiki-toc { border-top: 0; border-bottom: 1px solid var(--wk-line-soft); padding: 2px 0 10px; }
  .wk-rail .wiki-toc-head { padding-bottom: 8px; }
  .wiki-toc-body { max-height: 46vh; overflow-y: auto; }
  .wiki-toc li a { padding-top: 6px; padding-bottom: 6px; }
}
@media (max-width: 900px) {
  .wiki-shell { padding: 106px 18px 64px; }
  .wiki-grid { display: flex; flex-direction: column; gap: 22px; align-items: stretch; }
  .wiki-main { order: 2; max-width: none; width: 100%; }
  .wk-rail {
    order: 1; position: static; max-height: none; overflow: visible;
    width: 100%; display: block; padding: 0;
  }
  .wk-rail .wiki-toc { border-top: 0; border-bottom: 1px solid var(--wk-line-soft); padding: 2px 0 10px; }
  .wk-rail .wiki-toc-head { border-bottom: 0; padding: 0; }
  .wiki-toc.is-collapsed + * { }
  .wk-rail .wiki-toc .wiki-toc-body { max-height: 46vh; overflow-y: auto; }
  .wiki-toc li a { padding-top: 6px; padding-bottom: 6px; }
  /* 手机上前两条工具（编辑历史等）保留，主题色收起来省空间 */
  .wk-rail .wiki-rail-card + .wiki-rail-card { display: none; }
  .wiki-topbar { margin-bottom: 26px; }
  .wiki-head { margin-bottom: 22px; }
  .wiki-head h1 { font-size: 30px; }
  .wiki-body { font-size: 16px; line-height: 1.8; }
  .wiki-body h2 { font-size: 22px; margin-top: 1.9em; }
  .wiki-body h3 { font-size: 18.5px; }
  .wiki-body h2 .wiki-ed, .wiki-body h3 .wiki-ed, .wiki-body h4 .wiki-ed { position: static; display: inline-block; margin-left: 8px; opacity: 1; }
  .wk-facts { margin-bottom: 26px; }
  /* 窄屏：题图收短，full 形态也回到内容左边对齐 */
  .wk-hero { border-radius: var(--wk-r-m); }
  .wk-hero-band { min-height: clamp(160px, 24vh, 230px); margin-bottom: 22px; }
  .wk-hero-full { min-height: clamp(200px, 30vh, 290px); margin-bottom: 24px; }
  .wk-hero-credit { display: none; }
  .wk-facts-sum { padding: 12px 14px; }
  .wk-facts .wiki-rail-card { padding: 0 14px 4px; }
  .wiki-infobox { font-size: 13px; }
  .wiki-infobox th { width: 104px; padding-right: 12px; }
  .wiki-infobox th, .wiki-infobox td { padding-top: 10px; padding-bottom: 10px; }
}
@media (max-width: 700px) {
  /* 窄屏：单元格收窄，行别太长；表格自己横向滚，页面不滚 */
  .wiki-body table.wikitable td { max-width: 12em; }
  .wiki-body table.wikitable th { max-width: 9em; }
}
@media (max-width: 560px) {
  .wiki-shell { padding: 106px 14px 56px; }
  .wiki-head h1 { font-size: 27px; }
  .wiki-body h2 { font-size: 21px; }
  .wiki-body h3 { font-size: 18px; }
  .wiki-body { font-size: 15.5px; }
  .wiki-body > p { font-size: 15.5px; }
  .wiki-body table.wikitable th, .wiki-body table.wikitable td { padding: 8px 12px 8px 0; }
  .wiki-infobox tr.wiki-infobox-title.has-photo th { width: 168px; height: 168px; }
}

/* 打印 */
@media print {
  .wiki-topbar, .wk-rail, .wiki-after, .wiki-cats { display: none !important; }
  .wiki-shell { padding: 0; max-width: none; }
  .wiki-grid { display: block; }
  .wk-facts-body { max-height: none !important; opacity: 1 !important; }
}

/* ---------- 正文底部的「页面工具 / 主题色」 ---------- */
.wk-footer-tools {
  margin-top: 44px; padding-top: 18px;
  border-top: 1px solid var(--wk-line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px;
}
.wk-footer-tools .wiki-rail-card { background: none; border: 0; box-shadow: none; padding: 0; overflow: visible; }
.wk-footer-tools .wiki-rail-title { display: none; }
.wk-footer-tools .wiki-tools { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0; }
.wk-footer-tools .wiki-tools a,
.wk-footer-tools .wiki-tools button {
  width: auto; padding: 0; border: 0; gap: 6px;
  font-size: 12.5px; color: var(--wk-dim);
}
.wk-footer-tools .wiki-tools a:hover,
.wk-footer-tools .wiki-tools button:hover { background: none; color: var(--wk-link); }
.wk-footer-tools .wiki-tools svg { display: none; }
.wk-footer-tools .wiki-tool-note { display: none; }
.wk-footer-tools .wiki-theme-wrap { padding: 0; display: flex; align-items: center; gap: 12px; }
.wk-footer-tools .wiki-theme-grp { display: flex; align-items: center; gap: 8px; padding: 0; }
.wk-footer-tools .wiki-theme-lab { display: none; }
.wk-footer-tools .wiki-theme-dots { gap: 6px; }
.wk-footer-tools .wiki-theme-dot { width: 14px; height: 14px; }

@media (max-width: 900px) {
  /* 手机：搜索独占一行，操作链接换到第二行，别互相挤 */
  .wiki-topbar { flex-wrap: wrap; gap: 10px 12px; padding-bottom: 10px; }
  .wiki-search { flex: 1 1 100%; max-width: none; }
        .wk-footer-tools { gap: 10px 18px; margin-top: 34px; }
  .wk-footer-tools .wiki-tools { gap: 4px 16px; }
}
/* ---------- 压制 [slug].js 内联的 .article 规则 ----------
   那些规则（.article h2 带下横线、.dark .article blockquote 有蓝底…）是给普通文章页用的，
   优先级 (0,2,1) 比这里的 (0,1,1) 高，必须显式盖掉，否则暗色下引用块会长出蓝色背景。 */
.wiki-page .wiki-body { color: var(--wk-text); background: none; font-size: 16px; line-height: 1.78; }
.wiki-page .wiki-body p { margin: 0 0 1.15em; }
.wiki-page .wiki-body a { color: var(--wk-link); text-decoration: none; }
.wiki-page .wiki-body a:hover { text-decoration: none; }
.wiki-page .wiki-body strong, .wiki-page .wiki-body b { color: var(--wk-text); }
.wiki-page .wiki-body h2,
.wiki-page .wiki-body h3,
.wiki-page .wiki-body h4,
.wiki-page .wiki-body h5 { color: var(--wk-text); border: 0; }
.wiki-page .wiki-body h2 { border-bottom: 0; padding-bottom: 0; }
.wiki-page .wiki-body blockquote {
  background: none; border-left: 2px solid var(--wk-line); border-radius: 0; color: var(--wk-dim);
}
.wiki-page .wiki-body pre { background: var(--wk-ash); border: 0; color: var(--wk-text); }
.wiki-page .wiki-body pre code { background: none; }
.wiki-page .wiki-body code { background: var(--wk-ash); color: var(--wk-text); }
.wiki-page .wiki-body hr { border: 0; border-top: 1px solid var(--wk-line-soft); }
.wiki-page .wiki-body li { margin: .3em 0; }
.wiki-page .wiki-body img { border-radius: var(--wk-r-s); }

/* ================= 百科编辑器（发帖页） ================= */
.wiki-editor {
  margin-top: 10px;
  border: 1px solid var(--wk-line);
  border-radius: var(--wk-r-l);
  background: var(--wk-paper);
  overflow: hidden;
}
.wiki-ed-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 3px;
  padding: 7px 9px;
  background: var(--wk-paper2);
  border-bottom: 1px solid var(--wk-line-soft);
}
.wiki-ed-group {
  padding: 0 7px 0 9px;
  font-size: 9px; font-family: ui-monospace, monospace;
  color: var(--wk-faint); letter-spacing: .08em;
  border-left: 1px solid var(--wk-line-soft);
  margin-left: 2px;
}
.wiki-ed-group:first-child { border-left: 0; padding-left: 2px; }
.wiki-ed-btn {
  height: 27px; min-width: 27px; padding: 0 8px;
  border: 1px solid transparent; border-radius: var(--wk-r-s);
  background: transparent; color: var(--wk-dim);
  font-size: 11.5px; font-family: inherit; font-weight: 600;
  cursor: pointer; line-height: 1;
  transition: color .14s, background .14s, border-color .14s;
}
.wiki-ed-btn:hover { color: var(--wk-link); background: color-mix(in srgb, var(--wk-link) 8%, transparent); border-color: color-mix(in srgb, var(--wk-link) 14%, transparent); }
.wiki-ed-btn:active { transform: scale(.96); }
.wiki-ed-strong { font-weight: 900; font-family: ui-monospace, monospace; }
/* ★ 2026-11-11 修：以前只写 max-height，网格行还是 auto —— 预览一长，行高就被撑到内容高度，
   源码框跟着变高、内部不再滚动，整块被 .wiki-editor 的 overflow:hidden 裁掉：看起来就是「滚不动」。
   现在给死高度 + minmax(0,1fr)，左右两栏各自在格子里滚。 */
.wiki-ed-split {
  display: grid; grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  height: clamp(380px, 62vh, 760px);
}
.wiki-ed-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wiki-ed-pane + .wiki-ed-pane { border-left: 1px solid var(--wk-line-soft); }
.wiki-ed-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 11px; border-bottom: 1px solid var(--wk-line-soft);
  font-size: 10.5px; font-weight: 700; color: var(--wk-dim);
  background: color-mix(in srgb, var(--wk-paper2) 70%, transparent);
  letter-spacing: .04em;
}
.wiki-ed-kicker { font-family: ui-monospace, monospace; font-size: 9px; color: var(--wk-faint); letter-spacing: .12em; }
#wiki-source {
  flex: 1; width: 100%; box-sizing: border-box;
  min-height: 0; resize: none;
  padding: 13px 15px; border: 0; outline: 0;
  background: var(--wk-paper); color: var(--wk-text);
  font-family: ui-monospace, Menlo, Consolas, 'Microsoft YaHei', monospace;
  font-size: 12.5px; line-height: 1.85;
  tab-size: 2;
}
#wiki-source::placeholder { color: var(--wk-faint); }
.wiki-ed-previewpane { background: var(--wk-bg); }
.wiki-preview { flex: 1; overflow: auto; padding: 14px; }
.wiki-preview .wiki-body { border: 0; box-shadow: none; padding: 0; background: transparent; font-size: 13.5px; line-height: 1.85; }
.wiki-preview .wiki-body h2 { font-size: 18px; margin: 1.4em 0 .5em; }
.wiki-preview .wiki-body h3 { font-size: 15.5px; margin: 1.2em 0 .4em; }
.wiki-preview .wiki-body p { margin: .65em 0; }
.wiki-preview-infobox { margin: 0 0 14px; }
.wiki-preview-infobox .wiki-infobox { font-size: 11.5px; }
.wiki-preview-infobox .wiki-infobox-title th { font-size: 14px; padding: 8px; }
.wiki-preview-empty, .wiki-preview-error {
  padding: 26px 10px; text-align: center; color: var(--wk-faint); font-size: 12px;
}
.wiki-preview-error { color: #d73333; }
.wiki-ed-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 11px; border-top: 1px solid var(--wk-line-soft);
  background: var(--wk-paper2);
  font-size: 10.5px; font-family: ui-monospace, monospace; color: var(--wk-faint);
}
.wiki-ed-status #wiki-stat { color: var(--wk-dim); font-weight: 700; }
.wiki-ed-hint { flex: 1; min-width: 160px; }
.wiki-ed-mini {
  height: 23px; padding: 0 9px; border: 1px solid var(--wk-line); border-radius: var(--wk-r-s);
  background: var(--wk-paper); color: var(--wk-dim); font-size: 10.5px; font-family: inherit; cursor: pointer;
}
.wiki-ed-mini:hover { color: var(--wk-link); border-color: var(--wk-link); }
.wiki-help {
  padding: 12px 14px 14px; border-top: 1px solid var(--wk-line-soft);
  background: var(--wk-paper); color: var(--wk-dim); font-size: 11.5px; line-height: 1.8;
}
.wiki-help-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.wiki-help-cols b { display: block; font-size: 10.5px; color: var(--wk-text); margin-bottom: 3px; letter-spacing: .04em; }
.wiki-help-cols code { display: block; font-size: 10.5px; color: var(--wk-link); background: var(--wk-code); padding: 1px 5px; border-radius: var(--wk-r-s); margin: 2px 0; overflow-wrap: anywhere; }
.wiki-help-note { margin: 10px 0 0; color: var(--wk-faint); font-size: 10.5px; }

/* 全屏编辑 */
.wiki-editor.wiki-full {
  position: fixed; inset: 12px; z-index: 240;
  margin: 0; display: flex; flex-direction: column;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}
.wiki-editor.wiki-full .wiki-ed-split { flex: 1; height: auto; max-height: none; min-height: 0; }
.wiki-editor.wiki-full #wiki-source { min-height: 0; }
.wiki-editor.wiki-full .wiki-help { max-height: 38vh; overflow: auto; }

@media (max-width: 760px) {
  /* 窄屏改成上下两栏：高度交还给内容（源码框给 360 起），各自滚动 */
  .wiki-ed-split { grid-template-columns: 1fr; grid-template-rows: minmax(0, auto) minmax(0, auto); height: auto; max-height: none; }
  #wiki-source { min-height: 360px; }
  .wiki-ed-pane + .wiki-ed-pane { border-left: 0; border-top: 1px solid var(--wk-line-soft); }
  .wiki-ed-previewpane { max-height: 420px; }
  .wiki-help-cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- 浮层 / 提示 ---------- */
.wiki-toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 260;
  transform: translate(-50%, 12px);
  padding: 9px 16px; border-radius: 999px;
  background: rgba(20, 22, 26, .92); color: #fff;
  font-size: 12px; letter-spacing: .02em;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .24s cubic-bezier(.22, 1, .36, 1);
  backdrop-filter: blur(8px);
}
.wiki-toast.on { opacity: 1; transform: translate(-50%, 0); }
.wiki-modal-mask {
  position: fixed; inset: 0; z-index: 250;
  display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .45);
  opacity: 0; transition: opacity .18s;
}
.wiki-modal-mask.show { opacity: 1; }
.wiki-modal {
  width: 100%; max-width: 520px; max-height: 82vh; overflow: auto;
  background: var(--wk-paper); color: var(--wk-text);
  border: 1px solid var(--wk-line); border-radius: var(--wk-r-l);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  transform: translateY(10px) scale(.98); transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.wiki-modal-mask.show .wiki-modal { transform: none; }
.wiki-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--wk-line-soft); }
.wiki-modal-head b { font-size: 14px; }
.wiki-modal-x { border: 0; background: transparent; color: var(--wk-faint); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.wiki-modal-x:hover { color: var(--wk-text); }
.wiki-modal-body { padding: 12px 16px 18px; }
.wiki-info-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--wk-line-soft); font-size: 12px; }
.wiki-info-row:last-child { border-bottom: 0; }
.wiki-info-row span:first-child { color: var(--wk-faint); }
.wiki-info-row b { font-weight: 700; word-break: break-word; }
.wiki-info-row code { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--wk-link); word-break: break-all; }

/* ---------- 打印 ---------- */
@media print {
  .wiki-topbar, .wiki-rail, .wiki-tools, .wiki-after, #comments-root, #post-like, #post-dislike, #post-progress, #hist-btn { display: none !important; }
  .wiki-page { background: #fff; }
  .wiki-grid { display: block; }
  .wiki-body { border: 0; box-shadow: none; padding: 0; }
  .wiki-body a { color: #000; text-decoration: underline; }
}

/* ---------- 引用浮层（2026-11-12） ----------
   点正文里 [22] 不再直接跳到页尾：先浮一张卡片显示引文，卡片里再给「跳到脚注」。
   手机上点一次出卡片、再点一次才跳转；键盘可用 Esc 关闭。 */
.wiki-body sup.wiki-ref a {
  border: 0; text-decoration: none;
  padding: 0 1px; border-radius: var(--wk-r-s);
}
.wiki-body sup.wiki-ref a:hover { background: color-mix(in srgb, var(--wk-link) 12%, transparent); }
.wk-cite {
  position: fixed; z-index: 60; width: max-content; max-width: min(340px, calc(100vw - 24px));
  padding: 12px 14px;
  background: var(--wk-paper); color: var(--wk-text);
  border: 1px solid var(--wk-line);
  border-radius: var(--wk-r-m);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
  font-size: 12.5px; line-height: 1.7; font-family: var(--wk-sans);
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .14s, transform .14s;
}
.wk-cite.on { opacity: 1; transform: none; pointer-events: auto; }
.wk-cite-h {
  font-size: 10.5px; letter-spacing: .1em; color: var(--wk-faint);
  margin-bottom: 6px; text-transform: uppercase;
}
.wk-cite-body { color: var(--wk-dim); max-height: 40vh; overflow: auto; overflow-wrap: anywhere; }
.wk-cite-body a { color: var(--wk-link); text-decoration: none; border: 0; }
.wk-cite-body a:hover { text-decoration: underline; }
.wk-cite-body .wiki-ref-back { display: none; }
.wk-cite-f {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--wk-line-soft);
}
.wk-cite-go { font-size: 12px; color: var(--wk-link); text-decoration: none; }
.wk-cite-go:hover { text-decoration: underline; }
.wk-cite-x {
  border: 0; background: none; padding: 0;
  font: inherit; font-size: 12px; color: var(--wk-faint); cursor: pointer;
}
.wk-cite-x:hover { color: var(--wk-text); }
.wk-ref-flash { animation: wkRefFlash 1.5s ease; }
@keyframes wkRefFlash {
  0%, 100% { background: transparent; }
  25% { background: color-mix(in srgb, var(--wk-link) 16%, transparent); }
}
/* 标题区的「编辑历史」按钮由 article-history.js 动态插到「分享」旁边（全站共用），
   它自带的是圆角胶囊 + 等宽字体，跟这里的两颗灰按钮不搭，这里按 .wk-tool 统一。 */
.wk-head-tools #hist-btn {
  height: 30px; padding: 0 12px;
  border: 0; border-radius: var(--wk-r-s);
  background: var(--wk-ash); color: var(--wk-dim);
  font-family: var(--wk-sans); font-size: 12.5px; font-weight: 400;
  cursor: pointer; transition: color .14s, background .14s;
}
.wk-head-tools #hist-btn:hover {
  color: var(--wk-text); background: var(--wk-ash2);
  transform: none; border: 0;
}
.dark .wk-head-tools #hist-btn { color: var(--wk-dim); background: var(--wk-ash); border: 0; }
.dark .wk-head-tools #hist-btn:hover { color: var(--wk-text); background: var(--wk-ash2); }
/* ---------- 原位编辑（2026-11-12） ---------- */
.wk-tool-primary { background: var(--wk-link); color: #fff; }
.wk-tool-primary:hover { background: color-mix(in srgb, var(--wk-link) 86%, #000); color: #fff; }
.wiki-body.wk-editing {
  outline: 2px dashed color-mix(in srgb, var(--wk-link) 42%, transparent);
  outline-offset: 12px;
  border-radius: var(--wk-r-s);
  cursor: text;
}
.wiki-body.wk-editing a { cursor: text; }
.wk-editbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 80;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px 9px 16px;
  background: var(--wk-paper); color: var(--wk-text);
  border: 1px solid var(--wk-line);
  border-radius: var(--wk-r-l);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
  font-family: var(--wk-sans); font-size: 12.5px;
  max-width: calc(100vw - 24px);
}
.wk-editbar-t { font-weight: 700; }
.wk-editbar-h { color: var(--wk-faint); font-size: 11.5px; }
.wk-editbar button {
  height: 30px; padding: 0 14px; border: 0;
  border-radius: var(--wk-r-s);
  font: inherit; font-size: 12.5px; cursor: pointer;
}
.wk-eb-save { background: var(--wk-link); color: #fff; }
.wk-eb-save:disabled { opacity: .6; cursor: default; }
.wk-eb-cancel { background: var(--wk-ash); color: var(--wk-dim); }
.wk-eb-cancel:hover { background: var(--wk-ash2); color: var(--wk-text); }
.wk-toast {
  position: fixed; left: 50%; bottom: 74px; transform: translate(-50%, 8px);
  z-index: 81; padding: 9px 16px;
  background: rgba(20, 22, 26, .94); color: #fff;
  border-radius: 999px; font-size: 12.5px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px);
}
.wk-toast.on { opacity: 1; transform: translate(-50%, 0); }
.wk-toast.bad { background: #b4232c; }
@media (max-width: 560px) {
  .wk-editbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; bottom: 14px; }
  .wk-editbar-h { display: none; }
  .wk-editbar button { flex: 1 1 0; }
}