/* ==================================================================
   金龙聚宝 · 样式
   配色：墨底 #1a0607 / 鎏金 #e8b640 / 朱红 #c0202c / 翡翠 #0f8a5f
   ================================================================== */

:root {
  color-scheme: dark;

  --ink:        #13070a;
  --ink-2:      #1f0b0e;
  --lacquer:    #2b1013;
  --lacquer-2:  #3a1416;
  --wood:       #4a1a19;
  --gold:       #e8b640;
  --gold-hi:    #ffe08a;
  --gold-lo:    #9a6a14;
  --vermilion:  #c0202c;
  --vermilion-hi:#e8555f;
  --jade:       #0f8a5f;
  --jade-hi:    #3fd1a0;

  --text:       #f6e7cf;
  --text-dim:   #d8c3a4;
  --muted:      #b0947a;
  --line:       rgba(232, 182, 64, .20);
  --line-strong:rgba(232, 182, 64, .42);

  --radius:     16px;
  --shadow-lg:  0 24px 70px rgba(0, 0, 0, .62);
  --shadow-sm:  0 6px 18px rgba(0, 0, 0, .4);

  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", "STSong", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font: 15px/1.5 var(--font);
  color: var(--text);
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse 70% 50% at 50% -8%, rgba(192, 32, 44, .30), transparent 60%),
    radial-gradient(ellipse 50% 40% at 12% 88%, rgba(232, 182, 64, .10), transparent 65%),
    radial-gradient(ellipse 50% 40% at 88% 92%, rgba(192, 32, 44, .14), transparent 65%),
    linear-gradient(170deg, #1d090c 0%, #13070a 45%, #180809 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景里非常淡的回纹，近看有肌理，远看只是暖色 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    repeating-linear-gradient(90deg, rgba(232,182,64,.035) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg,  rgba(232,182,64,.035) 0 1px, transparent 1px 44px);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 78%);
}

button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
button:disabled { cursor: not-allowed; }

/* ---------- 飘动的灯笼 ---------- */
.lantern-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.lantern {
  position: absolute;
  width: 34px; height: 46px;
  border-radius: 50% / 42%;
  background:
    radial-gradient(circle at 38% 30%, #ff9a6a, #d1232b 58%, #8c1119);
  box-shadow: 0 0 34px rgba(224, 70, 60, .55), inset 0 -8px 14px rgba(0,0,0,.35);
  opacity: .55;
  animation: sway 7s ease-in-out infinite;
}
.lantern::before {
  content: ""; position: absolute; left: 50%; top: -60vh;
  width: 1px; height: 60vh; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(232,182,64,.28));
}
.lantern::after {
  content: ""; position: absolute; left: 50%; bottom: -14px;
  width: 2px; height: 14px; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--gold), transparent);
}
.lantern.l1 { left: 4%;  top: 16%; animation-delay: -1s; }
.lantern.l2 { left: 9%;  top: 54%; transform: scale(.72); animation-delay: -3.5s; }
.lantern.r1 { right: 4%; top: 22%; animation-delay: -2.2s; }
.lantern.r2 { right: 8%; top: 62%; transform: scale(.66); animation-delay: -5s; }
@keyframes sway {
  0%, 100% { transform: translateX(0) rotate(-3deg); }
  50%      { transform: translateX(10px) rotate(3deg); }
}
.lantern.l2, .lantern.r2 { animation-name: sway-small; }
@keyframes sway-small {
  0%, 100% { transform: scale(.7) translateX(0) rotate(3deg); }
  50%      { transform: scale(.7) translateX(-12px) rotate(-3deg); }
}

/* ---------- 全屏特效层 ----------
   放射光压在 UI 之下（z0），金币/暗角/闪光压在 UI 之上（z50+），弹窗更高（z80）。 */
#fx-rays {
  /* 这一层在手机上曾经是最贵的：inset -20vmax 的巨大图层 + conic-gradient
     + mask-image，每帧旋转都要重新光栅化。收小尺寸并提升为独立合成层后，
     旋转只是 GPU 变换，不再触发重绘。 */
  position: fixed; inset: -8vmax;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
  transition: opacity .5s;
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    rgba(255, 214, 110, .22) 0deg 5deg, transparent 5deg 14deg);
  mask-image: radial-gradient(circle at 50% 46%, #000 8%, transparent 62%);
  animation: rays-spin 26s linear infinite;
}
#fx-rays.on { opacity: var(--rays-opacity, .5); }
@keyframes rays-spin { to { transform: rotate(360deg); } }

#fx-canvas {
  position: fixed; inset: 0;
  z-index: 50;
  pointer-events: none;
  width: 100%; height: 100%;
}

#fx-vignette {
  position: fixed; inset: 0;
  z-index: 51;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
  transition: opacity .6s;
  box-shadow: inset 0 0 22vmin var(--vig, rgba(232, 182, 64, .35));
}
#fx-vignette.on { opacity: 1; animation: vig-breathe 2.6s ease-in-out infinite; }
@keyframes vig-breathe { 50% { opacity: .5; } }

#fx-flash {
  position: fixed; inset: 0;
  z-index: 52;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}
#fx-flash.run { animation: fx-flash-out .42s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes fx-flash-out { to { opacity: 0; } }

/* ---------- 外壳 ---------- */
.shell {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 14px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100vh;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-seal {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  font: 700 24px/1 var(--font-display);
  color: #fff4d8;
  background: linear-gradient(150deg, #d42a30, #8c1119);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(192,32,44,.45), inset 0 1px 0 rgba(255,255,255,.22);
}
.brand-text b {
  display: block;
  font: 700 19px/1.2 var(--font-display);
  letter-spacing: .18em;
  background: linear-gradient(180deg, #fff1c4, var(--gold) 55%, #b9832a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text small { display: block; font-size: 10px; letter-spacing: .22em; color: var(--muted); }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.virtual-badge {
  padding: 5px 12px;
  border: 1px solid rgba(63, 209, 160, .35);
  border-radius: 999px;
  background: rgba(15, 138, 95, .12);
  color: var(--jade-hi);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(74,26,25,.75), rgba(28,10,12,.85));
  color: var(--gold);
  transition: transform .12s, border-color .18s, box-shadow .18s, color .18s;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--gold-hi); box-shadow: 0 0 18px rgba(232,182,64,.22); }
.icon-btn:active, .icon-btn.pressed { transform: translateY(2px) scale(.96); }
.icon-btn.off { color: #6d5740; }
.icon-btn.off::after {
  content: ""; position: absolute; width: 22px; height: 1.5px;
  background: #a8756a; transform: rotate(-38deg);
}
.icon-btn { position: relative; }
.ico-sound::before { content: "♪"; font-size: 17px; }
.ico-music::before { content: "♫"; font-size: 16px; }
.ico-gear::before  { content: "⚙"; font-size: 16px; }
.ico-gift::before  { content: "✉"; font-size: 15px; }
.icon-btn .dot {
  position: absolute; right: 5px; top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--vermilion-hi);
  box-shadow: 0 0 8px var(--vermilion-hi);
  opacity: 0;
  transition: opacity .2s;
}
.icon-btn .dot.on { opacity: 1; animation: dot-pulse 1.4s ease-in-out infinite; }

/* ---------- 财神等级 ---------- */
.level-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 8px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(74,26,25,.8), rgba(26,9,11,.9));
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.level-chip:hover { border-color: var(--line-strong); box-shadow: 0 0 16px rgba(232,182,64,.2); }
.level-chip.bump { animation: level-bump .9s cubic-bezier(.2,1.3,.3,1); }
@keyframes level-bump {
  30% { transform: scale(1.18); border-color: var(--gold-hi); box-shadow: 0 0 34px rgba(255,224,138,.9); }
}
.level-num { grid-row: 1 / span 2; font: 700 13px/1 var(--font-display); color: var(--gold-hi); letter-spacing: .04em; }
.level-num b { font-size: 16px; }
.level-track {
  width: 74px; height: 5px;
  border-radius: 99px;
  background: rgba(10,3,5,.8);
  border: 1px solid var(--line);
  overflow: hidden;
}
.level-track i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--vermilion), var(--gold-hi));
  box-shadow: 0 0 8px rgba(232,182,64,.7);
  transition: width .4s cubic-bezier(.2,.9,.25,1);
}
.level-xp { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 主布局 ---------- */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 14px;
  align-items: start;
}

