/* ============================================================
   异地星球：地面战争 / 裂隙纪元 RIFT ERA — 官网样式
   冷战工业拟物 HUD × 直播弹幕荧光
   ============================================================ */
:root {
  --bg: #12151a;
  --bg-deep: #0b0d11;
  --panel: #1b2129;
  --panel-2: #202732;
  --slot: #0d1013;
  --line: #2c343e;
  --line-hi: #3a4450;
  --ink: #e9eef4;
  --dim: #97a4b0;
  --dim-2: #6c7885;
  --red: #d0342c;
  --red-hi: #ff5a4e;
  --amber: #f5a623;
  --blue: #3d8fd1;
  --purple: #8e44ad;
  --green: #9dc43b;
  --money: #86e01e;
  --font-body: "MiSans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: Impact, "Arial Black", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(208, 52, 44, 0.55); }

.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }

/* ---------- 工具 ---------- */
.cut {
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.rivets {
  position: relative;
}
.rivets::before, .rivets::after {
  content: "";
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4a5560, #14181d);
  top: 8px;
}
.rivets::before { left: 8px; }
.rivets::after { right: 8px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  font-family: var(--font-mono);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--amber);
}
.sec-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 10px 0 8px;
}
.sec-title em { font-style: normal; color: var(--red-hi); }
.sec-sub { color: var(--dim); max-width: 640px; }
.sec-head { margin-bottom: 44px; }
.section { padding: 96px 0; position: relative; }
.section.alt { background: linear-gradient(180deg, #0e1116 0%, #14181e 100%); }

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11, 13, 17, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 64px;
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px;
  background: linear-gradient(140deg, var(--red), #7e1a15);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; letter-spacing: 0.04em; }
.brand-text span { font-size: 10px; color: var(--dim-2); letter-spacing: 0.22em; font-family: var(--font-mono); }
.nav-links { display: flex; gap: 4px; flex: 1; flex-wrap: nowrap; overflow: hidden; }
.nav-links a {
  padding: 8px 11px;
  font-size: 13.5px;
  color: var(--dim);
  border: 1px solid transparent;
  transition: 0.18s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); border-color: var(--line-hi); background: rgba(255,255,255,0.04); }
.nav-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.18s;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn-primary {
  background: linear-gradient(160deg, var(--red-hi), var(--red) 55%, #9c221c);
  color: #fff;
  box-shadow: 0 6px 24px rgba(208, 52, 44, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(208, 52, 44, 0.5); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-hi);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-lg { padding: 16px 34px; font-size: 17px; }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn .win-ico { width: 17px; height: 17px; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  padding: 130px 0 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(26px) brightness(0.44) saturate(1.25);
  transform: scale(1.12);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.026) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(11,13,17,0.55) 0%, rgba(11,13,17,0.25) 45%, var(--bg) 97%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
}
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px;
  font-size: 12.5px;
  border: 1px solid var(--line-hi);
  background: rgba(13, 16, 19, 0.72);
  color: var(--dim);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.tag.live { border-color: var(--red); color: #fff; background: rgba(208,52,44,0.18); }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-hi); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.hero h1 .ln2 {
  display: block;
  font-size: 0.52em;
  color: var(--red-hi);
  margin-top: 10px;
  letter-spacing: 0.06em;
}
.hero h1 .ln2 small { color: var(--dim); font-size: 0.62em; letter-spacing: 0.24em; font-family: var(--font-mono); margin-left: 10px; }
.hero-desc { color: var(--dim); font-size: 16.5px; margin: 22px 0 8px; max-width: 560px; }
.hero-desc b { color: var(--ink); }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 0 30px; color: var(--dim-2); font-size: 13px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta i { width: 6px; height: 6px; background: var(--amber); transform: rotate(45deg); display: inline-block; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: 12.5px; color: var(--dim-2); }

/* 竖屏客户端展示 */
.stage {
  position: relative;
  justify-self: center;
}
.device {
  width: 300px;
  background: #05070a;
  border: 2px solid #39424e;
  border-radius: 26px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
}
.device::before {
  content: "";
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 5px; border-radius: 3px; background: #1a2028;
  z-index: 3;
}
.device-screen {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: #000;
}
.device-screen img { width: 100%; height: 100%; object-fit: cover; }
.device-screen .live-chip {
  position: absolute; top: 10px; left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}
.gift-toast {
  position: absolute;
  left: 8px; right: 8px;
  background: linear-gradient(90deg, rgba(208,52,44,0.95), rgba(120,18,14,0.92));
  border-left: 3px solid var(--amber);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 9px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
  animation: toast 9s infinite;
}
.gift-toast.t2 { animation-delay: 3s; }
.gift-toast.t3 { animation-delay: 6s; }
@keyframes toast {
  0% { opacity: 0; transform: translateY(10px); }
  6%, 30% { opacity: 1; transform: translateY(0); }
  36%, 100% { opacity: 0; transform: translateY(-6px); }
}
.stage-caption {
  text-align: center;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--dim-2);
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}

/* ---------- 直播玩法 ---------- */
.play-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.play-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 26px 24px 24px;
  position: relative;
  transition: 0.2s;
}
.play-card:hover { border-color: var(--line-hi); transform: translateY(-4px); }
.play-card .num {
  font-family: var(--font-display);
  font-size: 44px;
  color: rgba(245, 166, 35, 0.28);
  line-height: 1;
}
.play-card h3 { font-size: 18px; margin: 12px 0 8px; letter-spacing: 0.03em; }
.play-card p { color: var(--dim); font-size: 14px; }
.cmd-board {
  margin-top: 26px;
  background: var(--slot);
  border: 1px solid var(--line);
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.cmd-board .cmd-tip {
  width: 100%;
  font-size: 12.5px;
  color: var(--dim-2);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-hi);
  color: var(--ink);
  transition: 0.15s;
}
.chip b { color: var(--amber); font-weight: 700; }
.chip:hover { border-color: var(--amber); }
.rule-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
}
.rule-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px 24px;
}
.rule-panel h4 {
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--amber);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.rule-panel h4::before { content: "▮"; color: var(--red); }
.rule-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.07);
  font-size: 14px;
}
.rule-row:last-child { border-bottom: 0; }
.rule-row b { color: var(--money); font-family: var(--font-mono); font-weight: 700; flex-shrink: 0; }
.rule-row span { color: var(--dim); text-align: right; }

