/* 《X三国 · 怀旧版》官网样式
 * 视觉基线：玄甲墨黑底 + 帝王暗金描边 + 朱砂战红行动点。
 * 单文件、无预处理器；断点只有一处（900px），PC 与 H5 共用同一套组件。
 */

:root {
  --ink: #111318;
  --ink-2: #181b22;
  --ink-3: #1f232c;
  --ink-4: #2a2f3a;
  --gold: #d4a853;
  --gold-l: #f0c775;
  --gold-d: #8a6b2e;
  --red: #c83e2b;
  --red-l: #e0523c;
  --jade: #2ecc71;
  --text: #e8e2d4;
  --text-dim: #a49c8c;
  --text-faint: #6f6a5f;
  --edge: rgba(212, 168, 83, 0.28);
  --edge-soft: rgba(212, 168, 83, 0.14);
  --panel: linear-gradient(180deg, rgba(31, 35, 44, 0.92), rgba(17, 19, 24, 0.96));
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  --serif: "KaiTi", "STKaiti", "Kaiti SC", "Songti SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 15px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

a { color: var(--gold-l); text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 通用装饰 ---------- */

.gold-text {
  background: linear-gradient(180deg, #fbe6b4 0%, #f0c775 38%, #d4a853 62%, #a97f33 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(240, 199, 117, 0.08);
}

/* 面板四角描金 */
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gold);
  opacity: 0.7;
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 34px;
}

.section-head h2 {
  position: relative;
  margin: 0;
  padding: 10px 54px;
  font: 700 30px/1.2 var(--serif);
  letter-spacing: 0.14em;
  color: var(--gold-l);
  text-shadow: 0 2px 14px rgba(212, 168, 83, 0.35);
}

.section-head h2::before,
.section-head h2::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-head h2::before { left: 0; }
.section-head h2::after { right: 0; transform: scaleX(-1); }

.section-head h2 .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 10px;
  border-radius: 50%;
  background: var(--red-l);
  vertical-align: 6px;
  box-shadow: 0 0 8px var(--red-l);
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(12, 14, 18, 0.94);
  border-bottom: 1px solid var(--edge-soft);
  backdrop-filter: blur(10px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
  max-width: 1320px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-name {
  font: 700 27px/1 var(--serif);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: 2px;
  font: 700 13px/1.1 var(--serif);
  color: #ffe9bd;
  background: linear-gradient(160deg, var(--red-l), var(--red));
  border: 1px solid rgba(240, 199, 117, 0.6);
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(200, 62, 43, 0.5);
  transform: rotate(-4deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  position: relative;
  flex: none;
  padding: 8px 18px;
  color: var(--text-dim);
  font-size: 15px;
  letter-spacing: 0.06em;
  border-radius: 3px;
  transition: color 0.18s, background 0.18s;
}

.site-nav a:hover { color: var(--gold-l); }

.site-nav a.is-active {
  color: #fff4d8;
  background: linear-gradient(180deg, rgba(200, 62, 43, 0.34), rgba(200, 62, 43, 0.06));
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-l), transparent);
}

.btn-download-sm {
  flex: none;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #2a1c05;
  background: linear-gradient(180deg, #f7dc9d, #e5b95f 52%, #c9993f);
  border: 1px solid #f8e3b2;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.35);
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-download-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 22px rgba(212, 168, 83, 0.5);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--edge-soft);
  background:
    radial-gradient(120% 80% at 50% 8%, rgba(240, 199, 117, 0.16), transparent 58%),
    radial-gradient(70% 60% at 78% 22%, rgba(200, 62, 43, 0.18), transparent 70%),
    linear-gradient(180deg, #14161c 0%, #101218 55%, #0c0e12 100%);
}

/* 首屏墨色云气 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(closest-side at 12% 78%, rgba(0, 0, 0, 0.9), transparent 70%),
    radial-gradient(closest-side at 88% 84%, rgba(0, 0, 0, 0.85), transparent 72%),
    radial-gradient(closest-side at 48% 100%, rgba(212, 168, 83, 0.1), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px 54px;
  display: grid;
  grid-template-columns: 176px 1fr 176px;
  align-items: start;
  gap: 18px;
  min-height: 620px;
}

/* 立绘层：整层绝对定位，压在文字下面，底部与首屏底对齐。
 * 用 icons/hero/dia 的透明底站姿立绘，不需要额外遮罩就能叠在墨黑背景上。 */
.hero-figs {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.hero-fig {
  position: absolute;
  bottom: 0;
  opacity: 0.95;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.75)) saturate(1.04);
}

.hero-fig.is-left {
  width: 30%;
  max-width: 300px;
  left: 0.5%;
  bottom: 3%;
}

.hero-fig.is-right {
  width: 34%;
  max-width: 340px;
  right: 0.5%;
  bottom: 1%;
}

.hero-stage {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 0 0;
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 620px;
}

.hero-title {
  margin: 0;
  font: 700 clamp(34px, 5.4vw, 72px)/1.16 var(--serif);
  letter-spacing: 0.06em;
}

.hero-title span { display: block; }

.hero-sub {
  margin: 16px 0 0;
  font-size: clamp(13px, 1.5vw, 17px);
  color: #cfc4a9;
  letter-spacing: 0.06em;
}

.hero-sub em {
  font-style: normal;
  color: var(--gold-l);
  margin: 0 4px;
}

/* 立绘站位由 .hero-figs / .hero-fig 控制，移动端会切成单张 */

/* ---------- 下载舱 ---------- */

.dock {
  position: relative;
  z-index: 4;
  margin: 26px auto 0;
  max-width: 660px;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(36, 26, 16, 0.88), rgba(16, 18, 23, 0.94));
  border: 1px solid var(--edge);
  border-radius: 6px;
  box-shadow: var(--shadow), inset 0 0 40px rgba(212, 168, 83, 0.06);
  text-align: center;
}

