@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../fonts/HarmonyOS_Sans_SC_Medium.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  /* 墨与纸 */
  --ink: #0e1110;
  --ink-2: #100e0c;
  --paper: #17140f;
  --paper-2: #1a1814;
  --paper-3: #131110;

  /* 线 */
  --hair: #2e2a24;
  --hair-soft: #241f19;
  --hair-strong: #3a342b;

  /* 朱砂 / 金 / 铜绿 */
  --zhu: #a33b2b;
  --zhu-deep: #8e3226;
  --zhu-light: #c4654e;
  --zhu-dim: #7e4a3e;
  --gold: #c9a227;
  --gold-light: #e4c88a;
  --jade: #3d6b5a;

  /* 字 */
  --t1: #e8e0d0;
  --t2: #b4a48c;
  --t3: #8a8070;
  --t4: #6e675b;
  --t5: #5f594e;
  --t6: #4a453d;

  --sans: 'HarmonyOS Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --serif: 'Source Han Serif SC', 'Noto Serif SC', 'Songti SC', 'SimSun', 'STSong', serif;
  --kai: 'LXGW WenKai TC', 'Kaiti SC', 'KaiTi', 'STKaiti', '楷体', serif;

  --r: 2px;
  --ease: cubic-bezier(0.22, 0.72, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* 伪录态：整页色温往朱砂偏一档，纸面也旧一分 */
html[data-mode='wei'] {
  --ink: #110d0c;
  --ink-2: #130e0c;
  --paper: #191310;
  --paper-2: #1b1512;
  --paper-3: #150f0d;
  --hair: #33251f;
  --hair-soft: #2a1d18;
  --hair-strong: #432c24;
}

body {
  font-family: var(--sans);
  color: var(--t2);
  background: var(--ink);
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: 0.2px;
  overflow-x: hidden;
  transition: background 0.6s var(--ease);
}

/* 纸面颗粒：极淡一层，压住纯色底的数码感 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: rgba(163, 59, 43, 0.4);
  color: #fff;
}

:focus-visible {
  outline: 1px solid var(--zhu-light);
  outline-offset: 3px;
}

/* ---------- 容器 ---------- */
.wrap {
  width: min(1280px, calc(100% - 176px));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 132px 0;
  scroll-margin-top: 76px;
}

/* ---------- 通用排版 ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--zhu);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--zhu);
  opacity: 0.7;
}

.sec-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 52px;
}

.sec-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.32;
  letter-spacing: 3px;
  color: var(--t1);
}

.sec-head p {
  max-width: 780px;
  font-size: 14.5px;
  line-height: 2.05;
  color: var(--t3);
  letter-spacing: 0.5px;
}

.rule {
  height: 1px;
  background: var(--hair);
  width: 100%;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: var(--r);
  font-size: 15px;
  letter-spacing: 3px;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    color 0.3s var(--ease), transform 0.2s var(--ease);
}

.btn--primary {
  background: var(--zhu);
  color: #f5ebdb;
  box-shadow: 0 0 0 1px rgba(163, 59, 43, 0.6), 0 14px 34px -18px rgba(163, 59, 43, 0.9);
}

.btn--primary:hover {
  background: #b74533;
  box-shadow: 0 0 0 1px rgba(196, 101, 78, 0.8), 0 18px 40px -18px rgba(163, 59, 43, 1);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--ghost {
  border: 1px solid var(--hair);
  color: var(--t2);
}

.btn--ghost:hover {
  border-color: var(--hair-strong);
  color: var(--t1);
  background: rgba(232, 224, 208, 0.03);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(14, 17, 16, 0.9), rgba(14, 17, 16, 0));
  border-bottom: 1px solid transparent;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease),
    backdrop-filter 0.45s var(--ease);
}

.topbar.scrolled {
  background: rgba(14, 17, 16, 0.86);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-bottom-color: var(--hair-soft);
}

.topbar__inner {
  width: min(1360px, calc(100% - 96px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__seal {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: #1a1814;
  border: 1px solid #35302a;
  border-radius: var(--r);
  font-family: var(--serif);
  font-size: 14px;
  color: var(--t1);
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.brand__name {
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--t1);
  font-weight: 400;
}

.brand__rule {
  width: 1px;
  height: 15px;
  background: var(--hair);
}

.brand__en {
  font-size: 8.5px;
  letter-spacing: 1.9px;
  color: var(--t4);
  line-height: 1.5;
  max-width: 96px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 13px;
  color: var(--t3);
  letter-spacing: 1px;
  position: relative;
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--zhu);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

.nav a:hover {
  color: var(--t1);
}

.nav a:hover::after {
  width: 100%;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ver {
  font-size: 10px;
  letter-spacing: 0.7px;
  color: var(--t5);
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: var(--r);
  color: var(--t3);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.icon-btn:hover {
  color: var(--t1);
  border-color: var(--hair-strong);
}

.icon-btn[aria-pressed='true'] {
  color: var(--zhu-light);
  border-color: rgba(163, 59, 43, 0.55);
  background: rgba(163, 59, 43, 0.1);
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.topbar .btn--sm {
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 1.5px;
}

/* 移动端菜单 */
.burger {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: flex-end;
}

.burger span {
  display: block;
  height: 1px;
  background: var(--t3);
  transition: width 0.3s var(--ease), transform 0.3s var(--ease);
}

.burger span:nth-child(1) {
  width: 18px;
}
.burger span:nth-child(2) {
  width: 18px;
}
.burger span:nth-child(3) {
  width: 11px;
}

.drawer {
  position: fixed;
  inset: 68px 0 auto 0;
  z-index: 99;
  background: rgba(13, 15, 14, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hair);
  padding: 8px 20px 22px;
  display: none;
  flex-direction: column;
}

.drawer.open {
  display: flex;
}

.drawer a {
  padding: 15px 4px;
  font-size: 14px;
  color: var(--t2);
  border-bottom: 1px solid var(--hair-soft);
  letter-spacing: 2px;
}

.drawer a:last-of-type {
  border-bottom: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* 高度交给内容：矮窗口不再被 900 硬顶撑出滚动，高窗口至少一屏 */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__map {
  position: absolute;
  inset: -6% -3%;
  background: url('../img/ledger-world-map.webp') center 44% / cover no-repeat;
  opacity: 0.34;
  filter: grayscale(0.32) contrast(1.05) brightness(0.92);
  animation: heroDrift 42s ease-in-out infinite alternate;
  z-index: -3;
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.2%, -1%, 0);
  }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(
      ellipse 74% 58% at 50% 44%,
      rgba(14, 17, 16, 0.5) 0%,
      rgba(14, 17, 16, 0.82) 58%,
      rgba(14, 17, 16, 0.97) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(14, 17, 16, 0.86) 0%,
      rgba(14, 17, 16, 0.26) 30%,
      rgba(14, 17, 16, 0.5) 84%,
      rgba(14, 17, 16, 0.85) 100%
    );
}

.hero__grad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(14, 17, 16, 0), var(--ink) 88%);
}

/* 正文与统计条的共同外壳：视差挂在这一层，两块的相对间距恒定 */
.hero__stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 让开 68px 固定顶栏；放在这层不会牵动绝对定位的背景装饰 */
  padding-top: 68px;
  translate: 0 var(--hy, 0px);
  will-change: translate;
}

.hero__inner {
  width: min(1080px, calc(100% - 176px));
  margin-inline: auto;
  padding-top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--zhu-light);
  margin-bottom: 26px;
}

.hero__title {
  position: relative;
  width: min(700px, 76vw);
  margin-bottom: 26px;
}

.hero__title img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.55));
  transition: filter 0.65s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}

