/* =========================================================
   喷火小龙消消车 · H5
   竖屏 · 卡通 · 原生 HTML/CSS/JS
   ========================================================= */

:root {
  --orange: #FF8A3D;
  --orange-deep: #D9541E;
  --cream: #FFF4DF;
  --cream-2: #FFE9C9;
  --ink: #5B3418;
  --ink-soft: #8C6038;
  --blue: #2F7BE0;
  --blue-deep: #1D5DB5;
  --gold: #FFC53D;
  --gold-deep: #C97A00;
  --green: #4FCB4B;
  --rail: clamp(58px, 16.4vw, 70px);
  --node: clamp(64px, 19.4vw, 80px);
  --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;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #edd9bb;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(120% 100% at 50% 0%, #fff8e9 0%, #f3e2c9 52%, #e5cfae 100%);
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 3px solid rgba(47, 123, 224, .55);
  outline-offset: 3px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.app {
  position: fixed;
  inset: 0;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(120, 70, 20, .06), 0 24px 80px rgba(90, 50, 10, .18);
  isolation: isolate;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
}

.screen.is-active {
  display: flex;
  animation: screenIn .32s cubic-bezier(.2, .8, .3, 1) both;
}

/* =========================================================
   通用小元素
   ========================================================= */

.outline {
  text-shadow:
    0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff,
    1px 1px 0 #fff, -1px 1px 0 #fff, 1px -1px 0 #fff, -1px -1px 0 #fff,
    0 2px 2px rgba(120, 60, 20, .16);
}

.currency-ico {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .18));
}

/* =========================================================
   首页 · 顶部
   ========================================================= */

.home {
  background:
    radial-gradient(120% 70% at 50% 0%, #FFFBF1 0%, #FDF1DC 46%, #FBE7C9 100%);
  padding-bottom: 0;
}

.home::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .9;
  background-image:
    radial-gradient(circle at 30px 30px, rgba(255, 158, 76, .10) 0 11px, transparent 12px),
    radial-gradient(circle at 108px 84px, rgba(255, 158, 76, .07) 0 17px, transparent 18px),
    radial-gradient(circle at 62px 128px, rgba(226, 120, 60, .06) 0 7px, transparent 8px),
    radial-gradient(circle at 134px 22px, rgba(255, 196, 120, .10) 0 5px, transparent 6px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='168' viewBox='0 0 168 168'%3E%3Cg fill='none' stroke='%23EFCB9F' stroke-width='2.4' stroke-linejoin='round' stroke-linecap='round' opacity='.5'%3E%3Crect x='22' y='55' width='88' height='44' rx='12'/%3E%3Cpath d='M22 72h88M22 85h88'/%3E%3Crect x='80' y='60' width='27' height='20' rx='6'/%3E%3Ccircle cx='42' cy='103' r='8.5'/%3E%3Ccircle cx='90' cy='103' r='8.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 168px 168px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: calc(9px + var(--safe-top)) 12px 2px;
}

.top-btn {
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #8FD0FF 0%, #3B8BEA 48%, #2468CE 100%);
  border: 3px solid #fff;
  box-shadow:
    0 4px 0 #1B56A9,
    0 7px 12px rgba(35, 92, 175, .3),
    inset 0 3px 6px rgba(255, 255, 255, .55);
  transition: transform .1s, box-shadow .1s;
}

.top-btn .mp-icon {
  width: 25px;
  height: 25px;
  filter: drop-shadow(0 2px 0 rgba(20, 60, 120, .3));
}

.top-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #1B56A9, 0 3px 7px rgba(35, 92, 175, .3), inset 0 3px 6px rgba(255, 255, 255, .5);
}

.currency {
  height: 38px;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px 2px 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #737377 0%, #4D4D54 52%, #3A3A41 100%);
  border: 2px solid rgba(255, 255, 255, .62);
  box-shadow:
    0 3px 0 rgba(60, 40, 25, .28),
    inset 0 2px 0 rgba(255, 255, 255, .26),
    inset 0 -3px 6px rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .3px;
  overflow: hidden;
}

.currency-val {
  flex: 1;
  min-width: 0;
  text-align: left;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .28);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.currency.coin .currency-ico {
  width: 33px;
  height: 33px;
}

.currency.gem .currency-ico {
  width: 30px;
  height: 30px;
}

.currency:active {
  transform: translateY(2px);
}

/* =========================================================
   首页 · 榜单 / 游戏圈
   ========================================================= */

.home-main {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-bottom: calc(68px + var(--safe-bottom));
}

.home-main::-webkit-scrollbar {
  display: none;
}

.leader-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 10px 0;
}

.circle-entry {
  flex: 0 0 64px;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-top: 2px;
  z-index: 3;
}

.circle-wheel {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#FF5B5B, #FFB84D, #FFE45C, #6BE07A, #4DD0E1, #5B8CFF, #B06BFF, #FF5D5D);
  border: 3px solid #fff;
  box-shadow:
    0 3px 0 #D39A3E,
    0 6px 12px rgba(150, 90, 30, .25),
    inset 0 0 0 2px rgba(255, 255, 255, .35);
  position: relative;
}

.circle-wheel::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .6);
}

.circle-cam {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  display: grid;
  place-items: center;
  color: #59606C;
  box-shadow: 0 2px 4px rgba(80, 40, 10, .22);
}

.circle-cam .mp-icon {
  width: 17px;
  height: 17px;
}

.circle-label {
  font-size: 11.5px;
  font-weight: 900;
  color: #6B3A16;
  letter-spacing: .3px;
  margin-top: 1px;
}

.circle-entry:active .circle-wheel {
  transform: scale(.93) rotate(-8deg);
}

.leaderboard {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 132px;
  border-radius: 20px;
  padding: 13px 7px 6px;
  background: linear-gradient(180deg, #FFFDF6 0%, #FFF7E6 58%, #FFEFD2 100%);
  border: 3px solid #2E7DE0;
  box-shadow:
    0 4px 0 #1B58B2,
    0 10px 20px rgba(46, 125, 224, .18),
    inset 0 0 0 3px rgba(255, 255, 255, .9);
  cursor: pointer;
  transition: transform .12s;
}

.leaderboard::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 14px;
  border: 1.5px solid rgba(94, 160, 235, .35);
  pointer-events: none;
}

.leaderboard:active {
  transform: scale(.982) translateY(1px);
}

.lb-title {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #FFD84D;
  text-shadow:
    0 2px 0 #B95300, 2px 0 0 #B95300, -2px 0 0 #B95300, 0 -2px 0 #B95300,
    2px 2px 0 #B95300, -2px 2px 0 #B95300, 2px -2px 0 #B95300, -2px -2px 0 #B95300,
    0 5px 7px rgba(145, 60, 0, .3);
}

.lb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 2px;
  padding-top: 5px;
}

.lb-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-bottom: 1px;
}

.lb-item.place-1 { order: 2; }
.lb-item.place-2 { order: 1; }
.lb-item.place-3 { order: 3; }

