/* 霸世单职业传奇 — 竖屏复古传奇 H5
   参考图基调：暗红金复古传奇，金色描边 + 朱红底 + 光柱爆装 */

:root {
  --bg-0: #0e0302;
  --bg-1: #1a0603;
  --bg-2: #260a05;
  --panel: #2c0d07;
  --panel-2: #210805;
  --panel-3: #3a120a;
  --gold: #ffd36b;
  --gold-hi: #fff1bd;
  --gold-2: #f0b344;
  --gold-deep: #a96a1e;
  --gold-line: #7f4c1d;
  --gold-soft: rgba(255, 205, 110, .22);
  --red: #d72b1c;
  --red-deep: #7a0d09;
  --red-soft: rgba(210, 50, 26, .22);
  --text: #ffe9c2;
  --text-2: #e8c894;
  --muted: #c49a6a;
  --dim: #916a49;
  --green: #6fe07a;
  --blue: #63a8ff;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --serif: "STKaiti", "KaiTi", "Songti SC", "Noto Serif SC", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #070201; color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
}
button { font-family: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
b, em, i { font-style: normal; }
h2, h3, p { margin: 0; }
i.mp-icon { flex: 0 0 auto; }

#app {
  position: fixed; inset: 0; margin: 0 auto; max-width: 520px;
  overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 60% at 50% 0%, #3d1209 0%, #1a0603 46%, #0c0201 100%),
    #0b0201;
}
@media (min-width: 620px) {
  body { background: radial-gradient(80% 60% at 50% 0%, #2a0c06 0%, #060201 70%); }
  #app {
    max-width: 430px;
    border-left: 1px solid rgba(255, 205, 110, .16);
    border-right: 1px solid rgba(255, 205, 110, .16);
    box-shadow: 0 0 100px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .7);
  }
}

#gameCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  z-index: 0;
}

/* ================= 视图 ================= */
.view { display: none; position: absolute; inset: 0; }
.view.active { display: block; }
.view-home { pointer-events: none; z-index: 2; }

.screen {
  z-index: 3; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 20px);
  background:
    radial-gradient(90% 46% at 50% 0%, rgba(160, 44, 16, .32) 0%, rgba(60, 12, 6, .15) 46%, transparent 74%),
    repeating-linear-gradient(115deg, rgba(255, 190, 90, .022) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #260a06 0%, #180503 42%, #100302 100%);
  overscroll-behavior: contain;
}
.screen.active { animation: screenIn .22s ease-out; }
.screen::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 42%;
  pointer-events: none; background: radial-gradient(60% 100% at 50% 0%, rgba(255, 130, 40, .10), transparent 70%);
}
.screen-body { position: relative; z-index: 1; padding: 0 16px; }

@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes emberRise { 0% { transform: translateY(8px); opacity: 0; } 35% { opacity: .8; } 100% { transform: translateY(-26px); opacity: 0; } }
@keyframes pulseGold { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 190, 80, .28); } 50% { box-shadow: 0 0 16px 3px rgba(255, 190, 80, .38); } }

/* ================= 首页 HUD ================= */
.hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  padding: calc(6px + var(--safe-t)) 10px 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 4, 2, .96) 0%, rgba(18, 6, 3, .86) 62%, rgba(18, 6, 3, 0) 100%);
}
.hud button { pointer-events: auto; }