/* 「伪」字热区：只覆盖标题左侧第一个字 */
.hero__hot {
  position: absolute;
  left: 1%;
  top: 4%;
  width: 34%;
  height: 92%;
  border-radius: 50%;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.hero__hot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle at 50% 55%, rgba(196, 101, 78, 0.16), transparent 62%);
  transition: opacity 0.5s var(--ease);
}

.hero__hot:hover::after,
.hero__hot:focus-visible::after {
  opacity: 1;
}

.hero__hot.tap::after {
  animation: tapFlash 0.5s ease-out;
}

@keyframes tapFlash {
  0% {
    opacity: 0;
    transform: scale(0.86);
  }
  28% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
  }
}

.hero__tag {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: 9px;
  color: var(--t1);
  margin-bottom: 20px;
  text-indent: 9px;
}

.hero__lede {
  font-size: 14px;
  line-height: 2.1;
  color: #a2947f;
  letter-spacing: 1px;
  max-width: 520px;
  margin-bottom: 34px;
  white-space: pre-line;
}

.hero__cta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__note {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--t5);
}

.hero__note b {
  color: var(--t3);
  font-weight: 400;
}

.hero__stats {
  /* 走正常流：绝对定位 + 视差会让它追上正文，压住按钮 */
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 176px));
  margin: 18px auto 0;
  border-top: 1px solid var(--hair-soft);
  padding-block: 20px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.stat b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  color: var(--gold);
  letter-spacing: 1px;
}

.stat span {
  font-size: 10.5px;
  letter-spacing: 1.8px;
  color: var(--t3);
}

.hero__scroll {
  font-family: var(--kai);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--t6);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__scroll::after {
  content: '';
  width: 1px;
  height: 22px;
  background: linear-gradient(to bottom, var(--hair-strong), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleY(0.6);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
}

/* ---------- 双册 ---------- */
.dual {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: stretch;
}

.ledger-card {
  background: var(--paper);
  border: 1px solid var(--hair);
  padding: 36px 38px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.ledger-card--wei {
  background: #1a1412;
  border-color: #45231c;
}

.ledger-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ledger-card__title {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 6px;
  color: #c4b39a;
}

.ledger-card--wei .ledger-card__title {
  color: #c0846c;
}

.ledger-card__tag {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--t4);
}

.ledger-card--wei .ledger-card__tag {
  color: #7e6157;
}

.ledger-card__rule {
  height: 1px;
  background: #2a2620;
}

.ledger-card--wei .ledger-card__rule {
  background: #3a211c;
}

.ledger-card__body {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2.15;
  letter-spacing: 1.1px;
  color: var(--t2);
  flex: 1;
}

.ledger-card--wei .ledger-card__body {
  color: #bea995;
}

.ledger-card__note {
  font-family: var(--kai);
  font-size: 12.5px;
  line-height: 1.85;
  letter-spacing: 1px;
  color: var(--zhu-light);
}

.ledger-card__foot {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--t5);
}

/* 出处：标清这句是谁写的，免得看着像官网自己编的 */
.ledger-card__src {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--hair);
  color: var(--t6);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* 骑缝 */
.gutter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gutter__line {
  width: 1px;
  flex: 1;
  background: var(--hair);
}

.gutter__seal {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--zhu-deep);
  border-radius: 1px;
  font-family: var(--serif);
  font-size: 13px;
  color: #f0e2ce;
  transform: rotate(-2deg);
  box-shadow: 0 6px 18px -8px rgba(163, 59, 43, 0.8);
}

.ledger-tail {
  margin-top: 44px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.ledger-tail__q {
  font-family: var(--serif);
  font-size: clamp(19px, 1.9vw, 26px);
  letter-spacing: 4px;
  color: #dccfb8;
}

.ledger-tail__by {
  font-family: var(--kai);
  font-size: 11.5px;
  letter-spacing: 2px;
  color: var(--t4);
}

/* 伪录态：正录被朱笔勾掉 */
html[data-mode='wei'] .ledger-card--zheng .ledger-card__body {
  color: #7d6a58;
  text-decoration: line-through;
  text-decoration-color: rgba(163, 59, 43, 0.75);
  text-decoration-thickness: 1px;
}

html[data-mode='wei'] .ledger-card--zheng .ledger-card__title {
  color: #8f755c;
}

html[data-mode='wei'] .hero__title img {
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.55)) drop-shadow(2px 2px 0 rgba(163, 59, 43, 0.35));
}

/* ---------- 境地 / 地图 ---------- */
.map-shell {
  position: relative;
}

.mapframe {
  position: relative;
  border: 1px solid var(--hair);
  background: var(--paper-2);
  overflow: hidden;
}

.mapframe__canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1536 / 1024;
}

.mapframe__canvas > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  filter: saturate(0.92);
}

/* 地标说明卡：桌面贴着地标找空位，手机改成地图下方的常驻卡 */
.map-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9;
  width: 274px;
  padding: 15px 17px 14px;
  background: rgba(14, 12, 10, 0.975);
  border: 1px solid var(--hair-strong);
  border-radius: var(--r);
  box-shadow: 0 26px 60px -24px rgba(0, 0, 0, 0.92);
  opacity: 0;
  translate: 0 7px;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), translate 0.22s var(--ease);
}

.map-tip.on {
  opacity: 1;
  translate: 0 0;
}

.map-tip__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.map-tip__name {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--t1);
}

.map-tip__realm {
  font-size: 9.5px;
  letter-spacing: 1px;
  color: var(--gold);
  white-space: nowrap;
}

.map-tip__desc {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: 0.6px;
  color: var(--t3);
}

.map-tip__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 10px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--hair-soft);
}

.map-tip__stats div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.map-tip__stats dt {
  font-size: 9.5px;
  letter-spacing: 1.2px;
  color: var(--t5);
}

.map-tip__stats dd {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.6px;
  color: var(--t2);
  white-space: nowrap;
}

.map-tip__danger.d-low {
  color: var(--jade);
}

.map-tip__danger.d-mid {
  color: var(--gold);
}

.map-tip__danger.d-high {
  color: var(--zhu-light);
}

.map-tip__danger.d-extreme {
  color: var(--zhu);
}

.map-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.map-legend__t {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--t3);
}

.map-legend__t--end {
  color: var(--zhu);
}

.map-hint {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--t5);
  display: none;
}

/* 残页彩蛋：压在地图右下角边缘外，像从账本里掉出来的一页 */
.scrap {
  position: absolute;
  right: -16px;
  bottom: -34px;
  z-index: 8;
  width: 168px;
  padding: 16px 18px;
  background: linear-gradient(160deg, #e2d6bc, #cdbf9f);
  border: 1px solid #a8977a;
  border-radius: 1px;
  transform: rotate(-5deg) scale(0.9);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.85);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.scrap.on {
  opacity: 1;
  transform: rotate(-5deg) scale(1);
}

.scrap.burn {
  opacity: 0;
  transform: rotate(-9deg) translate(18px, -14px) scale(0.94);
  filter: blur(3px) sepia(0.8);
  transition: opacity 1.1s ease-in, transform 1.1s ease-in, filter 1.1s ease-in;
}

.scrap__t {
  font-family: var(--kai);
  font-size: 16px;
  letter-spacing: 3px;
  color: #33261c;
  font-weight: 700;
  margin-bottom: 6px;
}

.scrap__n {
  font-size: 8.5px;
  line-height: 1.7;
  letter-spacing: 0.4px;
  color: #7a6a54;
}

/* ---------- 执役者 ---------- */
.roles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.role {
  background: var(--paper-3);
  border: 1px solid #29241e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.45s var(--ease),
    background 0.4s var(--ease);
}

.role:hover {
  border-color: #40382d;
  background: #16130f;
  transform: translateY(-4px);
}

.role__art {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 72%, #2b2418 0%, #14110e 68%);
}

.role__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  filter: grayscale(1) contrast(1.08) brightness(0.94);
  transition: filter 0.55s var(--ease), transform 0.9s var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, #000 76%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, #000 76%, rgba(0, 0, 0, 0) 100%);
}

