/* 深海捕鱼 · 竖屏铺满的街机捕鱼 H5 */
:root {
  --orange: #FF8A3D;
  --orange-deep: #0BD8B0;
  --gold: #FFD36E;
  --gold-2: #2AE8F0;
  --ink: #1F0407;
  --panel: rgba(6, 27, 43, .8);
  --line: rgba(255, 201, 121, .28);
  --text: #F8F4EA;
  --muted: #C89FA8;
  --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 {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #010a12;
}

body {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  user-select: none;
}

img {
  -webkit-user-drag: none;
}

.app {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #500B16 0%, #2A0408 45%, #010a12 100%);
  box-shadow: 0 0 100px rgba(0, 0, 0, .9);
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#sea {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ---------- 顶部游戏 HUD ---------- */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: calc(var(--safe-top) + 10px) 14px 0;
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
  visibility: visible;
}

.hud button {
  pointer-events: auto;
}

.hud-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(11, 39, 58, .9), rgba(4, 20, 34, .85));
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 62%;
}

.avatar {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #862A46, #47121A);
  border: 2px solid #FFC766;
  color: #FFE7B0;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(255, 170, 60, .25);
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.avatar.has-img img {
  display: block;
}

.avatar.has-img span {
  display: none;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 19px;
  border-width: 2px;
}

.p-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.p-meta b {
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 104px;
  color: #FFF3D9;
}

.p-best {
  display: flex;
  align-items: center;
  gap: 2px;
  font-style: normal;
  font-size: 9.5px;
  color: #FFC978;
}

.p-best .mp-icon {
  width: 11px;
  height: 11px;
}

.hud-tools {
  display: flex;
  gap: 6px;
  flex: none;
}

.icon-btn {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(6, 26, 40, .78);
  color: #FFE0B0;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .12s ease;
}

.icon-btn.exit {
  color: #FFB29A;
  border-color: rgba(255, 140, 100, .25);
  background: rgba(44, 16, 16, .62);
}

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

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

#btnSound .ico-off {
  display: none;
}

.app.muted #btnSound .ico-on {
  display: none;
}

.app.muted #btnSound .ico-off {
  display: block;
}

.hud-status {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

.coin-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 33, 50, .9), rgba(4, 20, 34, .88));
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.coin-pill b {
  font-size: 16px;
  font-weight: 900;
  color: #FFE3A6;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}

.coin-pill.bump b {
  animation: bump .28s ease;
}

.coin-dot {
  position: relative;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF7C9, #FFD05A 45%, #0FD7D9 80%);
  border: 1px solid #FFE9AE;
  box-shadow: 0 0 10px rgba(255, 190, 60, .5), inset 0 -2px 4px rgba(150, 80, 0, .45);
  flex: none;
}

.coin-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(160, 90, 0, .45);
}

.jackpot {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px 12px 4px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(37, 23, 6, .92), rgba(8, 25, 35, .9));
  border: 1px solid rgba(255, 198, 96, .5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 220, 150, .16);
  overflow: hidden;
}

.jackpot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 220, 140, .16) 50%, transparent 70%);
  animation: shimmer 3.2s linear infinite;
  pointer-events: none;
}

.jp-title {
  font-size: 8.5px;
  letter-spacing: .24em;
  text-indent: .24em;
  color: #FFC978;
  white-space: nowrap;
  position: relative;
  line-height: 1.3;
}

.jp-value {
  position: relative;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFF9D8, #FFD36E 46%, #22F0F0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(90, 40, 0, .8));
  white-space: nowrap;
}

/* ---------- 多人对战排名 ---------- */
.battle-hud {
  position: absolute;
  z-index: 24;
  left: 12px;
  top: calc(var(--safe-top) + 162px);
  width: 124px;
  padding: 8px 8px 7px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(9, 33, 50, .88), rgba(4, 18, 30, .92));
  border: 1px solid rgba(255, 200, 120, .28);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4), inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}

