/* ===================================================================
   style-chardetail.css — 角色详情（官方布局复刻，2026-11-20 test 分支）
   -------------------------------------------------------------------
   结构：顶部横向头像栏 / 左侧竖排功能菜单 / 中间立绘+星云舞台 /
        右侧信息面板（含养成操作）/ 右下角光锥缩略
   仅作用于 .cd-view 作用域，不改动其它视图；配色沿用外壳金色主色，
   星云/立绘光晕用角色紫（官方详情页氛围）。
   =================================================================== */

/* ==== 视图外壳：占满主内容区，内部不滚动（滚动交给面板） ==== */
.stage.view-character { overflow: hidden; padding-bottom: 0; }
.stage.view-character > .cd-view { flex: 1 1 auto; min-height: 0; }

.cd-view {
  --cd-line: rgba(255, 255, 255, 0.09);
  --cd-line2: rgba(255, 255, 255, 0.055);
  --cd-panel: rgba(24, 26, 46, 0.72);
  --cd-text: #e9e9f8;
  --cd-dim: #a3a3c4;
  --cd-gold: #e7c46a;
  --cd-gold-hi: #f6e3ab;
  --cd-purple: #9d65ff;
  --cd-panel-w: 386px;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 44px;                 /* 免责声明条高度（窄屏会折两行），内容不被压住 */
  background: linear-gradient(180deg, #0f1020 0%, #191b36 48%, #222445 100%);
  color: var(--cd-text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

/* ==== 深空背景：星云 + 星点 ==== */
.cd-space { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cd-neb {
  position: absolute; border-radius: 50%; filter: blur(72px); opacity: .7;
}
.cd-neb.n1 { width: 70vw; height: 60vh; left: 8vw; top: -22vh;
  background: radial-gradient(circle, rgba(118, 80, 210, .5), transparent 70%); }
.cd-neb.n2 { width: 52vw; height: 50vh; right: -10vw; top: 6vh;
  background: radial-gradient(circle, rgba(70, 112, 220, .38), transparent 70%); }
.cd-neb.n3 { width: 60vw; height: 44vh; left: -8vw; bottom: -18vh;
  background: radial-gradient(circle, rgba(148, 90, 220, .32), transparent 72%); }
.cd-space .cd-stars { position: absolute; inset: 0; }
.cd-space .cd-stars i {
  position: absolute; border-radius: 50%; background: #fff;
  animation: cd-twinkle 5s ease-in-out infinite;
}
@keyframes cd-twinkle {
  0%, 100% { opacity: .15; transform: scale(.8); }
  50% { opacity: .85; transform: scale(1); }
}

/* ==== 顶部：品牌 + 横向头像栏 ==== */
.cd-top {
  position: relative; z-index: 4;
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 28px 4px;
  background: linear-gradient(180deg, rgba(10, 11, 24, .55), rgba(10, 11, 24, 0));
}
.cd-brand {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 4px; color: #cfcfe8; white-space: nowrap;
}
.cd-brand i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cd-gold);
  box-shadow: 0 0 12px var(--cd-gold);
}
.cd-ava-scroll {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: flex-start; gap: 10px;
  justify-content: safe center;          /* 头像少时整体居中，多时可横向滚 */
  overflow-x: auto; overflow-y: hidden;
  padding: 12px 2px 6px;                 /* 顶部留白，防 translateY/高亮环被上缘裁切 */
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}
.cd-ava-scroll::-webkit-scrollbar { display: none; }
.cd-ava {
  position: relative; flex: 0 0 auto;
  width: 54px; padding: 0; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; opacity: .68;
  transition: transform .2s ease, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cd-ava-img {
  position: relative; display: block;
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cd-ava-img .cc-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-ava.r5 .cd-ava-img { border-color: rgba(231, 196, 106, .55); }
.cd-ava.r4 .cd-ava-img { border-color: rgba(157, 101, 255, .5); }
.cd-ava:hover { opacity: .95; transform: translateY(-2px); }
.cd-ava.on { opacity: 1; transform: translateY(-2px) scale(1.08); }
.cd-ava.on .cd-ava-img {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(231, 196, 106, .55), 0 0 22px rgba(231, 196, 106, .45);
}
.cd-ava-name {
  max-width: 58px; font-size: 10px; color: var(--cd-dim); letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cd-ava.on .cd-ava-name { color: var(--cd-gold-hi); }
.cd-ava-team {
  position: absolute; top: -2px; right: 0; z-index: 2;
  padding: 0 3px; font-size: 9px; line-height: 13px;
  color: #1a1408; background: var(--cd-gold);
  border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.cd-count {
  flex: 0 0 auto; font-size: 11px; color: var(--cd-dim);
  letter-spacing: 1px; white-space: nowrap;
}
.cd-count b { color: var(--cd-gold-hi); font-weight: 500; }

/* ==== 元素/命途筛选条 ==== */
.cd-filterbar {
  position: relative; z-index: 4;
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 0 28px 6px;
}
.cd-f-label {
  font-size: 10.5px; color: rgba(163, 163, 196, .7); letter-spacing: 2px; margin-right: 2px;
}
.cd-f {
  width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--cd-line);
  transition: .16s ease;
}
.cd-f img { width: 18px; height: 18px; object-fit: contain; }
.cd-f:hover { border-color: rgba(231, 196, 106, .5); }
.cd-f.on {
  border-color: var(--cd-gold);
  background: rgba(231, 196, 106, .14);
  box-shadow: 0 0 12px rgba(231, 196, 106, .22);
}
.cd-f.txt {
  width: auto; padding: 0 11px; border-radius: 14px;
  font-size: 11.5px; color: var(--cd-dim); letter-spacing: 1px;
}
.cd-f.txt.on { color: var(--cd-gold-hi); }
.cd-f-sep {
  width: 1px; height: 18px; margin: 0 4px;
  background: var(--cd-line);
}
.cd-filterbar .dd { min-width: 112px; }

/* ==== 主区三栏：菜单 / 立绘 / 信息面板 ==== */
.cd-main {
  position: relative; z-index: 3;
  flex: 1 1 auto; min-height: 0;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) var(--cd-panel-w);
  grid-template-rows: minmax(0, 1fr);   /* 关键：行高锁死在剩余空间，内容由面板内部滚动 */
  gap: 18px;
  padding: 0 28px;
}
/* 行迹/星魂需要更大舞台：面板加宽（官方也是把这两个模块铺开） */
@media (min-width: 1500px) {
  .cd-view[data-tab="traces"], .cd-view[data-tab="eidolon"] { --cd-panel-w: 620px; }
}
@media (min-width: 1200px) and (max-width: 1499px) {
  .cd-view[data-tab="traces"], .cd-view[data-tab="eidolon"] { --cd-panel-w: 520px; }
}

/* ---- 左侧竖排菜单 ---- */
.cd-menu {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 22px; min-width: 0;
}
.cd-menu button {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: 8px;
  background: transparent; border: 1px solid transparent;
  color: #c5c5e2; font-size: 13px; letter-spacing: 3px;
  cursor: pointer; transition: .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cd-menu button svg { width: 20px; height: 20px; flex: 0 0 20px; opacity: .9; }
.cd-menu button:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.cd-menu button.on {
  color: #fff;
  background: linear-gradient(90deg, rgba(231, 196, 106, .18), rgba(231, 196, 106, .04));
  border-color: rgba(231, 196, 106, .45);
  box-shadow: 0 0 22px rgba(231, 196, 106, .18), inset 0 0 12px rgba(231, 196, 106, .08);
}
.cd-menu button.on::before {
  content: ""; position: absolute; left: -1px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 18px; border-radius: 2px;
  background: var(--cd-gold); box-shadow: 0 0 10px var(--cd-gold);
}
.cd-menu button.on svg { opacity: 1; filter: drop-shadow(0 0 6px rgba(231, 196, 106, .8)); }

/* ---- 中间：立绘舞台 ---- */
.cd-stage {
  position: relative; min-width: 0; min-height: 0;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}
.cd-portrait-wrap {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: flex-end; justify-content: center;
}
.cd-portrait-img {
  position: relative; z-index: 3;
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  object-fit: contain; object-position: center bottom;
  /* 官方立绘带场景底：径向蒙版羽化边缘，彻底消除黑色矩形块，融入星空 */
  -webkit-mask-image: radial-gradient(ellipse 72% 88% at 50% 55%, #000 42%, transparent 84%);
  mask-image: radial-gradient(ellipse 72% 88% at 50% 55%, #000 42%, transparent 84%);
  transition: opacity .24s ease, transform .3s ease;
}
.cd-portrait-img.fade { opacity: 0; transform: translateY(6px); }
.cd-portrait-glow {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: min(46vw, 620px); height: min(46vw, 620px);
  background: radial-gradient(circle, rgba(157, 101, 255, .18), transparent 62%);
  filter: blur(20px); pointer-events: none; z-index: 1;
}
.cd-portrait-base {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); z-index: 2;
  width: 300px; height: 38px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(157, 101, 255, .35), transparent 70%);
  filter: blur(10px);
}
.cd-ground {
  position: absolute; left: 50%; bottom: -26vh; transform: translateX(-50%);
  width: 1180px; height: 44vh; pointer-events: none; z-index: 1;
}
.cd-ground-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 58%, rgba(157, 101, 255, .45),
    rgba(96, 120, 220, .18) 42%, transparent 72%);
  filter: blur(16px);
}
.cd-ground .ring {
  position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%) rotateX(72deg);
  border-radius: 50%; border: 1px solid rgba(196, 180, 255, .2);
}
.cd-ground .ring.r1 { width: 560px; height: 560px;
  border-color: rgba(210, 196, 255, .4);
  box-shadow: 0 0 24px rgba(157, 101, 255, .2), inset 0 0 24px rgba(157, 101, 255, .12); }
.cd-ground .ring.r2 { width: 800px; height: 800px; border-color: rgba(196, 180, 255, .13); }
.cd-ground .ring.r3 { width: 1040px; height: 1040px; border-color: rgba(196, 180, 255, .07); }
.cd-empty-portrait {
  align-self: center; font-size: 12px; color: var(--cd-dim); letter-spacing: 2px;
}

/* ---- 右侧：信息面板 + 光锥缩略 ---- */
.cd-side {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 0; padding-top: 6px;
}
.cd-panel {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--cd-panel);
  border: 1px solid var(--cd-line); border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
}
.cd-head { flex: 0 0 auto; padding: 16px 16px 0; }

.cd-title h1 {
  margin: 0; font-size: 27px; font-weight: 500; letter-spacing: 3px;
  color: #fff; text-shadow: 0 0 22px rgba(157, 101, 255, .35);
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cd-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cd-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px 0 6px; border-radius: 11px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--cd-line);
  font-size: 10.5px; color: #d8d8ee; letter-spacing: 1px;
}
.cd-tag img { width: 14px; height: 14px; object-fit: contain; }
.cd-rank {
  margin-top: 6px; font-size: 12.5px; color: var(--cd-gold); letter-spacing: 3px;
}
.cd-rank .empty { color: rgba(255, 255, 255, .12); }