.role:hover .role__art img {
  filter: grayscale(0.55) contrast(1.1) brightness(1);
  transform: scale(1.035);
}

.role__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19, 17, 16, 0.85), transparent 42%);
  pointer-events: none;
}

.role__info {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.role__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.role__name {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--t1);
}

.role__idx {
  font-family: var(--serif);
  font-size: 10px;
  color: var(--t5);
}

.role__desc {
  font-size: 12px;
  line-height: 1.9;
  color: var(--t3);
  letter-spacing: 0.3px;
  flex: 0 0 auto;
}

.role__meta {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--t4);
  padding-top: 2px;
  margin-top: auto;
}

/* ---------- 七院 Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sys {
  background: var(--paper-3);
  border: 1px solid #29241e;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 224px;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.sys:hover {
  border-color: #3d3529;
  background: #15120f;
}

.sys--wide {
  grid-column: span 2;
  min-height: 272px;
}

.sys--abyss {
  background: #151016;
  border-color: #3c2038;
}

.sys--abyss:hover {
  border-color: #55304d;
  background: #171019;
}

.sys__glyph {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--zhu);
}

.sys--abyss .sys__glyph {
  color: #8e5f86;
}

.sys__name {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--t1);
  line-height: 1.3;
}

.sys--wide .sys__name {
  font-size: 30px;
}

.sys__desc {
  font-size: 13px;
  line-height: 1.95;
  color: var(--t3);
  max-width: 620px;
  flex: 0 0 auto;
}

.sys__meta {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--t5);
  margin-top: auto;
}

/* 假目标引语卡 */
.quote-card {
  grid-column: span 1;
  background: #2a1512;
  border-color: #6b3026;
  padding: 28px;
  justify-content: center;
  gap: 12px;
}

.quote-card:hover {
  background: #311813;
  border-color: #8a3d30;
}

.quote-card__k {
  font-size: 9px;
  letter-spacing: 2px;
  color: #8a5a4e;
}

.quote-card__l {
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.55;
  letter-spacing: 2px;
  color: #ebc9ae;
}

.quote-card__by {
  font-family: var(--kai);
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: #7e5a50;
}

/* ---------- 图鉴 ---------- */
.codex {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  align-items: start;
}

.codex__left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 100px;
}

.codex__left h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.38;
  letter-spacing: 3px;
  color: var(--t1);
  font-weight: 600;
  white-space: pre-line;
}

.codex__left p {
  font-size: 13.5px;
  line-height: 2.05;
  color: var(--t3);
}

.codex__left em {
  font-family: var(--kai);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 2px;
  color: var(--t6);
}

.codex__right {
  display: grid;
  grid-template-columns: 1fr 356px;
  gap: 16px;
}

.codex-card {
  background: var(--paper-3);
  border: 1px solid #29241e;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s var(--ease);
}

.codex-card:hover {
  border-color: #3d3529;
}

.codex-card__art {
  height: 384px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, #2a2419 0%, #12100d 72%);
}

.codex-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(1) contrast(1.06);
  transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

.codex-card:hover .codex-card__art img {
  transform: scale(1.04);
  filter: grayscale(0.6) contrast(1.08);
}

.codex-card__info {
  padding: 20px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.codex-card__k {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--zhu);
}

.codex-card__t {
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.95;
  letter-spacing: 0.7px;
  color: var(--t2);
}

.codex-card__n {
  font-family: var(--kai);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--t4);
}

.codex__small {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.codex-sm {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  border: 1px solid #29241e;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  flex: 1;
  transition: border-color 0.35s var(--ease);
}

.codex-sm:hover {
  border-color: #3d3529;
}

.codex-sm::after {
  content: attr(data-glyph);
  position: absolute;
  right: 2px;
  bottom: -34px;
  font-family: var(--serif);
  font-size: 118px;
  line-height: 1;
  font-weight: 700;
  color: #1e1a15;
  pointer-events: none;
  user-select: none;
  transition: color 0.5s var(--ease);
}

.codex-sm:hover::after {
  color: #241e17;
}

.codex-sm > * {
  position: relative;
  z-index: 1;
}

.codex-sm__k {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--zhu);
}

.codex-sm__k--jade {
  color: var(--jade);
}

.codex-sm__t {
  font-family: var(--serif);
  font-size: 12.8px;
  line-height: 1.95;
  letter-spacing: 0.6px;
  color: var(--t2);
}

.codex-sm__n {
  font-size: 9.5px;
  letter-spacing: 1.2px;
  color: var(--t5);
}

/* ---------- 天机阁摘录 ---------- */
.heaven {
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  background: linear-gradient(180deg, rgba(26, 24, 20, 0.5), rgba(14, 17, 16, 0));
}

.heaven .wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: start;
}

.heaven__side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 100px;
}

.heaven__side .eyebrow {
  color: var(--jade);
}

.heaven__side .eyebrow::before {
  background: var(--jade);
}

.heaven__side h3 {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--t1);
  font-weight: 500;
  writing-mode: horizontal-tb;
}

.heaven__side p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--t5);
  letter-spacing: 1px;
}

.heaven__body {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 2.35;
  letter-spacing: 1.4px;
  color: #b8a892;
  max-width: 720px;
}

.heaven__body p + p {
  margin-top: 22px;
}

.heaven__body .dropcap::first-letter {
  font-size: 2.9em;
  float: left;
  line-height: 0.86;
  padding: 4px 10px 0 0;
  color: var(--t1);
}

.heaven__by {
  margin-top: 30px;
  font-family: var(--kai);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--t4);
}

/* ---------- 结尾 CTA ---------- */
.final {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 150px 0;
}

.final::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(163, 59, 43, 0.09), transparent 62%);
  pointer-events: none;
}

.final__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.final__line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--zhu));
}

.final h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: 8px;
  color: var(--t1);
  font-weight: 600;
  text-indent: 8px;
}

.final .eyebrow {
  justify-content: center;
}

.final p {
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--t3);
  max-width: 560px;
  line-height: 2;
}

.final .btn--primary {
  margin-top: 10px;
  padding: 18px 52px;
  font-size: 17px;
  letter-spacing: 5px;
}

.final__note {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--t5);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink-2);
  border-top: 1px solid var(--hair-soft);
  padding: 62px 0 30px;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(250px, 350px) repeat(3, minmax(110px, 1fr)) auto;
  gap: 30px;
  align-items: start;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__name {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 4px;
  color: var(--t1);
}

.footer__en {
  font-size: 8.5px;
  letter-spacing: 2px;
  color: var(--t4);
}

.footer__desc {
  font-size: 11.5px;
  line-height: 1.9;
  color: #7e7466;
  max-width: 300px;
  margin-top: 4px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer__col h4 {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--zhu);
  font-weight: 400;
  margin-bottom: 3px;
}

.footer__col a {
  font-size: 12px;
  color: var(--t3);
  transition: color 0.25s var(--ease);
}

.footer__col a:hover {
  color: var(--t1);
}

/* 彩蛋：伪录印 */
.seal-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.seal-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--zhu-deep);
  border-radius: 2px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: #f4e8d4;
  transform: rotate(-3deg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 10px 26px -12px rgba(163, 59, 43, 0.9);
  transition: transform 0.55s var(--ease), background 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.seal-btn:hover {
  transform: rotate(3deg) scale(1.06);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 14px 34px -12px rgba(163, 59, 43, 1);
}

html[data-mode='wei'] .seal-btn {
  background: #1a1814;
  color: var(--zhu-light);
  transform: rotate(177deg);
  box-shadow: inset 0 0 0 1px var(--zhu);
}

.seal-hint {
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--t4);
  text-align: right;
  line-height: 1.7;
}