.dock::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(212, 168, 83, 0.16);
  border-radius: 3px;
  pointer-events: none;
}

.btn-download {
  position: relative;
  display: block;
  width: 100%;
  padding: 15px 20px 13px;
  border: 1px solid #f2b09a;
  border-radius: 5px;
  background: linear-gradient(180deg, #e35a42 0%, #c83e2b 46%, #9e2c1d 100%);
  box-shadow: 0 10px 30px rgba(200, 62, 43, 0.45), inset 0 1px 0 rgba(255, 220, 200, 0.45);
  text-align: center;
  transition: transform 0.16s, box-shadow 0.16s, filter 0.16s;
}

.btn-download:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 36px rgba(200, 62, 43, 0.6), inset 0 1px 0 rgba(255, 220, 200, 0.5);
}

.btn-download:active { transform: translateY(0); }

.btn-download strong {
  display: block;
  font: 700 21px/1.2 var(--sans);
  letter-spacing: 0.12em;
  color: #fff6e4;
  text-shadow: 0 2px 6px rgba(80, 12, 4, 0.6);
}

.btn-download small {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: #ffd9c8;
  letter-spacing: 0.05em;
}

.dock-file {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  word-break: break-all;
}

.dock-file b { color: #cfc4a9; font-weight: 500; }

.dock-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 5px 14px;
  font-size: 12.5px;
  color: #cdc9bd;
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.32);
  border-radius: 999px;
}

.dock-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.16);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* 二维码 */
.qr-box {
  align-self: center;
  justify-self: center;
  padding: 10px;
  background: #f7f2e6;
  border: 1px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.qr-box canvas { display: block; width: 132px; height: 132px; }

.qr-box img { width: 132px; height: 132px; }

.qr-label {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-align: center;
  white-space: nowrap;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
  justify-self: end;
  margin-top: 14px;
  padding: 12px 14px;
  text-align: right;
  background: linear-gradient(180deg, rgba(16, 18, 23, 0.85), rgba(16, 18, 23, 0.35));
  border: 1px solid var(--edge-soft);
  border-radius: 3px;
}

.hero-aside .tip {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-faint);
}

