/* 新伊甸野史 —— 史书列传 × 深空。
   默认深色（太空墨底 + 旧纸色文字），浅色模式为宣纸底。
   锐评（::: 评）与一句话评语用朱砂色，取“朱批”之意。
   不加载任何外部字体/CDN：读者多在国内，外部资源可能被墙。 */

:root {
  --bg: #0c0f15;
  --bg-raised: #141923;
  --bg-sunk: #090b10;
  --line: #2a3140;
  --line-soft: #1d2330;
  --text: #ddd6c6;
  --text-dim: #9a9384;
  --text-faint: #6d685e;
  --gold: #c8a560;
  --gold-dim: #8f7746;
  --shuffle-bg: #c8392e;   /* 随机排序：朱砂印章 */
  --shuffle-hover: #b0302a;
  --shuffle-active: #8f241e;
  --shuffle-text: #fff8ee;
  --shuffle-edge: rgba(0, 0, 0, 0.35);
  --zhu: #e0554a;          /* 朱砂 */
  --zhu-bg: rgba(224, 85, 74, 0.08);
  --emblem-blue: #4f86c6;  /* 战徽右方底光；对阵第二方的主色 */
  --emblem-plate: #090c13; /* 无封面战役的深空星图底盘，保证浅色联盟图标始终清晰 */
  /* 动态状态：活跃绿、招新蓝、沉寂灰；实底配白字，深浅色都够对比 */
  --live: #4ad07f;
  --live-glow: rgba(74, 208, 127, 0.45);
  --live-solid: #1c7f49;
  --recruit: #5aa9ff;
  --recruit-solid: #1f66b8;
  --ash: rgba(190, 196, 208, 0.28);
  --fame-sweep: rgba(232, 200, 130, 0.2);
  --tycoon: #d89b48;
  --tycoon-bright: #ffe299;
  --shenren: #c678ff;
  --upzhu: #fb7299;
  /* 列传六维排序胶囊各一色 */
  --axis-shenren: #c678ff;
  --axis-combat: #f0675a;
  --axis-command: #6aa8ff;
  --axis-charisma: #ff9d57;
  --axis-politics: #45cbd6;
  --axis-wealth: #e6c15a;
  --tianshu: #f2c94c;        /* 天书：明黄 */
  --lore: #45cbd6;           /* 正史：青 */
  --deals: #ff9d57;          /* 折扣：琥珀橙 */
  --news-update: #6aa8ff;
  --news-preview: #c678ff;
  --news-event: #4ad07f;
  --news-offer: #ff9d57;
  --news-misc: #9a9384;
  --lore-news: #45cbd6;       /* 正史·新伊甸新闻：青 */
  /* 折扣板块：商品色 */
  --cal-plex: #e6c15a;
  --cal-omega: #6aa8ff;
  --cal-mct: #45cbd6;
  --cal-consumable: #59d18a;
  --cal-booster: #c678ff;
  --cal-pack: #ff9d57;
  /* 六维阶位字色（详情页雷达图），浅色另有一套 */
  --tier-ex: #ff5252;
  --tier-ex-glow: rgba(255, 82, 82, .65);
  --tier-s: #ffb300;
  --tier-s-glow: rgba(255, 179, 0, .55);
  --tier-a: #ce93d8;
  --tier-b: #4fc3f7;
  --tier-d: #ffcc80;
  --tier-e: #cfd8dc;
  --bili-pink: #fb7299;
  /* 氛围层：天幕辉光、星点、面板立体感、标题墨色、数字微光 */
  --glow-zhu: rgba(224, 85, 74, 0.11);
  --glow-blue: rgba(79, 134, 198, 0.10);
  --stars: .55;
  --surface: linear-gradient(180deg, #171d29, #131822);
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 32px -20px rgba(0, 0, 0, 0.9);
  --title-ink: linear-gradient(180deg, #f7eedb 25%, #c8a560 115%);
  --num-glow: 30%;
  --paper: none;
  --link: #d9b673;
  --term-link: #8fc4ee;
  --focus: #7fb4ff;
  --hong: #c23b30;         /* 红料 */
  --hong-bg: rgba(194, 59, 48, 0.07);
  --hei: #0a0b0d;          /* 黑料：深底上用纯黑 + 浅边 */
  --hei-fg: #e8e2d4;
  --hei-bg: rgba(0, 0, 0, 0.35);
  --hei-edge: #59606e;
  --meter-pvp-a: #c9372c;
  --meter-pvp-b: #f59b35;
  --meter-pvp-ink: #f8a24b;
  --meter-shenren-a: #7e2bd4;
  --meter-shenren-b: #eb3b88;
  --meter-shenren-ink: #f26ba8;
  --meter-inf-a: #1c7ed6;
  --meter-inf-b: #34d399;
  --meter-inf-ink: #57dfb4;
  --meter-track: rgba(6, 9, 14, 0.75);
  --meter-tick: rgba(0, 0, 0, 0.5);
  --style-tycoon-1: #e5b84b;
  --style-tycoon-2: #f7df94;
  --style-warlord-1: #ef4b3f;
  --style-warlord-2: #f29d38;
  --style-syndicate-1: #39b5cc;
  --style-syndicate-2: #e09643;
  --style-neon-1: #eb52c4;
  --style-neon-2: #3dd9f5;
  --style-dynasty-1: #de4337;
  --style-dynasty-2: #e3b354;
  --style-phantom-1: #a46eff;
  --style-phantom-2: #3ad9ad;
  --style-forge-1: #ef7a34;
  --style-forge-2: #a9b6c3;
  --style-abyss-1: #5f7dff;
  --style-abyss-2: #c86bff;
  --style-academy-1: #5ccf72;
  --style-academy-2: #efd174;
  --style-corsair-1: #2fc4a3;
  --style-corsair-2: #e9dba8;
  --style-nebula-1: #ff6f98;
  --style-nebula-2: #ffd98a;
  --corp-plate-mix: 62%;

  /* 本机有思源宋体就用本机，否则按需下载站内切片（fonts.css）；Cambria/Georgia 在宋体前，切片未到时西文不落到宋体的等宽字母 */
  --serif: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", "Yeshi Serif", "Songti SC", "STSong", Cambria, Georgia, "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;

  --radius: 6px;
  --gutter: 16px;
  --measure: 48rem;
  --toc-w: 16.5rem;
  --toc-gap: 2.5rem;

  color-scheme: dark;
}

/* 浅色：默认关灯（深色），页眉按钮手动选浅色时用下面这段（html[data-theme]，存 localStorage）。
   浅色取旧宣纸色，底色与卡片都压暗一档，避免大片近白刺眼。 */
:root[data-theme="light"] {
  --bg: #e6dece;
  --bg-raised: #efe9dc;
  --bg-sunk: #dbd2bf;
  --line: #c8bca4;
  --line-soft: #d6ccb8;
  --text: #2a2621;
  --text-dim: #5f574b;
  --text-faint: #8a8172;
  --gold: #8a6a2f;
  --gold-dim: #b39a68;
  --shuffle-bg: #b8302a;
  --shuffle-hover: #a12822;
  --shuffle-active: #82201b;
  --shuffle-edge: rgba(90, 20, 15, 0.45);
  --zhu: #b0322a;
  --zhu-bg: rgba(176, 50, 42, 0.06);
  --emblem-blue: #2f5f96;
  --emblem-plate: #101520;
  --live: #1c8a4e;
  --live-glow: rgba(28, 138, 78, 0.35);
  --live-solid: #1c7f49;
  --recruit: #1f6fc4;
  --recruit-solid: #1f66b8;
  --ash: rgba(255, 252, 244, 0.4);
  --fame-sweep: rgba(190, 145, 60, 0.2);
  --tycoon: #8c5612;
  --tycoon-bright: #d4952a;
  --shenren: #7a29b8;
  --upzhu: #d6366c;
  --axis-shenren: #7a29b8;
  --axis-combat: #b0322a;
  --axis-command: #1f5fb0;
  --axis-charisma: #b8540f;
  --axis-politics: #0f7280;
  --axis-wealth: #8a6a0a;
  --tianshu: #9a6f00;
  --lore: #0f7280;
  --deals: #b8540f;
  --news-update: #1f5fb0;
  --news-preview: #7a29b8;
  --news-event: #1c7f49;
  --news-offer: #b8540f;
  --news-misc: #5f574b;
  --lore-news: #0f7280;
  --cal-plex: #8a6a00;
  --cal-omega: #1f5fb0;
  --cal-mct: #12798a;
  --cal-consumable: #1b7f48;
  --cal-booster: #7a29b8;
  --cal-pack: #b8540f;
  --tier-ex: #b71c1c;
  --tier-ex-glow: rgba(183, 28, 28, .25);
  --tier-s: #955700;
  --tier-s-glow: rgba(149, 87, 0, .2);
  --tier-a: #7b3f99;
  --tier-b: #0a6496;
  --tier-d: #7d5f45;
  --tier-e: #55636a;
  --bili-pink: #f25d8e;
  --glow-zhu: rgba(176, 50, 42, 0.07);
  --glow-blue: rgba(47, 95, 150, 0.06);
  --stars: 0;
  --surface: linear-gradient(180deg, #f2ece0, #ebe4d5);
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 26px -18px rgba(90, 65, 30, 0.5);
  --title-ink: linear-gradient(180deg, #2a2621 30%, #6e5223 120%);
  --num-glow: 0%;
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .2 .32 0 0 0 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --link: #7b5a1e;
  --term-link: #175a92;
  --focus: #2563eb;
  --hong: #b52d24;
  --hong-bg: rgba(181, 45, 36, 0.05);
  --hei: #1c1a17;
  --hei-fg: #f4efe4;
  --hei-bg: rgba(28, 26, 23, 0.05);
  --hei-edge: #1c1a17;
  --meter-pvp-a: #b82c22;
  --meter-pvp-b: #e07b1c;
  --meter-pvp-ink: #a83c14;
  --meter-shenren-a: #6a21b8;
  --meter-shenren-b: #c9266d;
  --meter-shenren-ink: #9e1b56;
  --meter-inf-a: #1664ab;
  --meter-inf-b: #1c9e72;
  --meter-inf-ink: #156e52;
  --meter-track: rgba(60, 46, 26, 0.13);
  --meter-tick: rgba(255, 252, 245, 0.7);
  --style-tycoon-1: #966b14;
  --style-tycoon-2: #b88a28;
  --style-warlord-1: #b8281e;
  --style-warlord-2: #b56512;
  --style-syndicate-1: #166c80;
  --style-syndicate-2: #9c5b14;
  --style-neon-1: #a61e84;
  --style-neon-2: #127c96;
  --style-dynasty-1: #a8241b;
  --style-dynasty-2: #9c6f18;
  --style-phantom-1: #6234b8;
  --style-phantom-2: #158264;
  --style-forge-1: #b0521a;
  --style-forge-2: #4f5e6c;
  --style-abyss-1: #3348c4;
  --style-abyss-2: #8a2fb8;
  --style-academy-1: #23803a;
  --style-academy-2: #8a6b0e;
  --style-corsair-1: #0f7a63;
  --style-corsair-2: #7a6624;
  --style-nebula-1: #b8325a;
  --style-nebula-2: #9a6a10;
  --corp-plate-mix: 88%;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* 氛围层：深色是朱、青两团天幕辉光加星点，浅色是宣纸纤维；固定在视口，纯 CSS，无外部资源 */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    var(--paper),
    radial-gradient(ellipse 70% 45% at 8% -8%, var(--glow-zhu), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 0%, var(--glow-blue), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 115%, var(--glow-blue), transparent 70%);
}
body::after { opacity: var(--stars); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' fill='%23fff'%3E%3Ccircle cx='69' cy='62' r='0.8' fill-opacity='0.7'/%3E%3Ccircle cx='115' cy='146' r='0.6' fill-opacity='0.5'/%3E%3Ccircle cx='17' cy='238' r='0.8' fill-opacity='1.0'/%3E%3Ccircle cx='165' cy='83' r='0.5' fill-opacity='0.5'/%3E%3Ccircle cx='125' cy='2' r='0.5' fill-opacity='0.8'/%3E%3Ccircle cx='196' cy='174' r='0.6' fill-opacity='0.3'/%3E%3Ccircle cx='56' cy='214' r='0.9' fill-opacity='0.9'/%3E%3Ccircle cx='251' cy='250' r='0.5' fill-opacity='0.8'/%3E%3Ccircle cx='222' cy='253' r='0.4' fill-opacity='0.6'/%3E%3Ccircle cx='91' cy='78' r='0.6' fill-opacity='0.7'/%3E%3Ccircle cx='138' cy='39' r='0.5' fill-opacity='0.4'/%3E%3Ccircle cx='63' cy='190' r='0.7' fill-opacity='0.7'/%3E%3Ccircle cx='32' cy='129' r='0.5' fill-opacity='0.7'/%3E%3Ccircle cx='30' cy='134' r='0.7' fill-opacity='0.8'/%3E%3Ccircle cx='57' cy='66' r='0.5' fill-opacity='0.9'/%3E%3Ccircle cx='185' cy='227' r='0.4' fill-opacity='0.8'/%3E%3Ccircle cx='42' cy='172' r='0.9' fill-opacity='0.9'/%3E%3Ccircle cx='216' cy='171' r='0.5' fill-opacity='0.8'/%3E%3Ccircle cx='46' cy='181' r='0.7' fill-opacity='0.3'/%3E%3Ccircle cx='236' cy='118' r='0.4' fill-opacity='0.9'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='540' height='540' fill='%23fff'%3E%3Ccircle cx='144' cy='494' r='1.4' fill-opacity='0.9'/%3E%3Ccircle cx='412' cy='479' r='1.4' fill-opacity='0.5'/%3E%3Ccircle cx='244' cy='329' r='1.0' fill-opacity='0.3'/%3E%3Ccircle cx='125' cy='15' r='1.3' fill-opacity='0.5'/%3E%3Ccircle cx='389' cy='11' r='0.9' fill-opacity='0.4'/%3E%3Ccircle cx='525' cy='360' r='1.1' fill-opacity='0.8'/%3E%3Ccircle cx='125' cy='511' r='0.9' fill-opacity='0.8'/%3E%3Ccircle cx='310' cy='197' r='1.0' fill-opacity='0.7'/%3E%3C/svg%3E"); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }
main.wrap { flex: 1; padding-top: 1.5rem; padding-bottom: 3rem; }

/* ---------- 页眉 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; flex-wrap: nowrap; align-items: center; column-gap: .85rem; min-height: 3.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; flex: none; text-decoration: none; color: var(--text); }
.brand-seal {
  display: inline-grid; place-items: center;
  width: 1.9rem; height: 1.9rem;
  background: var(--zhu); color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  border-radius: 3px;
}
.brand-text { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; line-height: 1.15; letter-spacing: .08em; }
.brand-text small { display: block; font-family: var(--sans); font-weight: 400; font-size: .7rem; letter-spacing: .02em; color: var(--text-faint); }
/* 访问计数徽章：自动推向右侧，窄屏只隐藏不移除，图片照常加载计数 */
.hits { height: 20px; margin-left: auto; flex: none; }
.site-nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.hits:not([hidden]) + .site-nav { margin-left: 0; }
.site-nav a {
  position: relative;
  padding: .45rem .55rem; border-radius: var(--radius);
  color: var(--text-dim); text-decoration: none; font-size: .94rem; font-weight: 700; white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--bg-raised); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .45rem; right: .45rem; bottom: .12rem; height: 2px;
  border-radius: 2px; background: currentColor;
}
.site-nav .nav-sep {
  width: 1px; height: 1rem; margin: 0 .3rem; flex: none;
  background: var(--line);
}
.site-nav .nav-gold, .site-nav .nav-gold:hover { color: var(--gold); }
.site-nav .nav-blue, .site-nav .nav-blue:hover { color: var(--emblem-blue); }
.site-nav .nav-zhu, .site-nav .nav-zhu:hover { color: var(--zhu); }
.site-nav .nav-tianshu, .site-nav .nav-tianshu:hover { color: var(--tianshu); }
.site-nav .nav-lore, .site-nav .nav-lore:hover { color: var(--lore); }
.site-nav .nav-deals, .site-nav .nav-deals:hover { color: var(--deals); }
.header-tools { display: flex; align-items: center; gap: .15rem; flex: none; }
.tool-btn {
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; padding: 0;
  color: var(--text-dim); background: none; border: 0; border-radius: var(--radius); cursor: pointer;
  text-decoration: none;
}
.tool-btn:hover, .tool-btn[aria-current="page"] { color: var(--gold); background: var(--bg-raised); }
.tool-btn svg { width: 1.1rem; height: 1.1rem; }
/* 深浅切换：显示要切过去的那一边（深色显示日，浅色显示月）；无 JS 时隐藏 */
.theme-toggle .i-moon,
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

@media (max-width: 900px) {
  .hits { display: none; }
  .site-nav { margin-left: auto; }
}
/* 手机与窄平板：两行紧凑页眉，上行站名 + 搜索/深浅按钮，下行 6 个板块一字排开 */
@media (max-width: 640px) {
  html { scroll-padding-top: 6rem; }
  .header-inner { flex-wrap: wrap; row-gap: 0; padding-top: .35rem; min-height: 0; }
  .brand { gap: .45rem; padding-bottom: .35rem; }
  .brand-seal { width: 1.65rem; height: 1.65rem; font-size: .92rem; }
  .brand-text { font-size: .98rem; letter-spacing: .05em; }
  .brand-text small { display: none; }
  .header-tools { order: 2; margin-left: auto; padding-bottom: .35rem; }
  .site-nav {
    order: 3; flex: 1 0 100%; justify-content: space-between; gap: 0; margin-left: 0;
    padding: .1rem 0 .2rem; border-top: 1px solid var(--line-soft);
  }
  .site-nav a { flex: 1 1 0; text-align: center; padding: .42rem .15rem; font-size: .88rem; }
  .site-nav a[aria-current="page"]::after { left: 22%; right: 22%; bottom: .08rem; }
  .site-nav .nav-sep { height: .85rem; margin: 0 .15rem; }
}

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line-soft); color: var(--text-faint); font-size: .82rem; padding: 1.5rem 0 2rem; }
.site-footer p { margin: .3rem 0; }
.site-footer a { color: var(--text-dim); }

/* ---------- 通用 ---------- */
.intro h1 { font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: .1em; margin: .2rem 0 .4rem; }
.intro p { color: var(--text-dim); margin: 0 0 1rem; }
.crumbs { margin: 0 !important; font-size: .9rem; }
.empty { color: var(--text-faint); }

.portrait {
  display: block; flex: none;
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 4px; background: var(--bg-sunk);
  border: 1px solid var(--line);
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .15rem .6rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-dim); text-decoration: none; font-size: .85rem; line-height: 1.6;
}
.chip:hover { border-color: var(--gold-dim); color: var(--gold); }
.chip small { color: var(--text-faint); font-size: .75rem; }
.chips-lg .chip { font-size: 1rem; padding: .3rem .85rem; }

.ticker { font-family: var(--mono); font-size: .85em; color: var(--text-faint); }
.aff-left, .aff-none { color: var(--text-faint); }
.aff-left { white-space: nowrap; }
.aff-deleted { font-size: .8em; padding: 0 .35em; border: 1px solid var(--line); border-radius: 3px; color: var(--text-faint); white-space: nowrap; }

/* ---------- 首页 ---------- */
.toolbar {
  display: flex; align-items: stretch; gap: .5rem;
  margin: 1rem 0 .5rem;
}
.toolbar > * { flex: none; white-space: nowrap; }
.toolbar input {
  flex: 1 1 auto; min-width: 0; width: 0;
  font: inherit; color: var(--text);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .55rem .8rem;
}
.toolbar input::placeholder { color: var(--text-faint); }
.toolbar button {
  font: inherit; font-size: .9rem; color: var(--text-dim); cursor: pointer;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .55rem .8rem;
}
.toolbar button:hover { color: var(--text); border-color: var(--gold-dim); }
.toolbar button.is-active { color: var(--text); border-color: var(--gold-dim); }
.toolbar button.is-dimmed { color: var(--text-faint); }
.toolbar #shuffle {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--shuffle-bg); border: 1px solid var(--shuffle-edge);
  color: var(--shuffle-text); font-family: var(--serif); font-size: .95rem; font-weight: 700;
  letter-spacing: .12em; padding: .55rem 1rem .55rem .85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: background-color .15s, transform .1s, box-shadow .15s;
}
.toolbar #shuffle svg { width: 1.1em; height: 1.1em; flex: none; }
.toolbar #shuffle:hover { color: var(--shuffle-text); background: var(--shuffle-hover); border-color: var(--shuffle-edge); }
.toolbar #shuffle:active {
  background: var(--shuffle-active);
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
/* 手机上：随机按钮只留“随机” */
@media (max-width: 560px) {
  .toolbar { gap: .4rem; }
  .toolbar button { padding-left: .6rem; padding-right: .6rem; }
  .toolbar #shuffle { letter-spacing: .06em; padding-left: .6rem; padding-right: .7rem; }
  .shuffle-more { display: none; }
}
.filter-status { color: var(--text-dim); font-size: .9rem; margin: .25rem 0; }

