/* Jackpot Master — lobby + 4 slot games. Portrait stage of 700 logical units wide (u). */
:root {
  --gold: #ffd54a; --gold2: #fff3b0; --accent: #ffb02e; --frame: #3b1650;
  --vh: 100dvh;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
@supports not (height: 100dvh) { :root { --vh: 100vh; } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0517; color: #fff; overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { -webkit-user-drag: none; user-select: none; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

.screen { position: fixed; inset: 0; }

/* ---------- login ---------- */
.login { display: grid; grid-template-rows: 1fr auto; justify-items: center; padding: calc(env(safe-area-inset-top) + 8vh) 24px calc(env(safe-area-inset-bottom) + 7vh);
  background: radial-gradient(120% 80% at 50% 30%, #6a2bb8 0%, #2a0c55 45%, #0b0517 80%); }
.login::before { content: none; } /* platform login screen (not used by a cabinet): CDN lobby art removed */
.login > * { position: relative; }
.login-logo { width: min(86vw, 560px); align-self: center; filter: drop-shadow(0 10px 20px rgba(0,0,0,.6)); animation: bob 3s ease-in-out infinite; }
.login-actions { display: grid; justify-items: center; gap: 14px; }
.img-btn img { display: block; width: min(64vw, 300px); transition: transform .12s; }
.img-btn:active img { transform: scale(.95); }
.login-note { margin: 0; font-size: 12px; color: #d8c6ff; opacity: .8; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- loading ---------- */
.loading { background: #0b0517; display: grid; }
.loading-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.85); }
.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(5,0,15,.9)); }
.loading-bottom { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 6vh); z-index: 1; display: grid; justify-items: center; gap: 12px; }
.loading-title { width: min(72vw, 420px); }
.bar { width: min(78vw, 440px); height: 18px; border-radius: 99px; background: #26103f; border: 2px solid #d6a23a; overflow: hidden; box-shadow: 0 0 12px rgba(0,0,0,.6) inset; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #ffe06a, #f39a12); transition: width .25s; }
#loading-text { margin: 0; font-size: 13px; color: #f0e2ff; }

/* ---------- lobby ---------- */
.lobby { display: grid; grid-template-rows: auto 1fr; background: radial-gradient(100% 60% at 50% 0%, #4b1d8c, #160733 55%, #0b0517); }
.lobby-top { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 12px 10px; background: linear-gradient(180deg, #2c0f57, #1a0838); border-bottom: 2px solid #b17bff44; box-shadow: 0 4px 18px rgba(0,0,0,.5); z-index: 2; }
.profile-chip { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: radial-gradient(circle at 35% 30%, #ffe08a, #e08a00); border: 2px solid #fff3; flex: none; }
.profile-chip b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.lv { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #ffe27a; }
.lv i, .g-level i { display: block; width: 64px; height: 7px; border-radius: 9px; background: #0006; overflow: hidden; }
.lv i b, .g-level i b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6cf, #3ef); transition: width .4s; }
.coin-chip { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 4px; border-radius: 99px; background: #0007; border: 2px solid #e2a83c; flex: 1; max-width: 220px; margin-left: auto; }
.brand-cn { position: absolute; width: 360px; height: auto; transform: translate(-50%, -50%); pointer-events: none; filter: drop-shadow(0 3px 4px rgba(40,0,60,.55)); }
html:not([data-lang="zh"]) .brand-cn { display: none; }
.coin-ico { width: 28px; height: 28px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff6b5, #ffc21a 45%, #b36a00); box-shadow: inset 0 0 0 3px #e08d00; }
.coin-chip strong { font-size: 17px; color: var(--gold2); font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 #6b3500; letter-spacing: .02em; }
.coin-chip.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.08); } }
.daily-btn { height: 40px; padding: 0 10px; border-radius: 12px; display: flex; align-items: center; gap: 4px; background: linear-gradient(180deg, #4ed14b, #1c7a1a); border: 2px solid #c8ff8a; font-size: 18px; }
.daily-btn span { font-size: 11px; font-weight: 800; }
.daily-btn:not(:disabled) { animation: glow 1.6s infinite; }
.daily-btn:disabled { filter: grayscale(.9); animation: none; }
@keyframes glow { 50% { box-shadow: 0 0 16px #b9ff7a; } }
.round-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 800; background: linear-gradient(180deg, #6b3cc4, #3a1878); border: 2px solid #c9a6ff; box-shadow: 0 3px 0 #1a0838; }
.round-btn:active { transform: translateY(2px); box-shadow: none; }

.lobby-main { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px calc(env(safe-area-inset-bottom) + 20px); }
.featured { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 1100px; margin: 0 auto 14px; }
.lobby-tabs { position: sticky; top: -12px; z-index: 1; display: flex; gap: 8px; align-items: center; max-width: 1100px; margin: 0 auto 12px; padding: 8px 0; background: linear-gradient(180deg, #170735 70%, transparent); }
.tab { padding: 7px 14px; border-radius: 99px; background: #ffffff14; border: 1px solid #ffffff22; font-size: 13px; white-space: nowrap; }
.tab.active { background: linear-gradient(180deg, #ffcf4a, #e98a00); color: #3a1600; font-weight: 800; border-color: #fff6; }
#lobby-search { flex: 1; min-width: 80px; height: 34px; border-radius: 99px; border: 1px solid #ffffff33; background: #0006; color: #fff; padding: 0 14px; font: inherit; font-size: 13px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(30vw, 150px), 1fr)); gap: 10px; max-width: 1100px; margin: 0 auto; }
.card { position: relative; aspect-ratio: 3 / 3.6; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #3b1a6e, #1a0a35); display: grid; place-items: center; isolation: isolate; content-visibility: auto; contain-intrinsic-size: 150px 180px; }
.card img { width: 96%; height: 96%; object-fit: contain; transition: transform .25s; }
.card.icon img { object-fit: cover; width: 100%; height: 100%; }
.card:hover img { transform: scale(1.04); }
.card .name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 6px; font-size: 11px; font-weight: 700; text-align: center; background: linear-gradient(transparent, #000c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.soon img { filter: saturate(.75) brightness(.8); }
.card.soon::after { content: "COMING SOON"; position: absolute; top: 8px; right: -30px; rotate: 35deg; padding: 2px 30px; font-size: 9px; font-weight: 900; letter-spacing: .05em; background: #000a; color: #ffd66b; }
.card.play { outline: 3px solid #ffd54a; box-shadow: 0 0 18px #ffb02e88; }
.card.play::after { content: "PLAY"; position: absolute; top: 8px; left: 8px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 900; background: linear-gradient(180deg, #5df05a, #1d8f1b); color: #fff; box-shadow: 0 2px 6px #0008; }
.featured .card { aspect-ratio: 3 / 3.8; }
.featured .card .name { font-size: 12px; }
.card.big canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (max-width: 520px) { .featured { grid-template-columns: repeat(2, 1fr); } }

/* ---------- game stage ---------- */
.game { display: grid; place-items: center; background: #050208; }
.game::before { content: ""; position: absolute; inset: -40px; background: var(--bg) center / cover no-repeat; filter: blur(22px) brightness(.4); }
.stage { --s: min(100vw, calc(var(--vh) * 0.62)); --u: calc(var(--s) / 700); position: relative; width: var(--s); height: var(--vh); overflow: hidden; background: #000 var(--bg) center 30% / cover no-repeat; box-shadow: 0 0 60px #000; font-size: calc(var(--u) * 22); transition: background-image .4s; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 18%, transparent 62%, rgba(0,0,0,.85)); z-index: 0; }
.stage > * { position: absolute; z-index: 1; }
.g-top { top: calc(env(safe-area-inset-top) + var(--u) * 12); left: calc(var(--u) * 14); right: calc(var(--u) * 14); display: flex; align-items: center; gap: calc(var(--u) * 10); z-index: 6; }
.g-top .round-btn { width: calc(var(--u) * 58); height: calc(var(--u) * 58); font-size: calc(var(--u) * 28); }
.g-top .coin-chip { height: calc(var(--u) * 54); max-width: calc(var(--u) * 260); margin-left: 0; }
.g-top .coin-chip strong { font-size: calc(var(--u) * 26); }
.g-top .coin-ico { width: calc(var(--u) * 40); height: calc(var(--u) * 40); }
.g-level { margin-left: auto; display: grid; gap: 3px; font-size: calc(var(--u) * 18); color: #ffe27a; font-weight: 800; }
.g-level i { width: calc(var(--u) * 100); }
.g-logo { top: calc(env(safe-area-inset-top) + var(--u) * 82); left: 50%; translate: -50% 0; width: calc(var(--u) * 300); max-height: calc(var(--u) * 140); object-fit: contain; filter: drop-shadow(0 6px 10px #000a); animation: bob 3.2s ease-in-out infinite; }
.g-jackpots { top: calc(env(safe-area-inset-top) + var(--u) * 222); left: calc(var(--u) * 22); right: calc(var(--u) * 22); display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--u) * 8); }
.jp { position: relative; height: calc(var(--u) * 74); border-radius: calc(var(--u) * 14); display: grid; justify-items: center; align-content: center; gap: 2px; background: linear-gradient(180deg, #0009, #000c); border: calc(var(--u) * 3) solid var(--c, #ffd54a); box-shadow: 0 0 calc(var(--u) * 14) var(--c, #ffd54a) inset, 0 calc(var(--u) * 3) 0 #0009; }
.jp img { height: calc(var(--u) * 30); max-width: 92%; object-fit: contain; }
.jp strong { font-size: calc(var(--u) * 22); color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 #000; }
.jp-grand { --c: #ff4a3a; } .jp-major { --c: #d34bff; } .jp-minor { --c: #3aa0ff; } .jp-mini { --c: #4ade4a; }
.jp.hit { animation: jpHit .2s 12 alternate; }
@keyframes jpHit { to { filter: brightness(2); transform: scale(1.06); } }
.g-meter { top: calc(env(safe-area-inset-top) + var(--u) * 304); left: calc(var(--u) * 40); right: calc(var(--u) * 40); height: calc(var(--u) * 40); display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 10); font-size: calc(var(--u) * 18); font-weight: 800; color: #ffe9a6; text-shadow: 0 2px 0 #000; }
.g-meter:empty { display: none; }
.trail { flex: 1; height: calc(var(--u) * 22); border-radius: 99px; background: #0009; border: 2px solid #e2a83c; overflow: hidden; position: relative; }
.trail b { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ffb02e, #ffe86a); transition: width .5s; }
.trail-pips { display: flex; gap: 4px; }
.trail-pips span { width: calc(var(--u) * 22); height: calc(var(--u) * 22); border-radius: 50%; background: #0008; border: 2px solid #e2a83c; }
.trail-pips span.on { background: radial-gradient(#fff6b5, #ff9a00); box-shadow: 0 0 8px #ffb02e; }
.mult-row { display: flex; gap: calc(var(--u) * 8); }
.mult-row span { min-width: calc(var(--u) * 56); text-align: center; padding: 2px 6px; border-radius: 8px; background: #6a1aa0; border: 2px solid #ff9cf0; }

.g-board-area { top: calc(env(safe-area-inset-top) + var(--u) * 350); left: calc(var(--u) * 8); right: calc(var(--u) * 8); bottom: calc(env(safe-area-inset-bottom) + var(--u) * 230); display: grid; place-items: center; }
.board-frame { position: relative; display: grid; gap: calc(var(--u) * 10); justify-content: center; align-content: center; width: 100%; height: 100%; }
.stage.tall .g-logo { width: calc(var(--u) * 360); max-height: calc(var(--u) * 170); }
.board { --cw: 120px; --ch: 100px; position: relative; display: grid; grid-template-columns: repeat(5, var(--cw)); gap: 0 calc(var(--cw) * .04); padding: calc(var(--cw) * .08); border-radius: calc(var(--cw) * .16); background: linear-gradient(180deg, color-mix(in srgb, var(--frame) 70%, #000c), #000d); border: calc(var(--cw) * .045) solid var(--accent); box-shadow: 0 0 calc(var(--cw) * .3) color-mix(in srgb, var(--accent) 60%, transparent), inset 0 0 calc(var(--cw) * .3) #000; }
.reel { position: relative; width: var(--cw); height: calc(var(--ch) * var(--rows)); overflow: hidden; border-radius: calc(var(--cw) * .06); background: linear-gradient(90deg, #ffffff06, #ffffff10, #ffffff06); }
.strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.sym { position: relative; width: var(--cw); height: var(--ch); display: grid; place-items: center; }
.sym img { width: 94%; height: 94%; object-fit: contain; pointer-events: none; }
.sym.blur img { filter: blur(1.5px) brightness(1.1); }
.sym .val, .hold .val { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; font-weight: 900; font-size: calc(var(--cw) * .17); color: #fff; text-shadow: 0 0 4px #000, 0 2px 0 #000; pointer-events: none; }
.sym .val.jp, .hold .val.jp { color: #ffe36a; font-size: calc(var(--cw) * .15); }
.sym .tag { position: absolute; top: 6%; right: 6%; padding: 0 5px; border-radius: 6px; font-size: calc(var(--cw) * .13); font-weight: 900; background: #d21; color: #fff; box-shadow: 0 1px 3px #000; }
.sym.win { z-index: 2; animation: symWin .5s ease-in-out infinite alternate; }
.sym.win::before { content: ""; position: absolute; inset: 3%; border-radius: 12%; border: calc(var(--cw) * .035) solid var(--line, #ffe14a); box-shadow: 0 0 12px var(--line, #ffe14a), inset 0 0 12px var(--line, #ffe14a); }
.sym.dim { opacity: .38; filter: grayscale(.4); transition: opacity .2s; }
.sym.land { animation: land .32s ease-out; }
.sym.pop { animation: pop .5s ease-out; }
@keyframes symWin { to { transform: scale(1.08); } }
@keyframes land { 0% { transform: translateY(-8%); } 60% { transform: translateY(4%); } 100% { transform: none; } }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.lines-svg { position: absolute; inset: calc(var(--cw) * .08); pointer-events: none; overflow: visible; z-index: 3; }
.lines-svg polyline { fill: none; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 4px #000); }
.board.small { gap: 0 calc(var(--cw) * .03); }

/* respin / hold grid */
.hold { display: grid; grid-template-columns: repeat(5, var(--cw)); grid-auto-rows: var(--ch); gap: calc(var(--cw) * .04); }
.hold .cell { position: relative; border-radius: calc(var(--cw) * .1); background: radial-gradient(circle, #ffffff12, #0007); border: 1px solid #ffffff1c; display: grid; place-items: center; overflow: hidden; }
.hold .cell img { width: 92%; height: 92%; object-fit: contain; }
.hold .val { bottom: auto; top: 50%; translate: 0 -50%; font-size: calc(var(--cw) * .2); }
.hold .val.jp { font-size: calc(var(--cw) * .17); }
.hold .cell.spin::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 10%, #ffffff10 10% 20%); animation: scroll .25s linear infinite; }
.hold .cell.hl { box-shadow: 0 0 0 3px #ffe14a inset, 0 0 16px #ffe14a; }
.hold .cell.row-mult { box-shadow: 0 0 0 3px #ff6af0 inset; }
@keyframes scroll { to { background-position: 0 calc(var(--ch)); } }
.spins-left { position: absolute; top: calc(var(--cw) * -0.5); left: 50%; translate: -50% 0; padding: 4px 18px; border-radius: 99px; background: #000c; border: 2px solid var(--accent); font-weight: 900; font-size: calc(var(--cw) * .2); white-space: nowrap; z-index: 4; }
.spins-left b { color: #ffe14a; font-size: 1.3em; }

.g-banner { left: 50%; bottom: calc(env(safe-area-inset-bottom) + var(--u) * 168); translate: -50% 0; min-width: calc(var(--u) * 360); max-width: calc(var(--u) * 640); padding: calc(var(--u) * 6) calc(var(--u) * 22); border-radius: 99px; text-align: center; font-size: calc(var(--u) * 20); font-weight: 800; background: #000b; border: 2px solid #ffffff2a; color: #ffeec0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-banner.tip { white-space: normal; font-size: calc(var(--u) * 16); font-weight: 600; line-height: 1.35; border-radius: calc(var(--u) * 18); max-width: calc(var(--u) * 600); }
.g-banner.win { color: #fff; background: linear-gradient(90deg, #6b1a00cc, #c25a00ee, #6b1a00cc); border-color: #ffd54a; }

.g-controls { left: calc(var(--u) * 18); right: calc(var(--u) * 18); bottom: calc(env(safe-area-inset-bottom) + var(--u) * 24); height: calc(var(--u) * 132); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: calc(var(--u) * 14); z-index: 5; }
.bet-box, .win-box { height: calc(var(--u) * 92); border-radius: calc(var(--u) * 20); background: linear-gradient(180deg, #1c0b33ee, #0b0418ee); border: calc(var(--u) * 3) solid #8c5ad6; display: flex; align-items: center; justify-content: center; text-align: center; }
.bet-box > div, .win-box { display: grid; flex: 1; }
.bet-box small, .win-box small { font-size: calc(var(--u) * 15); color: #c9b2ff; font-weight: 700; letter-spacing: .08em; }
.bet-box strong, .win-box strong { font-size: calc(var(--u) * 30); color: var(--gold2); font-variant-numeric: tabular-nums; }
.bet-box button { width: calc(var(--u) * 56); height: 100%; font-size: calc(var(--u) * 40); font-weight: 900; color: #ffd54a; }
.win-box strong.pulse { animation: bump .4s; color: #fff; }
.spin-btn { width: calc(var(--u) * 152); height: calc(var(--u) * 152); border-radius: 50%; display: grid; place-content: center; background: radial-gradient(circle at 50% 35%, #8dff6a, #27b51f 55%, #0d6a0a); border: calc(var(--u) * 6) solid #e8ffb5; box-shadow: 0 calc(var(--u) * 7) 0 #0a4207, 0 0 calc(var(--u) * 26) #6aff4a99; font-weight: 900; text-shadow: 0 3px 0 #0a4a07; transition: transform .08s; touch-action: manipulation; }
.spin-btn span { font-size: calc(var(--u) * 40); letter-spacing: .04em; }
.spin-btn small { font-size: calc(var(--u) * 14); opacity: .85; }
.spin-btn:active:not(:disabled) { transform: translateY(calc(var(--u) * 5)); box-shadow: 0 calc(var(--u) * 2) 0 #0a4207; }
.spin-btn.auto { background: radial-gradient(circle at 50% 35%, #ffd36a, #ff8a00 55%, #a14a00); border-color: #ffe7b0; box-shadow: 0 calc(var(--u) * 7) 0 #6a2a00, 0 0 calc(var(--u) * 26) #ffb02e; }
.spin-btn:disabled { filter: grayscale(.4) brightness(.8); opacity: 1; }
.auto-btn { right: calc(var(--u) * 26); bottom: calc(env(safe-area-inset-bottom) + var(--u) * 166); padding: calc(var(--u) * 6) calc(var(--u) * 16); border-radius: 99px; font-size: calc(var(--u) * 16); font-weight: 900; background: #000a; border: 2px solid #ffffff3a; z-index: 5; }
.auto-btn.on { background: #ff8a00; border-color: #ffe7b0; }

/* overlays (big win, feature intro/summary, jackpot, wheel, pick) */
.overlay { inset: 0; z-index: 20; display: grid; place-items: center; background: radial-gradient(circle, #000a, #000e); animation: fade .3s; }
.overlay .panel { display: grid; justify-items: center; gap: calc(var(--u) * 16); text-align: center; padding: calc(var(--u) * 30); }
.overlay h2 { margin: 0; font-size: calc(var(--u) * 64); line-height: 1; font-weight: 900; letter-spacing: .03em; background: linear-gradient(180deg, #fff7c2, #ffcc33 50%, #e07a00); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #6b2a00) drop-shadow(0 0 20px #ffb02e99); animation: pop .6s; }
.overlay h3 { margin: 0; font-size: calc(var(--u) * 28); color: #ffe7b5; }
.overlay .amount { font-size: calc(var(--u) * 72); font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 4px 0 #8a3c00, 0 0 24px #ffcc33; }
.overlay .title-img { max-width: calc(var(--u) * 480); max-height: calc(var(--u) * 200); object-fit: contain; animation: pop .6s; }
.overlay .tap { font-size: calc(var(--u) * 18); color: #ffffffb0; }
.overlay .btn { padding: calc(var(--u) * 14) calc(var(--u) * 44); border-radius: 99px; font-size: calc(var(--u) * 26); font-weight: 900; background: linear-gradient(180deg, #8dff6a, #1f9a18); border: 3px solid #e8ffb5; box-shadow: 0 5px 0 #0a4207; text-shadow: 0 2px 0 #0a4a07; }
.coins-rain { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.coins-rain i { position: absolute; top: -10%; width: calc(var(--u) * 36); height: calc(var(--u) * 36); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b5, #ffc21a 45%, #b36a00); box-shadow: inset 0 0 0 3px #e08d00; animation: rain linear forwards; }
@keyframes rain { to { transform: translateY(120vh) rotate(720deg); } }
@keyframes fade { from { opacity: 0; } }
.o-wheel-host { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.wheel { position: relative; width: calc(var(--u) * 520); height: calc(var(--u) * 520); }
.wheel-disc { position: absolute; inset: 0; border-radius: 50%; border: calc(var(--u) * 12) solid #ffcc33; box-shadow: 0 0 40px #ff9a00, inset 0 0 30px #000; transition: transform 4.2s cubic-bezier(.17,.67,.12,1); overflow: hidden; }
.wheel-disc span { position: absolute; left: 50%; top: 50%; width: 50%; height: calc(var(--u) * 46); transform-origin: 0 50%; display: flex; align-items: center; justify-content: flex-end; padding-right: calc(var(--u) * 24); font-weight: 900; font-size: calc(var(--u) * 22); color: #fff; text-shadow: 0 2px 0 #000; }
.wheel-pointer { position: absolute; top: calc(var(--u) * -26); left: 50%; translate: -50% 0; width: calc(var(--u) * 70); z-index: 2; filter: drop-shadow(0 4px 4px #000); }
.picks { display: flex; gap: calc(var(--u) * 20); }
.pick { width: calc(var(--u) * 150); height: calc(var(--u) * 150); border-radius: 20px; display: grid; place-items: center; font-size: calc(var(--u) * 40); font-weight: 900; background: center / 90% no-repeat var(--img), radial-gradient(#5a2a9a, #200a40); border: 3px solid #ffcc33; transition: transform .3s; }
.pick.open { transform: rotateY(360deg); background: radial-gradient(#ffcc33, #a05a00); color: #fff; text-shadow: 0 3px 0 #000; }

/* dialogs */
.sheet { width: min(96vw, 720px); max-height: 90dvh; padding: 0; border: 2px solid #b48aff; border-radius: 20px; background: linear-gradient(180deg, #2b1052, #12062a); color: #fff; box-shadow: 0 20px 60px #000; overflow: hidden; }
.sheet::backdrop { background: #000b; }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #ffffff1f; }
.sheet h2 { margin: 0; font-size: 18px; }
.pt-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; max-height: calc(90dvh - 120px); }
.pt-track figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: grid; place-items: center; padding: 12px; background: #000; }
.pt-track img { max-width: 100%; max-height: calc(90dvh - 150px); object-fit: contain; }
.pt-track .rules { padding: 16px 20px; font-size: 14px; line-height: 1.7; align-self: start; background: transparent; place-items: start; }
.sheet footer { display: flex; justify-content: center; align-items: center; gap: 20px; padding: 10px; border-top: 1px solid #ffffff1f; }
.sheet footer button { width: 40px; height: 36px; border-radius: 10px; background: #ffffff1a; font-size: 22px; }
.menu-body { padding: 14px 18px 20px; display: grid; gap: 12px; overflow-y: auto; max-height: calc(90dvh - 70px); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.toggle input { width: 20px; height: 20px; accent-color: #ffb02e; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { padding: 8px; border-radius: 12px; background: #ffffff10; text-align: center; font-size: 11px; color: #cdb8ff; }
.stats b { display: block; font-size: 15px; color: #fff; }
.menu-body h3 { margin: 4px 0 0; font-size: 14px; color: #cdb8ff; }
.history { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12px; max-height: 180px; overflow-y: auto; }
.history li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: #ffffff0c; }
.history .w { color: #8dff6a; }
.rules-note { margin: 0; font-size: 12px; color: #bfa9ef; line-height: 1.6; }
.wide-btn { height: 42px; border-radius: 12px; background: linear-gradient(180deg, #6b3cc4, #3a1878); border: 2px solid #c9a6ff; font-weight: 800; }
.wide-btn.danger { background: linear-gradient(180deg, #b0283a, #6a0f1c); border-color: #ff9aa8; }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 70px); translate: -50% -20px; z-index: 50; padding: 10px 18px; border-radius: 12px; background: #000d; border: 1px solid #ffd54a77; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; translate: -50% 0; }
.offline-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 6px calc(env(safe-area-inset-bottom) + 6px); text-align: center; font-size: 12px; background: #a01a2a; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- original game stage (Cocos 768x1370 design scaled by --k) ---------- */
.o-stage { --k: .5; width: calc(768px * var(--k)); height: calc(1370px * var(--k)); --s: calc(768px * var(--k)); --u: calc(var(--s) / 700); background: #000 var(--obg, none) center / cover no-repeat; }
.o-stage::after { display: none; }
/* landscape games: 1370x768 design; rotated on portrait screens like the lobby */
.o-stage.land { width: calc(1370px * var(--k)); height: calc(768px * var(--k)); --s: calc(768px * var(--k)); }
.o-stage.land .o-design { width: 1370px; height: 768px; }
.o-stage.land .spine-layer { width: 1370px; height: 768px; }
.o-stage.land.rot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(90deg); }
.o-stage.land .g-banner { bottom: calc(var(--u) * 150); }
.o-design { position: absolute; left: 0; top: 0; width: 768px; height: 1370px; transform: scale(var(--k)); transform-origin: 0 0; z-index: 1 !important; overflow: hidden; font-size: 22px; }
.o-design .board-frame { position: absolute; inset: 0; display: block; width: auto; height: auto; z-index: 3; pointer-events: none; }
.o-bg, .o-scene, .o-bottom { position: absolute; left: 0; top: 0; }
.o-bg { z-index: 0; } .o-scene { z-index: 2; } .o-bottom { z-index: 5; }
.cn { position: absolute; box-sizing: border-box; }
.cn-text { color: #fff; font-weight: 800; white-space: nowrap; display: flex; align-items: center; justify-content: center; font-family: "Arial Black", "Arial Rounded MT Bold", system-ui, sans-serif; line-height: 1; }
.cn-bm { overflow: visible; }
.bm-line { position: absolute; left: 50%; display: flex; white-space: nowrap; transform-origin: 50% 50%; }
.bm-line i { position: relative; display: block; flex: none; }
.bm-line b { position: absolute; background-image: var(--page); background-repeat: no-repeat; }
.cn-btn { cursor: pointer; touch-action: manipulation; transition: filter .1s; }
.cn-btn:active { background-image: var(--pressed) !important; }
.cn-btn.disabled { background-image: var(--disabled) !important; pointer-events: none; }
.cn-bm.hit { animation: jpHit .2s 12 alternate; }
/* reels placed on the original sp_reel rectangles */
.o-board { position: absolute; pointer-events: none; }
.o-reel { position: absolute; top: 0; overflow: hidden; }
.o-board .strip { position: absolute; left: 0; top: 0; width: 100%; }
.o-board .sym { width: var(--cw); height: var(--ch); }
.o-board .sym img { width: 96%; height: 96%; }
.o-board .lines-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 3; }
.o-board .lines-svg polyline { stroke-width: 7; }
.o-hold { position: absolute; }
.o-hold .cell { position: absolute; border-radius: 12px; background: radial-gradient(circle, #ffffff10, #0006); display: grid; place-items: center; overflow: hidden; }
.o-hold .cell img { width: 92%; height: 92%; object-fit: contain; }
.o-hold .val { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; text-align: center; font-weight: 900; font-size: calc(var(--cw) * .2); color: #fff; text-shadow: 0 0 4px #000, 0 2px 0 #000; }
.o-hold .val.jp { color: #ffe36a; font-size: calc(var(--cw) * .17); }
.o-hold .cell.spin::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 10%, #ffffff10 10% 20%); animation: scroll .25s linear infinite; }
.o-hold .cell.hl { box-shadow: 0 0 0 4px #ffe14a inset, 0 0 18px #ffe14a; }
.o-hold .cell.row-mult { box-shadow: 0 0 0 4px #ff6af0 inset; }
.o-hold .cell.pop { animation: pop .5s ease-out; }
.o-hold .spins-left { position: absolute; left: 50%; translate: -50% 0; top: -56px; padding: 4px 22px; border-radius: 99px; background: #000c; border: 3px solid var(--accent); font-weight: 900; font-size: 26px; white-space: nowrap; }
.o-design .g-meter { position: absolute; left: 60px; right: 60px; height: 44px; top: var(--meter-top, 700px); display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 24px; font-weight: 900; color: #ffe9a6; text-shadow: 0 2px 0 #000, 0 0 6px #000; z-index: 4; pointer-events: none; }
.o-design .g-meter:empty { display: none; }
.o-design .mult-row span { min-width: 64px; }
.o-stage .g-banner { bottom: calc(var(--u) * 245); font-size: calc(var(--u) * 22); z-index: 6; }
.o-stage .g-top { top: calc(var(--u) * 10); }
.o-stage .g-top .g-level { display: none; }
.spine-layer { position: absolute; left: 0; top: 0; width: 768px; height: 1370px; pointer-events: none; z-index: 4; }
#stage > .spine-layer.fx { width: 100%; height: 100%; }
.sym.spine img { opacity: 0; }
#stage > .spine-layer.fx { z-index: 20; }
.overlay.spine-bg { background: radial-gradient(circle, #0003, #0009); }
.overlay.spine-bg .panel { padding-top: calc(var(--u) * 420); }
.spine-layer.bg { z-index: 1; }
/* original JMS_Common_Font split by unicode-range (same glyphs): the Latin part (41 KB) loads first, CJK only when used */
@font-face { font-family: JMSCommon; src: url(/static/fonts/JMS_Common_Font.latin.woff2) format('woff2'); font-display: swap; unicode-range: U+0000-2E7F; }
@font-face { font-family: JMSCommon; src: url(/static/fonts/JMS_Common_Font.cjk.woff2) format('woff2'); font-display: swap; unicode-range: U+2E80-FFFF; }
@font-face { font-family: PoetsenOne; src: url(/static/fonts/PoetsenOne-Regular-1.ttf) format('truetype'); font-display: swap; }

/* ---------- original landscape lobby (JMSLobbyLayer 1370x768) ---------- */
.lobby-o { background: #000; overflow: hidden; }
.l-host { position: absolute; left: 50%; top: 50%; width: 1370px; height: 768px; transform-origin: 50% 50%; overflow: hidden; user-select: none; -webkit-user-select: none; }
.l-wall { position: absolute; overflow: hidden; touch-action: none; cursor: grab; }
.l-track { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
.l-card { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; overflow: visible; }
/* pre-rendered original card, replaced by the live Spine card once it is ready */
.l-card img { position: absolute; pointer-events: none; -webkit-user-drag: none; }
.l-card.spine img { opacity: 0; }
.l-card.soon { filter: saturate(.85); }
.l-wall > .spine-layer.l-fx { width: 100%; height: 100%; z-index: 2; }
.l-host .cn-btn { cursor: pointer; }
.l-host .cn { pointer-events: none; }
.l-host .cn-btn, .l-host .l-wall { pointer-events: auto; }
.cn-s9 { position: absolute; inset: 0; box-sizing: border-box; border-style: solid; pointer-events: none; }
.logon-o { background: #000; overflow: hidden; }
.l-host > .cn, .p-host > .cn { pointer-events: none; }
.logon-o .cn-btn { pointer-events: auto; }
.logon-video { position: absolute; left: 0; top: 0; width: 1370px; height: 768px; object-fit: cover; pointer-events: none; }
.coin-ico { background: url(/static/brand/coin_m.webp) center / contain no-repeat !important; box-shadow: none !important; }
.spine-layer.logon-fx { z-index: auto; position: absolute; left: 0; top: 0; width: 1370px; height: 768px; pointer-events: none; }
.p-host { position: absolute; left: 50%; top: 50%; width: 768px; height: 1370px; transform-origin: 50% 50%; overflow: hidden; }
.p-art { position: absolute; left: 50%; top: 42%; width: 620px; max-height: 760px; object-fit: contain; transform: translate(-50%,-50%); pointer-events: none; }
.l-drawer { transition: transform .28s ease-out; }
.drawer-open .l-drawer { transform: translate(0, -300px) !important; }
.drawer-open [data-name="Button_More"] { transform: translate(-50%, -50%) scaleY(-1) !important; }
.white-pick { position: absolute; left: 0; top: 0; width: 768px; height: 1370px; z-index: 4; }
.white-pick .spine-layer { position: absolute; }
.white-pick .pick-hit { position: absolute; left: -80px; top: -80px; width: 160px; height: 160px; cursor: pointer; pointer-events: auto; }
/* Scarlet shop corner tag: Socre_ScarletSuccubus_jiaobiao.csb added to the symbol at (50,-45) from its centre (cocos y up) */
.sym .shop-tag { position: absolute; left: calc(50% + 50px); top: calc(50% + 45px); width: 0; height: 0; z-index: 10; pointer-events: none; }

/* ---------- login actions: wallet login (top) + original guest button (below), centred ---------- */
.logon-actions { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 20; pointer-events: auto; }
.logon-actions .logon-guest { position: relative !important; left: auto !important; top: auto !important; transform: none !important; width: 316px !important; height: 90px !important; cursor: pointer; }
.logon-actions .logon-guest:active { transform: scale(.96) !important; }
.logon-wallet { position: relative; width: 316px; height: 90px; padding: 0 22px 6px 16px; border: 0; border-radius: 45px; cursor: pointer; display: flex; align-items: center; gap: 14px;
  font: 28px/1 PoetsenOne, JMSCommon, sans-serif; color: #fff; letter-spacing: .01em; white-space: nowrap; text-shadow: 0 3px 0 #0d5aa8, 0 0 2px #0d5aa8;
  background: linear-gradient(180deg, #8ff1ff 0%, #2fcdfb 38%, #12a6ef 62%, #1688e0 100%);
  box-shadow: 0 0 0 5px #b45cff, 0 0 0 8px #5a1d9c, inset 0 6px 0 rgba(255,255,255,.45), inset 0 -8px 0 rgba(0,60,140,.35), 0 8px 16px rgba(30,0,60,.5);
  transition: transform .08s, filter .15s; }
.logon-wallet:hover { filter: brightness(1.06); }
.logon-wallet:active { transform: scale(.96); }
.logon-wallet::before { content: ""; position: absolute; left: 34px; right: 34px; top: 10px; height: 22px; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none; }
.logon-wallet .lw-ico { flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(180deg, #2b8cf0, #1458c8); box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 2px 0 #0b3f8f; }
.logon-wallet .lw-ico svg { width: 38px; height: 38px; }
.logon-wallet > span:last-child { flex: 1; text-align: center; }

.wallet-modal { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(20, 0, 40, .62); backdrop-filter: blur(3px); animation: wmFade .18s ease-out; pointer-events: auto; }
.wm-panel { width: 640px; padding: 22px 26px 18px; border-radius: 28px; color: #fff; font-family: PoetsenOne, JMSCommon, sans-serif;
  background: linear-gradient(180deg, #4a1a8c, #2a0b5c); box-shadow: 0 0 0 4px #c77dff, 0 0 0 8px #3b0f73, 0 20px 50px rgba(0,0,0,.55); animation: wmPop .22s cubic-bezier(.2,1.4,.4,1); }
.wm-panel header { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 16px; }
.wm-panel h2 { margin: 0; font-size: 30px; font-weight: 400; letter-spacing: .04em; color: #ffe46b; text-shadow: 0 3px 0 #8a3b00; }
.wm-x { position: absolute; right: -6px; top: -4px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font: 32px/1 sans-serif; color: #fff; background: linear-gradient(180deg, #ff7aa8, #e0306e); box-shadow: 0 0 0 3px #fff3, 0 3px 0 #8a0f3c; }
.wm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.wm-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 10px; border: 0; border-radius: 18px; cursor: pointer; color: #fff; font: 16px/1.1 PoetsenOne, JMSCommon, sans-serif;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); transition: transform .1s, background .15s; }
.wm-item:hover { background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.1)); transform: translateY(-2px); }
.wm-item:active { transform: scale(.95); }
.wm-logo { width: 62px; height: 62px; border-radius: 16px; background: #fff; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.wm-logo img { width: 44px; height: 44px; }
.wm-logo.big { width: 96px; height: 96px; border-radius: 24px; }
.wm-logo.big img { width: 70px; height: 70px; }
.wm-note { margin: 14px 0 0; text-align: center; font: 14px/1.2 system-ui, sans-serif; color: #cdb6ff; opacity: .8; }
.wm-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 0 20px; }
.wm-state p { margin: 0; font: 18px/1.2 system-ui, sans-serif; color: #e6d8ff; }
.wm-spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #ffffff33; border-top-color: #ffe46b; animation: wmSpin .7s linear infinite; }
.wm-check { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 58px; color: #fff; background: linear-gradient(180deg, #7dff8a, #1fbf4a); box-shadow: 0 0 0 5px #fff4, 0 0 30px #5dff7a; animation: wmPop .3s cubic-bezier(.2,1.6,.4,1); }
.wm-state.ok h2 { color: #8dff9a; text-shadow: 0 3px 0 #0b6b25; }
@keyframes wmFade { from { opacity: 0 } }
@keyframes wmPop { from { transform: scale(.7); opacity: 0 } }
@keyframes wmSpin { to { transform: rotate(360deg) } }

/* lobby avatar: mouse-head loop in the original round Facebook frame */
.l-avatar { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; pointer-events: none; }
.l-avatar video { width: 100%; height: 100%; object-fit: cover; display: block; }
.l-brand { position: absolute; left: 685px; top: 34px; width: 300px; height: auto; transform: translate(-50%, -50%); pointer-events: none; z-index: 5; filter: drop-shadow(0 2px 3px rgba(40,0,60,.6)); }

/* ---- 2026-10-25 round 2: animated word mark, PLAYER ID, rotate hint ---- */
.l-brand { position: absolute; left: 685px; top: 34px; width: 300px; height: auto; transform: translate(-50%, -50%); pointer-events: none; z-index: 5;
  filter: drop-shadow(0 2px 3px rgba(40,0,60,.6)); animation: brand-bob 3.2s ease-in-out infinite; transform-origin: 50% 60%; }
.l-brand img { display: block; width: 100%; height: auto; }
.l-brand-shine { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/static/brand/logo_en.webp) center / 100% 100% no-repeat; mask: url(/static/brand/logo_en.webp) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 0 38%, rgba(255,255,255,.85) 47%, rgba(255,255,255,.95) 50%, rgba(255,255,255,.85) 53%, transparent 62% 100%) no-repeat;
  background-size: 250% 100%; background-position: 150% 0; mix-blend-mode: screen; animation: brand-shine 3.6s ease-in-out infinite; }
@keyframes brand-bob { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -54%) scale(1.035); } }
@keyframes brand-shine { 0%, 45% { background-position: 150% 0; } 85%, 100% { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .l-brand, .l-brand-shine { animation: none; } }

.l-playerid { position: absolute; left: 8px; top: 96px; z-index: 6; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 5px;
  border-radius: 15px; background: linear-gradient(180deg, rgba(76,16,120,.92), rgba(42,6,74,.92)); border: 2px solid #f7c84a;
  box-shadow: 0 2px 6px rgba(20,0,40,.5), inset 0 1px 0 rgba(255,255,255,.25); color: #fff; font: 800 15px/1 system-ui, -apple-system, 'Segoe UI', sans-serif;
  white-space: nowrap; pointer-events: none; }
.l-playerid .mi-ico { width: 20px; height: 20px; border-radius: 5px; background: #fff; padding: 1px; }
.l-playerid .mi-guest { font-size: 10px; padding: 3px 5px; border-radius: 8px; background: #7a3fb0; color: #ffe7a0; letter-spacing: .5px; }
.l-playerid b { color: #ffd54a; font-weight: 900; margin-right: 2px; letter-spacing: .3px; }
.l-playerid em { font-style: normal; font-weight: 600; font-size: 12px; color: #d9c4ff; margin-left: 2px; }
.wallet-modal .wm-id { margin-top: 8px; font-weight: 800; color: #ffd54a; letter-spacing: .5px; }
.wallet-modal .wm-id b { color: #fff; font-size: 1.15em; }

.rotate-hint { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center;
  background: #2a0b47 url(/static/scene/logon/f762a7b4e7.webp) center / cover no-repeat; color: #fff; text-align: center; }
.rotate-hint[hidden] { display: none; }
.rotate-hint::before { content: ''; position: absolute; inset: 0; background: rgba(20,2,40,.55); }
.rh-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; }
.rh-logo { width: min(72vw, 340px); height: auto; filter: drop-shadow(0 3px 4px rgba(40,0,60,.7)); }
.rh-phone { width: 110px; height: auto; margin: 18px 0 6px; animation: rh-rot 2.4s ease-in-out infinite; }
@keyframes rh-rot { 0%, 20% { transform: rotate(0); } 50%, 75% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
.rh-box h2 { margin: 0; font: 900 24px/1.2 system-ui, sans-serif; letter-spacing: 1px; color: #ffd54a; text-shadow: 0 2px 0 #5c017a; }
.rh-box p { margin: 0; font-size: 15px; opacity: .9; }
.rh-go { margin-top: 18px; padding: 11px 34px; border: 0; border-radius: 26px; font: 900 17px/1 system-ui, sans-serif; color: #fff; letter-spacing: 1px;
  background: linear-gradient(180deg, #3ad0ff, #1a86e0); box-shadow: 0 4px 0 #0d4f9a, 0 6px 12px rgba(0,0,0,.35); cursor: pointer; }
.l-art { position: absolute; left: 50%; top: 44%; width: 1100px; max-height: 640px; object-fit: contain; transform: translate(-50%, -50%); pointer-events: none; }
.l-playerid .mi-num { font-weight: 800; }
/* PLAYER ID: compact column under the avatar (x 0..90 strip left of the card wall) */
.l-playerid { left: 6px; top: 100px; width: 84px; height: auto; padding: 5px 0 6px; flex-direction: column; gap: 2px; border-radius: 12px; font-size: 15px; }
.l-playerid .mi-top { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #d9c4ff; font-weight: 700; }
.l-playerid .mi-guest { padding: 2px 6px; }
.l-playerid .mi-ico { width: 16px; height: 16px; border-radius: 4px; }
.l-playerid b { font-size: 11px; margin: 0; letter-spacing: .5px; }
.l-playerid .mi-num { font-size: 15px; letter-spacing: .3px; }
/* original lobby lock (JMSLevel_suo_big) above the Spine canvas */
.l-wall > .l-locks { z-index: 3; pointer-events: none; }
.l-lock { position: absolute; width: 0; height: 0; transform-origin: 0 0; }
.l-lock [data-name="m_lb_level"] { color: #fff; font-family: JMSCommon, system-ui, sans-serif; text-align: center; display: flex; align-items: center; justify-content: center; line-height: 1.05;
  -webkit-text-stroke: 2px #5c017a; paint-order: stroke fill; text-shadow: 0 3px 0 #3a0050; }
/* loading covers a screen that is being prepared underneath */
#loading-screen { z-index: 50; }
/* PLAYER ID: prominent gold badge under the avatar */
.l-playerid { left: 4px; top: 100px; width: 128px; padding: 7px 0 8px; gap: 3px; border-radius: 14px; border: 3px solid #ffd54a;
  background: linear-gradient(180deg, #8a2be2, #4b0f8a 60%, #2e0659); box-shadow: 0 0 0 2px #7a3b00, 0 4px 10px rgba(0,0,0,.55), 0 0 18px rgba(255,213,74,.55), inset 0 2px 0 rgba(255,255,255,.35);
  animation: playerid-glow 2.4s ease-in-out infinite; z-index: 7; }
.l-playerid b { font-size: 15px; color: #ffe27a; letter-spacing: 1px; text-shadow: 0 2px 0 #5c017a; font-family: JMSCommon, system-ui, sans-serif; }
.l-playerid .mi-num { font-size: 24px; font-weight: 900; color: #fff; letter-spacing: 1px; font-family: JMSCommon, system-ui, sans-serif;
  -webkit-text-stroke: 1px #5c017a; paint-order: stroke fill; text-shadow: 0 2px 0 #3a0050, 0 0 8px rgba(255,255,255,.4); }
.l-playerid .mi-top { font-size: 13px; color: #fff; }
.l-playerid .mi-guest { font-size: 12px; padding: 2px 8px; }
.l-playerid .mi-ico { width: 20px; height: 20px; }
@keyframes playerid-glow { 0%, 100% { box-shadow: 0 0 0 2px #7a3b00, 0 4px 10px rgba(0,0,0,.55), 0 0 14px rgba(255,213,74,.45), inset 0 2px 0 rgba(255,255,255,.35); }
  50% { box-shadow: 0 0 0 2px #7a3b00, 0 4px 10px rgba(0,0,0,.55), 0 0 26px rgba(255,213,74,.9), inset 0 2px 0 rgba(255,255,255,.35); } }
/* Loading / login: the original 1950x1200 backgrounds extend beyond the 1370x768 design area (cocos shows them on wide
   screens); let them overflow the host so ultra-wide phones get no black side bars. The screen itself clips. */
#loading-screen, #login-screen { overflow: hidden; background: #2a0b45; }
#loading-screen .l-host { overflow: visible; }
/* login: the 16:9 mascot video only covers the design area, so the sides get a blurred copy of its poster instead */
#login-screen::before { content: ''; position: absolute; inset: -40px; background: url(/static/brand/logon_poster.webp) center / cover no-repeat; filter: blur(22px) brightness(.75) saturate(1.2); }

/* Golden Mammoth GoldenMammoth_shouji: flyLight 02..14 (7 frames, 2/60 s each), sprite 271x19 scaled (2, 6); hidden at frame 14 */
.mm-flylight { position: absolute; width: 542px; height: 114px; z-index: 60; pointer-events: none; background: url(/static/g/mammoth/flylight.webp) 0 0 / 542px 798px no-repeat;
  animation: mm-fl 233ms steps(7) forwards; mix-blend-mode: screen; }
@keyframes mm-fl { from { background-position: 0 0; } to { background-position: 0 -798px; } }

/* JMSCommonWin amount (stage design px, centred on the spine's number bar) */
#overlay .cbw-amount { position: absolute; left: 50%; top: calc(50% + 175px * var(--k)); transform: translate(-50%, -50%); font-size: calc(78px * var(--k)); line-height: 1; white-space: nowrap; }
/* ---------- full-screen adaptation (phone / pad, both orientations) ---------- */
/* game: the stage keeps the design box (scaled by --k) but does not clip; the oversized original backgrounds fill the screen.
   --dy pushes the design down so the bottom bar sits on the bottom edge when the screen is taller than the design. */
#game-screen { overflow: hidden; }
#game-screen .o-stage { overflow: visible; box-shadow: none; translate: 0 var(--dy, 0px); }
#game-screen .o-stage.land.rot { translate: none; }
/* portrait game on a touch screen held in landscape: the portrait design is drawn rotated -90deg and fills the screen (the
   design's bottom bar lies along the right edge); --dy then moves the design along the screen x axis */
.o-stage.prot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); }
#game-screen .o-stage.prot { translate: var(--dy, 0px) 0; }
#game-screen .o-design { overflow: visible; }
/* portrait games on a wide screen: the 1400 px background does not reach the sides -> blurred copy of the game background */
#game-screen::before { content: ''; position: absolute; inset: -40px; background: var(--gbg, none) center / cover no-repeat; filter: blur(24px) brightness(.55); }
/* lobby: original 1660-wide backgrounds and bar art extend past the 1370 design to the screen edges */
#lobby-screen .l-host { overflow: visible; }
#lobby-screen { overflow: hidden; background: #2a0b45; }
/* overlays dim the whole screen (centre stays on the design centre, where the original popups are drawn) */
#game-screen .o-stage > .overlay { inset: -100vmax; }
/* HUD (back / coins / paytable / settings) stays on the top edge of the screen, below the notch */
#game-screen .o-stage:not(.rot) .g-top { top: calc(var(--u) * 10 - var(--dy, 0px) - var(--padT, 0px) + var(--safeT, env(safe-area-inset-top))); }
#lobby-screen .l-brand { translate: 0 calc(-1 * var(--ey, 0px)); }
/* PLAYER ID follows the avatar to the left screen edge on wide screens (--el: extra width minus the notch safe area) */
#lobby-screen .l-playerid { translate: calc(-1 * var(--el, 0px)) calc(-1 * var(--ey, 0px)); }
.update-banner { position: fixed; z-index: 10000; left: 50%; top: calc(env(safe-area-inset-top) + 10px); translate: -50% 0; display: flex; gap: 10px; align-items: center;
  padding: 9px 18px; border-radius: 99px; background: linear-gradient(180deg, #8a2be2, #4b0f8a); border: 2px solid #ffd54a; color: #fff; font-size: 14px;
  box-shadow: 0 4px 14px #000a, 0 0 16px #ffd54a66; animation: pop .4s; }
.update-banner b { color: #ffd54a; letter-spacing: .5px; }
/* Sacred Summit fg_qipan boards: the original reel_diban cells are drawn by the csb, so the hold cells stay transparent */
.o-hold.summit-hold .cell { background: none; }

.classic-mini { background: rgba(0,0,0,.55); }
.classic-mini .cm-strip { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }
.classic-mini .cm-cell { position: relative; width: 100%; }
.classic-mini .cm-cell img { position: absolute; left: 50%; top: 50%; width: 109px; height: 109px; transform: translate(-50%,-50%); }
.classic-mini .cm-cell.win img { animation: cmWin .5s ease-in-out infinite alternate; }
@keyframes cmWin { to { transform: translate(-50%,-50%) scale(1.12); filter: brightness(1.35); } }

.scarlet-shop { pointer-events: auto; }
.scarlet-shop .shop-mask { position: absolute; inset: -400px; background: rgba(0,0,0,.72); opacity: 0; transition: opacity .4s; }
.scarlet-shop .shop-mask.on { opacity: 1; }

/* Glacial Silverback */
.gl-dialog { pointer-events: auto; z-index: 8; }
.gl-bc { position: absolute; pointer-events: none; }
.gl-ball { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; background: url(/static/g/glacial/s94.webp) center / contain no-repeat; filter: drop-shadow(0 0 8px #ff8a1a); }
.gl-ts { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: scale(.9); pointer-events: none; }

/* original csb number / button layers bound to popup spine bones (util_bindNode) */
.csb-bind { z-index: 22; pointer-events: none; transform: scale(var(--k)); transform-origin: 0 0; }
.o-stage.land .csb-bind { width: 1370px; height: 768px; }
.csb-bind .csb-bound { position: absolute; width: 0; height: 0; transform-origin: 0 0; }
.overlay.csb-labels .panel { visibility: hidden; }

/* ---------- platform diamond shop (original JMS_Shop layouts) ---------- */
.shop-o { position: fixed; inset: 0; z-index: 40; background: #000; overflow: hidden; }
.shop-o[hidden] { display: none; }
.shop-host .cn-btn { pointer-events: auto; cursor: pointer; }
.shop-host .shop-list { pointer-events: auto; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.shop-host .shop-list::-webkit-scrollbar { display: none; }
.shop-host .shop-track { position: absolute; left: 0; top: 0; height: 615px; }
.shop-host .shop-tip { z-index: 30; pointer-events: auto; }
.shop-host .shop-tip::before { content: ''; position: absolute; left: -400px; top: -400px; width: 2170px; height: 1568px; background: #000b; }
.l-wallet { pointer-events: auto !important; cursor: pointer; }
.shop-o .l-host { overflow: visible; }
/* wallet numbers: cocos Text with anchor .5 grows around its centre (setString) -> centred in the original box */
.shop-host [data-name="lb_GemsNum"].cn-text, .shop-host [data-name="lb_CoinsNum"].cn-text,
#lobby-screen [data-name="txt_gems"], #lobby-screen [data-name="txt_coins"] { justify-content: center !important; white-space: nowrap; }
/* in-game shop entry chips (coin + gem wallet, original lobby gem icon) */
.shop-chip { font: inherit; color: inherit; cursor: pointer; position: relative; }
.shop-chip:active { transform: scale(.96); }
.gem-chip { max-width: calc(var(--u) * 170) !important; border-color: #59c7ff !important; }
.gem-chip strong { color: #bdf0ff !important; text-shadow: 0 2px 0 #0b3a6b !important; }
.gem-ico { width: calc(var(--u) * 40); height: calc(var(--u) * 40); flex: none; background: url(/static/scene/lobby/66cb2c6b56.webp) center / contain no-repeat; }
.chip-plus { margin-left: auto; width: calc(var(--u) * 30); height: calc(var(--u) * 30); flex: none; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-weight: 900; font-size: calc(var(--u) * 26); line-height: 1; color: #fff; background: radial-gradient(circle at 35% 30%, #b8ff5c, #3fbf16 60%, #1f7a06); box-shadow: 0 2px 0 #145200; }
/* original platform reward popup (JMSClaims) */
.claims-o { position: fixed; inset: 0; z-index: 60; background: #000a; }
.claims-host .cn-btn { pointer-events: auto; cursor: pointer; }
.claims-host [data-name="lb_Title"], .claims-host [data-name="lbVIPDes"], .claims-host [data-name="lb_text"] { justify-content: center !important; white-space: nowrap; }
.claims-gems { position: absolute; left: 0; top: 0; transform: translate(-50%, 66px); display: flex; align-items: center; gap: 10px; font: 900 38px JMSCommon, sans-serif; color: #bdf0ff; text-shadow: 0 3px 0 #0b3a6b, 0 0 12px #39b6ff88; white-space: nowrap; }
.claims-gems i { width: 50px; height: 52px; background: url(/static/scene/lobby/66cb2c6b56.webp) center / contain no-repeat; }
/* drawer badges */
.l-dot { position: absolute; left: 28px; top: -48px; width: 24px; height: 24px; border-radius: 50%; background: url(/static/scene/lobby/155efb27df.webp) center / contain no-repeat; animation: dotPulse 1.2s ease-in-out infinite; }
.l-dot[hidden] { display: none; }
@keyframes dotPulse { 50% { transform: scale(1.18); } }
/* forced landscape on an upright phone: the blurred side fill follows the rotated layout (its long edge runs along the screen height) */
@media (orientation: portrait) {
  #login-screen::before { inset: auto; left: 50%; top: 50%; width: calc(100dvh + 80px); height: calc(100vw + 80px); transform: translate(-50%, -50%) rotate(90deg); }
}
/* platform currency names (AXR COIN / GEMS) */
.shop-host .shop-tabname { background: none !important; display: flex; align-items: center; justify-content: center; width: 200px !important; white-space: nowrap;
  font: 22px JMSCommon, sans-serif; color: #d9b3ff; text-shadow: 0 2px 0 #3c0a6b; }
.shop-host .shop-tabname.on { color: #fff; text-shadow: 0 0 0 #000, -2px 0 0 #5a12a0, 2px 0 0 #5a12a0, 0 -2px 0 #5a12a0, 0 2px 0 #5a12a0, 0 3px 4px #2a0050; }
.shop-host .shop-price-mp { white-space: nowrap; justify-content: center !important; gap: 8px; }
.shop-host .shop-price-mp .mp-ico { width: 46px; height: 47px; flex: none; background: url(/static/scene/lobby/66cb2c6b56.webp) center / contain no-repeat; }
.shop-host .shop-tip-unit, .claims-unit { position: absolute; left: 0; top: 0; transform: translate(-50%, 62px); white-space: nowrap; font: 34px JMSCommon, sans-serif; color: #ffe27a; text-shadow: 0 3px 0 #6b3500; }
.claims-unit { transform: translate(calc(-50% + 24px), 44px); font-size: 30px; }

/* portrait game loading: the original 1200x1950 bg_game runs past the 768x1370 design to the screen edges (no black bars) */
#loading-screen .p-host { overflow: visible; }
/* diamond shop card info list in the dark btn_Benefits panel (300x180, centred 11px above Node_Items): 3 rows base / bonus / worth|cost */
.shop-host .shop-info { position: absolute; left: 0; top: 0; width: 292px; height: 168px; transform: translate(-50%, calc(-50% + 8px)); display: flex; flex-direction: column; justify-content: space-evenly; padding: 4px 14px; box-sizing: border-box; pointer-events: none; }
.shop-host .si-row { display: flex; align-items: center; gap: 10px; height: 46px; }
.shop-host .si-row + .si-row { background: url(/static/g/ui/shop/line.webp) top center / 100% 4px no-repeat; }
.shop-host .si-row img { width: 38px; height: 38px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 2px #0008); }
.shop-host .si-row span { font: 17px/1 JMSCommon, sans-serif; color: #d8b4ff; letter-spacing: .5px; white-space: nowrap; }
.shop-host .si-row b { margin-left: auto; font: 26px/1 JMSCommon, sans-serif; font-weight: normal; color: #fff; text-shadow: 0 2px 0 #3a0a66; white-space: nowrap; }
.shop-host .si-row b small { font-size: 15px; color: #ffe27a; }
.shop-host .si-row.hot b { color: #ffe27a; }
/* hot update prompt (update.js): shown when a new version is fully downloaded; UPDATE swaps everything at once */
.update-modal { position: fixed; inset: 0; z-index: 10001; display: grid; place-items: center; background: #0009; animation: pop .3s; }
.update-modal .upd-box { width: min(86vw, 380px); padding: 22px 22px 18px; border-radius: 18px; text-align: center; color: #fff;
  background: linear-gradient(180deg, #7a26c9, #3d0b72); border: 3px solid #ffd54a; box-shadow: 0 8px 30px #000c, 0 0 24px #ffd54a55; }
.update-modal h3 { margin: 0 0 8px; color: #ffd54a; font-size: 20px; letter-spacing: 1px; }
.update-modal p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; opacity: .92; }
.update-modal .upd-btns { display: flex; gap: 12px; justify-content: center; }
.update-modal button { min-width: 112px; padding: 10px 16px; border-radius: 99px; border: 0; font-weight: 800; font-size: 15px; cursor: pointer; color: #fff; }
.update-modal .upd-no { background: #ffffff26; }
.update-modal .upd-go { background: linear-gradient(180deg, #9cff3c, #2fae0b); color: #12320a; box-shadow: 0 3px 0 #1a6b05; }
.update-modal.busy .upd-go { opacity: .7; }
.update-modal.busy .upd-go::after { content: ' …'; }
