/* ============================================================
   烈毒之渊 · 英雄攻略站 — 共享视觉系统 v2
   Aesthetic: Arcane Codex / 古老法典（暗黑史诗奇幻）
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;900&family=Cinzel+Decorative:wght@700;900&family=Noto+Serif+SC:wght@500;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  /* 底色 — 黑曜石层级 */
  --bg-900: #07070c;
  --bg-800: #0d0d16;
  --bg-700: #141420;
  --surface: #181826;
  --surface-2: #20202f;
  --surface-3: #2a2a3c;

  /* 鎏金 */
  --gold: #e8b84b;
  --gold-bright: #f7d987;
  --gold-dim: #9a7a2e;
  --gold-glow: rgba(232, 184, 75, 0.35);

  /* 奥术紫 */
  --arcane: #a855f7;
  --arcane-dim: #6d28d9;
  --arcane-glow: rgba(168, 85, 247, 0.3);

  /* 文字 */
  --text: #ece9e2;
  --text-2: #aaa39a;
  --text-3: #6f6a64;
  --text-4: #4a4642;

  /* 阶段语义色 */
  --p1: #e63946;
  --p1-bg: rgba(230, 57, 70, 0.12);
  --trans: #c084fc;
  --trans-bg: rgba(192, 132, 252, 0.12);
  --p2: #f77f00;
  --p2-bg: rgba(247, 127, 0, 0.12);

  --success: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.12);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.12);
  --locked: #6b6b7a;

  --border: rgba(232, 184, 75, 0.14);
  --border-soft: rgba(255, 255, 255, 0.06);
  --radius: 14px;
  --shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 32px -6px var(--gold-glow);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 140px; }

body {
  font-family: 'Noto Sans SC', system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-900);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* 全局氛围背景：径向暗角 + 奥术粒子网格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(109, 40, 217, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(232, 184, 75, 0.06), transparent 55%),
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 184, 75, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 184, 75, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 40%, transparent 100%);
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

/* ============ 语义颜色类 ============ */
.c-red     { color: var(--p1) !important; }
.c-green   { color: var(--success) !important; }
.c-gold    { color: var(--gold) !important; }
.c-blue    { color: #60a5fa !important; }
.c-purple  { color: var(--arcane) !important; }
.c-arcane  { color: var(--arcane) !important; }
.gold-text { color: var(--gold-bright) !important; }

/* ============ 顶部导航 ============ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 7, 12, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px -10px rgba(0, 0, 0, 0.8);
}
.topnav-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-family: 'Noto Serif SC', serif; font-weight: 700; font-size: 16px;
  color: var(--gold-bright); text-decoration: none; letter-spacing: 1px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  display: grid; place-items: center;
  font-family: 'Cinzel', serif; font-weight: 900; font-size: 20px; color: #1a1206;
  box-shadow: var(--shadow-glow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .zh { font-family: 'Noto Serif SC', serif; font-weight: 700; font-size: 16px; color: var(--gold-bright); letter-spacing: 1px; }
.brand-text .en { font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 2px; color: var(--text-3); text-transform: uppercase; }
.nav-menu { display: block; }

/* 章节轨道（桌面端全宽居中，可换行；移动端折叠为下拉） */
.nav-rail {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px 4px; padding: 9px 22px 11px;
  border-top: 1px solid var(--border);
  background: rgba(7, 7, 12, 0.35);
}
.nav-rail a {
  color: var(--text-2); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 5px 11px; border-radius: 99px; border: 1px solid transparent;
  transition: color .25s, background .25s, border-color .25s; white-space: nowrap;
}
.nav-rail a:hover { color: var(--gold-bright); background: rgba(232,184,75,0.07); border-color: var(--border); }
.nav-rail a.nav-active {
  color: var(--gold-bright); font-weight: 600;
  background: rgba(232,184,75,0.1); border-color: var(--border);
}
/* 站点导航与章节列表之间的细分隔线 */
.nav-div { width: 1px; height: 18px; background: var(--border); margin: 0 8px; }

/* 移动端汉堡按钮（默认隐藏，≤768px 显示） */
.nav-toggle {
  display: none;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--gold-bright); font-size: 20px; line-height: 1;
  cursor: pointer; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s, transform .1s;
}
.nav-toggle:hover { background: var(--surface-3); border-color: var(--gold-dim); }
.nav-toggle:active { transform: scale(0.95); }
.nav-toggle .ico-bar { display: block; }