/* ---------- 机台 ---------- */
.machine { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.machine-frame {
  position: relative;
  padding: 14px 16px 10px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 16%),
    linear-gradient(160deg, var(--wood) 0%, #3a1214 38%, #2a0d10 100%);
  border: 1px solid var(--line-strong);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 224, 138, .22),
    inset 0 -30px 60px rgba(0, 0, 0, .45);
}
/* 外圈的一道金线，像雕花木框上的描金 */
.machine-frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(232, 182, 64, .28);
  border-radius: 17px;
  pointer-events: none;
}

.frame-top, .frame-bottom { position: relative; height: 0; }
.plaque {
  position: absolute;
  left: 50%; top: -26px;
  transform: translateX(-50%);
  padding: 5px 24px;
  font: 700 15px/1 var(--font-display);
  letter-spacing: .34em;
  text-indent: .34em;
  color: #fff3cf;
  background: linear-gradient(180deg, #b0202a, #7d1119);
  border: 1px solid rgba(255, 224, 138, .5);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.28);
  white-space: nowrap;
}
.corner {
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(232, 182, 64, .5);
}
.corner.tl { left: -6px;  top: -6px;    border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.corner.tr { right: -6px; top: -6px;    border-left: 0;  border-bottom: 0; border-radius: 0 6px 0 0; }
.corner.bl { left: -6px;  bottom: -2px; border-right: 0; border-top: 0;    border-radius: 0 0 0 6px; }
.corner.br { right: -6px; bottom: -2px; border-left: 0;  border-top: 0;    border-radius: 0 0 6px 0; }

/* ---------- 累积彩金 ---------- */
.jackpot-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px auto 2px;
  padding: 7px 22px;
  max-width: 560px;
  border-radius: 12px;
  border: 1px solid rgba(255, 224, 138, .5);
  background:
    linear-gradient(180deg, rgba(255,224,138,.10), rgba(0,0,0,0) 60%),
    linear-gradient(160deg, #5c1a16, #2c0c0d);
  box-shadow: 0 6px 20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,224,138,.3);
  overflow: hidden;
}
/* 缓慢扫过的金色高光，让这条一直"活着" */
.jackpot-bar::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,240,190,.26) 48%, transparent 60%);
  transform: translateX(-100%);
  animation: jackpot-sheen 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes jackpot-sheen { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
.jackpot-label { font: 700 10px/1 var(--font-display); letter-spacing: .3em; color: #ffcf7a; white-space: nowrap; }
.jackpot-value {
  font: 800 clamp(20px, 2.6vw, 30px)/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fffdf0, #ffe08a 45%, #d79a1e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(90,16,20,.8)) drop-shadow(0 0 16px rgba(255,200,90,.7));
}
.jackpot-hint { font-size: 10px; color: #c99b74; letter-spacing: .1em; white-space: nowrap; }

/* ---------- 龙气条（刻意不给数字）---------- */
.charge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 2px 10px;
}
.charge-label, .charge-state {
  font-size: 11px;
  letter-spacing: .16em;
  white-space: nowrap;
}
.charge-label { color: var(--gold); font-family: var(--font-display); font-weight: 700; }
.charge-state { color: var(--muted); min-width: 5.6em; text-align: right; }

.charge-track {
  position: relative;
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #14060a, #241014);
  border: 1px solid rgba(232, 182, 64, .26);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.7);
  overflow: hidden;
}
.charge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8c1119 0%, var(--vermilion) 30%, #f0932c 68%, var(--gold-hi) 100%);
  box-shadow: 0 0 16px rgba(232, 182, 64, .55);
  transition: width .55s cubic-bezier(.22, .9, .25, 1);
}
/* 鳞片纹理压在填充上，读不出精确刻度，只能感觉到"在涨" */
.charge-scales {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(115deg, rgba(0,0,0,.28) 0 5px, transparent 5px 11px);
  opacity: .55;
}
.charge-track.hot { border-color: rgba(255, 224, 138, .7); }
.charge-track.hot .charge-fill { animation: charge-breathe 1.1s ease-in-out infinite; }
.charge-track.full .charge-fill { animation: charge-breathe .45s ease-in-out infinite; }
@keyframes charge-breathe {
  50% { box-shadow: 0 0 30px rgba(255, 224, 138, .95), 0 0 60px rgba(240, 147, 44, .6); filter: brightness(1.22); }
}
.charge-track.pulse { animation: charge-knock .4s ease; }
@keyframes charge-knock { 40% { transform: scaleY(1.45); } }

/* ---------- 盘面 ---------- */
.stage {
  position: relative;
  width: 100%;
  /* 只用 aspect-ratio 定高：配 max-height 会反过来压缩宽度，
     让画布缩到框子左半边。2:1 是为了整页能塞进 900px 高的窗口；
     格子会比正方略宽，这恰好和真实机台一致。 */
  aspect-ratio: 2 / 1;
  margin-inline: auto;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(192, 32, 44, .22), transparent 62%),
    linear-gradient(180deg, #170709, #0d0405);
  border: 1px solid rgba(232, 182, 64, .3);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 10px 34px rgba(0,0,0,.7);
  overflow: hidden;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-glass {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 38%, rgba(255,255,255,.05) 45%, transparent 52%),
    radial-gradient(ellipse at 50% 120%, rgba(232,182,64,.10), transparent 60%);
  box-shadow: inset 0 0 70px rgba(10, 2, 3, .8);
}

