/* ===================================================================
   style-ui.css — 星铁风外壳与视图布局（覆盖在 style.css 之上）
   骨架：顶栏(固定高) + [侧边栏(固定宽) | 主内容(flex:1)]
   主内容内部一律 flex 纵向、子面板自适应；页面级不滚动，滚动交给内部面板
   =================================================================== */
:root {
  --ui-bg: #0f0f14;
  --ui-bg2: #14141c;
  --ui-panel: rgba(22, 22, 30, 0.72);
  --ui-line: rgba(196, 168, 124, 0.28);
  --ui-line2: rgba(138, 138, 138, 0.18);
  --ui-gold: #c4a87c;
  --ui-gold-hi: #f0dca6;
  --ui-text: #e8e4dc;
  --ui-dim: #8d8a96;
}

/* ==== 全局：铺满视口、禁止页面滚动 ==== */
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  background: radial-gradient(1400px 700px at 50% -10%, #1b1b26 0%, var(--ui-bg) 55%, #08080c 100%);
  color: var(--ui-text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }

#app {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ==== 顶栏：品牌左 · 资源居中 · 状态右 ==== */
.topbar {
  flex: 0 0 62px;
  display: flex; align-items: center; gap: 24px;
  padding: 0 28px;
  background: linear-gradient(180deg, rgba(26, 26, 36, 0.95), rgba(14, 14, 20, 0.92));
  border-bottom: 1px solid var(--ui-line);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex; align-items: center; gap: 9px; flex: 0 0 auto;
  font-size: 16px; letter-spacing: 2px; color: var(--ui-gold-hi); white-space: nowrap;
}
.brand em { font-style: normal; font-size: 11px; color: var(--ui-dim); letter-spacing: 1px; }
.brand-mark {
  width: 14px; height: 14px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--ui-gold-hi), #8c6f42);
  box-shadow: 0 0 10px rgba(196, 168, 124, 0.55);
}
.res-strip {
  flex: 1 1 auto; display: flex; justify-content: center; align-items: center;
  gap: 8px; flex-wrap: wrap; min-width: 0;
}
.top-right { flex: 0 0 auto; display: flex; gap: 8px; }
.res-chip {
  padding: 4px 10px; font-size: 12px; color: var(--ui-dim);
  border: 1px solid var(--ui-line2); border-radius: 2px;
  background: rgba(255, 255, 255, 0.02); white-space: nowrap;
}
.res-chip b { color: var(--ui-text); font-weight: 500; font-variant-numeric: tabular-nums; }
.res-chip.jade { border-color: var(--ui-line); }
.res-chip.jade b { color: var(--ui-gold-hi); }