.hero-aside .tip + .tip {
  padding-top: 8px;
  border-top: 1px solid rgba(212, 168, 83, 0.14);
}

.hero-aside .tip b {
  display: block;
  font-size: 15px;
  color: var(--gold-l);
  font-weight: 600;
  margin-bottom: 2px;
}

/* 首屏下沿的墨色过渡 */
.hero-foot {
  position: relative;
  z-index: 3;
  height: 70px;
  margin-top: -20px;
  background: linear-gradient(180deg, transparent, var(--ink));
  pointer-events: none;
}

/* ---------- 版块 ---------- */

section.block {
  position: relative;
  padding: 74px 0 12px;
}

section.block:first-of-type { padding-top: 30px; }

.block-intro {
  max-width: 720px;
  margin: -14px auto 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}

/* 开服福利 */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.benefit {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  transition: transform 0.18s, border-color 0.18s;
}

.benefit:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 168, 83, 0.5);
}

.benefit h3 {
  margin: 0 0 8px;
  font: 700 21px/1.3 var(--serif);
  letter-spacing: 0.06em;
  color: var(--gold-l);
}

.benefit .lede {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-dim);
}

.benefit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #cfc4a9;
}

.benefit-list li {
  position: relative;
  padding: 5px 0 5px 14px;
  border-top: 1px dashed rgba(212, 168, 83, 0.14);
}
.benefit-list li:first-child { border-top: 0; }

.benefit-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 14px;
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
}

.benefit-list b { color: #ffe9bd; font-weight: 600; }

.hero-chips {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.hero-chip {
  width: 62px;
  text-align: center;
}

.hero-chip img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  object-position: 50% 12%;
  border: 1px solid var(--gold-d);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hero-chip span {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-dim);
}

/* 游戏公告 */
.news-list { display: grid; gap: 12px; }

.news-item {
  border: 1px solid var(--edge-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(28, 32, 40, 0.75), rgba(17, 19, 24, 0.85));
  overflow: hidden;
  transition: border-color 0.18s;
}

.news-item.is-open { border-color: rgba(212, 168, 83, 0.45); }

.news-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  background: none;
  border: 0;
  text-align: left;
}

.news-tag {
  flex: none;
  padding: 2px 9px;
  font-size: 11.5px;
  color: var(--gold-l);
  border: 1px solid var(--edge);
  border-radius: 2px;
  letter-spacing: 0.06em;
}

.news-title {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  color: var(--text);
  letter-spacing: 0.03em;
}

.news-date {
  flex: none;
  font-size: 12.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.news-arrow {
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}

.news-item.is-open .news-arrow { transform: rotate(-135deg) translateY(-2px); }

.news-body {
  display: none;
  padding: 4px 18px 18px;
  font-size: 13.5px;
  line-height: 1.9;
  color: #c3bba9;
  border-top: 1px dashed rgba(212, 168, 83, 0.16);
}

.news-item.is-open .news-body { display: block; }

.news-body h4 {
  margin: 14px 0 6px;
  font: 600 14px/1.4 var(--sans);
  color: var(--gold-l);
  letter-spacing: 0.05em;
}

.news-body p { margin: 0 0 8px; }
.news-body ul { margin: 0 0 10px; padding-left: 20px; }
.news-body li { margin: 3px 0; }
.news-body b { color: #ffe9bd; font-weight: 600; }

/* 名将图鉴 */
.tome {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 22px;
  align-items: stretch;
}

.tome-picker { padding: 20px; }

.faction-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.faction-tab {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 4px;
  background: rgba(20, 23, 29, 0.8);
  border: 1px solid var(--edge-soft);
  border-radius: 3px;
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
}

.faction-tab img {
  width: 22px;
  height: 40px;
  object-fit: contain;
  filter: saturate(0.5) brightness(0.75);
  transition: filter 0.16s;
}

.faction-tab span {
  font: 600 15px/1 var(--serif);
  color: var(--text-dim);
}

.faction-tab:hover { border-color: rgba(212, 168, 83, 0.4); }

.faction-tab.is-active {
  background: linear-gradient(180deg, rgba(212, 168, 83, 0.16), rgba(212, 168, 83, 0.03));
  border-color: var(--gold);
}

.faction-tab.is-active img { filter: none; }
.faction-tab.is-active span { color: var(--gold-l); }

.hero-grid {
  display: grid;
  /* 按最小宽度自动排：PC 约 6 列、H5 约 4 列，格子不会被拉成大卡 */
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 8px;
  max-height: 372px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-d) transparent;
}

.hero-grid::-webkit-scrollbar { width: 6px; }
.hero-grid::-webkit-scrollbar-thumb {
  background: var(--gold-d);
  border-radius: 3px;
}

.hero-tile {
  position: relative;
  padding: 0;
  background: none;
  border: 1px solid var(--edge-soft);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color 0.16s, transform 0.16s;
}

.hero-tile img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 10%;
  filter: saturate(0.85);
}

