/* ==========================================================================
   pbzrank.com — 站点样式
   墨 / 绯 视觉：近黑底 + 朱红点缀 + 宋体标题
   ========================================================================== */

:root {
  --ink: #0a0a0c;
  --ink-2: #0e0e11;
  --panel: #14141a;
  --panel-2: #1a1a21;
  --panel-3: #202028;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #ece8e1;
  --dim: #a8a29a;
  --dim-2: #8d887e;
  --crimson: #d0343b;
  --crimson-soft: rgba(208, 52, 59, 0.14);
  --gold: #c9a227;
  --jade: #4f9d8b;

  --tier-s: #d0343b;
  --tier-a: #d98a3a;
  --tier-b: #6b7f96;
  --tier-c: #5d5a54;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r: 4px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景：极淡的墨晕 + 细网格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(208, 52, 59, 0.10), transparent 70%),
    radial-gradient(660px 460px at 92% 4%, rgba(201, 162, 39, 0.05), transparent 72%),
    linear-gradient(180deg, #0a0a0c 0%, #09090b 60%, #08080a 100%);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: rgba(208, 52, 59, 0.32); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex: none;
  font-family: var(--serif);
  letter-spacing: 0.02em;
}

.brand .mark {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.brand .mark em {
  font-style: normal;
  color: var(--crimson);
}

.brand .sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.nav {
  display: flex;
  gap: 0;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav a {
  font-size: 13.5px;
  color: var(--dim);
  padding: 7px 9px;
  border-radius: var(--r);
  white-space: nowrap;
  transition: color 0.16s, background 0.16s;
}

.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }

.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--crimson-soft);
  box-shadow: inset 0 0 0 1px rgba(208, 52, 59, 0.28);
}

.head-meta {
  flex: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--dim-2);
  padding-left: 18px;
  border-left: 1px solid var(--line);
  line-height: 1.5;
  text-align: right;
}

.head-meta b { color: var(--gold); font-weight: 500; }

/* 语言切换 */
.lang {
  flex: none;
  display: flex;
  align-items: center;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.02);
}

.lang a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--dim-2);
  padding: 2px 7px;
  border-radius: 2px;
  line-height: 1.5;
  transition: color 0.15s, background 0.15s;
}

.lang a:hover { color: var(--text); }

.lang a.on {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------------------------------ hero */
.hero {
  padding: 72px 0 46px;
  position: relative;
}

.hero .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crimson);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.hero .eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 120px;
  background: linear-gradient(90deg, rgba(208, 52, 59, 0.55), transparent);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.14;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  max-width: 16em;
}

/* H1 承担关键词，原来那句 slogan 降到副标题 */
.hero-sub {
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--text);
  opacity: 0.62;
  margin: 0 0 20px;
  letter-spacing: 0.01em;
}

.hero p.lead {
  font-size: 17px;
  color: var(--dim);
  max-width: 42em;
  margin: 0 0 26px;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  font-size: 13.5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}

.btn:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.24); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
  font-weight: 500;
}

.btn.primary:hover { background: #e04149; border-color: #e04149; }

.btn.ghost { border-color: transparent; color: var(--dim); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

/* ------------------------------------------------------------------ 通用 */
.section { padding: 34px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0;
  font-weight: 700;
}

.section-head .hint { font-size: 13.5px; color: var(--dim-2); }
.section-head a.more { font-size: 13.5px; color: var(--dim); }
.section-head a.more:hover { color: var(--crimson); }

/* 榜单页头 */
.board-head { padding: 52px 0 8px; }

.board-head .crumbs {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-bottom: 16px;
}

.board-head .crumbs a:hover { color: var(--crimson); }

.board-title {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.board-title h1 {
  font-family: var(--serif);
  font-size: clamp(27px, 3.6vw, 40px);
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
}

.board-title .cn {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--dim);
  padding-top: 12px;
  white-space: nowrap;
}

.board-lead {
  font-size: 16.5px;
  color: var(--dim);
  max-width: 46em;
  margin: 0 0 20px;
}

/* 版本条 */
.verbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.07), transparent 60%);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 13.5px;
  color: var(--dim);
  margin-bottom: 26px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.chip.gold { color: var(--gold); background: rgba(201, 162, 39, 0.12); }
