/* =========================================================
   麻将老虎机 · 移动端竖屏
   视觉：红金老虎机 + 清新蓝天熊猫场景，主色 #3D7EFF
   ========================================================= */
:root {
  --blue: #3D7EFF;
  --blue-deep: #2357D8;
  --blue-soft: #8FB8FF;
  --red: #C8182A;
  --red-deep: #7A0A12;
  --gold: #FFD96A;
  --gold-light: #FFF3C0;
  --gold-deep: #A86A0B;
  --cream: #FFF6E2;
  --ink: #2A1308;
  --scene-h: clamp(185px, 27vh, 260px);
  --hud-h: 52px;
  --scene-top: calc(var(--safe-top) + var(--hud-h));
  --top-total: calc(var(--safe-top) + var(--hud-h) + var(--scene-h) - 10px);
  --safe-top: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: 0px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-serif: "STKaiti", "KaiTi", "Kaiti SC", "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #050a14;
}

body {
  font-family: var(--font-ui);
  color: #fff;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font-family: inherit;
  border: 0;
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
}
button:focus-visible { outline: 2px solid #9dc0ff; outline-offset: 2px; }

img { display: block; max-width: 100%; }

/* ---------------- 页面骨架 ---------------- */
.app {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  background:
    radial-gradient(90% 38% at 50% 42%, rgba(61, 126, 255, .22), transparent 70%),
    linear-gradient(180deg, #071528 0%, #0b2140 30%, #2b1008 64%, #100604 100%);
}
.app::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44%;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 18, 32, 0) 0%, rgba(24, 11, 6, .42) 16%, rgba(15, 7, 4, .78) 100%),
    url("images/gen/table.jpg") center bottom / cover no-repeat;
  opacity: .9;
}

.sky {
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--safe-top) + var(--hud-h) + var(--scene-h));
  z-index: 0;
  background: linear-gradient(180deg, #2f76c8 0%, #4f9be0 45%, #78c0f4 100%);
}

.scene {
  position: absolute;
  top: var(--scene-top);
  left: 0;
  right: 0;
  height: var(--scene-h);
  z-index: 1;
  background: #8ecdf7 url("images/gen/scene.jpg") center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 100%);
  animation: sceneIn .8s ease-out both;
}
.scene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(25, 8, 5, .35) 55%, rgba(18, 6, 4, .82) 100%);
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 64% at 50% 34%, transparent 52%, rgba(3, 9, 22, .34) 100%),
    linear-gradient(180deg, rgba(3, 10, 24, .34) 0%, transparent 17%, transparent 58%, rgba(8, 4, 3, .58) 100%);
}

