/* Roulette, Monster Derby, and Crash: projector and phones. */

/* ---------------- shared projector frame ---------------- */
#sc-roulette, #sc-derby, #sc-crash { padding: 0.5vh 2vw 1.5vh; }
/* roulette: starfield shows through; only the wheel and panels are colored */
/* derby: starfield shows through */
/* crash: starfield shows through */
.wg { display: grid; grid-template-rows: auto 1fr; gap: 1vh; height: 100%; }
.wg.shake, .shake > .wg { animation: ct-shake .5s linear; }
.wg-head { display: flex; justify-content: space-between; align-items: center; gap: 2vw; }
.wg-title { display: flex; align-items: center; gap: 1vw; }
.wg-title span { font-size: 7vh; filter: drop-shadow(0 0 2vh rgba(255, 255, 255, .3)); }
/* projector title signs are real casino marquees: bulb frame that chases, a glint sweeping the letters */
.dx .wg-title { position: relative; padding: 1.2vh 2.2vw 1.2vh 1.6vw; border-radius: 1.8vh; background: linear-gradient(180deg, rgba(40, 14, 30, .92), rgba(16, 6, 14, .95)); box-shadow: 0 1.2vh 3vh rgba(0, 0, 0, .55), inset 0 0 0 .3vh rgba(255, 196, 70, .35); isolation: isolate; }
/* the bulbs chase by blinking, like a real marquee: two rows of bulbs half a bulb apart take turns. Nothing slides, so
   there is no tiny jump when the loop starts over (a sliding pattern never lines up exactly with the screen's pixels) */
