/* 财神来啦 · 国潮财神招财大转盘 */
:root {
  --gold-1: #FFF4C4;
  --gold-2: #FFD35C;
  --gold-3: #E89A1D;
  --gold-4: #B9660A;
  --red-1: #C81E24;
  --red-2: #A3121B;
  --red-3: #7C0A11;
  --red-4: #52040A;
  --orange: #FF8A3D;
  --cream: #FFEBCD;
  --ink: #8E1010;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #4C0409;
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(110% 70% at 50% -6%, #B4171F 0%, #7C0A11 46%, #4C0409 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 32% at 10% 14%, rgba(255, 160, 70, .10), transparent 70%),
    radial-gradient(50% 30% at 92% 24%, rgba(255, 200, 90, .08), transparent 70%);
  z-index: 0;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 2px solid #FFE28A; outline-offset: 2px; }
img { -webkit-user-drag: none; }

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

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #6D060C;
  overflow: hidden;
  isolation: isolate;
}

/* ============ 主画面 ============ */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 1536;
  flex: none;
  overflow: hidden;
  background: #A3121B;
}

.stage-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  user-select: none;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(96, 3, 9, .52) 0%, rgba(96, 3, 9, .2) 10%, transparent 18%),
    linear-gradient(0deg, rgba(78, 2, 7, .3) 0%, transparent 15%);
}

