/* ============================================================
   玄梦官网 v2 全站样式（多页模板）
   结构：Header / 页面标题区 / 左侧栏 + 四角括号内容面板 / Footer
   配色：深蓝黑 + 暖金
   ============================================================ */

:root {
  --bg-0: #060c17;
  --bg-1: #0a1322;
  --panel: rgba(13, 22, 40, .78);
  --panel-solid: #0e1830;
  --line: rgba(216, 179, 112, .16);
  --line-strong: rgba(216, 179, 112, .42);
  --gold: #d8b370;
  --gold-bright: #edd9a3;
  --gold-deep: #b98d4f;
  --gold-soft: rgba(216, 179, 112, .12);
  --text: #dfe5ef;
  --text-dim: #93a0b5;
  --font-display: "STZhongsong", "SimSun", "Songti SC", "Noto Serif CJK SC", serif;
  --font-body: -apple-system, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --header-h: 88px;
  --wrap: 1340px;
  --side-w: 272px;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
/* 页面背景：由构建器注入 --page-bg，换图不改结构 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  background:
    radial-gradient(52vw 52vw at 84% 4%, rgba(120, 150, 200, .14), transparent 60%),
    linear-gradient(180deg, rgba(6, 12, 23, .45) 0%, rgba(6, 12, 23, .62) 55%, rgba(4, 9, 18, .88) 100%),
    var(--page-bg) center top / cover no-repeat,
    var(--bg-0);
}
a { color: inherit; text-decoration: none; }
a[data-href] { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(5, 10, 20, .97), rgba(5, 10, 20, .88));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: var(--wrap);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { filter: drop-shadow(0 2px 8px rgba(216, 179, 112, .3)); }
.brand-name {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--gold-bright);
}
.brand-name em { font-style: normal; font-size: 11px; letter-spacing: .3em; color: var(--text-dim); }

.primary-nav {
  flex: 1;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  min-width: 0;
}
.primary-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 10px 6px;
  white-space: nowrap;
}
.primary-nav .nav-cn {
  font-family: var(--font-display);
  font-size: 16.5px;
  letter-spacing: .18em;
  color: var(--text);
  transition: color .16s;
}
.primary-nav .nav-en {
  font-size: 9px;
  letter-spacing: .22em;
  color: rgba(147, 160, 181, .7);
  transition: color .16s;
}
.primary-nav a:hover .nav-cn { color: var(--gold-bright); }
.primary-nav a.is-active .nav-cn { color: var(--gold-bright); }
.primary-nav a.is-active .nav-en { color: rgba(216, 179, 112, .85); }
.primary-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 10px 1px rgba(216, 179, 112, .65);
}

.header-download {
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .12em;
  color: #2a1d08;
  background: linear-gradient(165deg, #f0d9a0, var(--gold-deep));
  box-shadow: 0 4px 16px rgba(216, 179, 112, .3), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .16s, box-shadow .16s;
}
.header-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 22px rgba(216, 179, 112, .42), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.nav-toggle, .nav-burger { display: none; }

/* ============ 页面标题区 ============ */
.page-title-band {
  position: relative;
  padding: 42px 20px 30px;
  text-align: center;
}
.page-title {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--gold-bright);
  text-shadow: 0 4px 22px rgba(0, 0, 0, .8);
}
.page-title::before, .page-title::after {
  content: "";
  width: clamp(60px, 12vw, 210px);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(216, 179, 112, .8) 60%, rgba(216, 179, 112, .8) 100%);
}
.page-title::after { transform: scaleX(-1); }
.page-title-en {
  margin-top: 8px;
  font-size: 11.5px;
  letter-spacing: .52em;
  text-indent: .52em;
  color: rgba(200, 210, 226, .62);
}
.page-title-band::after {
  content: "◆";
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  font-size: 8px;
  color: rgba(216, 179, 112, .75);
}

/* ============ 主内容布局 ============ */
.page-content {
  flex: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 20px 72px;
  animation: pageEnter .24s ease-out both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .page-content { animation: none; }
  html { scroll-behavior: auto; }
}

