/* ===================================================================
   style-items.css — 背包网格 / 详情 / 兑换 / 抽卡卡片 / Modal 动画
   加载顺序在 style-ui.css 之后，可覆盖其规则。
   =================================================================== */

/* ==== 顶部资源条：星铁胶囊化，做小 ==== */
.res-strip, .top-right { gap: 6px; }
.res-chip {
  padding: 3px 10px; font-size: 11px; line-height: 1.4;
  border-radius: 999px; border-color: var(--ui-line2);
  background: rgba(255, 255, 255, 0.03);
}
.res-chip b { font-size: 11.5px; }

/* ==== 背包：响应式网格 ==== */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  padding: 16px clamp(16px, 3vw, 40px) 30px;
  align-content: start;
}
.item-cell {
  --q: #d8b96a;
  position: relative; cursor: pointer;
  aspect-ratio: 3 / 4; min-height: 128px;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 8px 9px;
  border: 1px solid color-mix(in srgb, var(--q) 45%, transparent);
  border-radius: 3px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--q) 16%, transparent), rgba(12, 12, 18, 0.92) 62%);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.55);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.item-cell::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--q) 22%, transparent), transparent 46%);
}
.item-cell:hover {
  transform: translateY(-3px);
  border-color: var(--q);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), inset 0 0 22px color-mix(in srgb, var(--q) 12%, transparent);
}
.ic-glyph {
  width: 46px; height: 46px; flex: 0 0 46px; margin-bottom: auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--q); border-radius: 3px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--q) 65%, #222), #14141c);
  box-shadow: 0 0 12px color-mix(in srgb, var(--q) 28%, transparent);
}
.ic-stars { margin-top: 8px; color: var(--q); font-size: 10px; letter-spacing: 1px; line-height: 1; }
.ic-name {
  margin-top: 3px; font-size: 11px; color: var(--ui-text); text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ic-sub { margin-top: 2px; font-size: 9.5px; color: var(--ui-dim); text-align: center; line-height: 1.3; }
.ic-lv, .ic-count, .ic-worn {
  position: absolute; top: 5px; font-size: 9.5px; z-index: 1;
  padding: 1px 5px; border-radius: 2px; background: rgba(0, 0, 0, 0.55);
}
.ic-lv { left: 5px; color: var(--ui-gold-hi); }
.ic-count { right: 5px; color: var(--ui-text); font-variant-numeric: tabular-nums; }
/* 已装备角标独占底部空间：卡片预留 padding，避免压住名称/主词条 */
.item-cell.worn { padding-bottom: 26px; }
.ic-worn { top: auto; bottom: 5px; left: 50%; transform: translateX(-50%); color: #9fc7e8;
  white-space: nowrap; max-width: calc(100% - 10px); overflow: hidden; text-overflow: ellipsis;
  font-size: 9px; }

/* 上锁角标：右上角小锁（遗器/光锥格子无数量角标，与材料互不冲突） */
.ic-lock {
  position: absolute; top: 5px; right: 5px; z-index: 1;
  font-size: 10px; line-height: 1; padding: 1px 3px; border-radius: 2px;
  background: rgba(0, 0, 0, 0.55); filter: grayscale(0.2);
}
.item-cell.locked { box-shadow: 0 0 10px rgba(232, 197, 106, 0.35), inset 0 0 8px rgba(232, 197, 106, 0.08); }

/* ==== 详情弹窗内容 ==== */
.dt-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.dt-glyph {
  width: 56px; height: 56px; flex: 0 0 56px;
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff;
  border: 1px solid var(--q); border-radius: 3px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--q) 65%, #222), #14141c);
}
.dt-name { font-size: 16px; letter-spacing: 1px; color: var(--ui-gold-hi); }
.dt-star { margin-top: 3px; color: var(--q); font-size: 12px; letter-spacing: 1px; }
.dt-meta { margin-top: 4px; font-size: 11.5px; color: var(--ui-dim); }
.dt-sec {
  margin: 12px 0 6px; font-size: 11px; letter-spacing: 1px; color: var(--ui-gold);
  border-left: 2px solid var(--ui-line); padding-left: 8px;
}
.dt-main { padding: 8px 12px; font-size: 13px; background: rgba(255, 255, 255, 0.03); border-radius: 2px; }
.dt-main b { color: var(--ui-gold-hi); }
.dt-subs { display: flex; flex-direction: column; gap: 4px; }
.dt-sub { display: flex; justify-content: space-between; font-size: 12px; color: var(--ui-dim); padding: 2px 0; }
.dt-sub b { color: var(--ui-text); font-weight: 500; }
.dt-desc { font-size: 12px; line-height: 1.9; color: var(--ui-text); }
.dt-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ui-line2);
}

/* ==== 兑换弹窗 ==== */
.ex-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.ex-glyph {
  width: 48px; height: 48px; flex: 0 0 48px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; border: 1px solid var(--q); border-radius: 3px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--q) 65%, #222), #14141c);
}
.ex-name { font-size: 15px; color: var(--ui-gold-hi); letter-spacing: 1px; }
.ex-desc { margin-top: 3px; font-size: 11px; color: var(--ui-dim); }
.ex-info, .ex-preview { font-size: 12px; color: var(--ui-dim); padding: 8px 0; }
.ex-info b, .ex-preview b { color: var(--ui-gold-hi); font-variant-numeric: tabular-nums; }
.ex-ctrl { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--ui-line2); }
.ex-ctrl input[type="number"] {
  width: 72px; padding: 7px 8px; text-align: center;
  color: var(--ui-text); background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--ui-line); border-radius: 2px; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.ex-ctrl input[type="range"] { flex: 1 1 auto; accent-color: var(--ui-gold); cursor: pointer; }
.ex-preview {
  padding: 10px 12px; background: rgba(196, 168, 124, 0.07);
  border: 1px solid var(--ui-line2); border-radius: 2px;
}

/* ==== 抽卡结果：Grid 卡片（带图标） ==== */
.gacha-grid { gap: 12px; }
.gc-glyph {
  width: 44px; height: 44px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff;
  border: 1px solid var(--gc, var(--ui-gold)); border-radius: 3px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--gc, var(--ui-gold)) 60%, #222), #14141c);
}

/* ==== Modal：半透明遮罩 + 开关过渡动画 ==== */
.modal {
  opacity: 0; transition: opacity 0.18s ease;
}
.modal.show { opacity: 1; }
.modal-box {
  transform: translateY(14px) scale(0.97);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.modal.show .modal-box { transform: translateY(0) scale(1); }
.modal-x {
  min-width: 30px; padding: 2px 8px; font-size: 17px; line-height: 1;
  border-color: transparent; background: transparent; color: var(--ui-dim);
}
.modal-x:hover { color: var(--ui-gold-hi); border-color: var(--ui-line); }

/* ==== 关卡导航（区域 + 节点卡片） ==== */
.stage-view {
  width: 100%; max-width: 1500px; margin: 0 auto;
  padding: 20px clamp(16px, 3vw, 40px) 32px;
  overflow-y: auto; height: 100%;
}
.stage-title { display: flex; align-items: baseline; gap: 18px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--ui-line); }
.stage-title h2 { margin: 0; font-size: 22px; letter-spacing: 4px; color: var(--ui-gold-hi); font-weight: 500; }
.stage-title span { font-size: 12px; color: var(--ui-dim); }
.stage-region { margin-bottom: 24px; }
.sr-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.sr-head b { font-size: 15px; letter-spacing: 2px; color: var(--ui-text); }
.sr-head span { font-size: 11px; color: var(--ui-dim); }
.sr-head::before { content: "◆"; color: var(--ui-gold); font-size: 10px; }
.sr-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.stage-node {
  padding: 13px 15px; cursor: pointer; border-radius: 3px;
  border: 1px solid var(--ui-line2); background: var(--ui-panel);
  transition: 0.16s ease;
}
.stage-node:hover { border-color: var(--ui-gold); transform: translateY(-2px); }
.stage-node.on { border-color: var(--ui-gold-hi); background: linear-gradient(150deg, rgba(196,168,124,0.16), rgba(12,12,18,0.9)); box-shadow: inset 0 0 18px rgba(196,168,124,0.1); }
.stage-node.cleared .sn-head b::after { content: " ✓"; color: #7fcf97; font-size: 12px; }
.sn-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.sn-head b { font-size: 14px; font-weight: 500; }
.sn-lv { font-size: 11px; color: var(--ui-gold); }
.sn-enemies, .sn-loot, .sn-first, .sn-rewards { font-size: 11.5px; color: var(--ui-dim); line-height: 1.9; }
.sn-loot { color: #9fc7e8; }
.sn-first { color: var(--ui-gold); }
.sn-rewards { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--ui-line2); }
.stage-action {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 20px;
  padding: 14px; margin-top: 8px; border-top: 1px solid var(--ui-line);
  background: linear-gradient(0deg, rgba(15,15,20,0.98), rgba(15,15,20,0.85));
}
.stage-action span { font-size: 12px; color: var(--ui-dim); }

/* ==== 行迹页签 ==== */
.trace-view { display: flex; flex-direction: column; gap: 6px; }
.trace-sec { margin: 8px 0 4px; font-size: 11px; letter-spacing: 2px; color: var(--ui-gold); border-left: 2px solid var(--ui-line); padding-left: 8px; }
.trace-node {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--ui-line2); border-radius: 2px; background: rgba(255,255,255,0.02);
}
.trace-node.unlocked { border-color: var(--ui-line); background: rgba(196,168,124,0.08); }
.trace-node.maxed { opacity: 0.72; }
.tn-ico { width: 30px; height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--ui-gold); border: 1px solid var(--ui-line); border-radius: 2px; }
.tn-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tn-info b { font-size: 12.5px; font-weight: 500; }
.tn-info span { font-size: 10.5px; color: var(--ui-dim); }
.tn-info em { font-size: 10.5px; color: var(--ui-gold); font-style: normal; }
.tn-bar { height: 3px; background: rgba(255,255,255,0.06); border-radius: 0; margin-top: 3px; }
.tn-bar i { display: block; height: 100%; background: var(--ui-gold); }