.hero-tile span {
  display: block;
  padding: 3px 0 4px;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(10, 12, 16, 0.9);
}

.hero-tile:hover { transform: translateY(-2px); border-color: rgba(212, 168, 83, 0.5); }

.hero-tile.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 6px 18px rgba(212, 168, 83, 0.25);
}

.hero-tile.is-active span { color: var(--gold-l); }

.hero-tile.is-active img { filter: none; }

/* 详情 */
.tome-detail { padding: 20px 22px 22px; }

.detail-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.detail-card {
  position: relative;
  flex: none;
  width: 168px;
  border: 1px solid var(--gold-d);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
}

.detail-card img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  object-position: 50% 6%;
}

.detail-card .card-tag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 8px;
  font-size: 11px;
  color: #2a1c05;
  background: linear-gradient(180deg, #f7dc9d, #d4a853);
  border-bottom-right-radius: 3px;
  letter-spacing: 0.06em;
}

.detail-meta { flex: 1; min-width: 0; }

.detail-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font: 700 28px/1.2 var(--serif);
  letter-spacing: 0.06em;
  color: #fff4d8;
}

.detail-name small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}

.badge {
  padding: 2px 9px;
  font-size: 11.5px;
  border-radius: 2px;
  border: 1px solid var(--edge);
  color: var(--gold-l);
  background: rgba(212, 168, 83, 0.08);
}

.badge.is-q3 { color: #d7a6ff; border-color: rgba(186, 120, 255, 0.4); background: rgba(150, 80, 230, 0.12); }
.badge.is-q2 { color: #8fb9ff; border-color: rgba(110, 160, 255, 0.4); background: rgba(60, 110, 220, 0.12); }
.badge.is-q1 { color: #8be08b; border-color: rgba(110, 200, 110, 0.4); background: rgba(60, 160, 80, 0.12); }

.detail-desc {
  margin: 0 0 10px;
  font-size: 13px;
  color: #c3bba9;
}

.detail-story {
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid rgba(212, 168, 83, 0.35);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-faint);
}

/* 雷达 + 随从 */
.detail-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--edge-soft);
}

.sub-title {
  margin: 0 0 8px;
  font: 600 13.5px/1.3 var(--sans);
  color: var(--gold-l);
  letter-spacing: 0.08em;
}

.radar-wrap { display: flex; gap: 14px; align-items: center; }

.radar { width: 148px; height: 148px; flex: none; }
.radar .grid { fill: none; stroke: rgba(212, 168, 83, 0.22); stroke-width: 1; }
.radar .axis { stroke: rgba(212, 168, 83, 0.18); stroke-width: 1; }
.radar .shape { fill: rgba(212, 168, 83, 0.3); stroke: var(--gold-l); stroke-width: 1.6; }
.radar .vertex { fill: var(--gold-l); }
.radar .lab { fill: #a49c8c; font-size: 10.5px; text-anchor: middle; }

.attr-rows { font-size: 12px; color: var(--text-dim); }

.attr-rows div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.attr-rows b {
  color: #ffe9bd;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.retinue-row { display: flex; gap: 10px; }

.retinue {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  background: rgba(20, 23, 29, 0.7);
  border: 1px solid var(--edge-soft);
  border-radius: 3px;
}

.retinue .av {
  width: 46px;
  height: 46px;
  margin: 0 auto 6px;
  border-radius: 50%;
  border: 1px solid var(--gold-d);
  overflow: hidden;
  background: #0d0f13;
}

.retinue .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}

.retinue .av.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-faint);
}