.chip.red { color: #e8797e; background: var(--crimson-soft); }
.chip.jade { color: var(--jade); background: rgba(79, 157, 139, 0.12); }

/* Criteria 图例 */
.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 28px;
}

.legend div {
  background: var(--ink-2);
  padding: 12px 14px;
}

.legend dt {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 2px;
}

.legend dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--dim-2);
  line-height: 1.5;
}

/* ------------------------------------------------------------------ 榜单行 */
.rows { border-top: 1px solid var(--line); }

.row {
  display: grid;
  grid-template-columns: 52px minmax(220px, 1fr) minmax(240px, 300px) 86px;
  gap: 20px;
  align-items: start;
  padding: 20px 12px 20px 4px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.18s;
}

.row:hover { background: rgba(255, 255, 255, 0.018); }

.row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--crimson);
  opacity: 0;
  transition: opacity 0.18s;
}

.row:hover::before { opacity: 0.7; }

.row .rank {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  color: var(--dim-2);
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.row.top .rank { color: var(--crimson); }

.row .who { min-width: 0; }

.row .name-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.row .name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.row .name-cn {
  font-size: 13.5px;
  color: var(--dim);
}

.row .type-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim-2);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  padding: 1px 5px;
}

.row .why {
  font-size: 14.5px;
  color: var(--dim);
  line-height: 1.72;
  margin: 0 0 7px;
}

.row .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--dim-2);
}

.row .meta-line b { color: var(--dim); font-weight: 500; }

.row .meta-line .good { color: #7fb191; }
.row .meta-line .bad { color: #b8787b; }

/* tier */
.tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  flex: none;
}

.tier.S { background: var(--tier-s); color: #fff; }
.tier.A { background: var(--tier-a); color: #1a1206; }
.tier.B { background: var(--tier-b); color: #0b1119; }
.tier.C { background: var(--tier-c); color: #e8e4dd; }

/* 分数条 */
.scores { display: flex; flex-direction: column; gap: 5px; padding-top: 3px; }

.score {
  display: grid;
  grid-template-columns: 62px 1fr 26px;
  gap: 8px;
  align-items: center;
}

.score .k {
  font-size: 12px;
  color: var(--dim-2);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score .track {
  display: block;
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  overflow: hidden;
}

.score .fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(208, 52, 59, 0.55), var(--crimson));
  border-radius: 2px;
  width: 0;
  transition: width 0.7s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.score.hi .fill { background: linear-gradient(90deg, rgba(201, 162, 39, 0.5), var(--gold)); }

.score .v {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 投票 */
.actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.vote {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.vote button {
  background: none;
  border: 0;
  color: var(--dim-2);
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: color 0.15s, background 0.15s;
}

.vote button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.vote button.on[data-dir="1"] { color: #e8797e; background: var(--crimson-soft); }
.vote button.on[data-dir="-1"] { color: #7f9bb5; background: rgba(107, 127, 150, 0.16); }

.vote .num {
  font-family: var(--mono);
  font-size: 12px;
  min-width: 42px;
  text-align: center;
  color: var(--dim);
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  line-height: 30px;
}

.cmp-link {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim-2);
  white-space: nowrap;
}

.cmp-link:hover { color: var(--crimson); }

/* 隐藏 Boss 标记 */
.flag-hidden {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.4);
  padding: 0 4px;
  border-radius: 2px;
}

/* ------------------------------------------------------------- 首页卡片 */
.grid-boards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.bcard {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border-radius: var(--r);
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  min-height: 156px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

a.bcard:hover {
  border-color: rgba(208, 52, 59, 0.4);
  transform: translateY(-2px);
  background: linear-gradient(180deg, var(--panel-2), var(--ink-2));
}

.bcard .idx {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--dim-2);
  margin-bottom: 12px;
}

.bcard h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 3px;
  font-weight: 700;
}

.bcard .en {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 10px;
}

.bcard p {
  font-size: 13.5px;
  color: var(--dim);
  margin: 0;
  line-height: 1.6;
  flex: 1;
}

.bcard-eta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim-2);
}

/* 英文模式下没有副标题，别留一段空白 */
.bcard .en:empty { display: none; }

.bcard.soon { opacity: 0.5; }
.bcard.soon:hover { transform: none; border-color: var(--line); }

/* 表格（周榜 / 变更记录） */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }

.tbl th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim-2);
  font-weight: 500;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  vertical-align: middle;
}

.tbl tr:hover td { background: rgba(255, 255, 255, 0.015); }
.tbl td.name { color: var(--text); font-weight: 500; }
.tbl td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }

