/* The Pharaoh's Final Bet — obsidian, gold and lapis. */
@font-face { font-family: Cinzel; src: url(../fonts/cinzel-latin-500-normal.woff2) format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: Cinzel; src: url(../fonts/cinzel-latin-700-normal.woff2) format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: Cinzel; src: url(../fonts/cinzel-latin-900-normal.woff2) format('woff2'); font-weight: 800 900; font-display: swap; }

:root {
  --ink: #0b0906; --obsidian: #14110c; --stone: #1d1912;
  --gold: #e9b949; --gold-hi: #fff0b8; --gold-lo: #8a5a12; --bronze: #5b3b0c;
  --lapis: #1f4fd1; --lapis-hi: #59c8ff; --turq: #2fd3c6; --blood: #d0242c; --jade: #22b55a;
  --text: #f6e7c1; --muted: #bfa877;
  --gold-grad: linear-gradient(180deg, #fff3c4 0%, #f2c75a 35%, #b47a1c 65%, #ffe08a 100%);
  --frame-grad: linear-gradient(135deg, #6a430d, #f3cd6a 22%, #8b5b13 45%, #ffe9a6 62%, #7a4f10 85%, #e7b54b);
  --cell: min(calc((100vw - 64px) / 5), calc((100svh - 400px) / 3), 170px);
  --gap: calc(var(--cell) * .045);
  --serif: Cinzel, 'Trajan Pro', 'Cormorant Garamond', Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* Keep the game's fixed geometry: no phone text boosting, no double-tap zoom, never wider than the screen. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; overscroll-behavior: none; }
body, button, a, label { touch-action: manipulation; }
.game { max-width: 100vw; overflow-x: clip; grid-template-columns: minmax(0, 1fr); }
.machine, .top { max-width: 100%; min-width: 0; }
.banner { max-width: 100%; }
.jackpots { min-width: 0; }
.controls > * { min-width: 0; }
body {
  background: var(--ink); color: var(--text); font-family: var(--serif);
  overflow-x: hidden; -webkit-tap-highlight-color: transparent; user-select: none;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--lapis-hi); outline-offset: 2px; }
.spin:focus-visible { outline: none; filter: drop-shadow(0 0 10px var(--lapis-hi)); }

/* ---------- backdrop */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg-img { position: absolute; inset: -20px; background: center / cover no-repeat; opacity: 0; transition: opacity 1.2s ease; }
.bg-base { background-image: url(../img/bg/table.webp); filter: saturate(1.05); }
.bg-free { background-image: url(../img/bg/fs.webp); filter: blur(6px) saturate(1.2); }
.bg-hw { background-image: url(../img/bg/base.webp); filter: blur(5px) brightness(.9); }
.mode-base .bg-base, .mode-free .bg-free, .mode-hw .bg-hw { opacity: 1; }
.bg-shade { position: absolute; inset: 0; background:
  radial-gradient(ellipse 70% 60% at 50% 52%, rgba(0,0,0,.25), rgba(0,0,0,.78) 100%),
  linear-gradient(180deg, rgba(0,0,0,.45), transparent 25%, transparent 70%, rgba(0,0,0,.85)); }
.embers { position: absolute; inset: 0; pointer-events: none; }
.embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: #ffcf6b; box-shadow: 0 0 6px 2px rgba(255,170,40,.7); animation: ember linear infinite; opacity: 0; }
.mode-free .embers i { background: #9fe7ff; box-shadow: 0 0 6px 2px rgba(80,170,255,.8); }
@keyframes ember { 0% { transform: translate(0,0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx), -105vh); opacity: 0; } }

/* ---------- splash */
.splash { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center; padding: 24px 16px; background: var(--ink); transition: opacity .8s ease, visibility .8s; }
.splash.gone { opacity: 0; visibility: hidden; }
.splash-art { position: absolute; inset: 0; background: url(../img/bg/table.webp) center 35% / cover no-repeat; }
.splash-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 60% at 50% 55%, rgba(0,0,0,.78), rgba(0,0,0,.35) 70%, rgba(0,0,0,.8)); }
.splash-inner { position: relative; max-width: 640px; padding: 22px 26px 20px; border-radius: 18px; background: radial-gradient(ellipse at 50% 40%, rgba(10,7,3,.55), rgba(10,7,3,.2) 75%, transparent); display: grid; justify-items: center; gap: 14px; animation: rise 1.4s ease both; }
.splash h1 { margin: 0; }
.splash-logo { width: min(400px, 78vw); height: auto; filter: drop-shadow(0 6px 24px rgba(0,0,0,.8)); }
.tagline { margin: -8px 0 0; letter-spacing: .5em; text-transform: uppercase; font-size: 14px; color: var(--gold-hi); text-shadow: 0 2px 8px #000; }
.splash-copy { margin: 0; font-size: 15px; line-height: 1.6; color: #f3e3bb; text-shadow: 0 2px 10px #000, 0 0 2px #000; max-width: 520px; }
.splash-note { margin: 0; font-size: 12px; color: var(--muted); text-shadow: 0 1px 4px #000; }
.splash-sound { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.splash-opts { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* intro film */
.intro { position: fixed; inset: 0; z-index: 60; background: #000; display: grid; place-items: center; opacity: 1; transition: opacity .9s ease; }
.intro[hidden] { display: none; }
.intro.fade { opacity: 0; }
.intro::before { content: ''; position: absolute; inset: -40px; background: url(../video/intro-poster.webp) center / cover; filter: blur(24px) brightness(.45); }
.intro video { position: relative; width: 100%; height: 100%; object-fit: contain; }
@media (min-aspect-ratio: 16/10) { .intro video { object-fit: cover; } }
.intro-skip, .intro-sound { position: absolute; z-index: 2; border: 0; border-radius: 999px; padding: 10px 20px; font-family: var(--serif); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px;
  background: rgba(10,7,3,.7); color: var(--gold-hi); box-shadow: inset 0 0 0 1.5px #a37828; backdrop-filter: blur(4px); }
.intro-skip { right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); }
.intro-sound { left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); }
.intro-skip:hover, .intro-sound:hover { background: rgba(40,28,8,.85); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.age { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--blood); color: #fff; font-size: 10px; font-weight: 700; margin-right: 4px; vertical-align: middle; font-family: system-ui, sans-serif; }

.btn { border: 0; border-radius: 999px; padding: 12px 26px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.btn-gold { background: var(--gold-grad); color: #2a1702; box-shadow: 0 0 0 2px #3a2405, 0 0 0 4px #e5b44a, 0 8px 30px rgba(255,170,40,.35); text-shadow: 0 1px 0 rgba(255,255,255,.5); transition: transform .15s, filter .15s; }
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-dark { background: linear-gradient(180deg, #2a2418, #110e09); color: var(--gold-hi); box-shadow: 0 0 0 1.5px #8a6420 inset; }
.btn:disabled { filter: grayscale(.7) brightness(.55); cursor: default; transform: none; }
.tabpane[hidden] { display: none; }
.btn-xl { font-size: 18px; padding: 16px 40px; }

/* ---------- game layout */
.game { position: relative; z-index: 1; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; padding: 8px 16px 0; gap: 6px; }
.top { width: 100%; max-width: 1240px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.logo img { width: clamp(120px, 14vw, 200px); height: auto; filter: drop-shadow(0 4px 12px rgba(0,0,0,.9)); }
.jackpots { list-style: none; margin: 4px 0 0; padding: 6px; display: grid; gap: 4px; border-radius: 10px; background: rgba(8,6,4,.72); box-shadow: 0 0 0 1.5px #7b571b, 0 6px 20px rgba(0,0,0,.6); }
.jp { display: grid; grid-template-columns: 18px 64px minmax(80px, auto); align-items: center; gap: 8px; padding: 3px 10px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.05), transparent); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.jp i { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.jp b { text-align: right; font-size: 16px; letter-spacing: .02em; color: #fff; }
.jp-grand i { color: var(--blood); background: radial-gradient(circle at 35% 30%, #ffb3a8, #d0242c 55%, #4b0507); }
.jp-major i { color: var(--lapis); background: radial-gradient(circle at 35% 30%, #c4e7ff, #1f4fd1 55%, #08154a); }
.jp-minor i { color: var(--jade); background: radial-gradient(circle at 35% 30%, #c8ffd8, #22b55a 55%, #053d1b); }
.jp-mini i { color: var(--gold); background: radial-gradient(circle at 35% 30%, #fff5c9, #e9b949 55%, #5b3b0c); }
.jp.hit { animation: jpflash .5s ease 6; }
@keyframes jpflash { 50% { background: rgba(255,220,120,.35); } }

.machine { display: grid; justify-items: center; align-content: center; gap: 6px; }
.banner { position: relative; min-width: min(92vw, calc(var(--cell) * 4.4)); padding: 7px 28px; text-align: center; border-radius: 6px;
  background: linear-gradient(180deg, #17120b, #0a0805); box-shadow: 0 0 0 1.5px #a37828, 0 0 0 4px #2c1d07, 0 0 0 5px #6c4a14;
  font-size: clamp(13px, 1.8vw, 22px); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 0 10px rgba(255,190,80,.4); }
.banner { line-height: 1.5; height: calc(1.5em + 14px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 24px); }
.banner .num { line-height: 0; color: var(--lapis-hi); font-size: 1.5em; vertical-align: -.12em; text-shadow: 0 0 12px var(--lapis-hi); padding: 0 .2em; }
.banner.flash { animation: bflash .6s ease; }
@keyframes bflash { 30% { box-shadow: 0 0 0 1.5px #fff0b8, 0 0 0 4px #2c1d07, 0 0 30px 6px rgba(255,200,80,.7); } }

.frame { position: relative; padding: calc(var(--cell) * .09); border-radius: 10px; background: var(--frame-grad);
  box-shadow: 0 0 0 2px #2b1b05, 0 20px 60px rgba(0,0,0,.8), 0 0 80px rgba(255,170,40,.18); }
.mode-free .frame { box-shadow: 0 0 0 2px #2b1b05, 0 20px 60px rgba(0,0,0,.8), 0 0 90px rgba(70,150,255,.45); }
.frame::before { content: ''; position: absolute; inset: calc(var(--cell) * .045); border-radius: 6px; border: 1px solid rgba(60,35,5,.8); pointer-events: none; }
.reels { position: relative; display: grid; grid-template-columns: repeat(5, var(--cell)); gap: var(--gap); background: #050403; border-radius: 6px; padding: var(--gap); }
.reel { position: relative; height: calc(var(--cell) * 3); overflow: hidden; border-radius: 4px;
  background: radial-gradient(ellipse at 50% 40%, #241e15, #0d0b08 75%); box-shadow: inset 0 0 0 1px rgba(233,185,73,.22), inset 0 12px 18px rgba(0,0,0,.7), inset 0 -12px 18px rgba(0,0,0,.7); }
.strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.cell { position: relative; width: var(--cell); height: var(--cell); display: grid; place-items: center; }
.cell img { width: 94%; height: 94%; object-fit: cover; border-radius: 6px; pointer-events: none; }
.cell.sym-WILD img, .cell.sym-SCAT img, .cell.sym-EYE img { object-fit: contain; }
.strip.blur .cell img { filter: blur(1.2px) brightness(.85); }
.cell .orb-val { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: rgba(10,6,2,.85); box-shadow: 0 0 0 1px var(--gold); color: var(--gold-hi); font-weight: 900; font-size: calc(var(--cell) * .14); white-space: nowrap; }
.cell .orb-val.jp-MINI { box-shadow: 0 0 0 1px var(--gold); }
.cell .orb-val.jp-MINOR { color: #b8ffd0; box-shadow: 0 0 0 1px var(--jade); }
.cell .orb-val.jp-MAJOR { color: #c9ecff; box-shadow: 0 0 0 1px var(--lapis-hi); }
.reel.tease { box-shadow: inset 0 0 0 2px var(--lapis-hi), 0 0 24px 4px rgba(89,200,255,.7); }
.reel.tease::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(89,200,255,.25), transparent); background-size: 100% 200%; animation: tease .5s linear infinite; pointer-events: none; }
@keyframes tease { to { background-position: 0 200%; } }
.reel.expanded { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 26px 6px rgba(255,200,80,.6); }
.reel.expanded::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(255,220,120,.35), rgba(255,200,80,.05) 30%, rgba(255,200,80,.05) 70%, rgba(255,220,120,.35)); mix-blend-mode: screen; animation: expand .55s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes expand { from { transform: scaleY(.33); opacity: 0; } to { transform: none; opacity: 1; } }

.cell.win::after { content: ''; position: absolute; inset: 3%; border-radius: 8px; box-shadow: 0 0 0 2px var(--gold-hi), 0 0 18px 4px rgba(255,200,80,.75); pointer-events: none; }
.cell.dim img { filter: brightness(.38) saturate(.6); transition: filter .25s; }
.cell.land img { animation: land .35s ease-out; }
/* character effects: a gold sheen sweeps over the gods now and then; a win makes them glow and throw sparks */
.cell.hero::before { content: ''; position: absolute; inset: 3%; border-radius: 6px; pointer-events: none; z-index: 1;
  background: linear-gradient(115deg, transparent 35%, rgba(255,240,190,.5) 47%, rgba(255,255,255,.8) 50%, rgba(255,240,190,.5) 53%, transparent 65%) no-repeat;
  background-size: 300% 100%; background-position: 150% 0; mix-blend-mode: screen; animation: sheen 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cell.hero img { animation: breathe 4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cell.sym-SCAT img { filter: drop-shadow(0 0 6px rgba(80,180,255,.8)); }
.cell.sym-WILD img { filter: drop-shadow(0 0 6px rgba(255,200,80,.8)); }
@keyframes sheen { 0%, 70% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
@keyframes breathe { 50% { filter: brightness(1.12) drop-shadow(0 0 6px rgba(255,200,90,.55)); } }
.cell.win img { animation: winpulse .9s ease-in-out infinite !important; }
.cell.win::before { animation-duration: 1.4s; animation-delay: 0s; }
@keyframes winpulse { 0%, 100% { transform: scale(1); filter: brightness(1.05) drop-shadow(0 0 4px rgba(255,210,100,.7)); }
  50% { transform: scale(1.1) rotate(-1deg); filter: brightness(1.35) saturate(1.2) drop-shadow(0 0 16px rgba(255,200,80,1)); } }
.spark { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; z-index: 3; pointer-events: none;
  background: #fff6cf; box-shadow: 0 0 6px 2px rgba(255,200,70,.95), 0 0 14px 4px rgba(255,150,30,.5); animation: spark 1.1s ease-out both; }
@keyframes spark { from { transform: translate(0,0) scale(1.4); opacity: 1; } to { transform: translate(calc(var(--x) * 2.2), calc(var(--y) * 2.2)) scale(0); opacity: 0; } }
.cell.dim::before { display: none; }
@keyframes pulse { 50% { transform: scale(1.08); filter: brightness(1.25); } }
@keyframes land { 0% { transform: translateY(-8%); } 60% { transform: translateY(3%); } 100% { transform: none; } }

.lines { position: absolute; inset: calc(var(--cell) * .09 + var(--gap)); width: calc(100% - 2 * (var(--cell) * .09 + var(--gap))); height: calc(100% - 2 * (var(--cell) * .09 + var(--gap))); pointer-events: none; overflow: visible; z-index: 4; }
.lines { filter: drop-shadow(0 0 3px rgba(255,245,210,.9)) drop-shadow(0 0 9px rgba(255,200,90,.45)); }
.lines polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; }
/* Lightsaber: every layer extends from the left end over .45s, then stays solid (no blinking, no running light). */
.lines .ln-blade { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); animation: saber .45s cubic-bezier(.3,.6,.3,1) forwards; }
.lines .ln-glow { stroke-width: 4.5; opacity: .38; }
.lines .ln-core { stroke-width: 1.8; }
.lines .ln-hot { stroke: #fffdf2; stroke-width: .7; }
.lines .ln-hilt { opacity: 0; animation: hilt .45s ease-out forwards; }
@keyframes saber { to { stroke-dashoffset: 0; } }
@keyframes hilt { 0% { opacity: 1; r: 1; } 40% { opacity: .9; r: 4; } 100% { opacity: 0; r: 2; } }

.winpop { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.6); opacity: 0; z-index: 6; pointer-events: none; padding: 10px 26px; border-radius: 12px; background: rgba(8,5,2,.88); box-shadow: 0 0 0 2px var(--gold), 0 0 40px rgba(255,190,70,.6); font-size: calc(var(--cell) * .3); font-weight: 900; color: var(--gold-hi); white-space: nowrap; max-width: 96%; overflow: hidden; text-shadow: 0 0 16px rgba(255,190,70,.7); transition: opacity .2s, transform .3s cubic-bezier(.2,1.5,.4,1); }
.winpop.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.winpop small { display: block; font-size: .42em; letter-spacing: .14em; color: var(--muted); text-align: center; }

/* ---------- Hold & Win board */
.hw-grid { position: absolute; inset: calc(var(--cell) * .09 + var(--gap)); display: grid; grid-template-columns: repeat(5, var(--cell)); grid-template-rows: repeat(3, var(--cell)); grid-auto-flow: column; row-gap: 0; column-gap: var(--gap); background: #050403; opacity: 0; pointer-events: none; transition: opacity .5s; z-index: 5; }
.mode-hw .hw-grid { opacity: 1; }
.hw-cell { position: relative; display: grid; place-items: center; border-radius: 4px; margin: 1px 0; background: radial-gradient(ellipse at 50% 45%, #1c1710, #070605 75%); box-shadow: inset 0 0 0 1px rgba(233,185,73,.25); overflow: hidden; }
.hw-cell::before { content: '☥'; font-family: 'Segoe UI Symbol', 'Noto Sans Symbols', serif; font-size: calc(var(--cell) * .48); color: rgba(233,185,73,.16); }
.hw-cell.rolling::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(255,210,120,.18), transparent); background-size: 100% 300%; animation: roll .35s linear infinite; }
@keyframes roll { to { background-position: 0 300%; } }
.orb { position: absolute; inset: 7%; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: calc(var(--cell) * .22); color: #fff4cc; letter-spacing: -.01em;
  text-shadow: 0 2px 0 #5a3200, 0 0 10px rgba(0,0,0,.6);
  background: radial-gradient(circle at 50% 38%, #ffe7a0 0, #f2b83c 30%, #b06e10 62%, #4a2a03 76%, #e8b54a 79%, #fff0b5 82%, #8b5a12 88%, #2a1702 100%);
  box-shadow: 0 0 18px rgba(255,180,50,.55), inset 0 -6px 14px rgba(70,30,0,.6); animation: orbin .45s cubic-bezier(.2,1.6,.4,1) both; }
.orb::before, .orb::after { content: ''; position: absolute; left: 50%; width: 12%; height: 12%; border-radius: 50%; transform: translateX(-50%); background: radial-gradient(circle at 35% 30%, #c9f4ff, #1aa7c9 60%, #053543); box-shadow: 0 0 6px #4fd3ff; }
.orb::before { top: -4%; } .orb::after { bottom: -4%; }
.orb.o-MINI { font-size: calc(var(--cell) * .17); }
.orb.o-MINOR { font-size: calc(var(--cell) * .16); color: #eafff0; background: radial-gradient(circle at 50% 38%, #c9ffd9 0, #2fd56b 30%, #0f7a37 62%, #032611 76%, #e8b54a 79%, #fff0b5 82%, #8b5a12 88%, #2a1702 100%); box-shadow: 0 0 20px rgba(40,220,110,.6), inset 0 -6px 14px rgba(0,40,10,.6); }
.orb.o-MAJOR { font-size: calc(var(--cell) * .16); color: #eaf6ff; background: radial-gradient(circle at 50% 38%, #d0edff 0, #3c86ff 30%, #1534a8 62%, #050e3b 76%, #e8b54a 79%, #fff0b5 82%, #8b5a12 88%, #2a1702 100%); box-shadow: 0 0 22px rgba(60,140,255,.7), inset 0 -6px 14px rgba(0,10,50,.6); }
.orb.o-GRAND { font-size: calc(var(--cell) * .16); color: #fff0ee; background: radial-gradient(circle at 50% 38%, #ffd0c8 0, #ff4a3d 30%, #a5121a 62%, #3b0306 76%, #e8b54a 79%, #fff0b5 82%, #8b5a12 88%, #2a1702 100%); box-shadow: 0 0 24px rgba(255,60,50,.75), inset 0 -6px 14px rgba(50,0,0,.6); }
.orb.collect { animation: collect .5s ease both; }
@keyframes orbin { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
@keyframes collect { 50% { transform: scale(1.18); filter: brightness(1.6); } }

/* ---------- controls */
.controls { width: 100%; max-width: 1240px; display: grid; align-items: center; gap: 10px; padding: 8px 12px;
  grid-template-columns: auto minmax(110px, 1fr) auto auto auto auto minmax(110px, 1fr) auto auto;
  grid-template-areas: 'info bal bet autop spin turbo win trial snd';
  border-radius: 14px; background: linear-gradient(180deg, rgba(25,20,13,.92), rgba(9,7,4,.95)); box-shadow: 0 0 0 1.5px #7b571b, 0 0 0 4px rgba(0,0,0,.5), 0 -6px 30px rgba(0,0,0,.6); }
.c-info { grid-area: info; } .c-bal { grid-area: bal; } .c-bet { grid-area: bet; } .c-auto { grid-area: autop; } .c-spin { grid-area: spin; }
.c-turbo { grid-area: turbo; } .c-win { grid-area: win; } .c-trial { grid-area: trial; } .c-snd { grid-area: snd; }
.panel { display: grid; justify-items: center; padding: 6px 12px; border-radius: 8px; background: #070604; box-shadow: inset 0 0 0 1px #6d4c17, inset 0 4px 10px rgba(0,0,0,.8); min-width: 0; }
.panel span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.panel b { font-size: clamp(15px, 1.8vw, 22px); color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel.win b { color: var(--gold-hi); }
.panel.bet { grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.panel.bet > div { display: grid; justify-items: center; min-width: 64px; }
.round-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--gold-grad); color: #2a1702; font-weight: 900; font-size: 20px; line-height: 1; box-shadow: 0 0 0 2px #2c1b04, 0 0 0 3px #b9892c; }
.round-btn:disabled { filter: grayscale(.8) brightness(.5); }
.spin { position: relative; border: 0; background: none; padding: 0; width: clamp(140px, 14vw, 190px); justify-self: center; transition: transform .12s, filter .2s; }
.spin img { width: 100%; height: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,.7)); }
.spin:hover:not(:disabled) { transform: scale(1.04); filter: brightness(1.12); }
.spin:active:not(:disabled) { transform: scale(.97); }
.spin.busy img { filter: brightness(.7) saturate(.7) drop-shadow(0 6px 18px rgba(0,0,0,.7)); }
.spin.busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; border: 3px solid transparent; border-top-color: var(--lapis-hi); border-bottom-color: var(--gold-hi); animation: spinring .8s linear infinite; }
@keyframes spinring { to { transform: translate(-50%,-50%) rotate(1turn); } }
.spin-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-weight: 900; font-size: 22px; color: #fff; text-shadow: 0 0 10px var(--lapis-hi), 0 2px 0 #001; pointer-events: none; }
.spin-label:empty { display: none; }
.pill { border: 0; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: linear-gradient(180deg, #2a2418, #0f0c08); color: var(--gold-hi); box-shadow: inset 0 0 0 1.5px #a37828; white-space: nowrap; }
.pill[aria-pressed="true"], .pill.on { background: linear-gradient(180deg, #2f6cff, #12318a); box-shadow: inset 0 0 0 1.5px var(--lapis-hi), 0 0 12px rgba(89,200,255,.5); color: #fff; }
.pill:disabled { opacity: .4; }
.pill-trial:not(:disabled) { background: linear-gradient(180deg, #b91c24, #4a0508); box-shadow: inset 0 0 0 1.5px #ff8a6b, 0 0 14px rgba(255,60,40,.6); color: #fff; animation: trial 1.4s ease-in-out infinite; }
@keyframes trial { 50% { box-shadow: inset 0 0 0 1.5px #ffd0b8, 0 0 22px rgba(255,60,40,.95); } }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #263c53, #0a121b); box-shadow: 0 0 0 2px #1b1206, 0 0 0 3.5px #c89a3a; justify-self: center; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--gold-hi); stroke-width: 2; stroke-linecap: round; }
#btn-sound svg path:first-child { fill: var(--gold-hi); }
#btn-sound[aria-pressed="false"] .wave { opacity: .15; }
footer.foot { width: 100%; max-width: 1240px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; padding: 8px 12px 12px; font-size: 11px; letter-spacing: .06em; color: var(--muted); font-family: system-ui, sans-serif; }
footer.foot b { color: var(--text); font-weight: 600; }
footer.foot .age { width: 22px; height: 22px; font-size: 9px; }

/* ---------- popups and modals */
.pop { position: fixed; z-index: 30; padding: 14px; border-radius: 12px; background: #0f0c08; box-shadow: 0 0 0 1.5px #a37828, 0 12px 40px rgba(0,0,0,.8); font-family: system-ui, sans-serif; font-size: 13px; display: grid; gap: 10px; }
.pop p { margin: 0; font-family: var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi); }
.pop label { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.auto-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.auto-grid button { border: 0; border-radius: 8px; padding: 10px 0; background: var(--gold-grad); color: #2a1702; font-weight: 800; font-family: var(--serif); }

.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.72); backdrop-filter: blur(3px); animation: fade .3s ease; }
.modal[hidden], .bigwin[hidden], .pop[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; width: min(760px, 100%); max-height: calc(100svh - 32px); overflow: auto; border-radius: 16px; background: linear-gradient(180deg, #17120b, #0a0805); box-shadow: 0 0 0 2px #2b1b05, 0 0 0 4px #c89a3a, 0 30px 90px rgba(0,0,0,.9); animation: rise .45s ease both; }
.modal-card.story { text-align: center; overflow: hidden; }
.story-art { height: clamp(180px, 34svh, 320px); background: center / cover no-repeat; position: relative; }
.story-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, #0f0b07); }
.story-body { padding: 4px 24px 24px; display: grid; gap: 10px; justify-items: center; }
.kicker { margin: 0; font-size: 12px; letter-spacing: .4em; text-transform: uppercase; color: var(--lapis-hi); }
.modal-card h2 { margin: 0; font-size: clamp(24px, 4vw, 38px); line-height: 1.1; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #3a2405); }
.modal-card p { margin: 0; line-height: 1.55; color: #eadbb5; font-size: 15px; }
.big-num { font-size: clamp(36px, 7vw, 64px); font-weight: 900; color: var(--gold-hi); text-shadow: 0 0 24px rgba(255,190,70,.6); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.close-x { position: absolute; right: 10px; top: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: var(--gold-hi); font-size: 20px; box-shadow: inset 0 0 0 1.5px #a37828; }

/* Ammit's Trial */
.trial { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: stretch; min-height: min(480px, calc(100svh - 80px)); }
.modal-card:has(.trial) { width: min(1040px, 100%); }
.trial-scales { min-width: 0; }
.trial-scales { position: relative; background: #000; overflow: hidden; min-height: 280px; }
.trial-scales img, .trial-scales video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.trial-scales video { z-index: 1; }
/* fallback when the film cannot play: the still sways, as before */
.trial-scales.fallback img { transform-origin: 50% 24%; transform: scale(1.24); transition: filter .6s; }
.trial-scales.fallback.pass img { transform: rotate(6deg) scale(1.24); filter: brightness(1.2) saturate(1.2); }
.trial-scales.fallback.fail img { transform: rotate(-6deg) scale(1.24); filter: brightness(.6) sepia(.6) hue-rotate(-30deg) saturate(2); }
.trial-scales.weighing::after { content: ''; position: absolute; inset: 0; pointer-events: none;  z-index: 2; box-shadow: inset 0 0 60px 10px rgba(0,0,0,.7); }
.trial-ammit { position: absolute; inset: 0; background: url(../img/bg/bonus.webp) center / cover; opacity: 0; transition: opacity .5s; }
.trial-scales.fallback.fail .trial-ammit { opacity: .95; animation: devour .6s ease; }
@keyframes devour { from { transform: scale(1.4); } }
.trial-side { padding: 26px 22px; display: grid; gap: 12px; align-content: center; justify-items: center; text-align: center; }
.trial-stakes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.trial-stakes div { padding: 8px; border-radius: 8px; background: #070604; box-shadow: inset 0 0 0 1px #6d4c17; }
.trial-stakes span { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.trial-stakes b { font-size: 22px; color: #fff; }
.trial-msg { min-height: 3em; }
.trial-msg.good { color: #b8ffd0 !important; }
.trial-msg.bad { color: #ff9a8a !important; }

/* Info */
.info-head { display: flex; gap: 6px; padding: 14px 56px 0 14px; flex-wrap: wrap; position: sticky; top: 0; background: #15100a; z-index: 1; border-bottom: 1px solid #3a2a10; }
.tab { border: 0; background: none; padding: 10px 12px; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; }
.tab[aria-selected="true"] { color: var(--gold-hi); border-bottom-color: var(--gold); }
.tabpane { padding: 18px 20px 24px; display: grid; gap: 14px; font-family: system-ui, sans-serif; font-size: 14px; }
.tabpane h3 { margin: 6px 0 0; font-family: var(--serif); color: var(--gold-hi); letter-spacing: .08em; font-size: 17px; }
.tabpane p, .tabpane li { color: #e6d6b0; line-height: 1.55; margin: 0; }
.tabpane ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pay { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: #0a0805; box-shadow: inset 0 0 0 1px #4a3510; }
.pay img { width: 58px; height: 58px; border-radius: 6px; object-fit: cover; }
.pay dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; font-size: 13px; }
.pay dt { color: var(--muted); } .pay dd { margin: 0; color: #fff; font-variant-numeric: tabular-nums; }
.pay .pname { grid-column: 1 / -1; font-family: var(--serif); font-size: 12px; color: var(--gold-hi); letter-spacing: .06em; }
.feature { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.feature img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px #8a6420; }
.journey { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.chapter { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 4; background: center / cover; box-shadow: 0 0 0 1px #8a6420; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; text-align: center; }
.chapter::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.92)); }
.chapter b, .chapter span { position: relative; }
.chapter b { font-family: var(--serif); font-size: 13px; color: var(--gold-hi); letter-spacing: .05em; }
.chapter span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.lines-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.lines-mini svg { width: 100%; height: auto; background: #0a0805; border-radius: 4px; box-shadow: inset 0 0 0 1px #4a3510; }

/* Big win */
.bigwin { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(80,45,0,.65), rgba(0,0,0,.88)); cursor: pointer; animation: fade .3s; overflow: hidden; }
.bigwin::before { content: ''; position: absolute; width: 160vmax; height: 160vmax; background: repeating-conic-gradient(from 0deg, rgba(255,200,80,.14) 0 8deg, transparent 8deg 20deg); animation: rays 14s linear infinite; }
@keyframes rays { to { transform: rotate(1turn); } }
.bigwin-inner { position: relative; text-align: center; }
.bigwin-title { margin: 0; font-size: clamp(40px, 9vw, 110px); font-weight: 900; letter-spacing: .04em; text-transform: uppercase; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #3a2405) drop-shadow(0 0 30px rgba(255,180,50,.6)); animation: bwpop .7s cubic-bezier(.2,1.6,.4,1) both; }
.bigwin-amount { margin: 0; font-size: clamp(34px, 7vw, 80px); font-weight: 900; color: #fff; text-shadow: 0 0 20px rgba(255,200,80,.9), 0 3px 0 #5a3200; font-variant-numeric: tabular-nums; }
.bigwin-hint { margin: 16px 0 0; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
@keyframes bwpop { from { transform: scale(.3); opacity: 0; } }
.coin { position: absolute; top: -40px; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff5c9, #e9b949 50%, #7a4b0b); box-shadow: 0 0 10px rgba(255,190,60,.8); animation: fall linear forwards; display: grid; place-items: center; color: #6a3f05; font-size: 18px; font-weight: 900; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }

.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 35; padding: 10px 18px; border-radius: 999px; background: #0f0c08; box-shadow: 0 0 0 1.5px #a37828; font-family: system-ui, sans-serif; font-size: 13px; animation: rise .3s ease; }
.noscript { position: fixed; inset: auto 0 0; z-index: 99; text-align: center; padding: 12px; background: #400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- responsive */
@media (max-width: 980px) {
  :root { --cell: min(calc((100vw - 52px) / 5), calc((100svh - 410px) / 3), 150px); }
  .controls { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 8px;
    grid-template-areas: 'bal bal spin spin win win' 'bet bet spin spin trial trial' 'info autop autop turbo turbo snd'; }
  .c-trial { justify-self: stretch; }
  .c-auto, .c-turbo { justify-self: stretch; }
  .spin { width: 130px; }
  .jp { grid-template-columns: 12px 48px minmax(60px, auto); font-size: 10px; padding: 2px 6px; gap: 5px; }
  .jp i { width: 11px; height: 11px; } .jp b { font-size: 13px; }
}
@media (max-width: 560px) {
  :root { --cell: min(calc((100vw - 44px) / 5), calc((100svh - 400px) / 3)); }
  .game { padding: 6px 10px 0; gap: 4px; }
  .top { align-items: center; }
  .logo img { width: 116px; }
  .controls { gap: 6px; padding: 8px; border-radius: 12px; }
  .spin { width: 108px; }
  .panel { padding: 4px 6px; } .panel span { font-size: 9px; }
  .round-btn { width: 26px; height: 26px; font-size: 16px; flex: none; }
  .panel.bet { gap: 3px; padding: 4px; } .panel.bet > div { min-width: 0; }
  .panel b { font-size: 15px; }
  .banner { font-size: 12px; padding: 6px 12px; letter-spacing: .06em; min-width: 0; width: calc(100vw - 24px); }
  .jackpots { max-width: 58vw; } .jp { grid-template-columns: 11px auto minmax(0, 1fr); } .jp b { overflow: hidden; text-overflow: ellipsis; }
  .pill { padding: 8px 8px; font-size: 11px; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; }
  .c-trial { white-space: normal; line-height: 1.15; padding: 6px 8px; font-size: 10px; letter-spacing: .04em; }
  .icon-btn { width: 36px; height: 36px; }
  .modal-card:has(.trial) { height: calc(100svh - 24px); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
  .trial { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; flex: 1; min-height: 0; }
  .trial-scales { min-height: 0; height: 100%; }
  .trial-side { padding: 12px 14px 16px; gap: 8px; }
  .trial-side .kicker { display: none; }
  .trial-side h2 { font-size: 24px; }
  .trial-desc { font-size: 13px !important; line-height: 1.4 !important; }
  .trial-stakes b { font-size: 18px; }
  .trial-msg { min-height: 1.6em; font-size: 14px !important; }
  .trial .btn-row { margin-top: 0; gap: 8px; }
  .trial .btn { padding: 10px 18px; }
  .feature { grid-template-columns: 64px 1fr; } .feature img { width: 64px; height: 64px; }
  footer.foot { font-size: 10px; gap: 4px 12px; }
}
@media (max-height: 600px) and (orientation: landscape) {
  :root { --cell: min(calc((100svh - 150px) / 3), calc((100vw - 300px) / 5)); }
  .game { grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; padding: 6px 12px 0; column-gap: 12px; }
  .top { grid-column: 1; grid-row: 1; flex-direction: column; align-items: center; justify-content: center; }
  .machine { grid-column: 2; grid-row: 1; }
  .controls { grid-column: 1 / -1; grid-row: 2; padding: 4px 10px; grid-template-columns: auto minmax(90px, 1fr) auto auto auto auto minmax(90px, 1fr) auto auto;
    grid-template-areas: 'info bal bet autop spin turbo win trial snd'; }
  .spin { width: 100px; }
  footer.foot { display: none; }
  .banner { padding: 4px 18px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.cell.dim img { animation: none !important; }

/* ================================================================ extra visual effects */
/* god rays drifting through the tomb, and slow floating dust */
.rays { position: absolute; inset: -20%; pointer-events: none; mix-blend-mode: screen; opacity: .55;
  background: repeating-conic-gradient(from 200deg at 50% -10%, transparent 0 7deg, rgba(255,200,110,.07) 9deg 12deg, transparent 14deg 22deg);
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 75%); mask-image: linear-gradient(180deg, #000 10%, transparent 75%);
  animation: rays-drift 26s ease-in-out infinite alternate; }
.mode-free .rays { background: repeating-conic-gradient(from 200deg at 50% -10%, transparent 0 7deg, rgba(110,190,255,.09) 9deg 12deg, transparent 14deg 22deg); }
@keyframes rays-drift { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.dust { position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(1px 1px at 12% 30%, #ffe9b0, transparent), radial-gradient(1.5px 1.5px at 72% 18%, #ffe9b0, transparent),
    radial-gradient(1px 1px at 44% 64%, #ffe9b0, transparent), radial-gradient(1px 1px at 86% 72%, #ffe9b0, transparent),
    radial-gradient(1.5px 1.5px at 28% 86%, #ffe9b0, transparent), radial-gradient(1px 1px at 58% 40%, #ffe9b0, transparent);
  background-size: 420px 420px; animation: dust-float 40s linear infinite; }
@keyframes dust-float { to { background-position: 140px -420px; } }

/* a light sweeps around the gold frame */
.frame { isolation: isolate; }
.frame-sweep { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; overflow: hidden;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); padding: calc(var(--cell) * .09); }
.frame-sweep::before { content: ''; position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; transform: translate(-50%,-50%);
  background: conic-gradient(from 0deg, transparent 0 290deg, rgba(255,240,190,.35) 315deg, #fff 342deg, rgba(255,250,220,0) 356deg); filter: blur(2px) brightness(1.4);
  animation: frame-spin 6s linear infinite; mix-blend-mode: screen; }
.mode-free .frame-sweep::before { background: conic-gradient(from 0deg, transparent 0 300deg, rgba(160,220,255,.95) 340deg, transparent 355deg); animation-duration: 3s; }
@keyframes frame-spin { to { transform: translate(-50%,-50%) rotate(1turn); } }
.reels { z-index: 1; }

/* screen shake */
.frame.shake1 { animation: shake1 .45s ease; } .frame.shake2 { animation: shake2 .6s ease; } .frame.shake3 { animation: shake3 .7s ease; }
@keyframes shake1 { 20% { transform: translate(-2px, 1px); } 40% { transform: translate(2px, -1px); } 60% { transform: translate(-1px, 1px); } 80% { transform: translate(1px, 0); } }
@keyframes shake2 { 15% { transform: translate(-5px, 2px) rotate(-.3deg); } 30% { transform: translate(5px, -2px) rotate(.3deg); } 45% { transform: translate(-4px, 1px); } 60% { transform: translate(3px, -1px); } 80% { transform: translate(-1px, 0); } }
@keyframes shake3 { 10% { transform: translate(-8px, 3px) rotate(-.5deg); } 22% { transform: translate(8px, -3px) rotate(.5deg); } 34% { transform: translate(-7px, 2px) rotate(-.3deg); } 48% { transform: translate(6px, -2px); } 62% { transform: translate(-4px, 1px); } 80% { transform: translate(2px, 0); } }

/* full-screen flash */
.screen-flash { position: fixed; inset: 0; z-index: 44; pointer-events: none; animation: sflash .8s ease-out forwards; }
.flash-gold { background: radial-gradient(circle at 50% 45%, rgba(255,235,170,.85), rgba(255,170,40,.35) 45%, transparent 75%); }
.flash-blue { background: radial-gradient(circle at 50% 45%, rgba(190,235,255,.85), rgba(60,140,255,.35) 45%, transparent 75%); }
@keyframes sflash { from { opacity: 1; } to { opacity: 0; } }

/* effects layer over the reels */
.fx-layer { position: absolute; inset: calc(var(--cell) * .09 + var(--gap)); pointer-events: none; z-index: 5; }
.fx { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.fx-dust { top: 100%; width: calc(var(--cell) * 1.2); height: calc(var(--cell) * .4); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, rgba(255,220,150,.55), rgba(160,110,40,.25) 45%, transparent 70%); animation: fx-dust .8s ease-out forwards; }
@keyframes fx-dust { from { opacity: .9; transform: translate(-50%, -70%) scale(.5, .3); } to { opacity: 0; transform: translate(-50%, -90%) scale(1.2, 1); } }
.fx-ring { width: var(--cell); height: var(--cell); border-radius: 50%; animation: fx-ring .85s ease-out forwards; }
.fx-ring-gold { box-shadow: 0 0 0 3px rgba(255,225,140,.95), 0 0 24px 8px rgba(255,180,50,.7), inset 0 0 20px rgba(255,210,100,.6); }
.fx-ring-blue { box-shadow: 0 0 0 3px rgba(170,230,255,.95), 0 0 26px 10px rgba(60,150,255,.75), inset 0 0 22px rgba(120,200,255,.6); }
@keyframes fx-ring { from { opacity: 1; transform: translate(-50%, -50%) scale(.35); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }
.fx-bolt { width: calc(var(--cell) * 1.1); height: calc(var(--cell) * 1.1); animation: fx-bolt 1s steps(1) forwards;
  background:
    linear-gradient(115deg, transparent 46%, #e8f8ff 48%, #7fd3ff 50%, transparent 52%) 10% 0 / 40% 55% no-repeat,
    linear-gradient(65deg, transparent 46%, #e8f8ff 48%, #7fd3ff 50%, transparent 52%) 30% 45% / 40% 55% no-repeat,
    linear-gradient(245deg, transparent 46%, #e8f8ff 48%, #7fd3ff 50%, transparent 52%) 85% 10% / 35% 50% no-repeat,
    linear-gradient(295deg, transparent 46%, #e8f8ff 48%, #7fd3ff 50%, transparent 52%) 70% 60% / 35% 45% no-repeat;
  filter: drop-shadow(0 0 6px #6fd0ff) drop-shadow(0 0 14px #2a7dff); }
@keyframes fx-bolt { 0% { opacity: 1; } 12% { opacity: 0; } 22% { opacity: 1; transform: translate(-50%, -50%) scaleX(-1); } 34% { opacity: 0; } 46% { opacity: .8; transform: translate(-50%, -50%) rotate(20deg); } 60%, 100% { opacity: 0; } }
.fx-flare { width: calc(var(--cell) * 1.4); height: calc(var(--cell) * 1.4); border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,250,220,.95) 0 6%, rgba(255,210,110,.6) 14%, rgba(255,170,40,.18) 34%, transparent 60%),
    conic-gradient(from 0deg, transparent 0 40deg, rgba(255,230,160,.5) 45deg, transparent 50deg 130deg, rgba(255,230,160,.5) 135deg, transparent 140deg 220deg, rgba(255,230,160,.5) 225deg, transparent 230deg 310deg, rgba(255,230,160,.5) 315deg, transparent 320deg);
  animation: fx-flare .85s ease-out forwards; }
@keyframes fx-flare { from { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0); } 25% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -50%) scale(1.15) rotate(45deg); } }

/* coins flying to the Win panel */
.fly-coin { position: fixed; z-index: 43; width: 22px; height: 22px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff8d6, #f2c14e 45%, #9a650f 80%); box-shadow: 0 0 10px 2px rgba(255,190,60,.75); }
.panel.win.bump { animation: bump .25s ease; }
@keyframes bump { 50% { transform: scale(1.06); box-shadow: inset 0 0 0 1px #ffe08a, 0 0 18px rgba(255,200,80,.7); } }

/* Spin button: a soft halo breathes while waiting for a spin */
.spin:not(.busy)::before { content: ''; position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%;
  box-shadow: 0 0 22px 6px rgba(89,200,255,.55); animation: halo 2.4s ease-in-out infinite; pointer-events: none; z-index: -1; }
@keyframes halo { 50% { box-shadow: 0 0 34px 12px rgba(89,200,255,.85); } }

/* jackpot values shimmer */
.jp b { background: linear-gradient(100deg, #fff 40%, #ffe6a0 50%, #fff 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: jp-shimmer 5s linear infinite; }
.jp-major b { animation-delay: -1.2s; } .jp-minor b { animation-delay: -2.4s; } .jp-mini b { animation-delay: -3.6s; }
@keyframes jp-shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

/* the anticipation reel glows harder */
.reel.tease { animation: tease-glow .5s ease-in-out infinite alternate; }
@keyframes tease-glow { to { box-shadow: inset 0 0 0 2px #bdf0ff, 0 0 40px 10px rgba(89,200,255,.9); } }

@media (prefers-reduced-motion: reduce) { .rays, .dust, .frame-sweep::before, .jp b, .spin::before { animation: none !important; } }

/* sound menu: two switches */
.sound-menu { min-width: 220px; }
.sw { position: relative; cursor: pointer; color: var(--text) !important; font-size: 14px; padding: 2px 0; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-track { flex: none; width: 40px; height: 22px; border-radius: 999px; background: #2a241a; box-shadow: inset 0 0 0 1.5px #6d4c17; position: relative; transition: background .2s; }
.sw-track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #8c7a55; transition: transform .2s, background .2s; }
.sw input:checked + .sw-track { background: linear-gradient(180deg, #2f6cff, #12318a); box-shadow: inset 0 0 0 1.5px var(--lapis-hi); }
.sw input:checked + .sw-track::after { transform: translateX(18px); background: #fff; }
.sw input:focus-visible + .sw-track { outline: 2px solid var(--lapis-hi); outline-offset: 2px; }
.sw kbd { margin-left: auto; font: 11px system-ui, sans-serif; color: var(--muted); border: 1px solid #4a3510; border-radius: 4px; padding: 1px 5px; }
#btn-sound.partial .wave { opacity: .45; }

/* Offline fallback notice (js/outcome.js could not reach the game server at start-up) */
.offline-note { position: fixed; z-index: 40; left: 50%; bottom: 4px; transform: translateX(-50%); margin: 0; width: max-content; max-width: min(680px, 92vw); pointer-events: none; padding: 6px 14px; border-radius: 10px; background: rgba(90,20,10,.85); box-shadow: inset 0 0 0 1px #ff9a6b; color: #ffe2d2; font-size: 13px; line-height: 1.35; text-align: center; }
.offline-note[hidden] { display: none; }

/* An operator real-money session: no demo wording. */
body.real-money .demo-only { display: none !important; }