/* 标签栏：默认只露一行，“展开”看全部（折叠由 JS 加上，无 JS 时全部显示） */
.tag-wrap { display: flex; align-items: flex-start; gap: .5rem; margin-top: .75rem; }
.tag-bar {
  flex: 1; min-width: 0;
  display: flex; flex-wrap: wrap; gap: .4rem; padding: .25rem 0;
}
.tag-wrap.is-collapsed .tag-bar { max-height: calc(1.9rem + .5rem); overflow: hidden; }
.tag-bar .chip { flex: none; height: 1.9rem; font: inherit; font-size: .88rem; background: transparent; cursor: pointer; }
.tag-more {
  flex: none; margin-top: .25rem; height: 1.9rem; padding: 0 .7rem;
  font: inherit; font-size: .85rem; white-space: nowrap; cursor: pointer;
  color: var(--gold); background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: 999px;
}
.tag-more:hover { border-color: var(--gold-dim); }
.tag-bar .chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.tag-bar .chip.is-active small { color: inherit; opacity: .75; }

/* 目录是一整块连续网格 */
.cards.roster { margin-top: 1rem; } /* 与筛选区上方留白一致 */
.card { position: relative; }

.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.1rem .6rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.card a {
  display: flex; gap: .85rem; height: 100%;
  padding: .55rem .7rem; border-radius: var(--radius);
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  color: inherit; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.card a:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.card-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.card-name { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; line-height: 1.3; color: var(--text); }
.card-name small { font-family: var(--sans); font-weight: 400; font-size: .78rem; color: var(--text-faint); }
.card-epithet {
  color: var(--zhu); font-family: var(--serif); font-size: .9rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { font-size: .78rem; color: var(--text-faint); line-height: 1.4; margin-top: auto; overflow-wrap: anywhere; }
/* 卡片只写军团缩写（悬停看军团与联盟全名），联盟交给底图 */
.card-meta .aff-corp { color: var(--text-dim); white-space: nowrap; }
.card-meta .aff-corp .ticker { color: inherit; font-size: .9em; }
.card-updated { display: block; }

/* 联盟徽标放大淡化作人物卡片底图，取舍同军团卡片；阵营角标与名印外凸，所以另包一层裁切，不裁卡片本身 */
.card a { position: relative; isolation: isolate; }
.card-al-backdrop {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  border-radius: var(--radius); pointer-events: none;
}
.card-al-backdrop img {
  position: absolute; right: -1.6rem; bottom: -2.2rem;
  width: 9.5rem; height: auto; aspect-ratio: 1;
  opacity: var(--al-backdrop-opacity); filter: saturate(.6);
  -webkit-mask-image: radial-gradient(circle at 60% 60%, #000 35%, transparent 70%);
  mask-image: radial-gradient(circle at 60% 60%, #000 35%, transparent 70%);
  transition: opacity .3s, transform .6s;
}
.card a:hover .card-al-backdrop img { opacity: calc(var(--al-backdrop-opacity) * 1.4); transform: rotate(-6deg) scale(1.04); }
@media (prefers-reduced-motion: reduce) { .card a:hover .card-al-backdrop img { transform: none; } }

/* 六维小雷达：只给轮廓，不出维度字；固定尺寸，压在头像列底部，与同排卡片底线对齐 */
.card.has-radar a { position: relative; min-height: calc(72px + .4rem + 2.2rem + 1.1rem + 2px); }
.card.has-radar.is-tycoon a { min-height: calc(72px + 1rem + 2.2rem + 1.1rem + 2px); }
.card-radar {
  position: absolute; bottom: .55rem; left: calc(.7rem + 36px - 1.1rem);
  width: 2.2rem; height: 2.2rem; pointer-events: none;
}
/* 手机上卡片高度由头像列决定：头像与雷达各缩一号 */
@media (max-width: 480px) {
  .card a { gap: .7rem; }
  .card .portrait { width: 60px; height: 60px; }
  .card.has-radar a { min-height: calc(60px + .35rem + 1.95rem + 1.1rem + 2px); }
  .card.has-radar.is-tycoon a { min-height: calc(60px + .95rem + 1.95rem + 1.1rem + 2px); }
  .card-radar { left: calc(.7rem + 30px - .975rem); width: 1.95rem; height: 1.95rem; }
}
.card-radar svg { display: block; width: 100%; height: 100%; overflow: visible; }
.card-radar-plate { fill: var(--gold); fill-opacity: .06; stroke: var(--gold-dim); stroke-opacity: .55; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.card-radar-base { fill: none; stroke: var(--gold-dim); stroke-opacity: .35; stroke-width: 1; stroke-dasharray: 1.5 2; vector-effect: non-scaling-stroke; }
.card-radar-spoke { stroke: var(--gold-dim); stroke-opacity: .22; stroke-width: 1; vector-effect: non-scaling-stroke; }
.card-radar-area { fill: var(--gold); fill-opacity: .38; stroke: var(--gold); stroke-width: 1.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.card-radar-segment { stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.card-radar-shenren { fill: var(--zhu); }
.card-radar-shenren.is-red { fill: var(--zhu); }
.card-radar-shenren.is-blue { fill: var(--recruit); }
.card a:hover .card-radar-plate { stroke-opacity: .9; }

/* ---------- 动态状态：活跃、沉寂、招新、著名 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.status-frame { position: relative; display: block; flex: none; align-self: flex-start; }
.status-frame::before, .status-frame::after { position: absolute; pointer-events: none; }
.card:nth-child(5n+2) { --stagger: -.7s; }
.card:nth-child(5n+3) { --stagger: -1.5s; }
.card:nth-child(5n+4) { --stagger: -2.2s; }
.card:nth-child(5n) { --stagger: -2.9s; }

/* 活跃：绿环呼吸，右下角一颗脉冲灯 */
.status-active::before {
  content: ""; inset: -3px; border: 2px solid var(--live); border-radius: 7px;
  box-shadow: 0 0 9px var(--live-glow);
  animation: status-breathe 3.2s ease-in-out var(--stagger, 0s) infinite;
}
.status-active::after {
  content: ""; right: -4px; bottom: -4px; width: .72rem; height: .72rem; border-radius: 50%;
  background: var(--live); border: 2px solid var(--bg-raised);
  animation: status-pulse 1.6s ease-in-out var(--stagger, 0s) infinite;
}
/* 沉寂：头像褪色，一层灰光极慢地飘 */
.status-dormant .portrait { filter: grayscale(.9) brightness(.82); }
.status-dormant::before {
  content: ""; inset: 0; border-radius: 4px;
  background: linear-gradient(115deg, transparent 25%, var(--ash) 50%, transparent 75%);
  animation: status-ash 9s ease-in-out var(--stagger, 0s) infinite;
}
/* 招新：蓝色声呐往外扩，两圈错开半拍 */
.status-recruiting::before, .status-recruiting::after {
  content: ""; inset: -1px; right: -1px; bottom: -1px; width: auto; height: auto;
  background: none; border: 2px solid var(--recruit); border-radius: 7px; box-shadow: none;
  animation: status-sonar 2.8s ease-out var(--stagger, 0s) infinite;
}
.status-recruiting::after { animation-delay: calc(var(--stagger, 0s) - 1.4s); }
/* 军团靠标签说话，不再挂脉冲灯 */
.corp-frame.status-active:not(.status-recruiting)::after { content: none; }

/* 战徽上的标签：扫光走一遍，沉寂不扫 */
.corp-emblem { object-fit: contain; }
.status-tags {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: -.45rem;
  display: flex; justify-content: center; gap: 2px;
}
.status-tag {
  position: relative; overflow: hidden; padding: 0 .28rem; border-radius: 3px;
  color: #fff; font-size: .66rem; font-weight: 700; line-height: 1.2rem; white-space: nowrap;
}
.tag-live { background: var(--live-solid); }
.tag-recruit { background: var(--recruit-solid); }
.tag-ash { background: #6d685e; }
.tag-live::after, .tag-recruit::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-110%);
  animation: status-sheen 3.6s ease-in-out var(--stagger, 0s) infinite;
}
.tag-recruit::after { animation-delay: calc(var(--stagger, 0s) - 1.8s); }
.status-frame-lg .status-tag { padding: 0 .5rem; font-size: .8rem; line-height: 1.5rem; }
.status-frame-lg .status-tags { gap: 4px; bottom: -.6rem; }

/* 著名：金光斜扫卡片，右上角一枚“名”字印；战神、大亨、神人、UP 主不用方块字印，全靠头像外框、HUD 与挂件呈现 */
.card.is-famous a { position: relative; border-color: var(--gold-dim); box-shadow: 0 0 12px -6px var(--gold); }
.fame-sweep { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius); pointer-events: none; }
.fame-sweep::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(105deg, transparent, var(--fame-sweep), transparent);
  transform: translateX(-120%) skewX(-12deg);
  animation: fame-sweep 7s ease-in-out var(--stagger, 0s) infinite;
}
.fame-seal {
  position: absolute; z-index: 2; top: -.6rem; right: .5rem;
  display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 3px;
  background: var(--gold); color: var(--bg);
  font-family: var(--serif); font-size: .82rem; font-weight: 700; line-height: 1;
  animation: fame-seal 3.5s ease-in-out var(--stagger, 0s) infinite;
}
.status-frame-lg .fame-sweep { border-radius: 6px; }
.status-frame-lg .fame-seal { top: -.5rem; right: -.5rem; }

/* 战神：卡片朱砂战纹左缘 + 姓名旁双刃准星击杀勋章（不遮挡头像） */
.card.is-wargod a { border-left: 2px solid var(--zhu); }
.wargod-insignia {
  display: inline-flex; align-items: center; vertical-align: -2px;
  width: 1.35rem; height: 1rem; margin-left: .28rem;
  color: var(--zhu); -webkit-text-fill-color: initial;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5));
}
.wargod-insignia svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wargod-insignia .wg-chevrons { animation: wargod-chevron 2.2s ease-in-out var(--stagger, 0s) infinite; }
.bio-name .wargod-insignia { width: 1.85rem; height: 1.4rem; margin-left: .4rem; vertical-align: -3px; }

/* 大亨：鎏金双线金库边框 + 底部外缘重工齿轮 × 飞翼金砖星币托座 + 浮金星芒 */
.status-frame.is-tycoon .portrait {
  border-color: var(--tycoon);
  box-shadow: inset 0 0 0 1px var(--tycoon-bright), 0 0 10px -2px color-mix(in srgb, var(--tycoon) 65%, transparent);
}
.tycoon-rig {
  position: absolute; z-index: 2; left: 50%; bottom: -9px; transform: translateX(-50%);
  width: 2.5rem; height: 1.2rem; pointer-events: auto;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .75));
}
.tycoon-crest { display: block; width: 100%; height: 100%; }
.tycoon-crest .tc-sparks { animation: tycoon-glint 2.8s ease-in-out var(--stagger, 0s) infinite; }
.status-frame-lg .tycoon-rig { bottom: -7px; width: 3.7rem; height: 1.8rem; }

/* 神人：头像微歪 + 头顶断裂电弧神环 + 太阳穴旁跳动的“？！”脑电波 */
.status-frame.is-shenren .portrait { transform: rotate(-2.5deg); }
.shenren-aura {
  position: absolute; z-index: 2; top: -17px; left: -6px; right: -12px; height: 2rem;
  pointer-events: auto; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8));
}
.shenren-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.shenren-svg .sr-halo {
  transform-origin: 42% 55%;
  animation: shenren-halo 3.2s ease-in-out var(--stagger, 0s) infinite;
}
.shenren-svg .sr-wtf {
  transform-origin: 84% 55%;
  animation: shenren-wtf 1.8s ease-in-out var(--stagger, 0s) infinite;
}
.status-frame-lg .shenren-aura { top: -22px; left: -6px; right: -16px; height: 3rem; }

/* UP 主：头像左下角外缘 B 站粉红双天线小电视挂件 */
.upzhu-tv {
  position: absolute; z-index: 2; left: -7px; bottom: -6px;
  width: 1.38rem; height: 1.28rem; pointer-events: auto;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .65));
  transform-origin: 50% 85%;
  animation: bili-tv-bob 3.6s ease-in-out var(--stagger, 0s) infinite;
}
.upzhu-tv svg { display: block; width: 100%; height: 100%; }
.status-frame-lg .upzhu-tv { left: -5px; bottom: -3px; width: 1.95rem; height: 1.8rem; }

@keyframes status-breathe { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.025); } }
@keyframes status-pulse { 0%, 100% { opacity: .55; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes status-ash { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes status-sonar { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes status-sheen { 0%, 55% { transform: translateX(-110%); } 85%, 100% { transform: translateX(110%); } }
@keyframes fame-sweep { 0%, 45% { transform: translateX(-120%) skewX(-12deg); } 100% { transform: translateX(300%) skewX(-12deg); } }
@keyframes fame-seal { 0%, 100% { transform: rotate(6deg) scale(1); } 50% { opacity: 1; transform: rotate(6deg) scale(1.1); } }
@keyframes wargod-chevron { 0%, 100% { opacity: .45; transform: translateX(0); } 50% { opacity: 1; transform: translateX(1.5px); } }
@keyframes tycoon-glint { 0%, 100% { opacity: .35; transform: translateY(1px); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes shenren-halo { 0%, 100% { opacity: .82; transform: translateY(0) rotate(-4deg); } 50% { opacity: 1; transform: translateY(-2.5px) rotate(3deg); } }
@keyframes shenren-wtf { 0%, 100% { opacity: .75; transform: translateY(1px) scale(.94); } 50% { opacity: 1; transform: translateY(-2px) scale(1.08); } }
@keyframes bili-tv-bob { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(4deg) translateY(-1.5px); } }

/* 滚出视口与要求减少动效时都不动，颜色、灯与挂件照常显示 */
.is-offscreen .status-frame::before, .is-offscreen .status-frame::after,
.is-offscreen .status-tag::after, .is-offscreen .fame-sweep::before, .is-offscreen .fame-seal,
.is-offscreen .wg-chevrons, .is-offscreen .tc-sparks, .is-offscreen .sr-halo, .is-offscreen .sr-wtf, .is-offscreen .upzhu-tv { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .status-frame::before, .status-frame::after, .status-tag::after, .fame-sweep::before, .fame-seal,
  .wg-chevrons, .tc-sparks, .sr-halo, .sr-wtf, .upzhu-tv { animation: none; }
  .status-recruiting::after { content: none; }
  .fame-seal { transform: rotate(6deg); }
  .upzhu-tv { transform: rotate(-6deg); }
}

.status-text-active { color: var(--live); }
.status-text-dormant { color: var(--text-faint); }
.status-text-recruit { color: var(--recruit); }
.status-text-fame { color: var(--gold); }
.status-text-wargod { color: var(--zhu); }
.status-text-tycoon { color: var(--tycoon); }
.status-text-shenren { color: var(--shenren); }
.status-text-upzhu { color: var(--upzhu); }
.chip-live:not(.is-active) { color: var(--live); border-color: var(--live-solid); }
.chip-ash:not(.is-active) { color: var(--text-faint); border-style: dashed; }
.chip-fame:not(.is-active) { color: var(--gold); border-color: var(--gold-dim); }
.chip-wargod:not(.is-active) { color: var(--zhu); border-color: var(--zhu); }
.chip-tycoon:not(.is-active) { color: var(--tycoon); border-color: var(--tycoon); }
.chip-shenren:not(.is-active) { color: var(--shenren); border-color: var(--shenren); }
.chip-upzhu:not(.is-active) { color: var(--upzhu); border-color: var(--upzhu); }
.chip-recruit:not(.is-active) { color: var(--recruit); border-color: var(--recruit); }
.chip-pvp:not(.is-active) { color: var(--meter-pvp-ink); border-color: color-mix(in srgb, var(--meter-pvp-ink) 55%, transparent); }
#corp-sorts .chip-shenren:not(.is-active) { color: var(--meter-shenren-ink); border-color: color-mix(in srgb, var(--meter-shenren-ink) 55%, transparent); }
/* 列传六维排序：未选时字与边框用本维颜色，选中时整枚填色 */
.chip-axis:not(.is-active) { color: var(--axis); border-color: color-mix(in srgb, var(--axis) 55%, transparent); }
.tag-bar .chip-axis.is-active { background: var(--axis); border-color: var(--axis); color: var(--bg); }
.chip-axis-shenren { --axis: var(--axis-shenren); }
.chip-axis-combat { --axis: var(--axis-combat); }
.chip-axis-command { --axis: var(--axis-command); }
.chip-axis-charisma { --axis: var(--axis-charisma); }
.chip-axis-politics { --axis: var(--axis-politics); }
.chip-axis-wealth { --axis: var(--axis-wealth); }
.chip-influence:not(.is-active) { color: var(--meter-inf-ink); border-color: color-mix(in srgb, var(--meter-inf-ink) 55%, transparent); }

/* ---------- 军团目录与军团页：浮夸商业招商风格 × 六大流派 ---------- */
.corp-style-tycoon {
  --corp-c1: var(--style-tycoon-1);
  --corp-c2: var(--style-tycoon-2);
  --corp-pattern: repeating-linear-gradient(135deg, color-mix(in srgb, var(--corp-c1) 7%, transparent) 0 1px, transparent 1px 12px);
}
.corp-style-warlord {
  --corp-c1: var(--style-warlord-1);
  --corp-c2: var(--style-warlord-2);
  --corp-pattern: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--corp-c1) 8%, transparent) 0 6px, transparent 6px 14px);
}
.corp-style-syndicate {
  --corp-c1: var(--style-syndicate-1);
  --corp-c2: var(--style-syndicate-2);
  --corp-pattern:
    linear-gradient(90deg, color-mix(in srgb, var(--corp-c1) 7%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--corp-c1) 7%, transparent) 1px, transparent 1px);
  --corp-pattern-size: 22px 22px;
}
.corp-style-neon {
  --corp-c1: var(--style-neon-1);
  --corp-c2: var(--style-neon-2);
  --corp-pattern: radial-gradient(color-mix(in srgb, var(--corp-c2) 14%, transparent) 1px, transparent 1px);
  --corp-pattern-size: 12px 12px;
}
.corp-style-dynasty {
  --corp-c1: var(--style-dynasty-1);
  --corp-c2: var(--style-dynasty-2);
  --corp-pattern: repeating-linear-gradient(90deg, color-mix(in srgb, var(--corp-c2) 6%, transparent) 0 2px, transparent 2px 18px);
}
.corp-style-phantom {
  --corp-c1: var(--style-phantom-1);
  --corp-c2: var(--style-phantom-2);
  --corp-pattern: repeating-radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--corp-c1) 8%, transparent) 0 1px, transparent 1px 22px);
}
.corp-style-forge {
  --corp-c1: var(--style-forge-1);
  --corp-c2: var(--style-forge-2);
  --corp-pattern: radial-gradient(circle, color-mix(in srgb, var(--corp-c2) 16%, transparent) 0 1.5px, transparent 2px);
  --corp-pattern-size: 26px 26px;
}
.corp-style-abyss {
  --corp-c1: var(--style-abyss-1);
  --corp-c2: var(--style-abyss-2);
  --corp-pattern: repeating-radial-gradient(circle at 0 100%, color-mix(in srgb, var(--corp-c1) 8%, transparent) 0 1px, transparent 1px 16px);
}
.corp-style-academy {
  --corp-c1: var(--style-academy-1);
  --corp-c2: var(--style-academy-2);
  --corp-pattern: linear-gradient(0deg, color-mix(in srgb, var(--corp-c1) 7%, transparent) 1px, transparent 1px);
  --corp-pattern-size: 100% 28px;
}
.corp-style-corsair {
  --corp-c1: var(--style-corsair-1);
  --corp-c2: var(--style-corsair-2);
  --corp-pattern: repeating-linear-gradient(45deg, color-mix(in srgb, var(--corp-c1) 7%, transparent) 0 1px, transparent 1px 16px), repeating-linear-gradient(-45deg, color-mix(in srgb, var(--corp-c1) 7%, transparent) 0 1px, transparent 1px 16px);
}
.corp-style-nebula {
  --corp-c1: var(--style-nebula-1);
  --corp-c2: var(--style-nebula-2);
  --corp-pattern: radial-gradient(circle, color-mix(in srgb, var(--corp-c2) 22%, transparent) 0 1px, transparent 1.5px), radial-gradient(circle, color-mix(in srgb, var(--corp-c1) 16%, transparent) 0 1px, transparent 1.5px);
  --corp-pattern-size: 37px 29px, 23px 41px;
}