.cd-level {
  position: relative; margin-top: 10px;
  display: flex; align-items: baseline; gap: 7px;
  padding-bottom: 10px;
}
.cd-level .lv-label { font-size: 11px; color: var(--cd-dim); letter-spacing: 2px; }
.cd-level b {
  font-size: 20px; font-weight: 500; color: #fff;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.cd-level .lv-max { font-size: 11px; color: var(--cd-dim); }
.cd-level .cd-eid { margin-left: auto; font-size: 11px; color: var(--cd-gold); letter-spacing: 1px; }
.cd-lv-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: rgba(255, 255, 255, .07); border-radius: 2px; overflow: hidden;
}
.cd-lv-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, rgba(231, 196, 106, .95), rgba(157, 101, 255, .85));
  box-shadow: 0 0 12px rgba(231, 196, 106, .7);
}

/* 养成操作：2×2，任何分辨率都在面板顶部，不随立绘隐藏 */
.cd-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.cd-btn {
  min-height: 32px; padding: 6px 8px;
  font-size: 11.5px; letter-spacing: .5px; color: #ddd8ea;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--cd-line); border-radius: 6px;
  cursor: pointer; transition: .16s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: inherit;
}
.cd-btn:hover:not(:disabled) {
  color: #fff; border-color: rgba(231, 196, 106, .55);
  background: rgba(231, 196, 106, .12);
}
.cd-btn.primary {
  color: #1a1408; font-weight: 600;
  background: linear-gradient(180deg, var(--cd-gold-hi), var(--cd-gold));
  border-color: rgba(231, 196, 106, .8);
}
.cd-btn.primary:hover { box-shadow: 0 0 16px rgba(231, 196, 106, .4); }
.cd-btn:disabled { opacity: .38; cursor: not-allowed; }

/* 详情子页签：属性 / 技能 */
.cd-subtabs {
  display: flex; gap: 4px; margin-top: 12px;
  border-bottom: 1px solid var(--cd-line);
}
.cd-subtabs button {
  flex: 1; padding: 9px 0;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--cd-dim); font-size: 12px; letter-spacing: 3px;
  cursor: pointer; transition: .18s ease; font-family: inherit;
}
.cd-subtabs button:hover { color: #fff; }
.cd-subtabs button.on {
  color: #fff; border-bottom-color: var(--cd-gold);
  text-shadow: 0 0 14px rgba(231, 196, 106, .6);
}
.cd-subtabs.hide { display: none; }

.cd-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 8px 16px 16px;
  scrollbar-width: thin; scrollbar-color: rgba(157, 101, 255, .35) transparent;
}
.cd-body::-webkit-scrollbar { width: 6px; }
.cd-body::-webkit-scrollbar-thumb { background: rgba(157, 101, 255, .3); border-radius: 6px; }
.cd-body::-webkit-scrollbar-track { background: transparent; }

/* ==== 面板内既有组件的窄栏适配（组件本身不动，只改容器尺寸） ==== */
.cd-body .stat-panel {
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, .02);
  border-color: var(--cd-line2);
  border-radius: 8px;
  backdrop-filter: none;
}
.cd-body .stat-panel .stat-grid-2 { gap: 0 14px; }
.cd-body .stat-panel .stat-row { padding: 7px 2px; }
.cd-body .stat-panel .stat-row .k { font-size: 11.5px; }
.cd-body .stat-panel .stat-row .v { font-size: 12.5px; }
.cd-body .cone-hero {
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px; padding: 12px; margin-bottom: 12px;
}
.cd-body .cone-hero.empty { grid-template-columns: 90px minmax(0, 1fr); }
.cd-body .cone-hero .ch-name b { font-size: 15px; }
.cd-body .cone-hero .cc-meta, .cd-body .cone-hero .cc-base { font-size: 11.5px; }
.cd-body .cone-hero .cc-passive .line { font-size: 11.5px; line-height: 1.65; }
.cd-body .cone-hero .ch-img { aspect-ratio: 1 / 1.1; }
.cd-body .relic-grid6 { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.cd-body .relic-cell { padding: 8px 4px; }
.cd-body .relic-cell .rc-img { width: 42px; height: 42px; }
.cd-body .relic-cell .rc-set { font-size: 10.5px; }
.cd-body .relic-cell .rc-main { font-size: 10px; }
.cd-body .set-row { padding: 8px 10px; }
.cd-body .dt-sec { font-size: 12px; }

/* 行迹星盘 / 星魂星图：面板窄时横向滚动，不压缩节点 */
.cd-body .sx-wrap, .cd-body .ec-wrap { overflow-x: auto; scrollbar-width: thin; }
.cd-body .ecn-name { font-size: 10px; width: 92px; }

/* 光锥缩略（右下角） */
.cd-mini {
  flex: 0 0 92px;
  display: flex; overflow: hidden;
  background: var(--cd-panel);
  border: 1px solid var(--cd-line); border-radius: 11px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
  cursor: pointer; transition: .2s ease;
}
.cd-mini:hover {
  border-color: rgba(231, 196, 106, .5);
  box-shadow: 0 18px 50px rgba(231, 196, 106, .18);
}
.cd-mini-art {
  position: relative; width: 112px; flex: 0 0 112px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, rgba(157, 101, 255, .26), rgba(10, 11, 24, .9));
}
.cd-mini-art img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.cd-mini-art .img-fallback { font-size: 24px; color: #5f5c72; }
.cd-mini-meta {
  padding: 12px; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-width: 0;
}
.cd-mini-label { font-size: 9.5px; color: var(--cd-gold); letter-spacing: 3px; }
.cd-mini-name {
  font-size: 13px; color: #fff; letter-spacing: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cd-mini-sub { font-size: 10.5px; color: var(--cd-dim); letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-mini.empty .cd-mini-art { display: grid; place-items: center; font-size: 22px; color: #5f5c72; }

/* ==== 详情-技能（天赋 / 技能强化） ==== */
.cd-skill { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--cd-line2); }
.cd-skill:last-child { border-bottom: 0; }
.cd-skill-ico {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, rgba(231, 196, 106, .16), rgba(157, 101, 255, .08));
  border: 1px solid rgba(231, 196, 106, .22);
}
.cd-skill-ico img { width: 32px; height: 32px; object-fit: contain; }
.cd-skill-main { min-width: 0; }
.cd-skill-name {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: #fff; letter-spacing: 1px; margin-bottom: 4px;
}
.cd-skill-tag {
  font-size: 9.5px; color: var(--cd-gold-hi);
  border: 1px solid rgba(231, 196, 106, .35); border-radius: 3px;
  padding: 0 5px; letter-spacing: .5px; white-space: nowrap;
}
.cd-skill-lv { margin-left: auto; font-size: 10.5px; color: var(--cd-dim); }
.cd-skill-desc { font-size: 11.5px; line-height: 1.75; color: var(--cd-dim); }
.cd-sec-title {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 2px; padding-bottom: 7px;
  font-size: 12px; letter-spacing: 1.5px; color: var(--cd-gold-hi);
  border-bottom: 1px solid rgba(231, 196, 106, .22);
}
.cd-sec-title::before {
  content: ""; width: 2px; height: 12px; border-radius: 1px;
  background: linear-gradient(180deg, #f6e3ab, var(--cd-gold));
}
.cd-sec-title:not(:first-child) { margin-top: 14px; }

/* ==== 详情-信息 ==== */
.cd-info-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 2px; border-bottom: 1px solid var(--cd-line2);
  font-size: 12px;
}
.cd-info-row:last-child { border-bottom: 0; }
.cd-info-row span { flex: 0 0 62px; color: var(--cd-dim); letter-spacing: 1px; }
.cd-info-row b {
  font-weight: 400; color: #ececfb; min-width: 0;
  overflow-wrap: anywhere;
}