.app.in-battle .battle-hud {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.app.mode-menu .battle-hud {
  opacity: 0;
  visibility: hidden;
}

.bh-top {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 2px 6px;
  border-bottom: 1px solid rgba(255, 200, 120, .14);
  margin-bottom: 4px;
}

.bh-top .mp-icon {
  width: 13px;
  height: 13px;
  color: #FFC978;
}

.bh-top b {
  font-size: 15px;
  font-weight: 900;
  color: #FFE3A6;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.bh-top span {
  font-size: 8px;
  color: #BE8F9A;
  margin-left: auto;
}

.battle-hud.danger .bh-top b {
  color: #FF8A6E;
  animation: bump .7s ease infinite;
}

.bh-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bh-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 3px 3px;
  border-radius: 8px;
}

.bh-row.me {
  background: linear-gradient(90deg, rgba(255, 170, 80, .22), rgba(255, 140, 50, .05));
  box-shadow: inset 0 0 0 1px rgba(255, 190, 100, .28);
}

.bh-rank {
  flex: none;
  width: 10px;
  font-size: 8.5px;
  font-weight: 900;
  color: #FFC978;
  text-align: center;
}

.bh-ava {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 900;
  color: #1F0407;
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, .3);
}

.bh-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8.5px;
  color: #D3E4ED;
}

.bh-score {
  flex: none;
  font-size: 9px;
  font-weight: 900;
  color: #FFE3A6;
  font-variant-numeric: tabular-nums;
}

/* ---------- 连击 / 飘字 / 大赢家 ---------- */
.combo {
  position: absolute;
  z-index: 25;
  top: calc(var(--safe-top) + 126px);
  left: 50%;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 14px 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 150, 50, .22), rgba(120, 40, 0, .45));
  border: 1px solid rgba(255, 200, 110, .5);
  box-shadow: 0 0 22px rgba(255, 140, 40, .3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transform: translate(-50%, 8px) scale(.8);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.combo.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.combo b {
  font-size: 25px;
  font-weight: 900;
  font-style: italic;
  color: #FFE08A;
  text-shadow: 0 2px 0 #0AB296, 0 0 18px rgba(255, 160, 50, .8);
}

.combo span {
  font-size: 10px;
  letter-spacing: .16em;
  color: #FFD9A0;
}

.toast-wrap {
  position: absolute;
  z-index: 95;
  left: 0;
  right: 0;
  bottom: calc(184px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  padding: 0 20px;
}

.toast {
  max-width: 100%;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(4, 18, 30, .94);
  border: 1px solid rgba(255, 200, 120, .35);
  color: #FFE6B8;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  animation: toastIn .24s ease both, toastOut .32s ease 1.95s both;
}

.toast.gold {
  border-color: rgba(255, 200, 90, .7);
  background: linear-gradient(180deg, rgba(70, 40, 8, .95), rgba(24, 18, 8, .95));
  color: #FFE3A0;
}

.bigwin {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
  overflow: hidden;
}

.bigwin.show {
  opacity: 1;
  visibility: visible;
}

.bw-rays {
  position: absolute;
  width: 160vmax;
  height: 160vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 192, 82, .2) 0deg 4deg, transparent 4deg 13deg);
  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, .95) 0%, rgba(0, 0, 0, .45) 30%, transparent 62%);
  mask-image: radial-gradient(circle, rgba(0, 0, 0, .95) 0%, rgba(0, 0, 0, .45) 30%, transparent 62%);
  animation: spin 14s linear infinite;
}

.bw-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 34px;
  border-radius: 22px;
  background: radial-gradient(ellipse at center, rgba(82, 44, 5, .94), rgba(14, 12, 7, .82));
  border: 1px solid rgba(255, 210, 120, .55);
  box-shadow: 0 0 60px rgba(255, 160, 40, .45), inset 0 1px rgba(255, 240, 190, .25);
  transform: scale(.8);
  transition: transform .35s cubic-bezier(.2, 1.2, .4, 1);
}

.bigwin.show .bw-inner {
  transform: scale(1);
}

.bw-kicker {
  font-size: 10px;
  letter-spacing: .42em;
  text-indent: .42em;
  color: #FFC978;
  font-weight: 800;
}

.bw-inner b {
  font-size: clamp(32px, 10vw, 46px);
  font-weight: 900;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFFBE0, #FFD36E 42%, #18F0E4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(90, 35, 0, .7)) drop-shadow(0 0 22px rgba(255, 170, 50, .65));
}

.bw-sub {
  font-size: 11px;
  letter-spacing: .18em;
  color: #8CE6E8;
}