.corp-filters {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-top: .75rem;
}
.corp-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem 1.6rem;
}
.corp-filter-row .toolbar {
  margin: 0;
  flex: 1 1 320px;
}
.corp-filter-group {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.corp-filter-row .corp-filter-group {
  flex: 0 1 auto;
}
/* 筛选／排序组标题：朱砂短竖线 + 正文色粗体，与淡色标签拉开层级 */
.corp-filter-heading {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.9rem;
}
.corp-filter-heading::before {
  content: "";
  width: 3px;
  height: .95em;
  border-radius: 2px;
  background: var(--zhu);
}
.corp-filter-group .tag-wrap { flex: 1; min-width: 0; margin-top: 0; }
.roster-filters .corp-filter-row .toolbar { flex: 1 1 15rem; }
.roster-filters .corp-filter-row { gap: .45rem 1.1rem; }
.page-corps .filter-status {
  font-size: .82rem;
  color: var(--text-dim);
  margin: .35rem 0 0;
  line-height: 1.4;
}
#corp-cards.is-default > :not([data-group="recruiting"]) { display: none; }

/* 目录网格：招商名片。顶上一块实色招牌门头，流派靠门头下沿的大轮廓与战徽框形状区分；正文素底，不铺纹样 */
.cards.corp-cards {
  margin-top: 1rem;
  gap: 1.1rem .9rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19.5rem), 1fr));
}
.corp-card .corp-card-link {
  --edge: 12px;
  --plate: color-mix(in srgb, var(--corp-c1) var(--corp-plate-mix), #121216);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: .7rem; height: 100%;
  padding: 0 .9rem .8rem; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--corp-c1) 30%, var(--line));
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.corp-card .corp-card-link:focus-visible { outline-offset: -4px; }
.corp-card .corp-card-link:hover {
  transform: translateY(-2px);
  border-color: var(--corp-c1);
  box-shadow: var(--panel-shadow), 0 12px 30px -14px color-mix(in srgb, var(--corp-c1) 55%, transparent);
}

/* 招牌门头：实色底，只放联盟、区域与状态 */
.corp-card-ribbon {
  display: flex; align-items: center; justify-content: space-between; gap: .4rem;
  margin: 0 -.9rem; padding: .5rem .9rem calc(.5rem + var(--edge));
  background: var(--plate); color: #fff;
}
.corp-card-meta {
  min-width: 0; font-size: .74rem; color: rgba(255, 255, 255, .82);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.corp-card-meta strong { color: #fff; font-family: var(--mono); font-weight: 700; }
/* 联盟徽标放大淡化作卡片底图：偏右下、出血裁切、向左上渐隐，压在面板底色之上、文字之下 */
:root { --al-backdrop-opacity: .17; }
:root[data-theme="light"] { --al-backdrop-opacity: .22; }
.corp-al-backdrop {
  position: absolute; z-index: -1; right: -22%; bottom: -14%;
  width: 82%; height: auto; aspect-ratio: 1; pointer-events: none;
  opacity: var(--al-backdrop-opacity); filter: saturate(.6);
  -webkit-mask-image: radial-gradient(circle at 60% 60%, #000 35%, transparent 70%);
  mask-image: radial-gradient(circle at 60% 60%, #000 35%, transparent 70%);
  transition: opacity .3s, transform .6s;
}
.corp-card-link:hover .corp-al-backdrop { opacity: calc(var(--al-backdrop-opacity) * 1.4); transform: rotate(-6deg) scale(1.04); }
@media (prefers-reduced-motion: reduce) { .corp-card-link:hover .corp-al-backdrop { transform: none; } }
.corp-card-ribbon .pill-ash { background: rgba(0, 0, 0, .28); color: rgba(255, 255, 255, .8); }

/* 财阀：证券抬头——平直门头，下压金色双线 */
.corp-style-tycoon .corp-card-ribbon { padding-bottom: .55rem; margin-bottom: .15rem; border-bottom: 4px double var(--corp-c2); }

/* 军阀：装甲——门头整条斜切，八角战徽框 */
.corp-style-warlord .corp-card-ribbon { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--edge)), 0 100%); }
.corp-style-warlord .corp-crest-sm {
  --oct: polygon(28% 0, 72% 0, 100% 28%, 100% 72%, 72% 100%, 28% 100%, 0 72%, 0 28%);
  border: 0; border-radius: 0; padding: 2px;
  background: linear-gradient(160deg, var(--corp-c1), var(--corp-c2));
  clip-path: var(--oct);
}
.corp-style-warlord .corp-crest-sm img { border-radius: 0; clip-path: var(--oct); background: var(--bg-sunk); }

/* 商会：档案夹——门头右侧下垂一块标签页，方角盖印战徽框 */
.corp-style-syndicate .corp-card-link { border-radius: 3px; }
.corp-style-syndicate .corp-card-ribbon {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 64% 100%, calc(64% - var(--edge)) calc(100% - var(--edge)), 0 calc(100% - var(--edge)));
}
.corp-style-syndicate .corp-crest-sm {
  border-radius: 0; border-color: var(--corp-c1);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--corp-c1) 30%, transparent);
}
.corp-style-syndicate .corp-crest-sm img { border-radius: 0; }

/* 霓虹：灯箱——双色渐变门头带一道灯光，大圆角，发光圆形战徽框 */
.corp-style-neon .corp-card-link { border-radius: 16px; }
.corp-style-neon .corp-card-ribbon {
  padding-bottom: .55rem; margin-bottom: .15rem;
  background: linear-gradient(100deg, var(--plate), color-mix(in srgb, var(--corp-c2) var(--corp-plate-mix), #121216));
  box-shadow: 0 3px 0 -1px var(--corp-c2), 0 6px 16px -4px color-mix(in srgb, var(--corp-c2) 70%, transparent);
}
.corp-style-neon .corp-crest-sm {
  border: 0; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--corp-c1), 0 0 14px -3px var(--corp-c1);
}
.corp-style-neon .corp-crest-sm img { border-radius: 50%; }

/* 王朝：牌匾——门头正中垂下吊坠尖角，粗边印章战徽框 */
.corp-style-dynasty .corp-card-link { border-radius: 3px; }
.corp-style-dynasty .corp-card-ribbon {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--edge)), calc(50% + var(--edge) * 1.4) calc(100% - var(--edge)), 50% 100%, calc(50% - var(--edge) * 1.4) calc(100% - var(--edge)), 0 calc(100% - var(--edge)));
}
.corp-style-dynasty .corp-crest-sm {
  border: 3px solid var(--corp-c1); border-radius: 4px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--corp-c2) 55%, transparent);
}

/* 幽灵：暗影——门头向右渐隐，虚线外框，虚线圆形战徽框 */
.corp-style-phantom .corp-card-link {
  border-radius: 18px 3px 18px 3px; border-style: dashed;
  border-color: color-mix(in srgb, var(--corp-c1) 50%, var(--line));
}
.corp-style-phantom .corp-card-ribbon {
  padding-bottom: .5rem; margin-bottom: .15rem;
  background: linear-gradient(90deg, var(--plate) 35%, color-mix(in srgb, var(--corp-c1) 12%, transparent));
}
.corp-style-phantom .corp-crest-sm {
  border: 1px dashed var(--corp-c2); border-radius: 50%;
  box-shadow: 0 0 18px -6px color-mix(in srgb, var(--corp-c1) 60%, transparent);
}
.corp-style-phantom .corp-crest-sm img { border-radius: 50%; }

/* 重工：船坞——门头左高右低一级台阶，厚底座，六角战徽框 */
.corp-style-forge .corp-card-link {
  border-radius: 3px;
  border-bottom: 4px solid color-mix(in srgb, var(--corp-c2) 55%, var(--line));
}
.corp-style-forge .corp-card-ribbon {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--edge)), 58% calc(100% - var(--edge)), calc(58% - var(--edge)) 100%, 0 100%);
}
.corp-style-forge .corp-crest-sm {
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  width: calc(64px * .866); /* 正六边形宽高比 √3:2，方盒会把它撑扁 */
  border: 0; border-radius: 0; padding: 2px;
  background: linear-gradient(180deg, var(--corp-c2), color-mix(in srgb, var(--corp-c2) 45%, var(--bg-sunk)));
  clip-path: var(--hex);
}
.corp-style-forge .corp-crest-sm img { border-radius: 0; clip-path: var(--hex); background: var(--bg-sunk); }

/* 深渊：虫洞——门头下沿挖出一道凹弧，底部圆角，同心环战徽框 */
.corp-style-abyss .corp-card-link { border-radius: 6px 6px 20px 20px; }
.corp-style-abyss .corp-card-ribbon {
  -webkit-mask: radial-gradient(ellipse 58% var(--edge) at 50% 100%, transparent 97%, #000);
  mask: radial-gradient(ellipse 58% var(--edge) at 50% 100%, transparent 97%, #000);
}
.corp-style-abyss .corp-crest-sm {
  border: 1px solid var(--corp-c1); border-radius: 50%;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px color-mix(in srgb, var(--corp-c1) 50%, transparent), 0 0 0 7px var(--surface), 0 0 0 8px color-mix(in srgb, var(--corp-c2) 30%, transparent);
}
.corp-style-abyss .corp-crest-sm img { border-radius: 50%; }

/* 学院：练习簿——门头右侧垂下一条书签，双线圆角战徽框 */
.corp-style-academy .corp-card-link { border-radius: 3px 12px 12px 3px; }
.corp-style-academy .corp-card-ribbon {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--edge)), calc(100% - 1.6rem) calc(100% - var(--edge)), calc(100% - 1.6rem) 100%, calc(100% - 2.15rem) calc(100% - 5px), calc(100% - 2.7rem) 100%, calc(100% - 2.7rem) calc(100% - var(--edge)), 0 calc(100% - var(--edge)));
}
.corp-style-academy .corp-crest-sm { border: 3px double var(--corp-c1); border-radius: 14px; padding: 2px; }
.corp-style-academy .corp-crest-sm img { border-radius: 9px; }