/* ============ 顶部 HUD ============ */
.hud {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.hud button { pointer-events: auto; }

.avatar-wrap {
  position: absolute;
  left: 2.2%;
  top: 1.1%;
  width: 17%;
  z-index: 2;
  aspect-ratio: 1;
  padding: 2.2%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #FFF0B0, #F3B23E 52%, #B9660A 100%);
  box-shadow: 0 3px 10px rgba(60, 0, 0, .45), 0 0 0 1.5px rgba(255, 235, 170, .7);
  pointer-events: auto;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1.5px solid rgba(255, 244, 200, .9);
  background: #7C0A11;
}

.avatar-ring {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  border: 1px solid rgba(255, 220, 130, .48);
  pointer-events: none;
}

.avatar-seal {
  position: absolute;
  right: -4%;
  bottom: -3%;
  width: 31%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 25%, #FFF4C0, #FFD35C 50%, #D18614 100%);
  border: 1px solid #FFF0B8;
  color: #8E1010;
  font-size: clamp(8px, 2.1vw, 12px);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(70, 0, 0, .35);
}

.name-pill {
  position: absolute;
  left: 18.2%;
  top: 2.6%;
  width: 18.4%;
  height: 6.2%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4% 0 13%;
  border-radius: 999px;
  background: linear-gradient(180deg, #B81820 0%, #900A12 58%, #7A0710 100%);
  border: 1.5px solid #F6C85B;
  box-shadow: inset 0 1px 0 rgba(255, 245, 200, .3), 0 2px 6px rgba(60, 0, 0, .26);
  color: #FFE8A8;
  font-size: clamp(11px, 3.3vw, 15px);
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(70, 0, 0, .7);
  white-space: nowrap;
  overflow: hidden;
}

.name-pill span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet {
  position: absolute;
  left: 37.2%;
  top: 1.7%;
  width: 33.3%;
  height: 7.5%;
  display: flex;
  align-items: center;
  gap: 1%;
  padding: 0 2% 0 2.6%;
  border-radius: 999px;
  border: 1.5px solid #F6C85B;
  background: linear-gradient(180deg, #B41720 0%, #8F0A12 56%, #77070E 100%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 200, .32), 0 2px 7px rgba(60, 0, 0, .28);
  color: #FFE8A8;
  cursor: pointer;
  overflow: visible;
  transition: transform .12s ease, filter .18s ease;
}

.wallet:active { transform: scale(.975); filter: brightness(1.1); }

.wallet-ingot {
  width: 26%;
  max-width: 42px;
  height: auto;
  flex: none;
  transform: translateY(-9%) scale(1.16);
  filter: drop-shadow(0 2px 2px rgba(80, 0, 0, .34));
  pointer-events: none;
}

.wallet-num {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: clamp(16px, 4.65vw, 22px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(70, 0, 0, .65);
  white-space: nowrap;
}

.wallet-plus {
  width: 23.5%;
  max-width: 31px;
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 25%, #FFF5BE 0%, #FFD762 42%, #F0A61F 72%, #C3740B 100%);
  border: 1px solid #FFF0B8;
  color: #9E1010;
  font-size: clamp(14px, 4vw, 20px);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(70, 0, 0, .34), inset 0 -2px 3px rgba(150, 70, 0, .32);
  pointer-events: none;
}

.points {
  position: absolute;
  right: 2.2%;
  top: 1.6%;
  width: 27%;
  height: 7.8%;
  display: flex;
  align-items: center;
  gap: 1%;
  padding: 0 4% 0 2%;
  border-radius: 999px;
  border: 1.5px solid #F6C85B;
  background: linear-gradient(180deg, #B41720 0%, #8F0A12 56%, #77070E 100%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 200, .32), 0 2px 7px rgba(60, 0, 0, .28);
  color: #FFE8A8;
}

.points-purse {
  width: 31%;
  max-width: 38px;
  height: auto;
  flex: none;
  transform: translateY(-4%);
  filter: drop-shadow(0 2px 2px rgba(70, 0, 0, .3));
  pointer-events: none;
}

.points-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.02;
  min-width: 0;
}

.points-txt span {
  font-size: clamp(8px, 2.35vw, 11px);
  font-weight: 700;
  letter-spacing: .07em;
  opacity: .9;
}

.points-txt b {
  font-size: clamp(14px, 4.1vw, 19px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ 转盘 ============ */
.wheel-zone {
  position: absolute;
  left: 4.7%;
  top: 27.2%;
  width: 90.6%;
  aspect-ratio: 1;
  z-index: 5;
}

.wheel-glow {
  position: absolute;
  inset: -5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 70, .3) 0%, rgba(255, 140, 40, .1) 54%, transparent 72%);
  filter: blur(3px);
  animation: wheelBreath 3.6s ease-in-out infinite;
  pointer-events: none;
}

.wheel-rotor {
  position: absolute;
  inset: 0;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 12px 16px rgba(82, 0, 0, .4));
}

.wheel-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 16%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .05) 30%, transparent 52%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.wheel-zone.spinning .pointer-inner {
  animation: pointerTick .26s linear infinite;
}

/* 金色指针 */
.pointer {
  position: absolute;
  left: 50%;
  top: -2.6%;
  width: 10.8%;
  transform: translateX(-50%);
  z-index: 8;
  filter: drop-shadow(0 5px 5px rgba(72, 0, 0, .45));
  pointer-events: none;
}

.pointer-inner { transform-origin: 50% 10%; }

.pointer svg {
  display: block;
  width: 100%;
  height: auto;
}

/* 中心铜钱开始按钮 */
.hub {
  position: absolute;
  left: 31%;
  top: 31%;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #FFF1B4;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0 16%;
  background: radial-gradient(circle at 34% 24%, #FFFBDD 0%, #FFE795 20%, #F7BE49 48%, #DE921C 70%, #B36507 100%);
  box-shadow:
    0 0 0 4px #A50E15,
    0 0 0 7px #F3C55E,
    0 10px 18px rgba(82, 0, 0, .45),
    inset 0 -6px 10px rgba(150, 70, 0, .4),
    inset 0 5px 8px rgba(255, 255, 255, .65);
  color: #8E1010;
  cursor: pointer;
  overflow: hidden;
  transition: transform .12s ease, filter .18s ease;
}

.hub::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: inset 0 0 18px rgba(200, 120, 20, .35);
  pointer-events: none;
}

.hub::after {
  content: "";
  position: absolute;
  top: -32%;
  left: -22%;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 66%);
  pointer-events: none;
}

.hub-hole {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 27%;
  aspect-ratio: 1;
  border-radius: 14%;
  background: linear-gradient(180deg, #8F4E05, #C77712 55%, #7C3F03);
  border: 1.5px solid #FFE7A0;
  box-shadow: inset 0 3px 5px rgba(60, 20, 0, .6), 0 1px 0 rgba(255, 240, 180, .6);
  pointer-events: none;
}

.hub-text {
  position: relative;
  z-index: 2;
  font-size: clamp(21px, 7vw, 32px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
  text-shadow: 0 1px 0 rgba(255, 244, 190, .9), 0 2px 3px rgba(120, 50, 0, .28);
  pointer-events: none;
}

.hub:active { transform: scale(.97); }
.hub:disabled { cursor: default; }
.hub.is-spinning .hub-text { font-size: clamp(14px, 4.5vw, 20px); letter-spacing: .02em; }

/* 飘字与金光 */
.float-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: visible;
  pointer-events: none;
}

.float-reward {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  font-size: clamp(22px, 6.4vw, 30px);
  font-weight: 900;
  color: #FFF0B0;
  text-shadow: 0 2px 0 #B3200F, 0 0 12px rgba(255, 180, 50, .9);
  white-space: nowrap;
  animation: floatUp 1.25s cubic-bezier(.15, .7, .3, 1) forwards;
}

.spark {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #FFE28A;
  box-shadow: 0 0 8px #FFC94F;
  animation: sparkFly .95s ease-out forwards;
}

/* 中奖提示卡片 */
.prize-card {
  position: absolute;
  left: 7.2%;
  right: 7.2%;
  bottom: 2.3%;
  height: 8.6%;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 2.4%;
  padding: 0 3.4% 0 2.2%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(118, 8, 15, .97) 0%, rgba(82, 3, 8, .985) 100%);
  border: 1.5px solid rgba(246, 200, 91, .88);
  box-shadow: 0 4px 10px rgba(60, 0, 0, .42), inset 0 1px 0 rgba(255, 230, 160, .26);
  transition: opacity .28s ease;
}

.prize-card.show { animation: prizePop .5s cubic-bezier(.2, .9, .3, 1.25); }

.prize-badge {
  width: clamp(34px, 9.3vw, 44px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 25%, #FFF4BF 0%, #FFD35C 48%, #C98010 100%);
  border: 1px solid #FFF0B0;
  box-shadow: 0 2px 4px rgba(70, 0, 0, .35);
  overflow: hidden;
}

.prize-badge svg { width: 86%; height: 86%; display: block; }

.prize-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.16;
}

.prize-copy b {
  font-size: clamp(12px, 3.45vw, 16px);
  color: #FFE8A8;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(70, 0, 0, .65);
}

.prize-copy span {
  font-size: clamp(9px, 2.55vw, 12px);
  color: rgba(255, 226, 168, .78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prize-spark {
  position: absolute;
  right: 4%;
  top: 22%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FFE8A8;
  box-shadow: 0 0 6px #FFC94F;
  opacity: .75;
  pointer-events: none;
}

.deco-ingot {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 4px 5px rgba(70, 0, 0, .32));
}

.ingot-left {
  left: .6%;
  top: 66%;
  width: 7.4%;
  animation: bob 3.8s ease-in-out infinite;
}

.ingot-right {
  right: 1.1%;
  top: 79.5%;
  width: 5.4%;
  opacity: .78;
  animation: bob 4.4s ease-in-out infinite reverse;
}

/* ============ 底部操作区 ============ */
.dock {
  position: relative;
  flex: 1;
  z-index: 10;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 70% at 50% 0%, #B4171F 0%, #8C0A11 46%, #64060B 100%);
  box-shadow: 0 -8px 18px rgba(50, 0, 0, .32);
  border-top: 1px solid rgba(255, 214, 120, .3);
  border-radius: 18px 18px 0 0;
}

.dock-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 9px;
  margin: -3px 0 7px;
  opacity: .85;
}

.dock-ornament span {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(226, 170, 70, .8), transparent);
}