/* 状态角标 */
.free-hud, .hold-hud {
  position: absolute;
  top: 10px; left: 50%;
  transform: translate(-50%, -16px);
  display: none;
  gap: 16px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(18, 5, 7, .88);
  border: 1px solid var(--line-strong);
  box-shadow: 0 6px 22px rgba(0,0,0,.6);
  font-size: 12px;
  color: var(--muted);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.free-hud.visible, .hold-hud.visible { display: flex; transform: translate(-50%, 0); }
.free-hud b, .hold-hud b { color: var(--gold-hi); font-size: 14px; }
.hold-hud.reset { animation: hud-knock .45s ease; }
@keyframes hud-knock {
  35% { transform: translate(-50%, 0) scale(1.14); border-color: var(--gold-hi); }
}
.hold-hud.spinning { animation: hud-tense .5s ease-in-out infinite; }
@keyframes hud-tense {
  50% { border-color: var(--gold-hi); box-shadow: 0 6px 22px rgba(0,0,0,.6), 0 0 26px rgba(255,214,110,.6); }
}

/* ---------- 大奖横幅 ---------- */
.banner {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(.82);
  transition: opacity .2s;
}
.banner.show { opacity: 1; animation: banner-in .6s cubic-bezier(.16, 1.1, .3, 1) forwards; }
@keyframes banner-in {
  0%   { opacity: 0; transform: scale(.7); }
  55%  { opacity: 1; transform: scale(1.07); }
  100% { opacity: 1; transform: scale(1); }
}
.banner::before {
  content: "";
  position: absolute; inset: -30% -14%;
  background: radial-gradient(ellipse at center,
    rgba(11, 3, 4, .96) 22%, rgba(11, 3, 4, .84) 46%, rgba(11, 3, 4, 0) 76%);
  z-index: -1;
}
.banner-title {
  font: 700 clamp(18px, 2.6vw, 28px)/1 var(--font-display);
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--gold-hi);
  text-shadow: 0 0 26px rgba(232, 182, 64, .8);
}
.banner-amount {
  margin: 8px 0 4px;
  font: 800 clamp(38px, 7vw, 82px)/1 var(--font-display);
  letter-spacing: .02em;
  background: linear-gradient(180deg, #fffaf0 4%, #ffe08a 38%, #e8b640 62%, #b9832a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(90, 16, 20, .9)) drop-shadow(0 0 28px rgba(255, 190, 70, .7));
}
.banner-sub { font-size: 12px; letter-spacing: .1em; color: #ffd9a8; }
.banner.tier-mega .banner-amount,
.banner.tier-super .banner-amount,
.banner.tier-legend .banner-amount { animation: amount-throb .62s ease-in-out infinite; }
@keyframes amount-throb {
  50% { filter: drop-shadow(0 4px 0 rgba(90,16,20,.9)) drop-shadow(0 0 60px rgba(255, 215, 110, 1)) drop-shadow(0 0 120px rgba(255,120,50,.8)); transform: scale(1.04); }
}
.banner.tier-legend .banner-title { color: #fff; text-shadow: 0 0 34px #ff7a4a, 0 0 70px #e8b640; }

/* 小额也庆祝，但体量收着：字小一点、时间短一点 */
.banner.tier-tiny .banner-amount,
.banner.tier-small .banner-amount { font-size: clamp(26px, 4vw, 44px); }
.banner.tier-tiny .banner-title,
.banner.tier-small .banner-title { font-size: clamp(14px, 1.6vw, 18px); letter-spacing: .34em; }
.banner.tier-mega .banner-amount,
.banner.tier-super .banner-amount,
.banner.tier-legend .banner-amount { font-size: clamp(48px, 9vw, 108px); }

/* ---------- 玩法特写：整屏 ---------- */
.feature-card {
  position: fixed;
  inset: 0;
  z-index: 53;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.feature-card.show { opacity: 1; }
.feature-card::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 48%, rgba(11, 3, 4, .96) 20%, rgba(11, 3, 4, .82) 52%, rgba(11, 3, 4, .58) 100%);
}
.feature-inner { position: relative; }
.feature-card.show .feature-inner { animation: feature-slam .7s cubic-bezier(.1, 1.3, .3, 1) both; }
@keyframes feature-slam {
  0%   { opacity: 0; transform: scale(2.4) rotate(-6deg); filter: blur(14px); }
  55%  { opacity: 1; transform: scale(.93) rotate(1deg); filter: blur(0); }
  75%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.feature-title {
  font: 700 clamp(40px, 9vw, 108px)/1.08 var(--font-display);
  letter-spacing: .1em;
  background: linear-gradient(180deg, #fffdf4 2%, #ffe08a 34%, #e8b640 58%, #a8741c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter:
    drop-shadow(0 5px 0 rgba(90, 16, 20, .92))
    drop-shadow(0 0 40px rgba(255, 190, 70, .85))
    drop-shadow(0 0 90px rgba(255, 110, 50, .5));
}
.feature-sub  { margin-top: 16px; font-size: clamp(15px, 2.4vw, 22px); color: #ffeccb; letter-spacing: .1em;
                text-shadow: 0 2px 12px rgba(0,0,0,.9); }
.feature-meta { margin-top: 6px; font-size: clamp(12px, 1.6vw, 15px); color: #d6b58c; letter-spacing: .1em;
                text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.feature-card.dragon .feature-title { animation: dragon-glow .8s ease-in-out infinite; }
@keyframes dragon-glow {
  50% { filter: drop-shadow(0 5px 0 rgba(90,16,20,.92)) drop-shadow(0 0 70px rgba(255, 110, 70, 1)) drop-shadow(0 0 130px rgba(255,60,40,.7)); }
}
.feature-card.grand .feature-title { animation: dragon-glow .42s ease-in-out infinite; }
.feature-card.gong .feature-title,
.feature-card.gold .feature-title { animation: dragon-glow 1.1s ease-in-out infinite; }


/* ---------- 结算文字 ---------- */
.result-line {
  min-height: 22px;
  margin: 9px 2px 2px;
  text-align: center;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--text);
  transition: color .2s;
}
.result-line.muted { color: #8d7360; }
.result-line.win   { color: var(--gold-hi); text-shadow: 0 0 16px rgba(232,182,64,.4); }

/* ---------- 控制台 ---------- */
.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(58, 18, 20, .92), rgba(22, 8, 10, .95));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 224, 138, .14);
}

.stat-group { display: flex; gap: 10px; min-width: 0; }
.stat {
  flex: 1;
  min-width: 96px;
  padding: 7px 12px;
  border-radius: 11px;
  background: rgba(10, 3, 5, .6);
  border: 1px solid var(--line);
}
.stat span { display: block; font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.stat b {
  display: block;
  font: 700 21px/1.25 var(--font-display);
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
}
.stat.accent b { color: var(--jade-hi); }
/* 数字滚动时把它点亮，"变多"这件事要被看见 */
.stat b.counting, .stat.accent b.counting {
  color: var(--gold-hi);
  text-shadow: 0 0 18px rgba(255, 224, 138, .9);
  animation: count-pop .18s ease-in-out infinite alternate;
}
@keyframes count-pop { to { transform: scale(1.06); } }

.ctrl-caption { font-size: 10px; letter-spacing: .16em; color: var(--muted); display: block; margin-bottom: 4px; text-align: center; }
.bet-stepper {
  display: flex; align-items: center; gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(10, 3, 5, .6);
  border: 1px solid var(--line);
}
.bet-stepper b {
  min-width: 62px;
  text-align: center;
  font: 700 18px/1 var(--font-display);
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
}
.step-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(170deg, #5a1f1d, #2e0f11);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 17px; line-height: 1;
  transition: transform .1s, background .18s, box-shadow .18s;
}
.step-btn:hover:not(:disabled) { background: linear-gradient(170deg, #77281f, #3a1315); box-shadow: 0 0 14px rgba(232,182,64,.25); }
.step-btn:active:not(:disabled), .step-btn.pressed { transform: translateY(2px) scale(.94); }

/* 主按钮：圆形金印 */
.spin-btn {
  position: relative;
  width: 118px; height: 118px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, #ffe9a8 0%, #e8b640 34%, #b3801f 62%, #7a5210 100%);
  box-shadow:
    0 10px 0 #5d3c09,
    0 14px 30px rgba(0, 0, 0, .6),
    inset 0 2px 0 rgba(255, 255, 255, .55),
    inset 0 -10px 20px rgba(120, 70, 8, .5);
  transition: transform .09s, box-shadow .09s, filter .2s;
}
.spin-btn:hover:not(:disabled) { filter: brightness(1.07); }
.spin-btn:active:not(:disabled), .spin-btn.pressed {
  transform: translateY(7px);
  box-shadow: 0 3px 0 #5d3c09, 0 5px 14px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.4), inset 0 -6px 16px rgba(120,70,8,.55);
}
.spin-btn:disabled { filter: grayscale(.65) brightness(.6); box-shadow: 0 6px 0 #3a2506, inset 0 2px 0 rgba(255,255,255,.2); }
.spin-ring {
  position: absolute; inset: 7px;
  border-radius: 50%;
  border: 2px dashed rgba(94, 44, 6, .5);
}
.spin-core {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 2px;
  color: #4a2604;
  text-shadow: 0 1px 0 rgba(255, 245, 210, .6);
}
.spin-core b { font: 800 22px/1 var(--font-display); letter-spacing: .12em; }
.spin-core small { font-size: 9px; letter-spacing: .22em; opacity: .65; }

/* 轮到玩家按的时候（手动免费旋转 / 聚宝盆重转）：按钮自己会喊你 */
.spin-btn.await {
  animation: spin-await 1s ease-in-out infinite;
}
.spin-btn.await::after {
  content: "";
  position: absolute; inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 224, 138, .85);
  animation: spin-await-ring 1s ease-out infinite;
  pointer-events: none;
}
@keyframes spin-await {
  50% { filter: brightness(1.22); box-shadow: 0 10px 0 #5d3c09, 0 0 46px rgba(255,214,110,.85), inset 0 2px 0 rgba(255,255,255,.6); }
}
@keyframes spin-await-ring {
  0%   { transform: scale(.92); opacity: .9; }
  100% { transform: scale(1.28); opacity: 0; }
}

.side-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
/* 五个按钮排两列，赔率占满最后一行 */
#paytable-btn { grid-column: 1 / -1; }
.mini-btn {
  padding: 8px 12px;
  min-width: 78px;
  border-radius: 10px;
  background: linear-gradient(170deg, rgba(74,26,25,.9), rgba(26,9,11,.95));
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  letter-spacing: .06em;
  transition: transform .1s, border-color .18s, box-shadow .18s, color .18s;
}
.mini-btn b { color: var(--gold); font-weight: 700; }
.mini-btn:hover:not(:disabled) { border-color: var(--line-strong); box-shadow: 0 0 16px rgba(232,182,64,.2); }
.mini-btn:active:not(:disabled), .mini-btn.pressed { transform: translateY(2px) scale(.97); }
.mini-btn:disabled { opacity: .38; }
.mini-btn.on { border-color: var(--jade-hi); color: #eafff5; background: linear-gradient(170deg, #12604a, #0a3128); }
.mini-btn.on b { color: var(--jade-hi); }
/* 买龙门：默认朱红，等待二次确认时整颗点亮 */
.buy-btn { border-color: rgba(232,85,95,.5); }
.buy-btn b { color: #ff9a86; }
.buy-btn:hover:not(:disabled) { border-color: var(--vermilion-hi); box-shadow: 0 0 18px rgba(192,32,44,.4); }
.buy-btn.armed {
  border-color: var(--gold-hi);
  background: linear-gradient(170deg, #8c1f1a, #4a1010);
  color: #fff3cf;
  animation: buy-armed .7s ease-in-out infinite;
}
.buy-btn.armed b { color: var(--gold-hi); }
@keyframes buy-armed { 50% { box-shadow: 0 0 26px rgba(255,214,110,.7); } }

.auto-wrap { position: relative; }
.auto-wrap .mini-btn { width: 100%; padding-right: 34px; }
.auto-wrap select {
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 24px;
  padding: 0 2px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(10,3,5,.85);
  color: var(--gold);
  font-size: 10px;
}

/* ---------- 侧栏 ---------- */
.sidebar { display: flex; flex-direction: column; gap: 12px; }
.panel {
  padding: 13px 15px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(52, 17, 19, .88), rgba(20, 8, 10, .92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 224, 138, .1);
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head h2 {
  margin: 0;
  font: 700 14px/1 var(--font-display);
  letter-spacing: .18em;
  color: var(--gold);
}
.panel-head .meta { font-size: 11px; color: var(--muted); }
.panel-head .meta b { color: var(--gold-hi); }

.mode-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.mode-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--jade-hi);
  box-shadow: 0 0 10px var(--jade-hi);
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse { 50% { opacity: .35; } }

.rule-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.rule-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.rule-list b { color: var(--text); font-weight: 600; }

/* ---------- 任务 ---------- */
.mission-list { display: grid; gap: 9px; }
.mission {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(10, 3, 5, .5);
  border: 1px solid var(--line);
}
.mission-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mission-top span { font-size: 11.5px; color: var(--text); }
.mission-top b { font-size: 11px; color: var(--gold-hi); white-space: nowrap; }
.mission-track {
  height: 5px; margin: 6px 0 4px;
  border-radius: 99px;
  background: rgba(0,0,0,.55);
  overflow: hidden;
}
.mission-track i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--jade), var(--jade-hi));
  box-shadow: 0 0 8px rgba(63,209,160,.6);
  transition: width .5s cubic-bezier(.2,.9,.25,1);
}
.mission-foot { display: flex; justify-content: space-between; font-size: 10px; color: #8a7159; font-variant-numeric: tabular-nums; }

/* ---------- 连胜 ---------- */
.streak-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(10, 3, 5, .5);
  border: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
  transition: border-color .3s, box-shadow .3s;
}
.streak-row b { font: 700 19px/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.streak-row small { margin-left: auto; font-size: 10px; color: #7a6250; }
.streak-row.warm { border-color: rgba(255,154,47,.55); }
.streak-row.warm b { color: #ffb24a; }
.streak-row.hot {
  border-color: var(--gold-hi);
  box-shadow: 0 0 20px rgba(255,214,110,.35);
  animation: streak-burn 1s ease-in-out infinite;
}
.streak-row.hot b { color: var(--gold-hi); text-shadow: 0 0 16px rgba(255,214,110,.9); }
@keyframes streak-burn { 50% { box-shadow: 0 0 34px rgba(255,214,110,.6); } }
.tag {
  flex: none;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 6px;
  font: 700 11px/1 var(--font-display);
  font-style: normal;
}
.tag.wild { background: rgba(192,32,44,.3);  color: #ff9a86; border: 1px solid rgba(232,85,95,.45); }
.tag.scat { background: rgba(232,182,64,.16); color: var(--gold-hi); border: 1px solid var(--line-strong); }
.tag.coin { background: rgba(232,182,64,.12); color: #ffdf7a; border: 1px solid var(--line-strong); }

.panel.grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.log-list { flex: 1; overflow-y: auto; max-height: 210px; display: grid; gap: 1px; align-content: start; }
.log-list::-webkit-scrollbar { width: 5px; }
.log-list::-webkit-scrollbar-thumb { background: rgba(232,182,64,.25); border-radius: 3px; }
.log-empty { font-size: 11.5px; color: #7a6250; padding: 6px 0; }
.log-row {
  display: flex; gap: 8px;
  padding: 6px 0;
  font-size: 11.5px;
  color: var(--muted);
  border-bottom: 1px solid rgba(232,182,64,.08);
  animation: log-in .3s ease;
}
@keyframes log-in { from { opacity: 0; transform: translateY(-5px); } }
.log-row b { color: var(--gold-hi); }
.log-time { flex: none; color: #6f5a49; font-variant-numeric: tabular-nums; }
.log-row.log-gold { color: #e9d2ad; }

.achievement-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.achv { display: flex; align-items: center; gap: 6px; opacity: .42; }
.achv.done { opacity: 1; }
.achv-icon {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  font: 700 11px/1 var(--font-display);
  color: var(--muted);
}
.achv.done .achv-icon {
  color: #2d1504;
  background: linear-gradient(170deg, var(--gold-hi), var(--gold-lo));
  border-color: var(--gold-hi);
  box-shadow: 0 0 12px rgba(232,182,64,.45);
}
.achv-text { min-width: 0; }
.achv-text b { display: block; font-size: 11px; font-weight: 600; }
.achv-text small { display: block; font-size: 9.5px; color: #7a6250; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 页脚 ---------- */
.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 11px;
  color: #7a6250;
}
.link-btn { color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--gold); }

/* ---------- 弹窗 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(8, 2, 3, .78);
  backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity .24s;
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  position: relative;
  width: min(520px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  padding: 30px 28px 26px;
  border-radius: 20px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(192,32,44,.35), transparent 58%),
    linear-gradient(165deg, #3a1416, #190809);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.97);
  transition: transform .26s cubic-bezier(.2, .9, .25, 1);
}
.modal.wide { width: min(700px, 100%); text-align: left; }
.show .modal { transform: none; }
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-thumb { background: rgba(232,182,64,.3); border-radius: 3px; }

.modal-seal {
  width: 62px; height: 62px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  font: 700 32px/1 var(--font-display);
  color: #fff4d8;
  background: linear-gradient(150deg, #d42a30, #7d1119);
  border: 1px solid rgba(255,224,138,.55);
  border-radius: 12px;
  box-shadow: 0 0 34px rgba(192,32,44,.55), inset 0 1px 0 rgba(255,255,255,.3);
  animation: seal-breathe 3s ease-in-out infinite;
}
@keyframes seal-breathe { 50% { transform: scale(1.05); box-shadow: 0 0 48px rgba(232,182,64,.6), inset 0 1px 0 rgba(255,255,255,.4); } }

.eyebrow { margin: 0; font-size: 10px; letter-spacing: .3em; color: var(--gold); }
.modal h1 { margin: 6px 0 10px; font: 700 30px/1.2 var(--font-display); letter-spacing: .06em; }
.modal h2 { margin: 4px 0 14px; font: 700 21px/1.3 var(--font-display); letter-spacing: .1em; }
.modal h3 { margin: 20px 0 9px; font: 700 14px/1 var(--font-display); letter-spacing: .14em; color: var(--gold); }
.modal-copy { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.modal-note { margin-top: 16px; font-size: 11px; color: #7a6250; }
.modal-close {
  position: absolute; right: 12px; top: 10px;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--muted); font-size: 22px; line-height: 1;
  transition: color .16s, background .16s;
}
.modal-close:hover { color: var(--gold-hi); background: rgba(232,182,64,.1); }

.buyin-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 18px 0 14px; }
.buyin-options button {
  padding: 16px 8px 13px;
  border-radius: 13px;
  background: linear-gradient(170deg, rgba(90,30,28,.9), rgba(28,11,13,.95));
  border: 1px solid var(--line);
  transition: transform .14s, border-color .18s, box-shadow .18s;
}
.buyin-options button:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 10px 24px rgba(0,0,0,.5), 0 0 22px rgba(232,182,64,.22);
}
.buyin-options button:active:not(:disabled), .buyin-options button.pressed { transform: translateY(1px) scale(.98); }
.buyin-options button:disabled { opacity: .35; }
.buyin-options b { display: block; font: 700 22px/1 var(--font-display); color: var(--gold-hi); }
.buyin-options span { display: block; margin-top: 6px; font-size: 12px; color: var(--text); }
.buyin-options small { display: block; margin-top: 3px; font-size: 10px; color: #7a6250; }
.wallet-hint { font-size: 12px; color: var(--muted); }
.wallet-hint strong { color: var(--gold-hi); }

/* ---------- 每日签到 ---------- */
.daily-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 18px 0 16px;
}
.daily-cell {
  padding: 10px 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(10, 3, 5, .5);
  transition: .2s;
}
.daily-cell span { display: block; font-size: 10px; color: var(--muted); }
.daily-cell b { display: block; margin-top: 4px; font: 700 13px/1 var(--font-display); color: var(--text); }
.daily-cell.done { opacity: .45; border-color: rgba(63,209,160,.4); }
.daily-cell.done b { color: var(--jade-hi); }
.daily-cell.next {
  border-color: var(--gold-hi);
  background: linear-gradient(170deg, rgba(232,182,64,.22), rgba(10,3,5,.6));
  box-shadow: 0 0 22px rgba(232,182,64,.3);
  animation: daily-next 1.4s ease-in-out infinite;
}
.daily-cell.next b { color: var(--gold-hi); }
@keyframes daily-next { 50% { box-shadow: 0 0 34px rgba(255,224,138,.55); } }
.daily-grid .daily-cell:nth-child(7) { grid-column: span 2; }

.primary-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  font: 700 15px/1 var(--font-display);
  letter-spacing: .14em;
  color: #4a2604;
  background: radial-gradient(circle at 50% 20%, #ffe9a8, #e8b640 45%, #b3801f);
  box-shadow: 0 5px 0 #5d3c09, 0 8px 20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .1s, box-shadow .1s, filter .2s;
}
.primary-btn:hover:not(:disabled) { filter: brightness(1.08); }
.primary-btn:active:not(:disabled), .primary-btn.pressed {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #5d3c09, inset 0 1px 0 rgba(255,255,255,.4);
}
.primary-btn:disabled { filter: grayscale(.6) brightness(.6); box-shadow: 0 3px 0 #3a2506; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(232,182,64,.12);
  text-align: left;
  cursor: pointer;
}
.switch-row b { display: block; font-size: 13px; font-weight: 600; }
.switch-row small { display: block; margin-top: 2px; font-size: 11px; color: #7a6250; }
.switch-row input { display: none; }
.switch-row i {
  flex: none;
  position: relative;
  width: 44px; height: 24px;
  border-radius: 999px;
  background: #34161a;
  border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}
.switch-row i::after {
  content: "";
  position: absolute; left: 3px; top: 2.5px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #8d7360;
  transition: left .2s, background .2s;
}
.switch-row input:checked + i { background: rgba(15,138,95,.4); border-color: var(--jade-hi); }
.switch-row input:checked + i::after { left: 22px; background: var(--jade-hi); }

/* 赔率表 */
.modal-body { font-size: 13px; }
.pay-lead { margin: 0 0 16px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.pay-lead b { color: var(--gold-hi); }
.pay-grid { display: grid; gap: 6px; }
.pay-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(12, 4, 6, .55);
  border: 1px solid var(--line);
}
.pay-row.special { grid-template-columns: 50px minmax(0, 1fr); }
.pay-icon { width: 46px; height: 46px; }
.pay-name b { font-size: 13px; }
.pay-name small { display: block; margin-top: 2px; font-size: 11px; color: #96806a; line-height: 1.55; }
.pay-name small b { color: var(--gold-hi); font-size: 11px; }
.pay-values { font: 700 12.5px/1 var(--font-display); color: var(--gold-hi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.combo-list { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.combo-list b { color: var(--gold-hi); }
.pay-note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.pay-note b { color: var(--gold-hi); }
.pay-note.muted { margin-top: 18px; font-size: 11px; color: #7a6250; }

/* ---------- 提示条 ---------- */
/* 放左下角：底部居中会正好压在旋转按钮上 */
.toast {
  position: fixed; z-index: 90;
  left: 20px; bottom: 48px;
  transform: translateY(18px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(30, 10, 12, .96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s, transform .24s;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- 模式氛围 ---------- */
body.free-mode { --line: rgba(232,182,64,.34); }
body.free-mode .machine-frame {
  border-color: var(--gold);
  box-shadow: var(--shadow-lg), 0 0 46px rgba(232,182,64,.22), inset 0 1px 0 rgba(255,224,138,.3);
}
body.free-mode .stage { border-color: rgba(255,224,138,.55); }
body.hold-mode .machine-frame {
  border-color: var(--gold-hi);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(232,182,64,.34);
}

/* 低画质档位（自动降下来的弱机）：关掉所有"一直在跑"的装饰动画。
   这些单看都不贵，但它们每帧都要重绘各自那块区域，叠起来就是掉帧。 */
body.low-fx .jackpot-bar::after,
body.low-fx #fx-vignette,
body.low-fx .mode-dot,
body.low-fx .charge-track.hot .charge-fill,
body.low-fx .charge-track.full .charge-fill,
body.low-fx .streak-row.hot,
body.low-fx .daily-cell.next,
body.low-fx .modal-seal,
body.low-fx .buy-btn.armed { animation: none !important; }
body.low-fx .modal-backdrop { backdrop-filter: none; background: rgba(8,2,3,.92); }

/* 金光扫过提升为独立合成层，旋转/位移就不再反复重绘下面那块 */
.jackpot-bar::after { will-change: transform; }

/* ---------- 减少动效 ---------- */
body.reduced-motion .jackpot-bar::after,
body.reduced-motion .daily-cell.next,
body.reduced-motion .streak-row.hot,
body.reduced-motion .buy-btn.armed,
body.reduced-motion .icon-btn .dot.on,
body.reduced-motion .lantern,
body.reduced-motion .mode-dot,
body.reduced-motion .modal-seal,
body.reduced-motion .charge-fill,
body.reduced-motion .banner-amount,
body.reduced-motion #fx-rays,
body.reduced-motion #fx-vignette,
body.reduced-motion .spin-btn.await,
body.reduced-motion .spin-btn.await::after,
body.reduced-motion .stat b.counting,
body.reduced-motion .feature-card.show .feature-inner,
body.reduced-motion .feature-title { animation: none !important; }
body.reduced-motion * { transition-duration: .08s !important; }

@media (prefers-reduced-motion: reduce) {
  .lantern, .mode-dot, .modal-seal { animation: none; }
}

/* ---------- 桌面：整页不滚动 ----------
   以前这里只是"尽量不出现滚动条"，结果还是会冒出来一根只能滑一点点的：
   震屏是给 .shell 加 transform，而带 transform 的元素会计入文档的滚动溢出，
   一震就撑出几像素；滚动条一出现又占掉宽度、内容重排变高，于是它就赖着不走了。
   现在改成整页锁死 100% 高度，让机台和侧栏各自在剩余空间里收缩，
   真正需要滚的只有侧栏里的「战况」列表。 */
@media (min-width: 1081px) and (min-height: 620px) {
  html, body { height: 100%; overflow: hidden; }
  .shell { height: 100%; min-height: 0; }
  /* 默认的 align-items:start 会让网格项按内容高度收缩，
     那样 .machine 就撑不满，里面 flex:1 的盘面直接塌成 0。 */
  .layout { min-height: 0; align-items: stretch; }

  .machine { min-height: 0; }
  .machine-frame { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  /* 高度改由剩余空间决定，不再用 aspect-ratio 推算 —— 画布本来就能适应任意尺寸 */
  .stage { flex: 1; min-height: 0; aspect-ratio: auto; }

  .sidebar { min-height: 0; overflow: hidden; }
  .panel.grow { min-height: 0; }
  .log-list { max-height: none; flex: 1; }
}

/* 矮屏幕：把纵向留白挤一挤，尽量不出现滚动条 */
@media (min-width: 1081px) and (max-height: 840px) {
  .shell { padding: 10px 20px 12px; gap: 9px; }
  .jackpot-bar { margin: 10px auto 0; padding: 5px 18px; }
  .machine-frame { padding: 12px 14px 8px; }
  .charge-wrap { margin: 10px 2px 8px; }
  .result-line { min-height: 18px; margin: 6px 2px 0; }
  .controls { padding: 9px 14px; gap: 12px; }
  .spin-btn { width: 102px; height: 102px; }
  .log-list { max-height: 120px; }
  .panel { padding: 10px 13px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1460px) {
  /* 机柜居中后两侧余量不够，灯笼会压到面板上 */
  .lantern-layer { display: none; }
}

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .log-list { max-height: 150px; }
}

@media (max-width: 780px) {
  /* 手机上这几样性价比最低：全屏毛玻璃、巨大的固定底纹、飘动灯笼 */
  .modal-backdrop { backdrop-filter: blur(4px); }
  body::before { display: none; }
  .shell { padding: 12px 12px 16px; gap: 10px; }
  .virtual-badge { display: none; }
  .brand-text b { font-size: 16px; letter-spacing: .1em; white-space: nowrap; }
  .brand-seal { width: 38px; height: 38px; font-size: 21px; }
  .topbar { gap: 8px; }
  .level-chip { padding: 4px 8px; gap: 1px 6px; }
  .level-track { width: 46px; }
  .level-xp { display: none; }
  .jackpot-bar { gap: 10px; padding: 6px 12px; }
  .jackpot-hint { display: none; }
  .daily-grid { grid-template-columns: repeat(2, 1fr); }
  .daily-grid .daily-cell:nth-child(7) { grid-column: span 2; }
  .stage { aspect-ratio: 1.42 / 1; max-height: none; }
  .controls {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "stats stats"
      "bet   spin"
      "side  spin";
    gap: 10px;
  }
  .stat-group { grid-area: stats; }
  .bet-group  { grid-area: bet; }
  .spin-btn   { grid-area: spin; width: 104px; height: 104px; }
  .side-group { grid-area: side; grid-template-columns: repeat(2, 1fr); }
  .charge-state { min-width: 0; font-size: 10px; }
  .achievement-list { grid-template-columns: 1fr; }
  .buyin-options { grid-template-columns: 1fr; }
  .buyin-options button { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; text-align: left; padding: 12px 16px; }
  .buyin-options b { font-size: 19px; }
  .buyin-options span { margin: 0; }
  .buyin-options small { grid-column: 2; margin: 0; }
  .modal { padding: 24px 18px 20px; }
  .modal h1 { font-size: 24px; }
  .pay-row { grid-template-columns: 42px minmax(0, 1fr); }
  .pay-values { grid-column: 2; }
}

@media (max-width: 420px) {
  .brand-text small { display: none; }
  .level-track { display: none; }
  .spin-btn { width: 92px; height: 92px; }
  .spin-core b { font-size: 18px; }
  .mini-btn { min-width: 0; padding: 8px 6px; font-size: 11px; }
  .stat b { font-size: 18px; }
}

/* ==================================================================
   双厅：模式切换 / 本地排行榜 / 贵宾厅段位
   ================================================================== */

/* ---- 顶栏模式切换 ---- */
.mode-switch {
  display: inline-flex;
  margin-left: 14px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .34);
}
.mode-switch button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 5px 15px;
  font: 600 12px/1 var(--font-display);
  letter-spacing: .14em;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color .2s, background .25s, box-shadow .25s;
}
.mode-switch button:hover:not(:disabled) { color: var(--gold-hi); }
.mode-switch button:disabled { opacity: .45; cursor: default; }
.mode-switch button.on {
  color: #2a1203;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  box-shadow: 0 0 16px rgba(255, 224, 138, .45);
}
body.party-mode .mode-switch button.on {
  color: #2d0414;
  background: linear-gradient(180deg, #ffd9f2, #ff5fb0);
  box-shadow: 0 0 20px rgba(255, 95, 176, .6);
}

.mode-tag {
  margin: -4px 0 10px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ---- 固定买入 ---- */
.buyin-amount {
  margin: 10px 0 6px;
  font: 800 44px/1 var(--font-display);
  letter-spacing: .04em;
  color: var(--gold-hi);
  text-shadow: 0 0 28px rgba(255, 224, 138, .55), 0 3px 0 rgba(0, 0, 0, .5);
}

/* ---- 本地排行榜 ---- */
.board-list { display: flex; flex-direction: column; gap: 5px; }
.board-empty { font-size: 12px; line-height: 1.6; color: var(--muted); }
.board-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(0, 0, 0, .26);
}
.board-row .board-rank {
  font: 700 13px/1 var(--font-display);
  text-align: center;
  color: var(--muted);
}
.board-row.top .board-rank { color: var(--gold-hi); }
.board-row.top:nth-child(1) .board-rank { font-size: 15px; text-shadow: 0 0 12px rgba(255, 224, 138, .8); }
.board-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.board-main b { font: 700 14px/1.1 var(--font-display); color: var(--text); }
.board-row.top .board-main b { color: var(--gold-hi); }
.board-main small { font-size: 10px; color: var(--muted); }
.board-date { font-size: 10px; color: var(--muted); }
.board-row.fresh {
  border-color: var(--line-strong);
  background: rgba(232, 182, 64, .12);
  animation: board-pop .9s cubic-bezier(.2, 1.3, .3, 1);
}
@keyframes board-pop {
  0% { transform: scale(.94); box-shadow: 0 0 0 rgba(255, 224, 138, 0); }
  40% { transform: scale(1.03); box-shadow: 0 0 26px rgba(255, 224, 138, .55); }
}

/* ---- 贵宾厅段位 ---- */
.level-chip { --vip: var(--gold); border-color: color-mix(in srgb, var(--vip) 46%, transparent); }
.level-num { display: flex; flex-direction: column; gap: 1px; }
.level-num b { font: 700 13px/1 var(--font-display); letter-spacing: .06em; color: var(--vip); }
.level-num small { font-size: 9px; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.level-num small i { font-style: normal; color: var(--text-dim); }

.vip-modal { max-width: 460px; }
.vip-card {
  --vip: var(--gold);
  position: relative;
  margin: 14px 0 16px;
  padding: 16px 18px 14px;
  border: 1px solid color-mix(in srgb, var(--vip) 55%, transparent);
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 140% at 110% -30%, color-mix(in srgb, var(--vip) 42%, transparent), transparent 62%),
    linear-gradient(135deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .22));
  box-shadow: 0 10px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1);
}
/* 卡面斜向高光：土气的关键就在这道光 */
.vip-card::after {
  content: "";
  position: absolute;
  inset: -40% -10%;
  background: linear-gradient(104deg, transparent 38%, rgba(255, 255, 255, .20) 48%, transparent 58%);
  animation: vip-sheen 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes vip-sheen {
  0%, 62% { transform: translateX(-55%); }
  100% { transform: translateX(55%); }
}
.vip-card-top { display: flex; justify-content: space-between; align-items: baseline; }
.vip-card-brand { font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.vip-card-lv { font-size: 11px; color: var(--text-dim); }
.vip-card-lv b { color: var(--vip); font-size: 14px; }
.vip-card-name {
  margin: 10px 0 2px;
  font: 800 34px/1.1 var(--font-display);
  letter-spacing: .12em;
  color: var(--vip);
  text-shadow: 0 0 26px color-mix(in srgb, var(--vip) 62%, transparent), 0 2px 0 rgba(0, 0, 0, .6);
}
.vip-card-perk { font-size: 12px; color: var(--text-dim); }
.vip-card-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px; padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, .14);
  font-size: 11px; color: var(--muted);
}
.vip-card-foot b { font: 700 15px/1 var(--font-display); color: var(--text); }

.vip-progress { margin-bottom: 14px; }
.vip-progress-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); }
.vip-progress-top b { color: var(--gold-hi); }
.vip-track {
  height: 7px; margin: 7px 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  overflow: hidden;
}
.vip-track i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
  box-shadow: 0 0 14px rgba(255, 224, 138, .55);
  transition: width .5s cubic-bezier(.2, .9, .3, 1);
}
.vip-progress-foot { font-size: 11px; color: var(--muted); }

.vip-ladder {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 232px; overflow: auto;
  padding: 8px; margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .28);
}
.vip-rung {
  display: grid;
  grid-template-columns: 10px 76px auto 1fr;
  align-items: center;
  gap: 9px;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 11px;
  color: var(--muted);
}
.vip-rung-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--vip); opacity: .4;
}
.vip-rung-name { font: 600 12px/1 var(--font-display); letter-spacing: .06em; }
.vip-rung-lv { font-size: 10px; opacity: .7; }
.vip-rung-perk { text-align: right; font-size: 10px; opacity: .72; }
.vip-rung.past { color: var(--text-dim); }
.vip-rung.past .vip-rung-dot { opacity: .85; }
.vip-rung.now {
  color: var(--text);
  background: color-mix(in srgb, var(--vip) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vip) 44%, transparent);
}
.vip-rung.now .vip-rung-name { color: var(--vip); }
.vip-rung.now .vip-rung-dot { opacity: 1; box-shadow: 0 0 10px var(--vip); }

@media (max-width: 720px) {
  .mode-switch { margin-left: 8px; }
  .mode-switch button { padding: 4px 10px; font-size: 11px; letter-spacing: .08em; }
  .vip-rung { grid-template-columns: 10px 70px auto; }
  .vip-rung-perk { display: none; }
}

/* ==================================================================
   娱乐模式：霓虹紫金 + 滚雪球 / 金龙狂暴 HUD
   ================================================================== */

/* 整体换一套更艳的底色。只改变量，不碰任何布局。 */
body.party-mode {
  --gold:       #ffc93c;
  --gold-hi:    #fff4b0;
  --vermilion:  #e01a5a;
  --vermilion-hi:#ff5f9e;
  --jade:       #7a3cff;
  --jade-hi:    #c89bff;
  --line:        rgba(255, 201, 60, .26);
  --line-strong: rgba(255, 95, 158, .55);
  background-image:
    radial-gradient(ellipse 72% 52% at 50% -8%, rgba(224, 26, 90, .38), transparent 60%),
    radial-gradient(ellipse 52% 42% at 10% 86%, rgba(122, 60, 255, .26), transparent 66%),
    radial-gradient(ellipse 52% 42% at 90% 92%, rgba(255, 201, 60, .18), transparent 66%),
    linear-gradient(170deg, #260a26 0%, #160715 46%, #1d0818 100%);
}
body.party-mode .brand-text small::after { content: " · 不讲道理"; color: var(--vermilion-hi); }

/* 狂暴期间整屏压一层红，并且持续轻微搏动 */
body.rampage-mode .shell { animation: rampage-pulse 1.05s ease-in-out infinite; }
@keyframes rampage-pulse {
  50% { filter: saturate(1.3) brightness(1.08); }
}
body.rampage-mode::after {
  content: "";
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(255, 60, 40, .26) 100%);
  animation: rampage-breathe 1.05s ease-in-out infinite;
}
@keyframes rampage-breathe { 50% { opacity: .45; } }

/* ---- 娱乐模式 HUD 条 ---- */
.party-bar {
  display: none;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 0 2px;
}
.party-bar.on { display: flex; }

.snow-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .34);
  transition: box-shadow .3s, border-color .3s;
}
.snow-meter.hot {
  border-color: rgba(127, 231, 255, .6);
  box-shadow: 0 0 20px rgba(127, 231, 255, .35);
}
.snow-meter.bump { animation: snow-bump .55s cubic-bezier(.2, 1.4, .3, 1); }
@keyframes snow-bump { 35% { transform: scale(1.09); } }
.snow-meter.drop { animation: snow-drop .45s ease-out; }
@keyframes snow-drop {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); filter: grayscale(.8); }
  60% { transform: translateX(3px); }
}
.snow-label { font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.snow-steps { display: flex; gap: 3px; }
.snow-steps i {
  display: block;
  width: 16px; height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .11);
  transition: background .28s, box-shadow .28s;
}
.snow-steps i.on {
  background: linear-gradient(90deg, #7fe7ff, #c89bff);
  box-shadow: 0 0 10px rgba(127, 231, 255, .8);
}
.snow-now { font: 700 13px/1 var(--font-display); color: var(--gold-hi); min-width: 26px; }

.rampage-chip {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  font-size: 11px;
  color: #ffe6d8;
  background: linear-gradient(100deg, rgba(224, 26, 40, .9), rgba(255, 122, 74, .55));
  box-shadow: 0 0 22px rgba(255, 90, 60, .55);
  animation: rampage-chip-pulse .9s ease-in-out infinite;
}
.rampage-chip.on { display: inline-flex; }
.rampage-chip b { font: 700 14px/1 var(--font-display); color: #fff; }
.rampage-ico {
  display: grid; place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  font: 700 12px/1 var(--font-display);
  color: #5a1008;
  background: linear-gradient(180deg, #ffe08a, #ffab3c);
}
@keyframes rampage-chip-pulse {
  50% { box-shadow: 0 0 34px rgba(255, 120, 70, .9); }
}

.build-note { display: flex; align-items: baseline; gap: 4px; }
.build-note b { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.build-note .link-btn { margin: 0; font-size: 11px; }

/* ---- 入座页选厅 ---- */
.hall-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 12px;
}
.hall-picker button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 13px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  color: var(--text-dim);
  background: rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: border-color .22s, background .22s, box-shadow .22s, transform .18s;
}
.hall-picker button:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.hall-picker button b { font: 700 16px/1.2 var(--font-display); letter-spacing: .06em; color: var(--text); }
.hall-picker button small { font-size: 11px; line-height: 1.4; color: var(--muted); }
.hall-picker button em {
  font-style: normal; font-size: 10px; letter-spacing: .1em;
  color: var(--muted); opacity: .8;
}
.hall-amount {
  margin-top: 7px;
  font: 800 20px/1 var(--font-display);
  color: var(--gold-hi);
}
.hall-picker button.on {
  border-color: var(--gold);
  background: linear-gradient(170deg, rgba(232, 182, 64, .16), rgba(0, 0, 0, .34));
  box-shadow: 0 0 24px rgba(232, 182, 64, .25), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.hall-picker button.on b { color: var(--gold-hi); }
/* 第二张卡是娱乐厅：选中时换成霓虹粉，和厅内配色对上 */
.hall-picker button[data-mode="party"].on {
  border-color: #ff5f9e;
  background: linear-gradient(170deg, rgba(255, 95, 158, .18), rgba(0, 0, 0, .34));
  box-shadow: 0 0 26px rgba(255, 95, 158, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.hall-picker button[data-mode="party"].on b,
.hall-picker button[data-mode="party"].on .hall-amount { color: #ffd9f2; }
.hall-picker button.poor { opacity: .55; }
.hall-picker button.poor .hall-amount { color: var(--muted); text-decoration: line-through; }

/* 顶栏换厅的二次确认 */
.mode-switch button.armed {
  color: #2d0404;
  background: linear-gradient(180deg, #ff9a6a, #e8553c);
  box-shadow: 0 0 18px rgba(255, 110, 70, .7);
  animation: hall-armed 1s ease-in-out infinite;
}
@keyframes hall-armed { 50% { box-shadow: 0 0 28px rgba(255, 140, 90, .95); } }

/* ==================================================================
   手机端顶栏：必须塞得下，否则整页被"缩放以适应"
   ------------------------------------------------------------------
   顶栏一旦横向溢出，移动端 Chrome 会把布局视口撑宽到内容宽度
   （实测 375px 的机器被撑到 460px），于是整页等比缩小、顶上那一排
   怎么也看不全。加了换厅按钮之后就触发了这个，所以这里按
   780 / 560 / 400 三档逐级做减法，目标是 360px 也不溢出。
   ================================================================== */
@media (max-width: 780px) {
  .topbar { gap: 6px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-text b { overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
  .mode-switch { margin-left: 4px; padding: 2px; flex: none; }
  .mode-switch button { padding: 5px 11px; font-size: 11px; letter-spacing: .06em; }
}

@media (max-width: 560px) {
  /* 「243 WAYS · 虚拟金币」这行副标题先走，它只是装饰 */
  .brand-text small { display: none; }
  .level-track { display: none; }
  .level-chip { padding: 4px 9px; }
  .icon-btn { width: 32px; height: 32px; }
  .mode-switch button { padding: 5px 9px; }
}

@media (max-width: 400px) {
  /* 到这一档只留印章：「金龙聚宝」四个字换厅按钮更重要 */
  .brand-text { display: none; }
  .brand-seal { width: 34px; height: 34px; font-size: 19px; }
  .shell { padding: 10px 10px 14px; }
  .topbar-right { gap: 4px; }
  .icon-btn { width: 30px; height: 30px; }
  .mode-switch { margin-left: 0; }
  .mode-switch button { padding: 5px 8px; font-size: 10px; letter-spacing: 0; }
  .level-chip { padding: 4px 7px; }
  .level-num b { font-size: 11px; }
  .hall-picker { grid-template-columns: 1fr; gap: 8px; }
  .hall-picker button { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .hall-picker button small { flex: 1 1 100%; }
  .hall-amount { margin-top: 0; margin-left: auto; font-size: 18px; }
  .party-bar { gap: 8px; }
  .snow-label { display: none; }
}

/* ==================================================================
   大奖结算 CG
   ------------------------------------------------------------------
   和 .banner / .feature-card 的区别：那两个是"演出"，几秒自动收掉，
   自动旋转会直接碾过去 —— 单笔赢几百万一闪而过。这个是"结算"：
   接管整屏、停掉自动旋转、数字慢慢滚上去，然后**等玩家自己按**。
   z-index 60 压在特写(53)之上、弹窗(80)之下。
   ================================================================== */
.cg {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s;
}
.cg.show { opacity: 1; pointer-events: auto; }
.cg::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 46%, rgba(10, 2, 3, .94) 18%, rgba(8, 2, 3, .88) 55%, rgba(6, 1, 2, .8) 100%);
}

/* 背后缓慢旋转的放射光。
 * 尺寸必须贴着视口（inset 负值），不能用 190vmax 这种大方块 ——
 * mask 的百分比是按元素自身算的，方块一大，渐变的收口就跑到屏幕外面去了，
 * 屏幕里只剩几道硬邦邦的直角光带（实测就是这个效果，很难看）。 */
.cg-rays {
  position: absolute;
  inset: -10vmax;
  opacity: 0;
  background: repeating-conic-gradient(from 0deg at 50% 46%,
    rgba(255, 214, 120, .26) 0deg 5deg, transparent 5deg 15deg);
  mask-image: radial-gradient(circle at 50% 46%, #000 6%, transparent 58%);
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 6%, transparent 58%);
  transition: opacity .6s;
}
.cg.show .cg-rays { opacity: 1; animation: cg-spin 24s linear infinite; }
@keyframes cg-spin { to { transform: rotate(360deg); } }

.cg-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 24px;
  text-align: center;
}

.cg-kicker {
  font-size: 12px;
  letter-spacing: .34em;
  text-indent: .34em;
  color: var(--gold);
  opacity: .9;
}
.cg-title {
  font: 800 clamp(30px, 7.4vw, 62px)/1.1 var(--font-display);
  letter-spacing: .14em;
  color: var(--gold-hi);
  text-shadow:
    0 0 36px rgba(255, 208, 110, .9),
    0 0 90px rgba(255, 140, 50, .55),
    0 4px 0 rgba(0, 0, 0, .55);
}
.cg.show .cg-title { animation: cg-slam .72s cubic-bezier(.1, 1.35, .3, 1) both; }
@keyframes cg-slam {
  0%   { opacity: 0; transform: scale(2.6) rotate(-5deg); filter: blur(16px); }
  62%  { opacity: 1; transform: scale(.94); filter: blur(0); }
  100% { transform: scale(1); }
}

.cg-amount {
  margin-top: 4px;
  font: 800 clamp(40px, 11.5vw, 104px)/1 var(--font-display);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: #fff8e2;
  text-shadow:
    0 0 28px rgba(255, 236, 180, .95),
    0 0 76px rgba(255, 170, 60, .6),
    0 5px 0 rgba(90, 30, 0, .5);
}
/* 数字还在滚的时候持续轻微搏动，停下来才定住 */
.cg.counting .cg-amount { animation: cg-throb .34s ease-in-out infinite; }
@keyframes cg-throb { 50% { transform: scale(1.035); } }
.cg.landed .cg-amount { animation: cg-land .6s cubic-bezier(.2, 1.5, .3, 1); }
@keyframes cg-land { 32% { transform: scale(1.14); } }

.cg-mult {
  font: 700 clamp(14px, 3.4vw, 22px)/1 var(--font-display);
  letter-spacing: .12em;
  color: var(--gold);
}
.cg-lines {
  max-width: min(92vw, 560px);
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
  opacity: .9;
}

.cg-go {
  margin-top: 20px;
  padding: 13px 46px;
  border: 1px solid rgba(255, 224, 138, .7);
  border-radius: 999px;
  font: 700 17px/1 var(--font-display);
  letter-spacing: .3em;
  text-indent: .3em;
  color: #3a1a02;
  background: linear-gradient(180deg, #ffeeb4, var(--gold) 55%, #c98f1e);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 36px rgba(255, 208, 110, .45);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .34s, transform .34s, box-shadow .22s;
}
.cg.ready .cg-go {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  animation: cg-go-pulse 1.5s ease-in-out infinite;
}
@keyframes cg-go-pulse {
  50% { box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 58px rgba(255, 224, 138, .85); }
}
.cg-go:active, .cg-go.pressed { transform: translateY(3px) scale(.97); }

.cg-hint {
  margin-top: 9px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  opacity: 0;
  transition: opacity .4s;
}
.cg.ready .cg-hint { opacity: .85; }

/* 彩金那一档换成更烫的红金 */
.cg.tier-grand .cg-title,
.cg.tier-legend .cg-title { color: #fff; text-shadow: 0 0 40px #ffd36a, 0 0 110px #ff5a2a, 0 4px 0 rgba(0,0,0,.55); }
.cg.tier-grand::before,
.cg.tier-legend::before {
  background: radial-gradient(ellipse 70% 55% at 50% 46%, rgba(26, 2, 2, .94) 18%, rgba(14, 1, 2, .9) 55%, rgba(8, 0, 1, .82) 100%);
}
.cg.tier-grand .cg-rays, .cg.tier-legend .cg-rays { filter: hue-rotate(-14deg) saturate(1.4); }

body.party-mode .cg-rays { filter: hue-rotate(-28deg) saturate(1.3); }

body.reduced-motion .cg-rays { animation: none; }
body.reduced-motion .cg.counting .cg-amount { animation: none; }

@media (max-width: 480px) {
  .cg-go { padding: 12px 34px; font-size: 15px; }
  .cg-lines { font-size: 11px; }
}

/* CG 开着的时候把金币暴雨抬到遮罩之上 —— 不然几百颗金币全被压在
 * 那层黑底下面，只剩一点点影子，白白浪费了最该有排面的一下。 */
body.cg-open #fx-canvas { z-index: 61; }