/* ---------- 实机画面 ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.shot {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.shot:hover img { transform: scale(1.045); }
.shot.big { grid-row: span 2; min-height: 460px; }
.shot:not(.big) { min-height: 222px; }
.shot .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 34px 18px 14px;
  background: linear-gradient(180deg, transparent, rgba(5,7,10,0.92));
  font-size: 14px;
}
.shot .cap b { display: block; font-size: 15.5px; letter-spacing: 0.04em; }
.shot .cap span { color: var(--dim); font-size: 12.5px; }
.shot .badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(11,13,17,0.82);
  border: 1px solid var(--line-hi);
  color: var(--amber);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  padding: 4px 10px;
}
.gallery-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* ---------- CG 影片 ---------- */
.cg-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.cg-main {
  background: #000;
  border: 1px solid var(--line-hi);
  position: relative;
}
.cg-main video { width: 100%; aspect-ratio: 16 / 9; }
.cg-main .cg-label {
  position: absolute; top: 12px; left: 12px;
  background: rgba(208,52,44,0.92);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 4px 11px;
  font-family: var(--font-mono);
}
.cg-list { display: flex; flex-direction: column; gap: 10px; }
.cg-item {
  display: flex; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px;
  cursor: pointer;
  transition: 0.16s;
  align-items: center;
}
.cg-item:hover { border-color: var(--line-hi); background: var(--panel-2); }
.cg-item.active { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red); }
.cg-item img { width: 104px; height: 60px; object-fit: cover; flex-shrink: 0; }
.cg-item .t { line-height: 1.4; }
.cg-item .t b { font-size: 14px; display: block; }
.cg-item .t span { font-size: 12px; color: var(--dim-2); }