.footer__bottom {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.watermark {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: 42px;
  color: #251f19;
  font-weight: 700;
  text-align: center;
  user-select: none;
  transition: color 0.6s var(--ease);
  padding-left: 42px;
}

html[data-mode='wei'] .watermark {
  color: #3a231d;
}

.footer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--t5);
}

.footer__meta em {
  font-family: var(--kai);
  font-style: normal;
  letter-spacing: 2px;
  color: var(--zhu-dim);
}

/* ---------- 彩蛋：假目标浮层 ---------- */
.egg {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(8, 10, 9, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}

.egg.on {
  opacity: 1;
  pointer-events: auto;
}

.egg__card {
  width: min(560px, calc(100vw - 40px));
  padding: 42px 44px 34px;
  background: #17140f;
  border: 1px solid #8c6a29;
  border-radius: 1px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.55s var(--ease);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(201, 162, 39, 0.12), inset 0 0 60px rgba(201, 162, 39, 0.04);
}

.egg.on .egg__card {
  transform: translateY(0) scale(1);
}

.egg__k {
  font-size: 9px;
  letter-spacing: 4px;
  color: #8a6a3e;
}

.egg__l {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 25px);
  line-height: 1.6;
  letter-spacing: 3px;
  color: var(--gold-light);
  font-weight: 600;
}

.egg__rule {
  width: 60px;
  height: 1px;
  background: #3e332a;
  margin: 4px 0;
}

.egg__n {
  font-family: var(--kai);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #7e6a50;
}

.egg__close {
  font-size: 9px;
  letter-spacing: 2px;
  color: #857e72;
  margin-top: 6px;
}

/* ---------- 滚动入场 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
}

/* =================================================================
   视觉升级层 L2 —— 光效 / 动效 / 精致度
   说明：此段后置，用同等或更高特异性覆盖 L1 规则；新组件只在处定义一次。
   ================================================================= */

:root {
  --glow-zhu: rgba(163, 59, 43, 0.55);
  --glow-gold: rgba(201, 162, 39, 0.42);
  --glow-paper: rgba(232, 224, 208, 0.075);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 底色加一层顶光，避免纯平 */
body {
  background:
    radial-gradient(ellipse 130% 62% at 50% -16%, #191612 0%, rgba(14, 17, 16, 0) 62%),
    var(--ink);
}

/* ---------- 指针柔光 ---------- */
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  background: radial-gradient(
    360px circle at var(--px, 50%) var(--py, 50%),
    rgba(196, 101, 78, 0.07),
    rgba(201, 162, 39, 0.03) 42%,
    transparent 68%
  );
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

/* ---------- 段落节律：章节之间一道极淡墨线 ---------- */
.section {
  position: relative;
}

.section + .section::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% 0;
  width: min(1280px, calc(100% - 176px));
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--hair-soft) 14%,
    var(--hair-soft) 86%,
    transparent
  );
  pointer-events: none;
}

/* ---------- 标题层 ---------- */
.sec-head h2 {
  font-size: clamp(32px, 3.5vw, 50px);
  line-height: 1.24;
  letter-spacing: 4px;
  white-space: pre-line;
}

.sec-head p {
  max-width: 700px;
}

.eyebrow {
  letter-spacing: 6px;
}

/* 分栏标题（台案用） */
.sec-head--split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 46px;
}

.sec-head__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sec-head__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 4px;
}

.sec-head__side p {
  font-size: 13px;
  line-height: 2;
  color: var(--t3);
  letter-spacing: 0.6px;
  max-width: 420px;
}

.sec-head__stamp {
  font-family: var(--kai);
  font-size: 9.5px;
  letter-spacing: 3px;
  color: var(--zhu-light);
  border: 1px solid rgba(163, 59, 43, 0.45);
  padding: 5px 11px 4px;
  rotate: -1.5deg;
}

/* ---------- 按钮：流光与内辉 ---------- */
.btn--primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #b24533, #8e3226);
  box-shadow: 0 0 0 1px rgba(163, 59, 43, 0.65), 0 14px 34px -18px rgba(163, 59, 43, 0.95),
    inset 0 1px 0 rgba(255, 226, 206, 0.18);
}

.btn--primary:hover {
  background: linear-gradient(180deg, #c04c38, #9b382a);
  box-shadow: 0 0 0 1px rgba(196, 101, 78, 0.85), 0 18px 44px -16px rgba(163, 59, 43, 1),
    0 0 34px -6px rgba(163, 59, 43, 0.55), inset 0 1px 0 rgba(255, 226, 206, 0.26);
}

.btn--sheen::after {
  content: '';
  position: absolute;
  top: -20%;
  left: -60%;
  width: 36%;
  height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255, 240, 220, 0.32), transparent);
  transform: skewX(-18deg);
  animation: sheen 6.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  pointer-events: none;
}

@keyframes sheen {
  0%,
  68% {
    left: -60%;
  }
  86%,
  100% {
    left: 132%;
  }
}

.btn--ghost {
  background: rgba(232, 224, 208, 0.015);
}

.btn--ghost:hover {
  box-shadow: inset 0 0 30px -10px rgba(232, 224, 208, 0.12);
}

/* ---------- 顶栏：滚动进度 ---------- */
.topbar__prog {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, rgba(163, 59, 43, 0.2), var(--zhu-light), var(--gold));
  box-shadow: 0 0 10px rgba(163, 59, 43, 0.7);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* 播放中的均衡器 */
.icon-btn {
  position: relative;
}

.icon-btn__eq {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: none;
  align-items: flex-end;
  gap: 1.5px;
  height: 8px;
}

.icon-btn__eq i {
  width: 1.5px;
  background: var(--zhu-light);
  height: 3px;
  animation: eq 1.1s ease-in-out infinite;
}

.icon-btn__eq i:nth-child(2) {
  animation-delay: 0.18s;
}

.icon-btn__eq i:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes eq {
  0%,
  100% {
    height: 3px;
  }
  50% {
    height: 8px;
  }
}

.icon-btn[aria-pressed='true'] .icon-btn__eq {
  display: flex;
}

/* ---------- 卡片指针光晕 ---------- */
[data-glow] {
  position: relative;
}

[data-glow]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 50%),
    var(--glow-paper),
    transparent 66%
  );
}

[data-glow]:hover::before {
  opacity: 1;
}

/* ---------- Hero ---------- */
.hero__beam {
  position: absolute;
  left: 50%;
  top: -16%;
  width: min(1180px, 128vw);
  height: 82%;
  translate: -50% 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 44% 58% at 50% 0%,
    rgba(232, 210, 176, 0.15),
    rgba(232, 210, 176, 0.05) 42%,
    rgba(232, 210, 176, 0) 72%
  );
  filter: blur(4px);
  animation: beamBreath 15s ease-in-out infinite alternate;
}

@keyframes beamBreath {
  from {
    opacity: 0.68;
    scale: 1 1;
  }
  to {
    opacity: 1;
    scale: 1.04 1.06;
  }
}

.hero__dust {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__title {
  position: relative;
}

.hero__halo {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 78%;
  height: 120%;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(196, 101, 78, 0.2),
    rgba(201, 162, 39, 0.07) 46%,
    transparent 70%
  );
  filter: blur(22px);
  animation: haloBreath 9s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes haloBreath {
  from {
    opacity: 0.55;
    scale: 0.96 0.94;
  }
  to {
    opacity: 1;
    scale: 1.05 1.04;
  }
}

.hero__title img {
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 34px rgba(201, 162, 39, 0.14));
}

