/* ============================================================
   鸿狸书库 · 独立皮肤（暗色门户）
   全站唯一常暗的站点：底色近黑、字体浅、金色描边，
   卡片左侧一道书脊色条，四列密排。不做主题切换，避免身份被冲淡。
   ============================================================ */

:root {
  --bg: #0f0d16;
  --bg-2: #12101a;
  --panel: #191622;
  --panel-2: #211d2c;
  --line: #2b2638;
  --line-2: #221e2f;
  --ink: #ece7f5;
  --ink-2: #b8b1c9;
  --muted: #7e7691;
  --gold: #d4a24c;
  --crimson: #a33a4e;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, 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.62;
  -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; }

/* 这一站不做浅色：主题切换按钮直接不出现 */
#themeBtn { display: none !important; }

/* ---------------- 门头 ---------------- */
.hl-head {
  background: var(--bg-2);
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.hl-bar {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 24px;
}

.hl-brand { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.hl-mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: linear-gradient(150deg, #2c2438, #1b1725);
  box-shadow: inset 0 0 0 1px rgba(212, 162, 76, .45);
  color: var(--gold); font-size: 15px; font-weight: 700; line-height: 1;
}
.hl-mark--sm { width: 24px; height: 24px; font-size: 12px; }
.hl-name { font-size: 16.5px; font-weight: 700; letter-spacing: .12em; color: var(--ink); }

.hl-nav { display: flex; gap: 20px; flex: 1; }
.hl-nav a {
  font-size: 13px; color: var(--ink-2); padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.hl-nav a:hover { color: var(--gold); }
.hl-nav a.is-active { color: var(--gold); border-bottom-color: var(--gold); }

.hl-search {
  display: flex; align-items: center; gap: 7px;
  height: 34px; width: 200px; padding: 0 12px;
  background: #0c0a12; border: 1px solid var(--line); border-radius: 7px;
}
.hl-search .ic { color: var(--muted); width: 14px; height: 14px; }
.hl-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 12.5px; }
.hl-search input::placeholder { color: #5f5871; }
.hl-search:focus-within { border-color: rgba(212, 162, 76, .55); }

.hl-burger {
  display: none; width: 34px; height: 34px; place-items: center;
  background: none; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2);
}
.hl-burger .ic { width: 16px; height: 16px; }

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

/* ---------------- 横幅 ---------------- */
.hl-banner {
  background:
    radial-gradient(700px 300px at 82% -30%, rgba(212, 162, 76, .14), transparent 70%),
    radial-gradient(600px 280px at 8% 120%, rgba(163, 58, 78, .16), transparent 72%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.hl-banner-in {
  max-width: 1240px; margin: 0 auto; padding: 44px 24px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px; align-items: end;
}
.hl-eye {
  display: inline-block; margin-bottom: 12px;
  font-size: 11px; letter-spacing: .26em; color: var(--gold);
}
.hl-banner h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.4vw, 40px); font-weight: 800;
  line-height: 1.28; letter-spacing: -.01em;
}
.hl-banner h1 em { font-style: normal; color: var(--gold); }
.hl-banner p { margin: 0; max-width: 56ch; font-size: 13.5px; color: var(--muted); }

.hl-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.hl-tags .label { display: none; }
.hl-tags a {
  font-size: 11.5px; color: var(--ink-2);
  padding: 3px 10px; border-radius: 5px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.hl-tags a:hover { color: var(--gold); border-color: rgba(212, 162, 76, .5); }

.hl-banner-r { text-align: right; flex-shrink: 0; }
.hl-banner-r b {
  display: block; font-size: 54px; font-weight: 800; line-height: 1;
  color: var(--gold); font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.hl-banner-r span { display: block; margin-top: 6px; font-size: 11.5px; letter-spacing: .18em; color: var(--muted); }
.hl-banner-r em {
  display: block; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-style: normal; font-size: 11px; color: var(--muted);
}
.hl-banner-r em i { color: var(--ink-2); font-style: normal; }

/* ---------------- 主体 ---------------- */
.hl-main { max-width: 1240px; margin: 0 auto; padding: 26px 24px 60px; }

.hl-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.hl-top-l { display: flex; align-items: baseline; gap: 10px; }
.hl-top-l h2 {
  margin: 0; font-size: 18px; font-weight: 700; color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px;
}
.hl-top-l h2 .ic { color: var(--gold); width: 15px; height: 15px; }
.hl-top-l span { font-size: 11.5px; color: var(--muted); }

.sorts { display: flex; gap: 2px; }
.sorts button {
  border: 1px solid transparent; background: none; border-radius: 5px;
  padding: 4px 10px; font-size: 11.5px; color: var(--muted);
}
.sorts button.is-active { color: var(--gold); border-color: rgba(212, 162, 76, .38); background: rgba(212, 162, 76, .07); }

.cat-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 11px; border-radius: 5px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2);
}
.cat-chip .ic { display: none; }
.cat-chip .cnt { font-size: 10px; color: var(--muted); }
.cat-chip:hover { border-color: rgba(212, 162, 76, .45); color: var(--gold); }
.cat-chip.is-active { background: rgba(212, 162, 76, .12); border-color: rgba(212, 162, 76, .6); color: var(--gold); }
.cat-chip.is-active .cnt { color: rgba(212, 162, 76, .75); }
.cat-chip.is-empty { opacity: .4; }

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

/* 四列密排 */
.hl-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}

.hl-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.hl-card:hover {
  border-color: rgba(212, 162, 76, .55);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .9);
}