/* 海盗：私掠旗——门头下沿一排大锯齿，四角内凹的票券战徽框（上下左右对称，不裁徽标） */
.corp-style-corsair .corp-card-ribbon {
  -webkit-mask:
    linear-gradient(#000, #000) top / 100% calc(100% - var(--edge)) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) bottom left / calc(var(--edge) * 2) var(--edge) repeat-x;
  mask:
    linear-gradient(#000, #000) top / 100% calc(100% - var(--edge)) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) bottom left / calc(var(--edge) * 2) var(--edge) repeat-x;
}
.corp-style-corsair .corp-crest-sm,
.corp-style-corsair .corp-crest-sm img {
  --scoop: radial-gradient(circle at 0 0, #0000 var(--r), #000 calc(var(--r) + .5px)) top left / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0, #0000 var(--r), #000 calc(var(--r) + .5px)) top right / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, #0000 var(--r), #000 calc(var(--r) + .5px)) bottom left / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--r), #000 calc(var(--r) + .5px)) bottom right / 51% 51% no-repeat;
  -webkit-mask: var(--scoop); mask: var(--scoop);
}
.corp-style-corsair .corp-crest-sm {
  --r: 11px;
  border: 0; border-radius: 0; padding: 3px;
  background: linear-gradient(180deg, var(--corp-c2), var(--corp-c1));
}
.corp-style-corsair .corp-crest-sm img { --r: 8px; border-radius: 0; background: var(--bg-sunk); }

/* 星云：天穹——门头下沿鼓成一道圆弧，带卫星的轨道战徽框 */
.corp-style-nebula .corp-card-link { border-radius: 14px; }
.corp-style-nebula .corp-card-ribbon {
  background: linear-gradient(100deg, var(--plate), color-mix(in srgb, var(--corp-c1) calc(var(--corp-plate-mix) - 18%), #121216));
  -webkit-mask:
    linear-gradient(#000, #000) top / 100% calc(100% - var(--edge)) no-repeat,
    radial-gradient(ellipse 50% 100% at 50% 0, #000 98%, transparent) bottom / 100% var(--edge) no-repeat;
  mask:
    linear-gradient(#000, #000) top / 100% calc(100% - var(--edge)) no-repeat,
    radial-gradient(ellipse 50% 100% at 50% 0, #000 98%, transparent) bottom / 100% var(--edge) no-repeat;
}
.corp-style-nebula .corp-crest-sm {
  position: relative; border-radius: 50%; border-color: var(--corp-c1);
  outline: 1px dotted var(--corp-c2); outline-offset: 4px;
}
.corp-style-nebula .corp-crest-sm::after {
  content: ""; position: absolute; top: 1px; right: 1px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--corp-c2); box-shadow: 0 0 6px var(--corp-c2);
}
.corp-style-nebula .corp-crest-sm img { border-radius: 50%; }

/* 财阀战徽：双圈 */
.corp-style-tycoon .corp-crest-sm {
  border-color: var(--corp-c1);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--corp-c1) 55%, transparent);
}
.corp-card-pills { display: inline-flex; align-items: center; gap: .25rem; flex: none; }
.corp-pill {
  display: inline-flex; align-items: center; padding: .08rem .42rem; border-radius: 3px;
  font-size: .68rem; font-weight: 700; line-height: 1.35; letter-spacing: .03em; white-space: nowrap;
}
.pill-live { background: var(--live-solid); color: #fff; }
.pill-recruit { background: var(--recruit-solid); color: #fff; }
.pill-ash { background: color-mix(in srgb, var(--text-faint) 30%, var(--bg-sunk)); color: var(--text-dim); }
.pill-invite { border: 1px solid var(--line); color: var(--text-dim); background: var(--bg-sunk); }

.corp-card-head { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.corp-crest-sm {
  flex: none; display: grid; place-items: center; width: 64px; height: 64px; padding: 3px;
  border-radius: 6px; background: var(--bg-sunk);
  border: 1px solid color-mix(in srgb, var(--corp-c1) 55%, var(--line));
}
.corp-crest-sm img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.corp-crest-sm.is-dormant img, .corp-crest.is-dormant img { filter: grayscale(.85) brightness(.85); }
.corp-card-id { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.corp-card-title {
  font-family: var(--serif); font-weight: 700; font-size: 1.18rem; line-height: 1.25;
  color: var(--text); overflow-wrap: anywhere;
}
.corp-ticker-sm {
  display: inline-block; vertical-align: .08em; padding: 0 .32rem; border-radius: 3px;
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  color: var(--corp-c1); background: color-mix(in srgb, var(--corp-c1) 13%, var(--bg-sunk));
  border: 1px solid color-mix(in srgb, var(--corp-c1) 35%, transparent);
}
.corp-card-en {
  font-size: .76rem; color: var(--text-faint); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.corp-card-aff { font-size: .78rem; color: var(--text-dim); line-height: 1.35; }
.corp-card-aff strong { color: var(--corp-c2); font-weight: 700; }

/* 宣传语完整显示，不截断 */
.corp-card-pitch {
  display: block; margin: 0; padding: .1rem 0 .1rem .7rem;
  border-left: 2px solid var(--corp-c1);
  color: var(--text); font-family: var(--serif); font-size: .9rem; line-height: 1.6; text-wrap: pretty;
}

/* 详情页牌匾沿用流派边框 */
.corp-style-warlord .corp-billboard { border-radius: 3px; }
.corp-style-warlord .corp-billboard::before { height: 4px; background: repeating-linear-gradient(-45deg, var(--corp-c1) 0 8px, var(--corp-c2) 8px 16px); }
.corp-style-syndicate .corp-billboard { border-radius: 4px; border-left-width: 3px; }
.corp-style-neon .corp-billboard { border-radius: 12px; box-shadow: var(--panel-shadow), 0 0 22px -12px color-mix(in srgb, var(--corp-c1) 50%, transparent); }
.corp-style-forge .corp-billboard { border-radius: 3px; border-bottom-width: 4px; }
.corp-style-abyss .corp-billboard { border-radius: 10px 10px 28px 28px; }
.corp-style-academy .corp-billboard { border-radius: 3px 12px 12px 3px; border-left: 6px solid var(--corp-c1); }
.corp-style-corsair .corp-billboard { border-radius: 0 0 16px 16px; }
.corp-style-nebula .corp-billboard { border-radius: 14px; }
.corp-style-phantom .corp-billboard { box-shadow: var(--panel-shadow), inset 0 1px 18px -10px color-mix(in srgb, var(--corp-c1) 45%, transparent); }

/* ---------- 三维评价横条（RPG 装甲/HP 条风格） ---------- */
.corp-ratings {
  display: grid; gap: .34rem; padding: .45rem .55rem; border-radius: 5px;
  background: color-mix(in srgb, var(--bg-sunk) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.corp-meter { display: flex; align-items: center; gap: .48rem; min-width: 0; }
.meter-pvp { --m-a: var(--meter-pvp-a); --m-b: var(--meter-pvp-b); --m-ink: var(--meter-pvp-ink); }
.meter-shenren { --m-a: var(--meter-shenren-a); --m-b: var(--meter-shenren-b); --m-ink: var(--meter-shenren-ink); }
.meter-influence { --m-a: var(--meter-inf-a); --m-b: var(--meter-inf-b); --m-ink: var(--meter-inf-ink); }

.meter-label {
  flex: 0 0 3.3em; font-size: .75rem; font-weight: 700; letter-spacing: .03em;
  color: var(--text-dim); white-space: nowrap;
}
.meter-bar {
  position: relative; flex: 1; min-width: 0; height: 9px; border-radius: 2px; overflow: hidden;
  background: var(--meter-track);
  border: 1px solid color-mix(in srgb, var(--m-ink) 32%, var(--line));
  transform: skewX(-12deg);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45);
}
/* 10 格血条刻度线 */
.meter-bar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--meter-tick) calc(10% - 1px) 10%);
}
.meter-fill {
  display: block; height: 100%; min-width: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .32) 0%, transparent 48%, rgba(0, 0, 0, .22) 100%),
    linear-gradient(90deg, var(--m-a), var(--m-b));
  box-shadow: 0 0 8px color-mix(in srgb, var(--m-b) 55%, transparent);
}
.meter-shenren.is-alert .meter-fill {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .18) 0 4px, transparent 4px 8px),
    linear-gradient(90deg, var(--m-a), var(--m-b));
}
.meter-num {
  flex: 0 0 2.1em; text-align: right; font-family: var(--mono); font-size: .76rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--m-ink);
}

.corp-card-foot {
  margin-top: auto; padding-top: .4rem; border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .65rem;
  font-size: .75rem; color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.corp-card-foot strong { color: var(--text-dim); }
.corp-rank-chip {
  margin-left: auto; padding: 0 .38rem; border-radius: 3px;
  font-size: .7rem; font-weight: 700; white-space: nowrap;
  color: var(--corp-c1); background: color-mix(in srgb, var(--corp-c1) 12%, transparent);
}

/* 详情页招新横幅：群号旁的复制按钮，无 JS 时隐藏 */
.corp-qq {
  display: inline-flex; align-items: center; margin-left: .35rem; padding: .08rem .5rem;
  border-radius: 4px; cursor: pointer; vertical-align: 1px;
  border: 1px dashed color-mix(in srgb, var(--recruit) 55%, var(--line));
  background: color-mix(in srgb, var(--recruit) 9%, transparent);
  font: inherit; font-size: .78rem;
  transition: border-color .16s, background .16s;
}
.corp-qq-act { font-weight: 700; color: var(--recruit); white-space: nowrap; }
.corp-qq:hover, .corp-qq:focus-visible { border-style: solid; background: color-mix(in srgb, var(--recruit) 16%, transparent); }
.corp-qq.is-copied { border-style: solid; border-color: var(--live); }
.corp-qq.is-copied .corp-qq-act { color: var(--live); }

/* ---------- 军团详情页：巨幅集团招商路演牌匾 ---------- */
.page-corp .back, .page-corp .corp-pager, .bio.corp { max-width: 48rem; }
.corp-billboard {
  position: relative; isolation: isolate; overflow: hidden;
  margin: .5rem 0 1.75rem; padding: 1.1rem 1.35rem 1.25rem; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--corp-c1) 50%, var(--line));
  background:
    radial-gradient(ellipse 80% 55% at 8% 0%, color-mix(in srgb, var(--corp-c1) 20%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 60% at 96% 100%, color-mix(in srgb, var(--corp-c2) 15%, transparent), transparent 72%),
    var(--corp-pattern),
    var(--surface);
  background-size: auto, auto, var(--corp-pattern-size, auto), auto;
  box-shadow:
    var(--panel-shadow),
    inset 0 0 0 1px color-mix(in srgb, var(--corp-c2) 18%, transparent),
    0 18px 42px -24px color-mix(in srgb, var(--corp-c1) 45%, rgba(0, 0, 0, .8));
}
.corp-billboard::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; pointer-events: none;
  background: linear-gradient(90deg, var(--corp-c1), var(--corp-c2), var(--corp-c1));
}
.corp-style-dynasty .corp-billboard {
  box-shadow:
    var(--panel-shadow),
    inset 0 0 0 4px color-mix(in srgb, var(--corp-c2) 22%, transparent),
    0 18px 42px -24px color-mix(in srgb, var(--corp-c1) 45%, rgba(0, 0, 0, .8));
}
.corp-watermark {
  position: absolute; right: -1.5rem; top: 1.5rem; z-index: -1;
  width: 14rem; height: 14rem; object-fit: contain; pointer-events: none;
  opacity: .08; filter: saturate(1.3); transform: rotate(-6deg);
}

.corp-marquee {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .75rem;
  padding-bottom: .75rem; margin-bottom: 1rem;
  border-bottom: 1px dashed color-mix(in srgb, var(--corp-c1) 35%, var(--line));
}
.corp-marquee-left, .corp-marquee-right { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.corp-aff-tag {
  display: inline-flex; align-items: center; padding: .14rem .55rem; border-radius: 4px;
  font-size: .76rem; font-weight: 700; text-decoration: none;
  color: var(--corp-c1); background: color-mix(in srgb, var(--corp-c1) 14%, var(--bg-sunk));
  border: 1px solid color-mix(in srgb, var(--corp-c1) 42%, transparent);
}
a.corp-aff-tag:hover { border-color: var(--corp-c1); filter: brightness(1.1); }
.corp-zone-tag {
  display: inline-flex; align-items: center; padding: .12rem .48rem; border-radius: 4px;
  font-size: .74rem; font-weight: 700; color: var(--corp-c2);
  background: color-mix(in srgb, var(--corp-c2) 11%, var(--bg-sunk));
  border: 1px solid color-mix(in srgb, var(--corp-c2) 34%, transparent);
}

.corp-hero-body { display: flex; align-items: flex-start; gap: 1.2rem; min-width: 0; }
.corp-crest {
  flex: none; display: grid; place-items: center; width: 116px; height: 116px; padding: 6px;
  border-radius: 8px; background: var(--bg-sunk);
  border: 1px solid color-mix(in srgb, var(--corp-c1) 65%, var(--line));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--bg) 85%, transparent),
    0 0 0 4px color-mix(in srgb, var(--corp-c2) 45%, transparent),
    0 14px 28px -14px rgba(0, 0, 0, .75);
}
.corp-crest-img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.corp-id { flex: 1; min-width: 0; }
.corp-title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem .65rem; }
.corp-name {
  margin: 0; font-family: var(--serif); font-weight: 900;
  font-size: clamp(1.8rem, 5.5vw, 2.6rem); line-height: 1.18; letter-spacing: .05em;
  color: var(--text); overflow-wrap: anywhere;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .corp-name {
    background: linear-gradient(180deg, var(--text) 20%, var(--corp-c1) 125%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
  }
}
.corp-suffix {
  margin-left: .35em; font-size: .5em; font-weight: 700; letter-spacing: .18em;
  color: var(--corp-c2); -webkit-text-fill-color: var(--corp-c2);
}
.corp-ticker {
  padding: .1rem .5rem; border-radius: 4px; font-family: var(--mono); font-size: .88rem; font-weight: 800;
  color: var(--corp-c1); background: color-mix(in srgb, var(--corp-c1) 14%, var(--bg-sunk));
  border: 1px solid color-mix(in srgb, var(--corp-c1) 42%, transparent);
}
.corp-reg { margin: .3rem 0 0; font-size: .9rem; color: var(--text-dim); line-height: 1.5; overflow-wrap: anywhere; }
.corp-slogan {
  margin: .65rem 0 0; padding: .48rem .75rem; border-radius: 5px;
  border-left: 3px solid var(--corp-c1);
  background: linear-gradient(90deg, color-mix(in srgb, var(--corp-c1) 13%, var(--bg-sunk)), transparent 95%);
  font-family: var(--serif); font-size: 1.05rem; font-weight: 700; line-height: 1.5; color: var(--text);
}
.corp-quote-mark { color: var(--corp-c1); font-size: 1.2em; margin: 0 .08em; }

/* 四个路演大指标格 */
.corp-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem;
  margin-top: 1.1rem;
}
.corp-kpi {
  display: flex; flex-direction: column; gap: .12rem; min-width: 0;
  padding: .6rem .75rem; border-radius: 6px;
  background: color-mix(in srgb, var(--bg-sunk) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--corp-c1) 24%, var(--line-soft));
}
.kpi-label { font-size: .74rem; font-weight: 700; letter-spacing: .08em; color: var(--text-faint); }
.kpi-val {
  font-family: var(--serif); font-size: 1.38rem; font-weight: 900; line-height: 1.2;
  color: var(--corp-c1); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.kpi-val a { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
.kpi-val small { margin-left: .2em; font-family: var(--sans); font-size: .56em; font-weight: 600; color: var(--text-dim); }
.kpi-val-zone { font-size: 1.15rem; color: var(--corp-c2); }
.kpi-sub { font-size: .75rem; color: var(--text-dim); line-height: 1.35; }

/* 详情页三维血条面板 */
.corp-eval-box {
  margin-top: .85rem; padding: .7rem .85rem .8rem; border-radius: 6px;
  background: color-mix(in srgb, var(--bg-sunk) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--corp-c2) 26%, var(--line));
}
.corp-eval-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem;
  margin-bottom: .5rem;
}
.corp-eval-title { font-family: var(--serif); font-size: .92rem; font-weight: 700; letter-spacing: .06em; color: var(--corp-c2); }
.corp-eval-sub { font-size: .74rem; color: var(--text-faint); }
.corp-ratings-lg { padding: 0; background: none; border: 0; gap: .5rem; }
.corp-ratings-lg .meter-label { flex: 0 0 3.8em; font-size: .86rem; color: var(--text); }
.corp-ratings-lg .meter-bar { height: 12px; border-radius: 3px; }
.corp-ratings-lg .meter-num { flex: 0 0 2.5em; font-size: .9rem; }

/* 招新皇榜专线横幅 */
.corp-cta {
  margin-top: .85rem; padding: .65rem .85rem; border-radius: 6px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem 1rem;
  background: color-mix(in srgb, var(--bg-sunk) 70%, transparent);
  border: 1px solid var(--line);
}
.corp-cta.is-open {
  background: linear-gradient(90deg, color-mix(in srgb, var(--corp-c1) 18%, var(--bg-sunk)), color-mix(in srgb, var(--recruit) 14%, var(--bg-sunk)));
  border-color: color-mix(in srgb, var(--corp-c1) 50%, var(--recruit));
}
.corp-cta-main { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; min-width: 0; }
.corp-cta-badge {
  padding: .12rem .48rem; border-radius: 3px; font-size: .74rem; font-weight: 800; letter-spacing: .05em;
  background: var(--corp-c1); color: var(--bg); white-space: nowrap;
}
.corp-cta-text { font-size: .9rem; color: var(--text); overflow-wrap: anywhere; }
.corp-cta-text strong { font-family: var(--mono); font-size: 1rem; color: var(--corp-c2); letter-spacing: .03em; }
.corp-cta-btn {
  display: inline-flex; align-items: center; padding: .35rem .75rem; border-radius: 4px;
  font-size: .84rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  color: var(--bg); background: linear-gradient(90deg, var(--corp-c1), var(--corp-c2));
  box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--corp-c1) 70%, transparent);
}
.corp-cta-btn:hover { color: var(--bg); filter: brightness(1.08); }

/* 军团页人物名录、正文与参战录也跟随该团商业主色 */
.corp .corp-roll {
  max-width: none; margin: 1.35rem 0; padding: .7rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--corp-c1) 26%, var(--line-soft));
  border-left: 3px solid var(--corp-c1); border-radius: 6px;
  background: var(--surface); box-shadow: var(--panel-shadow);
}
.corp-roll summary { cursor: pointer; }
.corp-roll summary h2 { display: inline; margin: 0; font-family: var(--serif); font-size: 1.05rem; color: var(--corp-c1); }
.corp-roll summary small { margin-left: .45rem; color: var(--text-dim); }
.corp-roll .chips { margin-bottom: .5rem; }
.corp-members-head { margin: .75rem 0 .3rem; color: var(--text-faint); font-size: .85rem; }
.corp-battles { margin: .5rem 0 0; padding: 0; list-style: none; }
.corp-battles li { padding: .32rem 0; border-bottom: 1px solid var(--line-soft); }
.corp-battles li:last-child { border-bottom: 0; }
.corp-battles small { margin-left: .4rem; color: var(--text-faint); }

.corp-prose h2 {
  border-left: 4px solid var(--corp-c1);
  padding: .2rem .75rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--corp-c1) 11%, transparent), transparent 85%);
  border-radius: 0 4px 4px 0;
}
.corp-prose blockquote {
  border-left: 3px solid var(--corp-c2);
  background: color-mix(in srgb, var(--corp-c2) 7%, var(--bg-sunk));
  font-style: normal;
}
.corp-snapshot { padding-left: 0; padding-right: 0; margin-top: 1.25rem; }

@media (max-width: 680px) {
  .corp-billboard { padding: .9rem .95rem 1rem; }
  .corp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .corp-crest { width: 84px; height: 84px; padding: 4px; }
  .corp-ratings-lg .meter-label { flex: 0 0 3.5em; font-size: .8rem; }
}
@media (max-width: 520px) {
  .corp-hero-body { gap: .85rem; }
  .corp-slogan { font-size: .95rem; padding: .4rem .6rem; }
  .corp-cta { flex-direction: column; align-items: stretch; }
  .corp-cta-btn { justify-content: center; }
}

/* ---------- 列传页 ---------- */
.back { max-width: var(--measure); margin: 0 auto; font-size: .9rem; }
.back a { display: inline-block; padding: .25rem 0; color: var(--text-dim); text-decoration: none; }
.back a:hover { color: var(--gold); }
.bio { max-width: var(--measure); margin: 0 auto; }
.bio-head { display: flex; gap: 1.25rem; align-items: flex-start; margin: .5rem 0 1.25rem; }
.portrait-lg { width: 128px; height: 128px; border-radius: 6px; }
.bio-id { flex: 1 1 0; min-width: 0; }
.bio-name {
  font-family: var(--serif); font-weight: 900; margin: 0;
  font-size: clamp(1.7rem, 6vw, 2.5rem); line-height: 1.2; letter-spacing: .06em;
  overflow-wrap: anywhere;
}
.bio-name a { color: inherit; text-decoration: none; }
.bio-suffix { font-weight: 400; font-size: .55em; color: var(--text-faint); margin-left: .35em; letter-spacing: .2em; }
.bio-charname { margin: .2rem 0 0; color: var(--text-dim); font-size: .95rem; overflow-wrap: anywhere; }
.bio-aliases { margin: .15rem 0 0; color: var(--text-faint); font-size: .88rem; }
.bio-aliases span { color: var(--text-dim); }
.bio-alts { overflow-wrap: anywhere; line-height: 1.5; }
.bio-alts-wrap.is-collapsed .bio-alts { max-height: 1.5em; overflow: hidden; }
.bio-alts-wrap .tag-more { margin-top: .3rem; height: 1.6rem; }
.epithet {
  margin: .6rem 0 0; color: var(--zhu);
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.5;
}

@media (max-width: 520px) {
  .bio-head { gap: .9rem; }
  .portrait-lg { width: 88px; height: 88px; }
}

.bio-facts {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; margin: 0 0 1.75rem; padding: .8rem 1rem;
  background: var(--bg-raised); border: 1px solid var(--line-soft); border-radius: var(--radius);
  font-size: .9rem;
}
.bio-facts > div { display: flex; gap: .9rem; align-items: baseline; }
/* 战役页：战报、时间、地点同排，标签独占一行；窄屏自动折行 */
.bio-facts-row { display: flex; flex-wrap: wrap; gap: .35rem 1.75rem; }
.bio-facts-row > div { gap: .5rem; }
.bio-facts.bio-facts-row dt { width: auto; }
.bio-facts-row > div:has(.chips), .bio-facts-row > div:has(.battle-list-wrap) { flex-basis: 100%; }
.bio-facts dt { flex: none; min-width: 2.5em; white-space: nowrap; color: var(--text-faint); }
.bio-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.person-battles { min-width: 0; }

/* ---------- 头像行右端：微型六维雷达图 ---------- */
.bio:has(.bio-radar-bay) { max-width: 49rem; }
.bio-radar-bay {
  flex-shrink: 0; width: 195px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative;
  margin-left: auto; align-self: center;
}
.radar-chart-wrap { width: 190px; height: 170px; display: flex; align-items: center; justify-content: center; }
.radar-chart-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.radar-ring { fill: none; }
.radar-ring.ring-outer { stroke: var(--line); stroke-width: 1.1; }
.radar-ring.ring-mid { stroke: var(--line-soft); stroke-width: .8; stroke-dasharray: 2 2; }
.radar-ring.ring-baseline { stroke: var(--gold-dim); stroke-width: .9; stroke-dasharray: 3 3; }
.radar-spoke { stroke: var(--line-soft); stroke-width: .85; }
.radar-spoke-unknown { stroke-dasharray: 2 2; }
.radar-partial-segment {
  fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(200, 165, 96, .4));
}
.radar-area {
  fill: url(#radarAreaGlow); stroke: var(--gold); stroke-width: 1.8;
  stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(200, 165, 96, .45));
}
.radar-vertex { fill: var(--gold); stroke: var(--surface); stroke-width: 1.5; }
.radar-vertex.is-red { fill: var(--zhu); }
.radar-vertex.is-blue { fill: var(--recruit); }
.radar-vertex.tier-ex { fill: var(--tier-ex); stroke: #fff; }
.radar-axis-text { font-family: var(--serif); font-size: 13.5px; fill: var(--text); }
.axis-txt-name { font-weight: 700; letter-spacing: .02em; }
.axis-txt-tier { font-family: var(--mono); font-size: 15px; font-weight: 900; }

/* 阶位字色：深浅色各一套变量，两种底色都清晰可辨 */
.tier-ex .axis-txt-tier { fill: var(--tier-ex); font-weight: 900; filter: drop-shadow(0 0 5px var(--tier-ex-glow)); }
.tier-s .axis-txt-tier { fill: var(--tier-s); filter: drop-shadow(0 0 5px var(--tier-s-glow)); }
.tier-a .axis-txt-tier { fill: var(--tier-a); }
.tier-b .axis-txt-tier { fill: var(--tier-b); }
.tier-c .axis-txt-tier { fill: var(--text); }
.tier-d .axis-txt-tier { fill: var(--tier-d); }
.tier-e .axis-txt-tier { fill: var(--tier-e); }
.tier-unknown .axis-txt-tier { fill: var(--text-faint); font-size: 11px; }

/* 展开考据案由按钮与悬浮卡片 */
.radar-inspect-details { width: 100%; position: relative; margin-top: .15rem; }
.radar-inspect-summary {
  text-align: center; cursor: pointer; list-style: none; user-select: none;
  padding: .15rem .4rem; border-radius: 3px; font-size: .72rem; color: var(--text-faint);
  transition: color .15s, background .15s;
}
.radar-inspect-summary::-webkit-details-marker { display: none; }
.radar-inspect-summary:hover { color: var(--gold); background: var(--bg-raised); }
.radar-inspect-details[open] .radar-inspect-summary { color: var(--gold); }
.radar-inspect-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  width: min(390px, 90vw); background: var(--surface);
  border: 1px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); padding: .75rem 1rem;
}
.inspect-axis-item {
  margin-bottom: .35rem; padding-bottom: .35rem; border-bottom: 1px dashed var(--line-soft);
}
.inspect-axis-item:last-child { border-bottom: 0; margin-bottom: 0; }
.inspect-axis-summary {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; list-style: none; font-size: .86rem; font-weight: 700;
  color: var(--text);
}
.inspect-axis-summary::-webkit-details-marker { display: none; }
.inspect-axis-grade { font-family: var(--mono); }
.inspect-axis-body { padding: .2rem 0 .15rem; }
.inspect-axis-reason {
  margin: .15rem 0 .35rem; font-size: .82rem; line-height: 1.65;
  color: var(--text-dim); text-align: justify;
}
.inspect-axis-sources {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .45rem; font-size: .72rem;
}
.inspect-sources-label { color: var(--text-faint); font-family: var(--serif); }
.inspect-axis-sources a {
  display: inline-flex; align-items: center; gap: .2rem; padding: .08rem .35rem;
  background: var(--bg-raised); border: 1px solid var(--line-soft); border-radius: 3px;
  color: var(--link); text-decoration: none; font-size: .72rem;
}
.inspect-verdict-line {
  display: flex; align-items: center; gap: .55rem; margin-top: .5rem; padding-top: .45rem;
  border-top: 1px dashed var(--line-soft);
}
.inspect-verdict-seal {
  flex-shrink: 0; padding: .1rem .35rem; background: var(--zhu); color: #fff9f0;
  font-family: var(--serif); font-size: .68rem; font-weight: 700; border-radius: 2px;
  letter-spacing: .12em; line-height: 1.2;
}
.inspect-verdict-text {
  margin: 0; font-family: var(--serif); font-size: .88rem; font-weight: 600;
  font-style: italic; color: var(--text);
}