.delta { font-family: var(--mono); font-size: 11px; }
.delta.up { color: #e8797e; }
.delta.down { color: #7f9bb5; }
.delta.flat { color: var(--dim-2); }

/* 定宽列，避免 5 列表格被拉散 */
.tbl th:first-child, .tbl td:first-child { width: 46px; }
.tbl th:nth-child(3), .tbl td:nth-child(3) { width: 88px; }
.tbl th:nth-child(4), .tbl td:nth-child(4) { width: 92px; }
.tbl th:last-child, .tbl td:last-child { width: 118px; }

/* ------------------------------------------------------------- Build 矩阵 */
.matrix {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  font-size: 13.5px;
}

.matrix .mh, .matrix .mc {
  background: var(--ink-2);
  padding: 10px 12px;
}

.matrix .mh {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim-2);
  display: flex;
  align-items: center;
}

.matrix .mh.first { color: var(--text); font-family: var(--sans); font-size: 12px; letter-spacing: 0; text-transform: none; }

.matrix .mc { text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.mc.s { color: #fff; background: rgba(208, 52, 59, 0.30); }
.mc.a { color: #f0cfa8; background: rgba(217, 138, 58, 0.20); }
.mc.b { color: #b8c4d2; background: rgba(107, 127, 150, 0.16); }
.mc.c { color: var(--dim-2); }

/* ----------------------------------------------------------------- 对比页 */
.cmp-pickers {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
}

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-bottom: 7px;
}

select {
  width: 100%;
  height: 40px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0 30px 0 10px;
  font-size: 14.5px;
  font-family: var(--sans);
  appearance: none;
  cursor: pointer;
  text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim-2) 50%), linear-gradient(135deg, var(--dim-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

select:focus { outline: 2px solid rgba(208, 52, 59, 0.5); outline-offset: 1px; }

.cmp-vs {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--dim-2);
  padding-bottom: 10px;
}

.cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.cmp-cell {
  background: var(--ink-2);
  padding: 18px 20px;
}

.cmp-cell .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-bottom: 6px;
}

.cmp-cell .v {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

.cmp-bars { padding: 22px 20px; border-top: 1px solid var(--line); background: var(--ink-2); }

.cmp-bar-row { margin-bottom: 16px; }

.cmp-bar-row .lbl {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.duo .track { height: 6px; background: rgba(255, 255, 255, 0.06); border-radius: 3px; overflow: hidden; }
.duo .track.r { display: flex; justify-content: flex-end; }
.duo .fill { height: 100%; border-radius: 3px; }
.duo .fill.a { background: var(--crimson); }
.duo .fill.b { background: var(--gold); }

.verdict {
  border-left: 2px solid var(--crimson);
  padding: 4px 0 4px 16px;
  margin-top: 24px;
  font-size: 15px;
  color: var(--dim);
  line-height: 1.75;
}

.verdict b { color: var(--text); }

/* 变更记录 */
.changelog { border-left: 1px solid var(--line); padding-left: 0; margin: 0; list-style: none; }

.changelog li {
  position: relative;
  padding: 0 0 18px 22px;
  font-size: 13px;
  color: var(--dim);
}

.changelog li::before {
  content: "";
  position: absolute;
  left: -3.5px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson);
}

.changelog .patch {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
  margin-right: 8px;
}

.changelog .date {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim-2);
  margin-right: 10px;
}

/* 说明块 */
.note {
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: var(--r);
  padding: 18px 20px;
  font-size: 13px;
  color: var(--dim);
  line-height: 1.7;
}

.note strong { color: var(--text); font-weight: 600; }
.note p:last-child { margin-bottom: 0; }

/* 空状态 */
.empty {
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  padding: 54px 24px;
  text-align: center;
  color: var(--dim-2);
  font-size: 14px;
}

/* ---------------------------------------------------------------- 图鉴 */
.cx-toc {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  background: var(--ink-2);
  margin-bottom: 10px;
}

.cx-toc > div { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }

.cx-toc-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim-2);
  width: 96px;
  flex: none;
}

.cx-toc a {
  font-size: 13.5px;
  color: var(--dim);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.cx-toc a:hover { color: var(--crimson); border-color: rgba(208, 52, 59, 0.45); }

.cx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.cx-card {
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 84px;
  transition: background 0.2s, border-color 0.2s;
}

.cx-card:hover { border-color: rgba(255, 255, 255, 0.16); }

.cx-card:target {
  background: var(--panel-2);
  box-shadow: inset 2px 0 0 var(--crimson);
}

.cx-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }

.cx-names b {
  display: block;
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.cx-names span { font-size: 11.5px; color: var(--dim-2); }

.cx-rank {
  margin-left: auto;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim-2);
  font-variant-numeric: tabular-nums;
}

.cx-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }

