/* ================= 向僵尸开炮 · 卡通游戏视觉 ================= */
:root {
  --orange: #FF8A3D;
  --orange-deep: #EF6A16;
  --orange-soft: #FFE2C7;
  --gold: #FFC24B;
  --cream: #FFF8EC;
  --paper: #FFFDF8;
  --ink: #211728;
  --ink-2: #4B3F54;
  --muted: #8E8397;
  --line: #EAE0D2;
  --night: #171126;
  --night-2: #241A36;
  --teal: #2EC4B6;
  --green: #52C878;
  --red: #FF4D5E;
  --shadow: 0 10px 24px rgba(33, 23, 40, .12);
  --shadow-soft: 0 4px 14px rgba(33, 23, 40, .08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.mp-icon { width: 1em; height: 1em; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #14101F; color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
}
button, input { font-family: inherit; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
input { user-select: text; -webkit-user-select: text; }
[hidden] { display: none !important; }

.app { position: fixed; inset: 0; overflow: hidden; background: #14101F; }

.screen {
  position: absolute; inset: 0; display: none; flex-direction: column;
  opacity: 0; pointer-events: none; transform: translateY(6px);
}
.screen.is-active { display: flex; opacity: 1; pointer-events: auto; transform: none; }
.screen.animate-in { animation: screenIn .28s cubic-bezier(.22,.8,.3,1) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ================= 开始页 ================= */
.screen-start { background: #171126; overflow: hidden; }
.scene-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,7,18,.34) 0%, rgba(10,7,18,0) 26%, rgba(10,7,18,.16) 48%, rgba(10,7,18,.78) 78%, rgba(10,7,18,.94) 100%),
    radial-gradient(120% 60% at 50% 15%, rgba(255,138,61,.18), transparent 60%);
}
.start-top {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 14px) 16px 0;
}
.player-chip {
  display: flex; align-items: center; gap: 9px; padding: 6px 13px 6px 6px;
  border-radius: 999px; background: rgba(20,14,31,.55); border: 1px solid rgba(255,255,255,.16);
  color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 18px rgba(0,0,0,.2);
}
.player-chip:active { transform: scale(.97); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, #FFB36B, #FF7A2B); color: #3A1B06;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
  overflow: hidden; flex: 0 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .mp-icon { font-size: 19px; }
.player-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.player-meta b { font-size: 13px; font-weight: 800; max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-meta small { font-size: 10px; color: rgba(255,255,255,.7); margin-top: 2px; }
.round-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .12s ease, background .15s;
}
.round-btn .mp-icon { font-size: 21px; }
.round-btn:active { transform: scale(.92); background: rgba(255,255,255,.2); }
.round-btn.small { width: 36px; height: 36px; }
.round-btn.ghost { background: rgba(33,23,40,.06); border: 1px solid var(--line); color: var(--ink); backdrop-filter: none; }
.start-top-right { display: flex; align-items: center; gap: 8px; }
.start-coins {
  display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 11px 0 8px;
  border-radius: 999px; background: rgba(20,14,31,.55); border: 1px solid rgba(255,255,255,.16);
  color: #FFF3E2; font-size: 12px; font-weight: 900; backdrop-filter: blur(12px);
  font-variant-numeric: tabular-nums; box-shadow: 0 8px 18px rgba(0,0,0,.2);
}
.start-coins .mp-icon { font-size: 16px; color: var(--gold); }
.bell { position: relative; }
.dot-badge {
  position: absolute; top: -2px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
  display: none; align-items: center; justify-content: center; border: 2px solid #171126;
}
.dot-badge.show { display: flex; }

.brand {
  position: relative; z-index: 2; padding: 5.2vh 20px 0; text-align: center;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.28));
}
.brand-kicker {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px;
  border-radius: 999px; background: rgba(255,138,61,.13); border: 1px solid rgba(255,138,61,.4);
  color: #FFD9B8; font-size: 11px; font-weight: 700; letter-spacing: .05em;
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255,138,61,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,138,61,.65); } 70% { box-shadow: 0 0 0 8px rgba(255,138,61,0); } 100% { box-shadow: 0 0 0 0 rgba(255,138,61,0); } }
.brand-title {
  margin: 12px 0 0; font-size: clamp(50px, 15vw, 68px); line-height: .9; font-weight: 900;
  letter-spacing: -.055em; color: #FFF6E6; text-shadow: 0 3px 0 #7E3512, 0 7px 0 rgba(0,0,0,.25), 0 18px 32px rgba(0,0,0,.4);
  transform: rotate(-2deg);
}
.brand-title span { display: block; }
.brand-title .accent {
  color: transparent;
  background: linear-gradient(180deg, #FFD56A 8%, #FF9A3D 52%, #F06A0C 100%);
  -webkit-background-clip: text; background-clip: text;
  text-shadow: none; filter: drop-shadow(0 4px 0 #7E3512) drop-shadow(0 10px 18px rgba(0,0,0,.38));
  font-size: 1.1em; letter-spacing: -.04em;
}
.brand-sub {
  margin: 14px 0 0; font-size: 12px; font-weight: 600; color: rgba(255,241,224,.78);
  letter-spacing: .12em;
}

.start-bottom {
  position: relative; z-index: 4; margin-top: auto; width: 100%;
  padding: 14px 16px calc(var(--safe-bottom) + 14px);
  display: flex; flex-direction: column; gap: 10px;
}
.lb-preview {
  background: linear-gradient(180deg, rgba(255,250,241,.97), rgba(255,245,232,.95));
  border: 1px solid rgba(255,255,255,.55); border-radius: 22px; padding: 12px 14px 10px;
  box-shadow: 0 16px 34px rgba(0,0,0,.3), inset 0 1px 0 #fff;
  color: var(--ink);
}
.lb-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lb-preview-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eyebrow { font-size: 10px; font-weight: 800; color: var(--orange-deep); letter-spacing: .12em; }
.lb-preview-title b { font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-btn {
  display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 800; color: var(--orange-deep);
  padding: 5px 2px 5px 8px; white-space: nowrap;
}
.link-btn .mp-icon { font-size: 15px; }
.link-btn.strong { color: var(--orange-deep); font-size: 12px; }
.lb-preview-list { display: flex; flex-direction: column; gap: 4px; margin-top: 7px; min-height: 72px; }
.lb-mini {
  display: flex; align-items: center; gap: 8px; height: 22px; font-size: 11px;
}
.lb-mini .mini-rank {
  width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center;
  font-size: 10px; font-weight: 900; background: #F0E7D9; color: #8C7C67;
}
.lb-mini:nth-child(1) .mini-rank { background: linear-gradient(145deg,#FFE08A,#FFB31F); color: #6B3D00; box-shadow: 0 2px 5px rgba(255,179,31,.4); }
.lb-mini:nth-child(2) .mini-rank { background: linear-gradient(145deg,#E9EFF7,#A9B8CB); color: #405060; }
.lb-mini:nth-child(3) .mini-rank { background: linear-gradient(145deg,#F3C6A0,#CC8C5C); color: #5D2F0D; }
.lb-mini .mini-name { flex: 1; min-width: 0; font-weight: 700; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-mini .mini-coins { font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.lb-mini .mini-coins i { font-style: normal; color: var(--orange-deep); margin-right: 2px; }
.lb-mini.is-me .mini-name { color: var(--orange-deep); }
.lb-skeleton { height: 22px; border-radius: 7px; background: linear-gradient(90deg,#F1E8DA 25%,#FBF5EB 45%,#F1E8DA 65%); background-size: 220% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -120% 0; } }

.play-btn {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 16px 10px 10px; border-radius: 22px; text-align: left; color: #3A1904;
  background: linear-gradient(180deg, #FFB45F 0%, #FF8A3D 46%, #F06B15 100%);
  border: 1px solid #FFC98F; box-shadow: 0 6px 0 #B8490A, 0 16px 26px rgba(240,107,21,.4), inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .1s, box-shadow .1s;
  overflow: hidden;
}
.play-btn::after {
  content: ""; position: absolute; top: -40%; left: -30%; width: 45%; height: 180%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent); animation: sweep 3.4s infinite;
}
@keyframes sweep { 0%, 55% { left: -45%; } 85%, 100% { left: 120%; } }
.play-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #B8490A, 0 8px 14px rgba(240,107,21,.35); }
.play-orb {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(255,255,255,.9); color: #EA620D; box-shadow: 0 3px 0 rgba(126,53,18,.25);
}
.play-orb .mp-icon { font-size: 28px; margin-left: 2px; }
.play-copy { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.play-copy b { font-size: 20px; font-weight: 900; letter-spacing: .02em; }
.play-copy small { font-size: 11px; font-weight: 700; opacity: .72; margin-top: 2px; }
.play-chevron { opacity: .55; }
.play-chevron .mp-icon { font-size: 24px; }
.start-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-action {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 42px;
  border-radius: 15px; color: #FFF3E2; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.mini-action .mp-icon { font-size: 18px; color: #FFC38C; }
.mini-action:active { transform: scale(.97); background: rgba(255,255,255,.16); }

/* ================= 游戏页 ================= */
.screen-game { background: #14101F; }
.game-hud {
  position: relative; z-index: 6; display: flex; align-items: flex-start; justify-content: space-between;
  padding: calc(var(--safe-top) + 9px) 12px 0; pointer-events: none;
}
.hud-side { display: flex; align-items: center; gap: 7px; pointer-events: auto; }
.hud-left { flex: 1; min-width: 0; }
.hud-right { flex: 0 0 auto; }
.level-chip {
  display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px 0 7px;
  border-radius: 11px; background: rgba(18,12,29,.62); border: 1px solid rgba(255,255,255,.14);
  color: #FFF0DB; font-size: 11px; font-weight: 700; backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18); white-space: nowrap;
}
.level-chip .mp-icon { font-size: 17px; color: var(--gold); }
.level-chip b { font-size: 13px; font-weight: 900; }
.hp-card {
  flex: 1; max-width: 148px; min-width: 94px; padding: 5px 9px 6px;
  border-radius: 12px; background: rgba(18,12,29,.62); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px); box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.hp-top { display: flex; align-items: center; gap: 4px; color: #FFE8D2; font-size: 9px; font-weight: 700; }
.hp-top .mp-icon { font-size: 12px; color: #7CE3D2; }
.hp-top b { margin-left: auto; font-size: 9px; font-variant-numeric: tabular-nums; color: #fff; }
.hp-track { height: 6px; border-radius: 99px; background: rgba(255,255,255,.16); margin-top: 4px; overflow: hidden; }
.hp-track span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg,#2EC4B6,#7BE495); transition: width .25s, background .25s; }
.hp-track span.warn { background: linear-gradient(90deg,#FFB020,#FFD166); }
.hp-track span.danger { background: linear-gradient(90deg,#FF3D55,#FF7A7A); animation: hpBlink 1s infinite; }
@keyframes hpBlink { 50% { opacity: .6; } }
.coin-pill {
  display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 8px;
  border-radius: 11px; background: rgba(18,12,29,.62); border: 1px solid rgba(255,255,255,.14);
  color: #fff; font-size: 12px; font-weight: 900; backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18); font-variant-numeric: tabular-nums;
}
.coin-pill .mp-icon { font-size: 16px; color: var(--gold); }
.coin-pill em { width: 5px; height: 5px; border-radius: 50%; background: #5BE28A; margin-left: 2px; opacity: .95; }
.coin-pill em.off { background: #9D93AB; }
.level-progress {
  position: relative; z-index: 6; height: 4px; margin: 8px 16px 0; border-radius: 99px;
  background: rgba(255,255,255,.15); overflow: hidden;
}
.level-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg,#FFB04B,#FF7A2B); transition: width .2s; }

.wave-banner {
  position: absolute; z-index: 7; left: 0; right: 0; top: 27%; text-align: center;
  font-size: 24px; font-weight: 900; letter-spacing: .06em; color: #FFF6E6;
  text-shadow: 0 2px 0 #833E13, 0 8px 18px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(8px); pointer-events: none;
}
.wave-banner.show { animation: bannerUp 1.5s ease both; }
@keyframes bannerUp { 0% { opacity: 0; transform: translateY(14px) scale(.96); } 18%, 74% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
.combo-banner {
  position: absolute; z-index: 8; left: 50%; top: 36%; transform: translate(-50%, 10px);
  padding: 8px 16px; border-radius: 999px; background: linear-gradient(90deg,#FFB347,#FF6A2B);
  border: 1px solid #FFE0B5; color: #401A02; font-size: 13px; font-weight: 900; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(255,106,43,.45); opacity: 0; pointer-events: none;
}
.combo-banner.show { animation: comboPop 2.1s ease both; }
@keyframes comboPop { 0% { opacity: 0; transform: translate(-50%, 16px) scale(.85); } 16%, 76% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -12px) scale(.96); } }
.supply-btn {
  position: absolute; z-index: 7; right: 14px; bottom: calc(var(--safe-bottom) + 104px);
  display: none; align-items: center; gap: 5px; padding: 9px 12px 9px 9px;
  border-radius: 15px; background: linear-gradient(180deg,#FFF6E8,#FFE1BE); color: #6A3206;
  border: 1px solid #FFC98F; box-shadow: 0 6px 16px rgba(0,0,0,.3);
}
.supply-btn.show { display: flex; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.supply-btn .mp-icon { font-size: 20px; color: #E4602B; }
.supply-btn span { font-size: 11px; font-weight: 800; }
.supply-btn span b { color: #E4602B; }
.supply-btn small { font-size: 9px; font-weight: 700; color: #936A45; }
.tap-tip {
  position: absolute; z-index: 6; left: 50%; bottom: calc(var(--safe-bottom) + 96px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
  background: rgba(16,11,25,.48); border: 1px solid rgba(255,255,255,.13); color: rgba(255,244,228,.8);
  font-size: 10px; font-weight: 600; backdrop-filter: blur(8px); opacity: 1; transition: opacity .4s; white-space: nowrap;
}
.tap-tip.hide { opacity: 0; }
.tap-tip .mp-icon { font-size: 13px; color: #7CE3D2; }
.game-dock {
  position: absolute; z-index: 8; left: 10px; right: 10px; bottom: calc(var(--safe-bottom) + 9px);
}
.dock {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 7px 6px;
  border-radius: 22px; background: rgba(19,13,30,.82); border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 30px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.09);
}
.dock-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 52px; border-radius: 15px; color: #E9DDCD; font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
  transition: transform .1s, background .15s;
}
.dock-btn .mp-icon { font-size: 21px; color: #FFD1A1; }
.dock-btn:active { transform: scale(.93); background: rgba(255,255,255,.08); }
.dock-btn.primary {
  background: linear-gradient(180deg,#FFAF5A,#F5761E); color: #3E1A02;
  box-shadow: 0 4px 0 #A84808, 0 8px 14px rgba(245,118,30,.35);
}
.dock-btn.primary .mp-icon { color: #3E1A02; }
.dock-btn.on { background: rgba(255,138,61,.2); }
.dock-badge {
  position: absolute; top: 1px; right: 10%; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: #FF5B69; color: #fff; font-style: normal; font-size: 9px;
  font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 5px rgba(0,0,0,.3);
}

/* ================= 通用页面 ================= */
.page {
  background:
    radial-gradient(90% 40% at 100% 0%, rgba(255,138,61,.16), transparent 60%),
    radial-gradient(70% 30% at 0% 8%, rgba(46,196,182,.12), transparent 60%),
    #F7F1E7;
  color: var(--ink);
}
.page-head {
  position: relative; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
}
.page-title { flex: 1; min-width: 0; }
.page-title h2 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -.03em; color: var(--ink); }
.page-title p { margin: 3px 0 0; font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-btn { flex: 0 0 auto; }
.head-spacer { width: 42px; flex: 0 0 42px; }
.page-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 16px calc(var(--safe-bottom) + 28px); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.page-scroll::-webkit-scrollbar { display: none; }
.my-rank-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 11px;
  border-radius: 11px; background: #fff; border: 1px solid var(--line); color: var(--orange-deep);
  font-size: 11px; font-weight: 800; box-shadow: var(--shadow-soft); flex: 0 0 auto;
}
.my-rank-btn .mp-icon { font-size: 15px; }
.my-rank-btn:active { transform: scale(.96); }

/* ================= 排行榜 ================= */
.lb-hero {
  position: relative; overflow: hidden; margin-top: 4px; padding: 14px 14px 12px;
  border-radius: 24px; color: #FFF6E6;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(255,138,61,.38), transparent 55%),
    linear-gradient(150deg,#271A3E 0%,#1A122B 58%,#21162F 100%);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 18px 34px rgba(37,24,52,.28), inset 0 1px 0 rgba(255,255,255,.09);
}
.lb-hero::before {
  content: ""; position: absolute; right: -46px; top: -52px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,194,75,.22), transparent 68%); pointer-events: none;
}
.lb-hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 700; color: rgba(255,240,220,.66); }
.lb-hero-top span:last-child { color: #FFC98F; }
.gap-card {
  position: relative; display: flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(8px);
}
.gap-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,138,61,.16); color: #FFB36B; flex: 0 0 auto; }
.gap-icon .mp-icon { font-size: 20px; }
.gap-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gap-copy small { font-size: 9.5px; color: rgba(255,240,220,.6); font-weight: 600; }
.gap-copy b { font-size: 13px; font-weight: 800; color: #fff; }
.gap-card.good .gap-icon { background: rgba(46,196,182,.18); color: #7CE3D2; }
.gap-card.good .gap-copy b { color: #9BF0E4; }
.tier-row { position: relative; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 10px; }
.tier {
  display: flex; align-items: center; gap: 7px; padding: 8px 9px; border-radius: 13px;
  background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.08);
}
.tier-medal {
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  font-size: 11px; font-weight: 900; color: #5B3900; flex: 0 0 auto;
}
.tier-1 .tier-medal { background: linear-gradient(145deg,#FFE58D,#FFB31F); box-shadow: 0 3px 8px rgba(255,179,31,.32); }
.tier-2 .tier-medal { background: linear-gradient(145deg,#F1F6FC,#AABAD0); color: #405163; }
.tier-3 .tier-medal { background: linear-gradient(145deg,#F5C9A2,#C98B5A); color: #5B2F0D; }
.tier div { display: flex; flex-direction: column; line-height: 1.1; }
.tier b { font-size: 12.5px; font-weight: 900; }
.tier small { font-size: 8.5px; color: rgba(255,240,220,.55); margin-top: 2px; }

.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 14px 0 10px; padding: 4px;
  border-radius: 15px; background: #EDE4D5; border: 1px solid #E3D8C7;
}
.segmented button {
  height: 36px; border-radius: 11px; font-size: 12px; font-weight: 800; color: #877863;
  transition: all .18s;
}
.segmented button.is-active { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(75,56,33,.12); }

.lb-list { display: flex; flex-direction: column; gap: 7px; }
.lb-row {
  position: relative; display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border-radius: 17px; background: #FFFDF8; border: 1px solid #EEE3D3; box-shadow: 0 3px 10px rgba(75,56,33,.06);
  transition: background .2s, border-color .2s, transform .12s;
}
.lb-row:active { transform: scale(.994); }
.lb-row.rank-1 { background: linear-gradient(100deg,#FFF9E8,#FFF0C8); border-color: #F6D783; box-shadow: 0 7px 18px rgba(214,152,20,.16); }
.lb-row.rank-2 { background: linear-gradient(100deg,#FBFDFF,#EEF3FA); border-color: #D7E2F0; }
.lb-row.rank-3 { background: linear-gradient(100deg,#FFF8F1,#FBEBDD); border-color: #EECFAD; }
.lb-row.is-me { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,138,61,.18), 0 6px 16px rgba(255,138,61,.14); }
.lb-row.is-flash { animation: rowFlash 2s ease both; }
@keyframes rowFlash { 0%, 100% { transform: none; } 12%, 36%, 60% { transform: translateX(-3px) scale(1.008); background: #FFE8D0; } 24%, 48%, 72% { transform: translateX(3px); } }
.lb-rank {
  width: 30px; flex: 0 0 30px; display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.lb-rank .num { font-size: 13px; font-weight: 900; color: #9A8A75; font-variant-numeric: tabular-nums; }
.lb-row.rank-1 .num { color: #D18B00; }
.lb-row.rank-2 .num { color: #6E8299; }
.lb-row.rank-3 .num { color: #A8612A; }
.lb-rank .crown { font-size: 10px; line-height: 1; color: #D18B00; }
.lb-rank .crown .mp-icon { font-size: 13px; }
.lb-ava {
  width: 36px; height: 36px; border-radius: 12px; flex: 0 0 36px; display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: #4A2B10; background: linear-gradient(145deg,#FFD7A9,#FFB06B);
  border: 2px solid rgba(255,255,255,.7); box-shadow: 0 2px 7px rgba(117,71,24,.12); overflow: hidden;
}
.lb-row.rank-1 .lb-ava { background: linear-gradient(145deg,#FFE28C,#FFB62A); }
.lb-row.rank-2 .lb-ava { background: linear-gradient(145deg,#E8F0F9,#B7C7D9); color: #415264; }
.lb-row.rank-3 .lb-ava { background: linear-gradient(145deg,#F7D0AC,#D2905B); color: #5B2F0D; }
.lb-ava img { width: 100%; height: 100%; object-fit: cover; }
.lb-main { flex: 1; min-width: 0; }
.lb-name { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name .me-tag { font-size: 8px; padding: 1px 5px; border-radius: 99px; background: var(--orange); color: #fff; font-weight: 900; flex: 0 0 auto; }
.lb-sub { margin-top: 2px; font-size: 9px; color: #A2957F; display: flex; align-items: center; gap: 4px; }
.lb-sub .up { color: #D07A1E; font-style: normal; font-weight: 800; }
.lb-sub .up .mp-icon { font-size: 11px; vertical-align: -1px; }
.lb-coins { text-align: right; flex: 0 0 auto; }
.lb-coins b { display: block; font-size: 13.5px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.lb-coins b i { font-style: normal; font-size: 10px; color: var(--orange-deep); margin-right: 2px; }
.lb-coins small { display: block; font-size: 8.5px; color: #A89A85; margin-top: 2px; }
.lb-coins small .diff { display: inline-flex; align-items: center; gap: 1px; color: #D07A1E; font-weight: 800; }
.lb-coins small .diff .mp-icon { font-size: 10px; }
.lb-coins small .diff.first { color: #B8A58C; font-weight: 600; }
.lb-coins small .last-amount { display: inline-flex; padding: 1px 4px; font-size: 7.5px; }
.lb-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 34px 20px 30px; text-align: center;
}
.empty-orb { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; background: #F0E6D7; color: #B8A58C; margin-bottom: 6px; }
.empty-orb .mp-icon { font-size: 30px; }
.lb-empty b { font-size: 14px; color: var(--ink-2); }
.lb-empty p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.6; max-width: 240px; }
.self-card {
  margin-top: 10px; padding: 10px 11px; border-radius: 17px;
  background: #241A36; color: #fff; border: 1px solid rgba(255,138,61,.4);
  box-shadow: 0 12px 24px rgba(36,26,54,.24);
}
.self-card .self-head { display: flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 800; color: #FFC38C; letter-spacing: .06em; }
.self-card .self-row { display: flex; align-items: center; gap: 9px; margin-top: 7px; }
.self-card .lb-rank .num { color: #FFC38C; }
.self-card .lb-name { color: #fff; }
.self-card .lb-coins b { color: #fff; }
.self-card .lb-ava { border-color: rgba(255,255,255,.2); }
.self-card .lb-sub { color: rgba(255,255,255,.5); }
.self-card.is-flash { animation: rowFlash 2s ease both; }
.lb-footnote { display: flex; align-items: flex-start; gap: 5px; margin: 14px 4px 0; font-size: 9.5px; line-height: 1.55; color: #A99B87; }
.lb-footnote .mp-icon { font-size: 13px; flex: 0 0 auto; margin-top: 1px; }

.last-note {
  padding: 11px 13px; border-radius: 14px; background: #FFF8EC; border: 1px dashed #E6D2B5;
  font-size: 10.5px; line-height: 1.55; color: #8D7658; margin-bottom: 10px;
}
#lbLastView .lb-row { background: #FFFDF8; }
.last-amount { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 99px; background: #EAF8F0; color: #1D8D55; font-size: 8px; font-weight: 800; }

/* ================= 提现 ================= */
.wd-balance {
  position: relative; overflow: hidden; margin-top: 4px; padding: 18px 16px 14px;
  border-radius: 26px; color: #FFF6E6;
  background:
    radial-gradient(110% 100% at 92% 0%, rgba(255,138,61,.45), transparent 58%),
    linear-gradient(150deg,#2A1B40,#191124 62%,#231630);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 20px 38px rgba(36,24,50,.3), inset 0 1px 0 rgba(255,255,255,.1);
}
.wd-balance-glow { position: absolute; right: -26px; bottom: -58px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle,rgba(46,196,182,.16),transparent 70%); }
.wd-balance small { display: block; font-size: 10px; font-weight: 700; color: rgba(255,240,220,.62); letter-spacing: .08em; }
.wd-balance > b { display: block; margin-top: 4px; font-size: 38px; line-height: 1; font-weight: 900; letter-spacing: -.03em; color: #FFD9A8; text-shadow: 0 3px 0 rgba(92,45,12,.5); font-variant-numeric: tabular-nums; }
.wd-balance p { margin: 7px 0 0; font-size: 10px; color: rgba(255,240,220,.55); }
.wd-balance-tags { display: flex; gap: 6px; margin-top: 11px; }
.wd-balance-tags span { display: inline-flex; align-items: center; gap: 3px; padding: 4px 7px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 9px; color: rgba(255,240,220,.72); border: 1px solid rgba(255,255,255,.08); }
.wd-balance-tags .mp-icon { font-size: 11px; color: #FFC38C; }

.wd-section { margin-top: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 3px 8px; }
.section-head h3 { margin: 0; font-size: 14px; font-weight: 900; color: var(--ink); }
.section-head span { font-size: 9px; color: #A29380; font-weight: 600; }
.wd-rewards { display: flex; flex-direction: column; gap: 7px; }
.reward-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 17px;
  background: #FFFDF8; border: 1px solid #EDE2D1; box-shadow: 0 3px 10px rgba(75,56,33,.06);
}
.reward-icon { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; background: #FFF1DD; color: #D9741D; }
.reward-icon.week { background: linear-gradient(145deg,#FFE5A1,#FFC24B); color: #6B3D00; }
.reward-icon.ad { background: linear-gradient(145deg,#D9F7F2,#8CE8DC); color: #117C70; }
.reward-icon .mp-icon { font-size: 21px; }
.reward-main { flex: 1; min-width: 0; }
.reward-main b { display: block; font-size: 12px; font-weight: 800; color: var(--ink); }
.reward-main small { display: block; margin-top: 2px; font-size: 9px; color: #A29380; }
.reward-amount { text-align: right; flex: 0 0 auto; }
.reward-amount b { display: block; font-size: 15px; font-weight: 900; color: var(--orange-deep); font-variant-numeric: tabular-nums; }
.reward-amount small { font-size: 8px; color: #A29380; }
.reward-go {
  height: 32px; padding: 0 11px; border-radius: 10px; background: linear-gradient(180deg,#FFA955,#F2741C);
  color: #3E1A02; font-size: 10.5px; font-weight: 900; box-shadow: 0 3px 0 #AE4B09;
}
.reward-go:active { transform: translateY(2px); box-shadow: 0 1px 0 #AE4B09; }
.reward-go.done { background: #EDE4D6; color: #A29380; box-shadow: none; }
.reward-go.pending { background: #FFE4C3; color: #A85E14; box-shadow: none; }
.tier-mini-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 8px; }
.tier-mini { padding: 8px 6px; border-radius: 13px; text-align: center; border: 1px solid transparent; }
.tier-mini b { display: block; font-size: 14px; font-weight: 900; }
.tier-mini span { display: block; margin-top: 1px; font-size: 8px; font-weight: 700; opacity: .7; }
.tier-mini.gold { background: #FFF5D6; border-color: #F2DA9B; color: #A87500; }
.tier-mini.silver { background: #EFF4FA; border-color: #D7E2EE; color: #657A92; }
.tier-mini.bronze { background: #FDF0E4; border-color: #F0D6BF; color: #A26532; }

.ad-progress-card { padding: 12px 13px; border-radius: 18px; background: #FFFDF8; border: 1px solid #EDE2D1; box-shadow: 0 3px 10px rgba(75,56,33,.06); }
.ad-progress-top { display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 700; color: #8A7A64; }
.ad-progress-top b { color: var(--ink); font-size: 12px; font-weight: 900; }
.ad-progress-top b#adRemainText { color: var(--orange-deep); font-size: 10px; }
.ad-track { height: 9px; margin-top: 7px; border-radius: 99px; background: #F0E7D8; overflow: hidden; }
.ad-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg,#FFB45F,#FF7A2B); transition: width .3s; }
.ad-note { display: flex; align-items: center; gap: 4px; margin-top: 7px; font-size: 9px; color: #A29380; }
.ad-note .mp-icon { font-size: 12px; color: #C58C53; }
.wd-logs { display: flex; flex-direction: column; gap: 6px; }
.wd-log {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 13px;
  background: #FFFDF8; border: 1px solid #EFE5D6;
}
.wd-log-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #F4EBDD; color: #9A8368; flex: 0 0 auto; }
.wd-log-icon .mp-icon { font-size: 16px; }
.wd-log-main { flex: 1; min-width: 0; }
.wd-log-main b { display: block; font-size: 11px; font-weight: 800; color: var(--ink-2); }
.wd-log-main small { display: block; margin-top: 1px; font-size: 8.5px; color: #A89A85; }
.wd-log-status { font-size: 9px; font-weight: 800; color: #A29380; }
.wd-log-status.ok { color: #1D8D55; }
.wd-log-status.fail { color: var(--red); }
.empty-tip { padding: 18px 12px; text-align: center; font-size: 10.5px; color: #A29380; border-radius: 14px; border: 1px dashed #E4D7C4; background: rgba(255,253,248,.55); }
.safe-note { display: flex; align-items: flex-start; gap: 6px; margin: 18px 3px 0; font-size: 9px; line-height: 1.6; color: #AA9B87; }
.safe-note .mp-icon { font-size: 13px; flex: 0 0 auto; margin-top: 1px; color: #C0A57C; }

/* ================= 通知 ================= */
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.notice-card {
  position: relative; padding: 12px 13px; border-radius: 17px; background: #FFFDF8;
  border: 1px solid #EDE2D1; box-shadow: 0 3px 10px rgba(75,56,33,.06);
}
.notice-card.unread { border-color: #FFC58F; background: #FFF9F0; }
.notice-card.unread::before { content: ""; position: absolute; top: 14px; right: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.notice-top { display: flex; align-items: center; gap: 6px; font-size: 9px; color: #A29380; }
.notice-top .mp-icon { font-size: 13px; color: var(--orange-deep); }
.notice-card h4 { margin: 5px 0 3px; font-size: 12.5px; font-weight: 900; color: var(--ink); padding-right: 12px; }
.notice-card p { margin: 0; font-size: 10.5px; line-height: 1.55; color: #7E6F5C; }
.notice-action { display: inline-flex; align-items: center; gap: 2px; margin-top: 7px; padding: 4px 8px; border-radius: 8px; background: #FFF0DC; color: var(--orange-deep); font-size: 9.5px; font-weight: 800; }
.notice-action .mp-icon { font-size: 12px; }

/* ================= 底部弹层 ================= */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(15,10,24,.56); backdrop-filter: blur(3px); animation: fadeIn .2s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 86vh;
  display: flex; flex-direction: column; border-radius: 28px 28px 0 0;
  background: #FFF9F0; box-shadow: 0 -18px 40px rgba(0,0,0,.3);
  animation: sheetUp .28s cubic-bezier(.22,.85,.32,1) both;
  padding-bottom: var(--safe-bottom);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet.closing { animation: sheetDown .22s ease both; }
@keyframes sheetDown { to { transform: translateY(100%); } }
.sheet-grab { width: 40px; height: 4px; border-radius: 99px; background: #DCCDB9; margin: 8px auto 0; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px 10px; flex: 0 0 auto; }
.sheet-head small { font-size: 9px; font-weight: 800; letter-spacing: .12em; color: var(--orange-deep); }
.sheet-head h3 { margin: 2px 0 0; font-size: 20px; font-weight: 900; letter-spacing: -.03em; color: var(--ink); }
.sheet-head .round-btn { background: #F3EADC; border-color: #E8DAC7; color: #7D6A54; }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 16px calc(var(--safe-bottom) + 18px); scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }

/* 装备 */
.equip-summary { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 17px; background: linear-gradient(135deg,#2A1B40,#1C132C); color: #fff; margin-bottom: 11px; }
.equip-summary .es-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,138,61,.18); color: #FFB36B; }
.equip-summary .es-icon .mp-icon { font-size: 21px; }
.equip-summary .es-main { flex: 1; }
.equip-summary .es-main b { display: block; font-size: 12px; font-weight: 800; }
.equip-summary .es-main small { display: block; margin-top: 2px; font-size: 9px; color: rgba(255,255,255,.55); }
.equip-summary .es-bonus { font-size: 16px; font-weight: 900; color: #FFC38C; }
.equip-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.slot {
  position: relative; min-height: 92px; padding: 9px; border-radius: 17px; text-align: left;
  background: #FFFDF8; border: 1.5px solid #EADFCE; box-shadow: 0 3px 9px rgba(75,56,33,.05);
  transition: border-color .15s, transform .1s;
}
.slot:active { transform: scale(.98); }
.slot.locked { border-style: dashed; background: #F6EFE4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; }
.slot.locked .lock-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #EADFCE; color: #A18A6D; }
.slot.locked .lock-ico .mp-icon { font-size: 18px; }
.slot.locked b { font-size: 10px; color: #8A755B; }
.slot.locked small { font-size: 8px; color: #B09A7D; line-height: 1.3; }
.slot.locked .unlock-ad { margin-top: 2px; padding: 4px 8px; border-radius: 8px; background: linear-gradient(180deg,#FFA955,#F2741C); color: #3E1A02; font-size: 9px; font-weight: 900; }
.slot.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-style: dashed; color: #B4A189; }
.slot.empty .mp-icon { font-size: 24px; }
.slot.empty b { font-size: 9.5px; font-weight: 700; }
.slot.selected { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,138,61,.2); }
.slot.tier-0 { border-color: #D8CBB9; }
.slot.tier-1 { border-color: #79A8E8; background: #F5F9FF; }
.slot.tier-2 { border-color: #B483E8; background: #FAF5FF; }
.slot.tier-3 { border-color: #FFB13D; background: #FFF9EC; }
.slot-top { display: flex; align-items: center; justify-content: space-between; }
.q-badge { font-size: 8px; font-weight: 900; padding: 2px 6px; border-radius: 99px; background: #EFE6D8; color: #877760; }
.tier-1 .q-badge { background: #E2EEFF; color: #3A6FB8; }
.tier-2 .q-badge { background: #F0E2FF; color: #7B45B3; }
.tier-3 .q-badge { background: #FFE8BD; color: #A66B00; }
.slot-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: #F3EADC; color: #7A6044; margin-top: 4px; }
.slot-ico .mp-icon { font-size: 19px; }
.tier-1 .slot-ico { background: #E7F0FF; color: #3A6FB8; }
.tier-2 .slot-ico { background: #F3E8FF; color: #7B45B3; }
.tier-3 .slot-ico { background: #FFF0CC; color: #A66B00; }
.slot-name { margin-top: 5px; font-size: 11px; font-weight: 900; color: var(--ink); }
.slot-bonus { margin-top: 1px; font-size: 8.5px; color: #8F806C; }
.slot-bonus b { color: var(--orange-deep); }
.slot-hint { position: absolute; right: 8px; bottom: 7px; font-size: 7.5px; color: #B7A68F; }
.equip-refresh {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 46px; margin-top: 10px;
  border-radius: 15px; background: linear-gradient(180deg,#FFAC55,#F2731B); color: #3F1A02;
  font-size: 13px; font-weight: 900; box-shadow: 0 4px 0 #AC4909, 0 9px 16px rgba(242,115,27,.25);
}
.equip-refresh:active { transform: translateY(2px); box-shadow: 0 2px 0 #AC4909; }
.equip-refresh:disabled { background: #E7DCCB; color: #A99A87; box-shadow: none; }
.equip-refresh .mp-icon { font-size: 19px; }
.pool-title { display: flex; align-items: center; justify-content: space-between; margin: 13px 2px 7px; }
.pool-title b { font-size: 11px; font-weight: 900; color: var(--ink-2); }
.pool-title span { font-size: 8.5px; color: #A2937E; }
.pool-list { display: flex; flex-direction: column; gap: 7px; }
.pool-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 15px;
  background: #FFFDF8; border: 1px solid #EADFCE;
}
.pool-item .slot-ico { margin-top: 0; flex: 0 0 auto; }
.pool-main { flex: 1; min-width: 0; }
.pool-main b { display: block; font-size: 11px; font-weight: 800; }
.pool-main small { display: block; margin-top: 1px; font-size: 8.5px; color: #9B8B76; }
.pool-main small em { font-style: normal; color: var(--orange-deep); font-weight: 800; }
.pool-btn { height: 30px; padding: 0 10px; border-radius: 9px; font-size: 9.5px; font-weight: 900; background: #FFF0DD; color: #B45B13; border: 1px solid #F4D5B1; }
.pool-btn.ad { background: linear-gradient(180deg,#FFA955,#F2741C); color: #3E1A02; border: 0; }
.equip-hint { display: flex; align-items: flex-start; gap: 5px; margin: 11px 2px 0; font-size: 9px; line-height: 1.55; color: #A29380; }
.equip-hint .mp-icon { font-size: 13px; margin-top: 1px; flex: 0 0 auto; }

/* 道具 */
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 17px;
  background: #FFFDF8; border: 1px solid #EADFCE; box-shadow: 0 3px 9px rgba(75,56,33,.05);
}
.item-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; }
.item-ico .mp-icon { font-size: 23px; }
.item-ico.freeze { background: #E2F5FF; color: #2388B8; }
.item-ico.bomb { background: #FFE7DD; color: #D95B24; }
.item-ico.heal { background: #E3F8E9; color: #2D9A58; }
.item-main { flex: 1; min-width: 0; }
.item-main b { display: block; font-size: 12px; font-weight: 900; }
.item-main small { display: block; margin-top: 2px; font-size: 8.5px; color: #9B8B76; }
.item-uses { display: flex; gap: 3px; margin-top: 5px; }
.item-uses i { width: 18px; height: 4px; border-radius: 99px; background: #EDE3D4; }
.item-uses i.on { background: var(--orange); }
.item-use { height: 34px; padding: 0 12px; border-radius: 10px; background: linear-gradient(180deg,#FFA955,#F2741C); color: #3E1A02; font-size: 10.5px; font-weight: 900; box-shadow: 0 3px 0 #AC4909; }
.item-use:active { transform: translateY(2px); box-shadow: 0 1px 0 #AC4909; }
.item-use:disabled { background: #E7DCCB; color: #AC9D8A; box-shadow: none; }
.ad-item-card { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 11px 12px; border-radius: 17px; background: linear-gradient(120deg,#EFE1FF,#F8F1FF); border: 1px solid #E3CFF8; }
.ad-item-card .ad-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: #8B4CC4; flex: 0 0 auto; }
.ad-item-card .ad-ico .mp-icon { font-size: 21px; }
.ad-item-main { flex: 1; }
.ad-item-main b { font-size: 11px; font-weight: 900; color: #5A3278; }
.ad-item-main small { display: block; margin-top: 2px; font-size: 8.5px; color: #8C74A2; }
.ad-item-btn { height: 33px; padding: 0 10px; border-radius: 9px; background: #8B4CC4; color: #fff; font-size: 9.5px; font-weight: 900; }
.ad-item-btn:disabled { background: #DCD0E7; color: #A08CB2; }

/* 我的 */
.profile-card { display: flex; align-items: center; gap: 11px; padding: 14px; border-radius: 20px; background: linear-gradient(135deg,#2A1B40,#1B1229); color: #fff; margin-bottom: 10px; }
.profile-card .avatar { width: 48px; height: 48px; }
.profile-card .avatar .mp-icon { font-size: 27px; }
.profile-main { flex: 1; min-width: 0; }
.profile-main b { display: block; font-size: 15px; font-weight: 900; }
.profile-main small { display: block; margin-top: 3px; font-size: 9.5px; color: rgba(255,255,255,.55); }
.profile-edit { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #FFC38C; }
.profile-edit .mp-icon { font-size: 17px; }
.profile-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 11px; }
.pstat { padding: 10px 6px; border-radius: 14px; background: #FFFDF8; border: 1px solid #EADFCE; text-align: center; }
.pstat b { display: block; font-size: 15px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.pstat small { display: block; margin-top: 2px; font-size: 8px; color: #A29380; }
.profile-links { display: flex; flex-direction: column; gap: 6px; }
.p-link { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 14px; background: #FFFDF8; border: 1px solid #EADFCE; text-align: left; }
.p-link .p-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #FFF1DD; color: #C66B1E; }
.p-link .p-ico .mp-icon { font-size: 18px; }
.p-link b { flex: 1; font-size: 11px; font-weight: 800; color: var(--ink-2); }
.p-link small { font-size: 9px; color: #A29380; }
.p-link .mp-icon.arrow { font-size: 16px; color: #C3B29C; }
.p-link .badge-num { min-width: 18px; height: 18px; border-radius: 99px; background: var(--red); color: #fff; font-size: 9px; font-weight: 900; display: grid; place-items: center; padding: 0 5px; }

/* ================= 弹窗 ================= */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(12,8,20,.66); backdrop-filter: blur(5px); animation: fadeIn .18s both; }
.modal { width: 100%; max-width: 380px; max-height: 84vh; overflow-y: auto; border-radius: 26px; background: #FFF9F0; box-shadow: 0 30px 60px rgba(0,0,0,.4); animation: modalPop .26s cubic-bezier(.22,.9,.3,1) both; scrollbar-width: none; }
.modal::-webkit-scrollbar { display: none; }
@keyframes modalPop { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.modal-inner { padding: 18px 16px calc(var(--safe-bottom) + 16px); }
.modal-close { position: absolute; right: 14px; top: 14px; }
.modal-ico { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; margin: 4px auto 10px; background: #FFE8D0; color: #D96718; }
.modal-ico .mp-icon { font-size: 31px; }
.modal-ico.gold { background: linear-gradient(145deg,#FFE7A3,#FFC24B); color: #6B3D00; }
.modal-ico.green { background: #E1F8E8; color: #24945A; }
.modal-ico.purple { background: #F0E4FF; color: #7B45B3; }
.modal-ico.red { background: #FFE2E5; color: #D83245; }
.modal-title { margin: 0; text-align: center; font-size: 23px; font-weight: 900; letter-spacing: -.03em; color: var(--ink); }
.modal-sub { margin: 5px auto 0; text-align: center; font-size: 11px; line-height: 1.6; color: #8F806C; max-width: 290px; }
.modal-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 13px 0; }
.modal-stat { padding: 9px 4px; border-radius: 13px; background: #F6EEDF; text-align: center; }
.modal-stat b { display: block; font-size: 15px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.modal-stat small { display: block; margin-top: 1px; font-size: 8px; color: #9B8B76; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 47px;
  border-radius: 15px; font-size: 13px; font-weight: 900; transition: transform .1s, box-shadow .1s;
}
.btn .mp-icon { font-size: 19px; }
.btn:active { transform: translateY(2px); }
.btn-primary { background: linear-gradient(180deg,#FFAC55,#F2731B); color: #3F1A02; box-shadow: 0 4px 0 #AC4909; }
.btn-primary:active { box-shadow: 0 2px 0 #AC4909; }
.btn-teal { background: linear-gradient(180deg,#40D7C8,#16A99B); color: #053A35; box-shadow: 0 4px 0 #087D73; }
.btn-teal:active { box-shadow: 0 2px 0 #087D73; }
.btn-ghost { background: #F0E7D9; color: #6E5E4A; box-shadow: none; border: 1px solid #E6D7C2; }
.btn-ad { background: linear-gradient(180deg,#9B5BE0,#7640B8); color: #fff; box-shadow: 0 4px 0 #51277F; }
.btn-ad:active { box-shadow: 0 2px 0 #51277F; }
.btn-sm { min-height: 40px; font-size: 12px; }
.btn:disabled { opacity: .5; }

.upgrade-list { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; max-height: 36vh; overflow-y: auto; scrollbar-width: none; }
.upgrade-list::-webkit-scrollbar { display: none; }
.upgrade-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 13px; background: #F8F1E5; border: 1px solid #EDE1CF; }
.upgrade-ava { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #FFE3C4; color: #A95B14; flex: 0 0 auto; }
.upgrade-ava .mp-icon { font-size: 18px; }
.upgrade-main { flex: 1; }
.upgrade-main b { display: block; font-size: 10.5px; font-weight: 900; }
.upgrade-main small { display: block; margin-top: 1px; font-size: 8px; color: #9B8B76; }
.upgrade-main small em { font-style: normal; color: var(--orange-deep); font-weight: 800; }
.upgrade-btn { height: 29px; padding: 0 9px; border-radius: 8px; background: #FFE6C7; color: #AC570F; font-size: 9px; font-weight: 900; border: 1px solid #F2CEA3; white-space: nowrap; }
.upgrade-btn:disabled { background: #E9DFD0; color: #A99A87; border-color: #E0D2BF; }
.upgrade-btn.max { background: #E3F8E9; color: #2D9A58; border-color: #BEE9CB; }
.field { margin-top: 10px; }
.field label { display: block; font-size: 10px; font-weight: 800; color: #7E6D58; margin: 0 2px 5px; }
.field input {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 13px; background: #FFFDF8;
  border: 1.5px solid #E5D7C3; color: var(--ink); font-size: 13px; outline: none;
}
.field input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,138,61,.14); }
.modal-error { margin: 8px 2px 0; padding: 8px 10px; border-radius: 10px; background: #FFE9E9; color: #C43A45; font-size: 10px; line-height: 1.5; }
.wd-confirm-amount { text-align: center; margin: 8px 0 2px; }
.wd-confirm-amount b { font-size: 36px; font-weight: 900; color: var(--orange-deep); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wd-confirm-amount small { display: block; margin-top: 2px; font-size: 9.5px; color: #A29380; }
.wd-name-note { font-size: 8.5px; color: #A29380; line-height: 1.5; margin-top: 5px; }

/* ================= 广告模拟 ================= */
.ad-overlay { position: fixed; inset: 0; z-index: 90; background: #08060D; display: flex; align-items: stretch; justify-content: center; }
.ad-stage { position: relative; width: 100%; overflow: hidden; background: radial-gradient(100% 70% at 50% 20%, #2B1C47, #0B0813 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.ad-scanline { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0 1px, transparent 1px 4px); opacity: .5; pointer-events: none; }
.ad-zombie { position: relative; width: 150px; height: 150px; border-radius: 46% 46% 40% 40%; background: radial-gradient(circle at 36% 32%, #89BB63, #3C6B32 70%); box-shadow: 0 0 60px rgba(124,227,130,.15); animation: adFloat 2.4s ease-in-out infinite; }
@keyframes adFloat { 50% { transform: translateY(-10px) rotate(-2deg); } }
.ad-zombie::before, .ad-zombie::after { content: ""; position: absolute; top: 44%; width: 62px; height: 30px; border-radius: 15px; background: #4F7A3D; }
.ad-zombie::before { left: -44px; transform: rotate(12deg); }
.ad-zombie::after { right: -44px; transform: rotate(-12deg); }
.ad-zombie-eye { position: absolute; top: 38%; left: 34%; width: 18px; height: 18px; border-radius: 50%; background: #FFD34D; box-shadow: 0 0 16px #FFD34D; }
.ad-zombie-eye.right { left: auto; right: 34%; }
.ad-zombie-eye::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #0C0A10; }
.ad-copy { position: relative; text-align: center; margin-top: 26px; }
.ad-copy small { display: block; font-size: 9px; letter-spacing: .3em; color: rgba(255,255,255,.4); }
.ad-copy b { display: block; margin-top: 6px; font-size: 19px; font-weight: 900; color: #fff; letter-spacing: .06em; }
.ad-copy p { margin: 6px 0 0; font-size: 10px; color: rgba(255,255,255,.45); }
.ad-timer { position: relative; width: 58px; height: 58px; margin-top: 26px; display: grid; place-items: center; }
.ad-timer span { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#FF8A3D var(--p, 0deg), rgba(255,255,255,.12) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.ad-timer b { font-size: 18px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.ad-brand { position: absolute; bottom: calc(var(--safe-bottom) + 20px); font-size: 9px; letter-spacing: .18em; color: rgba(255,255,255,.28); }

/* ================= toast ================= */
.toast {
  position: fixed; z-index: 120; left: 50%; top: calc(var(--safe-top) + 66px); transform: translate(-50%, -10px);
  max-width: 86vw; padding: 9px 14px; border-radius: 13px; background: rgba(24,17,36,.94);
  border: 1px solid rgba(255,255,255,.14); color: #FFF3E2; font-size: 11px; font-weight: 700;
  line-height: 1.45; text-align: center; opacity: 0; pointer-events: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.3); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 小屏压缩 */
@media (max-height: 700px) {
  .brand { padding-top: 3vh; }
  .brand-title { font-size: clamp(42px, 13vw, 56px); }
  .brand-sub { margin-top: 9px; }
  .lb-preview { padding: 9px 12px 8px; border-radius: 19px; }
  .lb-preview-list { min-height: 64px; margin-top: 5px; }
  .lb-mini { height: 19px; }
  .play-btn { padding: 8px 13px 8px 8px; }
  .play-orb { width: 38px; height: 38px; }
  .play-copy b { font-size: 18px; }
  .mini-action { height: 38px; }
  .start-bottom { gap: 8px; padding-top: 10px; }
}
@media (max-width: 350px) {
  .hp-card { max-width: 118px; }
  .level-chip { padding-right: 7px; font-size: 10px; }
  .dock-btn { font-size: 9px; }
  .page-head { padding-left: 12px; padding-right: 12px; }
  .page-scroll { padding-left: 12px; padding-right: 12px; }
  .my-rank-btn { padding: 0 8px; font-size: 10px; }
}