/* ---------- 阵营故事 ---------- */
.faction-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.ftab {
  --fc: var(--red);
  padding: 13px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid transparent;
  color: var(--dim);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: 0.18s;
  font-family: var(--font-body);
}
.ftab:hover { color: var(--ink); }
.ftab.active {
  color: #fff;
  border-top-color: var(--fc);
  background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 22%, var(--panel)), var(--panel));
  box-shadow: 0 8px 26px color-mix(in srgb, var(--fc) 26%, transparent);
}
.faction-stage {
  position: relative;
  border: 1px solid var(--line-hi);
  overflow: hidden;
  min-height: 420px;
}
.faction-stage .fvideo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.4) saturate(1.2);
  transform: scale(1.1);
}
.faction-stage .fvideo-sharp {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.24;
}
.faction-stage::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8,10,13,0.94) 30%, rgba(8,10,13,0.35) 100%);
}
.faction-body {
  position: relative; z-index: 2;
  padding: 46px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  min-height: 420px;
  align-content: center;
}
.faction-body .f-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--fc, var(--amber));
}
.faction-body h3 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  letter-spacing: 0.05em;
  margin: 8px 0 16px;
}
.faction-body .f-story { color: #c3ccd6; font-size: 15.5px; }
.f-bonus {
  background: rgba(11,13,17,0.78);
  border: 1px solid var(--line-hi);
  border-left: 3px solid var(--fc, var(--red));
  padding: 20px 22px;
  align-self: center;
}
.f-bonus .lab {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--dim-2);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.f-bonus p { font-size: 15px; color: var(--ink); }
.f-bonus .gift-mini { margin-top: 14px; border-top: 1px dashed rgba(255,255,255,0.1); padding-top: 12px; font-size: 13.5px; color: var(--dim); }
.f-bonus .gift-mini b { color: var(--amber); }

/* ---------- 兵种图鉴 ---------- */
.roster { display: none; }
.roster.active { display: block; }
.roster-group { margin-bottom: 34px; }
.roster-group h4 {
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.roster-group h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.roster-group h4 b { color: var(--fc, var(--red)); font-family: var(--font-mono); }
.unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(266px, 1fr));
  gap: 12px;
}
.unit-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 15px 16px 14px;
  position: relative;
  transition: 0.16s;
}
.unit-card:hover { border-color: var(--fc, var(--red)); transform: translateY(-3px); }
.unit-card .code {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.35);
  padding: 1px 7px;
}
.unit-card .kind {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim-2);
  font-family: var(--font-mono);
}
.unit-card b { display: block; font-size: 17px; margin: 4px 0 7px; letter-spacing: 0.03em; }
.unit-card .stats {
  display: flex; gap: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--money);
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.unit-card .stats i { font-style: normal; color: var(--dim-2); }
.unit-card p { font-size: 13px; color: var(--dim); line-height: 1.6; }
.unit-card.gift {
  border-color: rgba(245,166,35,0.55);
  background: linear-gradient(160deg, rgba(245,166,35,0.1), var(--panel) 55%);
}
.unit-card.gift .code { color: #12151a; background: var(--amber); border-color: var(--amber); font-weight: 800; }

/* ---------- 终极技 ---------- */
.supers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.super-card {
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #000;
  min-height: 250px;
}
.super-card video, .super-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: 0.35s;
}
.super-card:hover video { opacity: 0.88; transform: scale(1.04); }
.super-card .sc-body {
  position: relative; z-index: 2;
  height: 100%;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(180deg, rgba(5,7,10,0.15), rgba(5,7,10,0.92));
}
.super-card .sc-fac { font-size: 11.5px; font-family: var(--font-mono); letter-spacing: 0.18em; color: var(--sc, var(--amber)); }
.super-card h3 { font-size: 24px; letter-spacing: 0.08em; margin: 4px 0 8px; }
.super-card p { font-size: 13px; color: #b9c3cd; }

/* ---------- 下载 ---------- */
.download-box {
  background:
    linear-gradient(140deg, rgba(208,52,44,0.16), transparent 45%),
    var(--panel);
  border: 1px solid var(--line-hi);
  padding: 54px 56px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 44px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.download-box::before {
  content: "WINDOWS · PORTRAIT · DOUYIN";
  position: absolute;
  right: -30px; top: 22px;
  font-family: var(--font-display);
  font-size: 74px;
  color: rgba(255,255,255,0.035);
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
}
.download-box h2 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); letter-spacing: 0.03em; }
.download-box h2 em { font-style: normal; color: var(--red-hi); }
.download-box .d-sub { color: var(--dim); margin: 14px 0 24px; }
.d-points { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.d-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.d-note { font-size: 12.5px; color: var(--dim-2); margin-top: 12px; }
.spec-panel { background: var(--slot); border: 1px solid var(--line); padding: 24px 26px; }
.spec-panel h4 { font-size: 14px; letter-spacing: 0.14em; color: var(--amber); margin-bottom: 14px; font-family: var(--font-mono); }
.spec-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); font-size: 14px; }
.spec-row:last-child { border-bottom: 0; }
.spec-row span { color: var(--dim-2); }
.spec-row b { color: var(--ink); font-weight: 600; }

