:root {
  --ink: #0c0e13;
  --panel: #141823;
  --line: #262c3a;
  --cream: #f2ead8;
  --gold: #e8c77c;
  --muted: #8b8f98;
  --accent: #c9a15f;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background:
    radial-gradient(1100px 600px at 50% -10%, #1b2030 0%, transparent 60%),
    var(--ink);
  color: var(--cream);
  font-family: "PingFang SC", "Microsoft YaHei", "Songti SC", serif;
  min-height: 100svh;
}
.masthead {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 54px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; gap: 4px; }
.brand-cn {
  font-size: 26px;
  font-family: "Songti SC", "STSong", serif;
  letter-spacing: 0.06em;
}
.brand-cn .dot {
  display: inline-block; width: 5px; height: 5px;
  background: var(--gold); border-radius: 50%;
  margin: 0 0 3px 6px;
}
.brand-en { font-size: 10px; color: var(--muted); letter-spacing: 0.22em; }
.head-right { font-size: 12px; color: var(--muted); letter-spacing: 0.15em; }
.attrbar {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px; padding: 22px 24px 2px;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #141823; border: 1px solid #2a3242; color: #cfc4a6;
  border-radius: 999px; padding: 7px 16px; cursor: pointer;
  font-family: inherit; font-size: 14px; letter-spacing: .08em;
  transition: border-color .2s ease, color .2s ease, box-shadow .2s ease, background .2s ease;
  user-select: none;
}
.chip img { width: 18px; height: 18px; object-fit: contain; }
.chip:hover { border-color: #8a7b58; color: #f0e3bd; }
.chip.on {
  border-color: var(--gold); color: #f7ebc8; background: #1e2636;
  box-shadow: 0 0 12px rgba(232, 199, 124, .28);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto 60px;
  padding: 0 40px;
}
.card-tile {
  cursor: pointer;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.card-tile:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
a { color: inherit; text-decoration: none; }
.card-tile { color: #f2ead8; text-decoration: none; }
.card-tile:link, .card-tile:visited { color: #f2ead8; }
.card-tile .frame { position: relative; aspect-ratio: 2 / 2.9; overflow: hidden; background: #0a0c11; }
.card-tile .frame img, .card-tile .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-tile .edition {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; color: #d8c9a0;
  background: rgba(10, 12, 17, 0.72);
  border: 1px solid rgba(232, 199, 124, 0.35);
  padding: 3px 8px; border-radius: 999px;
  letter-spacing: 0.12em;
}
.card-tile .meta { padding: 14px 16px 16px; }
.card-tile .meta .name { display: flex; align-items: center; gap: 8px; font-size: 22px; color: #f2ead8; font-family: "Songti SC", "STSong", serif; letter-spacing: 0.08em; }
.card-tile .meta .name .attr { width: 22px; height: 22px; flex: none; object-fit: contain; }
      /* 稀有度徽标（S／A）：放在属性标前面，比属性标略小、不抢视线（2026-09-20 用户口径） */
      .card-tile .meta .name .rarity { width: 22px; height: 22px; flex: none; object-fit: contain; margin-right: -1px; }
.card-tile .meta .sub { margin-top: 4px; font-size: 12px; color: var(--gold); letter-spacing: 0.12em; }
.card-tile .meta .tag { margin-top: 8px; font-size: 11px; color: var(--muted); }
.footer {
  display: flex; justify-content: space-between;
  padding: 22px 54px 30px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted); letter-spacing: 0.12em;
}
@media (max-width: 640px) {
  .masthead { padding: 0 20px; height: 72px; }
  .hero-line h1 { font-size: 30px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 0 16px; }
  .footer { padding: 18px 20px 24px; }
}

/* 顶部导航（2026-09-12 新增：角色列表 / 战斗体系 两页互链） */
.masthead { position: relative; }
.topnav { position: absolute; right: 20px; top: 20px; display: flex; gap: 8px; }
.topnav a { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 13px; letter-spacing: .08em;
  color: #d8c79a; text-decoration: none; border: 1px solid rgba(214,180,120,.32); background: rgba(215,178,106,.07); }
.topnav a:hover { border-color: rgba(232,199,124,.6); background: rgba(215,178,106,.16); }
@media (max-width: 640px) { .topnav { position: static; margin-top: 10px; } }


/* ── 支持作者（页脚入口 + 弹层）──────────────────────────────── */
.sup { text-align: center; margin: 10px auto 4px; }
.supbtn { background: none; border: 1px solid rgba(232,199,124,.35); color: #d9b978;
  font-size: 12px; letter-spacing: .08em; padding: 6px 16px; border-radius: 999px;
  cursor: pointer; font-family: inherit; transition: .18s; }
.supbtn:hover { border-color: rgba(232,199,124,.7); color: #f0dca8; background: rgba(232,199,124,.06); }
.supmask { position: fixed; inset: 0; z-index: 99; background: rgba(6,5,9,.78);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.supmask[hidden] { display: none; }
.supbox { position: relative; background: #14111b; border: 1px solid rgba(232,199,124,.22);
  border-radius: 16px; padding: 26px 26px 20px; max-width: 620px; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.suptitle { text-align: center; color: #e8c77c; font-size: 15px; letter-spacing: .1em; margin-bottom: 6px; }
.supsub { text-align: center; color: #8f8570; font-size: 12px; margin-bottom: 18px; }
.supqrs { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.supqrs figure { margin: 0; text-align: center; }
.supqrs img { width: 210px; max-width: 40vw; border-radius: 10px; background: #fff; padding: 6px;
  display: block; }
.supqrs figcaption { font-size: 12px; color: #b9ad93; margin-top: 8px; letter-spacing: .06em; }
.supnote { text-align: center; font-size: 11px; color: #7d7460; line-height: 1.8; margin: 18px 0 0; }
.supx { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: #8f8570;
  font-size: 22px; line-height: 1; cursor: pointer; font-family: inherit; }
.supx:hover { color: #e8c77c; }


/* ── 支持作者：导航入口 + 三张码的弹层 ────────────────────────── */
.topnav a.supnav { color: #d9b978; }
.supqrs img { width: 178px; max-width: 34vw; }
.supnote { margin-top: 16px; }


/* 支持作者：三张码排一行（弹层加宽 + 码尺寸微调） */
.supbox { max-width: 760px; }
.supqrs { gap: 16px; }
.supqrs img { width: 196px; max-width: 30vw; }


/* 支持作者：抖音码单独放最下方（两段说明之后） */
.supqrs img { width: 210px; max-width: 34vw; }
.supdy { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(232,199,124,.14); text-align: center; }
.supdy figure { margin: 0; display: inline-block; }
.supdy img { width: 148px; max-width: 40vw; border-radius: 10px; background: #fff; padding: 5px; display: block; }
.supdy figcaption { font-size: 12px; color: #b9ad93; margin-top: 7px; letter-spacing: .06em; }


/* 支持作者：去分割线 + 三个码显示尺寸一致；抖音按圆形容器显示 */
.supdy { border-top: none; padding-top: 0; margin-top: 22px; }
.supdy img { width: 210px; max-width: 34vw; border-radius: 50%; padding: 0; background: transparent; }
.supdy figcaption { margin-top: 10px; }


/* 右上角导航在头部里竖直居中（原来 top:20px 偏上；手机端导航是 static，故加 min-width 限定） */
@media (min-width: 641px) {
  .topnav { top: 50%; transform: translateY(-50%); }
}


/* ── 导航响应式收官（2026-09-13 实测修正）─────────────────────────
   桌面端：导航在头部竖直居中；
   中窄屏（≤820）：绝对定位会压住品牌名 → 改回静态流式，头部随内容长高；
   手机端（≤640）：原来头部固定 72px，4 个按钮换行后 82px 会溢出 → height:auto */
@media (max-width: 820px) {
  .masthead { height: auto; min-height: 72px; flex-wrap: wrap; padding: 10px 20px; }
  .topnav { position: static; top: auto; transform: none; margin-top: 8px; flex-wrap: wrap; }
}
@media (min-width: 821px) {
  .topnav { top: 50%; transform: translateY(-50%); }
  /* 导航加到第 5 个按钮（一键配队）后的**防撞护栏**：品牌名右缘约在 272px
     （左内边距 54 + 品牌宽度约 218），所以把导航左边界锁在 300px 并允许换行 ——
     按钮再多也只会往下折一行，不会盖住品牌名。 */
  .topnav { left: 300px; right: 20px; justify-content: flex-end; flex-wrap: wrap; row-gap: 6px; }
}

/* ── 跟随光标的小三角（cursor-follow.js）────────────────────────────
   用真 <img> 装素材、**且不加 mask / filter / will-change**：
   实测只要给这个元素加"会另开渲染层"的属性（CSS mask、filter、will-change），
   在软件合成的 headless Chromium 里旋转就不上屏 —— 外接矩形是对的，
   但画出来的形状仍是原方向。这里全部走最朴素的路径：一个被 transform 的 img。
   旋转原点在尖端：尖端精确压在光标上，身体像罗盘指针一样甩在后面。 */
.cursor-follow {
  position: fixed; left: 0; top: 0;
  width: 26px; height: 22px;              /* 与 JS 里的 W/H 对应 */
  transform-origin: 50% 100%;
  pointer-events: none; user-select: none; z-index: 9999;
  opacity: 0; transition: opacity .2s ease;
}
@media (prefers-reduced-motion: reduce) { .cursor-follow { display: none !important; } }
@media (hover: none), (pointer: coarse) { .cursor-follow { display: none !important; } }

/* 自检面板（只在 ?cursor-selftest=1 时出现，正常浏览看不到） */
#cf-selftest {
  position: fixed; left: 12px; top: 12px; z-index: 10000; margin: 0;
  max-width: 46vw; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(10,12,18,.92); color: #cfd3da;
  font: 12px/1.7 ui-monospace, Consolas, monospace; white-space: pre-wrap;
}