.lb-avatar {
  position: relative;
  width: 43px;
  height: 43px;
  border-radius: 12px;
  border: 2.5px solid #fff;
  overflow: visible;
  box-shadow: 0 0 0 2.5px var(--frame, #7FB0E8), 0 3px 7px rgba(90, 50, 20, .18);
  transform-origin: 50% 100%;
}

.lb-avatar .avatar-svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  overflow: hidden;
}

.lb-item.place-1 .lb-avatar {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  box-shadow: 0 0 0 3px #FFC53D, 0 4px 10px rgba(200, 130, 20, .28);
}

.lb-crown {
  position: absolute;
  z-index: 5;
  top: -22px;
  left: 50%;
  width: 28px;
  height: 21px;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 1px rgba(160, 90, 0, .38));
  animation: crownBob 2.4s ease-in-out infinite;
  pointer-events: none;
}

.lb-crown svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lb-item.place-1 .lb-medal {
  display: none;
}

.lb-item.place-1 .lb-avatar::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 17px;
  border: 2px solid rgba(255, 214, 80, .7);
  animation: crownPulse 2.4s ease-in-out infinite;
}

.lb-medal {
  position: absolute;
  top: -8px;
  left: -7px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #C9D4DF, #8C9BAB);
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(40, 50, 60, .28);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  z-index: 3;
}

.lb-item.place-1 .lb-medal {
  width: 24px;
  height: 24px;
  top: -10px;
  left: -9px;
  font-size: 12px;
  background: linear-gradient(180deg, #FFE987, #FFB31E 60%, #E88B00);
  box-shadow: 0 2px 5px rgba(190, 110, 0, .4);
}

.lb-item.place-3 .lb-medal {
  background: linear-gradient(180deg, #F3C08B, #C97A3C);
}

.lb-name {
  max-width: 100%;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 900;
  color: #5B3418;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-score {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFF8E5, #FFE8B4);
  border: 1px solid #F3C46F;
  font-size: 11.5px;
  font-weight: 900;
  color: #D9581F;
  line-height: 1.45;
}

.lb-score .mp-icon {
  width: 12px;
  height: 12px;
  color: #F5A623;
}

.avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* 我的榜单小条 */
.lb-me {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  padding: 2px 5px 2px 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 244, 222, .86));
  border: 1px solid #FFD28C;
  box-shadow: inset 0 1px 0 #fff;
  min-height: 27px;
}

.lb-me-ava {
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #FFC04D;
  background: #FFF3D6;
  display: block;
}

.lb-me-ava .avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lb-me-name {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 900;
  color: #5B3418;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-me-name em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  color: #B07A45;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 196, 100, .3);
}

.lb-me-rank {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 900;
  color: #2F7BE0;
}

.lb-me-score {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 10px;
  font-weight: 900;
  color: #D9581F;
}

.lb-me-score .mp-icon {
  width: 11px;
  height: 11px;
  color: #F5A623;
}

/* =========================================================
   首页 · 主舞台
   ========================================================= */

.playfield {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--rail);
  flex: 1 0 auto;
  min-height: 380px;
  padding: 14px 7px 10px;
  z-index: 1;
}

.dragon-wrap {
  position: absolute;
  left: -7%;
  top: 9px;
  width: min(64%, 268px);
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 14px 16px rgba(190, 75, 25, .22));
}

.dragon-glow {
  position: absolute;
  left: 8%;
  top: 6%;
  width: 92%;
  height: 82%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 181, 90, .55) 0%, rgba(255, 138, 61, .18) 52%, rgba(255, 138, 61, 0) 72%);
  animation: glowPulse 3.6s ease-in-out infinite;
}

.dragon-svg,
.dragon-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  animation: dragonBob 4.4s ease-in-out infinite;
  transform-origin: 42% 62%;
}

.dragon-img {
  filter: drop-shadow(0 10px 10px rgba(160, 60, 15, .22));
}

/* 龙嘴喷出的火焰 */
.fire-jet {
  position: absolute;
  left: 52%;
  top: 48%;
  width: 56%;
  height: auto;
  z-index: 2;
  display: block;
  pointer-events: none;
  overflow: visible;
  transform-origin: 4% 52%;
  filter: drop-shadow(0 0 10px rgba(255, 146, 36, .6)) blur(.2px);
  animation: jetFlicker 1.5s ease-in-out infinite;
  opacity: .96;
}

.ember {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF7B8 0%, #FFC24B 38%, #FF7A1A 62%, rgba(255, 90, 20, 0) 72%);
  opacity: 0;
  z-index: 2;
  animation: emberFly 3s linear infinite;
}

.ember.e1 { left: 67%; top: 48%; animation-delay: 0s; }
.ember.e2 { left: 76%; top: 57%; animation-delay: .5s; width: 12px; height: 12px; }
.ember.e3 { left: 84%; top: 45%; animation-delay: 1.1s; width: 7px; height: 7px; }
.ember.e4 { left: 72%; top: 66%; animation-delay: 1.6s; width: 10px; height: 10px; }
.ember.e5 { left: 90%; top: 61%; animation-delay: 2.1s; width: 8px; height: 8px; }
.ember.e6 { left: 62%; top: 38%; animation-delay: 2.5s; width: 6px; height: 6px; }

/* 侧边按钮 */
.side-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  min-width: 0;
}

.side-rail.left {
  grid-column: 1;
  justify-content: flex-end;
  gap: 11px;
  padding-bottom: 9px;
}

.side-rail.right {
  grid-column: 3;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 9px;
}

.rail-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  transition: transform .1s;
}

.rail-btn:active {
  transform: scale(.9);
}

.rail-ico {
  position: relative;
  width: clamp(46px, 13.2vw, 54px);
  height: clamp(46px, 13.2vw, 54px);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 3px solid #fff;
  box-shadow:
    0 4px 0 rgba(80, 40, 10, .22),
    0 7px 12px rgba(90, 45, 15, .18),
    inset 0 3px 5px rgba(255, 255, 255, .42),
    inset 0 -5px 8px rgba(0, 0, 0, .13);
  overflow: hidden;
}

.rail-ico::before {
  content: "";
  position: absolute;
  inset: 2px 2px 52%;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.rail-ico .mp-icon {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 27px;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .22));
}

