/* =========================================================
 * 《核冬余烬》 style.css —— Q 版废土 UI
 * ========================================================= */
:root {
  --bg: #060f1e;
  --panel: #0d1e33;
  --panel-2: #12273f;
  --panel-3: #18344f;
  --line: rgba(150, 220, 255, .15);
  --line-strong: rgba(150, 225, 255, .3);
  --text: #e9f3ff;
  --muted: #8ca8c2;
  --muted-2: #64819c;
  --gold: #ffc861;
  --gold-2: #ff9d5c;
  --green: #8dffa3;
  --cyan: #6fd8ff;
  --violet: #b78bff;
  --red: #ff7d68;
  --shadow: 0 14px 40px rgba(0, 0, 0, .5);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #060f1e;
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, .2); }
::-webkit-scrollbar-thumb { background: rgba(150, 220, 255, .2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(150, 220, 255, .35); }

#app {
  height: 100vh;
  display: grid;
  grid-template-rows: 64px 1fr 78px;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(58, 140, 218, .16), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(255, 160, 80, .06), transparent 60%),
    #060f1e;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(11, 27, 46, .96), rgba(6, 17, 33, .92));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 22px; color: var(--gold);
  background: radial-gradient(circle at 35% 30%, #2b4a63, #0b1826);
  border: 1px solid rgba(255, 200, 97, .42);
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(255, 200, 97, .18), inset 0 0 12px rgba(255, 200, 97, .08);
  animation: slowSpin 18s linear infinite;
}
.brand-text h1 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 2px;
  line-height: 1.15;
  color: #f3fff8;
  text-shadow: 0 0 22px rgba(141, 255, 163, .25);
}
.brand-text p {
  margin: 2px 0 0;
  font-size: 8px;
  letter-spacing: 1.6px;
  color: var(--muted-2);
}
.resbar {
  display: flex;
  align-items: stretch;
  gap: 7px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}
.resbar::-webkit-scrollbar { display: none; }
.res-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 102px;
  padding: 5px 9px 5px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  transition: border-color .2s, transform .2s;
}
.res-chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.res-icon {
  width: 28px; height: 28px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 15px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
}
.res-main { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.res-name { font-size: 9px; color: var(--muted); letter-spacing: .5px; }
.res-val { font-size: 14px; font-weight: 800; color: #f2fff8; font-variant-numeric: tabular-nums; }
.res-rate { font-size: 9px; color: var(--muted-2); margin-left: auto; white-space: nowrap; align-self: flex-end; padding-bottom: 2px; }
.res-rate.plus { color: rgba(141, 255, 163, .75); }
.top-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: .2s;
}
.icon-btn:hover { background: rgba(150, 220, 255, .1); border-color: var(--line-strong); }
.icon-btn.off { opacity: .45; }

/* ---------------- 主布局 ---------------- */
.layout { display: flex; min-height: 0; position: relative; }
.stage { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; }
#baseCanvas { position: absolute; inset: 0; display: block; }
.stage-top {
  position: absolute;
  left: 14px; right: 14px; top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
  z-index: 3;
}
.base-card {
  width: 410px;
  max-width: 62%;
  padding: 9px 13px 10px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(10, 26, 45, .9), rgba(8, 20, 38, .66));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(9px);
  pointer-events: auto;
}
.base-title { display: flex; align-items: center; gap: 8px; }
.base-ico { font-size: 17px; filter: drop-shadow(0 0 6px rgba(255, 200, 97, .4)); }
.base-title b { font-size: 15px; letter-spacing: 1px; }
.base-lv {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  border: 1px solid rgba(255, 200, 97, .32);
  background: rgba(255, 200, 97, .08);
  padding: 2px 7px;
  border-radius: 8px;
}
.hp-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.hp-label { font-size: 9px; color: var(--muted); flex: 0 0 auto; letter-spacing: 1px; }
.hp-track {
  flex: 1; height: 8px;
  background: rgba(0, 0, 0, .45);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
}
.hp-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #2b9fd1, #9fe8ff);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(141, 255, 163, .45);
  transition: width .35s, background .35s;
}
.hp-fill.low { background: linear-gradient(90deg, #c9483a, #ff9d5c); box-shadow: 0 0 12px rgba(255, 120, 90, .5); }
.hp-row b { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.base-sub { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 9px; color: var(--muted-2); }
.base-sub span:last-child { color: rgba(141, 255, 163, .6); white-space: nowrap; }
.weather {
  pointer-events: auto;
  font-size: 10px;
  color: rgba(196, 228, 255, .8);
  background: rgba(8, 21, 38, .72);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 12px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.tip {
  position: absolute;
  z-index: 9;
  min-width: 168px;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(6, 16, 30, .96);
  border: 1px solid rgba(255, 216, 140, .32);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .3);
  pointer-events: none;
  font-size: 10px;
  animation: tipIn .16s ease-out;
}
.tip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.tip-head b { color: #fff5dc; letter-spacing: .5px; }
.tip-lv { font-size: 9px; color: var(--gold); border: 1px solid rgba(255, 200, 97, .3); border-radius: 6px; padding: 1px 5px; }
.tip-line { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: rgba(141, 255, 163, .9); font-size: 10px; }
.tip-line.tip-warn { color: var(--gold-2); }
.tip-hint { margin-top: 6px; font-size: 9px; color: var(--muted-2); border-top: 1px dashed rgba(255, 255, 255, .1); padding-top: 5px; }

/* ---------------- 侧栏 ---------------- */
.sidebar {
  width: 306px;
  flex: 0 0 306px;
  padding: 11px 11px 11px 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
}
.side-panel {
  background: linear-gradient(180deg, rgba(14, 32, 52, .92), rgba(8, 20, 36, .88));
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 10px 11px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  flex: 0 0 auto;
}
.side-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #d3e6fb;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.side-panel > header > span:last-child { color: var(--muted-2); font-size: 9px; font-weight: 400; }
.squad-panel header span:last-child { color: var(--gold); }
.squad-list { display: flex; flex-direction: column; gap: 6px; }
.squad-hero {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid rgba(255, 255, 255, .05);
}
.mini-avatar {
  width: 32px; height: 32px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #071312;
  background: radial-gradient(circle at 35% 25%, #fff8, transparent 60%), var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 70%, #fff 20%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 25%, transparent);
}
.mini-avatar.enemy { color: #1a0c08; }
.mini-info { min-width: 0; flex: 1; }
.mini-info b { font-size: 11px; display: block; line-height: 1.1; }
.mini-info span { font-size: 8px; color: var(--muted-2); }
.mini-stats { display: flex; gap: 6px; margin-top: 3px; font-size: 8px; color: var(--muted); }
.mini-stats .hp { color: #86e7a9; }
.mini-stats .atk { color: #ffb07a; }
.mini-empty {
  font-size: 10px;
  color: var(--muted-2);
  text-align: center;
  padding: 15px 0;
  border: 1px dashed rgba(255, 255, 255, .1);
  border-radius: 10px;
}
.power-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, .1);
  font-size: 10px;
  color: var(--muted);
}
.power-row b { font-size: 15px; color: var(--gold); text-shadow: 0 0 12px rgba(255, 200, 97, .3); }
.side-battle-btn {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  border-radius: 11px;
  border: 1px solid rgba(255, 200, 97, .4);
  background: linear-gradient(135deg, rgba(255, 200, 97, .18), rgba(255, 157, 92, .08));
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: .2s;
}
.side-battle-btn:hover { background: rgba(255, 200, 97, .22); transform: translateY(-1px); }
.goal-list { display: flex; flex-direction: column; gap: 5px; }
.goal-line { display: flex; align-items: center; gap: 7px; font-size: 9px; color: var(--muted); }
.goal-check {
  width: 14px; height: 14px; flex: 0 0 auto;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .16);
  display: grid; place-items: center;
  font-size: 8px;
  color: transparent;
}
.goal-line.done .goal-check { background: rgba(141, 255, 163, .18); border-color: rgba(141, 255, 163, .5); color: var(--green); }
.goal-line.done { color: rgba(141, 255, 163, .65); text-decoration: line-through; }
.goal-step {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 9px; color: var(--muted);
  transition: .2s;
}
.goal-step .goal-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.goal-step .goal-body b { font-weight: 500; }
.goal-step .goal-body em { font-style: normal; font-size: 8px; color: rgba(182, 203, 224, .62); line-height: 1.35; }
.goal-step.done .goal-check { background: rgba(141, 255, 163, .18); border-color: rgba(141, 255, 163, .5); color: var(--green); }
.goal-step.done { color: rgba(141, 255, 163, .6); }
.goal-step.current {
  background: rgba(255, 200, 97, .1);
  border-color: rgba(255, 200, 97, .32);
  color: #ffe2b0;
}
.goal-step.current .goal-check { border-color: rgba(255, 200, 97, .55); }
.goal-step.locked { opacity: .45; }
.goal-go {
  flex: 0 0 auto;
  padding: 2px 8px;
  font-size: 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 200, 97, .45);
  background: rgba(255, 200, 97, .16);
  color: #ffd18a;
  cursor: pointer;
  transition: .2s;
}
.goal-go:hover { background: rgba(255, 200, 97, .3); }
.goal-gain { flex: 0 0 auto; font-size: 8px; color: rgba(141, 255, 163, .7); }
.chat-panel { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 110px; }
.chat-panel > header { flex: 0 0 auto; }
.online { display: inline-flex; align-items: center; gap: 4px; color: rgba(141, 255, 163, .75) !important; }
.online i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); animation: blink 2s infinite; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-right: 2px; }
.chat-line { font-size: 9px; line-height: 1.45; color: #b6cbe0; }
.chat-line b { color: var(--c, var(--cyan)); font-weight: 700; margin-right: 4px; }
.chat-line.sys { color: rgba(255, 200, 97, .65); font-style: italic; }
.chat-line.me b { color: var(--green); }
.online em { font-style: normal; color: var(--muted); }
.chat-input { flex: 0 0 auto; display: flex; gap: 5px; margin-top: 7px; }
.chat-input input {
  flex: 1; min-width: 0;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid rgba(95, 214, 255, .22);
  background: rgba(8, 20, 34, .85);
  color: #cfe6ff;
  font-size: 10px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.chat-input input:focus { border-color: rgba(95, 214, 255, .6); }
.chat-input input::placeholder { color: rgba(150, 180, 210, .45); }
.chat-input input:disabled { opacity: .45; }
.chat-send {
  flex: 0 0 auto;
  width: 30px;
  border-radius: 7px;
  border: 1px solid rgba(95, 214, 255, .35);
  background: rgba(24, 64, 92, .55);
  color: var(--cyan);
  font-size: 11px;
  cursor: pointer;
  transition: .2s;
}
.chat-send:hover:not(:disabled) { background: rgba(95, 214, 255, .25); }
.chat-send:disabled { opacity: .4; cursor: default; }

/* 窄屏：侧栏隐藏时用顶栏 📡 打开世界频道浮层 */
.chat-toggle { display: none; }
.chat-dock {
  position: fixed;
  z-index: 70;
  right: 10px;
  bottom: 84px;
  width: min(88vw, 340px);
  height: min(56vh, 420px);
}
.chat-dock.hidden { display: none; }
.chat-dock .side-panel { width: 100%; height: 100%; padding: 11px; display: flex; flex-direction: column; }
@media (max-width: 900px) {
  .chat-toggle { display: grid; }
}

/* ---------------- 底栏 ---------------- */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(9, 22, 38, .9), rgba(5, 13, 26, .98));
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.nav-btn {
  width: 88px; height: 56px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  cursor: pointer;
  transition: .18s;
}
.nav-btn:hover { background: rgba(255, 255, 255, .045); color: var(--text); transform: translateY(-2px); }
.nav-btn.active { background: rgba(150, 220, 255, .08); border-color: var(--line); color: var(--green); }
.nav-ico { font-size: 20px; filter: grayscale(.1); }
.battle-cta {
  width: 110px;
  color: #1d1205;
  background: linear-gradient(160deg, #ffd98b, #ffb15c 55%, #f79045);
  border: 1px solid rgba(255, 235, 180, .6);
  box-shadow: 0 6px 20px rgba(255, 160, 70, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
  font-weight: 800;
  letter-spacing: 1px;
  margin-left: 10px;
  position: relative;
  overflow: hidden;
}
.battle-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 48%, transparent 62%);
  transform: translateX(-110%);
  animation: shine 4.2s infinite;
}
.battle-cta:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(255, 160, 70, .4); }
.battle-cta .nav-ico { font-size: 19px; }

/* ---------------- 通用按钮 / 成本 ---------------- */
.btn {
  padding: 8px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 200, 97, .4);
  background: linear-gradient(160deg, #ffd98b, #ffb15c);
  color: #1d1205;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(255, 170, 80, .22); }
.btn.small { padding: 6px 11px; font-size: 11px; border-radius: 9px; }
.btn.ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  border-color: rgba(255, 255, 255, .16);
}
.btn.ghost:hover { background: rgba(255, 255, 255, .09); }
.btn.green {
  background: linear-gradient(160deg, #9be9ff, #4aa8da);
  border-color: rgba(160, 225, 255, .5);
  color: #05182b;
}
.btn.danger {
  background: linear-gradient(160deg, #ff9480, #e25344);
  border-color: rgba(255, 140, 120, .5);
  color: #1e0806;
}
.btn.unavailable { filter: grayscale(.55); opacity: .62; }
.btn.unavailable:hover { transform: none; box-shadow: none; }
.cost-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.cost-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  color: #c2d5e4;
  font-variant-numeric: tabular-nums;
}
.cost-chip.no { color: #ff8d7b; border-color: rgba(255, 125, 104, .25); background: rgba(255, 125, 104, .06); }
.cost-chip.ok { color: #9be7b5; }

/* ---------------- 弹层 ---------------- */
#modalRoot { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 8, 18, .7);
  backdrop-filter: blur(5px);
}
.modal {
  position: relative;
  width: min(1040px, 95vw);
  max-height: min(760px, 86vh);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(16, 38, 62, .98), rgba(7, 18, 34, .99)),
    #0b1c31;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .07);
  animation: modalIn .22s cubic-bezier(.2, .9, .3, 1.1);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 13px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent);
  flex: 0 0 auto;
}
.modal-title { display: flex; align-items: center; gap: 11px; }
.modal-ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 19px;
  border-radius: 12px;
  background: rgba(255, 200, 97, .09);
  border: 1px solid rgba(255, 200, 97, .24);
}
.modal-title h2 { margin: 0; font-size: 17px; letter-spacing: 1.5px; }
.modal-title p { margin: 2px 0 0; font-size: 9px; color: var(--muted-2); letter-spacing: .5px; }
.modal-close {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  transition: .18s;
}
.modal-close:hover { color: var(--red); border-color: rgba(255, 125, 104, .4); background: rgba(255, 125, 104, .08); }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 22px 24px; }