.cx-meta span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 2px;
}

.cx-card p {
  font-size: 14.5px;
  color: var(--dim);
  line-height: 1.75;
  margin: 0 0 14px;
  flex: 1;
}

.cx-links {
  display: flex;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cx-links a { color: var(--dim-2); }
.cx-links a:hover { color: var(--crimson); }

/* 榜单行被锚点命中时的高亮 */
.row { scroll-margin-top: 84px; }
.row:target { background: rgba(208, 52, 59, 0.06); }
.row:target::before { opacity: 1; }

/* 汉堡按钮（桌面隐藏） */
.menu-btn {
  display: none;
  width: 38px;
  height: 34px;
  padding: 0;
  margin-left: 2px;
  flex: none;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.menu-btn:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04); }

.menu-btn span {
  display: block;
  width: 17px;
  height: 1.5px;
  margin: 3.5px auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.22s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.16s;
}

body.nav-open .menu-btn span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
body.nav-open .menu-btn span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------------------------------------------------------------- footer */
.site-foot {
  margin-top: 66px;
  border-top: 1px solid var(--line);
  padding: 34px 0 46px;
  font-size: 13px;
  color: var(--dim-2);
}

.site-foot .top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.site-foot .brandline { font-family: var(--serif); font-size: 15px; color: var(--dim); }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot nav a:hover { color: var(--text); }
.site-foot .legal { line-height: 1.8; max-width: 62em; }

/* 投票离线提示 */
.offline-note { display: none; }
body.is-offline .offline-note { display: inline-flex; }

/* ------------------------------------------------------------------ 动效 */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 0.8, 0.3, 1); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 980px) {
  .row { grid-template-columns: 40px 1fr; gap: 14px; }
  .row .scores { grid-column: 2; padding-top: 8px; max-width: 320px; }
  .row .actions { grid-column: 2; flex-direction: row; align-items: center; gap: 12px; margin-top: 4px; }
  .row .rank { font-size: 20px; }
  .head-meta { display: none; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 44px 0 30px; }
  .site-head .wrap { height: 56px; gap: 14px; }
  .nav a { padding: 6px 9px; font-size: 13px; }
  .brand .sub { display: none; }
  .cmp-pickers { grid-template-columns: 1fr; }
  .cmp-vs { padding: 0; text-align: center; }
  .cmp-grid { grid-template-columns: 1fr; }
  .row { padding-right: 0; }
  .score { grid-template-columns: 58px 1fr 24px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tbl th, .tbl td { padding-left: 8px; padding-right: 8px; }

  /* 窄屏把评分图例收成一行标签，省掉 300px 的滚动长度 */
  .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: none;
    border: 0;
    margin-bottom: 20px;
  }
  .legend div { background: none; padding: 0; }
  .legend dt {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line-2);
    border-radius: 3px;
    padding: 2px 9px;
    font-size: 11.5px;
    color: var(--dim);
  }
  .legend dd { display: none; }

  .score { grid-template-columns: 66px 1fr 26px; }
  .verbar { font-size: 11.5px; }
}