/* 两栏骨架：左侧栏 + 右内容 */
.layout {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.layout > * { min-width: 0; }

/* ============ 四角括号面板 ============ */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  padding: 24px 26px;
}
.panel::before, .panel::after,
.panel > .corner-b::before, .panel > .corner-b::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border-color: rgba(216, 179, 112, .55);
  border-style: solid;
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: var(--radius) 0 0 0; }
.panel::after { top: -1px; right: -1px; border-width: 2px 2px 0 0; border-radius: 0 var(--radius) 0 0; }
.panel > .corner-b::before { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; border-radius: 0 0 0 var(--radius); }
.panel > .corner-b::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 var(--radius) 0; }

.panel-heading {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #f0e9d8;
  margin-bottom: 6px;
}
.panel-note {
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: .04em;
}

/* ============ 左侧栏 ============ */
.side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  padding: 16px;
}
.side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 16.5px;
  letter-spacing: .16em;
  color: var(--gold);
}
.side-title::before { content: ""; width: 3px; height: 16px; background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); border-radius: 2px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav button, .side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 15px;
  letter-spacing: .1em;
  text-align: left;
  transition: all .15s;
}
.side-nav button::before, .side-nav a::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(216, 179, 112, .4);
  transition: background .15s;
  flex-shrink: 0;
}
.side-nav button:hover, .side-nav a:hover { color: var(--gold-bright); background: rgba(216, 179, 112, .05); }
.side-nav .is-active {
  color: #2a1d08 !important;
  font-weight: 700;
  background: linear-gradient(160deg, #ecd49a, var(--gold-deep)) !important;
  box-shadow: 0 5px 16px rgba(216, 179, 112, .25);
}
.side-nav .is-active::before { background: #2a1d08; }

.side-list { display: flex; flex-direction: column; }
.side-list a { padding: 9px 4px; border-bottom: 1px solid rgba(216, 179, 112, .08); border-radius: 6px; transition: background .14s; }
.side-list a:last-child { border-bottom: none; }
.side-list a:hover { background: rgba(216, 179, 112, .05); }
.side-list a.is-current { background: rgba(216, 179, 112, .1); }
.side-list-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #d3dae6;
  font-size: 13px;
  line-height: 1.55;
}
.side-list a.is-current .side-list-title { color: var(--gold); }
.side-list-date { display: block; margin-top: 3px; color: #76839a; font-size: 11.5px; }

/* ============ 通用组件 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .1em;
  transition: all .16s;
  cursor: pointer;
}
.btn-gold {
  color: #2a1d08;
  background: linear-gradient(165deg, #f0d9a0, var(--gold-deep));
  box-shadow: 0 4px 18px rgba(216, 179, 112, .28), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(216, 179, 112, .4), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-ghost {
  color: var(--gold-bright);
  border: 1px solid var(--line-strong);
  background: rgba(216, 179, 112, .05);
}
.btn-ghost:hover { background: rgba(216, 179, 112, .13); }

.tag {
  display: inline-block;
  padding: 1px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--gold);
  font-size: 12.5px;
  letter-spacing: .08em;
}

.gold-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1.9em 0 .8em;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .12em;
  color: var(--gold);
}
.gold-h::before { content: "◇"; font-size: 13px; color: rgba(216, 179, 112, .85); }
.gold-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(216, 179, 112, .28), transparent); }

.empty-state { padding: 44px 0; text-align: center; color: var(--text-dim); }

/* ============ 卡片网格 ============ */
.card-grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.g-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 18, 34, .66);
  overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.g-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(4, 8, 16, .92);
  text-align: center;
  padding: 34px 20px 30px;
}
.footer-brand-line {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--gold);
}
.footer-health { margin-top: 10px; color: #7e8aa0; font-size: 12.5px; }
.footer-copy { margin-top: 4px; color: #5d6980; font-size: 12px; }

/* ============================================================
   首页
   ============================================================ */
.home-hero.panel { padding: clamp(30px, 5vw, 64px) clamp(24px, 5vw, 70px); }
.home-version {
  position: absolute;
  top: 18px; right: 22px;
  color: var(--text-dim);
  font-size: 12.5px;
  letter-spacing: .1em;
}
.home-version b { color: var(--gold); font-weight: 700; }
.home-kicker { color: var(--gold); font-size: 13.5px; letter-spacing: .5em; }
.home-slogan {
  margin: 14px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: .18em;
  color: #f5edda;
  text-shadow: 0 4px 26px rgba(0, 0, 0, .7);
}
.home-intro { max-width: 560px; color: #c0c9d9; }
.home-actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.home-hero-art {
  position: absolute;
  right: clamp(8px, 4vw, 56px);
  bottom: 0;
  height: 112%;
  max-height: 460px;
  pointer-events: none;
  filter: drop-shadow(0 12px 34px rgba(0, 0, 0, .55));
}

.home-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 16px; }
.home-card { min-height: 240px; padding: 20px 22px; }
.home-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .14em;
  color: var(--gold);
}
.home-card-title::before { content: "◇"; font-size: 12px; }
.home-news-list a {
  display: block;
  padding: 9px 8px;
  border-radius: 8px;
  transition: background .14s;
}
.home-news-list a:hover { background: rgba(216, 179, 112, .06); }
.home-news-t { display: block; color: #d8dfe9; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-news-d { color: #76839a; font-size: 12px; }
.home-news-more { display: inline-block; margin-top: 8px; color: var(--gold); font-size: 13px; }
.home-news-more:hover { color: var(--gold-bright); }

.home-entries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.home-entry {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(216, 179, 112, .04);
  transition: all .15s;
}
.home-entry:hover { border-color: var(--line-strong); background: rgba(216, 179, 112, .1); transform: translateY(-2px); }
.home-entry b { display: block; font-family: var(--font-display); font-size: 15.5px; letter-spacing: .1em; color: #ecd9ab; }
.home-entry span { color: var(--text-dim); font-size: 12px; }

.home-dl-os { font-family: var(--font-display); font-size: 26px; color: #fff; letter-spacing: .06em; }
.home-dl-meta { margin: 10px 0 16px; color: var(--text-dim); font-size: 13.5px; line-height: 2; }
.home-dl-meta b { color: var(--text); font-weight: 600; }

/* ============================================================
   特色页
   ============================================================ */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat-card { display: flex; flex-direction: column; }
.feat-art {
  aspect-ratio: 9 / 5;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.feat-body { padding: 15px 18px 17px; }
.feat-body h3 { font-family: var(--font-display); font-size: 17.5px; letter-spacing: .08em; color: #ecd9ab; }
.feat-body p { margin-top: 6px; color: var(--text-dim); font-size: 13px; line-height: 1.8; }
.feat-card .tag { position: absolute; top: 10px; left: 10px; background: rgba(5, 10, 20, .82); }

/* ============================================================
   世界观页
   ============================================================ */
.world-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3.4fr); gap: 16px; align-items: start; }
.world-map-panel { padding: 18px; }
.world-map-wrap { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.world-map-wrap img { width: 100%; transition: opacity .3s; }
.world-map-tip {
  position: absolute;
  left: 14px; bottom: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 10, 20, .85);
  font-size: 12.5px;
  color: var(--gold-bright);
}
.world-cards { display: flex; flex-direction: column; gap: 12px; }
.world-card { padding: 16px 18px; }
.world-card .tag { margin-bottom: 8px; }
.world-card h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: .1em; color: #ecd9ab; }
.world-card p { margin-top: 6px; color: var(--text-dim); font-size: 13px; }
.world-lore { margin-top: 16px; }
.world-lore p { color: #c4cddc; font-size: 14.5px; margin-bottom: 1em; max-width: 78ch; }
.timeline { display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 10px 4px 10px 22px; border-bottom: 1px solid rgba(216, 179, 112, .08); }
.timeline li:last-child { border-bottom: none; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px; top: 1.15em;
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: rgba(216, 179, 112, .7);
}
.timeline b { display: block; color: #e6d9b8; font-size: 14.5px; letter-spacing: .06em; }
.timeline span { color: #76839a; font-size: 12px; }

/* ============================================================
   角色页
   ============================================================ */
.role-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5.4fr); gap: 16px; align-items: start; }
.role-stage { text-align: center; padding: 26px 22px 24px; }
.role-stage-art {
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.role-stage-art img { max-height: 100%; max-width: 88%; object-fit: contain; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .6)); }
.role-stage-name {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: .22em;
  color: var(--gold-bright);
}
.role-stage-meta { margin-top: 4px; color: var(--text-dim); font-size: 13.5px; }
.role-stage-intro { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); color: #c2cbda; font-size: 14px; text-align: left; }
.role-stage-tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-cell {
  position: relative;
  padding: 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 34, .6);
  text-align: center;
  transition: all .15s;
  cursor: pointer;
}
.role-cell:hover { border-color: var(--line-strong); background: rgba(216, 179, 112, .06); }
.role-cell.is-active { border-color: var(--gold); background: rgba(216, 179, 112, .12); box-shadow: 0 0 0 1px rgba(216, 179, 112, .35); }
.role-cell img { height: 86px; margin: 0 auto; object-fit: contain; }
.role-cell b { display: block; margin-top: 6px; font-size: 13.5px; font-weight: 600; letter-spacing: .1em; color: #dfe5ef; }
.role-cell .race-dot {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 10.5px;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 6px;
  background: rgba(5, 10, 20, .7);
}

/* ============================================================
   门派页
   ============================================================ */
.sect-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sect-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(10, 18, 34, .6);
  cursor: pointer;
  transition: all .16s;
  text-align: left;
  padding: 14px 16px;
}
.sect-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.sect-card.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(216, 179, 112, .4), 0 8px 22px rgba(0, 0, 0, .4); }
.sect-card .tag { font-size: 11px; padding: 0 9px; }
.sect-card h3 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .14em;
  color: #ecd9ab;
}
.sect-card p { margin-top: 4px; color: var(--text-dim); font-size: 12px; letter-spacing: .03em; }

.sect-detail { margin-top: 16px; padding: 22px 26px; }
.sect-detail-cols { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 24px; align-items: start; }
.sect-detail-art img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
}
.sect-detail-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sect-detail-head h3 { font-family: var(--font-display); font-size: 24px; letter-spacing: .14em; color: var(--gold-bright); }
.sect-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 32px; margin-top: 12px; }
.sect-detail-grid p { color: #c2cbda; font-size: 14px; padding: 5px 0; border-bottom: 1px dashed rgba(216, 179, 112, .1); }
.sect-detail-grid p b { color: var(--gold); font-weight: 600; margin-right: 10px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.skill-chips .tag { border-color: var(--line); color: #cfd7e4; }
.skill-chips .tag.gold { border-color: var(--line-strong); color: var(--gold); }

/* ============================================================
   召唤兽页
   ============================================================ */
.pet-layout { display: grid; grid-template-columns: minmax(0, 6.2fr) minmax(0, 3.8fr); gap: 16px; align-items: start; }
.pet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pet-cell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10, 18, 34, .6);
  overflow: hidden;
  cursor: pointer;
  transition: all .16s;
  text-align: center;
}
.pet-cell:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pet-cell.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(216, 179, 112, .4); }
.pet-cell .pet-thumb { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 10px; }
.pet-cell img { max-height: 100%; object-fit: contain; }
.pet-cell b { display: block; padding: 0 6px 10px; font-size: 13.5px; font-weight: 600; letter-spacing: .08em; color: #dfe5ef; }

.pet-detail { padding: 20px 22px; position: sticky; top: calc(var(--header-h) + 16px); }
.pet-detail-art { height: 250px; display: flex; align-items: center; justify-content: center; }
.pet-detail-art img { max-height: 100%; max-width: 92%; object-fit: contain; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .55)); }
.pet-detail-name {
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: .18em;
  color: var(--gold-bright);
}
.pet-detail-series { text-align: center; margin-top: 4px; }
.pet-detail-story {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  max-height: 300px;
  overflow-y: auto;
  color: #c2cbda;
  font-size: 13.5px;
}
.pet-detail-story h4 { color: var(--gold); font-size: 14px; margin: 10px 0 4px; letter-spacing: .1em; }
.pet-detail-story p { margin-bottom: .7em; }
.pet-detail-story::-webkit-scrollbar { width: 5px; }
.pet-detail-story::-webkit-scrollbar-thumb { background: rgba(216, 179, 112, .3); border-radius: 3px; }

