/* ══════════════════════════════════════════════════════════════════
   万端演竞 · 干员档案接入台
   配色：近黑底 + 钨金强调色，参照明日方舟 UI 的工业感
   ══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #08090c;
  --bg-2: #0c0f13;
  --panel: #11151b;
  --panel-2: #161b22;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #ece9e2;
  --ink-dim: #99a1ad;
  --display: "Oswald", "Barlow Condensed", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --ink-faint: #5d6571;
  --gold: #f2c96b;
  --gold-deep: #b88b2e;
  --cyan: #79dcff;
  --ok: #5fe0a8;
  --danger: #ff7373;
  --topbar: 64px;
  --mono: "JetBrains Mono", "Cascadia Code", "Consolas", ui-monospace, monospace;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}


* { box-sizing: border-box; }


button, input, select, textarea { font-family: inherit; }


html, body { margin: 0; }


body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}


code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--gold);
  background: rgba(242, 201, 107, 0.09);
  padding: 1px 5px;
  border-radius: 2px;
}


.hidden { display: none !important; }


/* ── 背景 ─────────────────────────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(242, 201, 107, 0.09), transparent 62%),
    radial-gradient(760px 480px at 92% 6%, rgba(121, 220, 255, 0.06), transparent 66%),
    radial-gradient(1100px 700px at 50% 108%, rgba(242, 201, 107, 0.045), transparent 70%),
    var(--bg);
}

.bg-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 78%);
}

.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    transparent 0 78px,
    rgba(255, 255, 255, 0.014) 78px 79px
  );
}


/* ── 环境层：粒子 + 光环 + 光带（参考官网首页的动效密度） ───────────── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}


.ambient__ring {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(128vw, 1180px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 24deg,
    rgba(242, 201, 107, 0.14) 46deg,
    transparent 78deg,
    transparent 200deg,
    rgba(121, 220, 255, 0.08) 236deg,
    transparent 268deg
  );
  -webkit-mask: radial-gradient(circle, transparent 61%, #000 63%, #000 65.5%, transparent 67%);
  mask: radial-gradient(circle, transparent 61%, #000 63%, #000 65.5%, transparent 67%);
  animation: spin 110s linear infinite;
  opacity: 0.85;
}

.ambient__ring::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-top-color: rgba(242, 201, 107, 0.22);
  animation: spin-plain 46s linear infinite reverse;
}


.ambient__beam {
  --rot: 0deg;
  position: absolute;
  left: -30%;
  width: 160%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(242, 201, 107, 0.32) 32%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(242, 201, 107, 0.32) 68%,
    transparent
  );
  transform: rotate(var(--rot));
  opacity: 0.5;
  filter: blur(0.4px);
  animation: beam-drift 24s ease-in-out infinite alternate;
}

.ambient__beam--a { top: 17%; --rot: -9deg; }

.ambient__beam--b { top: 68%; --rot: 5deg; opacity: 0.28; animation-duration: 37s; animation-direction: alternate-reverse; }


.ambient__sweep {
  position: absolute;
  left: 0;
  right: 0;
  top: -240px;
  height: 240px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  animation: sweep 12s linear infinite;
}


.ambient__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 38%, transparent 42%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.5));
}


@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spin-plain {
  to { transform: rotate(360deg); }
}

@keyframes beam-drift {
  from { transform: translateX(-4%) rotate(var(--rot)); }
  to { transform: translateX(4%) rotate(var(--rot)); }
}

@keyframes sweep {
  to { transform: translateY(calc(100vh + 480px)); }
}


/* ═══════════════════════════════════════════════════════════════════
   心魂侧写 · 专属背景
   构成主义：斜带 / 环 / 楔 / 竖条 / 网点，全部低透明度 + 小动态
   ═══════════════════════════════════════════════════════════════════ */

.soul-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* 光：上方暖金顶光，右下冷青补色 */
.soul-bg__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(62vw 52vh at 50% -10%, rgba(242, 201, 107, 0.075), transparent 72%),
    radial-gradient(48vw 48vh at 90% 92%, rgba(24, 209, 255, 0.04), transparent 74%);
}

.soul-bg__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 小动态：都慢，只有 2~12px / 几度的位移 */
.soul-art__band { animation: soul-band 46s ease-in-out infinite alternate; }
.soul-art__topline { animation: soul-topline 34s ease-in-out infinite alternate; }
.soul-art__wedge { animation: soul-wedge 20s ease-in-out infinite alternate; }
.soul-art__ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: soul-ring 180s linear infinite;
}
.soul-art__red {
  transform-box: fill-box;
  transform-origin: center;
  animation: soul-red 28s ease-in-out infinite alternate;
}
.soul-art__bars rect {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: soul-bar 15s ease-in-out infinite alternate;
}
.soul-art__bars rect:nth-child(2) { animation-delay: -2.4s; }
.soul-art__bars rect:nth-child(3) { animation-delay: -5.1s; }
.soul-art__bars rect:nth-child(4) { animation-delay: -7.8s; }
.soul-art__bars rect:nth-child(5) { animation-delay: -10.2s; }
.soul-art__rule { animation: soul-rule 24s ease-in-out infinite alternate; }
.soul-art__chip {
  transform-box: fill-box;
  transform-origin: center;
  animation: soul-chip 9s ease-in-out infinite alternate;
}

/* 光尘 */
.soul-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 暗角 */
.soul-bg__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 92% at 50% 38%, transparent 38%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 15%, transparent 82%, rgba(0, 0, 0, 0.58));
}

@keyframes soul-band {
  from { transform: translateX(-12px); }
  to { transform: translateX(16px); }
}
@keyframes soul-topline {
  from { transform: translate(0, 0); }
  to { transform: translate(-10px, 6px); }
}
@keyframes soul-wedge {
  from { opacity: 0.65; }
  to { opacity: 1; }
}
@keyframes soul-ring {
  to { transform: rotate(360deg); }
}
@keyframes soul-red {
  from { transform: rotate(-5deg); }
  to { transform: rotate(7deg); }
}
@keyframes soul-bar {
  from { transform: scaleY(1); }
  to { transform: scaleY(1.06); }
}
@keyframes soul-rule {
  from { transform: translateX(-10px); }
  to { transform: translateX(12px); }
}
@keyframes soul-chip {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .soul-art__band,
  .soul-art__topline,
  .soul-art__wedge,
  .soul-art__ring,
  .soul-art__red,
  .soul-art__bars rect,
  .soul-art__rule,
  .soul-art__chip { animation: none; }
}

@media (max-width: 900px) {
  .soul-bg__art { display: none; }
  .soul-bg__glow {
    background:
      radial-gradient(90vw 60vh at 50% -8%, rgba(242, 201, 107, 0.09), transparent 74%),
      radial-gradient(80vw 50vh at 80% 90%, rgba(24, 209, 255, 0.035), transparent 74%);
  }
}
/* ── 顶栏 ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.78);
  backdrop-filter: blur(14px);
}


.brand { display: flex; align-items: center; gap: 12px; }

.brand__mark {
  width: 22px;
  height: 26px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
  box-shadow: 0 0 18px rgba(242, 201, 107, 0.45);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }

.brand__text strong {
  font-size: 15px;
  letter-spacing: 0.22em;
  font-weight: 700;
}

.brand__text em {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
  font-family: var(--display);
  font-weight: 500;
}


.topbar__actions { display: flex; align-items: center; gap: 10px; }


.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.ghost-btn:hover { color: var(--ink); border-color: var(--gold); background: rgba(242, 201, 107, 0.07); }

.ghost-btn .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}


.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.status-pill::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.status-pill[data-mode="demo"] { color: var(--gold); border-color: rgba(242, 201, 107, 0.4); }

.status-pill[data-mode="live"] { color: var(--ok); border-color: rgba(95, 224, 168, 0.4); }

.status-pill[data-mode="busy"] { color: var(--cyan); border-color: rgba(121, 220, 255, 0.4); }

.status-pill[data-mode="error"] { color: var(--danger); border-color: rgba(255, 115, 115, 0.4); }


/* ── 通用排版 ─────────────────────────────────────────────────────── */
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}


main { padding: 0 clamp(16px, 3vw, 40px) 64px; }


.view { max-width: 1320px; margin: 0 auto; }


/* ── 登录 ─────────────────────────────────────────────────────────── */
.view--login {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--topbar));
  padding: 40px 0;
}


.login {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(28px, 5vw, 72px);
  width: 100%;
  align-items: center;
}


.login__brand h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  font-weight: 800;
}

.login__brand h1 span {
  position: relative;
  color: var(--gold);
  animation: glitch 9s steps(1) infinite;
}

@keyframes glitch {
  0%, 91%, 100% { text-shadow: 0 0 0 transparent; }
  92% { text-shadow: 2px 0 rgba(255, 70, 70, 0.55), -2px 0 rgba(90, 200, 255, 0.55); }
  93.5% { text-shadow: -3px 0 rgba(255, 70, 70, 0.45), 3px 0 rgba(90, 200, 255, 0.45); }
  95% { text-shadow: 1px 0 rgba(255, 70, 70, 0.4), -1px 0 rgba(90, 200, 255, 0.4); }
  96.5% { text-shadow: 0 0 0 transparent; }
}

.login__brand h1 span::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.04em;
  height: 0.42em;
  background: linear-gradient(90deg, rgba(242, 201, 107, 0.28), transparent);
  z-index: -1;
}


.lede {
  margin: 0 0 30px;
  max-width: 46ch;
  color: var(--ink-dim);
  font-size: 14.5px;
  line-height: 1.85;
}


.pipeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }

.pipeline li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
}

.pipeline li::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: -9px;
  width: 1px;
  background: linear-gradient(var(--line-strong), transparent);
}

.pipeline li:last-child::after { display: none; }


.pipeline i {
  flex: none;
  width: 27px; height: 27px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  display: grid;
  place-items: center;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.pipeline i::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--ink-faint);
  transform: rotate(45deg);
  transition: background 0.3s;
}

.pipeline b { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }

.pipeline span { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.04em; }


.pipeline li.is-done i { border-color: var(--gold); background: rgba(242, 201, 107, 0.12); }

.pipeline li.is-done i::before { background: var(--gold); }

.pipeline li.is-fail i { border-color: var(--danger); }

.pipeline li.is-fail i::before { background: var(--danger); }