.hl-cover {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(150deg, #221d2e, #16131f);
}
.hl-cover::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; z-index: 2;
  background: var(--spine, var(--gold));
}
.hl-cover::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 76% 20%, rgba(255, 255, 255, .07), transparent 58%);
}
.hl-glyph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 38px; font-weight: 800; letter-spacing: .06em;
  color: rgba(255, 255, 255, .9); z-index: 1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .7);
}
.hl-glyph.is-long { font-size: 21px; }
.hl-cat {
  position: absolute; right: 9px; top: 9px; z-index: 3;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(10, 8, 16, .72); color: var(--ink-2);
  font-size: 10px; letter-spacing: .04em;
}

.hl-body { padding: 11px 12px 12px; }
.hl-title {
  margin: 0 0 8px; font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.9em;
}
.hl-title a:hover { color: var(--gold); }
.hl-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; color: var(--muted);
  padding-top: 8px; border-top: 1px solid var(--line-2);
}
.hl-meta .hl-dot { color: var(--line); }
.hl-fav { margin-left: auto; background: none; border: 0; padding: 0; color: #3d3650; display: inline-flex; }
.hl-fav .ic { width: 14px; height: 14px; }
.hl-fav.is-on { color: var(--gold); }
.hl-fav.is-on .ic { fill: var(--gold); }

.hl-empty {
  grid-column: 1 / -1; padding: 64px 0; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 9px;
}
.hl-empty .ic { width: 24px; height: 24px; display: block; margin: 0 auto 10px; color: var(--line); }
.hl-empty h3 { margin: 0 0 5px; font-size: 16px; color: var(--ink-2); }
.hl-empty p { margin: 0; font-size: 12.5px; }

/* ---------------- 页码 ---------------- */
.pagination { display: flex; gap: 5px; justify-content: center; padding: 28px 0 0; }
.pagination button {
  min-width: 32px; height: 32px; padding: 0 9px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px;
  font-size: 12px; color: var(--ink-2);
}
.pagination button:hover:not(:disabled) { border-color: rgba(212, 162, 76, .5); color: var(--gold); }
.pagination button.is-active { background: rgba(212, 162, 76, .14); border-color: rgba(212, 162, 76, .65); color: var(--gold); }
.pagination button:disabled { opacity: .35; cursor: default; }
.pagination .ellipsis { color: var(--muted); align-self: center; font-size: 12px; }

/* ---------------- 页脚 ---------------- */
.hl-foot { background: #0b0911; border-top: 1px solid var(--line); padding: 40px 0 0; }
.hl-foot-in {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) 1.5fr; gap: 48px;
}
.hl-foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; align-content: flex-start; }
.hl-foot-brand p {
  flex-basis: 100%; margin: 10px 0 0; font-size: 12px; color: var(--muted); max-width: 34ch;
}
.hl-foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hl-foot-cols h4 {
  margin: 0 0 9px; font-size: 11px; letter-spacing: .16em; color: var(--muted); font-weight: 600;
}
.hl-foot-cols a { display: block; padding: 3px 0; font-size: 12.5px; color: var(--ink-2); }
.hl-foot-cols a:hover { color: var(--gold); }