/* ---------- 定制合作 ---------- */
.custom-box {
  border: 1px solid var(--line-hi);
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(61,143,209,0.14), transparent),
    var(--panel);
  padding: 56px;
  text-align: center;
  position: relative;
}
.custom-box .eyebrow { justify-content: center; }
.custom-box h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  margin: 12px auto 14px;
  max-width: 900px;
  line-height: 1.3;
}
.custom-box h2 em { font-style: normal; color: var(--amber); }
.custom-box .c-sub { color: var(--dim); max-width: 760px; margin: 0 auto; }
.c-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 36px 0 34px;
  text-align: left;
}
.c-card {
  background: rgba(11,13,17,0.66);
  border: 1px solid var(--line);
  padding: 20px 18px;
}
.c-card b { display: block; font-size: 15.5px; margin-bottom: 6px; }
.c-card span { font-size: 13px; color: var(--dim); line-height: 1.6; display: block; }
.c-card .idx { font-family: var(--font-mono); color: var(--blue); font-size: 12px; letter-spacing: 0.2em; }
.contact-line {
  display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;
  font-size: 15px; color: var(--dim);
}
.contact-line b { color: var(--ink); font-family: var(--font-mono); }
.c-links { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  padding: 44px 0 34px;
  color: var(--dim-2);
  font-size: 13.5px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer b { color: var(--ink); }
.footer .f-names { font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.footer a { color: var(--dim); border-bottom: 1px dotted var(--dim-2); }
.footer a:hover { color: var(--amber); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .stage { justify-self: start; }
  .play-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .shot.big { grid-row: auto; min-height: 300px; }
  .cg-wrap { grid-template-columns: 1fr; }
  .faction-body { grid-template-columns: 1fr; padding: 32px 26px; }
  .rule-cols { grid-template-columns: 1fr; }
  .download-box { grid-template-columns: 1fr; padding: 36px 28px; }
  .c-grid { grid-template-columns: 1fr 1fr; }
  .custom-box { padding: 36px 24px; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .gallery-row2 { grid-template-columns: 1fr; }
  .c-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }

  /* 手机首屏：标题不折成孤字，装置图缩小后仍在首屏露头 */
  .hero { min-height: auto; padding: 96px 0 52px; }
  .hero-inner { gap: 26px; width: calc(100% - 32px); }
  .hero h1 { font-size: clamp(30px, 8.4vw, 40px); line-height: 1.14; }
  .hero h1 .ln2 { font-size: 0.5em; margin-top: 8px; }
  .hero-badges { gap: 7px; margin-bottom: 14px; }
  .hero-badges .tag { font-size: 11px; padding: 5px 10px; }
  .hero-desc { font-size: 14px; line-height: 1.75; margin: 14px 0 6px; }
  .hero-meta { font-size: 12px; gap: 9px; margin: 10px 0 20px; }
  .hero-note { font-size: 11.5px; }
  .device { width: min(232px, 64vw); padding: 9px; border-radius: 22px; }
  .stage-caption { font-size: 10px; letter-spacing: 0.18em; }
}

/* ============================================================
   兵种图鉴 v2：阵营切换 · 分类筛选 · 搜索 · 详情弹层
   ============================================================ */
.roster-shell {
  --fc: var(--red);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15,18,23,0.92), rgba(18,21,26,0.72));
  padding: 18px;
}
.faction-switch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.fs-tab {
  --fc: var(--red);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  color: var(--dim);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 0.16s;
  text-align: left;
  min-width: 0;
}
.fs-tab:hover { color: var(--ink); border-color: var(--line-hi); }
.fs-tab .fs-dot {
  width: 8px; height: 8px; flex: 0 0 8px;
  border-radius: 50%;
  background: var(--fc);
  box-shadow: 0 0 10px var(--fc);
}
.fs-tab .fs-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-tab .fs-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--dim-2);
  border: 1px solid var(--line);
  padding: 0 6px;
}
.fs-tab.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--fc) 55%, var(--line));
  border-bottom-color: var(--fc);
  background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 24%, var(--panel)), var(--panel));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--fc) 22%, transparent);
}
.fs-tab.active .fs-num { color: #fff; border-color: color-mix(in srgb, var(--fc) 60%, transparent); }

.roster-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.ros-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--slot);
  border: 1px solid var(--line);
  padding: 0 10px;
  height: 40px;
  flex: 1 1 260px;
  max-width: 340px;
}
.ros-search:focus-within { border-color: var(--amber); }
.ros-search svg {
  width: 16px; height: 16px; flex: 0 0 16px;
  fill: none; stroke: var(--dim-2); stroke-width: 2; stroke-linecap: round;
}
.ros-search input {
  flex: 1; min-width: 0;
  background: transparent;
  border: 0; outline: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  height: 100%;
}
.ros-search input::placeholder { color: var(--dim-2); }
.ros-search input::-webkit-search-cancel-button { display: none; }
.ros-clear {
  display: none;
  background: transparent; border: 0;
  color: var(--dim-2);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.ros-clear.show { display: block; }
.ros-clear:hover { color: var(--ink); }

.ros-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.ros-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 11px;
  cursor: pointer;
  transition: 0.14s;
  white-space: nowrap;
}
.ros-chip:hover { color: var(--ink); border-color: var(--line-hi); }
.ros-chip .n {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dim-2);
}
.ros-chip.active {
  color: #12151a;
  background: var(--amber);
  border-color: var(--amber);
  font-weight: 700;
}
.ros-chip.active .n { color: #12151a; }
.ros-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim-2);
  margin-left: auto;
  white-space: nowrap;
}