.dock-ornament i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, #FFE7A0, #D48A19);
  transform: rotate(45deg);
  box-shadow: 0 0 6px rgba(255, 200, 80, .5);
}

.combo {
  display: flex;
  align-items: center;
  gap: 3%;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(122, 8, 15, .94) 0%, rgba(84, 4, 9, .96) 100%);
  border: 1px solid rgba(246, 200, 91, .48);
  box-shadow: inset 0 1px 0 rgba(255, 225, 160, .14);
}

.combo-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  flex: none;
}

.combo-label b {
  font-size: clamp(11px, 3.15vw, 14px);
  color: #FFE8A8;
  font-weight: 800;
  white-space: nowrap;
}

.combo-label small {
  font-size: clamp(8px, 2.2vw, 10px);
  color: rgba(255, 220, 150, .62);
  white-space: nowrap;
}

.stars {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.4%;
  min-width: 0;
}

.star {
  width: clamp(17px, 4.55vw, 22px);
  aspect-ratio: 1;
  display: block;
  flex: none;
  color: #5A2410;
  transition: color .25s ease, transform .25s ease, filter .25s ease;
}

.star svg { display: block; width: 100%; height: 100%; }

.star.on {
  color: #FFD35C;
  transform: scale(1.08);
  filter: drop-shadow(0 0 5px rgba(255, 190, 60, .8));
}