/* ---------- 底部操作台 ---------- */
.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 14px 14px calc(10px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, rgba(6, 25, 40, .55) 0%, rgba(4, 18, 30, .96) 24%, #03111d 100%);
  border-top: 1px solid rgba(255, 195, 110, .22);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .45), inset 0 1px rgba(255, 255, 255, .05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .3s ease, opacity .3s ease, visibility .3s;
  visibility: visible;
  touch-action: none;
}

.skill-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.skill {
  position: relative;
  height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(255, 200, 120, .18);
  background: linear-gradient(180deg, rgba(20, 52, 74, .9), rgba(7, 26, 42, .95));
  color: #DCEAF2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 4px 12px rgba(0, 0, 0, .3);
  transition: transform .12s ease, border-color .2s, background .2s, box-shadow .2s;
  overflow: hidden;
}

.skill .s-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(255, 170, 80, .28), rgba(255, 140, 60, .05));
  border: 1px solid rgba(255, 180, 100, .2);
}

.skill .mp-icon {
  width: 17px;
  height: 17px;
  color: #FFCE8A;
}

.s-name {
  font-size: 10px;
  letter-spacing: .04em;
  color: #CFE0E9;
  line-height: 1.25;
}

.s-cd {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 15px;
  padding: 0 3px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .38);
  color: #FFD9A0;
  font-size: 8.5px;
  font-style: normal;
  line-height: 13px;
  text-align: center;
}

.skill.cool {
  border-color: rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(18, 38, 52, .9), rgba(6, 20, 32, .95));
}

.skill.cool .s-ico,
.skill.cool .s-name {
  opacity: .42;
}

.skill.active {
  border-color: #FFB24B;
  background: linear-gradient(180deg, rgba(90, 52, 16, .96), rgba(35, 35, 25, .96));
  box-shadow: 0 0 0 1px rgba(255, 156, 61, .5) inset, 0 0 16px rgba(255, 140, 50, .35);
}

.skill.active .s-cd {
  background: rgba(255, 140, 50, .28);
  color: #FFE7BE;
}

.skill:active {
  transform: scale(.94);
}

.ctrl-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.tier-ctl {
  justify-self: start;
  display: flex;
  align-items: stretch;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 45, 65, .88), rgba(6, 23, 37, .92));
  border: 1px solid rgba(255, 200, 120, .25);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 4px 12px rgba(0, 0, 0, .25);
}

.tier-arrow {
  width: 25px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFC978;
  display: grid;
  place-items: center;
}

.tier-arrow .mp-icon {
  width: 17px;
  height: 17px;
}

.tier-arrow:active {
  background: rgba(255, 180, 80, .14);
}

.tier-pill {
  flex: 1;
  min-width: 58px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #FFE6B0;
}

.tier-pill:active {
  background: rgba(255, 180, 80, .08);
}