.roster-panel { min-height: 120px; }
.ros-group { margin-bottom: 26px; }
.ros-group:last-child { margin-bottom: 0; }
.ros-group h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 12px;
}
.ros-group h4 b { color: var(--fc); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; }
.ros-group h4 span { color: var(--ink); }
.ros-group h4 em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim-2);
  border: 1px solid var(--line);
  padding: 0 6px;
}
.ros-group h4 small {
  font-size: 11.5px;
  color: var(--dim-2);
  letter-spacing: 0;
  font-weight: 400;
}
.ros-group h4::after { content: ""; flex: 1; height: 1px; background: var(--line); order: 9; }
.ros-group h4 small { order: 8; }

.ugrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 9px;
}
.ucard {
  --fc: var(--red);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid color-mix(in srgb, var(--fc) 45%, var(--line));
  padding: 12px 13px 11px;
  color: inherit;
  font-family: var(--font-body);
  cursor: pointer;
  transition: 0.15s;
  min-height: 168px;
  position: relative;
  overflow: hidden;
}
.ucard::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--fc);
  opacity: 0;
  transition: 0.15s;
}
.ucard:hover, .ucard:focus-visible {
  border-color: color-mix(in srgb, var(--fc) 65%, var(--line));
  background: var(--panel-2);
  transform: translateY(-2px);
  outline: none;
}
.ucard:hover::after, .ucard:focus-visible::after { opacity: 1; }
.uc-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.uc-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--amber);
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.32);
  padding: 0 6px;
  line-height: 1.7;
}
.uc-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.uc-tags i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim-2);
  border: 1px solid var(--line);
  padding: 0 5px;
  line-height: 1.6;
}
.uc-name { font-size: 16px; letter-spacing: 0.02em; line-height: 1.35; margin-top: 1px; }
.uc-kind { font-size: 10.5px; letter-spacing: 0.14em; color: var(--dim-2); font-family: var(--font-mono); }
.uc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin-top: 4px;
}
.uc-stats span {
  display: flex;
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  white-space: nowrap;
}
.uc-stats span:nth-child(3) { grid-column: 1 / -1; }
.uc-stats i { font-style: normal; color: var(--dim-2); flex: 0 0 auto; }
.uc-stats em { font-style: normal; color: var(--money); overflow: hidden; text-overflow: ellipsis; }
.uc-desc {
  font-size: 12px;
  line-height: 1.55;
  color: var(--dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}
.ucard.is-gift {
  border-color: rgba(245,166,35,0.5);
  border-left-color: var(--amber);
  background: linear-gradient(150deg, rgba(245,166,35,0.1), var(--panel) 60%);
}
.ucard.is-gift .uc-code { color: #12151a; background: var(--amber); border-color: var(--amber); font-weight: 800; }
.ucard.is-bld .uc-code { color: var(--dim); background: rgba(255,255,255,0.04); border-color: var(--line-hi); }

.ros-empty {
  border: 1px dashed var(--line-hi);
  padding: 34px 22px;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
}

/* 详情弹层 */
.udialog {
  --fc: var(--red);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  width: min(520px, calc(100vw - 28px));
  max-height: min(86vh, 720px);
  margin: auto;
}
.udialog::backdrop { background: rgba(4,6,9,0.78); backdrop-filter: blur(5px); }
.ud-card {
  position: relative;
  background: linear-gradient(170deg, color-mix(in srgb, var(--fc) 12%, var(--panel)), var(--panel) 42%);
  border: 1px solid var(--line-hi);
  border-top: 3px solid var(--fc);
  padding: 26px 26px 22px;
  max-height: min(86vh, 720px);
  overflow: auto;
}
.ud-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ud-close:hover { color: #fff; border-color: var(--line-hi); }
.ud-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 30px; }
.ud-code {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: #12151a;
  background: var(--amber);
  padding: 3px 9px;
  flex: 0 0 auto;
}
.ud-fac { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.16em; }
.ud-head h3 { font-family: var(--font-display); font-size: 30px; line-height: 1.15; letter-spacing: 0.03em; margin: 2px 0; }
.ud-kind { font-size: 11.5px; color: var(--dim-2); font-family: var(--font-mono); letter-spacing: 0.1em; }
.ud-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.ud-tags i {
  font-style: normal;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--dim);
  border: 1px solid var(--line-hi);
  padding: 2px 8px;
  white-space: nowrap;
}
.ud-stats { margin: 14px 0 12px; border-top: 1px solid var(--line); }
.ud-stats div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  font-size: 13.5px;
}
.ud-stats span { color: var(--dim-2); }
.ud-stats b { font-family: var(--font-mono); color: var(--money); font-weight: 600; text-align: right; }
.ud-desc { font-size: 14px; line-height: 1.75; color: #c3ccd6; }
.ud-cmd {
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.34);
  border-left: 2px solid var(--fc);
  font-size: 13px;
  color: var(--dim);
}
.ud-cmd b { color: var(--amber); font-family: var(--font-mono); }