.ico-blue { background: linear-gradient(180deg, #79C3FF, #2F7BE0 58%, #1E5CB8); }
.ico-purple { background: linear-gradient(180deg, #CBA6FF, #8A5BE8 58%, #6338C0); }
.ico-red { background: linear-gradient(180deg, #FFB37E, #F2603C 58%, #C8391F); }
.ico-teal { background: linear-gradient(180deg, #8DF0DD, #2ABFA6 58%, #138D7C); }
.ico-orange { background: linear-gradient(180deg, #FFD37A, #FF9F2E 58%, #D96B00); }
.ico-pink { background: linear-gradient(180deg, #FFB2D9, #F45CA6 58%, #C22E7B); }
.ico-green { background: linear-gradient(180deg, #A9F08A, #4FCB4B 58%, #24962F); }
.ico-sky { background: linear-gradient(180deg, #9BE4FF, #37B4E8 58%, #1682B8); }

.rail-lbl {
  font-size: 10.5px;
  font-weight: 900;
  color: #6B3A16;
  letter-spacing: .2px;
  white-space: nowrap;
  line-height: 1.15;
}

.rail-mini .rail-ico {
  width: clamp(43px, 12.2vw, 49px);
  height: clamp(43px, 12.2vw, 49px);
  border-radius: 15px;
}

.rail-mini .rail-ico .mp-icon {
  width: 24px;
  height: 24px;
}

.rail-mini .rail-lbl {
  font-size: 9.8px;
}

/* 关卡路线 */
.path-col {
  position: relative;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 2px;
  z-index: 3;
}

.path-track {
  position: absolute;
  left: 50%;
  top: 34px;
  bottom: 82px;
  width: 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      #2F7BE0 0 3px,
      #FFD84D 3px calc(100% - 3px),
      #2F7BE0 calc(100% - 3px) 100%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .6),
    0 4px 9px rgba(47, 123, 224, .25);
  z-index: 0;
}

.path-track::after {
  content: "";
  position: absolute;
  inset: 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 38%);
}

.path-nodes {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  padding: 2px 0 8px;
  z-index: 1;
}

.node-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.node {
  position: relative;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 2;
  font-size: clamp(25px, 7.4vw, 31px);
  font-weight: 900;
  letter-spacing: -.5px;
  color: #fff;
  border: 4px solid #fff;
  background: radial-gradient(circle at 34% 23%, #A9D1FF 0%, #5893E8 46%, #2C66BE 100%);
  box-shadow:
    0 5px 0 #1B4F9E,
    0 9px 15px rgba(30, 80, 160, .3),
    inset 0 -7px 10px rgba(0, 0, 0, .2),
    inset 0 5px 8px rgba(255, 255, 255, .38);
  text-shadow: 0 3px 0 rgba(0, 0, 0, .17);
}

.node::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  pointer-events: none;
}

.node:active {
  transform: scale(.93);
}

.node.current {
  background: radial-gradient(circle at 34% 23%, #FFFFFF 0%, #C8D8EA 44%, #7E94AE 100%);
  color: #fff;
  box-shadow:
    0 5px 0 #5E738C,
    0 9px 16px rgba(60, 85, 115, .32),
    0 0 0 5px rgba(255, 255, 255, .5),
    0 0 25px rgba(255, 255, 255, .55),
    inset 0 -7px 10px rgba(0, 0, 0, .16),
    inset 0 5px 8px rgba(255, 255, 255, .55);
  animation: nodeGlow 2.7s ease-in-out infinite;
}

.node.done {
  background: radial-gradient(circle at 34% 23%, #C5FF9F 0%, #5BD555 46%, #2B9C36 100%);
  color: #fff;
  box-shadow:
    0 5px 0 #1F7A28,
    0 9px 15px rgba(40, 130, 50, .28),
    inset 0 -7px 10px rgba(0, 0, 0, .17),
    inset 0 5px 8px rgba(255, 255, 255, .4);
}

.node.locked {
  background: radial-gradient(circle at 34% 23%, #E7E2D9 0%, #BDB5A9 46%, #8E857A 100%);
  color: #F6F1E7;
  box-shadow:
    0 5px 0 #6E655B,
    0 9px 15px rgba(80, 65, 45, .22),
    inset 0 -7px 10px rgba(0, 0, 0, .16),
    inset 0 5px 8px rgba(255, 255, 255, .35);
}

.node .mp-icon {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .14));
}

.node-lock {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 4;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #7A3E00;
  background: linear-gradient(180deg, #FFF0A0, #FFC933 50%, #E88B00);
  border: 2px solid #FFF9D8;
  box-shadow: 0 2px 0 #A55A00, 0 3px 6px rgba(80, 40, 0, .24);
}

.node-lock .mp-icon {
  width: 14px;
  height: 14px;
  filter: none;
}

.node-tag {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: -12px;
  max-width: 100%;
  padding: 2px 9px 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #63ADFF 0%, #2F7BE0 56%, #1D5DB5 100%);
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(20, 60, 140, .3);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2px;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}

.node-tag .mp-icon {
  width: 12px;
  height: 12px;
  color: #FFE066;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .2));
}

.node-tag.is-lock {
  background: linear-gradient(180deg, #B9B2A7, #8C8377);
}

.node-stars {
  display: flex;
  gap: 1px;
  margin-top: 1px;
  z-index: 3;
}

.node-stars .mp-icon {
  width: 10px;
  height: 10px;
  color: #E3D8C6;
}

.node-stars .mp-icon.on {
  color: #FFC53D;
  filter: drop-shadow(0 1px 1px rgba(180, 110, 0, .4));
}

/* 角色站位 */
.hero-stage {
  position: relative;
  z-index: 4;
  width: 100%;
  height: clamp(108px, 29vw, 132px);
  margin-top: 1px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 8px 8px rgba(120, 60, 20, .2));
}

.hero-svg {
  position: relative;
  z-index: 2;
  width: clamp(74px, 21vw, 94px);
  height: auto;
  animation: heroBob 3.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}

.hero-podium {
  position: absolute;
  z-index: 1;
  bottom: 1px;
  width: clamp(74px, 21vw, 92px);
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #FFF2A8 0%, #FFD24D 40%, #F29B12 72%, #C56B05 100%);
  border: 2px solid #FFF6C9;
  box-shadow:
    0 4px 0 #A85B06,
    0 0 22px rgba(255, 197, 61, .75);
}

.hero-podium::after {
  content: "";
  position: absolute;
  inset: 5px 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .55);
}

.hero-chip {
  position: absolute;
  z-index: 3;
  top: 1px;
  right: 8%;
  max-width: 88px;
  padding: 1px 7px 2px;
  border-radius: 999px;
  background: rgba(255, 252, 240, .94);
  border: 1.5px solid #FFC77A;
  box-shadow: 0 2px 4px rgba(150, 90, 30, .16);
  font-size: 9px;
  font-weight: 900;
  color: #B45D15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 开始按钮 */
.start-btn {
  position: relative;
  z-index: 6;
  width: 100%;
  min-height: 57px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 3px 6px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #FFF0A8 0%, #FFD34D 22%, #FFAE24 58%, #FF9414 100%);
  border: 3px solid #FFF6CF;
  box-shadow:
    0 6px 0 #C46600,
    0 11px 18px rgba(200, 100, 0, .32),
    inset 0 -8px 12px rgba(190, 80, 0, .24),
    inset 0 7px 9px rgba(255, 255, 255, .62);
  color: #fff;
  font-size: clamp(21px, 6vw, 25px);
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow:
    0 3px 0 #B85700, 2px 0 0 #B85700, -2px 0 0 #B85700, 0 -2px 0 #B85700,
    2px 2px 0 #B85700, -2px 2px 0 #B85700, 2px -2px 0 #B85700, -2px -2px 0 #B85700,
    0 5px 6px rgba(130, 55, 0, .3);
  overflow: hidden;
  transition: transform .1s, box-shadow .1s;
}

.start-btn::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 12%;
  right: 12%;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.start-btn::before {
  content: "";
  position: absolute;
  top: -24%;
  left: -28%;
  width: 20%;
  height: 148%;
  z-index: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .62), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: startShine 3.4s ease-in-out infinite;
  pointer-events: none;
}

.start-btn b {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.start-btn small {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 1px 6px 2px;
  border-radius: 999px;
  background: rgba(166, 78, 0, .26);
  border: 1px solid rgba(255, 255, 255, .4);
  color: #FFF7D6;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(120, 50, 0, .35);
  white-space: nowrap;
  margin-top: 4px;
}

.start-flame {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 22px;
  flex: 0 0 16px;
  background: radial-gradient(circle at 50% 72%, #FFF9C4 0 22%, #FFD34D 24% 44%, #FF8A1F 46% 70%, rgba(255, 90, 20, 0) 72%);
  border-radius: 50% 50% 44% 44% / 62% 62% 38% 38%;
  transform: rotate(-8deg);
  filter: drop-shadow(0 1px 2px rgba(140, 55, 0, .3));
}

.start-btn:active {
  transform: translateY(5px);
  box-shadow:
    0 1px 0 #C46600,
    0 4px 8px rgba(200, 100, 0, .3),
    inset 0 -5px 9px rgba(190, 80, 0, .22),
    inset 0 7px 9px rgba(255, 255, 255, .55);
}

/* =========================================================
   关卡界面
   ========================================================= */

.game {
  padding: calc(7px + var(--safe-top)) 10px calc(6px + var(--safe-bottom));
  gap: 6px;
  background:
    radial-gradient(120% 58% at 50% 0%, #FFEBD2 0%, #FFE0BE 40%, #FFF4E3 72%, #FFEFD9 100%);
}

.game::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 24px 40px, rgba(255, 158, 76, .07) 0 12px, transparent 13px),
    radial-gradient(circle at 92px 110px, rgba(255, 158, 76, .05) 0 18px, transparent 19px);
  background-size: 150px 160px;
  opacity: .8;
}

.game-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.round-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #89C9FF, #3B8BEA 52%, #2468CE);
  border: 3px solid #fff;
  box-shadow: 0 4px 0 #1B56A9, 0 6px 10px rgba(35, 92, 175, .26), inset 0 3px 5px rgba(255, 255, 255, .5);
}

.round-btn .mp-icon {
  width: 22px;
  height: 22px;
}

.round-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #1B56A9, 0 3px 6px rgba(35, 92, 175, .26);
}

.level-chip {
  flex: 1;
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFDF6, #FFF0D6);
  border: 2px solid #FFC77A;
  box-shadow: 0 3px 0 #E8A34D, inset 0 2px 4px rgba(255, 255, 255, .8);
  color: #7A3E14;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
}

.level-chip .mp-icon {
  width: 19px;
  height: 19px;
  color: #FF8A3D;
  flex: 0 0 auto;
}

.level-chip b {
  color: #E4571C;
  font-size: 18px;
  font-weight: 900;
}

.level-chip em {
  margin-left: auto;
  padding: 1px 7px 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE9B0, #FFD063);
  border: 1px solid #F0B33B;
  color: #9A520C;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-coins {
  flex: 0 0 auto;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 1px 9px 1px 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6A6A70, #44444B);
  border: 2px solid rgba(255, 255, 255, .6);
  box-shadow: 0 3px 0 rgba(60, 40, 25, .22), inset 0 2px 0 rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.game-coins svg {
  width: 27px;
  height: 27px;
}

/* 喷火龙能量条 */
.dragon-meter {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  height: 104px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px 4px 2px;
  border-radius: 24px;
  background:
    radial-gradient(80% 130% at 8% 50%, rgba(255, 210, 120, .9) 0%, rgba(255, 196, 120, .34) 44%, rgba(255, 196, 120, 0) 72%),
    linear-gradient(120deg, #FFE3C8 0%, #FFD6B5 52%, #FFC9A2 100%);
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow:
    0 4px 0 rgba(214, 120, 50, .16),
    0 8px 18px rgba(210, 120, 50, .12),
    inset 0 2px 8px rgba(255, 255, 255, .65);
  overflow: hidden;
}

.dragon-meter::before {
  content: "";
  position: absolute;
  right: -22px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 140, 60, .22), rgba(255, 140, 60, 0) 70%);
}

.dragon-meter.charged {
  box-shadow:
    0 0 0 3px rgba(255, 214, 91, .55),
    0 0 32px rgba(255, 154, 46, .55),
    0 4px 0 rgba(214, 120, 50, .16),
    inset 0 2px 10px rgba(255, 255, 255, .7);
}

.mini-dragon {
  position: relative;
  flex: 0 0 114px;
  width: 114px;
  height: 100px;
  z-index: 1;
}

.mini-dragon svg,
.mini-dragon-img {
  position: absolute;
  left: -12px;
  top: -12px;
  width: 138px;
  height: 124px;
  object-fit: cover;
  object-position: 24% 52%;
  animation: miniDragonBob 3.4s ease-in-out infinite;
  transform-origin: 50% 60%;
  filter: drop-shadow(0 4px 5px rgba(150, 60, 20, .24));
}

.meter-ember {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF7B8, #FFB13B 45%, rgba(255, 90, 20, 0) 70%);
  opacity: 0;
  z-index: 2;
  animation: meterEmber 2.6s linear infinite;
}

.meter-ember.m1 { left: 60%; top: 48%; }
.meter-ember.m2 { left: 74%; top: 62%; animation-delay: .8s; width: 10px; height: 10px; }
.meter-ember.m3 { left: 86%; top: 44%; animation-delay: 1.5s; width: 6px; height: 6px; }

.meter-main {
  position: relative;
  flex: 1;
  min-width: 0;
  z-index: 2;
  padding-bottom: 2px;
}

.meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  color: #7A3E14;
  font-size: 12.5px;
  font-weight: 900;
}

.meter-head span {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.meter-head .mp-icon {
  width: 16px;
  height: 16px;
  color: #F05A24;
}

.meter-head b {
  color: #E24A14;
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}

.meter-track {
  position: relative;
  height: 21px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6E3B1C, #8A4A22);
  border: 2px solid #FFF2CE;
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, .38), 0 2px 0 rgba(255, 255, 255, .4);
  overflow: hidden;
}

.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFD24A 0%, #FF9E2E 45%, #FF5A24 100%);
  box-shadow: 0 0 12px rgba(255, 160, 40, .9);
  transition: width .38s cubic-bezier(.2, .8, .3, 1);
  overflow: hidden;
}

.meter-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .2) 0 8px, rgba(255, 255, 255, 0) 8px 18px);
  animation: meterShine 1.1s linear infinite;
}

.meter-tip {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 9px;
  height: 26px;
  margin-top: -13px;
  margin-left: -4px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #FFF9C0 0 30%, #FFB13B 50%, rgba(255, 90, 20, 0) 72%);
  transform: scale(.8);
  opacity: .65;
  transition: left .38s cubic-bezier(.2, .8, .3, 1);
  pointer-events: none;
}

.meter-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
  color: #A76B3C;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.meter-sub #remainTxt {
  color: #C14E18;
  font-weight: 900;
}

.fire-burst {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 55%, rgba(255, 250, 190, .95) 0%, rgba(255, 190, 50, .55) 17%, rgba(255, 100, 20, 0) 42%),
    radial-gradient(circle at 42% 48%, rgba(255, 220, 100, .8) 0%, rgba(255, 120, 30, 0) 33%);
}

.fire-burst.on {
  animation: fireBurst 1.2s ease-out both;
}

/* 棋盘 */
.board-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .58), rgba(255, 236, 211, .3));
  border: 2px solid rgba(255, 255, 255, .8);
  box-shadow: inset 0 2px 12px rgba(180, 110, 50, .08);
}

.board-holder {
  position: relative;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 12px rgba(70, 95, 120, .18));
}

.board {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 3px;
  padding: 6px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, #EDF4FA 0%, #DFEAF3 55%, #D6E2EE 100%);
  box-shadow:
    inset 0 4px 14px rgba(70, 100, 130, .2),
    inset 0 -2px 0 rgba(255, 255, 255, .7),
    0 3px 0 rgba(255, 255, 255, .6);
  overflow: hidden;
}

.cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, .17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.cell::after {
  content: "";
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: rgba(120, 150, 175, .13);
  pointer-events: none;
}

.bus {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  transition: filter .15s;
  will-change: transform;
  touch-action: manipulation;
  animation: busIn .34s cubic-bezier(.2, 1.12, .42, 1) both;
}

.bus-rot {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform .12s ease-out;
  filter: drop-shadow(0 3px 2px rgba(30, 45, 60, .2));
}

.bus:active .bus-rot {
  transform: scale(.93);
}

.bus-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bus.is-locked .bus-rot {
  filter: saturate(.72) brightness(.94) drop-shadow(0 3px 2px rgba(30, 45, 60, .2));
}

.bus.is-locked::after {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 10px;
  background: repeating-linear-gradient(42deg, rgba(58, 69, 84, 0) 0 8px, rgba(58, 69, 84, .26) 8px 12px);
  box-shadow: inset 0 0 0 1px rgba(48, 58, 72, .16);
  pointer-events: none;
  z-index: 2;
}

.bus-lock {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: clamp(30px, 8.8vw, 38px);
  height: clamp(30px, 8.8vw, 38px);
  border-radius: 34%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #FFF3A6 0%, #FFCF3E 44%, #E88B00 100%);
  border: 2.5px solid #FFF9D8;
  box-shadow: 0 2.5px 0 #A55A00, 0 4px 8px rgba(80, 40, 0, .32), inset 0 2px 2px rgba(255, 255, 255, .55);
  color: #5B2E00;
  animation: lockPulse 2.2s ease-in-out infinite;
}

.bus-lock .mp-icon {
  width: 60%;
  height: 60%;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .45));
}

.bus-lock b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FF7A6B, #E0392A);
  border: 1.5px solid #fff;
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 1px 3px rgba(100, 20, 10, .3);
}

.bus.just-unlocked .bus-lock {
  animation: lockBreak .45s ease-out forwards;
}

.bus.hint {
  animation: hintPulse 1s ease-in-out 3;
}

.bus.blocked {
  animation: busShake .38s ease-in-out;
}

.bus.leaving {
  z-index: 8;
  pointer-events: none;
  animation: driveOut .42s cubic-bezier(.35, 0, .75, .35) forwards;
}

.chain-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.chain-under {
  stroke: rgba(58, 70, 86, .84);
  stroke-width: 5.6;
  stroke-linecap: round;
  fill: none;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .6));
}