/* ============ 英雄区（详情页） ============ */
.hero {
  position: relative; padding: 70px 0 52px; text-align: center; overflow: hidden;
}
.hero-badge {
  display: inline-block;
  font-family: 'Cinzel', serif; letter-spacing: 4px; font-size: 12px;
  color: var(--arcane); text-transform: uppercase;
  padding: 6px 18px; border: 1px solid rgba(168,85,247,0.25);
  border-radius: 99px; background: rgba(168,85,247,0.08);
  margin-bottom: 18px;
}
.hero-title {
  font-family: 'Noto Serif SC', serif; font-weight: 900;
  font-size: clamp(32px, 6vw, 58px); line-height: 1.08; letter-spacing: 3px;
  background: linear-gradient(180deg, #fff7e0 0%, var(--gold) 55%, var(--gold-dim) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-family: 'Cinzel', serif; letter-spacing: 2.5px; font-size: clamp(12px, 1.8vw, 15px);
  color: var(--text-2); margin-top: 12px; text-transform: uppercase;
}
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px;
  margin-top: 18px; font-size: 13px; color: var(--text-3);
}
.hero-meta span { opacity: 0.85; }

/* 首页英雄区变体 */
.hero-kicker {
  font-family: 'Cinzel', serif; letter-spacing: 6px; font-size: 13px;
  color: var(--gold); text-transform: uppercase; margin-bottom: 18px;
  opacity: 0; animation: fadeUp 0.8s 0.1s forwards;
}
.hero-desc {
  max-width: 620px; margin: 22px auto 0; color: var(--text-2); font-size: 15px;
  opacity: 0; animation: fadeUp 0.9s 0.55s forwards;
}
.hero-divider {
  width: 220px; height: 2px; margin: 34px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; animation: fadeUp 0.9s 0.7s forwards;
}

/* ============ 进度条 ============ */
.progress-wrap { max-width: 560px; margin: 34px auto 0; opacity: 0; animation: fadeUp 0.9s 0.85s forwards; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.progress-label b { color: var(--gold-bright); font-family: 'Cinzel', serif; }
.progress-track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border-soft); }
.progress-fill {
  height: 100%; border-radius: 99px; width: 22%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-bright));
  box-shadow: 0 0 16px var(--gold-glow);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============ 章节标题 ============ */
.section-head { text-align: center; margin: 70px 0 36px; }
.section-head .en { font-family: 'Cinzel', serif; letter-spacing: 5px; font-size: 12px; color: var(--gold-dim); text-transform: uppercase; }
.section-head .zh {
  font-family: 'Noto Serif SC', serif; font-weight: 700; font-size: clamp(24px, 4vw, 34px);
  color: var(--text); margin-top: 6px; letter-spacing: 2px;
}
.section-head .zh::after {
  content: ""; display: block; width: 64px; height: 3px; margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); border-radius: 2px;
}

/* ============ BOSS 卡片网格 ============ */
.boss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.boss-card {
  position: relative; display: block; text-decoration: none; color: inherit;
  background: linear-gradient(160deg, var(--surface), var(--bg-800));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px 22px; overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s, border-color 0.35s;
  opacity: 0; animation: fadeUp 0.7s forwards;
}
.boss-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity 0.35s;
}
.boss-card:hover { transform: translateY(-7px); box-shadow: var(--shadow), var(--shadow-glow); border-color: var(--gold); }
.boss-card:hover::before { opacity: 1; }

.boss-card.locked { opacity: 0.55; }
.boss-card.locked .boss-portrait { filter: grayscale(0.85) brightness(0.5); }
.boss-card.locked:hover { transform: translateY(-4px); border-color: var(--border); }