@media (max-width: 900px) {
  .roster-shell { padding: 14px; }
  /* 手机上四个阵营全部平铺可见，不藏在横向滚动里 */
  .faction-switch { grid-template-columns: 1fr 1fr; gap: 7px; }
  .fs-tab { padding: 11px 12px; font-size: 14px; }
  .roster-tools { margin: 13px 0 16px; }
  .ros-search { max-width: none; flex: 1 1 100%; }
  .ros-filters { flex-wrap: wrap; gap: 5px; }
  .ros-chip { font-size: 12.5px; padding: 5px 9px; }
  .ros-meta { margin-left: 0; flex: 1 0 100%; }
  .ugrid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 7px; }
  .ucard { min-height: 158px; padding: 11px 11px 10px; }
  .uc-name { font-size: 15px; }
}
@media (max-width: 520px) {
  .ugrid { grid-template-columns: 1fr 1fr; }
  .ucard { min-height: 140px; }
  .uc-desc { -webkit-line-clamp: 2; font-size: 11.5px; }
  .uc-stats { font-size: 11px; gap: 2px 8px; }
  .ros-group h4 { flex-wrap: wrap; gap: 6px; }
  .ros-group h4 small { flex: 1 0 100%; }
  .roster-shell { padding: 11px; }
  .ud-card { padding: 22px 18px 18px; }
  .ud-head h3 { font-size: 25px; }
}