@media (max-width: 720px) {
  .bio-head { flex-wrap: wrap; }
  .bio-radar-bay { width: 100%; order: 3; margin: .85rem auto 0; }
  .radar-chart-wrap { margin: 0 auto; }
  .radar-inspect-dropdown { right: auto; left: 50%; transform: translateX(-50%); }
}

/* 正文：衬线、宽行距，适合长篇阅读 */
.prose { font-family: var(--serif); font-size: 1.075rem; line-height: 1.95; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; text-align: left; }
.prose h2, .prose h3 {
  font-family: var(--serif); font-weight: 700; letter-spacing: .05em;
  margin: 2em 0 .6em; line-height: 1.4;
}
.prose h2 { font-size: 1.3rem; padding-left: .7rem; border-left: 3px solid var(--gold); }
.prose h3 { font-size: 1.1rem; color: var(--gold); }
.prose blockquote {
  margin: 1.2em 0; padding: .3em 1em; color: var(--text-dim);
  border-left: 2px solid var(--line); background: var(--bg-sunk);
}
.prose blockquote p { margin: .4em 0; }
.prose img { display: block; margin: 1.2em auto; border-radius: 4px; height: auto; }
.prose hr { border: 0; text-align: center; margin: 2em 0; }
.prose hr::after { content: "◆ ◆ ◆"; color: var(--gold-dim); letter-spacing: .6em; font-size: .7rem; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--bg-sunk); padding: .1em .35em; border-radius: 3px; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose table { border-collapse: collapse; width: fit-content; max-width: 100%; margin: 1.2em 0; font-size: .92em; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .4em .7em; vertical-align: top; }
.prose th { background: var(--bg-sunk); text-align: left; }
.prose del { color: var(--text-faint); }
.prose .term-link { color: var(--term-link); text-decoration: underline dotted; text-underline-offset: .16em; cursor: help; }
.prose .term-link:hover { text-decoration-style: solid; }

.glossary-dialog {
  width: min(30rem, calc(100% - 32px)); max-height: min(75vh, 40rem);
  padding: 1.25rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text); box-shadow: 0 1rem 3rem rgba(0, 0, 0, .4);
  font-family: var(--sans); line-height: 1.7;
}
.glossary-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.glossary-dialog h2 { font: 700 1.25rem var(--serif); margin: 0 2rem .7rem 0; }
.glossary-dialog p { margin: .5rem 0 1rem; }
.glossary-close { position: absolute; top: .45rem; right: .65rem; padding: .1rem .45rem; border: 0; background: none; color: var(--text); font: 1.6rem var(--sans); cursor: pointer; }
.glossary-avoid { display: block; color: var(--text-dim); margin-top: .5rem; }
.glossary-page { max-width: var(--measure); margin: auto; }
.glossary-page h1 { font-family: var(--serif); }
.glossary-page > p { color: var(--text-dim); }
.glossary-list { margin: 1.5rem 0; }
.glossary-list > div { padding: .8rem 0; border-top: 1px solid var(--line-soft); scroll-margin-top: 5rem; overflow-wrap: anywhere; }
.glossary-list > div:target { border-left: 3px solid var(--term-link); padding-left: .8rem; background: var(--bg-raised); }
.glossary-list dt { font-weight: 700; color: var(--term-link); }
.glossary-list dd { margin: .3rem 0 0; }
.glossary-draft { margin-left: .6em; color: var(--text-dim); font: 400 .7rem var(--sans); vertical-align: middle; }

/* 朱批：::: 评 */
.zhupi {
  position: relative; margin: 1.6em 0; padding: .9em 1.1em .9em 3.4em;
  color: var(--zhu); background: var(--zhu-bg);
  border: 1px solid color-mix(in srgb, var(--zhu) 35%, transparent); border-radius: var(--radius);
}
.zhupi p { margin: .3em 0; }
.zhupi-mark {
  position: absolute; left: .8em; top: .95em;
  writing-mode: vertical-rl; letter-spacing: .15em;
  font-weight: 700; font-size: .85rem; line-height: 1;
  padding: .35em .2em; border: 1.5px solid currentColor; border-radius: 3px;
}

/* 红料（正面）/ 黑料（负面）：::: 红料 标题 / ::: 黑料 标题 */
.liao {
  margin: 1.4em 0; padding: .2em 1.1em .5em;
  border-radius: var(--radius); border: 1px solid var(--line-soft);
  border-left-width: 4px;
}
.liao-head {
  display: flex; align-items: center; gap: .55rem;
  margin: .7em 0 .4em !important; font-size: 1.05rem !important; color: var(--text) !important;
}
.liao-badge {
  flex: none; display: inline-grid; place-items: center;
  width: 1.6rem; height: 1.6rem; border-radius: 3px;
  font-size: .85rem; font-weight: 900;
}
.liao p:last-child { margin-bottom: .4em; }
.liao-hong { border-left-color: var(--hong); background: var(--hong-bg); }
.liao-hong .liao-badge { background: var(--hong); color: #fff; }
.liao-hei { border-left-color: var(--hei-edge); background: var(--hei-bg); }
.liao-hei .liao-badge { background: var(--hei); color: var(--hei-fg); box-shadow: inset 0 0 0 1px var(--hei-edge); }
/* 高潮（战役亮点）：::: 高潮 标题，金边金徽，徽记两字故放宽 */
.liao-gaochao { border-left-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, transparent); }
.liao-gaochao .liao-badge { width: auto; padding: 0 .4em; background: var(--gold); color: var(--bg, #fff); }

.liao-count { display: inline-flex; gap: .3rem; margin-right: .45rem; }
.liao-count > span { padding: 0 .35rem; border-radius: 3px; font-size: .72rem; font-weight: 700; }
.lc-hong { background: var(--hong); color: #fff; }
.lc-hei { background: var(--hei); color: var(--hei-fg); box-shadow: inset 0 0 0 1px var(--hei-edge); }

/* 雇佣记录：次要信息，默认折叠 */
.employment {
  margin: 2.5rem 0 0; border: 1px solid var(--line-soft); border-radius: var(--radius);
  font-size: .85rem; color: var(--text-dim);
}
.employment summary { cursor: pointer; padding: .6rem 1rem; color: var(--text-faint); }
.employment summary:hover { color: var(--text-dim); }
.employment ol { list-style: none; margin: 0; padding: 0 1rem .5rem; }
.employment li { display: flex; flex-wrap: wrap; column-gap: 1rem; padding: .3rem 0; border-top: 1px dashed var(--line-soft); }
.employment li.is-npc { color: var(--text-faint); }
.emp-date { font-family: var(--mono); font-size: .8rem; white-space: nowrap; }
.snapshot { margin: 0; padding: .5rem 1rem .8rem; font-size: .78rem; color: var(--text-faint); }

/* 翻页 */
.pager {
  max-width: var(--measure); margin: 2rem auto 0;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: stretch;
}
.pager a {
  display: flex; flex-direction: column; justify-content: center;
  padding: .6rem .8rem; border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text); text-decoration: none;
  font-family: var(--serif); font-weight: 700; min-width: 0; overflow-wrap: anywhere;
}
.pager a:hover { border-color: var(--gold-dim); }
.pager small { font-family: var(--sans); font-weight: 400; font-size: .75rem; color: var(--text-faint); }
.pager-next { text-align: right; }
.pager-random { color: var(--gold) !important; text-align: center; font-family: var(--sans) !important; font-weight: 400 !important; }

/* ---------- 战役：头图、目录 Bento 画廊、详情页分屏舞台与战地实录台 ---------- */
/* 战役头图一律 16:9：有视频封面则完整无遮挡呈现；无封面则在深空雷达星图上以精装徽章左右对阵，斜缝颜色随档位，左朱右青只分阵营、不编码胜负。 */
.battle-emblem {
  position: relative; isolation: isolate; overflow: hidden; container-type: inline-size;
  width: 100%; aspect-ratio: 16 / 9; background: var(--bg-sunk);
}
.battle-emblem-cover { display: block; }
.battle-emblem-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }

/* 无视频战役：深空战术推演档案图版 */
.battle-emblem-archive {
  display: block; background: var(--emblem-plate);
  border: 1px solid var(--line-soft);
}
.battle-archive-plate {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.archive-plate-bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.archive-sys-ghost {
  position: absolute; left: 50%; top: 48%; translate: -50% -50%;
  font: 900 clamp(2.4rem, 16cqw, 4.4rem)/1 var(--sans);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); opacity: .1; white-space: nowrap;
  user-select: none;
}
.archive-tactical-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line-soft) 40%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line-soft) 40%, transparent) 1px, transparent 1px);
  background-size: clamp(14px, 5cqw, 24px) clamp(14px, 5cqw, 24px);
  opacity: .5;
}
.archive-clash {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(.6rem, 4cqw, 1.8rem); padding-inline: clamp(.8rem, 4cqw, 1.6rem);
}
.archive-side {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(.25rem, 1.5cqw, .45rem); max-width: 44%;
}
.archive-crest {
  position: relative;
  width: clamp(2.8rem, 18cqw, 4.4rem); aspect-ratio: 1;
  border-radius: 8px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg-raised) 80%, #000);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, .55);
}
.archive-side-1 .archive-crest {
  border-color: color-mix(in srgb, #e0554a 45%, var(--line));
  box-shadow: 0 4px 14px -3px rgba(0, 0, 0, .55), 0 0 12px -2px rgba(224, 85, 74, .2);
}
.archive-side-2 .archive-crest {
  border-color: color-mix(in srgb, #4f86c6 45%, var(--line));
  box-shadow: 0 4px 14px -3px rgba(0, 0, 0, .55), 0 0 12px -2px rgba(79, 134, 198, .2);
}
.archive-crest img {
  display: block; width: 72%; height: 72%; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6));
}
.archive-initials {
  color: var(--gold); font: 700 clamp(.9rem, 5.5cqw, 1.35rem)/1 var(--serif);
  letter-spacing: .06em;
}
.archive-side-label {
  font: 600 clamp(.66rem, 3cqw, .82rem)/1.2 var(--sans);
  color: var(--text-dim); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.archive-vs-mark {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(.15rem, .8cqw, .3rem); flex-shrink: 0;
}
.archive-vs-line {
  width: 1px; height: clamp(.6rem, 3.5cqw, 1.2rem);
  background: linear-gradient(to bottom, transparent, var(--line), transparent);
}
.archive-vs-badge {
  font: 800 clamp(.58rem, 2.6cqw, .72rem)/1 var(--sans);
  letter-spacing: .12em; color: var(--gold); opacity: .85;
}
.archive-tagline {
  position: absolute; bottom: clamp(.25rem, 1.4cqw, .5rem); inset-inline: 0;
  text-align: center; pointer-events: none;
}
.archive-tagline span {
  font: 700 clamp(.46rem, 1.8cqw, .58rem)/1 var(--sans);
  letter-spacing: .22em; color: var(--text-faint); opacity: .65;
}

/* 规模徽记 */
.tier {
  display: inline-flex; align-items: center; padding: .08rem .46rem; border-radius: 3px;
  font: 700 .72rem/1.45 var(--sans); letter-spacing: .08em; white-space: nowrap; text-decoration: none;
}
a.tier:hover { filter: brightness(1.08); }
.tier-epic { background: var(--zhu); color: #fff; }
a.tier-epic:hover { color: #fff; }
.tier-large { background: var(--gold); color: var(--bg); }
a.tier-large:hover { color: var(--bg); }
.tier-medium { border: 1px solid var(--line); color: var(--text-dim); background: color-mix(in srgb, var(--bg-sunk) 55%, transparent); }
a.tier-medium:hover { border-color: var(--gold-dim); color: var(--gold); }

/* 规模与战斗类型筛选标签带色：未选为色字色边，选中为实底；规模色与徽记一致 */
.tag-bar .chip-hue:not(.is-active) { color: var(--hue); border-color: color-mix(in srgb, var(--hue) 55%, transparent); background: color-mix(in srgb, var(--hue) 8%, transparent); }
.tag-bar .chip-hue:not(.is-active):hover { border-color: var(--hue); }
.tag-bar .chip-hue:not(.is-active) small { color: inherit; opacity: .7; }
.tag-bar .chip-hue.is-active { background: var(--hue); border-color: var(--hue); color: var(--bg); }
.chip-tier-1 { --hue: var(--zhu); }
.chip-tier-2 { --hue: var(--gold); }
.chip-tier-3 { --hue: var(--text-dim); }
.chip-kind-1 { --hue: var(--shenren); }
.chip-kind-2 { --hue: var(--axis-command); }
.chip-kind-3 { --hue: var(--axis-politics); }

/* ---------- 战役目录：筛选说明、年份章头与杂志 Bento 网格 ---------- */
/* 筛选区沿用军团目录的 .corp-filters 分组行；首行搜索框与排序、规模同排，搜索框让出宽度 */
.battle-filters .corp-filter-row .toolbar { flex: 1 1 15rem; }
.battle-filters .corp-filter-row:first-child { gap: .45rem 1.1rem; }
.battle-taxonomy-note { margin: 0; font-size: .78rem; line-height: 1.5; color: var(--text-faint); }

.battle-rows {
  margin: 1rem 0 0; display: grid; gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 820px) {
  .battle-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem 1rem; }
}

.battle-year {
  grid-column: 1 / -1; display: flex; align-items: center; gap: .7rem;
  margin: .75rem 0 -.15rem; font-family: var(--serif); font-size: 1.35rem; font-weight: 900;
  letter-spacing: .08em; color: var(--gold); line-height: 1.2;
}
.battle-year:first-child { margin-top: 0; }
.battle-year::after {
  content: ""; flex: 1; height: 1px; order: 1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold-dim) 55%, transparent), var(--line-soft) 70%, transparent);
}
.battle-year small {
  order: 2; padding: .1rem .55rem; border-radius: 999px;
  font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  color: var(--text-dim); background: var(--bg-raised); border: 1px solid var(--line-soft);
}

.battle-row {
  --tier-c: var(--line);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--tier-c) 36%, var(--line-soft));
  border-radius: 8px; box-shadow: var(--panel-shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.battle-row-epic {
  --tier-c: var(--zhu);
  background:
    radial-gradient(ellipse 70% 75% at 100% 0%, color-mix(in srgb, var(--zhu) 11%, transparent), transparent 72%),
    var(--surface);
}
.battle-row-large { --tier-c: var(--gold); }
.battle-row::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, var(--tier-c), color-mix(in srgb, var(--tier-c) 35%, transparent) 68%, transparent);
}
.battle-row-epic::after {
  height: 3px;
  background: linear-gradient(90deg, var(--zhu), var(--gold) 55%, var(--emblem-blue));
}
.battle-row:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--tier-c) 75%, var(--gold));
  box-shadow: var(--panel-shadow), 0 0 0 1px color-mix(in srgb, var(--tier-c) 55%, var(--gold-dim)), 0 14px 32px -16px color-mix(in srgb, var(--tier-c) 48%, rgba(0, 0, 0, .65));
}
.battle-row:hover .battle-emblem-cover img { transform: scale(1.025); }

.battle-row-body {
  flex: 1; display: flex; flex-direction: column; gap: .45rem; min-width: 0;
  padding: .85rem 1rem .9rem;
}
.battle-row-ribbon {
  display: flex; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; gap: .5rem;
}
.battle-row-meta {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .42rem; min-width: 0;
  font-size: .8rem; color: var(--text-dim); line-height: 1.4;
}
.battle-row-meta time { font-family: var(--mono); font-size: .78rem; color: var(--text-faint); }
.battle-meta-dot { color: var(--text-faint); }
.battle-row-sys { overflow-wrap: anywhere; }
.battle-vid-badge {
  flex: none; padding: .08rem .46rem; border-radius: 999px;
  font-size: .71rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  color: var(--gold); background: color-mix(in srgb, var(--gold) 11%, var(--bg-sunk));
  border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);
}
.battle-row-heading { margin: .05rem 0 0; font-size: inherit; }
.battle-row-title {
  font-family: var(--serif); font-weight: 800; font-size: 1.28rem; line-height: 1.3;
  color: var(--text); text-decoration: none; overflow-wrap: anywhere;
}
.battle-row-title::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: 8px; }
.battle-row:hover .battle-row-title { color: var(--gold); }
.battle-row-epithet {
  margin: 0; color: var(--zhu); font-family: var(--serif); font-size: .92rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.battle-row-foot {
  margin-top: auto; padding-top: .35rem;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .45rem 1rem;
}
.battle-row-sides {
  margin: 0; font-size: .82rem; line-height: 1.45; color: var(--text-dim);
  overflow-wrap: anywhere; text-align: right; flex: 1 1 11rem;
}
.battle-row-sides .side-ink-1 { color: var(--zhu); font-weight: 600; }
.battle-row-sides .side-ink-2 { color: var(--emblem-blue); font-weight: 600; }
.battle-row-sides .vs-mark { font-style: normal; margin: 0 .32em; color: var(--text-faint); font-size: .76rem; }

/* 桌面端：史诗战役与单数收尾卡（.is-solo）横跨整行，左图右文无留白 */
@media (min-width: 820px) {
  .battle-row-epic,
  .battle-row.is-solo {
    grid-column: 1 / -1;
    display: grid; align-items: stretch;
  }
  .battle-row-epic { grid-template-columns: minmax(21rem, 46%) minmax(0, 1fr); }
  .battle-row.is-solo { grid-template-columns: 19.5rem minmax(0, 1fr); }
  .battle-row-epic .battle-emblem,
  .battle-row.is-solo .battle-emblem {
    aspect-ratio: auto; height: 100%; min-height: 11.2rem;
    border-right: 1px solid var(--line-soft);
  }
  .battle-row-epic .battle-emblem { min-height: 14rem; }
  .battle-row-epic .battle-emblem-cover img,
  .battle-row.is-solo .battle-emblem-cover img { position: absolute; inset: 0; }
  .battle-row-epic .battle-row-body { padding: 1.1rem 1.4rem 1.15rem; gap: .55rem; }
  .battle-row-epic .battle-row-title { font-size: clamp(1.48rem, 2.3vw, 1.82rem); line-height: 1.24; }
  .battle-row-epic .battle-row-epithet {
    padding-left: .6rem; border-left: 2.5px solid var(--zhu);
    font-size: .98rem; -webkit-line-clamp: 3;
  }
  .battle-row-epic .battle-stats dd { font-size: 1.85rem; }
}

/* 总损失与人数统计大数字 */
.battle-stats { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; margin: 0; }
.battle-stats > div { display: flex; flex-direction: column-reverse; }
.battle-stats dt { font-size: .72rem; letter-spacing: .07em; color: var(--text-faint); }
.battle-stats dd {
  margin: 0; font-family: var(--serif); font-weight: 800; font-size: 1.48rem; line-height: 1.12;
  color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.battle-stats > div:first-child dd { color: var(--zhu); }
.battle-stats dd small { margin-left: .15em; font-family: var(--sans); font-weight: 500; font-size: .52em; color: var(--text-dim); }
.battle-stats dd .isk-prefix { margin: 0 .2em 0 0; font-size: .48em; color: var(--text-dim); }
.battle-stats dd a { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
.battle-stats-lg { gap: .45rem 1.85rem; margin: .25rem 0 0; }
.battle-stats-lg dd { font-size: clamp(1.65rem, 2.8vw, 2.2rem); }
@media (max-width: 480px) {
  .battle-row-title { font-size: 1.2rem; }
  .battle-row-sides { text-align: left; flex-basis: 100%; }
  .battle-stats dd { font-size: 1.35rem; }
  .battle-stats-lg { gap: .4rem 1.3rem; }
  .battle-stats-lg dd { font-size: 1.65rem; }
}

/* ---------- 战役详情页：顶部导航、分屏战策舞台、拔河战损条、阵营账本 ---------- */
.bio.battle { max-width: none; }
.battle > .prose, .battle-body > .prose { max-width: var(--measure); margin-inline: auto; }
.battle-prose h2 {
  border-left: 4px solid var(--zhu);
  padding: .18rem .75rem;
  background: linear-gradient(90deg, var(--zhu-bg), transparent 85%);
  border-radius: 0 4px 4px 0;
}

.battle-topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem;
  margin-bottom: .5rem;
}
.page-battle .back { max-width: none; margin: 0; }
.battle-sources { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.battle-br-link {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .18rem .65rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; text-decoration: none;
  color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--line));
}
.battle-br-link:hover { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 18%, var(--bg-raised)); }