.chain-over {
  stroke: rgba(236, 244, 252, .98);
  stroke-width: 2.1;
  stroke-dasharray: 2.6 4.2;
  stroke-linecap: round;
  fill: none;
  vector-effect: non-scaling-stroke;
  animation: chainFlow 3.4s linear infinite;
}

.chain-pin {
  fill: #596574;
  stroke: #EAF1F8;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.chain-node {
  fill: #46525F;
  stroke: #E7EEF6;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.dust {
  position: absolute;
  width: 55%;
  height: 55%;
  left: 22%;
  top: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .9) 0%, rgba(255, 232, 190, .55) 45%, rgba(255, 232, 190, 0) 70%);
  pointer-events: none;
  z-index: 4;
  animation: dustPop .42s ease-out forwards;
}

.float-score {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translateX(-50%);
  z-index: 6;
  color: #FFF6C9;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .5px;
  text-shadow:
    0 2px 0 #E4571C, 2px 0 0 #E4571C, -2px 0 0 #E4571C, 0 -2px 0 #E4571C,
    2px 2px 0 #E4571C, -2px 2px 0 #E4571C, 2px -2px 0 #E4571C, -2px -2px 0 #E4571C,
    0 0 10px rgba(255, 140, 30, .9);
  pointer-events: none;
  animation: floatUp .82s ease-out forwards;
}