@keyframes sceneIn {
  from { opacity: 0; transform: scale(1.035); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------------- 氛围粒子 ---------------- */
.ambient {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -30px;
  width: 11px;
  height: 9px;
  border-radius: 62% 8% 62% 8%;
  background: linear-gradient(135deg, #ffe0ec, #ff9fc3 55%, #ef6f9f);
  opacity: 0;
  filter: drop-shadow(0 1px 2px rgba(120, 40, 70, .3));
  animation: petalFall linear infinite;
}
.p1 { left: 7%; animation-duration: 12s; animation-delay: -3s; }
.p2 { left: 27%; animation-duration: 15s; animation-delay: -8s; transform: scale(.8); }
.p3 { left: 62%; animation-duration: 13s; animation-delay: -5s; transform: scale(1.1); }
.p4 { left: 82%; animation-duration: 16s; animation-delay: -11s; transform: scale(.75); }
.p5 { left: 45%; animation-duration: 17s; animation-delay: -1s; transform: scale(.9); }
@keyframes petalFall {
  0% { opacity: 0; transform: translate3d(0, -20px, 0) rotate(0deg); }
  8% { opacity: .82; }
  70% { opacity: .7; }
  100% { opacity: 0; transform: translate3d(70px, 105vh, 0) rotate(620deg); }
}
.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff4b8;
  box-shadow: 0 0 8px 2px rgba(255, 214, 90, .8);
  animation: twinkle 3s ease-in-out infinite;
}
.s1 { left: 15%; top: 19%; animation-delay: .2s; }
.s2 { left: 78%; top: 24%; animation-delay: 1.1s; }
.s3 { left: 24%; top: 31%; animation-delay: 2.1s; }
.s4 { left: 68%; top: 14%; animation-delay: .8s; }
.s5 { left: 88%; top: 33%; animation-delay: 1.7s; }
@keyframes twinkle {
  0%, 100% { opacity: .15; transform: scale(.6); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ---------------- 顶部 HUD ---------------- */
.hud {
  position: absolute;
  top: calc(var(--safe-top) + 8px);
  left: 12px;
  right: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: hudIn .55s ease-out both;
}
@keyframes hudIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hud-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 4px 12px 4px 4px;
  border-radius: 22px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 140px;
  background: linear-gradient(180deg, rgba(54, 27, 10, .95), rgba(22, 9, 4, .96));
  border: 1.5px solid rgba(255, 219, 136, .62);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 245, 210, .16);
}
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  overflow: hidden;
  background: #143457;
  border: 2px solid #ffd76a;
  box-shadow: 0 0 0 1px rgba(90, 45, 0, .45), 0 2px 5px rgba(0, 0, 0, .4);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.player-name {
  min-width: 0;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: #fff6e5;
  letter-spacing: .2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
}

.coin-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 5px 0 7px;
  border-radius: 22px;
  flex: 0 0 auto;
  min-width: 118px;
  background: linear-gradient(180deg, rgba(60, 30, 11, .95), rgba(25, 10, 4, .96));
  border: 1.5px solid rgba(255, 219, 136, .62);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 245, 210, .16);
}
.coin-ic {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
}
.coin-ic svg { width: 26px; height: 26px; display: block; }
.coin-pill b {
  flex: 1;
  min-width: 46px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #ffe9a8;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}
.coin-add {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #74e6a0, #1fa45a);
  border: 1.5px solid #d9ffe8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .35), inset 0 1px 1px rgba(255, 255, 255, .55);
  transition: transform .12s ease, filter .12s ease;
}
.coin-add .mp-icon { width: 18px; height: 18px; }
.coin-add:active { transform: scale(.9); filter: brightness(1.08); }

.hud-btn {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  margin-left: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffe3a0;
  background: radial-gradient(circle at 36% 28%, #6d4220, #3b1c08 55%, #1c0b03);
  border: 2px solid rgba(255, 218, 130, .72);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .4), inset 0 1px 2px rgba(255, 232, 170, .25);
  transition: transform .12s ease;
}
.hud-btn .mp-icon { width: 24px; height: 24px; }
.hud-btn:active { transform: scale(.92); }
.eq {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 11px;
}
.eq i {
  display: block;
  width: 2px;
  height: 5px;
  border-radius: 1px;
  background: #7fb0ff;
  box-shadow: 0 0 4px rgba(61, 126, 255, .9);
  animation: eqBar .8s ease-in-out infinite alternate;
}
.eq i:nth-child(2) { animation-delay: .18s; height: 9px; }
.eq i:nth-child(3) { animation-delay: .34s; height: 6px; }
.eq.muted i { animation: none; background: #7d7569; box-shadow: none; height: 3px; opacity: .6; }
@keyframes eqBar {
  from { height: 3px; }
  to { height: 10px; }
}

/* ---------------- 主舞台 ---------------- */
.stage {
  position: relative;
  z-index: 10;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    var(--top-total)
    12px
    calc(var(--safe-bottom) + 8px);
}
.stage-spacer { display: none; }

/* ---------------- 老虎机柜体 ---------------- */
.cabinet {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  flex: 1 1 0;
  min-height: 0;
  max-height: 490px;
  display: flex;
  padding: 9px;
  border-radius: 30px;
  background:
    linear-gradient(158deg,
      #FFF3BF 0%, #E4AD3D 11%, #8F5A11 27%,
      #F7D47C 48%, #A46610 70%, #FFE9A0 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 250, 220, .85),
    inset 0 -2px 0 rgba(80, 40, 0, .5),
    0 18px 36px rgba(0, 0, 0, .55),
    0 0 0 2px rgba(106, 62, 8, .8),
    0 0 46px rgba(255, 190, 70, .22);
  animation: cabinetIn .6s cubic-bezier(.2, .9, .25, 1) .06s both;
}
@keyframes cabinetIn {
  from { opacity: 0; transform: translateY(18px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cabinet-inner {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 10px;
  border-radius: 23px;
  background:
    radial-gradient(120% 46% at 50% 0%, rgba(255, 255, 255, .22), transparent 54%),
    radial-gradient(circle at 5px 5px, rgba(255, 222, 150, .13) 1.3px, transparent 1.9px) 0 0 / 16px 16px,
    linear-gradient(180deg, #D92A37 0%, #B11222 34%, #8C0B17 72%, #65060E 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 226, 150, .55),
    inset 0 0 30px rgba(30, 0, 0, .5),
    0 1px 0 rgba(255, 255, 255, .25);
}

.top-rail {
  position: relative;
  flex: 0 0 15px;
  height: 15px;
  margin: 2px 4px 9px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: linear-gradient(180deg, #FFF4C8 0%, #F1C35A 34%, #B97A18 68%, #F7D987 100%);
  box-shadow: 0 2px 0 #6B3C08, inset 0 2px 2px rgba(255, 255, 255, .7);
}
.lamp {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffbe0, #ffd35a 45%, #b26b05);
  box-shadow: 0 0 6px rgba(255, 214, 100, .9);
}
.crest {
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  width: 35px;
  height: 35px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  z-index: 3;
  background: linear-gradient(158deg, #FFFDF3, #F7EAD0 65%, #E9D3A9);
  border: 2px solid #FFE08A;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45), inset 0 0 0 1px #D5B06A;
}
.crest i {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 800;
  font-size: 23px;
  line-height: 1;
  color: #158A4A;
  text-shadow: 0 1px 0 #fff;
}

.reels-frame {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, #5B3208 0%, #D7A53C 12%, #8A5210 45%, #F6D783 72%, #6E3C06 100%);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, .4),
    inset 0 0 0 1px rgba(255, 245, 200, .6);
}
.reels-stack {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  background: #2B1307;
  box-shadow: inset 0 0 0 2px #3A1C05;
}
.reels {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: linear-gradient(180deg, #4A2408, #2A1205);
  overflow: hidden;
}
.reel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(214, 186, 138, .5), transparent 12%, transparent 88%, rgba(197, 162, 110, .5)),
    linear-gradient(180deg, #F0DFC0 0%, #FFF8E9 14%, #FFFAEF 50%, #F6E7CA 84%, #E6D0AB 100%);
}
.reel + .reel {
  box-shadow: inset 4px 0 0 rgba(189, 132, 35, .32), inset 1px 0 0 rgba(255, 245, 200, .72);
}
.reel::before,
.reel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 21%;
  z-index: 6;
  pointer-events: none;
}
.reel::before { top: 0; background: linear-gradient(180deg, rgba(75, 40, 8, .36), transparent); }
.reel::after { bottom: 0; background: linear-gradient(0deg, rgba(75, 40, 8, .3), transparent); }

.strip {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}
.cell::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(255, 244, 194, .42), transparent 68%);
  opacity: .6;
}
.cell > * { position: relative; z-index: 2; }

/* 麻将牌面 */
.tile {
  width: 68%;
  height: 84%;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(158deg, #FFFDF7 0%, #FBF2E1 55%, #EBD9B9 100%);
  border: 1px solid rgba(190, 155, 100, .68);
  box-shadow:
    0 2px 0 rgba(178, 143, 88, .42),
    0 4px 7px rgba(95, 52, 12, .22),
    inset 0 1px 0 #fff,
    inset 0 0 10px rgba(190, 150, 95, .12);
}
.glyph {
  font-family: var(--font-serif);
  font-weight: 800;
  line-height: 1;
  user-select: none;
}
.sym-zhong .glyph {
  font-size: clamp(30px, 10.8vw, 54px);
  color: #CF202C;
  text-shadow: 0 1px 0 #fff, 0 2px 3px rgba(110, 20, 20, .26);
}
.sym-fa .glyph {
  font-size: clamp(30px, 10.8vw, 54px);
  color: #16874A;
  text-shadow: 0 1px 0 #fff, 0 2px 3px rgba(10, 90, 45, .22);
}
.tile-bai { background: linear-gradient(158deg, #FFFEF9, #F7EDD9); }
.bai-frame {
  width: 54%;
  height: 68%;
  border: 3px solid #2E66C8;
  border-radius: 2px;
  background: #FDFAF0;
  box-shadow:
    inset 0 0 0 3px #FDFAF0,
    inset 0 0 0 6px #2E66C8,
    0 1px 2px rgba(20, 50, 120, .18);
}
.tile-jiu { padding: 6%; }
.jiu-svg { width: 100%; height: 100%; display: block; }
.obj-svg {
  width: 84%;
  height: 84%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 4px 5px rgba(90, 45, 5, .2));
}

/* 中奖高亮 */
.cell.win::after {
  content: "";
  position: absolute;
  inset: 3%;
  border-radius: 12px;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, rgba(255, 246, 186, .95), rgba(255, 197, 55, .4) 54%, transparent 76%);
  box-shadow: inset 0 0 18px rgba(255, 220, 100, .85);
  animation: winPulse .6s ease-in-out infinite alternate;
}
.cell.win > * { animation: winBob .55s ease-in-out infinite alternate; }
@keyframes winPulse {
  from { opacity: .55; transform: scale(.94); }
  to { opacity: 1; transform: scale(1.03); }
}
@keyframes winBob {
  from { transform: translateY(1px) scale(1); }
  to { transform: translateY(-2px) scale(1.055); }
}

/* 中奖线 */
.paylines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.paylines path {
  fill: none;
  stroke: url(#goldLine);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.pl-glow {
  stroke-width: 9;
  opacity: .28;
  filter: url(#lineGlow);
}
.pl-line {
  stroke-width: 3;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawLine .55s cubic-bezier(.25, .8, .3, 1) forwards;
  filter: drop-shadow(0 0 4px rgba(255, 214, 90, .9));
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.reel-shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: 12px;
  box-shadow:
    inset 0 0 20px rgba(60, 25, 0, .28),
    inset 12px 0 20px -18px rgba(60, 25, 0, .5),
    inset -12px 0 20px -18px rgba(60, 25, 0, .5);
}

/* 中奖浮层 */
.win-pop {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 9;
  transform: translate(-50%, -50%) scale(.7);
  opacity: 0;
  pointer-events: none;
  padding: 8px 20px 9px;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(88, 34, 0, .94), rgba(34, 11, 0, .95));
  border: 1.5px solid #FFD76A;
  box-shadow: 0 0 26px rgba(255, 190, 60, .62), inset 0 1px 0 rgba(255, 245, 200, .3);
}
.win-pop span {
  display: block;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 3px;
  color: #FFCF63;
  margin-bottom: 3px;
}
.win-pop b {
  display: block;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 900;
  color: #FFF6C8;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #8A4A00, 0 0 16px rgba(255, 210, 90, .85);
}
.win-pop.big b { font-size: 36px; }
.win-pop.show { animation: winPop 1.95s cubic-bezier(.2, .9, .25, 1) forwards; }
@keyframes winPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.62); }
  13% { opacity: 1; transform: translate(-50%, -50%) scale(1.09); }
  23% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(.98); }
}

/* 底部灯带 */
.bottom-rail {
  position: relative;
  flex: 0 0 14px;
  height: 14px;
  margin: 9px 4px 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(180deg, #FFF0B6 0%, #E7B44B 40%, #9E6012 75%, #F4D478 100%);
  box-shadow: 0 2px 0 #5E3205, inset 0 1px 1px #FFF5C0;
}
.led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5FA2FF;
  box-shadow: 0 0 5px rgba(61, 126, 255, .9);
}
.cabinet.spinning .led { animation: ledChase .55s linear infinite; }
.cabinet.spinning .led:nth-child(2) { animation-delay: .07s; }
.cabinet.spinning .led:nth-child(3) { animation-delay: .14s; }
.cabinet.spinning .led:nth-child(5) { animation-delay: .21s; }
.cabinet.spinning .led:nth-child(6) { animation-delay: .28s; }
.cabinet.spinning .led:nth-child(7) { animation-delay: .35s; }
@keyframes ledChase {
  0%, 100% { background: #5FA2FF; box-shadow: 0 0 5px rgba(61, 126, 255, .9); }
  50% { background: #FFF3B0; box-shadow: 0 0 9px rgba(255, 220, 110, 1); }
}
.rail-line {
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 70, 10, .55), transparent);
}

/* 柜角装饰 */
.orn {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 4;
  pointer-events: none;
  border: 2px solid rgba(255, 232, 160, .82);
  filter: drop-shadow(0 1px 1px rgba(80, 40, 0, .6));
}
.orn-tl { top: 5px; left: 5px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.orn-tr { top: 5px; right: 5px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.orn-bl { bottom: 5px; left: 5px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.orn-br { bottom: 5px; right: 5px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.orn::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: linear-gradient(135deg, #FFF6CF, #E1A936);
  transform: rotate(45deg);
  box-shadow: 0 0 6px rgba(255, 220, 100, .8);
}
.orn-tl::after { top: -4px; left: -4px; }
.orn-tr::after { top: -4px; right: -4px; }
.orn-bl::after { bottom: -4px; left: -4px; }
.orn-br::after { bottom: -4px; right: -4px; }

/* ---------------- 操作区 ---------------- */
.controls {
  position: relative;
  z-index: 12;
  width: 100%;
  max-width: 430px;
  margin: clamp(10px, 2.2vh, 26px) auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  animation: fadeUp .5s ease-out .18s both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.ctrl {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.bet-box { align-items: flex-start; }
.auto-box { align-items: flex-end; }
.ctrl-label {
  margin-top: 7px;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255, 236, 196, .82);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

.bet-pill {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 128px;
  height: 46px;
  padding: 0 4px;
  border-radius: 23px;
  background: linear-gradient(180deg, rgba(72, 33, 10, .96), rgba(28, 11, 4, .97));
  border: 1.5px solid #E3B04B;
  box-shadow: 0 4px 9px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 230, 150, .24);
}
.bet-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #5A2C05;
  background: linear-gradient(180deg, #FFE7A1, #E1A62F);
  border: 1px solid #FFF0BD;
  box-shadow: 0 2px 0 #8A530A, inset 0 1px 1px #FFF9D9;
  transition: transform .1s ease, filter .1s ease;
}
.bet-btn .mp-icon { width: 18px; height: 18px; }
.bet-btn:active { transform: translateY(1px) scale(.94); filter: brightness(.95); }
.bet-btn:disabled { opacity: .32; box-shadow: none; }
.bet-val { flex: 1; min-width: 0; text-align: center; line-height: 1; }
.bet-val b {
  display: block;
  font-size: 19px;
  font-weight: 900;
  color: #FFF2C4;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
}
.bet-val span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #D9B56A;
}

.spin-box { position: relative; }
.spin-btn {
  position: relative;
  width: clamp(96px, 26vw, 118px);
  height: clamp(96px, 26vw, 118px);
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  color: #FFE49A;
  background:
    radial-gradient(circle at 35% 26%, #FFC0AE 0%, #FF6B56 16%, #E5262D 44%, #A50D18 76%, #68060D 100%);
  box-shadow:
    0 0 0 4px #F0C15A,
    0 0 0 7px #8A4C08,
    0 10px 20px rgba(0, 0, 0, .52),
    inset 0 -8px 14px rgba(80, 0, 5, .5),
    inset 0 4px 10px rgba(255, 255, 255, .32);
  transition: transform .12s ease, filter .16s ease;
}
.spin-btn::after {
  content: "";
  position: absolute;
  left: 14%;
  top: 7%;
  width: 72%;
  height: 38%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.spin-ring {
  position: absolute;
  inset: -11px;
  border-radius: 50%;
  border: 2px solid rgba(255, 214, 100, .35);
  animation: ringPulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ringPulse {
  0% { transform: scale(.94); opacity: .8; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}
.spin-face { width: 62%; height: 62%; display: grid; place-items: center; }
.spin-arrows {
  width: 100%;
  height: 100%;
  color: #FFE8A8;
  filter: drop-shadow(0 2px 0 #8C3A00) drop-shadow(0 0 8px rgba(255, 210, 80, .45));
  transform-origin: 50% 50%;
}
.spin-btn:active { transform: scale(.94); filter: brightness(1.07); }
.spin-btn[disabled] { filter: saturate(.78) brightness(.92); }
.spin-btn.spinning .spin-arrows { animation: spinArrow .8s linear infinite; }
@keyframes spinArrow { to { transform: rotate(360deg); } }
.spin-btn.low { animation: lowPulse 1.5s ease-in-out infinite; }
@keyframes lowPulse {
  0%, 100% { box-shadow: 0 0 0 4px #F0C15A, 0 0 0 7px #8A4C08, 0 10px 20px rgba(0, 0, 0, .52), inset 0 -8px 14px rgba(80, 0, 5, .5), inset 0 4px 10px rgba(255, 255, 255, .32); }
  50% { box-shadow: 0 0 0 4px #8FB8FF, 0 0 0 7px #2357D8, 0 0 26px rgba(61, 126, 255, .85), 0 10px 20px rgba(0, 0, 0, .52), inset 0 -8px 14px rgba(80, 0, 5, .5), inset 0 4px 10px rgba(255, 255, 255, .32); }
}
.low-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  z-index: 4;
  display: none;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, #6AA6FF, #2E63E8);
  border: 2px solid #D7E6FF;
  box-shadow: 0 0 14px rgba(61, 126, 255, .8);
}
.spin-btn.low .low-badge { display: grid; animation: badgePop 1s ease-in-out infinite alternate; }
@keyframes badgePop { from { transform: scale(.9); } to { transform: scale(1.08); } }
.spin-cost {
  margin-top: 7px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 10px;
  white-space: nowrap;
  color: #FFE3A1;
  background: rgba(30, 12, 4, .6);
  border: 1px solid rgba(255, 210, 120, .28);
  text-shadow: 0 1px 2px #000;
}

.auto-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #FFDF8A;
  background: radial-gradient(circle at 35% 28%, #7A4A22, #3A1B08 55%, #1D0B03);
  border: 2px solid #E5B24C;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .45), inset 0 1px 2px rgba(255, 220, 150, .3);
  transition: transform .12s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.auto-btn .mp-icon { width: 30px; height: 30px; }
.auto-btn:active { transform: scale(.94); }
.auto-btn.active {
  color: #fff;
  border-color: #7FB0FF;
  background: radial-gradient(circle at 35% 28%, #4B7DFF, #1F47B8 60%, #132A72);
  box-shadow: 0 0 0 3px rgba(61, 126, 255, .32), 0 0 18px rgba(61, 126, 255, .65), inset 0 1px 2px rgba(255, 255, 255, .35);
}
.auto-stop { display: none; gap: 4px; }
.auto-btn.active .auto-play { display: none; }
.auto-btn.active .auto-stop { display: flex; }
.auto-stop i { width: 5px; height: 18px; border-radius: 2px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); }

/* ---------------- 页脚 ---------------- */
.foot {
  flex: 0 0 auto;
  margin-top: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pay-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border-radius: 99px;
  color: #FFE3A1;
  font-size: 11px;
  letter-spacing: .5px;
  background: rgba(20, 8, 4, .62);
  border: 1px solid rgba(255, 215, 120, .35);
  transition: transform .12s ease, background .2s ease;
}
.pay-chip .mp-icon { width: 15px; height: 15px; color: #FFD76A; }
.pay-chip em {
  font-style: normal;
  color: #8FB8FF;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, .18);
}
.pay-chip:active { transform: scale(.96); background: rgba(40, 18, 8, .8); }
.foot-tip {
  margin: 0;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: rgba(255, 235, 200, .46);
}

/* ---------------- 轻提示 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 26px);
  z-index: 200;
  max-width: 88vw;
  padding: 9px 17px;
  border-radius: 99px;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  color: #FFE8B0;
  background: rgba(20, 10, 4, .95);
  border: 1px solid rgba(255, 210, 120, .5);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 弹层通用 ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 5, 10, .64);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s;
}
.overlay.is-open { opacity: 1; visibility: visible; }

.modal-card {
  position: relative;
  width: min(100%, 352px);
  max-height: 86vh;
  overflow-y: auto;
  padding: 26px 20px 18px;
  border-radius: 24px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(110% 60% at 50% 0%, rgba(255, 196, 90, .2), transparent 55%),
    linear-gradient(180deg, #3A1A0A 0%, #1B0B04 100%);
  border: 1.5px solid rgba(255, 210, 120, .55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 240, 190, .2);
  transform: translateY(16px) scale(.96);
  transition: transform .27s cubic-bezier(.2, .9, .25, 1);
}
.overlay.is-open .modal-card { transform: translateY(0) scale(1); }

.modal-x {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #E8C987;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 220, 150, .16);
}
.modal-x .mp-icon { width: 19px; height: 19px; }
.modal-x:active { background: rgba(255, 255, 255, .14); }

.offer-coin {
  width: 70px;
  height: 70px;
  margin: 2px auto 8px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 12px rgba(255, 170, 40, .3));
  animation: offerFloat 2.4s ease-in-out infinite;
}
.offer-coin svg { width: 70px; height: 70px; }
@keyframes offerFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-7px) rotate(3deg); }
}
.modal-title {
  margin: 0 0 7px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #FFE7A8;
  text-shadow: 0 2px 0 rgba(90, 40, 0, .55);
}
.modal-text {
  margin: 0 auto 14px;
  max-width: 260px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #D8C3A6;
}
.offer-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 14px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 215, 130, .18);
  font-size: 12px;
  color: #CBB49A;
}
.offer-balance b {
  font-size: 20px;
  color: #FFDD84;
  font-variant-numeric: tabular-nums;
}
.btn {
  width: 100%;
  height: 48px;
  margin-top: 9px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .5px;
  transition: transform .12s ease, filter .15s ease;
}
.btn .mp-icon { width: 20px; height: 20px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #76AAFF 0%, #3D7EFF 46%, #2357D8 100%);
  border: 1px solid rgba(190, 216, 255, .75);
  box-shadow:
    0 6px 16px rgba(61, 126, 255, .42),
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -2px 0 rgba(20, 50, 140, .45);
}
.btn-primary:active { transform: scale(.975); filter: brightness(1.07); }
.btn-ghost {
  color: #FFE6B0;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 215, 130, .28);
}
.btn-ghost:active { background: rgba(255, 255, 255, .1); }
.btn-ghost:disabled { opacity: .42; }
.modal-note {
  margin: 12px 0 0;
  font-size: 10.5px;
  color: rgba(255, 235, 200, .48);
}

/* ---------------- 广告播放 ---------------- */
.ad-playing {
  z-index: 120;
  background: #05070D;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.ad-frame {
  width: min(100%, 360px);
  text-align: center;
}
.ad-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ad-tag {
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #DCE9FF;
  background: rgba(61, 126, 255, .18);
  border: 1px solid rgba(61, 126, 255, .4);
}
.ad-count { font-size: 12px; color: #FFDD84; font-variant-numeric: tabular-nums; }
.ad-art {
  position: relative;
  width: 152px;
  height: 152px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}
.ad-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 210, 120, .5);
  box-shadow: 0 0 30px rgba(61, 126, 255, .35);
  animation: ringPulse 2.2s ease-out infinite;
}
.ad-art img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #FFD76A;
  box-shadow: 0 0 24px rgba(255, 200, 80, .4);
}
.ad-float {
  position: absolute;
  width: 22px;
  height: 22px;
  animation: adCoin 2.6s ease-in-out infinite;
}
.ad-float svg { width: 100%; height: 100%; }
.f1 { left: -22px; top: 22px; animation-delay: .1s; }
.f2 { right: -18px; top: 66px; animation-delay: .9s; width: 18px; height: 18px; }
.f3 { left: 6px; bottom: -10px; animation-delay: 1.6s; width: 16px; height: 16px; }
@keyframes adCoin {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .75; }
  50% { transform: translateY(-14px) rotate(18deg); opacity: 1; }
}
.ad-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  color: #FFE8AE;
}
.ad-sub { margin: 0 0 18px; font-size: 12px; color: #C8B79E; }
.ad-bar {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .06);
}
.ad-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6AA6FF, #3D7EFF, #FFD76A);
  box-shadow: 0 0 8px rgba(61, 126, 255, .8);
  transition: width .25s linear;
}
.ad-note { margin: 10px 0 4px; font-size: 11px; color: #7F8CA2; }
.ad-close {
  display: none;
  width: 100%;
  height: 44px;
  margin-top: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #6AA6FF, #3D7EFF);
  border: 1px solid rgba(190, 216, 255, .6);
}
.ad-close.show { display: block; }

/* ---------------- 底部抽屉 ---------------- */
.sheet-overlay {
  align-items: flex-end;
  padding: 0;
}
.sheet-card {
  width: 100%;
  max-width: 520px;
  max-height: 84vh;
  overflow-y: auto;
  padding: 8px 20px calc(var(--safe-bottom) + 18px);
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(90% 40% at 50% 0%, rgba(61, 126, 255, .12), transparent 60%),
    linear-gradient(180deg, #2C150A 0%, #160A05 100%);
  border-top: 1.5px solid rgba(255, 210, 120, .52);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 240, 190, .16);
  transform: translateY(102%);
  transition: transform .3s cubic-bezier(.2, .9, .25, 1);
  -webkit-overflow-scrolling: touch;
}
.overlay.is-open .sheet-card { transform: translateY(0); }
.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 4px auto 12px;
  border-radius: 99px;
  background: rgba(255, 220, 150, .3);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #FFE7A8;
  text-shadow: 0 2px 0 rgba(90, 40, 0, .4);
}
.sheet-head .modal-x { position: static; flex: 0 0 34px; }

.setting-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.set-ic {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #8FB8FF;
  background: rgba(61, 126, 255, .13);
  border: 1px solid rgba(61, 126, 255, .22);
}
.set-ic .mp-icon { width: 20px; height: 20px; }
.set-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.set-meta b { font-size: 14px; font-weight: 700; color: #FFF2D8; }
.set-meta small { font-size: 10.5px; color: #A08A72; }

.switch {
  position: relative;
  width: 50px;
  height: 29px;
  flex: 0 0 50px;
  border-radius: 99px;
  padding: 0;
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: background .2s ease, border-color .2s ease;
}
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #E9DFCE;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
  transition: transform .2s cubic-bezier(.2, .9, .25, 1), background .2s ease;
}
.switch.on {
  background: linear-gradient(180deg, #5C97FF, #3D7EFF);
  border-color: rgba(160, 196, 255, .8);
  box-shadow: 0 0 12px rgba(61, 126, 255, .35);
}
.switch.on i { transform: translateX(21px); background: #fff; }

.rule-card {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(61, 126, 255, .07);
  border: 1px solid rgba(61, 126, 255, .22);
}
.rule-card b { font-size: 13px; color: #9FC2FF; }
.rule-card p {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: #C3B29C;
}
.text-danger {
  width: 100%;
  height: 40px;
  margin-top: 15px;
  border-radius: 12px;
  font-size: 12px;
  color: #FF9B9B;
  background: rgba(255, 90, 90, .05);
  border: 1px solid rgba(255, 100, 100, .22);
}
.text-danger:active { background: rgba(255, 90, 90, .11); }
.ver {
  margin: 14px 0 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255, 235, 200, .32);
}

.sheet-sub {
  margin: 2px 0 10px;
  font-size: 11px;
  line-height: 1.6;
  color: #B29D84;
}
.pay-head {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  padding: 8px 0 7px;
  font-size: 10px;
  letter-spacing: .5px;
  color: #8E7A63;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.pay-head span:not(:first-child) { text-align: right; }
.pay-list { padding-bottom: 2px; }
.pay-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .055);
}
.pay-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pay-sym {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 246, 226, .93);
  box-shadow: inset 0 0 0 1px rgba(180, 145, 90, .4);
  overflow: hidden;
}
.pay-sym .tile { width: 26px; height: 30px; border-radius: 5px; box-shadow: none; border: 0; }
.pay-sym .glyph { font-size: 18px !important; text-shadow: none; }
.pay-sym .bai-frame { width: 60%; height: 70%; border-width: 2px; box-shadow: inset 0 0 0 1.5px #FDFAF0, inset 0 0 0 3px #2E66C8; }
.pay-sym .obj-svg { width: 27px; height: 27px; filter: none; }
.pay-sym .jiu-svg { width: 28px; height: 28px; }
.pay-name b { font-size: 12px; font-weight: 600; color: #F5E8D3; white-space: nowrap; }
.pay-num {
  text-align: right;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.pay-num.three { color: #FFD76A; font-weight: 800; }
.pay-num.two { color: #A8967F; }
.line-card {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 220, 150, .14);
}
.line-card b { font-size: 12px; color: #FFE0A0; }
.line-card p { margin: 5px 0 0; font-size: 11px; line-height: 1.6; color: #B7A48C; }

/* ---------------- 金币特效 ---------------- */
.fx {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.fx-coin {
  position: absolute;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  animation: coinFly 1.5s cubic-bezier(.2, .7, .4, 1) forwards;
  will-change: transform, opacity;
}
.fx-coin svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 2px rgba(80, 40, 0, .35)); }
@keyframes coinFly {
  0% { opacity: 0; transform: translate(0, 0) scale(.35) rotate(0deg); }
  12% { opacity: 1; }
  58% { opacity: 1; transform: translate(var(--x), var(--up)) scale(1) rotate(var(--r)); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1.35), 210px) scale(.72) rotate(calc(var(--r) * 2)); }
}

/* ---------------- 小屏适配 ---------------- */
@media (max-height: 720px) {
  :root { --scene-h: 172px; --hud-h: 48px; }
  .cabinet { min-height: 0; max-height: 340px; }
  .stage { padding-left: 10px; padding-right: 10px; }
  .controls { margin-top: 7px; }
  .spin-btn { width: 86px; height: 86px; }
  .spin-cost { margin-top: 4px; font-size: 9px; padding: 1px 7px; }
  .auto-btn { width: 54px; height: 54px; }
  .auto-btn .mp-icon { width: 25px; height: 25px; }
  .bet-pill { height: 40px; max-width: 116px; }
  .bet-btn { width: 27px; height: 27px; flex-basis: 27px; }
  .bet-val b { font-size: 17px; }
  .ctrl-label { margin-top: 4px; font-size: 10px; }
  .top-rail { margin-bottom: 7px; }
  .bottom-rail { margin-top: 7px; }
  .foot { margin-top: 5px; }
  .foot-tip { display: none; }
  .hud { top: calc(var(--safe-top) + 6px); }
  .player-chip, .coin-pill, .hud-btn { height: 40px; }
  .hud-btn { width: 42px; height: 42px; flex-basis: 42px; }
  .avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .player-chip { padding-right: 9px; }
  .coin-pill b { font-size: 14px; }
  .coin-add { width: 27px; height: 27px; flex-basis: 27px; }
}

@media (max-height: 600px) {
  :root { --scene-h: 132px; --hud-h: 46px; }
  .cabinet { min-height: 0; max-height: 300px; }
  .stage { padding-left: 8px; padding-right: 8px; }
  .spin-btn { width: 82px; height: 82px; }
  .spin-cost { font-size: 9px; }
  .auto-btn { width: 50px; height: 50px; }
  .auto-btn .mp-icon { width: 23px; height: 23px; }
  .bet-pill { height: 38px; max-width: 106px; }
  .bet-val b { font-size: 16px; }
  .foot { margin-top: 3px; }
}

@media (max-width: 350px) {
  .player-chip { max-width: 106px; padding-right: 8px; }
  .player-name { max-width: 54px; font-size: 11px; }
  .coin-pill { min-width: 108px; }
  .coin-pill b { font-size: 14px; min-width: 40px; }
  .hud-btn { width: 42px; height: 42px; flex-basis: 42px; }
  .controls { gap: 1px; }
  .bet-pill { max-width: 112px; }
  .bet-val b { font-size: 17px; }
  .spin-btn { width: 92px; height: 92px; }
  .auto-btn { width: 58px; height: 58px; }
  .modal-card { padding-left: 16px; padding-right: 16px; }
}

@media (min-width: 560px) {
  body { background: #04070e; }
  .app { box-shadow: 0 0 80px rgba(0, 0, 0, .85); }
  .overlay .modal-card { border-radius: 24px; }
  .overlay .sheet-card { border-radius: 24px; margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .petal, .spark, .spin-ring, .eq i, .offer-coin, .ad-ring, .ad-float { animation: none !important; }
}

/* 极短屏（老机型 / 分屏）：允许整页滚动，优先保证转轴完整可见 */
@media (max-height: 520px) {
  :root { --scene-h: 120px; --hud-h: 44px; }
  .stage { height: auto; min-height: 100vh; min-height: 100dvh; }
  .cabinet { flex: 0 0 220px; min-height: 220px; max-height: 260px; }
  .controls { margin-top: 6px; }
  .foot-tip { display: none; }
}

/* ---------------- 交互补充 ---------------- */
body.locked { overflow: hidden; }

.coin-pill.bump { animation: coinBump .42s cubic-bezier(.2, .9, .25, 1); }
@keyframes coinBump {
  0%, 100% { transform: scale(1); }
  42% { transform: scale(1.07); }
}

.stage.shake { animation: cabinetShake .52s cubic-bezier(.36, .07, .19, .97); }
@keyframes cabinetShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

.ad-bar i.indeterminate {
  width: 45% !important;
  animation: adSlide 1.35s ease-in-out infinite;
}
@keyframes adSlide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

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