.battle-stage {
  --tier-c: var(--line);
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 0 1.85rem; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--tier-c) 48%, var(--line));
  background:
    radial-gradient(ellipse 65% 50% at 6% 0%, color-mix(in srgb, var(--zhu) 12%, transparent), transparent 72%),
    radial-gradient(ellipse 65% 55% at 96% 100%, color-mix(in srgb, var(--emblem-blue) 12%, transparent), transparent 72%),
    var(--surface);
  box-shadow:
    var(--panel-shadow),
    0 20px 44px -26px color-mix(in srgb, var(--tier-c) 45%, rgba(0, 0, 0, .8));
}
.battle-stage-large { --tier-c: var(--gold); }
.battle-stage-epic { --tier-c: var(--zhu); }
.battle-stage::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, var(--zhu), var(--tier-c) 50%, var(--emblem-blue));
}

.battle-hero {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1rem 1rem 1.05rem;
}
@media (min-width: 860px) {
  .battle-hero {
    display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 1.4rem; align-items: center; padding: 1.3rem 1.35rem 1.2rem;
  }
}
.battle-stage-media {
  position: relative; border-radius: 7px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tier-c) 42%, var(--line));
  background: var(--bg-sunk);
  box-shadow: 0 14px 32px -18px rgba(0, 0, 0, .78);
}
.battle-stage-head { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.battle-eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: .32rem .55rem;
  font-size: .84rem; color: var(--text-dim);
}
.battle-date { font-family: var(--mono); font-size: .82rem; color: var(--text-dim); }
.battle-eyebrow-sep { color: var(--text-faint); }
.battle-systems a { font-weight: 600; text-decoration-style: dashed; }
.battle-stage .bio-name {
  font-size: clamp(1.55rem, 3.1vw, 2.2rem); line-height: 1.22; letter-spacing: .04em;
}
.battle-stage .bio-aliases { margin: -.1rem 0 0; font-size: .84rem; }
.battle-stage .epithet {
  margin: .1rem 0 0; padding: .34rem .7rem; border-radius: 0 4px 4px 0;
  border-left: 3px solid var(--zhu);
  background: linear-gradient(90deg, var(--zhu-bg), transparent 92%);
  font-size: .98rem; font-weight: 700; line-height: 1.48;
}
.battle-taxonomy { margin-top: .2rem; padding-top: .5rem; border-top: 1px dashed var(--line-soft); }
.chip-alliance { font-family: var(--mono); font-size: .78rem; }

/* 中腰：全场战损拔河对比横条 */
.battle-clash {
  padding: .7rem 1.35rem .8rem;
  background: color-mix(in srgb, var(--bg-sunk) 65%, transparent);
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.battle-clash-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem .8rem;
  margin-bottom: .42rem; font-size: .8rem;
}
.clash-multi-list { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }
.clash-label {
  display: inline-flex; align-items: center; gap: .38rem; min-width: 0;
  font-weight: 600; color: var(--text-dim);
}
.clash-label i {
  flex: none; width: .5rem; height: .5rem; border-radius: 2px;
  background: var(--text-faint); transform: skewX(-12deg);
}
.clash-label strong { font-family: var(--mono); font-size: .84rem; font-variant-numeric: tabular-nums; }
.clash-label-1 { color: var(--zhu); }
.clash-label-1 i { background: var(--zhu); }
.clash-label-2 { color: var(--emblem-blue); }
.clash-label-2 i { background: var(--emblem-blue); }
.clash-name { overflow-wrap: anywhere; }
.clash-center { font-size: .76rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .battle-clash { padding: .65rem .95rem .75rem; }
  .battle-clash-head.is-duel .clash-center { order: -1; flex-basis: 100%; }
}

/* 下半部：交战各方对称账本 */
.side:first-child { --side-c: var(--zhu); }
.side:nth-child(2) { --side-c: var(--emblem-blue); }

.sides {
  display: grid; gap: .9rem; margin: 0; padding: 1rem 1.35rem 1.25rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) {
  .sides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 三方参战时，前两方主战阵营左右对峙，第三方横跨底栏，杜绝右下角半屏空白 */
  .sides-count-3 > .side:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .sides { padding: .9rem .95rem 1rem; }
}

.side {
  min-width: 0; padding: .9rem 1.05rem .95rem;
  border: 1px solid color-mix(in srgb, var(--side-c, var(--line)) 30%, var(--line-soft));
  border-top: 3px solid var(--side-c, var(--line));
  border-radius: 7px;
}
.side-head { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.side-crest {
  flex: none; display: grid; place-items: center; width: 2.15rem; height: 2.15rem; padding: 3px;
  border-radius: 5px; background: var(--emblem-plate);
  border: 1px solid color-mix(in srgb, var(--side-c, var(--line)) 50%, var(--line));
}
.side-crest img { width: 100%; height: 100%; object-fit: contain; }
.side-name { margin: 0; font-family: var(--serif); font-size: 1.14rem; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.side-stats { margin: .65rem 0 0; flex-wrap: wrap; gap: .3rem 1.35rem; }
.side-stats dd { font-size: 1.32rem; }
.side-stats > div:first-child dd { color: var(--gold); }
.side-stats > .side-stat-loss dd { color: var(--side-c, var(--text)); }
.side-stats > div:nth-child(3) dd { color: var(--text); }
.side-note { margin: .45rem 0 0; font-size: .85rem; color: var(--text-dim); }
.side-bar {
  display: block; height: 5px; margin: .55rem 0 .25rem;
  background: color-mix(in srgb, var(--bg-sunk) 85%, transparent);
  border-radius: 2px; overflow: hidden; transform: skewX(-12deg);
}
.side-bar > span { display: block; height: 100%; min-width: 2px; background: var(--side-c, var(--text-faint)); }

.side-facts {
  display: grid; gap: .45rem; margin: .65rem 0 0; padding-top: .55rem;
  border-top: 1px dashed var(--line-soft); font-size: .86rem;
}
.side-facts > div { display: grid; grid-template-columns: 4.6em 1fr; gap: .55rem; align-items: center; }
.side-facts dt { color: var(--text-faint); font-size: .8rem; letter-spacing: .03em; }
.side-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text-dim); }

/* 与列传页共用：名单超过一行时按实际高度折叠，无 JS 时完整可读 */
.battle-list-wrap { display: flex; align-items: flex-start; gap: .45rem; }
.battle-list-wrap .tag-more { margin-top: 0; height: 1.8rem; font-size: .8rem; padding: 0 .6rem; }
.battle-list {
  flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .38rem .45rem;
}
.battle-list > li { display: flex; align-items: center; height: 1.8rem; min-width: 0; max-width: 100%; }
.battle-list > li > a { overflow-wrap: anywhere; }
.battle-list .chip { height: 1.8rem; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .82rem; }
.battle-list .chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.battle-list .chip > small { flex: none; }
.battle-list-wrap.is-collapsed .battle-list { max-height: 1.8rem; overflow: hidden; }

.chip-person {
  color: var(--gold); font-weight: 600;
  background: color-mix(in srgb, var(--gold) 10%, var(--bg-sunk));
  border-color: color-mix(in srgb, var(--gold) 48%, var(--line));
}
.chip-person:hover { background: color-mix(in srgb, var(--gold) 18%, var(--bg-sunk)); border-color: var(--gold); }

.battle-org-pill {
  display: inline-flex; align-items: center; gap: .32rem; height: 1.8rem; max-width: 100%;
  padding: 0 .52rem; border-radius: 4px; white-space: nowrap; overflow: hidden;
  background: color-mix(in srgb, var(--bg-sunk) 75%, transparent);
  border: 1px solid var(--line); font-family: var(--mono); font-size: .79rem;
}
.battle-org-pill a {
  color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis;
}
.battle-org-pill a:hover { color: var(--gold); }
.battle-org-pill.is-corp {
  border-color: color-mix(in srgb, var(--side-c, var(--gold-dim)) 42%, var(--line));
  background: color-mix(in srgb, var(--side-c, var(--gold)) 8%, var(--bg-sunk));
}
.battle-org-pill small {
  flex: none; padding: 0 .3rem; border-radius: 3px; line-height: 1.35;
  font-size: .72rem; font-weight: 700; color: var(--gold);
  background: color-mix(in srgb, var(--gold) 14%, var(--bg));
}
@media (max-width: 480px) {
  .side-facts > div { grid-template-columns: 1fr; gap: .2rem; align-items: flex-start; }
}

/* ---------- 战役详情页：自适应多视角战地实录台（置于正文前） ---------- */
.battle-videos { margin: 0 0 2.1rem; }
.battle-videos-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem;
  margin-bottom: .75rem;
}
.battle-videos-bar h2 {
  margin: 0; font-family: var(--serif); font-size: 1.2rem; font-weight: 800;
  letter-spacing: .06em; color: var(--gold);
}
.battle-videos-sub { font-size: .8rem; color: var(--text-faint); }
.battle-videos-bar::after {
  content: ""; flex: 1 1 6rem; height: 1px; align-self: center;
  background: linear-gradient(90deg, var(--line), transparent);
}

.pov-grid { display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
.pov-stack { display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
.pov-card {
  position: relative; min-width: 0; padding: .85rem 1rem .9rem; border-radius: 8px;
  display: flex; flex-direction: column; justify-content: space-between; gap: .45rem;
  background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--panel-shadow);
  transition: border-color .16s ease, transform .16s ease;
}
.pov-card:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.pov-card-lead {
  border-color: color-mix(in srgb, var(--gold-dim) 55%, var(--line));
  background:
    radial-gradient(ellipse 80% 65% at 0% 0%, color-mix(in srgb, var(--gold) 9%, transparent), transparent 72%),
    var(--surface);
}
.pov-head { display: flex; flex-direction: column; gap: .32rem; min-width: 0; }
.pov-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .48rem; font-size: .76rem; }
.pov-index {
  padding: .05rem .38rem; border-radius: 3px;
  font-family: var(--mono); font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  color: var(--gold); background: color-mix(in srgb, var(--gold) 13%, var(--bg-sunk));
  border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);
}
.pov-platform {
  padding: .05rem .38rem; border-radius: 3px; font-size: .7rem; font-weight: 700;
}
.pov-platform.is-bili {
  color: var(--term-link); background: color-mix(in srgb, var(--term-link) 12%, var(--bg-sunk));
}
.pov-platform.is-yt {
  color: var(--zhu); background: var(--zhu-bg);
}
.pov-author { color: var(--text-dim); font-weight: 600; overflow-wrap: anywhere; }
.pov-title { margin: 0; font-family: var(--serif); font-size: 1.04rem; font-weight: 700; line-height: 1.4; }
.pov-card-lead .pov-title { font-size: 1.16rem; }
.pov-link { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.pov-link::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.pov-card:hover .pov-link { color: var(--gold); }
.pov-ext { font-family: var(--sans); font-size: .85em; color: var(--gold-dim); }
.pov-desc { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--text-dim); overflow-wrap: anywhere; }

@media (min-width: 720px) {
  /* 单部视频：横贯聚光灯双栏卡，右侧作导读摘录，消除大块留白 */
  .pov-grid-1 .pov-card-lead {
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 1.25rem; align-items: center; padding: 1.05rem 1.25rem;
  }
  .pov-grid-1 .pov-desc {
    padding-left: 1.1rem; border-left: 2px solid color-mix(in srgb, var(--gold-dim) 45%, var(--line));
  }
  /* 两部视频：等高对称双栏 */
  .pov-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 820px) {
  /* 三部及以上：左主推 POV 01 + 右侧双层叠放 POV 02/03 */
  .pov-grid-bento {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .pov-grid-bento > .pov-card-lead { padding: 1.1rem 1.25rem; justify-content: flex-start; gap: .65rem; }
  .pov-grid-bento > .pov-card-lead .pov-title { font-size: 1.22rem; }
  .pov-stack { grid-template-rows: repeat(2, minmax(0, 1fr)); }
}

.pov-more-grid {
  margin-top: .8rem; display: grid; gap: .8rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) {
  .pov-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pov-more-btn {
  display: block; width: 100%; margin-top: .65rem; padding: .52rem 1rem;
  border-radius: 6px; border: 1px dashed color-mix(in srgb, var(--gold-dim) 70%, var(--line));
  background: color-mix(in srgb, var(--bg-raised) 72%, transparent);
  color: var(--gold); font: 600 .86rem var(--sans); letter-spacing: .04em; cursor: pointer;
}
.pov-more-btn:hover {
  border-style: solid; border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, var(--bg-raised));
}

/* ---------- 质感层：面板立体、装裱、标题墨色 ---------- */
.site-header { border-image: linear-gradient(90deg, transparent, var(--gold-dim) 20%, var(--gold-dim) 80%, transparent) 1; }
.brand-seal {
  box-shadow: inset 0 0 0 2px var(--zhu), inset 0 0 0 3px rgba(255, 255, 255, .55);
  transform: rotate(-4deg);
}
.brand:hover .brand-seal { transform: rotate(0); }
.brand-seal { transition: transform .2s; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .intro h1, .bio-name {
    background: var(--title-ink); -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
  }
}
.intro h1::after {
  content: ""; display: block; width: 7rem; height: 2px; margin-top: .45rem;
  background: linear-gradient(90deg, var(--zhu) 0 1.6rem, var(--gold-dim) 1.6rem, transparent);
}
.card a, .bio-facts, .pager a, .side {
  background: var(--surface); box-shadow: var(--panel-shadow);
}
.card a { transition: border-color .15s, transform .15s, box-shadow .15s; }
.card a:hover {
  box-shadow: var(--panel-shadow), 0 0 0 1px var(--gold-dim), 0 8px 28px -14px color-mix(in srgb, var(--gold) 45%, transparent);
}
.battle-stats dd { text-shadow: 0 0 .7em color-mix(in srgb, currentColor var(--num-glow), transparent); }
/* 装裱：细线、留白、金边一圈 */
.portrait-lg {
  box-shadow: 0 0 0 1px var(--line), 0 0 0 4px var(--bg), 0 0 0 5px var(--gold-dim), 0 16px 32px -16px rgba(0, 0, 0, .7);
}
.bio-head .portrait-lg { margin: 5px; }

/* 各方损失占比：斜切拔河能量条，颜色同各方，只分阵营不表胜负 */
.loss-bar {
  display: flex; flex: none; gap: 3px; height: 5px; margin: .15rem 0 0;
  border-radius: 2px; overflow: hidden; background: var(--bg-sunk); transform: skewX(-12deg);
}
.loss-bar-stage { height: 8px; border-radius: 3px; }
.loss-bar > span {
  flex-basis: 0; min-width: 3px; opacity: .65;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 60%), var(--text-faint);
}
.loss-bar > .loss-bar-1 {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), transparent 60%), var(--zhu);
}
.loss-bar > .loss-bar-2 {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), transparent 60%), var(--emblem-blue);
}

/* 大数字之间加竖线 */
.battle-stats-lg > div + div { position: relative; }
.battle-stats-lg > div + div::before {
  content: ""; position: absolute; left: -.92rem; top: 15%; bottom: 15%; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}
@media (max-width: 480px) {
  .battle-stats-lg > div + div::before { left: -.65rem; }
}

/* ---------- 搜索页（Pagefind UI 主题） ---------- */
.page-search #search {
  --pagefind-ui-scale: .9;
  --pagefind-ui-primary: var(--gold);
  --pagefind-ui-text: var(--text);
  --pagefind-ui-background: var(--bg-raised);
  --pagefind-ui-border: var(--line);
  --pagefind-ui-tag: var(--bg-sunk);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 6px;
  --pagefind-ui-image-border-radius: 4px;
  --pagefind-ui-font: var(--sans);
}
.page-search .pagefind-ui__result-link { color: var(--link); font-family: var(--serif); }
.page-search .pagefind-ui__result-excerpt mark { background: var(--zhu-bg); color: var(--zhu); }

/* ===== 九宫格阵营（规则见 docs/person-alignment.md）=====
   颜色分善恶（青蓝／银灰／玫红），角标形状分守序／中立／混乱；没有阵营的卡片不受影响。 */
:root { --al-good: #7cc4e4; --al-neutral: #a3a9b4; --al-evil: #e0588f; }
:root[data-theme="light"] { --al-good: #2a6d93; --al-neutral: #6c6860; --al-evil: #a8325f; }
[data-align] { --al: var(--al-neutral); }
[data-align$="G"] { --al: var(--al-good); }
[data-align$="E"] { --al: var(--al-evil); }
[data-m="G"] { --m: var(--al-good); }
[data-m="N"] { --m: var(--al-neutral); }
[data-m="E"] { --m: var(--al-evil); }

/* 列传网格放宽，给外凸的角标和挂牌留位；军团网格不变 */
.cards:not(.corp-cards) { gap: 1.35rem .9rem; }

/* 卡片外框：阵营色接管边框，名人金边与外发光让路（方印、斜扫保留），战神左缘朱线保留 */
.card[data-align] a { position: relative; border-color: color-mix(in srgb, var(--al) 42%, var(--line-soft)); }
.card.is-famous[data-align] a { box-shadow: var(--panel-shadow); }
.card.is-wargod[data-align] a { border-left-color: var(--zhu); }
.card[data-align] a:hover {
  border-color: color-mix(in srgb, var(--al) 75%, transparent);
  box-shadow: var(--panel-shadow), 0 0 0 1px color-mix(in srgb, var(--al) 55%, transparent), 0 8px 28px -14px color-mix(in srgb, var(--al) 50%, transparent);
}
.card.is-wargod[data-align] a:hover { border-left-color: var(--zhu); }

/* 角标：四角 L 形，画在边框外，不压内容 */
.card[data-align] a::after, .al-frame[data-align]::after {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  inset: var(--al-inset, -5px); border-radius: 2px;
  --arm: 15px; --t: 2px; --k: linear-gradient(var(--al) 0 0);
  background:
    var(--k) left top / var(--arm) var(--t), var(--k) left top / var(--t) var(--arm),
    var(--k) right top / var(--arm) var(--t), var(--k) right top / var(--t) var(--arm),
    var(--k) left bottom / var(--arm) var(--t), var(--k) left bottom / var(--t) var(--arm),
    var(--k) right bottom / var(--arm) var(--t), var(--k) right bottom / var(--t) var(--arm);
  background-repeat: no-repeat;
}
/* 守序：四角齐全，外加一道细线 */
.card[data-align^="L"] a::after, .al-frame[data-align^="L"]::after {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--al) 32%, transparent);
}
/* 中立：只留左上、右下两只 */
.card[data-align^="N"] a::after, .al-frame[data-align^="N"]::after {
  background:
    var(--k) left top / var(--arm) var(--t), var(--k) left top / var(--t) var(--arm),
    var(--k) right bottom / var(--arm) var(--t), var(--k) right bottom / var(--t) var(--arm);
  background-repeat: no-repeat;
}
/* 混乱：断角、长短不一、略歪（静态），卡片边线改虚线；战神左缘保持实线 */
.card[data-align^="C"] a { border-style: dashed; }
.card.is-wargod[data-align^="C"] a { border-left-style: solid; }
.card[data-align^="C"] a::after, .al-frame[data-align^="C"]::after {
  background:
    var(--k) left top / calc(var(--arm) * 2.1) var(--t), var(--k) left top / var(--t) calc(var(--arm) * .45),
    var(--k) right 9px top / calc(var(--arm) * .55) var(--t),
    var(--k) right bottom / calc(var(--arm) * .5) var(--t), var(--k) right bottom / var(--t) calc(var(--arm) * 1.8),
    var(--k) left bottom 6px / var(--t) calc(var(--arm) * .8);
  background-repeat: no-repeat;
  transform: rotate(var(--tilt, -1.1deg));
}