.panel-toolbar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #c4d6e6;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 5px 9px;
  border-radius: 9px;
}
.stat-pill b { color: var(--gold); }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 9px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #d5e4f3;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.section-title .hint { font-size: 9px; font-weight: 400; color: var(--muted-2); letter-spacing: 0; }
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 200, 97, .25);
  background: rgba(255, 200, 97, .06);
  font-size: 10px;
  color: #ffdb9a;
}
.notice .notice-ico { font-size: 17px; }
.notice .btn { margin-left: auto; }
.notice.green { border-color: rgba(141, 255, 163, .24); background: rgba(141, 255, 163, .06); color: #c9ffb4; }

/* ---------------- 建造 ---------------- */
.building-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 10px; }
.build-card {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid rgba(255, 255, 255, .075);
  transition: .2s;
  animation: fadeUp .3s ease-out both;
}
.build-card:hover { border-color: rgba(150, 220, 255, .22); background: rgba(255, 255, 255, .06); }
.build-card.focus { border-color: rgba(255, 200, 97, .48); box-shadow: 0 0 0 1px rgba(255, 200, 97, .15), 0 8px 22px rgba(0, 0, 0, .25); }
.build-card.maxed { opacity: .78; }
.build-ico {
  width: 45px; height: 45px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 21px;
  background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--c) 8%, transparent);
}
.build-main { flex: 1; min-width: 0; }
.build-head { display: flex; align-items: center; gap: 7px; }
.build-head b { font-size: 12px; letter-spacing: .5px; }
.build-head .lv {
  font-size: 9px;
  color: var(--gold);
  border: 1px solid rgba(255, 200, 97, .28);
  border-radius: 6px;
  padding: 1px 5px;
  background: rgba(255, 200, 97, .06);
}
.build-card.locked .lv { color: var(--muted-2); border-color: rgba(255, 255, 255, .12); background: transparent; }
.build-desc { margin: 3px 0 5px; font-size: 9px; line-height: 1.55; color: var(--muted-2); }
.build-facts { display: flex; flex-wrap: wrap; gap: 8px; font-size: 9px; color: #9fb6ca; }
.build-facts span { display: inline-flex; align-items: center; gap: 3px; }
.build-facts .up { color: var(--green); }
.build-card .btn { margin-top: 10px; align-self: flex-end; }
.build-lock-hint { font-size: 9px; color: var(--gold-2); margin-top: 5px; }
.build-next {
  margin-top: 6px; padding: 4px 7px; border-radius: 7px; font-size: 9px; line-height: 1.5;
  color: #9ee27a; background: rgba(158, 226, 122, .07); border: 1px solid rgba(158, 226, 122, .18);
}
.build-next.maxed {
  color: var(--muted-2); background: rgba(255, 255, 255, .03); border-color: var(--line);
}
.build-link {
  margin-top: 7px; align-self: flex-start; padding: 0; border: none; background: none;
  color: #6fd8ff; font-size: 9px; font-weight: 700; cursor: pointer; transition: color .2s;
}
.build-link:hover { color: #a9ecff; text-decoration: underline; }

/* 建筑状态徽章 / 等级进度 / 应急操作 */
.build-ico { position: relative; }
.build-state {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  font-size: 7.5px; font-weight: 800; letter-spacing: .3px; white-space: nowrap;
  padding: 1px 5px; border-radius: 5px;
  color: var(--muted); background: rgba(6, 20, 32, .92);
  border: 1px solid rgba(255, 255, 255, .14);
}
.build-state.ready { color: #ffd98b; border-color: rgba(255, 200, 97, .5); background: rgba(255, 200, 97, .16); }
.build-state.run { color: #9be9da; border-color: rgba(155, 233, 218, .32); }
.build-state.work { color: #c9a8ff; border-color: rgba(183, 139, 255, .42); background: rgba(183, 139, 255, .14); }
.build-state.lock { color: #8ca8c2; }
.build-state.idle { color: #ffb37a; border-color: rgba(255, 157, 92, .35); }
.build-state.max { color: #baffc6; border-color: rgba(141, 255, 163, .45); background: rgba(141, 255, 163, .12); }
.build-lvbar {
  margin: 5px 0 1px; height: 4px; border-radius: 3px; overflow: hidden;
  background: rgba(255, 255, 255, .07);
}
.build-lvbar i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), var(--c));
  box-shadow: 0 0 6px color-mix(in srgb, var(--c) 45%, transparent);
}
.build-boost {
  margin-top: 7px; padding: 5px 7px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 224, 102, .06); border: 1px solid rgba(255, 224, 102, .16);
}
.build-boost-txt { flex: 1; min-width: 0; font-size: 8.5px; color: #ffe3a1; }
.build-boost-txt i { font-style: normal; color: #ffd54a; }
.build-boost .btn { margin-top: 0 !important; padding: 2px 9px; font-size: 8.5px; }

/* ---------------- 工坊 ---------------- */
.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.equip-card {
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  border: 1px solid rgba(255, 255, 255, .075);
  display: flex;
  flex-direction: column;
  animation: fadeUp .3s ease-out both;
}
.equip-top { display: flex; align-items: center; gap: 9px; }
.equip-ico {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 19px;
  background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.equip-name { min-width: 0; flex: 1; }
.equip-name b { display: block; font-size: 11px; }
.equip-name span { font-size: 8px; color: var(--muted-2); }
.equip-lv { font-size: 12px; font-weight: 800; color: var(--gold); }
.equip-desc { font-size: 9px; color: #a8bdd0; line-height: 1.5; margin: 7px 0 2px; }
.pips { display: flex; gap: 3px; margin: 6px 0 2px; }
.pip { height: 4px; flex: 1; border-radius: 3px; background: rgba(255, 255, 255, .09); }
.pip.on { background: var(--c, var(--gold)); box-shadow: 0 0 6px color-mix(in srgb, var(--c, var(--gold)) 40%, transparent); }
.timer-row { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.timer-track { flex: 1; height: 6px; border-radius: 4px; background: rgba(125, 255, 163, .12); overflow: hidden; }
.timer-fill { height: 100%; width: 0%; border-radius: 4px; background: linear-gradient(90deg, #3fbf7f, var(--green)); box-shadow: 0 0 8px rgba(141, 255, 163, .45); transition: width .45s linear; }
.timer-text { font-size: 9px; color: #baffc6; white-space: nowrap; font-variant-numeric: tabular-nums; }
.equip-actions { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.equip-actions .cost-row { flex: 1; margin-top: 0; }
.product-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-card .p-main { flex: 1; min-width: 200px; }
.product-card p { margin: 3px 0 0; font-size: 9px; color: var(--muted-2); }
.stock-pill { font-size: 10px; color: var(--gold); background: rgba(255, 200, 97, .08); border: 1px solid rgba(255, 200, 97, .25); padding: 4px 8px; border-radius: 8px; }

/* ---------------- 科技 ---------------- */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.tech-card { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .075); }
.tech-head { display: flex; align-items: center; gap: 9px; }
.tech-head .t-ico { width: 36px; height: 36px; display: grid; place-items: center; font-size: 18px; border-radius: 10px; background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.tech-head .t-name { flex: 1; }
.tech-head b { font-size: 11px; display: block; }
.tech-head span { font-size: 8px; color: var(--muted-2); }
.tech-level { font-size: 10px; color: var(--c); font-weight: 800; }
.tech-desc { font-size: 9px; color: #a8bdd0; margin: 7px 0 2px; line-height: 1.5; }
.tech-card .btn { margin-top: 9px; width: 100%; }

/* ---------------- 英雄 ---------------- */
.recruit-box {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px;
  border-radius: 16px;
  background:
    radial-gradient(400px 180px at 10% 20%, rgba(255, 200, 97, .1), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid rgba(255, 200, 97, .2);
}
.recruit-info { flex: 1; min-width: 230px; }
.recruit-info h3 { margin: 0; font-size: 14px; letter-spacing: 1px; }
.recruit-info p { margin: 4px 0 0; font-size: 9px; line-height: 1.6; color: var(--muted-2); }
.recruit-info .rates { display: flex; gap: 8px; margin-top: 6px; font-size: 9px; }
.recruit-info .rates span { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .04); }
.recruit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.recruit-actions .btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 16px; }
.recruit-actions .btn small { font-size: 8px; font-weight: 400; opacity: .75; }
.recruit-results { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.pull-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  background: color-mix(in srgb, var(--c) 8%, transparent);
  animation: popIn .3s cubic-bezier(.2, .9, .3, 1.3) both;
}
.pull-avatar { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #0a1512; background: var(--c); }
.pull-info b { font-size: 10px; display: block; }
.pull-info span { font-size: 8px; color: var(--muted-2); }
.pull-tag { font-size: 8px; font-weight: 800; padding: 2px 5px; border-radius: 5px; background: rgba(0, 0, 0, .3); color: var(--gold); }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 10px; }
.hero-card {
  padding: 12px;
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012));
  border: 1px solid rgba(255, 255, 255, .075);
  display: flex;
  flex-direction: column;
  animation: fadeUp .3s ease-out both;
}
.hero-card.in-squad { border-color: color-mix(in srgb, var(--c) 48%, transparent); box-shadow: inset 0 0 26px color-mix(in srgb, var(--c) 7%, transparent); }
.hero-top { display: flex; align-items: center; gap: 9px; }
.hero-portrait {
  width: 50px; height: 50px; flex: 0 0 auto;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 900;
  color: #08120f;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .55), transparent 42%), var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 65%, #fff 15%);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 22%, transparent);
  position: relative;
}
.hero-portrait .r-flag,
.hero-sheet-portrait .r-flag {
  position: absolute;
  right: -5px; bottom: -4px;
  font-size: 7px; font-weight: 900; letter-spacing: .5px;
  padding: 2px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--r) 35%, #0a1512);
  border: 1px solid var(--r);
  color: #fff;
}
.hero-sheet-portrait .r-flag { right: -7px; bottom: -6px; font-size: 8px; padding: 2px 5px; }
.hero-id { flex: 1; min-width: 0; }
.hero-id b { font-size: 13px; letter-spacing: .5px; }
.hero-id span { display: block; font-size: 8px; color: var(--muted-2); }
.hero-role { font-size: 9px; color: var(--c); margin-top: 2px; }
.hero-stars { color: var(--gold); font-size: 9px; letter-spacing: 1px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 9px 0 6px; }
.hero-stat { background: rgba(0, 0, 0, .18); border-radius: 7px; padding: 4px 5px; text-align: center; font-size: 8px; color: var(--muted-2); }
.hero-stat b { display: block; font-size: 10px; color: #dcefff; margin-top: 1px; }
.hero-stat.hp b { color: #8ee7aa; }
.hero-stat.atk b { color: #ffb07a; }
.hero-stat.pur b { color: #9be9da; }
.hero-passive { font-size: 8px; line-height: 1.5; color: var(--muted-2); background: rgba(255, 255, 255, .025); padding: 5px 7px; border-radius: 7px; }
.hero-card .actions { display: flex; gap: 6px; margin-top: 8px; }
.hero-card .actions .btn { flex: 1; padding: 6px 8px; font-size: 10px; }
.hero-card .cost-row { margin-top: 6px; }
.lock-note { font-size: 9px; color: var(--gold-2); margin-top: 6px; }

/* ---------------- 英雄模板与状态 ---------------- */
.hero-card { cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.hero-card:hover { border-color: color-mix(in srgb, var(--c) 38%, transparent); transform: translateY(-1px); }
.hero-lv { text-align: right; flex: 0 0 auto; }
.hero-lv b { display: block; font-size: 14px; color: var(--gold); font-weight: 800; }
.hero-lv i { display: block; font-size: 8px; color: var(--muted-2); font-style: normal; margin-top: 1px; }
.hero-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.hero-power { margin-left: auto; font-size: 9px; color: #ffdc9a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-state {
  font-size: 8px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .26);
  color: var(--muted);
  white-space: nowrap;
}
.hero-state.idle { color: var(--muted-2); }
.hero-state.march { color: #ffe1a1; border-color: rgba(255, 200, 97, .5); background: rgba(255, 200, 97, .12); }
.hero-state.guard { color: #a9e9ff; border-color: rgba(111, 216, 255, .44); background: rgba(111, 216, 255, .1); }
.hero-state.gather { color: #9be9da; border-color: rgba(155, 233, 218, .44); background: rgba(155, 233, 218, .1); }
.hero-state.heal { color: #ffb08a; border-color: rgba(255, 157, 92, .46); background: rgba(255, 157, 92, .1); }
.hero-state.train { color: #cbb0ff; border-color: rgba(183, 139, 255, .46); background: rgba(183, 139, 255, .1); }
.hero-kit { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; }
.hero-kit-row {
  display: flex; gap: 7px; align-items: flex-start;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid rgba(255, 255, 255, .05);
}
.hero-kit-row.gear { background: color-mix(in srgb, var(--c) 7%, rgba(255, 255, 255, .02)); }
.kit-ico { font-size: 12px; line-height: 1.25; flex: 0 0 auto; }
.hero-kit-row b { display: block; font-size: 9px; color: #dff3ff; }
.hero-kit-row b i {
  font-style: normal; font-size: 7px; font-weight: 800;
  color: var(--gold);
  border: 1px solid rgba(255, 200, 97, .4);
  border-radius: 4px;
  padding: 0 3px;
  margin-left: 4px;
}
.hero-kit-row em { display: block; font-style: normal; font-size: 7.5px; line-height: 1.45; color: var(--muted-2); margin-top: 1px; }
.hero-quote { margin-top: 6px; font-size: 8px; font-style: italic; color: rgba(200, 220, 236, .55); }

/* 英雄档案 */
.hero-back {
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  transition: .2s;
}
.hero-back:hover { color: var(--text); border-color: var(--line-strong); background: rgba(150, 220, 255, .08); }
.hero-sheet {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c) 10%, transparent), transparent 68%),
    rgba(255, 255, 255, .02);
}
.hero-sheet-head { display: flex; gap: 12px; align-items: flex-start; }
.hero-sheet-portrait {
  width: 78px; height: 78px; flex: 0 0 auto;
  border-radius: 18px;
  display: grid; place-items: center;
  position: relative;
  font-size: 30px; font-weight: 900;
  color: #08120f;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .55), transparent 42%), var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 65%, #fff 15%);
  box-shadow: 0 0 26px color-mix(in srgb, var(--c) 28%, transparent);
}
.hero-sheet-id { flex: 1; min-width: 0; }
.hero-sheet-id h3 { margin: 0; font-size: 18px; letter-spacing: .5px; }
.hero-sheet-id h3 small { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.hero-sheet-sub { font-size: 10px; color: var(--c); margin-top: 3px; }
.hero-sheet-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; }
.hero-sheet-tags .hero-power { margin-left: 0; font-size: 10px; }
.hero-sheet-lv { margin-left: auto; text-align: right; flex: 0 0 auto; }
.hero-sheet-lv b { display: block; font-size: 18px; color: var(--gold); font-weight: 900; }
.hero-sheet-lv i { display: block; font-size: 9px; font-style: normal; color: var(--muted-2); }
.hero-sheet-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; margin: 12px 0 4px; }
.hs-stat { background: rgba(0, 0, 0, .22); border-radius: 9px; padding: 7px 5px; text-align: center; font-size: 8px; color: var(--muted-2); }
.hs-stat b { display: block; font-size: 12px; color: #e6f6ff; margin-top: 2px; font-variant-numeric: tabular-nums; }
.hs-stat.hp b { color: #8ee7aa; }
.hs-stat.atk b { color: #ffb07a; }
.hs-stat.pur b { color: #9be9da; }
.hs-stat.spd b { color: #a9c9ff; }
.hs-stat.dr b { color: #ffd7a1; }
.sheet-title {
  font-size: 10px; letter-spacing: 1px; color: var(--muted);
  margin: 16px 0 7px;
  padding-left: 8px;
  border-left: 2px solid var(--c);
}
.skill-list { display: flex; flex-direction: column; gap: 6px; }
.skill-row {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}
.skill-ico {
  width: 28px; height: 28px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 8px;
  font-size: 14px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.skill-main b { font-size: 11px; color: #eaf6ff; }
.skill-main b i {
  font-style: normal; font-size: 7px; font-weight: 800;
  color: var(--gold);
  border: 1px solid rgba(255, 200, 97, .35);
  border-radius: 4px;
  padding: 0 3px;
  margin-left: 5px;
}
.skill-main em { display: block; font-style: normal; font-size: 9px; line-height: 1.55; color: var(--muted); margin-top: 2px; }
.gear-row {
  display: flex; gap: 10px; align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 8%, rgba(0, 0, 0, .2));
  border: 1px solid rgba(255, 200, 97, .24);
}
.gear-ico {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 10px; font-size: 18px;
  background: rgba(255, 200, 97, .1);
  border: 1px solid rgba(255, 200, 97, .35);
}
.gear-main { flex: 1; min-width: 0; }
.gear-main b { font-size: 11px; color: #fff1d2; }
.gear-main b i { font-style: normal; font-size: 7px; font-weight: 700; color: var(--green); margin-left: 5px; }
.gear-main em { display: block; font-style: normal; font-size: 9px; line-height: 1.55; color: var(--muted); margin-top: 2px; }
.gear-tag { font-size: 8px; color: var(--gold); border: 1px solid rgba(255, 200, 97, .45); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.hero-story { margin: 0; font-size: 10px; line-height: 1.75; color: var(--muted); }
.hero-quote-line { margin: 7px 0 0; font-size: 10px; font-style: italic; color: rgba(255, 220, 160, .75); }
.hero-sheet .cost-row { margin-top: 10px; }
.hero-sheet-actions { display: flex; gap: 8px; margin-top: 10px; }
.hero-sheet-actions .btn { flex: 1; }

/* 英雄立绘：图片覆盖在字形之上，加载失败自动回退 */
.hero-glyph { position: relative; z-index: 0; }
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 1;
  background: #0b1620;
}
.hero-portrait .r-flag,
.hero-sheet-portrait .r-flag { z-index: 2; }

/* 专属装备栏 */
.hero-kit-row.gear > div { flex: 1; min-width: 0; }
.hero-kit-row.gear.owned { border-color: rgba(255, 200, 97, .34); background: rgba(255, 200, 97, .07); }
.hero-kit-row.gear.equipped { border-color: rgba(109, 255, 176, .42); background: rgba(109, 255, 176, .07); }
.hero-kit-row.gear.locked { opacity: .82; }
.gear-btn {
  flex: 0 0 auto;
  align-self: center;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  color: #6dffb0;
  border: 1px solid rgba(109, 255, 176, .42);
  background: rgba(109, 255, 176, .1);
  transition: filter .18s, background .18s;
}
.gear-btn.off { color: var(--muted); border-color: var(--line); background: rgba(255, 255, 255, .04); }
.gear-btn:hover { filter: brightness(1.2); }
.gear-lock {
  flex: 0 0 auto;
  align-self: center;
  font-size: 8px;
  color: var(--muted-2);
  border: 1px dashed rgba(255, 255, 255, .16);
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}
.gear-row.owned { border-color: rgba(255, 200, 97, .5); }
.gear-row.equipped { border-color: rgba(109, 255, 176, .45); }
.gear-row.locked { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .02); }
.gear-row .gear-btn { margin-left: auto; }
.gear-bonus { margin-top: 5px; font-size: 9px; font-weight: 700; color: #ffdca1; }
.gear-hint { margin-top: 7px; font-size: 9px; line-height: 1.55; color: var(--muted-2); }
.gear-lv {
  display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 6px;
  font-size: 8px; font-style: normal; font-weight: 800; color: #8fe3ff;
  border: 1px solid rgba(143, 227, 255, .35); background: rgba(143, 227, 255, .08);
}
.gear-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; }
.gear-cost { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.gear-cost .cost-chip { font-size: 8px; }
.gear-shards { font-size: 9px; color: var(--muted); white-space: nowrap; }
.gear-shards b { color: #ffdca1; }
.gear-btn.up { color: #ffd28a; border-color: rgba(255, 200, 97, .45); background: rgba(255, 200, 97, .1); }
.gear-btn.synth { color: #8fe3ff; border-color: rgba(143, 227, 255, .4); background: rgba(143, 227, 255, .08); }
.gear-btn:disabled { opacity: .38; cursor: not-allowed; filter: none; }

/* 通用徽章槽 */
.hero-kit-row.badge.on { border-color: rgba(143, 227, 255, .35); background: rgba(143, 227, 255, .06); }
.badge-board { display: flex; flex-direction: column; gap: 8px; }
.badge-cur {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  border: 1px solid rgba(143, 227, 255, .35); background: rgba(143, 227, 255, .07);
}
.badge-ico {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 16px; border-radius: 8px; background: rgba(255, 255, 255, .05);
}
.badge-main { flex: 1; min-width: 0; }
.badge-main b { display: block; font-size: 11px; color: var(--text); }
.badge-main b i {
  font-style: normal; font-size: 8px; margin-left: 6px; padding: 0 4px;
  color: #8fe3ff; border: 1px solid rgba(143, 227, 255, .35); border-radius: 5px;
}
.badge-main em { display: block; margin-top: 3px; font-style: normal; font-size: 9px; color: #ffdca1; }
.badge-empty {
  padding: 9px 10px; border-radius: 10px; border: 1px dashed rgba(255, 255, 255, .16);
  font-size: 9px; color: var(--muted-2);
}
.badge-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.badge-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 7px 8px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--muted); text-align: left; cursor: pointer;
  transition: filter .18s, border-color .18s, background .18s;
}
.badge-chip-ico { font-size: 14px; }
.badge-chip b { font-size: 9px; color: var(--text); }
.badge-chip em { font-style: normal; font-size: 8px; color: #ffdca1; }
.badge-chip i { font-style: normal; font-size: 8px; color: var(--muted-2); }
.badge-chip.on { border-color: rgba(143, 227, 255, .5); background: rgba(143, 227, 255, .1); }
.badge-chip:hover:not(:disabled) { filter: brightness(1.15); }
.badge-chip:disabled { opacity: .75; cursor: default; }

/* 套装效果 / 装备拆解 */
.gear-set {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .02);
}
.gear-set.on { border-style: solid; border-color: rgba(255, 200, 97, .45); background: rgba(255, 200, 97, .07); }
.set-ico {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 16px; border-radius: 8px; background: rgba(255, 255, 255, .05);
}
.set-main { flex: 1; min-width: 0; }
.set-main b { display: block; font-size: 11px; color: var(--text); }
.set-main b i {
  font-style: normal; font-size: 8px; margin-left: 6px; padding: 0 4px; border-radius: 5px;
  color: #ffd28a; border: 1px solid rgba(255, 200, 97, .4);
}
.set-main em { display: block; margin-top: 3px; font-style: normal; font-size: 9px; color: #ffdca1; }
.set-pieces { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.set-piece {
  font-size: 8px; padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--muted-2);
}
.set-piece.on { color: #8fe3ff; border-color: rgba(143, 227, 255, .4); background: rgba(143, 227, 255, .08); }
.gear-btn.recycle { color: #ff9d9d; border-color: rgba(255, 120, 120, .4); background: rgba(255, 120, 120, .08); }

@media (max-width: 640px) {
  .hero-sheet { padding: 11px; }
  .hero-sheet-head { flex-wrap: wrap; }
  .hero-sheet-portrait { width: 60px; height: 60px; font-size: 24px; }
  .hero-sheet-lv { margin-left: auto; }
}

/* ---------------- 世界 ---------------- */
.world-map {
  position: relative;
  height: 380px;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(600px 260px at 50% 50%, rgba(70, 255, 180, .08), transparent 65%),
    repeating-linear-gradient(0deg, rgba(150, 220, 255, .045) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(150, 220, 255, .045) 0 1px, transparent 1px 34px),
    #071514;
  margin-bottom: 13px;
}
.world-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(200px 120px at 22% 66%, rgba(255, 180, 90, .05), transparent 70%),
    radial-gradient(240px 140px at 78% 26%, rgba(120, 220, 255, .05), transparent 70%);
  pointer-events: none;
}
.map-scan {
  position: absolute;
  left: 0; right: 0; height: 70px;
  background: linear-gradient(180deg, transparent, rgba(140, 205, 255, .06), transparent);
  animation: scan 7s linear infinite;
  pointer-events: none;
}
.map-base {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--text);
  z-index: 2;
  transition: transform .16s;
}
.map-base:hover { transform: translate(-50%, -50%) scale(1.08); }
.map-pin {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 18px;
  font-weight: 900;
  color: #0a1512;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .5), transparent 50%), var(--c);
  border: 2px solid color-mix(in srgb, var(--c) 70%, #fff 20%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 35%, transparent);
  position: relative;
}
.map-base.ally .map-pin { outline: 2px dashed rgba(141, 255, 163, .8); outline-offset: 3px; }
.map-base.fallen .map-pin { filter: grayscale(.85) brightness(.6); }
.map-base.player { z-index: 3; cursor: default; }
.map-base.player .map-pin {
  width: 56px; height: 56px;
  border-radius: 18px;
  font-size: 22px;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .6), transparent 50%), #ffc861;
  border-color: #fff0c0;
  box-shadow: 0 0 28px rgba(255, 200, 97, .55);
}
.map-label {
  font-size: 9px;
  background: rgba(5, 15, 30, .82);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}
.map-label b { color: var(--gold); }
.map-ring {
  position: absolute;
  width: 90px; height: 90px;
  border: 1px solid rgba(255, 200, 97, .25);
  border-radius: 50%;
  animation: ringPulse 3s infinite;
  pointer-events: none;
}
.map-legend { position: absolute; left: 10px; bottom: 8px; display: flex; gap: 10px; font-size: 8px; color: var(--muted-2); }
.map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.map-legend i { width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.world-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.world-card {
  padding: 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .075);
  background: linear-gradient(160deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  transition: .2s;
}
.world-card.ally { border-color: rgba(141, 255, 163, .3); background: rgba(141, 255, 163, .035); }
.world-card.fallen { opacity: .7; }
.world-head { display: flex; align-items: center; gap: 8px; }
.world-avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 16px; font-weight: 900; color: #08120f; background: var(--c); }
.world-id { flex: 1; min-width: 0; }
.world-id b { font-size: 12px; display: block; }
.world-id span { font-size: 8px; color: var(--muted-2); }
.world-lv { font-size: 9px; color: var(--gold); border: 1px solid rgba(255, 200, 97, .25); border-radius: 6px; padding: 2px 6px; }
.world-motto { font-size: 9px; color: var(--muted-2); margin: 7px 0 6px; font-style: italic; }
.world-hp { display: flex; align-items: center; gap: 7px; font-size: 8px; color: var(--muted-2); }
.world-hp .mini-track { flex: 1; height: 6px; background: rgba(0, 0, 0, .35); border-radius: 4px; overflow: hidden; }
.world-hp .mini-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ca5a42, #ffa46b); transition: width .3s; }
.world-hp .mini-fill.safe { background: linear-gradient(90deg, #3fa8d6, #9fe0ff); }
.world-meta { display: flex; gap: 9px; margin-top: 6px; font-size: 8px; color: var(--muted-2); flex-wrap: wrap; }
.world-meta b { color: #d6e8fa; }
.world-card .actions { display: flex; gap: 6px; margin-top: 9px; }
.world-card .actions .btn { flex: 1; padding: 6px 8px; font-size: 10px; }
.world-note { font-size: 8px; color: var(--muted-2); margin-top: 12px; line-height: 1.6; text-align: center; }

/* ---------------- 设置 ---------------- */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .07);
}
.settings-row b { font-size: 11px; }
.settings-row p { margin: 3px 0 0; font-size: 9px; color: var(--muted-2); }
.settings-row .btn { flex: 0 0 auto; }
.info-list { display: flex; flex-direction: column; gap: 7px; }
.info-list p {
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  border-left: 2px solid rgba(150, 220, 255, .2);
  font-size: 9px;
  line-height: 1.7;
  color: #a9bfd3;
}
.info-list p b { color: #e5f2ff; }


/* ---------------- 确认框 ---------------- */
#confirmRoot { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; }
.confirm-card {
  position: relative;
  width: min(360px, 88vw);
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, #132c4a, #0a1a30);
  border: 1px solid rgba(255, 200, 97, .3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  text-align: center;
  animation: modalIn .2s ease-out;
}
.confirm-ico { font-size: 32px; }
.confirm-card h3 { margin: 8px 0 6px; font-size: 15px; letter-spacing: 1px; }
.confirm-card p { margin: 0 0 16px; font-size: 10px; line-height: 1.7; color: var(--muted); white-space: pre-line; }
.confirm-actions { display: flex; gap: 8px; }
.confirm-actions .btn { flex: 1; }

/* ---------------- 战斗 ---------------- */
#battleRoot { position: fixed; inset: 0; z-index: 120; background: #050f1e; }
#battleCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.battle-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(4, 12, 26, .88), transparent);
  z-index: 3;
  pointer-events: none;
}
.battle-team { width: 33%; max-width: 380px; }
.battle-team.right { text-align: right; }
.bt-name { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: 1px; color: #e2f1ff; }
.battle-team.right .bt-name { justify-content: flex-end; }
.bt-name span { font-size: 14px; }
.bt-bar { height: 9px; margin-top: 5px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .1); border-radius: 6px; overflow: hidden; }
.bt-bar div { height: 100%; width: 100%; background: linear-gradient(90deg, #2b9fd1, #9fe8ff); border-radius: 6px; transition: width .25s; box-shadow: 0 0 10px rgba(141, 255, 163, .3); }
.bt-bar.enemy div { background: linear-gradient(90deg, #d55a44, #ffac77); box-shadow: 0 0 10px rgba(255, 125, 104, .3); }
.bt-num { margin-top: 3px; font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.battle-round {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(8, 22, 40, .72);
  border: 1px solid var(--line);
  pointer-events: auto;
}
.battle-round span { font-size: 8px; color: var(--muted-2); letter-spacing: 2px; }
.battle-round b { font-size: 18px; color: var(--gold); line-height: 1.1; }
.speed-btn {
  margin-top: 2px;
  border: 1px solid rgba(255, 200, 97, .3);
  background: rgba(255, 200, 97, .08);
  color: var(--gold);
  border-radius: 7px;
  font-size: 9px;
  padding: 2px 8px;
  cursor: pointer;
}
.battle-log {
  position: absolute;
  left: 18px; bottom: 16px;
  width: min(560px, 52vw);
  max-height: 132px;
  overflow: hidden;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, transparent, rgba(4, 14, 28, .82) 28%);
  font-size: 10px;
  line-height: 1.65;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  mask-image: linear-gradient(180deg, transparent, #000 25%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%);
}
.battle-log-line { color: #b6c9c1; }
.battle-log-line.player { color: #9fe7b6; }
.battle-log-line.enemy { color: #ffb29f; }
.battle-log-line.good { color: var(--gold); font-weight: 700; }
.battle-log-line.bad { color: #ff8270; font-weight: 700; }
.battle-log-line.round { color: rgba(255, 200, 97, .55); font-size: 9px; letter-spacing: 1px; }
.battle-quit {
  position: absolute;
  right: 18px; bottom: 16px;
  z-index: 5;
  padding: 6px 12px;
  border-radius: 9px;
  background: rgba(8, 20, 38, .7);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}
.battle-quit:hover { color: var(--red); border-color: rgba(255, 125, 104, .4); }
.battle-result {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 18, .72);
  backdrop-filter: blur(5px);
}
.result-card {
  width: min(540px, 92vw);
  padding: 24px;
  border-radius: 20px;
  background:
    radial-gradient(500px 220px at 50% 0%, rgba(255, 200, 97, .12), transparent 65%),
    linear-gradient(180deg, #16344f, #08192c);
  border: 1px solid rgba(255, 200, 97, .32);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .6);
  text-align: center;
  animation: resultIn .35s cubic-bezier(.2, .9, .3, 1.15);
}
.result-card.lose { border-color: rgba(255, 125, 104, .35); background: radial-gradient(500px 220px at 50% 0%, rgba(255, 90, 70, .1), transparent 65%), linear-gradient(180deg, #2a1e1b, #170e0c); }
.result-badge { font-size: 42px; line-height: 1; filter: drop-shadow(0 0 18px rgba(255, 200, 97, .45)); }
.result-card.lose .result-badge { filter: grayscale(.3) drop-shadow(0 0 18px rgba(255, 90, 70, .35)); }
.result-card h2 { margin: 9px 0 4px; font-size: 22px; letter-spacing: 3px; }
.result-card > p { margin: 0; font-size: 10px; color: var(--muted); }
.result-stats { display: flex; justify-content: center; gap: 18px; margin: 15px 0; flex-wrap: wrap; }
.result-stat { font-size: 8px; color: var(--muted-2); }
.result-stat b { display: block; font-size: 15px; color: #e5f3ff; margin-top: 2px; }
.reward-box { margin-top: 12px; }
.reward-box h4 { margin: 0 0 7px; font-size: 10px; color: var(--gold); letter-spacing: 1px; font-weight: 500; }
.reward-grid { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.reward-chip { font-size: 10px; padding: 4px 8px; border-radius: 7px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09); }
.result-loss { font-size: 10px; color: #ff9e8b; margin-top: 10px; line-height: 1.6; }
.result-actions { display: flex; gap: 8px; margin-top: 18px; }
.result-actions .btn { flex: 1; }

/* ---------------- Toast ---------------- */
#toasts {
  position: fixed;
  top: 74px; right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
  max-width: 330px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(8, 24, 44, .96);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--green);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font-size: 10px;
  line-height: 1.5;
  color: #d9e6f4;
  animation: toastIn .25s ease-out;
  transition: opacity .3s, transform .3s;
}
.toast.warn { border-left-color: var(--gold-2); }
.toast.bad { border-left-color: var(--red); }
.toast.good { border-left-color: var(--green); }
.toast.info { border-left-color: var(--cyan); }
.toast .t-ico { font-size: 13px; }
.toast.out { opacity: 0; transform: translateX(16px); }

/* ---------------- 动画 ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}
@keyframes slowSpin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes shine { 0%, 62% { transform: translateX(-110%); } 85%, 100% { transform: translateX(110%); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes resultIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes tipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes scan { 0% { top: -70px; } 100% { top: 100%; } }
@keyframes ringPulse { 0% { transform: scale(.7); opacity: .5; } 70%, 100% { transform: scale(1.25); opacity: 0; } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1260px) {
  .sidebar { width: 276px; flex-basis: 276px; }
  .base-card { width: 370px; }
  .res-chip { min-width: 92px; }
}
@media (max-width: 1080px) {
  .brand-text p { display: none; }
  .res-name { display: none; }
  .res-chip { min-width: 70px; padding: 5px 8px 5px 5px; }
  .res-icon { width: 24px; height: 24px; font-size: 13px; }
  .res-val { font-size: 12px; }
  .res-rate { display: none; }
  .bt-name { font-size: 10px; }
  .modal { width: 96vw; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .base-card { max-width: 70%; }
  .brand { gap: 7px; }
  .brand-text h1 { font-size: 16px; letter-spacing: 1px; }
  .weather { display: none; }
  .modal { max-height: 90vh; }
  .building-grid { grid-template-columns: 1fr; }
  .battle-team { width: 30%; }
  .battle-log { width: 68vw; }
  .nav-btn { width: 74px; }
  .battle-cta { width: 96px; }
}
@media (max-width: 640px) {
  #app { grid-template-rows: 58px 1fr 70px; }
  .topbar { gap: 8px; padding: 0 8px; }
  .brand-text { display: none; }
  .brand-mark { width: 34px; height: 34px; font-size: 19px; }
  .resbar { gap: 4px; }
  .res-chip { min-width: 62px; gap: 4px; }
  .res-icon { width: 21px; height: 21px; font-size: 12px; }
  .res-val { font-size: 11px; }
  .top-actions .icon-btn { width: 31px; height: 31px; font-size: 14px; }
  .base-card { width: 94%; max-width: none; padding: 7px 10px 8px; }
  .base-title b { font-size: 13px; }
  .base-sub { font-size: 8px; }
  .bottom-nav { gap: 2px; padding: 0 5px; }
  .nav-btn { width: 58px; height: 52px; font-size: 9px; }
  .nav-ico { font-size: 17px; }
  .battle-cta { width: 68px; margin-left: 2px; }
  .modal-header { padding: 12px 14px 10px; }
  .modal-body { padding: 12px 14px 18px; }
  .modal-title h2 { font-size: 14px; }
  .modal-title p { display: none; }
  .modal-ico { width: 32px; height: 32px; font-size: 16px; }
  .tech-grid, .world-grid, .hero-grid, .equip-grid { grid-template-columns: 1fr; }
  .world-map { height: 300px; }
  .map-pin { width: 36px; height: 36px; font-size: 14px; }
  .map-base.player .map-pin { width: 44px; height: 44px; font-size: 17px; }
  .map-label { font-size: 8px; }
  .battle-top { padding: 10px 8px; gap: 6px; }
  .battle-team { width: 31%; }
  .bt-name { font-size: 9px; }
  .battle-round { padding: 4px 8px; }
  .battle-log { width: 88vw; left: 10px; bottom: 10px; }
  .battle-quit { bottom: 10px; right: 10px; }
  .result-card { padding: 18px; }
  .result-card h2 { font-size: 19px; }
}
@media (max-width: 460px) {
  .topbar { gap: 6px; padding: 0 6px; }
  #btnAudio { display: none; }
  .resbar { gap: 3px; }
  .res-chip { min-width: 52px; padding: 4px 6px 4px 4px; gap: 3px; }
  .res-icon { width: 20px; height: 20px; font-size: 11px; }
  .res-val { font-size: 10px; }
  .top-actions .icon-btn { width: 30px; height: 30px; }
  .bottom-nav { gap: 1px; padding: 0 2px; }
  .nav-btn { width: 46px; }
  .battle-cta { width: 56px; }
}

/* ---------------- 账号入口 / 登录注册 ---------------- */
.account-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px 0 5px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  cursor: pointer;
  transition: .2s;
}
.account-chip:hover { background: rgba(150, 220, 255, .09); border-color: var(--line-strong); }
.acc-avatar {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #06182b;
  background: linear-gradient(160deg, #a5ecff, #55b8e8);
  box-shadow: 0 0 12px rgba(115, 205, 255, .25);
}
.acc-name {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background:
    radial-gradient(900px 620px at 82% -10%, rgba(255, 200, 97, .09), transparent 62%),
    radial-gradient(800px 560px at -10% 108%, rgba(58, 140, 218, .18), transparent 65%),
    #060f1e;
}
.auth-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(150, 220, 255, .035) 0 1px, transparent 1px 3px);
  opacity: .5;
}
.auth-card {
  position: relative;
  width: min(432px, 100%);
  padding: 24px 26px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 40, 64, .97), rgba(7, 18, 34, .99));
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), 0 0 60px rgba(58, 140, 218, .12), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: modalIn .3s cubic-bezier(.2, .9, .3, 1.1);
  transition: opacity .3s, transform .3s;
}
.auth-card::after {
  content: "";
  position: absolute;
  left: 26px; right: 26px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 200, 97, .55), transparent);
}
.auth-screen.leaving .auth-card { opacity: .5; transform: scale(.98); pointer-events: none; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-mark {
  width: 50px; height: 50px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 26px;
  color: var(--gold);
  background: radial-gradient(circle at 35% 30%, #2b4a63, #0a1826);
  border-radius: 15px;
  border: 1px solid rgba(255, 200, 97, .42);
  box-shadow: 0 0 22px rgba(255, 200, 97, .2), inset 0 0 14px rgba(255, 200, 97, .08);
  animation: slowSpin 18s linear infinite;
}
.auth-brand h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 3px;
  line-height: 1.2;
  color: #f3fff8;
  text-shadow: 0 0 22px rgba(141, 255, 163, .25);
}
.auth-brand p {
  margin: 3px 0 0;
  font-size: 8px;
  letter-spacing: 1.8px;
  color: var(--muted-2);
}
.auth-badge {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 7px;
  border: 1px solid rgba(141, 255, 163, .25);
  background: rgba(141, 255, 163, .07);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--green);
  white-space: nowrap;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 20px 0 16px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .07);
}
.auth-tab {
  padding: 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: .18s;
}
.auth-tab:hover { color: #e2f1ff; }
.auth-tab.active {
  background: linear-gradient(160deg, rgba(255, 217, 139, .95), rgba(255, 177, 92, .88));
  color: #1d1205;
  box-shadow: 0 4px 14px rgba(255, 170, 80, .22);
}
.auth-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeUp .22s ease-out;
}
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field > span { font-size: 9.5px; letter-spacing: 1px; color: var(--muted); }
.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 11px;
  border-radius: 11px;
  background: rgba(3, 12, 24, .65);
  border: 1px solid rgba(255, 255, 255, .09);
  transition: border-color .18s, box-shadow .18s;
}
.auth-input-wrap:focus-within {
  border-color: rgba(141, 255, 163, .5);
  box-shadow: 0 0 0 3px rgba(141, 255, 163, .08), inset 0 0 12px rgba(141, 255, 163, .05);
}
.auth-input-wrap.bad {
  border-color: rgba(255, 125, 104, .55);
  box-shadow: 0 0 0 3px rgba(255, 125, 104, .08);
}
.auth-input-wrap > i { flex: 0 0 auto; font-style: normal; font-size: 13px; opacity: .75; }
.auth-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
}
.auth-input-wrap input::placeholder { color: rgba(140, 168, 160, .45); }
.auth-eye {
  flex: 0 0 auto;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 13px;
  cursor: pointer;
}
.auth-eye:hover { color: var(--gold); }
.auth-hint { font-size: 8.5px; font-style: normal; line-height: 1.5; color: var(--muted-2); }
.auth-hint.server-warn {
  display: block;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 94, .45);
  background: rgba(120, 24, 18, .35);
  color: #ffc9c2;
}
.auth-hint b { color: var(--gold); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.auth-hint button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 8.5px;
  text-decoration: underline;
  cursor: pointer;
}
.auth-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.auth-seg button {
  padding: 9px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: .18s;
}
.auth-seg button:hover { color: #e5f3ff; border-color: var(--line-strong); }
.auth-seg button.active {
  border-color: rgba(255, 200, 97, .5);
  background: rgba(255, 200, 97, .11);
  color: var(--gold);
  box-shadow: inset 0 0 18px rgba(255, 200, 97, .06);
}
.auth-code-row { display: flex; gap: 7px; }
.auth-code-row .auth-input-wrap { flex: 1 1 auto; }
.auth-code-btn { flex: 0 0 auto; min-width: 104px; padding: 0 12px; font-size: 10.5px; }
.auth-code-btn.cooldown, .auth-code-btn:disabled { opacity: .55; cursor: not-allowed; }
.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.auth-agree input { flex: 0 0 auto; width: 13px; height: 13px; margin: 2px 0 0; accent-color: #5fc4e8; }
.auth-error {
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 125, 104, .3);
  background: rgba(255, 125, 104, .08);
  font-size: 10px;
  line-height: 1.5;
  color: #ffb1a5;
  animation: authShake .24s ease-out;
}
.auth-submit { width: 100%; margin-top: 2px; padding: 12px; font-size: 13px; letter-spacing: 1.5px; }
.auth-submit:disabled { opacity: .6; cursor: progress; }
.auth-switch { margin: 2px 0 0; text-align: center; font-size: 9.5px; color: var(--muted-2); }
.auth-switch button {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
}
.auth-switch button:hover { text-decoration: underline; }
.auth-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 8.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 13px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid rgba(255, 255, 255, .08);
}
.account-avatar {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 13px;
  font-size: 19px;
  font-weight: 800;
  color: #06182b;
  background: linear-gradient(160deg, #a5ecff, #55b8e8);
  box-shadow: 0 0 18px rgba(115, 205, 255, .22);
}
.account-main { flex: 1 1 auto; min-width: 0; line-height: 1.4; }
.account-main b { display: block; font-size: 13px; letter-spacing: .5px; color: #e5f3ff; }
.account-main p { margin: 2px 0 0; font-size: 9px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card .btn { flex: 0 0 auto; }

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (max-width: 640px) {
  .acc-name { display: none; }
  .account-chip { padding: 0 4px; }
}
@media (max-width: 460px) {
  .auth-screen { align-items: flex-start; padding: 12px 10px; }
  .auth-card { padding: 18px 16px 14px; border-radius: 18px; }
  .auth-brand h1 { font-size: 18px; letter-spacing: 2px; }
  .auth-mark { width: 42px; height: 42px; font-size: 22px; border-radius: 12px; }
  .auth-badge { display: none; }
  .auth-tabs { margin: 16px 0 13px; }
  .auth-code-btn { min-width: 92px; padding: 0 8px; font-size: 10px; }
  .account-card { padding: 10px; gap: 9px; }
  .account-avatar { width: 36px; height: 36px; font-size: 16px; }
}


/* ================= 核冬生存：炉温 / 部队 / 资源点 / 巨兽 ================= */
.heat-row { margin-top: 4px; }
.heat-row .hp-label { color: var(--gold-2); }
.heat-fill { background: linear-gradient(90deg, #ff7a45, #ffd166); box-shadow: 0 0 12px rgba(255, 122, 69, .45); }
.heat-fill.low { background: linear-gradient(90deg, #ff5f56, #ff9d5c); }
.heat-fill.danger { animation: heatPulse 1.1s ease-in-out infinite; }
@keyframes heatPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.heat-btn {
  flex: 0 0 auto; padding: 2px 7px; font-size: 9px; font-family: inherit; cursor: pointer;
  color: var(--gold); background: rgba(255, 200, 97, .1); border: 1px solid rgba(255, 200, 97, .35);
  border-radius: 6px; transition: background .15s ease;
}
.heat-btn:hover { background: rgba(255, 200, 97, .2); }

.timer-help {
  flex: 0 0 auto; margin-left: 8px; padding: 2px 7px; font-size: 8px; font-family: inherit;
  color: #6dffb0; background: rgba(109, 255, 176, .1); border: 1px solid rgba(109, 255, 176, .35);
  border-radius: 5px; cursor: pointer; white-space: nowrap;
}
.timer-help:hover { background: rgba(109, 255, 176, .2); }

.troop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.troop-card {
  padding: 11px; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel-2), var(--panel)); border-top: 2px solid var(--c, var(--gold));
}
.troop-top { display: flex; align-items: center; gap: 8px; }
.troop-ico { font-size: 20px; flex: 0 0 auto; }
.troop-name { flex: 1; min-width: 0; }
.troop-name b { display: block; font-size: 12px; color: var(--c, var(--text)); }
.troop-name span { display: block; margin-top: 2px; font-size: 8px; color: var(--muted-2); line-height: 1.4; }
.troop-count { font-size: 15px; color: var(--gold); font-variant-numeric: tabular-nums; }
.troop-count i { font-style: normal; font-size: 9px; color: var(--muted-2); }
.troop-card .cost-row { margin: 8px 0 2px; }
.troop-card .actions { margin-top: 6px; }
.troop-card .actions .btn { width: 100%; }

.node-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.node-card {
  display: flex; align-items: center; gap: 9px; padding: 9px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2);
  border-left: 3px solid var(--c, var(--gold));
}
.node-card.depleted { opacity: .5; filter: grayscale(.4); }
.node-ico { font-size: 22px; flex: 0 0 auto; }
.node-main { flex: 1; min-width: 0; }
.node-main b { display: block; font-size: 11px; }
.node-main span { display: block; margin-top: 2px; font-size: 9px; color: var(--c, var(--gold)); }
.node-main i { display: block; margin-top: 2px; font-size: 8px; font-style: normal; color: var(--muted-2); }
.node-card .btn { flex: 0 0 auto; }

.beast-card {
  display: flex; gap: 13px; align-items: center; padding: 13px; margin-bottom: 14px;
  border-radius: 14px; border: 1px solid rgba(183, 139, 255, .35);
  background: radial-gradient(circle at 12% 50%, rgba(183, 139, 255, .18), transparent 45%), var(--panel-2);
}
.beast-art {
  flex: 0 0 auto; width: 66px; height: 66px; border-radius: 14px; display: grid; place-items: center;
  font-size: 30px; color: #d9b8ff; background: rgba(183, 139, 255, .14);
  border: 1px solid rgba(183, 139, 255, .45); text-shadow: 0 0 18px rgba(183, 139, 255, .8);
  position: relative;
}
.beast-art span {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font-size: 8px; letter-spacing: 2px; color: #efdcff;
}
.beast-main { flex: 1; min-width: 0; }
.beast-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.beast-head b { font-size: 14px; color: #d9b8ff; }
.beast-head span { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.beast-main p { margin: 4px 0 7px; font-size: 9px; color: var(--muted-2); line-height: 1.5; }
.beast-track { height: 9px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; border: 1px solid var(--line); }
.beast-track .mini-fill { height: 100%; background: linear-gradient(90deg, #b78bff, #ff6b9d); }
.beast-marks { display: flex; gap: 12px; margin-top: 5px; font-size: 8px; color: var(--muted-2); }
.beast-marks .done { color: #6dffb0; }
.beast-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; align-items: stretch; }
.beast-actions .btn { white-space: nowrap; }

/* ---- 联盟：捐献 / 科技 / 集结排行 ---- */
.alliance-card {
  padding: 13px; margin-bottom: 14px; border-radius: 14px;
  border: 1px solid rgba(109, 255, 176, .28);
  background: radial-gradient(circle at 8% 0%, rgba(109, 255, 176, .1), transparent 46%), var(--panel-2);
}
.alliance-head { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.alliance-id b { display: block; font-size: 13px; color: #a9ffcf; }
.alliance-id span { display: block; margin-top: 3px; font-size: 9px; color: var(--muted-2); }
.alliance-id span b { display: inline; font-size: 11px; color: var(--gold); }
.ally-bonus { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- 真实玩家联盟：创建/加入 与 成员帮助 ---- */
.ally-entry {
  padding: 13px; margin-bottom: 14px; border-radius: 14px;
  border: 1px solid rgba(109, 255, 176, .28);
  background: radial-gradient(circle at 8% 0%, rgba(109, 255, 176, .1), transparent 46%), var(--panel-2);
}
.ally-entry-head b { display: block; font-size: 13px; color: #a9ffcf; }
.ally-entry-head span { display: block; margin-top: 4px; font-size: 9px; line-height: 1.6; color: var(--muted-2); }
.ally-entry-row { margin-top: 10px; }
.ally-field { display: flex; align-items: center; gap: 8px; }
.ally-field label { flex: 0 0 52px; font-size: 9px; color: var(--muted); }
.ally-input {
  flex: 1; min-width: 0; padding: 7px 9px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .28);
  color: var(--text); font-size: 11px; outline: none;
}
.ally-input:focus { border-color: rgba(109, 255, 176, .5); box-shadow: 0 0 0 2px rgba(109, 255, 176, .12); }
.ally-input::placeholder { color: var(--muted-2); }
.ally-entry-tip { margin: 10px 0 0; font-size: 8px; line-height: 1.6; color: var(--muted-2); }
.ally-code {
  display: inline-block; padding: 1px 6px; border-radius: 5px; cursor: pointer;
  color: var(--gold); background: rgba(255, 200, 97, .1); border: 1px solid rgba(255, 200, 97, .25);
  font-size: 10px; letter-spacing: 1px;
}
.ally-code:hover { background: rgba(255, 200, 97, .2); }
.ally-members { margin-top: 11px; padding: 10px 11px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.ally-members-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ally-members-head b { font-size: 11px; color: #d5e4f3; }
.ally-members-head span { font-size: 8px; color: var(--muted-2); }
.ally-member-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ally-member {
  display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 9px;
}
.ally-member.me { border-color: rgba(255, 200, 97, .35); background: rgba(255, 200, 97, .07); }
.ally-member b { font-weight: 500; color: var(--text); }
.ally-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.ally-dot.on { background: #6dffb0; box-shadow: 0 0 5px rgba(109, 255, 176, .8); }
.ally-role { font-style: normal; font-size: 8px; color: var(--gold); }
.ally-members-act { display: flex; gap: 7px; justify-content: flex-end; margin-top: 9px; }
.ally-help { margin-top: 10px; padding: 10px 11px; border-radius: 11px; border: 1px solid rgba(109, 255, 176, .22); background: rgba(109, 255, 176, .05); }
.ally-help-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.ally-help-head b { font-size: 11px; color: #a9ffcf; }
.ally-help-head span { font-size: 8px; color: var(--muted-2); }
.ally-help-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 9px; border-top: 1px solid rgba(255, 255, 255, .05); }
.ally-help-row:first-of-type { border-top: none; }
.ally-help-row.me { opacity: .55; }
.ally-help-name { flex: 0 0 72px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #d5e4f3; }
.ally-help-label { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted-2); }
.ally-help-remain { flex: 0 0 auto; color: #ffc861; font-variant-numeric: tabular-nums; }
.ally-help-count { flex: 0 0 auto; font-size: 8px; color: var(--muted-2); }

.donate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 11px; }
.donate-item {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
}
.donate-item.dim { opacity: .5; filter: grayscale(.35); }
.donate-ico { font-size: 18px; flex: 0 0 auto; }
.donate-main { flex: 1; min-width: 0; }
.donate-main b { display: block; font-size: 10px; }
.donate-main span { display: block; margin-top: 2px; font-size: 8px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donate-main i { display: block; margin-top: 2px; font-size: 8px; font-style: normal; color: #6dffb0; }
.donate-item .btn { flex: 0 0 auto; }
.rally-board { padding: 10px 11px; margin-bottom: 11px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.rally-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rally-head b { font-size: 11px; color: #d5e4f3; }
.rally-head span { font-size: 8px; color: var(--muted-2); }
.rally-row { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 9px; }
.rally-row.me { color: var(--gold); }
.rally-rank { flex: 0 0 18px; text-align: center; font-size: 9px; color: var(--muted); }
.rally-name { flex: 0 0 92px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rally-name i {
  display: inline-block; width: 14px; height: 14px; margin-right: 4px; text-align: center; line-height: 14px;
  font-style: normal; font-size: 8px; border-radius: 4px; color: var(--c, var(--gold));
  background: rgba(255, 255, 255, .06); vertical-align: -2px;
}
.rally-track { flex: 1; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.rally-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--c, #6dffb0), rgba(255, 255, 255, .6)); }
.rally-dmg { flex: 0 0 52px; text-align: right; font-variant-numeric: tabular-nums; color: var(--c, var(--gold)); }
.rally-empty { padding: 8px 0; font-size: 9px; color: var(--muted-2); text-align: center; }
.rally-idle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 7px; padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, .08); font-size: 8px; color: var(--muted-2);
}
.rally-idle i {
  font-style: normal; padding: 2px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, .05); color: var(--muted);
}

/* ---- 联盟贡献排行 / 联盟动态 ---- */
.acontrib { margin-top: 12px; padding: 10px 11px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.acontrib-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.acontrib-head b { font-size: 11px; color: #ffc861; }
.acontrib-head span { font-size: 8px; color: var(--muted-2); }
.acontrib-row { display: flex; align-items: center; gap: 7px; padding: 4px 0; font-size: 9px; border-top: 1px solid rgba(255, 255, 255, .05); }
.acontrib-row:first-of-type { border-top: none; }
.acontrib-row.me { color: var(--gold); }
.acontrib-rank { flex: 0 0 18px; text-align: center; font-size: 9px; color: var(--muted); }
.acontrib-name { flex: 0 0 78px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.acontrib-detail { flex: 0 0 auto; font-size: 8px; color: var(--muted-2); white-space: nowrap; }
.acontrib-track { flex: 1; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.acontrib-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ffc861, rgba(255, 255, 255, .65)); }
.acontrib-score { flex: 0 0 42px; text-align: right; font-variant-numeric: tabular-nums; color: #ffc861; }
.acontrib-empty { padding: 6px 0; font-size: 9px; color: var(--muted-2); text-align: center; }

.aevent { margin-top: 10px; padding: 10px 11px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.aevent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.aevent-head b { font-size: 11px; color: #a9d7ff; }
.aevent-head span { font-size: 8px; color: var(--muted-2); }
.aevent-list { max-height: 168px; overflow-y: auto; scrollbar-width: thin; }
.aevent-row { display: flex; gap: 8px; padding: 4px 0; font-size: 8.5px; line-height: 1.5; border-top: 1px solid rgba(255, 255, 255, .04); }
.aevent-row:first-child { border-top: none; }
.aevent-time { flex: 0 0 52px; color: var(--muted-2); }
.aevent-text { flex: 1; min-width: 0; color: #d5e4f3; }
.aevent-empty { padding: 6px 0; font-size: 9px; color: var(--muted-2); text-align: center; }
.allytech-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.allytech { padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.allytech.on { border-color: rgba(109, 255, 176, .35); background: rgba(109, 255, 176, .06); }
.allytech-top { display: flex; align-items: center; gap: 6px; }
.allytech-top .ico { font-size: 14px; }
.allytech-top b { flex: 1; min-width: 0; font-size: 11px; }
.allytech-top em { font-style: normal; font-size: 9px; color: #6dffb0; }
.allytech p { margin: 5px 0 7px; font-size: 8px; color: var(--muted-2); line-height: 1.5; }
.allytech-act { display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.ashop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 12px 0 8px; }
.ashop-head b { font-size: 11px; color: #a9ffcf; }
.ashop-head span { font-size: 8px; color: var(--muted-2); }
.ashop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ashop-item {
  display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
}
.ashop-item.dim { opacity: .5; filter: grayscale(.35); }
.ashop-ico { flex: 0 0 auto; font-size: 17px; }
.ashop-main { flex: 1; min-width: 0; }
.ashop-main b { display: block; font-size: 10px; }
.ashop-main span { display: block; margin-top: 2px; font-size: 8px; line-height: 1.45; color: var(--muted-2); }
.ashop-act { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ashop-act i { font-style: normal; font-size: 8px; color: var(--muted-2); }
.amission-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.amission-head b { font-size: 11px; color: #a9ffcf; }
.amission-head span { font-size: 8px; color: var(--muted-2); }
.amission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 11px; }
.amission {
  display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
}
.amission.done { border-color: rgba(109, 255, 176, .35); background: rgba(109, 255, 176, .06); }
.amission.claimed { opacity: .62; }
.am-ico { flex: 0 0 auto; font-size: 16px; }
.am-main { flex: 1; min-width: 0; }
.am-main b { display: block; font-size: 10px; }
.am-main span { display: block; margin-top: 2px; font-size: 8px; color: var(--muted-2); }
.am-main i { display: block; margin-top: 2px; font-size: 8px; font-style: normal; color: #6dffb0; }
.am-track { height: 5px; margin-top: 5px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.am-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #6dffb0, rgba(255, 255, 255, .55)); }
.am-act { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.am-act em { font-style: normal; font-size: 9px; color: var(--muted); }
.rein-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 11px;
  border-radius: 10px; border: 1px dashed var(--line); background: rgba(255, 255, 255, .02);
}
.rein-bar.on { border-style: solid; border-color: rgba(109, 255, 176, .4); background: rgba(109, 255, 176, .08); }
.rein-info { flex: 1; min-width: 0; font-size: 9px; color: var(--muted-2); }
.rein-bar.on .rein-info { color: #a9ffcf; }
.rein-calls { flex: 0 0 auto; font-size: 8px; color: var(--muted-2); }
@media (max-width: 900px) {
  .troop-grid { grid-template-columns: 1fr; }
  .node-grid { grid-template-columns: 1fr; }
  .donate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .beast-card { flex-wrap: wrap; }
  .beast-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .allytech-grid { grid-template-columns: 1fr; }
  .ashop-grid { grid-template-columns: 1fr; }
  .amission-grid { grid-template-columns: 1fr; }
}

/* ================= 开放世界地图 ================= */
.worldmap-open {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid rgba(95, 214, 255, .3);
  background:
    radial-gradient(420px 120px at 12% 0%, rgba(95, 214, 255, .16), transparent 70%),
    linear-gradient(160deg, #15314a, #0a1c2e);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: .18s;
}
.worldmap-open:hover {
  border-color: rgba(150, 230, 255, .55);
  box-shadow: 0 0 22px rgba(95, 214, 255, .16);
  transform: translateY(-1px);
}
.wm-open-ico {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 21px;
  border-radius: 11px;
  background: rgba(95, 214, 255, .12);
  border: 1px solid rgba(95, 214, 255, .35);
}
.worldmap-open > span:nth-child(2) { flex: 1 1 auto; min-width: 0; text-align: left; }
.worldmap-open b { display: block; font-size: 13px; letter-spacing: .5px; }
.worldmap-open i { display: block; margin-top: 3px; font-size: 9px; font-style: normal; color: var(--muted-2); }
.worldmap-open em { flex: 0 0 auto; font-style: normal; font-size: 10px; color: var(--cyan); }

.map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.map-node .map-pin {
  font-size: 12px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(8, 20, 34, .82);
  border: 1px solid var(--c, var(--cyan));
  box-shadow: 0 0 10px rgba(0, 0, 0, .45);
}
.map-node.depleted { opacity: .45; filter: grayscale(.5); }
.map-node:hover { transform: translate(-50%, -50%) scale(1.15); }

.worldmap-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #0a1522;
  overflow: hidden;
  animation: fadeUp .2s ease-out;
}
.worldmap-overlay.hidden { display: none; }
#worldMapCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#worldMapCanvas:active { cursor: grabbing; }

.wm-top {
  position: absolute;
  left: 16px; right: 16px; top: 14px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.wm-heading {
  padding: 9px 14px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(10, 26, 42, .92), rgba(8, 20, 34, .72));
  border: 1px solid rgba(150, 220, 255, .2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.wm-title { font-size: 15px; font-weight: 800; letter-spacing: 2px; color: #eaf6ff; }
.wm-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 9px;
  color: var(--muted);
}
.wm-sub #wmRegion { color: var(--cyan); }
.wm-sub em { font-style: normal; color: var(--muted-2); }
.wm-sub #wmStats { font-variant-numeric: tabular-nums; }
.wm-weather {
  padding: 1px 7px;
  border-radius: 8px;
  border: 1px solid rgba(150, 220, 255, .2);
  background: rgba(12, 32, 52, .7);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: .25s;
}
.wm-weather.storm {
  border-color: rgba(180, 225, 255, .55);
  background: rgba(140, 200, 240, .16);
  color: #eaf6ff;
  box-shadow: 0 0 12px rgba(150, 210, 250, .28);
  animation: wmStormBlink 1.6s ease-in-out infinite;
}
@keyframes wmStormBlink {
  0%, 100% { opacity: .78; }
  50% { opacity: 1; }
}

.wm-tools { display: flex; gap: 7px; pointer-events: auto; }
.wm-tools button {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(150, 220, 255, .28);
  background: rgba(8, 22, 38, .9);
  color: var(--cyan);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: .15s;
}
.wm-tools button:hover { background: rgba(95, 214, 255, .2); color: #eaf8ff; }
.wm-tools #wmClose { color: var(--red); border-color: rgba(255, 125, 104, .35); }
.wm-tools #wmClose:hover { background: rgba(255, 125, 104, .18); }

.wm-legend {
  position: absolute;
  left: 16px; bottom: 16px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(8, 20, 34, .84);
  border: 1px solid var(--line);
  font-size: 9px;
  color: var(--muted);
}
.wm-legend span { display: flex; align-items: center; gap: 5px; }
.wm-legend i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c, var(--cyan));
  box-shadow: 0 0 8px var(--c, var(--cyan));
}
.wm-hint {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  z-index: 5;
  padding: 6px 12px;
  border-radius: 9px;
  background: rgba(8, 20, 34, .7);
  border: 1px solid rgba(150, 220, 255, .12);
  font-size: 9px;
  color: var(--muted-2);
  pointer-events: none;
}

.wm-card {
  position: absolute;
  right: 16px; bottom: 16px;
  z-index: 6;
  width: min(330px, calc(100vw - 32px));
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 36, 56, .97), rgba(7, 18, 32, .99));
  border: 1px solid rgba(150, 220, 255, .3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  animation: fadeUp .18s ease-out;
}
.wm-card.hidden { display: none; }
.wm-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(150, 220, 255, .12);
}
.wm-badge {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 19px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--c, var(--cyan));
  color: var(--c, var(--cyan));
}
.wm-card-title { flex: 1 1 auto; min-width: 0; }
.wm-card-title b { display: block; font-size: 13px; color: #edf7ff; letter-spacing: .5px; }
.wm-card-title i { display: block; margin-top: 3px; font-size: 9px; font-style: normal; color: var(--muted-2); }
.wm-x {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
}
.wm-x:hover { color: var(--red); border-color: rgba(255, 125, 104, .4); }
.wm-card-body { padding: 10px 12px 12px; }
.wm-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px dashed rgba(150, 220, 255, .08);
}
.wm-row b { color: #e6f3ff; font-variant-numeric: tabular-nums; }
.wm-note {
  margin: 9px 0 11px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted-2);
}
.wm-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 200, 97, .5);
  background: linear-gradient(160deg, rgba(255, 214, 139, .95), rgba(255, 177, 92, .9));
  color: #1d1205;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: .15s;
}
.wm-btn:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 6px 20px rgba(255, 170, 80, .25); }
.wm-btn.off, .wm-btn:disabled {
  filter: grayscale(.6);
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ================= 任务与签到 ================= */
.quest-sec {
  padding: 11px 12px 12px;
  margin-bottom: 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
}
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.sec-head h3 { margin: 0; font-size: 13px; letter-spacing: .5px; color: #e5f3ff; }
.sec-head span { font-size: 8px; color: var(--muted-2); }

.sign-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 9px; }
.sign-cell {
  position: relative;
  padding: 8px 6px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(3, 12, 24, .45);
}
.sign-cell.done { border-color: rgba(109, 255, 176, .35); background: rgba(109, 255, 176, .06); opacity: .72; }
.sign-cell.cur {
  border-color: rgba(255, 200, 97, .55);
  background: rgba(255, 200, 97, .09);
  box-shadow: 0 0 14px rgba(255, 200, 97, .18) inset, 0 0 12px rgba(255, 200, 97, .12);
}
.sign-day { font-size: 8px; color: var(--muted-2); }
.sign-ico { margin: 4px 0 3px; font-size: 17px; }
.sign-rew { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 5px; font-size: 8px; color: #bcd3e6; }
.sign-rew i { font-style: normal; color: var(--gold); }
.sign-flag { margin-top: 4px; font-size: 7px; letter-spacing: 1px; color: var(--muted-2); }
.sign-cell.done .sign-flag { color: #6dffb0; }
.sign-cell.cur .sign-flag { color: var(--gold); }
.sign-btn { width: 100%; padding: 9px; font-size: 10px; letter-spacing: 1px; }
.sign-btn.up { border-color: rgba(255, 200, 97, .55); background: rgba(255, 200, 97, .14); color: var(--gold); }

.quest-row, .ach-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  margin-bottom: 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .022);
}
.ach-row { border-color: rgba(183, 139, 255, .18); }
.quest-row.claimed, .ach-row.claimed { opacity: .55; }
.q-ico {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  font-size: 15px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .07);
}
.q-main { flex: 1 1 auto; min-width: 0; }
.q-name { font-size: 11px; color: #e4f2ff; }
.q-desc { margin-left: 6px; font-size: 8px; color: var(--muted-2); }
.quest-bar {
  height: 5px;
  margin: 5px 0 4px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, .38);
}
.quest-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #3fa8d6, #9fe0ff); transition: width .3s; }
.ach-row .quest-bar i { background: linear-gradient(90deg, #8b6bd8, #d0b3ff); }
.quest-row.claimed .quest-bar i,
.ach-row.claimed .quest-bar i { background: #4f9e6a; }
.q-meta { font-size: 8px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.quest-btn { flex: 0 0 auto; padding: 6px 10px; font-size: 9px; white-space: nowrap; }
.quest-btn.up { border-color: rgba(109, 255, 176, .5); background: rgba(109, 255, 176, .12); color: #8dffbd; }
.quest-bonus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  margin-top: 2px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 200, 97, .35);
  background: rgba(255, 200, 97, .06);
  font-size: 9px;
  color: #ffe0a8;
}

@media (max-width: 640px) {
  .sign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-desc { display: none; }
  .quest-bonus { flex-wrap: wrap; }
  .quest-bonus .quest-btn { width: 100%; }
}


/* ---- 幸存者营地 ---- */
.sv-actions { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; flex-wrap: wrap; }
.sv-actions .btn { flex: 0 0 auto; }
.sv-jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.sv-job {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18);
}
.sv-job.locked { opacity: .45; }
.sv-job-icon { font-size: 16px; line-height: 1; }
.sv-job-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sv-job-main b { font-size: 10px; }
.sv-job-main span { font-size: 8px; color: var(--muted-2); }
.sv-job-bar { display: block; height: 3px; margin-top: 2px; border-radius: 2px; background: rgba(255, 255, 255, .07); overflow: hidden; font-style: normal; }
.sv-job-bar u { display: block; height: 100%; background: linear-gradient(90deg, rgba(158, 226, 122, .45), rgba(158, 226, 122, .9)); }
.sv-job-num { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.sv-job-num b { font-size: 10px; color: #9ee27a; font-variant-numeric: tabular-nums; }
.sv-job-num span { font-size: 7.5px; color: var(--muted-2); white-space: nowrap; }
.sv-list { display: flex; flex-direction: column; gap: 7px; }
.sv-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .16);
}
.sv-avatar {
  width: 30px; height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(255, 255, 255, .06); font-size: 16px;
}
.sv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sv-info b { font-size: 10.5px; }
.sv-info span { font-size: 8.5px; color: var(--muted-2); }
.sv-lv { margin-left: 5px; font-style: normal; font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 5px; color: #ffd98b; background: rgba(255, 200, 97, .1); border: 1px solid rgba(255, 200, 97, .25); }
.sv-add { font-style: normal; color: #9ee27a; }
.sv-lvup { display: flex; align-items: center; gap: 5px; margin-top: 2px; flex-wrap: wrap; }
.sv-up { font-size: 8px; line-height: 1; padding: 4px 7px; border-radius: 6px; cursor: pointer; color: #ffd28a; background: rgba(255, 200, 97, .1); border: 1px solid rgba(255, 200, 97, .35); }
.sv-up:hover:not(:disabled) { background: rgba(255, 200, 97, .2); }
.sv-up:disabled { opacity: .4; cursor: not-allowed; }
.sv-cost .cost-chip { font-size: 7px; padding: 2px 4px; }
.sv-posts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.sv-post {
  width: 28px; height: 26px; border-radius: 7px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04); color: inherit; cursor: pointer; font-size: 13px; line-height: 1;
}
.sv-post:hover:not(:disabled) { border-color: rgba(255, 200, 97, .4); }
.sv-post.on { background: rgba(255, 200, 97, .18); border-color: rgba(255, 200, 97, .6); }
.sv-post.match { box-shadow: inset 0 0 0 1px rgba(158, 226, 122, .35); }
.sv-post:disabled { opacity: .32; cursor: not-allowed; }
.sv-empty { padding: 14px 0; text-align: center; font-size: 9px; color: var(--muted-2); }
.sv-tip {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, .08);
  font-size: 9px; line-height: 1.6; color: var(--muted-2);
}
@media (max-width: 720px) {
  .sv-row { flex-wrap: wrap; }
  .sv-info { flex-basis: 60%; }
  .sv-posts { flex-basis: 100%; justify-content: flex-start; }
}

/* ---- 英雄远征 ---- */
.ex-stance {
  margin-top: 10px; padding: 12px; border-radius: 14px;
  border: 1px solid rgba(183, 139, 255, .2); background: rgba(183, 139, 255, .05);
}
.ex-stance-cur { margin-left: auto; font-size: 9px; font-weight: 700; color: #cdb4ff; }
.ex-stance-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 7px; margin-top: 9px;
}
.ex-stance-btn {
  display: flex; align-items: center; gap: 8px; text-align: left;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .18); color: inherit;
}
.ex-stance-btn:hover { border-color: rgba(183, 139, 255, .4); }
.ex-stance-btn.on {
  border-color: rgba(183, 139, 255, .6); background: rgba(183, 139, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(183, 139, 255, .2);
}
.ex-stance-ico {
  flex: 0 0 auto; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; border-radius: 8px; background: rgba(255, 255, 255, .06);
}
.ex-stance-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-stance-main b { font-size: 10.5px; }
.ex-stance-main i { font-size: 8px; font-style: normal; color: var(--muted-2); }

.ex-idle {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0 6px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 200, 97, .22);
  background: linear-gradient(160deg, rgba(255, 200, 97, .08), rgba(0, 0, 0, .2));
}
.ex-idle-head { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 190px; }
.ex-idle-ico { font-size: 20px; }
.ex-idle-head b { display: block; font-size: 11px; color: #ffe0a8; }
.ex-idle-head span { font-size: 8.5px; color: var(--muted-2); }
.ex-supply-max { font-size: 9px; font-weight: 700; color: #ffd98b; }
.ex-idle-reward { display: flex; gap: 5px; flex-wrap: wrap; }
.ex-res-chip {
  padding: 2px 7px; border-radius: 6px; font-size: 9px; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: #dbe7f2;
}
.ex-chapter { margin-top: 14px; }
.ex-stage {
  margin-top: 9px; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .18);
}
.ex-stage.open { border-color: rgba(255, 200, 97, .28); background: rgba(255, 200, 97, .045); }
.ex-stage.done { border-color: rgba(158, 226, 122, .22); }
.ex-stage.locked { opacity: .55; }
.ex-stage-head { display: flex; align-items: center; gap: 9px; }
.ex-stage-ico { font-size: 18px; line-height: 1; }
.ex-stage-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-stage-main b { font-size: 11.5px; }
.ex-stage-main span { font-size: 9px; color: var(--muted-2); }
.ex-flag {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 6px; font-size: 8.5px; font-weight: 700;
}
.ex-flag.done { color: #9ee27a; background: rgba(158, 226, 122, .12); border: 1px solid rgba(158, 226, 122, .3); }
.ex-flag.can { color: #ffd98b; background: rgba(255, 200, 97, .12); border: 1px solid rgba(255, 200, 97, .32); }
.ex-flag.lock { color: var(--muted-2); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.ex-stage-desc { margin: 7px 0 0; font-size: 9px; line-height: 1.6; color: var(--muted); }
.ex-affix {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px;
  padding: 6px 9px; border-radius: 9px;
  border: 1px solid rgba(255, 201, 77, .2); background: rgba(255, 201, 77, .05);
}
.ex-affix-name { flex: 0 0 auto; font-size: 9.5px; font-weight: 700; color: #ffd98b; }
.ex-affix-desc { flex: 1; min-width: 120px; font-size: 8.5px; color: var(--muted-2); }
.ex-affix-btn { flex: 0 0 auto; padding: 3px 8px !important; font-size: 8.5px !important; }
.ex-result-affix { font-size: 9.5px; color: #ffd98b; margin: 2px 0 6px; }
.ex-event {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px;
  padding: 6px 9px; border-radius: 9px;
  border: 1px solid rgba(183, 139, 255, .22); background: rgba(183, 139, 255, .06);
}
.ex-event.used { opacity: .62; border-color: var(--line); background: rgba(255, 255, 255, .03); }
.ex-event-name { flex: 0 0 auto; font-size: 9.5px; font-weight: 700; color: #cfb6ff; }
.ex-event-desc { flex: 1; min-width: 120px; font-size: 8.5px; color: var(--muted-2); }
.ex-event-power { flex: 0 0 auto; font-size: 8.5px; color: var(--muted); }
.ex-event-btn { flex: 0 0 auto; padding: 3px 8px !important; font-size: 8.5px !important; }
.ex-result-event { font-size: 9.5px; color: #cfb6ff; margin: 2px 0 6px; }
.ex-stage-reward { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.ex-reward-lbl { font-size: 8.5px; color: var(--muted-2); }
.ex-stage-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ex-stage-actions .btn { flex: 0 1 auto; }
.ex-tip {
  margin-top: 14px; padding-top: 9px; border-top: 1px dashed rgba(255, 255, 255, .08);
  font-size: 9px; line-height: 1.6; color: var(--muted-2);
}
.ex-first-badge {
  display: inline-block; margin: 0 auto 6px; padding: 3px 10px; border-radius: 7px;
  font-size: 10px; font-weight: 700; color: #9ee27a;
  background: rgba(158, 226, 122, .12); border: 1px solid rgba(158, 226, 122, .34);
}
.ex-shop {
  margin-top: 10px; padding: 12px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .18);
}
.ex-shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px; margin-top: 9px;
}
.ex-shop-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .02);
}
.ex-shop-item.soldout { opacity: .55; }
.ex-shop-ico {
  flex: 0 0 auto; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; border-radius: 9px; background: rgba(255, 255, 255, .05);
}
.ex-shop-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-shop-info b { font-size: 11px; color: #f2f6ff; }
.ex-shop-info > span { font-size: 8.5px; color: var(--muted-2); }
.ex-shop-meta { display: flex; gap: 8px; margin-top: 2px; font-size: 8.5px; color: var(--muted-2); }
.ex-medal-cost { color: #ffd98b; font-weight: 700; }
.ex-bounty {
  margin-top: 10px; padding: 12px; border-radius: 14px;
  border: 1px solid rgba(95, 214, 255, .2); background: rgba(95, 214, 255, .05);
}
.ex-bounty-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px; margin-top: 9px;
}
.ex-bounty-card {
  padding: 9px 10px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .18);
  display: flex; flex-direction: column; gap: 6px;
}
.ex-bounty-card.ready { border-color: rgba(95, 214, 255, .42); background: rgba(95, 214, 255, .08); }
.ex-bounty-card.claimed { opacity: .55; }
.ex-bounty-head { display: flex; align-items: flex-start; gap: 8px; }
.ex-bounty-ico {
  flex: 0 0 auto; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; border-radius: 8px; background: rgba(255, 255, 255, .05);
}
.ex-bounty-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-bounty-main b { font-size: 11px; color: #f2f6ff; }
.ex-bounty-main span { font-size: 8.5px; color: var(--muted-2); }
.ex-bounty-num { flex: 0 0 auto; font-size: 8.5px; font-weight: 700; color: #9be9ff; }
.ex-bounty-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.ex-bounty-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, rgba(95, 214, 255, .45), rgba(95, 214, 255, .95));
}
.ex-bounty-reward { display: flex; flex-wrap: wrap; gap: 4px; }
.ex-bounty-card .btn { width: 100%; }
.ex-arms {
  margin-top: 10px; padding: 12px; border-radius: 14px;
  border: 1px solid rgba(255, 200, 97, .22); background: rgba(255, 200, 97, .05);
}
.ex-arms-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px; margin-top: 9px;
}
.ex-arm-card {
  padding: 9px 10px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .18);
}
.ex-arm-card.maxed { border-color: rgba(255, 200, 97, .38); background: rgba(255, 200, 97, .07); }
.ex-arm-head { display: flex; align-items: flex-start; gap: 8px; }
.ex-arm-ico {
  flex: 0 0 auto; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; border-radius: 9px; background: rgba(255, 255, 255, .05);
}
.ex-arm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-arm-main b { font-size: 11px; color: #f2f6ff; }
.ex-arm-main span { font-size: 8.5px; color: var(--muted-2); }
.ex-arm-lv { flex: 0 0 auto; font-size: 8.5px; font-weight: 700; color: #ffd98b; }
.ex-arm-pips { display: flex; gap: 3px; margin: 7px 0 6px; }
.ex-arm-pips i {
  flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .09);
}
.ex-arm-pips i.on { background: linear-gradient(90deg, rgba(255, 200, 97, .55), rgba(255, 200, 97, .95)); }
.ex-arm-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ex-arm-actions .btn { flex: 0 0 auto; }
.ex-shop-item .btn { flex: 0 0 auto; }
.ex-medal-gain { font-size: 10px; font-weight: 700; color: #ffd98b; margin: 2px 0 6px; }
.section-title .ex-ch-stars {
  flex: 0 0 auto; margin-left: 6px; padding: 2px 8px; border-radius: 6px;
  font-size: 9.5px; font-weight: 700; color: #ffd98b;
  background: rgba(255, 200, 97, .1); border: 1px solid rgba(255, 200, 97, .3);
}
.ex-stars { flex: 0 0 auto; display: inline-flex; gap: 1px; font-size: 11px; line-height: 1; letter-spacing: 1px; }
.ex-star { color: rgba(255, 255, 255, .18); }
.ex-star.on { color: #ffd15c; text-shadow: 0 0 6px rgba(255, 209, 92, .45); }
.ex-chests { display: flex; flex-direction: column; gap: 8px; margin-top: 9px; }
.ex-chest {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px;
  border: 1px dashed var(--line); background: rgba(0, 0, 0, .16);
}
.ex-chest.ready { border-style: solid; border-color: rgba(255, 200, 97, .3); background: rgba(255, 200, 97, .05); }
.ex-chest.claimed { border-color: rgba(158, 226, 122, .24); opacity: .8; }
.ex-chest.locked { opacity: .55; }
.ex-chest-main { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 3px; }
.ex-chest-main b { font-size: 11px; color: #ffe0a8; }
.ex-chest-main > span { font-size: 8.5px; color: var(--muted-2); }
.ex-chest-reward { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.ex-chest .btn { flex: 0 0 auto; }
.ex-result-stars { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.ex-result-star-lbl, .ex-best { font-size: 9px; color: var(--muted-2); }
.ex-result-stars .ex-stars { font-size: 15px; letter-spacing: 2px; }
.ex-newbest {
  font-size: 9px; font-weight: 700; color: #9ee27a; padding: 2px 7px; border-radius: 6px;
  background: rgba(158, 226, 122, .12); border: 1px solid rgba(158, 226, 122, .32);
}
.ex-ach {
  margin-top: 14px; padding: 12px; border-radius: 14px;
  border: 1px solid rgba(183, 139, 255, .22);
  background: linear-gradient(160deg, rgba(183, 139, 255, .07), rgba(0, 0, 0, .2));
}
.ex-ach-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px; margin-top: 9px;
}
.ex-ach-card {
  display: flex; flex-direction: column; gap: 7px; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02);
}
.ex-ach-card.ready { border-color: rgba(255, 200, 97, .3); background: rgba(255, 200, 97, .05); }
.ex-ach-card.claimed { border-color: rgba(158, 226, 122, .24); }
.ex-ach-card.locked { opacity: .6; }
.ex-ach-head { display: flex; align-items: flex-start; gap: 9px; }
.ex-ach-ico {
  flex: 0 0 auto; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; border-radius: 10px;
  background: rgba(183, 139, 255, .12); border: 1px solid rgba(183, 139, 255, .25);
}
.ex-ach-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-ach-main b { font-size: 11px; color: #f2f6ff; }
.ex-ach-main span { font-size: 8.5px; line-height: 1.5; color: var(--muted-2); }
.ex-ach-title {
  flex: 0 0 auto; padding: 2px 7px; border-radius: 6px; white-space: nowrap;
  font-size: 8.5px; font-weight: 700; color: #d9b8ff;
  background: rgba(183, 139, 255, .12); border: 1px solid rgba(183, 139, 255, .3);
}
.ex-ach-prog { display: flex; align-items: center; gap: 8px; }
.ex-ach-bar {
  flex: 1; height: 6px; border-radius: 4px; overflow: hidden;
  background: rgba(255, 255, 255, .08);
}
.ex-ach-bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #b78bff, #ffd98b);
  transition: width .25s ease;
}
.ex-ach-num { flex: 0 0 auto; font-size: 9px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.ex-ach-reward { display: flex; gap: 5px; flex-wrap: wrap; }
.ex-ach-actions { display: flex; gap: 8px; margin-top: auto; }
.ex-ach-actions .btn { flex: 1; }
.ex-elite {
  margin-top: 14px; padding: 12px; border-radius: 14px;
  border: 1px solid rgba(255, 157, 92, .25);
  background: linear-gradient(160deg, rgba(255, 157, 92, .08), rgba(0, 0, 0, .22));
}
.ex-elite-locked {
  margin-top: 8px; padding: 10px 12px; border-radius: 10px; font-size: 9.5px;
  color: var(--muted-2); background: rgba(255, 255, 255, .03); border: 1px dashed var(--line);
}
.ex-elite-card {
  display: flex; align-items: center; gap: 11px; margin-top: 9px; padding: 10px 12px;
  border-radius: 12px; background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 157, 92, .2);
}
.ex-elite-ico {
  flex: 0 0 auto; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; border-radius: 12px;
  background: rgba(255, 157, 92, .12); border: 1px solid rgba(255, 157, 92, .3);
}
.ex-elite-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ex-elite-main b { font-size: 12px; color: #ffd9b8; }
.ex-elite-lv {
  font-size: 9px; font-weight: 600; color: #ff9d5c; padding: 1px 6px;
  border-radius: 5px; background: rgba(255, 157, 92, .14);
}
.ex-elite-main > span { font-size: 8.5px; line-height: 1.5; color: var(--muted-2); }
.ex-elite-meta { font-size: 9px; color: #dbe5f0; }
.ex-elite-meta b { color: #ffc861; }
.ex-elite-reward { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.ex-elite-card .btn { flex: 0 0 auto; align-self: center; }
.ex-elite-result { margin: 4px 0 6px; font-size: 9.5px; color: #ffd9b8; }
@media (max-width: 720px) {
  .ex-idle { flex-direction: column; align-items: stretch; }
  .ex-idle .btn { width: 100%; }
  .ex-stage-head { flex-wrap: wrap; }
  .ex-chest { flex-direction: column; align-items: stretch; }
  .ex-chest .btn { width: 100%; }
  .ex-shop-grid { grid-template-columns: 1fr; }
  .ex-ach-grid { grid-template-columns: 1fr; }
  .ex-elite-card { flex-direction: column; align-items: stretch; }
  .ex-elite-card .btn { width: 100%; }
}

/* ---- 联盟礼物池 ---- */
.agift {
  margin-top: 14px; padding: 11px 13px; border-radius: 12px;
  border: 1px solid rgba(183, 139, 255, .26);
  background: linear-gradient(160deg, rgba(183, 139, 255, .07), rgba(0, 0, 0, .18));
}
.agift-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.agift-head b { font-size: 11px; color: #d9c4ff; }
.agift-head span { font-size: 8.5px; color: var(--muted-2); }
.agift-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 9px; }
.agift-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 64px; padding: 6px 8px; border-radius: 10px;
  background: rgba(183, 139, 255, .1); border: 1px solid rgba(183, 139, 255, .28);
}
.agift-box .agift-ico { font-size: 16px; line-height: 1.1; }
.agift-box b { font-size: 15px; line-height: 1.2; color: #efe6ff; }
.agift-box span:last-child { font-size: 8px; color: var(--muted-2); }
.agift-progress { flex: 1; min-width: 150px; }
.agift-track {
  height: 6px; border-radius: 4px; overflow: hidden;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08);
}
.agift-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #8d6fd0, #c6a8ff);
  transition: width .3s ease;
}
.agift-meta { display: block; margin-top: 4px; font-size: 8.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.agift-meta b { color: #e9ddff; }
.agift-rewards { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.agift-reward {
  padding: 2px 7px; border-radius: 6px; font-size: 8.5px; cursor: help;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
}
.agift-reward.common { color: #aebcc9; border-color: rgba(255, 255, 255, .12); }
.agift-reward.uncommon { color: #9fb6ff; border-color: rgba(159, 182, 255, .3); background: rgba(159, 182, 255, .08); }
.agift-reward.rare { color: #ffc94d; border-color: rgba(255, 201, 77, .34); background: rgba(255, 201, 77, .08); }
@media (max-width: 720px) {
  .agift-main { gap: 8px; }
  .agift-progress { flex-basis: 100%; order: 3; }
  .agift-main .btn { flex-basis: 100%; }
}
