/* 心舍文轩 · 独立皮肤（派生自 xingchen 骨架；配色、文案、书封色独立） */
/* ============================================================
   心舍文轩 · 独立皮肤（三栏目录）
   左分类树 / 中清单 / 右收录榜，横向行卡。冷灰底 + 藏蓝主色，
   全部直角小圆角，靠栏位分隔而不是靠卡片投影。
   ============================================================ */

:root {
  --navy: #241d3f;
  --navy-2: #22345a;
  --blue: #7c6bd6;
  --blue-soft: #eeecfc;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --line: #e2e7f0;
  --line-2: #eef1f7;
  --ink: #1a2136;
  --ink-2: #46506a;
  --muted: #7b859c;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7;
      stroke-linecap: round; stroke-linejoin: round; vertical-align: -.14em; }

/* ---------------- 刊头 ---------------- */
.xc-head {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.xc-bar {
  max-width: 1320px; margin: 0 auto; padding: 0 24px;
  height: 62px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}

.xc-nav { display: flex; gap: 22px; }
.xc-nav a {
  font-size: 13px; color: var(--ink-2); padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.xc-nav a:hover { color: var(--blue); }
.xc-nav a.is-active { color: var(--navy); font-weight: 600; border-bottom-color: var(--blue); }

.xc-brand { display: grid; justify-items: center; gap: 2px; }
.xc-brand-name {
  font-size: 18px; font-weight: 700; letter-spacing: .16em; color: var(--navy);
  line-height: 1.1;
}
.xc-brand-en {
  font-size: 8.5px; letter-spacing: .42em; color: var(--muted); text-transform: uppercase;
  line-height: 1;
}

.xc-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.xc-search {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px; width: 186px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
}
.xc-search .ic { color: var(--muted); width: 15px; height: 15px; }
.xc-search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 12.5px;
}
.xc-search:focus-within { border-color: var(--blue); background: #fff; }

.xc-ico {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 6px; color: var(--ink-2);
}
.xc-ico:hover { background: var(--blue-soft); color: var(--blue); }
.xc-ico .ic { width: 16px; height: 16px; }
.xc-burger { display: none; }

.xc-mobile { display: none; flex-direction: column; padding: 0 24px 10px; background: var(--panel); }
.xc-mobile.is-open { display: flex; }
.xc-mobile a { padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }

/* ---------------- 导语带 ---------------- */
.xc-intro { background: var(--panel); border-bottom: 1px solid var(--line); }
.xc-intro-in {
  max-width: 1320px; margin: 0 auto; padding: 26px 24px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
}
.xc-intro-copy h1 {
  margin: 0 0 6px; font-size: 25px; font-weight: 700; letter-spacing: .01em; line-height: 1.35;
}
.xc-intro-copy h1 em { font-style: normal; color: var(--blue); }
.xc-intro-copy p { margin: 0; font-size: 13px; color: var(--muted); max-width: 62ch; }

.xc-intro-num { display: flex; gap: 26px; flex-shrink: 0; }
.xc-intro-num div { text-align: right; }
.xc-intro-num b {
  display: block; font-size: 21px; font-weight: 700; color: var(--navy);
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.xc-intro-num span { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); }

/* ---------------- 三栏主体 ---------------- */
.xc-main {
  max-width: 1320px; margin: 0 auto; padding: 26px 24px 60px;
  display: grid; grid-template-columns: 204px minmax(0, 1fr) 250px;
  gap: 30px; align-items: start;
}

.xc-rail { position: sticky; top: 84px; }
.xc-rail-h {
  margin: 0 0 10px; padding-bottom: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .18em; color: var(--muted);
  border-bottom: 1px solid var(--line); text-transform: uppercase;
}

.xc-catlist { display: flex; flex-direction: column; }
.xc-catlist a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 9px; border-radius: 5px;
  font-size: 13px; color: var(--ink-2);
}
.xc-catlist a:hover { background: var(--panel); color: var(--blue); }
.xc-catlist .n { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.xc-rail-note {
  margin-top: 18px; padding: 12px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; gap: 9px; align-items: flex-start;
}
.xc-rail-note .ic { color: var(--blue); width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.xc-rail-note p { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--muted); }

/* 中栏 */
.xc-feed-head { display: flex; align-items: baseline; gap: 10px; }
.xc-feed-head h2 {
  margin: 0; font-size: 17px; font-weight: 700; color: var(--navy);
  display: inline-flex; align-items: center; gap: 7px;
}
.xc-feed-head h2 .ic { color: var(--blue); width: 15px; height: 15px; }
.xc-feed-head span { font-size: 11.5px; color: var(--muted); }

.xc-filter {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.cat-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 3px;
  height: 28px; padding: 0 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  font-size: 12px; color: var(--ink-2);
}
.cat-chip .ic { display: none; }
.cat-chip .cnt { font-size: 10.5px; color: var(--muted); }
.cat-chip:hover { border-color: var(--blue); color: var(--blue); }
.cat-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.cat-chip.is-active .cnt { color: rgba(255, 255, 255, .68); }
.cat-chip.is-empty { opacity: .45; }

.sorts { display: flex; gap: 2px; padding: 2px; background: var(--panel);
         border: 1px solid var(--line); border-radius: 5px; }
.sorts button {
  border: 0; background: none; padding: 4px 10px; border-radius: 3px;
  font-size: 11.5px; color: var(--muted);
}
.sorts button.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }

.xc-count { margin: 12px 0; font-size: 11.5px; color: var(--muted); }
.xc-count b { color: var(--navy); }

/* 行卡 */
.xc-rows { display: flex; flex-direction: column; gap: 8px; }

.xc-row {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 13px; align-items: center;
  padding: 11px 13px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 7px;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.xc-row:hover {
  border-color: #c6d4f2; box-shadow: 0 4px 14px -8px rgba(22, 35, 63, .28);
  transform: translateY(-1px);
}

.xc-thumb {
  position: relative; width: 54px; height: 70px; border-radius: 4px; overflow: hidden;
  display: grid; place-items: center;
}
.xc-thumb b {
  font-size: 25px; font-weight: 700; color: #fff; line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .28);
}
.xc-thumb b.is-long { font-size: 15px; letter-spacing: .02em; }
.xc-thumb i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: rgba(255, 255, 255, .42);
}

.xc-body { min-width: 0; }
.xc-title {
  margin: 0 0 4px; font-size: 14px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.xc-title a:hover { color: var(--blue); }
.xc-desc {
  margin: 0 0 6px; font-size: 11.5px; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.xc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.xc-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 3px;
  background: var(--blue-soft); color: var(--blue);
}

.xc-side-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.xc-size { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.xc-date { font-size: 10.5px; color: var(--muted); }
.xc-fav {
  background: none; border: 0; padding: 0; color: #c8d0e0; display: inline-flex;
}
.xc-fav .ic { width: 14px; height: 14px; }
.xc-fav.is-on { color: #e0a800; }
.xc-fav.is-on .ic { fill: #e0a800; }

.xc-empty {
  padding: 60px 0; text-align: center; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px;
}
.xc-empty .ic { width: 24px; height: 24px; display: block; margin: 0 auto 10px; }
.xc-empty h3 { margin: 0 0 5px; font-size: 16px; color: var(--ink); }
.xc-empty p { margin: 0; font-size: 12.5px; }

/* 右栏 */
.xc-rank { display: flex; flex-direction: column; gap: 1px; margin-bottom: 24px; }
.rank-item {
  display: flex; gap: 9px; padding: 8px 9px; border-radius: 5px;
  align-items: baseline;
}
.rank-item:hover { background: var(--panel); }
.rank-no {
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
  width: 14px; flex-shrink: 0;
}
.rank-item:nth-child(-n+3) .rank-no { color: var(--blue); font-weight: 700; }
.rank-body { min-width: 0; display: grid; gap: 1px; }
.rank-title {
  font-size: 12.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-meta { font-size: 10.5px; color: var(--muted); }

#tagCloud { display: flex; flex-wrap: wrap; gap: 6px; }
#tagCloud a {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--ink-2);
  padding: 3px 8px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 3px;
}
#tagCloud a:hover { border-color: var(--blue); color: var(--blue); }
#tagCloud .cnt { font-size: 9.5px; color: var(--muted); }

/* ---------------- 页码 ---------------- */
.pagination { display: flex; gap: 5px; justify-content: center; padding: 26px 0 0; }
.pagination button {
  min-width: 32px; height: 32px; padding: 0 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  font-size: 12px; color: var(--ink-2);
}
.pagination button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pagination button.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination .ellipsis { color: var(--muted); align-self: center; font-size: 12px; }

/* ---------------- 页脚 ---------------- */
.xc-foot { background: #eaeef6; border-top: 1px solid var(--line); padding: 40px 0 0; }
.xc-foot-in {
  max-width: 1320px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) 1.6fr; gap: 50px;
}
.xc-foot-brand .xc-brand-name { text-align: left; font-size: 16px; }
.xc-foot-brand p { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); max-width: 36ch; }
.xc-foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.xc-foot-cols h4 {
  margin: 0 0 9px; font-size: 11px; letter-spacing: .16em; color: var(--muted);
  text-transform: uppercase; font-weight: 600;
}
.xc-foot-cols a { display: block; padding: 3px 0; font-size: 12.5px; color: var(--ink-2); }
.xc-foot-cols a:hover { color: var(--blue); }

.footer-recent { max-width: 1320px; margin: 28px auto 0; padding: 18px 24px 0;
                 border-top: 1px solid #d7deeb; }
.footer-recent-head { display: flex; align-items: baseline; justify-content: space-between; }
.footer-recent-head h4 { margin: 0; font-size: 11px; letter-spacing: .16em;
                         color: var(--muted); text-transform: uppercase; }
.footer-recent-all { font-size: 11.5px; color: var(--blue); }
.footer-recent-list { margin: 10px 0 0; padding: 0; list-style: none; columns: 4; column-gap: 22px; }
.footer-recent-list li { padding: 2px 0; break-inside: avoid; }
.footer-recent-list a { font-size: 11.5px; color: var(--ink-2); display: block;
                        overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-recent-list a:hover { color: var(--blue); }

.xc-foot-bot {
  max-width: 1320px; margin: 24px auto 0; padding: 14px 24px;
  display: flex; justify-content: space-between; gap: 16px;
  background: var(--navy); color: #97a6c4; font-size: 11px;
}

/* ---------------- 浮层 ---------------- */
.to-top {
  position: fixed; right: 20px; bottom: 22px; z-index: 40;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2);
  opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s;
}
.to-top.is-show { opacity: 1; visibility: visible; }
.to-top .ic { width: 16px; height: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 12px);
  z-index: 60; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; background: var(--navy); color: #fff; border-radius: 6px;
  font-size: 12.5px; opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast .ic { width: 14px; height: 14px; }

/* ---------------- 深色 ---------------- */
html[data-theme="dark"] {
  --navy: #dbe4f6;
  --navy-2: #b9c6e2;
  --blue: #a99bf0;
  --blue-soft: #1e2a44;
  --bg: #10141d;
  --panel: #171c28;
  --line: #262d3c;
  --line-2: #1f2532;
  --ink: #e6ebf6;
  --ink-2: #aab5cc;
  --muted: #7d879e;
}
html[data-theme="dark"] .cat-chip.is-active { background: #2b3a5c; border-color: #2b3a5c; color: #fff; }
html[data-theme="dark"] .xc-foot { background: #131823; }
html[data-theme="dark"] .footer-recent { border-top-color: #242b3a; }
html[data-theme="dark"] .xc-foot-bot { background: #0c101a; color: #6d778c; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1160px) {
  .xc-main { grid-template-columns: 180px minmax(0, 1fr); }
  .xc-rail--r { display: none; }
  .xc-search { width: 150px; }
}

@media (max-width: 900px) {
  .xc-main { grid-template-columns: 1fr; padding-top: 18px; }
  .xc-rail--l { display: none; }
  .xc-bar { grid-template-columns: auto 1fr auto; gap: 10px; height: 56px; }
  .xc-nav { display: none; }
  .xc-brand { justify-items: start; grid-column: 1; }
  .xc-brand-en { display: none; }
  .xc-tools { grid-column: 3; }
  .xc-search { display: none; }
  .xc-burger { display: grid; }
  .xc-intro-in { flex-direction: column; align-items: flex-start; gap: 16px; padding: 18px; }
  .xc-intro-copy h1 { font-size: 20px; }
  .xc-intro-num { gap: 20px; }
  .xc-intro-num div { text-align: left; }
  .xc-foot-in { grid-template-columns: 1fr; gap: 26px; }
  .footer-recent-list { columns: 2; }
}

@media (max-width: 620px) {
  .xc-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 9px 10px; }
  .xc-thumb { width: 44px; height: 58px; }
  .xc-thumb b { font-size: 21px; }
  .xc-filter { flex-direction: column; align-items: flex-start; gap: 8px; }
  .xc-foot-cols { grid-template-columns: 1fr 1fr; }
  .xc-foot-bot { flex-direction: column; gap: 5px; }
}


.xd-dbody { min-width: 0; }
/* ---------------- 内页：文档站 ----------------
   左栏常驻（书影 / 参数 / 目录 / 热门），右栏分节正文，每节可锚点直达。 */
.xd-page { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.xd-nocode { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.xd-doc {
  display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 32px;
  align-items: start; padding: 26px 0 64px;
}
.xd-drail { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 14px; }

.xd-panel { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.xd-panel--thumb { padding: 12px; }
.xd-bigcover { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-s); overflow: hidden; }
.xd-bigcover span { font-family: Georgia, "Songti SC", serif; font-size: 46px; color: #fff; }
.xd-bigcover span.is-long { font-size: 26px; }
.xd-bigcover em {
  position: absolute; right: 8px; bottom: 7px;
  padding: 1px 5px; border: 1px solid rgba(255, 255, 255, .34); border-radius: 3px;
  font-style: normal; font-size: 10px; letter-spacing: .1em; color: rgba(255, 255, 255, .78);
}
.xd-rail-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 10px; padding: 9px; border: 0; border-radius: var(--radius-s);
  background: var(--blue); color: #fff; font-size: 13px; cursor: pointer;
}
.xd-rail-btn--ghost { margin-top: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.xd-panel-h { margin: 0 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
.xd-kv { margin: 0; }
.xd-kv > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.xd-kv > div:last-child { border-bottom: 0; }
.xd-kv dt { color: var(--muted); }
.xd-kv dd { margin: 0; font-weight: 500; color: var(--ink); }
.xd-toc { margin: 0; padding-left: 17px; font-size: 12.5px; }
.xd-toc li { padding: 4px 0; }
.xd-toc a { color: var(--ink-2); }
.xd-toc a:hover { color: var(--blue); }
.xd-hot { margin: 0; padding-left: 16px; font-size: 12.5px; }
.xd-hot li { padding: 5px 0; }
.xd-hot li a { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); }
.xd-hot li a > span:last-child { flex: none; font-size: 11px; color: var(--muted); }

.xd-crumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.xd-crumb a { color: var(--muted); }
.xd-crumb a:hover { color: var(--blue); }
.xd-crumb i { font-style: normal; color: var(--line-strong); }
.xd-h1 { margin: 0 0 12px; font-size: 26px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; color: var(--ink); }
.xd-meta { display: flex; flex-wrap: wrap; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.xd-meta span { display: inline-flex; align-items: center; gap: 5px; }
.xd-abs {
  margin: 18px 0 0; padding: 13px 16px;
  border-left: 3px solid var(--blue); border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: var(--blue-soft); font-size: 13.5px; line-height: 1.8; color: var(--ink-2);
}
.xd-sec { margin-top: 30px; scroll-margin-top: 18px; }
.xd-h2 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.xd-h2 a { color: var(--ink); }
.xd-h2 a::before { content: "#"; margin-right: 6px; font-weight: 400; color: var(--line-strong); }
.xd-sec p { margin: 0 0 12px; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.xd-points { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.xd-points li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }
.xd-points li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.xd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.xd-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; }
.xd-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.xd-table .num { width: 92px; text-align: right; }
.xd-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--line-2); overflow: hidden; }
.xd-spec > div { display: flex; gap: 10px; padding: 9px 12px; background: var(--panel); font-size: 13px; }
.xd-spec dt { flex: none; width: 4em; color: var(--muted); }
.xd-spec dd { margin: 0; color: var(--ink); }
.xd-dl { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.xd-dl-code { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.xd-dl-code button {
  padding: 5px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-s);
  background: var(--panel); cursor: pointer;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .12em; color: var(--ink);
}
.xd-dl-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.xd-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel); font-size: 13px; color: var(--ink-2); cursor: pointer; }
.xd-btn:hover { border-color: var(--blue); color: var(--blue); }
.xd-btn--main { border-color: var(--blue); background: var(--blue); color: #fff; }
.xd-btn--main:hover { background: #3560cc; color: #fff; }
.xd-dl-tip { margin: 12px 0 0; font-size: 12px; line-height: 1.75; color: var(--muted); }
.xd-rel { margin: 0; padding: 0; list-style: none; }
.xd-rel li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.xd-rel a { color: var(--ink-2); }
.xd-rel a:hover { color: var(--blue); }
.xd-rel span { flex: none; font-size: 12px; color: var(--muted); }
.xd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.xd-tags a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
  .xd-doc { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .xd-drail { position: static; }
  .xd-spec { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 共用页（详情 / 关于 / 404）变量映射 ---------- */
:root {
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --ink-3: var(--muted);
  --line-strong: #cfd8e8;
  --brand: var(--blue);
  --brand-2: #a99bf0;
  --brand-soft: var(--blue-soft);
  --accent: var(--blue);
  --radius-s: 4px; --radius: 7px; --radius-l: 10px;
  --font: var(--sans);
}
html[data-theme="dark"] {
  --surface: #171c28;
  --surface-2: #1b2130;
  --line-strong: #333c4f;
  --brand: #a99bf0;
  --brand-2: #8fabff;
  --brand-soft: #1e2a44;
  --accent: #a99bf0;
  --radius-s: 4px; --radius: 7px; --radius-l: 10px;
}