/* ------------------------------------------------- 移动端：汉堡菜单面板 */
@media (max-width: 1024px) {
  .menu-btn { display: block; }
  .lang { margin-left: auto; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px 18px 14px;
    background: #0b0b0e;
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line-2);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 60;
  }

  body.nav-open .nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  body.nav-open { overflow: hidden; }

  .nav a {
    padding: 13px 2px;
    font-size: 15px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    box-shadow: none;
  }

  .nav a:last-child { border-bottom: 0; }

  .nav a[aria-current="page"] {
    color: var(--crimson);
    background: none;
    box-shadow: none;
    padding-left: 12px;
    position: relative;
  }

  .nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 15px;
    margin-top: -7.5px;
    background: var(--crimson);
  }

  .site-head .wrap { gap: 12px; }
}

@media (max-width: 1400px) {
  .head-meta { display: none; }
}

@media (max-width: 480px) {
  .cx-toc-label { width: 100%; }
  .cx-grid { grid-template-columns: 1fr; }
}

/* ================================================== 移动端排版加强
   小字号 + 低对比 + 紧行距是「看着吃力」的三个来源，这里一起处理：
   正文 16px、行距 1.72、元信息从行内挤排改成逐行、点击区放大。 */
@media (max-width: 720px) {
  body { font-size: 16px; line-height: 1.72; }
  .wrap { padding: 0 20px; }

  .hero { padding: 38px 0 28px; }
  .hero h1 { font-size: 33px; line-height: 1.24; }
  /* 描边字在窄屏几乎读不出来，改成实心弱化 */
  .hero-sub { font-size: 16.5px; margin-bottom: 18px; opacity: 0.72; }
  .hero p.lead { font-size: 16px; line-height: 1.72; }

  .board-head { padding: 34px 0 6px; }
  .board-title h1 { font-size: 27px; }
  .board-title .cn { font-size: 13.5px; padding-top: 6px; }
  .board-lead { font-size: 15.5px; line-height: 1.7; }
  .verbar { font-size: 12.5px; line-height: 1.65; padding: 12px 13px; }

  .row { gap: 12px; padding: 20px 0; }
  .row .rank { font-size: 22px; }
  .row .name { font-size: 18px; }
  .row .name-cn { font-size: 13px; }
  .row .type-tag { font-size: 10.5px; }
  .row .why { font-size: 15px; line-height: 1.75; margin-bottom: 10px; }

  /* 元信息逐行，不再挤成一条 */
  .row .meta-line { display: grid; gap: 6px; font-size: 13.5px; }
  .row .meta-line > span { display: block; line-height: 1.55; }
  .row .meta-line b { color: var(--text); font-weight: 500; }

  .row .scores { width: 100%; max-width: none; gap: 7px; }
  .score .k { font-size: 12.5px; }
  .score .v { font-size: 12px; }
  .score .track { height: 5px; }

  .actions { justify-content: space-between; width: 100%; }
  .vote button { width: 36px; height: 36px; font-size: 12px; }
  .vote .num { line-height: 36px; font-size: 13px; min-width: 52px; }
  .cmp-link { font-size: 12px; }

  .legend dt { font-size: 12.5px; padding: 3px 10px; }

  .bcard { padding: 18px; }
  .bcard h3 { font-size: 20px; }
  .bcard p { font-size: 13.5px; line-height: 1.65; }

  .cx-card { padding: 18px 18px 15px; }
  .cx-card p { font-size: 15px; line-height: 1.75; }
  .cx-names b { font-size: 17px; }
  .cx-toc { padding: 14px 15px; }
  .cx-toc a { font-size: 13px; }

  .tbl { font-size: 14px; }
  .tbl th { font-size: 10.5px; letter-spacing: 0.08em; }
  .tbl td { padding: 12px 8px; }

  .nav a { font-size: 16.5px; padding: 14px 2px; }
  .section-head h2 { font-size: 20px; }
  .empty { padding: 40px 18px; font-size: 14.5px; line-height: 1.8; }
  .note { font-size: 14px; line-height: 1.75; }
  .site-foot { font-size: 12.5px; line-height: 1.75; }
  .changelog li { font-size: 13.5px; line-height: 1.7; }
  .verdict { font-size: 15px; line-height: 1.8; }
  select { height: 44px; font-size: 15px; }
  .field label { font-size: 11px; }
}

