/* ============ 峡谷争锋 · MOBA H5 ============ */
:root {
  --orange: #FF8A3D;
  --orange-deep: #F2661F;
  --orange-light: #FFB77E;
  --ink: #1D2C31;
  --muted: #75857F;
  --cream: #FFF8EC;
  --cream-2: #FFFDF8;
  --line: rgba(29, 44, 49, .09);
  --blue: #3FA9FF;
  --red: #FF5A5F;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #0A1E1B; color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:active { outline: none; }
h1, h2, h3, p { margin: 0; }
.app-shell {
  position: relative; width: 100%; max-width: 560px; height: 100vh; height: 100dvh;
  margin: 0 auto; overflow: hidden; background: #0A1E1B;
  box-shadow: 0 0 60px rgba(0, 0, 0, .5);
}
.screen { display: none; position: absolute; inset: 0; }
.screen.is-active { display: block; }
.mp-icon { width: 22px; height: 22px; }
.mp-icon.sm { width: 16px; height: 16px; }
.mp-icon.xs { width: 13px; height: 13px; }

/* ================= 开始页 ================= */
.home {
  flex-direction: column; overflow: hidden;
  background:
    radial-gradient(120% 50% at 78% 4%, rgba(255, 230, 168, .55), rgba(255, 230, 168, 0) 58%),
    linear-gradient(180deg, #63C6BE 0%, #8BD8CE 26%, #A9E4D4 46%, #AEDFA2 58%, #77C97B 82%, #4DA65F 100%);
}
.home.is-active { display: flex; }
.home-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sun-glow {
  position: absolute; top: -90px; right: -70px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 205, .95), rgba(255, 240, 180, .18) 55%, rgba(255, 240, 180, 0) 72%);
}
.cloud {
  position: absolute; height: 24px; border-radius: 999px;
  background: rgba(255, 255, 255, .52); filter: blur(.4px);
  animation: cloudDrift 26s ease-in-out infinite alternate;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 34px; height: 34px; left: 16px; top: -16px; }
.cloud::after { width: 24px; height: 24px; right: 18px; top: -10px; }
.cloud.c1 { width: 76px; top: 92px; left: -20px; opacity: .55; }
.cloud.c2 { width: 58px; top: 168px; right: 16px; opacity: .48; animation-delay: -8s; }
.cloud.c3 { width: 46px; top: 42px; left: 48%; opacity: .38; animation-delay: -15s; }
.hill {
  position: absolute; border-radius: 50% 50% 0 0; bottom: 34%; opacity: .5;
}
.hill.h1 { left: -16%; width: 78%; height: 150px; background: #62B77C; transform: rotate(-3deg); }
.hill.h2 { right: -20%; width: 86%; height: 132px; background: #4E9F6E; transform: rotate(3deg); }

.home-top {
  position: relative; z-index: 5; flex: 0 0 auto;
  padding: calc(10px + var(--safe-t)) 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.profile {
  display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 208px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .28); border: 1px solid rgba(255, 255, 255, .48);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(12, 82, 72, .12);
  color: #0D3E38; text-align: left;
}
.profile:active { transform: scale(.97); }
.avatar {
  width: 35px; height: 35px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: #FFF3D9; border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 2px 6px rgba(12, 82, 72, .18);
}
.avatar svg, .avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.18; }
.profile-meta b { font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-meta small { font-size: 9px; opacity: .72; margin-top: 2px; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.coin-chip {
  display: flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px 0 7px;
  border-radius: 999px; background: rgba(255, 250, 235, .82); border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 3px 10px rgba(12, 82, 72, .12); color: #7A4A00; font-size: 11.5px;
}
.coin-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #FFF2AE, #FFC93C 52%, #E08C0B);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
  position: relative; flex: 0 0 auto;
}
.coin-dot::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  border: 1.5px solid rgba(146, 84, 0, .5);
}
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .26); border: 1px solid rgba(255, 255, 255, .45);
  color: #0D3E38; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn .mp-icon { width: 19px; height: 19px; }