.tier-cap {
  font-size: 8.5px;
  letter-spacing: .16em;
  text-indent: .16em;
  color: var(--tier-accent, #BD929B);
  line-height: 1.25;
}

.tier-num {
  display: flex;
  align-items: baseline;
  gap: 1px;
}

.tier-num b {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.05;
  color: var(--tier-accent, #FFD36E);
  font-variant-numeric: tabular-nums;
}

.tier-num em {
  font-size: 9px;
  font-style: normal;
  color: var(--tier-accent, #6AC3C7);
  opacity: .75;
}

#startTier,
#pauseTier {
  color: var(--tier-accent, #FFE3A6) !important;
}

.fire-btn {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid var(--tier-accent, #FFE3A6);
  background: radial-gradient(circle at 36% 28%, #FFF0C0, #FFB04C 38%, #16F0D3 72%, #05B995 100%);
  color: #004A3A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  transform: translateY(-8px);
  box-shadow: 0 0 0 5px rgba(255, 140, 50, .13), 0 8px 18px rgba(0, 0, 0, .45), inset 0 -5px 10px rgba(140, 50, 0, .35);
  transition: transform .1s ease, box-shadow .2s;
  touch-action: none;
}

.fire-btn .mp-icon {
  width: 28px;
  height: 28px;
}

.fire-btn > span:last-child {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1;
}

.fire-glow {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 200, 120, .35);
  animation: spin 12s linear infinite;
  pointer-events: none;
}

.fire-btn:active {
  transform: translateY(-3px) scale(.94);
  box-shadow: 0 0 0 8px rgba(255, 140, 50, .1), 0 4px 10px rgba(0, 0, 0, .45), inset 0 -3px 8px rgba(140, 50, 0, .35);
}

.app.laser-on .fire-btn {
  box-shadow: 0 0 0 6px rgba(255, 210, 100, .18), 0 0 26px rgba(255, 170, 50, .55), inset 0 -5px 10px rgba(140, 50, 0, .35);
}

.ad-pill {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 112px;
  min-height: 44px;
  padding: 5px 9px;
  border-radius: 13px;
  border: 1px solid rgba(255, 190, 100, .45);
  background: linear-gradient(180deg, rgba(255, 160, 70, .2), rgba(255, 120, 40, .06));
  color: #FFDFAD;
  font-size: 10px;
  line-height: 1.3;
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 4px 12px rgba(0, 0, 0, .25);
  transition: transform .12s ease;
}

.ad-pill .mp-icon {
  width: 20px;
  height: 20px;
  color: #FFC766;
  flex: none;
}

.ad-pill:active {
  transform: scale(.95);
}

.ad-pill.flash {
  animation: adPulse 1.1s ease-in-out infinite;
}

.ad-pill:disabled,
.ad-pill.is-disabled {
  opacity: .48;
  filter: grayscale(1);
  cursor: not-allowed;
  box-shadow: none;
  animation: none;
}

.dock-hint {
  margin-top: 7px;
  text-align: center;
  font-size: 9px;
  letter-spacing: .06em;
  color: rgba(159, 185, 200, .72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 全屏面板 ---------- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease, visibility .35s;
}

.screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 开始界面 */
.start-screen {
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 4vh) 20px calc(var(--safe-bottom) + 18px);
  background: linear-gradient(180deg, rgba(2, 12, 22, .04) 0%, rgba(2, 12, 22, .2) 28%, rgba(2, 12, 22, .8) 60%, #020e19 100%);
  overflow: hidden;
}

.start-halo {
  position: absolute;
  left: 50%;
  top: 10%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 170, 70, .28), rgba(255, 120, 30, .08) 45%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}

.start-top {
  position: relative;
  text-align: center;
  padding-top: 2vh;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.kicker {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .45em;
  text-indent: .45em;
  color: rgba(255, 206, 146, .72);
}

.game-title {
  margin: 12px 0 0;
  display: flex;
  justify-content: center;
  gap: .05em;
  font-size: clamp(46px, 14.2vw, 70px);
  line-height: .92;
  font-weight: 900;
  letter-spacing: .02em;
  filter: drop-shadow(0 3px 0 rgba(90, 30, 0, .55)) drop-shadow(0 10px 26px rgba(255, 130, 40, .4));
}

.game-title span {
  background: linear-gradient(180deg, #FFF9DE 6%, #FFE090 30%, #FFB246 58%, #12F0D6 82%, #06C9A1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 13px;
  color: #FFD58F;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-indent: .22em;
  text-shadow: 0 0 16px rgba(255, 170, 60, .5);
}

.title-sub i {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #FFC56D, transparent);
}

.title-desc {
  margin: 8px 0 0;
  font-size: 11px;
  letter-spacing: .28em;
  text-indent: .28em;
  color: rgba(210, 231, 240, .6);
}

.start-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  flex: none;
  padding: 14px 16px 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10, 34, 51, .88), rgba(3, 16, 28, .95));
  border: 1px solid rgba(255, 198, 120, .3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.start-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 11px;
  margin-bottom: 11px;
  border-bottom: 1px dashed rgba(255, 198, 120, .18);
}

.sp-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp-meta b {
  font-size: 14px;
  color: #FFF1D2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-meta i {
  font-style: normal;
  font-size: 10px;
  color: #BE8F9A;
}

.sp-best {
  flex: none;
  font-size: 10px;
  color: #C89FA8;
  text-align: right;
  line-height: 1.3;
}

.sp-best b {
  display: block;
  font-size: 15px;
  color: #FFD36E;
  font-variant-numeric: tabular-nums;
}

.start-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 13px;
}

.start-stats div {
  padding: 7px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .05);
  min-width: 0;
}

.start-stats b {
  display: block;
  font-size: 15px;
  color: #FFE3A6;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-stats span {
  font-size: 9px;
  color: #BE8F9A;
  letter-spacing: .04em;
}

.mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.mode-chip {
  height: 36px;
  border-radius: 11px;
  border: 1px solid rgba(255, 200, 120, .18);
  background: rgba(255, 255, 255, .035);
  color: #D4AFB8;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform .12s ease, background .2s, border-color .2s;
}

.mode-chip .mp-icon {
  width: 15px;
  height: 15px;
}

.mode-chip.active {
  border-color: rgba(255, 190, 100, .7);
  background: linear-gradient(180deg, rgba(255, 170, 80, .28), rgba(255, 120, 40, .1));
  color: #FFE5B4;
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 0 14px rgba(255, 150, 50, .18);
}

.mode-chip:active {
  transform: scale(.96);
}

.scene-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.scene-chip {
  position: relative;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .03);
  color: #C89FA8;
  font-size: 9.5px;
  letter-spacing: .02em;
  padding: 0 2px;
  transition: transform .12s ease, background .2s, border-color .2s, color .2s;
}

.scene-chip::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: 1px;
  background: #AE2C5E;
}