/* ==== 窄屏 / 平板 ==== */
@media (min-width: 1700px) {
  .cd-view { --cd-panel-w: 420px; }
}
@media (max-width: 1366px) {
  .cd-view { --cd-panel-w: 352px; }
  .cd-top { padding: 10px 18px 4px; }
  .cd-filterbar { padding: 0 18px 6px; }
  .cd-main { grid-template-columns: 138px minmax(0, 1fr) var(--cd-panel-w); gap: 14px; padding: 0 18px; }
  .cd-title h1 { font-size: 24px; }
  .cd-head { padding: 14px 14px 0; }
  .cd-body { padding: 8px 14px 14px; }
}
@media (max-width: 1100px) {
  .cd-view { --cd-panel-w: 330px; }
  .cd-main {
    grid-template-columns: 104px minmax(0, 1fr);   /* 立绘隐藏后只保留「菜单 + 面板」，不许留空列 */
    gap: 12px;
  }
  .cd-stage { display: none; }              /* 半屏：留出宽度给信息与操作区 */
  /* 行迹/星魂例外：星图是本页签核心内容，强制显示并给足高度，
     星图占上行、详情面板堆叠其下，cd-main 允许纵向滚动 */
  .cd-stage.trace, .cd-stage.eidolon {
    display: flex; grid-column: 2; grid-row: 1;
    height: 54vh; min-height: 340px;
  }
  .cd-main:has(.cd-stage.trace) .cd-side,
  .cd-main:has(.cd-stage.eidolon) .cd-side { grid-column: 2; grid-row: 2; }
  .cd-main:has(.cd-stage.trace),
  .cd-main:has(.cd-stage.eidolon) { grid-template-rows: auto auto; overflow-y: auto; }
  .cd-menu button { padding: 8px 10px; letter-spacing: 1px; font-size: 12px; }
  .cd-mini { display: none; }
  .cd-ava { width: 50px; }
  .cd-ava-img { width: 44px; height: 44px; }
}
/* 平板：面板铺满，内部内容限宽居中，避免 2 列属性被拉得过散 */
@media (min-width: 769px) and (max-width: 1100px) {
  .cd-head, .cd-body {
    padding-left: max(14px, calc((100% - 700px) / 2));
    padding-right: max(14px, calc((100% - 700px) / 2));
  }
}
/* 超短窗口：面板会被压到不可用，改为整页滚动并保底主区高度 */
@media (max-height: 640px) and (min-width: 769px) {
  .stage.view-character { overflow-y: auto; }
  .cd-view { height: auto; min-height: 100%; }
  .cd-main { min-height: 460px; }
}
@media (max-height: 780px) {
  .cd-head { padding-top: 12px; }
  .cd-title h1 { font-size: 23px; }
  .cd-acts { margin-top: 8px; }
  .cd-portrait-glow { width: min(40vw, 500px); height: min(40vw, 500px); }
}

/* ==== 手机端：整页滚动，操作区置顶 ==== */
@media (max-width: 768px) {
  .stage.view-character { overflow-y: auto !important; padding-bottom: 0 !important; }
  .cd-view {
    display: block;                       /* 手机整页流式排布，避免 flex 压缩面板 */
    height: auto; min-height: 100%;
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    overflow: visible;
  }
  .cd-top { padding: 8px 10px 0; gap: 10px; flex-wrap: wrap; }
  .cd-brand { font-size: 11px; letter-spacing: 2px; }
  .cd-count { order: 3; width: 100%; padding-left: 2px; }
  .cd-ava-scroll { gap: 8px; padding: 6px 2px 4px; }
  .cd-ava { width: 52px; }
  .cd-ava-img { width: 46px; height: 46px; }
  .cd-filterbar {
    padding: 2px 10px 6px; flex-wrap: nowrap;
    overflow-x: auto; scrollbar-width: none;
  }
  .cd-filterbar::-webkit-scrollbar { display: none; }
  .cd-f-label { display: none; }
  .cd-f-sep { display: none; }
  .cd-main {
    display: flex; flex-direction: column;
    gap: 8px; padding: 0 10px; min-height: 0; height: auto;
  }
  .cd-menu {
    flex: 0 0 auto;
    flex-direction: row; flex-wrap: wrap; gap: 4px;
    padding: 2px 0 0; overflow: visible;
  }
  .cd-menu button {
    flex: 1 1 calc(33.333% - 4px); justify-content: center;
    padding: 7px 6px; gap: 6px; letter-spacing: .5px; font-size: 11.5px;
    border-radius: 16px; background: rgba(255, 255, 255, .03);
    border-color: var(--cd-line);
  }
  .cd-menu button svg { width: 14px; height: 14px; flex-basis: 14px; }
  .cd-menu button.on::before { display: none; }
  .cd-stage {
    display: flex; order: -1; flex: 0 0 auto;
    height: 32vh; min-height: 200px;
  }
  .cd-portrait-wrap { height: 100%; }
  .cd-portrait-img {
    width: 100%; height: 100%; max-height: 100%;
    object-fit: cover; object-position: center 22%;
    -webkit-mask-image: radial-gradient(ellipse 90% 96% at 50% 50%, #000 55%, transparent 96%);
    mask-image: radial-gradient(ellipse 90% 96% at 50% 50%, #000 55%, transparent 96%);
  }
  .cd-side { padding-top: 0; gap: 8px; flex: 0 0 auto; }
  .cd-panel { overflow: visible; flex: 0 0 auto; }
  .cd-head { padding: 13px 13px 0; }
  .cd-body { overflow: visible; padding: 6px 13px 14px; }
  .cd-mini { display: flex; flex: 0 0 88px; }
  .cd-title h1 { font-size: 22px; letter-spacing: 2px; }
  .cd-acts { grid-template-columns: 1fr 1fr; }
  .cd-btn { min-height: 34px; font-size: 11.5px; }
  .cd-ground { display: none; }
  .cd-body .stat-panel .stat-grid-2 { gap: 0 12px; }
}
@media (max-width: 380px) {
  .cd-level b { font-size: 18px; }
  .cd-btn { font-size: 10.5px; }
}

/* ===================================================================
   全套界面复刻追加段（2026-11-20）：顶栏操作 / 光锥页 / 遗器环 /
   信息页 / 升级·晋阶 / 属性详情弹窗 / 角色列表抽屉
   =================================================================== */

/* ---- 顶栏操作：角色攻略 + 关闭 ---- */
.cd-top-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.cd-guide, .cd-close {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 15px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--cd-line);
  color: #d8d8ee; font-size: 11.5px; letter-spacing: 1px;
  cursor: pointer; transition: .18s ease; font-family: inherit;
}
.cd-guide svg, .cd-close svg { width: 15px; height: 15px; }
.cd-guide:hover, .cd-close:hover { color: #fff; border-color: rgba(231, 196, 106, .55); background: rgba(231, 196, 106, .1); }
.cd-close { width: 30px; padding: 0; justify-content: center; }

/* 菜单底部：角色列表格子按钮 */
.cd-menu-grid {
  margin-top: 12px;
  width: 46px; height: 46px; padding: 0;
  display: grid; place-items: center;
  border-radius: 9px; cursor: pointer;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--cd-line);
  color: #c5c5e2; transition: .18s ease;
}
.cd-menu-grid svg { width: 18px; height: 18px; }
.cd-menu-grid:hover { color: #fff; border-color: rgba(231, 196, 106, .55); background: rgba(231, 196, 106, .1); }

/* 行迹/星魂无面板：主区两栏铺满 */
.cd-main.no-side { grid-template-columns: 148px minmax(0, 1fr); }

/* ---- 立绘脚下星轨（官方详情光环） ---- */
.cd-orbit {
  position: absolute; left: 50%; bottom: -8px; z-index: 2;
  transform: translateX(-50%) rotateX(74deg);
  border-radius: 50%; border: 1px solid rgba(210, 196, 255, .3);
  pointer-events: none;
}
.cd-orbit.o1 { width: 420px; height: 420px; border-color: rgba(224, 210, 255, .55);
  box-shadow: 0 0 30px rgba(157, 101, 255, .3), inset 0 0 30px rgba(157, 101, 255, .15); }
.cd-orbit.o2 { width: 590px; height: 590px; border-color: rgba(206, 190, 255, .22); }
.cd-orbit.o3 { width: 760px; height: 760px; border-color: rgba(206, 190, 255, .1); }

/* 信息页大立绘 */
.cp-info-stage {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.cp-info-stage .cp-portrait {
  width: auto; height: 104%; max-height: none; object-fit: cover; object-position: center 18%;
}
.cp-info-fade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 16, 32, .35), transparent 30%, transparent 68%, rgba(15, 16, 32, .82));
}