/* 上沿挂牌：小九宫格 + 全称，“名”字印右侧固定留位 */
.align-tab {
  position: absolute; z-index: 3; top: -.66rem; right: 2.25rem;
  display: inline-flex; align-items: center; gap: .3rem;
  height: 1.25rem; padding: 0 .32rem 0 .3rem;
  border: 1px solid var(--al); border-radius: 3px;
  background: var(--bg); color: var(--al);
  font-family: var(--serif); font-weight: 700; font-size: .74rem; line-height: 1; letter-spacing: .08em;
  white-space: nowrap;
}
.align-tab > span { margin-right: -.08em; }
.align-tab svg { flex: none; width: .74rem; height: .74rem; }
.align-tab rect { fill: currentColor; opacity: .26; }
.align-tab rect.on { opacity: 1; }
[data-align^="L"] > .align-tab, [data-align^="L"] a > .align-tab { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px color-mix(in srgb, var(--al) 40%, transparent); }
[data-align^="C"] > .align-tab, [data-align^="C"] a > .align-tab { transform: rotate(-4deg); }

/* 列传页：头部整块装框，挂牌在右上 */
.bio-head.al-frame { position: relative; margin: 1.9rem 0 2rem; --al-inset: -13px -15px; }
.bio-head.al-frame::after { --arm: 26px; --tilt: -.45deg; }
.bio-head.al-frame > .align-tab { top: calc(-13px - .7rem); right: 1.4rem; height: 1.4rem; font-size: .84rem; }
@media (max-width: 520px) {
  .bio-head.al-frame { --al-inset: -10px -10px; }
  .bio-head.al-frame > .align-tab { top: calc(-10px - .7rem); right: .8rem; }
}

/* 列传页资料栏：阵营一行 */
.bio-facts > .align-fact { align-items: center; }
.align-fact dd { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; }
.align-matrix {
  display: inline-grid; grid-template-columns: repeat(3, 2.05rem); gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg-sunk);
}
.align-matrix > span {
  display: grid; place-items: center; height: 1.35rem; border-radius: 2px;
  font-size: .68rem; line-height: 1; letter-spacing: .04em;
  color: color-mix(in srgb, var(--m) 65%, var(--text-faint));
  background: color-mix(in srgb, var(--m) 9%, transparent);
}
.align-matrix > .on { background: var(--al); color: var(--bg); font-weight: 700; }
.align-verdict { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.align-verdict strong { font-family: var(--serif); font-size: 1.08rem; letter-spacing: .12em; color: var(--al); }
.align-note { color: var(--text-dim); }

/* 首页阵营筛选：默认收起；宽屏面板浮在入口下方，窄屏进入文档流 */
.align-dd { position: relative; }
.align-dd > summary { list-style: none; cursor: pointer; }
.align-dd > summary::-webkit-details-marker { display: none; }
.align-filter.is-filtered .align-dd > summary { border-color: var(--gold-dim); color: var(--text); }
.align-pick {
  position: absolute; z-index: 20; top: calc(100% + .35rem); left: 0;
  display: grid; grid-template-columns: auto repeat(3, 3.1rem); gap: 3px; padding: 4px;
  border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--bg-raised);
  box-shadow: var(--panel-shadow);
}
.align-pick button {
  font: inherit; font-size: .8rem; line-height: 1; height: 1.9rem; padding: 0 .45rem;
  border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--text-dim); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .2rem; white-space: nowrap;
}
.align-pick small { font-size: .68rem; opacity: .75; }
.align-pick .ap-cell { color: color-mix(in srgb, var(--m) 75%, var(--text-faint)); background: color-mix(in srgb, var(--m) 10%, transparent); font-family: var(--serif); font-weight: 700; }
.align-pick .ap-row { color: var(--m); font-family: var(--serif); justify-content: flex-end; }
.align-pick .ap-col { font-family: var(--serif); }
.align-pick button:hover:not(:disabled) { border-color: var(--line); }
.align-pick button:disabled { opacity: .4; cursor: default; }
.align-pick .is-on { border-color: var(--gold-dim); color: var(--text); }
.align-pick .ap-cell.is-on { background: var(--m); color: var(--bg); border-color: var(--m); }
@media (max-width: 640px) {
  .align-filter { flex-wrap: wrap; }
  .align-pick { position: static; margin-top: .4rem; box-shadow: none; }
}

/* 天书：官方新闻目录与文章页。分类色走 --news 变量，筛选 chip 与卡片标签共用 */
.news-cat-update, .news-chip-update { --news: var(--news-update); }
.news-cat-preview, .news-chip-preview { --news: var(--news-preview); }
.news-cat-event, .news-chip-event { --news: var(--news-event); }
.news-cat-offer, .news-chip-offer { --news: var(--news-offer); }
.news-cat-misc, .news-chip-misc { --news: var(--news-misc); }
.news-side .chip[class*="news-chip-"]:not(.is-active) {
  background: transparent; border-color: var(--line-soft); color: var(--text-faint); opacity: .5;
}
.news-side .chip[class*="news-chip-"]:not(.is-active):hover {
  opacity: .85; border-color: color-mix(in srgb, var(--news) 50%, var(--line)); color: var(--text-dim);
}
.news-side .tag-bar .chip[class*="news-chip-"].is-active {
  background: color-mix(in srgb, var(--news) 16%, var(--bg-raised));
  border-color: color-mix(in srgb, var(--news) 68%, var(--line));
  color: color-mix(in srgb, var(--news) 70%, var(--text));
}
.news-side .tag-bar .chip[class*="news-chip-"].is-active:hover {
  border-color: var(--news); background: color-mix(in srgb, var(--news) 24%, var(--bg-raised));
}
.news-side .tag-bar .chip[class*="news-chip-"].is-active small { color: var(--news); opacity: .95; }

.news-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem;
  font-size: .78rem; color: var(--text-faint);
}
.news-meta time { font-family: var(--mono); }
.news-cat {
  padding: 0 .45rem; border: 1px solid color-mix(in srgb, var(--news, var(--gold)) 55%, transparent);
  border-radius: 999px; color: var(--news, var(--gold)); line-height: 1.5; text-decoration: none;
}
a.news-cat:hover { border-color: var(--news, var(--gold)); }
.news-origin { color: var(--text-dim); }

/* 目录：宽屏左侧时间轴、右侧停靠筛选栏；窄屏筛选在时间轴上方，不套外框以免挤占胶囊宽度 */
.news-layout { display: grid; gap: 1rem; margin-top: .5rem; }
.news-side {
  display: flex; flex-direction: column; gap: .55rem; min-width: 0;
}
.news-side .toolbar { margin: 0; }
.news-side .toolbar input { padding: .48rem .75rem; }
.news-side .filter-status { margin: 0; font-size: .82rem; }
.news-side-group { display: flex; flex-direction: column; gap: .35rem; }
.news-side-heading {
  display: flex; align-items: center; gap: .35rem; flex: none;
  font-size: .85rem; font-weight: 700; letter-spacing: .06em; color: var(--text); line-height: 1.3;
}
.news-side-heading::before {
  content: ""; flex: none; width: 3px; height: .9em;
  border-radius: 2px; background: var(--tianshu);
}
.news-side-heading small { margin-left: auto; font-weight: 400; font-size: .75rem; letter-spacing: 0; color: var(--text-faint); }
.news-side .tag-bar {
  display: flex; flex-wrap: wrap;
  gap: .35rem; padding: 0;
}
.news-side .tag-bar .chip {
  flex: 1 0 auto; justify-content: center; gap: .22rem;
  height: 1.9rem; padding: 0 .45rem;
  font-size: .84rem; font-weight: 600; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.news-side .tag-bar .chip small { font-family: var(--mono); font-weight: 400; font-size: .72rem; }
.news-years { flex-direction: row; align-items: baseline; gap: .6rem; }
.news-year-links {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .25rem .7rem; font-family: var(--mono); font-size: .86rem;
}
.news-year-links a {
  white-space: nowrap; color: var(--text-dim); text-decoration: none;
  transition: color .15s;
}
.news-year-links a:hover { color: var(--tianshu); }
.news-year-links small { margin-left: .2rem; font-size: .72rem; color: var(--text-faint); }
.news-years [hidden], .news-feed [hidden] { display: none; }
@media (min-width: 960px) {
  .news-layout { grid-template-columns: minmax(0, 1fr) 10.5rem; align-items: start; gap: 2rem; }
  .news-side {
    grid-column: 2; grid-row: 1; position: sticky; top: 5rem; gap: .8rem;
    padding: .85rem .9rem; border: 1px solid var(--line-soft); border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--panel-shadow);
  }
  .news-side .tag-bar { flex-direction: column; }
  .news-side .tag-bar .chip { justify-content: flex-start; padding: 0 .65rem; gap: .4rem; font-size: .85rem; }
  .news-side .tag-bar .chip small { margin-left: auto; font-size: .74rem; }
  .news-years { flex-direction: column; align-items: stretch; gap: .35rem; }
  .news-year-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .5rem; }
  .news-feed { grid-column: 1; grid-row: 1; }
}

.news-feed { --when: 3.4rem; min-width: 0; }
.news-month {
  display: flex; align-items: baseline; gap: .55rem;
  margin: 1.5rem 0 .2rem; padding-left: calc(var(--when) + 1rem); scroll-margin-top: 5rem;
  font-family: var(--serif); font-weight: 700; line-height: 1.2;
}
.news-month:first-child { margin-top: 0; }
.news-month-n { font-size: 1.45rem; background: var(--title-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.news-month-y { font-family: var(--mono); font-weight: 400; font-size: .82rem; letter-spacing: .12em; color: var(--text-faint); }
.news-entry {
  display: grid; grid-template-columns: var(--when) minmax(0, 1fr);
  color: var(--text); text-decoration: none;
}
.news-entry:focus-visible { outline: none; }
.news-entry:focus-visible .news-entry-box { outline: 2px solid var(--focus); outline-offset: 2px; }
/* 日期栏右沿是时间轴线，圆点取分类色 */
.news-when {
  position: relative; padding: .7rem .85rem 0 0; text-align: right;
  border-right: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 1.15rem; line-height: 1.2; color: var(--text-dim);
}
.news-when::after {
  content: ""; position: absolute; right: -5px; top: 1rem;
  width: 9px; height: 9px; border-radius: 50%; background: var(--news);
  box-shadow: 0 0 0 3px var(--bg), 0 0 10px color-mix(in srgb, var(--news) 55%, transparent);
}
.news-entry-box { display: grid; min-width: 0; margin: .4rem 0 .4rem 1rem; }
.news-entry-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.news-entry-title { font-family: var(--serif); line-height: 1.45; overflow-wrap: anywhere; }
.news-entry-en { font-size: .78rem; color: var(--text-faint); line-height: 1.4; overflow-wrap: anywhere; }
.news-entry-excerpt {
  font-size: .85rem; color: var(--text-dim); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 报道条：左封面右文字的面板 */
.news-entry-feature .news-entry-box {
  grid-template-columns: clamp(8rem, 30%, 13rem) minmax(0, 1fr); overflow: hidden;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--panel-shadow);
  transition: border-color .15s, box-shadow .15s;
}
.news-entry-feature .news-entry-body { padding: .65rem .9rem .75rem; }
.news-entry-feature .news-entry-title { font-size: 1.08rem; }
.news-entry-cover {
  /* 高度不参与撑行，随文字高度裁切，免得封面比文字高时底部留白 */
  display: block; width: 100%; height: 0; min-height: 100%; object-fit: cover;
  background: var(--bg-sunk); border-right: 1px solid var(--line-soft);
}
.news-entry-feature:hover .news-entry-box { border-color: var(--gold-dim); box-shadow: var(--panel-shadow), 0 0 14px color-mix(in srgb, var(--gold) 18%, transparent); }

/* 补丁日更：无封面的日志行，左边线与底色取分类色 */
.news-entry-day .news-entry-box {
  margin-top: .2rem; margin-bottom: .2rem; padding: .45rem .8rem;
  border-left: 2px solid var(--news); border-radius: 0 var(--radius) var(--radius) 0;
  background: color-mix(in srgb, var(--news) 6%, transparent);
  transition: background-color .15s;
}
.news-entry-day .news-when { padding-top: .45rem; font-size: .95rem; color: var(--text-faint); }
.news-entry-day .news-when::after { top: .75rem; width: 7px; height: 7px; right: -4px; }
.news-entry-day .news-entry-title { font-size: .95rem; }
.news-entry-day .news-entry-excerpt { font-size: .82rem; }
.news-entry-day:hover .news-entry-box { background: color-mix(in srgb, var(--news) 13%, transparent); }

.news-head { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-soft); }
.news-prose h2[id] { scroll-margin-top: .5rem; }
.news-head .news-meta { margin: 0 0 .5rem; font-size: .82rem; }
.news-title { font-family: var(--serif); font-size: clamp(1.45rem, 4.6vw, 2rem); line-height: 1.35; margin: 0 0 .35rem; overflow-wrap: anywhere; }
.news-title-en { margin: 0 0 .5rem; color: var(--text-faint); font-size: .9rem; overflow-wrap: anywhere; }
.news-links { margin: 0; font-size: .85rem; color: var(--text-faint); }
/* 文字仍按阅读行宽居中，独占一段的图片与表格放宽到整栏，接近官网原图大小 */
.bio.news { max-width: none; }
.bio.news > .news-head, .bio.news > .news-credit, .prose.news-prose > * { max-width: var(--measure); margin-inline: auto; }
.prose.news-prose > p:has(> img), .prose.news-prose > table { max-width: min(100%, 66rem); }
.news-prose img { display: block; max-width: 100%; height: auto; margin: 1rem auto; border-radius: var(--radius); }
.news-prose table { width: fit-content; max-width: 100%; margin: 1.2em auto; font-size: .9rem; }
.news-prose th, .news-prose td { padding: .42rem .7rem; border: 1px solid var(--line-soft); vertical-align: top; }
.news-credit { margin: 2rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line-soft); font-size: .8rem; color: var(--text-faint); }
@media (max-width: 640px) {
  .news-feed { --when: 2.3rem; }
  .news-when { padding-right: .6rem; font-size: .95rem; }
  .news-entry-box { margin-left: .7rem; }
  .news-month { padding-left: calc(var(--when) + .7rem); }
  .news-entry-feature .news-entry-box { grid-template-columns: minmax(0, 1fr) 6.5rem; }
  .news-entry-feature .news-entry-cover { order: 2; border-right: 0; border-left: 1px solid var(--line-soft); }
  .news-entry-feature .news-entry-body { padding: .55rem .7rem .6rem; }
  .news-entry-feature .news-entry-title { font-size: 1rem; }
  .news-entry-feature .news-entry-en { display: none; }
}

/* 正史目录：沿用天书时间轴，按 YC 年分节，左栏写月日；新伊甸新闻用青色，交叉列入的公告用杂报灰，其余 lore 站文章明黄 */
.lore-col-site, .news-chip-lore { --news: var(--tianshu); }
.lore-col-new-eden-news, .news-chip-new-eden-news { --news: var(--lore-news); }
.lore-col-cross, .news-chip-lore.news-chip-misc { --news: var(--news-misc); }
.lore-feed { --when: 4.3rem; }
.lore-feed .news-when { font-size: .95rem; padding-top: .8rem; }
.lore-feed .news-month-n { font-family: var(--mono); letter-spacing: .06em; }
.lore-entry-meta { gap: .2rem .5rem; font-size: .74rem; }
.lore-entry-meta > span:last-child { font-family: var(--mono); }
@media (max-width: 640px) {
  .lore-feed { --when: 3.3rem; }
  .lore-feed .news-when { font-size: .78rem; }
  /* 手机上封面铺满整张卡作背景，文字压在底部渐暗层上；图上文字深浅主题都用浅色 */
  .lore-feed .news-entry-feature .news-entry-box:has(> .news-entry-cover) { grid-template-columns: minmax(0, 1fr); }
  .lore-feed .news-entry-feature .news-entry-box > .news-entry-cover,
  .lore-feed .news-entry-feature .news-entry-box:has(> .news-entry-cover) > .news-entry-body { grid-area: 1 / 1; }
  .lore-feed .news-entry-feature .news-entry-cover { border: 0; transition: transform .3s; }
  .lore-feed .news-entry-feature .news-entry-box:has(> .news-entry-cover) > .news-entry-body {
    position: relative; justify-content: flex-end; min-height: 11rem; padding: 3rem .8rem .7rem;
    background: linear-gradient(to bottom, rgb(0 0 0 / 0) 0, rgb(0 0 0 / .5) 40%, rgb(0 0 0 / .86) 100%);
    color: #f3f1ea; text-shadow: 0 1px 3px rgb(0 0 0 / .6);
  }
  .lore-feed .news-entry-box:has(> .news-entry-cover) .news-meta { color: rgb(243 241 234 / .78); }
  .lore-feed .news-entry-box:has(> .news-entry-cover) .news-cat { border-color: color-mix(in srgb, var(--news) 75%, #fff); background: rgb(0 0 0 / .45); color: #f3f1ea; text-shadow: none; }
  .lore-feed .news-entry-box:has(> .news-entry-cover) .news-entry-excerpt { color: rgb(243 241 234 / .82); }
  .lore-feed .news-entry-feature:hover .news-entry-cover { transform: scale(1.04); }
}

/* 折扣板块：顶部固定“正在进行／即将开始”（不受筛选影响），下方紧凑筛选栏 + 12 张月份对比卡（桌面 3×4，无横向滚动）+ 按年明细。
   无 JS 时标签直链明细、历年全展开；有 JS 时支持档位/商品筛选、仅看高价值、本月高亮与详情浮层 */
.page-deals { --cal: var(--text-dim); }
.cal-t-plex { --cal: var(--cal-plex); }
.cal-t-omega { --cal: var(--cal-omega); }
.cal-t-mct { --cal: var(--cal-mct); }
.cal-t-consumable { --cal: var(--cal-consumable); }
.cal-t-pack { --cal: var(--cal-pack); }
.cal-t-booster { --cal: var(--cal-booster); }
.cal-chip { --news: var(--cal); }
.news-period {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem;
  margin: .35rem 0 0; font-size: .82rem; color: var(--text-dim);
}
.news-period-name { font-weight: 700; color: var(--text); }
.news-period a { color: var(--deals); }

.cal-now {
  display: grid; gap: .7rem 1.4rem; margin: 0 0 1rem; padding: .8rem 1rem;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--panel-shadow);
}
.cal-now[hidden] { display: none; }
.cal-now h2 {
  display: flex; align-items: baseline; gap: .45rem; margin: 0 0 .35rem;
  font-size: .9rem; letter-spacing: .08em; color: var(--deals);
}
.cal-now h2 small { font-weight: 400; font-size: .72rem; letter-spacing: 0; color: var(--text-faint); }
.cal-now ul { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.cal-now li { display: flex; align-items: baseline; gap: .5rem; min-width: 0; padding-left: .5rem; border-left: 3px solid var(--cal); }
.cal-now li a { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--text); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.cal-now li a:hover { color: var(--deals); }
.cal-now li small { flex: none; font-family: var(--mono); font-size: .74rem; color: var(--text-faint); }
.cal-now li.is-none { border-left-color: var(--line); color: var(--text-faint); }
@media (min-width: 720px) { .cal-now { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.deals-main { min-width: 0; }
.deals-main .news-month { padding-left: 0; }
.deals-main [hidden] { display: none !important; }

/* 筛选与跳转工具栏 */
.deals-controls {
  display: grid; gap: .55rem; margin: 0 0 1.25rem; padding: .75rem .95rem;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--panel-shadow);
}
.deals-control-row { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; }
.deals-control-label {
  flex: none; min-width: 2.2rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .12em; color: var(--text-faint);
}
.deals-controls .tag-bar { flex: 1 1 auto; margin: 0; }
.deal-tier-btn-high { --news: var(--zhu); }
.deal-tier-btn-niche { --news: var(--gold); }
.deal-tier-btn-low { --news: var(--text-dim); }
.deal-tier-btn-gift { --news: var(--lore); }
.deal-tier-btn.is-active {
  border-color: color-mix(in srgb, var(--news) 65%, transparent);
  background: color-mix(in srgb, var(--news) 18%, var(--bg-raised));
  color: var(--text);
}
.deal-high-only {
  margin-left: .25rem;
  border-color: color-mix(in srgb, var(--zhu) 55%, transparent);
  color: var(--zhu);
}
.deal-high-only:hover { background: color-mix(in srgb, var(--zhu) 14%, var(--bg-raised)); }
.deal-high-only.is-active {
  border-color: var(--zhu); background: var(--zhu); color: #fff; font-weight: 700;
}
.deals-control-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem;
  padding-top: .5rem; border-top: 1px solid var(--line-soft);
}
.deals-jump { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; font-size: .82rem; }
.deals-jump a {
  padding: .12rem .45rem; border: 1px solid var(--line-soft); border-radius: 999px;
  font-family: var(--mono); color: var(--text-dim); text-decoration: none;
}
.deals-jump a:hover { border-color: var(--deals); color: var(--deals); }
.deals-jump a small { margin-left: .25rem; font-size: .7rem; color: var(--text-faint); }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .85rem; margin: 0; font-size: .74rem; color: var(--text-dim); }
.cal-key { display: inline-flex; align-items: center; gap: .3rem; }
.cal-key::before { content: ""; display: inline-block; width: 1.05rem; height: .62rem; border-radius: 2px; }
.cal-key-high::before { border-left: 3px solid var(--zhu); background: color-mix(in srgb, var(--zhu) 30%, var(--bg-raised)); }
.cal-key-gift::before { width: .5rem; height: .5rem; border-radius: 50%; background: var(--lore); }
.cal-key-cont::before { border: 1px dashed var(--text-dim); border-left-width: 2px; opacity: .7; }
.deals-control-foot .filter-status { margin: 0 0 0 auto; font-size: .8rem; color: var(--deals); font-weight: 700; }

/* 12 张月份对比卡：移动端 1 列、平板 2 列、桌面 3 列，彻底无横向滚动；
   平板及以上通过 CSS subgrid 让同一横排卡片的同一年份行严格对齐 */
.deals-months {
  display: grid; gap: .85rem; margin: 0 0 2rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) { .deals-months { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .deals-months { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.deal-month-card {
  display: flex; flex-direction: column; min-width: 0;
  padding: .75rem .85rem .7rem;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--panel-shadow);
  transition: border-color .16s ease;
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 720px) {
    .deals-months { row-gap: 0; }
    .deal-month-card {
      display: grid;
      grid-row: span var(--deal-rows, 7);
      grid-template-rows: subgrid;
      row-gap: 0;
      margin-bottom: .85rem;
    }
  }
}
.deal-month-card:hover { border-color: var(--line); }
.deal-month-card.is-now {
  border-color: color-mix(in srgb, var(--zhu) 60%, var(--line-soft));
  border-top: 2px solid var(--zhu);
  background: linear-gradient(180deg, color-mix(in srgb, var(--zhu) 9%, var(--bg-raised)), var(--bg-raised) 48%);
}
.deal-month-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding-bottom: .5rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line-soft);
}
.deal-month-title {
  display: inline-flex; align-items: center; gap: .4rem; margin: 0;
  font-family: var(--serif); font-size: 1.08rem; font-weight: 700; letter-spacing: .04em; color: var(--text);
}
.deal-now-badge {
  padding: .05rem .38rem; border-radius: 3px;
  background: var(--zhu); color: #fff;
  font-family: var(--sans); font-size: .68rem; font-weight: 700; letter-spacing: .06em;
}
.deal-month-heat {
  display: inline-flex; align-items: center; gap: .38rem;
  font-family: var(--mono); font-size: .72rem; color: var(--text-faint);
}
.deal-month-heat.lv2, .deal-month-heat.lv3, .deal-month-heat.lv4 { color: var(--zhu); font-weight: 700; }
.deal-month-heat.lv1 { color: var(--text-dim); }
.deal-heat-dots { display: inline-flex; gap: 2px; }
.deal-heat-dots i {
  display: block; width: 5px; height: 9px; border-radius: 1.5px;
  background: var(--line);
}
.deal-heat-dots i.on { background: var(--zhu); }
.deal-month-heat.lv1 .deal-heat-dots i.on { background: color-mix(in srgb, var(--zhu) 65%, var(--bg-raised)); }