/* 消除后飞向小龙的能量火珠 */
.energy-orb {
  position: absolute;
  z-index: 9;
  width: 13px;
  height: 13px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 44% 38%, #FFFDE4 0 18%, #FFE06A 34%, #FF9B22 62%, rgba(255, 92, 20, 0) 76%);
  box-shadow: 0 0 9px rgba(255, 170, 50, .85);
  animation: orbFly .72s cubic-bezier(.3, .1, .5, 1) forwards;
}

.game-foot {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 2px;
  transition: opacity .3s;
}

.foot-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 26px;
  padding: 1px 9px 2px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 253, 246, .94), rgba(255, 238, 213, .9));
  border: 1.5px solid rgba(255, 195, 128, .7);
  box-shadow: 0 2px 4px rgba(160, 95, 40, .1), inset 0 1px 0 #fff;
  color: #99603A;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.foot-chip .mp-icon {
  width: 14px;
  height: 14px;
  color: #E58C3C;
}

.foot-chip:nth-child(2) .mp-icon {
  color: #B47A26;
}

.game-foot.fade {
  opacity: .45;
}

/* =========================================================
   弹层 / 底部面板
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal[hidden] {
  display: none;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(58, 30, 10, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn .2s ease-out both;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 470px;
  max-height: 79dvh;
  display: flex;
  flex-direction: column;
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(120% 60% at 50% 0%, #FFFDF7, #FFF3DF 70%, #FFECD0 100%);
  border: 3px solid #fff;
  border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(80, 40, 10, .28);
  animation: sheetUp .3s cubic-bezier(.2, .9, .3, 1) both;
  padding-bottom: var(--safe-bottom);
}

.sheet::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(180, 130, 80, .22);
}

.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 18px 8px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  color: #6B3A16;
  letter-spacing: .5px;
}

.sheet-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8D6A4C;
  background: rgba(255, 255, 255, .8);
  border: 2px solid #EAD8BE;
  box-shadow: 0 2px 0 rgba(180, 140, 90, .18);
}

.sheet-close .mp-icon {
  width: 20px;
  height: 20px;
}

.sheet-close:active {
  transform: translateY(2px);
}

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 18px 24px;
  scrollbar-width: none;
}

.sheet-body::-webkit-scrollbar {
  display: none;
}

.sheet-note {
  margin: 0 0 12px;
  color: #9A7350;
  font-size: 12px;
  line-height: 1.6;
}

/* 设置 */
.setting-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .76);
  border: 1.5px solid #F2DFC4;
  box-shadow: 0 2px 0 rgba(190, 150, 100, .1);
}