/* 首屏逐层入场（不依赖 JS，先到先播） */
.hero__eyebrow {
  animation: riseIn 1s var(--ease-out) 0.05s both;
}

.hero__title {
  animation: titleIn 1.5s var(--ease-out) 0.16s both;
}

.hero__tag {
  animation: riseIn 1.1s var(--ease-out) 0.46s both;
}

.hero__lede {
  animation: riseIn 1.1s var(--ease-out) 0.58s both;
}

.hero__cta {
  animation: riseIn 1.1s var(--ease-out) 0.7s both;
}

.hero__note {
  animation: riseIn 1.1s var(--ease-out) 0.82s both;
}

.hero__stats {
  animation: riseIn 1.2s var(--ease-out) 0.96s both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    translate: 0 26px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes titleIn {
  from {
    opacity: 0;
    translate: 0 34px;
    scale: 1.05 1.05;
    filter: blur(14px);
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1 1;
    filter: blur(0);
  }
}

/* 滚动视差（用 translate 独立属性，避开 transform 动画冲突） */
.hero__inner {
  opacity: var(--ho, 1);
  will-change: opacity;
}

.hero__map {
  translate: 0 calc(var(--hy, 0px) * -0.42);
}

/* 数据条 */
.hero__stats {
  gap: 0;
}

.stat {
  flex: 1;
  justify-content: center;
  gap: 10px;
}

.stat + .stat {
  border-left: 1px solid var(--hair-soft);
}

.stat b {
  font-size: 24px;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(201, 162, 39, 0.3);
  min-width: 1.2em;
  text-align: right;
}

.stat span {
  color: var(--t3);
}

.hero__scroll {
  flex: 0 0 auto;
  padding-left: 22px;
  border-left: 1px solid var(--hair-soft);
  margin-left: 8px;
}

/* ---------- 双册 ---------- */
.ledger-card {
  transition: border-color 0.45s var(--ease), background 0.45s var(--ease),
    box-shadow 0.5s var(--ease);
}

.ledger-card--zheng:hover {
  border-color: #443c30;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(232, 224, 208, 0.05);
}

.ledger-card--wei:hover {
  border-color: #6a3529;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9), 0 0 50px -20px rgba(163, 59, 43, 0.4);
}

.gutter__seal {
  animation: sealBreath 6s ease-in-out infinite;
}

@keyframes sealBreath {
  0%,
  100% {
    box-shadow: 0 6px 18px -8px rgba(163, 59, 43, 0.8);
  }
  50% {
    box-shadow: 0 6px 26px -6px rgba(163, 59, 43, 1), 0 0 22px -6px rgba(196, 101, 78, 0.6);
  }
}

html[data-mode='wei'] .ledger-card--zheng .ledger-card__body {
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(163, 59, 43, 0.85);
}

/* 三案对照：同样是游戏原文，一列正录一列伪录 */
.pairs {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hair-soft);
}

.pairs__head,
.pairs__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
  max-width: 940px;
}

.pairs__head span:last-child {
  padding-left: 26px;
}

.pairs__head {
  padding-bottom: 10px;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--t5);
}

.pairs__grid {
  row-gap: 2px;
}

.pairs__grid span,
.pairs__grid b {
  padding: 11px 0;
  font-weight: 400;
  border-top: 1px dashed rgba(46, 42, 36, 0.7);
}

.pairs__grid span {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--t3);
}

.pairs__grid b {
  padding-left: 26px;
  border-left: 1px dashed rgba(46, 42, 36, 0.55);
  font-family: var(--kai);
  font-size: 14.5px;
  letter-spacing: 2px;
  color: var(--zhu-light);
  transition: color 0.4s var(--ease);
}

.pairs__grid b::before {
  content: '「';
  color: var(--zhu-dim);
}

.pairs__grid b::after {
  content: '」';
  color: var(--zhu-dim);
}

.pairs__by {
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: var(--t6);
}

@media (max-width: 640px) {
  .pairs__head,
  .pairs__grid {
    gap: 0 18px;
  }
  .pairs__grid span,
  .pairs__grid b {
    font-size: 13px;
    letter-spacing: 1.2px;
  }
}

/* ---------- 台案实录：本体实机截图 ---------- */
.deck {
  position: relative;
  isolation: isolate;
}

/* 外辉：两团极低透明度的朱与金，只垫气息，不压画面 */
.deck::before {
  content: '';
  position: absolute;
  inset: 4% -5% -8%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(44% 46% at 14% 22%, rgba(163, 59, 43, 0.15), transparent 72%),
    radial-gradient(38% 42% at 88% 84%, rgba(201, 162, 39, 0.11), transparent 74%);
  filter: blur(8px);
}

/* 缩略条：四张实机裁片并排，像摊开的一叠照片 */
.deck__tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.deck__tab {
  position: relative;
  display: block;
  padding: 6px 6px 0;
  text-align: left;
  color: inherit;
  border: 1px solid var(--hair-soft);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(26, 24, 20, 0.55), rgba(15, 17, 16, 0.5));
  overflow: hidden;
  transition: border-color 0.34s var(--ease), background 0.34s var(--ease),
    translate 0.34s var(--ease), box-shadow 0.34s var(--ease);
}

/* 选中指示器：底部居中的短胶囊，不横切圆角 */
.deck__tab::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--zhu), var(--gold));
  opacity: 0;
  transition: opacity 0.34s var(--ease), width 0.34s var(--ease);
}

.deck__tab:hover {
  border-color: var(--hair-strong);
  translate: 0 -2px;
}

.deck__tab.is-on {
  border-color: rgba(201, 162, 39, 0.3);
  background: linear-gradient(180deg, rgba(163, 59, 43, 0.12), rgba(15, 17, 16, 0.62));
  box-shadow: 0 16px 34px -26px rgba(0, 0, 0, 0.95);
}

.deck__tab.is-on::after {
  opacity: 1;
  width: 34px;
}

.deck__thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #262119;
  border-radius: 1px;
  background: #0a0c0b;
  box-shadow: inset 0 1px 0 rgba(255, 240, 214, 0.05);
}

.deck__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) brightness(0.8);
  transition: filter 0.34s var(--ease), scale 0.5s var(--ease);
}

.deck__tab:hover .deck__thumb img {
  filter: saturate(0.98) brightness(0.94);
  scale: 1.02;
}

.deck__tab.is-on .deck__thumb img {
  filter: saturate(1) brightness(1);
}

.deck__tab-t {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 6px 10px;
  min-width: 0;
}

.deck__tab-t i {
  font-family: var(--serif);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 1px;
  color: var(--zhu-dim);
  transition: color 0.34s var(--ease);
}

.deck__tab.is-on .deck__tab-t i {
  color: var(--zhu-light);
}

.deck__tab-t b {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: var(--t3);
  white-space: nowrap;
  transition: color 0.34s var(--ease);
}

.deck__tab.is-on .deck__tab-t b {
  color: var(--t1);
}

.deck__tab-t em {
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.3px;
  color: var(--t6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 舞台：双背景画 1px 渐变发丝边，边框本身透明 */
.deck__stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--r);
  background-image:
    linear-gradient(#0a0c0b, #0a0c0b) padding-box,
    linear-gradient(
        155deg,
        rgba(201, 162, 39, 0.4),
        rgba(48, 43, 36, 0.72) 36%,
        rgba(28, 25, 21, 0.9) 62%,
        rgba(163, 59, 43, 0.42)
      )
      border-box;
  box-shadow:
    0 52px 110px -62px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.55);
}

.deck__stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 238, 208, 0.04),
    inset 0 -70px 80px -58px rgba(0, 0, 0, 0.7);
}

.shot {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.68s var(--ease), translate 0.68s var(--ease);
}