.star.pop { animation: starPop .45s cubic-bezier(.2, 1.6, .4, 1); }

.combo-count {
  flex: none;
  min-width: 34px;
  text-align: right;
  font-size: clamp(11px, 3.15vw, 14px);
  font-weight: 800;
  color: #FFD989;
  font-variant-numeric: tabular-nums;
}

.actions {
  display: flex;
  gap: 9px;
  margin-top: 10px;
}

.spin-btn {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 58px;
  border-radius: 16px;
  border: 1.5px solid #FFE9A8;
  background: linear-gradient(180deg, #FFE7A0 0%, #FFC95C 38%, #F2A32A 72%, #D77E0F 100%);
  color: #8C0D12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
  box-shadow: 0 5px 0 #9C5608, 0 9px 14px rgba(50, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: transform .1s ease, box-shadow .1s ease, filter .18s ease;
}

.spin-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 42%;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .45), transparent);
  pointer-events: none;
}

.spin-main {
  position: relative;
  z-index: 1;
  font-size: clamp(17px, 4.85vw, 21px);
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.1;
}

.spin-sub {
  position: relative;
  z-index: 1;
  font-size: clamp(9px, 2.5vw, 11px);
  font-weight: 700;
  opacity: .74;
  line-height: 1.1;
}

.spin-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #9C5608, 0 4px 8px rgba(50, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.spin-btn:disabled { opacity: .74; filter: saturate(.76); cursor: default; }

.spin-btn.is-auto {
  background: linear-gradient(180deg, #FFB261 0%, #FF8A3D 46%, #E86A18 100%);
  color: #6B1008;
}

.auto-btn {
  flex: 0 0 40%;
  height: 58px;
  min-width: 0;
  border-radius: 16px;
  border: 1.5px solid rgba(246, 200, 91, .62);
  background: linear-gradient(180deg, #8E0C13 0%, #6C0710 52%, #60060B 100%);
  color: #FFE8A8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 0 10px;
  box-shadow: 0 4px 0 #430207, 0 7px 12px rgba(40, 0, 0, .3), inset 0 1px 0 rgba(255, 235, 180, .12);
  transition: transform .1s ease, box-shadow .1s ease, border-color .2s ease;
}

.auto-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #430207, 0 4px 8px rgba(40, 0, 0, .28); }

.auto-btn.on {
  border-color: #FFD35C;
  box-shadow: 0 4px 0 #5A2703, 0 0 14px rgba(255, 150, 60, .35), inset 0 1px 0 rgba(255, 235, 180, .16);
}

.auto-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}

.auto-txt b {
  font-size: clamp(11px, 3.15vw, 14px);
  font-weight: 800;
  white-space: nowrap;
}

.auto-txt small {
  font-size: clamp(8px, 2.25vw, 10px);
  opacity: .64;
  white-space: nowrap;
}

.switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex: none;
  border-radius: 99px;
  background: #4A070B;
  border: 1px solid rgba(255, 220, 140, .5);
  transition: background .2s ease;
}

.switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #C9A96A;
  transition: transform .22s ease, background .22s ease;
}