.setting-row .set-ico {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #FFC27A, #F28030);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, .4);
}

.setting-row .set-ico .mp-icon {
  width: 20px;
  height: 20px;
}

.setting-row .set-text {
  flex: 1;
  min-width: 0;
}

.setting-row .set-text b {
  display: block;
  font-size: 14px;
  color: #5B3418;
  font-weight: 900;
}

.setting-row .set-text span {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: #A98A68;
  font-weight: 600;
}

.switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex: 0 0 52px;
  border-radius: 999px;
  background: #D9CBB8;
  border: 2px solid #fff;
  box-shadow: inset 0 2px 4px rgba(90, 60, 30, .18);
  transition: background .2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(90, 60, 30, .25);
  transition: transform .2s;
}

.switch.on {
  background: linear-gradient(180deg, #7ED957, #42B93D);
}

.switch.on::after {
  transform: translateX(22px);
}

.nick-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid #E8D2B4;
  background: #FFFDF8;
  color: #5B3418;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

.nick-input:focus {
  border-color: #FFA94D;
  box-shadow: 0 0 0 3px rgba(255, 169, 77, .2);
}

.set-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #FFB34D, #F2812B);
  border: 2px solid #FFD9A8;
  box-shadow: 0 3px 0 #C4600F, inset 0 2px 4px rgba(255, 255, 255, .4);
  transition: transform .1s, box-shadow .1s;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #C4600F;
}

.btn.ghost {
  color: #8D5B2C;
  background: #FFF8EA;
  border: 2px solid #EBD6B8;
  box-shadow: 0 3px 0 #E3CFB2;
}

.btn.danger {
  color: #fff;
  background: linear-gradient(180deg, #FF8A7A, #E24432);
  border-color: #FFC4B8;
  box-shadow: 0 3px 0 #B02A1C;
}

.btn.wide {
  flex: 1;
}

/* 榜单 */
.podium-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .72);
  border: 1.5px solid #F0DDC3;
}

.rank-row.me {
  background: linear-gradient(180deg, #FFF7DA, #FFEDB8);
  border-color: #F3C35A;
  box-shadow: 0 0 0 2px rgba(255, 197, 61, .16);
}

.rank-no {
  width: 28px;
  flex: 0 0 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: #B08A63;
  font-variant-numeric: tabular-nums;
}

.rank-row.top1 .rank-no { color: #E89B00; font-size: 17px; }
.rank-row.top2 .rank-no { color: #7C8B9C; font-size: 16px; }
.rank-row.top3 .rank-no { color: #C07A40; font-size: 16px; }

.rank-ava {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  overflow: hidden;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px #EAD6BA;
}

.rank-ava .avatar-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rank-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 900;
  color: #5B3418;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-name .me-tag {
  padding: 0 5px;
  border-radius: 999px;
  background: #FF8A3D;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.55;
}

.rank-score {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #D9581F;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.rank-score .mp-icon {
  width: 14px;
  height: 14px;
  color: #F5A623;
}

/* 称号 / 角色 */
.title-list,
.char-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-item,
.char-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .74);
  border: 1.5px solid #F0DDC3;
}

.title-item.locked,
.char-item.locked {
  opacity: .6;
}

.title-badge {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #6FB6FF, #2F7BE0);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, .4);
}

.title-badge .mp-icon {
  width: 21px;
  height: 21px;
}

.title-info,
.char-info {
  flex: 1;
  min-width: 0;
}

.title-info b,
.char-info b {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: #5B3418;
}

.title-info span,
.char-info span {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: #A98A68;
}

.equip-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #FFB34D, #F2812B);
  border: 2px solid #FFD9A8;
  box-shadow: 0 2px 0 #C4600F;
}

.equip-btn.on {
  color: #A06A2E;
  background: #FFF8EA;
  border-color: #EBD6B8;
  box-shadow: 0 2px 0 #E3CFB2;
}

.equip-btn:active {
  transform: translateY(2px);
}

.equip-btn:disabled {
  opacity: .55;
  box-shadow: none;
}

.char-ava {
  width: 52px;
  height: 62px;
  flex: 0 0 52px;
  border-radius: 12px;
  background: linear-gradient(180deg, #FFF4DD, #FFE4BC);
  border: 1.5px solid #F0D7B5;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.char-ava .hero-svg {
  width: 45px;
  height: auto;
  animation: none;
}

/* 游戏圈 */
.circle-posts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.circle-post {
  display: flex;
  gap: 9px;
  padding: 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .75);
  border: 1.5px solid #F0DDC3;
}

.circle-post .post-ico {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #FFC27A, #F2812B);
}

.circle-post .post-ico .mp-icon {
  width: 19px;
  height: 19px;
}

.circle-post b {
  display: block;
  font-size: 13px;
  color: #5B3418;
  font-weight: 900;
}

.circle-post p {
  margin: 2px 0 0;
  font-size: 11px;
  color: #9A7350;
  line-height: 1.55;
}