/* 武器条目的 +/− 归到一行，避免移动端每个标签占一段 */
.meta-line .traits { display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (max-width: 720px) {
  .meta-line .traits { gap: 4px 12px; font-size: 13px; }
}

/* 选择器权重修正：.row .meta-line > span 的 display:block 会把 traits 压成一行文字，
   这里用更高权重把它救回 flex，保证 +/− 之间始终有间距 */
.row .meta-line > .traits { display: flex; flex-wrap: wrap; gap: 5px 14px; }
@media (max-width: 720px) {
  .row .meta-line > .traits { gap: 5px 12px; }
  .verbar { align-items: flex-start; }
  .verbar > span:last-child { margin-left: 0 !important; width: 100%; }
}

/* 表格容器：窄屏不撑破页面，改为容器内横向滚动 */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-wrap::-webkit-scrollbar { height: 6px; }
.tbl-wrap::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 3px; }

@media (max-width: 720px) {
  .tbl-wrap { margin-right: -20px; padding-right: 20px; }
  .tbl { min-width: 440px; }
  .tbl th, .tbl td { padding: 12px 8px; }
}

/* ---------------------------------------------- 社区周榜：行式列表
   原来是表格，窄屏会被撑破、投票列被切掉一半；改成网格行，两档宽度都不溢出 */
.wk-table { border-top: 1px solid var(--line); }

.wk-head, .wk-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 186px 108px;
  gap: 16px;
  align-items: center;
}

.wk-head {
  padding: 0 0 11px;
  border-bottom: 1px solid var(--line);
}

.wk-head > span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim-2);
  font-style: normal;
}

.wk-head .wk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; text-align: right; }
.wk-head .wk-stats i { font-style: normal; }
.wk-head .wk-vote { text-align: right; }

.wk-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.16s;
}

.wk-row:hover { background: rgba(255, 255, 255, 0.016); }

.wk-rank {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim-2);
  font-variant-numeric: tabular-nums;
}

.wk-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 15px;
  color: var(--text);
}

.wk-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wk-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.wk-net { color: var(--text); }

.wk-vote { display: flex; justify-content: flex-end; }

@media (max-width: 720px) {
  .wk-head { display: none; }

  .wk-row {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank name vote"
      "rank stats vote";
    gap: 3px 10px;
    padding: 16px 0;
    align-items: start;
  }

  .wk-rank { grid-area: rank; font-size: 13px; padding-top: 4px; }
  .wk-name { grid-area: name; font-size: 16px; }
  .wk-name > span { white-space: normal; }
  .wk-stats { grid-area: stats; grid-template-columns: auto auto; justify-content: start; gap: 12px; text-align: left; font-size: 12.5px; }
  .wk-vote { grid-area: vote; align-items: center; }
}

/* 移动端票数与投票按钮里的数字重复，去掉一行，只保留涨跌 */
@media (max-width: 720px) {
  .wk-net { display: none; }
  .wk-stats { gap: 0; }
}

/* 周榜列数收紧：票数只在投票控件里出现一次 */
.wk-head, .wk-row { grid-template-columns: 48px minmax(0, 1fr) 96px 108px; }
.wk-head .wk-stats { grid-template-columns: 1fr; }
@media (max-width: 720px) {
  .wk-head, .wk-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
}

/* 版本条里的说明文字单独成行，其它 chip 不要被拉满 */
.verbar > .verbar-note { margin-left: auto; color: var(--dim-2); }
@media (max-width: 720px) {
  .verbar > .verbar-note { margin-left: 0; width: 100%; }
  .verbar > span:not(.verbar-note) { width: auto; }
  .cx-toc > div + div {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
}

/* Build 评级矩阵：窄屏横向滚动，别让 overflow-x:hidden 把列裁掉 */
.mx-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mx-wrap::-webkit-scrollbar { height: 6px; }
.mx-wrap::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 3px; }

@media (max-width: 720px) {
  .mx-wrap { margin-right: -20px; padding-right: 20px; }
  .mx-wrap .matrix { min-width: 560px; }
  .mx-wrap .matrix .mc { font-size: 13.5px; padding: 11px 8px; }
  .mx-wrap .matrix .mh { font-size: 10.5px; padding: 10px 8px; }
}