/* ============================================================
   装备页
   ============================================================ */
.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.equip-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 34, .6);
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}
.equip-card:hover { border-color: var(--line-strong); }
.equip-card.is-active { border-color: var(--gold); background: rgba(216, 179, 112, .1); }
.equip-card .no { font-family: var(--font-display); font-size: 13px; color: rgba(216, 179, 112, .6); }
.equip-card b { font-family: var(--font-display); font-size: 17px; letter-spacing: .12em; color: #ecd9ab; }
.equip-card span { margin-left: auto; color: var(--text-dim); font-size: 12px; }

.equip-detail { margin-top: 16px; padding: 22px 26px; }
.equip-detail-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.equip-detail-head h3 { font-family: var(--font-display); font-size: 23px; letter-spacing: .12em; color: var(--gold-bright); }
.equip-name-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.equip-name-item {
  padding: 8px 12px;
  border: 1px solid rgba(216, 179, 112, .12);
  border-radius: 7px;
  background: rgba(216, 179, 112, .03);
  font-size: 13px;
  color: #cfd7e4;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.equip-name-item .lv { color: #76839a; font-size: 12px; flex-shrink: 0; }
.equip-name-item.top { border-color: var(--line-strong); }
.equip-name-item.top b { color: var(--gold-bright); font-weight: 600; }

/* ============================================================
   新闻公告页
   ============================================================ */
.news-list-panel { padding: 8px 24px; }
.news-rows { display: flex; flex-direction: column; }
.news-row { border-bottom: 1px solid rgba(216, 179, 112, .09); }
.news-row:last-child { border-bottom: none; }
.news-row a, .news-row .news-row-inner {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 15px 6px;
  border-radius: 8px;
  transition: background .14s;
}
.news-row a:hover { background: rgba(216, 179, 112, .05); }
.news-row a:hover .news-row-title { color: var(--gold-bright); }
.news-row-tag { flex-shrink: 0; width: 3.4em; text-align: center; font-size: 12px; color: var(--gold); border: 1px solid var(--line-strong); border-radius: 999px; }
.news-row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 15px; transition: color .14s; }
.news-row-date { flex-shrink: 0; color: var(--text-dim); font-size: 13px; font-variant-numeric: tabular-nums; }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 0 18px; }
.pager button {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(10, 18, 34, .8);
  color: var(--gold);
  transition: all .15s;
}
.pager button:hover:not(:disabled) { background: var(--gold-soft); }
.pager button:disabled { opacity: .3; cursor: default; }
.pager-pos { color: var(--text-dim); font-size: 13.5px; letter-spacing: .1em; }