.scene-chip[data-scene="1"]::before { background: #FF9A5A; }
.scene-chip[data-scene="2"]::before { background: #9C7CFF; }

.scene-chip.active {
  color: #FFE3AE;
  border-color: rgba(255, 190, 100, .55);
  background: linear-gradient(180deg, rgba(255, 170, 80, .18), rgba(255, 120, 40, .05));
}

.scene-chip:active {
  transform: scale(.95);
}

.primary-btn {
  position: relative;
  width: 100%;
  height: 54px;
  border-radius: 999px;
  border: 1px solid #FFE0A0;
  background: linear-gradient(180deg, #FFC96B, #FF8A3D 45%, #0FE9C0);
  color: #043A2E;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 6px 0 #0AA984, 0 14px 30px rgba(255, 120, 40, .38), inset 0 1px rgba(255, 255, 255, .5);
  transition: transform .1s ease, box-shadow .1s ease;
}

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

.primary-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #0AA984, 0 8px 18px rgba(255, 120, 40, .32), inset 0 1px rgba(255, 255, 255, .4);
}

.text-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #D3A9B4;
  font-size: 12px;
  letter-spacing: .04em;
}

.text-btn .mp-icon {
  width: 15px;
  height: 15px;
}

.text-btn:active {
  color: #FFD9A0;
  transform: scale(.98);
}

.start-note {
  margin: 4px 0 0;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: .03em;
  color: rgba(159, 185, 200, .7);
}

.start-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.start-links .text-btn {
  min-height: 36px;
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  font-size: 11.5px;
}

.start-links .text-btn:active {
  background: rgba(255, 180, 80, .08);
}

.start-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 2px 0 0;
  font-size: 9px;
  color: rgba(143, 185, 200, .62);
}

.start-save .mp-icon {
  width: 12px;
  height: 12px;
  color: #C97FBB;
  animation: savePulse 2.6s ease-in-out infinite;
}

@keyframes savePulse {
  0%, 100% { opacity: .55; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.06); }
}

.pause-save {
  min-height: 36px;
  margin-top: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .035);
  font-size: 11.5px;
}

/* 游戏存档 */
.save-card {
  max-height: 88vh;
}

.save-sub {
  margin: -4px 0 12px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.55;
  color: #C89FA8;
}

.save-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.save-slot {
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 200, 120, .07), rgba(255, 255, 255, .025));
  border: 1px solid rgba(255, 190, 100, .2);
}

.save-slot.empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .02);
}

.ss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ss-head b {
  font-size: 12px;
  color: #FFE5B0;
}

.ss-time {
  font-size: 8.5px;
  color: #BE8F9A;
  font-variant-numeric: tabular-nums;
}

.ss-meta {
  margin-top: 2px;
  font-size: 8.5px;
  color: #B07F8B;
}

.ss-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 8px 0;
}

.ss-stats div {
  min-width: 0;
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .18);
}

.ss-stats span {
  display: block;
  font-size: 8px;
  color: #A87882;
}

.ss-stats b {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: #E8F4FA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.ss-actions {
  display: flex;
  gap: 5px;
}

.ss-btn {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: #DFBBC4;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.ss-btn .mp-icon {
  width: 13px;
  height: 13px;
}