.shot.is-on {
  opacity: 1;
  translate: 0 0;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 掠光：整幅画面每隔十几秒过一道极淡的反光，alpha 压在 5% 以内 */
.deck__sheen {
  position: absolute;
  inset: -30% -60%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    104deg,
    transparent 40%,
    rgba(255, 246, 226, 0.045) 48%,
    rgba(201, 162, 39, 0.05) 51%,
    transparent 60%
  );
  translate: -40% 0;
  mix-blend-mode: screen;
  animation: deckSheen 13s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes deckSheen {
  0%,
  76% {
    translate: -42% 0;
    opacity: 0;
  }
  84% {
    opacity: 1;
  }
  100% {
    translate: 48% 0;
    opacity: 0;
  }
}

/* 说明：左侧朱色条目名与实机字段，右侧出处 */
.deck__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 28px;
  align-items: start;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--hair-soft);
}

.deck__cap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 16px;
  align-items: baseline;
}

.deck__cap-k,
.deck__cap-t {
  display: inline-block;
  transition: opacity 0.3s var(--ease), translate 0.3s var(--ease);
}

.deck__cap-k {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--zhu-light);
  white-space: nowrap;
}

.deck__cap-t {
  font-size: 13px;
  line-height: 1.95;
  color: var(--t3);
  max-width: 88ch;
}

.deck__cap.is-swap .deck__cap-k,
.deck__cap.is-swap .deck__cap-t {
  opacity: 0;
  translate: 0 5px;
}

.deck__meta {
  margin: 2px 0 0;
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: 0.8px;
  color: var(--t6);
  text-align: right;
  white-space: nowrap;
}

/* 看原图：悬停浮出，触屏常驻 */
.deck__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid rgba(201, 162, 39, 0.26);
  border-radius: 999px;
  background: rgba(11, 12, 11, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--t2);
  font-size: 11.5px;
  letter-spacing: 1.2px;
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.34s var(--ease), translate 0.34s var(--ease),
    border-color 0.34s var(--ease), color 0.34s var(--ease);
}

.deck__stage:hover .deck__zoom,
.deck__zoom:focus-visible {
  opacity: 1;
  translate: 0 0;
}

.deck__zoom:hover {
  border-color: rgba(201, 162, 39, 0.52);
  color: var(--t1);
}

.deck__zoom em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--t5);
}

@media (hover: none) {
  .deck__zoom {
    opacity: 1;
    translate: 0 0;
  }
}

/* 原图查看层 */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 4vmin;
  background: rgba(6, 7, 6, 0.945);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.42s var(--ease), visibility 0.42s var(--ease);
}

.viewer.is-open {
  opacity: 1;
  visibility: visible;
}

.viewer__fig {
  max-width: 96vw;
  max-height: 84vh;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(201, 162, 39, 0.26);
  background: #0a0c0b;
  box-shadow: 0 46px 120px -46px #000;
  scrollbar-width: thin;
  scrollbar-color: #2e2a24 transparent;
}

.viewer__fig::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.viewer__fig::-webkit-scrollbar-thumb {
  background: #2e2a24;
  border-radius: 999px;
}

.viewer__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 84vh;
}

.viewer__close {
  position: absolute;
  top: 3.2vmin;
  right: 3.2vmin;
  padding: 6px 12px;
  border: 1px solid var(--hair);
  border-radius: var(--r);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--t3);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.viewer__close:hover {
  color: var(--t1);
  border-color: var(--hair-strong);
}

.viewer__hint {
  position: absolute;
  bottom: 2.6vmin;
  left: 50%;
  translate: -50% 0;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--t6);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .viewer {
    padding: 10px;
  }
  .viewer__fig {
    max-width: 100%;
    max-height: 76vh;
  }
  .viewer__img {
    width: 1440px;
    max-width: none;
    max-height: none;
  }
  .viewer__hint {
    font-size: 9.5px;
    letter-spacing: 0.4px;
  }
}

@media (max-width: 1180px) {
  .deck__tabs {
    gap: 8px;
  }
  .deck__tab-t em {
    display: none;
  }
}

@media (max-width: 900px) {
  .deck__tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .deck__foot {
    grid-template-columns: 1fr;
  }
  .deck__meta {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .deck__tab {
    padding: 5px 5px 0;
  }
  .deck__tab-t {
    padding: 7px 4px 9px;
  }
  .deck__cap {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .deck__cap-k {
    font-size: 13.5px;
  }
  .deck__cap-t {
    font-size: 12.5px;
    line-height: 1.85;
  }
  .deck__meta {
    font-size: 10px;
  }
}

/* ---------- 地图：地标改为印章圆点 ---------- */
.mapframe {
  box-shadow: 0 60px 120px -60px #000, inset 0 0 90px -40px rgba(0, 0, 0, 0.9);
}

.mapframe__canvas > img {
  filter: saturate(0.9) contrast(1.02);
}

.map-fog {
  position: absolute;
  inset: -8%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 34% 24% at 22% 44%, rgba(226, 214, 190, 0.16), transparent 72%),
    radial-gradient(ellipse 28% 20% at 74% 64%, rgba(226, 214, 190, 0.11), transparent 72%);
  animation: fogDrift 36s ease-in-out infinite alternate;
}

@keyframes fogDrift {
  from {
    opacity: 0.55;
    translate: 0 0;
  }
  to {
    opacity: 1;
    translate: 2.4% -1.8%;
  }
}

.mapframe__corner {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  z-index: 3;
  pointer-events: none;
}

.mapframe__corner--tl {
  left: 9px;
  top: 9px;
  border-right: 0;
  border-bottom: 0;
}

.mapframe__corner--tr {
  right: 9px;
  top: 9px;
  border-left: 0;
  border-bottom: 0;
}

.mapframe__corner--bl {
  left: 9px;
  bottom: 9px;
  border-right: 0;
  border-top: 0;
}

.mapframe__corner--br {
  right: 9px;
  bottom: 9px;
  border-left: 0;
  border-top: 0;
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: none;
  translate: -50% -50%;
  width: 2.42%;
  min-width: 16px;
  aspect-ratio: 1;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #f0e5cd, #c3b193 56%, #7a694f);
  border: 1px solid rgba(48, 36, 24, 0.78);
  color: #2a2018;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: box-shadow 0.4s var(--ease), scale 0.4s var(--ease-out);
}

.pin::before {
  content: '';
  position: absolute;
  inset: -11px;
  border-radius: 50%;
}

.pin__no {
  font-family: var(--serif);
  font-size: clamp(7px, 0.6vw, 10px);
  line-height: 1;
  letter-spacing: 0;
  opacity: 0.82;
  pointer-events: none;
}

.pin::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(232, 224, 208, 0.45);
  opacity: 0;
  animation: pinRing 5.2s ease-out infinite;
  animation-delay: calc(var(--i, 0) * 0.42s);
  pointer-events: none;
}

@keyframes pinRing {
  0% {
    opacity: 0;
    scale: 0.86;
  }
  10% {
    opacity: 0.5;
  }
  55% {
    opacity: 0;
    scale: 2;
  }
  100% {
    opacity: 0;
    scale: 2;
  }
}

.pin:hover,
.pin:focus-visible,
.pin.is-active {
  scale: 1.32;
  z-index: 6;
  box-shadow: 0 0 0 1px rgba(232, 224, 208, 0.6), 0 0 28px rgba(201, 162, 39, 0.6),
    0 10px 24px rgba(0, 0, 0, 0.7);
}

.pin--end {
  background: radial-gradient(circle at 36% 30%, #eabaa6, #b74533 58%, #6d2318);
  color: #fbeee0;
  border-color: rgba(255, 220, 200, 0.42);
  box-shadow: 0 0 0 1px rgba(163, 59, 43, 0.5), 0 0 24px -4px rgba(163, 59, 43, 0.75),
    0 2px 10px rgba(0, 0, 0, 0.55);
}

.pin--end::after {
  border-color: rgba(196, 101, 78, 0.75);
}

/* 地标图例 */
.map-rail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hair-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.map-rail__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.leg {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--t3);
  transition: color 0.25s var(--ease);
}