/* 生肖 */
.zodiac-hero {
  position: relative;
  padding: 18px 12px 10px;
  text-align: center;
  border-radius: 20px;
  background:
    radial-gradient(70% 70% at 50% 22%, #FFE7AE, rgba(255, 231, 174, 0) 72%),
    linear-gradient(180deg, #FFF9EA, #FFEACB);
  border: 2px solid #FFD894;
  overflow: hidden;
}

.zodiac-hero .avatar-svg {
  width: 118px;
  height: 118px;
  border-radius: 28px;
  box-shadow: 0 7px 16px rgba(190, 120, 30, .24);
  animation: heroBob 3.4s ease-in-out infinite;
}

.zodiac-hero h3 {
  margin: 8px 0 2px;
  font-size: 19px;
  color: #A9550D;
  font-weight: 900;
}

.zodiac-hero p {
  margin: 0;
  color: #A98A68;
  font-size: 11.5px;
}

.zodiac-chips {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.zodiac-chip {
  min-width: 38px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid #EDD4B0;
  color: #B08454;
  font-size: 11px;
  font-weight: 900;
}

/* =========================================================
   结算
   ========================================================= */

.result {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.result[hidden] {
  display: none;
}

.result-mask {
  position: absolute;
  inset: 0;
  background: rgba(58, 25, 8, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .25s ease-out both;
}

.result-card {
  position: relative;
  width: 100%;
  max-width: 336px;
  padding: 22px 18px 17px;
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(90% 60% at 50% 0%, #FFFDF2 0%, #FFF4DC 52%, #FFEAC2 100%);
  border: 4px solid #fff;
  box-shadow:
    0 20px 50px rgba(80, 30, 0, .36),
    inset 0 0 0 3px #FFC77A;
  animation: popIn .42s cubic-bezier(.2, 1.3, .4, 1) both;
  overflow: hidden;
}

.result-card::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 90, .45), rgba(255, 206, 90, 0) 70%);
  pointer-events: none;
}

.result-kicker {
  position: relative;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFD96B, #FFB32E);
  color: #8A4300;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 2px 0 rgba(190, 110, 0, .25);
}

.result-card h2 {
  position: relative;
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 1px;
  color: #FFD24D;
  text-shadow:
    0 3px 0 #B95300, 2px 0 0 #B95300, -2px 0 0 #B95300, 0 -2px 0 #B95300,
    2px 2px 0 #B95300, -2px 2px 0 #B95300, 2px -2px 0 #B95300, -2px -2px 0 #B95300,
    0 6px 8px rgba(140, 60, 0, .28);
}

.result-card .result-sub {
  position: relative;
  margin: 4px 0 0;
  color: #9A6A3E;
  font-size: 12px;
  font-weight: 700;
}

.result-card.is-lose h2 {
  color: #FF9A5C;
  text-shadow:
    0 3px 0 #A93A0C, 2px 0 0 #A93A0C, -2px 0 0 #A93A0C, 0 -2px 0 #A93A0C,
    2px 2px 0 #A93A0C, -2px 2px 0 #A93A0C, 2px -2px 0 #A93A0C, -2px -2px 0 #A93A0C,
    0 6px 8px rgba(120, 40, 0, .3);
}

.result-card.is-lose .result-kicker {
  background: linear-gradient(180deg, #FFB0A0, #EF5A42);
  color: #FFF6EF;
  text-shadow: 0 1px 1px rgba(120, 20, 10, .3);
}

.reward-dot {
  margin: 0 1px;
  color: #C99656;
  font-weight: 900;
}

.result-stars {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 10px 0 8px;
}

.result-stars .mp-icon {
  width: 42px;
  height: 42px;
  color: #E4D7C2;
  filter: drop-shadow(0 2px 0 rgba(150, 110, 60, .12));
  transform: scale(.86);
  transition: transform .2s;
}

.result-stars .mp-icon.on {
  color: #FFC53D;
  filter: drop-shadow(0 3px 0 #C47A00) drop-shadow(0 0 10px rgba(255, 190, 40, .55));
  animation: starPop .45s cubic-bezier(.2, 1.5, .4, 1) both;
}

.result-reward {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 12px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1.5px solid #F0D7AE;
  color: #8A4A14;
  font-size: 12px;
  font-weight: 900;
}

.result-reward svg {
  width: 22px;
  height: 22px;
}

.result-actions {
  position: relative;
  display: flex;
  gap: 8px;
}

.result-actions .btn {
  flex: 1;
  min-height: 48px;
  border-radius: 16px;
  font-size: 15px;
}

.result-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #A98560;
  background: rgba(255, 255, 255, .65);
}

.result-close .mp-icon {
  width: 18px;
  height: 18px;
}

.confetti {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 13px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  animation: confettiFall 2.4s linear forwards;
}

/* =========================================================
   Toast
   ========================================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 200;
  max-width: 82vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(58, 32, 14, .94);
  border: 1.5px solid rgba(255, 220, 160, .35);
  color: #FFF8E8;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 22px rgba(40, 15, 0, .32);
  pointer-events: none;
  animation: toastIn .26s cubic-bezier(.2, .9, .3, 1) both;
}

.toast[hidden] {
  display: none;
}

/* =========================================================
   动画
   ========================================================= */

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px) scale(.995); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetUp {
  from { transform: translateY(102%); }
  to { transform: translateY(0); }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(.72) translateY(14px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px) scale(.94); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes dragonBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-1deg); }
}

@keyframes miniDragonBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.02); }
}

@keyframes heroBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: .75; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes crownPulse {
  0%, 100% { opacity: .5; transform: scale(.97); }
  50% { opacity: .95; transform: scale(1.03); }
}

@keyframes crownBob {
  0%, 100% { transform: translate(-50%, 0) rotate(-3deg); }
  50% { transform: translate(-50%, -3px) rotate(3deg); }
}

@keyframes startShine {
  0% { left: -28%; opacity: 0; }
  18% { opacity: .85; }
  42% { left: 108%; opacity: 0; }
  100% { left: 108%; opacity: 0; }
}

@keyframes busIn {
  from { opacity: 0; transform: scale(.64); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes orbFly {
  0% { opacity: 0; transform: translate(0, 0) scale(.55); }
  18% { opacity: 1; transform: translate(0, 0) scale(1.08); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(.28); }
}

@keyframes nodeGlow {
  0%, 100% { box-shadow: 0 5px 0 #5E738C, 0 9px 16px rgba(60, 85, 115, .32), 0 0 0 5px rgba(255, 255, 255, .45), 0 0 20px rgba(255, 255, 255, .45), inset 0 -7px 10px rgba(0, 0, 0, .16), inset 0 5px 8px rgba(255, 255, 255, .55); }
  50% { box-shadow: 0 5px 0 #5E738C, 0 9px 16px rgba(60, 85, 115, .32), 0 0 0 7px rgba(255, 255, 255, .6), 0 0 34px rgba(255, 255, 255, .75), inset 0 -7px 10px rgba(0, 0, 0, .16), inset 0 5px 8px rgba(255, 255, 255, .55); }
}

@keyframes flameLick {
  0%, 100% { transform: rotate(0deg) scaleX(1) scaleY(1); opacity: .82; }
  30% { transform: rotate(-4deg) scaleX(1.08) scaleY(.9); opacity: 1; }
  62% { transform: rotate(3deg) scaleX(.94) scaleY(1.08); opacity: .74; }
  82% { transform: rotate(-1deg) scaleX(1.03) scaleY(.96); opacity: .92; }
}

@keyframes jetFlicker {
  0%, 100% { transform: scaleX(1) scaleY(1) translateY(0); opacity: .9; }
  28% { transform: scaleX(1.07) scaleY(.9) translateY(1px); opacity: 1; }
  56% { transform: scaleX(.94) scaleY(1.06) translateY(-1px); opacity: .82; }
  78% { transform: scaleX(1.03) scaleY(.96) translateY(0); opacity: .97; }
}

@keyframes emberFly {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  12% { opacity: .95; }
  70% { opacity: .6; }
  100% { opacity: 0; transform: translate(34px, -38px) scale(1.25); }
}

@keyframes meterEmber {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  18% { opacity: .9; }
  100% { opacity: 0; transform: translate(20px, -26px) scale(1.2); }
}

@keyframes meterShine {
  from { transform: translateX(-22px); }
  to { transform: translateX(22px); }
}

@keyframes fireBurst {
  0% { opacity: 0; transform: scale(.7); }
  22% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1.16); }
}

@keyframes lockPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes chainFlow {
  to { stroke-dashoffset: -13.6; }
}

@keyframes lockBreak {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1.35) rotate(12deg); opacity: .8; }
  100% { transform: translate(-50%, -50%) scale(0) rotate(-24deg); opacity: 0; }
}

