/* 阵容 / 关卡 / 英雄库 */

/* ── 战力条 ───────────────────────────────────────── */
.power {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.power__k { font-size: 12px; color: var(--ink2); }
.power__v { font-size: 22px; color: var(--gold); font-variant-numeric: tabular-nums; }
.power__hint { margin-left: auto; font-size: 11px; color: var(--ink2); }

/* ── 五个站位 ─────────────────────────────────────── */
.slots { display: flex; gap: 8px; padding: 12px; flex: 0 0 auto; }
.slot { flex: 1 1 0; aspect-ratio: 3 / 4; border-radius: 10px; border: 1px dashed var(--line);
        background: #191511; display: flex; align-items: center; justify-content: center;
        position: relative; padding: 0; }
.slot--front { border-color: #5a4526; }
.slot--front::after { content: "前排"; position: absolute; bottom: 3px; font-size: 10px; color: #8a7a60; }
.slot--back::after { content: "后排"; position: absolute; bottom: 3px; font-size: 10px; color: #8a7a60; }
.slot .hero { width: 100%; height: 100%; }
.slot.is-sel { outline: 2px solid var(--gold); }

/* ── 候选英雄 ─────────────────────────────────────── */
.bench { padding: 0 12px 16px; }
.bench__t { font-size: 13px; color: var(--ink2); font-weight: 500; margin: 4px 0 8px; }
.bench__sub { font-size: 11px; color: #6d6152; }
.bench__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.bench .bench__cell { aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; }
.bench .bench__cell.is-in .hero { opacity: .45; }

/* ── 英雄详情 ─────────────────────────────────────── */
.detail { border-top: 1px solid var(--line); padding: 12px; background: var(--bg2); }
.detail__hd { display: flex; gap: 12px; }
.detail__art { width: 84px; flex: 0 0 auto; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.detail__nm { font-size: 17px; margin: 0 0 2px; }
.detail__meta { font-size: 12px; color: var(--ink2); display: flex; gap: 8px; flex-wrap: wrap; }
.detail__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; margin: 10px 0; font-size: 12px; }
.detail__stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.detail__stats span { color: var(--ink2); }
.detail__sk { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #1e1913; }
.detail__sk h4 { margin: 0 0 4px; font-size: 13px; color: var(--gold); }
.detail__sk p { margin: 0; font-size: 12px; color: var(--ink2); line-height: 1.45; }
.gear-slot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  min-height: 40px; padding: 6px 10px; font-size: 12px; text-align: left;
}
.gear-slot b { color: var(--gold); font-variant-numeric: tabular-nums; }
.gear-slot .detail__meta { font-size: 10px; color: #6d6152; }

.detail__ops { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail__ops .btn { min-height: 40px; padding: 8px 14px; font-size: 13px; }

/* ── 关卡 ─────────────────────────────────────────── */
.stages { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
/* 关卡卡现在是「标题行 + 难度网格」的上下结构，不是原来那种左右并排的一行，
   所以这里必须换成块布局 —— 沿用 flex 会把标题和网格挤在同一行，
   网格被压到 3 列窄条，「未解锁」「为什么打不过」到处折行。 */
.stage {
  display: block;
  padding: 11px 12px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); text-align: left; width: 100%;
}
.stage__top { display: flex; align-items: center; gap: 10px; }
.stage--lock { opacity: .45; }
.stage__no { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%;
             display: flex; align-items: center; justify-content: center;
             background: #322821; color: var(--gold); font-weight: 600; }
.stage__nm { font-size: 15px; }
.stage__sub { font-size: 11px; color: var(--ink2); }
.stage__head { flex: 1 1 auto; min-width: 0; }
.stage__go { margin-left: auto; padding: 6px 12px; border-radius: 8px;
             background: #6b2a1a; color: #fff; font-size: 12px; flex: 0 0 auto; }
.stage--now .stage__go { background: linear-gradient(180deg,#b8482f,#8e2f1e); }

/* ── 英雄库 ───────────────────────────────────────── */
.roster { padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(80px,1fr)); gap: 10px; }
.roster .hero { aspect-ratio: 3/4; }

@media (max-width: 380px) {
  .slot { gap: 4px; }
  .slots { gap: 4px; padding: 10px 6px; }
  .power__hint { display: none; }
}

/* ── 关卡 6 档难度 ───────────────────────────────── */
/* 3 列 × 2 行：420px 宽下每格约 120px，「普通/3★/金×1/挑战」四行放得下不折行 */
/* 一行放 6 档而不是 3×2：卡片高度砍掉一半，一屏能看到 8 关而不是 4 关。
   已通关的档位只保留绿色档名，不写「已通关」文字 —— 三行文字在小格子里挤成一团，
   而玩家真正要看的只是「下一档在哪」，那个档是金色高亮的。 */
.diffs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 9px; }
.diff {
  display: flex; flex-direction: column; align-items: center;
  padding: 5px 1px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); cursor: pointer; text-align: center;
  font: inherit; overflow: hidden;
}
.diff__zh { font-size: 11px; font-weight: 600; line-height: 1.3; }
.diff__stars { font-size: 9px; color: var(--dim); line-height: 1.2; }
.diff__mul { display: none; }
.diff__tick { font-size: 9px; line-height: 1.3; color: var(--dim); }
.diff__lock { font-size: 9px; line-height: 1.3; color: var(--dim); }
.diff--lock { opacity: .4; }
.diff--done .diff__zh { color: #7fae74; }
.diff--done .diff__tick { display: none; }
.diff--next { border-color: var(--gold); background: rgba(201,162,39,.16); }
.diff--next .diff__tick { color: var(--gold); }

.stage__play {
  margin-top: 8px; width: 100%; padding: 9px; border-radius: 8px;
  border: 1px solid var(--gold); background: rgba(201,162,39,.14);
  color: var(--gold); font: inherit; font-size: 13px; cursor: pointer;
}
/* 诊断入口挪到标题行右侧，不再单独占一行 */
.stage__tip {
  margin-left: auto; flex: 0 0 auto; padding: 3px 0 0; border: 0; background: none;
  color: var(--dim); font: inherit; font-size: 10px; cursor: pointer;
  text-decoration: underline dotted; white-space: nowrap;
}
.stage__lockline { margin-top: 6px; font-size: 11px; color: var(--dim); }
.stage__top { display: flex; gap: 8px; align-items: center; }

/* ── 装备换装 + 套装 ─────────────────────────────── */
.gear-rows { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.gear-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: stretch; }
.gear-slot { display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  text-align: left; min-width: 0; padding: 7px 9px; white-space: nowrap; overflow: hidden; }
.gear-slot__nm { font-size: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gear-slot__lv { font-size: 10px; color: var(--dim); }
.btn--sm { padding: 5px 9px; font-size: 11px; white-space: nowrap; }
.btn--sm:disabled { opacity: .45; }
.btn--ghost { background: none; border-color: var(--line); color: var(--dim); }
.sets { margin-top: 8px; padding: 7px 9px; border-radius: 8px; background: rgba(201,162,39,.08); border: 1px solid rgba(201,162,39,.25); }
.sets__t { font-size: 11px; color: var(--gold); margin-bottom: 3px; }
.sets__row { font-size: 11px; color: var(--ink); line-height: 1.6; }
.sets__row--hint { color: var(--dim); padding: 0; background: none; border: 0; }

.picker__mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6);
  display: flex; align-items: flex-end; justify-content: center;
}
.picker {
  width: 100%; max-height: 70vh; overflow: auto; padding: 12px;
  background: var(--panel); border-radius: 14px 14px 0 0; border: 1px solid var(--line);
}
.picker__t { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.picker__list { display: flex; flex-direction: column; gap: 5px; }
.picker__row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 9px 11px; border-radius: 8px; text-align: left;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer;
}
.picker__row--cur { border-color: var(--gold); }
.picker__set { font-size: 10px; color: var(--gold); }
.picker__empty { padding: 12px; text-align: center; font-size: 12px; color: var(--dim); }
.picker__close { width: 100%; margin-top: 10px; padding: 9px; }

/* ── 被动技能 ────────────────────────────────��──── */
.passives { margin-top: 8px; padding: 7px 9px; border-radius: 8px; background: rgba(90,130,170,.08); border: 1px solid rgba(90,130,170,.22); }
.passives__t { font-size: 11px; color: #7fa8cc; margin-bottom: 3px; }
.passives__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; font-size: 11px; line-height: 1.7; }
.passives__row b { color: var(--ink); }
.passives__row span { color: var(--dim); }
.passives__row--lock { opacity: .5; }
.passives__lock { color: var(--gold) !important; }

/* ── 日常页（签到 / 任务 / 试炼塔） ─────────────── */
.daily { display: flex; flex-direction: column; gap: 10px; }
.daily__card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 11px 12px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card);
}
.daily__head { display: flex; justify-content: space-between; align-items: baseline; }
.daily__head b { font-size: 13px; color: var(--ink); }
.daily__sub { font-size: 11px; color: var(--dim); }

/* 签到阶梯：14 天排两行 */
.ladder { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ladder__c {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 2px 4px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel);
}
.ladder__d { font-size: 9px; color: var(--dim); font-style: normal; }
.ladder__g { font-size: 10px; color: var(--ink); font-style: normal; }
.ladder__c.is-past { opacity: .45; }
.ladder__c.is-ms { border-color: rgba(201, 162, 39, .55); }
.ladder__c.is-ms .ladder__g { color: var(--gold); }
.ladder__c.is-today { border-color: var(--gold); background: rgba(201, 162, 39, .12); }

.daily__claim {
  width: 100%; padding: 9px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--gold); background: rgba(201, 162, 39, .16); color: var(--gold);
  font-size: 12px;
}
.daily__claim:disabled { opacity: .45; cursor: default; }

/* 任务 */
.daily__tasks { display: flex; flex-direction: column; gap: 7px; }
.task { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.task__l { min-width: 0; }
.task__t { display: block; font-size: 11px; color: var(--ink); }
.task__bar { height: 3px; margin-top: 3px; border-radius: 2px; overflow: hidden; background: #322821; }
.task__bar i { display: block; height: 100%; background: var(--gold); }
.task__p { font-size: 10px; color: var(--dim); }
.task__r { font-size: 10px; color: var(--gold); white-space: nowrap; }
.task__b {
  font-size: 10px; padding: 4px 9px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--gold); background: rgba(201, 162, 39, .14); color: var(--gold);
}
.task__b:disabled {
  border-color: var(--line); color: var(--dim); background: none; opacity: .6; cursor: default;
}
.task.is-done .task__t { color: var(--dim); }

/* 试炼塔 */
.tower { display: flex; flex-direction: column; gap: 4px; }
.tower__line { font-size: 12px; color: var(--ink); }
.tower__line b { color: var(--gold); }
.tower__sub { font-size: 11px; color: var(--dim); }