.auto-btn.on .switch { background: #FF8A3D; }
.auto-btn.on .switch i { transform: translateX(14px); background: #FFF4C4; }

.speed-wrap {
  display: none;
  align-items: center;
  gap: 9px;
  height: 40px;
  margin-top: 9px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(58, 2, 6, .48);
  border: 1px solid rgba(246, 200, 91, .24);
}

.speed-wrap.show { display: flex; animation: slideDown .25s ease both; }

.speed-label {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: #FFD989;
}

.speed {
  flex: 1;
  min-width: 0;
  height: 6px;
  border-radius: 99px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, #FFB347 0%, #FFB347 var(--p, 25%), #4E1110 var(--p, 25%), #4E1110 100%);
  outline: none;
  cursor: pointer;
}

.speed::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #FFF0B0;
  background: radial-gradient(circle at 35% 30%, #FFF4BF 0%, #FFD35C 52%, #D98A1A 100%);
  box-shadow: 0 2px 5px rgba(40, 0, 0, .42);
}

.speed::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #FFF0B0;
  background: radial-gradient(circle at 35% 30%, #FFF4BF 0%, #FFD35C 52%, #D98A1A 100%);
  box-shadow: 0 2px 5px rgba(40, 0, 0, .42);
}

.speed-val {
  flex: none;
  min-width: 44px;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: #FFE8A8;
  font-variant-numeric: tabular-nums;
}

.bottom-row {
  display: flex;
  gap: 9px;
  margin-top: 9px;
}

.ghost-btn {
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(246, 200, 91, .52);
  background: linear-gradient(180deg, rgba(133, 12, 19, .9) 0%, rgba(82, 3, 8, .96) 100%);
  color: #FFE3A1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: clamp(11px, 3.15vw, 13px);
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(40, 0, 0, .24), inset 0 1px 0 rgba(255, 230, 170, .12);
  transition: transform .1s ease, background .15s ease;
}

.ghost-btn .mp-icon {
  width: 17px;
  height: 17px;
  color: #FFD35C;
}

.ghost-btn:active { transform: translateY(1px); background: #5C0509; }
.ad-btn { color: #FFD35C; }

.fineprint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 10px;
  line-height: 1.2;
  color: rgba(255, 220, 160, .44);
  letter-spacing: .02em;
}

/* ============ 弹窗 ============ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(30, 0, 4, .68);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}

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

.sheet {
  width: 100%;
  max-width: 340px;
  max-height: 82vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  border-radius: 22px;
  border: 1.5px solid #F3C46A;
  background: radial-gradient(130% 70% at 50% 0%, #B4171F 0%, #8A0911 52%, #65060B 100%);
  box-shadow: 0 18px 40px rgba(18, 0, 0, .55), inset 0 1px 0 rgba(255, 235, 180, .24);
  color: #FFEBCD;
  transform: translateY(12px) scale(.97);
  transition: transform .24s cubic-bezier(.2, .9, .3, 1.1);
}

.overlay.show .sheet { transform: none; }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sheet h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .04em;
  color: #FFE8A8;
  text-shadow: 0 2px 4px rgba(60, 0, 0, .5);
}

.sheet-close {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(246, 200, 91, .55);
  background: rgba(60, 2, 6, .4);
  color: #FFE8A8;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sheet p {
  margin: 8px 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 235, 200, .82);
}

.sheet p b { color: #FFD35C; }

.rules-list {
  margin: 4px 0 2px;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}

.rules-list li {
  position: relative;
  padding-left: 22px;
  margin: 7px 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 235, 200, .84);
  counter-increment: rule;
}

.rules-list li::before {
  content: counter(rule);
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  color: #7A0710;
  background: linear-gradient(180deg, #FFE39A, #E8A61F);
}

.prize-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 12px 0 4px;
}

.pg-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 3px;
  border-radius: 10px;
  background: rgba(64, 2, 7, .42);
  border: 1px solid rgba(246, 200, 91, .22);
}

.pg-item svg { width: 30px; height: 30px; display: block; }

.pg-item b {
  font-size: 9px;
  line-height: 1.2;
  font-weight: 700;
  color: #FFE8A8;
  white-space: nowrap;
}

.pg-item span {
  font-size: 10px;
  line-height: 1.1;
  font-weight: 900;
  color: #FFB347;
}

.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.sheet-btn {
  flex: 1;
  height: 48px;
  border-radius: 14px;
  border: 1.5px solid #FFE9A8;
  background: linear-gradient(180deg, #FFE7A0 0%, #FFC95C 42%, #F2A32A 100%);
  color: #8C0D12;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .03em;
  box-shadow: 0 4px 0 #9C5608, 0 6px 12px rgba(40, 0, 0, .28);
  cursor: pointer;
}

.sheet-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #9C5608; }

.sheet-btn.ghost {
  background: transparent;
  border: 1px solid rgba(246, 200, 91, .5);
  color: #FFE3A1;
  box-shadow: none;
}

.sheet-btn.ghost:active { background: rgba(60, 2, 6, .35); }

.empty-coin {
  width: 64px;
  height: 64px;
  margin: 2px auto 6px;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(40, 0, 0, .35));
}

/* 模拟广告 */
.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 0, 3, .84);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.ad-overlay.show { opacity: 1; visibility: visible; }

.ad-card {
  width: 100%;
  max-width: 300px;
  padding: 22px 22px 18px;
  border-radius: 22px;
  border: 1.5px solid #F3C46A;
  background: linear-gradient(180deg, #B4171F 0%, #7A0710 70%, #60060B 100%);
  box-shadow: 0 18px 40px rgba(18, 0, 0, .6);
  text-align: center;
}

.ad-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: #FFD35C;
  color: #7A0710;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}

.ad-card h3 {
  margin: 10px 0 4px;
  font-size: 18px;
  font-weight: 900;
  color: #FFE8A8;
}

.ad-card p {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 235, 200, .75);
}

.ad-card p b { color: #FFD35C; }

.ad-count {
  margin: 8px 0 6px;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: #FFD35C;
  text-shadow: 0 2px 0 #8C0D12, 0 0 18px rgba(255, 190, 60, .6);
}

.ad-track {
  height: 6px;
  border-radius: 99px;
  background: #4A070B;
  overflow: hidden;
}

.ad-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFD35C, #FF8A3D);
  transition: width .3s linear;
}

.ad-card small {
  display: block;
  margin-top: 10px;
  font-size: 9.5px;
  line-height: 1.4;
  color: rgba(255, 220, 160, .45);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 150;
  max-width: 82vw;
  padding: 9px 16px;
  border-radius: 99px;
  background: rgba(58, 2, 6, .95);
  border: 1px solid rgba(246, 200, 91, .6);
  color: #FFE8A8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .36);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .24s ease, transform .24s ease;
}

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

/* ============ 动效 ============ */
@keyframes wheelBreath {
  0%, 100% { opacity: .72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.025); }
}

@keyframes pointerTick {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-7deg); }
}

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