.leg i {
  font-style: normal;
  font-family: var(--serif);
  font-size: 8.5px;
  color: var(--t6);
  transition: color 0.25s var(--ease);
}

.leg:hover,
.leg.is-active {
  color: var(--t1);
}

.leg:hover i,
.leg.is-active i {
  color: var(--zhu-light);
}

.leg--end,
.leg--end i {
  color: var(--zhu);
}

.leg--end:hover,
.leg--end.is-active {
  color: var(--zhu-light);
}

/* ---------- 执役者 ---------- */
.role {
  position: relative;
}

.role::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  z-index: 5;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.role:hover::after {
  opacity: 1;
}

.role:hover {
  transform: translateY(-6px);
  box-shadow: 0 34px 70px -40px rgba(0, 0, 0, 0.95);
}

.role__watermark {
  position: absolute;
  right: 8px;
  top: 2px;
  z-index: 3;
  font-family: var(--serif);
  font-size: 58px;
  line-height: 1;
  color: rgba(232, 224, 208, 0.045);
  pointer-events: none;
  transition: color 0.6s var(--ease), translate 0.6s var(--ease-out);
}

.role:hover .role__watermark {
  color: rgba(201, 162, 39, 0.12);
  translate: 0 -4px;
}

.role__name {
  position: relative;
  display: inline-block;
}

.role__name::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--zhu), transparent);
  scale: 0 1;
  transform-origin: left;
  transition: scale 0.6s var(--ease-out);
}

.role:hover .role__name::after {
  scale: 1 1;
}

.role__art::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  background: radial-gradient(
    ellipse 60% 46% at 50% 30%,
    rgba(201, 162, 39, 0.14),
    transparent 70%
  );
}

.role:hover .role__art::before {
  opacity: 1;
}

/* ---------- 七院 ---------- */
.sys {
  position: relative;
  overflow: hidden;
}

.sys::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.55), transparent);
  opacity: 0;
  scale: 0.25 1;
  transition: opacity 0.55s var(--ease), scale 0.7s var(--ease-out);
}

.sys:hover::after {
  opacity: 1;
  scale: 1 1;
}

.sys:hover {
  box-shadow: inset 0 0 60px -30px rgba(232, 224, 208, 0.1);
}

.sys--abyss::after {
  background: linear-gradient(90deg, transparent, rgba(143, 95, 134, 0.65), transparent);
}

.sys--abyss:hover {
  box-shadow: inset 0 0 70px -30px rgba(143, 95, 134, 0.28);
}

.sys__name {
  transition: color 0.4s var(--ease);
}

.sys:hover .sys__name {
  color: #f2ead9;
}

.quote-card {
  position: relative;
  overflow: hidden;
}

.quote-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 60% at 50% 120%,
    rgba(201, 162, 39, 0.16),
    transparent 70%
  );
  opacity: 0.7;
}

/* ---------- 主怪录 ---------- */
.bestiary {
  margin-top: 62px;
  padding-top: 26px;
  border-top: 1px solid var(--hair);
}

.bestiary__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.bestiary__t {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--t2);
}

.bestiary__n {
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: var(--t6);
}

.bestiary__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.beast {
  position: relative;
  margin: 0;
  background: var(--paper-3);
  border: 1px solid #29241e;
  overflow: hidden;
  transition: border-color 0.45s var(--ease), translate 0.5s var(--ease-out);
}

.beast:hover {
  border-color: #453a2c;
  translate: 0 -4px;
}

.beast__art {
  position: relative;
  height: 214px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 58%, #2a2419, #12100d 72%);
}

.beast__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(1) contrast(1.06) brightness(0.92);
  transition: filter 0.65s var(--ease), scale 1.1s var(--ease-out);
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}

.beast:hover .beast__art img {
  filter: grayscale(0.35) contrast(1.08) brightness(1);
  scale: 1.055;
}

.beast figcaption {
  padding: 12px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.beast b {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--t1);
}

.beast span {
  font-size: 9.5px;
  letter-spacing: 1px;
  color: var(--t5);
}

/* ---------- 具名神器 · 走马廊 ---------- */
.relic {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--hair);
}

.relic__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.relic__t {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--t2);
}

.relic__n {
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: var(--t6);
}

.relic__viewport {
  position: relative;
  overflow: hidden;
  padding: 6px 0 2px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.relic__track {
  display: flex;
  align-items: flex-end;
  width: max-content;
  animation: marquee 86s linear infinite;
  will-change: translate;
}

.relic__viewport:hover .relic__track,
.relic__viewport:focus-within .relic__track {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    translate: -50% 0;
  }
}

.relic__item {
  flex: none;
  width: 134px;
  margin: 0;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.relic__item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 52px;
  width: 78px;
  height: 78px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.22), transparent 66%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.relic__item:hover::before {
  opacity: 1;
}

.relic__item img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  opacity: 0.9;
  filter: grayscale(0.22) brightness(0.95);
  transition: filter 0.5s var(--ease), scale 0.5s var(--ease-out), opacity 0.5s var(--ease);
  position: relative;
}

.relic__item:hover img {
  filter: none;
  scale: 1.07;
  opacity: 1;
}

.relic__item figcaption {
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 1.6px;
  color: var(--t4);
  white-space: nowrap;
  transition: color 0.4s var(--ease);
}

.relic__item:hover figcaption {
  color: var(--gold-light);
}

/* ---------- 天机阁 ---------- */
.heaven {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 24, 20, 0.55), rgba(14, 17, 16, 0));
}

.heaven::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% 0;
  width: min(720px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61, 107, 90, 0.5), transparent);
}

.heaven__body p {
  transition: opacity 1.1s var(--ease-out), translate 1.1s var(--ease-out);
}

/* ---------- 结尾 ---------- */
.final::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 620px;
  height: 620px;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(163, 59, 43, 0.14);
  pointer-events: none;
  animation: ripple 9s ease-out infinite;
}

@keyframes ripple {
  0% {
    scale: 0.55;
    opacity: 0;
  }
  18% {
    opacity: 0.7;
  }
  100% {
    scale: 1.55;
    opacity: 0;
  }
}

.final h2 {
  text-shadow: 0 0 60px rgba(201, 162, 39, 0.12);
}

/* ---------- 滚动入场（改用 translate，避开 hover transform 冲突） ---------- */
.reveal {
  opacity: 0;
  transform: none;
  translate: 0 30px;
}