.deal-year-row {
  display: grid; grid-template-columns: 2.7rem minmax(0, 1fr); align-items: start; gap: .45rem;
  padding: .38rem 0; border-top: 1px solid color-mix(in srgb, var(--line-soft) 65%, transparent);
}
.deal-month-head + .deal-year-row { border-top: 0; padding-top: .25rem; }
.deal-year-label {
  padding-top: .16rem; font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--text-faint);
}
.deal-month-head + .deal-year-row .deal-year-label { color: var(--text); }
.deal-year-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: .32rem; min-height: 1.6rem; min-width: 0;
}
.deal-year-chips.is-pre {
  padding: .1rem .35rem; border-radius: 3px;
  background: repeating-linear-gradient(135deg, var(--line-soft) 0 1px, transparent 1px 5px);
}
.deal-empty { display: none; font-size: .74rem; color: var(--text-faint); }
.deal-year-chips.is-empty .deal-empty { display: inline; }

/* 折扣标签：高价值最醒目，小众次之，低价值淡显，赠送收成圆点行内标 */
.deal-chip {
  display: inline-flex; align-items: baseline; gap: .3rem; max-width: 100%;
  padding: .18rem .45rem; border-radius: 4px; text-decoration: none; line-height: 1.35;
  transition: background-color .14s ease, border-color .14s ease, opacity .14s ease;
}
.deal-chip b { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.deal-chip small { font-family: var(--mono); font-size: .68rem; color: var(--text-dim); white-space: nowrap; }
.deal-chip-high {
  border: 1px solid color-mix(in srgb, var(--cal) 58%, transparent);
  border-left: 3px solid var(--cal);
  background: color-mix(in srgb, var(--cal) 26%, var(--bg-raised));
  color: var(--text);
}
.deal-chip-high b { color: var(--text); }
.deal-chip-niche {
  border: 1px solid color-mix(in srgb, var(--cal) 30%, transparent);
  border-left: 2px solid var(--cal);
  background: color-mix(in srgb, var(--cal) 11%, var(--bg-raised));
  color: var(--text);
}
.deal-chip-niche b { font-weight: 600; }
.deal-chip-low {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
}
.deal-chip-low b { font-weight: 500; color: var(--text-dim); }
.deal-chip-gift {
  padding: .14rem .35rem; border: 1px solid transparent; background: transparent; color: var(--text-dim);
}
.deal-chip-gift b { font-weight: 500; font-size: .74rem; }
.deal-dot {
  flex: none; align-self: center; width: .48rem; height: .48rem; border-radius: 50%;
  background: var(--cal);
}
.deal-chip.is-cont { border-style: dashed; opacity: .62; }
.deal-chip:hover {
  opacity: 1;
  border-color: var(--cal);
  background: color-mix(in srgb, var(--cal) 34%, var(--bg-raised));
  color: var(--text);
}
.deal-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* 明细：按年折叠，按月分组 */
.deals-archive { margin-top: .4rem; }
.cal-year { margin-top: 1.2rem; scroll-margin-top: 5rem; }
.cal-year > summary { cursor: pointer; list-style: none; }
.cal-year > summary::-webkit-details-marker { display: none; }
.cal-year > summary::after { content: "▾"; margin-left: auto; font-size: .8rem; color: var(--text-faint); }
.cal-year:not([open]) > summary::after { content: "▸"; }
.cal-year > summary:hover .news-month-n { color: var(--deals); }
.cal-month { margin: .6rem 0 1rem; }
.cal-month-h { margin: 0 0 .35rem; font-family: var(--serif); font-size: .98rem; }
.cal-items { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .cal-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cal-item {
  min-width: 0; padding: .5rem .65rem; border: 1px solid var(--line-soft); border-left: 3px solid var(--cal);
  border-radius: var(--radius); background: var(--bg-raised); scroll-margin-top: 5rem;
}
.cal-item:target, .cal-item.is-flash { outline: 2px solid color-mix(in srgb, var(--cal) 65%, transparent); outline-offset: 1px; }
.cal-item p { margin: 0; }
.cal-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.cal-item-name { font-weight: 700; color: var(--text); }
a.cal-item-name { text-decoration: none; }
a.cal-item-name:hover { color: var(--deals); text-decoration: underline; }
.cal-item-en { font-size: .74rem; color: var(--text-faint); }
.cal-item p.cal-item-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; margin-top: .25rem;
  font-size: .74rem; color: var(--text-dim);
}
.cal-item-meta time { font-family: var(--mono); color: var(--text); }
.cal-tag { padding: 0 .4rem; border: 1px solid color-mix(in srgb, var(--cal) 55%, transparent); border-radius: 999px; line-height: 1.5; color: var(--cal); }
.cal-tier { font-weight: 700; color: var(--text-faint); }
.cal-tier-high { color: var(--zhu); }
.cal-tier-niche { color: var(--text-dim); }
.cal-item p.cal-item-line { margin-top: .25rem; font-size: .82rem; line-height: 1.6; }
.cal-item-line b { margin-right: .45rem; font-weight: 400; font-size: .72rem; letter-spacing: .1em; color: var(--text-faint); }

.cal-pop { position: absolute; z-index: 40; width: min(22rem, calc(100vw - 1.5rem)); margin: 0; padding: 0; list-style: none; }
.cal-pop .cal-item { padding-right: 2rem; box-shadow: 0 14px 32px -14px rgba(0, 0, 0, .7); }
.cal-pop.is-group {
  display: grid; gap: .4rem; max-height: min(65vh, 32rem); overflow-y: auto;
  padding: .45rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .75);
}
.cal-pop-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .05rem .2rem .2rem; font-size: .78rem; font-weight: 700; color: var(--text-dim);
}
.cal-pop.is-group .cal-pop-close { position: static; flex: none; }
.cal-pop.is-group .cal-item { padding-right: .65rem; box-shadow: none; }
.cal-pop-close {
  position: absolute; top: .3rem; right: .35rem; width: 1.6rem; height: 1.6rem; padding: 0;
  border: 0; border-radius: 4px; background: transparent; color: var(--text-dim); font-size: 1rem; cursor: pointer;
}
.cal-pop-close:hover { color: var(--text); background: var(--line-soft); }

/* ---------- 长文阅读：锚点偏移、右侧目录（TOC）、可折叠块（::: 折叠）与小分页（::: 分页） ---------- */
/* html 已有 scroll-padding-top: 4.5rem；这里只留微小余量，避免两者相加把落点推太低 */
.prose h2[id], .prose h3[id] { scroll-margin-top: .5rem; }

/* 目录：窄屏位于页头下方折叠；宽屏（≥1120px）移至右侧悬浮跟随 */
.article-toc { margin: 1rem 0 1.4rem; }
.bio.news > .article-toc { max-width: var(--measure); margin: 0 auto 1.4rem; }
.battle-body > .article-toc { max-width: var(--measure); margin: 0 auto 1.4rem; }
.toc-box {
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--panel-shadow);
  overflow: hidden;
}
.toc-summary {
  display: flex; align-items: center; gap: .45rem;
  padding: .6rem .9rem; cursor: pointer; list-style: none; user-select: none;
  font-family: var(--sans); font-size: .88rem; font-weight: 700; color: var(--text);
}
.toc-summary::-webkit-details-marker { display: none; }
.toc-summary::before {
  content: "▸"; display: inline-block; color: var(--gold); font-size: .85em;
  transition: transform .16s ease;
}
.toc-box[open] > .toc-summary::before { transform: rotate(90deg); }
.toc-summary:hover { color: var(--gold); }
.toc-count {
  margin-left: auto; font-family: var(--mono); font-size: .74rem;
  font-weight: 400; color: var(--text-faint);
}
.toc-nav { border-top: 1px solid var(--line-soft); padding: .5rem .45rem .6rem; }
.toc-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .12rem;
}
.toc-item a {
  display: flex; align-items: baseline; gap: .4rem;
  padding: .28rem .55rem; border-left: 2px solid transparent; border-radius: 0 4px 4px 0;
  font-family: var(--sans); font-size: .84rem; line-height: 1.45;
  color: var(--text-dim); text-decoration: none; overflow-wrap: anywhere;
  transition: color .14s, background-color .14s, border-color .14s;
}
.toc-item.is-sub a { padding-left: 1.2rem; font-size: .8rem; color: var(--text-faint); }
.toc-item a:hover { color: var(--text); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.toc-item a.is-active {
  color: var(--gold); font-weight: 600;
  border-left-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 11%, transparent);
}
.toc-dot {
  flex: none; width: .45rem; height: .45rem; border-radius: 50%;
  transform: translateY(-.08em);
}
.toc-badge-hong .toc-dot { background: var(--hong); }
.toc-badge-hei .toc-dot { background: var(--text-dim); box-shadow: inset 0 0 0 1px var(--hei-edge); }
.toc-badge-gaochao .toc-dot { background: var(--gold); }

@media (min-width: 1120px) {
  .article-frame.has-toc {
    max-width: calc(var(--measure) + var(--toc-gap) + var(--toc-w));
    margin-inline: auto;
  }
  .article-frame.has-toc > .back,
  .article-frame.has-toc > .pager {
    max-width: var(--measure); margin-inline: 0;
  }
  .bio.has-toc,
  .page-corp .bio.corp.has-toc {
    display: grid;
    grid-template-columns: minmax(0, var(--measure)) var(--toc-w);
    column-gap: var(--toc-gap);
    align-items: start;
    max-width: none; margin-inline: 0;
  }
  .bio.has-toc > :not(.article-toc) { grid-column: 1; min-width: 0; }
  .bio.has-toc > .article-toc {
    grid-column: 2; grid-row: 1 / span 24;
    position: sticky; top: 7.1rem; margin: 0;
  }
  .bio.news.has-toc > .news-head,
  .bio.news.has-toc > .news-credit,
  .bio.news.has-toc > .news-prose,
  .bio.news.has-toc > .news-prose > * {
    max-width: none; margin-inline: 0;
  }
  .bio.news.has-toc > .news-prose > table { max-width: 100%; }
  .battle-body.has-toc {
    max-width: calc(var(--measure) + var(--toc-gap) + var(--toc-w));
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, var(--measure)) var(--toc-w);
    column-gap: var(--toc-gap);
    align-items: start;
  }
  .battle-body.has-toc > .battle-prose { grid-column: 1; max-width: none; margin-inline: 0; min-width: 0; }
  .battle-body.has-toc > .article-toc {
    grid-column: 2; grid-row: 1;
    position: sticky; top: 5.5rem; margin: 0; max-width: none;
  }
  .article-toc .toc-summary { cursor: default; pointer-events: none; }
  .article-toc .toc-summary::before { display: none; }
  .article-toc .toc-nav {
    max-height: calc(100vh - 11rem); overflow-y: auto;
    scrollbar-width: thin;
  }
  @supports selector(::details-content) {
    .article-toc .toc-box::details-content { content-visibility: visible; display: block; }
  }
}

/* 可折叠块（::: 折叠）—— 零 JS 原生可用 */
.prose .fold {
  margin: 1.2em 0;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--panel-shadow);
  overflow: hidden;
}
.prose .fold-summary {
  display: flex; align-items: center; gap: .55rem;
  padding: .65rem 1rem; cursor: pointer; list-style: none; user-select: none;
  font-family: var(--sans); font-size: .92rem; font-weight: 700; line-height: 1.45;
  color: var(--text); background: color-mix(in srgb, var(--bg-sunk) 55%, transparent);
  transition: color .14s, background-color .14s;
}
.prose .fold-summary::-webkit-details-marker { display: none; }
.prose .fold-summary::before {
  content: "▸"; flex: none; color: var(--gold); font-size: .88em;
  transition: transform .16s ease;
}
.prose .fold[open] > .fold-summary {
  color: var(--gold); border-bottom: 1px solid var(--line-soft);
}
.prose .fold[open] > .fold-summary::before { transform: rotate(90deg); }
.prose .fold-summary:hover { color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, var(--bg-sunk)); }
.prose .fold-body { padding: .85rem 1.05rem; font-size: .96rem; line-height: 1.8; }
.prose .fold-body > :first-child { margin-top: 0; }
.prose .fold-body > :last-child { margin-bottom: 0; }
.prose .fold-body table { margin: .5rem 0; }

/* 小分页（::: 分页）—— 无 JS 时全部面板连同标题顺序展开可读；有 JS 时切换标签页 */
.prose .tabs {
  margin: 1.3em 0;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--panel-shadow);
  overflow: hidden;
}
.prose .tabs-bar {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 .6rem;
  padding: .35rem .75rem 0;
  background: var(--bg-sunk); border-bottom: 1px solid var(--line-soft);
}
.prose .tabs-bar:empty,
.prose .tabs:not(.is-enhanced) .tabs-bar:not(:has(.tabs-caption)) { display: none; }
.prose .tabs-caption {
  display: inline-flex; align-items: center;
  padding: .35rem .25rem .55rem 0;
  font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  color: var(--gold); white-space: nowrap;
}
.prose .tabs-list { display: none; flex-wrap: wrap; gap: .15rem .25rem; min-width: 0; }
.prose .tabs.is-enhanced .tabs-list { display: flex; }
.prose .tabs-tab {
  position: relative; appearance: none; border: 0; background: transparent;
  padding: .42rem .75rem .52rem; border-radius: var(--radius) var(--radius) 0 0;
  font-family: var(--sans); font-size: .86rem; font-weight: 600; line-height: 1.35;
  color: var(--text-dim); cursor: pointer; white-space: nowrap;
  transition: color .14s, background-color .14s;
}
.prose .tabs-tab:hover { color: var(--text); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.prose .tabs-tab.is-active {
  color: var(--text); background: var(--bg-raised);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.prose .tabs-preamble {
  padding: .75rem 1.05rem 0; font-size: .95rem; color: var(--text-dim);
}
.prose .tabs-preamble > :first-child { margin-top: 0; }
.prose .tabs-preamble > :last-child { margin-bottom: 0; }
.prose .tabs-panel { padding: .9rem 1.05rem; font-size: .97rem; line-height: 1.82; }
.prose .tabs:not(.is-enhanced) .tabs-panel + .tabs-panel { border-top: 1px dashed var(--line-soft); }
.prose .tabs-panel-label {
  margin: 0 0 .5rem; font-family: var(--sans); font-size: .88rem; font-weight: 700;
  color: var(--gold); letter-spacing: .03em; text-align: left;
}
.prose .tabs.is-enhanced .tabs-panel-label { display: none; }
.prose .tabs-panel > :first-child { margin-top: 0; }
.prose .tabs-panel > :last-child { margin-bottom: 0; }
.prose .tabs-panel ul, .prose .tabs-panel ol { margin: .45em 0; }
.prose .tabs-panel h4, .prose .tabs-panel h5 {
  margin: 1em 0 .35em; font-family: var(--sans); font-size: .95rem; font-weight: 700; color: var(--gold);
}
.prose .tabs-panel h4:first-child, .prose .tabs-panel h5:first-child { margin-top: 0; }
.prose .tabs.is-enhanced .tabs-panel > .tabs-panel-label + * { margin-top: 0; }
@media (max-width: 640px) {
  .prose .tabs-bar { padding: .3rem .55rem 0; }
  .prose .tabs-tab { padding: .38rem .58rem .46rem; font-size: .82rem; }
  .prose .tabs-panel, .prose .fold-body { padding: .75rem .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