.boss-num {
  font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 2px; color: var(--gold-dim);
  display: flex; align-items: center; gap: 8px;
}
.boss-num .idx {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: var(--surface-3); color: var(--gold); font-weight: 700; font-size: 13px;
  border: 1px solid var(--border);
}
.boss-portrait {
  height: 132px; margin: 16px 0 14px; border-radius: 10px;
  background:
    radial-gradient(circle at 50% 40%, rgba(168,85,247,0.25), transparent 60%),
    linear-gradient(160deg, var(--surface-3), var(--bg-900));
  display: grid; place-items: center; overflow: hidden; position: relative;
  border: 1px solid var(--border-soft);
}
.boss-portrait .glyph {
  font-family: 'Cinzel Decorative', serif; font-size: 52px; font-weight: 900;
  color: var(--gold); opacity: 0.85; text-shadow: 0 0 30px var(--gold-glow);
}
.boss-portrait .lock { font-size: 40px; opacity: 0.4; }
.boss-name {
  font-family: 'Noto Serif SC', serif; font-weight: 700; font-size: 20px;
  color: var(--text); letter-spacing: 1px; line-height: 1.3;
}
.boss-en { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 1.5px; color: var(--text-3); text-transform: uppercase; margin-top: 3px; }
.boss-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  font-size: 11.5px; padding: 3px 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-soft);
}
.chip.diff { color: var(--gold-bright); border-color: var(--border); background: var(--warn-bg); }
.boss-status { margin-top: 16px; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.status-done { color: var(--success); }
.status-done::before { content: "◆"; }
.status-wip { color: var(--warn); }
.status-wip::before { content: "◈"; }
.status-lock { color: var(--locked); }
.status-lock::before { content: "🔒"; }

/* ============ 返回链接 ============ */
.back-link {
  display: inline-flex; align-items: center; gap: 8px; margin: 30px 0 0;
  color: var(--text-2); text-decoration: none; font-size: 14px; transition: color 0.25s, gap 0.25s;
}
.back-link:hover { color: var(--gold-bright); gap: 12px; }

/* ============ 详情页头部 ============ */
.boss-hero {
  position: relative; padding: 64px 0 48px; border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(168,85,247,0.12), transparent 60%);
}
.boss-hero .crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 18px; }
.boss-hero .crumbs a { color: var(--text-2); text-decoration: none; }
.boss-hero .crumbs a:hover { color: var(--gold-bright); }
.boss-hero .num-tag {
  font-family: 'Cinzel', serif; font-size: 14px; letter-spacing: 3px; color: var(--gold);
}
.boss-hero h1 {
  font-family: 'Noto Serif SC', serif; font-weight: 900; font-size: clamp(32px, 5vw, 52px);
  letter-spacing: 3px; margin-top: 8px;
  background: linear-gradient(180deg, #fff7e0, var(--gold) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.boss-hero .en {
  font-family: 'Cinzel', serif; letter-spacing: 3px; color: var(--text-2);
  text-transform: uppercase; font-size: 14px; margin-top: 8px;
}
.boss-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.badge.gold { color: var(--gold-bright); border-color: var(--border); background: rgba(232,184,75,0.08); }

/* ============ 信息条（详情页 info-strip） ============ */
.info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0;
}
.info-item {
  background: var(--surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'Cinzel', serif;
}
.info-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.highlight-p2 { color: var(--p2) !important; font-weight: 700; }

/* 兼容旧命名 */
.info-cell { background: var(--surface); padding: 18px 20px; }
.info-cell label { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-3); font-family: 'Cinzel', serif; }
.info-cell .val { font-size: 16px; font-weight: 700; color: var(--text); margin-top: 5px; }