.retinue b {
  display: block;
  font-size: 12px;
  color: #cfc4a9;
  font-weight: 500;
}

.retinue em {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-style: normal;
  color: var(--jade);
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 70px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--edge-soft);
  background: #0b0d11;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
}

.site-footer p { margin: 4px 0; }

.site-footer .links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 12px;
}

.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--gold-l); }

/* ---------- 微信遮罩 ---------- */

.mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 18px 22px;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(3px);
}

.mask.is-show { display: flex; }

.mask-card {
  max-width: 340px;
  padding: 18px 20px;
  background: #1c2028;
  border: 1px solid var(--edge);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.85;
  color: #cfc4a9;
}

.mask-card b { color: var(--gold-l); }

.mask-arrow {
  display: block;
  margin: 0 0 10px auto;
  width: 34px;
  height: 34px;
  border-top: 2px solid var(--gold-l);
  border-right: 2px solid var(--gold-l);
  transform: rotate(-45deg) skew(-12deg, -12deg);
  opacity: 0.8;
}

.mask-card button {
  margin-top: 12px;
  padding: 6px 16px;
  background: none;
  border: 1px solid var(--edge);
  border-radius: 3px;
  color: var(--text-dim);
}

/* ---------- 移动端 ---------- */

@media (max-width: 900px) {
  .wrap { padding: 0 16px; }

  .site-header .wrap {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 9px 12px 0;
    max-width: none;
  }

  .brand { order: 1; flex: 1 1 auto; min-width: 0; }
  .btn-download-sm { order: 2; flex: none; margin-left: auto; }

  .brand-name { font-size: 18px; letter-spacing: 0; }
  .brand-badge { width: 22px; height: 22px; font-size: 10px; }

  .btn-download-sm {
    padding: 6px 11px;
    font-size: 11.5px;
    letter-spacing: 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    margin: 7px -12px 0;
    padding: 0 6px 2px;
    border-top: 1px solid var(--edge-soft);
  }

  .site-nav a { padding: 8px 10px; font-size: 13px; letter-spacing: 0; }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 16px 16px 30px;
  }

  /* 移动端只留一张立绘，居中压在标题后面当氛围层 */
  .hero-figs { overflow: hidden; }
  .hero-fig { height: 250px; bottom: auto; top: 0; opacity: 0.26; }
  .hero-fig.is-left { display: none; }
  .hero-fig.is-right {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .hero-stage { padding-top: 10px; }

  .qr-slot, .hero-aside { display: none; }

  .hero-title { font-size: clamp(30px, 9vw, 42px); }

  .dock { margin-top: 18px; padding: 14px; }
  .btn-download strong { font-size: 18px; letter-spacing: 0.06em; }

  section.block { padding: 50px 0 8px; }
  .section-head { margin-bottom: 24px; }
  .section-head h2 { padding: 8px 40px; font-size: 23px; }
  .section-head h2::before, .section-head h2::after { width: 26px; }

  .benefit-grid { grid-template-columns: 1fr; gap: 14px; }

  .tome { grid-template-columns: 1fr; }

  /* 图鉴格子交给 auto-fill 自己排，不再固定列数 */
  .hero-grid { max-height: 340px; }

  .detail-top { gap: 14px; }
  .detail-card { width: 128px; }
  .detail-name { font-size: 22px; }
  .detail-bottom { grid-template-columns: 1fr; }
  .detail-story { font-size: 12px; }
}

@media (max-width: 420px) {
  .hero-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .faction-tabs { gap: 8px; }
  .faction-tab span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