.hud-topbar { display: flex; align-items: center; min-height: 30px; }
.wallet { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wallet-row {
  display: flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 6px 0 7px;
  color: #ffe1a1; font-size: 12px; font-weight: 700;
  background: linear-gradient(180deg, rgba(66, 22, 12, .92), rgba(28, 8, 4, .92));
  border: 1px solid rgba(255, 196, 104, .38); border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .18), 0 2px 5px rgba(0, 0, 0, .45);
}
.wallet-row .mp-icon { width: 15px; height: 15px; color: #ffca4f; filter: drop-shadow(0 0 4px rgba(255, 180, 40, .55)); }
.wallet-row:nth-child(2) .mp-icon { color: #7fd4ff; filter: drop-shadow(0 0 4px rgba(90, 190, 255, .5)); }
.wallet-row span { letter-spacing: .02em; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-row em {
  display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(180deg, #ffeaa0, #e8a52f);
  color: #4c2603; font-size: 13px; font-weight: 900; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 2px rgba(0, 0, 0, .5);
}
.wallet-row:active { transform: scale(.96); }
.menu-btn {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: #ffcf74; border: 1px solid rgba(255, 200, 110, .45);
  background: radial-gradient(circle at 50% 32%, #5d2211, #230906 70%);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .2), 0 2px 6px rgba(0, 0, 0, .5);
}
.menu-btn .mp-icon { width: 18px; height: 18px; }
.menu-btn:active { transform: scale(.92); }

.hud-player { display: flex; align-items: flex-start; gap: 8px; margin-top: 5px; }
.avatar {
  position: relative; flex: 0 0 58px; width: 58px; height: 64px;
  display: grid; place-items: center;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 40%, #6e2611 0%, #380d07 54%, #170402 100%);
  border: 2px solid #b87a30;
  box-shadow: 0 0 0 2px #2a0a04, 0 0 12px rgba(255, 130, 40, .38), inset 0 0 16px rgba(255, 90, 20, .5);
}
.avatar::before {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  border: 1px solid rgba(255, 208, 120, .45); pointer-events: none;
}
.avatar-glow {
  position: absolute; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 60, .5), transparent 70%);
  filter: blur(3px); animation: pulseGold 3.4s infinite;
}
.avatar-glyph {
  position: relative; z-index: 1;
  font-family: var(--serif); font-size: 31px; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fff5cd, #ffd065 44%, #b96b14 78%, #7c3c06);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px #2a0902);
}
.avatar-lv {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  white-space: nowrap; padding: 1px 7px; border-radius: 8px;
  font-size: 8px; font-weight: 700; color: #ffe9bd;
  background: linear-gradient(180deg, #6f2a12, #2c0904);
  border: 1px solid rgba(255, 200, 110, .5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .55);
}
.avatar-lv b { font-size: 9px; color: #ffd36b; }

.player-info { flex: 1; min-width: 0; padding-top: 1px; }
.player-name { display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; }
.player-name > b { font-size: 13px; font-weight: 800; color: #ffe7b3; text-shadow: 0 1px 2px #000; letter-spacing: .02em; }
.title-chip {
  flex: 0 0 auto; font-size: 8px; line-height: 1.5; padding: 0 5px; border-radius: 3px;
  color: #ffd98b; border: 1px solid rgba(255, 195, 100, .45);
  background: linear-gradient(180deg, rgba(105, 45, 14, .9), rgba(46, 16, 5, .9));
}
.rb-chip {
  flex: 0 0 auto; font-size: 8px; line-height: 1.5; padding: 0 5px; border-radius: 3px;
  color: #ffc0a2; border: 1px solid rgba(255, 110, 60, .5);
  background: linear-gradient(180deg, rgba(105, 26, 10, .9), rgba(46, 8, 4, .9));
}
.player-power { display: flex; align-items: baseline; gap: 5px; margin: 2px 0 3px; }
.player-power span { font-size: 9px; color: #c19462; letter-spacing: .08em; }
.player-power b {
  font-size: 18px; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fff6d2, #ffd465 48%, #e28b23);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 1px #2a0902) drop-shadow(0 0 6px rgba(255, 160, 40, .3));
}
.vital {
  position: relative; height: 9px; margin-bottom: 3px; border-radius: 5px; overflow: hidden;
  background: #160402; border: 1px solid rgba(255, 185, 95, .28);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8);
}
.vital i { display: block; height: 100%; width: 100%; transition: width .25s linear; border-radius: 4px; }
.vital-hp i { background: linear-gradient(180deg, #ff7a5c, #d8261a 55%, #7e0707); box-shadow: inset 0 1px 0 rgba(255, 220, 200, .55), 0 0 6px rgba(255, 45, 20, .5); }
.vital-mp i { background: linear-gradient(180deg, #86c9ff, #2e7ee0 55%, #143f86); box-shadow: inset 0 1px 0 rgba(215, 240, 255, .5); }
.vital span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 7px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000;
  letter-spacing: .04em;
}

.mini-map {
  flex: 0 0 72px; width: 72px; height: 72px; margin-top: 1px;
  position: relative; display: flex; flex-direction: column; align-items: center;
  border-radius: 50%; padding: 2px;
  background: radial-gradient(circle at 50% 40%, #6b2c13, #2b0a05 72%);
  border: 1px solid rgba(255, 200, 110, .6);
  box-shadow: 0 0 0 2px rgba(36, 9, 4, .9), 0 0 14px rgba(255, 140, 40, .2);
}
.mini-map > b {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 8px; font-weight: 700; color: #ffe2a8;
  padding: 1px 6px; border-radius: 3px;
  background: linear-gradient(180deg, #6c2410, #2b0804);
  border: 1px solid rgba(255, 195, 100, .5);
}
.mm-circle {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(194, 152, 96, .35), transparent 40%),
    repeating-linear-gradient(0deg, rgba(255, 210, 140, .07) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, rgba(255, 210, 140, .07) 0 1px, transparent 1px 9px),
    radial-gradient(circle at 55% 55%, #4c2414, #240a05 78%);
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .7);
}
.mm-pin { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ff5a2a; box-shadow: 0 0 5px #ff6a2a; }
.mm-pin.p1 { left: 28%; top: 30%; }
.mm-pin.p2 { left: 62%; top: 24%; }
.mm-pin.p3 { left: 70%; top: 62%; }
.mm-pin.p4 { left: 40%; top: 70%; }
.mm-self {
  position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%;
  transform: translate(-50%, -50%); background: #ffe07a;
  border: 1px solid #fff5c4; box-shadow: 0 0 7px #ffcc4d;
}
.mini-map > em {
  position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 7px; color: #d6a873; letter-spacing: .02em;
}

.feature-row { display: flex; justify-content: space-between; gap: 2px; margin-top: 10px; padding: 0 2px; }
.feature-btn {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 0;
}
.f-ico {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #7c3518 0%, #4a170c 48%, #240803 100%);
  border: 1px solid rgba(255, 205, 120, .55);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .3), inset 0 -3px 6px rgba(0, 0, 0, .55), 0 0 0 2px rgba(34, 8, 3, .9), 0 3px 8px rgba(0, 0, 0, .5);
}
.f-ico::before {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  border: 1px solid rgba(255, 210, 130, .28);
}
.f-ico .mp-icon { width: 22px; height: 22px; color: #ffd06a; filter: drop-shadow(0 1px 0 #4a1c02); }
.feature-btn > span:last-of-type {
  font-size: 9px; font-weight: 700; color: #f0cf9b; letter-spacing: .02em;
  text-shadow: 0 1px 2px #000; white-space: nowrap;
}
.feature-btn:active .f-ico { transform: scale(.92); }
.feature-btn .dot { top: 1px; right: 18%; }

.dot {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ff8d6a, #e01d10 62%, #8c0604);
  border: 1px solid #ffb08d; box-shadow: 0 0 7px rgba(255, 50, 20, .8);
  pointer-events: none;
}

.notice-bar {
  position: relative; display: flex; align-items: center; gap: 6px;
  height: 23px; margin-top: 8px; padding: 0 8px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(70, 17, 8, .9), rgba(28, 7, 3, .62));
  border: 1px solid rgba(255, 185, 90, .22);
  overflow: hidden;
}
.notice-bar .mp-icon { width: 13px; height: 13px; color: #ffca6a; }
.battle-log {
  flex: 1; min-width: 0; height: 100%; display: flex; align-items: center;
  overflow: hidden; white-space: nowrap;
}
.log-line {
  font-size: 9px; line-height: 1.2; color: #e8cba1; text-shadow: 0 1px 1px #000;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.log-line + .log-line { display: none; }
.log-line b { color: #ffe0a0; font-weight: 700; }
.log-line .sys { color: #ffb45e; margin-right: 3px; }
.log-line .gain { color: #8ee0a8; }
.log-line .rare { color: #ffcc5c; }

.buff-bar { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; max-height: 42px; overflow: hidden; }
.buff-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 8px; line-height: 1; padding: 3px 5px; border-radius: 3px;
  color: #d9c19b; background: rgba(26, 8, 4, .82);
  border: 1px solid rgba(255, 190, 100, .25);
}
.buff-chip .mp-icon { width: 10px; height: 10px; color: var(--gold); }
.buff-chip.ad { color: #ffd9a8; border-color: rgba(255, 190, 100, .42); }
.buff-chip.ad .mp-icon { color: #ffce62; }
.buff-chip.trial { color: #bcd6ff; border-color: rgba(80, 150, 255, .4); }
.buff-chip.set { color: #ffe6a8; }
.buff-chip.hot { color: #ffc49b; border-color: rgba(255, 110, 60, .5); }
.buff-chip.hot .mp-icon { color: #ff7a45; }

.map-boss {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(196px + var(--safe-t)); z-index: 5; width: 64%;
  padding: 5px 8px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(55, 12, 7, .92), rgba(22, 5, 3, .92));
  border: 1px solid rgba(255, 180, 90, .5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5), inset 0 0 12px rgba(255, 80, 20, .15);
  pointer-events: none;
}
.mb-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mb-name { display: flex; align-items: center; gap: 3px; font-size: 10px; color: #ffd0a3; }
.mb-name .mp-icon { width: 12px; height: 12px; color: #ff6a3d; }
.mb-top em { font-size: 9px; color: #ff9e87; }
.mb-track { height: 5px; border-radius: 3px; background: #1b0b0c; overflow: hidden; box-shadow: inset 0 1px 2px #000; }
.mb-track i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff3d34, #ff9a3c); box-shadow: 0 0 8px rgba(255, 80, 40, .6); transition: width .2s; }

.hero-hp {
  position: absolute; left: 50%; top: 47%; transform: translateX(-50%);
  width: 44%; height: 6px; z-index: 4; border-radius: 3px; overflow: hidden;
  background: rgba(10, 24, 8, .8); border: 1px solid rgba(130, 230, 110, .5);
  box-shadow: 0 0 7px rgba(100, 220, 90, .35);
  pointer-events: none;
}
.hero-hp i { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #b2ff7e, #35c33a 60%, #116b12); }

/* 左侧竖排 */
.side {
  position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.side > * { pointer-events: auto; }
.side-left { left: 8px; top: calc(214px + var(--safe-t)); }
.side-right { right: 8px; top: calc(206px + var(--safe-t)); align-items: flex-end; }
.rail-btn {
  position: relative; width: 52px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.rail-ico {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px;
  background: linear-gradient(180deg, #6c2711 0%, #3d1108 52%, #200603 100%);
  border: 1px solid #b97a30;
  box-shadow: inset 0 0 0 2px #2b0a04, inset 0 1px 0 rgba(255, 225, 160, .28), 0 4px 9px rgba(0, 0, 0, .55);
}
.rail-ico::before {
  content: ""; position: absolute; inset: 4px; border-radius: 6px;
  border: 1px solid rgba(255, 205, 120, .22);
}
.rail-ico .mp-icon { width: 25px; height: 25px; color: #ffd273; filter: drop-shadow(0 1px 0 #4b1b02); }
.rail-btn > span:last-of-type {
  font-size: 9px; font-weight: 800; color: #ffe1ad; letter-spacing: .06em;
  text-shadow: 0 1px 2px #000, 0 0 4px rgba(255, 120, 30, .5);
}
.rail-btn:active .rail-ico { transform: scale(.92); }
.rail-btn .dot { top: -2px; right: 1px; }

/* 右侧战斗 */
.attack-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.atk-ring {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ff9a3c 0%, #b22c10 44%, #4e0a04 74%, #1c0301 100%);
  border: 2px solid #ffcf72;
  box-shadow: 0 0 0 3px #380d04, 0 0 18px rgba(255, 90, 20, .55), inset 0 0 14px rgba(255, 210, 120, .35);
  animation: pulseGold 2.8s infinite;
}
.atk-ring .mp-icon { width: 34px; height: 34px; color: #fff0c4; filter: drop-shadow(0 2px 2px rgba(80, 15, 0, .9)); }
.attack-btn > span:last-child {
  font-size: 10px; font-weight: 900; color: #ffe4a8; letter-spacing: .12em;
  text-shadow: 0 1px 2px #000;
}
.attack-btn:active .atk-ring { transform: scale(.9); }

.auto-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  width: 46px; padding: 4px 0 3px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(90, 32, 13, .95), rgba(32, 8, 3, .95));
  border: 1px solid rgba(255, 200, 110, .5);
  box-shadow: inset 0 1px 0 rgba(255, 225, 165, .22), 0 3px 8px rgba(0, 0, 0, .5);
}
.auto-ico { display: grid; place-items: center; width: 26px; height: 26px; }
.auto-ico .mp-icon { width: 19px; height: 19px; color: #ffce68; }
.auto-btn > span:last-child { font-size: 8px; font-weight: 700; color: #f3cd93; }
.auto-btn.on .auto-ico .mp-icon { color: #ffe9a6; animation: spin 4s linear infinite; }
.auto-btn.off { filter: grayscale(.55); opacity: .8; }
.auto-btn:active { transform: scale(.93); }

.orb-col {
  position: absolute; right: 9px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  z-index: 5; display: flex; flex-direction: column; gap: 8px;
}
.orb {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  width: 50px; height: 50px; justify-content: center; border-radius: 50%;
  border: 2px solid rgba(255, 205, 125, .6);
  box-shadow: inset 0 0 10px rgba(255, 140, 40, .28), 0 3px 8px rgba(0, 0, 0, .55);
  background: radial-gradient(circle at 50% 34%, #4d1c0c, #1a0603 70%);
}
.orb .mp-icon { width: 20px; height: 20px; color: #ffd070; }
.orb span { font-size: 8px; font-weight: 700; color: #ffe4ac; text-shadow: 0 1px 2px #000; }
.orb:active { transform: scale(.9); }
.orb-rage { border-color: rgba(255, 130, 80, .7); background: radial-gradient(circle at 50% 34%, #5c1f0c, #1c0502 70%); }
.orb-rage .mp-icon { color: #ff9a5f; }
.orb-recycle { border-color: rgba(120, 190, 255, .55); background: radial-gradient(circle at 50% 34%, #1c3550, #07111c 70%); }
.orb-recycle .mp-icon { color: #9ec6ff; }
.orb-skill { border-color: rgba(255, 210, 130, .7); }

/* ================= 底部导航 ================= */
.bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 9;
  height: calc(var(--nav-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  display: flex; align-items: stretch;
  background:
    linear-gradient(180deg, rgba(96, 30, 12, .62), rgba(24, 6, 3, .98) 40%, #120301 100%);
  border-top: 1px solid rgba(255, 196, 100, .55);
  box-shadow: 0 -8px 22px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 230, 170, .18);
}
.bottom-nav::before {
  content: ""; position: absolute; top: 2px; left: 10px; right: 10px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 150, .45), transparent);
}
.nav-item {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 0; color: #c79a68;
}
.nav-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; }
.nav-item .mp-icon { width: 24px; height: 24px; color: #c99a63; transition: all .16s; }
.nav-item > span:last-child { font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.nav-item.active { color: #ffe6ac; }
.nav-item.active .nav-ico {
  background: radial-gradient(circle at 50% 30%, rgba(255, 175, 55, .4), rgba(120, 40, 8, .35) 55%, transparent 76%);
  box-shadow: 0 0 14px rgba(255, 150, 40, .25);
}
.nav-item.active .mp-icon { color: #ffe08a; filter: drop-shadow(0 0 7px rgba(255, 180, 50, .85)); transform: translateY(-1px); }
.nav-item.active > span:last-child { color: #ffe4a4; }
.nav-item.active::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; width: 18px; height: 2px; transform: translateX(-50%);
  border-radius: 2px; background: linear-gradient(90deg, transparent, #ffce62, transparent);
  box-shadow: 0 0 6px rgba(255, 190, 70, .8);
}
.nav-item:active .mp-icon { transform: scale(.88); }
.nav-crest {
  position: relative; flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.crest-orb {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--serif); font-size: 23px; font-weight: 900; line-height: 1; color: #ffd982;
  background:
    radial-gradient(circle at 50% 38%, #ff8a33 0%, #a82a11 30%, #4d0c06 62%, #1b0402 100%);
  border: 2px solid #ffcf70;
  box-shadow: 0 0 0 2px #340b04, 0 0 14px rgba(255, 110, 30, .5);
  text-shadow: 0 2px 2px #4a1302;
}
.nav-crest > span:last-child { font-size: 8px; color: #d9ad76; font-weight: 700; }
.nav-crest:active .crest-orb { transform: scale(.92); }

/* ================= 复古标题 ================= */
.ornate-head {
  position: relative; z-index: 2; padding: calc(16px + var(--safe-t)) 54px 12px; text-align: center;
}
.ornate-head.small { padding-top: calc(12px + var(--safe-t)); padding-bottom: 8px; }
.ornate-head h2 {
  font-family: var(--serif); font-size: 36px; font-weight: 900; letter-spacing: .14em; line-height: 1.15;
  background: linear-gradient(180deg, #fff8d9 0%, #ffe193 28%, #f6b53d 52%, #bb6d15 74%, #86420a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3b1202) drop-shadow(0 0 14px rgba(255, 140, 25, .45));
  margin: 0;
}
.ornate-head.small h2 { font-size: 27px; letter-spacing: .16em; }
.ornate-head::before {
  content: ""; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 62%; height: 8px; pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 50%, rgba(255, 180, 60, .55), transparent 78%),
    linear-gradient(90deg, transparent, rgba(255, 200, 100, .5) 50%, transparent);
  filter: blur(1px);
}
.oh-wing {
  position: absolute; top: 54%; width: 24%; height: 16px; transform: translateY(-50%);
  border-top: 1px solid rgba(255, 198, 100, .65);
  border-bottom: 1px solid rgba(255, 198, 100, .22);
}
.oh-wing::before, .oh-wing::after {
  content: ""; position: absolute; top: -3px; width: 7px; height: 7px; transform: rotate(45deg);
  background: linear-gradient(180deg, #ffe09a, #b96d1a); box-shadow: 0 0 6px rgba(255, 180, 60, .6);
}
.oh-wing.left { left: 6%; }
.oh-wing.left::before { right: -1px; }
.oh-wing.left::after { left: 0; top: auto; bottom: -3px; }
.oh-wing.right { right: 6%; }
.oh-wing.right::before { left: -1px; }
.oh-wing.right::after { right: 0; top: auto; bottom: -3px; }

/* ================= 通用组件 ================= */
.panel {
  position: relative; margin-bottom: 10px; padding: 12px 12px 13px; border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(92, 30, 13, .52), transparent 26%),
    linear-gradient(180deg, #34100a 0%, #230906 100%);
  border: 1px solid #6f431b;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .16), inset 0 0 26px rgba(120, 20, 0, .28), 0 6px 16px rgba(0, 0, 0, .45);
}
.panel::after {
  content: ""; position: absolute; inset: 3px; border-radius: 9px;
  border: 1px solid rgba(255, 205, 115, .12); pointer-events: none;
}
.panel-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.panel-head h3 { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; color: #ffe5b0; letter-spacing: .04em; }
.panel-head h3 .mp-icon { width: 15px; height: 15px; color: var(--gold); }
.panel-head h3 em { font-size: 9px; color: var(--dim); font-weight: 400; }
.panel-extra { font-size: 10px; color: var(--muted); }
.panel-extra b { font-size: 13px; }
.gold-text {
  background: linear-gradient(180deg, #fff3c4, #ffca58 55%, #e18c22);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 1px #2a0902);
}
.muted { color: var(--muted); }
.section-label {
  display: flex; align-items: center; gap: 6px; margin: 14px 0 7px;
  font-size: 11px; font-weight: 800; color: #ffdb9c; letter-spacing: .08em;
}
.section-label::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, #ffe08a, #b96a14); box-shadow: 0 0 5px rgba(255, 170, 50, .6); }
.section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 190, 100, .28), transparent); }
.section-extra { margin-left: auto; font-size: 9px; font-weight: 400; color: var(--dim); }
.foot-note { font-size: 9px; line-height: 1.75; color: #a67c56; text-align: center; padding: 6px 8px; }
.empty-state { text-align: center; padding: 26px 10px; color: #a67c56; font-size: 11px; line-height: 1.9; }
.empty-state .mp-icon { width: 34px; height: 34px; color: #7a4a2a; display: block; margin: 0 auto 8px; }

/* 传奇按钮 */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 40px; padding: 0 14px; border-radius: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .05em;
  border: 1px solid rgba(255, 200, 110, .5);
  background: linear-gradient(180deg, #5e2412, #2c0a05);
  color: #ffe2a6;
  box-shadow: inset 0 1px 0 rgba(255, 225, 165, .2), 0 3px 8px rgba(0, 0, 0, .5);
  transition: transform .1s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { filter: grayscale(.7); opacity: .55; }
.btn .mp-icon { width: 16px; height: 16px; }
.btn-gold {
  color: #3c1a02; border-color: #ffe7a3;
  background: linear-gradient(180deg, #fff0ae 0%, #ffd361 26%, #f0a02d 62%, #ab5c0e 100%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -2px 0 rgba(110, 50, 0, .35), 0 4px 0 #5c3006, 0 7px 12px rgba(0, 0, 0, .45);
}
.btn-gold:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(110, 50, 0, .3), 0 2px 0 #4a2604; }
.btn-gold .mp-icon { color: #4a2603; }
.btn-blue {
  color: #d9ecff; border-color: rgba(110, 180, 255, .6);
  background: linear-gradient(180deg, #1e4d86, #0d2547);
  box-shadow: inset 0 1px 0 rgba(200, 230, 255, .3), 0 3px 0 #071526;
}
.btn-ghost { color: #e5c79c; background: linear-gradient(180deg, #3c160d, #1d0703); }
.btn-danger { color: #ffd9d9; background: linear-gradient(180deg, #7c2530, #3d1015); border-color: rgba(255, 100, 100, .45); }
.btn-sm { min-height: 32px; font-size: 10px; padding: 0 10px; border-radius: 7px; }
.btn-wide { width: 100%; }

.legend-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 48px; padding: 0 22px; border-radius: 9px;
  font-family: var(--serif); font-size: 18px; font-weight: 900; letter-spacing: .16em;
  color: #ffe3a4;
  background: linear-gradient(180deg, #7e2411 0%, #4b0f07 52%, #2c0603 100%);
  border: 1px solid #c08538;
  box-shadow: inset 0 0 0 2px #2c0903, inset 0 0 0 3px rgba(255, 205, 120, .28), inset 0 1px 0 rgba(255, 230, 170, .3), 0 6px 14px rgba(0, 0, 0, .5);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  transition: transform .1s;
}
.legend-btn::before {
  content: ""; position: absolute; inset: 5px; border-radius: 6px;
  border: 1px solid rgba(255, 200, 110, .2); pointer-events: none;
}
.legend-btn.primary {
  color: #401b02; border-color: #ffe9a8;
  background: linear-gradient(180deg, #fff3bb 0%, #ffd765 24%, #f2a532 58%, #b46510 100%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  box-shadow: inset 0 1px 0 #fffbe0, inset 0 -3px 0 rgba(110, 50, 0, .3), 0 5px 0 #5e3207, 0 10px 18px rgba(0, 0, 0, .5);
}
.legend-btn.primary .mp-icon { color: #4a2603; }
.legend-btn.ghost { min-height: 44px; font-size: 16px; color: #e7c79b; }
.legend-btn.small { min-height: 40px; font-size: 14px; letter-spacing: .08em; }
.legend-btn:active { transform: translateY(2px) scale(.99); }
.legend-btn:disabled { filter: grayscale(.65); opacity: .6; }

/* 通用小图标 */
.round-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  color: #ffd684; border: 1px solid rgba(255, 200, 110, .55);
  background: radial-gradient(circle at 50% 32%, #6a2711, #240804 72%);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .22), 0 3px 8px rgba(0, 0, 0, .55);
}
.round-btn .mp-icon { width: 20px; height: 20px; }
.round-btn:active { transform: scale(.92); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.stat-cell {
  padding: 7px 4px; text-align: center; border-radius: 7px;
  background: linear-gradient(180deg, #3b130b, #220805);
  border: 1px solid rgba(255, 190, 100, .22);
}
.stat-cell span { display: block; font-size: 8px; color: var(--muted); margin-bottom: 2px; }
.stat-cell b { font-size: 12px; color: #ffdc8c; }
.stat-cell b.improve { color: #7fe58b; }
.compare { display: flex; justify-content: space-between; align-items: center; margin: 6px 0; padding: 6px 9px; border-radius: 6px; background: rgba(255, 190, 90, .07); border: 1px dashed rgba(255, 190, 90, .28); font-size: 10px; color: var(--muted); }
.compare b { font-size: 12px; }
.compare b.up { color: #7fe58b; }
.compare b.down { color: #ff7d6a; }
.stat-line { display: flex; justify-content: space-between; padding: 5px 2px; font-size: 11px; border-bottom: 1px dashed rgba(255, 190, 100, .13); color: #dcbe92; }
.stat-line em { color: #ffd274; font-weight: 800; }

/* ================= 地图传送 ================= */
.map-body { padding-top: 2px; }
.cur-map-tag {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  margin: 2px 2px 12px auto; width: fit-content; padding: 5px 11px;
  font-size: 11px; color: #f0d0a0;
  background: linear-gradient(90deg, rgba(120, 36, 14, .28), rgba(48, 12, 6, .82));
  border: 1px solid rgba(255, 190, 100, .35); border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .14);
}
.cur-map-tag b { color: #ffd87f; font-size: 12px; }
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.map-tile {
  position: relative; display: flex; flex-direction: column; gap: 0; padding: 0;
  border-radius: 9px; overflow: hidden; text-align: center;
  border: 1px solid #8b5a26;
  background: linear-gradient(180deg, #4a150c, #250804);
  box-shadow: inset 0 0 0 2px #2a0803, inset 0 0 0 3px rgba(255, 200, 110, .16), 0 6px 14px rgba(0, 0, 0, .5);
  transition: transform .12s;
}
.map-tile:active { transform: scale(.98); }
.map-tile.selected { border-color: #ffd47a; box-shadow: 0 0 0 1px rgba(255, 220, 130, .5), 0 0 16px rgba(255, 160, 40, .38), inset 0 0 16px rgba(255, 120, 20, .22); }
.map-tile.locked { filter: saturate(.6) brightness(.72); }
.map-tile.current::after {
  content: "当前"; position: absolute; top: 4px; left: 4px; z-index: 2;
  font-size: 8px; line-height: 1.6; padding: 0 5px; border-radius: 3px;
  color: #ffe7b0; background: rgba(120, 20, 8, .92); border: 1px solid rgba(255, 190, 90, .6);
}
.map-tile-title {
  padding: 7px 4px 6px; font-family: var(--serif); font-size: 20px; font-weight: 900; line-height: 1.1;
  letter-spacing: .08em; color: #ffe09a;
  text-shadow: 0 2px 2px #3a0e02, 0 0 10px rgba(255, 130, 20, .35);
  border-bottom: 1px solid rgba(255, 200, 110, .25);
  background: linear-gradient(180deg, rgba(120, 34, 13, .55), rgba(60, 14, 6, .2));
}
.map-tile-art {
  position: relative; height: 92px; margin: 4px 5px 0; border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(255, 195, 100, .45);
  background:
    radial-gradient(30% 30% at 50% 52%, var(--mc, #ff9a3c) 0%, transparent 60%),
    radial-gradient(18% 18% at 28% 66%, rgba(255, 170, 60, .55), transparent 70%),
    radial-gradient(24% 20% at 72% 38%, rgba(200, 40, 10, .65), transparent 70%),
    repeating-linear-gradient(32deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 6px),
    radial-gradient(70% 70% at 50% 50%, #641d0e 0%, #2a0703 68%, #150201 100%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .8);
}
.map-tile-art::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 18%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 205, 130, .35), transparent);
  box-shadow: 0 20px 0 rgba(255, 205, 130, .18), 0 44px 0 rgba(255, 205, 130, .12);
  transform: rotate(-7deg);
}
.map-tile-art .tile-code {
  position: absolute; left: 5px; top: 2px; font-size: 8px; letter-spacing: .12em; color: rgba(255, 220, 160, .6);
}
.map-tile-art .tile-short {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--serif); font-size: 15px; font-weight: 800; letter-spacing: .1em;
  color: rgba(255, 225, 165, .9); text-shadow: 0 2px 4px #000, 0 0 10px rgba(255, 140, 30, .6);
  white-space: nowrap;
}
.map-tile-power {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 3px 7px; font-size: 9px; color: #f0d0a0;
}
.map-tile-power .mp-icon { width: 15px; height: 15px; color: #ffd25e; filter: drop-shadow(0 0 4px rgba(255, 180, 40, .6)); }
.map-tile-power b { color: #ffe6a8; font-size: 10px; }
.map-tile-power em { color: #ff9d7a; font-size: 8px; }
.map-foot { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; padding: 0 8px; }
.map-foot .legend-btn { width: 100%; }

/* ================= BOSS 页 ================= */
.boss-view { background: radial-gradient(80% 55% at 50% 24%, rgba(150, 40, 14, .38), transparent 70%), linear-gradient(180deg, #220805, #100202); }
.boss-topbar {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 13px 4px;
}
.boss-top-title {
  font-family: var(--serif); font-size: 17px; font-weight: 800; letter-spacing: .16em;
  color: #ffd998; text-shadow: 0 2px 3px #000;
}
.boss-body { padding: 2px 13px 0; }
.boss-frame {
  position: relative; margin-top: 4px; border-radius: 12px; padding: 5px;
  background: linear-gradient(180deg, #7a2a12, #3c0d06 60%, #260603);
  border: 2px solid #c68a3b;
  box-shadow: inset 0 0 0 2px #2c0802, inset 0 0 0 3px rgba(255, 205, 120, .3), 0 0 26px rgba(255, 110, 20, .28), 0 8px 20px rgba(0, 0, 0, .6);
}
.boss-art {
  position: relative; height: 248px; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255, 200, 110, .5);
  background:
    radial-gradient(54% 46% at 50% 44%, rgba(255, 180, 50, .95) 0%, rgba(224, 82, 18, .8) 22%, rgba(110, 20, 8, .82) 46%, rgba(32, 5, 3, .96) 74%),
    repeating-conic-gradient(from 0deg at 50% 45%, rgba(255, 180, 70, .16) 0deg 3deg, transparent 3deg 22deg),
    linear-gradient(180deg, #5a170b, #1c0402);
  box-shadow: inset 0 0 40px rgba(255, 90, 20, .5), inset 0 0 90px rgba(0, 0, 0, .7);
}
.boss-art::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  border: 1px solid rgba(255, 210, 130, .28);
  box-shadow: 0 0 0 10px rgba(255, 210, 130, .06), 0 0 0 24px rgba(255, 210, 130, .04);
}
.boss-flare {
  position: absolute; left: 50%; bottom: -30%; width: 90%; height: 90%; transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 100%, transparent 0deg, rgba(255, 200, 90, .18) 20deg, transparent 40deg, rgba(255, 140, 40, .14) 60deg, transparent 80deg);
  filter: blur(5px);
}
.boss-glyph {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%);
  font-family: var(--serif); font-size: 168px; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fff8d0 0%, #ffe08a 26%, #ff9d2e 52%, #c33c0d 76%, #6e0d04 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #4a0d02) drop-shadow(0 0 26px rgba(255, 120, 20, .9));
}
.boss-horn {
  position: absolute; top: 12%; width: 58px; height: 96px;
  border: 8px solid #ffb04a; border-bottom: 0; border-left-color: transparent; border-right-color: transparent;
  border-radius: 50% 50% 0 0; opacity: .65; filter: drop-shadow(0 0 8px rgba(255, 110, 20, .8));
}
.boss-horn.left { left: 8%; transform: rotate(-24deg); }
.boss-horn.right { right: 8%; transform: rotate(24deg); }
.boss-frame-plate {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  min-width: 62%; padding: 4px 18px 5px; text-align: center; border-radius: 6px;
  background: linear-gradient(180deg, rgba(70, 12, 5, .92), rgba(32, 5, 2, .96));
  border: 1px solid rgba(255, 200, 110, .6);
  box-shadow: inset 0 0 14px rgba(255, 90, 20, .35), 0 3px 9px rgba(0, 0, 0, .6);
}
.boss-frame-plate b {
  display: block; font-family: var(--serif); font-size: 26px; font-weight: 900; letter-spacing: .1em;
  background: linear-gradient(180deg, #fff8d8, #ffd66d 48%, #d98320);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px #400d01);
}
.boss-frame-plate span { font-size: 10px; color: #ffbe7a; letter-spacing: .12em; }
.boss-hp-row { display: flex; align-items: center; gap: 5px; margin: 12px 0 5px; }
.hp-pip, .hp-plus {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: #ffdc8a;
  border: 1px solid rgba(255, 200, 110, .6);
  background: radial-gradient(circle at 50% 32%, #6b2812, #260803 72%);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .22), 0 2px 6px rgba(0, 0, 0, .5);
}
.hp-pip .mp-icon, .hp-plus .mp-icon { width: 17px; height: 17px; }
.hp-plus:active { transform: scale(.9); }
.boss-hp-track {
  flex: 1; height: 13px; border-radius: 7px; overflow: hidden;
  background: #180402; border: 1px solid rgba(255, 190, 100, .4);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .9);
}
.boss-hp-track i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(180deg, #ffb35e 0%, #ff572a 28%, #d4140c 62%, #850504 100%);
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, .55), 0 0 12px rgba(255, 60, 20, .7);
  transition: width .3s;
}
.boss-stats { display: flex; justify-content: space-between; padding: 0 4px; }
.boss-stats div { display: flex; align-items: baseline; gap: 5px; font-size: 12px; color: #ffe2ad; }
.boss-stats span { font-size: 9px; color: #c4915e; }
.boss-stats b { font-size: 14px; color: #ffe7ae; text-shadow: 0 1px 2px #000; }
.boss-drop-card {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 10px 10px 12px;
  border-radius: 9px; border: 1px solid rgba(255, 195, 100, .45);
  background: linear-gradient(180deg, rgba(84, 24, 10, .92), rgba(34, 7, 3, .94));
  box-shadow: inset 0 1px 0 rgba(255, 225, 165, .15), 0 4px 12px rgba(0, 0, 0, .45);
}
.drop-lines { flex: 1; min-width: 0; }
.drop-lines p { font-size: 11px; line-height: 1.75; color: #e8c79a; }
.drop-lines b { color: #ffcf5e; font-weight: 800; }
.boss-drop-card .legend-btn { flex: 0 0 auto; min-height: 38px; padding: 0 14px; font-size: 14px; }
.boss-buffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 14px; }
.boss-buff {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 4px 10px; border-radius: 9px;
  background: linear-gradient(180deg, rgba(108, 38, 13, .82), rgba(38, 9, 4, .94));
  border: 1px solid rgba(255, 195, 100, .5);
  box-shadow: inset 0 0 0 2px rgba(34, 8, 3, .8), inset 0 1px 0 rgba(255, 225, 165, .2), 0 5px 12px rgba(0, 0, 0, .45);
}
.bb-ico {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px;
  background: linear-gradient(180deg, #ffe9a4, #f3ae37 48%, #a85d10);
  border: 1px solid #fff0bd;
  box-shadow: inset 0 1px 0 #fffbe0, 0 3px 0 #5c3006, 0 0 14px rgba(255, 180, 50, .28);
}
.bb-ico .mp-icon { width: 25px; height: 25px; color: #5a2603; }
.boss-buff b { font-size: 11px; font-weight: 800; color: #ffe3a9; letter-spacing: .02em; }
.boss-buff:active { transform: scale(.96); }
.boss-buff .bb-tag {
  position: absolute; top: 3px; right: 4px; font-size: 7px; color: #ffb27e;
}

/* ================= 背包 ================= */
.bag-power-row {
  display: flex; align-items: center; gap: 5px; margin: 2px 0 10px;
  padding: 6px 10px; width: fit-content; border-radius: 6px;
  background: linear-gradient(90deg, rgba(92, 28, 11, .9), rgba(40, 9, 4, .6));
  border: 1px solid rgba(255, 195, 100, .4);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .18);
}
.bag-power-ico .mp-icon { width: 18px; height: 18px; color: #ffd05c; filter: drop-shadow(0 0 5px rgba(255, 180, 40, .5)); }
.bag-power-row span { font-size: 10px; color: #d4ab7a; }
.bag-power-row b { font-size: 15px; color: #ffe08c; font-weight: 900; text-shadow: 0 1px 2px #000; }
.bag-power-row em { margin-left: auto; font-size: 9px; color: #b7885b; }
.bag-layout { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 8px; align-items: start; }
.bag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bag-tile {
  position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  border-radius: 5px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(120, 42, 18, .95), rgba(46, 11, 5, .96) 64%, rgba(24, 5, 2, .98) 100%);
  border: 1px solid #6f421c;
  box-shadow: inset 0 0 0 2px #220602, inset 0 0 12px rgba(255, 140, 40, .16);
  transition: transform .1s;
}
.bag-tile::before {
  content: ""; position: absolute; inset: 3px; border: 1px solid rgba(255, 200, 110, .12); border-radius: 3px;
}
.bag-tile.selected {
  border-color: #ffd36b;
  box-shadow: 0 0 10px rgba(255, 170, 50, .55), inset 0 0 14px rgba(255, 160, 40, .35), inset 0 0 0 2px #3a1206;
}
.bag-tile.selected::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 220, 130, .12), transparent 55%);
  pointer-events: none;
}
.bag-tile:active { transform: scale(.94); }
.bag-tile .tile-glyph {
  position: relative; z-index: 1;
  font-family: var(--serif); font-size: 30px; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fff6cb 0%, #ffd66d 40%, #e0952b 66%, #9b510c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3f1502) drop-shadow(0 0 6px rgba(255, 160, 40, .45));
}
.bag-tile .tile-plus {
  position: absolute; top: 2px; right: 3px; z-index: 2;
  font-size: 8px; font-weight: 800; color: #ffe9b0; text-shadow: 0 1px 2px #000;
}
.bag-tile .tile-eq {
  position: absolute; left: 2px; bottom: 2px; z-index: 2;
  font-size: 7px; line-height: 1.5; padding: 0 3px; border-radius: 2px;
  color: #2f1402; background: linear-gradient(180deg, #ffe7a0, #e5a63a);
}
.bag-tile .tile-quality {
  position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--rc, #ffd36b); box-shadow: 0 0 6px var(--rc, #ffd36b); opacity: .85;
}
.bag-tile.empty { filter: saturate(.5) brightness(.82); }
.bag-tile.empty .tile-glyph { background: linear-gradient(180deg, #b7a184, #6a4a2e); -webkit-background-clip: text; background-clip: text; }
.bag-detail {
  position: sticky; top: 6px; min-height: 220px; padding: 8px 7px;
  border-radius: 7px; border: 1px solid #7c4a1e;
  background:
    radial-gradient(60% 34% at 50% 0%, rgba(255, 170, 60, .18), transparent 70%),
    linear-gradient(180deg, #45140b, #220704);
  box-shadow: inset 0 0 0 2px rgba(26, 6, 2, .8), inset 0 0 20px rgba(255, 100, 20, .14);
}
.bd-label { font-family: var(--serif); font-size: 17px; font-weight: 900; line-height: 1.25; letter-spacing: .04em; color: #ffdf9c; text-shadow: 0 1px 2px #000; }
.bd-sub { margin-top: 2px; font-size: 8px; color: #cfa06d; }
.bd-divider { height: 1px; margin: 7px 0; background: linear-gradient(90deg, transparent, rgba(255, 200, 110, .45), transparent); }
.bd-stat { display: flex; justify-content: space-between; gap: 2px; padding: 4px 0; font-size: 9px; color: #e3c194; border-bottom: 1px dashed rgba(255, 195, 100, .13); }
.bd-stat em { color: #ffd171; font-weight: 800; font-size: 9px; }
.bd-power { margin-top: 7px; text-align: center; font-size: 9px; color: #cfa06d; }
.bd-power b { display: block; font-size: 14px; color: #ffe08a; }
.bd-open {
  width: 100%; min-height: 30px; margin-top: 7px; border-radius: 5px;
  font-size: 10px; font-weight: 800; color: #3a1902;
  background: linear-gradient(180deg, #ffeaa2, #f3a932 65%, #b45f0c);
  border: 1px solid #fff0b8; box-shadow: inset 0 1px 0 #fffce6, 0 2px 0 #5c3006;
}
.bd-open:active { transform: translateY(1px); }
.bd-empty { padding-top: 56px; text-align: center; font-size: 9px; line-height: 1.9; color: #b18357; }
.bd-empty .mp-icon { display: block; width: 30px; height: 30px; margin: 0 auto 6px; color: #7a4a2a; }
.bag-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.bag-actions .legend-btn { min-height: 42px; font-size: 14px; padding: 0 6px; letter-spacing: .04em; }

/* ================= 福利 ================= */
.wf-hero {
  position: relative; display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding: 12px; border-radius: 10px;
  background:
    radial-gradient(60% 100% at 18% 40%, rgba(255, 188, 70, .28), transparent 70%),
    linear-gradient(100deg, #64200d, #2a0904);
  border: 1px solid rgba(255, 195, 100, .55);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .2), 0 5px 14px rgba(0, 0, 0, .45);
}
.wf-hero-ico {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, #ffe9a8, #e3a02f 56%, #8e4a0c);
  border: 1px solid #fff2c0; box-shadow: 0 0 16px rgba(255, 180, 60, .35);
}
.wf-hero-ico .mp-icon { width: 26px; height: 26px; color: #5a2a03; }
.wf-hero-copy { flex: 1; min-width: 0; }
.wf-hero-copy b { display: block; font-size: 14px; color: #ffe6ae; }
.wf-hero-copy span { display: block; margin-top: 2px; font-size: 9px; color: #e0b889; }
.wf-hero-meter { flex: 0 0 54px; text-align: center; }
.wf-hero-meter b { display: block; font-size: 15px; color: #ffd36b; }
.wf-hero-meter span { font-size: 8px; color: #d6a97a; }
.wf-card {
  position: relative; margin-bottom: 10px; padding: 11px 11px 12px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(88, 28, 11, .58), transparent 30%), linear-gradient(180deg, #33100a, #230805);
  border: 1px solid #6d411b;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .14), 0 4px 12px rgba(0, 0, 0, .4);
}
.wf-card::after { content: ""; position: absolute; inset: 3px; border-radius: 7px; border: 1px solid rgba(255, 200, 110, .1); pointer-events: none; }
.wf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.wf-head h3 { font-size: 12px; font-weight: 800; color: #ffe2aa; letter-spacing: .05em; }
.wf-head span { font-size: 9px; color: #c5925c; }
.wf-sign-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 8px; }
.sign-cell {
  position: relative; padding: 5px 2px; text-align: center; border-radius: 5px;
  background: rgba(30, 8, 4, .8); border: 1px solid rgba(255, 190, 100, .18);
}
.sign-cell span { display: block; font-size: 7px; color: #b98c5f; }
.sign-cell .mp-icon { width: 16px; height: 16px; margin: 2px 0; color: #ffd06a; }
.sign-cell b { display: block; font-size: 7px; color: #e3bc8b; font-weight: 600; }
.sign-cell.done { opacity: .55; }
.sign-cell.done b { color: #8ee0a8; }
.sign-cell.current { border-color: #ffd36b; box-shadow: 0 0 8px rgba(255, 160, 40, .35); }
.wf-actions { display: flex; gap: 7px; }
.wf-actions .btn { flex: 1; }
.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.gift-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 7px; border-radius: 7px; text-align: center;
  background: linear-gradient(180deg, #4a170d, #280805);
  border: 1px solid rgba(255, 190, 100, .28);
}
.gift-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 50% 34%, #ffe39a, #d28b22 62%, #7c3a07); }
.gift-ico .mp-icon { width: 19px; height: 19px; color: #4f2502; }
.gift-card b { font-size: 9px; color: #ffe3ac; }
.gift-card > span { font-size: 7px; color: #bd9164; line-height: 1.35; }
.gift-card button {
  width: 100%; min-height: 24px; margin-top: 2px; border-radius: 4px;
  font-size: 9px; font-weight: 800; color: #3a1902;
  background: linear-gradient(180deg, #ffeaa2, #eda32d);
  border: 1px solid #ffedb0;
}
.gift-card button:disabled { filter: grayscale(.7); opacity: .55; }
.task-list { display: flex; flex-direction: column; gap: 6px; }
.task-row { padding: 7px 8px; border-radius: 6px; background: rgba(28, 8, 4, .7); border: 1px solid rgba(255, 190, 100, .16); }
.task-top { display: flex; justify-content: space-between; font-size: 10px; color: #ecd0a6; }
.task-top span { color: #c5925c; }
.task-top span.done { color: #8ee0a8; }
.task-bottom { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.task-track { flex: 1; height: 5px; border-radius: 3px; background: #1a0502; overflow: hidden; border: 1px solid rgba(255, 190, 100, .14); }
.task-track i { display: block; height: 100%; background: linear-gradient(90deg, #ff8a2a, #ffd264); }
.task-reward { font-size: 8px; color: #d8ad76; white-space: nowrap; }
.task-claim { min-height: 23px; padding: 0 8px; border-radius: 4px; font-size: 9px; font-weight: 800; color: #3a1902; background: linear-gradient(180deg, #ffeaa2, #eda32d); border: 1px solid #ffedb0; }
.task-claim:disabled { filter: grayscale(.7); opacity: .55; }
.buff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.buff-ad {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 3px 6px;
  border-radius: 7px; background: linear-gradient(180deg, #4a170d, #260704);
  border: 1px solid rgba(255, 190, 100, .28); color: #ffe3ac;
}
.buff-ad .mp-icon { width: 22px; height: 22px; color: #ffd06a; }
.buff-ad b { font-size: 9px; }
.buff-ad span { font-size: 7px; color: #c29464; }
.buff-ad:disabled { opacity: .55; }
.wf-online { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.wf-online-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 50% 34%, #7c2b12, #2a0803); border: 1px solid rgba(255, 195, 100, .5); }
.wf-online-ico .mp-icon { width: 22px; height: 22px; color: #ffd06a; }
.wf-online-copy { flex: 1; }
.wf-online-copy b { display: block; font-size: 12px; color: #ffe3ac; }
.wf-online-copy span { font-size: 8px; color: #bd9164; }
.wf-online > em { font-size: 9px; color: #ffd36b; }

/* ================= 排行榜 ================= */
.rank-top {
  display: flex; align-items: center; gap: 9px; margin-bottom: 10px; padding: 12px;
  border-radius: 10px; background: linear-gradient(100deg, #6a210d, #2a0904);
  border: 1px solid rgba(255, 195, 100, .5);
}
.rank-top .rank-medal { width: 46px; height: 46px; }
.rank-top-copy b { display: block; font-size: 14px; color: #ffe3a4; }
.rank-top-copy span { display: block; margin-top: 2px; font-size: 9px; color: #d6ac7d; }
.rank-top-copy em { color: #7fe58b; font-weight: 700; }
.rank-list { display: flex; flex-direction: column; gap: 5px; }
.rank-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(69, 21, 10, .85), rgba(33, 8, 4, .7));
  border: 1px solid rgba(255, 190, 100, .14);
}
.rank-row.self { border-color: rgba(255, 210, 120, .55); box-shadow: inset 0 0 12px rgba(255, 140, 40, .15); }
.rank-no { flex: 0 0 22px; font-size: 12px; font-weight: 900; color: #cfa06d; text-align: center; }
.rank-row:nth-child(1) .rank-no { color: #ffd700; }
.rank-row:nth-child(2) .rank-no { color: #e6e6e6; }
.rank-row:nth-child(3) .rank-no { color: #e39b5d; }
.rank-ava {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--serif); font-size: 14px; font-weight: 900; color: #ffd982;
  background: radial-gradient(circle at 50% 34%, #6f2a12, #260703);
  border: 1px solid rgba(255, 195, 100, .5);
}
.rank-name { flex: 1; min-width: 0; }
.rank-name b { display: block; font-size: 11px; color: #f0d2a4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-name span { display: block; font-size: 8px; color: #b98c5f; }
.rank-power { font-size: 11px; color: #ffd87f; font-weight: 800; }

/* ================= 行会 ================= */
.guild-banner {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 10px;
  border-radius: 10px; border: 1px solid rgba(255, 195, 100, .5);
  background: radial-gradient(60% 100% at 20% 30%, rgba(255, 180, 60, .22), transparent 70%), linear-gradient(100deg, #5e1e0c, #260803);
}
.guild-crest {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  font-family: var(--serif); font-size: 22px; font-weight: 900; color: #ffd982;
  background: radial-gradient(circle at 50% 36%, #ff9a3c, #a82a11 38%, #430b05 72%);
  border: 2px solid #ffcf70; box-shadow: 0 0 14px rgba(255, 120, 30, .45);
}
.guild-copy b { display: block; font-size: 15px; color: #ffe3a4; }
.guild-copy span { display: block; margin-top: 2px; font-size: 9px; color: #d6ac7d; }
.guild-copy em { color: #ffd36b; }
.guild-members { display: flex; flex-direction: column; gap: 5px; }
.guild-member {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 6px;
  background: rgba(31, 8, 4, .78); border: 1px solid rgba(255, 190, 100, .14);
}
.guild-member .rank-ava { width: 26px; height: 26px; font-size: 12px; }
.guild-member b { flex: 1; font-size: 10px; color: #efd0a2; font-weight: 600; }
.guild-member span { font-size: 8px; color: #b98c5f; }
.guild-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }

/* ================= 商城 ================= */
.shop-wallet {
  display: flex; gap: 8px; margin-bottom: 10px; padding: 9px 11px; border-radius: 8px;
  background: rgba(38, 10, 5, .85); border: 1px solid rgba(255, 195, 100, .28);
}
.shop-wallet div { flex: 1; display: flex; align-items: center; gap: 5px; font-size: 11px; color: #ffe2ad; }
.shop-wallet .mp-icon { width: 16px; height: 16px; color: #ffd05c; }
.shop-wallet b { margin-left: auto; color: #ffe08c; }
.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-item {
  display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(72, 22, 10, .9), rgba(33, 8, 4, .8));
  border: 1px solid rgba(255, 190, 100, .22);
}
.shop-ico {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px;
  background: radial-gradient(circle at 50% 34%, #ffe39a, #c47c1c 64%, #6e3306);
  border: 1px solid #ffeab0;
}
.shop-ico .mp-icon { width: 23px; height: 23px; color: #4d2402; }
.shop-copy { flex: 1; min-width: 0; }
.shop-copy b { display: block; font-size: 12px; color: #ffe3ac; }
.shop-copy span { display: block; margin-top: 2px; font-size: 8px; color: #bd9164; }
.shop-buy { min-height: 30px; padding: 0 10px; border-radius: 5px; font-size: 10px; font-weight: 800; color: #3a1902; background: linear-gradient(180deg, #ffeaa2, #eda32d); border: 1px solid #ffedb0; white-space: nowrap; }
.shop-buy:disabled { filter: grayscale(.7); opacity: .5; }
.shop-foot { margin-top: 12px; padding: 9px 11px; border-radius: 8px; border: 1px dashed rgba(255, 190, 100, .25); font-size: 9px; line-height: 1.8; color: #b98c5f; }

/* ================= 转生 ================= */
.rebirth-hero { text-align: center; padding: 6px 0 4px; }
.rebirth-ring {
  position: relative; width: 138px; height: 138px; margin: 0 auto 9px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #7a2a11 0%, #3a0d06 54%, #1b0402 100%);
  border: 2px solid #b87b32;
  box-shadow: inset 0 0 24px rgba(255, 100, 20, .35), 0 0 0 4px rgba(40, 9, 3, .9), 0 0 26px rgba(255, 130, 30, .25);
}
.rebirth-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px dashed rgba(255, 210, 120, .42); animation: spin 26s linear infinite; }
.rebirth-core { display: flex; flex-direction: column; align-items: center; }
.rb-label { font-size: 8px; letter-spacing: .34em; color: #c98c4e; }
.rb-num {
  font-family: var(--serif); font-size: 46px; font-weight: 900; line-height: 1.05;
  background: linear-gradient(180deg, #fff6cf, #ffd45f 52%, #d7861e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 2px #3f0e01);
}
.rb-unit { font-size: 10px; color: #ffce74; letter-spacing: .18em; }
.rebirth-caption { font-size: 10px; color: #d1a978; }
.rebirth-caption b { color: #ffda8a; }
.req-block { margin-top: 10px; }
.req-row { margin-bottom: 8px; }
.req-top { display: flex; justify-content: space-between; margin-bottom: 3px; font-size: 10px; color: #e0be92; }
.req-top em { color: #ffd36b; font-style: normal; }
.req-track { height: 7px; border-radius: 4px; background: #1b0502; overflow: hidden; border: 1px solid rgba(255, 190, 100, .18); }
.req-track i { display: block; height: 100%; background: linear-gradient(90deg, #ff7b2a, #ffd265); box-shadow: 0 0 7px rgba(255, 160, 40, .55); }
.req-track.full i { background: linear-gradient(90deg, #42c15c, #9af06c); }
.req-track.gold i { background: linear-gradient(90deg, #d58a1c, #ffe08a); }
.benefit-list { display: flex; flex-direction: column; gap: 5px; }
.benefit { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 5px; background: rgba(32, 8, 4, .7); font-size: 10px; color: #e2c093; }
.benefit .mp-icon { width: 15px; height: 15px; color: #ffd05c; }
.benefit b { margin-left: auto; color: #ffd87f; font-size: 11px; }
.rebirth-ladder { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.rb-step {
  padding: 4px 1px; text-align: center; border-radius: 4px; font-size: 7px; color: #9a7050;
  background: rgba(26, 7, 3, .8); border: 1px solid rgba(255, 190, 100, .1);
}
.rb-step b { display: block; font-size: 9px; font-weight: 700; }
.rb-step.done { color: #7fe58b; border-color: rgba(90, 220, 120, .35); }
.rb-step.now { color: #ffd36b; border-color: rgba(255, 210, 120, .55); box-shadow: 0 0 8px rgba(255, 160, 40, .3); }
.title-list { display: flex; flex-direction: column; gap: 5px; }
.title-row { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 5px; background: rgba(31, 8, 4, .7); border: 1px solid rgba(255, 190, 100, .12); }
.title-row.on { border-color: rgba(255, 210, 120, .5); box-shadow: inset 0 0 10px rgba(255, 140, 40, .14); }
.title-medal { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; font-size: 9px; font-weight: 800; color: #4a2603; background: linear-gradient(180deg, #ffe99a, #d7942c); }
.title-row b { font-size: 10px; color: #e8c79a; }
.title-row em { margin-left: auto; font-size: 8px; color: #ad815a; }
.rebirth-actions { margin-top: 4px; }
.ad-actions { display: flex; gap: 7px; margin-top: 7px; }
.ad-actions .btn { flex: 1; }
.max-tip { margin-top: 8px; text-align: center; font-size: 10px; color: #ffd36b; }

/* ================= 设置 ================= */
.setting-group { padding-bottom: 10px; }
.group-title { margin-bottom: 7px; font-size: 10px; font-weight: 800; letter-spacing: .1em; color: #ffd58c; }
.setting-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(255, 190, 100, .1); }
.setting-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: linear-gradient(180deg, #5a1e0d, #2a0804); border: 1px solid rgba(255, 190, 100, .28); }
.setting-ico .mp-icon { width: 18px; height: 18px; color: #ffd06a; }
.setting-txt { flex: 1; min-width: 0; }
.setting-txt b { display: block; font-size: 11px; color: #f0d2a4; }
.setting-txt span { display: block; margin-top: 1px; font-size: 8px; color: #b98c5f; }
.switch { position: relative; flex: 0 0 42px; width: 42px; height: 23px; border-radius: 12px; background: #240804; border: 1px solid rgba(255, 190, 100, .25); transition: background .2s; }
.switch i { position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #8a6340; transition: all .2s; }
.switch.on { background: linear-gradient(180deg, #ffd465, #d98d1e); border-color: #ffe9a8; box-shadow: 0 0 8px rgba(255, 170, 40, .45); }
.switch.on i { left: 21px; background: #fff8dc; box-shadow: 0 1px 2px rgba(80, 40, 0, .6); }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 6px; background: #1c0502; border: 1px solid rgba(255, 190, 100, .18); }
.seg button { flex: 1; min-height: 26px; background: none; border: 0; color: #b98c5f; font-size: 9px; border-radius: 4px; }
.seg button.on { color: #401b02; font-weight: 800; background: linear-gradient(180deg, #ffe9a0, #eaa22e); }
.save-actions { display: flex; gap: 7px; padding-top: 8px; }
.save-actions .btn { flex: 1; }
.about-lines p { font-size: 9px; line-height: 1.8; color: #b98c5f; margin-bottom: 3px; }
.about-lines b { color: #e8c79a; }
.version-line { text-align: center; font-size: 8px; color: #7a5638; padding: 10px 0 4px; }

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 20px 14px calc(20px + var(--safe-b));
  background: rgba(4, 1, 0, .78); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: fadeIn .16s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative; width: 100%; max-width: 380px; max-height: 86vh; overflow-y: auto;
  padding: 16px 14px 14px; border-radius: 14px;
  background:
    radial-gradient(80% 40% at 50% 0%, rgba(255, 150, 40, .14), transparent 70%),
    linear-gradient(180deg, #3c120a 0%, #260805 40%, #1c0503 100%);
  border: 1px solid #b57a30;
  box-shadow: inset 0 0 0 3px #2a0803, inset 0 0 0 4px rgba(255, 200, 110, .2), 0 18px 50px rgba(0, 0, 0, .8), 0 0 40px rgba(255, 90, 10, .12);
  animation: modalIn .2s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.modal-x {
  position: absolute; top: 9px; right: 9px; z-index: 2; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; color: #ffd6a0;
  background: rgba(30, 7, 3, .8); border: 1px solid rgba(255, 190, 100, .35);
}
.modal-x .mp-icon { width: 15px; height: 15px; }
.modal-head { padding: 2px 4px 8px; text-align: center; }
.modal-kicker { font-size: 8px; letter-spacing: .3em; color: #b57f45; margin-bottom: 3px; }
.modal-head h3 {
  font-family: var(--serif); font-size: 24px; font-weight: 900; letter-spacing: .06em;
  background: linear-gradient(180deg, #fff4c8, #ffd05e 48%, #c67c1c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px #3d0f02);
}
.modal-sub { margin-top: 3px; font-size: 9px; color: #c79a68; line-height: 1.6; }
.modal-body { position: relative; z-index: 1; }
.modal-actions { display: flex; gap: 8px; margin-top: 12px; }
.modal-actions .btn { flex: 1; }

/* 世界BOSS */
.wb-art {
  position: relative; height: 132px; margin-bottom: 10px; border-radius: 9px; overflow: hidden;
  background:
    radial-gradient(52% 52% at 50% 44%, #ff9a2e 0%, #c22c0d 32%, #5c0d05 62%, #1c0301 100%),
    linear-gradient(180deg, #4a1007, #170302);
  border: 1px solid rgba(255, 200, 110, .55);
  box-shadow: inset 0 0 28px rgba(255, 90, 10, .5);
}
.wb-tag { position: absolute; top: 7px; left: 9px; font-size: 8px; letter-spacing: .2em; color: #ffd9a0; opacity: .8; }
.wb-glyph {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  font-family: var(--serif); font-size: 92px; font-weight: 900; line-height: 1;
  color: #ffdd8a; text-shadow: 0 0 24px rgba(255, 110, 20, .9), 0 4px 0 #5a1302;
}
.wb-name { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12px; font-weight: 800; color: #ffe7b4; letter-spacing: .08em; }
.wb-hp .top { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 9px; color: #d9b184; }
.wb-hp .top em { color: #ff9d7a; font-style: normal; }
.wb-track { height: 8px; border-radius: 4px; background: #1a0402; overflow: hidden; border: 1px solid rgba(255, 190, 100, .3); }
.wb-track i { display: block; height: 100%; background: linear-gradient(90deg, #ff3d24, #ffb347); box-shadow: 0 0 8px rgba(255, 80, 30, .6); }
.wb-log { margin-top: 7px; padding: 7px 9px; border-radius: 5px; background: rgba(20, 5, 2, .8); border: 1px solid rgba(255, 190, 100, .14); font-size: 9px; line-height: 1.6; color: #cfa67a; min-height: 32px; }

/* 装备详情 */
.item-detail-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.item-detail-ico {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 7px; flex: 0 0 auto;
  font-family: var(--serif); font-size: 26px; font-weight: 900; color: #ffe6a8;
  background: radial-gradient(circle at 50% 34%, #6d2a12, #2a0804);
  border: 1px solid var(--rc, #b57a30);
  box-shadow: inset 0 0 12px rgba(255, 130, 30, .35), 0 0 10px rgba(0, 0, 0, .4);
}
.item-detail-title b { display: block; font-size: 13px; color: var(--rc, #ffd36b); }
.item-detail-title span { display: block; margin-top: 2px; font-size: 9px; color: #bb9166; }
.enhance-box { margin-top: 9px; padding: 8px 9px; border-radius: 6px; background: rgba(24, 6, 3, .7); border: 1px solid rgba(255, 190, 100, .16); }
.enhance-head { display: flex; justify-content: space-between; font-size: 10px; color: #d9b184; }
.enhance-head b { color: #ffd36b; }
.enhance-head b em { font-size: 8px; color: #b18357; font-style: normal; }
.enhance-track { height: 5px; margin: 6px 0; border-radius: 3px; background: #190402; overflow: hidden; }
.enhance-track i { display: block; height: 100%; background: linear-gradient(90deg, #ff8a2a, #ffd264); }
.enhance-meta { display: flex; justify-content: space-between; font-size: 8px; color: #b98c5f; }
.enhance-actions { display: flex; gap: 6px; margin-top: 7px; }
.enhance-actions .btn { flex: 1; }
.revive-wrap { text-align: center; padding: 4px 0 2px; }
.revive-glyph {
  width: 86px; height: 86px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--serif); font-size: 40px; font-weight: 900; color: #ffb0a0;
  background: radial-gradient(circle at 50% 40%, #6b1109, #260403 70%);
  border: 1px solid #a8532c; box-shadow: 0 0 18px rgba(200, 40, 20, .35);
}
.revive-timer { font-size: 10px; color: #c79a68; margin-top: 3px; }
.revive-timer b { color: #ff8a6a; font-size: 14px; }
.offline-hero { text-align: center; padding: 4px 0 8px; }
.offline-hero .mp-icon { width: 34px; height: 34px; color: #ffd06a; }
.offline-hero .big { font-size: 17px; font-weight: 800; color: #ffd87f; margin-top: 3px; }
.offline-hero .sub { font-size: 9px; color: #bb9166; margin-top: 2px; }
.offline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.offline-cell { padding: 7px; border-radius: 5px; background: rgba(28, 7, 3, .8); border: 1px solid rgba(255, 190, 100, .16); }
.offline-cell span { display: block; font-size: 8px; color: #b98c5f; }
.offline-cell b { display: block; font-size: 13px; color: #ffd87f; margin-top: 1px; }
.upgrade-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; margin-bottom: 6px; border-radius: 6px; background: rgba(28, 7, 3, .8); border: 1px solid rgba(255, 190, 100, .16); }
.upgrade-row > .mp-icon { width: 20px; height: 20px; color: #ffd06a; }
.upgrade-row div { flex: 1; }
.upgrade-row b { display: block; font-size: 10px; color: #f0d2a4; }
.upgrade-row span { display: block; font-size: 8px; color: #b98c5f; }
.upgrade-row button { min-height: 26px; padding: 0 9px; border-radius: 4px; font-size: 9px; font-weight: 800; color: #3a1902; background: linear-gradient(180deg, #ffeaa2, #eda32d); border: 1px solid #ffedb0; }
.upgrade-row button:disabled { opacity: .5; filter: grayscale(.7); }

/* 每日福利弹窗 */
.ad-meter { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 7px; background: linear-gradient(100deg, rgba(96, 30, 12, .9), rgba(36, 9, 4, .85)); border: 1px solid rgba(255, 190, 100, .35); }
.ad-meter .mp-icon { width: 22px; height: 22px; color: #ffd06a; }
.ad-meter div { flex: 1; }
.ad-meter b { display: block; font-size: 10px; color: #ffe3ac; }
.ad-meter span { display: block; font-size: 8px; color: #bd9164; }
.ad-meter em { font-size: 11px; font-weight: 800; color: #ffd36b; font-style: normal; }
.sign-box { padding: 8px 9px; border-radius: 7px; background: rgba(26, 7, 3, .72); border: 1px solid rgba(255, 190, 100, .18); }
.sign-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.sign-head b { display: block; font-size: 10px; color: #f0d2a4; }
.sign-head b em { color: #ffd36b; font-style: normal; font-size: 13px; }
.sign-head span { display: block; font-size: 8px; color: #b98c5f; margin-top: 1px; }
.sign-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.sign-grid .sign-cell { padding: 4px 0; }
.sign-grid .sign-cell b { font-size: 7px; }
.lottery-box { padding: 8px; border-radius: 7px; background: rgba(26, 7, 3, .72); border: 1px solid rgba(255, 190, 100, .18); }
.lottery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.lot-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 1px; border-radius: 4px; background: rgba(60, 18, 8, .8); border: 1px solid rgba(255, 190, 100, .14); }
.lot-cell .mp-icon { width: 16px; height: 16px; color: #ffd06a; }
.lot-cell b { font-size: 7px; color: #d9b184; font-weight: 500; }
.lot-cell.lit { border-color: #ffd36b; box-shadow: 0 0 8px rgba(255, 160, 40, .5); }
.lot-cell.win { background: rgba(180, 70, 18, .9); border-color: #fff0b8; }
.lottery-result { margin: 7px 0; text-align: center; font-size: 9px; color: #c79a68; }
.lottery-result.win { color: #ffd87f; font-weight: 800; }
.event-list { display: flex; flex-direction: column; gap: 7px; }
.event-card { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 6px; background: rgba(28, 7, 3, .8); border: 1px solid rgba(255, 190, 100, .16); }
.event-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 50% 34%, #6d2a12, #250703); border: 1px solid rgba(255, 195, 100, .45); }
.event-ico .mp-icon { width: 19px; height: 19px; color: #ffd06a; }
.event-main { flex: 1; min-width: 0; }
.event-main b { display: block; font-size: 10px; color: #f0d2a4; }
.event-main span { display: block; font-size: 8px; color: #b98c5f; }
.event-btn { min-height: 27px; padding: 0 9px; border-radius: 4px; font-size: 9px; font-weight: 800; color: #3a1902; background: linear-gradient(180deg, #ffeaa2, #eda32d); border: 1px solid #ffedb0; }
.online-clock { text-align: center; font-size: 12px; color: #ffd87f; margin-bottom: 7px; }
.online-rewards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.chest { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 5px; font-size: 8px; color: #b98c5f; background: rgba(28, 7, 3, .8); border: 1px solid rgba(255, 190, 100, .14); }
.chest .mp-icon { width: 18px; height: 18px; color: #ffd06a; }
.chest.done { opacity: .55; }
.chest.next { border-color: #ffd36b; box-shadow: 0 0 8px rgba(255, 160, 40, .35); }

/* ================= 广告 ================= */
.ad-mask {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: 20px 18px;
  background: rgba(3, 0, 0, .88); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ad-card {
  width: 100%; max-width: 340px; overflow: hidden; border-radius: 14px;
  background: linear-gradient(180deg, #3b1109, #1d0503); border: 1px solid #9c6428;
  box-shadow: inset 0 0 0 3px #250703, 0 18px 50px rgba(0, 0, 0, .8);
}
.ad-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-bottom: 1px solid rgba(255, 190, 100, .16); }
.ad-head span { font-size: 8px; letter-spacing: .2em; color: #b98c5f; }
.ad-head button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #ffd6a0; background: rgba(30, 7, 3, .8); border: 1px solid rgba(255, 190, 100, .3); }
.ad-head .mp-icon { width: 13px; height: 13px; }
.ad-screen {
  position: relative; height: 248px; margin: 10px; border-radius: 9px; overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 38%, rgba(255, 180, 60, .5), transparent 65%),
    repeating-linear-gradient(45deg, rgba(255, 190, 90, .04) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, #56170b, #120201);
  border: 1px solid rgba(255, 195, 100, .35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.ad-rune {
  font-family: var(--serif); font-size: 76px; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fff3c4, #ffd05e 48%, #b96a14);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3d0f02) drop-shadow(0 0 20px rgba(255, 140, 30, .6));
}
.ad-brand { font-size: 11px; letter-spacing: .2em; color: #ffdf9f; }
.ad-caption { font-size: 9px; color: #c79a68; }
.ad-progress { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 4px; border-radius: 2px; background: #1c0502; overflow: hidden; }
.ad-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff8a2a, #ffd264); }
.ad-reward { display: flex; align-items: center; justify-content: space-between; padding: 0 11px; font-size: 9px; color: #b98c5f; }
.ad-reward b { font-size: 11px; color: #ffd87f; }
.ad-claim-wrap { padding: 9px 11px 4px; }
.ad-claim-wrap .btn { width: 100%; }
.ad-note { padding: 3px 11px 11px; text-align: center; font-size: 8px; color: #8f6847; }

/* ================= Toast ================= */
#toastRoot {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 24px);
  z-index: 95; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
}
.toast {
  max-width: 82%; padding: 8px 14px; border-radius: 18px;
  font-size: 11px; line-height: 1.5; text-align: center; color: #ffe9c2;
  background: rgba(40, 10, 5, .96); border: 1px solid rgba(255, 195, 100, .45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .6);
  animation: toastIn .22s ease-out;
}
.toast.good { color: #b8ffbf; border-color: rgba(100, 230, 120, .45); }
.toast.bad { color: #ffb3a6; border-color: rgba(255, 90, 70, .45); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ================= 装备行（旧弹窗列表兼容） ================= */
.item-list { display: flex; flex-direction: column; gap: 7px; position: relative; z-index: 1; }
.item-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; background: rgba(555, 25, 10, .35); border: 1px solid rgba(255, 190, 100, .15); }
.item-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 6px; font-family: var(--serif); font-size: 17px; font-weight: 900; color: #ffe6a8; background: radial-gradient(circle at 50% 34%, #6d2a12, #260704); border: 1px solid rgba(255, 195, 100, .4); }
.item-main { flex: 1; min-width: 0; }
.item-name { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-name .r-tag { flex: 0 0 auto; font-size: 8px; font-weight: 500; color: var(--rc); border: 1px solid var(--rc); border-radius: 3px; padding: 1px 3px; opacity: .85; }
.item-stats { margin-top: 3px; font-size: 8px; color: #b98c5f; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-power { font-size: 10px; font-weight: 800; color: #ffd77c; }
.mini-btn { min-height: 26px; padding: 0 8px; border-radius: 4px; font-size: 9px; font-weight: 800; color: #3a1902; background: linear-gradient(180deg, #ffeaa2, #eda32d); border: 1px solid #ffedb0; }
.mini-btn:active { transform: translateY(1px); }
.banner-ad { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 7px; background: rgba(34, 9, 4, .82); border: 1px solid rgba(255, 190, 100, .18); }
.ad-tag { font-size: 7px; color: #b98c5f; border: 1px solid #6f4a2a; border-radius: 2px; padding: 1px 3px; flex: 0 0 auto; }
.ad-copy { flex: 1; min-width: 0; }
.ad-copy b { display: block; font-size: 11px; color: #e9dfc9; }
.ad-copy span { display: block; font-size: 8px; color: #9a7050; margin-top: 2px; }
.banner-ad .mp-icon { width: 15px; height: 15px; color: #7a5638; }

/* 兼容旧装备栏样式 */
.equip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.equip-slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px; border-radius: 6px; background: radial-gradient(circle at 50% 34%, #5b2110, #260704); border: 1px solid var(--rc, rgba(255, 255, 255, .14)); }
.equip-slot .slot-char { font-family: var(--serif); font-size: 20px; font-weight: 900; color: #ffe6a8; }
.equip-slot b { font-size: 8px; font-weight: 600; color: #e6c89a; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equip-slot b.empty { color: #a67c56; }
.equip-slot em { font-size: 7px; color: #a67c56; }
.equip-slot.has { box-shadow: inset 0 0 12px rgba(255, 160, 40, .16); }
.set-list { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.set-row { padding: 6px 8px; border-radius: 5px; background: rgba(28, 7, 3, .7); border: 1px solid rgba(255, 190, 100, .14); }
.set-row.on { border-color: var(--sc, #ffd36b); }
.set-head { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #e6c89a; }
.set-head em { color: #ffd36b; font-style: normal; }
.set-head .set-tag { margin-left: auto; font-size: 8px; color: #b98c5f; }
.set-desc { font-size: 8px; color: #b98c5f; margin-top: 2px; }
.set-track { height: 4px; margin-top: 4px; border-radius: 2px; background: #190402; overflow: hidden; }
.set-track i { display: block; height: 100%; background: var(--sc, #ffd36b); }
.quick-actions { display: flex; gap: 6px; margin-bottom: 10px; }
.quick-actions .btn { flex: 1; }

/* 兼容旧地图列表 */
.map-list { display: flex; flex-direction: column; gap: 9px; }
.map-card { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; background: rgba(40, 11, 5, .85); border: 1px solid rgba(255, 190, 100, .2); }
.map-thumb { position: relative; flex: 0 0 58px; width: 58px; height: 58px; border-radius: 5px; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, var(--mc, #ff9a3c), #2a0703 70%); border: 1px solid rgba(255, 195, 100, .4); }
.map-thumb span { font-size: 8px; color: rgba(255, 225, 165, .7); }
.map-thumb b { font-size: 10px; color: #ffe6a8; }
.map-main { flex: 1; min-width: 0; }
.map-name { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: #f2e6ce; }
.map-name i { font-size: 7px; font-weight: 500; color: #ffb1a2; border: 1px solid rgba(255, 110, 90, .4); border-radius: 3px; padding: 1px 3px; }
.map-meta { font-size: 8px; color: #b98c5f; margin-top: 2px; }
.map-meta em { color: #8ee0a8; font-weight: 700; }
.map-drops { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.drop-chip { font-size: 7px; padding: 1px 4px; border-radius: 3px; border: 1px solid; line-height: 1.4; }
.map-act { flex: 0 0 auto; }
.map-kill-tip { font-size: 7px; color: #b98c5f; text-align: center; margin-top: 3px; }

/* ============================================================
   本轮目标画面 splash：gptimg_1795509401_look 整屏铺满
   图片本身即画面，叠加层只做轻量可点控件与进入游戏入口
   ============================================================ */
.splash-stage {
  position: absolute; inset: 0; z-index: 40;
  overflow: hidden;
  background: #0b0201;
  animation: splashFade .35s ease-out;
}
@keyframes splashFade { from { opacity: 0; } to { opacity: 1; } }
.splash-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block; user-select: none; -webkit-user-drag: none;
}
/* 上下轻渐变，保证悬浮控件可读，不遮挡图中主体 */
.splash-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 2, 1, .55) 0%, rgba(8, 2, 1, 0) 18%),
    linear-gradient(0deg, rgba(8, 2, 1, .62) 0%, rgba(8, 2, 1, 0) 22%);
}

/* 顶部金币/元宝/菜单 */
.sp-top {
  position: absolute; top: calc(8px + var(--safe-t)); left: 10px; right: 10px;
  display: flex; align-items: center; gap: 8px; z-index: 2;
}
.sp-coin {
  display: flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 8px 0 6px;
  border-radius: 14px;
  color: #ffe1a1; font-size: 12px; font-weight: 800;
  background: linear-gradient(180deg, rgba(66, 22, 12, .82), rgba(28, 8, 4, .82));
  border: 1px solid rgba(255, 196, 104, .45);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .2), 0 2px 6px rgba(0, 0, 0, .45);
  backdrop-filter: blur(2px);
}
.sp-coin-ico { display: grid; place-items: center; width: 17px; height: 17px; }
.sp-coin-ico .mp-icon { width: 16px; height: 16px; color: #ffca4f; filter: drop-shadow(0 0 4px rgba(255, 180, 40, .55)); }
.sp-coin.ingot .mp-icon { color: #7fd4ff; filter: drop-shadow(0 0 4px rgba(90, 190, 255, .5)); }
.sp-coin b { letter-spacing: .02em; }
.sp-plus {
  display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(180deg, #ffeaa0, #e8a52f);
  color: #4c2603; font-size: 13px; font-weight: 900; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 2px rgba(0, 0, 0, .5);
}
.sp-menu {
  margin-left: auto;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  color: #ffcf74; border: 1px solid rgba(255, 200, 110, .5);
  background: radial-gradient(circle at 50% 32%, #5d2211, #230906 70%);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .2), 0 2px 6px rgba(0, 0, 0, .5);
}
.sp-menu .mp-icon { width: 19px; height: 19px; }
.sp-menu:active { transform: scale(.92); }

/* 角色信息 */
.sp-hero {
  position: absolute; top: calc(46px + var(--safe-t)); left: 12px; right: 12px;
  display: flex; align-items: center; gap: 10px; z-index: 2;
}
.sp-avatar {
  position: relative; flex: 0 0 56px; width: 56px; height: 62px;
  display: grid; place-items: center;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 40%, #6e2611 0%, #380d07 54%, #170402 100%);
  border: 2px solid #b87a30;
  box-shadow: 0 0 0 2px #2a0a04, 0 0 12px rgba(255, 130, 40, .38), inset 0 0 16px rgba(255, 90, 20, .5);
}
.sp-avatar-glyph {
  font-family: var(--serif); font-size: 30px; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fff5cd, #ffd065 44%, #b96b14 78%, #7c3c06);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px #2a0902);
}
.sp-avatar-lv {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  white-space: nowrap; padding: 1px 7px; border-radius: 8px;
  font-size: 8px; font-weight: 700; color: #ffe9bd;
  background: linear-gradient(180deg, #6f2a12, #2c0904);
  border: 1px solid rgba(255, 200, 110, .5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .55);
}
.sp-avatar-lv b { font-size: 9px; color: #ffd36b; }
.sp-hero-info { flex: 1; min-width: 0; }
.sp-name-row { display: flex; align-items: center; gap: 6px; }
.sp-name-row > b {
  font-size: 14px; font-weight: 800; color: #ffe7b3;
  text-shadow: 0 1px 2px #000; letter-spacing: .02em;
}
.sp-rb {
  font-size: 9px; line-height: 1.5; padding: 0 6px; border-radius: 3px;
  color: #ffc0a2; border: 1px solid rgba(255, 110, 60, .5);
  background: linear-gradient(180deg, rgba(105, 26, 10, .9), rgba(46, 8, 4, .9));
}
.sp-power { margin: 3px 0 4px; font-size: 10px; color: #c19462; letter-spacing: .06em; }
.sp-power b {
  font-size: 17px; font-weight: 900; margin-left: 2px;
  background: linear-gradient(180deg, #fff6d2, #ffd465 48%, #e28b23);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 1px #2a0902);
}
.sp-bar {
  position: relative; height: 9px; margin-bottom: 3px; border-radius: 5px; overflow: hidden;
  background: rgba(22, 4, 2, .78); border: 1px solid rgba(255, 185, 95, .3);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8);
}
.sp-bar i { display: block; height: 100%; border-radius: 4px; transition: width .25s linear;
  background: linear-gradient(180deg, #ff7a5c, #d8261a 55%, #7e0707);
  box-shadow: inset 0 1px 0 rgba(255, 220, 200, .55), 0 0 6px rgba(255, 45, 20, .5);
}
.sp-bar.mp i { background: linear-gradient(180deg, #86c9ff, #2e7ee0 55%, #143f86); }
.sp-bar span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 7px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000;
}

/* 五宫格功能入口 */
.sp-features {
  position: absolute; top: calc(128px + var(--safe-t)); left: 10px; right: 10px;
  display: flex; justify-content: space-between; gap: 4px; z-index: 2;
}
.sp-feature {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 0;
}
.sp-feature-ico {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #7c3518 0%, #4a170c 48%, #240803 100%);
  border: 1px solid rgba(255, 205, 120, .55);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .3), inset 0 -3px 6px rgba(0, 0, 0, .55), 0 0 0 2px rgba(34, 8, 3, .85), 0 3px 8px rgba(0, 0, 0, .5);
}
.sp-feature-ico .mp-icon { width: 22px; height: 22px; color: #ffd06a; filter: drop-shadow(0 1px 0 #4a1c02); }
.sp-feature em {
  font-style: normal; font-size: 10px; font-weight: 700; color: #f0cf9b;
  text-shadow: 0 1px 2px #000; white-space: nowrap;
}
.sp-feature:active .sp-feature-ico { transform: scale(.92); }
.sp-dot {
  position: absolute; top: 0; right: 16%;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff3b20; border: 1px solid #ffd0a0;
  box-shadow: 0 0 6px rgba(255, 60, 30, .8);
}

/* 右侧攻击/自动/狂暴 */
.sp-actions {
  position: absolute; right: 14px; bottom: calc(96px + var(--safe-b));
  display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 2;
}
.sp-orb {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 62px; height: 62px; border-radius: 50%;
  color: #ffe7b3;
  background: radial-gradient(circle at 50% 30%, #8a3417 0%, #4d150a 52%, #220703 100%);
  border: 2px solid rgba(255, 200, 110, .6);
  box-shadow: inset 0 2px 0 rgba(255, 230, 170, .28), inset 0 -6px 10px rgba(0, 0, 0, .6), 0 0 0 2px rgba(30, 7, 3, .9), 0 4px 12px rgba(0, 0, 0, .6);
}
.sp-orb .mp-icon { width: 26px; height: 26px; color: #ffd06a; filter: drop-shadow(0 1px 1px #3a1202); }
.sp-orb span { font-size: 10px; font-weight: 800; margin-top: 1px; color: #f0cf9b; }
.sp-orb:active { transform: scale(.93); }
.sp-orb-atk { width: 74px; height: 74px; }
.sp-orb-atk .mp-icon { width: 30px; height: 30px; }
.sp-orb-auto.on {
  border-color: #ffd36b;
  box-shadow: inset 0 2px 0 rgba(255, 230, 170, .35), 0 0 14px rgba(255, 190, 80, .55), 0 0 0 2px rgba(30, 7, 3, .9);
  animation: pulseGold 2.6s infinite;
}
.sp-orb-rage { background: radial-gradient(circle at 50% 30%, #a32615 0%, #5c0f08 52%, #240403 100%); }
.sp-orb-rage .mp-icon { color: #ff9a6a; }

/* 进入游戏主按钮 */
.sp-enter {
  position: absolute; left: 50%; bottom: calc(108px + var(--safe-b)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  height: 46px; padding: 0 26px; border-radius: 23px;
  font-size: 17px; font-weight: 900; letter-spacing: .12em; color: #3a1602;
  background: linear-gradient(180deg, #fff1bd 0%, #ffd36b 45%, #f0a93a 100%);
  border: 1px solid #ffe9b0;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .65), inset 0 -3px 6px rgba(150, 80, 10, .35), 0 6px 18px rgba(0, 0, 0, .55), 0 0 18px rgba(255, 190, 80, .45);
  z-index: 3; animation: pulseGold 2.2s infinite;
}
.sp-enter .mp-icon { width: 20px; height: 20px; }
.sp-enter:active { transform: translateX(-50%) scale(.96); }

/* 底部 tabbar */
.sp-tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: calc(62px + var(--safe-b)); padding: 6px 6px calc(6px + var(--safe-b));
  display: flex; align-items: center; justify-content: space-around;
  background: linear-gradient(180deg, rgba(40, 12, 6, .55), rgba(16, 5, 3, .92));
  border-top: 1px solid rgba(255, 196, 104, .3);
  backdrop-filter: blur(3px);
}
.sp-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: #c49a6a; font-size: 10px; font-weight: 700;
}
.sp-tab .mp-icon { width: 22px; height: 22px; }
.sp-tab:active { transform: scale(.92); }
.sp-tab-center { position: relative; padding-top: 14px; color: #ffd36b; }
.sp-tab-orb {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  font-family: var(--serif); font-size: 22px; font-weight: 900;
  color: #3a1602;
  background: linear-gradient(180deg, #fff1bd, #ffd36b 48%, #e8a52f);
  border: 2px solid #ffe9b0;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 4px 12px rgba(0, 0, 0, .55), 0 0 14px rgba(255, 190, 80, .5);
}

/* splash 隐藏后，原有游戏视图恢复 */
body.splash-hidden #splashStage { display: none; }
body.splash-hidden .view-home { display: block; }