.ss-btn.save {
  color: #FFDCA8;
  border-color: rgba(255, 190, 100, .35);
  background: rgba(255, 170, 70, .1);
}

.ss-btn.load {
  color: #A8F0FF;
  border-color: rgba(100, 210, 255, .28);
  background: rgba(70, 180, 230, .08);
}

.ss-btn.del {
  flex: 0 0 34px;
  color: #FF9E9E;
  border-color: rgba(255, 120, 120, .2);
}

.ss-btn:active {
  transform: scale(.97);
}

.ss-empty {
  padding: 6px 0 10px;
  text-align: center;
  font-size: 10px;
  color: #A87882;
}

/* 结算界面 */
.end-screen {
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 20px) 20px calc(var(--safe-bottom) + 20px);
  background: radial-gradient(ellipse at 50% 32%, rgba(90, 49, 9, .55), rgba(2, 12, 22, .94) 68%);
  overflow-y: auto;
}

.end-card {
  width: 100%;
  max-width: 380px;
  margin: auto;
  text-align: center;
  padding: 20px 18px 14px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(16, 40, 52, .95), rgba(4, 18, 30, .98));
  border: 1px solid rgba(255, 198, 120, .4);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), inset 0 1px rgba(255, 255, 255, .08);
}

.end-crown {
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 38% 30%, #FFF2C4, #FFC24B 55%, #12D9D9);
  box-shadow: 0 0 26px rgba(255, 170, 50, .45), inset 0 -3px 6px rgba(130, 60, 0, .4);
  color: #005B50;
}

.end-crown .mp-icon {
  width: 28px;
  height: 28px;
}

.end-kicker {
  font-size: 9px;
  letter-spacing: .34em;
  text-indent: .34em;
  color: #56C8C4;
}

.end-card h2 {
  margin: 4px 0;
  font-size: 24px;
  letter-spacing: .04em;
  color: #FFF3D6;
}

.end-desc {
  margin: 0 0 14px;
  font-size: 11px;
  line-height: 1.5;
  color: #C89FA8;
}

.end-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 180, 80, .14), rgba(255, 140, 50, .04));
  border: 1px solid rgba(255, 190, 100, .3);
}

.end-score span {
  font-size: 11px;
  letter-spacing: .1em;
  color: #6AC3C7;
}

.end-score b {
  font-size: 25px;
  font-weight: 900;
  color: #FFD36E;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(255, 170, 50, .5);
}

.end-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 14px;
}

.end-grid div {
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .05);
}

.end-grid b {
  display: block;
  font-size: 16px;
  color: #FFE3A6;
  font-variant-numeric: tabular-nums;
}

.end-grid span {
  font-size: 9.5px;
  color: #BE8F9A;
}

.supply-btn {
  width: 100%;
  height: 46px;
  margin-top: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 120, .4);
  background: rgba(255, 170, 70, .08);
  color: #FFDBA4;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .1s ease, background .2s;
}

.supply-btn .mp-icon {
  width: 18px;
  height: 18px;
}

.supply-btn:active {
  transform: translateY(1px);
  background: rgba(255, 170, 70, .16);
}

/* 对战结算 */
.battle-end {
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 20px) 20px calc(var(--safe-bottom) + 20px);
  background: radial-gradient(ellipse at 50% 30%, rgba(70, 42, 110, .55), rgba(2, 12, 22, .95) 68%);
  overflow-y: auto;
}

.battle-card {
  margin: auto;
}

.battle-rank {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 4px 0 15px;
}

.br-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .06);
  min-width: 0;
}

.br-row.me {
  background: linear-gradient(90deg, rgba(255, 170, 80, .2), rgba(255, 140, 50, .04));
  border-color: rgba(255, 190, 100, .4);
  box-shadow: inset 0 0 0 1px rgba(255, 190, 100, .12);
}

.br-row.first {
  background: linear-gradient(90deg, rgba(255, 200, 90, .2), rgba(255, 150, 50, .04));
  border-color: rgba(255, 210, 120, .45);
}

.br-medal {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  color: #004A45;
  background: rgba(255, 255, 255, .1);
}

.br-row.first .br-medal {
  background: linear-gradient(180deg, #FFF0B8, #2AE8F0);
  box-shadow: 0 0 12px rgba(255, 180, 60, .45);
}

.br-ava {
  flex: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  color: #1F0407;
  box-shadow: inset 0 -1px 3px rgba(0, 0, 0, .3);
}

.br-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: #DDEBF2;
}