/* ==== 设置 / 重置按钮（侧栏底部，需足够点击面积） ==== */
.reset-btn {
  display: block; width: 100%; margin-bottom: 8px; padding: 9px 6px;
  font-size: 12.5px; letter-spacing: 1px; color: #9a8f96; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(180, 150, 160, 0.28); border-radius: 4px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.reset-btn:hover { color: #e8dcc0; background: rgba(216, 185, 106, 0.14); border-color: var(--line, rgba(216,185,106,0.5)); }
.reset-btn:active { transform: translateY(1px); }
/* 「重置」保持危险色倾向，与「设置」区分 */
#btn-reset-game { color: #a87a84; border-color: rgba(180, 90, 100, 0.32); }
#btn-reset-game:hover { color: #ff9aa6; background: rgba(180, 90, 100, 0.16); border-color: #b45a66; }

/* ==== 材料副本标签 ==== */
.mat-tag {
  display: inline-block; padding: 1px 6px; margin-right: 4px;
  font-size: 10px; color: var(--ui-gold-hi); font-weight: 400;
  border: 1px solid var(--ui-line); border-radius: 2px;
  background: rgba(196,168,124,0.1);
}
.mat-node .sn-loot { color: #9fc7e8; }

/* ==== 回归报告 ==== */
.ir-time { font-size: 13px; color: var(--ui-text); line-height: 1.8; margin-bottom: 12px; }
.ir-time b { color: var(--ui-gold-hi); font-size: 15px; }

/* ==== 忘却之庭 ==== */
.abyss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.abyss-node {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px; cursor: pointer; border-radius: 3px;
  border: 1px solid var(--ui-line2); background: var(--ui-panel); transition: 0.16s ease;
}
.abyss-node:hover { border-color: var(--ui-gold); transform: translateY(-2px); }
.abyss-node b { font-size: 13px; color: var(--ui-text); }
.abyss-node span { font-size: 10px; color: var(--ui-dim); }
.abyss-node em { font-size: 10px; color: var(--ui-gold); font-style: normal; }
.abyss-node.cleared { border-color: #7fcf97; background: rgba(127,207,151,0.08); }
.abyss-node.cleared em { color: #7fcf97; }
.abyss-node.locked { opacity: 0.4; cursor: not-allowed; }
.abyss-node.locked:hover { transform: none; border-color: var(--ui-line2); }

/* ==== 全图鉴（智库） ==== */
.codex-view { width:100%; max-width:1500px; margin:0 auto; padding:20px clamp(16px,3vw,40px) 30px; overflow-y:auto; height:100%; }
.codex-filters { display:flex; flex-direction:column; align-items:stretch; gap:6px; margin:12px 0 16px; }
/* 筛选胶囊：暗黑半透 + 官方图标；选中金色描边发光 */
.codex-pill {
  display:inline-flex; align-items:center; gap:6px;
  height:30px; padding:0 13px 0 8px;
  border:1px solid rgba(255,255,255,0.09); border-radius:20px;
  background:rgba(42,42,53,0.72); color:#c9c6d2;
  font-size:12px; line-height:1; cursor:pointer; white-space:nowrap;
  transition:background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color:transparent;
}
.codex-pill .pill-ico { width:18px; height:18px; object-fit:contain; filter:brightness(.85) saturate(.85); display:block; }
.codex-pill .pill-all {
  width:18px; height:18px; display:inline-flex; align-items:center; justify-content:center;
  font-size:15px; color:inherit; opacity:.85;
}
.codex-pill:hover { background:rgba(58,58,72,0.9); border-color:rgba(196,168,124,0.35); color:#e8e4dc; }
.codex-pill.on {
  border-color:var(--ui-gold,#c4a87c); color:var(--ui-gold-hi,#f0dca6);
  background:linear-gradient(180deg,rgba(196,168,124,0.2),rgba(196,168,124,0.06));
  box-shadow:inset 0 0 12px rgba(196,168,124,0.15),0 0 10px rgba(196,168,124,0.18);
}
.codex-pill.on .pill-ico { filter:none; }
/* 命途 / 属性 两组之间的垂直分隔线 */
.codex-fsep { width:1px; height:20px; margin:0 4px; background:linear-gradient(180deg,transparent,rgba(255,255,255,0.18),transparent); flex:0 0 auto; }
.codex-tip { font-size:11px; color:var(--ui-dim); }
.codex-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px; }
.codex-card {
  --c:#888; position:relative; padding:10px 6px 8px; text-align:center; cursor:pointer;
  border:1px solid var(--ui-line2); border-radius:3px; background:linear-gradient(160deg,rgba(255,255,255,0.03),rgba(10,10,16,0.9));
  transition:0.15s ease;
}
.codex-card.r5 { --c:#e8c56a; } .codex-card.r4 { --c:#b57ae0; }
.codex-card.r3 { --c:#6aa9d8; } .codex-card.r2 { --c:#6fcf97; }
.codex-card:hover { transform:translateY(-3px); border-color:var(--c); box-shadow:0 6px 16px rgba(0,0,0,0.5); }
.codex-card.owned { border-color:color-mix(in srgb,var(--c) 55%,transparent); background:linear-gradient(160deg,color-mix(in srgb,var(--c) 14%,transparent),rgba(10,10,16,0.9)); }
.codex-card.locked { filter:grayscale(1) brightness(0.55); }
.cc-icon { width:40px; height:40px; margin:0 auto 6px; display:flex; align-items:center; justify-content:center;
  font-size:18px; color:#fff; border:1px solid var(--c); border-radius:3px;
  background:linear-gradient(150deg,color-mix(in srgb,var(--c) 60%,#222),#14141c); }
.cc-stars { color:var(--c); font-size:9px; letter-spacing:0; line-height:1; }
.cc-name { margin-top:4px; font-size:11px; color:var(--ui-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cc-sub { margin-top:2px; font-size:9px; color:var(--ui-dim); }
.cc-lock { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:10px; color:#ccc; background:rgba(0,0,0,0.45); }
/* 详情 */
.codex-detail { font-size:12px; }
.cd-stats { display:grid; grid-template-columns:1fr 1fr; gap:2px 14px; }
.cd-skill { padding:6px 0; border-bottom:1px dashed var(--ui-line2); }
.cd-skill b { color:var(--ui-text); font-weight:500; }
.cd-mult { margin-left:8px; color:var(--ui-gold); font-size:11px; }
.cd-desc { margin-top:3px; color:var(--ui-dim); line-height:1.6; font-size:11px; }
.cd-statline { margin:4px 0; color:var(--ui-gold); }
.cd-eid { padding:5px 0; border-bottom:1px dashed var(--ui-line2); }
.cd-eid b { color:var(--ui-dim); font-weight:500; }
.cd-eid span { display:block; margin-top:2px; color:var(--ui-dim); font-size:11px; line-height:1.5; }
.cd-eid.effective b { color:var(--ui-gold-hi); }
.cd-rank { display:flex; justify-content:space-between; padding:4px 0; border-bottom:1px dashed var(--ui-line2); }
.cd-rank b { color:var(--ui-gold); font-weight:500; }
.cd-rank span { color:var(--ui-text); }

/* ==== 遗器套装详情：大图标 + 金色小标题 ==== */
.rx-head { display:flex; align-items:center; gap:14px; padding-bottom:14px; margin-bottom:2px;
  border-bottom:1px solid var(--ui-line2); }
.rx-icon { flex:0 0 76px; width:76px; height:76px; display:flex; align-items:center; justify-content:center;
  border-radius:6px; overflow:hidden; border:1px solid var(--ui-line);
  background: radial-gradient(120% 100% at 50% 0%, rgba(196,168,124,0.22), rgba(10,10,16,0.9) 75%);
  box-shadow: 0 10px 20px -12px rgba(0,0,0,0.9); }
.rx-icon .rx-img { width:88%; height:88%; object-fit:contain; display:block; }
.rx-meta { min-width:0; }
.rx-name { margin:0; font-size:17px; letter-spacing:1px; color:var(--ui-text); font-weight:600; }
.rx-sub { margin-top:4px; font-size:11px; letter-spacing:1px; color:var(--ui-dim); }
.rx-sec { padding:12px 0; }
.rx-sec + .rx-sec { border-top:1px solid rgba(196,168,124,0.14); }
.rx-h { display:flex; align-items:center; gap:8px; margin:0 0 8px; font-size:13px; font-weight:500;
  letter-spacing:2px; color:var(--ui-dim); }
.rx-h i { display:block; width:3px; height:12px; background:var(--ui-line); }
.rx-h.gold { font-size:13.5px; font-weight:600; color:var(--ui-gold-hi); }
.rx-h.gold i { background:linear-gradient(180deg, var(--ui-gold-hi), transparent); }
.rx-text { margin:0; font-size:12.5px; line-height:1.95; color:var(--ui-text); }

/* ==== 图鉴·角色档案：书本式左右分栏（左大图 / 右详情） ==== */
.modal-box.modal-wide { width: min(1140px, 94vw); max-height: 88vh; }
.modal-box.modal-wide .modal-body {
  padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(150deg, rgba(30,28,42,0.9), rgba(10,10,16,0.96));
}
.cd-book {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 60%);
}
/* 左栏：立绘 + 身份 */
.cdb-left {
  position: relative; display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--ui-line);
  background: radial-gradient(120% 90% at 50% 26%, rgba(196,168,124,0.16), rgba(8,8,13,0.94) 72%);
}
.cdb-figure { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.cdb-figure .cd-img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
/* 底部渐隐，与姓名区自然衔接 */
.cdb-figure::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 130px; pointer-events: none;
  background: linear-gradient(0deg, rgba(6,6,10,0.96), rgba(6,6,10,0.35) 55%, transparent);
}
.cdb-id {
  padding: 14px 18px 16px; border-top: 1px solid var(--ui-line2);
  background: linear-gradient(0deg, rgba(6,6,10,0.95), rgba(6,6,10,0.55) 68%, rgba(6,6,10,0));
}
.cdb-name { font-size: 26px; font-weight: 700; letter-spacing: 4px; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.92); }
.cdb-star { margin-top: 2px; font-size: 13px; letter-spacing: 3px; color: var(--ui-gold); }
.cdb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cdb-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  font-size: 11.5px; color: var(--ui-text); background: rgba(255,255,255,0.035);
  border: 1px solid var(--ui-line); border-radius: 2px; }
.cdb-tag.dim { color: var(--ui-dim); }
.cdb-tag .badge-ico { width: 15px; height: 15px; }

/* 宽版光锥：左图放大，与角色档案观感一致 */
.modal-box.modal-wide .cone-detail2 { grid-template-columns: 300px minmax(0, 1fr); gap: 20px; padding: 18px 22px 24px; }
.modal-box.modal-wide .cd2-img { min-height: 320px; }

/* 右栏：可滚动详情 */
.cdb-right { min-width: 0; overflow-y: auto; padding: 18px 22px 24px; }
.cdb-right::-webkit-scrollbar { width: 6px; }
.cdb-right::-webkit-scrollbar-thumb { background: #3a3550; border-radius: 3px; }
.cdb-right::-webkit-scrollbar-track { background: transparent; }
.cdb-sec { padding: 14px 0 16px; }
.cdb-sec:first-child { padding-top: 2px; }
.cdb-sec + .cdb-sec { border-top: 1px solid rgba(196,168,124,0.18); }
.cdb-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: 14px; font-weight: 600; letter-spacing: 2px; color: var(--ui-gold-hi); }
.cdb-h i { display: block; width: 3px; height: 14px;
  background: linear-gradient(180deg, var(--ui-gold-hi), transparent); }
.cdb-h em { margin-left: auto; font-style: normal; font-size: 11px; letter-spacing: 0; color: var(--ui-dim); }

.cdb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.cdb-stats .dt-sub { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 12.5px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--ui-line2); border-radius: 2px; }
.cdb-stats .dt-sub span { color: var(--ui-dim); }
.cdb-stats .dt-sub b { color: var(--ui-text); font-variant-numeric: tabular-nums; }
.cdb-note { margin-top: 8px; font-size: 11px; color: var(--ui-dim); }

.cdb-skill { padding: 9px 0; border-bottom: 1px dashed var(--ui-line2); }
.cdb-skill:last-child { border-bottom: none; }
.cdb-skill-h { display: flex; align-items: baseline; gap: 10px; }
.cdb-skill-h b { font-size: 13px; font-weight: 600; color: var(--ui-text); }
.cdb-skill-h em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--ui-gold); }
.cdb-p { margin: 5px 0 0; font-size: 12px; line-height: 1.9; color: var(--ui-dim); }
.cdb-scale { display: inline-block; margin-top: 5px; font-size: 11px; color: var(--ui-gold); }

.cdb-label { margin: 12px 0 8px; font-size: 11.5px; letter-spacing: 1px; color: var(--ui-dim); }
.cdb-label:first-child { margin-top: 0; }
.cdb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cdb-chip { padding: 4px 9px; font-size: 11.5px; color: var(--ui-text); border-radius: 12px;
  border: 1px solid var(--ui-line2); background: rgba(196,168,124,0.07); }
.cdb-chip b { margin-left: 5px; font-weight: 600; color: var(--ui-gold-hi); }

.cdb-ability { display: flex; gap: 10px; padding: 8px 10px; margin-bottom: 6px; border-radius: 3px;
  border: 1px solid var(--ui-line2); border-left: 2px solid var(--ui-gold); background: rgba(255,255,255,0.025); }
.cdb-ab-no { flex: 0 0 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #1a1626; background: var(--ui-gold); border-radius: 50%; }
.cdb-ab-body { min-width: 0; }
.cdb-ab-body b { font-size: 12.5px; color: var(--ui-gold-hi); }
.cdb-sublist { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.cdb-sub { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; font-size: 12px;
  background: rgba(255,255,255,0.03); border-radius: 2px; }
.cdb-sub span { color: var(--ui-dim); }
.cdb-sub b { font-weight: 500; color: var(--ui-text); white-space: nowrap; }

.cdb-eid { padding: 8px 0; border-bottom: 1px dashed var(--ui-line2); }
.cdb-eid:last-child { border-bottom: none; }
.cdb-eid b { font-size: 12.5px; font-weight: 600; color: var(--ui-gold-hi); }

/* ==== 官方美术资源 ==== */
.img-thumb { width:100%; height:100%; display:block; object-fit:cover; }
.img-fallback { display:flex; align-items:center; justify-content:center; width:100%; height:100%;
  font-size:18px; color:#fff; background:linear-gradient(150deg,#3a3a4a,#14141c); }
/* 图鉴卡片缩略图 */
.cc-thumb { position:relative; width:100%; aspect-ratio:1/1; overflow:hidden; border-radius:2px;
  background:linear-gradient(160deg,rgba(255,255,255,0.05),rgba(8,8,14,0.9)); margin-bottom:6px; }
.cc-img { width:100%; height:100%; object-fit:cover; display:block; }
.cc-relic-img { object-fit:contain; }
.cc-badge { position:absolute; width:16px; height:16px; border-radius:50%; overflow:hidden;
  background:rgba(0,0,0,0.55); border:1px solid rgba(255,255,255,0.15); }
.cc-badge:first-of-type { left:4px; top:4px; }
.cc-badge:last-of-type { left:4px; top:22px; }
.badge-ico { width:100%; height:100%; object-fit:contain; display:block; }
.codex-card.locked .cc-thumb { filter:grayscale(100%) brightness(0.5); }
.codex-card.locked .cc-badge { filter:grayscale(100%) brightness(0.7); }
/* 详情头部 */
.cd-hero { display:flex; gap:14px; align-items:center; margin-bottom:14px; padding-bottom:12px; border-bottom:1px solid var(--ui-line2); }
.cd-portrait { width:88px; height:88px; flex:0 0 88px; border-radius:3px; overflow:hidden;
  border:1px solid var(--ui-line); background:rgba(255,255,255,0.03); }
.cd-cone { width:88px; height:110px; }
.cd-mat { width:72px; height:72px; flex:0 0 72px; }
.cd-img { width:100%; height:100%; object-fit:contain; display:block; }
.cd-hero-meta { flex:1; min-width:0; }
.cd-hero-name { font-size:16px; color:var(--ui-text); margin-bottom:8px; letter-spacing:1px; }
.cd-hero-badges { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--ui-dim); }
.cd-hero-badges .badge-ico { width:16px; height:16px; }

/* ==== 各界面图片适配 ==== */
.ci-ava { overflow:hidden; }
.ci-ava-img { width:100%; height:100%; object-fit:cover; display:block; border-radius:2px; }
/* 立绘：铺满中栏卡片（与图鉴同款高清 portrait），cover 不留黑边 */
.pt-img {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%;   /* 高清立绘裁切填充（官方观感） */
  opacity: 0.96;
}
.portrait { position:relative; }
.pt-badge { width:14px; height:14px; object-fit:contain; vertical-align:-2px; margin-right:2px; }
.ava { overflow:hidden; }
.ava-img { width:100%; height:100%; object-fit:cover; display:block; border-radius:2px; }
.ava-img.el-ico { object-fit:contain; padding:3px; }
.ic-glyph { overflow:hidden; }
.ic-img { width:100%; height:100%; object-fit:contain; display:block; }
.dt-glyph { overflow:hidden; }
.dt-img { width:100%; height:100%; object-fit:contain; display:block; }
.gc-glyph { overflow:hidden; }
.gc-img { width:100%; height:100%; object-fit:cover; display:block; border-radius:2px; }

/* ==== 图片骨架屏 + 淡入（防 layout shift） ==== */
.cc-thumb, .ic-glyph, .dt-glyph, .gc-glyph, .ava, .ci-ava, .cd-portrait, .portrait {
  background: linear-gradient(100deg, #16161f 30%, #23232f 50%, #16161f 70%);
  background-size: 200% 100%;
  animation: imgSkeleton 1.4s ease-in-out infinite;
}
.img-ready { animation: none; }
.img-ready.cc-thumb, .cc-thumb.img-ready { background: #101018; }
@keyframes imgSkeleton { 0% { background-position: 180% 0; } 100% { background-position: -80% 0; } }
/* 固定尺寸，图片加载前后不引起重排 */
.cc-img { display:block; width:100%; height:100%; }
.ic-img { display:block; width:100%; height:100%; }
.ava-img, .ci-ava-img { display:block; width:100%; height:100%; object-fit:cover; }
.img-fallback { display:flex; align-items:center; justify-content:center; width:100%; height:100%;
  font-size:18px; color:#fff; background:linear-gradient(150deg,#3a3a4a,#14141c); animation:none; }

/* ==== 关卡锁定 / 难度标红 ==== */
.stage-node.locked { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.7); }
.stage-node.locked:hover { transform: none; border-color: var(--ui-line2); }
.sn-locked { font-size: 11px; color: #e08e8e; margin: 2px 0 4px; line-height: 1.5; }
.sn-lv.hard { color: #e57373; font-weight: 500; }
.abyss-node.locked { opacity: 0.45; cursor: not-allowed; }
.abyss-node.locked:hover { transform: none; border-color: var(--ui-line2); }
.abyss-node .sn-lv.hard { color: #e57373; font-size: 10px; }

/* 未拥有剪影（不加载远程图，保证网格瞬间渲染） */
.cc-silhouette { display:flex; align-items:center; justify-content:center; width:100%; height:100%;
  font-size:26px; color:#3f3f4e; background:linear-gradient(160deg,#1c1c26,#101018);
  text-shadow:0 0 12px rgba(255,255,255,0.04); animation:none; }
.cc-thumb:has(.cc-silhouette) { animation:none; background:#101018; }

/* 未拥有：图片置灰（用户要求 grayscale） */
.codex-card.locked .cc-img { filter: grayscale(100%) brightness(0.55); }
.codex-card.locked .cc-badge { filter: grayscale(100%) brightness(0.7); }
/* 分页 */
.codex-pager { display:flex; align-items:center; justify-content:center; gap:12px; margin:18px 0 6px; }
.pager-info { font-size:11px; color:var(--ui-dim); }

/* 图片淡入兜底：即使 onload 未触发，也在 0.4s 内可见（不依赖 JS） */
.cc-img, .ic-img, .ava-img, .ci-ava-img, .dt-img, .gc-img, .pt-img, .badge-ico, .cd-img {
  animation: imgFadeIn .35s ease .05s forwards;
}
@keyframes imgFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==== 官方主线关卡（星球→区域→关卡） ==== */
.camp-world { margin-bottom: 10px; border:1px solid var(--ui-line2); border-radius:3px; overflow:hidden; }
.cw-title { padding:9px 12px; font-size:13px; color:var(--ui-gold-hi); letter-spacing:1px;
  background:linear-gradient(90deg,rgba(196,168,124,0.12),transparent); border-bottom:1px solid var(--ui-line2); }
.cw-title span { float:right; font-size:11px; color:var(--ui-dim); letter-spacing:0; }
.camp-region { padding:9px 12px 11px; border-bottom:1px solid rgba(255,255,255,0.04); }
.camp-region:last-child { border-bottom:none; }
.cr-title { font-size:11px; color:var(--ui-text); margin-bottom:7px; opacity:0.9; }
.cr-title span { margin-left:8px; color:var(--ui-dim); font-size:10px; }
.camp-nodes { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:6px; }
.camp-node { padding:7px 9px; cursor:pointer; border-radius:2px; border:1px solid var(--ui-line2);
  background:rgba(255,255,255,0.02); transition:.14s ease; }
.camp-node:hover { border-color:var(--ui-gold); transform:translateY(-1px); }
.camp-node.on { border-color:var(--ui-gold-hi); background:rgba(196,168,124,0.1); }
.camp-node.cleared { border-color:rgba(127,207,151,0.5); }
.cn-top { display:flex; justify-content:space-between; gap:6px; align-items:baseline; }
.cn-top b { font-size:11px; color:var(--ui-text); font-weight:500; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.cn-enemy { margin-top:3px; font-size:9px; color:var(--ui-dim); line-height:1.4;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cn-foot { margin-top:4px; font-size:9px; color:var(--ui-gold); }
.camp-node.cleared .cn-foot { color:#7fcf97; }

/* ======== 全局滚动条（去掉系统亮白粗条） ======== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #4a4a5a; border-radius: 3px; transition: background .2s; }
::-webkit-scrollbar-thumb:hover { background: #c4a87c; }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: #4a4a5a transparent; }

/* ======== 官方主线：大卡片网格 ======== */
.camp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; }
.camp-card {
  display:flex; gap:12px; min-height:120px; padding:14px 16px;
  border:1px solid var(--ui-line2); border-radius:6px; cursor:pointer;
  background:linear-gradient(145deg,rgba(255,255,255,0.035),rgba(10,10,16,0.92));
  transition:transform .16s ease, border-color .16s, box-shadow .16s;
}
.camp-card:hover { transform:translateY(-2px); border-color:var(--ui-gold); box-shadow:0 8px 22px rgba(0,0,0,0.45); }
.camp-card.on { border-color:var(--ui-gold-hi); box-shadow:0 0 0 1px var(--ui-gold-hi),0 8px 24px rgba(196,168,124,0.18); }
.camp-card.cleared { border-color:rgba(127,207,151,0.45); }
.camp-card.boss {
  border-color:rgba(196,168,124,0.7);
  background:linear-gradient(145deg,rgba(196,168,124,0.14),rgba(16,12,8,0.95));
  box-shadow:inset 0 0 24px rgba(196,168,124,0.08);
}
.camp-card.boss:hover { border-color:var(--ui-gold-hi); box-shadow:0 0 0 1px var(--ui-gold-hi),0 10px 26px rgba(196,168,124,0.22); }
/* 左侧元素图标堆叠 */
.cc-icons { display:flex; flex-direction:column; gap:6px; align-items:center; flex:0 0 44px; padding-top:2px; }
.cd-el { width:32px; height:32px; border-radius:50%; overflow:hidden; flex:0 0 32px;
  background:rgba(0,0,0,0.5); border:1px solid rgba(255,255,255,0.12); }
.cd-el-img { width:100%; height:100%; object-fit:contain; display:block; }
.cc-boss-tag { font-size:9px; color:#1a1408; background:linear-gradient(180deg,#e8c56a,#c4a87c);
  padding:2px 5px; border-radius:2px; letter-spacing:1px; font-weight:600; }
/* 右侧信息 */
.cc-body { flex:1; min-width:0; display:flex; flex-direction:column; }
.cc-name { font-size:17px; color:var(--ui-text); line-height:1.3; letter-spacing:.5px;
  overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.cc-lv { margin-top:6px; font-size:14px; font-weight:600; color:var(--ui-gold-hi); }
.cc-lv.hard { color:#e57373; }
.cc-enemies { margin-top:5px; font-size:11px; color:var(--ui-dim); line-height:1.4;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cc-reward { margin-top:auto; padding-top:6px; font-size:11px; color:var(--ui-gold); }
.camp-card.cleared .cc-reward { color:#7fcf97; }

/* ======== 大区/区域标题 ======== */
.camp-world { margin-bottom:20px; }
.cw-title { position:relative; padding:12px 4px 12px 18px; margin-bottom:12px;
  border-bottom:1px solid transparent;
  background:linear-gradient(90deg,rgba(196,168,124,0.16),rgba(196,168,124,0.02) 60%,transparent);
  border-radius:3px; }
.cw-title::before { content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:4px; height:22px; border-radius:2px;
  background:linear-gradient(180deg,#e8c56a,#8a7550); box-shadow:0 0 12px rgba(232,197,106,0.55); }
.cw-title b { font-size:19px; letter-spacing:2px; color:var(--ui-gold-hi);
  text-shadow:0 0 16px rgba(232,197,106,0.35); }
.cw-title span { float:right; font-size:11px; color:var(--ui-dim); margin-top:6px; letter-spacing:0; }
.cr-title { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ui-text);
  margin:0 0 10px 2px; padding-bottom:6px;
  border-bottom:1px dashed rgba(196,168,124,0.18); }
.cr-title i { width:3px; height:13px; background:var(--ui-gold); border-radius:2px; display:inline-block; }
.cr-title span { margin-left:auto; font-size:11px; color:var(--ui-dim); }

/* ======== 关卡详情居中弹窗（替代已废弃的底部悬浮栏） ======== */
.stage-view { padding-bottom:24px; }
.sd-wrap {
  /* 只由 .modal-body 承担滚动，禁止弹窗内再套一层进度条 */
  position:relative; width:100%; max-width:100%; box-sizing:border-box; overflow:visible;
  padding:20px 24px 22px; color:var(--ui-text);
  background:linear-gradient(150deg, rgba(30,30,40,0.86), rgba(12,12,19,0.94));
  border:1px solid rgba(212,178,116,0.72);
  clip-path:polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  box-shadow:0 22px 70px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 0 42px rgba(196,168,124,0.05);
  backdrop-filter:blur(18px) saturate(130%); -webkit-backdrop-filter:blur(18px) saturate(130%);
}
.sd-wrap::before {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(115deg, rgba(255,224,160,0.10) 0%, transparent 34%, transparent 70%, rgba(196,168,124,0.07) 100%);
}
.sd-top { display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding-bottom:12px; border-bottom:1px solid var(--ui-line2); }
.sd-title { display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; }
.sd-title b { font-size:21px; letter-spacing:1px; color:var(--ui-gold-hi); }
.sd-title span { font-size:13px; color:var(--ui-dim); }
.sd-boss { font-size:10px; letter-spacing:2px; padding:3px 9px; color:#1c1509;
  background:linear-gradient(180deg,#f0d998,#c4a87c); clip-path:polygon(6px 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%,0 6px); }
.sd-sec { margin-top:16px; }
.sd-sec h4 { margin:0 0 10px; font-size:12px; letter-spacing:2px; color:var(--ui-gold);
  font-weight:600; display:flex; justify-content:space-between; align-items:baseline; }
.sd-sec h4 em { font-size:10px; font-style:normal; letter-spacing:0; color:var(--ui-dim); }
.sd-enemies { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:8px; }
.sd-enemy { display:flex; align-items:center; gap:9px; min-width:0; padding:7px 9px;
  background:rgba(255,255,255,0.035); border:1px solid rgba(255,255,255,0.07); }
.sd-face { flex:0 0 38px; width:38px; height:38px; border-radius:50%; overflow:hidden;
  display:grid; place-items:center; background:radial-gradient(circle at 35% 25%,#4a4055,#17141f 70%);
  border:1px solid rgba(212,178,116,0.45); box-shadow:0 0 10px rgba(0,0,0,0.5); }
.sd-face-img { width:29px; height:29px; object-fit:contain; display:block; }
.sd-face-glyph { font-size:15px; color:var(--ui-gold-hi); font-weight:700; }
.sd-enemy-meta { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }
.sd-enemy-meta b { font-size:13px; color:var(--ui-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sd-enemy-meta em { font-size:10px; color:var(--ui-dim); font-style:normal; }
.sd-weak { flex:0 0 auto; display:flex; gap:3px; }
.sd-weak-i { width:23px; height:23px; border-radius:50%; display:grid; place-items:center;
  background:rgba(0,0,0,0.45); border:1px solid rgba(255,255,255,0.14); }
.sd-weak-img { width:18px; height:18px; object-fit:contain; display:block; }
.sd-weak i { font-size:10px; color:var(--ui-dim); font-style:normal; }
.sd-drops { display:flex; flex-wrap:wrap; gap:8px; }
.sd-item { min-width:96px; display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:8px 6px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.07); }
.sd-item-frame { width:38px; height:38px; display:grid; place-items:center;
  background:radial-gradient(circle,#38313e,#16141d); border:1px solid rgba(212,178,116,0.35); }
.sd-item-img { width:30px; height:30px; object-fit:contain; display:block; }
.sd-item-glyph { font-size:16px; color:var(--ui-gold-hi); }
.sd-item b { font-size:11px; color:var(--ui-text); font-weight:500; }
.sd-item em { font-size:10px; color:var(--ui-gold); font-style:normal; }
.sd-first-sec { border-top:1px dashed rgba(255,255,255,0.08); padding-top:12px; }
.sd-first { display:flex; gap:10px; flex-wrap:wrap; }
.sd-first-i { display:flex; align-items:center; gap:6px; padding:5px 10px;
  background:rgba(196,168,124,0.08); border:1px solid rgba(196,168,124,0.22); }
.sd-first-img { width:22px; height:22px; object-fit:contain; }
.sd-first-i b { font-size:11px; color:var(--ui-dim); font-weight:400; }
.sd-first-i em { font-size:12px; color:var(--ui-gold-hi); font-style:normal; font-weight:700; }
.sd-empty { font-size:12px; color:var(--ui-dim); padding:6px 0; }
.sd-desc { font-size:12px; color:var(--ui-dim); line-height:1.7; }
.sd-desc.sd-bad { color:#ff9a8a; }
.sd-idle-box { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:12px;
  padding:9px 12px; font-size:12px; color:var(--ui-dim);
  background:rgba(120,180,235,0.08); border:1px solid rgba(120,180,235,0.25); }
.sd-idle-box b { font-size:11px; letter-spacing:1px; color:#b9e0ff; }
.sd-idle-box span { flex:1 1 auto; min-width:180px; }
.sd-idle-btn { flex:0 0 auto; }
.sn-idle { margin-top:5px; font-size:10.5px; color:var(--ui-dim); }
.sn-idle.on { color:#b9e0ff; }
.sd-locked { margin-top:14px; padding:8px 12px; font-size:12px; color:#ffc4bd;
  background:rgba(200,60,60,0.12); border:1px solid rgba(229,115,115,0.35); }
.sd-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:20px;
  padding-top:14px; border-top:1px solid var(--ui-line2); }
.sd-actions .btn { min-width:120px; }
.sd-actions .btn.primary.big { min-width:190px; letter-spacing:4px;
  background:linear-gradient(180deg,#f0d998,#c4a87c); color:#1a1408; font-weight:700;
  box-shadow:0 0 24px rgba(196,168,124,0.32) !important; }

/* ==== 强制大网格 + 铺满宽屏（覆盖旧规则） ==== */
.stage-view { max-width: 1720px !important; }
.camp-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 16px !important;
  width: 100%;
}
.camp-card { min-height: 132px; }
@media (min-width: 1600px) {
  .camp-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important; }
}

/* ==== 地图级分类 Tab ==== */
.map-tabs { display:flex; gap:8px; margin:0 0 20px; padding-bottom:2px;
  border-bottom:1px solid var(--ui-line2); overflow-x:auto; }
.map-tab {
  position:relative; padding:11px 22px; font-size:14px; letter-spacing:1.5px;
  color:var(--ui-dim); background:transparent; border:1px solid transparent;
  border-bottom:none; border-radius:5px 5px 0 0; cursor:pointer;
  transition:color .18s, background .18s, border-color .18s; white-space:nowrap;
}
.map-tab:hover { color:var(--ui-text); background:rgba(255,255,255,0.04); }
.map-tab.on {
  color:var(--ui-gold-hi); background:linear-gradient(180deg,rgba(196,168,124,0.14),rgba(196,168,124,0.02));
  border-color:var(--ui-line); border-bottom:none;
}
.map-tab.on::after {
  content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px;
  background:linear-gradient(90deg,transparent,var(--ui-gold-hi),transparent);
  box-shadow:0 0 10px rgba(232,197,106,0.6);
}

/* ==== 材料副本 / 深渊：统一大卡片观感 ==== */
.mat-region .sr-nodes {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px;
}
.mat-region .stage-node { min-height:120px; padding:14px 16px; border-radius:6px; }
.mat-region .sn-head b { font-size:16px; }
.mat-region .sn-lv { font-size:13px; font-weight:600; }
.mat-region .sn-enemies, .mat-region .sn-loot { font-size:12px; margin-top:5px; }
.mat-region .sn-first { font-size:11px; margin-top:auto; }
.abyss-region .abyss-grid { grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.abyss-region .abyss-node { padding:16px 10px; }
.abyss-region .abyss-node b { font-size:15px; }

/* 离线收益：确认按钮区 */
.idle-actions { margin-top:14px; text-align:right; }
.idle-report .ir-time { margin-bottom:12px; font-size:13px; color:var(--ui-text); }
.idle-report .ir-time b { color:var(--ui-gold-hi); font-size:15px; }
.idle-report .ir-sub { margin:-6px 0 12px; font-size:11px; color:var(--ui-dim); line-height:1.6; }

/* ==== 伤害飘字 ==== */
.dmg-float {
  position:absolute; left:50%; top:22%; transform:translateX(-50%);
  font:700 17px/1 "HarmonyOS Sans SC", system-ui, sans-serif;
  color:#e8e8f0; text-shadow:0 2px 6px rgba(0,0,0,0.85);
  pointer-events:none; z-index:60; white-space:nowrap;
  animation:dmgFloat 0.9s cubic-bezier(.2,.8,.3,1) forwards;
}
.dmg-float.crit {
  font-size:24px; color:#ffd76e;
  text-shadow:0 0 12px rgba(255,215,110,0.65),0 2px 8px rgba(0,0,0,0.9);
}
.dmg-float.dot { font-size:15px; font-weight:600; }
@keyframes dmgFloat {
  0%   { opacity:0; transform:translate(-50%,6px) scale(0.85); }
  18%  { opacity:1; transform:translate(-50%,-4px) scale(1.06); }
  100% { opacity:0; transform:translate(-50%,-52px) scale(1); }
}
.unit { position:relative; }

/* ==== 技能播报横幅 ==== */
.skill-banner {
  position:fixed; left:50%; top:41%; transform:translateX(-50%) translateY(-8px);
  padding:14px 48px; border-radius:6px; pointer-events:none; z-index:200;
  font-size:20px; font-weight:700; letter-spacing:4px; color:#ffd76e; white-space:nowrap;
  background:linear-gradient(90deg,rgba(30,22,10,0.92),rgba(52,40,18,0.98) 50%,rgba(30,22,10,0.92));
  box-shadow:0 8px 32px rgba(0,0,0,0.7),0 0 28px rgba(232,197,106,0.18);
  border-top:1px solid rgba(232,197,106,0.45);
  border-bottom:1px solid rgba(232,197,106,0.45);
  text-shadow:0 0 16px rgba(255,215,110,0.7);
  opacity:0; transition:opacity .18s ease, transform .18s ease;
}
.skill-banner.show {
  opacity:1; transform:translateX(-50%) translateY(0);
  animation:bannerPulse 1.5s ease;
}
@keyframes bannerPulse {
  0% { opacity:0; transform:translateX(-50%) translateY(-10px) scale(0.96); }
  22% { opacity:1; transform:translateX(-50%) translateY(0) scale(1); }
  80% { opacity:1; }
  100% { opacity:0; }
}

/* 横幅定位基准 */
.battle-view { position:relative; }

/* ==== 模拟宇宙 ==== */
.univ-view { padding:20px clamp(16px,3vw,40px); max-width:1500px; margin:0 auto; }
.univ-grid { display:grid; grid-template-columns:1.4fr 1fr; gap:16px; }
.univ-panel { border:1px solid var(--ui-line2); border-radius:6px; padding:18px 20px;
  background:linear-gradient(160deg,rgba(255,255,255,0.03),rgba(10,10,16,0.9)); }
.univ-progress { display:flex; gap:10px; margin-bottom:16px; }
.up-dot { width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:13px; color:var(--ui-dim); border:1px solid var(--ui-line2); background:rgba(0,0,0,0.35); }
.up-dot.done { color:#1a1408; background:linear-gradient(180deg,#e8c56a,#c4a87c); border-color:#e8c56a; font-weight:700; }
.up-dot.fail { color:#ffd0d0; background:rgba(200,60,60,0.35); border-color:#c85a5a; }
.univ-actions { margin-bottom:14px; }
.univ-running { color:var(--ui-gold-hi); font-size:13px; letter-spacing:1px; }
.univ-log { list-style:none; margin:0; padding:0; font-size:12px; color:var(--ui-dim); line-height:2; }
.univ-log li { border-bottom:1px dashed rgba(255,255,255,0.06); }
.univ-panel h3 { margin:0 0 12px; font-size:14px; color:var(--ui-gold-hi); letter-spacing:1px; font-weight:500; }
.univ-blessings { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.univ-bl { padding:5px 12px; border-radius:3px; font-size:12px; color:#ffe9b8;
  background:rgba(196,168,124,0.14); border:1px solid rgba(196,168,124,0.35); }
.univ-empty { font-size:12px; color:var(--ui-dim); }
.univ-stats { font-size:12px; color:var(--ui-dim); line-height:2.1; }
.univ-stats b { color:var(--ui-gold-hi); margin-left:6px; }
.univ-reward { margin-top:14px; padding:10px 12px; border-radius:4px; font-size:13px; color:var(--ui-gold-hi);
  background:rgba(196,168,124,0.12); border:1px solid rgba(196,168,124,0.4); }
.univ-pick .up-hint { font-size:12px; color:var(--ui-dim); margin-bottom:12px; }
.up-card { padding:14px 16px; margin-bottom:10px; border-radius:5px; cursor:pointer;
  border:1px solid var(--ui-line2); background:rgba(255,255,255,0.03); transition:.15s; }
.up-card:hover { border-color:var(--ui-gold); transform:translateX(3px); }
.up-card b { display:block; font-size:14px; color:var(--ui-gold-hi); margin-bottom:5px; }
.up-card span { font-size:12px; color:var(--ui-dim); }

/* 命途选择：3 张横向紧凑卡片，禁止巨幅图标把弹窗撑成竖向长条 */
.univ-pick.path-pick { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.univ-pick.path-pick .up-hint { grid-column:1 / -1; margin-bottom:2px; }
.path-card { display:flex; align-items:center; gap:9px; margin:0; padding:10px; min-width:0; }
.path-card:hover { transform:translateY(-2px); }
.up-path-ico { flex:0 0 44px; width:44px; height:44px; object-fit:contain;
  background:rgba(0,0,0,0.35); border:1px solid rgba(196,168,124,0.28); padding:3px; }
.up-card-meta { min-width:0; }
.path-card b { margin:0 0 4px; font-size:12.5px; }
.path-card span { display:block; font-size:11px; line-height:1.4; }
.path-card em { display:block; margin-top:4px; font-style:normal; font-size:10px; color:var(--ui-gold); }

/* ==== 战斗界面：上下对峙布局（敌方贴顶 / 我方贴底） ==== */
.battle-view .arena {
  flex-direction: column !important;
  /* 敌方贴顶、我方贴底，中间为战斗演出留白（官方战斗视角） */
  justify-content: space-between !important;
  align-items: center !important;
  gap: 22px !important;
  padding: 10px 2% 14px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}
.battle-view .side {
  flex: 0 0 auto !important;
  width: 100% !important;
  align-items: center !important;
  margin: 0 !important;
}
.battle-view .side.enemy-side { order: 1; }
.battle-view .side.ally-side { order: 2; }
.battle-view .side-title {
  width: 100%; text-align: center; margin-bottom: 10px;
  font-size: 12px; letter-spacing: 2px; color: var(--ui-dim);
}
.battle-view .team {
  flex-direction: row !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 12px !important;
  width: 100%;
}
/* 横排卡片收窄，保证 3~4 张并排且中间留白 */
.battle-view .unit {
  /* 弹性均分：3~5 人都能排成一行（原 max-width:24% 在 5 人时超 120% 会换行） */
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  max-width: 320px;
}

/* ==== 升级面板 ==== */
.lp-wrap { display:grid; grid-template-columns:1fr 1fr; gap:22px; min-width:620px; }
/* 晋阶弹窗内容较窄：不强制 620px，避免桌面端出现横向滚动条 */
.as-wrap.lp-wrap { min-width:0; width:100%; }
.lp-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:14px;
  padding-bottom:10px; border-bottom:1px solid var(--ui-line2); }
.lp-head b { font-size:17px; color:var(--ui-gold-hi); letter-spacing:1px; }
.lp-head span { font-size:13px; color:var(--ui-dim); }
.lp-row { display:flex; justify-content:space-between; padding:8px 0; font-size:13px;
  border-bottom:1px dashed rgba(255,255,255,0.06); }
.lp-row span { color:var(--ui-dim); }
.lp-row b { color:var(--ui-text); font-weight:500; }
.lp-row i { color:#7fcf97; font-style:normal; font-weight:700; }
.lp-ascend { margin-top:12px; padding:8px 12px; font-size:12px; color:#ffd76e;
  background:rgba(196,168,124,0.12); border:1px solid rgba(196,168,124,0.35); border-radius:4px; }
.lp-slider { width:100%; margin:8px 0 4px; accent-color:#c4a87c; }
.lp-ticks { display:flex; justify-content:space-between; font-size:11px; color:var(--ui-dim); margin-bottom:16px; }
.lp-cost { margin-bottom:12px; }
.lp-cost-row { display:flex; align-items:baseline; gap:8px; padding:7px 10px; font-size:12px;
  border-radius:4px; background:rgba(255,255,255,0.03); margin-bottom:6px; }
.lp-cost-row span { color:var(--ui-dim); flex:1; }
.lp-cost-row b { color:var(--ui-gold-hi); }
.lp-cost-row em { font-style:normal; font-size:11px; color:var(--ui-dim); }
.lp-cost-row.lack { background:rgba(200,60,60,0.12); }
.lp-cost-row.lack b, .lp-cost-row.lack em { color:#ff8a8a; }
.lp-miss { font-size:12px; color:#ff8a8a; margin-bottom:10px; padding:8px 10px;
  border:1px solid rgba(229,115,115,0.35); border-radius:3px; background:rgba(200,60,60,0.12); }
/* 不随升级变化的属性（速度/暴击）：淡化展示便于对比 */
.lp-row.fixed b { color:var(--ui-dim); }
/* 目标等级直接输入 */
.lp-target { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ui-dim); margin-bottom:12px; }
.lp-num { width:74px; padding:6px 8px; font-size:14px; color:var(--ui-gold-hi);
  background:rgba(255,255,255,0.04); border:1px solid var(--ui-line2); border-radius:3px;
  font-variant-numeric:tabular-nums; }
.lp-num:focus { outline:none; border-color:var(--ui-gold); }

/* ==== 编队界面 ==== */
.team-view { padding:20px clamp(16px,3vw,40px) 16px; max-width:1500px; margin:0 auto; width:100%;
  display:flex; flex-direction:column; height:calc(100vh - 85px); box-sizing:border-box; }
/* 父级 .stage 是 flex 容器：margin:auto 会把视图收缩到 max-content（970px），
   必须 width:100% 才能占满 max-width。 */)
/* 竖向布局：队伍编辑区（横向4槽）在上，「我的角色」在下撑满到底缘、内部滚动 */
.tm-grid { display:flex; flex-direction:column; gap:16px; flex:1; min-height:0; }
.tm-panel { border:1px solid var(--ui-line2); border-radius:6px; padding:16px 18px;
  background:linear-gradient(160deg,rgba(255,255,255,0.03),rgba(10,10,16,0.9)); }
.tm-panel h3 { margin:0 0 14px; font-size:14px; color:var(--ui-gold-hi); letter-spacing:1px; font-weight:500; }
.tm-panel h3 em { font-style:normal; float:right; font-size:12px; color:var(--ui-dim); }
.tm-slots { display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; }
.tm-slot { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  padding:12px 6px; border-radius:5px; text-align:center; cursor:pointer; transition:.15s; }
.tm-slot.empty { color:var(--ui-dim); font-size:12px; min-height:150px; }
.tm-slot.filled { border-style:solid; border-color:rgba(196,168,124,0.4);
  background:rgba(196,168,124,0.06); }
.tm-slot.filled:hover { border-color:var(--ui-gold); }
.tm-ava { width:56px; height:56px; border-radius:50%; object-fit:cover; flex:0 0 56px;
  background:rgba(0,0,0,0.4); }
.tm-info { flex:1; min-width:0; width:100%; text-align:center; }
.tm-info b { display:block; font-size:13px; color:var(--ui-text); }
.tm-info span { font-size:10.5px; color:var(--ui-dim); }
.tm-ops .btn.tiny { padding:3px 10px; font-size:11px; }
.tm-tip { margin-top:14px; font-size:11px; color:var(--ui-dim); }
/* 角色列表：面板本体撑到底部边缘（min-height 到视口余量），列表内部滚动、永不被裁切 */
.tm-panel-roster { display:flex; flex-direction:column; flex:1; min-height:280px; box-sizing:border-box; }
.tm-panel-roster .char-grid { flex:1; min-height:0; align-content:start; }
.tm-list { display:flex; flex-direction:column; gap:8px; flex:1; min-height:0;
  max-height:none; overflow-y:auto; padding-right:4px; }
.tm-row { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:5px;
  border:1px solid var(--ui-line2); cursor:pointer; transition:.15s; background:rgba(255,255,255,0.02); }
.tm-row:hover { border-color:var(--ui-gold); transform:translateX(2px); }
.tm-row.on { border-color:rgba(127,207,151,0.45); background:rgba(127,207,151,0.06); }
.tm-row-ava { width:44px; height:44px; border-radius:50%; object-fit:cover; flex:0 0 44px;
  background:rgba(0,0,0,0.4); }
.tm-row-info { flex:1; min-width:0; }
.tm-row-info b { display:block; font-size:13px; color:var(--ui-text); }
.tm-row-info span { font-size:11px; color:var(--ui-dim); }
.tm-badge { font-size:11px; color:var(--ui-gold); padding:3px 9px; border-radius:3px;
  background:rgba(196,168,124,0.14); }
.tm-row.on .tm-badge { color:#7fcf97; background:rgba(127,207,151,0.16); }

/* ==== 战斗打击感：突刺 / 受击震动 + 红光 ==== */
.unit.lunge { animation: unitLunge .24s cubic-bezier(.2,.8,.3,1); z-index:30; }
@keyframes unitLunge {
  0%   { transform:translateY(0) scale(1); }
  40%  { transform:translateY(-30px) scale(1.04); filter:brightness(1.25); }
  100% { transform:translateY(0) scale(1); }
}
.unit.hit { animation:unitShake .3s ease; }
@keyframes unitShake {
  0%   { transform:translateX(0); background-color:var(--ui-card); }
  18%  { transform:translateX(-9px); background-color:rgba(255,60,60,0.42); filter:brightness(1.35); }
  38%  { transform:translateX(8px);  background-color:rgba(255,60,60,0.34); }
  58%  { transform:translateX(-6px); background-color:rgba(255,60,60,0.24); }
  78%  { transform:translateX(4px);  background-color:rgba(255,60,60,0.12); }
  100% { transform:translateX(0);    background-color:var(--ui-card); }
}

/* ==== 多单位同排（最多 8 个，含召唤物等友方）：按数量自动紧凑 ==== */
/* 6~7 个：略紧凑 */
.battle-view .team:has(> .unit:nth-child(6)) .unit {
  grid-template-columns: 36px 1fr !important;
  gap: 7px !important;
  padding: 7px 8px !important;
}
.battle-view .team:has(> .unit:nth-child(6)) .unit .ava {
  width: 36px !important; height: 36px !important;
}
.battle-view .team:has(> .unit:nth-child(6)) .unit .name { font-size: 11.5px; }
/* 8 个：最紧凑 */
.battle-view .team:has(> .unit:nth-child(8)) .unit {
  grid-template-columns: 30px 1fr !important;
  gap: 6px !important;
  padding: 6px 7px !important;
}
.battle-view .team:has(> .unit:nth-child(8)) .unit .ava {
  width: 30px !important; height: 30px !important;
}
.battle-view .team:has(> .unit:nth-child(8)) .unit .name { font-size: 11px; }
.battle-view .team:has(> .unit:nth-child(6)) .unit .meta,
.battle-view .team:has(> .unit:nth-child(6)) .unit .lv { font-size: 10.5px; }
/* 多单位时弱化弱点图标行，避免挤压血条 */
.battle-view .team:has(> .unit:nth-child(7)) .unit .weak-row { display: none; }

/* ==== 卡片标题行：名字省略、职业/等级不换行（多单位同排时不被挤断） ==== */
.battle-view .unit .row1 { gap: 4px; align-items: center; }
.battle-view .unit .nm { flex: 1 1 auto; min-width: 0; }
.battle-view .unit .role { flex: 0 0 auto; white-space: nowrap; }
.battle-view .unit .lv { flex: 0 0 auto; white-space: nowrap; }
/* 8 个以上同排时隐藏等级（空间优先给名字与血条） */
.battle-view .team:has(> .unit:nth-child(8)) .unit .lv { display: none; }

/* ==== 战斗卡片图标：头像/命途/元素/弱点统一尺寸（原 img 无约束会撑到 200px+） ==== */
.battle-view .unit .ava { overflow: hidden; }
.battle-view .unit .ava .ava-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.battle-view .unit .ava .el-ico {
  width: 78%; height: 78%; object-fit: contain;
}
/* 名字右侧的命途 + 元素徽标 */
.battle-view .unit .badges {
  display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto;
}
.battle-view .unit .badge-ico {
  width: 15px; height: 15px; object-fit: contain; display: block;
  /* 部分元素图标（如物理的灰白菱形）在深色卡上偏暗，提亮 + 投影增强辨识 */
  filter: brightness(1.22) drop-shadow(0 1px 2px rgba(0,0,0,.85));
}
/* 敌方弱点图标 */
.battle-view .unit .weak-ico {
  width: 14px; height: 14px; object-fit: contain; display: inline-block;
  vertical-align: -2px; margin-right: 2px;
  filter: brightness(1.22) drop-shadow(0 1px 2px rgba(0,0,0,.85));
}
/* 紧凑模式（6+ 单位）下缩小徽标 */
.battle-view .team:has(> .unit:nth-child(6)) .unit .badge-ico { width: 13px; height: 13px; }
.battle-view .team:has(> .unit:nth-child(8)) .unit .badge-ico { width: 12px; height: 12px; }

/* ==== 背包：筛选 tab 加大并居中；空状态跨满网格居中放大 ==== */
.inv-head { position: relative; justify-content: center; margin-bottom: 6px; }
.inv-head .tabs { gap: 10px; }
.inv-head .tabs .tab {
  padding: 8px 26px; font-size: 14px; letter-spacing: 1px; border-radius: 4px;
}
.inv-count {
  position: absolute; right: 116px; top: 50%; transform: translateY(-50%);  /* 右侧给「分解」按钮让位 */
}
@media (max-width: 900px) {
  .inv-head { justify-content: flex-start; flex-wrap: wrap; }
  .inv-count { position: static; transform: none; margin-left: auto; }
  .btn-dismantle { position: static; transform: none; margin-left: 8px; }
}
/* 空状态：作为 grid 项跨满整行，大字居中 */
.item-grid > .detail-empty {
  grid-column: 1 / -1;
  min-height: 42vh;                 /* 在内容区垂直居中，不再贴顶 */
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  font-size: 15px; letter-spacing: .5px;
  text-align: center; color: var(--ui-dim); line-height: 2;
}

/* ==== 跃迁：概率公示表（官方风格） ==== */
.prob-wrap { min-width: 560px; max-width: 92vw; }
.prob-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.prob-table th, .prob-table td {
  padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--ui-line2, rgba(255,255,255,.08));
  vertical-align: top;
}
.prob-table th { color: var(--ui-gold, #d8b96a); font-weight: 500; letter-spacing: 1px; }
.prob-table td:first-child { color: #e8dcc0; white-space: nowrap; }
.prob-table td:nth-child(2), .prob-table td:nth-child(3) {
  font-family: Consolas, monospace; color: #bfe3ff; white-space: nowrap;
}
.prob-table td:last-child { color: var(--ui-dim, #9a97ad); line-height: 1.6; }
.prob-foot { margin-top: 12px; font-size: 12px; color: var(--ui-dim, #9a97ad); line-height: 1.7; }

/* ==== 弹窗对比度增强：深色背景下与遮罩区分开（原 #1a1a24 与 0.8 遮罩几乎同色） ==== */
.modal {
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: none;   /* 移除模糊：headless/部分合成器下会导致弹窗半透明穿透 */
}
.modal-box {
  /* 不加 !important：浅色弹窗主题（.modal-box.light，属性详情）需要能覆盖 */
  background: linear-gradient(180deg, #242434, #15151d);
  border: 1px solid rgba(216, 185, 106, 0.32);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.modal-head {
  background: rgba(216, 185, 106, 0.07);
  border-bottom: 1px solid rgba(216, 185, 106, 0.22);
}

/* ==== 装备光锥：角色选择弹窗 ==== */
.cone-pick-wrap {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 56vh; overflow-y: auto; padding: 2px;
}
.cone-pick {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left;
  background: var(--bg-soft, rgba(255,255,255,.03));
  border: 1px solid var(--line-soft, rgba(255,255,255,.08));
  color: var(--text, #e8e6f0); transition: border-color .15s, background .15s;
}
.cone-pick:hover:not(.off) { border-color: var(--line, rgba(216,185,106,.45)); background: rgba(216,185,106,.08); }
.cone-pick.off { opacity: .38; cursor: not-allowed; }
.cone-pick .cp-ava {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
}
.cone-pick .cp-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.cone-pick .cp-info b { font-size: 13.5px; font-weight: 500; }
.cone-pick .cp-info i { font-size: 11.5px; font-style: normal; color: var(--text-dim, #9a97ad); }
.cone-pick .cp-cur {
  flex: 0 0 auto; font-size: 11.5px; color: var(--text-dim, #9a97ad);
  max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dt-foot .btn[disabled] { opacity: .42; cursor: not-allowed; }

/* ============================================================
   跃迁 2.0：左侧版本列表 + 右侧卡池（立绘 / 4★ 列表）
   ============================================================ */
.gv2 { display: flex; gap: 16px; align-items: flex-start; }
.gv2-side {
  flex: 0 0 170px; padding: 12px 10px; border: 1px solid var(--ui-line2);
  border-radius: 4px; background: rgba(16, 16, 23, 0.72);
  display: flex; flex-direction: column; gap: 8px; position: sticky; top: 8px;
}
.gv2-side-h { font-size: 11px; letter-spacing: 2px; color: var(--ui-gold); }
.gv2-vers { display: flex; flex-direction: column; gap: 6px; }
.gv-ver {
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  padding: 7px 9px; border-radius: 4px;
  border: 1px solid var(--ui-line2); background: rgba(255, 255, 255, 0.02); color: inherit;
}
.gv-ver:hover { border-color: var(--ui-line); background: rgba(216, 185, 106, 0.07); }
.gv-ver.on { border-color: var(--ui-gold); background: rgba(216, 185, 106, 0.14); }
.gv-ver b { font-size: 15px; color: var(--ui-gold-hi); letter-spacing: 1px; }
.gv-ver span { font-size: 11px; color: var(--ui-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gv-ver em { font-style: normal; font-size: 10.5px; color: var(--ui-gold); opacity: .75; }
.gv2-side-foot { margin-top: 4px; font-size: 10.5px; line-height: 1.6; color: var(--ui-dim); opacity: .8; }
.gv2-empty { font-size: 11.5px; color: var(--ui-dim); padding: 8px 2px; }
.gv2-main { flex: 1 1 auto; min-width: 0; }

/* 头部：期数 + 资源 */
.gv2-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.gv-phase { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gv-ph {
  display: flex; flex-direction: column; gap: 1px; padding: 5px 14px; cursor: pointer;
  border: 1px solid var(--ui-line2); border-radius: 4px; background: rgba(255,255,255,.02); color: inherit;
}
.gv-ph b { font-size: 12.5px; font-weight: 500; }
.gv-ph span { font-size: 10.5px; color: var(--ui-dim); }
.gv-ph.on { border-color: var(--ui-gold); background: rgba(216,185,106,.14); }
.gv-ph.on b { color: var(--ui-gold-hi); }
.gv-ph-btn {
  width: 26px; height: 32px; cursor: pointer; color: var(--ui-dim);
  border: 1px solid var(--ui-line2); border-radius: 4px; background: rgba(255,255,255,.02);
}
.gv-ph-btn:hover { color: var(--ui-gold-hi); border-color: var(--ui-line); }
.gv2-res { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* banner：左立绘 + 右文案 */
.gv2 .gv-banner {
  flex-direction: row; align-items: stretch; justify-content: flex-start;
  height: 268px; padding: 0; margin-bottom: 14px; overflow: hidden;
}
.gvb-art {
  flex: 0 0 280px; position: relative; display: flex; align-items: flex-end; justify-content: center;
  background:
    radial-gradient(circle at 50% 78%, color-mix(in srgb, var(--q, #5a6b8c) 62%, transparent), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.35));
  border-right: 1px solid rgba(255,255,255,.06);
}
.gvb-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 22px rgba(0,0,0,.65)); }
.gvb-badge {
  align-self: center; font-size: 62px; font-weight: 700; letter-spacing: 2px;
  color: rgba(255,255,255,.16); font-family: Georgia, serif;
}
.gvb-info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 7px; justify-content: center; padding: 26px 32px; min-width: 0; }
.gv2 .bn-tag { position: static; align-self: flex-start; margin-bottom: 2px; }
.gvb-info b { font-size: 30px; letter-spacing: 5px; color: var(--ui-gold-hi); }
.gvb-info i { font-style: normal; font-size: 12px; color: var(--ui-dim); letter-spacing: 1px; }
.gvb-ver { margin-top: 6px; font-size: 11px; color: var(--ui-gold); opacity: .8; letter-spacing: 1px; }

/* 4★ 池展示 */
.gv-pool { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.gv-sec-h {
  font-size: 12px; color: var(--ui-gold); letter-spacing: 1.5px; margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.gv-sec-h em { font-style: normal; color: var(--ui-dim); font-size: 11px; }
.gv4-ups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gv4-card {
  border: 1px solid rgba(181, 122, 224, 0.45); border-radius: 4px;
  background: linear-gradient(160deg, rgba(181,122,224,.12), rgba(20,20,28,.8));
  padding: 8px; text-align: center;
}
.gv4-img { height: 104px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gv4-pic { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.gv4-name { margin-top: 5px; font-size: 13px; color: #d9bdf5; }
.gv4-sub { margin-top: 2px; font-size: 10.5px; color: var(--ui-dim); }
.gv4-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.gv4-mini {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; border-radius: 4px; border: 1px solid var(--ui-line2);
  background: rgba(255,255,255,.02);
}
.gv4-mini-img {
  width: 46px; height: 46px; object-fit: cover; border-radius: 3px;
  border: 1px solid var(--q, rgba(255,255,255,.15));
}
.gv4-mini span {
  font-size: 10px; color: var(--ui-dim); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 1100px) {
  .gv2 { flex-direction: column; }
  .gv2-side { flex: 1 1 auto; width: 100%; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .gv2-side-h, .gv2-side-foot { display: none; }
  .gv2-vers { flex-direction: row; flex-wrap: wrap; }
  .gv2 .gv-banner { height: 210px; }
  .gvb-art { flex-basis: 180px; }
  .gvb-info b { font-size: 22px; letter-spacing: 3px; }
}
.gv2-vers { max-height: 62vh; overflow-y: auto; padding-right: 2px; }
.gv-ver.off { opacity: .38; cursor: not-allowed; }
.gv-ver.off:hover { border-color: var(--ui-line2); background: rgba(255,255,255,.02); }

/* ==== 角色列表：一排 3 个往下排 + 元素/命途筛选 + 星级边框 ==== */
.char-list { min-width: 250px; }
.cl-filter { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.cl-f-row { display: flex; gap: 3px; flex-wrap: wrap; }
.cl-f-btn {
  width: 26px; height: 26px; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--ui-line2); border-radius: 4px;
  background: rgba(255, 255, 255, 0.03); color: var(--ui-dim); font-size: 11px;
}
.cl-f-btn:hover { border-color: var(--ui-line); }
.cl-f-btn.on { border-color: var(--ui-gold); background: rgba(216, 185, 106, 0.15); color: var(--ui-gold-hi); }
.cl-f-ico { width: 16px; height: 16px; object-fit: contain; }
.cl-f-select {
  padding: 5px 8px; border-radius: 4px; font-size: 12px; color: var(--text);
  background: var(--ui-soft, rgba(255,255,255,.04)); border: 1px solid var(--ui-line2);
}
.char-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.char-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 3px 6px; border-radius: 6px; cursor: pointer; text-align: center;
  border: 1px solid var(--ui-line2); background: rgba(255, 255, 255, 0.025);
  transition: border-color .15s, background .15s;
}
.char-cell:hover { background: rgba(196, 168, 124, 0.08); }
.char-cell.on { border-color: var(--ui-line); background: rgba(196, 168, 124, 0.12); }
.char-cell.r5 { border-color: rgba(232, 197, 106, 0.5); }
.char-cell.r5.on { border-color: var(--ui-gold-hi); }
.char-cell.r4 { border-color: rgba(181, 122, 224, 0.45); }
.char-cell.r4.on { border-color: #b57ae0; }
.char-cell .cc-ava {
  position: relative; width: 44px; height: 44px; border-radius: 4px; overflow: visible;
  display: flex; align-items: center; justify-content: center;
}
.char-cell .cc-img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.char-cell .cc-team {
  position: absolute; right: -3px; bottom: -3px; font-size: 9px; padding: 1px 3px;
  border-radius: 3px; background: rgba(216, 185, 106, 0.9); color: #1c1c22; font-weight: 700;
}
.char-cell .cc-name {
  font-size: 11px; color: var(--text); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.char-cell .cc-lv { font-size: 9.5px; color: var(--ui-dim); }
.cl-empty { grid-column: 1 / -1; font-size: 12px; color: var(--ui-dim); text-align: center; padding: 16px 0; }

/* ==== 背包：光锥筛选条 ==== */
.inv-fbar {
  grid-column: 1 / -1;                       /* 在 inv-body 网格中跨满一行 */
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px clamp(16px, 3vw, 40px);
}
.inv-fbar select {
  padding: 6px 10px; border-radius: 4px; font-size: 12px; color: var(--text);
  background: var(--ui-soft, rgba(255,255,255,.04)); border: 1px solid var(--ui-line2);
}

/* ==== 行动条：左侧竖排·垂直居中 · 无边框 · 无滚动条 ==== */
.battle-view { position: relative; }
.battle-view .actionbar {
  position: absolute !important;
  left: 14px; top: 50%; bottom: auto; transform: translateY(-50%);
  max-height: calc(100% - 180px);
  width: 88px;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  overflow-y: auto !important; overflow-x: visible !important;
  /* 顶部留白须容纳 lead 的 scale(1.2) 上溢（origin bottom → 上移约 12px） */
  padding: 14px 2px 12px !important;
  border: none !important;
  background: transparent !important;
  z-index: 6;
  scrollbar-width: none;               /* Firefox 隐藏滚动条 */
  -ms-overflow-style: none;
}
.battle-view .actionbar::-webkit-scrollbar { display: none; }  /* WebKit 隐藏滚动条 */
/* 竖排时名字在头像正下，宽度受限 */
.battle-view .actionbar .av-node { width: 100%; }
.battle-view .actionbar .av-cap {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10px; padding: 0 4px;
}
.battle-view .actionbar .av-face-wrap { width: 40px; height: 40px; }
/* 竖排：NEXT 胶囊悬空在头像上方会被滚动容器裁掉，金色 ▶ 名字已标识下一个行动者 */
.battle-view .actionbar .av-next { display: none; }
/* 给竖条让位：战区左侧留白 */
.battle-view .arena { padding-left: 112px !important; }
/* 移动端窄屏：竖条收窄 */
@media (max-width: 1100px) {
  .battle-view .actionbar { width: 70px; left: 8px; top: 8px; bottom: 96px; }
  .battle-view .actionbar .av-face-wrap { width: 32px; height: 32px; }
  .battle-view .arena { padding-left: 88px !important; }
}
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ==== 自定义下拉（替代原生 select 的白色系统面板） ==== */
.dd { position: relative; display: inline-block; min-width: 128px; }
.dd-face {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 7px 11px; cursor: pointer; text-align: left;
  border: 1px solid var(--ui-line2, rgba(255,255,255,.14)); border-radius: 5px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  color: var(--text, #e8e6f0); font-size: 12.5px;
}
.dd-face:hover { border-color: var(--ui-line, rgba(216,185,106,.45)); }
.dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-arrow { font-style: normal; font-size: 10px; color: var(--ui-dim, #9a97ad); transition: transform .16s; }
.dd.open .dd-arrow { transform: rotate(180deg); color: var(--ui-gold, #d8b96a); }
.dd.open .dd-face { border-color: var(--ui-gold, #d8b96a); }
.dd-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  display: none; flex-direction: column; gap: 2px;
  padding: 5px; border-radius: 6px;
  background: #1e1e2a;
  border: 1px solid rgba(216, 185, 106, 0.28);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.75);
  max-height: 224px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #4a445e transparent;
}
.dd.open .dd-menu { display: flex; animation: ddIn .14s ease; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-item {
  width: 100%; padding: 7px 10px; cursor: pointer; text-align: left;
  border: none; border-radius: 4px; background: transparent;
  color: var(--text-dim, #b9b6c9); font-size: 12.5px;
}
.dd-item:hover { background: rgba(216, 185, 106, 0.13); color: var(--text, #fff); }
.dd-item.on { background: rgba(216, 185, 106, 0.18); color: var(--ui-gold-hi, #f0d998); }
.dd-empty { padding: 10px; font-size: 12px; color: var(--ui-dim); text-align: center; }
/* 角色列表里命途下拉占满宽度 */
.cl-dd { width: 100%; }
.cl-dd .dd { width: 100%; }

/* ==== 编队页：我的角色面板（三列网格 + 筛选，与角色页一致） ==== */
.tm-panel-roster { min-width: 300px; flex: 1 1 420px; }
.tm-panel-roster .char-grid { overflow-y: auto; padding-right: 4px;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }   /* 高度由面板 flex 接管；列密度与图鉴一致 */
.tm-panel-roster .cl-filter { margin-bottom: 8px; }

/* ==== 跃迁 banner：立绘放大（对齐官方卡池观感） ==== */
.gv2 .gv-banner { height: 300px; }
.gvb-art { flex: 0 0 330px; }
/* 角色立绘用 cover 放大裁切：人物更大更饱满；底部对齐（立绘人物多在中下） */
.gv2 .gvb-img.gvb-char { object-fit: cover; object-position: center 22%; }
/* 光锥大图保持完整构图 */
.gv2 .gvb-img { object-fit: contain; }
/* 4★ UP 卡片图也放大一档 */
.gv4-img { height: 128px; }
.gv4-ups { gap: 12px; }
.gv4-name { font-size: 14px; }
@media (max-width: 1100px) {
  .gv2 .gv-banner { height: 240px; }
  .gvb-art { flex-basis: 200px; }
}

/* ==== 背包分页页脚 ==== */
.inv-pager {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 14px 0 4px;
}
.inv-pager .pg-ind { font-size: 11.5px; color: var(--ui-dim); letter-spacing: 1px; }
.inv-pager .btn.mini { min-width: 72px; }

/* ==== 未获取卡片：正常显示图片 + 置灰 + 半透明黑遮罩（不再压暗文字）==== */
.codex-card.locked { filter: none; }
.codex-card.locked .cc-thumb { filter: none; position: relative; }
.codex-card.locked .cc-img { filter: grayscale(0.85) brightness(0.95); }
.codex-card.locked .cc-badge { filter: grayscale(0.6) brightness(0.95); z-index: 2; }
.codex-card.locked .cc-thumb::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(6, 6, 10, 0.38); pointer-events: none; z-index: 1;
}
.codex-card.locked .cc-lock {
  inset: 4px 4px auto auto; width: auto; height: auto;
  padding: 1px 6px; font-size: 9.5px; color: #d8d8de;
  background: rgba(0, 0, 0, 0.55); border-radius: 2px; z-index: 2;
}

/* ==== 经验池升级面板（总经验判定 + MAX / 一键升级）==== */
.lp-slide-row { display: flex; align-items: center; gap: 8px; }
.lp-slide-row .lp-slider { flex: 1 1 auto; width: auto; }
.lp-max { flex: 0 0 auto; min-width: 54px; height: 26px; font-size: 11px; letter-spacing: 1px; }
.lp-plan-line { padding: 4px 10px 0; font-size: 11.5px; line-height: 1.75; color: var(--ui-dim); }
.lp-plan-line i { font-style: normal; color: #7fcf97; }
.lp-btns { display: flex; gap: 8px; }
.lp-btns .btn { flex: 1 1 0; }
.lp-btns .btn.big { flex: 1.15 1 0; }

@media (max-width: 768px) {
  .lp-wrap { grid-template-columns: 1fr !important; min-width: 0 !important; gap: 14px; }
  .lp-btns { flex-wrap: wrap; }
  .lp-btns .btn, .lp-btns .btn.big { flex: 1 1 100%; }
}
.lp-btns .btn { white-space: nowrap; }

/* ==== 忘却之庭双编队（队伍页顶部） ==== */
.abyss-team-bar { display:flex; align-items:center; flex-wrap:wrap; gap:12px;
  margin:12px 0 16px; padding:10px 14px;
  background:linear-gradient(100deg,rgba(196,168,124,0.10),rgba(255,255,255,0.02));
  border:1px solid rgba(196,168,124,0.32); }
.abyss-team-bar b { font-size:13px; letter-spacing:1px; color:var(--ui-gold-hi); }
.abyss-team-bar label { font-size:12px; color:var(--ui-dim); display:flex; align-items:center; gap:6px; }
.at-sel { max-width:190px; padding:5px 8px; color:var(--ui-text);
  background:rgba(0,0,0,0.45); border:1px solid var(--ui-line2); }
.at-status { font-size:11.5px; }
.at-status.ok { color:#8bd6a0; }
.at-status.bad { color:#ff9a8a; }

/* 战斗界面模式标识：一眼区分模拟宇宙/忘却之庭/材料副本/主线 */
.battle-mode { margin:2px auto 6px; padding:3px 14px; font-size:11.5px; letter-spacing:1px;
  color:var(--ui-gold-hi); background:rgba(196,168,124,0.10);
  border:1px solid rgba(196,168,124,0.32); border-radius:2px; white-space:nowrap; }
.battle-mode.universe { color:#b9e0ff; border-color:rgba(120,180,235,0.45);
  background:rgba(80,140,210,0.12); }


/* ===================================================================
 * 分解弹窗 + 官方级筛选（用户 2026-11-20 需求）
 * =================================================================== */
.btn-danger { color: #ff9d9d; border-color: rgba(255,120,120,0.4); }
.btn-danger:hover { background: rgba(255,90,90,0.14); border-color: rgba(255,120,120,0.7); }
.btn-dismantle {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  padding: 5px 16px; font-size: 12.5px; color: #ffd7a8;
  border: 1px solid var(--ui-line); background: rgba(196,168,124,0.10); border-radius: 3px;
  cursor: pointer; z-index: 2;
}
.btn-dismantle:hover { background: rgba(196,168,124,0.22); border-color: var(--ui-gold); }

/* 分解弹窗主体：左筛选栏 + 右网格 */
.df-wrap { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); }
.df-side {
  min-height: 0; overflow-y: auto; border-right: 1px solid var(--ui-line2);
  padding: 12px 14px; background: rgba(0,0,0,0.22);
}
.df-scroll { display: flex; flex-direction: column; gap: 12px; }
.df-group { border-bottom: 1px solid rgba(196,168,124,0.12); padding-bottom: 10px; }
.df-label { font-size: 11.5px; color: var(--ui-gold); margin-bottom: 7px; letter-spacing: 1px; }
.df-seg { display: flex; flex-wrap: wrap; gap: 5px; }
.df-seg-btn, .df-chip {
  padding: 4px 9px; font-size: 11px; color: var(--ui-dim); cursor: pointer;
  border: 1px solid var(--ui-line2); background: rgba(255,255,255,0.03); border-radius: 3px;
}
.df-seg-btn:hover, .df-chip:hover { border-color: var(--ui-line); color: #fff; }
.df-seg-btn.on { color: #1a140e; background: var(--ui-gold); border-color: var(--ui-gold); font-weight: 600; }
.df-chip.on { color: #1a140e; background: var(--ui-gold); border-color: var(--ui-gold); }
.df-chip.sm { padding: 3px 7px; font-size: 10.5px; }
.df-chip.on.inc { background: #7fd18a; border-color: #7fd18a; }
.df-chip.on.exc { background: #e07a7a; border-color: #e07a7a; }
.df-set-grp { margin-bottom: 8px; }
.df-set-h { font-size: 10.5px; color: var(--ui-dim); margin-bottom: 5px; }
.df-set-list, .df-subs { display: flex; flex-wrap: wrap; gap: 4px; }
.df-slots { display: flex; flex-direction: column; gap: 5px; }
.df-slot-h {
  width: 100%; text-align: left; padding: 4px 8px; font-size: 11px; color: #e8dcc4;
  border: 1px solid var(--ui-line2); background: rgba(255,255,255,0.04); border-radius: 3px; cursor: pointer;
}
.df-slot-h.on { border-color: var(--ui-gold); color: var(--ui-gold); }
.df-mains { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 4px 2px; }
.df-min { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 11px; color: var(--ui-dim); }
.df-min b { color: var(--ui-gold); font-size: 13px; min-width: 12px; text-align: center; }
.df-min-btn {
  width: 20px; height: 20px; line-height: 18px; text-align: center; cursor: pointer;
  border: 1px solid var(--ui-line2); background: rgba(255,255,255,0.05); color: #fff; border-radius: 3px;
}

/* 筛选方案 */
.df-plans { margin-top: 12px; border-top: 1px solid var(--ui-line2); padding-top: 10px; }
.df-plan-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.df-plan {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; font-size: 10.5px;
  color: var(--ui-gold); border: 1px solid var(--ui-line2); border-radius: 3px; cursor: pointer;
}
.df-plan-empty { font-size: 10.5px; color: var(--ui-dim); }
.df-plan-del { border: 0; background: transparent; color: #e07a7a; cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; }
.df-plan-ops { display: flex; gap: 5px; }
.df-input {
  flex: 1; min-width: 0; padding: 4px 7px; font-size: 11px; color: #fff;
  background: rgba(0,0,0,0.35); border: 1px solid var(--ui-line2); border-radius: 3px;
}

/* 右侧列表区 */
.df-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.df-main-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--ui-line2);
}
.df-quick { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.df-quick .btn.sm { padding: 5px 11px; font-size: 11.5px; white-space: nowrap; flex: 0 0 auto; }
.df-count { font-size: 11px; color: var(--ui-dim); white-space: nowrap; flex: 0 0 auto; }
/* 窄屏：快捷按钮整行折行、计数另起一行，5 个按钮不互相遮挡 */
@media (max-width: 900px) {
  .df-main-hd { flex-wrap: wrap; gap: 6px; }
  .df-quick { flex: 1 1 100%; }
  .df-quick .btn.sm { flex: 0 0 auto; min-width: 68px; text-align: center; }
  .df-count { margin-left: auto; }
}
.df-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px; padding: 12px; align-content: start;
}
.df-empty { grid-column: 1 / -1; text-align: center; color: var(--ui-dim); padding: 48px 0; font-size: 13px; }
.df-card {
  position: relative; min-height: 108px; padding: 8px; cursor: pointer;
  border: 1px solid var(--ui-line2); border-radius: 4px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--q) 14%, transparent), rgba(10,10,16,0.9));
  transition: border-color .12s, transform .08s;
}
.df-card:hover { border-color: var(--q); transform: translateY(-1px); }
.df-card.on { border-color: var(--ui-gold); box-shadow: inset 0 0 0 1px var(--ui-gold); }
.df-card.dis { opacity: 0.45; cursor: not-allowed; }
.df-card-chk {
  position: absolute; top: 5px; right: 6px; width: 16px; height: 16px; line-height: 14px;
  text-align: center; font-size: 11px; border: 1px solid var(--ui-line2); border-radius: 2px; color: #1a140e;
}
.df-card.on .df-card-chk { background: var(--ui-gold); border-color: var(--ui-gold); }
.df-card-top { display: flex; justify-content: space-between; font-size: 10px; color: var(--ui-dim); margin-bottom: 5px; }
.df-card-lv { color: var(--ui-gold); }
.df-card-name { font-size: 12px; color: #fff; margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-card-main { font-size: 10.5px; color: #cfc6b4; }
.df-card-stars { font-size: 10px; color: var(--ui-gold); margin-top: 5px; }
.df-card-bad { position: absolute; bottom: 6px; right: 6px; font-size: 9px; color: #e07a7a; }
.df-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-top: 1px solid var(--ui-line2); background: rgba(0,0,0,0.28);
}
.df-stat { font-size: 11.5px; color: #e8dcc4; }
.dia-choice { padding: 8px 4px; display: flex; flex-direction: column; gap: 10px; }
.dia-choice p { margin: 0 0 4px; font-size: 12px; color: var(--ui-dim); }
.dia-choice .btn { width: 100%; text-align: left; }

/* 窄屏：筛选区收窄或上下排列 */
@media (max-width: 900px) {
  .df-wrap { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  .df-side { border-right: 0; border-bottom: 1px solid var(--ui-line2); max-height: 40vh; }
  .df-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* ==== 装备光锥选择弹窗：复用背包卡片 + 底部 Lv/叠影双栏 + 醒目装备中标签 ==== */
.cone-pick-grid .item-cell { min-height: 138px; padding: 10px 7px 8px; }
.cone-pick-grid .ic-glyph { width: 52px; height: 52px; flex-basis: 52px; }
.cone-pick-grid .ic-name { font-size: 11px; }
/* 底部 Lv 在左 / 叠影在右 */
.ic-foot {
  display: flex; justify-content: space-between; gap: 4px; width: 100%;
  margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(196,168,124,0.16);
  font-size: 10px; line-height: 1.2;
}
.ic-foot span:first-child { color: var(--ui-gold-hi); }
.ic-foot span:last-child { color: #9fc7e8; white-space: nowrap; }
.cone-pick-grid .item-cell.worn { padding-bottom: 40px; }
/* 「装备中」标签：金色高亮 + 发光，置于图标下方（不被底部条/声明遮挡） */
.cone-pick-grid .item-cell.worn .ic-worn {
  top: 62px; bottom: auto; left: 50%; transform: translateX(-50%);
  color: #1a140e; font-weight: 800; font-size: 10px; letter-spacing: 0.5px;
  background: linear-gradient(180deg, #ffe9ae, #e0bd6a);
  border: 1px solid #fff0c4; box-shadow: 0 0 12px rgba(255,214,120,0.75);
  z-index: 3;
}
.cone-pick-grid .item-cell.worn { border-color: var(--ui-gold); box-shadow: 0 0 14px rgba(216,185,106,0.35); }

/* 装备光锥弹窗：底部预留全局免责声明高度，最后一行卡片不被压住 */
.modal-box:has(.cone-pick-grid) .modal-body { padding-bottom: 44px !important; }

/* 一键叠影按钮：金色描边突出（仅光锥分解弹窗显示） */
.df-quick .btn-refine-all {
  color: #1a140e; font-weight: 700;
  background: linear-gradient(180deg, #f0d99a, #d8b96a);
  border-color: #f5e3b4; box-shadow: 0 0 10px rgba(216,185,106,0.35);
}
.df-quick .btn-refine-all:hover { filter: brightness(1.12); }

/* 光锥升级弹窗：叠影阶数徽标 */
.lp-head .lp-si {
  display: inline-block; margin-left: 10px; padding: 1px 7px;
  font-size: 10.5px; font-style: normal; font-weight: 500; color: var(--ui-gold);
  border: 1px solid var(--ui-line); border-radius: 2px; background: rgba(196,168,124,0.1);
  vertical-align: middle;
}

/* 升级面板「前往晋阶」按钮（卡晋阶门槛时显示） */
.lp-ascend .lp-ascend-btn { margin-left: 10px; padding: 2px 10px; font-size: 11px; }

/* ==== 凝滞虚影 · 刷取目标自选区（关卡详情内） ==== */
.sd-mat-tip { font-size: 11px; color: var(--ui-dim); margin: -4px 0 9px; line-height: 1.5; }
.sd-mat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 6px; max-height: 216px; overflow-y: auto; padding: 2px;
}
.sd-mat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 7px 9px; cursor: pointer; text-align: left;
  border: 1px solid var(--ui-line2); border-radius: 3px;
  background: rgba(255, 255, 255, 0.028); color: #e8dcc4;
  transition: border-color .12s, background .12s;
}
.sd-mat:hover { border-color: var(--ui-line); background: rgba(196, 168, 124, 0.1); }
.sd-mat.on {
  border-color: var(--ui-gold); background: rgba(196, 168, 124, 0.16);
  box-shadow: inset 0 0 0 1px var(--ui-gold);
}
.sd-mat-ico { width: 26px; height: 26px; display: grid; place-items: center; }
.sd-mat-img { width: 24px; height: 24px; object-fit: contain; display: block; }
.sd-mat b { font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.sd-mat em { font-size: 9.5px; font-style: normal; color: var(--ui-dim); }
.sd-mat.on em { color: var(--ui-gold-hi); }

/* ==== 跃迁兑换商店（余烬/星芒） ==== */
.shop-wrap { display: flex; flex-direction: column; gap: 10px; }
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shop-tabs { display: flex; gap: 6px; }
.shop-tab {
  padding: 6px 16px; font-size: 12px; cursor: pointer; border-radius: 3px;
  color: #d8cfbc; border: 1px solid var(--ui-line2); background: rgba(255,255,255,.04);
}
.shop-tab:hover { border-color: var(--ui-line); color: #fff; }
.shop-tab.on { color: #1a140e; font-weight: 700; background: var(--ui-gold); border-color: var(--ui-gold); }
.shop-balance { font-size: 12px; color: #cfc6b4; }
.shop-balance b { font-size: 15px; color: var(--ui-gold-hi); margin-left: 4px; }
.shop-tip { font-size: 11px; color: var(--ui-dim); line-height: 1.5; }
.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px; max-height: 56vh; overflow-y: auto; padding: 2px;
}
.shop-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 8px 9px; border: 1px solid var(--ui-line2); border-radius: 4px;
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(10,10,16,.9));
}
.shop-item.dis { opacity: .55; }
.shop-ico { width: 46px; height: 46px; display: grid; place-items: center; }
.shop-ico-img { width: 40px; height: 40px; object-fit: contain; display: block; }
.shop-name { font-size: 12px; color: #fff8e8; text-align: center; line-height: 1.3; }
.shop-cost { font-size: 12.5px; color: var(--ui-gold-hi); font-variant-numeric: tabular-nums; }
.shop-cost i { font-style: normal; margin-right: 2px; }
.shop-stock { font-size: 10px; color: var(--ui-dim); text-align: center; line-height: 1.35; }
.shop-item .shop-buy { margin-top: 4px; }
.shop-empty { grid-column: 1 / -1; padding: 44px 0; text-align: center; color: var(--ui-dim); }
@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); max-height: 48vh; }
  .shop-balance { margin-left: auto; }
}