.dx .wg-title::before, .dx .wg-title::after { content: ""; position: absolute; inset: .5vh; border-radius: 1.4vh; pointer-events: none; z-index: -1;
    background: radial-gradient(circle, #fffbe0 0 .32vh, #ffc23a .5vh, transparent .75vh) 0 0 / 2.2vh 2.2vh repeat-x, radial-gradient(circle, #fffbe0 0 .32vh, #ffc23a .5vh, transparent .75vh) 0 100% / 2.2vh 2.2vh repeat-x;
    filter: drop-shadow(0 0 .5vh #ffb02e); animation: wg-marq .9s steps(1) infinite; }
.dx .wg-title::after { background-position: 1.1vh 0, 1.1vh 100%; animation-delay: -.45s; }
@keyframes wg-marq { 0% { opacity: 1; } 50% { opacity: .18; } }
.dx .wg-title b { position: relative; background-image: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, .95) 48%, transparent 58%), linear-gradient(180deg, #fff6c8, #ffc23a 60%, #d8791a); background-size: 250% 100%, 100% 100%; background-repeat: no-repeat; animation: wg-glint 4.5s ease-in-out infinite; }
@keyframes wg-glint { 0% { background-position: 160% 0, 0 0; } 45%, 100% { background-position: -60% 0, 0 0; } }
.dx .wg-title > span { animation: wg-flicker 5s steps(1) infinite; }
@keyframes wg-flicker { 0%, 100% { opacity: 1; } 71% { opacity: .55; } 72% { opacity: 1; } 74% { opacity: .7; } 75% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dx .wg-title::before, .dx .wg-title::after, .dx .wg-title b, .dx .wg-title > span { animation: none; } }
.wg-title .wg-ico { width: 1em; height: 1em; display: block; animation: wg-icospin 6s linear infinite; }
@keyframes wg-icospin { to { transform: rotate(360deg); } }
.wg-title b { white-space: nowrap; font-family: var(--display); font-weight: 900; font-size: 6.4vh; text-transform: uppercase; background: linear-gradient(180deg, #fff6c8, #ffc23a 60%, #d8791a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .5vh 0 rgba(0, 0, 0, .5)); }
.wg-phase { display: flex; align-items: center; gap: 1.2vw; font-size: 3.4vh; white-space: nowrap; }
.wg-phase .muted { font-size: 2.4vh; }
.wg-timer { display: inline-flex; align-items: center; gap: .6vw; margin-left: 1vw; padding: .5vh 1.4vw; border-radius: 999px; background: color-mix(in srgb, var(--pumpkin) 22%, transparent);
    font-weight: 800; font-size: 2.6vh; color: var(--text); white-space: nowrap; vertical-align: middle; }
.wg-timer b { font-family: var(--display); font-variant-numeric: tabular-nums; color: var(--pumpkin); font-size: 3.2vh; }
.wg-timer.low { background: color-mix(in srgb, var(--blood) 28%, transparent); animation: bg-pulse .6s ease-in-out infinite; }
.wg-timer.low b { color: #ff6377; }
.wg-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2vw; min-height: 0; }
.wg-roulette .wg-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.7fr); gap: 2vw; align-items: stretch; }
.wg-wheelcol { position: relative; display: grid; min-height: 0; place-items: center; justify-self: stretch; width: 100%; height: 100%; }
.wg-roulette .wg-wheel { position: relative; width: 100%; height: 100%; min-height: 0; }
.wg-roulette .rr-num { width: 20vh; height: 20vh; font-size: 10vh; }
/* centered scene modal: No More Bets while spinning, winning number on reveal */
.rt-modal { position: absolute; inset: 0; z-index: 20; display: none; place-items: center; pointer-events: none; }
.rt-modal.on { display: grid; }
.rt-card { display: grid; justify-items: center; gap: 1.4vh; padding: 4vh 5vw; border-radius: 3vh; background: rgba(8, 10, 22, .9); box-shadow: 0 2vh 8vh rgba(0,0,0,.7), inset 0 0 0 .4vh rgba(255,216,74,.4), 0 0 12vh rgba(255,216,74,.3); animation: rt-cardin .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.rt-card-lbl { font-family: var(--display); font-weight: 900; font-size: 3vh; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.rt-card.nomore { background: rgba(200, 16, 46, .92); box-shadow: 0 2vh 8vh rgba(0,0,0,.7), inset 0 0 0 .4vh #fff, 0 0 12vh rgba(255,60,90,.5); animation: rt-nomore-dock 2.4s cubic-bezier(.3, 1.2, .4, 1) both, rt-nomoreglow .9s ease-in-out infinite; }
/* pops in dead center, holds a beat, then docks up top so the ball stays in view for the whole spin */
@keyframes rt-nomore-dock { 0% { opacity: 0; transform: scale(.3) rotate(-6deg); } 16% { opacity: 1; transform: scale(1.08); } 24% { transform: scale(1); } 58% { transform: translate(0, 0) scale(1); } 100% { transform: translate(4vw, -34vh) scale(.4); } }
@keyframes rt-nomoreglow { 50% { box-shadow: 0 2vh 8vh rgba(0,0,0,.7), inset 0 0 0 .4vh #fff, 0 0 18vh rgba(255,60,90,.85); } }
.rt-nomore { font-family: var(--display); font-weight: 900; font-size: 7vh; letter-spacing: .06em; color: #fff; text-shadow: 0 .5vh 0 rgba(0,0,0,.4); }
@keyframes rt-cardin { from { opacity: 0; transform: scale(.3) rotate(-6deg); } to { opacity: 1; transform: none; } }
/* the felt betting table */
.rt-felt { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 3vh 1.8vw; border-radius: 1.6vh; background: radial-gradient(ellipse at 50% 30%, #1c7a4b, #0b4128 78%); box-shadow: inset 0 0 0 .4vh #d9b35a, inset 0 0 0 .8vh #5a3a14, 0 1.5vh 4vh rgba(0,0,0,.5); min-height: 0; height: 100%; }
.rt-grid { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; gap: .5vh .5vw; }
.rt-zero { grid-row: 1 / 3; display: grid; }
.rt-nums { grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(3, 1fr); gap: .4vh .35vw; }
.rt-doz { grid-column: 2; grid-row: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: .35vw; }
.rt-out { grid-column: 1 / 3; grid-row: 4; display: grid; grid-template-columns: repeat(6, 1fr); gap: .35vw; margin-top: .5vh; }
.rt-c { border: .15vh solid rgba(255,255,255,.35); border-radius: .6vh; color: #fff; font-family: var(--display); font-weight: 800; font-size: 2.6vh; padding: .6vh 0; min-height: 6vh; display: grid; place-items: center; cursor: default; transition: transform .3s, box-shadow .3s; }
.rt-c.red { background: #c8102e; } .rt-c.black { background: #1a1a1f; } .rt-c.green { background: #138a4a; }
.rt-c.z { width: 3.4vw; height: 100%; font-size: 2.6vh; }
.rt-c.is-win { transform: scale(1.25); box-shadow: 0 0 0 .5vh #ffd84a, 0 0 5vh #ffd84a; z-index: 4; animation: rt-winflash .45s ease-in-out infinite; }
@keyframes rt-winflash { 0%, 100% { box-shadow: 0 0 0 .5vh #ffd84a, 0 0 5vh #ffd84a; } 50% { box-shadow: 0 0 0 .7vh #fff, 0 0 8vh #fff; transform: scale(1.32); } }
.rt-o { border: .15vh solid rgba(255,255,255,.3); border-radius: .6vh; background: rgba(0,0,0,.28); color: #fff; font-weight: 800; font-size: 2.3vh; padding: 1.2vh 0; letter-spacing: .04em; }
.rt-o.red { background: rgba(200,16,46,.55); } .rt-o.black { background: rgba(20,20,25,.7); }
/* floating name bubbles */
.rt-bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.rt-bub { position: absolute; bottom: -2%; transform: translateX(-50%); padding: .7vh 1.1vw; border-radius: 999px; white-space: nowrap; z-index: 3;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(230,224,240,.92)); color: #1a1206; box-shadow: 0 .6vh 1.6vh rgba(0,0,0,.5);
    font-weight: 800; font-size: 2vh; animation: rt-float 3.2s ease-out forwards; }
.rt-bub b { color: #7a1fd0; } .rt-bub span { font-weight: 700; opacity: .8; }
@keyframes rt-float { 0% { opacity: 0; transform: translate(-50%, 2vh) scale(.7); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--drift, 0)), -30vh) scale(1); } }
.wg-side { display: grid; grid-template-rows: auto auto 1fr auto; gap: 1.4vh; min-height: 0;
    padding: 2vh 1.6vw; border-radius: 2vh; background: linear-gradient(180deg, rgba(30, 20, 55, .78), rgba(14, 9, 26, .82)); box-shadow: inset 0 0 0 .2vh rgba(255, 255, 255, .08), 0 1.5vh 4vh rgba(0, 0, 0, .5); }
.wg-tot { display: flex; gap: 1.4vw; font-weight: 800; font-size: 2.4vh; }
.wg-tot b { color: var(--gold); font-size: 3vh; }
.wg-feed { display: grid; gap: .7vh; align-content: start; overflow: hidden; }
.wg-feed.row { display: flex; flex-wrap: wrap; gap: .8vh 1vw; max-height: 10vh; overflow: hidden; }
.wg-bet { padding: .8vh 1vw; border-radius: 1vh; background: rgba(0, 0, 0, .4); border-left: .5vh solid var(--gold); font-size: 2.1vh; animation: ct-toast .4s both; }
.wg-bet em { font-style: normal; font-weight: 900; margin-left: .6vw; }
.wg-bet em.win { color: #2fd683; } .wg-bet em.lose { color: #ff5a6e; }
.wg-hist { display: flex; align-items: center; gap: .6vw; flex-wrap: wrap; }
.wg-hist .lbl { font-weight: 900; font-size: 1.8vh; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rh { display: grid; place-items: center; min-width: 5vh; height: 5vh; padding: 0 .6vw; border-radius: 99px; font-style: normal; font-weight: 900; font-size: 2.2vh; background: rgba(255, 255, 255, .1); }
.rh.red { background: #c8102e; } .rh.black { background: #141418; box-shadow: inset 0 0 0 .2vh #555; } .rh.green { background: #138a4a; }
.rh.good { background: #138a4a; } .rh.bad { background: #6b1020; }
.wg-bottom { display: grid; gap: 1vh; }

/* ---------------- roulette ---------------- */
.wg-wheel { position: relative; min-height: 0; justify-self: start; width: 100%; }
.wg-roulette .wg-side { background: none; box-shadow: none; padding: 0; grid-template-rows: 1fr auto auto; height: 100%; }
.wg-wheel canvas { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3vh 4vh rgba(0, 0, 0, .6)); }
.wg-wheel::after { content: "▼"; position: absolute; top: 1vh; left: 50%; transform: translateX(-50%); color: #ffd84a; font-size: 4vh; text-shadow: 0 0 2vh #ffd84a; }
.wg-result { display: grid; justify-items: center; gap: 1vh; min-height: 22vh; align-content: center; }
.rr-num { display: grid; place-items: center; width: 20vh; height: 20vh; border-radius: 50%; font-family: var(--display); font-weight: 900; font-size: 11vh; color: #fff; box-shadow: 0 0 0 1vh rgba(255, 255, 255, .15), 0 0 6vh currentColor; animation: bg-slam .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.rr-num.red { background: #c8102e; color: #fff; box-shadow: 0 0 0 1vh rgba(255, 255, 255, .15), 0 0 6vh #ff3b5c; }
.rr-num.black { background: #141418; box-shadow: 0 0 0 1vh rgba(255, 255, 255, .2), 0 0 6vh rgba(255, 255, 255, .4); }
.rr-num.green { background: #138a4a; box-shadow: 0 0 0 1vh rgba(255, 255, 255, .15), 0 0 6vh #2fd683; }
.rr-num.sm { width: 6rem; height: 6rem; font-size: 3.4rem; margin: 0 auto; }
.rr-word { font-family: var(--display); font-weight: 900; font-size: 4.4vh; letter-spacing: .08em; }
.rr-spin { font-size: 12vh; animation: bp-spin 1s linear infinite; }

/* ---------------- monster derby ---------------- */
.wg-derby { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.wg-derby .dr-track { min-height: 0; align-content: center; }
.wg-derby .wg-bottom { max-height: 17vh; overflow: hidden; }
.wg-call { text-align: center; min-height: 7vh; }
.wg-call span { display: inline-block; font-family: var(--display); font-weight: 900; font-size: 5vh; color: #fff; text-shadow: 0 0 3vh rgba(122, 240, 255, .6); animation: wn-rise .35s both; }
.dr-track { position: relative; display: grid; gap: .6vh; padding: 2vh 1vw; border-radius: 2vh; overflow: hidden; background: linear-gradient(180deg, rgba(40, 30, 70, .5), rgba(20, 16, 12, .7)); box-shadow: inset 0 0 0 .3vh rgba(255, 255, 255, .08); }
.dr-moon { position: absolute; right: 6vw; top: -8vh; width: 22vh; height: 22vh; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fffbe6, #f6e7a8 60%, transparent 62%); box-shadow: 0 0 10vh rgba(255, 245, 200, .5); opacity: .5; }
.dr-stones { position: absolute; inset: auto 0 0 0; height: 8vh; opacity: .35; background: repeating-linear-gradient(90deg, transparent 0 9vw, #555 9vw 10.5vw, transparent 10.5vw 20vw); -webkit-mask: linear-gradient(to top, #000 60%, transparent); mask: linear-gradient(to top, #000 60%, transparent); }
.dr-track.running .dr-stones { animation: dr-scroll .9s linear infinite; }
@keyframes dr-scroll { to { background-position: -20vw 0; } }
.dr-lane { position: relative; height: 9.2vh; border-radius: 1.2vh; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 4vw, rgba(255, 255, 255, .06) 4vw 8vw); border-bottom: .3vh dashed rgba(255, 255, 255, .15); }
.dr-gate { position: absolute; left: .6vw; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 4vh; height: 4vh; border-radius: 50%; background: var(--c); color: #111; font-weight: 900; font-size: 2.2vh; }
.dr-runner { position: absolute; top: 50%; left: 3vw; transform: translate(-50%, -50%); transition: left .12s linear; }
.dr-emoji { display: block; font-size: 7.4vh; filter: drop-shadow(0 .8vh .8vh rgba(0, 0, 0, .6)); }
.dr-track.running .dr-emoji { animation: dr-gallop .32s ease-in-out infinite alternate; }
@keyframes dr-gallop { from { transform: translateY(-.6vh) rotate(-6deg); } to { transform: translateY(.6vh) rotate(4deg); } }
.dr-dust { position: absolute; right: 90%; top: 55%; width: 5vh; height: 2vh; border-radius: 50%; background: radial-gradient(rgba(200, 180, 150, .5), transparent 70%); opacity: 0; }
.dr-track.running .dr-dust { animation: dr-dust .4s linear infinite; }
@keyframes dr-dust { 0% { opacity: .8; transform: scale(.4); } 100% { opacity: 0; transform: translateX(-4vh) scale(1.6); } }
.dr-name { position: absolute; right: 1vw; top: 50%; transform: translateY(-50%); font-weight: 900; font-size: 2.4vh; color: var(--c); text-shadow: 0 .2vh .4vh #000; }
.dr-name em { font-style: normal; color: var(--gold); margin-left: .4vw; }
/* who's backing each monster */
.dr-backers { position: absolute; left: 30vh; top: 50%; transform: translateY(-50%); display: flex; gap: .4vw; flex-wrap: nowrap; max-width: 44vw; overflow: hidden; pointer-events: none; }
.dr-backers i { flex: 0 0 auto; max-width: 9vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-weight: 800; font-size: 1.7vh; padding: .3vh .7vw; border-radius: 999px; background: color-mix(in srgb, var(--c) 60%, #000); color: #fff; box-shadow: 0 .3vh .6vh rgba(0,0,0,.4); }
.dr-backers i.more { background: rgba(255,255,255,.2); }
.dr-backers.pop i:last-child { animation: dr-backpop .4s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes dr-backpop { from { transform: scale(0); } to { transform: scale(1); } }
.dr-track.running .dr-backers, .dr-lane[data-place] .dr-backers { opacity: 0; transition: opacity .3s; }
/* gates burst open at the start */
.dr-track.gates-open .dr-gate { animation: dr-gate .5s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes dr-gate { to { transform: translateY(-50%) rotate(-80deg) translateX(-1vh); opacity: .3; } }
/* winner modal */
.dr-modal { position: absolute; inset: 0; z-index: 20; display: none; place-items: center; pointer-events: none; }
.dr-modal.on { display: grid; }
.dr-wincard { display: grid; justify-items: center; gap: .8vh; padding: 4vh 5vw; border-radius: 3vh; background: rgba(8,10,22,.92); box-shadow: 0 2vh 8vh rgba(0,0,0,.7), inset 0 0 0 .4vh var(--c), 0 0 12vh color-mix(in srgb, var(--c) 60%, transparent); animation: dr-wincard .55s cubic-bezier(.2,1.6,.4,1) both; }
.dr-win-emoji { font-size: 12vh; animation: dr-winbob 1.2s ease-in-out infinite; }
@keyframes dr-winbob { 50% { transform: translateY(-1.5vh) scale(1.08); } }
.dr-win-lbl { font-family: var(--display); font-weight: 900; font-size: 3vh; letter-spacing: .2em; color: var(--gold); }
.dr-win-name { font-family: var(--display); font-weight: 900; font-size: 7vh; color: #fff; text-shadow: 0 .5vh 0 rgba(0,0,0,.4); }
.dr-win-backers { font-size: 2.4vh; color: var(--muted); }
@keyframes dr-wincard { from { opacity: 0; transform: scale(.3) rotate(-6deg); } to { opacity: 1; transform: none; } }
.dr-finish { position: absolute; right: 9vw; top: 0; bottom: 0; width: 1.4vh; background: repeating-linear-gradient(0deg, #fff 0 1.4vh, #111 1.4vh 2.8vh); opacity: .85; }
.dr-track.photo::after { content: ""; position: absolute; inset: 0; background: #fff; animation: dr-flash .6s ease-out forwards; pointer-events: none; }
@keyframes dr-flash { from { opacity: .9; } to { opacity: 0; } }
.dr-lane.won { background: linear-gradient(90deg, rgba(255, 216, 74, .08), rgba(255, 216, 74, .35)); box-shadow: 0 0 3vh rgba(255, 216, 74, .5); }
.dr-lane[data-place]::after { content: attr(data-place); position: absolute; right: 12vw; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 5vh; height: 5vh; border-radius: 50%; background: #fff; color: #111; font-weight: 900; font-size: 2.8vh; animation: ct-sit .4s both; }
.dr-lane.won::after { background: #ffd84a; box-shadow: 0 0 2vh #ffd84a; }

/* ---------------- crash ---------------- */
.cr-stage { position: relative; min-height: 0; border-radius: 2vh; background: rgba(0, 0, 0, .35); overflow: hidden; box-shadow: inset 0 0 0 .3vh rgba(255, 255, 255, .06); }
.cr-stage canvas { width: 100%; height: 100%; display: block; }
.cr-mult { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(var(--s, 1)); font-family: var(--display); font-weight: 900; font-size: 14vh; line-height: 1; text-align: center; color: #fff; text-shadow: 0 0 4vh rgba(122, 240, 255, .8); transition: transform .2s; pointer-events: none; }
.cr-mult.flying { color: #7dffb0; text-shadow: 0 0 4vh rgba(47, 214, 131, .9); }
.cr-mult.crashed { color: #ff5a6e; font-size: 9vh; text-shadow: 0 0 5vh rgba(255, 59, 92, .9); animation: bg-slam .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.cr-pops { position: absolute; inset: 0; pointer-events: none; }
.cr-pop { position: absolute; padding: .6vh 1vw; border-radius: 99px; background: rgba(47, 214, 131, .9); color: #06220f; font-weight: 800; font-size: 2vh; white-space: nowrap; animation: ct-pop 4s ease-out forwards; }

/* ---------------- phones ---------------- */
.wp { display: grid; gap: .7rem; text-align: center; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.wp > * { min-width: 0; }
.wp-phase { font-weight: 800; font-size: .85rem; color: var(--muted); }
.wp-chips { display: flex; justify-content: center; gap: .5rem; }
.wp-chips .bj-chip-btn { width: 3.2rem; height: 3.2rem; font-size: .85rem; }
.wp-chips .bj-chip-btn.on { transform: translateY(-.3rem) scale(1.1); box-shadow: 0 0 1rem #fff; }
.wp-mine { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.wp-mine span { padding: .2rem .55rem; border-radius: 99px; background: rgba(255, 255, 255, .08); font-weight: 700; font-size: .8rem; }
.wp-mine em { font-style: normal; font-weight: 900; } .wp-mine em.win { color: #2fd683; } .wp-mine em.lose { color: #ff5a6e; }
.wp-wheel { width: 16rem; height: 16rem; margin: 0 auto; }
.wp-wheel canvas { width: 100%; height: 100%; display: block; }
.wr-board { display: grid; grid-template-columns: 2.2rem 1fr; gap: .2rem; }
.wr-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .2rem; }
.wr-n, .wr-o { position: relative; border: 0; border-radius: .35rem; color: #fff; font: inherit; font-weight: 900; font-size: .85rem; padding: .45rem 0; cursor: pointer; }
.wr-n.r { background: #c8102e; } .wr-n.b { background: #1d1d24; box-shadow: inset 0 0 0 1px #444; } .wr-n.g { background: #138a4a; }
.wr-n i, .wr-o i { position: absolute; top: -.35rem; right: -.25rem; min-width: 1.2rem; padding: 0 .2rem; border-radius: 99px; background: var(--gold); color: #1a1206; font-style: normal; font-size: .62rem; line-height: 1.2rem; box-shadow: 0 0 .4rem rgba(0, 0, 0, .6); }
.wr-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; }
.wr-o { background: #0f5a36; box-shadow: inset 0 0 0 1px #d9b35a; }
.wr-o.red { background: #c8102e; } .wr-o.black { background: #1d1d24; }
.wd-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.wd-card { position: relative; display: grid; gap: .1rem; padding: .6rem .2rem; border: 0; border-radius: .8rem; background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 60%, transparent); cursor: pointer; }
.wd-card .e { font-size: 2rem; }
.wd-card b { font-size: .8rem; } .wd-card em { font-style: normal; font-weight: 900; color: var(--gold); font-size: .85rem; }
.wd-card.on { background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: 0 0 1rem var(--c); }
.wd-card i { position: absolute; top: -.4rem; right: -.2rem; padding: 0 .35rem; border-radius: 99px; background: var(--gold); color: #1a1206; font-style: normal; font-weight: 900; font-size: .7rem; }
.wd-track { position: relative; display: grid; gap: .25rem; padding: .5rem; border-radius: .8rem; background: linear-gradient(180deg, #1a1440, #0c0a14); }
.wd-lane { position: relative; height: 2.2rem; border-radius: .4rem; background: rgba(255, 255, 255, .05); }
.wd-lane.mine { box-shadow: inset 0 0 0 2px var(--c); }
.wd-lane.won { background: rgba(255, 216, 74, .25); }
.wd-run { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.6rem; transition: left .15s linear; }
.wd-place { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); font-size: .9rem; }
.wd-finish { position: absolute; right: 1.2rem; top: .4rem; bottom: .4rem; width: .4rem; background: repeating-linear-gradient(0deg, #fff 0 .4rem, #111 .4rem .8rem); }
.wc-rocket { font-size: 4rem; animation: lt-bob 1.6s ease-in-out infinite; }
.wc-auto { display: flex; justify-content: center; align-items: center; gap: .3rem; flex-wrap: wrap; font-weight: 800; font-size: .8rem; }
.wc-auto button { border: 0; border-radius: 99px; padding: .3rem .6rem; background: rgba(255, 255, 255, .1); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }
.wc-auto button.on { background: var(--ecto); }
.wc-mult { font-family: var(--display); font-weight: 900; font-size: 3.6rem; }
.wc-mult.flying { color: #7dffb0; text-shadow: 0 0 1.2rem rgba(47, 214, 131, .8); }
.wc-mult.crashed { color: #ff5a6e; }
.wc-cash { display: grid; gap: .2rem; width: 100%; padding: 1.2rem; border: 0; border-radius: 1.2rem; background: linear-gradient(180deg, #2fd683, #138a4a); color: #fff; font: inherit; font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: .06em; cursor: pointer; box-shadow: 0 0 1.6rem rgba(47, 214, 131, .7); animation: bp-tap .7s ease-in-out infinite; }
.wc-cash b { font-size: 2.4rem; }
@media (prefers-reduced-motion: reduce) { .wg *, .wp * { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }
/* fit: six lanes on screen, names at the gate side */
.dr-lane { height: 7.2vh; }
.dr-emoji { font-size: 6vh; }
.dr-name { right: auto; left: 11vh; font-size: 2vh; opacity: .75; }
.dr-track { gap: .5vh; padding: 1.4vh 1vw; }
.wg-call { min-height: 6vh; }
.wg-call span { font-size: 4.4vh; }
.cr-rocket { position: absolute; z-index: 2; font-size: 7vh; pointer-events: none; filter: drop-shadow(0 0 2vh rgba(255, 180, 60, .9)); }

/* ---------- phones: the whole game without the projector ---------- */
.wl { display: grid; gap: .3rem; padding: .6rem; border-radius: .8rem; background: rgba(0, 0, 0, .3); text-align: left; min-width: 0; overflow: hidden; }
.wl-head { display: flex; justify-content: space-between; font-weight: 900; font-size: .8rem; color: var(--muted); }
.wl-head span:first-child { color: #ff5a6e; }
.wl-row { display: flex; gap: .4rem; align-items: baseline; font-size: .82rem; min-width: 0; }
.wl-row b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; min-width: 0; flex-shrink: 1; }
.wl-row span { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-row em { font-style: normal; font-weight: 900; } .wl-row em.win { color: #2fd683; } .wl-row em.lose { color: #ff5a6e; }
.wp-hist { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; color: var(--muted); }
.wp-hist .rh { min-width: 1.8rem; height: 1.8rem; font-size: .72rem; }
.wp-res { display: grid; justify-items: center; gap: .35rem; padding: .7rem; border-radius: .9rem; background: rgba(255, 255, 255, .06); animation: rp-win .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.wp-podium { display: flex; gap: .5rem; justify-content: center; align-items: end; }
.wp-podium span { display: grid; justify-items: center; font-size: 1.8rem; padding: .3rem .5rem; border-radius: .6rem; background: rgba(255, 255, 255, .06); }
.wp-podium span.p1 { font-size: 2.4rem; background: rgba(255, 216, 74, .25); }
.wp-podium i { font-style: normal; font-size: .9rem; } .wp-podium b { font-size: .7rem; }
.wd-call { color: #7af0ff; }
.wc-graph { position: relative; height: 11rem; border-radius: .8rem; background: radial-gradient(ellipse at 30% 80%, #1b1350, #07061a 70%); overflow: hidden; }
.wc-graph canvas { width: 100%; height: 100%; display: block; }
.wc-graph .wc-mult { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.8rem; pointer-events: none; }
.wc-rk { position: absolute; transform: translate(-50%, -50%) rotate(-10deg); font-size: 1.8rem; filter: drop-shadow(0 0 .6rem rgba(255, 180, 60, .9)); }

/* ---------------- baccarat ---------------- */
#sc-baccarat { padding: 0.5vh 2vw 1.5vh; }
.bc-table { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.6vw; align-items: stretch; padding: 3vh 2vw; border-radius: 4vh;
    background: radial-gradient(ellipse at 50% 40%, #1c7a4b, #0b4128 70%); box-shadow: inset 0 0 0 .7vh #d9b35a, inset 0 0 0 1.2vh #5a3a14, 0 2vh 5vh rgba(0, 0, 0, .6); min-height: 0; }
.bc-box { position: relative; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 1.4vh; padding: 2vh 1vw; border-radius: 2.4vh; border: .4vh solid var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); transition: box-shadow .5s, background .5s; }
.bc-box.player { --c: #4f8dff; } .bc-box.banker { --c: #ff4f6a; }
.bc-box h4 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 3.4vh; letter-spacing: .12em; color: var(--c); }
.bc-box h4 small { font-size: 1.7vh; color: #fff; opacity: .7; letter-spacing: 0; margin-left: .4vw; }
.bc-cards { display: flex; gap: .8vw; align-items: center; min-height: 22vh; }
.bc-card { width: 14vh; aspect-ratio: 5 / 7; perspective: 90vh; opacity: 0; transform: translateY(-20vh) rotate(-15deg); transition: opacity .3s, transform .5s cubic-bezier(.2, 1.2, .4, 1); }
.bc-card[data-i="2"] { transform: translateY(-20vh) rotate(-15deg); }
.bc-card.dealt { opacity: 1; transform: none; }
.bc-card.dealt[data-i="2"] { transform: rotate(90deg); margin: 0 2vh; }
.bc-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.bc-in > span { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.bc-in > span svg { width: 100%; height: 100%; display: block; }
.bc-in .b { transform: rotateY(180deg); }
.bc-card.up .bc-in { transform: rotateY(180deg); }
.bc-card.squeeze .bc-in { animation: bc-squeeze 1.5s ease-in-out forwards; }
@keyframes bc-squeeze { 0% { transform: rotateX(0); } 30% { transform: rotateX(18deg); } 60% { transform: rotateX(8deg) translateY(-.5vh); } 85% { transform: rotateX(32deg); } 100% { transform: rotateX(40deg); } }
.bc-card.squeeze { filter: drop-shadow(0 0 2vh #ffd84a); }
.bc-tot { display: grid; place-items: center; min-width: 8vh; height: 8vh; border-radius: 50%; background: #fff; color: #111; font-family: var(--display); font-size: 5vh; box-shadow: 0 0 2vh rgba(255, 255, 255, .5); }
.bc-tot:empty { visibility: hidden; }
.bc-bets { font-weight: 800; font-size: 2.2vh; color: var(--gold); min-height: 3vh; }
.bc-mid { display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 2vh; min-width: 16vw; }
.bc-tie { display: grid; justify-items: center; padding: 1.4vh 1.6vw; border-radius: 1.6vh; border: .35vh solid #2fd683; color: #2fd683; font-family: var(--display); font-weight: 900; font-size: 3vh; letter-spacing: .1em; }
.bc-tie small { font-size: 1.6vh; color: #fff; opacity: .7; letter-spacing: 0; }
.bc-word { display: grid; justify-items: center; align-content: center; gap: .6vh; text-align: center; }
.bc-word b { font-family: var(--display); font-weight: 900; font-size: 5.4vh; line-height: 1; animation: bg-slam .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.bc-word b.w-player { color: #7fb0ff; text-shadow: 0 0 3vh #4f8dff; } .bc-word b.w-banker { color: #ff8fa0; text-shadow: 0 0 3vh #ff4f6a; } .bc-word b.w-tie { color: #7dffb0; text-shadow: 0 0 3vh #2fd683; }
.bc-word span { font-weight: 900; font-size: 3vh; }
.bc-table.won-player .bc-box.player, .bc-table.won-banker .bc-box.banker { background: color-mix(in srgb, var(--c) 35%, transparent); box-shadow: 0 0 5vh var(--c), inset 0 0 3vh var(--c); }
.bc-table.won-tie .bc-tie { background: rgba(47, 214, 131, .3); box-shadow: 0 0 4vh #2fd683; }
.wg-bac .wg-body { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); align-items: stretch; }
.wg-bac .bc-table { height: 100%; }
.wg-bac .wg-side { align-content: start; }
.bc-road .lbl { display: block; font-weight: 900; font-size: 1.8vh; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6vh; }
.bc-beads { display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, 3.4vh); grid-auto-columns: 3.4vh; gap: .4vh; padding: .8vh; border-radius: 1vh; background: #f4efe4; overflow: hidden; }
i.bd { display: grid; place-items: center; border-radius: 50%; font-style: normal; font-weight: 900; font-size: 1.6vh; color: #fff; animation: ct-sit .3s both; }
.bd.player { background: #2e6bd6; } .bd.banker { background: #d0142f; } .bd.tie { background: #138a4a; }
/* phones */
.bcp-bets { display: grid; grid-template-columns: 1fr .8fr 1fr; gap: .5rem; }
.bcp-bet { position: relative; display: grid; gap: .15rem; padding: 1rem .3rem; border: 0; border-radius: 1rem; color: #fff; font: inherit; cursor: pointer; }
.bcp-bet b { font-family: var(--display); font-size: 1.2rem; } .bcp-bet small { font-size: .72rem; opacity: .85; }
.bcp-bet.player { background: linear-gradient(180deg, #4f8dff, #1f4fb0); } .bcp-bet.banker { background: linear-gradient(180deg, #ff4f6a, #a80f26); } .bcp-bet.tie { background: linear-gradient(180deg, #2fd683, #138a4a); }
.bcp-bet.on { box-shadow: 0 0 0 3px #fff, 0 0 1rem rgba(255, 255, 255, .5); }
.bcp-bet i { position: absolute; top: -.4rem; right: -.2rem; padding: 0 .35rem; border-radius: 99px; background: var(--gold); color: #1a1206; font-style: normal; font-weight: 900; font-size: .72rem; }
.bcp-table { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .6rem; border-radius: 1rem; background: radial-gradient(ellipse at 50% 40%, #1c7a4b, #0b4128 75%); box-shadow: inset 0 0 0 3px #d9b35a; }
.bcp-box { display: grid; justify-items: center; gap: .35rem; padding: .5rem .2rem; border-radius: .8rem; border: 2px solid var(--c); }
.bcp-box.player { --c: #4f8dff; } .bcp-box.banker { --c: #ff4f6a; }
.bcp-box.won { background: color-mix(in srgb, var(--c) 35%, transparent); box-shadow: 0 0 1.2rem var(--c); }
.bcp-box h5 { margin: 0; color: var(--c); font-size: .8rem; letter-spacing: .1em; }
.bcp-cards { display: flex; gap: .2rem; min-height: 4.2rem; align-items: center; }
.bcp-card { width: 2.9rem; } .bcp-card svg { width: 100%; height: auto; display: block; }
.bcp-card.flip { animation: hl-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.bcp-card.squeeze { animation: bc-squeeze 1.5s ease-in-out forwards; filter: drop-shadow(0 0 .6rem #ffd84a); }
.bcp-box b { display: grid; place-items: center; min-width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #fff; color: #111; font-family: var(--display); font-size: 1.3rem; }
.bcp-box b:empty { visibility: hidden; }
.bcp-word { font-family: var(--display); font-weight: 900; font-size: 1.5rem; }
.bcp-word span { font-size: 1rem; margin-left: .3rem; }
.bcp-word.w-player { color: #7fb0ff; } .bcp-word.w-banker { color: #ff8fa0; } .bcp-word.w-tie { color: #7dffb0; }
.rh.bd { width: 1.8rem; }
/* baccarat fit */
.bc-table { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 2.4vh 1.4vw; gap: 1vw; }
.bc-box { min-width: 0; }
.bc-card { width: 10.5vh; }
.bc-cards { gap: .5vw; min-height: 18vh; }
.bc-card.dealt[data-i="2"] { margin: 0 1.6vh; }
.bc-mid { min-width: 11vw; }
.bc-word b { font-size: 4.4vh; }
.bc-beads { width: max-content; max-width: 100%; }

/* baccarat: the idle deck works under the Tie box */
.bc-mid { position: relative; }
.bc-mid .ct-shuffle { top: 62%; }

/* ---------- crash: pre-launch routines on the pad ---------- */
.cr-stage { position: relative; }
.cr-idle { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .5s; }
.cr-idle.on { opacity: 1; }
.ci-pad { position: absolute; left: 50%; bottom: 4%; width: 22vh; height: 34vh; transform: translateX(-50%); }
.ci-base { position: absolute; left: -30%; right: -30%; bottom: 0; height: 2.4vh; border-radius: .6vh; background: repeating-linear-gradient(90deg, #ffd84a 0 2vh, #1a1a1a 2vh 4vh); box-shadow: 0 0 3vh rgba(255, 216, 74, .35); }
.ci-tower { position: absolute; left: 4%; bottom: 2.4vh; width: 3.4vh; height: 30vh; background: repeating-linear-gradient(45deg, transparent 0 1.2vh, #c9ced6 1.2vh 1.5vh), repeating-linear-gradient(-45deg, transparent 0 1.2vh, #c9ced6 1.2vh 1.5vh); border-left: .4vh solid #c9ced6; border-right: .4vh solid #c9ced6; opacity: .75; }
.ci-rocket { position: absolute; left: 50%; bottom: 2vh; font-size: 17vh; line-height: 1; transform: translateX(-50%) rotate(-45deg); filter: drop-shadow(0 0 2vh rgba(255, 180, 80, .35)); }
.ci-flame { position: absolute; left: 12%; bottom: 8%; width: 4vh; height: 4vh; border-radius: 50%; background: radial-gradient(circle, #fff, #ffd84a 40%, #ff5a1a 70%, transparent 72%); opacity: 0; transform: rotate(45deg); }
.ci-steam { position: absolute; left: calc(50% + (var(--i) - 2) * 3vh); bottom: 3vh; width: 7vh; height: 7vh; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 68%); animation: ci-steam 2.2s ease-out calc(var(--i) * .35s) infinite; }
.ci-steam.hot { background: radial-gradient(circle, rgba(255, 220, 160, .8), rgba(255, 120, 40, 0) 68%); }
@keyframes ci-steam { from { transform: translate(0, 0) scale(.4); opacity: .9; } to { transform: translate(calc((var(--i) - 2) * 4vh), -10vh) scale(2.2); opacity: 0; } }
.ci-gauge { position: absolute; right: 8%; top: 12%; display: grid; gap: .8vh; justify-items: center; font-family: var(--display); font-weight: 900; font-size: 2.6vh; color: #31c6ff; letter-spacing: .15em; }
.ci-gauge i { display: block; width: 5vh; height: 34vh; border-radius: 1vh; border: .4vh solid #31c6ff; position: relative; overflow: hidden; box-shadow: 0 0 2vh rgba(49, 198, 255, .5); }
.ci-gauge em { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, #2fd683, #ffd84a, #ff5a1a); animation: ci-fill 5.5s ease-in-out both; }
@keyframes ci-fill { from { height: 4%; } to { height: 100%; } }
.ci-list { position: absolute; right: 6%; top: 10%; display: grid; gap: 1.2vh; min-width: 30vh; padding: 2vh 2vw; border-radius: 1.6vh; background: rgba(4, 12, 24, .7); box-shadow: inset 0 0 0 .3vh #31c6ff; font-weight: 800; font-size: 2.6vh; }
.ci-list b { font-family: var(--display); color: #31c6ff; letter-spacing: .2em; }
.ci-list div { display: flex; justify-content: space-between; gap: 2vw; opacity: 0; animation: ci-row .4s ease-out calc(.6s + var(--i) * 1s) both; }
.ci-list em { font-style: normal; color: #2fd683; animation: ci-tick .4s cubic-bezier(.3, 1.8, .5, 1) calc(1s + var(--i) * 1s) both; }
@keyframes ci-row { to { opacity: 1; } }
@keyframes ci-tick { from { transform: scale(0); } to { transform: scale(1); } }
.ci-beam { position: absolute; bottom: 0; width: 18vh; height: 120%; background: linear-gradient(0deg, rgba(200, 230, 255, .45), transparent 85%); clip-path: polygon(40% 100%, 60% 100%, 100% 0, 0 0); transform-origin: 50% 100%; filter: blur(.5vh); }
.ci-beam.l { left: 15%; animation: ci-sweep 3.2s ease-in-out infinite alternate; } .ci-beam.r { right: 15%; animation: ci-sweep 3.2s ease-in-out -1.6s infinite alternate-reverse; }
@keyframes ci-sweep { from { transform: rotate(-28deg); } to { transform: rotate(28deg); } }
.ci-met { position: absolute; right: -10%; top: var(--y); width: 16vh; height: .5vh; border-radius: 99px; background: linear-gradient(90deg, #fff, rgba(255, 200, 120, .6), transparent); box-shadow: 0 0 1.2vh #fff; transform: rotate(-24deg); animation: ci-met 1.8s ease-in calc(var(--i) * .7s) infinite; }
@keyframes ci-met { from { transform: translateX(0) rotate(-24deg); opacity: 0; } 15% { opacity: 1; } to { transform: translateX(-140vw) translateY(55vh) rotate(-24deg); opacity: 0; } }
.ci-cap { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); padding: .8vh 2vw; border-radius: 99px; background: rgba(4, 12, 24, .7); box-shadow: inset 0 0 0 .3vh #31c6ff; color: #fff; font-family: var(--display); font-weight: 900; font-size: 3vh; letter-spacing: .08em; white-space: nowrap; }
.ci-rumble .ci-rocket { animation: ci-rumble .09s linear infinite; }
.ci-rumble .ci-flame { opacity: 1; animation: ci-flame .12s steps(2) infinite; }
@keyframes ci-rumble { 50% { transform: translateX(calc(-50% + .4vh)) rotate(-45deg) translateY(-.3vh); } }
@keyframes ci-flame { 50% { transform: rotate(45deg) scale(1.4); } }
.ci-fuel .ci-rocket, .ci-check .ci-rocket, .ci-search .ci-rocket, .ci-meteors .ci-rocket { animation: ci-bob 3s ease-in-out infinite; }
@keyframes ci-bob { 50% { transform: translateX(-50%) rotate(-45deg) translateY(-.6vh); } }
@media (prefers-reduced-motion: reduce) { .cr-idle * { animation: none !important; } }
.cr-mult.idle { left: 4%; top: 7%; transform: none; font-size: 5.5vh; text-align: left; color: #ffd84a; text-shadow: 0 0 2vh rgba(255, 216, 74, .6); z-index: 2; }
/* the routine's caption (Engine Test, Clear Skies) sits under the Launch In readout, never on it */
.ci-cap { top: 19%; }
.ci-list { top: 24%; }
.ci-gauge { top: 22%; }

/* ---------- roulette: light shows on the felt while bets are open ---------- */
.rt-felt { position: relative; }
.rt-idlecap { position: absolute; left: 50%; top: 0; z-index: 4; transform: translate(-50%, -50%); padding: .6vh 1.8vw; border-radius: 99px; white-space: nowrap; font-family: var(--display); font-weight: 900; font-size: 2.6vh; color: #1a1206; background: linear-gradient(180deg, #fff3b0, #ffc23a); box-shadow: 0 0 2.4vh rgba(255, 194, 58, .55); animation: rti-cap .5s cubic-bezier(.2, 1.5, .4, 1) both; pointer-events: none; }
@keyframes rti-cap { from { transform: translate(-50%, -50%) scale(.5); opacity: 0; } }
.rt-c.hot { position: relative; animation: rti-hot .8s ease-in-out infinite alternate; box-shadow: 0 0 0 .3vh #ffb02e, 0 0 2.4vh #ff5a1a; z-index: 2; }
.rt-c.hot::after { content: "🔥"; position: absolute; right: -.6vh; top: -1.4vh; font-size: 1.8vh; }
@keyframes rti-hot { to { transform: scale(1.12); filter: brightness(1.3); } }
.rt-c.cold { position: relative; box-shadow: 0 0 0 .3vh #9fe7ff, 0 0 2.4vh #31c6ff; filter: saturate(.4) brightness(1.4); z-index: 2; animation: rti-cold 1.6s ease-in-out infinite alternate; }
@keyframes rti-cold { to { box-shadow: 0 0 0 .3vh #fff, 0 0 3.4vh #31c6ff; } }
.rti-redblack .rt-c.red { animation: rti-flash 1.2s steps(1) infinite; }
.rti-redblack .rt-c.black { animation: rti-flash 1.2s steps(1) -.6s infinite; }
@keyframes rti-flash { 0% { filter: brightness(1.8) saturate(1.2); box-shadow: 0 0 2vh rgba(255, 255, 255, .5); } 50% { filter: brightness(.6); box-shadow: none; } }
.rti-dozen .rt-doz .rt-o { animation: rti-doz 2.4s steps(1) infinite; }
.rti-dozen .rt-doz .rt-o:nth-child(2) { animation-delay: .8s; } .rti-dozen .rt-doz .rt-o:nth-child(3) { animation-delay: 1.6s; }
@keyframes rti-doz { 0% { background: #ffd84a; color: #1a1206; box-shadow: 0 0 2.4vh #ffd84a; } 33% { background: ''; color: ''; box-shadow: none; } }
.rti-chase .rt-nums .rt-c { animation: rti-chase 2.4s linear calc(var(--j, 0) * -0.066s) infinite; }
@keyframes rti-chase { 0%, 85% { filter: none; } 90% { filter: brightness(2.2); box-shadow: 0 0 2vh #fff; } }
@media (prefers-reduced-motion: reduce) { .rt-felt * { animation: none !important; } }

/* ---------- derby: warm-up routines while bets are open (animate the emoji, not the runner) ---------- */
.dr-track { position: relative; }
.dr-idlecap { position: absolute; left: 50%; top: 0; z-index: 6; transform: translate(-50%, -50%); padding: .6vh 1.8vw; border-radius: 99px; white-space: nowrap; font-family: var(--display); font-weight: 900; font-size: 2.6vh; color: #1a1206; background: linear-gradient(180deg, #fff3b0, #ffc23a); box-shadow: 0 0 2.4vh rgba(255, 194, 58, .55); animation: rti-cap .5s cubic-bezier(.2, 1.5, .4, 1) both; pointer-events: none; }
.dr-emoji { display: inline-block; }
.dri-warm .dr-emoji { animation: dri-hop .7s cubic-bezier(.3, 0, .6, 1) calc(var(--k) * -.13s) infinite; }
@keyframes dri-hop { 0%, 100% { transform: translateY(0) scale(1.1, .9); } 45% { transform: translateY(-2.2vh) scale(.92, 1.08); } }
.dri-roll .dr-lane { animation: dri-lane 3.6s steps(1) calc(var(--k) * .6s) infinite; }
.dri-roll .dr-emoji { animation: dri-pop 3.6s ease-in-out calc(var(--k) * .6s) infinite; }
@keyframes dri-lane { 0% { box-shadow: inset 0 0 0 .3vh var(--c), 0 0 3vh color-mix(in srgb, var(--c) 60%, transparent); } 16% { box-shadow: none; } }
@keyframes dri-pop { 0%, 18%, 100% { transform: none; } 6% { transform: scale(1.6) rotate(-8deg); } 12% { transform: scale(1.35) rotate(6deg); } }
.dri-strut .dr-emoji { animation: dri-strut 3s ease-in-out calc(var(--k) * -.35s) infinite; }
@keyframes dri-strut { 0% { transform: translateX(0); } 40% { transform: translateX(7vw); } 50% { transform: translateX(7vw) scaleX(-1); } 90% { transform: translateX(0) scaleX(-1); } 100% { transform: translateX(0); } }
.dri-rev .dr-emoji { animation: dri-jit .08s linear calc(var(--k) * -.03s) infinite; }
.dri-rev .dr-dust { opacity: 1 !important; animation: dri-dust .5s ease-out calc(var(--k) * -.1s) infinite; }
@keyframes dri-jit { 50% { transform: translate(.25vh, -.2vh) rotate(-3deg); } }
@keyframes dri-dust { from { transform: translate(0, 0) scale(.5); opacity: .9; } to { transform: translate(-4vw, -1vh) scale(1.8); opacity: 0; } }
.dri-wave .dr-emoji { animation: dri-wave 2s cubic-bezier(.3, 0, .6, 1) calc(var(--k) * .18s) infinite; }
@keyframes dri-wave { 0%, 30%, 100% { transform: none; } 12% { transform: translateY(-3vh) rotate(-12deg) scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .dr-track[class*="dri-"] * { animation: none !important; } }
.dr-idlecap { left: auto; right: 1.5vw; top: 1vh; transform: none; animation-name: dri-cap; }
@keyframes dri-cap { from { transform: translateX(3vw) scale(.6); opacity: 0; } }

/* crash cash-outs eject as parachute pods and drift down while the rocket climbs on */
.cr-pops .cr-chute { display: grid; justify-items: center; padding: 0; background: none; animation: cr-chute 5.2s cubic-bezier(.3, .6, .4, 1) forwards; }
.cr-chute i { font-style: normal; font-size: 6vh; line-height: 1; filter: drop-shadow(0 .6vh 1vh rgba(0, 0, 0, .5)); transform-origin: 50% 100%; animation: cr-sway 1.3s ease-in-out infinite alternate; }
.cr-chute span { padding: .5vh .9vw; border-radius: 99px; background: rgba(47, 214, 131, .92); color: #06220f; font-weight: 800; font-size: 1.9vh; white-space: nowrap; box-shadow: 0 .6vh 1.4vh rgba(0, 0, 0, .4); }
@keyframes cr-chute { 0% { transform: translate(0, 2vh) scale(.3); opacity: 0; } 8% { transform: translate(0, -4vh) scale(1.1); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--sw), 34vh) scale(.9); opacity: 0; } }
@keyframes cr-sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@media (prefers-reduced-motion: reduce) { .cr-chute, .cr-chute i { animation: none; } }

/* ---------- Crash: title in the side panel; the rocket stage takes the full height ---------- */
.wg.headside { grid-template-rows: minmax(0, 1fr); }
.wg.headside .wg-side { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.wg-side .wg-head { display: grid; justify-items: center; gap: 1vh; }
.wg-side .wg-head .wg-title b { font-size: 4.2vh; }
/* ---------- derby: the call has its own line above the track (never over a lane), and the lanes share the height so eight fit ---------- */
.wg-derby { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.wg-derby > .wg-call { position: relative; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 1.4vw; min-height: 6vh; margin: -.4vh 0 .4vh; pointer-events: none; }
.wg-derby > .wg-call span { font-size: 4vh; white-space: nowrap; }
.wg-derby > .wg-call .dr-idlecap { position: static; transform: none; flex: none; }
.wg-derby { position: relative; }
.wg-derby .dr-track { align-content: stretch; grid-auto-rows: minmax(0, 1fr); }
.wg-derby .dr-lane { height: auto; min-height: 5.6vh; }
.wg-derby .wg-bottom { max-height: 12vh; }
/* ---------- derby: the start gantry hangs over the middle of the track (never over the sign or the call line) ---------- */
.dr-track.counting::before { content: ""; position: absolute; inset: 0; z-index: 6; border-radius: inherit; background: radial-gradient(ellipse at 50% 50%, rgba(5, 4, 12, .25), rgba(5, 4, 12, .6)); pointer-events: none; animation: dr-dim .3s ease-out both; }
@keyframes dr-dim { from { opacity: 0; } }
.dr-start { position: absolute; left: 50%; top: 50%; z-index: 7; display: flex; align-items: center; gap: 2.4vh; padding: 1.8vh 2.6vh; border-radius: 2.4vh; pointer-events: none;
    background: linear-gradient(180deg, #23232c, #0b0b10); box-shadow: 0 2vh 5vh rgba(0, 0, 0, .75), inset 0 0 0 .35vh #3c3c48, 0 0 0 .35vh rgba(255, 196, 70, .45);
    opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .25s, transform .4s cubic-bezier(.2, 1.5, .4, 1); }
.dr-start.on { opacity: 1; transform: translate(-50%, -50%); }
.dr-gantry { display: flex; gap: 1.3vh; }
.dr-gantry i { width: 7.4vh; height: 7.4vh; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4d1616, #200606 70%); box-shadow: inset 0 0 1.6vh #000, 0 0 0 .3vh #050507; transition: background .12s, box-shadow .12s; }
.dr-gantry i.on { background: radial-gradient(circle at 40% 35%, #ffc0b0, #ff2a2a 45%, #a10a0a); box-shadow: 0 0 3.4vh #ff2a2a, inset 0 0 .8vh rgba(255, 255, 255, .6), 0 0 0 .3vh #050507; }
.dr-gantry i.go { background: radial-gradient(circle at 40% 35%, #dcffe8, #2fff7a 45%, #0e9a44); box-shadow: 0 0 4.4vh #2fff7a, inset 0 0 .8vh #fff, 0 0 0 .3vh #050507; }
.dr-count { display: grid; place-items: center; min-width: 10vh; height: 9vh; padding: 0 1.4vh; border-radius: 1.4vh; background: rgba(255, 255, 255, .06); font-family: var(--display); font-weight: 900; font-size: 7.4vh; line-height: 1; color: #fff; text-shadow: 0 0 3vh rgba(255, 216, 74, .8); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr-start.go .dr-count { color: #2fff7a; text-shadow: 0 0 3vh #2fff7a; }
.dr-count.pop { animation: dr-cdpop .45s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes dr-cdpop { from { transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .dr-count.pop, .dr-track.counting::before { animation: none; } }
/* the derby's phase line and timer stay clear of the right floodlight's glare */
.wg-derby > .wg-head { padding-right: calc(1vw + 12vh); }
/* phone race: the finishing place sits at the start of the lane, clear of the runners bunched at the finish line */
.wd-place { left: .45rem; right: auto; display: grid; place-items: center; min-width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; color: #111; font-size: .8rem; font-weight: 900; }
.wd-lane.won .wd-place { background: var(--gold); }
/* ---------- derby: lane names stay readable while the monsters strut and race past them ---------- */
.wg-derby .dr-name { z-index: 3; opacity: 1; padding: .35vh 1vh; border-radius: .8vh; background: rgba(10, 8, 18, .78); box-shadow: inset .4vh 0 0 var(--c); color: #fff; white-space: nowrap; }
.wg-derby .dr-name em { color: var(--gold); }
/* the side stats stay on one line each (Pot 0, 0 Playing, Round 3), wrapping as whole items on narrow screens */
.wg-tot { flex-wrap: wrap; row-gap: .4vh; column-gap: 1.2vw; }
.wg-tot span { white-space: nowrap; }

/* readability pass (Oct 28): the small projector text one size up so it reads from the back of the room */
.bc-tie small { font-size: 2vh; }
.bc-box h4 small { font-size: 2vh; }
.wg-hist .lbl { font-size: 2.2vh; }
.dr-name { font-size: 2.3vh; }
.wg-feed > .muted { font-size: 2.2vh; }