.br-row.me .br-name {
  color: #FFE3B0;
  font-weight: 700;
}

.br-score {
  flex: none;
  font-size: 13px;
  font-weight: 900;
  color: #FFD36E;
  font-variant-numeric: tabular-nums;
}

.battle-card .primary-btn {
  margin-top: 2px;
}

.battle-card .text-btn {
  margin-top: 3px;
}

/* ---------- 弹层 ---------- */
.modal-mask {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(1, 8, 15, .74);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}

.modal-mask.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 350px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 22px 18px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 42, 57, .98), rgba(4, 18, 30, .99));
  border: 1px solid rgba(255, 198, 120, .35);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 255, 255, .08);
  transform: translateY(14px) scale(.97);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.2);
  -webkit-overflow-scrolling: touch;
}

.modal-mask.open .modal {
  transform: none;
}

.modal h3 {
  margin: 4px 0 14px;
  font-size: 21px;
  letter-spacing: .06em;
  color: #FFF0CE;
  text-align: center;
}

.modal-kicker {
  display: block;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: .4em;
  text-indent: .4em;
  color: #56C8C4;
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: #C9DCE6;
  display: grid;
  place-items: center;
}

.modal-x .mp-icon {
  width: 17px;
  height: 17px;
}

.modal-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.modal-row .text-btn {
  margin-top: 0;
}

.pause-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.pause-stats div {
  padding: 8px 4px;
  text-align: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .05);
}

.pause-stats b {
  display: block;
  font-size: 16px;
  color: #FFE3A6;
  font-variant-numeric: tabular-nums;
}

.pause-stats span {
  font-size: 9.5px;
  color: #BE8F9A;
}

.how-card {
  max-height: 84vh;
}

.how-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.how-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .05);
}

.how-n {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  color: #003D34;
  background: linear-gradient(180deg, #FFD888, #2AE8F0);
}

.how-item p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: #B9CFDB;
}

.how-item b {
  color: #FFE2A8;
  margin-right: 4px;
}

/* 免费道具仓 */
.props-card {
  max-height: 84vh;
}

.props-sub {
  margin: -4px 0 12px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.55;
  color: #C89FA8;
}

.prop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.prop-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .06);
}

.prop-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #FFCE8A;
  background: radial-gradient(circle at 50% 35%, rgba(255, 170, 80, .28), rgba(255, 140, 60, .05));
  border: 1px solid rgba(255, 180, 100, .25);
}

.prop-ico .mp-icon {
  width: 20px;
  height: 20px;
}

.prop-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prop-info b {
  font-size: 12.5px;
  color: #FFF0CE;
}

.prop-info i {
  font-style: normal;
  font-size: 9.5px;
  color: #BE8F9A;
}

.prop-count {
  font-size: 11px;
  font-weight: 900;
  color: #FFD36E;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 180, 80, .1);
  border: 1px solid rgba(255, 190, 100, .2);
  border-radius: 7px;
  padding: 2px 6px;
}

.prop-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
}

.prop-btn {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: #D6E6EF;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.prop-btn .mp-icon {
  width: 15px;
  height: 15px;
}

.prop-use {
  border-color: rgba(255, 190, 100, .4);
  color: #FFE0A8;
  background: rgba(255, 170, 70, .08);
}

.prop-use:disabled {
  opacity: .38;
  filter: grayscale(1);
  cursor: not-allowed;
}

.prop-ad {
  background: linear-gradient(180deg, rgba(255, 170, 70, .22), rgba(255, 120, 40, .08));
  border-color: rgba(255, 190, 100, .45);
  color: #FFDAA4;
}

.prop-btn:active:not(:disabled) {
  transform: scale(.97);
}

.props-card .primary-btn {
  margin-top: 2px;
}

/* 广告加载 */
.ad-mask {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 7, 13, .86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}

.ad-mask.open {
  opacity: 1;
  visibility: visible;
}

.ad-box {
  width: 100%;
  max-width: 300px;
  padding: 22px 20px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20, 45, 60, .98), rgba(5, 18, 30, .99));
  border: 1px solid rgba(255, 198, 120, .35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  text-align: center;
}