.reveal.in {
  opacity: 1;
  translate: 0 0;
  transition: opacity 1.05s var(--ease-out), translate 1.05s var(--ease-out);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .wrap {
    width: calc(100% - 96px);
  }
  .bestiary__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sec-head--split {
    gap: 40px;
  }
  .hero__inner,
  .hero__stats {
    width: calc(100% - 96px);
  }
  .topbar__inner {
    width: calc(100% - 64px);
  }
  .nav {
    gap: 22px;
  }
  .roles {
    grid-template-columns: repeat(2, 1fr);
  }
  .codex {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .codex__left {
    position: static;
    max-width: 640px;
  }
  .footer__top {
    grid-template-columns: 1fr 1fr 1fr;
    row-gap: 36px;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
  .seal-block {
    align-items: flex-start;
  }
  .seal-hint {
    text-align: left;
  }
}

@media (max-width: 900px) {
  .nav,
  .ver {
    display: none;
  }
  .sec-head--split {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }
  .map-rail {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .map-rail__list {
    gap: 2px 14px;
  }
  .section--deck {
    padding-top: 88px;
  }
  .burger {
    display: flex;
  }
  .topbar .btn--sm {
    display: none;
  }
  .section {
    padding: 88px 0;
  }
  .hero {
    min-height: 100svh;
  }
  /* 窄屏改 2×2：数字不该被直接藏掉 */
  .hero__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 0;
    padding-block: 16px 24px;
  }
  .hero__stats .stat {
    justify-content: flex-start;
  }
  .hero__scroll {
    display: none;
  }
  .dual {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .gutter {
    flex-direction: row;
    height: 44px;
    gap: 12px;
  }
  .gutter__line {
    width: auto;
    height: 1px;
    flex: 1;
  }
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .sys--wide {
    grid-column: span 2;
  }
  .quote-card {
    grid-column: span 2;
    justify-content: center;
  }
  .heaven .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .heaven__side {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
  }
  .heaven__side p {
    display: none;
  }
  .mapframe {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .map-shell::after {
    content: '';
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 54px;
    background: linear-gradient(to right, rgba(14, 17, 16, 0), rgba(14, 17, 16, 0.92) 86%);
    pointer-events: none;
    border-radius: 0 1px 1px 0;
    z-index: 5;
  }
  .mapframe__canvas {
    width: 640px;
    flex: none;
  }
  .map-tip {
    position: relative;
    z-index: 9;
    width: auto;
    margin: 10px 0 0;
    padding: 14px 16px;
    background: var(--paper-3);
    border-color: var(--hair);
    box-shadow: none;
    opacity: 1;
    translate: none;
  }
  .map-tip__stats {
    gap: 0 8px;
  }
  .map-hint {
    display: block;
  }
  .map-legend {
    justify-content: center;
  }
  .map-legend__t {
    display: none;
  }
  .codex__right {
    grid-template-columns: 1fr;
  }
  .codex__small {
    flex-direction: column;
  }
  .role__art {
    height: 240px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
  .bestiary__grid {
    gap: 10px;
  }
  .beast__art {
    height: 156px;
  }
  .beast figcaption {
    padding: 10px 11px 12px;
  }
  .beast b {
    font-size: 12.5px;
    letter-spacing: 1.4px;
  }
  .beast span {
    font-size: 9px;
  }
  .relic__item {
    width: 112px;
  }
  .relic__item img {
    width: 86px;
    height: 86px;
  }
  .relic__item::before {
    top: 44px;
    width: 64px;
    height: 64px;
  }
  .sec-head--split h2 {
    font-size: 29px;
    letter-spacing: 2px;
  }
  .pin {
    min-width: 13px;
  }
  .pin__lb {
    font-size: 9.5px;
    padding: 3px 7px 2px;
  }
  .hero__title {
    width: 86vw;
  }
  .wrap,
  .hero__inner {
    width: calc(100% - 40px);
  }
  .topbar__inner {
    width: calc(100% - 40px);
  }
  .brand__rule,
  .brand__en {
    display: none;
  }
  .section {
    padding: 68px 0;
  }
  .sec-head {
    margin-bottom: 34px;
  }
  .sec-head p {
    font-size: 13.5px;
  }
  .hero__title {
    width: 86vw;
  }
  .hero__tag {
    letter-spacing: 6px;
    text-indent: 6px;
  }
  .hero__lede {
    font-size: 13px;
    max-width: 320px;
  }
  .hero__cta {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }
  .hero__cta .btn {
    width: 100%;
  }
  .roles {
    grid-template-columns: 1fr;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .sys--wide,
  .quote-card {
    grid-column: span 1;
  }
  .sys {
    min-height: 0;
  }
  .sys__name {
    font-size: 22px;
  }
  .sys--wide .sys__name {
    font-size: 24px;
  }
  .ledger-card {
    padding: 24px 22px;
  }
  .ledger-card__body {
    font-size: 13px;
  }
  .codex__left h2 {
    font-size: 26px;
  }
  .codex-card__art {
    height: 300px;
  }
  .final h2 {
    letter-spacing: 5px;
    text-indent: 5px;
  }
  .footer__top {
    grid-template-columns: repeat(3, 1fr);
    gap: 26px 16px;
  }
  .footer__brand,
  .seal-block {
    grid-column: 1 / -1;
  }
  .seal-block {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
  }
  .seal-hint {
    text-align: left;
  }
  .watermark {
    letter-spacing: 18px;
    padding-left: 18px;
  }
  .scrap {
    width: 122px;
    left: 4px;
    right: auto;
    top: 8px;
    bottom: auto;
    padding: 11px 13px;
  }
  .scrap__t {
    font-size: 13px;
    letter-spacing: 2px;
  }
  .codex-sm::after {
    font-size: 92px;
    bottom: -24px;
  }
  .map-tip {
    width: auto;
    padding: 13px 14px;
  }
  .map-tip__stats dt {
    font-size: 9px;
  }
  .map-tip__stats dd {
    font-size: 12px;
  }
}

/* ---------- 矮窗口：首屏按可用高度收缩，保证一屏看全 ---------- */
@media (max-height: 860px) {
  .hero__stage {
    padding-top: 60px;
  }
  .hero__inner {
    padding-top: 26px;
  }
  .hero__eyebrow {
    margin-bottom: 16px;
  }
  .hero__title {
    width: min(700px, 76vw, 70svh);
    margin-bottom: 16px;
  }
  .hero__tag {
    margin-bottom: 14px;
  }
  .hero__lede {
    margin-bottom: 22px;
  }
  .hero__cta {
    margin-bottom: 14px;
  }
  .hero__stats {
    padding-block: 14px 22px;
  }
}

@media (max-height: 700px) {
  .hero__stage {
    padding-top: 54px;
  }
  .hero__inner {
    padding-top: 12px;
  }
  .hero__eyebrow {
    font-size: 10px;
    letter-spacing: 4px;
    margin-bottom: 10px;
  }
  .hero__title {
    width: min(700px, 76vw, 62svh);
    margin-bottom: 10px;
  }
  .hero__tag {
    font-size: clamp(16px, 1.6vw, 21px);
    letter-spacing: 6px;
    margin-bottom: 10px;
  }
  .hero__lede {
    font-size: 12.5px;
    line-height: 1.85;
    margin-bottom: 16px;
  }
  .hero__cta {
    gap: 10px;
    margin-bottom: 10px;
  }
  .hero__note {
    font-size: 9.5px;
  }
  .hero__stats {
    padding-block: 10px 14px;
    gap: 8px 0;
    margin-top: 14px;
  }
  .stat b {
    font-size: 18px;
  }
  .stat span {
    font-size: 9.5px;
    letter-spacing: 1.2px;
  }
  .hero__cta .btn {
    padding-block: 11px;
    font-size: 13px;
  }
}

/* 极矮（手机横置 / 开了键盘）再压一档，避免统计条掉出首屏 */
@media (max-height: 600px) {
  .hero__stage {
    padding-top: 50px;
  }
  .hero__eyebrow {
    margin-bottom: 8px;
  }
  .hero__title {
    width: min(700px, 76vw, 58svh);
  }
  .hero__tag {
    margin-bottom: 8px;
  }
  .hero__lede {
    line-height: 1.7;
    margin-bottom: 12px;
  }
  .hero__cta {
    margin-bottom: 8px;
  }
  .hero__stats {
    margin-top: 10px;
    padding-block: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .reveal,
  .hero__eyebrow,
  .hero__title,
  .hero__tag,
  .hero__lede,
  .hero__cta,
  .hero__note,
  .hero__stats {
    opacity: 1;
    transform: none;
    translate: 0 0;
    filter: none;
  }
  .relic__track {
    animation: none;
  }
  .cursor-glow {
    display: none;
  }
  .hero__dust {
    display: none;
  }
}