.pipeline li.is-busy i { border-color: var(--cyan); animation: pulse 1.1s infinite; }

.pipeline li.is-busy i::before { background: var(--cyan); }


@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(121, 220, 255, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(121, 220, 255, 0); }
}


/* 登录面板 */
.login__panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 26px clamp(20px, 2.4vw, 30px) 22px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
}

.login__panel::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto auto;
  width: 46px; height: 46px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  pointer-events: none;
}


.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }

.tab {
  position: relative;
  padding: 10px 6px 12px;
  margin-right: 18px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.18s;
}

.tab:hover { color: var(--ink-dim); }

.tab.is-active { color: var(--ink); }

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(242, 201, 107, 0.6);
}


.pane { display: none; }

.pane.is-active { display: block; animation: rise 0.28s ease; }


/* 验证码 / 密码 切换 */
.auth-switch {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 18px;
  padding: 2px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}

.auth-switch__btn {
  padding: 7px 16px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.16s, background 0.16s;
}

.auth-switch__btn:hover { color: var(--ink-dim); }

.auth-switch__btn.is-active { color: #17120a; background: var(--gold); font-weight: 700; }


@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}


.hint { margin: 0 0 18px; color: var(--ink-dim); font-size: 12.8px; line-height: 1.8; }


.field { display: block; margin-bottom: 15px; }

.field > span {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field__row { display: flex; gap: 8px; }

.field__row input { flex: 1; }


input[type="tel"],
input[type="text"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

textarea { resize: vertical; font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }

input::placeholder, textarea::placeholder { color: #464d58; }

input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  background: rgba(242, 201, 107, 0.05);
  box-shadow: 0 0 0 3px rgba(242, 201, 107, 0.1);
}


.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #14100a;
  background: linear-gradient(100deg, #ffe3a1, var(--gold) 40%, #d9a844);
  border: 0;
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  cursor: pointer;
  transition: filter 0.18s, transform 0.18s;
}

.primary-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.primary-btn:active { transform: none; }

.primary-btn:disabled { filter: grayscale(0.7) brightness(0.7); cursor: not-allowed; transform: none; }

.primary-btn--alt {
  color: var(--ink);
  background: linear-gradient(100deg, #2a2113, #3a2d18 50%, #241c10);
  border: 1px solid rgba(242, 201, 107, 0.5);
}

.primary-btn--alt:hover { background: linear-gradient(100deg, #352a17, #4a3a1f 50%, #2c2213); }


.mini-btn {
  flex: none;
  padding: 0 12px;
  height: 40px;
  font-size: 12px;
  color: var(--gold);
  background: rgba(242, 201, 107, 0.08);
  border: 1px solid rgba(242, 201, 107, 0.32);
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
}

.mini-btn:hover:not(:disabled) { background: rgba(242, 201, 107, 0.16); border-color: var(--gold); }

.mini-btn:disabled { color: var(--ink-faint); border-color: var(--line); background: transparent; cursor: not-allowed; }

.mini-btn--ghost {
  min-width: 54px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
}

.mini-btn--ghost:hover:not(:disabled) { color: var(--gold); background: rgba(242, 201, 107, 0.1); }


.fineprint { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-faint); }


/* 导入档案 */
.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.file-drop:hover { border-color: var(--gold); background: rgba(242, 201, 107, 0.06); }

.file-drop.is-drag { border-color: var(--gold); background: rgba(242, 201, 107, 0.14); }

.file-drop__icon { font-size: 22px; line-height: 1; color: var(--gold); }

.file-drop__text { font-size: 12.5px; color: var(--ink-dim); }


.demo-list { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 8px; }

.demo-list li {
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.028);
  border-left: 2px solid rgba(242, 201, 107, 0.4);
}

.demo-list b { color: var(--gold); font-family: var(--mono); }


.alert {
  margin-top: 16px;
  padding: 11px 13px;
  font-size: 12.5px;
  color: #ffc9c9;
  background: rgba(255, 115, 115, 0.09);
  border: 1px solid rgba(255, 115, 115, 0.28);
  border-left: 2px solid var(--danger);
  border-radius: 2px;
}

.alert b { display: block; margin-bottom: 3px; font-size: 11px; letter-spacing: 0.1em; color: var(--danger); }


.link-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 0;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  background: none;
  border: 0;
  border-bottom: 1px dashed currentColor;
  cursor: pointer;
  transition: color 0.18s;
}

.link-btn:hover { color: var(--gold); }

.link-btn--sm { margin: 0; font-size: 11px; }


/* ── 档案页 ───────────────────────────────────────────────────────── */
.view--board { padding-top: 26px; }


/* ── 顶部身份区 ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 33%);
  min-height: 258px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 2px;
  background:
    linear-gradient(100deg, rgba(242, 201, 107, 0.075), transparent 48%),
    var(--panel);
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 120px;
  height: 26px;
  background: repeating-linear-gradient(135deg, rgba(242, 201, 107, 0.18) 0 6px, transparent 6px 12px);
  opacity: 0.45;
  pointer-events: none;
}


.hero__art {
  position: relative;
  grid-column: 2;
  grid-row: 1;
}

.hero__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  padding: 16px 20px 0;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.62));
}

.hero__art-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--panel) 0%, rgba(17, 21, 27, 0.72) 24%, transparent 60%);
}


.hero__body {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 26px clamp(20px, 3vw, 34px) 20px;
}

.hero__body h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.hero__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}


.hero__progress { max-width: 420px; margin-top: 2px; }

.hero__progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.hero__progress-head b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

.bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  box-shadow: 0 0 14px rgba(242, 201, 107, 0.55);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.3, 1);
}


.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.hero__actions .source-tag { margin-right: auto; text-align: left; }


.source-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.5;
}

.source-tag b { color: var(--gold); font-weight: 600; }


/* ── 指标条 ───────────────────────────────────────────────────────── */
.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-top: 0;
}

.stat { background: var(--panel); padding: 12px 16px 13px; }

.stat b {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.stat__sfx {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  margin-left: 2px;
  color: var(--ink-faint);
}

.stat span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.stat--gold b { color: var(--gold); }

.stat--dim b { color: var(--ink-dim); }


/* ── 分区标题 ─────────────────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 13px;
}

.section-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.section-head__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.section-head__hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}


/* 筛选 */
.filters {
  position: sticky;
  top: var(--topbar);
  z-index: 30;
  margin: 18px calc(clamp(16px, 3vw, 40px) * -1) 20px;
  padding: 14px clamp(16px, 3vw, 40px);
  background: rgba(8, 9, 12, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.filters__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.filters__row--sub { gap: 14px; }


.search {
  position: relative;
  flex: 0 1 240px;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 11px;
  width: 15px; height: 15px;
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 1.7;
  pointer-events: none;
}

.search input { padding-left: 34px; height: 38px; }


.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}

.chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.chip .glyph {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: block;
  opacity: 0.8;
}

.chip.is-active .glyph { opacity: 1; }

.chip:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }

.chip.is-active {
  color: var(--gold);
  border-color: rgba(242, 201, 107, 0.55);
  background: rgba(242, 201, 107, 0.12);
}

.chip[disabled] { opacity: 0.35; cursor: default; }

.chip small { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }


.chips--rarity .chip[data-rarity="6"] { color: #ff8a4c; }

.chips--rarity .chip[data-rarity="5"] { color: #f2c96b; }

.chips--rarity .chip[data-rarity="4"] { color: #b483f0; }

.chips--rarity .chip[data-rarity="3"] { color: #5aa8e8; }

.chips--rarity .chip[data-rarity="2"] { color: #7bc98a; }

.chips--rarity .chip[data-rarity="1"] { color: #9aa3af; }

.chips--rarity .chip.is-active { background: rgba(255, 255, 255, 0.08); border-color: currentColor; }


.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.seg__btn {
  padding: 7px 14px;
  font-size: 12px;
  color: var(--ink-dim);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
  transition: color 0.16s, background 0.16s;
}

.seg__btn:last-child { border-right: 0; }

.seg__btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }

.seg__btn.is-active { color: #17120a; background: var(--gold); font-weight: 700; }

.seg__btn:disabled { color: var(--ink-faint); opacity: 0.4; cursor: not-allowed; }

.seg__btn:disabled:hover { background: transparent; color: var(--ink-faint); }

.seg--lg .seg__btn { padding: 8px 18px; font-size: 12.5px; letter-spacing: 0.06em; }


.select { display: inline-flex; align-items: center; gap: 8px; }

.select span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.select select { width: auto; height: 34px; padding: 0 30px 0 10px; font-size: 12px; }


.count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.count b { color: var(--ink); }


/* ── 干员卡片 ─────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  gap: 14px;
}


.op {
  --rc: 154, 163, 175;
  --cc: 138, 148, 166;
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  text-align: left;
  background:
    linear-gradient(155deg, rgba(var(--rc), 0.2), rgba(var(--rc), 0.03) 44%, transparent 72%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 58%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
}

.op::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(var(--cc), 0.2), transparent 62%),
    repeating-linear-gradient(115deg, transparent 0 26px, rgba(255, 255, 255, 0.018) 26px 27px);
  z-index: -1;
}

.op::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--rc), 0.85), transparent);
}

.op:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--rc), 0.7);
  box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(var(--rc), 0.18);
}

.op:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }


/* 立绘 */
.op__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.op__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 全身立绘（方图）只会裁左右；退化成半身像时靠 top 保住脑袋 */
  object-position: center top;
  opacity: 0.97;
  transform-origin: 50% 12%;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.3s;
}

.op__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 9, 12, 0.42) 0%,
    rgba(8, 9, 12, 0.04) 20%,
    transparent 46%,
    rgba(8, 9, 12, 0.66) 80%,
    rgba(8, 9, 12, 0.94) 100%
  );
}

.op:hover .op__art img { transform: scale(1.055); }


/* 干员编号（右下角） */
.op__no {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.52);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}


/* 未拥有：整体去色 + 锁 */
.op--locked { filter: grayscale(1) brightness(0.72); }

.op--locked .op__art img { opacity: 0.45; }

.op--locked .op__name { color: rgba(255, 255, 255, 0.72); }

.op--locked:hover {
  filter: grayscale(0.45) brightness(0.92);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.9);
}

.op__lock {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 9, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  z-index: 2;
}

.op__lock svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1.6;
}


.op[data-rarity="6"] { --rc: 255, 122, 40; }

.op[data-rarity="5"] { --rc: 242, 201, 107; }

.op[data-rarity="4"] { --rc: 168, 120, 226; }

.op[data-rarity="3"] { --rc: 74, 150, 214; }

.op[data-rarity="2"] { --rc: 106, 186, 122; }

.op[data-rarity="1"] { --rc: 140, 148, 158; }

.op[data-rarity="0"] { --rc: 116, 124, 134; }

.op[data-rarity="0"] .op__elite { filter: grayscale(1); }


.op[data-profession="PIONEER"] { --cc: 214, 160, 66; }

.op[data-profession="WARRIOR"] { --cc: 201, 80, 63; }

.op[data-profession="TANK"] { --cc: 74, 127, 212; }

.op[data-profession="SNIPER"] { --cc: 79, 174, 134; }

.op[data-profession="CASTER"] { --cc: 154, 111, 224; }

.op[data-profession="MEDIC"] { --cc: 79, 196, 196; }

.op[data-profession="SUPPORT"] { --cc: 212, 127, 184; }

.op[data-profession="SPECIAL"] { --cc: 138, 148, 166; }


.op__top {
  position: absolute;
  inset: 9px 9px auto 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.op__glyph {
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--cc), 0.45);
  background: rgba(0, 0, 0, 0.4);
  color: rgb(var(--cc));
}