@keyframes busShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px) rotate(-1.5deg); }
  40% { transform: translateX(4px) rotate(1.5deg); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

@keyframes hintPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 214, 80, 0)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 10px rgba(255, 214, 80, .95)); transform: scale(1.06); }
}

@keyframes driveOut {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  14% { transform: translate(calc(var(--dx) * -.035), calc(var(--dy) * -.035)) scale(1.04); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.94); opacity: .1; }
}

@keyframes dustPop {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.5); }
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); }
  25% { opacity: 1; transform: translate(-50%, -2px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1.05); }
}

@keyframes starPop {
  0% { transform: scale(.5) rotate(-18deg); opacity: .2; }
  60% { transform: scale(1.22) rotate(6deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: .85; transform: translateY(420px) rotate(540deg); }
}

/* =========================================================
   首页 · 底部导航
   ========================================================= */

.home-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(60px + var(--safe-bottom));
  padding: 0 30px var(--safe-bottom);
  display: flex;
  align-items: stretch;
  background:
    radial-gradient(90% 140% at 50% 0%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #63BDFF 0%, #2F8AE8 42%, #1D63C8 100%);
  border-top: 2px solid rgba(255, 255, 255, .72);
  box-shadow:
    0 -5px 16px rgba(28, 88, 168, .24),
    inset 0 2px 0 rgba(255, 255, 255, .32);
}

.home-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  pointer-events: none;
}

.nav-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform .1s;
}

.nav-item:active {
  transform: translateY(2px) scale(.96);
}

.nav-side .mp-icon {
  width: 34px;
  height: 34px;
  color: #FFD34D;
  filter: drop-shadow(0 2px 0 rgba(20, 60, 120, .38));
}

.nav-item[data-nav="shop"] .mp-icon {
  color: #FFE0B0;
}

.nav-home {
  flex: 0 0 34%;
  justify-content: flex-end;
  padding-bottom: 2px;
}

.nav-home-tab {
  position: absolute;
  left: 50%;
  bottom: calc(17px + var(--safe-bottom));
  transform: translateX(-50%);
  width: 96px;
  height: 51px;
  display: grid;
  place-items: center;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #89D3FF 0%, #4CA6F2 46%, #2A76CE 100%);
  border: 2px solid rgba(255, 255, 255, .85);
  border-bottom: 0;
  box-shadow:
    inset 0 3px 5px rgba(255, 255, 255, .62),
    inset 0 -5px 8px rgba(20, 80, 160, .2),
    0 -4px 12px rgba(20, 70, 140, .16);
}

.nav-home-tab .mp-icon {
  width: 35px;
  height: 35px;
  color: #fff;
  filter: drop-shadow(0 2px 0 rgba(24, 74, 140, .32));
}

.nav-home-label {
  position: relative;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.2;
  color: #fff;
  letter-spacing: .6px;
  text-shadow: 0 1px 0 rgba(16, 60, 120, .5);
}

/* =========================================================
   适配
   ========================================================= */

@media (max-height: 600px) {
  .path-nodes .node-wrap + .node-wrap { display: none; }
  .path-track { bottom: 72px; }
  .side-rail.right .rail-btn:nth-child(5) { display: none; }
}

@media (max-width: 370px) {
  :root {
    --rail: 56px;
    --node: 64px;
  }
  .topbar { gap: 6px; padding-left: 9px; padding-right: 9px; }
  .top-btn { width: 43px; height: 43px; flex-basis: 43px; }
  .currency { height: 35px; font-size: 14px; }
  .currency-ico { width: 28px; height: 28px; }
  .leader-row { padding-left: 7px; padding-right: 7px; gap: 2px; }
  .circle-entry { flex-basis: 58px; width: 58px; }
  .circle-wheel { width: 50px; height: 50px; }
  .leaderboard { min-height: 126px; }
  .lb-title { font-size: 16px; }
  .lb-avatar { width: 39px; height: 39px; }
  .lb-item.place-1 .lb-avatar { width: 49px; height: 49px; }
  .node-tag { font-size: 9px; padding-left: 7px; padding-right: 7px; }
  .rail-lbl { font-size: 9.5px; }
  .rail-mini .rail-lbl { font-size: 9px; }
  .hero-chip { display: none; }
  .dragon-meter { height: 96px; }
  .mini-dragon { flex-basis: 100px; width: 100px; height: 92px; }
  .mini-dragon-img { width: 124px; height: 110px; }
  .meter-head { font-size: 11.5px; }
  .meter-sub { font-size: 8.8px; }
  .level-chip em { display: none; }
}

@media (max-height: 690px) {
  .playfield { min-height: 320px; padding-top: 10px; padding-bottom: 4px; }
  .leader-row { padding-top: 8px; }
  .leaderboard { min-height: 118px; padding-top: 11px; }
  .lb-avatar { width: 38px; height: 38px; }
  .lb-item.place-1 .lb-avatar { width: 48px; height: 48px; }
  .lb-me { margin-top: 2px; padding-top: 1px; padding-bottom: 1px; min-height: 23px; }
  .lb-me-ava { flex-basis: 19px; width: 19px; height: 19px; }
  .lb-me-name { font-size: 9.5px; }
  .node { --node: 64px; }
  .hero-stage { height: 104px; }
  .start-btn { min-height: 50px; }
  .dragon-meter { height: 94px; }
  .mini-dragon { flex-basis: 100px; width: 100px; height: 90px; }
  .mini-dragon-img { width: 124px; height: 110px; }
  .game-foot { min-height: 27px; }
}

@media (min-width: 520px) {
  .app {
    top: 12px;
    bottom: 12px;
    border-radius: 34px;
    box-shadow: 0 30px 90px rgba(90, 50, 10, .3);
  }
  .sheet {
    border-radius: 26px;
    margin-bottom: 12px;
  }
  .modal {
    align-items: center;
  }
  .sheet {
    animation-name: popIn;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