/* ============ 机制卡片 ============ */
.mech {
  background: linear-gradient(160deg, var(--surface), var(--bg-800));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.mech > h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-bright);
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(90deg, rgba(232,184,75,0.06), transparent);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 兼容使用 .mech-head 包裹（span.tag + h3）的页面 */
.mech-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(90deg, rgba(232,184,75,0.06), transparent);
}
.mech-head h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 17px; font-weight: 700; color: var(--gold-bright);
  margin: 0; padding: 0; border: 0; background: none;
}
.mech-head .tag { margin-left: 0; }
.mech.highlight-mech .mech-head {
  background: linear-gradient(90deg, rgba(168,85,247,0.1), transparent);
  border-bottom-color: rgba(168,85,247,0.2);
}
.mech.danger-mech .mech-head {
  background: linear-gradient(90deg, rgba(230,57,70,0.08), transparent);
  border-bottom-color: rgba(230,57,70,0.2);
}
.mech > ul, .mech > ol {
  padding: 18px 22px;
  margin: 0;
}
.mech > ul li, .mech > ol li {
  font-size: 14.2px;
  color: var(--text-2);
  margin-bottom: 8px;
  line-height: 1.7;
}
.mech > ul li::marker { color: var(--gold); }
.mech > ul ul, .mech > ol ol, .mech > ul ol, .mech > ol ul {
  margin-top: 6px;
  padding-left: 20px;
}
.mech > ul ul li, .mech > ol ol li {
  font-size: 13.5px;
  margin-bottom: 4px;
  color: var(--text-3);
}
.mech > p {
  padding: 14px 22px;
  font-size: 14.2px;
  color: var(--text-2);
  line-height: 1.7;
}

/* 机制卡内标题 */
.mech-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--gold-dim);
}

/* 机制卡变体 */
.mech.highlight-mech {
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: var(--shadow), 0 0 30px -8px var(--arcane-glow);
}
.mech.highlight-mech > h3 {
  background: linear-gradient(90deg, rgba(168,85,247,0.1), transparent);
  border-bottom-color: rgba(168,85,247,0.2);
}
.mech.danger-mech {
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: var(--shadow), 0 0 30px -8px rgba(230,57,70,0.15);
}
.mech.danger-mech > h3 {
  background: linear-gradient(90deg, rgba(230,57,70,0.08), transparent);
  border-bottom-color: rgba(230,57,70,0.2);
}

/* 标签（内联彩色标签） */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.tag.p1      { background: var(--p1-bg); color: var(--p1); }
.tag.trans   { background: var(--trans-bg); color: var(--trans); }
.tag.p2      { background: var(--p2-bg); color: var(--p2); }
.tag.info    { background: rgba(232,184,75,0.1); color: var(--gold); }
.tag.new     { background: var(--success-bg); color: var(--success); }
.tag.c-green { background: rgba(74,222,128,0.12); color: var(--success); }
.tag.c-red   { background: rgba(230,57,70,0.12); color: var(--p1); }
.tag.c-arcane{ background: rgba(168,85,247,0.12); color: var(--arcane); }

/* 引用块 */
.quote-box {
  margin: 18px 22px;
  padding: 16px 20px;
  border-left: 3px solid var(--gold);
  background: rgba(232,184,75,0.04);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}
.quote-box strong { color: var(--gold-bright); }
.quote-box em { color: var(--text-3); font-style: normal; }

/* ============ 图片 + Lightbox（重点打磨） ============ */
img { max-width: 100%; height: auto; display: block; }

.img-frame {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: #000;
  box-shadow:
    0 4px 20px -4px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(255,255,255,0.03);
  position: relative;
}
/* 图片上方微光扫过效果 */
.img-frame::before {
  content: "";
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.04),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 2;
}
.img-frame:hover::before { left: 150%; }

.img-frame img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
  object-fit: contain;
  filter: brightness(0.97) contrast(1.03);
}
.img-frame:hover img {
  transform: scale(1.01);
  filter: brightness(1) contrast(1.05);
}