.op__glyph svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.op__glyph .glyph {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.22));
}


.op__elite {
  --el: 110, 116, 126;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgb(var(--el));
  border: 1px solid rgba(var(--el), 0.5);
  background: rgba(var(--el), 0.1);
}

.op[data-elite="1"] .op__elite { --el: 90, 168, 255; }

.op[data-elite="2"] .op__elite { --el: 242, 201, 107; background: rgba(242, 201, 107, 0.16); }

.op[data-elite="2"] { border-color: rgba(242, 201, 107, 0.28); }


.op__mark {
  position: absolute;
  inset: 34% 0 auto 0;
  text-align: center;
  font-size: clamp(46px, 4.4vw, 62px);
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.11);
  letter-spacing: 0.04em;
  text-shadow: 0 0 32px rgba(var(--rc), 0.4);
  user-select: none;
}

.op__num {
  position: absolute;
  right: 7px;
  bottom: 60px;
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 800;
  line-height: 0.8;
  color: rgba(var(--rc), 0.17);
  user-select: none;
}


.op__foot {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 10px 9px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72) 46%);
}

.op__stars {
  display: block;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgb(var(--rc));
  line-height: 1;
  margin-bottom: 5px;
  opacity: 0.95;
}

.op__name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.op__en {
  display: block;
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.op__sub {
  display: flex;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.62);
  align-items: center;
  gap: 6px;
}

.op__sub i { font-style: normal; color: rgba(255, 255, 255, 0.26); }


.op__tags {
  position: absolute;
  top: 36px;
  left: 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.op__tag {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  padding: 1px 4px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.45);
  border-left: 1px solid rgba(var(--rc), 0.6);
}

.op__tag--mod { color: var(--cyan); border-left-color: var(--cyan); }


.op.is-unowned { opacity: 0.55; }


.empty {
  margin: 60px 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}


.footnote {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.9;
}

.footnote p { margin: 0; }


/* ── 抽屉 ─────────────────────────────────────────────────────────── */
.drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.26s;
}

.drawer__panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(430px, 92vw);
  padding: 30px clamp(20px, 3vw, 30px) 40px;
  background: linear-gradient(180deg, #131820, var(--bg-2));
  border-left: 1px solid var(--line-strong);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.25, 1);
  overflow-y: auto;
}

.drawer.is-open { pointer-events: auto; }

.drawer.is-open .drawer__scrim { opacity: 1; }

.drawer.is-open .drawer__panel { transform: none; }


.drawer__close, .modal__close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  width: 32px; height: 32px;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-dim);
  background: rgba(12, 15, 19, 0.7);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.drawer__close:hover, .modal__close:hover { color: var(--ink); border-color: var(--gold); }


.detail__hero {
  position: relative;
  margin: -30px calc(clamp(20px, 3vw, 30px) * -1) 20px;
  height: clamp(250px, 38vh, 340px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(64% 56% at 50% 52%, rgba(242, 201, 107, 0.16), transparent 72%),
    linear-gradient(180deg, #161c24, #0c0f13);
}

.detail__hero-art {
  position: absolute;
  inset: 0 0 46px 0;
  display: grid;
  place-items: center;
  padding: 8px 14px 0;
}

.detail__hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  /* 全身立绘整个塞进来，不裁任何一条边 */
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.62));
}

.detail__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 52%,
    rgba(12, 15, 19, 0.62) 80%,
    rgba(12, 15, 19, 0.97) 100%
  );
}

.detail__hero-text {
  position: absolute;
  left: clamp(20px, 3vw, 30px);
  right: clamp(20px, 3vw, 30px);
  bottom: 16px;
  z-index: 2;
}

.detail__hero-text h3 { margin: 0; font-size: 24px; letter-spacing: 0.05em; }

.detail__hero-text p {
  margin: 5px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}


.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 0 24px; background: var(--line); border: 1px solid var(--line); }

.kv > div { padding: 11px 13px; background: var(--bg-2); }

.kv dt { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }

.kv dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; }

.kv dd small { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); font-weight: 400; }


.sect { margin-bottom: 24px; }

.sect > h4 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sect > h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.sect__meta {
  font-style: normal;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-right: 10px;
}


/* 皮肤条 */
/* 升变栏：阿米娅的术师 / 近卫 / 医疗 */
.rise {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.rise__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 4px 5px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.rise__item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.rise__item.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}

.rise__item.is-locked { opacity: 0.42; }

.rise__prof {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.rise__meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  opacity: 0.75;
}


.skin-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: thin;
}

.skin {
  position: relative;
  flex: none;
  width: 64px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.skin__thumb {
  display: block;
  width: 64px;
  height: 82px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.skin__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.skin__name {
  font-size: 10px;
  color: var(--ink-faint);
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skin:hover .skin__thumb { border-color: var(--line-strong); }

.skin.is-active .skin__thumb {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 16px rgba(242, 201, 107, 0.28);
}

.skin.is-active .skin__name { color: var(--gold); }

.skin--locked { cursor: not-allowed; }

.skin--locked .skin__thumb img { filter: grayscale(1) brightness(0.5); }

.skin__lock {
  position: absolute;
  left: 50%;
  top: 41px;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 9, 12, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.skin__lock svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2;
}

.detail__skin { color: var(--gold); }


.rows { display: grid; gap: 6px; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.028);
  border-left: 2px solid var(--line-strong);
  font-size: 12.5px;
}

.row b { font-family: var(--mono); font-weight: 600; color: var(--ink); }

.row span { color: var(--ink-faint); font-family: var(--mono); font-size: 11px; }

.row__label { display: flex; align-items: center; gap: 8px; color: var(--ink-dim); }

/* 模组的真名：比 id 友好，字号略大一点，别被 .row span 的 mono 小字压掉 */
.row__label .row__mod {
  font-family: var(--display-zh, var(--sans));
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.row--spec { border-left-color: var(--gold); }

.row--locked { opacity: 0.45; }


.spec-dots { display: inline-flex; gap: 2px; }

.spec-dots i { width: 5px; height: 5px; background: var(--line-strong); }

.spec-dots i.on { background: var(--gold); }


.muted-note { font-size: 11.5px; color: var(--ink-faint); line-height: 1.8; }


/* ── 弹窗 ─────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none; }

.modal__scrim {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.24s;
}

.modal__panel {
  position: relative;
  width: min(680px, 92vw);
  max-height: 84vh;
  overflow-y: auto;
  padding: 28px clamp(20px, 3vw, 34px) 30px;
  background: linear-gradient(180deg, #131820, var(--bg-2));
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--gold);
  transform: translateY(14px) scale(0.99);
  opacity: 0;
  transition: opacity 0.24s, transform 0.24s;
}

.modal.is-open { pointer-events: auto; }

.modal.is-open .modal__scrim { opacity: 1; }

.modal.is-open .modal__panel { opacity: 1; transform: none; }


.modal__panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.modal__sub {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}


.step-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }

.step-list li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-2);
}

.step-list .idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}

.step-list b { font-size: 13px; font-weight: 600; }

.step-list small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.03em; }

.step-list .state { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; }

.step-list .state.ok { color: var(--ok); }

.step-list .state.fail { color: var(--danger); }

.step-list .state.wait { color: var(--ink-faint); }


.code-block {
  margin: 0 0 22px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.85;
  color: #c9d4e0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(121, 220, 255, 0.5);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

.code-block em { color: var(--gold); font-style: normal; }

.code-block i { color: var(--ink-faint); font-style: normal; }


/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 90;
  padding: 11px 20px;
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(20, 24, 30, 0.96);
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--gold);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s, transform 0.24s;
  max-width: min(560px, 90vw);
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.toast.is-error { border-left-color: var(--danger); }


/* ── 响应式 ───────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .login { grid-template-columns: 1fr; gap: 34px; }
  .login__brand h1 { font-size: clamp(30px, 6vw, 44px); }
  .hero { grid-template-columns: minmax(0, 1fr) 210px; min-height: 224px; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


@media (max-width: 720px) {
  :root { --topbar: 58px; }
  .brand__text em { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__art { display: none; }
  .hero__body { padding: 20px 18px 18px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 10px 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .filters { gap: 10px; }
  .search { flex: 1 1 100%; }
  .count { margin-left: 0; }
  .pipeline span { display: none; }
}


@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ── 心魂侧写 · 武将卡 ─────────────────────────────────────────── */
.view--generals {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.gen-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gen-head__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}

.gen-head__eyebrow {
  flex-basis: 100%;
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: rgba(242, 201, 107, 0.62);
}

.gen-head h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}

.gen-head h2 span {
  margin-left: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: rgba(255, 255, 255, 0.42);
}

.gen-head__note {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

/* 搜索 + 排序 */
.gen-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.gen-search,
.gen-sort {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.gen-search:focus-within,
.gen-sort:focus-within {
  border-color: rgba(242, 201, 107, 0.55);
  box-shadow: 0 0 0 1px rgba(242, 201, 107, 0.22);
}

.gen-search svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  opacity: 0.55;
}

.gen-search input {
  width: 190px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  outline: none;
}

.gen-search input::placeholder { color: rgba(255, 255, 255, 0.34); }

.gen-search input::-webkit-search-cancel-button { filter: grayscale(1); opacity: 0.6; }

.gen-sort {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.45);
}

.gen-sort select {
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  outline: none;
  cursor: pointer;
}

.gen-sort option { background: #0b0e14; color: #fff; }

.gen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.gcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gcard__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 45%, rgba(0, 0, 0, 0.28)),
    #10131a;
}

.gcard__frame::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.gcard[data-rarity='6'] .gcard__frame { border-color: rgba(255, 140, 46, 0.55); }

.gcard[data-rarity='5'] .gcard__frame { border-color: rgba(242, 201, 107, 0.5); }

.gcard[data-rarity='4'] .gcard__frame { border-color: rgba(168, 120, 226, 0.5); }

.gcard__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.gcard__blank {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 8px, transparent 8px 16px);
}