/* ===================================================================
   右侧面板各页（cp-*）
   =================================================================== */
.cp-panel-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.cp-head { flex: 0 0 auto; padding: 15px 16px 0; }
.cp-name-row { display: flex; align-items: center; gap: 9px; }
.cp-path-ico { width: 22px; height: 22px; object-fit: contain; opacity: .92; }
.cp-name {
  margin: 0; font-size: 24px; font-weight: 500; letter-spacing: 2.5px; color: #fff;
  text-shadow: 0 0 22px rgba(157, 101, 255, .35);
  line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-team {
  margin-left: auto; flex: 0 0 auto;
  height: 26px; padding: 0 12px; border-radius: 13px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--cd-line);
  color: #d8d8ee; font-size: 11px; letter-spacing: 1px; cursor: pointer; transition: .18s ease;
  font-family: inherit;
}
.cp-team:hover { color: #fff; border-color: rgba(231, 196, 106, .55); }
.cp-team.on {
  color: #1a1408; font-weight: 600;
  background: linear-gradient(180deg, var(--cd-gold-hi), var(--cd-gold));
  border-color: rgba(231, 196, 106, .8);
}
.cp-sub-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--cd-dim); letter-spacing: 1px; }
.cp-el-ico { width: 15px; height: 15px; object-fit: contain; }
.cp-sub-row em { font-style: normal; color: #c9c9e6; }
.cp-dias { display: flex; gap: 7px; margin-top: 9px; }
.cp-dia {
  width: 13px; height: 13px;
  background: rgba(255, 255, 255, .1);
  transform: rotate(45deg) scale(.82); border-radius: 2px;
  transition: .2s ease;
}
.cp-dia.on {
  background: linear-gradient(135deg, #f6e3ab, #e0b34e);
  box-shadow: 0 0 10px rgba(231, 196, 106, .7);
}
.cp-level { margin-top: 12px; padding-bottom: 12px; }
.cp-level span { font-size: 12px; color: #e6e6f6; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.cp-lvbar { margin-top: 7px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.cp-lvbar i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, rgba(231, 196, 106, .95), rgba(157, 101, 255, .85));
  box-shadow: 0 0 12px rgba(231, 196, 106, .6);
  transition: width .4s ease;
}
.cp-tabs { flex: 0 0 auto; display: flex; gap: 6px; padding: 2px 16px 0; }
.cp-tabs button {
  flex: 1; height: 30px; border-radius: 15px;
  background: transparent; border: 1px solid var(--cd-line);
  color: var(--cd-dim); font-size: 12px; letter-spacing: 2px;
  cursor: pointer; transition: .18s ease; font-family: inherit;
}
.cp-tabs button:hover { color: #fff; }
.cp-tabs button.on { background: rgba(255, 255, 255, .88); border-color: #fff; color: #23233f; font-weight: 600; }
.cp-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 10px 16px 14px;
  scrollbar-width: thin; scrollbar-color: rgba(157, 101, 255, .35) transparent;
}
.cp-body::-webkit-scrollbar { width: 6px; }
.cp-body::-webkit-scrollbar-thumb { background: rgba(157, 101, 255, .3); border-radius: 6px; }

/* 属性行 */
.cp-stats { display: flex; flex-direction: column; gap: 14px; }
.cp-sglabel {
  font-size: 11px; color: var(--cd-gold-hi); letter-spacing: 2px;
  padding-bottom: 6px; border-bottom: 1px solid rgba(231, 196, 106, .22);
}
.cp-srow {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 2px; border-bottom: 1px solid var(--cd-line2);
}
.cp-srow:last-child { border-bottom: 0; }
.cp-stat-ico { width: 15px; height: 15px; flex: 0 0 15px; color: rgba(210, 210, 240, .8); }
.cp-sname { font-size: 12px; color: #dcdcf2; letter-spacing: 1px; }
.cp-sval { margin-left: auto; font-size: 13px; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }

/* 技能列表 */
.cp-skill { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--cd-line2); }
.cp-skill:last-child { border-bottom: 0; }
.cp-skill-ico {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 8px;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, rgba(231, 196, 106, .16), rgba(157, 101, 255, .08));
  border: 1px solid rgba(231, 196, 106, .22);
}
.cp-skill-ico img { width: 30px; height: 30px; object-fit: contain; }
.cp-skill-glyph { font-size: 16px; color: var(--cd-gold); }
.cp-skill-main { min-width: 0; flex: 1; }
.cp-skill-h {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  font-size: 12.5px; color: #fff; letter-spacing: 1px; margin-bottom: 4px;
}
.cp-skill-h i {
  font-style: normal; font-size: 9.5px; color: var(--cd-gold-hi);
  border: 1px solid rgba(231, 196, 106, .35); border-radius: 3px; padding: 0 5px;
}
.cp-skill-h em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--cd-dim); font-variant-numeric: tabular-nums; }
.cp-skill-main p { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--cd-dim); }
.cp-empty { padding: 16px 4px; font-size: 11.5px; color: var(--cd-dim); letter-spacing: 1px; text-align: center; }