@keyframes prizePop {
  0% { transform: scale(.94); opacity: .72; }
  62% { transform: scale(1.018); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes starPop {
  0% { transform: scale(.55); }
  70% { transform: scale(1.38); }
  100% { transform: scale(1.08); }
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -28%) scale(.72); }
  18% { opacity: 1; transform: translate(-50%, -52%) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -186%) scale(1); }
}

@keyframes sparkFly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -40px))) scale(.18); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes walletFlash {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.055); filter: brightness(1.24); }
}

.wallet.flash { animation: walletFlash .5s ease; }

@media (max-width: 350px) {
  .dock { padding-left: 10px; padding-right: 10px; }
  .auto-btn { padding: 0 8px; }
  .switch { width: 28px; height: 17px; }
  .switch i { width: 11px; height: 11px; }
  .auto-btn.on .switch i { transform: translateX(11px); }
  .combo { padding: 0 9px; }
  .prize-copy b { font-size: 11px; }
  .fineprint { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .wheel-glow,
  .ingot-left,
  .ingot-right,
  .pointer-inner,
  .prize-spark,
  .wallet.flash {
    animation: none !important;
  }
  .star.pop,
  .prize-card.show,
  .speed-wrap.show,
  .float-reward,
  .spark {
    animation-duration: .01ms !important;
  }
}

/* 桌面浏览器里保留手机竖屏画布 */
@media (min-width: 520px) {
  body { padding: 0; }
  .app { box-shadow: 0 0 70px rgba(0, 0, 0, .55); }
}