.gcard__veil {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82) 68%);
}

.gcard__name {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

.gcard__title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 201, 107, 0.9);
}

.gcard__faction {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.45);
}

.gcard__tags { display: flex; flex-wrap: wrap; gap: 5px; }

.gcard__tag {
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.gen-empty {
  padding: 60px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.gen-empty p { margin: 0 0 8px; }

.gen-empty__hint { font-size: 12.5px; }

.gen-empty code {
  font-family: var(--mono);
  color: rgba(242, 201, 107, 0.85);
}


.gcard__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.58);
}


/* ── 三层筛选面板 ─────────────────────────────────────────────── */
.gen-filters {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.frow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.frow:last-child { border-bottom: 0; }

.frow__label {
  flex: none;
  width: 44px;
  padding-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
}

.frow__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: color 0.14s, background 0.14s, border-color 0.14s;
}

.fchip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }

.fchip small {
  font-family: var(--mono);
  font-size: 9.5px;
  opacity: 0.55;
}

.fchip.is-active {
  color: #0b0c10;
  background: rgba(242, 201, 107, 0.9);
  border-color: rgb(242, 201, 107);
}

.fchip.is-active small { opacity: 0.7; }

.fchip--all { font-weight: 700; }

.fchip--idle { opacity: 0.6; }

/* 「更多」：展开/收起空分类 */
.fchip--more {
  border-style: dashed;
  color: rgba(255, 255, 255, 0.5);
}
.fchip--more:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }

/* 键盘焦点 */
.gcard:focus-visible,
.fchip:focus-visible,
.pack:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.fchip--monarch {
  border-color: rgba(242, 201, 107, 0.45);
  color: rgb(242, 201, 107);
}

.fchip--monarch.is-active { background: rgb(242, 201, 107); color: #0b0c10; }

.gcard--exp .gcard__frame { border-color: rgba(255, 92, 92, 0.55); }

.gcard__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgb(255, 150, 150);
  border: 1px solid rgba(255, 92, 92, 0.5);
  background: rgba(30, 0, 0, 0.6);
}


.gcard--enemy .gcard__frame { border-color: rgba(200, 70, 70, 0.6); }

.gcard__badge--enemy {
  color: rgb(255, 160, 160);
  border-color: rgba(200, 70, 70, 0.55);
  background: rgba(40, 0, 0, 0.7);
}


/* 君主：卡面版本标记（不是势力） */
.gcard--monarch .gcard__frame { border-color: rgba(242, 201, 107, 0.65); }

.gcard__badge--monarch {
  color: rgb(242, 201, 107);
  border-color: rgba(242, 201, 107, 0.55);
  background: rgba(36, 28, 0, 0.75);
}


/* ── 武将卡详情 ───────────────────────────────────────────────── */
.gcard__code {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
}

.gcard__hp {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 1px 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #0b0c10;
  background: rgba(242, 201, 107, 0.92);
}

.gcard__badge--lord {
  color: rgb(255, 214, 130);
  border-color: rgba(242, 201, 107, 0.6);
  background: rgba(40, 26, 0, 0.78);
}

.gcard--lord .gcard__frame { border-color: rgba(242, 201, 107, 0.75); }

.gcard { cursor: pointer; }


.gdetail { position: fixed; inset: 0; z-index: 60; }

.gdetail__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.gdetail__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 92vw);
  overflow-y: auto;
  padding: 26px 24px 40px;
  background: #0d0f14;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.gd__code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(242, 201, 107, 0.85);
}

.gd__name {
  margin: 6px 0 2px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}

.gd__title {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(242, 201, 107, 0.9);
}

.gd__meta {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.gd__forms {
  display: flex;
  gap: 6px;
  margin: 18px 0 14px;
  flex-wrap: wrap;
}

.gd__form {
  padding: 5px 13px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.gd__form.is-active {
  color: #0b0c10;
  background: rgba(242, 201, 107, 0.9);
  border-color: rgb(242, 201, 107);
}

.gd__sub {
  margin: -6px 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.gd__skill {
  padding: 10px 0 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gd__skill h5 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgb(242, 201, 107);
}

.gd__skill h5 em {
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 衍生技：技能名用白字区分（它不是一个类型，不加标签） */
.gd__skill h5.is-derived {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.28);
}

.gd__skill p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
}

.gd__quote {
  margin: 8px 0 0;
  font-size: 12px;
  font-style: italic;
  color: rgba(242, 201, 107, 0.7);
}

.gd__foot {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.4);
}

/* 版权标注：同人展示用，不分卡 */
.gd__copyright {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.28);
}


/* ═══ 武将卡：新边框 + 卡背 + 衬线字体 ═══════════════════════════ */
:root { --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif; }


.gcard__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: #0b0d12;
  border: 2px solid #b8912f;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.85),
    inset 0 0 0 1px rgba(242, 201, 107, 0.35),
    0 8px 22px rgba(0, 0, 0, 0.55);
}

/* 内描边 */
.gcard__frame::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(242, 201, 107, 0.42);
  pointer-events: none;
  z-index: 3;
}