/* 图注 */
.img-cap, .img-frame figcaption {
  padding: 12px 18px;
  font-size: 12.5px;
  color: var(--text-3);
  background: linear-gradient(180deg, var(--surface), var(--bg-800));
  border-top: 1px solid var(--border-soft);
  line-height: 1.65;
}
.img-cap small, .img-frame figcaption small {
  color: var(--text-4);
  opacity: 0.85;
}

.src-tag { color: #1d4ed8; background: #1e2a44; padding: 1px 8px; border-radius: 8px; font-size: 11px; margin-left: 6px; font-weight: 600; }
.new-tag { color: #065f46; background: #062e22; padding: 1px 8px; border-radius: 8px; font-size: 11px; margin-left: 6px; font-weight: 700; }

.hl { background: var(--warn-bg); border-left: 3px solid var(--warn); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 14px 0; font-size: 14px; color: var(--text); }
.hl-new { background: var(--success-bg); border-left: 3px solid var(--success); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 14px 0; font-size: 14px; color: var(--text); }
.num { display: inline-block; background: var(--success-bg); color: #6ee7a0; padding: 1px 8px; border-radius: 6px; font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700; }
.num-warn { display: inline-block; background: #3a2a0a; color: #fbbf24; padding: 1px 8px; border-radius: 6px; font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700; }

/* ============ 流程图 ============ */
.flow {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; padding: 22px 12px; background: var(--bg-800);
  border: 1px solid var(--border-soft); border-radius: 10px; margin: 14px 0;
}
.flow-step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 100px; }
.flow-num {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-3), var(--bg-800));
  border: 2px solid var(--gold-dim);
  display: grid; place-items: center;
  font-family: 'Cinzel', serif; font-weight: 900; font-size: 16px;
  color: var(--gold-bright); box-shadow: 0 0 12px rgba(232,184,75,0.15);
}
.flow-step > div:last-child {
  font-size: 12px; text-align: center; color: var(--text-2); line-height: 1.5;
}
.flow-step > div:last-child strong { color: var(--text); }
.flow-arrow { color: var(--gold-dim); font-size: 18px; margin: 0 2px; }
.flow-ico { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.flow-ico.a { background: var(--p1); } .flow-ico.n { background: var(--arcane); } .flow-ico.b { background: #6366f1; } .flow-ico.d { background: var(--p2); }
.flow-lbl { font-size: 11px; font-weight: 700; color: var(--text); white-space: nowrap; }

/* ============ 表格 ============ */
.tbl-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--surface);
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 13.5px;
  overflow: hidden;
}
.tbl th {
  background: var(--surface-2);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--gold-bright);
  border-bottom: 2px solid var(--border);
  font-family: 'Noto Serif SC', serif;
  white-space: nowrap;
}
.tbl td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-2);
  vertical-align: top;
}
.tbl tbody tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
.tbl tbody tr:hover td { background: rgba(232,184,75,0.05); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl.compact th, .tbl.compact td { padding: 9px 14px; font-size: 13px; }

/* ============ 章节标题（详情页） ============ */
.section { margin-bottom: 10px; }
.part-title {
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 23px;
  margin: 48px 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 1px;
  color: var(--text);
}
.part-title .glyph {
  font-size: 22px;
  line-height: 1;
}
.part-title::before {
  content: "";
  width: 4px;
  height: 26px;
  border-radius: 3px;
  background: var(--gold);
  display: inline-block;
  flex-shrink: 0;
}
.part-title.p1-bar, .part-title.p1::before { background: var(--p1); }
.part-title.trans-bar, .part-title.trans::before { background: var(--trans); }
.part-title.p2-bar, .part-title.p2::before { background: var(--p2); }

/* ============ 页脚 ============ */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 70px;
  padding: 40px 0 50px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.footer .brand-line { font-family: 'Noto Serif SC', serif; color: var(--gold); font-size: 15px; letter-spacing: 2px; margin-bottom: 10px; }
.footer-sub { margin-top: 6px; font-size: 12px; color: var(--text-4); }

/* ============ Lightbox（点击图片放大） ============ */
#lb {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4, 4, 8, 0.94);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}
#lb img {
  max-width: 94vw; max-height: 92vh; object-fit: contain;
  border-radius: 8px;
  box-shadow:
    0 0 80px rgba(0, 0, 0, 0.8),
    0 0 40px var(--gold-glow);
  border: 1px solid rgba(232,184,75,0.2);
}
#lb .close-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.45); font-size: 12.5px; letter-spacing: 1px;
  pointer-events: none;
  background: rgba(0,0,0,0.4); padding: 6px 18px; border-radius: 99px;
}