.footer-recent { max-width: 1240px; margin: 28px auto 0; padding: 18px 24px 0;
                 border-top: 1px solid var(--line); }
.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); font-weight: 600; }
.footer-recent-all { font-size: 11.5px; color: var(--gold); }
.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(--muted); display: block;
                        overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-recent-list a:hover { color: var(--gold); }

.hl-foot-copy {
  max-width: 1240px; margin: 26px auto 0; padding: 14px 24px;
  border-top: 1px solid var(--line-2);
  font-size: 10.5px; color: #554e66; text-align: center;
}

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

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 12px);
  z-index: 60; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; background: var(--panel-2); color: var(--gold);
  border: 1px solid rgba(212, 162, 76, .4); border-radius: 7px;
  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; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .hl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hl-search { width: 160px; }
}

@media (max-width: 820px) {
  .hl-nav { display: none; }
  .hl-burger { display: grid; }
  .hl-search { margin-left: auto; }
  .hl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hl-banner-in { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .hl-banner-r { text-align: left; }
  .hl-banner-r b { font-size: 40px; }
  .hl-foot-in { grid-template-columns: 1fr; gap: 26px; }
  .footer-recent-list { columns: 2; }
}

@media (max-width: 560px) {
  .hl-bar { padding: 0 16px; gap: 12px; height: 54px; }
  .hl-search { display: none; }
  .hl-main { padding: 18px 16px 44px; }
  .hl-banner-in { padding: 30px 16px 28px; }
  .hl-banner h1 { font-size: 25px; }
  .hl-grid { gap: 10px; }
  .hl-body { padding: 9px 10px 10px; }
  .hl-title { font-size: 12.5px; }
  .hl-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hl-foot-cols { grid-template-columns: 1fr 1fr; }
}


/* ---------------- 内页：暗色门户 ----------------
   门头一条（文案 + 书封 + 动作），正文两块并排，右侧常驻参数与热门。 */
.hp-page { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hp-nocode { margin: 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.hp-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px;
  align-items: start; padding: 24px 0 64px;
}
.hp-rail { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 14px; }

.hp-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 186px; gap: 24px; align-items: center;
  padding: 24px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(150deg, var(--panel-2), #15121e 72%);
}
.hp-badge { display: inline-block; padding: 3px 10px; border: 1px solid rgba(212, 162, 76, .42); border-radius: 3px; font-size: 11px; letter-spacing: .1em; color: var(--gold); }
.hp-hero h1 { margin: 12px 0 10px; font-size: clamp(22px, 2.6vw, 31px); font-weight: 700; line-height: 1.32; color: var(--ink); }
.hp-hero-sub { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); }
.hp-hero-acts { display: flex; flex-wrap: wrap; gap: 9px; }
.hp-a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 6px; background: transparent; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.hp-a:hover { border-color: var(--gold); color: var(--gold); }
.hp-a--main { border-color: var(--crimson); background: var(--crimson); color: #fff; }
.hp-a--main:hover { background: #b8455c; color: #fff; }
.hp-hero-cover { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 46px -26px #000; }
.hp-hero-cover i { position: absolute; top: 0; bottom: 0; left: 0; width: 8px; background: var(--spine); }
.hp-hero-cover span { font-family: Georgia, "Songti SC", serif; font-size: 44px; color: #f1ebde; }
.hp-hero-cover span.is-long { font-size: 23px; }
.hp-hero-cover em { position: absolute; right: 8px; bottom: 8px; font-style: normal; font-size: 10px; letter-spacing: .1em; color: rgba(255, 255, 255, .58); }

.hp-body { min-width: 0; }
.hp-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.hp-sec { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.hp-sec:first-child { grid-column: 1 / -1; }
.hp-sec h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.hp-sec h2 span { letter-spacing: .14em; }
.hp-sec h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hp-sec p { margin: 0 0 11px; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }
.hp-lede { color: var(--ink); }
.hp-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.hp-list li { position: relative; padding-left: 15px; font-size: 13px; color: var(--ink-2); }
.hp-list li::before { content: ""; position: absolute; top: 8px; left: 2px; width: 5px; height: 5px; border-radius: 1px; background: var(--gold); }
.hp-files { margin: 0; padding: 0; list-style: none; }
.hp-files li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.hp-files li:last-child { border-bottom: 0; }
.hp-files b { flex: none; font-weight: 400; color: var(--muted); }

.hp-more { margin-top: 20px; }
.hp-more h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.hp-more h2 span { letter-spacing: .14em; }
.hp-more h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hp-more-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hp-mini { display: flex; flex-direction: column; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.hp-mini:hover { border-color: var(--gold); }
.hp-mini-c { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 7px; font-family: Georgia, "Songti SC", serif; font-size: 20px; color: #efe7d8; background: linear-gradient(155deg, rgba(255, 255, 255, .16), #14111c 70%); box-shadow: inset 3px 0 0 var(--spine); }
.hp-mini b { display: -webkit-box; overflow: hidden; font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--ink-2); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hp-mini em { font-style: normal; font-size: 11px; color: var(--muted); }
.hp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hp-tags a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 11.5px; color: var(--muted); }
.hp-tags a:hover { border-color: var(--gold); color: var(--gold); }

.hp-panel { padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.hp-panel h3 { margin: 0 0 11px; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.hp-kv { margin: 0; }
.hp-kv > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.hp-kv > div:last-child { border-bottom: 0; }
.hp-kv dt { color: var(--muted); }
.hp-kv dd { margin: 0; color: var(--ink); }
.hp-panel--code { text-align: center; }
.hp-code {
  display: block; width: 100%; padding: 10px;
  border: 1px dashed rgba(212, 162, 76, .46); border-radius: 8px; background: rgba(212, 162, 76, .07);
  cursor: pointer; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 19px; letter-spacing: .14em; color: var(--gold);
}
.hp-panel--code p { margin: 9px 0 0; font-size: 11px; color: var(--muted); }
.hp-hot { margin: 0; padding-left: 16px; font-size: 12.5px; }
.hp-hot li { padding: 5px 0; }
.hp-hot li a { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); }
.hp-hot li a > span:last-child { flex: none; font-size: 11px; color: var(--muted); }

@media (max-width: 960px) {
  .hp-wrap { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hp-rail { position: static; }
  .hp-grid { grid-template-columns: minmax(0, 1fr); }
  .hp-more-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-hero { grid-template-columns: minmax(0, 1fr) 128px; gap: 16px; }
}

/* 关于 / 404 用到的大标题与单栏门头 */
.hp-h1 { margin: 12px 0 10px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.34; color: var(--ink); }
.hp-hero--solo { grid-template-columns: minmax(0, 1fr); }
.hp-grid--even > .hp-sec:first-child { grid-column: auto; }
.hp-hero-acts a { text-decoration: none; }

/* ---------- 共用页（详情 / 关于 / 404）变量映射 ----------
   这一站固定暗色。共用页会按 localStorage 挂 light / dark 两种 data-theme，
   所以两套选择器都写成同一份色板，避免浅色主题下出现白卡片配浅字。
   选择器带 html[...] 是为了压过 style.css 里同名的 :root 定义。 */
html[data-theme="light"], html[data-theme="dark"] {
  --bg: #0f0d16;
  --bg-soft: #12101a;
  --surface: #191622;
  --surface-2: #211d2c;
  --ink: #ece7f5;
  --ink-2: #b8b1c9;
  --ink-3: #7e7691;
  --line: #2b2638;
  --line-strong: #3a3348;
  --brand: #d4a24c;
  --brand-2: #e8bf72;
  --brand-soft: #2a2434;
  --accent: #d4a24c;
  --ok: #57a773;
  --warn: #d4a24c;
  --radius-s: 6px; --radius: 9px; --radius-l: 12px;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 8px 26px -12px rgba(0, 0, 0, .9);
  --shadow-l: 0 26px 60px -28px rgba(0, 0, 0, .95);
  --font: var(--sans);
}
