/* =====================================================================
   Game screens: WinGo, Aviator, Chicken Road, Mines, K3 Dice
   Shared tokens and components live in app.css.
   ===================================================================== */

/* ---------- shared bits ---------- */
.wg, .av, .k3, .mn, .ck { display: grid; gap: 16px; align-items: start; }
.slips { display: grid; gap: 8px; }
.slip { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--tent-2); }
.slip-name { flex: 1; min-width: 0; display: grid; }
.slip-name strong { font-size: 14px; }
.slip-name span { font-size: 12px; color: var(--muted); }
.slip > b { font-weight: 700; }

.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 4px; vertical-align: -2px; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .3), inset 0 2px 2px rgba(255, 255, 255, .35); }
.slip .dot { width: 22px; height: 22px; margin: 0; }
.d-green { background: var(--green); }
.d-red { background: var(--red); }
.d-violet { background: var(--violet); }
.d-big { background: var(--gold); }
.d-small { background: var(--sky); }

.mn-banner, .ck-banner { margin-top: 14px; padding: 12px 16px; border-radius: 12px; font-weight: 700; text-align: center; animation: bannerIn .4s cubic-bezier(.3, 1.4, .5, 1); }
.mn-banner.win, .ck-banner.win { background: rgba(25, 184, 166, .16); box-shadow: inset 0 0 0 1px rgba(94, 234, 212, .5); color: var(--teal-hi); }
.mn-banner.lose, .ck-banner.lose { background: rgba(240, 53, 122, .16); box-shadow: inset 0 0 0 1px rgba(255, 122, 166, .5); color: var(--rani-hi); }
@keyframes bannerIn { from { transform: translateY(8px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* =====================================================================
   BALLS (WinGo)
   ===================================================================== */
.ball { --f1: var(--red); --f2: var(--red); position: relative; flex: none; display: inline-grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; color: var(--cream); font: 400 20px/1 var(--font-display);
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 50% 55%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .5) 100%),
    linear-gradient(90deg, var(--f1) 50%, var(--f2) 50%);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 10px 14px -4px rgba(0, 0, 0, .5); }
.ball > span { display: grid; place-items: center; width: 56%; height: 56%; border-radius: 50%; background: #fff6e0; color: #2a1a3a; font: 400 1em/1 var(--font-display); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .18); }
.c-red { --f1: #ef3d55; --f2: #ef3d55; }
.c-green { --f1: #22c07a; --f2: #22c07a; }
.c-0 { --f1: #ef3d55; --f2: #8b5cf6; }
.c-5 { --f1: #22c07a; --f2: #8b5cf6; }
.ball-xs { width: 24px; height: 24px; font-size: 11px; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.ball-xs > span { width: 64%; height: 64%; }
.ball-sm { width: 36px; height: 36px; font-size: 15px; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.ball-md { width: 56px; height: 56px; font-size: 22px; }
.ball-lg { width: 62px; height: 62px; font-size: 24px; }
button.ball { cursor: pointer; transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), filter .15s; }
button.ball:hover { transform: translateY(-4px) scale(1.07); filter: brightness(1.08); }
button.ball:active { transform: translateY(2px) scale(.96); }
button.ball.picked { animation: ballPicked .5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes ballPicked { 0% { transform: scale(1); } 30% { transform: scale(.86); } 65% { transform: scale(1.16) rotate(-6deg); box-shadow: 0 0 0 6px rgba(255, 210, 94, .6), 0 5px 0 rgba(0, 0, 0, .35); } 100% { transform: scale(1); } }

/* =====================================================================
   WINGO
   ===================================================================== */
.wg { grid-template-columns: minmax(0, 1fr) 340px; }
.wg-main, .wg-side, .av-main, .k3-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.wg-stage { display: flex; align-items: center; gap: 26px; padding: 18px 26px;
  background: radial-gradient(520px 320px at 24% 46%, rgba(139, 92, 246, .26), transparent 70%), radial-gradient(300px 200px at 90% 100%, rgba(240, 53, 122, .12), transparent 70%), var(--tent); }
.wg-globe { flex: none; display: grid; place-items: center; }
.wg-globe canvas { display: block; max-width: 100%; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45)); }
.wg-info { flex: 1; min-width: 0; display: grid; gap: 18px; justify-items: start; }
.wg-period { font-size: 19px; font-weight: 700; letter-spacing: .02em; }

.wg-clock { position: relative; width: 136px; height: 136px; }
.wg-clock svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-bg { fill: none; stroke: rgba(255, 241, 214, .1); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; filter: drop-shadow(0 0 7px rgba(255, 178, 26, .65)); }
.wg-clock.locked .ring-fg { stroke: var(--rani); filter: drop-shadow(0 0 9px rgba(240, 53, 122, .8)); }
.wg-clock-in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; text-align: center; }
.wg-clock-in strong { font: 400 42px/1 var(--font-display); font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.wg-clock-in span { font-size: 12px; font-weight: 600; color: var(--muted); }
.wg-clock.locked .wg-clock-in strong { color: var(--rani-hi); }
.wg-last { display: flex; align-items: center; gap: 12px; }
.wg-last-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.wg-bets { position: relative; overflow: hidden; }
.wg-bets > .sec-head { margin-top: 20px; }
.wg-bets > .wg-lock + .sec-head { margin-top: 0; }
.wg-bets.is-locked { border-color: rgba(240, 53, 122, .5); }
.wg-lock { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; font-weight: 700; color: var(--cream); background: rgba(13, 10, 32, .8); backdrop-filter: blur(3px); animation: viewIn .2s ease-out; }
.wg-lock strong { font: 400 96px/1 var(--font-display); color: var(--rani-hi); text-shadow: 0 6px 0 var(--rani-lo), 0 0 40px rgba(240, 53, 122, .5); }
.wg-lock strong.pop { animation: lockPop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes lockPop { 0% { transform: scale(1.7); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }

.wg-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wg-sizes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wg-numbers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 8px; justify-items: center; padding: 4px 0 8px; }
.wg-stake { margin-top: 18px; }

.pick { --p: var(--tent-3); --p2: #1d1745; --ink: var(--cream); position: relative; display: grid; gap: 3px; justify-items: center; padding: 15px 8px 13px; border: 0; border-radius: 14px; cursor: pointer; color: var(--ink);
  background: linear-gradient(180deg, var(--p), var(--p2));
  box-shadow: 0 5px 0 rgba(0, 0, 0, .4), 0 12px 16px -8px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .08s, box-shadow .08s, filter .15s; }
.pick strong { font: 400 21px/1 var(--font-display); text-shadow: 0 2px 0 rgba(0, 0, 0, .22); }
.pick span { font-size: 13px; font-weight: 700; opacity: .92; }
.pick:hover { filter: brightness(1.08); }
.pick:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
.pick-green { --p: #38e592; --p2: #139058; --ink: #032412; }
.pick-violet { --p: #a883ff; --p2: #5a35c8; --ink: #fff; }
.pick-red { --p: #ff6178; --p2: #b81d38; --ink: #fff; }
.pick-big { --p: var(--gold-hi); --p2: var(--gold); --ink: #2a1700; }
.pick-small { --p: #72c4ff; --p2: #2278c4; --ink: #021a33; }
.pick.picked { animation: pickPop .5s cubic-bezier(.3, 1.5, .5, 1); }
.pick.picked::after { content: ""; position: absolute; inset: -4px; border-radius: 17px; border: 3px solid var(--gold-hi); animation: pickRing .6s ease-out forwards; pointer-events: none; }
@keyframes pickPop { 0% { transform: scale(1); } 35% { transform: scale(.92); } 70% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes pickRing { from { opacity: 1; transform: scale(.96); } to { opacity: 0; transform: scale(1.12); } }

.result { margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; animation: bannerIn .4s cubic-bezier(.3, 1.4, .5, 1); }
.result.win { background: rgba(25, 184, 166, .16); color: var(--teal-hi); box-shadow: inset 0 0 0 1px rgba(94, 234, 212, .45); }
.result.lose { background: rgba(240, 53, 122, .13); color: var(--rani-hi); box-shadow: inset 0 0 0 1px rgba(255, 122, 166, .35); }

.trend { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.trend-i { display: grid; justify-items: center; gap: 4px; }
.trend-i em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }

/* =====================================================================
   AVIATOR
   ===================================================================== */
.av { grid-template-columns: minmax(0, 1fr) 320px; }
.av-main { gap: 14px; }
.crash-strip { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.crash-strip .lbl { margin: 0; white-space: nowrap; }
.crash-row { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); }
.crash-row::-webkit-scrollbar { display: none; }
.crash-pill { flex: none; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; background: rgba(58, 168, 255, .16); color: #8fd0ff; animation: pillIn .35s cubic-bezier(.3, 1.5, .5, 1); }
.crash-pill.b1 { background: rgba(25, 184, 166, .2); color: var(--teal-hi); }
.crash-pill.b2 { background: rgba(139, 92, 246, .26); color: #cbb8ff; }
.crash-pill.b3 { background: rgba(255, 178, 26, .22); color: var(--gold-hi); }
.crash-pill.b4 { background: rgba(240, 53, 122, .26); color: var(--rani-hi); }
@keyframes pillIn { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }

.av-stage { position: relative; height: clamp(300px, 44vw, 430px); border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); background: #1a1040; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8); }
.av-stage canvas { display: block; width: 100%; height: 100%; }
.av-hud { position: absolute; inset: 0; pointer-events: none; }
.av-pill { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 5px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: rgba(13, 10, 32, .62); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px var(--line-2); }
.av-pill.wait { color: var(--gold-hi); }
.av-pill.fly { color: var(--teal-hi); }
.av-pill.fly::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--teal-hi); box-shadow: 0 0 10px var(--teal-hi); animation: liveDot 1s ease-in-out infinite; }
.av-pill.crash { color: var(--rani-hi); }
@keyframes liveDot { 50% { opacity: .3; } }
.av-mult { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); font: 400 clamp(54px, 11vw, 108px)/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--cream); text-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 0 40px rgba(255, 241, 214, .25); transition: color .25s; }
.av-mult.b1 { color: var(--teal-hi); text-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 0 46px rgba(94, 234, 212, .5); }
.av-mult.b2 { color: #cbb8ff; text-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 0 50px rgba(139, 92, 246, .75); }
.av-mult.b3 { color: var(--gold-hi); text-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 0 56px rgba(255, 178, 26, .8); }
.av-mult.b4 { color: var(--rani-hi); text-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 0 64px rgba(240, 53, 122, .9); }
.av-mult.wait { font-size: clamp(40px, 8vw, 74px); color: var(--gold-hi); }
.av-mult.crash { color: var(--rani-hi); animation: crashShake .4s ease-in-out; }
.av-mult.pop { animation: multPop .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes multPop { 0% { transform: translate(-50%, -50%) scale(1.2); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes crashShake { 0%, 100% { transform: translate(-50%, -50%); } 20% { transform: translate(-54%, -50%) rotate(-2deg); } 40% { transform: translate(-46%, -50%) rotate(2deg); } 60% { transform: translate(-53%, -50%) rotate(-1deg); } 80% { transform: translate(-48%, -50%); } }

.av-bet-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-bottom: 14px; align-items: end; }
.av-auto { display: grid; gap: 10px; }
.auto-box { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--night-2); border: 1px solid var(--line-2); border-radius: 12px; }
.auto-box input { padding: 6px 2px; border: 0; background: none; font-weight: 700; font-size: 20px; color: var(--teal-hi); font-variant-numeric: tabular-nums; }
.auto-box input:focus { outline: none; }
.auto-box:focus-within { outline: 2px solid var(--gold); }
.auto-box span { font-weight: 700; color: var(--muted); }

.pax-list { display: grid; max-height: 460px; overflow-y: auto; scrollbar-width: thin; }
.pax { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; border-radius: 8px; }
.pax:last-child { border-bottom: 0; }
.pax-name { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pax em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; }
.pax .bot { background: var(--tent-3); color: var(--muted); }
.pax .you { background: var(--gold); color: #2a1700; }
.pax.mine { background: rgba(255, 178, 26, .1); box-shadow: inset 0 0 0 1px rgba(255, 178, 26, .45); }
.pax.cashed { background: rgba(25, 184, 166, .09); }
.pax .ok { color: var(--teal-hi); font-weight: 700; font-size: 13px; text-align: right; }
.pax .ok b { margin-left: 4px; }
.pax .bad { color: var(--rani-hi); font-weight: 600; font-size: 13px; }
.pax .dim { font-size: 13px; }

/* =====================================================================
   CHICKEN ROAD
   ===================================================================== */
.ck { grid-template-columns: minmax(0, 1fr); }
.ck-stage-panel { padding: 16px; }
.ck-top { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ck-stat { flex: 1; min-width: 110px; padding: 8px 14px; background: var(--night-2); border: 1px solid var(--line); border-radius: 12px; }
.ck-stat .lbl { margin-bottom: 0; font-size: 12px; }
.ck-stat strong { font-size: 22px; font-weight: 700; }
.ck-stat:first-child strong { font: 400 28px/1.15 var(--font-display); color: var(--gold-hi); text-shadow: 0 3px 0 var(--gold-lo); }

.ck-scene { overflow-x: auto; overflow-y: hidden; border-radius: 14px; scrollbar-width: thin; scrollbar-color: var(--tent-3) transparent; border: 1px solid var(--line-2); }
.ck-road { --floor: 30px; --pad-h: 60px; position: relative; display: flex; align-items: stretch; width: max-content; min-width: 100%; height: 310px; padding: 0 10px 0 0; isolation: isolate;
  background:
    linear-gradient(180deg, rgba(8, 5, 24, .55), rgba(8, 5, 24, 0) 45%, rgba(255, 110, 30, .16)),
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(0, 0, 0, .3) 29px 31px),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(0, 0, 0, .22) 59px 61px),
    #2c1d45; }
.ck-road::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--floor); z-index: 0; background: linear-gradient(180deg, #1a1033, #0f0a24); box-shadow: 0 -2px 0 rgba(255, 255, 255, .06); }

.ck-start { position: relative; z-index: 1; flex: none; width: 118px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.ck-sign { margin: 22px 0 auto; padding: 7px 14px; border-radius: 8px; font: 400 15px/1 var(--font-display); color: #2a1700; background: linear-gradient(180deg, #ffd25e, #e8a020); box-shadow: 0 4px 0 #8a5400, 0 8px 12px rgba(0, 0, 0, .4); transform: rotate(-3deg); }
.ck-grass { width: 100%; height: calc(var(--floor) + var(--pad-h)); border-radius: 14px 14px 0 0; background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, .0) 0 9px, rgba(255, 255, 255, .1) 9px 11px),
    linear-gradient(180deg, #4ad37e 0 14px, #2a9a58 14px 40%, #1b6a3e); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .25); }

.ck-lane { position: relative; z-index: 1; flex: none; width: 92px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-left: 1px dashed rgba(255, 241, 214, .09); }
.ck-badge { margin-bottom: auto; margin-top: 16px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--cream); background: rgba(8, 5, 24, .55); box-shadow: inset 0 0 0 1px var(--line-2); transition: background .25s, color .25s; }
.ck-pad { position: relative; z-index: 1; width: 78px; height: var(--pad-h); margin-bottom: var(--floor); border-radius: 12px 12px 6px 6px; background: linear-gradient(180deg, #6a58a8, #342a66); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), 0 6px 0 #150f33, 0 12px 16px rgba(0, 0, 0, .45); transition: background .3s, box-shadow .3s; }
.ck-grate { position: absolute; inset: 15px 11px 9px; display: flex; justify-content: space-between; }
.ck-grate i { width: 6px; border-radius: 3px; background: rgba(10, 6, 30, .7); box-shadow: 0 1px 0 rgba(255, 255, 255, .1); }
.ck-n { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--faint); }

.ck-egg { position: absolute; left: 50%; bottom: calc(100% - 10px); width: 30px; height: 38px; margin-left: -15px; z-index: -1; opacity: 0; transform: scale(0); transform-origin: 50% 100%; }
.ck-egg svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }
.ck-lane.safe .ck-egg { opacity: 1; transform: none; animation: eggPop .6s .35s cubic-bezier(.3, 1.8, .5, 1) backwards; }
@keyframes eggPop { from { transform: translateY(14px) scale(0); } to { transform: none; } }
.ck-lane.safe .ck-badge { background: var(--gold); color: #2a1700; box-shadow: 0 0 14px rgba(255, 178, 26, .6); }
.ck-lane.safe .ck-pad { background: linear-gradient(180deg, #38dcc6, #0f7a6e); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4), 0 6px 0 #063d36, 0 0 24px rgba(94, 234, 212, .45); }
.ck-lane.safe .ck-grate i { background: rgba(2, 40, 36, .6); }

.ck-lane.next { cursor: pointer; touch-action: manipulation; background: linear-gradient(180deg, transparent 40%, rgba(255, 210, 94, .09)); }
.ck-lane.next .ck-badge { background: rgba(255, 178, 26, .24); color: var(--gold-hi); box-shadow: inset 0 0 0 1px rgba(255, 210, 94, .65); animation: badgeBeat 1.2s ease-in-out infinite; }
.ck-lane.next .ck-pad { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 6px 0 #150f33, 0 0 0 2px rgba(255, 210, 94, .62); }
.ck-lane.next:hover .ck-pad { transform: translateY(-3px); }
.ck-lane.next:focus-visible { outline-offset: -3px; }
@keyframes badgeBeat { 50% { transform: scale(1.08); } }

.ck-lane.fire .ck-badge { background: var(--rani); color: #fff; }
.ck-lane.fire .ck-pad { background: linear-gradient(180deg, #ff9a3c, #b81d38); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 6px 0 #4a0a1c, 0 0 24px rgba(255, 110, 30, .65); }
.ck-lane.fire .ck-grate i { background: rgba(60, 5, 15, .65); }

.ck-fire { position: absolute; left: 50%; bottom: calc(100% - 14px); z-index: 4; width: 84px; height: 150px; margin-left: -42px; opacity: 0; pointer-events: none; mix-blend-mode: screen; transform-origin: 50% 100%; }
.ck-lane.fire .ck-fire { opacity: 1; animation: fireBurst .55s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes fireBurst { from { transform: scaleY(0) scaleX(.5); } to { transform: none; } }
.ck-fire i { position: absolute; bottom: 0; left: 50%; width: 34px; height: 100px; margin-left: -17px; border-radius: 50% 50% 46% 46% / 72% 72% 28% 28%; transform-origin: 50% 100%;
  background: radial-gradient(ellipse at 50% 88%, #fff7b8 0, #ffd043 26%, #ff7a1a 56%, rgba(239, 61, 85, 0) 78%); animation: flame .62s ease-in-out infinite alternate; }
.ck-fire i:nth-child(1) { margin-left: -42px; height: 70px; width: 28px; animation-delay: -.2s; animation-duration: .55s; }
.ck-fire i:nth-child(2) { margin-left: -26px; height: 118px; animation-delay: -.45s; }
.ck-fire i:nth-child(3) { margin-left: -17px; height: 150px; width: 36px; animation-delay: -.1s; animation-duration: .7s; }
.ck-fire i:nth-child(4) { margin-left: 4px; height: 112px; animation-delay: -.35s; animation-duration: .5s; }
.ck-fire i:nth-child(5) { margin-left: 16px; height: 76px; width: 26px; animation-delay: -.6s; }
@keyframes flame { 0% { transform: scaleY(.82) scaleX(1.05) skewX(-4deg); } 100% { transform: scaleY(1.08) scaleX(.9) skewX(5deg); } }

.ck-finish { position: relative; z-index: 1; flex: none; width: 150px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: calc(var(--floor) - 2px); }
.ck-finish::before { content: ""; width: 120px; height: 150px; background:
    linear-gradient(180deg, transparent 0 40%, rgba(0, 0, 0, .0)),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(0, 0, 0, .22) 17px 19px),
    linear-gradient(180deg, #c8365e, #8c1840);
  clip-path: polygon(0 34%, 50% 0, 100% 34%, 100% 100%, 0 100%); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.ck-finish::after { content: ""; position: absolute; bottom: calc(var(--floor) - 2px); left: 50%; width: 38px; height: 46px; margin-left: -19px; border-radius: 19px 19px 0 0; background: linear-gradient(180deg, #1a0a22, #3b1230); box-shadow: inset 0 0 0 3px #ffd25e; }
.ck-finish span { position: absolute; bottom: calc(var(--floor) + 64px); top: auto; padding: 3px 12px; border-radius: 6px; font: 400 14px/1 var(--font-display); color: #2a1700; background: linear-gradient(180deg, #ffd25e, #e8a020); box-shadow: 0 3px 0 #8a5400; }

.ck-hen { position: absolute; left: 0; bottom: calc(var(--floor) + var(--pad-h) - 4px); z-index: 3; width: 84px; height: 84px; pointer-events: none; transition: transform .52s cubic-bezier(.4, .05, .3, 1); will-change: transform; }
.hen-shadow { position: absolute; left: 10px; right: 10px; bottom: -5px; height: 14px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .52) 0%, rgba(0, 0, 0, 0) 72%); transition: transform .2s; }
.ck-hen:has(.hop) .hen-shadow { animation: henShadow .54s ease-in-out; }
.hen-body { position: absolute; inset: 0; transform-origin: 50% 100%; animation: henIdle 2.4s ease-in-out infinite; }
.hen-svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35)); }
.hen-body.hop { animation: henHop .54s cubic-bezier(.3, .7, .4, 1); }
.hen-body.cheer { animation: henCheer .46s ease-in-out infinite; }
.ck-hen.roasted .hen-body { animation: henRoast 1s ease-in forwards; }
.ck-hen.roasted .hen-svg { filter: brightness(.22) sepia(.5) drop-shadow(0 0 8px rgba(255, 110, 30, .8)); transition: filter .4s; }
@keyframes henIdle { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, .975); } }
@keyframes henHop { 0% { transform: translateY(0) scale(1.12, .86); } 18% { transform: translateY(-14px) scale(.92, 1.1); } 50% { transform: translateY(-68px) rotate(-7deg) scale(1, 1); } 82% { transform: translateY(0) rotate(2deg) scale(1.1, .9); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes henShadow { 50% { transform: scale(.55); opacity: .5; } }
@keyframes henCheer { 0%, 100% { transform: translateY(0) scale(1.06, .94); } 50% { transform: translateY(-22px) scale(.95, 1.06) rotate(-5deg); } }
@keyframes henRoast { 0% { transform: none; } 25% { transform: translateY(-30px) rotate(-14deg); } 100% { transform: translateY(6px) rotate(86deg) scale(.95); opacity: .85; } }

.ck-controls { padding: 16px; }
.ck-ctl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; margin-bottom: 12px; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.modes button { display: grid; gap: 1px; justify-items: center; padding: 9px 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--night-2); color: var(--cream); cursor: pointer; text-align: center; transition: background .15s, border-color .15s, transform .1s; }
.modes button strong { font-size: 14px; }
.modes button span { font-size: 12px; font-weight: 600; color: var(--muted); }
.modes button em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold-hi); }
.modes button:hover:not(:disabled) { background: var(--tent-2); }
.modes button.on { border-color: var(--gold); background: rgba(255, 178, 26, .14); box-shadow: 0 0 0 1px var(--gold); }
.modes button:disabled { cursor: not-allowed; opacity: .6; }
.modes button.on:disabled { opacity: 1; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ck-actions .btn { flex: 1 1 220px; }

/* =====================================================================
   MINES
   ===================================================================== */
.mn { grid-template-columns: 330px minmax(0, 1fr); }
.mn-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.count-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.count-seg button { min-width: 42px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--night-2); color: var(--cream); font-weight: 700; cursor: pointer; transition: background .15s, transform .1s; }
.count-seg button:hover:not(:disabled) { background: var(--tent-2); }
.count-seg button.on { background: var(--gold); color: #2a1700; border-color: transparent; box-shadow: 0 3px 0 var(--gold-lo); }
.count-seg button:disabled { cursor: not-allowed; opacity: .55; }
.count-seg button.on:disabled { opacity: 1; }
.mn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mn-stats > div { padding: 10px 6px; text-align: center; background: var(--night-2); border: 1px solid var(--line); border-radius: 12px; }
.mn-stats .lbl { margin-bottom: 2px; font-size: 11.5px; }
.mn-stats strong { display: block; font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.mn-stats > div:first-child strong { color: var(--teal-hi); }
.mn-actions { display: grid; gap: 10px; }

.mn-board-panel { padding: 18px; }
.mn-prog { display: grid; gap: 8px; max-width: 560px; margin: 0 auto 16px; font-size: 14px; font-weight: 600; color: var(--muted); }
.mn-prog .bar { height: 8px; border-radius: 999px; background: var(--night-2); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.mn-prog .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .4s cubic-bezier(.3, 1.2, .5, 1); }
.mn-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 560px; margin: 0 auto; perspective: 1000px; }
.mn-banner { max-width: 560px; margin-left: auto; margin-right: auto; }

.tile { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 14px; background: none; cursor: default; -webkit-tap-highlight-color: transparent; }
.mn-grid.live .tile:not(.flipped) { cursor: pointer; }
.tile-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.25, .4, 1); }
.tile.flipped .tile-in { transform: rotateY(180deg); }
.mn-grid.live .tile:not(.flipped):hover .tile-in { transform: translateY(-4px); }
.mn-grid.live .tile:not(.flipped):active .tile-in { transform: translateY(2px) scale(.97); }
.tile:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.tile .face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.tile .front { background: linear-gradient(145deg, #5646a8, #2c2268); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -4px 0 rgba(0, 0, 0, .28), 0 5px 0 #150f33, 0 10px 16px -4px rgba(0, 0, 0, .5); }
.mn-grid.live .tile:not(.flipped):hover .front { background: linear-gradient(145deg, #6656c0, #3a2e82); }
.rv { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #efe9ff, #8d80d6); box-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.rv.a { top: 7px; left: 7px; } .rv.b { top: 7px; right: 7px; } .rv.c { bottom: 9px; left: 7px; } .rv.d { bottom: 9px; right: 7px; }
.plate { position: absolute; inset: 24%; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, #0c0824 0 15%, transparent 16%),
    linear-gradient(#0c0824, #0c0824) 50% 70% / 9% 30% no-repeat,
    radial-gradient(circle at 40% 35%, #6859c6, #3a2f80);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .22); }
.tile .back { transform: rotateY(180deg); }
.tile.is-gem .back { background: radial-gradient(circle at 50% 38%, #1fa595, #0a4a44); box-shadow: inset 0 0 0 2px rgba(94, 234, 212, .6), inset 0 -4px 0 rgba(0, 0, 0, .25), 0 0 26px rgba(94, 234, 212, .4); }
.tile.is-bomb .back { background: radial-gradient(circle at 50% 38%, #6a1238, #25091c); box-shadow: inset 0 0 0 2px rgba(255, 122, 166, .6), inset 0 -4px 0 rgba(0, 0, 0, .3), 0 0 26px rgba(240, 53, 122, .45); }
.tile .art { width: 68%; height: 68%; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .45)); }
.tile.flipped.is-gem .art { animation: gemGlint 1.8s .5s ease-in-out infinite; }
@keyframes gemGlint { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.1) rotate(-4deg); } }
/* dim the faces, never .tile-in: opacity or filter there flattens the 3D flip */
.tile.dim .face { opacity: .5; filter: saturate(.7); }
.tile.dim .back { box-shadow: none; }
.tile.pending .tile-in { animation: tileWait .5s ease-in-out infinite; }
@keyframes tileWait { 50% { transform: scale(.94); } }
.tile.blast .tile-in { animation: tileBlast .6s cubic-bezier(.2, .8, .3, 1) forwards; transform: rotateY(180deg); }
@keyframes tileBlast { 0% { transform: rotateY(180deg) scale(1); } 25% { transform: rotateY(180deg) scale(1.28); } 100% { transform: rotateY(180deg) scale(1); } }

/* =====================================================================
   K3 DICE
   ===================================================================== */
.k3 { grid-template-columns: minmax(0, 1fr) 320px; }

.k3-table-panel { padding: 14px; }
.k3-table { position: relative; display: grid; place-items: center; height: 280px; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, .14), transparent 62%),
    repeating-radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .0) 0 3px, rgba(0, 0, 0, .05) 3px 4px),
    linear-gradient(180deg, #14806f, #0a4a42);
  box-shadow: inset 0 0 0 6px #3a1f12, inset 0 0 0 8px #a9672a, inset 0 0 60px rgba(0, 0, 0, .55); transition: box-shadow .3s; }
.k3-table::before { content: ""; position: absolute; width: 62%; height: 44%; border-radius: 50%; border: 2px dashed rgba(255, 241, 214, .16); top: 34%; }
.k3-table.rolling { box-shadow: inset 0 0 0 6px #3a1f12, inset 0 0 0 8px #ffd25e, inset 0 0 60px rgba(0, 0, 0, .55), 0 0 40px rgba(255, 210, 94, .3); }
.k3-dice { position: relative; display: flex; gap: clamp(22px, 6vw, 56px); align-items: center; margin-top: 6px; }

.die { --sz: 88px; --h: 44px; --dur: 1100ms; position: relative; width: var(--sz); height: var(--sz); perspective: 760px; }
.die-hop { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(-26deg); }
.die.hop .die-hop { animation: dieHop var(--dur) cubic-bezier(.35, .1, .4, 1); }
@keyframes dieHop {
  0% { transform: translateY(0) rotateX(-24deg) rotateY(-26deg); }
  30% { transform: translateY(-86px) rotateX(-24deg) rotateY(-26deg); }
  58% { transform: translateY(0) rotateX(-24deg) rotateY(-26deg); }
  72% { transform: translateY(-26px) rotateX(-24deg) rotateY(-26deg); }
  86% { transform: translateY(0) rotateX(-24deg) rotateY(-26deg); }
  93% { transform: translateY(-7px) rotateX(-24deg) rotateY(-26deg); }
  100% { transform: translateY(0) rotateX(-24deg) rotateY(-26deg); } }
.cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.cube .face { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-items: center; padding: 15%; border-radius: 15px; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: linear-gradient(145deg, #fffaf0, #ecdcbc); box-shadow: inset 0 0 0 2px rgba(120, 80, 20, .12), inset 0 -6px 10px rgba(120, 80, 20, .16); }
.f1 { transform: translateZ(var(--h)); }
.f6 { transform: rotateY(180deg) translateZ(var(--h)); }
.f3 { transform: rotateY(90deg) translateZ(var(--h)); }
.f4 { transform: rotateY(-90deg) translateZ(var(--h)); }
.f2 { transform: rotateX(90deg) translateZ(var(--h)); }
.f5 { transform: rotateX(-90deg) translateZ(var(--h)); }
.cube .face > i { display: block; }
.pip { width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a3a78, #170f33); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .4); }
.face.one .pip { width: 130%; background: radial-gradient(circle at 35% 30%, #ff6f90, #c2185b); }
.die-shadow { position: absolute; left: 6%; right: 6%; bottom: -30px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .5); filter: blur(5px); }
.die.hop .die-shadow { animation: dieShadow var(--dur) cubic-bezier(.35, .1, .4, 1); }
@keyframes dieShadow { 0% { transform: scale(1); opacity: 1; } 30% { transform: scale(.55); opacity: .35; } 58% { transform: scale(1); opacity: 1; } 72% { transform: scale(.8); opacity: .7; } 86%, 100% { transform: scale(1); opacity: 1; } }

.k3-result { min-height: 76px; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 14px 6px 4px; text-align: center; font-weight: 600; color: var(--muted); }
.k3-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.k3-tags .tag { padding: 4px 14px; font-size: 14px; animation: pillIn .4s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.k3-tags .tag:nth-child(2) { animation-delay: .08s; } .k3-tags .tag:nth-child(3) { animation-delay: .16s; } .k3-tags .tag:nth-child(4) { animation-delay: .24s; }
.k3-line { font-weight: 700; font-size: 15px; }
.k3-line.win { color: var(--teal-hi); }
.k3-line.lose { color: var(--muted); }

.k3-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.bet { --p: var(--tent-3); --p2: #1d1745; --ink: var(--cream); position: relative; display: grid; gap: 2px; justify-items: center; padding: 14px 6px 12px; border: 0; border-radius: 14px; cursor: pointer; color: var(--ink);
  background: linear-gradient(180deg, var(--p), var(--p2)); box-shadow: 0 5px 0 rgba(0, 0, 0, .4), 0 12px 16px -8px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .08s, box-shadow .08s, filter .15s; }
.bet strong { font: 400 22px/1 var(--font-display); text-shadow: 0 2px 0 rgba(0, 0, 0, .22); }
.bet span { font-size: 12.5px; font-weight: 600; opacity: .85; }
.bet em { margin-top: 4px; padding: 1px 12px; border-radius: 999px; font-style: normal; font-weight: 800; font-size: 14px; background: rgba(0, 0, 0, .22); }
.bet:hover:not(:disabled) { filter: brightness(1.08); }
.bet:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
.bet:disabled { cursor: not-allowed; filter: saturate(.4) brightness(.65); }
.bet-big { --p: var(--gold-hi); --p2: var(--gold); --ink: #2a1700; }
.bet-small { --p: #72c4ff; --p2: #2278c4; --ink: #021a33; }
.bet-odd { --p: #38e592; --p2: #139058; --ink: #032412; }
.bet-even { --p: #ff6178; --p2: #b81d38; --ink: #fff; }
.bet-triple { --p: #a883ff; --p2: #5a35c8; --ink: #fff; grid-column: 1 / -1; grid-template-columns: auto auto auto; justify-content: center; align-items: center; gap: 14px; padding: 12px 6px; }
.bet-triple em { margin: 0; }

.mini-dice { display: flex; gap: 3px; }
.mini-dice span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 800; color: #2a1a3a; background: linear-gradient(145deg, #fffaf0, #ecdcbc); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1020px) {
  .wg, .av, .k3, .mn { grid-template-columns: minmax(0, 1fr); }
  .mn-side { order: 2; }
  .mn-board-panel { order: 1; }
  .k3-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .wg-stage { flex-direction: column; padding: 16px; gap: 14px; }
  .wg-info { width: 100%; grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; }
  .wg-info > div:first-child { grid-column: 1; }
  .wg-clock { grid-row: 1 / span 2; grid-column: 2; width: 110px; height: 110px; }
  .wg-clock-in strong { font-size: 34px; }
  .wg-info > div:last-child { grid-column: 1 / -1; }
  .ck-ctl-grid { grid-template-columns: minmax(0, 1fr); }
  .av-bet-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wg-numbers { gap: 12px 4px; }
  .ball-lg { width: 54px; height: 54px; font-size: 21px; }
  .wg-lock strong { font-size: 80px; }
  .av-pill { top: 10px; font-size: 12px; }
  .ck-stat { min-width: 0; padding: 7px 10px; }
  .ck-stat strong { font-size: 18px; }
  .ck-stat:first-child strong { font-size: 22px; }
  .ck-road { height: 290px; }
  .modes { grid-template-columns: repeat(2, 1fr); }
  .mn-board-panel { padding: 12px; }
  .mn-grid { gap: 6px; }
  .tile .front, .tile .back, .tile .face { border-radius: 10px; }
  .k3-table { height: 240px; }
  .die { --sz: 66px; --h: 33px; }
  .die-shadow { bottom: -24px; }
  @keyframes dieHop {
    0% { transform: translateY(0) rotateX(-24deg) rotateY(-26deg); }
    30% { transform: translateY(-64px) rotateX(-24deg) rotateY(-26deg); }
    58% { transform: translateY(0) rotateX(-24deg) rotateY(-26deg); }
    72% { transform: translateY(-20px) rotateX(-24deg) rotateY(-26deg); }
    86% { transform: translateY(0) rotateX(-24deg) rotateY(-26deg); }
    93% { transform: translateY(-5px) rotateX(-24deg) rotateY(-26deg); }
    100% { transform: translateY(0) rotateX(-24deg) rotateY(-26deg); } }
  .k3-grid { grid-template-columns: repeat(2, 1fr); }
  .bet-triple { grid-column: 1 / -1; }
  .pax-list { max-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-in { transition-duration: .01ms; }
  .ck-hen { transition-duration: .01ms; }
}