/* 四角金饰 */
.gcard__frame::after {
  content: '';
  position: absolute;
  inset: 2px;
  pointer-events: none;
  z-index: 4;
  background:
    linear-gradient(#f2c96b, #f2c96b) left 0 top 0 / 16px 2px no-repeat,
    linear-gradient(#f2c96b, #f2c96b) left 0 top 0 / 2px 16px no-repeat,
    linear-gradient(#f2c96b, #f2c96b) right 0 top 0 / 16px 2px no-repeat,
    linear-gradient(#f2c96b, #f2c96b) right 0 top 0 / 2px 16px no-repeat,
    linear-gradient(#f2c96b, #f2c96b) left 0 bottom 0 / 16px 2px no-repeat,
    linear-gradient(#f2c96b, #f2c96b) left 0 bottom 0 / 2px 16px no-repeat,
    linear-gradient(#f2c96b, #f2c96b) right 0 bottom 0 / 16px 2px no-repeat,
    linear-gradient(#f2c96b, #f2c96b) right 0 bottom 0 / 2px 16px no-repeat;
}

/* 卡背压暗层 */
.gcard__backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 12, 0.55), rgba(6, 8, 12, 0.78) 62%, rgba(4, 5, 8, 0.94));
  z-index: 0;
}

.gcard__art { z-index: 1; }

.gcard__veil { z-index: 2; }


.gcard__name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f6f1e2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
}

.gcard__title {
  font-family: var(--serif);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: #e8c877;
}

.gcard__hp {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #1a1408;
  background: linear-gradient(180deg, #f6dc9a, #d9ae43);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.gcard__code {
  font-family: var(--serif);
  letter-spacing: 0.16em;
  color: rgba(232, 200, 119, 0.85);
}

.gcard__badge {
  font-family: var(--serif);
  letter-spacing: 0.14em;
  z-index: 5;
}


/* 修正：四角饰不继承旧内框；主公/君主的金色不被稀有度覆盖 */
.gcard__frame::after { border: 0; }

.gcard.gcard--lord .gcard__frame,
.gcard.gcard--monarch .gcard__frame { border-color: #f2c96b; }


/* ── 开关（设置面板里） ────────────────────────────────────────── */
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.setting__text { display: flex; flex-direction: column; gap: 3px; }

.setting__text b { font-size: 13.5px; font-weight: 700; color: #fff; letter-spacing: 0.04em; }

.setting__text span { font-size: 11.5px; color: rgba(255, 255, 255, 0.45); }

.switch {
  flex: none;
  width: 46px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  position: relative;
  transition: background 0.18s, border-color 0.18s;
}

.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.55);
  transition: transform 0.18s, background 0.18s;
}

.switch.is-on {
  background: rgba(242, 201, 107, 0.22);
  border-color: rgba(242, 201, 107, 0.7);
}

.switch.is-on i { transform: translateX(22px); background: rgb(242, 201, 107); }

.gdetail__panel { animation: gdIn 260ms ease-out both; }

@keyframes gdIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.gd__art {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 16px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(242, 201, 107, 0.25);
}
/* ═══ 武将卡：卡面构图 + 文字从右侧弹出 ═══════════════════════ */

/* 立绘不要原样居中，放大并上移，让人物填满卡面 */
.gcard__art {
  object-fit: cover;
  object-position: 50% 14%;
  transform: scale(1.26);
  transform-origin: 50% 22%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.gcard:hover .gcard__art { transform: scale(1.33); }

/* 详情：面板从左滑入 + 文案依次从右弹出 */
.gdetail__panel {
  animation: gdSlideIn 300ms cubic-bezier(0.22, 0.8, 0.28, 1) both;
}
@keyframes gdSlideIn {
  from { transform: translateX(56px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.gd__code,
.gd__name,
.gd__title,
.gd__quote,
.gd__meta,
.gd__forms,
.gd__sub,
.gd__skills,
.gd__foot {
  opacity: 0;
  animation: gdPopRight 360ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
}
@keyframes gdPopRight {
  from { opacity: 0; transform: translateX(34px); }
  to { opacity: 1; transform: none; }
}

.gd__code { animation-delay: 60ms; }
.gd__name { animation-delay: 110ms; }
.gd__title { animation-delay: 150ms; }
.gd__quote { animation-delay: 180ms; }
.gd__meta { animation-delay: 210ms; }
.gd__forms { animation-delay: 250ms; }
.gd__sub { animation-delay: 280ms; }
.gd__skills { animation-delay: 300ms; }
.gd__foot { animation-delay: 340ms; }

/* 技能逐条错开 */
.gd__skills .gd__skill {
  opacity: 0;
  animation: gdPopRight 340ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
}
.gd__skill:nth-child(1) { animation-delay: 330ms; }
.gd__skill:nth-child(2) { animation-delay: 400ms; }
.gd__skill:nth-child(3) { animation-delay: 470ms; }
.gd__skill:nth-child(4) { animation-delay: 540ms; }

/* 详情立绘：拉伸铺满，默认显示上半身 */
.gd__art {
  aspect-ratio: 4 / 3;
  background-size: 132%;
  background-position: 50% 16%;
  background-repeat: no-repeat;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(242, 201, 107, 0.25);
}

/* 详情顶部的武将卡预览 */
.gd__cardwrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  animation: gdPopRight 360ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
}
.gcard--preview {
  width: min(224px, 62%);
  cursor: default;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.6));
}
.gcard--preview .gcard__frame {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.85),
    inset 0 0 0 1px rgba(242, 201, 107, 0.35);
}
.gcard--preview .gcard__name { font-size: 20px; }
.gcard--preview:hover .gcard__art { transform: scale(1.26); }

/* 子形态选择条：跟在形态切换下面 */
.gd__subforms {
  margin-top: -6px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.gd__subforms .gd__form {
  border-color: rgba(242, 201, 107, 0.3);
}

/* ── 三国杀勾玉（实机素材） ──────────────────────────────────── */
.orbs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
}
.jade {
  width: 11px;
  height: 16px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}
.jade.is-full { filter: drop-shadow(0 0 3px rgba(242, 201, 107, 0.45)); }
.jade.is-empty { opacity: 0.92; }

/* 卡面体力条改成深底金边，空心勾玉才看得清 */
.gcard__hp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 6px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #f4e3b4;
  background: rgba(6, 8, 12, 0.78);
  border: 1px solid rgba(242, 201, 107, 0.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.gcard__hp .jade { width: 9px; height: 13px; }
.gcard__hp .orbs { margin-right: 0; gap: 2px; }

.gd__meta .orbs { margin-left: 8px; }
.gd__meta .jade { width: 14px; height: 20px; }

/* ═══ 卡面提亮 + 立绘放大 ═════════════════════════════════════ */
.gcard__backdrop {
  background: linear-gradient(180deg, rgba(6, 8, 12, 0.06), rgba(6, 8, 12, 0.22) 55%, rgba(4, 5, 8, 0.62));
}
.gcard__art {
  object-fit: cover;
  object-position: 50% 8%;
  transform: scale(1.52);
  transform-origin: 50% 14%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.gcard:hover .gcard__art { transform: scale(1.6); }
.gcard__veil {
  background: linear-gradient(transparent 42%, rgba(0, 0, 0, 0.55) 74%, rgba(0, 0, 0, 0.86));
}
.gd__art {
  background-size: 168%;
  background-position: 50% 10%;
}
.gcard--preview .gcard__frame { filter: brightness(1.06); }

/* ═══ 立绘位移：用 transform，别指望 object-position ═══════════ */
.gcard__art {
  object-fit: cover;
  object-position: 50% 50%;
  transform: translate(var(--art-x, 0%), var(--art-y, 0%)) scale(var(--art-scale, 1.52));
  transform-origin: 50% 28%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.gcard:hover .gcard__art {
  transform: translate(var(--art-x, 0%), var(--art-y, 0%)) scale(calc(var(--art-scale, 1.52) + 0.06));
}

/* ── 立绘调参面板（?tune=1） ─────────────────────────────────── */
.tune {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: -6px 0 16px;
  padding: 12px;
  border: 1px dashed rgba(242, 201, 107, 0.4);
  background: rgba(242, 201, 107, 0.05);
}
.tune label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.tune label b {
  min-width: 52px;
  font-family: var(--mono);
  color: rgb(242, 201, 107);
  font-weight: 400;
}
.tune input[type='range'] { flex: 1; accent-color: #f2c96b; }
.tune button {
  align-self: flex-start;
  padding: 5px 14px;
  font-size: 12px;
  color: #f2c96b;
  background: rgba(242, 201, 107, 0.12);
  border: 1px solid rgba(242, 201, 107, 0.5);
  cursor: pointer;
}
.tune button:hover { background: rgba(242, 201, 107, 0.24); }

/* 调参面板 v2：加大命中区、置顶层级 */
.tune {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px 14px 12px;
  border: 1px dashed rgba(242, 201, 107, 0.45);
  background: rgba(242, 201, 107, 0.06);
}
.tune__row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}
.tune__row > span { flex: none; width: 32px; }
.tune__row > b {
  flex: none;
  width: 52px;
  text-align: right;
  font-family: var(--mono);
  font-weight: 400;
  color: rgb(242, 201, 107);
}
.tune input[type='range'] {
  flex: 1;
  height: 26px;
  margin: 0;
  accent-color: #f2c96b;
  cursor: pointer;
  touch-action: none;
  -webkit-appearance: auto;
  appearance: auto;
}
.tune button {
  align-self: flex-start;
  padding: 6px 16px;
  font-size: 12px;
  color: #f2c96b;
  background: rgba(242, 201, 107, 0.14);
  border: 1px solid rgba(242, 201, 107, 0.55);
  cursor: pointer;
}
.tune button:hover { background: rgba(242, 201, 107, 0.26); }

.tune__hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 10px;
}

/* 立绘整体往下挪 5%（不改已保存的调参值） */
.gcard__art {
  transform: translate(var(--art-x, 0%), var(--art-y, 0%)) scale(var(--art-scale, 1.52));
}
.gcard:hover .gcard__art {
  transform: translate(var(--art-x, 0%), var(--art-y, 0%)) scale(calc(var(--art-scale, 1.52) + 0.06));
}

/* ═══ 卡面文字压在最上层，暗层下移不挡字 ═══════════════════════ */
.gcard__veil {
  z-index: 2;
  height: 42%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6) 58%, rgba(0, 0, 0, 0.9));
}
.gcard__title,
.gcard__name,
.gcard__hp,
.gcard__code,
.gcard__badge {
  z-index: 7;
}
.gcard__name {
  bottom: 10px;
  padding-bottom: 2px;
}
.gcard__title { bottom: 36px; }

/* 技能描述里的加粗：等级 / 特殊效果 */
.gd__skill p strong {
  font-weight: 800;
  color: #f2c96b;
  letter-spacing: 0.02em;
}
.gd__skill p strong + * { color: inherit; }

/* 加粗改成白色；卡面编号放左上 */
.gd__skill p strong {
  font-weight: 800;
  color: #ffffff;
}
.gcard__code {
  top: 12px;
  right: 12px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* 姓名下方的编号 */
.gcard__no {
  position: absolute;
  left: 12px;
  bottom: 9px;
  z-index: 7;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(242, 201, 107, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
/* 名字上抬，给编号让位 */
.gcard__name { bottom: 24px; }
.gcard__hp { bottom: 9px; }

/* 恢复卡面文字排版（去掉编号后不再挤压称号） */
.gcard__name { bottom: 12px; }
.gcard__hp { bottom: 10px; }
.gcard__title { bottom: 35px; }

/* 详情里的编号行 */
.gd__code {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgba(242, 201, 107, 0.92);
}
.gd__code .gd__no {
  padding: 2px 8px;
  border: 1px solid rgba(242, 201, 107, 0.45);
  background: rgba(242, 201, 107, 0.1);
  letter-spacing: 0.18em;
}

/* ── 编辑模式（?edit=1） ──────────────────────────────────────── */
.edit {
  margin: 4px 0 16px;
  padding: 14px;
  border: 1px dashed rgba(120, 200, 255, 0.4);
  background: rgba(120, 200, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edit__title { margin: 0 0 2px; font-size: 12px; color: rgba(150, 210, 255, 0.9); }
.edit__row { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: rgba(255,255,255,.5); }
.edit__row2 { display: flex; gap: 6px; }
.edit__row2 input { flex: 1; }
.edit input,
.edit textarea {
  width: 100%;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  color: #e8eaf0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  resize: vertical;
}
.edit input:focus,
.edit textarea:focus { outline: none; border-color: rgba(120, 200, 255, 0.7); }
.edit__skill {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.edit button {
  align-self: flex-start;
  padding: 6px 16px;
  font-size: 12px;
  color: #9fd4ff;
  background: rgba(120, 200, 255, 0.14);
  border: 1px solid rgba(120, 200, 255, 0.5);
  cursor: pointer;
}
.edit button:hover { background: rgba(120, 200, 255, 0.26); }
.edit__hint { font-size: 11.5px; color: rgba(150, 210, 255, 0.75); }

.tune--face {
  border-color: rgba(120, 200, 255, 0.45);
  background: rgba(120, 200, 255, 0.06);
}
.tune__label {
  margin: 0 0 2px;
  font-size: 12px;
  color: rgba(150, 210, 255, 0.95);
  letter-spacing: 0.04em;
}
.tune--face button {
  color: #9fd4ff;
  background: rgba(120, 200, 255, 0.14);
  border-color: rgba(120, 200, 255, 0.5);
}

/* ═══ 点进去：立绘从右侧划出 ═══════════════════════════════════ */
.gd__cardwrap {
  animation: gdCardIn 460ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
  transform-origin: 100% 50%;
}
@keyframes gdCardIn {
  0% { opacity: 0; transform: translateX(140px) scale(0.9); filter: blur(6px); }
  55% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
/* 划出来时带一道金线 */
.gd__cardwrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2px;
  background: linear-gradient(transparent, #f2c96b, transparent);
  opacity: 0;
  animation: gdCardEdge 700ms ease-out 60ms both;
}
.gd__cardwrap { position: relative; }
@keyframes gdCardEdge {
  0% { opacity: 0; transform: translateX(140px); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(0); }
}

/* ═══ 详情大图：无背景立绘，从左侧滑出 ══════════════════════════ */
.gd__figure {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 42vh;
  min-height: 240px;
  margin: -6px 0 10px;
  overflow: hidden;
}
.gd__figure-img {
  max-width: 128%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.7));
  animation: gdArtIn 520ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
}
@keyframes gdArtIn {
  0%   { opacity: 0; transform: translateX(-150px) scale(0.94); filter: blur(8px) drop-shadow(0 12px 40px rgba(0,0,0,.7)); }
  60%  { opacity: 1; filter: blur(0) drop-shadow(0 12px 40px rgba(0,0,0,.7)); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
/* 左侧一道金线，跟着划出 */
.gd__figure::before {
  content: '';
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 0;
  width: 2px;
  background: linear-gradient(transparent, #f2c96b, transparent);
  animation: gdArtEdge 620ms ease-out both;
}
@keyframes gdArtEdge {
  0%   { opacity: 0; transform: translateX(-150px); }
  35%  { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(60px); }
}

/* ═══ 右侧舞台：高清立绘从右侧滑出 ═════════════════════════════ */
.gstage {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(56vw, 760px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 55;
  overflow: hidden;
}
.gstage[hidden] { display: none !important; }
.gstage__img {
  max-height: 92vh;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.8));
  animation: gstageIn 620ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
}
@keyframes gstageIn {
  0%   { opacity: 0; transform: translateX(160px) scale(0.94); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
/* 面板留在左侧，避免和立绘打架 */
.gdetail__panel {
  left: 0;
  right: auto;
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  animation: gdSlideInLeft 300ms cubic-bezier(0.22, 0.8, 0.28, 1) both;
}
@keyframes gdSlideInLeft {
  from { transform: translateX(-56px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.gdetail__mask {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

/* ═══ 布局修正：面板回右侧、卡面无入场动画、立绘在左侧且更大 ═══ */
.gdetail__panel {
  left: auto;
  right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 0;
  animation: gdSlideIn 300ms cubic-bezier(0.22, 0.8, 0.28, 1) both;
}
/* 卡面不做入场动画 */
.gd__cardwrap { animation: none; }
.gd__cardwrap::after { animation: none; opacity: 0; }

/* 立绘舞台挪到左侧，放大 */
.gstage {
  left: 0;
  right: auto;
  width: min(62vw, 900px);
  align-items: flex-end;
  justify-content: flex-start;
  padding-left: 2vw;
}
.gstage__img {
  max-height: 118vh;
  max-width: 100%;
  object-fit: contain;
  transform-origin: left bottom;
  filter: drop-shadow(0 24px 70px rgba(0, 0, 0, 0.85));
  animation: gstageInLeft 680ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
}
@keyframes gstageInLeft {
  0%   { opacity: 0; transform: translateX(-180px) scale(0.96); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* 舞台在遮罩之上，避免被 backdrop-filter 虚化 */
.gstage {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(64vw, 940px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 1.5vw;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.gstage__img {
  max-height: 132vh;
  max-width: 100%;
  object-fit: contain;
  transform: translateY(-4vh);
  filter: drop-shadow(0 24px 70px rgba(0, 0, 0, 0.85));
  animation: gstageInLeft 680ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
}
.gdetail__mask { backdrop-filter: none; background: rgba(0, 0, 0, 0.62); }
.gdetail__panel { z-index: 3; }

/* ═══ 长按立绘保存 ═════════════════════════════════════════════ */
.gstage__img {
  pointer-events: auto;
  cursor: zoom-in;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.gstage__img.is-pressing {
  transform: translateY(-4vh) scale(1.015);
  filter: drop-shadow(0 24px 70px rgba(0, 0, 0, 0.85)) brightness(1.1);
}
.gstage__img.is-saved {
  filter: drop-shadow(0 0 40px rgba(242, 201, 107, 0.85)) brightness(1.18);
}
/* 提示 */
.gsave-hint {
  position: absolute;
  left: 2vw;
  bottom: 4vh;
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.gstage:hover .gsave-hint { opacity: 1; }
/* 保存提示条 */
.gsave-toast {
  position: fixed;
  left: 50%;
  bottom: 8vh;
  transform: translate(-50%, 12px);
  padding: 9px 20px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #0b0c10;
  background: linear-gradient(180deg, #f6dc9a, #d9ae43);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 90;
}
.gsave-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ═══ 面板左上角返回按钮 ═══════════════════════════════════════ */
.gd__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px 14px 6px 10px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.gd__back:hover {
  color: #fff;
  background: rgba(242, 201, 107, 0.14);
  border-color: rgba(242, 201, 107, 0.6);
}

/* 返回按钮：确保可点 */
.gd__back {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* ═══ 卡面下的皮肤小方块 ═══════════════════════════════════════ */
.gd__skins {
  display: flex;
  gap: 7px;
  margin: 0 0 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.gdskin {
  position: relative;
  flex: none;
  width: 56px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.16s, transform 0.16s;
}
.gdskin img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 12%;
}
.gdskin__name {
  display: block;
  padding: 1px 2px 2px;
  font-size: 9px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gdskin:hover {
  border-color: rgba(242, 201, 107, 0.6);
  transform: translateY(-1px);
}
.gdskin.is-active {
  border-color: rgb(242, 201, 107);
  box-shadow: 0 0 0 1px rgba(242, 201, 107, 0.5), 0 4px 14px rgba(0, 0, 0, 0.5);
}
.gdskin.is-active .gdskin__name { color: rgb(242, 201, 107); }

/* 未解锁皮肤 */
.gdskin.is-locked { opacity: 0.45; cursor: not-allowed; }
.gdskin.is-locked img { filter: grayscale(0.7); }
.gdskin__lock {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 13px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 舞台立绘：完整显示，不裁切 */
.gstage__img {
  width: auto;
  height: auto;
  max-height: 118vh;
  max-width: 96%;
  object-fit: contain;
  transform: none;
}

/* 舞台图入场：用 class 控制，切图不再依赖 animation 重置 */
.gstage__img.is-in { animation: gstageInLeft 620ms cubic-bezier(0.16, 0.84, 0.3, 1) both; }
.gstage__img { animation: none; }

.tune__buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tune__buttons button { align-self: center; }

.tune__debug {
  margin: 0 0 10px;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(150, 210, 255, 0.95);
  background: rgba(120, 200, 255, 0.08);
  border: 1px dashed rgba(120, 200, 255, 0.4);
  word-break: break-all;
}

/* 左侧大图：应用与卡面同一份调参（原来是静止不动的那张） */
.gstage__img {
  transform: translate(var(--stage-x, 0%), var(--stage-y, 0%)) scale(var(--stage-scale, 1));
  transform-origin: 50% 30%;
  transition: transform 0.12s linear;
}

/* 待应用皮肤 + 应用按钮 */
.gdskin.is-pending {
  border-color: rgba(120, 200, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(120, 200, 255, 0.55);
}
.gdskin.is-pending .gdskin__name { color: rgba(150, 210, 255, 0.95); }
.gdskin-apply {
  flex: none;
  align-self: center;
  margin-left: 4px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.2;
  color: #0b0c10;
  background: linear-gradient(180deg, #f6dc9a, #d9ae43);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.gdskin-apply:hover { filter: brightness(1.08); }

/* ═══ 皮肤条：衣架 + 穿戴 / 当前穿着 ═══════════════════════════ */
.gd__skins {
  flex-wrap: wrap;
  align-items: center;
}
.gdskin-apply,
.gdskin-worn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 6px 0 0 10px;      /* 往下、往右 */
  padding: 6px 12px 6px 9px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
/* 穿戴：黑白 */
.gdskin-apply {
  color: #e8e8e8;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.gdskin-apply:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.7);
}
/* 当前穿着：蓝白 */
.gdskin-worn {
  color: #cfe6ff;
  background: rgba(90, 150, 220, 0.16);
  border-color: rgba(140, 195, 255, 0.55);
}
.hanger {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex: none;
}
/* 星级：阿米娅 5 实 + 1 空；其他干员几星就几颗实星 */
.gd__stars {
  letter-spacing: 0.08em;
  color: #f2c96b;
}

/* ═══ 皮肤区：方块一行 + 状态按钮独占一行，皮肤再多也挤不到 ══ */
.gd__skinblock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
}
.gd__skins {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.gd__skinact { display: flex; }
.gdskin-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid;
}
/* 穿戴：黑白 */
.gdskin-act.is-wear {
  color: #e8e8e8;
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.gdskin-act.is-wear:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.7);
}
/* 当前穿着：蓝白 */
.gdskin-act.is-worn {
  color: #cfe6ff;
  background: rgba(90, 150, 220, 0.16);
  border-color: rgba(140, 195, 255, 0.55);
}

/* ═══ 卡门左上、皮肤右侧竖排、按钮在底部 ═══════════════════════ */
.gd__top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 10px;
}
.gd__cardwrap { flex: 0 0 auto; }
.gd__skinblock {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  max-height: 292px;          /* 和卡面同高，超出滚动 */
}
.gd__skins {
  display: flex;
  flex-direction: column;      /* 竖向排列 */
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 292px;
  padding-right: 4px;
  scrollbar-width: thin;
}
.gdskin {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px;
}
.gdskin img {
  width: 38px;
  height: 38px;
  flex: none;
  object-fit: cover;
  object-position: 50% 12%;
}
.gdskin__name {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  font-size: 11.5px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 底部按钮：两种状态等宽，切换时不跳动 */
.gd__skinact {
  display: flex;
  margin: 0 0 12px;
}
.gdskin-act {
  width: 128px;               /* 固定宽度 */
  justify-content: center;
  padding: 8px 12px;
}

/* ═══ 修正：卡面固定宽度，皮肤列塞到它右边 ═════════════════════ */
.gd__top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.gd__cardwrap {
  display: block;
  flex: 0 0 224px;
  width: 224px;
  margin-bottom: 0;
}
.gd__cardwrap .gcard--preview {
  width: 224px;          /* 不再用百分比，避免父级为弹性项时塌陷 */
  margin: 0;
}
.gd__skinblock {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 100%;
  margin: 0;
}

/* 按钮落在卡面右下：右列底部，卡面下方紧接武将信息 */
.gd__skinblock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 296px;
}
.gd__skins {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.gd__skinact {
  flex: none;
  display: flex;
  justify-content: flex-end;   /* 靠右 */
  margin: 0;
  padding-top: 2px;
}
.gd__top { margin-bottom: 4px; }
.gd__cardwrap { margin-bottom: 0; }

/* 右列与卡面同高，按钮贴底对齐 */
.gd__top { align-items: stretch; }
.gd__skinblock {
  height: auto;
  max-height: none;
  align-self: stretch;
}
.gd__skins { flex: 1 1 auto; min-height: 0; }
.gd__skinact {
  flex: none;
  margin-top: auto;     /* 推到最底，和卡面底边齐平 */
  justify-content: flex-end;
}

/* 未获得的皮肤：按钮显示「未获得」，不可点 */
.gdskin-act.is-unowned {
  color: rgba(255, 255, 255, 0.42);
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.16);
  cursor: not-allowed;
}

/* 未拥有的武将卡：黑白滤镜 */
.gcard.is-unowned .gcard__art {
  filter: grayscale(1) brightness(0.82) contrast(0.95);
}
.gcard.is-unowned .gcard__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 5;
}
/* 形态锁定 */
.gd__form.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.14);
}
.gd__formlock {
  margin-left: 5px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 13px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

/* 锁着的形态仍可点击，只是有视觉提示 */
.gd__form.is-locked {
  opacity: 1;
  color: rgba(255, 255, 255, 0.55);
  border-style: dashed;
  cursor: pointer;
}
.gd__form.is-locked:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(242, 201, 107, 0.45);
}
.gd__form.is-locked.is-active {
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ═══ 登录页：用户协议勾选 ══════════════════════════════════════ */
.consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 14px 0 4px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.consent:hover { border-color: rgba(242, 201, 107, 0.4); }
.consent input[type='checkbox'] {
  flex: none;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: #d9ae43;
  cursor: pointer;
}
.consent a {
  color: #f2c96b;
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 201, 107, 0.4);
}
.consent a:hover { border-bottom-color: #f2c96b; }
.consent.is-warn {
  border-color: rgba(255, 138, 138, 0.75);
  background: rgba(255, 90, 90, 0.08);
  animation: consentShake 0.34s ease;
}
@keyframes consentShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* 页脚协议链接 */
.hfoot__link {
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s, border-color 0.16s;
}
.hfoot__link:hover {
  color: #f2c96b;
  border-bottom-color: rgba(242, 201, 107, 0.5);
}

/* ═══ 卡面标记：左上势力、右上主公/君主 ════════════════════════ */
.gcard__faction {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;          /* 覆盖旧规则的 right: 12px，否则会被拉伸 */
  z-index: 6;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(232, 240, 255, 0.9);
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid rgba(150, 190, 240, 0.5);
  backdrop-filter: blur(2px);
}
/* 地理势力用不同色调区分（龙门 / 汐斯塔这类） */
.gcard__faction.is-geo {
  color: rgb(255, 226, 160);
  border-color: rgba(242, 201, 107, 0.55);
}
/* 主公 / 君主 / 敌方 挪到右上角 */
.gcard__badge {
  left: auto;
  right: 12px;
}

/* ═══ 势力标记：关系网配色 + 明日方舟风格字体 ═══════════════════ */
.gcard__faction {
  position: absolute;
  top: 11px;
  left: 11px;
  right: auto;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  font-family: "Bender", "Montserrat", "Noto Sans SC", "Source Han Sans SC",
               "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.15;
  color: var(--fac, #98a2b3);
  background:
    linear-gradient(180deg, rgba(6, 9, 14, 0.86), rgba(6, 9, 14, 0.72));
  border: 1px solid color-mix(in srgb, var(--fac, #98a2b3) 55%, transparent);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 2px 10px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  text-shadow: 0 0 10px color-mix(in srgb, var(--fac, #98a2b3) 45%, transparent);
}
/* 左侧一条代表色竖线，关系网那种感觉 */
.gcard__faction::before {
  content: '';
  width: 2px;
  align-self: stretch;
  background: var(--fac, #98a2b3);
  box-shadow: 0 0 8px var(--fac, #98a2b3);
}
/* 地理势力：底部加一条细线区分 */
.gcard__faction.is-geo {
  border-bottom-width: 2px;
  border-bottom-color: var(--fac, #98a2b3);
}

/* ═══ 势力标记 v2：取自武将卡的平涂配色 ════════════════════════ */
.gcard__faction {
  position: absolute;
  top: 11px;
  left: 11px;
  right: auto;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 8px;
  font-family: "Bender", "Montserrat", "Noto Sans SC", "Source Han Sans SC",
               "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.15;
  color: var(--fac, #9ba6b4);
  background: rgba(7, 10, 15, 0.78);
  border: 1px solid var(--fac-soft, rgba(155, 166, 180, 0.6));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  text-shadow: none;
}
.gcard__faction::before {
  content: '';
  width: 3px;
  align-self: stretch;
  background: var(--fac, #9ba6b4);
}
.gcard__faction.is-geo {
  border-bottom: 2px solid var(--fac, #9ba6b4);
}

/* ═══════════════════════════════════════════════════════════════════
   卡面 UI v5：五张一排 + 真实双线边框 + 竖排势力落款
   这一段覆盖前面所有同名规则
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   卡面 v7 · 通行证风格（Arknights PASS）
   · 细金属线 + 小圆角，不做厚重边框
   · 角部对位标记、右下 45° 势力色切带
   · 势力用工程等宽字，宽字距
   ═══════════════════════════════════════════════════════════════════ */

.gen-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 18px;
}
@media (max-width: 1180px) { .gen-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .gen-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .gen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; } }

/* ── 卡体：薄金属壳 ───────────────────────────────────────────── */
.gcard .gcard__frame {
  border: 2px solid rgba(196, 204, 218, 0.42);
  border-radius: 3px;
  outline: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    #0b0e14;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 10px 24px rgba(0, 0, 0, 0.5);
  padding: 0;
  clip-path: none;
}
.gcard__art {
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: none;
}

/* 顶部一条高光（金属反光） */
.gcard .gcard__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 12%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent 18%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  clip-path: none;
}
/* 右下角 45° 切带（势力色）+ 内缘暗角 */
.gcard .gcard__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      transparent calc(100% - 46px),
      color-mix(in srgb, var(--fac, #9ba6b4) 55%, transparent) calc(100% - 46px),
      color-mix(in srgb, var(--fac, #9ba6b4) 55%, transparent) calc(100% - 44px),
      transparent calc(100% - 44px)
    );
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.gcard.is-unowned .gcard__frame::after {
  background:
    linear-gradient(
      135deg,
      transparent calc(100% - 46px),
      color-mix(in srgb, var(--fac, #9ba6b4) 40%, transparent) calc(100% - 46px),
      color-mix(in srgb, var(--fac, #9ba6b4) 40%, transparent) calc(100% - 44px),
      transparent calc(100% - 44px)
    ),
    rgba(0, 0, 0, 0.26);
}

/* ── 角部对位标记（用两个 i 元素） ─────────────────────────────── */
.gcard__corner {
  display: block;
  position: absolute;
  z-index: 7;
  pointer-events: none;
  background: none;
  border: 0;
}
/* 左上：两个短线组成的十字角标 */
.gcard__corner--tl {
  top: 6px;
  left: 6px;
  width: 9px;
  height: 9px;
  border-top: 1px solid rgba(232, 238, 250, 0.6);
  border-left: 1px solid rgba(232, 238, 250, 0.6);
}
/* 右下：小方点 */
.gcard__corner--br {
  bottom: 8px;
  right: 8px;
  width: 4px;
  height: 4px;
  background: var(--fac, #9ba6b4);
  opacity: 0.8;
}

/* ── 势力：工程等宽字 + 上方短色条 ────────────────────────────── */
.gcard__faction {
  position: absolute;
  top: 14px;
  left: 12px;
  right: auto;
  z-index: 8;
  display: block;
  padding: 0;
  font-family: "Bender", "Share Tech Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.42em;
  line-height: 1;
  writing-mode: horizontal-tb;
  color: rgba(236, 242, 255, 0.9);
  text-transform: uppercase;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
/* 势力名上方的势力色短条 */
.gcard__faction::before {
  content: '';
  display: block;
  width: 16px;
  height: 2px;
  margin-bottom: 5px;
  background: var(--fac, #9ba6b4);
  box-shadow: 0 0 8px color-mix(in srgb, var(--fac, #9ba6b4) 60%, transparent);
}
.gcard__faction::after { display: none; }

/* 称号 / 姓名在右下切带前收住 */
.gcard__title { left: 12px; right: 40px; }
.gcard__name { left: 12px; right: 40px; }

/* ═══════════════════════════════════════════════════════════════════
   v13 · 修复：切角回归 / 势力可见 / 去掉右下点 / 梯形加金线
   ═══════════════════════════════════════════════════════════════════ */

/* 卡片定位上下文（势力牌绝对定位依赖它） */
.gcard { position: relative; }

/* ── ① 左上切角（46px）+ 斜金线 ───────────────────────────────── */
.gcard .gcard__frame {
  --cut: 46px;
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--cut)
  );
}
.gcard .gcard__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      transparent calc(var(--cut) - 1px),
      rgba(214, 172, 88, 0.9) calc(var(--cut) - 1px),
      rgba(214, 172, 88, 0.9) var(--cut),
      transparent var(--cut)
    );
  clip-path: inherit;
}

/* ── ② 势力：45° 两字，一个在切角外一个在内 ────────────────────── */
.gcard__faction {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  display: block;
  width: 64px;
  height: 64px;
  padding: 0;
  font-family: "汉仪菱心体简", "HYLingXinJian", "Noto Sans SC",
               "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: color-mix(in srgb, var(--fac, #9ba6b4) 68%, #ffffff);
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.95),
    0 0 14px color-mix(in srgb, var(--fac, #9ba6b4) 40%, transparent);
}
.gcard__faction::before,
.gcard__faction::after { display: none; }

.gcard__faction > b {
  position: absolute;
  display: block;
  font: inherit;
  color: color-mix(in srgb, var(--fac, #9ba6b4) 68%, #ffffff);
  white-space: nowrap;
  -webkit-text-stroke: 1.5px rgba(74, 82, 94, 0.95);
  paint-order: stroke fill;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}
/* 第一个字：切角外（左上） */
.gcard__faction > b[data-i='0'] { top: -14px; left: -4px; }
/* 第二个字：切角内（右下），45° 错位 */
.gcard__faction > b[data-i='1'] { top: 10px;  left: 18px; }
/* 单字势力 */
.gcard__faction > b:only-child { top: 2px; left: 10px; }

/* ── ③ 去掉血条下方那个小方点 ─────────────────────────────────── */
.gcard__corner--br { display: none !important; }
.gcard__corner--tl { display: none !important; }


/* ═══════════════════════════════════════════════════════════════════
   通行证卡面：底部势力色条
   ═══════════════════════════════════════════════════════════════════ */

/* 底部：灰色打底条（金边，12px）+ 左侧居中的细势力色条 */
.gcard__band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, #2b303a 0%, #1a1d24 100%);
  box-shadow:
    inset 0 1px 0 rgba(242, 201, 107, 0.62),
    0 -1px 0 rgba(0, 0, 0, 0.55);
}
/* 势力色条：左对齐、贴底，7px 高 */
.gcard__band::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46%;
  height: 7px;
  background: var(--fac, #9ba6b4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
/* 干员编号：色条右侧，等宽小字 */
.gcard__serial {
  position: absolute;
  left: calc(46% + 9px);
  bottom: 3px;
  z-index: 4;
  font-family: var(--mono);
  font-size: 7.5px;
  line-height: 1;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  transition: color 0.16s ease;
}
/* 字往上让出底部 14px 的条 */
.gcard .gcard__name { bottom: 17px; }
.gcard .gcard__title { bottom: 40px; }

/* hover：只加金框和编号提亮，立绘只轻推 6% */
.gcard .gcard__frame {
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.gcard:hover .gcard__frame {
  border-color: rgba(242, 201, 107, 0.78);
  box-shadow:
    0 0 0 1px rgba(242, 201, 107, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.5);
}
.gcard .gcard__art { transition: transform 0.16s ease; }
.gcard:hover .gcard__serial { color: rgba(242, 201, 107, 0.95); }

/* 镀层：参考蚀刻章的炫彩镀层，收敛到「细看才闪」的程度 */
.gcard--foil .gcard__frame {
  border-color: rgba(255, 236, 170, 0.9);
  box-shadow:
    0 0 0 1px rgba(127, 227, 255, 0.22),
    0 0 16px rgba(242, 201, 107, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.45);
}
.gcard--foil .gcard__frame::before {
  border: 1px solid transparent;
  background: linear-gradient(115deg, #7fe3ff, #ff8fd4, #ffe6a8, #8dffd2, #7fe3ff) border-box;
  background-size: 240% 240%;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: foil-shift 8s ease-in-out infinite alternate;
}
.gcard--foil .gcard__band {
  background:
    linear-gradient(
      115deg,
      transparent 16%,
      rgba(127, 227, 255, 0.24) 32%,
      rgba(255, 143, 212, 0.2) 44%,
      rgba(255, 230, 168, 0.28) 55%,
      rgba(141, 255, 210, 0.2) 66%,
      transparent 82%
    ),
    linear-gradient(180deg, #2b303a 0%, #1a1d24 100%);
  background-size: 280% 100%, 100% 100%;
  animation: foil-band 6s ease-in-out infinite alternate;
}
.gcard--foil .gcard__serial {
  color: #cfefff;
  text-shadow: 0 0 5px rgba(127, 227, 255, 0.4);
}

/* 全卡箔光：只留一条窄带，不再整张罩虹彩 */
.gcard__foil {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 24%,
    rgba(127, 227, 255, 0.18) 35%,
    rgba(255, 143, 212, 0.14) 44%,
    rgba(255, 236, 170, 0.2) 52%,
    rgba(141, 255, 210, 0.15) 61%,
    transparent 76%
  );
  background-size: 300% 300%;
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: foil-sweep 8s ease-in-out infinite alternate;
}
.gcard--foil .gcard__name,
.gcard--foil .gcard__title,
.gcard--foil .gcard__hp { z-index: 7; }

.gcard__foil-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 8;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  font-size: 8px;
  line-height: 1;
  color: #10131a;
  background: conic-gradient(from 0deg, #7fe3ff, #ff8fd4, #ffe6a8, #8dffd2, #7fe3ff);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 6px rgba(127, 227, 255, 0.45);
  pointer-events: none;
}

.gcard--foil:hover .gcard__frame {
  box-shadow:
    0 0 0 1px rgba(127, 227, 255, 0.35),
    0 0 22px rgba(242, 201, 107, 0.25),
    0 10px 24px rgba(0, 0, 0, 0.5);
}

@keyframes foil-shift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
@keyframes foil-band {
  from { background-position: 0% 0, 0 0; }
  to { background-position: 100% 0, 0 0; }
}
@keyframes foil-sweep {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .gcard--foil .gcard__frame::before,
  .gcard--foil .gcard__band,
  .gcard__foil { animation: none; }
}


/* ═══════════════════════════════════════════════════════════════════
   v14 · 血条金线勾描（双层伪元素，避免被自身 clip-path 裁掉）
   ═══════════════════════════════════════════════════════════════════ */

/* 容器不做裁切，裁切交给两层伪元素 */
.gcard__hp {
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 9px;
  background: none;
  border: 0;
  box-shadow: none;
  transform: none;
  text-shadow: none;
  clip-path: none;
  z-index: 6;
}
/* 外层：金色梯形（右边长底贴卡右，左边收，底边贴卡底） */
.gcard__hp::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg,
    rgba(240, 202, 118, 0.98),
    rgba(168, 126, 44, 0.95));
  clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%);
}
/* 内层：深色梯形，内缩 1.5px 留出金边 */
.gcard__hp::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  z-index: -1;
  background: rgba(6, 9, 14, 0.9);
  clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%);
}

.gcard__hp .orbs--col {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
  transform: none;
}
.gcard__hp .orbs--col img {
  display: block;
  width: 12px;
  height: 17px;
}
.gcard__hp .gcard__armor {
  position: relative;
  flex: none;
  width: 18px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.gcard__armor img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}
.gcard__armor b {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: #2f3338;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ── 详情品质 / 护甲 / 武将包侧栏 ─────────────────────────────── */
.gd__tier {
  margin-left: 8px;
  padding: 1px 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.26);
}
.gd__armor {
  margin-left: 8px;
  padding: 1px 7px;
  font-size: 11px;
  color: #8fd6e8;
  border: 1px solid rgba(143, 214, 232, 0.45);
}

.gen-layout { display: flex; gap: 18px; align-items: flex-start; }
.gen-main { flex: 1 1 auto; min-width: 0; }
.gen-packs {
  flex: 0 0 168px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 88px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 10, 14, 0.6);
}
.pack {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  grid-template-areas: 'lamp name count' 'lamp sub count';
  gap: 1px 8px;
  padding: 8px 10px;
  text-align: left;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.pack:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.pack.is-active {
  color: #f2c96b;
  background: rgba(242, 201, 107, 0.1);
  border-left-color: #f2c96b;
}
.pack__name { grid-area: name; font-family: var(--serif); font-size: 13px; letter-spacing: 0.06em; }
.pack__sub { grid-area: sub; font-size: 10.5px; color: rgba(255, 255, 255, 0.48); letter-spacing: 0.04em; }
.pack__count { grid-area: count; align-self: center; font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, 0.38); }
.pack.is-active .pack__count { color: rgba(242, 201, 107, 0.8); }
.pack.is-uncat { margin-top: 4px; border-top: 1px dashed rgba(255, 255, 255, 0.12); }
.pack.is-uncat .pack__name { color: rgba(255, 255, 255, 0.45); }

/* 将灯：外圈收集进度 + 灯芯 + 包号铭牌 */
.pack__lamp {
  grid-area: lamp;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 34px;
  padding-top: 1px;
}
/* 全部 / 未分类：不是武将包，只留编号占位，不点灯 */
.pack__lamp.is-ghost {
  justify-content: center;
  height: 31px;
}
.pack__lamp.is-ghost .pack__lamp-code {
  color: rgba(255, 255, 255, 0.26);
  letter-spacing: 0.1em;
}
.pack__lamp-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: conic-gradient(#f2c96b calc(var(--p, 0) * 1%), rgba(255, 255, 255, 0.1) 0);
  position: relative;
  transition: background 0.2s, box-shadow 0.2s;
}
.pack__lamp-orb::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #14171d;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.7);
  transition: background 0.2s;
}
.pack__lamp.is-partial .pack__lamp-orb::before { background: rgba(242, 201, 107, 0.28); }
.pack__lamp.is-lit .pack__lamp-orb {
  background: #f2c96b;
  animation: lamp-breathe 3.4s ease-in-out infinite;
}
.pack__lamp.is-lit .pack__lamp-orb::before {
  background: radial-gradient(circle at 38% 32%, #fff8dc, #f2c96b 58%, #b98a2e);
  box-shadow: 0 0 6px rgba(242, 201, 107, 0.85);
}
.pack__lamp-mark {
  position: absolute;
  inset: 6px;
  width: 10px;
  height: 9px;
  object-fit: contain;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.pack__lamp.is-lit .pack__lamp-mark {
  opacity: 0.9;
  filter: drop-shadow(0 0 2px rgba(255, 248, 220, 0.9));
}
.pack__lamp-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  transition: color 0.2s;
}
.pack__lamp.is-lit .pack__lamp-code { color: var(--gold); }
.pack.is-active .pack__lamp-code { color: var(--gold); }

@keyframes lamp-breathe {
  0%, 100% { box-shadow: 0 0 8px rgba(242, 201, 107, 0.45); }
  50% { box-shadow: 0 0 16px rgba(242, 201, 107, 0.8); }
}

@media (prefers-reduced-motion: reduce) {
  .pack__lamp.is-lit .pack__lamp-orb {
    animation: none;
    box-shadow: 0 0 10px rgba(242, 201, 107, 0.6);
  }
}

/* 侧栏头：武将包 / 将灯计数 */
.packs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 7px;
  margin: 0 0 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}
.packs__lamps { color: rgba(255, 255, 255, 0.32); letter-spacing: 0.08em; }
.packs__lamps b { color: var(--gold); font-weight: 700; font-size: 10px; }

@media (max-width: 860px) {
  .gen-layout { flex-direction: column; }
  .gen-packs {
    position: static;
    flex: none;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
  }
  .packs__head { display: none; }
  .pack { flex: none; grid-template-areas: 'name' 'sub'; }
  .pack__count { display: none; }
}

/* ═══ 名录分页 ═════════════════════════════════════════════════ */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 26px 0 8px;
}
.pager.is-hidden { display: none; }
.pager__btn {
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.pager__btn:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}
.pager__btn.is-active {
  color: #0b0c10;
  background: #f2c96b;
  border-color: #f2c96b;
  font-weight: 700;
}
.pager__btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.pager__gap {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  padding: 0 2px;
}