/* ==== 外壳：左栏固定 + 主区铺满 ==== */
.shell {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  overflow: hidden;
}
.sidebar {
  flex: 0 0 108px; width: 108px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 10px;
  background: linear-gradient(180deg, rgba(18, 18, 26, 0.9), rgba(10, 10, 15, 0.9));
  border-right: 1px solid var(--ui-line2);
}
.nav-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 4px; cursor: pointer;
  font-size: 12.5px; color: var(--ui-dim); letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent; border-radius: 2px;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  transition: 0.16s ease;
}
.nav-btn:hover { color: var(--ui-text); background: rgba(196, 168, 124, 0.08); }
.nav-btn.active {
  color: var(--ui-gold-hi);
  background: linear-gradient(180deg, rgba(196, 168, 124, 0.2), rgba(196, 168, 124, 0.05));
  border-color: var(--ui-line);
  box-shadow: inset 0 0 18px rgba(196, 168, 124, 0.12);
}
.nav-ico { font-size: 17px; opacity: 0.9; }
.nav-foot { margin-top: auto; text-align: center; font-size: 10.5px; color: #4a4854; }

/* ==== 主内容区：纵向 flex，占满剩余空间 ==== */
.stage {
  flex: 1 1 auto;
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  padding: 0 0 40px;   /* 底部预留免责声明条高度，内容滚动到底不被遮挡 */
}
.stage.view-character, .stage.view-inventory, .stage.view-gacha { overflow-y: auto; }

/* ==== 战斗视图 ==== */
.battle-view {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 24px 16px;
}
.battle-view .actionbar {
  flex: 0 0 auto;
  display: flex; justify-content: flex-start; align-items: center; flex-wrap: nowrap;
  /* 放大 1.2 倍 + 金边发光 + 头像上方 NEXT 标签，需要足够内边距避免被裁。
     注意：overflow-x:auto 会让 overflow-y:visible 被算成 auto，故靠 padding 留白规避裁剪 */
  gap: 10px; padding: 22px 14px 10px;
  overflow-x: auto; overflow-y: visible;
  min-height: 92px;
  scrollbar-width: thin; scrollbar-color: #4a445e transparent;
}
/* 行动序列头像条：最左 lead 放大 1.2 倍 + 发光金边；绝不显示数字 */
.battle-view .av-node {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  opacity: .72; transform-origin: bottom center;
  transition: transform .18s ease, opacity .18s ease, filter .18s ease;
}
.battle-view .av-node.lead {
  opacity: 1; transform: scale(1.2); z-index: 2;
}
.battle-view .av-face-wrap {
  position: relative; width: 46px; height: 46px;
  border-radius: 50%; padding: 2px;
  background: #2a2540; border: 2px solid #4a445e;
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.battle-view .av-node.ally .av-face-wrap { border-color: #6f8fd0; }
.battle-view .av-node.enemy .av-face-wrap { border-color: #b96262; }
.battle-view .av-node.acting .av-face-wrap { filter: brightness(1.25); }
.battle-view .av-node.lead .av-face-wrap {
  border-color: var(--gold, #d8b96a);
  box-shadow: 0 0 0 2px rgba(216,185,106,.4), 0 0 9px 1px rgba(216,185,106,.28);
}
.battle-view .av-face {
  width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover;
  background: #161428;
}
.battle-view .av-face-enemy { object-fit: contain; padding: 4px; }
.battle-view .av-cap {
  max-width: 60px; font-size: 10px; line-height: 1.1; text-align: center;
  color: #b9b4c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.battle-view .av-node.lead .av-cap { color: var(--gold, #d8b96a); font-weight: 700; }
.battle-view .av-ult, .battle-view .av-broken, .battle-view .av-next {
  position: absolute; font-style: normal; line-height: 1; z-index: 5;
  text-shadow: 0 1px 3px #000;
}
.battle-view .av-ult { top: -3px; right: -3px; font-size: 13px; color: var(--gold, #d8b96a); }
.battle-view .av-broken {
  bottom: -3px; right: -3px; font-size: 9px; color: #fff;
  background: #c0453c; border-radius: 2px; padding: 1px 2px;
}
/* NEXT：固定在首个头像正上方，醒目的金色胶囊；top 负值由 actionbar 的 padding-top 容纳 */
.battle-view .av-next {
  top: -15px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 800; letter-spacing: 1px; color: #16121e;
  background: linear-gradient(180deg, #f0dca6, #d8b96a);
  border: 1px solid #f5e6bb; border-radius: 3px; padding: 2px 6px;
  box-shadow: 0 0 8px rgba(216,185,106,.7);
  text-shadow: none;
}
/* 金边高亮头像下方名字也作强调 */
.battle-view .av-node.lead .av-cap::before { content: "▶ "; color: var(--gold, #d8b96a); }

.battle-view .resource-bar {
  flex: 0 0 auto;
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  border: 1px solid var(--ui-line2); border-radius: 3px;
  background: var(--ui-panel);
}

/* 敌我区：左右分开，中间留大片空白 */
.battle-view .arena {
  flex: 1 1 auto; min-height: 0;
  /* 注意：不能用 align-items:center + overflow-y:auto —— 内容超高时向上溢出且无法滚到，
     会截掉第一张卡。改用 flex-start + 子项 margin:auto 0 实现「够高居中、超高可滚」。 */
  display: flex; justify-content: safe center; align-items: flex-start;
  gap: 26px;
  padding: 6px 1% 12px;
  overflow-y: auto;
}
.battle-view .side {
  flex: 0 0 360px; width: 360px;
  display: flex; flex-direction: column;
  margin: auto 0; /* 垂直方向自动外边距：空余时居中，内容超高时退化为 0 从顶部滚 */
}
.battle-view .side.enemy-side { align-items: flex-end; }
.battle-view .side.ally-side { align-items: flex-start; }
.battle-view .side-title { margin-bottom: 8px; font-size: 12px; color: var(--ui-dim); letter-spacing: 1px; }
.battle-view .team { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.battle-view .unit {
  width: 100%;
  background: rgba(20, 20, 28, 0.78);
  border: 1px solid var(--ui-line2); border-radius: 3px;
}
.battle-view .unit.ally { border-color: rgba(196, 168, 124, 0.22); }
.battle-view .unit.enemy { border-color: rgba(200, 96, 96, 0.22); }
/* 血条：4px、直角、深底亮色 */
.battle-view .unit .bar { height: 4px; border-radius: 0; background: rgba(255, 255, 255, 0.06); }
.battle-view .unit .bar i { border-radius: 0; }

/* 底部控制区与日志：居中 + 1200 上限 */
.battle-view .controls-bar, .battle-view .log-band { flex: 0 0 auto; width: 100%; }
.battle-view .controls {
  width: 100%; max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px solid var(--ui-line2); border-radius: 3px;
  background: var(--ui-panel);
}
.battle-view .log-wrap {
  width: 100%; max-width: 1200px; margin: 0 auto;
  border: 1px solid var(--ui-line2); border-radius: 3px;
  overflow: hidden; background: var(--ui-panel);
}
.battle-view .log-title {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--ui-line2);
  font-size: 12px; color: var(--ui-gold);
}
.battle-view .log-count { margin-left: auto; font-size: 11px; color: #5f5c72; }
.battle-view .battle-log {
  height: 150px; overflow-y: auto; padding: 10px 14px;
  font-size: 12px; line-height: 1.95; color: var(--ui-dim);
  font-variant-numeric: tabular-nums;
  background: rgba(10, 10, 16, 0.55);
}

/* ==== 战斗日志：右侧抽屉（默认隐藏） ==== */
.log-mask {
  position: fixed; inset: 0; z-index: 180;
  background: rgba(4, 4, 10, 0.62); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .24s ease, visibility .24s;
}
.log-mask.open { opacity: 1; visibility: visible; pointer-events: auto; }
.log-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 181;
  width: 400px; max-width: 92vw;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(24, 24, 34, 0.98), rgba(12, 12, 20, 0.99));
  border-left: 1px solid var(--ui-line);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
  transform: translateX(105%); visibility: hidden;
  transition: transform .28s cubic-bezier(.22,.61,.36,1), visibility .28s;
}
.log-drawer.open { transform: translateX(0); visibility: visible; }
.log-drawer-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--ui-line);
  font-size: 15px; color: var(--ui-gold-hi); letter-spacing: 1px;
}
.log-drawer-close { min-width: 34px; min-height: 34px; padding: 0; font-size: 20px; line-height: 1; }
.log-drawer-sub {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; border-bottom: 1px solid var(--ui-line2);
  font-size: 11.5px; color: var(--ui-dim);
}
.log-drawer .battle-log {
  flex: 1 1 auto; height: auto; min-height: 0;
  padding: 12px 16px; font-size: 12px; line-height: 1.9;
}
/* 遮罩层打开时战斗控制区不可误触 */
.battle-view:has(.log-mask.open) .controls { pointer-events: none; opacity: .55; }

/* ==== 角色视图：240 / 自适应立绘 / 480~500 养成面板 ==== */
/* 立绘只作视觉点缀：中栏吃剩余空间；右栏锁死下限，保证行迹/遗器按钮不被挤压 */
.char-view {
  width: 100%; max-width: 1720px; margin: 0 auto;
  display: grid; grid-template-columns: 240px minmax(320px, 1fr) minmax(480px, 560px);
  grid-template-rows: auto auto; gap: 16px; align-items: start;
  padding: 18px clamp(16px, 3vw, 48px) 28px;
}
.char-list {
  padding: 14px 12px; background: var(--ui-panel);
  border: 1px solid var(--ui-line2); border-radius: 3px;
  backdrop-filter: blur(12px);
  grid-column: 1; grid-row: 1 / span 2;
  height: calc(100vh - 172px); overflow: auto;
}
.char-item {
  display: flex; align-items: center; gap: 9px; padding: 9px; margin-bottom: 6px;
  border: 1px solid transparent; border-radius: 2px; cursor: pointer;
  transition: 0.15s ease;
}
.char-item:hover { background: rgba(196, 168, 124, 0.07); }
.char-item.on { border-color: var(--ui-line); background: rgba(196, 168, 124, 0.1); }
.ci-ava {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
  border-radius: 2px; border: 1px solid rgba(255, 255, 255, 0.16);
}
.ci-info { display: flex; flex-direction: column; min-width: 0; }
.ci-info b { font-size: 13px; font-weight: 500; }
.ci-info i { font-style: normal; font-size: 11px; color: var(--ui-dim); }
.ci-team {
  margin-left: auto; font-size: 10px; color: var(--ui-gold);
  border: 1px solid var(--ui-line); padding: 1px 5px; border-radius: 2px;
}
.char-stage { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; max-width: 660px; margin: 0 auto;
  height: auto; display: flex; flex-direction: column; gap: 12px; }
.portrait {
  /* 立绘限高：全屏不再顶满，object-fit:contain 由 img.tag(fit) 输出 */
  position: relative; width: 100%; flex: 0 0 auto;
  height: min(500px, calc(100vh - 280px)); min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0;
  overflow: hidden;
  border: 1px solid var(--ui-line); border-radius: 3px;
  background: linear-gradient(160deg, rgba(196, 168, 124, 0.16), rgba(12, 12, 18, 0.9) 60%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6);
  clip-path: polygon(0 0, 100% 0, 100% 93%, 96% 100%, 0 100%);
}
/* 底部暗色渐变：让名字与立绘自然过渡 */
.portrait::after {
  content: ""; position: absolute; top: auto; left: 0; right: 0; bottom: 0; height: 45%; z-index: 2;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(6,6,10,0.94) 0%, rgba(6,6,10,0.6) 34%, rgba(6,6,10,0) 100%);
}
/* 角色名：浮在立绘左下角，纯白粗体 + 投影，绝无底色块 */
.pt-name {
  position: absolute; left: 20px; bottom: 14px; z-index: 3;
  font-size: clamp(22px, 1.7vw, 30px); font-weight: 700; letter-spacing: 5px;
  color: #fff; line-height: 1.15; white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
  padding: 0; margin: 0;
  background: transparent; background-image: none; border-radius: 0; box-shadow: none;
}
.pt-el {
  position: absolute; left: 16px; top: 10px; z-index: 3;
  font-size: 11px; color: var(--ui-gold); letter-spacing: 3px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.char-meta {
  /* 角色名片 + 操作区：独立于立绘，任何分辨率都可见 */
  grid-column: 2; grid-row: 2; min-width: 0;
  padding: 10px 14px; background: var(--ui-panel);
  border: 1px solid var(--ui-line2); border-radius: 3px;
}
.cm-card { display: flex; align-items: center; gap: 14px; }
.cm-avatar {
  width: 84px; height: 84px; flex: 0 0 84px; overflow: hidden; border-radius: 4px;
  border: 1px solid var(--ui-line);
  background: linear-gradient(160deg, rgba(196, 168, 124, 0.2), rgba(12, 12, 18, 0.9));
}
.cm-ava-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-info { flex: 1 1 auto; min-width: 0; }
.cm-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cm-name { font-size: 18px; letter-spacing: 2px; }
.cm-star { color: var(--ui-gold); font-size: 11px; }
.cm-elem { font-size: 11px; color: var(--ui-dim); }
.cm-lv { color: var(--ui-dim); font-size: 11px; }
.cm-eid { font-size: 11px; color: var(--ui-gold); }
.cm-row2 { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.char-panel {
  padding: 14px; background: var(--ui-panel);
  border: 1px solid var(--ui-line); border-radius: 3px;
  backdrop-filter: blur(14px);
  grid-column: 3; grid-row: 1 / span 2;
  height: calc(100vh - 172px); overflow: auto;
}

.tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--ui-line2); padding-bottom: 8px; }
.tab {
  padding: 5px 12px; font-size: 12.5px; color: var(--ui-dim); cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 2px;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  transition: 0.15s ease;
}
.tab:hover { color: var(--ui-text); }

/* ==== 8 队伍预设 Tab ==== */
.team-tabs {
  display: flex; align-items: stretch; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px;
  border-bottom: 1px solid var(--ui-line2);
  scrollbar-width: thin; scrollbar-color: #4a445e transparent;
}
.tt-tab {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 7px 12px; cursor: pointer;
  border: 1px solid var(--ui-line2); border-radius: 3px;
  background: rgba(255,255,255,0.02); transition: 0.15s ease;
}
.tt-tab .tt-name { font-size: 12.5px; color: var(--ui-dim); letter-spacing: .5px; white-space: nowrap; }
.tt-tab .tt-sub { font-size: 10px; color: #5f5c72; }
.tt-tab:hover { border-color: var(--ui-line); }
.tt-tab.on { background: linear-gradient(180deg, rgba(196,168,124,0.14), rgba(196,168,124,0.03)); }
.tt-tab.on .tt-name { color: var(--ui-gold-hi); }
.tt-tab.active { border-color: var(--ui-gold); box-shadow: inset 0 0 12px rgba(196,168,124,0.12); }
.tt-tab.active .tt-sub { color: var(--ui-gold); font-weight: 600; }
.tt-rename {
  flex: 0 0 auto; align-self: center; margin-left: auto;
  padding: 7px 12px; font-size: 12px; cursor: pointer;
  color: var(--ui-gold); background: rgba(196,168,124,0.08);
  border: 1px dashed var(--ui-line); border-radius: 3px; white-space: nowrap;
}
.tt-rename:hover { background: rgba(196,168,124,0.16); }
.tm-live {
  font-style: normal; font-size: 10px; margin-left: 8px; padding: 1px 7px;
  color: #7fcf97; border: 1px solid rgba(127,207,151,0.45); border-radius: 8px;
}
/* 改名弹窗：标准布局（输入框整行 + 右下按钮组） */
.rn-wrap { display: flex; flex-direction: column; gap: 10px; }
.rn-input {
  width: 100%; padding: 11px 12px; font-size: 15px; color: var(--ui-gold-hi); letter-spacing: 1px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--ui-line2); border-radius: 4px;
}
.rn-input:focus { outline: none; border-color: var(--ui-gold); }
.rn-tip { font-size: 11px; color: var(--ui-dim); }
.rn-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.rn-foot .btn { min-width: 92px; min-height: 36px; border-radius: 4px; }

/* ==== 光锥详情：左图右文分栏 ==== */
.cone-detail2 { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.cd2-left {
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--q) 16%, transparent), rgba(10,10,16,.85));
  border: 1px solid color-mix(in srgb, var(--q) 45%, transparent); border-radius: 4px;
  text-align: center;
}
.cd2-img { width: 100%; aspect-ratio: 1 / 1.15; display: flex; align-items: center; justify-content: center; }
.cd2-img .dt-img { max-width: 100%; max-height: 100%; }
.cd2-meta { display: flex; flex-direction: column; gap: 3px; }
.cd2-stars { color: var(--q); font-size: 13px; letter-spacing: 2px; }
.cd2-path { font-size: 12px; color: var(--ui-dim); }
.cd2-lv { font-size: 12px; color: var(--ui-gold-hi); font-weight: 600; }

/* 光锥卡面：端正矩形 + 立体阴影（不用倾斜插画） */
.cd2-card {
  position: relative; width: 100%; aspect-ratio: 3 / 4; padding: 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 8px; border: 1px solid color-mix(in srgb, var(--q) 55%, transparent);
  background:
    radial-gradient(130% 70% at 50% 0%, color-mix(in srgb, var(--q) 26%, transparent), transparent 72%),
    linear-gradient(160deg, #1e1e29, #0b0b11);
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.cd2-card .cd2-icon {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.55));
}
/* 竖版插画覆盖在图标之上：离线/加载失败时自动回落到图标 */
.cd2-card .cd2-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 右栏分块：金色竖条标题 + 分割线 */
.cd2-sec { padding: 12px 0; }
.cd2-sec:first-child { padding-top: 0; }
.cd2-sec + .cd2-sec { border-top: 1px solid rgba(196, 168, 124, 0.18); }
.cd2-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); }
.cd2-h i { display: block; width: 3px; height: 14px;
  background: linear-gradient(180deg, var(--ui-gold-hi), transparent); }
.cd2-h em { margin-left: auto; font-style: normal; font-size: 11px; letter-spacing: 0; color: var(--ui-dim); }

.cd2-skill { display: flex; gap: 10px; padding: 12px 14px; border-radius: 4px;
  border: 1px solid var(--ui-line2); border-left: 2px solid var(--ui-gold);
  background: linear-gradient(120deg, rgba(196, 168, 124, 0.08), rgba(255, 255, 255, 0.012)); }
.cd2-skill-ico { color: var(--ui-gold); font-size: 13px; line-height: 1.7; }
.cd2-skill-body { min-width: 0; }
.cd2-skill-body b { font-size: 13.5px; letter-spacing: 1px; color: var(--ui-gold-hi); }
.cd2-desc { margin: 6px 0 0; font-size: 12.5px; line-height: 1.95; color: var(--ui-text); }
.cd2-story { margin: 0; font-size: 12.5px; line-height: 2; color: var(--ui-dim); letter-spacing: 0.3px; }

.cd2-statline3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.cd2-stat { display: flex; flex-direction: column; gap: 3px; padding: 7px 8px; text-align: center;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--ui-line2); border-radius: 3px; }
.cd2-stat span { font-size: 10.5px; color: var(--ui-dim); }
.cd2-stat b { font-size: 14px; color: var(--ui-text); font-variant-numeric: tabular-nums; }
.cd2-right { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cd2-right .dt-sub { padding: 6px 10px; background: rgba(255,255,255,0.03); border-radius: 3px; }
.cd2-right .dt-sub b { color: var(--ui-gold-hi); }
.dt-cond { font-size: 12.5px; color: #d9e3c8; padding: 6px 10px;
  background: rgba(140,180,100,0.07); border-left: 2px solid rgba(160,200,120,0.5); border-radius: 2px; }
.cr-rows { display: flex; flex-direction: column; gap: 4px; }
.cr-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 10px;
  font-size: 12px; color: var(--ui-dim); border: 1px solid transparent; border-radius: 3px;
  font-variant-numeric: tabular-nums; }
.cr-row.on { color: var(--ui-text); border-color: var(--ui-line);
  background: linear-gradient(90deg, rgba(196,168,124,0.14), transparent); }
.cr-row.on b { color: var(--ui-gold-hi); }
.cr-row span { overflow-wrap: anywhere; }
/* 故事背景：折叠弱化 */
.dt-dim-sec { color: var(--ui-dim); font-size: 11px; }
.cone-story { font-size: 12px; color: var(--ui-dim); }
.cone-story summary { cursor: pointer; color: var(--ui-gold); font-size: 12px; user-select: none; }
.cone-story p { margin: 6px 0 0; line-height: 1.75; opacity: .85; }

/* ==== 角色面板：光锥大卡片 / 遗器 6 槽 / 套装效果 ==== */
.cone-hero {
  position: relative;
  display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 18px;
  max-width: 640px; margin: 0 auto 16px; padding: 16px;
  background: linear-gradient(160deg, rgba(196,168,124,0.08), rgba(10,10,16,0.9));
  border: 1px solid var(--ui-line2); border-radius: 5px; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
/* 光锥卡右上角「卸下」：与卡片点击（更换）区分，阻止冒泡 */
.cone-hero .cc-off {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 4px 10px; font-size: 12px; letter-spacing: 1px;
  color: #ffb9a8; background: rgba(60, 18, 14, 0.72);
  border: 1px solid rgba(255, 154, 138, 0.45); border-radius: 3px;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.cone-hero .cc-off:hover { background: rgba(120, 30, 22, 0.85); color: #fff; }
.cone-hero:hover { border-color: var(--ui-gold); transform: translateY(-2px); }
.cone-hero.empty { grid-template-columns: 110px 1fr; }
.cone-hero .ch-img {
  width: 100%; aspect-ratio: 1 / 1.15; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03); border: 1px solid var(--ui-line2); border-radius: 4px;
}
.cone-hero .ch-img .ch-img-tag, .cone-hero .ch-img .dt-img { max-width: 92%; max-height: 92%; }
.cone-hero .ch-img.ch-empty { font-size: 40px; color: #5f5c72; }
.cone-hero .ch-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cone-hero .ch-name b { font-size: 18px; color: var(--ui-text); letter-spacing: 1px; }
.cone-hero .ch-name .cc-star { margin-left: 8px; color: var(--ui-gold); }
.cone-hero .cc-meta, .cone-hero .cc-base { font-size: 12.5px; color: var(--ui-dim); }
.cone-hero .cc-passive .line { font-size: 12.5px; color: #d9e3c8; line-height: 1.7; }
.cone-hero .cc-passive .line.cond { color: #c8d8e8; }
.cone-hero .ch-hint { margin-top: auto; font-size: 11px; color: var(--ui-gold); opacity: .8; }
/* 遗器 6 方形槽 */
.relic-grid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 640px; margin: 0 auto 16px; }
.relic-cell {
  position: relative;
  aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 6px; cursor: pointer; text-align: center;
  background: rgba(255,255,255,0.02); border: 1px dashed var(--ui-line2); border-radius: 5px;
  transition: border-color .15s ease, background .15s ease;
}
/* 已穿戴槽位的「卸下」角标 */
.relic-cell .rc-off {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 20px; height: 20px; line-height: 1; padding: 0;
  font-size: 11px; color: #ffb9a8; background: rgba(60, 18, 14, 0.7);
  border: 1px solid rgba(255, 154, 138, 0.4); border-radius: 50%;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.relic-cell .rc-off:hover { background: rgba(120, 30, 22, 0.9); color: #fff; }
.relic-cell:not(.empty) { border-style: solid; }
.relic-cell:hover { border-color: var(--ui-gold); background: rgba(196,168,124,0.06); }
.relic-cell .rc-img { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #5f5c72; }
.relic-cell .rc-img .rc-img-tag { max-width: 100%; max-height: 100%; }
.relic-cell .rc-slot { font-size: 11px; color: var(--ui-dim); }
.relic-cell .rc-set { font-size: 12px; color: var(--ui-text); max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.relic-cell .rc-main { font-size: 11px; color: var(--ui-gold); }
/* 套装效果列表 */
.set-list { display: flex; flex-direction: column; gap: 8px; max-width: 640px; margin: 0 auto; }
.set-row { display: flex; gap: 10px; padding: 9px 12px; border-radius: 3px;
  background: rgba(255,255,255,0.02); border: 1px solid var(--ui-line2); opacity: .55; }
.set-row.on { opacity: 1; border-color: var(--ui-line);
  background: linear-gradient(90deg, rgba(196,168,124,0.1), transparent); }
.set-row .set-ico { width: 30px; height: 30px; object-fit: contain; flex: 0 0 30px; }
.set-row .set-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-row .set-body b { font-size: 12.5px; color: var(--ui-text); }
.set-row .set-body span { font-size: 11.5px; color: #5f5c72; }
.set-row .set-body span.eff { color: #7fcf97; }
.set-row .set-body span.off { color: #5f5c72; }
/* 选择弹窗：网格卡片带图标 */
.pick-tip { font-size: 11.5px; color: var(--ui-dim); margin-bottom: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.pick-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px;
  border: 1px solid var(--ui-line2); border-radius: 4px; cursor: pointer;
  background: rgba(255,255,255,0.02); text-align: center; transition: 0.14s ease;
}
.pick-card:hover, .pick-card.on { border-color: var(--ui-gold); background: rgba(196,168,124,0.08); }
.pick-card .pick-img { width: 56px; height: 56px; object-fit: contain; }
.pick-card b { font-size: 12px; color: var(--ui-text); }
.pick-card span { font-size: 10.5px; color: var(--ui-dim); }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick-list .pick-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--ui-line2); border-radius: 3px; cursor: pointer; background: rgba(255,255,255,0.02);
}
.pick-list .pick-row:hover { border-color: var(--ui-gold); }
.pick-list .pick-row .pick-img { width: 34px; height: 34px; object-fit: contain; flex: 0 0 34px; }
.pick-list .pick-row b { font-size: 12.5px; color: var(--ui-text); }
.pick-list .pick-row span { font-size: 11px; color: var(--ui-dim); margin-left: auto; }

/* ==== 星魂：命座星图（错落节点 + 光带） ==== */
.ec-wrap { width:100%; max-width:820px; margin:0 auto; overflow-x:auto; }
.ec-map { position:relative; width:100%; min-width:460px; aspect-ratio:720 / 500;
  border-radius:10px; overflow:hidden; border:1px solid rgba(180,150,90,0.25);
  background:radial-gradient(120% 90% at 30% 18%, #1a1a26, #07070c 72%); }
.ec-bg { position:absolute; inset:-8%; background-size:cover; background-position:center 16%;
  filter:blur(10px) saturate(.85) brightness(.78); opacity:.8; }
.ec-veil { position:absolute; inset:0;
  background:radial-gradient(70% 62% at 50% 44%, rgba(8,8,14,0), rgba(6,6,10,0.6) 84%),
    linear-gradient(180deg, rgba(14,12,22,0.12), rgba(6,6,10,0.72)); }
.ec-svg { position:absolute; inset:0; width:100%; height:100%; }
.ec-dot { fill:rgba(255,232,190,0.5); }
.ec-band { fill:none; stroke:rgba(255,255,255,0.13); stroke-width:1.6; }
.ec-band.on { stroke:rgba(240,205,130,0.92); stroke-width:2.2; }
.ec-band-glow { fill:none; stroke:rgba(240,205,130,0.5); stroke-width:6; }
.ecn { position:absolute; transform:translate(-50%,-50%); display:flex; flex-direction:column;
  align-items:center; gap:9px; cursor:pointer; z-index:3; -webkit-tap-highlight-color:transparent; }
.ecn-hex { position:relative; width:62px; height:62px; display:grid; place-items:center; overflow:hidden;
  clip-path:polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background:linear-gradient(160deg, #2b2b3a, #101018); transition:.18s ease; }
.ecn-hex::after { content:""; position:absolute; inset:2px; z-index:0; clip-path:inherit;
  background:linear-gradient(160deg, #181822, #0a0a11); }
.ecn:not(.on) .ecn-hex { background:linear-gradient(160deg, #565a70, #1c1c26); }
.ecn-num { position:relative; z-index:3; font-size:21px; font-weight:700; color:#aab1c6;
  font-family:Georgia, serif; text-shadow:0 1px 6px rgba(0,0,0,.85); }
.ecn-face { position:absolute; inset:0; z-index:2; background-size:210%; background-repeat:no-repeat;
  opacity:.45; filter:saturate(.85) contrast(1.05); }
/* 星魂专属图标：垫在数字下方 */
.ecn-ico { position:absolute; inset:7px; z-index:1; background-size:contain; background-repeat:no-repeat;
  background-position:center; opacity:.5; filter:drop-shadow(0 1px 4px rgba(0,0,0,.7)); }
.ecn:not(.on) .ecn-ico { opacity:.14; filter:grayscale(1) brightness(1.3); }
.ecn.on .ecn-hex { background:linear-gradient(160deg, #f2dda8, #8a6c2f);
  box-shadow:0 0 22px rgba(240,205,130,0.55); }
.ecn.on .ecn-hex::after { background:linear-gradient(160deg, rgba(30,24,10,.35), rgba(20,16,26,.55)); }
.ecn.on .ecn-num { color:#fff3cf; font-size:24px; }
.ecn:hover .ecn-hex, .ecn.sel .ecn-hex { transform:scale(1.07); }
.ecn.sel .ecn-hex { box-shadow:0 0 0 2px rgba(240,205,130,0.5), 0 0 26px rgba(240,205,130,0.45); }
.ecn-name { display:block; margin-top:2px; width:108px; font-size:11px; color:#9a9382; text-align:center;
  letter-spacing:.3px; line-height:1.35; white-space:normal; }
.ecn.on .ecn-name { color:#f0dca6; }
.ecn-lock { position:absolute; right:-4px; top:-4px; z-index:3; width:16px; height:12px;
  border-radius:2px; background:#0e0e15; border:1px solid rgba(190,195,215,0.55); }
.ecn-lock::before { content:""; position:absolute; left:4px; top:-5px; width:6px; height:6px;
  border:1.5px solid rgba(190,195,215,0.55); border-bottom:none; border-radius:3px 3px 0 0; }
.ecn-ray { position:absolute; inset:-7px; z-index:1; border-radius:50%;
  box-shadow:0 0 20px rgba(240,205,130,0.45); }
.ecn.sel .ecn-ray { box-shadow:0 0 26px rgba(255,225,150,0.75); }
.ec-count { position:absolute; right:14px; bottom:10px; z-index:4; font-size:11px; color:#a99c81;
  padding:2px 8px; border-radius:10px; background:rgba(8,8,14,0.55); border:1px solid rgba(196,168,124,0.18); }
.ec-count b { color:#f0dca6; }
.ec-detail { position:relative; margin-top:10px; z-index:4; padding:12px 14px; border-radius:8px; background:linear-gradient(160deg, rgba(20,19,26,0.94), rgba(9,9,14,0.96));
  border:1px solid rgba(196,168,124,0.28); backdrop-filter:blur(10px);
  box-shadow:0 14px 30px -18px #000; }
.ecd-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.ecd-rank { font-size:10.5px; color:#d8b96a; border:1px solid rgba(216,185,106,0.4);
  border-radius:2px; padding:1px 6px; }
.ecd-head b { font-size:13.5px; color:#f0dca6; letter-spacing:1px; }
.ecd-tag { margin-left:auto; font-style:normal; font-size:10px; color:#6b6b80;
  border:1px solid #3a3a48; border-radius:8px; padding:1px 7px; }
.ecd-tag.on { color:#7fcf97; border-color:rgba(127,207,151,0.45); }
.ecd-desc { margin:0; font-size:12px; line-height:1.9; color:#c2bfd0; }
.ecd-note { margin-top:6px; font-size:11px; line-height:1.7; color:#c9a86a;
  border-left:2px solid rgba(201,168,106,0.5); padding-left:8px; }

/* ==== 行迹：星盘（放射节点 + 发光连线） ==== */
.sx-wrap { width:100%; max-width:760px; margin:0 auto; overflow-x:auto; }
.sx-stage { position:relative; width:100%; min-width:460px; aspect-ratio:1 / 1;
  border-radius:10px; overflow:hidden; border:1px solid rgba(110,160,220,0.22);
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(38,84,146,0.55), rgba(8,14,30,0.96) 64%),
    radial-gradient(80% 60% at 50% 102%, rgba(24,52,96,0.5), transparent 72%),
    linear-gradient(180deg, #060b18, #0a1526);
  box-shadow:inset 0 0 90px rgba(10,30,60,0.9), 0 12px 40px -22px #000; }
.sx-svg { position:absolute; inset:0; width:100%; height:100%; }
.sx-dot { fill:rgba(190,220,255,0.55); }
.sx-orbit { fill:none; stroke:rgba(120,170,230,0.16); stroke-width:1; stroke-dasharray:3 7; }
.sx-orbit.faint { stroke:rgba(120,170,230,0.1); }
.sxl { stroke:rgba(130,160,200,0.22); stroke-width:1.4; }
.sxl.on { stroke:rgba(120,200,255,0.85); stroke-width:2; }
.sxl-dot { fill:rgba(130,160,200,0.5); }
.sxl-dot.on { fill:#9fd8ff; }
.sx-mark { position:absolute; left:50%; top:47%; width:46%; transform:translate(-50%,-50%);
  opacity:0.1; filter:saturate(.55) brightness(1.7) drop-shadow(0 0 18px rgba(90,160,255,0.5));
  pointer-events:none; }
.sxn { position:absolute; transform:translate(-50%,-50%); display:flex; flex-direction:column;
  align-items:center; gap:5px; cursor:pointer; z-index:2; -webkit-tap-highlight-color:transparent; }
.sxn:hover { z-index:4; }
.sxn-core { position:relative; width:46px; height:46px; display:grid; place-items:center;
  border-radius:50%; border:2px solid #43506a; color:#7f8ba4; transition:.18s ease;
  background:radial-gradient(circle at 50% 35%, #1b2436, #0a1020); }
.sxn-attr .sxn-core { width:30px; height:30px; }
/* 属性节点：整体更紧凑，保证 10 个节点不互相遮挡 */
.sxn-attr .sxn-label { width:68px; max-width:68px; font-size:10px; }
.sxn-attr .sxn-sub { font-size:9px; letter-spacing:0; }
.sxn-attr { gap:3px; }
.sxn-skill .sxn-core { width:40px; height:40px; border-radius:11px; }
.sxn-center { z-index:3; }
.sxn-center .sxn-core { width:76px; height:76px; border-color:rgba(150,200,255,0.75);
  background:radial-gradient(circle at 50% 30%, #2a476e, #0b1526);
  box-shadow:0 0 0 6px rgba(90,160,255,0.08), 0 0 26px rgba(90,160,255,0.45); }
.sxn-glyph { font-size:18px; font-weight:600; color:#8fa3c4; }
/* 行迹节点图标：圆形底框内居中 */
.sxn-ico { width:58%; height:58%; object-fit:contain; display:block; pointer-events:none;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,0.65)); }
.sxn-center .sxn-ico { width:60%; height:60%; }
.sxn:not(.on) .sxn-ico { filter:grayscale(1) brightness(0.8); opacity:0.42; }
.sxn.on .sxn-ico { filter:drop-shadow(0 0 9px rgba(120,200,255,0.8)); }
.sxn-center .sxn-glyph { font-size:27px; }
.sxn-label { display:block; font-size:11px; color:#c3d6ee; width:96px; max-width:96px; text-align:center;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 3px rgba(0,0,0,.8); }
.sxn-sub { font-size:10px; color:#8ea8c6; font-variant-numeric:tabular-nums; }
.sxn-center .sxn-label { margin-top:11px; font-size:13px; color:#dcecff; }
.sxn-center .sxn-sub { color:#7fb6e8; letter-spacing:2px; }
.sxn.on .sxn-core { border-color:rgba(120,205,255,0.9); color:#cfeaff;
  background:radial-gradient(circle at 50% 32%, #1d4b78, #0a1322);
  box-shadow:0 0 0 4px rgba(90,175,255,0.12), 0 0 18px rgba(90,175,255,0.55); }
.sxn.on .sxn-glyph { color:#e6f4ff; text-shadow:0 0 10px rgba(120,200,255,0.9); }
.sxn.on .sxn-label { color:#bcd8f5; }
.sxn.on .sxn-sub { color:#78b6e6; }
.sxn.full .sxn-core { box-shadow:0 0 0 4px rgba(90,175,255,0.18), 0 0 22px rgba(120,200,255,0.8); }
.sxn.sel .sxn-core, .sxn:hover .sxn-core { transform:scale(1.08); border-color:#9fd8ff; }
.sxn-lock { position:absolute; right:-3px; bottom:-2px; width:14px; height:11px;
  border-radius:2px; background:#2b3446; border:1px solid #6a7a94; }
.sxn-lock::before { content:""; position:absolute; left:3px; top:-6px; width:6px; height:7px;
  border:1.5px solid #6a7a94; border-bottom:none; border-radius:4px 4px 0 0; }
/* 晋阶未开放：整节点灰化，锁标常驻 */
.sxn.gated .sxn-core { border-color:#39415a; background:radial-gradient(circle at 50% 35%, #141a28, #090d15); }
.sxn.gated .sxn-ico { filter:grayscale(1) brightness(0.55); opacity:0.26; }
.sxn.gated .sxn-label { color:#6d788c; }
.sxn.gated .sxn-sub { color:#c79a5a; letter-spacing:0; }
.sxn.gated .sxn-glyph { color:#5a6478; }
.sxt-lock { padding:4px 0; font-size:11px; line-height:1.65; text-align:center; color:#e0b070; }
.sx-ab.gated { opacity:0.55; }
.sx-tip { position:absolute; z-index:9; width:240px; padding:12px 14px; border-radius:6px;
  background:linear-gradient(160deg, rgba(18,30,48,0.97), rgba(8,14,26,0.98));
  border:1px solid rgba(120,180,240,0.35); backdrop-filter:blur(8px);
  box-shadow:0 16px 36px -14px #000, inset 0 0 0 1px rgba(120,180,240,0.12); }
.sxt-h { display:flex; align-items:baseline; gap:8px; margin-bottom:6px; }
.sxt-h b { font-size:13px; color:#dfeeff; }
.sxt-h em { margin-left:auto; font-style:normal; font-size:10.5px; color:#7fb6e8; }
.sxt-p { margin:0 0 8px; font-size:12px; line-height:1.85; color:#a9bacf; }
.sxt-go { width:100%; }
.sxt-max { font-size:11px; color:#7fcf97; text-align:center; }
.tr-legend { max-width:760px; margin:10px auto 6px; display:flex; gap:14px; flex-wrap:wrap;
  font-size:11.5px; color:var(--ui-dim); }
.tr-legend .lit { color:#7fc4ff; }
/* 星盘下方：3 个额外能力的完整文本 */
.sx-abs { max-width:760px; margin:6px auto 0; display:flex; flex-direction:column; gap:6px; }
.sx-ab { display:flex; gap:8px; padding:7px 10px; border-radius:3px; font-size:11.5px; line-height:1.75;
  color:#8ea8c6; background:rgba(255,255,255,0.025); border:1px solid rgba(120,160,210,0.16); }
.sx-ab b { flex:0 0 52px; color:#7f8ea8; font-weight:600; }
.sx-ab.on { border-color:rgba(120,200,255,0.35); background:rgba(60,120,190,0.1); }
.sx-ab.on b { color:#9fd8ff; }
.sx-ab.on span { color:#c3d6ee; }
.sx-ab-tag { margin-left:auto; flex:0 0 auto; font-style:normal; font-size:10px; letter-spacing:0;
  color:#7fcf97; border:1px solid rgba(127,207,151,0.35); border-radius:8px; padding:1px 6px; align-self:flex-start; }
.sx-ab-tag.dim { color:#8b8f9e; border-color:rgba(140,146,163,0.32); }
.tr-mat-ico { width:18px; height:18px; object-fit:contain; vertical-align:-4px; }
.tr-up { display:flex; flex-direction:column; gap:10px; }
.tr-up-effect { font-size: 13.5px; line-height: 1.8; color: var(--ui-text);
  padding: 10px 12px; background: rgba(255,255,255,0.03); border-radius: 3px; }
.tr-up-effect b { color: var(--ui-gold-hi); }
.tab.on { color: #14140f; background: linear-gradient(180deg, var(--ui-gold-hi), var(--ui-gold)); }

.stat-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.stat-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.05); font-size: 12.5px; }
.stat-row .k { color: var(--ui-dim); }
.stat-row .v { font-variant-numeric: tabular-nums; }
.dmg-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.chip { padding: 2px 7px; font-size: 11px; color: var(--ui-dim); border: 1px solid var(--ui-line2); border-radius: 2px; }
.chip.on { color: var(--ui-gold-hi); border-color: var(--ui-line); background: rgba(196, 168, 124, 0.08); }

.cone-card { padding: 16px; border: 1px solid var(--ui-line); border-radius: 3px; background: linear-gradient(150deg, rgba(196, 168, 124, 0.1), rgba(10, 10, 16, 0.7)); }
.cc-head { display: flex; justify-content: space-between; align-items: baseline; }
.cc-head b { font-size: 15px; letter-spacing: 1px; }
.cc-star { color: var(--ui-gold); font-size: 11px; }
.cc-meta { margin-top: 6px; font-size: 11.5px; color: var(--ui-dim); }
.cc-base { margin-top: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.cc-passive { margin-top: 8px; font-size: 11.5px; color: var(--ui-gold); line-height: 1.8; }
.cone-card .btn { margin-top: 12px; }

.relic-slots { display: flex; flex-direction: column; gap: 6px; }
.relic-slot {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center;
  padding: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ui-line2); border-radius: 2px;
  transition: 0.15s ease;
}
.relic-slot:hover { border-color: var(--ui-gold); background: rgba(196, 168, 124, 0.08); }
.relic-slot.empty { opacity: 0.6; }
.slot-name { font-size: 11.5px; color: var(--ui-dim); }
.slot-main { font-size: 12.5px; }
.slot-lv { font-size: 11px; color: var(--ui-gold); }
.set-tag { display: inline-block; margin: 2px 6px 0 0; padding: 1px 6px; font-size: 10.5px; color: var(--ui-gold); border: 1px solid var(--ui-line); border-radius: 2px; }
.set-summary { margin-top: 10px; }
.mini-note { margin-top: 10px; font-size: 11.5px; color: var(--ui-dim); line-height: 1.7; }
.detail-empty { padding: 30px 6px; color: var(--ui-dim); font-size: 12.5px; text-align: center; line-height: 2; }
.col-title { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ui-gold); letter-spacing: 1px; margin-bottom: 10px; }

.eidolon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eid-node {
  display: flex; align-items: center; gap: 8px; padding: 12px;
  border: 1px solid var(--ui-line2); border-radius: 2px;
  font-size: 14px; color: #4a4854;
}
.eid-node span { font-size: 11.5px; }
.eid-node.on { color: var(--ui-gold-hi); border-color: var(--ui-line); background: rgba(196, 168, 124, 0.12); }

/* ==== 背包：居中 + 1400 上限 ==== */
.inv-view { width: 100%; max-width: 1400px; margin: 0 auto; padding: 18px clamp(16px, 3vw, 40px) 30px; }
.inv-head { display: flex; align-items: center; justify-content: space-between; }
.inv-count { font-size: 12px; color: var(--ui-dim); }
.inv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.inv-row {
  display: grid; grid-template-columns: 60px 1fr auto auto; gap: 12px; align-items: center;
  padding: 10px 14px; background: var(--ui-panel);
  border: 1px solid var(--ui-line2); border-radius: 2px;
}
.inv-row:hover { border-color: var(--ui-line); }
.ir-star { color: var(--ui-gold); font-size: 10.5px; }
.ir-main { display: flex; flex-direction: column; min-width: 0; }
.ir-main b { font-size: 13px; font-weight: 500; }
.ir-main i { font-style: normal; font-size: 11.5px; color: var(--ui-gold); margin-top: 2px; }
.ir-main em { font-style: normal; font-size: 11px; color: var(--ui-dim); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.mat-cell { padding: 16px; background: var(--ui-panel); border: 1px solid var(--ui-line2); border-radius: 2px; display: flex; flex-direction: column; gap: 6px; }
.mat-cell span { font-size: 11.5px; color: var(--ui-dim); }
.mat-cell b { font-size: 18px; color: var(--ui-gold-hi); font-variant-numeric: tabular-nums; }

/* ==== 跃迁：居中 + 1400 上限 ==== */
.gacha-view { width: 100%; max-width: 1400px; margin: 0 auto; padding: 18px clamp(16px, 3vw, 40px) 30px; }
.gv-banner {
  position: relative; display: flex; flex-direction: column; gap: 8px; justify-content: center;
  height: 190px; padding: 0 34px; margin-bottom: 14px;
  border: 1px solid var(--ui-line); border-radius: 3px;
  background: linear-gradient(120deg, rgba(196, 168, 124, 0.18), rgba(10, 10, 16, 0.92) 55%);
  clip-path: polygon(0 0, 100% 0, 100% 90%, 97% 100%, 0 100%);
}
.gv-banner b { font-size: 32px; letter-spacing: 8px; color: var(--ui-gold-hi); }
.gv-banner i { font-style: normal; font-size: 12px; color: var(--ui-dim); letter-spacing: 2px; }
.bn-tag { position: absolute; top: 16px; left: 34px; font-size: 10.5px; color: var(--ui-gold); border: 1px solid var(--ui-line); padding: 1px 7px; }
.gv-bar { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--ui-line2); }
.gv-tabs { display: flex; gap: 4px; }
.gv-pity { display: flex; gap: 20px; align-items: center; justify-content: center; padding: 14px 0; font-size: 12px; color: var(--ui-dim); }
.gv-pity b { color: var(--ui-gold-hi); font-variant-numeric: tabular-nums; }
.pity-note { color: var(--ui-gold); }
.gv-actions { display: flex; gap: 14px; justify-content: center; margin: 8px 0 20px; }
.gv-result { padding-bottom: 24px; }
.gacha-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; max-width: 1000px; margin: 0 auto; }
.gacha-card {
  padding: 16px 10px; text-align: center;
  border: 1px solid var(--ui-line2); border-radius: 2px;
  background: rgba(20, 20, 28, 0.8);
}
.gacha-card.r5 { border-color: var(--ui-gold-hi); animation: gachaGlow 1.3s ease-in-out infinite alternate; }
.gacha-card.r4 { border-color: #a678d8; box-shadow: 0 0 10px rgba(166, 120, 216, 0.35); }
.gacha-card.r3 { opacity: 0.7; }
@keyframes gachaGlow {
  from { box-shadow: 0 0 6px rgba(240, 220, 166, 0.3); }
  to   { box-shadow: 0 0 24px rgba(240, 220, 166, 0.85); }
}
.gc-star { color: var(--ui-gold); font-size: 11px; letter-spacing: 1px; }
.gc-name { margin-top: 6px; font-size: 13px; }
.gacha-card.r5 .gc-name { color: #f7e2a0; }
.gacha-card.r4 .gc-name { color: #c9a8f0; }
.gc-sub { margin-top: 4px; font-size: 10.5px; color: var(--ui-dim); line-height: 1.5; }
.btn.big { padding: 11px 40px; font-size: 14px; letter-spacing: 2px; }

/* ==== 弹层：屏幕正中 + 0.8 黑遮罩 ==== */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.8);
}
.modal[hidden] { display: none; }
.modal-box {
  width: min(640px, 90vw); max-height: 82vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1a1a24, #101016);
  border: 1px solid var(--ui-line); border-radius: 3px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--ui-line2); font-size: 13.5px; }
/* 覆盖 style.css 遗留的 380px/1fr 网格，普通弹窗恢复单列流式 */
.modal-body { display: block; padding: 16px 18px; overflow: auto; }
.pick-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; margin-bottom: 5px; cursor: pointer; border: 1px solid var(--ui-line2); border-radius: 2px; font-size: 12.5px; }
.pick-row:hover { border-color: var(--ui-gold); background: rgba(196, 168, 124, 0.09); }
.pick-row span { color: var(--ui-dim); font-size: 11.5px; }
.rs-title { margin-bottom: 10px; font-size: 14px; letter-spacing: 1px; }
.rs-title.ok { color: var(--ui-gold-hi); }
.rs-title.bad { color: #ff9c8a; }
.rs-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12.5px; color: var(--ui-dim); border-bottom: 1px dashed rgba(255, 255, 255, 0.05); }
.rs-row b { color: var(--ui-text); }
.rs-sep { height: 1px; margin: 10px 0; background: var(--ui-line2); }
.rs-drop { display: flex; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.rs-drop .star { color: var(--ui-gold); }
.sh-txt { color: #9fc7e8; font-weight: 500; font-size: 11px; margin-left: 6px; text-shadow: 0 0 8px rgba(159, 199, 232, 0.6); }

/* ==== 元素底色 ==== */
.el-physical { background: linear-gradient(160deg, #8a8a8a, #2a2a2e); }
.el-fire { background: linear-gradient(160deg, #c96a4a, #2e1a14); }
.el-ice { background: linear-gradient(160deg, #5f9fc4, #14222e); }
.el-lightning { background: linear-gradient(160deg, #a07ac9, #221a2e); }
.el-wind { background: linear-gradient(160deg, #5ec49a, #14281f); }
.el-quantum { background: linear-gradient(160deg, #7a6fd0, #1a1830); }
.el-imaginary { background: linear-gradient(160deg, #d4c06a, #2e2a14); }

/* ==== 窄屏兜底：缩栏宽而不是压扁 ==== */
@media (max-width: 1580px) {
  /* 中等屏：右栏收到 520 上限，给立绘留出空间 */
  .char-view { grid-template-columns: 240px minmax(320px, 1fr) minmax(470px, 520px); }
}
@media (max-width: 1400px) {
  .char-view { grid-template-columns: 230px minmax(300px, 1fr) minmax(460px, 500px); }
}
@media (max-width: 1180px) {
  .battle-view .side { flex: 0 0 280px; width: 280px; }
  .char-view { grid-template-columns: 220px minmax(0, 1fr) minmax(440px, 460px); }
}
@media (max-width: 980px) {
  .battle-view .arena { gap: 20px; }
  .battle-view .side { flex: 0 0 240px; width: 240px; }
  .char-view { grid-template-columns: 200px minmax(0, 1fr); }
  .char-panel { grid-column: 1 / -1; }
}
/* 矮屏（如 1366×768）：压缩卡片与日志，让 4 人一屏放下、不触发滚动 */
@media (max-height: 800px) {
  .topbar { flex-basis: 52px; }
  .battle-view { gap: 7px; padding: 10px 20px 12px; }
  .battle-view .team { gap: 7px; }
  .battle-view .unit { padding: 7px 11px; }
  .battle-view .unit .ava { width: 40px; height: 40px; }
  .battle-view .battle-log { height: 108px; line-height: 1.8; }
}

/* ============ 诊断日志视图（view-logs.js） ============ */
.logs-view { display: flex; flex-direction: column; height: 100%; padding: 12px 16px; gap: 10px; }
.lg-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lg-search {
  flex: 1 1 280px; min-width: 180px; padding: 7px 11px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line-soft); color: var(--text); font-size: 13px;
}
.lg-search:focus { outline: none; border-color: var(--line); }
.lg-select {
  padding: 7px 10px; border-radius: 8px; background: var(--bg-soft);
  border: 1px solid var(--line-soft); color: var(--text); font-size: 13px;
}
.lg-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-cats .tab {
  padding: 4px 11px; border-radius: 12px; font-size: 12.5px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line-soft); color: var(--text-dim);
}
.lg-cats .tab.on { background: rgba(216, 185, 106, 0.16); border-color: var(--line); color: var(--gold); }
.lg-stats { font-size: 12px; color: var(--text-dim); }
.lg-list {
  flex: 1; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--bg-soft); padding: 6px 8px; font-family: Consolas, "Courier New", monospace;
}
.lg-row {
  display: flex; gap: 8px; padding: 3px 4px; font-size: 12px; line-height: 1.55;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045); align-items: baseline;
}
.lg-row:last-child { border-bottom: none; }
.lg-t { color: var(--text-dim); flex: 0 0 auto; }
.lg-lv { flex: 0 0 44px; font-weight: 600; }
.lg-c { flex: 0 0 68px; color: var(--gold-dim); }
.lg-m { flex: 0 0 auto; color: var(--text); }
.lg-d { flex: 1; color: var(--text-dim); word-break: break-all; }
.lg-row.lv-debug .lg-lv { color: var(--text-dim); }
.lg-row.lv-info  .lg-lv { color: var(--up); }
.lg-row.lv-warn  .lg-lv { color: #e8c56a; }
.lg-row.lv-error .lg-lv { color: var(--down); }
.lg-row.lv-error { background: rgba(255, 138, 92, 0.07); }
.lg-empty { padding: 24px; text-align: center; color: var(--text-dim); }

/* ============ 设置弹窗（settings.js） ============ */
.set-wrap { display: flex; flex-direction: column; gap: 16px; min-width: 340px; }
.set-sec { display: flex; flex-direction: column; gap: 8px; }
.set-label { font-size: 13px; color: var(--gold); letter-spacing: 1px; }
.set-row { display: flex; gap: 8px; flex-wrap: wrap; }
.set-hint { font-size: 12px; color: var(--text-dim); line-height: 1.6; }
.set-file { font-size: 12.5px; color: var(--text-dim); }
.set-paste {
  width: 100%; min-height: 96px; resize: vertical; padding: 8px 10px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line-soft); color: var(--text);
  font-family: Consolas, monospace; font-size: 11.5px; line-height: 1.5;
}
.set-paste:focus { outline: none; border-color: var(--line); }
.set-info { font-size: 12px; color: var(--text-dim); text-align: right; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.btn.danger { border-color: rgba(255, 138, 92, 0.45); color: var(--down); }
.btn.danger:hover { background: rgba(255, 138, 92, 0.12); }
/* 侧栏底部：设置/重置按钮需足够点击面积（覆盖 style-items 的旧尺寸） */
.nav-foot { padding: 10px 8px 6px; }

/* 经验书/遗器经验不再占顶栏：在背包-材料页与升级弹窗查看 */
#lg-copy.copied { border-color: var(--ui-gold-hi, #f0d998); color: var(--ui-gold-hi, #f0d998); }

/* ===================================================================
   跃迁结果弹窗（官方风格：5★ 闪卡 + 大图立绘）
   =================================================================== */
#warp-layer {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 28%, #1a2130 0%, #06070c 72%);
  opacity: 0; transition: opacity 0.22s ease;
}
#warp-layer.show { opacity: 1; }
#warp-layer[hidden] { display: none; }
/* 出金时的一次性全屏金光 */
.warp-flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 42%,
    rgba(255, 228, 150, 0.9), rgba(255, 192, 88, 0.4) 42%, transparent 72%);
}
.warp-flash.go { animation: warpFlash 1.05s ease-out backwards; }
@keyframes warpFlash { 0% { opacity: 0; } 16% { opacity: 1; } 100% { opacity: 0; } }

/* ---- 5★ 大出金演出：全屏金光 → 大立绘 → 手动关闭 ---- */
#warp-reveal {
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(3, 3, 7, 0.94);
  display: none; cursor: pointer;
}
#warp-reveal.show { display: block; }
#warp-reveal[hidden] { display: none !important; }
#warp-reveal.flash { background: rgba(3, 3, 7, 0.9); }
.rv-flash { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rv-flash i {
  position: absolute; left: 50%; top: 44%; width: 260vmax; height: 260vmax;
  transform: translate(-50%, -50%); opacity: 0;
  background: radial-gradient(circle,
    rgba(255, 244, 214, 0.98) 0%, rgba(255, 224, 138, 0.75) 12%,
    rgba(255, 196, 92, 0.32) 30%, rgba(255, 176, 64, 0.12) 46%, transparent 62%);
}
.rv-flash i.rays {
  background: repeating-conic-gradient(from 0deg,
    rgba(255, 230, 160, 0.4) 0deg 2.6deg, transparent 2.6deg 24deg);
  mix-blend-mode: screen;
}
#warp-reveal.flash .rv-flash i { animation: rvBurst 1.15s ease-out forwards; }
#warp-reveal.flash .rv-flash i.rays { animation: rvBurst 1.15s ease-out forwards, rvSpin 9s linear infinite; }
@keyframes rvBurst { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0.85; } }
@keyframes rvSpin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

.rv-hero {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
}
#warp-reveal.hero { background: radial-gradient(ellipse at 50% 30%, rgba(104, 78, 34, 0.5), rgba(6, 5, 10, 0.97) 74%); }
#warp-reveal.hero .rv-hero { opacity: 1; }
/* 角色方图（圆形构图、四角自带黑底）：径向蒙版羽化四角，融入背景，不再出现方形黑边 */
.rv-char {
  /* 立绘高度给文字块预留空间：小窗口/非全屏时按视口压缩，绝不溢出压字 */
  height: min(70vh, calc(100vh - 300px), 800px) !important;
  -webkit-mask-image: radial-gradient(ellipse 58% 58% at 50% 50%, #000 50%, transparent 74%);
  mask-image: radial-gradient(ellipse 58% 58% at 50% 50%, #000 50%, transparent 74%);
}
/* 光锥相纸卡片：外围自带一圈暗色渐变区，最外圈羽化融入背景、相纸框保持完整；
   不能用 box-shadow——img 矩形投影会把暗区边缘勾出来 */
.rv-cone {
  height: min(58vh, calc(100vh - 320px), 600px) !important;
  border-radius: 10px;
  -webkit-mask-image: radial-gradient(ellipse 56% 56% at 50% 50%, #000 82%, transparent 100%);
  mask-image: radial-gradient(ellipse 56% 56% at 50% 50%, #000 82%, transparent 100%);
}
.rv-img {
  position: relative; width: auto !important;
  max-width: 88vw;
  object-fit: contain; object-position: center;
  filter: brightness(1.08) saturate(1.05);
  animation: rvHeroIn 0.6s ease-out backwards;
}
@keyframes rvHeroIn { from { transform: scale(1.05) translateY(10px); opacity: 0.3; } to { transform: scale(1); opacity: 1; } }
.rv-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(3,3,7,0.25) 0%, transparent 34%, transparent 58%, rgba(3,3,7,0.9) 95%);
}
/* 名字紧跟立绘正下方居中 */
.rv-info { position: static; text-align: center; pointer-events: none; }
/* 名字按视口宽缩放：1080p 桌面约 52~58px，分辨率越高越大 */
.rv-info b {
  display: block; font-size: clamp(24px, 3.4vw, 58px); letter-spacing: 8px;
  color: #ffeec2; text-shadow: 0 0 34px rgba(255, 200, 90, 0.65), 0 3px 10px rgba(0,0,0,0.9);
}
.rv-info span {
  display: block; margin-top: 10px; font-size: clamp(13px, 1.1vw, 18px);
  letter-spacing: 6px; color: #e2d4ab;
}
.rv-info b::after {
  content: ""; display: block; width: min(200px, 30vw); height: 2px; margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, #e8c56a, transparent);
  box-shadow: 0 0 8px rgba(232, 197, 106, 0.6);
}
/* 提示改为流内元素：跟随文字块，任何视口都不会与副标题重叠 */
.rv-hint {
  position: static; margin-top: 26px; text-align: center;
  font-size: clamp(12px, 0.95vw, 16px); letter-spacing: 4px;
  color: rgba(255, 236, 190, 0.9); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  animation: rvHint 1.7s ease-in-out infinite;
}
@media (max-width: 760px) {
  .rv-char { height: min(54vh, 520px) !important; }
  .rv-cone { height: min(48vh, 460px) !important; }
  .rv-img { max-width: 90vw; }
  .rv-info b { font-size: 26px; letter-spacing: 5px; }
  .rv-info span { font-size: 14px; letter-spacing: 4px; }
  .rv-hint { font-size: 12px; margin-top: 18px; }
}
@keyframes rvHint { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.warp-box {
  width: min(920px, 94vw); max-height: 88vh;
  display: flex; flex-direction: column;
  border: 1px solid rgba(232, 197, 106, 0.28); border-radius: 4px;
  background: rgba(10, 11, 16, 0.6);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
  padding: 12px 16px 10px;
}
.warp-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; letter-spacing: 2px; color: #e8d7b0;
  padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.warp-x {
  background: none; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 2px;
  color: #cfcfcf; font-size: 15px; line-height: 1; padding: 3px 9px; cursor: pointer;
}
.warp-x:hover { border-color: #e8c56a; color: #e8c56a; }
.warp-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  overflow: auto; padding: 12px 2px 6px;
}
.warp-grid.single { grid-template-columns: 1fr; justify-items: center; }
.warp-grid.single .warp-item { width: 330px; }
.warp-foot { padding-top: 8px; text-align: center; font-size: 11px; color: #6f7684; }

/* ---- 单张结果卡 ---- */
.warp-item {
  position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 4px;
  background: linear-gradient(180deg, #23232e, #14141c);
  padding-bottom: 8px;
  animation: wiIn 0.42s ease backwards;
  display: flex; flex-direction: column; align-items: center;
}
@keyframes wiIn { from { opacity: 0; transform: translateY(16px) scale(0.9); } }
.wi-art {
  position: relative; width: 100%; height: 205px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.28);
}
.warp-grid.single .wi-art { height: 420px; }
.warp-item.is-char .wi-img { width: 100%; height: 100%; object-position: 50% 14% !important; }
.warp-item.is-cone .wi-art { padding: 12px; box-sizing: border-box; }
.warp-item.is-cone .wi-img { max-width: 100%; max-height: 100%; }
.wi-matter { text-align: center; font-size: 12px; color: #9aa4b5; }
.wi-matter b { display: block; color: #6aa9d8; margin-bottom: 6px; letter-spacing: 1px; }
.wi-matter span { font-size: 10.5px; color: #6f7684; }
.wi-stars { margin-top: 7px; font-size: 10.5px; letter-spacing: 2px; color: #6aa9d8; text-shadow: 0 0 6px currentColor; }
.warp-item.r4 .wi-stars { color: #c9a0ec; }
.warp-item.r5 .wi-stars { color: #f4d98b; }
.wi-name { margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--ui-text, #e6e6ea); padding: 0 8px; text-align: center; }
.warp-item.r5 .wi-name { color: #f7dd93; text-shadow: 0 0 10px rgba(247, 221, 147, 0.5); }
.warp-item.r4 .wi-name { color: #d9bdf5; }
.wi-sub { margin-top: 2px; font-size: 10.5px; color: #8a92a2; padding: 0 8px; text-align: center; }

/* ---- 4★：紫色边框（官方结果卡风格） ---- */
.warp-item.r4 {
  border-color: rgba(181, 122, 224, 0.75);
  box-shadow: 0 0 14px rgba(181, 122, 224, 0.28), inset 0 0 14px rgba(181, 122, 224, 0.1);
}
.warp-item.r4 .wi-art::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 50% 38%, rgba(190, 140, 235, 0.28), transparent 72%);
}

/* ---- 5★ 闪卡效果：金色光芒旋转 + 光带扫过 ---- */
.warp-item.r5 {
  border-color: rgba(217, 178, 94, 0.85);
  box-shadow: 0 0 24px rgba(232, 197, 106, 0.4), inset 0 0 22px rgba(232, 197, 106, 0.14);
}
.warp-item.r5 .wi-art::before {          /* 底层金色辉光 */
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 50% 38%, rgba(255, 214, 120, 0.4), rgba(160, 110, 30, 0.12) 55%, transparent 75%);
}
.wi-rays, .wi-sweep { position: absolute; inset: 0; pointer-events: none; }
.wi-rays {                                /* 旋转光芒 */
  z-index: 0; inset: -55%;
  background: repeating-conic-gradient(from 0deg,
    rgba(255, 216, 122, 0.14) 0deg 8deg, rgba(255, 216, 122, 0) 8deg 22deg);
  animation: raysSpin 8s linear infinite;
}
@keyframes raysSpin { to { transform: rotate(360deg); } }
.wi-sweep {                               /* 斜向光带扫过 */
  z-index: 2;
  background: linear-gradient(115deg, transparent 36%,
    rgba(255, 240, 190, 0.5) 47%, rgba(255, 240, 190, 0.12) 53%, transparent 64%);
  background-size: 280% 100%; background-repeat: no-repeat;
  animation: shineSweep 2.6s ease-in-out infinite;
}
@keyframes shineSweep { 0% { background-position: 170% 0; } 55%, 100% { background-position: -70% 0; } }
.warp-item.r5 .wi-img { position: relative; z-index: 1; }

/* ---- UP / 歪 徽标 ---- */
.wi-up, .wi-off {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 2px 7px; border-radius: 2px;
}
.wi-up { color: #1e1608; background: linear-gradient(180deg, #f4d98b, #d9a83e); box-shadow: 0 0 10px rgba(244, 217, 139, 0.55); }
.wi-off { color: #ffb3a6; border: 1px solid rgba(255, 140, 120, 0.55); background: rgba(60, 20, 16, 0.72); }

/* ==== 战斗单位详情弹窗（点击卡片查看数值与状态，查看期间战斗暂停） ==== */
.bi-wrap { font-size: 12.5px; }
.bi-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.bi-ava { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; border: 1px solid var(--ui-line2); }
.bi-ava img { width: 100%; height: 100%; object-fit: cover; }
.bi-id b { font-size: 14px; }
.bi-id span { display: block; margin-top: 3px; color: var(--ui-dim); font-size: 11.5px; }
.bi-sec {
  margin: 12px 0 6px; padding-left: 8px; border-left: 2px solid var(--ui-gold, #c4a87c);
  font-size: 12.5px; letter-spacing: 1px; color: var(--ui-gold-hi, #f0d998);
}
.bi-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.bi-row {
  display: flex; justify-content: space-between; padding: 4px 2px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06); font-size: 12px;
}
.bi-row span { color: var(--ui-dim); }
.bi-row b { font-variant-numeric: tabular-nums; }
/* 战斗数值变化量：正绿(增益) / 负红(减益)，无变化不显示 */
.bi-delta { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 4px; }
.bi-delta.up { color: #4ade80; }     /* text-green-400 */
.bi-delta.down { color: #f87171; }   /* text-red-400 */
.bi-statuses { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow: auto; }
.bi-empty { padding: 10px; text-align: center; color: var(--ui-dim); font-size: 12px; }
.bi-st { padding: 7px 10px; border: 1px solid var(--ui-line2); border-radius: 2px; font-size: 12px; }
.bi-st.buff { border-left: 3px solid #7fd4a0; }
.bi-st.debuff { border-left: 3px solid #e0705c; }
.bi-st-h { display: flex; align-items: center; gap: 8px; }
.bi-st-h b { font-size: 12.5px; }
.bi-tag { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 2px; }
.bi-tag.buf { color: #7fd4a0; background: rgba(127, 212, 160, 0.12); }
.bi-tag.deb { color: #ff9c8a; background: rgba(224, 112, 92, 0.12); }
.bi-dur { margin-left: auto; color: var(--ui-dim); font-size: 11px; }
.bi-st-fx { margin-top: 4px; color: #a8b0bd; font-size: 11px; line-height: 1.5; }
.bi-foot { margin-top: 12px; text-align: center; font-size: 11px; color: var(--ui-dim); }

/* ==== 敌人图鉴 ==== */
.cc-enemy {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 40px; font-weight: 700;
  color: rgba(255, 255, 255, 0.22);
  background: radial-gradient(circle at 50% 40%, rgba(224, 112, 92, 0.22), transparent 70%);
}
.cd-enemy-hero {
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 700; color: rgba(255, 255, 255, 0.28);
  background: radial-gradient(circle at 50% 40%, rgba(224, 112, 92, 0.25), transparent 72%) !important;
}
.cd-weak { display: flex; gap: 14px; flex-wrap: wrap; padding: 4px 0 6px; }
.cd-weak .badge-ico { width: 22px; height: 22px; }
.cd-weak > div { display: flex; align-items: center; gap: 5px; }
.cd-weak-t { font-size: 12px; color: var(--ui-text); }

/* 光锥详情左栏操作按钮（立绘下方竖排，免滚动可达） */
.cone-detail2 { grid-template-columns: 224px minmax(0, 1fr); }
.cd2-foot { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.cd2-foot .btn { width: 100%; padding: 7px 6px; font-size: 11.5px; white-space: nowrap; }

/* ==== 图鉴筛选条：多维度分组 + 排序 ==== */
.codex-filters { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cx-row { display: flex; align-items: flex-start; gap: 8px; }
.cx-lb {
  flex: 0 0 34px; font-size: 11px; color: var(--ui-dim); letter-spacing: 1px;
  line-height: 26px; text-align: right;
}
.cx-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.cx-note {
  display: inline-flex; align-items: center; font-size: 11px; color: var(--ui-dim);
  padding: 2px 8px; border: 1px dashed var(--ui-line2); border-radius: 2px; cursor: help;
}
.cx-sort {
  height: 24px; padding: 0 8px; font-size: 11.5px;
  background: rgba(255, 255, 255, 0.05); color: var(--ui-text);
  border: 1px solid var(--ui-line2); border-radius: 2px; outline: none;
}
.cx-sort option { background: #14141c; }
/* 覆盖 style-items.css 残留的 align-items:center（会令整行收缩居中） */
.codex-filters { align-items: stretch; }

/* ==== 首次进入：开拓者性别选择 ==== */
.gp-wrap { padding: 6px 2px; }
.gp-tip { font-size: 12.5px; color: var(--ui-dim); line-height: 1.8; margin-bottom: 16px; text-align: center; }
.gp-row { display: flex; gap: 18px; justify-content: center; }
.gp-card {
  flex: 0 0 220px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 14px 16px; cursor: pointer;
  background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(10,10,16,0.9));
  border: 1px solid var(--ui-line2); border-radius: 6px;
  /* button 默认继承 UA 的黑色文字，深色卡面上会糊掉——必须显式指定 */
  color: #f2ead8;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.gp-card:hover { transform: translateY(-4px); border-color: var(--ui-gold); box-shadow: 0 10px 24px rgba(0,0,0,.55); }
.gp-img { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; border: 2px solid var(--ui-line2); }
.gp-ava { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-card b { font-size: 15px; color: #fff8e8; letter-spacing: 1px; }
.gp-card em { font-style: normal; font-size: 11.5px; color: #b9b1a0; }

/* ==== 后台战斗悬浮窗 ==== */
.battle-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: none; align-items: center; gap: 10px;
  min-width: 220px; max-width: 320px; padding: 9px 12px;
  background: linear-gradient(160deg, rgba(28,22,16,0.96), rgba(12,10,14,0.97));
  border: 1px solid rgba(220, 178, 108, 0.55); border-radius: 5px;
  box-shadow: 0 8px 26px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.4) inset;
  color: var(--ui-text); cursor: pointer; text-align: left;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.battle-fab.show { display: inline-flex; animation: bfIn .22s ease-out; }
.battle-fab:hover {
  transform: translateY(-3px); border-color: var(--ui-gold);
  box-shadow: 0 12px 30px rgba(0,0,0,.7), 0 0 14px rgba(220,178,108,.25);
}
@keyframes bfIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bf-ico {
  width: 30px; height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 15px;
  background: radial-gradient(circle at 40% 35%, rgba(220,178,108,.35), rgba(120,90,50,.18));
  border: 1px solid rgba(220,178,108,.5);
  animation: bfPulse 2.2s ease-in-out infinite;
}
@keyframes bfPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,178,108,.35); } 50% { box-shadow: 0 0 0 6px rgba(220,178,108,0); } }
.bf-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bf-body b { font-size: 12.5px; color: var(--ui-gold-hi); letter-spacing: 1px; }
.bf-body em {
  font-style: normal; font-size: 10.5px; color: var(--ui-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}
.bf-back { margin-left: auto; font-size: 10.5px; color: var(--ui-gold); white-space: nowrap; }

/* 悬浮窗细节：图标用文字、防贴边截断 */
.battle-fab { min-width: 300px; max-width: 380px; padding: 10px 14px; }
.bf-ico { font-size: 13px; font-weight: 700; color: var(--ui-gold-hi); letter-spacing: 0; }
.bf-body em { max-width: 250px; }
.bf-back { flex: 0 0 auto; }

/* 伤害日志：我方普通命中（无色→淡紫白）与持续伤害（紫） */
.log-line.dmg { color: #d8d5e8; }
.log-line.dot { color: #c8a6f0; }

/* ==== 抽卡统计弹窗（深色毛玻璃 + 金边）==== */
.gs-wrap { display: flex; flex-direction: column; gap: 10px; }
.gs-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.gs-tabs .tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; font-size: 12.5px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ui-line2); border-radius: 3px;
  color: var(--ui-dim); backdrop-filter: blur(6px);
}
.gs-tabs .tab i {
  font-style: normal; font-size: 10.5px; color: var(--ui-gold);
  background: rgba(216, 185, 106, 0.14); padding: 0 5px; border-radius: 8px;
}
.gs-tabs .tab.on {
  color: var(--ui-gold-hi); border-color: rgba(216, 185, 106, 0.65);
  background: linear-gradient(160deg, rgba(216, 185, 106, 0.16), rgba(216, 185, 106, 0.04));
  box-shadow: 0 0 12px rgba(216, 185, 106, 0.18);
}
.gs-body {
  padding: 14px; border-radius: 5px;
  background: linear-gradient(165deg, rgba(24, 22, 32, 0.72), rgba(12, 11, 18, 0.82));
  border: 1px solid rgba(216, 185, 106, 0.25);
  backdrop-filter: blur(10px);
}
.gs-stat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.gs-kpi {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--ui-line2); border-radius: 4px;
}
.gs-kpi em { font-style: normal; font-size: 10.5px; color: var(--ui-dim); letter-spacing: 1px; }
.gs-kpi b { font-size: 20px; color: var(--ui-gold-hi); font-variant-numeric: tabular-nums; }
.gs-kpi i { font-style: normal; font-size: 10px; color: var(--ui-dim); }
.gs-list-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 4px 0 8px; padding-bottom: 6px; font-size: 12px; color: var(--ui-gold);
  border-bottom: 1px solid var(--ui-line2); letter-spacing: 1px;
}
.gs-list-head em { font-style: normal; font-size: 10.5px; color: var(--ui-dim); }
.gs-list { display: flex; flex-direction: column; gap: 5px; max-height: 42vh; overflow-y: auto; }
.gs-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: 3px; font-size: 12.5px;
  background: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--ui-line2);
}
.gs-row.up { border-left-color: #d8b96a; background: rgba(216, 185, 106, 0.08); }
.gs-row.off { border-left-color: #c05a5a; background: rgba(192, 90, 90, 0.07); }
.gs-badge {
  flex: 0 0 auto; font-size: 9.5px; font-weight: 700; letter-spacing: 1px;
  padding: 1px 6px; border-radius: 2px;
}
.gs-row.up .gs-badge { color: #1a1408; background: linear-gradient(180deg, #f0dca6, #d8b96a); }
.gs-row.off .gs-badge { color: #ffd0d0; background: rgba(200, 60, 60, 0.35); }
.gs-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ui-text); }
.gs-row.up .gs-name { color: var(--ui-gold-hi); }
.gs-name em { font-style: normal; font-size: 10px; color: var(--ui-dim); margin-left: 6px; }
.gs-pulls { flex: 0 0 auto; color: var(--ui-dim); font-size: 11.5px; }
.gs-pulls b { color: var(--ui-text); font-size: 13px; }
.gs-time { flex: 0 0 auto; color: var(--ui-dim); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.gs-empty { padding: 26px 10px; text-align: center; font-size: 12.5px; color: var(--ui-dim); line-height: 1.9; }
.gs-empty em { font-style: normal; font-size: 11px; color: #6f6a82; }
.gs-foot { text-align: center; font-size: 10.5px; color: var(--ui-dim); }

@media (max-width: 768px) {
  .gs-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-row { flex-wrap: wrap; row-gap: 2px; }
  .gs-time { width: 100%; text-align: right; }
}

/* ==== 战斗详情：七大属性加成 / 抗性 / 状态图标（2026-11-19） ==== */
.bi-wrap { max-height: 76vh; display: flex; flex-direction: column; }
.bi-wrap > .bi-head,
.bi-wrap > .bi-sec,
.bi-wrap > .bi-stats,
.bi-wrap > .bi-chips,
.bi-wrap > .bi-foot { flex: 0 0 auto; }
.bi-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.bi-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px 2px 4px; border-radius: 10px;
  border: 1px solid var(--ui-line2); background: rgba(255, 255, 255, 0.03);
  font-size: 11px; color: var(--ui-dim);
}
.bi-chip .bi-chip-ico { width: 14px; height: 14px; flex: 0 0 14px; object-fit: contain; }
.bi-chip i { font-style: normal; }
.bi-chip b { color: var(--ui-text); font-variant-numeric: tabular-nums; font-weight: 600; }
.bi-chip.on { border-color: rgba(127, 212, 160, 0.45); background: rgba(127, 212, 160, 0.08); color: #a8e6c0; }
.bi-chip.on b { color: #c8f5d9; }
.bi-chip.up { border-color: rgba(240, 217, 152, 0.42); background: rgba(240, 217, 152, 0.07); color: #e8d29a; }
.bi-chip.up b { color: #f5e3b0; }
.bi-chip.down { border-color: rgba(127, 212, 160, 0.45); background: rgba(127, 212, 160, 0.08); color: #a8e6c0; }
.bi-chip.down b { color: #c8f5d9; }
.bi-chip.zero { opacity: 0.55; }
.bi-st-ico {
  width: 18px; height: 18px; flex: 0 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 10.5px; font-weight: 700;
}
.bi-st-ico.buf { color: #101a14; background: linear-gradient(180deg, #a8ecbf, #6fbf8e); }
.bi-st-ico.deb { color: #2a1110; background: linear-gradient(180deg, #f0a99b, #d0705f); }
.bi-statuses { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }

@media (max-width: 768px) {
  .bi-wrap { max-height: 82vh; }
  .bi-stats { grid-template-columns: 1fr; }
  .bi-chip { font-size: 10.5px; padding: 2px 6px 2px 3px; }
}

/* ==== 角色详情 · 属性面板（视觉对齐战斗详情弹窗）==== */
.stat-panel {
  padding: 14px 16px 12px;
  background: linear-gradient(165deg, rgba(30, 30, 42, 0.72), rgba(13, 13, 19, 0.86));
  border: 1px solid rgba(196, 168, 124, 0.18);
  border-radius: 4px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}
.stat-blk { margin-bottom: 16px; }
.stat-blk:last-of-type { margin-bottom: 4px; }
.stat-blk-h {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; padding-bottom: 7px;
  font-size: 12.5px; letter-spacing: 1.2px; color: var(--ui-gold-hi);
  border-bottom: 1px solid rgba(196, 168, 124, 0.24);
}
.stat-blk-h::before {
  content: ""; width: 2px; height: 13px; border-radius: 1px;
  background: linear-gradient(180deg, #f0d998, #c4a87c);
}
.stat-panel .stat-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.stat-panel .stat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 2px; font-size: 13px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.055);
}
.stat-panel .stat-row .k { color: var(--ui-dim); font-size: 12.5px; }
.stat-panel .stat-row .v {
  color: #f2f4f9; font-weight: 600; font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.stat-panel .dmg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.stat-panel .chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px 3px 5px; border-radius: 11px;
  border: 1px solid var(--ui-line2); background: rgba(255, 255, 255, 0.03);
  font-size: 11.5px; color: var(--ui-dim);
}
.stat-panel .chip .chip-ico { width: 15px; height: 15px; flex: 0 0 15px; object-fit: contain; }
.stat-panel .chip i { font-style: normal; }
.stat-panel .chip b { color: var(--ui-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-panel .chip.on {
  border-color: rgba(127, 212, 160, 0.45);
  background: rgba(127, 212, 160, 0.08); color: #a8e6c0;
}
.stat-panel .chip.on b { color: #c8f5d9; }
.stat-note { margin-top: 10px; font-size: 10.8px; line-height: 1.7; color: rgba(150, 152, 170, 0.55); }

@media (max-width: 768px) {
  .stat-panel { padding: 11px 12px 10px; }
  .stat-panel .stat-grid-2 { gap: 0 14px; }
  .stat-panel .stat-row { padding: 7px 1px; }
  .stat-panel .stat-row .v { font-size: 12.5px; }
}

/* 行迹节点：未点亮图标提亮（原 0.42 透明在小尺寸下近似空白，容易被当成图标缺失） */
.sxn:not(.on) .sxn-ico { filter: grayscale(0.85) brightness(0.95); opacity: 0.58; }
.sxn-attr .sxn-core { width: 34px; height: 34px; }
.sxn-attr .sxn-ico { width: 64%; height: 64%; }
/* 晋阶未开放：再压暗一档，与「可点亮」区分 */
.sxn.gated:not(.on) .sxn-ico { opacity: 0.32; }

/* ==== 材料消耗行（行迹升级弹窗 / 角色晋阶预览 / 行迹详情面板）====
   全局统一：半透明磨砂卡片 + 细浅蓝白描边 + 大圆角，杜绝深色实心色块 */
.tr-up-h { margin: 4px 0 6px; font-size: 12px; color: var(--ui-gold); letter-spacing: 1px; }
.tr-mat-list { display: flex; flex-direction: column; gap: 8px; }
.tr-mat-row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; padding: 7px 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(180, 200, 255, 0.18); border-radius: 12px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .18s ease, background .18s ease;
}
.tr-mat-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tr-mat-frame {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}
.tr-mat-frame.r2 { border-color: rgba(106, 175, 104, 0.65); background: rgba(106, 175, 104, 0.12); }
.tr-mat-frame.r3 { border-color: rgba(95, 154, 224, 0.65); background: rgba(95, 154, 224, 0.12); }
.tr-mat-frame.r4 { border-color: rgba(179, 122, 224, 0.65); background: rgba(179, 122, 224, 0.12); }
.tr-mat-frame.r5, .tr-mat-frame.credit { border-color: rgba(232, 197, 106, 0.65); background: rgba(232, 197, 106, 0.12); }
.tr-mat-ico { width: 30px; height: 30px; object-fit: contain; display: block; }
.tr-mat-glyph { font-size: 15px; font-weight: 700; color: var(--ui-gold-hi); }
.tr-mat-name { font-size: 12.5px; color: var(--ui-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-mat-r { flex: 0 0 auto; font-size: 12.5px; color: var(--ui-dim); font-variant-numeric: tabular-nums; }
.tr-mat-r b { font-size: 13px; color: #eef2f8; font-weight: 700; }
.tr-mat-r b.short { color: #ff7a6e; }
.tr-mat-slash { margin: 0 3px; color: var(--ui-dim); }
/* 不足：只做淡红提示描边 + 数量标红，行本体保持磨砂卡片统一质感 */
.tr-mat-row.lack { background: rgba(248, 113, 113, 0.06); border-color: rgba(248, 113, 113, 0.38); }
.tr-mat-row.lack .tr-mat-name { color: #ffc4bd; }
.tr-up .lp-miss { margin-top: 2px; }
.tr-up .btn.big { width: 100%; }

/* ==== 材料获取跳转（缺材料点材料 → 材料来源 → 关卡导航）==== */
.mat-link { cursor: pointer; }
.mat-link:hover { border-color: rgba(232, 197, 106, 0.65) !important; background: rgba(232, 197, 106, 0.10) !important; }
.mat-link .tr-mat-name, .mat-link span { text-decoration: underline dotted rgba(232, 197, 106, 0.5); text-underline-offset: 3px; }
.ms-wrap { display: flex; flex-direction: column; gap: 10px; }
.ms-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--ui-line2); border-radius: 4px; }
.ms-frame { width: 40px; height: 40px; flex: 0 0 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 3px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.04); }
.ms-frame.r2 { border-color: rgba(106,175,104,.8); background: rgba(106,175,104,.14); }
.ms-frame.r3 { border-color: rgba(95,154,224,.8); background: rgba(95,154,224,.14); }
.ms-frame.r4 { border-color: rgba(179,122,224,.8); background: rgba(179,122,224,.14); }
.ms-frame.r5 { border-color: rgba(232,197,106,.8); background: rgba(232,197,106,.14); }
.ms-ico { width: 34px; height: 34px; object-fit: contain; }
.ms-glyph { font-size: 17px; font-weight: 700; color: var(--ui-gold-hi); }
.ms-id b { display: block; font-size: 14px; color: var(--ui-text); }
.ms-id em { display: block; margin-top: 3px; font-style: normal; font-size: 11.5px; color: var(--ui-dim); }
.ms-tip { font-size: 12.5px; color: var(--ui-gold); letter-spacing: 1px; }
.ms-list { display: flex; flex-direction: column; gap: 6px; max-height: 44vh; overflow-y: auto; }
.ms-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; min-height: 44px; cursor: pointer; border-radius: 3px;
  background: rgba(255,255,255,.035); border: 1px solid var(--ui-line2); transition: .15s ease; }
.ms-row:hover { border-color: rgba(232,197,106,.65); background: rgba(232,197,106,.10); transform: translateX(2px); }
.ms-row.locked { cursor: default; opacity: .55; }
.ms-row-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ms-row-l b { font-size: 12.5px; color: var(--ui-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-tag { flex: 0 0 auto; font-size: 10px; padding: 1px 6px; border-radius: 2px;
  color: var(--ui-gold-hi); background: rgba(196,168,124,.14); border: 1px solid rgba(196,168,124,.3); }
.ms-row-r { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-size: 11px; color: var(--ui-dim); }
.ms-loot { max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-go { color: var(--ui-gold); font-size: 11.5px; }
.ms-empty { padding: 26px; text-align: center; font-size: 12px; color: var(--ui-dim); }
.ms-foot { text-align: center; font-size: 10.5px; color: var(--ui-dim); }
/* 跳转后目标关卡闪烁高亮 */
.ms-focus { animation: msPulse 1.1s ease-in-out 2; border-color: var(--ui-gold) !important; }
@keyframes msPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,197,106,0); }
  50% { box-shadow: 0 0 18px 4px rgba(232,197,106,.55); background: rgba(232,197,106,.14); }
}
@media (max-width: 768px) {
  .ms-row { flex-direction: column; align-items: flex-start; }
  .ms-row-r { flex-wrap: wrap; }
  .ms-loot { max-width: 100%; }
}
.ms-row.locked { cursor: pointer; }

/* ==== 平板/半屏断点（768~1366）：角色三栏→两栏，立绘栏废弃 ==== */
@media (min-width: 768px) and (max-width: 1366px) {
  /* 两栏：左列表 220px + 右详情占满剩余空间，立绘栏隐藏（核心空间让给属性/光锥/行迹/星魂面板） */
  .char-view {
    grid-template-columns: 220px minmax(0, 1fr);
    overflow-x: hidden;
  }
  .char-view > * { width: 100%; min-width: 0; }
  .char-stage { display: none; }
  /* 覆盖 980 断点的跨行规则：面板与列表同行，高度回到视口内 */
  .char-panel { grid-column: auto; height: calc(100vh - 172px); }
  .char-list { height: calc(100vh - 172px); }
  /* 战斗改版（style-battle.css）：敌我上下两排卡牌，不再横向换行 */
  .battle-view .side { flex: 1 1 240px; width: auto; max-width: 100%; }
  /* 编队：竖向堆叠结构保持，但面板高度受控于视口，角色列表内部滚动 */
  .team-view { flex: 1; height: auto; min-height: 0; }
  .tm-panel-roster { min-height: 0; flex: 1; }
  .tm-panel-roster .char-grid { overflow-y: auto; }
}