/* 属性详情 / 光锥预览 / CTA */
.cp-wide {
  flex: 0 0 auto; margin: 0 16px 10px; height: 34px; border-radius: 8px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--cd-line);
  color: #e2e2f4; font-size: 12px; letter-spacing: 2px; cursor: pointer;
  transition: .18s ease; font-family: inherit;
}
.cp-wide:hover { color: #fff; border-color: rgba(231, 196, 106, .55); background: rgba(231, 196, 106, .1); }
.cp-coneprev {
  flex: 0 0 auto; margin: 0 16px 10px;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer; text-align: left;
  background: linear-gradient(90deg, rgba(157, 101, 255, .12), rgba(255, 255, 255, .03));
  border: 1px solid rgba(157, 101, 255, .3); transition: .18s ease; font-family: inherit;
}
.cp-coneprev:hover { border-color: rgba(157, 101, 255, .6); box-shadow: 0 0 18px rgba(157, 101, 255, .2); }
.cp-coneprev-art {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 7px; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(157, 101, 255, .3), rgba(10, 11, 24, .85));
  font-size: 20px; color: var(--cd-purple);
}
.cp-coneprev-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.cp-coneprev-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cp-coneprev-info b { font-size: 12.5px; color: #fff; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-coneprev-info i { font-style: normal; font-size: 10.5px; color: var(--cd-dim); }
.cp-coneprev.empty { border-style: dashed; }
.cp-cta {
  flex: 0 0 auto; margin: 2px 16px 16px; height: 42px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(226, 226, 246, .82));
  border: 1px solid #fff; color: #23233f; font-size: 14px; font-weight: 600; letter-spacing: 3px;
  cursor: pointer; transition: .18s ease; font-family: inherit;
  box-shadow: 0 8px 24px rgba(255, 255, 255, .12);
}
.cp-cta:hover:not(:disabled) { box-shadow: 0 8px 30px rgba(255, 255, 255, .28); transform: translateY(-1px); }
.cp-cta:disabled { opacity: .4; cursor: not-allowed; }

/* 面板底双按钮 */
.cp-actions2 { flex: 0 0 auto; display: flex; gap: 8px; padding: 8px 16px 16px; }
.cp-btn {
  flex: 1; height: 36px; border-radius: 9px;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .18);
  color: #f0f0fa; font-size: 12.5px; letter-spacing: 2px; cursor: pointer; transition: .18s ease;
  font-family: inherit;
}
.cp-btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; }

/* ---- 光锥页舞台：金色容器 + 大图卡 + 统一透视姿态 ---- */
.cp-cone-stage {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
}
.cp-cone-aura {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: min(42vw, 520px); height: min(42vw, 520px); border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 101, 255, .24), transparent 64%);
  filter: blur(24px); pointer-events: none;
}
/* 接触阴影 + 悬浮光晕：与卡牌同一透视消失点 */
.cp-cone-ground {
  position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%);
  width: 52%; height: 26px; border-radius: 50%; z-index: 1;
  background:
    radial-gradient(ellipse, rgba(0, 0, 0, .5), transparent 72%),
    radial-gradient(ellipse, rgba(231, 196, 106, .18), transparent 78%);
  filter: blur(8px); pointer-events: none;
}
/* 官方大图直出：不叠加任何自制外框，比例锁原图 */
.cp-cone-art {
  position: relative; z-index: 2;
  height: 90%; width: auto; max-width: 88%;
  object-fit: contain;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .55))
          drop-shadow(0 0 28px rgba(140, 110, 255, .18));
  transition: transform .3s ease, filter .3s ease;
}
.cp-cone-art:hover {
  transform: translateY(-6px) scale(1.02);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6))
          drop-shadow(0 0 34px rgba(140, 110, 255, .24));
}

.cp-cone-card.empty {
  width: min(46%, 260px); aspect-ratio: 3 / 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px dashed rgba(255, 255, 255, .2); border-radius: 16px;
  color: #5f5c88; font-size: 30px;
}
.cp-cone-card.empty .cp-cone-art, .cp-cone-card.empty .cp-cone-shine { display: none; }
.cp-cone-card.empty i { font-style: normal; font-size: 12px; letter-spacing: 2px; color: var(--cd-dim); }