/* ============ 动画 ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  /* 容器与导航 */
  .container { padding: 0 16px; }
  .topnav-inner { padding: 10px 16px; gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(10, 10, 16, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px -12px rgba(0,0,0,0.8);
    max-height: 82vh; overflow-y: auto;
  }
  .nav-menu.open { display: flex; }
  .nav-rail {
    flex-direction: column; align-items: stretch;
    border-top: none; background: none; padding: 6px 14px 14px; gap: 0;
  }
  .nav-rail a {
    padding: 13px 8px; font-size: 14px; white-space: normal;
    border-radius: 0; border: none; border-bottom: 1px solid var(--border-soft);
  }
  .nav-rail a:last-child { border-bottom: none; }
  .nav-rail a.nav-active {
    background: rgba(232,184,75,0.08); border-radius: 8px; padding-left: 12px;
  }
  .nav-div { display: none; }

  /* 首页英雄区 */
  .hero { padding: 48px 0 34px; }
  .hero-badge { font-size: 11px; padding: 5px 14px; }
  .hero-title { font-size: clamp(26px, 8vw, 42px); }

  /* BOSS 卡片网格（两列） */
  .boss-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .boss-portrait { height: 100px; }
  .boss-name { font-size: 17px; }

  /* 详情页头部 */
  .boss-hero { padding: 40px 0 30px; }
  .boss-hero .crumbs { font-size: 12px; line-height: 1.7; word-break: break-word; }
  .boss-hero .num-tag { font-size: 12px; letter-spacing: 2px; }
  .boss-hero h1 { letter-spacing: 1px; }
  .boss-badges { gap: 8px; }
  .badge { font-size: 12px; padding: 5px 11px; }

  /* 信息条 */
  .info-strip { grid-template-columns: 1fr 1fr; }

  /* 章节与机制卡 */
  .part-title { font-size: 20px; margin: 34px 0 18px; }
  .mech-head { padding: 14px 18px; }
  .mech-head h3 { font-size: 16px; }
  .mech > h3 { font-size: 15.5px; padding: 14px 18px; }
  .mech > ul, .mech > ol { padding: 14px 18px; }
  .quote-box { margin: 14px 16px; padding: 12px 16px; font-size: 13px; }

  /* 图片 */
  .img-frame { margin: 18px 0; border-radius: 10px; }
  .img-cap, .img-frame figcaption { padding: 10px 14px; font-size: 12px; }

  /* 流程图：窄屏改网格两列，隐藏箭头 */
  .flow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; padding: 16px 12px; }
  .flow-step { min-width: 0; flex: initial; }
  .flow-arrow { display: none; }
  .flow-num { width: 38px; height: 38px; font-size: 14px; }

  /* 表格：放宽换行，横向滚动兜底仍在 */
  .tbl-wrap { margin: 12px 0; }
  .tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 8px 9px; white-space: normal; }

  /* 页脚 */
  .footer { padding: 34px 16px 44px; }

  /* 触屏设备去掉 hover 放大残留 */
  @media (hover: none) {
    .img-frame:hover img { transform: none; }
  }
}

@media (max-width: 480px) {
  .boss-grid { grid-template-columns: 1fr; }
  .info-strip { grid-template-columns: 1fr; }
  .hero-meta { gap: 6px 12px; font-size: 12px; }
  .part-title { font-size: 18px; }
  .boss-card { padding: 22px 18px 18px; }
  .flow { grid-template-columns: 1fr; }
  .tbl th, .tbl td { padding: 7px 8px; font-size: 11.5px; }
}