.icon-btn.dark { background: #F1E7D6; color: #6A5A48; border-color: transparent; }

.home-hero { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.logo { position: relative; z-index: 3; text-align: center; padding-top: 2px; pointer-events: none; }
.logo-en {
  display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: 3px;
  color: rgba(255, 255, 255, .92); padding: 2px 9px; border-radius: 999px;
  background: rgba(16, 92, 82, .2); border: 1px solid rgba(255, 255, 255, .3);
}
.logo h1 {
  margin-top: 2px; font-size: clamp(28px, 8.6vw, 38px); line-height: 1.06; font-weight: 900;
  letter-spacing: 2px; color: #FFFDF4;
  text-shadow: 0 2px 0 rgba(22, 104, 92, .35), 0 8px 22px rgba(9, 64, 56, .28);
}
.logo h1 span { color: #FFD08A; text-shadow: 0 2px 0 rgba(146, 66, 8, .35), 0 8px 22px rgba(9, 64, 56, .28); }

.hero-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.stage-ring {
  position: absolute; width: min(54vw, 232px); height: min(54vw, 232px); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 214, .5) 0%, rgba(255, 246, 214, .16) 48%, rgba(255, 255, 255, 0) 70%);
  border: 1px solid rgba(255, 255, 255, .22);
}
.stage-ring::before, .stage-ring::after {
  content: ""; position: absolute; inset: 12px; border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .34);
  animation: ringSpin 26s linear infinite;
}
.stage-ring::after { inset: -12px; border-style: dotted; opacity: .35; animation-direction: reverse; animation-duration: 34s; }
.stage-spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #FFF4C2; box-shadow: 0 0 12px #FFE48A; animation: sparkle 2.8s ease-in-out infinite; }
.stage-spark.s1 { left: 20%; top: 40%; }
.stage-spark.s2 { right: 18%; top: 28%; animation-delay: -1.1s; }
.stage-spark.s3 { right: 26%; bottom: 22%; animation-delay: -2s; }
.hero-art {
  position: relative; z-index: 2; width: min(62vw, 252px); height: 100%; max-height: 260px;
  display: flex; align-items: center; justify-content: center;
  animation: heroFloat 4.6s ease-in-out infinite;
  filter: drop-shadow(0 16px 18px rgba(8, 68, 58, .26));
}
.hero-art svg { width: 100%; height: 100%; overflow: visible; }
.hero-arrow {
  position: absolute; z-index: 4; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: rgba(255, 255, 255, .95); background: rgba(16, 92, 82, .22);
  border: 1px solid rgba(255, 255, 255, .34); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero-arrow.left { left: 8px; }
.hero-arrow.right { right: 8px; }
.hero-arrow:active { transform: translateY(-50%) scale(.9); background: rgba(16, 92, 82, .4); }
.hero-nameplate {
  position: absolute; z-index: 4; bottom: 2px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(11, 68, 60, .34); border: 1px solid rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; box-shadow: 0 6px 16px rgba(8, 58, 51, .18);
}
.hero-nameplate b { font-size: 15px; font-weight: 900; letter-spacing: 1px; }
.hero-nameplate small { font-size: 9px; opacity: .78; }
.role-tag {
  font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 6px;
  background: #FFD08A; color: #7A3A06;
}

.home-sheet {
  position: relative; z-index: 6; flex: 0 0 auto; max-height: 58%;
  padding: 8px 15px calc(10px + var(--safe-b));
  background: linear-gradient(180deg, #FFF9EF 0%, #FFF6E8 100%);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -16px 36px rgba(7, 56, 48, .2), inset 0 1px 0 rgba(255, 255, 255, .9);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
}
.home-sheet::-webkit-scrollbar { display: none; }
.sheet-handle { width: 34px; height: 4px; border-radius: 999px; background: #E4D8C5; margin: 0 auto 7px; }
.row-title { display: flex; align-items: baseline; justify-content: space-between; }
.row-title span { font-size: 12.5px; font-weight: 900; color: #2C3B36; letter-spacing: .3px; }
.row-title small { font-size: 9px; color: #9A8F7E; }

.hero-strip { display: flex; gap: 6px; overflow-x: auto; padding: 7px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hero-strip::-webkit-scrollbar { display: none; }
.hero-card {
  flex: 0 0 auto; width: 54px; padding: 4px 3px 5px; border-radius: 15px;
  background: #fff; border: 2px solid transparent;
  box-shadow: 0 3px 8px rgba(96, 78, 48, .08);
  scroll-snap-align: center; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  position: relative;
}
.hero-card .hc-avatar { width: 43px; height: 43px; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #F3EADA; }
.hero-card .hc-avatar svg { width: 100%; height: 100%; display: block; }
.hero-card b { display: block; text-align: center; font-size: 9.5px; font-weight: 700; color: #5C6A64; margin-top: 3px; }
.hero-card.on { border-color: var(--orange); transform: translateY(-3px); box-shadow: 0 7px 14px rgba(242, 102, 31, .22); }
.hero-card.on b { color: #B9501A; font-weight: 900; }
.hero-card.on::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 0 2px #fff;
}
.hero-card:active { transform: scale(.94); }

.skill-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 7px; }
.skill-mini {
  display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 10px;
  background: #fff; border: 1px solid #F0E4D2; box-shadow: 0 2px 5px rgba(96, 78, 48, .05);
  min-width: 0;
}
.skill-mini .sk-badge {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  background: linear-gradient(145deg, #FFB069, #FF7B32); color: #fff; font-size: 10px; font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.skill-mini .sk-txt { min-width: 0; }
.skill-mini .sk-txt b { display: block; font-size: 10px; color: #3A4843; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skill-mini .sk-txt small { display: block; font-size: 8px; color: #A79A86; margin-top: 1px; }
.passive-line {
  display: flex; align-items: center; gap: 5px; margin: -1px 0 7px; padding: 4px 8px;
  border-radius: 8px; background: rgba(255, 138, 61, .07); border: 1px solid rgba(255, 138, 61, .12);
  font-size: 9px; color: #8C7359; min-width: 0;
}
.passive-line b {
  flex: 0 0 auto; font-size: 8px; color: #C05C17; background: #FFE3CB;
  border-radius: 4px; padding: 1px 4px;
}
.passive-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mode-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.mode-chips span {
  display: flex; align-items: center; gap: 3px; padding: 4px 7px; border-radius: 999px;
  background: rgba(255, 138, 61, .11); color: #B4561D; font-size: 9px; font-weight: 700;
}
.mode-chips .cash-chip { background: rgba(255, 190, 60, .2); color: #A0670D; }
.mode-chips .mp-icon { width: 12px; height: 12px; }

.cash-banner {
  width: 100%; display: flex; align-items: center; gap: 6px; margin: 0 0 7px; padding: 6px 9px;
  border-radius: 11px; background: linear-gradient(90deg, #FFF2D8, #FFFAF0);
  border: 1px solid #F4DFB4; font-size: 9px; color: #8D6A39; min-width: 0; text-align: left;
  box-shadow: 0 2px 6px rgba(150, 100, 30, .06); transition: transform .12s ease;
}
.cash-banner:active { transform: scale(.985); }
.cash-symbol {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(145deg, #FFD879, #E8951B); color: #fff; font-size: 12px; font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cash-main { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.cash-main b { font-size: 13px; color: #C46C10; font-weight: 900; font-variant-numeric: tabular-nums; }
.cash-wins { margin-left: auto; flex: 0 0 auto; font-size: 8.5px; font-weight: 700; color: #B29362; white-space: nowrap; }
.cash-banner .ch { width: 13px; height: 13px; color: #C9A46F; flex: 0 0 auto; }

.reward-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 7px; }
.reward-card {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 44px;
  border-radius: 11px; background: #fff; border: 1px solid #F0E4D2; text-align: left;
  box-shadow: 0 2px 5px rgba(96, 78, 48, .05);
}
.reward-card:active { transform: scale(.97); }
.rc-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.rc-icon .mp-icon { width: 17px; height: 17px; }
.reward-card.ad .rc-icon { background: #FFE9D1; color: #C46C10; }
.reward-card.rune .rc-icon { background: #EEE9FF; color: #6B5BD6; }
.rc-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.rc-copy b { font-size: 10.5px; color: #33423C; font-weight: 800; white-space: nowrap; }
.rc-copy b em { font-style: normal; color: #8A78C9; font-size: 8.5px; }
.rc-copy small { font-size: 8px; color: #A2957F; margin-top: 2px; white-space: nowrap; }

.start-btn {
  position: relative; width: 100%; height: 56px; border-radius: 17px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #FFA752 0%, #FF7C2F 58%, #F26519 100%);
  color: #fff; box-shadow: 0 10px 22px rgba(242, 102, 31, .34), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .12s ease;
}
.start-btn::after {
  content: ""; position: absolute; top: -60%; left: -40%; width: 38%; height: 220%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
  transform: rotate(20deg); animation: btnShine 3.6s ease-in-out infinite;
}
.start-btn:active { transform: scale(.975); }
.start-btn > .mp-icon { width: 30px; height: 30px; position: relative; z-index: 1; }
.start-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.start-copy b { font-size: 17px; font-weight: 900; letter-spacing: 1px; }
.start-copy small { font-size: 8.5px; opacity: .82; margin-top: 2px; letter-spacing: .2px; }
.home-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.text-btn { display: flex; align-items: center; gap: 3px; font-size: 9.5px; color: #8B7D6A; padding: 4px 0; }
.text-btn .mp-icon { width: 13px; height: 13px; }
.record-text { font-size: 9px; color: #A2957F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }

/* ================= 对局页 ================= */
.game { background: #163F36; overflow: hidden; }
#gameCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.game-top {
  position: absolute; z-index: 8; left: 8px; right: 8px; top: calc(7px + var(--safe-t));
  display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none;
}
.game-top > * { pointer-events: auto; }
.hud-btn {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; background: rgba(8, 36, 32, .68); border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hud-btn .mp-icon { width: 19px; height: 19px; }
.hud-btn:active { transform: scale(.92); }
.scoreboard {
  position: absolute; left: 50%; transform: translateX(-50%); top: 0;
  min-width: 128px; padding: 3px 12px 4px; border-radius: 13px; text-align: center;
  background: rgba(8, 36, 32, .72); border: 1px solid rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); color: #fff;
}
.score-line { display: flex; align-items: center; justify-content: center; gap: 5px; line-height: 1; }
.score-line b { font-size: 16px; font-weight: 900; min-width: 12px; font-variant-numeric: tabular-nums; }
.score-line b:first-of-type { color: #8ED2FF; }
.score-line b:last-of-type { color: #FFA3A5; }
.score-sep { font-size: 10px; opacity: .55; }
.team-tag { font-size: 8px; font-weight: 800; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; }
.team-tag.blue { background: rgba(63, 169, 255, .9); }
.team-tag.red { background: rgba(255, 90, 95, .9); }
.timer { margin-top: 2px; font-size: 10px; font-weight: 700; color: #FFD66B; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.minimap-box {
  width: 82px; height: 108px; border-radius: 11px; overflow: hidden; position: relative;
  border: 1.5px solid rgba(255, 255, 255, .3); background: #0B2C27;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .28);
}
#minimap { width: 100%; height: 100%; display: block; }
.hud-right { position: absolute; z-index: 8; right: 8px; top: calc(121px + var(--safe-t)); display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.shop-btn {
  height: 29px; display: flex; align-items: center; gap: 4px; padding: 0 9px; border-radius: 999px;
  background: rgba(8, 36, 32, .72); border: 1px solid rgba(255, 255, 255, .2); color: #FFD66B;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.shop-btn .mp-icon { width: 15px; height: 15px; color: #FFD66B; }
.shop-btn .shop-label { font-size: 9px; color: #D8F1EA; opacity: .82; }
.shop-btn span { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.shop-btn:active { transform: scale(.94); }
.tower-count { display: flex; gap: 4px; }
.tc {
  display: flex; align-items: center; gap: 2px; padding: 2px 5px; border-radius: 6px;
  background: rgba(8, 36, 32, .58); font-size: 9px; font-weight: 700; color: #fff;
}
.tc .mp-icon { width: 9px; height: 9px; }
.tc b { font: inherit; }
.tc.blue { color: #9AD6FF; }
.tc.red { color: #FFAFB1; }

.player-hud {
  position: absolute; z-index: 7; left: 8px; top: calc(48px + var(--safe-t)); width: 172px;
  padding: 5px 8px 6px; border-radius: 11px;
  background: rgba(8, 36, 32, .6); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
}
.ph-top { display: flex; align-items: center; gap: 5px; line-height: 1; }
.lvl {
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(145deg, #FFC46B, #F07B22); color: #fff; font-size: 9px; font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.ph-name { font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.ph-kda { margin-left: auto; font-size: 8.5px; color: #C9E4DD; font-variant-numeric: tabular-nums; }
.bar { position: relative; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .36); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: 100%; border-radius: 4px; transition: width .16s linear; }
.bar.hp i { background: linear-gradient(90deg, #58D68D, #2ECC71); box-shadow: 0 0 8px rgba(88, 214, 141, .4); }
.bar.hp.low i { background: linear-gradient(90deg, #FF7B72, #E74C3C); box-shadow: 0 0 8px rgba(255, 90, 80, .5); }
.bar.mana { height: 4.5px; margin-top: 3px; }
.bar.mana i { background: linear-gradient(90deg, #63B8FF, #3A8DDE); }
.bar em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 6.8px; font-weight: 700; color: rgba(255, 255, 255, .94); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }

.feed { position: absolute; z-index: 6; left: 8px; top: calc(112px + var(--safe-t)); width: 196px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.feed-item {
  align-self: flex-start; max-width: 100%; padding: 3px 7px; border-radius: 5px;
  background: rgba(7, 30, 27, .68); border-left: 2px solid var(--orange); color: #EAF6F2;
  font-size: 9px; line-height: 1.3; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: feedIn .25s ease-out;
}
.feed-item.red { border-left-color: #FF6B6B; }
.feed-item.gold { border-left-color: #FFD66B; color: #FFE9A8; }
.announce {
  position: absolute; z-index: 9; top: 23%; left: 50%; transform: translate(-50%, -50%) scale(.9);
  padding: 7px 20px; border-radius: 12px; text-align: center; pointer-events: none; opacity: 0;
  font-size: 19px; font-weight: 900; letter-spacing: 2px; color: #FFE5A8;
  background: linear-gradient(90deg, rgba(140, 56, 0, 0), rgba(141, 58, 4, .84), rgba(140, 56, 0, 0));
  text-shadow: 0 2px 6px rgba(70, 21, 0, .7); white-space: nowrap;
}
.announce.show { animation: announcePop 2.2s ease forwards; }
.announce.blue { color: #CFEEFF; background: linear-gradient(90deg, rgba(10, 60, 100, 0), rgba(12, 66, 110, .85), rgba(10, 60, 100, 0)); }
.announce.red { color: #FFD3D4; background: linear-gradient(90deg, rgba(120, 20, 26, 0), rgba(126, 24, 30, .85), rgba(120, 20, 26, 0)); }

.fx-vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(3, 20, 17, .42) 100%);
}
.joystick {
  position: absolute; z-index: 10; left: 16px; bottom: calc(17px + var(--safe-b));
  width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04) 70%);
  border: 2px solid rgba(255, 255, 255, .26); touch-action: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16), inset 0 0 20px rgba(255, 255, 255, .06);
}
.joystick.active { border-color: rgba(255, 208, 138, .7); background: radial-gradient(circle, rgba(255, 208, 138, .16), rgba(255, 255, 255, .05) 72%); }
.joystick-ring { position: absolute; inset: 21px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .22); }
.stick {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .75), rgba(255, 255, 255, .3));
  border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .05s linear;
}
.skill-dock { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.attack-btn {
  position: absolute; right: 16px; bottom: calc(19px + var(--safe-b)); width: 84px; height: 84px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden;
  background: linear-gradient(155deg, #FFA458, #F26519); color: #fff; pointer-events: auto;
  border: 2.5px solid rgba(255, 255, 255, .72);
  box-shadow: 0 7px 20px rgba(196, 74, 10, .42), inset 0 2px 0 rgba(255, 255, 255, .35);
}
.attack-btn .mp-icon { width: 29px; height: 29px; }
.attack-btn span { font-size: 9.5px; font-weight: 800; letter-spacing: 1px; }
.attack-btn:active { transform: scale(.93); }
.attack-btn.pressed { transform: scale(.93); box-shadow: 0 3px 10px rgba(196, 74, 10, .42), inset 0 2px 0 rgba(255, 255, 255, .35); }
.attack-btn .cd-mask { position: absolute; inset: 0; display: block; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(0, 0, 0, .55) var(--p, 0deg), rgba(0, 0, 0, 0) 0deg); }
.skill-btn {
  position: absolute; width: 54px; height: 54px; border-radius: 50%; pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  color: #fff; background: radial-gradient(circle at 35% 28%, rgba(82, 132, 120, .95), rgba(14, 49, 43, .92));
  border: 2px solid rgba(255, 255, 255, .42);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
  overflow: hidden; transition: transform .08s linear;
}
.skill-btn .sk-key { font-size: 14px; font-weight: 900; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.skill-btn .sk-name { font-size: 7.5px; opacity: .85; margin-top: 2px; max-width: 46px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skill-btn .cd-mask { position: absolute; inset: 0; display: block; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(0, 0, 0, .7) var(--p, 0deg), rgba(0, 0, 0, .08) 0deg); }
.skill-btn .sk-cd { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px #000; opacity: 0; }
.skill-btn.cooling .sk-cd { opacity: 1; }
.skill-btn.no-mana { border-color: rgba(90, 160, 255, .4); }
.skill-btn.ready { border-color: rgba(255, 218, 150, .85); box-shadow: 0 0 12px rgba(255, 190, 90, .3), 0 5px 14px rgba(0, 0, 0, .3); }
.skill-btn:active { transform: scale(.91); }
.sk-q { right: 108px; bottom: calc(20px + var(--safe-b)); }
.sk-w { right: 108px; bottom: calc(84px + var(--safe-b)); }
.sk-e { right: 40px; bottom: calc(116px + var(--safe-b)); }

.respawn {
  position: absolute; z-index: 12; top: 43%; left: 50%; transform: translate(-50%, -50%);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  width: 132px; height: 132px; border-radius: 50%; color: #fff;
  background: rgba(7, 28, 25, .74); border: 1.5px solid rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.respawn.show { display: flex; }
.respawn b { font-size: 38px; line-height: 1; font-weight: 900; color: #FFD66B; }
.respawn span { font-size: 9.5px; opacity: .8; margin-top: 4px; letter-spacing: 1px; }
.game-hint {
  position: absolute; z-index: 6; left: 50%; bottom: calc(158px + var(--safe-b)); transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  background: rgba(8, 32, 29, .62); border: 1px solid rgba(255, 255, 255, .13);
  color: rgba(255, 255, 255, .9); font-size: 9px; pointer-events: none;
  transition: opacity .6s ease; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.game-hint.hide { opacity: 0; }

/* ================= 结算页 ================= */
.result { overflow-y: auto; overflow-x: hidden; background: radial-gradient(130% 90% at 50% 0%, #1B6A5D 0%, #0C302A 48%, #071D19 100%); }
.result.lose { background: radial-gradient(130% 90% at 50% 0%, #3A4F63 0%, #172C36 48%, #0A171D 100%); }
.result-rays {
  position: absolute; left: 50%; top: 32%; width: 620px; height: 620px; margin: -310px 0 0 -310px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 205, 120, .13) 0deg 7deg, rgba(255, 205, 120, 0) 7deg 22deg);
  border-radius: 50%; animation: ringSpin 60s linear infinite; pointer-events: none;
}
.result.lose .result-rays { background: repeating-conic-gradient(from 0deg, rgba(150, 200, 255, .08) 0deg 7deg, rgba(150, 200, 255, 0) 7deg 22deg); }
.result-card {
  position: relative; z-index: 2; max-width: 390px; margin: 0 auto;
  padding: calc(38px + var(--safe-t)) 24px calc(26px + var(--safe-b));
  text-align: center; color: #fff;
}
.result-emblem {
  width: 82px; height: 82px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(150deg, #FFD879, #FF9A3D 52%, #E8621B);
  border: 3px solid rgba(255, 255, 255, .75);
  box-shadow: 0 10px 30px rgba(242, 102, 31, .45), inset 0 2px 0 rgba(255, 255, 255, .5);
}
.result-emblem .mp-icon { width: 44px; height: 44px; color: #fff; filter: drop-shadow(0 2px 3px rgba(130, 52, 0, .35)); }
.result.lose .result-emblem { background: linear-gradient(150deg, #9FB6C4, #5F7B8C 55%, #3A5262); box-shadow: 0 10px 30px rgba(20, 40, 55, .5); }
.result-kicker { font-size: 9px; letter-spacing: 4px; font-weight: 800; color: rgba(255, 255, 255, .55); }
.result-card h2 {
  margin-top: 2px; font-size: 48px; line-height: 1.05; font-weight: 900; letter-spacing: 6px;
  color: #FFD66B; text-shadow: 0 3px 0 rgba(120, 58, 0, .4), 0 12px 30px rgba(255, 180, 60, .3);
}
.result.lose h2 { color: #C8D9E5; text-shadow: 0 3px 0 rgba(6, 28, 38, .5); }
#resultReason { margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, .68); letter-spacing: .5px; }
.result-score {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; padding: 7px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
}
.result-score .rs { font-size: 11px; font-weight: 700; }
.result-score .rs b { font-size: 20px; font-weight: 900; margin: 0 2px; }
.result-score .blue, .result-score .blue b { color: #8ED2FF; }
.result-score .red, .result-score .red b { color: #FFA3A5; }
.result-score .dash { color: rgba(255, 255, 255, .3); }
.result-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 16px;
}
.result-stats > div {
  padding: 9px 4px 8px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
}
.result-stats b { display: block; font-size: 18px; font-weight: 900; color: #FFF4D9; line-height: 1.15; font-variant-numeric: tabular-nums; }
.result-stats span { display: block; font-size: 9px; color: rgba(255, 255, 255, .55); margin-top: 3px; }
.result-reward {
  display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 9px 12px; border-radius: 12px;
  background: rgba(255, 200, 90, .1); border: 1px solid rgba(255, 200, 90, .2); color: #FFE7B0; font-size: 10px;
}
.result-reward .mp-icon { width: 17px; height: 17px; color: #FFD66B; }
.result-reward b { color: #FFD66B; }
.result-reward em { margin-left: auto; font-style: normal; font-weight: 800; color: #FFD66B; }
.result-cash {
  position: relative; display: none; align-items: center; gap: 9px; margin-top: 10px; padding: 10px 12px;
  border-radius: 15px; overflow: hidden; text-align: left;
  background: linear-gradient(120deg, rgba(255, 214, 107, .24), rgba(255, 138, 61, .14));
  border: 1px solid rgba(255, 214, 107, .42);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.result-cash.show { display: flex; }
.result-cash::after {
  content: ""; position: absolute; top: -60%; left: -35%; width: 30%; height: 220%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .32), rgba(255, 255, 255, 0));
  transform: rotate(20deg); animation: prizeShine 3.2s ease-in-out infinite; pointer-events: none;
}
.rcash-symbol {
  width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(145deg, #FFE49B, #FFB347 48%, #E8951B); color: #7A3A06; font-size: 19px; font-weight: 900;
  border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 4px 12px rgba(180, 105, 10, .4), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.rcash-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rcash-copy > b { font-size: 10.5px; font-weight: 800; color: #FFE7B0; letter-spacing: .5px; }
.rcash-copy > b em {
  font-style: normal; font-size: 20px; font-weight: 900; color: #FFD66B; margin-left: 4px;
  font-variant-numeric: tabular-nums; vertical-align: -1px;
  text-shadow: 0 2px 8px rgba(255, 180, 60, .35);
}
.rcash-copy > small { font-size: 9px; color: rgba(255, 231, 176, .68); }
.rcash-copy > small b { font-size: 10px; color: #FFD66B; font-weight: 900; font-variant-numeric: tabular-nums; }
.rcash-more {
  margin-left: auto; flex: 0 0 auto; height: 28px; padding: 0 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 214, 107, .38);
  color: #FFE7B0; font-size: 9.5px; font-weight: 700;
}
.rcash-more:active { background: rgba(255, 255, 255, .22); transform: scale(.96); }
.result-cash.just-won { animation: prizeIn .55s cubic-bezier(.2, .9, .3, 1.25); }
.result-cash.just-won .rcash-symbol { animation: coinPop .8s ease-out; }
.result-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.btn-primary {
  height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #FFA752, #F26519); color: #fff; font-size: 15px; font-weight: 900;
  box-shadow: 0 8px 20px rgba(242, 102, 31, .35), inset 0 1px 0 rgba(255, 255, 255, .4);
  letter-spacing: 1px;
}
.btn-primary .mp-icon { width: 20px; height: 20px; }
.btn-primary:active { transform: scale(.975); }
.btn-ghost {
  height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #F2F8F5;
  font-size: 13.5px; font-weight: 700;
}
.btn-ghost .mp-icon { width: 18px; height: 18px; }
.btn-ghost.wide { width: 100%; }
.btn-ghost:active { background: rgba(255, 255, 255, .14); }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.confetti i {
  position: absolute; top: -20px; width: 7px; height: 12px; border-radius: 2px; opacity: .9;
  animation: confettiFall linear forwards;
}

/* ================= 弹层 ================= */
.modal {
  position: absolute; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center;
  padding: 18px; background: rgba(4, 22, 19, .68);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
}
.modal.show { display: flex; animation: fadeIn .18s ease; }
.modal-card {
  width: 100%; max-width: 360px; max-height: 88dvh; overflow-y: auto;
  background: var(--cream); color: var(--ink); border-radius: 24px;
  padding: 20px 18px calc(16px + var(--safe-b) * .4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4); animation: popIn .22s cubic-bezier(.2, .9, .3, 1.2);
  scrollbar-width: none;
}
.modal-card::-webkit-scrollbar { display: none; }
.modal-head { text-align: center; margin-bottom: 14px; }
.modal-head.left { text-align: left; display: flex; align-items: center; gap: 9px; margin: 0; }
.modal-icon {
  width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, #FFB069, #F27A2A); color: #fff;
  box-shadow: 0 5px 12px rgba(242, 102, 31, .28);
}
.modal-head.left .modal-icon { margin: 0; flex: 0 0 auto; }
.modal-icon .mp-icon { width: 23px; height: 23px; }
.modal-head h3 { font-size: 18px; font-weight: 900; letter-spacing: .5px; }
.modal-head p { font-size: 10px; color: #8C7F6C; margin-top: 4px; }
.modal-card .btn-primary { width: 100%; margin-top: 4px; }
.modal-card .btn-ghost { background: #F4E9D8; border: 1px solid #E7D8C2; color: #6B5A45; }
.modal-card .btn-ghost:active { background: #EFE1CC; }
.btn-row {
  width: 100%; height: 46px; margin-top: 8px; padding: 0 12px; border-radius: 12px;
  background: #fff; border: 1px solid #F0E4D2; display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 700; color: #3D4B45; box-shadow: 0 2px 6px rgba(96, 78, 48, .05);
}
.btn-row .mp-icon { width: 19px; height: 19px; color: #B98A52; }
.btn-row b { margin-left: auto; font-size: 11px; color: #A2957F; }
.btn-row .chev { margin-left: auto; color: #C9BCA8; }
.btn-row.danger { color: #C9493E; }
.btn-row.danger .mp-icon { color: #C9493E; }
.btn-row:active { background: #FBF3E5; }
.pause-card .btn-primary { margin-top: 2px; margin-bottom: 4px; }

.guide-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.guide-item {
  position: relative; padding: 9px 10px 9px 38px; border-radius: 12px;
  background: #fff; border: 1px solid #F2E7D6;
}
.g-no {
  position: absolute; left: 10px; top: 10px; width: 20px; height: 20px; border-radius: 7px;
  display: grid; place-items: center; background: #FFE8CF; color: #C45F17; font-size: 10px; font-weight: 900;
}
.guide-item b { font-size: 12px; color: #33423C; }
.guide-item p { font-size: 9.5px; line-height: 1.5; color: #8B7E6C; margin-top: 2px; }

.shop-card { max-width: 380px; background: linear-gradient(180deg, #FFFAF1, #FFF4E4); }
.shop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.shop-head .modal-head h3 { font-size: 16px; }
.shop-gold {
  display: flex; align-items: center; gap: 6px; margin: 12px 0 10px; padding: 8px 11px; border-radius: 11px;
  background: #FFF0D5; border: 1px solid #F7DFB8; font-size: 10.5px; color: #8A5A1A;
}
.shop-gold b { font-size: 14px; font-weight: 900; color: #C46C10; }
.shop-gold em { margin-left: auto; font-style: normal; font-size: 9px; color: #A98C63; }
.shop-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.shop-item {
  display: flex; flex-direction: column; gap: 4px; padding: 9px; border-radius: 12px; text-align: left;
  background: #fff; border: 1.5px solid #F2E6D3; box-shadow: 0 2px 6px rgba(96, 78, 48, .05);
  position: relative; min-height: 92px;
}
.shop-item .si-top { display: flex; align-items: center; gap: 5px; }
.si-ico {
  width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(145deg, #FFE0BE, #FFC58D); color: #B45A12; flex: 0 0 auto;
}
.si-ico .mp-icon { width: 15px; height: 15px; }
.shop-item b { font-size: 10.5px; color: #34423C; line-height: 1.2; }
.shop-item .si-desc { display: block; font-size: 8.5px; line-height: 1.35; color: #9A8B75; min-height: 23px; }
.si-buy {
  margin-top: auto; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 3px;
  background: #FFF0DC; color: #C4661B; font-size: 9.5px; font-weight: 800;
}
.si-buy .coin-dot { width: 10px; height: 10px; }
.si-buy .coin-dot::after { inset: 2.5px; border-width: 1px; }
.shop-item.owned { border-color: #BFE6CF; background: #F7FFF9; }
.shop-item.owned .si-buy { background: #E4F7EB; color: #3D9B64; }
.shop-item.poor .si-buy { background: #F2EEE8; color: #B4A997; }
.shop-item:active { transform: scale(.97); }

.rune-card { max-width: 390px; background: linear-gradient(180deg, #FFFAF1, #FFF4E4); }
.rune-top { display: flex; align-items: center; gap: 6px; margin: 12px 0 8px; }
.rune-top .shop-gold { margin: 0; flex: 1; min-width: 0; }
.mini-ad {
  height: 32px; display: flex; align-items: center; gap: 3px; padding: 0 9px; border-radius: 9px;
  background: #FFF0D9; border: 1px solid #F4DDB8; color: #C46C10; font-size: 9px; font-weight: 800;
  white-space: nowrap; flex: 0 0 auto;
}
.mini-ad .mp-icon { width: 13px; height: 13px; }
.mini-ad:active { transform: scale(.95); }
.rune-bonus {
  font-size: 9px; line-height: 1.5; color: #8A7A63; background: #FFF7E9;
  border: 1px dashed #EBD9BA; border-radius: 9px; padding: 6px 8px; margin-bottom: 8px; min-height: 30px;
}
.rune-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
.rune-item {
  display: flex; flex-direction: column; gap: 4px; padding: 9px; border-radius: 12px; text-align: left;
  background: #fff; border: 1.5px solid #F2E6D3; box-shadow: 0 2px 6px rgba(96, 78, 48, .05);
  min-height: 98px; position: relative;
}
.rune-item .ri-top { display: flex; align-items: center; gap: 5px; }
.ri-ico {
  width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(145deg, #EEE9FF, #D9CFFF); color: #6B5BD6;
}
.ri-ico .mp-icon { width: 16px; height: 16px; }
.rune-item b { font-size: 10.5px; color: #34423C; line-height: 1.2; }
.rune-item .ri-desc { display: block; font-size: 8.5px; line-height: 1.35; color: #9A8B75; min-height: 23px; }
.ri-price {
  margin-top: auto; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 3px;
  background: #FFF0DC; color: #C4661B; font-size: 9.5px; font-weight: 800;
}
.ri-price .coin-dot { width: 10px; height: 10px; }
.ri-price .coin-dot::after { inset: 2.5px; border-width: 1px; }
.rune-item.owned { border-color: #BFE6CF; background: #F7FFF9; }
.rune-item.owned .ri-price { background: #E4F7EB; color: #3D9B64; }
.rune-item.poor .ri-price { background: #F2EEE8; color: #B4A997; }
.rune-item:active { transform: scale(.97); }

.cash-card { max-width: 380px; background: linear-gradient(180deg, #FFFAF1, #FFF4E4); }
.modal-icon.gold { background: linear-gradient(145deg, #FFD879, #E8951B); box-shadow: 0 5px 12px rgba(200, 130, 20, .3); }
.cash-hero {
  margin: 14px 0 10px; padding: 14px 12px; border-radius: 16px; text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, #FFF7E5 0%, #FFEFD3 62%, #FFE6BF 100%);
  border: 1px solid #F3DDB6; box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(160, 110, 30, .07);
}
.cash-hero-label { display: block; font-size: 9px; letter-spacing: 2px; font-weight: 700; color: #A98C63; }
.cash-hero > b {
  display: block; margin-top: 4px; font-size: 38px; line-height: 1.05; font-weight: 900;
  color: #C46C10; letter-spacing: -.5px; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .55);
}
.cash-hero-sub { display: block; margin-top: 5px; font-size: 9.5px; color: #9A835F; }
.cash-hero-sub b { color: #B4561D; font-weight: 900; }
.cash-rule {
  display: flex; align-items: center; gap: 5px; padding: 7px 9px; margin-bottom: 10px; border-radius: 9px;
  background: #FFF7E9; border: 1px dashed #EBD9BA; font-size: 8.5px; line-height: 1.45; color: #8A7A63;
}
.cash-rule .mp-icon { width: 13px; height: 13px; color: #C9A46F; flex: 0 0 auto; }
.cash-log { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; max-height: 40dvh; overflow-y: auto; scrollbar-width: none; }
.cash-log::-webkit-scrollbar { display: none; }
.cash-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 11px;
  background: #fff; border: 1px solid #F2E7D6; box-shadow: 0 2px 5px rgba(96, 78, 48, .04);
}
.ci-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: #FFF0D5; color: #D89018;
}
.ci-ico .mp-icon { width: 17px; height: 17px; }
.ci-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ci-copy b { font-size: 10.5px; color: #3A4843; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-copy small { font-size: 8.5px; color: #A2957F; }
.ci-amount { margin-left: auto; flex: 0 0 auto; font-size: 12px; font-weight: 900; color: #C46C10; font-variant-numeric: tabular-nums; }
.cash-empty {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 22px 10px;
  border-radius: 12px; background: #fff; border: 1px dashed #EBD9BA; text-align: center;
}
.cash-empty .mp-icon { width: 28px; height: 28px; color: #D9C3A0; }
.cash-empty b { font-size: 11px; color: #7C6C57; }
.cash-empty span { font-size: 9px; color: #A2957F; line-height: 1.5; }

.ad-card { max-width: 320px; text-align: center; background: linear-gradient(180deg, #FFFBF3, #FFF1DB); }
.ad-screen {
  position: relative; min-height: 188px; padding: 18px 8px 8px; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
}
.ad-spinner {
  position: absolute; left: 13px; top: 13px; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid #F5E2C5; border-top-color: #FF8A3D; animation: adSpin .9s linear infinite;
}
.ad-play {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(145deg, #FFB069, #F27A2A); color: #fff;
  box-shadow: 0 8px 18px rgba(242, 102, 31, .3), inset 0 1px 0 rgba(255, 255, 255, .4);
  margin-bottom: 10px;
}
.ad-play .mp-icon { width: 34px; height: 34px; }
.ad-card.success .ad-play { background: linear-gradient(145deg, #7BE0AE, #2EA86B); box-shadow: 0 8px 18px rgba(46, 168, 107, .3); }
.ad-card.fail .ad-play { background: linear-gradient(145deg, #B9C6C0, #7F9088); box-shadow: 0 8px 18px rgba(60, 80, 72, .2); }
.modal.success .ad-play { background: linear-gradient(145deg, #7BE0AE, #2EA86B); box-shadow: 0 8px 18px rgba(46, 168, 107, .3); }
.modal.fail .ad-play { background: linear-gradient(145deg, #B9C6C0, #7F9088); box-shadow: 0 8px 18px rgba(60, 80, 72, .2); }
.ad-title { font-size: 17px; font-weight: 900; color: #3A4843; }
.ad-desc { font-size: 10px; color: #8C7F6C; margin-top: 4px; line-height: 1.5; }
.ad-count {
  position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: #FFE7C7; color: #C46C10; font-size: 15px; font-weight: 900;
}
.ad-count:empty { display: none; }
.ad-card .btn-ghost { margin-top: 4px; }

.toast {
  position: absolute; z-index: 90; left: 50%; bottom: calc(190px + var(--safe-b)); transform: translate(-50%, 8px);
  padding: 8px 16px; border-radius: 999px; background: rgba(9, 32, 28, .92); color: #fff;
  font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= 动画 ================= */
@keyframes cloudDrift { from { transform: translateX(-8px); } to { transform: translateX(18px); } }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes sparkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes btnShine { 0%, 55% { left: -45%; } 90%, 100% { left: 130%; } }
@keyframes feedIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }
@keyframes announcePop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.8); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  20% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: .7; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes adSpin { to { transform: rotate(360deg); } }
@keyframes prizeShine { 0%, 58% { left: -40%; } 86%, 100% { left: 135%; } }
@keyframes prizeIn {
  0% { opacity: 0; transform: translateY(10px) scale(.94); }
  60% { opacity: 1; transform: translateY(0) scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes coinPop {
  0% { transform: scale(.4) rotate(-30deg); }
  55% { transform: scale(1.16) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ================= 适配 ================= */
@media (max-width: 350px) {
  .rcash-copy > b em { font-size: 18px; }
  .rcash-more { padding: 0 8px; font-size: 9px; }
  .cash-wins { display: none; }
}
@media (max-height: 740px) {
  .home-sheet { max-height: 60%; padding-top: 6px; }
  .hero-art { max-height: 208px; }
  .stage-ring { width: min(48vw, 200px); height: min(48vw, 200px); }
  .hero-card { width: 53px; }
  .hero-card .hc-avatar { width: 42px; height: 42px; }
  .logo h1 { font-size: 30px; }
  .skill-mini .sk-txt small { display: none; }
  .start-btn { height: 52px; }
  .mode-chips { margin-bottom: 6px; }
}
@media (max-height: 650px) {
  .hero-art { max-height: 174px; }
  .logo h1 { font-size: 26px; }
  .logo-en { display: none; }
  .home-sheet { max-height: 64%; }
  .skill-row { display: none; }
  .record-text { display: none; }
}
@media (min-width: 520px) {
  body { background: radial-gradient(circle at 50% 20%, #143a34, #061714 70%); }
  .app-shell { border-left: 1px solid rgba(255, 255, 255, .05); border-right: 1px solid rgba(255, 255, 255, .05); }
}