.ad-kicker {
  font-size: 8px;
  letter-spacing: .34em;
  text-indent: .34em;
  color: #56C8C4;
}

.ad-spinner {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 14px auto;
  display: grid;
  place-items: center;
}

.ad-spinner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 190, 100, .15);
  border-top-color: #FFB95C;
  border-right-color: #FF8A3D;
  animation: spin 1.1s linear infinite;
}

.ad-spinner span {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(180deg, #FFD98A, #1EF0E2);
  box-shadow: 0 0 20px rgba(255, 170, 50, .5);
}

.ad-spinner span::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  border-left: 11px solid #005A50;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.ad-box b {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
  color: #FFEBC6;
}

.ad-box p {
  margin: 0 0 14px;
  font-size: 11px;
  color: #C89FA8;
}

.ad-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.ad-bar i {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 99px;
  background: linear-gradient(90deg, #FF8A3D, #FFD36E);
  box-shadow: 0 0 10px rgba(255, 170, 50, .5);
  transition: width .25s linear;
}

.ad-box small {
  display: block;
  margin-top: 11px;
  font-size: 9px;
  color: #9B6F79;
}

/* ---------- 状态 ---------- */
.frost {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
  background: radial-gradient(ellipse at 50% 55%, rgba(120, 220, 255, .02) 30%, rgba(90, 200, 255, .17) 100%);
  box-shadow: inset 0 0 80px rgba(100, 210, 255, .35);
}

.app.frozen .frost {
  opacity: 1;
}

.app.mode-menu .hud {
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  pointer-events: none;
}

.app.mode-menu .dock {
  opacity: 0;
  transform: translateY(30px);
  visibility: hidden;
  pointer-events: none;
}

.app.mode-menu .toast-wrap,
.app.mode-menu .combo {
  display: none;
}

/* ---------- 动画 ---------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

@keyframes breathe {
  0%, 100% { opacity: .62; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.07); }
}

@keyframes adPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 170, 60, 0), 0 4px 12px rgba(0, 0, 0, .25); }
  50% { box-shadow: 0 0 0 4px rgba(255, 170, 60, .16), 0 0 18px rgba(255, 150, 40, .42); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-6px); }
}

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.13); }
  100% { transform: scale(1); }
}

/* ---------- 小屏适配 ---------- */
@media (max-height: 730px) {
  .start-screen {
    padding-top: calc(var(--safe-top) + 14px);
  }

  .start-top {
    padding-top: 0;
    justify-content: flex-start;
  }

  .game-title {
    font-size: clamp(38px, 12vw, 54px);
    margin-top: 8px;
  }

  .title-sub {
    margin-top: 8px;
  }

  .title-desc {
    margin-top: 4px;
  }

  .start-card {
    padding: 12px 14px 10px;
  }

  .start-profile {
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .start-stats {
    margin-bottom: 10px;
  }

  .mode-row {
    margin-bottom: 6px;
  }

  .mode-chip {
    height: 32px;
    font-size: 10px;
  }

  .scene-row {
    margin-bottom: 8px;
  }

  .scene-chip {
    height: 27px;
    font-size: 9px;
  }

  .primary-btn {
    height: 50px;
  }

  .dock {
    padding-top: 10px;
  }

  .skill {
    height: 50px;
  }

  .skill .s-ico {
    width: 24px;
    height: 24px;
  }

  .skill .mp-icon {
    width: 15px;
    height: 15px;
  }

  .fire-btn {
    width: 64px;
    height: 64px;
  }

  .fire-btn .mp-icon {
    width: 24px;
    height: 24px;
  }

  .ctrl-row {
    margin-top: 8px;
  }

  .toast-wrap {
    bottom: calc(164px + var(--safe-bottom));
  }
}

@media (max-height: 620px) {
  .title-desc,
  .start-note,
  .start-save {
    display: none;
  }

  .start-links .text-btn {
    min-height: 32px;
  }

  .start-profile {
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .avatar-lg {
    width: 40px;
    height: 40px;
  }

  .skill {
    height: 46px;
  }

  .s-name {
    font-size: 9px;
  }

  .skill .mp-icon {
    width: 14px;
    height: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jackpot::before,
  .fire-glow,
  .bw-rays,
  .start-halo,
  .start-save .mp-icon,
  .ad-pill.flash {
    animation: none;
  }
}