/* 文章 */
.article { padding: clamp(26px, 4vw, 48px) clamp(22px, 4.5vw, 54px); }
.article-head { text-align: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.article-head h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.5;
  letter-spacing: .04em;
  color: #f0e9d8;
  text-wrap: balance;
}
.article-meta {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: #8d99af;
  font-size: 13px;
}
.article-body { padding-top: 26px; color: #d0d7e3; }
.article-body p { margin-bottom: 1.25em; font-size: 15.5px; line-height: 2.05; text-wrap: pretty; }
.article-body ul { margin-bottom: 1.4em; }
.article-body li { position: relative; padding: .32em 0 .32em 1.3em; line-height: 1.9; }
.article-body li::before {
  content: "";
  position: absolute;
  left: 2px; top: 1em;
  width: 6px; height: 6px;
  transform: rotate(45deg);
  background: rgba(216, 179, 112, .65);
}
.article-callout {
  margin: 24px 0;
  padding: 15px 20px;
  display: flex;
  gap: 15px;
  align-items: baseline;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(216, 179, 112, .07);
}
.article-callout strong { flex-shrink: 0; color: var(--gold); }
.article-signoff { margin-top: 2.4em; color: #e6dfcf; }
.article-team { text-align: right; color: var(--text-dim); }
.article-actions {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   下载页
   ============================================================ */
.dl-main-card { display: flex; align-items: center; gap: 26px; padding: 26px 30px; flex-wrap: wrap; }
.dl-app-icon {
  width: 104px; height: 104px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: radial-gradient(120% 120% at 30% 20%, #182a4a, #0a1322);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
  flex-shrink: 0;
}
.dl-app-icon img { width: 74px; height: 74px; object-fit: contain; }
.dl-main-info h3 { font-family: var(--font-display); font-size: 24px; letter-spacing: .1em; color: #f0e9d8; }
.dl-main-meta { margin: 6px 0 14px; color: var(--text-dim); font-size: 13.5px; line-height: 2; }
.dl-main-meta b { color: var(--text); font-weight: 600; }

.dl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.dl-sub-card { padding: 20px 22px; }
.dl-sub-card h4 { font-family: var(--font-display); font-size: 17px; letter-spacing: .1em; color: #ecd9ab; }
.dl-sub-card p { margin: 6px 0 12px; color: var(--text-dim); font-size: 13px; }
.dl-badges { display: flex; gap: 8px; }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.spec-table th, .spec-table td { padding: 9px 4px; border-bottom: 1px dashed rgba(216, 179, 112, .12); font-size: 13.5px; text-align: left; }
.spec-table th { color: var(--gold); font-weight: 600; width: 6.5em; vertical-align: top; }
.spec-table td { color: #c2cbda; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

.faq-item { padding: 12px 4px; border-bottom: 1px dashed rgba(216, 179, 112, .12); }
.faq-item:last-child { border-bottom: none; }
.faq-item b { display: block; color: #e6d9b8; font-size: 14.5px; }
.faq-item p { margin-top: 4px; color: var(--text-dim); font-size: 13.5px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1199px) {
  :root { --side-w: 224px; }
  .primary-nav .nav-en { display: none; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .feat-grid, .sect-grid { grid-template-columns: repeat(2, 1fr); }
  .home-row { grid-template-columns: 1fr; }
  .home-hero-art { display: none; }
  .world-layout, .pet-layout, .role-layout { grid-template-columns: minmax(0, 1fr); }
  .pet-detail { position: static; }
  .equip-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  :root { --header-h: 62px; }
  .brand-name { font-size: 19px; }
  .brand img { width: 36px; height: 36px; }
  .header-inner { gap: 12px; }
  .header-download { display: none; }

  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 40px; height: 40px;
    padding: 8px;
    cursor: pointer;
  }
  .nav-burger span { height: 2px; background: var(--gold); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5, 10, 20, .98);
    border-bottom: 1px solid var(--line-strong);
    padding: 8px 18px 16px;
    display: none;
  }
  .nav-toggle:checked ~ .primary-nav { display: flex; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .primary-nav a { flex-direction: row; justify-content: space-between; padding: 12px 6px; border-bottom: 1px solid rgba(216, 179, 112, .08); }
  .primary-nav .nav-en { display: block; }
  .primary-nav a.is-active::after { display: none; }

  .page-title-band { padding: 26px 16px 20px; }
  .page-content { padding: 8px 14px 52px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; order: 2; }
  .layout > .main-col { order: 1; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-nav button, .side-nav a { width: auto; padding: 8px 16px; }

  .panel { padding: 18px 16px; }
  .cols-2, .cols-3, .cols-4, .feat-grid, .sect-grid, .equip-grid { grid-template-columns: 1fr; }
  .pet-grid, .role-grid { grid-template-columns: repeat(2, 1fr); }
  .home-actions .btn { width: 100%; }
  .dl-row { grid-template-columns: 1fr; }
  .sect-detail-grid { grid-template-columns: 1fr; }
  .sect-detail-cols { grid-template-columns: 1fr; }
  .sect-detail-art { display: none; }
  .article { padding: 22px 16px; }
  .article-actions .btn { width: 100%; }
  .news-list-panel { padding: 4px 12px; }
  .news-row-tag { display: none; }
}