/* 光锥面板文本 */
.cp-sec {
  margin: 14px 0 8px; padding-bottom: 7px;
  font-size: 12px; letter-spacing: 2px; color: var(--cd-gold-hi);
  border-bottom: 1px solid rgba(231, 196, 106, .22);
}
.cp-si { font-size: 11px; color: #8fd8e8; letter-spacing: 1px; margin-bottom: 6px; }
.cp-skill-text { background: rgba(255, 255, 255, .03); border: 1px solid var(--cd-line2); border-radius: 8px; padding: 10px 12px; }
.cp-skill-text b { display: block; font-size: 12.5px; color: #fff; letter-spacing: 1px; margin-bottom: 5px; }
.cp-skill-text p { margin: 0; font-size: 11.5px; line-height: 1.75; color: var(--cd-dim); }
.cp-skill-text p em, .cp-set-row p em { font-style: normal; color: #7dd3fc; font-weight: 600; }
.cp-story { margin: 10px 0 0; font-size: 10.5px; line-height: 1.7; color: rgba(163, 163, 196, .65); }

/* ---- 遗器页舞台：装配环 ---- */
.cp-relic-stage {
  position: relative; width: min(78%, 460px); aspect-ratio: 1;
  display: block; margin: auto;
}
.cp-ring-orbit {
  position: absolute; inset: 14%; border-radius: 50%;
  border: 1px solid rgba(120, 180, 255, .4);
  box-shadow: 0 0 34px rgba(90, 140, 255, .25), inset 0 0 34px rgba(90, 140, 255, .12);
}
.cp-ring-orbit.inner { inset: 27%; border-color: rgba(120, 180, 255, .18); box-shadow: none; }
.cp-slot {
  position: absolute; transform: translate(-50%, -50%);
  width: 64px; height: 76px; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.cp-slot-art, .cp-slot .cp-slot-img { width: 52px; height: 52px; object-fit: contain; }
.cp-slot::before {
  content: ""; position: absolute; left: 50%; top: 26px; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 40, 80, .8), rgba(18, 22, 44, .9));
  border: 1px solid rgba(140, 180, 255, .35);
  box-shadow: 0 0 18px rgba(90, 140, 255, .22);
  z-index: -1; transition: .18s ease;
}
.cp-slot:hover::before { border-color: rgba(200, 225, 255, .7); box-shadow: 0 0 26px rgba(120, 170, 255, .4); }
.cp-slot.empty::before { opacity: .45; }
.cp-slot-img { position: relative; z-index: 1; }
.cp-slot-plus { position: relative; z-index: 1; font-size: 18px; color: rgba(210, 225, 255, .6); line-height: 52px; }
.cp-slot-lv { position: relative; z-index: 1; font-size: 10px; color: #cfe0ff; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.cp-slot-lv.empty { color: rgba(163, 163, 196, .6); }
.cp-slot-name {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  font-style: normal; font-size: 9.5px; color: var(--cd-dim); letter-spacing: 1px; white-space: nowrap;
}
.cp-ring-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 118px; height: 118px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: radial-gradient(circle, rgba(24, 30, 62, .92), rgba(14, 16, 34, .95));
  border: 1px solid rgba(157, 101, 255, .4);
  box-shadow: 0 0 30px rgba(157, 101, 255, .25), inset 0 0 20px rgba(157, 101, 255, .1);
}
.cp-core-img { width: 46px; height: 46px; object-fit: contain; }
.cp-core-name { max-width: 100px; font-size: 10.5px; color: #fff; letter-spacing: 1px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-core-count { font-style: normal; font-size: 9.5px; color: var(--cd-gold); }
.cp-core-empty { font-size: 12px; letter-spacing: 2px; color: var(--cd-dim); }

/* 套装效果 */
.cp-set { padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, .025); border: 1px solid var(--cd-line2); margin-bottom: 8px; }
.cp-set-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; letter-spacing: 1px; color: #b9b9d6; }
.cp-set.on .cp-set-name { color: var(--cd-gold-hi); }
.cp-set-name i { font-style: normal; color: #7fe0a8; font-size: 12px; }
.cp-set-name em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--cd-dim); }
.cp-set-row { display: flex; gap: 8px; margin-top: 6px; opacity: .55; }
.cp-set-row.on { opacity: 1; }
.cp-set-row span { flex: 0 0 42px; font-size: 10.5px; color: #8fd8e8; letter-spacing: 1px; }
.cp-set-row p { margin: 0; flex: 1; font-size: 11px; line-height: 1.65; color: var(--cd-dim); }

/* ---- 信息页 ---- */
.cp-info-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 2px; border-bottom: 1px solid var(--cd-line2); font-size: 12px;
}
.cp-info-row span { flex: 0 0 62px; color: var(--cd-dim); letter-spacing: 1px; }
.cp-info-row b { font-weight: 400; color: #ececfb; min-width: 0; overflow-wrap: anywhere; }
.cp-bio-note { margin: 0 0 8px; font-size: 10px; color: rgba(163, 163, 196, .6); }
.cp-bio { margin: 0 0 10px; font-size: 11.5px; line-height: 1.8; color: #d5d5ec; }

/* ===================================================================
   升级 / 晋阶面板（up-*）
   =================================================================== */
.cp-up { padding: 0 0 12px; }
.cp-up-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 13px 16px 0;
}
.cp-up-head h2 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: 2px; color: #fff; }
.cp-back {
  width: 28px; height: 28px; border-radius: 8px; padding: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--cd-line);
  color: #d8d8ee; font-size: 16px; cursor: pointer; transition: .18s ease; font-family: inherit;
}
.cp-back:hover { color: #fff; border-color: rgba(231, 196, 106, .55); }
.cp-up-lv {
  display: flex; align-items: baseline; gap: 9px;
  padding: 12px 16px 0;
  font-variant-numeric: tabular-nums;
}
.cp-up-lv span { font-size: 15px; color: #e6e6f6; }
.cp-up-lv i { font-style: normal; color: var(--cd-dim); font-size: 13px; }
.cp-up-lv b { font-size: 20px; font-weight: 600; color: var(--cd-gold-hi); }
.cp-up-note { padding: 6px 16px 0; font-size: 10.5px; color: var(--cd-dim); line-height: 1.6; }
.up-stats { display: flex; flex-direction: column; padding: 8px 16px 0; }
.up-stat {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 2px; border-bottom: 1px solid var(--cd-line2);
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.up-stat span { flex: 1; color: #dcdcf2; letter-spacing: 1px; }
.up-stat b { font-weight: 500; color: #fff; }
.up-stat i { font-style: normal; color: var(--cd-dim); }
.up-stat i.fixed { color: rgba(163, 163, 196, .5); }
.up-stat em { font-style: normal; color: #8fd8e8; font-weight: 500; }
.up-range { margin: 14px 16px 0; width: calc(100% - 32px); accent-color: #9d65ff; cursor: pointer; }
.up-range-ticks { display: flex; justify-content: space-between; padding: 4px 16px 0; font-size: 10px; color: var(--cd-dim); }
.up-sec {
  display: flex; align-items: center; justify-content: space-between;
  margin: 12px 16px 8px;
}
.up-sec .cp-sec { margin: 0; flex: 1; }
.up-switch {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--cd-dim); cursor: pointer; user-select: none;
}
.up-switch input { display: none; }
.up-switch i {
  width: 30px; height: 16px; border-radius: 8px; position: relative;
  background: rgba(255, 255, 255, .1); transition: .2s ease;
}
.up-switch i::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 12px; height: 12px; border-radius: 50%; background: #cfcfe8; transition: .2s ease;
}
.up-switch input:checked + i { background: rgba(231, 196, 106, .55); }
.up-switch input:checked + i::after { left: 16px; background: var(--cd-gold-hi); }
.up-auto {
  display: block; margin: 0 16px 10px; height: 34px; border-radius: 8px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--cd-line);
  color: #e2e2f4; font-size: 12px; letter-spacing: 1.5px; cursor: pointer; transition: .18s ease;
  font-family: inherit;
}
.up-auto:hover:not(:disabled) { border-color: rgba(231, 196, 106, .55); color: #fff; }
.up-auto:disabled { opacity: .4; cursor: not-allowed; }
.up-mats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px; padding: 0 16px;
}
.up-mat {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 7px; border-radius: 9px; cursor: pointer;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--cd-line2);
  transition: .18s ease; font-family: inherit;
}
.up-mat:hover { border-color: rgba(157, 101, 255, .5); }
.up-mat.lack { opacity: .75; }
.up-mat-art { width: 40px; height: 40px; display: grid; place-items: center; }
.up-mat-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.up-mat-name {
  max-width: 100%; font-size: 9.5px; color: #c5c5e2; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-mat-num { font-size: 10px; color: #fff; font-variant-numeric: tabular-nums; }
.up-mat-num.lack { color: #ff7d7d; }
.up-credit {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 16px 0; font-size: 12px;
}
.up-credit span { color: var(--cd-dim); letter-spacing: 1px; }
.up-credit b { font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.up-credit b.lack { color: #ff7d7d; }
.up-credit em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--cd-dim); font-variant-numeric: tabular-nums; }
.up-warn { padding: 6px 16px 0; font-size: 11px; color: #ff9d9d; }
.cp-up-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 4px;
}
.up-farm {
  flex: 0 0 auto; height: 34px; padding: 0 12px; border-radius: 8px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--cd-line);
  color: #e2e2f4; font-size: 11.5px; letter-spacing: 1px; cursor: pointer; transition: .18s ease;
  font-family: inherit;
}
.up-farm i { font-style: normal; color: var(--cd-gold); }
.up-farm:hover { color: #fff; border-color: rgba(231, 196, 106, .55); }
.up-go {
  flex: 1; height: 40px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(226, 226, 246, .82));
  border: 1px solid #fff; color: #23233f; font-size: 13.5px; font-weight: 600; letter-spacing: 3px;
  cursor: pointer; transition: .18s ease; font-family: inherit;
}
.up-go:hover:not(:disabled) { box-shadow: 0 8px 26px rgba(255, 255, 255, .25); }
.up-go:disabled { opacity: .4; cursor: not-allowed; }

/* ===================================================================
   属性详情弹窗（sm-*）——深空磨砂主题，缩小尺寸
   =================================================================== */
#modal-layer .modal-box.stat { width: min(720px, 92vw); max-height: 82vh; }
.sm-sec { margin-bottom: 16px; }
.sm-sec:last-child { margin-bottom: 4px; }
.sm-sec h4 {
  margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: 2px;
  line-height: 1.4; color: #e8eaf6;
  padding-left: 11px; padding-bottom: 7px; position: relative;
  border-bottom: 1px solid rgba(180, 200, 255, .16);
}
.sm-sec h4::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 3px; height: 14px; border-radius: 2px;
  background: #7dd3fc; box-shadow: 0 0 8px rgba(125, 211, 252, .7);
}
.sm-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 3px; border-bottom: 1px solid rgba(180, 200, 255, .08);
  font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.sm-row:last-child { border-bottom: 0; }
.sm-k { flex: 1; color: #aab2d4; letter-spacing: 1px; display: flex; align-items: center; gap: 6px; }
.sm-el { width: 16px; height: 16px; object-fit: contain; background: transparent !important; }
.sm-base { font-weight: 500; color: #e8eaf6; }
.sm-add { font-style: normal; color: #7dd3fc; font-size: 11.5px; }
.sm-q {
  width: 14px; height: 14px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: rgba(180, 200, 255, .15); color: #e8eaf6; font-size: 9px; font-style: normal; cursor: help;
}
.sm-note { margin-top: 4px; font-size: 10.5px; line-height: 1.6; color: #7c86ad; }

/* ===================================================================
   攻略 / 故事弹窗（gd-*）——官方技能说明风格：深色磨砂底 + 高对比层级
   =================================================================== */
.gd-sec { margin-bottom: 22px; }
.gd-sec:last-child { margin-bottom: 6px; }
.gd-sec h4 {
  margin: 0 0 12px; font-size: 16px; font-weight: 700; letter-spacing: 3px;
  line-height: 1.4; color: #ffd77a;
  padding-left: 11px; position: relative;
  border-bottom: 1px solid rgba(255, 215, 122, .25); padding-bottom: 8px;
}
.gd-sec h4::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 3px; height: 15px; border-radius: 2px;
  background: var(--cyan, #7dd3fc); box-shadow: 0 0 8px rgba(125, 211, 252, .7);
}
.gd-item { padding: 11px 0 9px; border-bottom: 1px solid rgba(180, 200, 255, .09); }
.gd-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.gd-item b {
  display: block; font-size: 14px; font-weight: 700; color: #fff;
  letter-spacing: 1px; margin-bottom: 6px; line-height: 1.4;
}
.gd-item p {
  margin: 0; font-size: 13px; line-height: 1.7; color: #c5cdea;
  padding-left: 2px;
}
.gd-item p em, .gd-p em { font-style: normal; color: #7dd3fc; font-weight: 600; }
.gd-p { margin: 0 0 12px; font-size: 13px; line-height: 1.75; color: #c5cdea; }

/* ===================================================================
   角色列表抽屉（dw-*，左侧滑出）
   =================================================================== */
.cd-drawer-mask {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(5, 6, 14, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.cd-drawer-mask.open { opacity: 1; pointer-events: auto; }
.cd-drawer {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 31;
  width: clamp(300px, 20vw, 440px);
  display: flex; flex-direction: column;
  background: rgba(20, 22, 42, .92);
  border-right: 1px solid var(--cd-line);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 26px 0 60px rgba(0, 0, 0, .5);
  transform: translateX(-102%);
  transition: transform .26s cubic-bezier(.33, .8, .34, 1);
}
.cd-drawer.open { transform: translateX(0); }
.cd-drawer-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
}
.cd-drawer-head b { font-size: 15px; letter-spacing: 3px; color: #fff; font-weight: 500; }
.cd-drawer-x {
  width: 26px; height: 26px; border-radius: 8px; padding: 0;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--cd-line);
  color: #d8d8ee; font-size: 14px; cursor: pointer; font-family: inherit;
}
.cd-drawer-x:hover { color: #fff; border-color: rgba(231, 196, 106, .55); }
.cd-drawer-filter {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 4px 16px 10px; border-bottom: 1px solid var(--cd-line2);
}
.dw-els { display: flex; gap: 5px; flex-wrap: wrap; }
.dw-el {
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--cd-line);
  font-size: 10px; color: var(--cd-dim); transition: .16s ease; font-family: inherit;
}
.dw-el img { width: 17px; height: 17px; object-fit: contain; }
.dw-el:hover { border-color: rgba(231, 196, 106, .5); }
.dw-el.on { border-color: var(--cd-gold); background: rgba(231, 196, 106, .14); box-shadow: 0 0 10px rgba(231, 196, 106, .25); }
.dw-path { flex: 1; min-width: 110px; }
/* 角色列表：固定每行 3 个，卡片 1:1 正方形锁比例 */
.cd-drawer-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 12px 14px;
  scrollbar-width: thin; scrollbar-color: rgba(157, 101, 255, .35) transparent;
}
.dw-card {
  width: 100%; min-width: 0;            /* 截断 aspect-ratio 与轨道尺寸的循环依赖 */
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px 7px; border-radius: 11px; cursor: pointer;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--cd-line2);
  transition: .16s ease; font-family: inherit; position: relative;
}
.dw-card:hover { border-color: rgba(231, 196, 106, .5); background: rgba(231, 196, 106, .07); }
.dw-card.r5 { border-color: rgba(231, 196, 106, .28); }
.dw-ava {
  position: relative; flex: 1 1 auto; width: 100%; min-height: 0;
  display: flex; align-items: center; justify-content: center;
}
.dw-ava-img {
  width: min(64%, 74px); aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .15);
}
.dw-ava-img img, .dw-ava-img .cc-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dw-new {
  position: absolute; top: -3px; right: -3px; z-index: 2;
  font-style: normal; font-size: 8.5px; line-height: 14px; padding: 0 3px;
  color: #1a1408; background: var(--cd-gold); border-radius: 3px;
}
.dw-team {
  position: absolute; top: -3px; left: -3px; z-index: 2;
  font-style: normal; font-size: 8.5px; line-height: 14px; padding: 0 3px;
  color: #fff; background: #4a7dd8; border-radius: 3px;
}
.dw-name { max-width: 100%; font-size: 12.5px; color: #e2e2f4; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-lv { font-size: 10.5px; color: var(--cd-dim); font-variant-numeric: tabular-nums; }
.cd-drawer-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 10px 16px 12px; border-top: 1px solid var(--cd-line2);
}
.dw-funnel { font-size: 13px; color: var(--cd-dim); }
.dw-dir {
  margin-left: auto; width: 30px; height: 30px; border-radius: 8px; padding: 0;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--cd-line);
  color: #e2e2f4; font-size: 13px; cursor: pointer; font-family: inherit;
}
.dw-dir:hover { color: #fff; border-color: rgba(231, 196, 106, .55); }

/* ===================================================================
   追加段响应式
   =================================================================== */
@media (max-width: 1366px) {
  .cd-main.no-side { grid-template-columns: 138px minmax(0, 1fr); }
  .cp-name { font-size: 21px; }
  .cp-head { padding: 13px 14px 0; }
  .cp-tabs { padding: 2px 14px 0; }
  .cp-body { padding: 8px 14px 12px; }
  .cp-wide, .cp-coneprev, .cp-actions2, .cp-cta { margin-left: 14px; margin-right: 14px; }
}
@media (max-width: 1100px) {
  .cd-main.no-side { grid-template-columns: 104px minmax(0, 1fr); }
  .cp-relic-stage { width: min(88%, 420px); }
}
/* 平板：舞台不再隐藏（遗器环/光锥卡是核心内容），立绘舞台保留 */
@media (max-width: 1100px) {
  .cd-stage { display: flex; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .cd-view { --cd-panel-w: 380px; }
  .cp-relic-stage { width: min(92%, 380px); }
  .cp-slot { width: 56px; height: 66px; }
  .cp-slot-art, .cp-slot .cp-slot-img { width: 44px; height: 44px; }
  .cp-slot::before { width: 46px; height: 46px; top: 22px; }
  .cp-slot-plus { line-height: 44px; }
  .cp-ring-core { width: 96px; height: 96px; }
}
@media (max-height: 780px) {
  .cp-name { font-size: 20px; }
  .cp-head { padding-top: 11px; }
}
/* 手机端 */
@media (max-width: 768px) {
  .cd-main.no-side { display: flex; flex-direction: column; }
  .cd-stage.trace, .cd-stage.eidolon { height: 54vh; min-height: 340px; }
  .cp-trace-host, .cp-eid-host {
    width: 100%; height: 100%; overflow: auto;
    display: flex; align-items: center; justify-content: center;
  }
  .cp-cone-stage { height: 46vh; min-height: 300px; }
  .cp-cone-art { height: 88%; max-width: 94%; }
  .cp-relic-stage { width: min(94%, 360px); height: auto; }
  .cp-slot { width: 56px; height: 64px; }
  .cp-slot-art, .cp-slot .cp-slot-img { width: 42px; height: 42px; }
  .cp-slot::before { width: 44px; height: 44px; top: 21px; }
  .cp-slot-lv { font-size: 9px; }
  .cp-info-stage .cp-portrait { height: 100%; object-position: center 14%; }
  .cp-name { font-size: 20px; letter-spacing: 2px; }
  .cp-panel-inner { height: auto; }
  .cp-body { overflow: visible; }
  .up-mats { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
}

/* ===================================================================
   行迹界面官方风格重构（sx-* 覆盖 + tp-* 详情面板）
   =================================================================== */
/* 舞台：星图悬浮于深空，不做矩形面板 */
/* host 设为 size 容器：星图边长可同时受宽与高约束（2K/4K/短窗口均不裁切） */
.cp-trace-host {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  overflow: hidden;
  container-type: size;
}
.cd-stage.trace { display: flex; }
.sx-wrap { width: 100%; max-width: 820px; flex: 1 1 auto; min-height: 0; overflow: visible; }
/* 星图悬浮于深空：彻底移除旧矩形底板（边框/渐变/内阴影全清）。
   边长 = min(面板宽, host高 − 40px 图例预留)：底部图例区永远不被星图压住 */
.sx-stage {
  position: relative; min-width: 0; aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 0; overflow: visible; border: 0; background: none;
  box-shadow: none;
}
@supports (width: 1cqh) {
  .sx-stage { width: min(100%, calc(100cqh - 40px)); }
}
@supports not (width: 1cqh) {
  .sx-stage { width: 100%; max-height: 100%; }
}
.sx-orbit { fill: none; stroke: rgba(120, 170, 230, 0.18); stroke-width: 1; stroke-dasharray: 3 7; }
.sx-orbit.faint { stroke: rgba(120, 170, 230, 0.1); }
/* 连线层级：点亮 #60a5fa / 未点亮 #334155；主线更粗 */
.sxl { stroke: #334155; stroke-width: 1.2; transition: stroke .25s ease; }
.sxl.on { stroke: #60a5fa; stroke-width: 1.6; filter: drop-shadow(0 0 4px rgba(96, 165, 250, .6)); }
.sxl.major { stroke-width: 2; }
.sxl.major.on { stroke-width: 2.6; filter: drop-shadow(0 0 6px rgba(96, 165, 250, .7)); }
.sxl.chain { stroke: rgba(70, 90, 140, .35); stroke-width: 1; stroke-dasharray: 2 5; }
.sxl-dot { fill: #334155; }
.sxl-dot.on { fill: #9fd0ff; }

/* 中心符文盘：旋转星轨（不遮挡图标） */
.sx-rune {
  position: absolute; left: 50%; top: 50%;
  width: 200px; height: 200px; margin: -100px 0 0 -100px;
  border-radius: 50%; pointer-events: none;
  border: 1px dashed rgba(140, 180, 255, .3);
  border-top-color: rgba(125, 211, 252, .7);
  animation: sxSpin 16s linear infinite;
}
.sx-rune.r2 {
  width: 236px; height: 236px; margin: -118px 0 0 -118px;
  border-color: rgba(157, 101, 255, .22);
  border-bottom-color: rgba(157, 101, 255, .6);
  animation: sxSpin 22s linear infinite reverse;
}
@keyframes sxSpin { to { transform: rotate(360deg); } }

/* 节点：圆形图标底座，尺寸分层（中心 > 主节点 > 普通节点） */
.sxn {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; padding: 0; cursor: pointer; z-index: 3;
  -webkit-tap-highlight-color: transparent;
}
.sxn-core {
  position: relative;
  display: grid; place-items: center;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, rgba(30, 40, 80, .92), rgba(14, 18, 40, .95));
  border: 1.5px solid rgba(100, 116, 139, .55);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.sxn-attr .sxn-core { width: 44px; height: 44px; }
/* 主节点（额外能力/技能强化）：统一「单圈圆形底座」，覆盖旧版圆角方块 */
.sxn-ability .sxn-core, .sxn-skill .sxn-core { width: 62px; height: 62px; border-radius: 50%; }
.sxn-center { z-index: 5; }
.sxn-center .sxn-core {
  width: 108px; height: 108px;
  border: 2px solid rgba(125, 211, 252, .55);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, .12), 0 0 34px rgba(125, 211, 252, .3),
    0 0 60px rgba(157, 101, 255, .2), inset 0 0 24px rgba(125, 211, 252, .08);
}
.sxn-ico { width: 58%; height: 58%; object-fit: contain; filter: grayscale(.7) brightness(.7); transition: filter .25s ease; }
.sxn-center .sxn-ico.big { width: 64%; height: 64%; filter: none; }
.sxn-glyph { font-size: 16px; color: #64748b; }
.sxn-center .sxn-glyph { font-size: 34px; color: #7dd3fc; }
.sxn-label {
  max-width: 110px; font-size: 11px; color: #aab2d4; letter-spacing: 1px;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}
.sxn-sub { font-size: 9.5px; color: #64748b; font-variant-numeric: tabular-nums; }

/* 状态：已点亮（青蓝高亮圈）/ 满级（金圈）/ 未开放（灰蓝压暗）/ 选中（发光脉冲） */
.sxn.on .sxn-core {
  border-color: rgba(125, 211, 252, .8);
  box-shadow: 0 0 16px rgba(125, 211, 252, .35), inset 0 0 12px rgba(125, 211, 252, .12);
}
.sxn.on .sxn-ico { filter: none; }
.sxn.on .sxn-label { color: #e8eaf6; }
.sxn.on .sxn-sub { color: #7dd3fc; }
.sxn.full .sxn-core { border-color: rgba(255, 215, 122, .6); box-shadow: 0 0 16px rgba(255, 215, 122, .3); }
.sxn.gated { opacity: .55; }
.sxn:hover .sxn-core { filter: brightness(1.2); border-color: rgba(125, 211, 252, .7); }
.sxn.sel .sxn-core {
  border-color: #7dd3fc;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, .25), 0 0 24px rgba(125, 211, 252, .5);
  transform: scale(1.08);
}
.sxn.sel::after {
  content: ""; position: absolute; left: 50%; top: 30px;
  width: 78px; height: 78px; margin-left: -39px; margin-top: -39px;
  border-radius: 50%; border: 1.5px solid rgba(125, 211, 252, .5);
  animation: sxPulse 1.6s ease-out infinite; pointer-events: none;
}
.sxn-center.sel::after { width: 140px; height: 140px; margin-left: -70px; margin-top: -70px; top: 54px; }
@keyframes sxPulse {
  0% { transform: scale(.8); opacity: .9; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* 图例：底部固定提示条（host 预留 40px，星图边长已扣除此高度，永不重叠遮挡） */
.tr-legend {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 6px 14px; margin: 0 0 6px;
  font-size: 11px; color: #8f97c2; letter-spacing: 1px;
  background: rgba(22, 28, 58, .55);
  border: 1px solid rgba(180, 200, 255, .16);
  border-radius: 15px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tr-legend .lit { color: #7dd3fc; }

/* 右侧：行迹详情面板（tp-*） */
.tp-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.tp-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid rgba(180, 200, 255, .12);
}
.tp-ico {
  flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, rgba(30, 40, 80, .92), rgba(14, 18, 40, .95));
  border: 1.5px solid rgba(125, 211, 252, .45);
  box-shadow: 0 0 16px rgba(125, 211, 252, .25);
}
.tp-ico img { width: 58%; height: 58%; object-fit: contain; }
.tp-id { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tp-id b { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-id em { font-style: normal; font-size: 11.5px; color: #7dd3fc; }
.tp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 16px;
  scrollbar-width: thin; }
.tp-sec {
  font-size: 12px; letter-spacing: 2px; color: var(--cd-gold-hi, #ffe9b0);
  padding-bottom: 6px; margin: 4px 0 8px;
  border-bottom: 1px solid rgba(255, 215, 122, .22);
}
.tp-desc { margin: 0; font-size: 13px; line-height: 1.7; color: #c5cdea; }
.tp-desc em { font-style: normal; color: #7dd3fc; font-weight: 600; }
.tp-lock { padding: 10px 12px; border-radius: 9px; font-size: 12px; color: #fbbf24;
  background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); }
.tp-max { padding: 10px 12px; border-radius: 9px; font-size: 12px; color: #7fe0a8;
  background: rgba(127, 224, 168, .08); border: 1px solid rgba(127, 224, 168, .3); }
.tp-note { margin-top: 10px; font-size: 11px; color: #7c86ad; }
.tp-mats { display: flex; flex-direction: column; gap: 8px; }
.tp-up {
  margin-top: 10px; width: 100%; height: 40px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(226, 228, 246, .84));
  border: 1px solid #fff; color: #23233f; font-size: 14px; font-weight: 600; letter-spacing: 3px;
  cursor: pointer; transition: .18s ease; font-family: inherit;
}
.tp-up:hover { box-shadow: 0 8px 26px rgba(255, 255, 255, .25); }
.tp-empty { padding: 30px 10px; text-align: center; font-size: 12px; color: #8f97c2; }

/* 材料行（沿用升级弹窗组件的窄面板适配） */
.tp-body .tr-mat-row { padding: 6px 2px; font-size: 12px; }
.tp-body .tr-mat-frame { width: 30px; height: 30px; }
.tp-body .tr-mat-ico { width: 22px; height: 22px; }

/* 行迹页响应式 */
@media (max-width: 1366px) {
  .tp-head { padding: 12px 14px 10px; }
  .tp-body { padding: 12px 14px 14px; }
}
@media (max-width: 1100px) {
  .sx-wrap { max-width: 620px; }
  .sxn-attr .sxn-core { width: 38px; height: 38px; }
  .sxn-center .sxn-core { width: 92px; height: 92px; }
  .sx-rune { width: 170px; height: 170px; margin: -85px 0 0 -85px; }
  .sx-rune.r2 { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
}
@media (max-width: 768px) {
  .sx-wrap { max-width: 100%; }
  .sxn-attr .sxn-core { width: 34px; height: 34px; }
  .sxn-ability .sxn-core, .sxn-skill .sxn-core { width: 48px; height: 48px; }
  .sxn-center .sxn-core { width: 76px; height: 76px; }
  .sxn-label { max-width: 84px; font-size: 10px; }
  .sxn-sub { font-size: 8.5px; }
  .sxn.sel::after { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .sxn-center.sel::after { width: 110px; height: 110px; margin: -55px 0 0 -55px; }
  .sx-rune { width: 140px; height: 140px; margin: -70px 0 0 -70px; }
  .sx-rune.r2 { width: 165px; height: 165px; margin: -82px 0 0 -82px; }
}
