/* ============================================================
   英雄没有闪 · 文字复刻版
   手机优先布局 / 纸张墨色
   ============================================================ */
:root {
  --paper: #efe9dc;
  --paper-2: #f7f3ea;
  --paper-3: #fbf8f1;
  --paper-4: #e8e1d1;
  --ink: #2b2620;
  --ink-2: #554c41;
  --muted: #8b8172;
  --line: #ded4c2;
  --line-2: #c9bdaa;
  --cinnabar: #a8382b;
  --cinnabar-2: #bf5a4c;
  --jade: #3f6b5c;
  --gold: #9a7b33;
  --blue: #4a6b96;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(900px 500px at 20% -10%, #fdfbf6, rgba(253, 251, 246, 0) 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; }
b { font-weight: 700; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 外壳 ---------- */
.app {
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
@media (min-width: 620px) {
  body { padding: 18px 0; align-items: center; }
  .app {
    height: min(940px, calc(100dvh - 36px));
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(60, 45, 25, .16), 0 1px 0 rgba(255, 255, 255, .8) inset;
  }
}

/* ---------- 顶栏 ---------- */
.appbar {
  flex: 0 0 auto;
  height: 54px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #fdfaf4, #f6f1e6);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0);
}
.appbar-main { flex: 1; min-width: 0; }
.appbar-title {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .22em;
  line-height: 1.15;
}
.appbar-sub {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .04em;
}
.appbar-side { display: flex; align-items: center; }
.power { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.power b { font-family: var(--mono); font-size: 13px; color: var(--cinnabar); margin-left: 2px; }

/* ---------- 钱包 ---------- */
.wallet {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 6px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 241, .6);
}
.wallet::-webkit-scrollbar { display: none; }
.coin {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  font-size: 10.5px;
  color: var(--muted);
}
.coin b { font-family: var(--mono); font-size: 11.5px; color: var(--ink); }
.coin i { font-style: normal; color: var(--gold); font-size: 10px; }

/* ---------- 页面容器 ---------- */
.page {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px calc(14px + var(--safe-b));
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 31px, rgba(120, 100, 70, .035) 31px 32px),
    var(--paper-2);
}
.page > * + * { margin-top: 10px; }

.card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.card-head h3 { font-size: 13px; letter-spacing: .12em; }
.card-head .hint { font-size: 10.5px; color: var(--muted); }

/* ---------- 底部导航 ---------- */
.tabbar {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  height: calc(56px + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: #fdfaf4;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(70, 55, 35, .05);
}
.tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #9a9082;
  position: relative;
  transition: color .15s;
}
.tab svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab span { font-size: 9.5px; letter-spacing: .02em; }
.tab.active { color: var(--cinnabar); }
.tab.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 18px; height: 2px;
  background: var(--cinnabar);
  transform: translateX(-50%);
  border-radius: 0 0 2px 2px;
}
.tab .badge {
  position: absolute; top: 5px; right: 50%;
  transform: translateX(16px);
  min-width: 14px; height: 14px;
  border-radius: 7px;
  background: var(--cinnabar);
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  padding: 0 3px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line-2);
  background: #fffdf8;
  color: var(--ink-2);
  border-radius: 5px;
  padding: 7px 12px;
  font-size: 12px;
  letter-spacing: .02em;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:active { background: #f1ebdd; }
.btn.primary {
  background: linear-gradient(180deg, #b1463a, #96352a);
  border-color: #8c3227;
  color: #fdf8f0;
  font-family: var(--serif);
  letter-spacing: .16em;
  box-shadow: 0 1px 2px rgba(120, 40, 30, .25);
}
.btn.primary:active { background: #8c3227; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--cinnabar); border-color: #dfc2b9; }
.btn.small { padding: 3px 8px; font-size: 11px; border-radius: 4px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .cost { font-family: var(--mono); font-size: 10.5px; color: var(--gold); }

/* ---------- 关卡 ---------- */
.stagebar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.stagebar .nav {
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  background: #fffdf8;
  font-size: 13px;
}
.stagebar .nav:disabled { opacity: .35; }
.stagebar .mid { flex: 1; text-align: center; min-width: 0; }
.stagebar .mid .ch { font-family: var(--serif); font-size: 14px; letter-spacing: .08em; }
.stagebar .mid .st { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.stagebar .mid .st b { color: var(--cinnabar); font-family: var(--mono); }

.dots { display: flex; justify-content: center; gap: 5px; padding: 0 10px 8px; }
.dot {
  width: 19px; height: 19px; border-radius: 50%;
  border: 1px solid var(--line-2);
  background: #fffdf8;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.dot.done { background: #e8dfca; border-color: #cbbfa9; color: #6b6154; }
.dot.cur { background: var(--cinnabar); border-color: var(--cinnabar); color: #fdf8f0; }

/* ---------- 敌人 ---------- */
.enemy-list { display: flex; flex-direction: column; gap: 5px; }
.enemy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fdfbf6;
  transition: opacity .2s;
}
.enemy.boss { border-color: #d9b3a7; background: linear-gradient(90deg, #fdf5f2, #fdfbf6); }
.enemy.elite { border-color: #dcd0b2; }
.enemy.dead { opacity: .35; }
.enemy .nm { display: flex; align-items: center; gap: 5px; font-size: 12px; min-width: 0; }
.enemy .nm span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enemy .tag {
  flex: 0 0 auto;
  font-size: 9px; letter-spacing: .06em;
  color: var(--cinnabar);
  border: 1px solid #e2c4bb;
  border-radius: 2px;
  padding: 0 3px;
}
.enemy .hpnum { font-family: var(--mono); font-size: 9.5px; color: var(--muted); text-align: right; }
.hpbar { height: 4px; background: #e9e1d2; border-radius: 2px; overflow: hidden; margin-top: 3px; }
.hpbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #8d3a2e, #bb5a4c); transition: width .16s linear; }
.hpbar.jade i { background: linear-gradient(90deg, #3f6b5c, #5f8f7d); }
.hpbar.shield { margin-top: 2px; height: 3px; }
.hpbar.shield i { background: linear-gradient(90deg, #4a6b96, #7d9cc4); }

/* ---------- 玩家 ---------- */
.player-card { padding: 9px 12px; }
.player-top { display: flex; align-items: baseline; gap: 6px; }
.player-top .nm { font-family: var(--serif); font-size: 14px; }
.player-top .cls { font-size: 10px; color: var(--muted); }
.player-top .hpnum { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.skill-chips { display: flex; gap: 5px; margin-top: 7px; overflow-x: auto; scrollbar-width: none; }
.skill-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip.ready { border-color: #bfd2c9; color: var(--jade); }

/* ---------- 战斗操作 ---------- */
.actions { display: flex; gap: 6px; align-items: center; }
.actions .primary { flex: 1.4; }
.actions .btn { flex: 1; }
.actions .speed { flex: 0 0 48px; }
.auto-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.switch input { accent-color: var(--cinnabar); width: 14px; height: 14px; }

/* ---------- 日志 ---------- */
.log { height: 168px; overflow-y: auto; font-size: 11.5px; line-height: 1.72; padding: 4px 2px 0; }
.log .ln { display: flex; gap: 6px; }
.log .ln time { color: #b6ab98; font-family: var(--mono); font-size: 9.5px; min-width: 28px; padding-top: 2px; }
.log .hit { color: var(--ink-2); }
.log .crit { color: var(--cinnabar); }
.log .skill { color: var(--blue); }
.log .buff, .log .kill { color: var(--jade); }
.log .die { color: var(--cinnabar); font-weight: 700; }
.log .drop { color: var(--gold); }
.log .sys { color: var(--muted); }

.result {
  border: 1px solid var(--line);
  border-left: 3px solid var(--jade);
  background: #f8f3e7;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 11.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.result.fail { border-left-color: var(--cinnabar); }
.result b { font-family: var(--mono); }
.result .rl { color: var(--muted); font-size: 10.5px; }

/* ---------- 角色页 ---------- */
.hero-card { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-2);
  background: radial-gradient(circle at 35% 30%, #fbf4e4, #e7dcc6);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 20px; color: var(--ink-2);
}
.hero-info { flex: 1; min-width: 0; }
.hero-info .name { font-family: var(--serif); font-size: 16px; }
.hero-info .line { font-size: 10.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.expbar { height: 4px; background: var(--paper-4); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.expbar i { display: block; height: 100%; background: linear-gradient(90deg, #b9a273, #8a6f3c); transition: width .3s; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.stat-grid .s {
  background: #fdfbf6;
  padding: 7px 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}
.stat-grid .s span { font-size: 10.5px; color: var(--muted); }
.stat-grid .s b { font-family: var(--mono); font-size: 12px; }

/* ---------- 装备格 ---------- */
.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.slot {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fdfbf6;
  padding: 6px 7px 6px 9px;
  min-height: 58px;
  text-align: left;
  overflow: hidden;
}
.slot::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--q, #cfc5b3);
}
.slot .s-slot { font-size: 9.5px; color: var(--muted); letter-spacing: .08em; }
.slot .s-name {
  font-size: 11.5px;
  line-height: 1.25;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot .s-score { font-family: var(--mono); font-size: 9.5px; color: var(--jade); margin-top: 1px; }
.slot.empty .s-name { color: #c2b7a4; }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--line);
  text-align: left;
  width: 100%;
}
.row:last-child { border-bottom: none; }
.row .r-main { flex: 1; min-width: 0; }
.row .r-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r-sub { font-size: 10px; color: var(--muted); margin-top: 1px; display: flex; gap: 7px; flex-wrap: wrap; }
.row .r-right { text-align: right; flex: 0 0 auto; }
.row .r-score { font-family: var(--mono); font-size: 12px; }
.row .r-delta { font-size: 10px; font-family: var(--mono); }
.up { color: var(--jade); }
.down { color: var(--cinnabar); }
.qbar { width: 3px; align-self: stretch; border-radius: 2px; flex: 0 0 3px; }

/* ---------- 技能 ---------- */
.slot-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slot-skill {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fdfbf6;
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  min-height: 46px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
}
.slot-skill small { font-size: 9px; color: var(--muted); font-family: var(--mono); }
.slot-skill.empty { color: #c2b7a4; border-style: dashed; }

/* ---------- 随从 ---------- */
.deploy-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.att-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.att {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fdfbf6;
  padding: 8px 9px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.att::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--q, #cfc5b3); }
.att.deployed { border-color: #c08a80; background: #fdf7f4; }
.att .a-name { font-size: 12.5px; font-family: var(--serif); display: flex; justify-content: space-between; gap: 4px; }
.att .a-q { font-size: 9px; color: var(--muted); }
.att .a-meta { font-size: 10px; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
.att .a-lock { color: #b9ad99; }

/* ---------- 翅膀 ---------- */
.wing-hero { text-align: center; padding: 12px 0 4px; }
.wing-hero .lv { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: .02em; }
.wing-hero .lv small { font-size: 12px; color: var(--muted); font-family: var(--sans); margin-left: 3px; }
.wing-hero .tier { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .1em; }
.wing-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.wing-bars .w { border: 1px solid var(--line); border-radius: 5px; background: #fdfbf6; padding: 6px 4px; text-align: center; }
.wing-bars .w span { display: block; font-size: 9.5px; color: var(--muted); }
.wing-bars .w b { font-family: var(--mono); font-size: 12px; }

/* ---------- 商店 ---------- */
.shop-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.shop-row:last-child { border-bottom: none; }
.shop-row .s-name { flex: 1; font-size: 12.5px; }
.shop-row .s-desc { font-size: 10px; color: var(--muted); }
.shop-row .s-price { font-family: var(--mono); font-size: 11px; color: var(--gold); }

/* ---------- 底部弹层 ---------- */
.sheet-wrap {
  position: fixed; inset: 0;
  background: rgba(43, 38, 32, .38);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 60;
}
.sheet-wrap.show { display: flex; }
.sheet {
  width: 100%;
  max-width: 480px;
  background: var(--paper-2);
  border-radius: 14px 14px 0 0;
  border: 1px solid var(--line-2);
  border-bottom: none;
  padding: 8px 16px calc(16px + var(--safe-b));
  max-height: 84dvh;
  overflow-y: auto;
  animation: sheet-up .22s ease;
  box-shadow: 0 -12px 40px rgba(50, 38, 24, .2);
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.sheet .grab { width: 34px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 2px auto 12px; }
.sheet h3 { font-size: 16px; letter-spacing: .06em; }
.sheet .sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.sheet .sec { margin-top: 12px; }
.sheet .sec-title { font-size: 10.5px; color: var(--muted); letter-spacing: .12em; margin-bottom: 5px; }
.sheet .stat-list { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 12.5px; margin: 0; }
.sheet .stat-list dt { color: var(--muted); font-size: 11.5px; }
.sheet .stat-list dd { margin: 0; text-align: right; font-family: var(--mono); }
.sheet .actions2 { display: flex; gap: 8px; margin-top: 14px; }
.sheet .actions2 .btn { flex: 1; padding: 9px 8px; }
.sheet .score-box {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 6px; padding: 8px;
  background: #fffdf8; margin-top: 10px;
}
.sheet .score-box .big { font-family: var(--mono); font-size: 22px; }
.sheet .score-box .delta { font-family: var(--mono); font-size: 13px; }
.sheet .quote { font-size: 11px; color: var(--muted); line-height: 1.65; margin-top: 8px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px;
  transform: translate(-50%, 12px);
  background: #2b2620; color: #f7f2e7;
  padding: 8px 16px; border-radius: 4px;
  font-size: 11.5px; letter-spacing: .04em;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 80; max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 开场 ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(43, 38, 32, .42);
  display: none;
  align-items: center; justify-content: center;
  padding: 18px;
  z-index: 90;
}
.modal-backdrop.show { display: flex; }
.start-modal {
  width: 100%; max-width: 430px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 22px 18px 18px;
  box-shadow: 0 20px 60px rgba(50, 38, 24, .28);
  max-height: 90dvh;
  overflow-y: auto;
}
.start-head { text-align: center; }
.start-head h1 { font-size: 26px; letter-spacing: .18em; color: var(--ink); }
.start-head p { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; margin: 4px 0 0; }
.start-tip { font-size: 11.5px; color: var(--ink-2); line-height: 1.7; margin: 14px 0 10px; text-align: center; }
.class-picker { display: flex; flex-direction: column; gap: 9px; }
.class-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
.class-card:active { border-color: var(--cinnabar); background: #fdf6f2; }
.class-card .c-name { font-family: var(--serif); font-size: 17px; letter-spacing: .1em; }
.class-card .c-desc { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.class-card .c-skill { font-size: 10.5px; color: var(--cinnabar); margin-top: 6px; }

/* ---------- 工具类 ---------- */
.muted { color: var(--muted); }
.tiny { font-size: 10px; }
.center { text-align: center; }
.hr { height: 1px; background: var(--line); margin: 10px 0; }
.pill {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--line-2);
  border-radius: 999px; font-size: 9.5px; color: var(--muted);
}

/* ---------- 符文 ---------- */
.rune {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  padding: 8px 10px;
  margin-bottom: 7px;
}
.rune:last-child { margin-bottom: 0; }
.rune-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rune-head b { font-family: var(--serif); font-size: 13px; letter-spacing: .06em; }
.pips { display: inline-flex; gap: 3px; }
.pips i {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  display: block;
}
.pips i.on { background: var(--cinnabar); border-color: var(--cinnabar); }
.rune-desc { font-size: 10.8px; color: var(--muted); line-height: 1.55; margin-top: 3px; }
.rune-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rune-foot .eff { flex: 1; font-size: 10.5px; color: var(--jade); }
.rune-foot .btn { flex: 0 0 auto; }

/* 卡片内的属性表（与弹层共用样式） */
.card .stat-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  margin: 0;
  font-size: 12.5px;
}
.card .stat-list dt { color: var(--muted); font-size: 11.5px; }
.card .stat-list dd { margin: 0; text-align: right; font-family: var(--mono); }

/* ---------- 祝福页 ---------- */
.bless-hero { text-align: center; padding: 10px 0 4px; }
.bless-hero .lv { font-family: var(--serif); font-size: 42px; line-height: 1; }
.bless-hero .lv small { font-size: 12px; color: var(--muted); font-family: var(--sans); margin-left: 4px; }
.bless-hero .tier { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .12em; }
.dist { margin-bottom: 8px; }
.dist:last-child { margin-bottom: 0; }
.dist .d-top { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 3px; }
.dist .d-top b { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.dist .d-bar { height: 5px; background: var(--paper-4); border-radius: 3px; overflow: hidden; }
.dist .d-bar i { display: block; height: 100%; border-radius: 3px; }

/* 品质窗口：整条分布 + 两列明细 */
.qbar-stack { display: flex; height: 9px; border-radius: 5px; overflow: hidden; margin-bottom: 12px; }
.qbar-stack i { display: block; height: 100%; }
.dist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.dist-grid .dist { margin-bottom: 7px; }
.dist-grid .d-bar { height: 4px; }

/* 祝福读条 */
.bless-run { margin-top: 4px; }
.bless-run .br-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.bless-run .br-head b { font-family: var(--mono); font-size: 15px; letter-spacing: .04em; color: var(--gold-2, #a9822f); }
.bless-run .br-bar { height: 7px; background: var(--paper-4); border-radius: 4px; overflow: hidden; margin: 7px 0 6px; }
.bless-run .br-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #c9a44b, #d8bc73); transition: width .6s linear; }
.bless-run .br-foot { font-size: 11px; color: var(--muted); }

/* ---------- 装备库 ---------- */
.r-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.r-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-sub { display: flex; gap: 7px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }
.inv-row { display: flex; align-items: center; gap: 6px; border-bottom: 1px dashed var(--line); padding: 6px 0; }
.inv-row:last-child { border-bottom: none; }
.inv-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; }
.inv-row .btn { flex: 0 0 auto; }

/* ---------- 挂机条 ---------- */
.farm-bar {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #d9c6a8; border-left: 3px solid var(--gold);
  background: #fbf4e4; border-radius: 5px;
  padding: 7px 10px; font-size: 11.5px; color: var(--ink-2);
}
.farm-bar span { flex: 1; }

/* ---------- 翅膀星级进度 ---------- */
.wstar { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.wstar .ws-n { width: 34px; flex: 0 0 34px; font-size: 11px; color: var(--muted); }
.wstar .ws-bar { flex: 1; height: 5px; background: var(--paper-4); border-radius: 3px; overflow: hidden; }
.wstar .ws-bar i { display: block; height: 100%; background: var(--muted); border-radius: 3px; transition: width .3s; }
.wstar .ws-l { flex: 0 0 auto; font-size: 10px; color: var(--muted); font-family: var(--mono); }
.wstar.done .ws-n { color: var(--gold); }
.wstar.done .ws-bar i { background: var(--gold); }
.wstar.now .ws-n { color: var(--jade); font-weight: 700; }
.wstar.now .ws-bar i { background: var(--jade); }
.wstar.now .ws-l { color: var(--jade); }

/* ---------- 装备格子：装备等级 ---------- */
.slot .s-lv {
  font-family: var(--mono); font-size: 8px; color: var(--muted);
  margin-top: 1px; letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 随从系统 ---------- */
.halo-list { display: flex; flex-direction: column; gap: 6px; }
.halo-item {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8;
}
.halo-item b { font-size: 12px; color: var(--gold); flex: 0 0 auto; }
.halo-item span { font-size: 10.5px; color: var(--ink-2); font-family: var(--sans); }

.dist-list { margin-bottom: 4px; }

.talent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.talent-slot {
  position: relative; text-align: left; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 8px; background: #fffdf8;
  display: flex; flex-direction: column; gap: 2px; min-height: 56px;
}
.talent-slot.empty { border-style: dashed; background: transparent; justify-content: center; }
.talent-slot .t-name { font-size: 12px; font-weight: 700; color: var(--ink); }
.talent-slot .t-q { font-size: 9.5px; color: var(--muted); font-family: var(--mono); }
.talent-slot .t-val { font-size: 9.5px; color: var(--jade); font-family: var(--sans); line-height: 1.35; }
.talent-slot.empty .t-name { color: var(--muted); font-weight: 400; }
.talent-slot .t-lock {
  position: absolute; top: 5px; right: 7px; font-size: 8.5px;
  color: var(--gold); border: 1px solid var(--gold); border-radius: 3px; padding: 0 3px;
}
.talent-ops { display: flex; gap: 6px; margin-top: 8px; }

.aw-list { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.aw-row {
  display: grid; grid-template-columns: 44px 1fr; grid-auto-rows: min-content;
  gap: 2px 8px; overflow: hidden;
  padding: 5px 8px; border-radius: 6px; background: rgba(255,253,248,.7);
  border: 1px solid transparent;
}
.aw-row.now { border-color: var(--jade); background: #fffdf8; }
.aw-row.done { opacity: .62; }
.aw-row .aw-lv { grid-column: 1; grid-row: 1 / span 2; align-self: start;
  font-size: 11px; font-weight: 700; color: var(--ink); }
.aw-row .aw-cost { grid-column: 2; grid-row: 1; font-size: 10px; color: var(--muted); font-family: var(--mono); }
.aw-row .aw-eff { grid-column: 2; grid-row: 2; font-size: 9.5px; color: var(--jade); font-family: var(--sans); }
.aw-row .aw-lim { grid-column: 2; grid-row: 3; font-size: 9.5px; color: var(--danger, #b03a35); font-family: var(--sans); }

.drop-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.drop-row {
  padding: 6px 10px; border-radius: 6px; background: #fffdf8;
  border: 1px solid var(--line); font-size: 12px; font-weight: 700;
}

/* 随从详情：顶部操作栏 + 关闭按钮 */
.sheet h3 { position: relative; }
.sheet-x {
  position: absolute; right: -6px; top: -6px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-2); background: #fffdf8;
  font-size: 15px; line-height: 1; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.att-ops { margin-top: 10px; }
.att-ops .btn { font-size: 11px; padding: 8px 6px; }

/* ---------- 推层解锁：底部导航锁定 ---------- */
.tab.locked { opacity: .42; }
.tab.locked svg { filter: grayscale(1); }
.tab .lockmark {
  position: absolute; top: 2px; right: 4px;
  font-style: normal; font-size: 7.5px; line-height: 1;
  color: var(--muted); border: 1px solid var(--line-2);
  border-radius: 3px; padding: 1px 2px; background: #fffdf8;
}

/* ---------- 奶牛牧场 ---------- */
.cow-list { display: flex; flex-direction: column; gap: 3px; max-height: 420px; overflow-y: auto; }
.cow-row {
  display: grid; grid-template-columns: 34px 1fr 58px 48px 48px; align-items: center; gap: 6px;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8;
}
.cow-row.locked { opacity: .45; background: transparent; }
.cow-row .cw-id { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--gold); }
.cow-row .cw-lv { font-size: 10px; color: var(--muted); }
.cow-row .cw-st { font-size: 10px; color: var(--jade); text-align: right; }
.cow-row .btn { padding: 5px 4px; font-size: 10.5px; }

/* ---------- 暗能装备 ---------- */
.dark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dark-cell {
  text-align: left; padding: 7px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: #fffdf8; display: flex; flex-direction: column; gap: 1px;
}
.dark-cell.empty { border-style: dashed; background: transparent; }
.dark-cell .d-slot { font-size: 9.5px; color: var(--muted); letter-spacing: .06em; }
.dark-cell .d-name { font-size: 11px; font-weight: 700; color: var(--ink); }
.dark-cell .d-lv { font-size: 9.5px; color: var(--gold); font-family: var(--mono); }
.dark-cell .d-ent { font-size: 9px; color: var(--muted); font-family: var(--sans); }
.dark-pick {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; margin-bottom: 4px;
}
.dark-pick.on { border-color: var(--gold); }
.dark-pick .dp-l { flex: 1; font-size: 11.5px; font-weight: 700; color: var(--ink); }
.dark-pick .dp-l small { display: block; font-size: 9.5px; font-weight: 400; color: var(--muted); font-family: var(--sans); }
.ent-row {
  padding: 4px 8px; font-size: 10px; color: var(--jade);
  border-bottom: 1px dashed var(--line); font-family: var(--sans);
}

/* ---------- 更多页：系统入口 ---------- */
.sys-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; margin-bottom: 5px;
}
.sys-row.locked { opacity: .5; background: transparent; border-style: dashed; }
.sys-row .sys-name { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.sys-row .sys-name small { display: block; font-size: 9.5px; font-weight: 400; color: var(--muted); font-family: var(--sans); }
.sys-row .sys-st { font-size: 10px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
