/* Frixion Casino (v4.63): the Casino tab (casino.js). Colors come from the theme variables in style.css. */
#casino-view { overflow-y: auto; }
.cz { --cz-green: #3ddc97; --cz-red: #e5484d; --cz-gold: #f0b232; --cz-line: var(--divider, rgba(255,255,255,.08));
  max-width: 1180px; margin: 0 auto; padding: 16px 20px 40px; color: var(--text-normal); }
.cz button { font: inherit; color: inherit; }
.cz .hidden { display: none !important; }

/* top bar */
.cz-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cz-bal { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--bg-tertiary); color: var(--accent); font-weight: 700; }
.cz-bal span { color: var(--text-normal); }
.cz-left { color: var(--text-muted); font-size: 13px; }
.cz-link { background: none; border: 0; padding: 0; color: var(--text-link); cursor: pointer; font-size: 13px; }
.cz-link:hover { text-decoration: underline; }
.cz-how { background: var(--bg-secondary); border: 1px solid var(--cz-line); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.cz-how p { margin: 6px 0; }
.cz-note { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; font-size: 13.5px; }

/* lobby */
.cz-group { margin-bottom: 22px; }
.cz-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.cz-group-head h3 { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.cz-group-head span { font-size: 12px; color: var(--text-faint); }
.cz-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cz-tile { position: relative; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  padding: 12px; border-radius: 10px; border: 1px solid var(--cz-line); background: var(--bg-secondary); cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.cz-tile:hover { border-color: var(--accent); background: var(--bg-modifier-hover); transform: translateY(-1px); }
.cz-tile-ico { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); color: var(--accent); }
.cz-tile-name { font-weight: 700; font-size: 14.5px; }
.cz-tile-blurb { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.cz-tile-tag { position: absolute; top: -8px; right: 10px; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: #fff; }

/* a game */
.cz-game-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cz-game-head h2 { margin: 0; font-size: 20px; }
.cz-game-blurb { color: var(--text-muted); font-size: 13px; }
.cz-back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px 6px 6px; border-radius: 6px; border: 1px solid var(--cz-line); background: var(--bg-secondary); cursor: pointer; font-size: 13px; }
.cz-back:hover { background: var(--bg-modifier-hover); }
.cz-game-main { display: grid; grid-template-columns: 290px 1fr; gap: 14px; align-items: start; }
.cz-side { background: var(--bg-secondary); border: 1px solid var(--cz-line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cz-stage { background: var(--bg-tertiary); border: 1px solid var(--cz-line); border-radius: 10px; padding: 16px; min-height: 360px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.cz-lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.cz-bet { display: flex; gap: 4px; }
.cz-bet input { flex: 1; min-width: 0; }
.cz-bet input, .cz-num { background: var(--bg-input); border: 1px solid var(--cz-line); border-radius: 6px; padding: 8px 10px; color: var(--text-normal); font: inherit; font-weight: 600; width: 100%; box-sizing: border-box; }
.cz-bet input:focus, .cz-num:focus { outline: none; border-color: var(--accent); }
.cz-bet button, .cz-btn2 { border: 1px solid var(--cz-line); background: var(--bg-input); border-radius: 6px; padding: 0 9px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.cz-btn2 { padding: 8px 10px; }
.cz-bet button:hover, .cz-btn2:hover { background: var(--bg-modifier-hover); }
.cz-bet button:disabled, .cz-btn2:disabled, .cz-bet input:disabled, .cz-num:disabled { opacity: .5; cursor: default; }
.cz-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cz-seg { display: flex; background: var(--bg-input); border-radius: 7px; padding: 3px; gap: 3px; }
.cz-seg button { flex: 1; border: 0; background: none; border-radius: 5px; padding: 6px 4px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.cz-seg button.on { background: var(--bg-floating); color: var(--text-normal); box-shadow: 0 1px 2px var(--shadow-color); }
.cz-seg.locked { opacity: .55; pointer-events: none; }
.cz-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; margin-top: 2px; }
.cz-stats span { background: var(--bg-tertiary); border-radius: 6px; padding: 6px 8px; font-size: 11px; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }
.cz-stats b { font-size: 13.5px; color: var(--text-normal); }
.cz-go { margin-top: 4px; border: 0; border-radius: 7px; padding: 11px 12px; font-weight: 700; font-size: 14.5px; cursor: pointer; background: var(--accent); color: #fff !important; transition: filter .15s; }
.cz-go:hover { filter: brightness(1.1); }
.cz-go:disabled { opacity: .55; cursor: default; filter: none; }
.cz-go.cash { background: #1f9d63; }
.cz-go.alt { background: var(--bg-input); color: var(--text-normal) !important; border: 1px solid var(--cz-line); }
.cz-hint { font-size: 12px; color: var(--text-faint); line-height: 1.4; }
.cz-result { min-height: 0; border-radius: 7px; font-size: 13px; }
.cz-result:not(:empty) { padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.cz-result.win { background: rgba(61,220,151,.13); color: var(--cz-green); }
.cz-result.lose { background: var(--bg-tertiary); color: var(--text-muted); }
.cz-result.push { background: var(--bg-tertiary); color: var(--text-normal); }
.cz-result span { font-size: 12px; opacity: .85; }
.cz-recent { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; min-height: 24px; }
.cz-recent-lbl { font-size: 11.5px; color: var(--text-faint); margin-right: 2px; }
.cz-chip { font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 5px; background: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--cz-line); }
.cz-chip.good { color: var(--cz-green); border-color: rgba(61,220,151,.35); }
.cz-chip.rt-red { background: #b9262e; color: #fff; border-color: transparent; }
.cz-chip.rt-black { background: #17181b; color: #fff; border-color: transparent; }
.cz-chip.rt-green { background: #138a4d; color: #fff; border-color: transparent; }
.cz-paytable { margin-top: 6px; border-top: 1px solid var(--cz-line); padding-top: 8px; display: flex; flex-direction: column; gap: 3px; max-height: 280px; overflow-y: auto; }
.cz-pay-head { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.cz-pay-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); }
.cz-pay-row span { display: inline-flex; align-items: center; gap: 2px; }
.cz-pay-row b { color: var(--text-normal); }
.r0 b, .cz-item.r0 b { color: #b5bac1; } .r1 b, .cz-item.r1 b { color: #57c26a; } .r2 b, .cz-item.r2 b { color: #4aa3ff; }
.r3 b, .cz-item.r3 b { color: #b06cff; } .r4 b, .cz-item.r4 b { color: #f0b232; } .r5 b, .cz-item.r5 b { color: #ff5a5f; }

/* Dice */
.cz-dice { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.cz-dice-num { text-align: center; font-size: 54px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cz-dice-num.win, .cz-limbo-num.win, .cz-cr-num.win { color: var(--cz-green); }
.cz-dice-num.lose, .cz-limbo-num.lose, .cz-cr-num.lose { color: var(--cz-red); }
.cz-dice-track { position: relative; height: 14px; border-radius: 7px; background: rgba(229,72,77,.5); }
.cz-dice-zone { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--cz-green); }
.cz-dice-mark { position: absolute; top: -9px; width: 6px; height: 32px; margin-left: -3px; border-radius: 3px; background: var(--text-normal); transition: left .55s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 0 2px var(--bg-tertiary); }
.cz-dice-mark.win { background: var(--cz-green); } .cz-dice-mark.lose { background: var(--cz-red); }
.cz-dice-range { width: 100%; accent-color: var(--accent); }
.cz-dice-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-faint); }

/* Limbo */
.cz-limbo { text-align: center; }
.cz-limbo-num { font-size: 76px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cz-limbo-target { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* Coinflip */
.cz-coin-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; perspective: 700px; }
.cz-coin { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(.25,.8,.25,1); }
.cz-coin-face { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; backface-visibility: hidden;
  background: radial-gradient(circle at 35% 30%, #ffe18a, #e3a91f 60%, #b67d0c); color: #7a5205; box-shadow: inset 0 0 0 6px rgba(255,255,255,.18), 0 6px 18px var(--shadow-color); }
.cz-coin-face.t { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #e8eaf0, #a9aebb 60%, #7d8291); color: #4e525d; }
.cz-coin-said { font-weight: 800; font-size: 18px; min-height: 24px; }

/* Rock Paper Scissors */
.cz-rps-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cz-rps-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 8px; border: 1px solid var(--cz-line); background: var(--bg-input); cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-muted) !important; }
.cz-rps-pick:hover:not(:disabled) { border-color: var(--accent); color: var(--text-normal) !important; }
.cz-rps-pick:disabled { opacity: .5; cursor: default; }
.cz-rps { display: flex; align-items: center; gap: 30px; }
.cz-rps-side { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cz-rps-who { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.cz-rps-hand { width: 110px; height: 110px; border-radius: 16px; background: var(--bg-secondary); border: 1px solid var(--cz-line); display: flex; align-items: center; justify-content: center; color: var(--text-normal); }
.cz-rps-vs { font-weight: 800; color: var(--text-faint); }
.cz-rps-wait { font-size: 28px; color: var(--text-faint); }

/* Upgrader */
.cz-up { position: relative; width: 300px; max-width: 100%; aspect-ratio: 1; }
.cz-up-dial { width: 100%; height: 100%; }
.cz-up-track { fill: none; stroke: var(--bg-input); stroke-width: 18; }
.cz-up-arc { fill: none; stroke: var(--cz-green); stroke-width: 18; }
.cz-up-needle { transform-box: view-box; transform-origin: 100px 100px; transition: transform 1.7s cubic-bezier(.15,.75,.2,1); }
.cz-up-needle path { stroke: var(--text-normal); stroke-width: 4; stroke-linecap: round; }
.cz-up-needle circle { fill: var(--text-normal); }
.cz-up-mid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; pointer-events: none; padding-top: 96px; }

/* Slots */
.cz-slots { padding: 18px; border-radius: 14px; background: var(--bg-secondary); border: 1px solid var(--cz-line); }
.cz-reels { position: relative; display: flex; gap: 8px; }
.cz-reel { width: 92px; height: 192px; overflow: hidden; border-radius: 8px; background: var(--bg-floating); border: 1px solid var(--cz-line); }
.cz-strip { will-change: transform; }
.cz-sym { height: 64px; display: flex; align-items: center; justify-content: center; }
.cz-payline { position: absolute; left: -6px; right: -6px; top: 50%; height: 64px; margin-top: -32px; border: 2px solid var(--cz-gold); border-radius: 8px; pointer-events: none; opacity: .65; }

/* Keno */
.cz-keno { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; width: 100%; max-width: 560px; }
.cz-kn { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--cz-line); background: var(--bg-secondary); cursor: pointer; font-weight: 700; font-size: 15px; transition: background .12s, transform .12s; }
.cz-kn:hover { background: var(--bg-modifier-hover); }
.cz-kn.on { background: var(--accent); color: #fff !important; border-color: transparent; }
.cz-kn.drawn { background: var(--bg-input); color: var(--text-faint) !important; box-shadow: inset 0 0 0 2px var(--text-faint); }
.cz-kn.hit { background: var(--cz-green); color: #0b3d27 !important; border-color: transparent; transform: scale(1.05); }

/* Plinko */
.cz-plinko { width: 100%; max-width: 620px; }
.cz-pl-svg { width: 100%; height: auto; display: block; }
.cz-peg { fill: var(--text-muted); opacity: .75; }
.cz-slot rect { fill: var(--bg-input); }
.cz-slot text { font-size: 9.5px; font-weight: 700; text-anchor: middle; fill: #fff; }
.cz-slot.cold rect { fill: #3a4a6b; } .cz-slot.mid rect { fill: #5b5fb0; } .cz-slot.warm rect { fill: #c8892a; } .cz-slot.hot rect { fill: #d23f45; }
.cz-slot { transform-box: fill-box; transform-origin: center; }
.cz-slot.bump { animation: czBump .35s ease-out; }
@keyframes czBump { 40% { transform: translateY(4px); } }
.cz-ball { fill: #ffd34d; stroke: #b98b06; stroke-width: 1; }

/* Cases */
.cz-cases { display: grid; grid-template-columns: 1fr; gap: 6px; }
.cz-case { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--cz-line); background: var(--bg-input); cursor: pointer; font-size: 13px; font-weight: 600; }
.cz-case b { color: var(--text-muted); font-size: 12px; }
.cz-case.on { border-color: var(--accent); background: var(--accent-soft); }
.cz-roll { position: relative; width: 100%; overflow: hidden; padding: 18px 0; }
.cz-roll-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--cz-gold); z-index: 2; border-radius: 2px; }
.cz-roll-strip { display: flex; gap: 8px; will-change: transform; padding-left: 50%; }
.cz-item { flex: 0 0 112px; height: 120px; border-radius: 10px; background: var(--bg-secondary); border: 1px solid var(--cz-line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-bottom-width: 4px; }
.cz-item b { font-size: 19px; }
.cz-item span { font-size: 11px; color: var(--text-muted); }
.cz-item-r { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 10px !important; }
.cz-item.r0 { border-bottom-color: #8e939b; } .cz-item.r1 { border-bottom-color: #57c26a; } .cz-item.r2 { border-bottom-color: #4aa3ff; }
.cz-item.r3 { border-bottom-color: #b06cff; } .cz-item.r4 { border-bottom-color: #f0b232; } .cz-item.r5 { border-bottom-color: #ff5a5f; }
.cz-item.won { outline: 2px solid var(--cz-gold); outline-offset: 2px; }

/* Roulette */
.cz-g-roulette .cz-stage { display: block; }
.cz-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.cz-chipbtn { aspect-ratio: 1; border-radius: 50%; border: 3px dashed rgba(255,255,255,.55); background: #3b4bd8; color: #fff !important; font-weight: 800; font-size: 11px; cursor: pointer; padding: 0; }
.cz-chipbtn:nth-child(2) { background: #1f9d63; } .cz-chipbtn:nth-child(3) { background: #23232a; } .cz-chipbtn:nth-child(4) { background: #8b3fd1; }
.cz-chipbtn:nth-child(5) { background: #c8892a; } .cz-chipbtn:nth-child(6) { background: #c4262e; }
.cz-chipbtn.on { box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--text-normal); }
.cz-rt { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cz-wheel-wrap { position: relative; width: 300px; max-width: 80%; }
.cz-wheel { width: 100%; height: auto; display: block; }
#cz-wh, #cz-ball-orbit { transform-box: view-box; transform-origin: 160px 160px; }
#cz-ball { transform-box: view-box; transform-origin: 160px 160px; }
.cz-wh-rim { fill: #4a2d16; stroke: #2b1a0c; stroke-width: 3; }
.cz-wh-p { stroke: #c9a24a; stroke-width: .6; }
.cz-wh-p.red { fill: #b9262e; } .cz-wh-p.black { fill: #17181b; } .cz-wh-p.green { fill: #138a4d; }
.cz-wh-t { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; }
.cz-wh-in { fill: #5c3a1d; stroke: #c9a24a; stroke-width: 1.5; }
.cz-wh-hub { fill: #c9a24a; }
.cz-ball2 { fill: #f4f4f4; stroke: #999; stroke-width: 1; }
.cz-wh-num { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; box-shadow: 0 2px 10px var(--shadow-color); }
.cz-wh-num.red, .cz-wh-num.black, .cz-wh-num.green { display: flex; }
.cz-wh-num.red { background: #b9262e; } .cz-wh-num.black { background: #17181b; } .cz-wh-num.green { background: #138a4d; }
.cz-rt-table { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 4px; }
.cz-rt-grid { display: grid; grid-template-columns: 7% minmax(0, 1fr) 9%; gap: 4px; }
.cz-rt-zero { display: flex; }
.cz-rt-zero .cz-rt-n { flex: 1; }
.cz-rt-nums { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.cz-rt-cols { display: grid; grid-template-rows: repeat(3, 1fr); gap: 4px; }
.cz-rt-dozens { display: grid; grid-template-columns: 7% repeat(3, minmax(0, 1fr)) 9%; gap: 4px; }
.cz-rt-dozens::before, .cz-rt-dozens::after, .cz-rt-outs::before, .cz-rt-outs::after { content: ''; }
.cz-rt-outs { display: grid; grid-template-columns: 7% repeat(6, minmax(0, 1fr)) 9%; gap: 4px; }
.cz-rt-n, .cz-rt-o { position: relative; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; cursor: pointer; font-weight: 700; font-size: 13px; color: #fff !important; min-height: 34px; padding: 4px 2px; transition: filter .12s, box-shadow .12s; }
.cz-rt-n.red { background: #b9262e; } .cz-rt-n.black { background: #22232a; } .cz-rt-n.green { background: #138a4d; }
.cz-rt-o { background: #145c38; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.cz-rt-n:hover, .cz-rt-o:hover { filter: brightness(1.2); }
.cz-rt-n.hit, .cz-rt-o.hit { box-shadow: 0 0 0 3px var(--cz-gold); z-index: 1; }
.cz-rt-dot { width: 11px; height: 11px; border-radius: 50%; } .cz-rt-dot.red { background: #e0393f; } .cz-rt-dot.black { background: #0e0e10; border: 1px solid #555; }
.cz-rt-chip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 22px; height: 22px; padding: 0 3px; box-sizing: border-box; border-radius: 11px; display: none; align-items: center; justify-content: center;
  background: #f4f4f4; color: #222; font-size: 10px; font-style: normal; font-weight: 800; border: 2px dashed #3b4bd8; pointer-events: none; }
.cz-rt-chip.on { display: flex; }

/* Mines and Towers */
.cz-mines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; max-width: 440px; }
.cz-tile2 { aspect-ratio: 1; border-radius: 10px; border: 0; background: var(--bg-input); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s, background .12s; padding: 0; }
.cz-tile2:hover:not(:disabled) { background: var(--bg-modifier-selected); transform: translateY(-2px); }
.cz-tile2:disabled { cursor: default; }
.cz-tile2.gem { background: rgba(61,220,151,.16); box-shadow: none; }
.cz-tile2.mine { background: rgba(229,72,77,.16); box-shadow: none; }
.cz-tile2.dim { opacity: .45; }
.cz-tile2.boom { background: rgba(229,72,77,.45); opacity: 1; }
.cz-tile2.wait { opacity: .6; }
.cz-towers { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 460px; }
.cz-tw-row { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: center; opacity: .55; }
.cz-tw-row.now, .cz-tw-row.done { opacity: 1; }
.cz-tw-row.now .cz-tw-x { color: var(--text-normal); }
.cz-tw-x { font-size: 12px; font-weight: 700; color: var(--text-faint); text-align: right; }
.cz-tw-tiles { display: flex; gap: 6px; }
.cz-tw-tiles .cz-tile2 { aspect-ratio: auto; height: 36px; flex: 1; }
.cz-tw-row.now .cz-tile2:not(:disabled) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.cz-tw-tiles .cz-tile2 svg { height: 70%; }

/* Crossing */
.cz-g-cross .cz-stage { align-items: stretch; }
.cz-road-wrap { width: 100%; overflow-x: auto; }
.cz-road { display: flex; min-height: 300px; background: #2a2c31; border-radius: 8px; }
.cz-lane { position: relative; flex: 0 0 76px; border-right: 2px dashed rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; }
.cz-lane.start { flex-basis: 70px; background: #355c3a; border-right: 4px solid #e8e8e8; border-radius: 8px 0 0 8px; }
.cz-lane.crossed { background: rgba(61,220,151,.08); }
.cz-lane.next { background: rgba(255,255,255,.05); }
.cz-lane.hit { background: rgba(229,72,77,.22); }
.cz-lane-x { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 11.5px; font-weight: 700; color: #cfd2d8; }
.cz-lane.crossed .cz-lane-x { color: var(--cz-green); }
.cz-runner { width: 46px; height: 46px; transition: transform .25s; }
.cz-runner.down { transform: rotate(90deg) scale(.85); opacity: .7; }
.cz-car { position: absolute; top: 18%; left: 50%; width: 34px; height: 56px; margin-left: -17px; border-radius: 7px; background: #e5484d; box-shadow: inset 0 10px 0 rgba(255,255,255,.25), inset 0 -8px 0 rgba(0,0,0,.25); }

/* cards: Hi-Lo and Blackjack */
.cz-card { width: 62px; height: 88px; border-radius: 7px; background: #f7f7f9; color: #1d1e22; position: relative; box-shadow: 0 2px 8px var(--shadow-color); display: flex; flex-direction: column; padding: 5px 6px; box-sizing: border-box; flex: 0 0 auto; }
.cz-card.red { color: #c4262e; }
.cz-card-r { font-weight: 800; font-size: 16px; line-height: 1; }
.cz-card-big { position: absolute; right: 6px; bottom: 6px; opacity: .9; }
.cz-card.back { background: repeating-linear-gradient(45deg, #3b4bd8 0 6px, #2f3cb0 6px 12px); border: 3px solid #f7f7f9; }
.cz-card.big { width: 120px; height: 170px; padding: 9px 11px; }
.cz-card.big .cz-card-r { font-size: 30px; }
.cz-card.big .cz-card-big svg { width: 60px; height: 60px; }
.cz-card.small { width: 40px; height: 56px; padding: 3px 4px; }
.cz-card.small .cz-card-r { font-size: 12px; }
.cz-card.small .cz-card-big { display: none; }
.cz-hilo { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cz-hilo-card { perspective: 600px; }
.cz-hilo-card.flip .cz-card { animation: czFlip .35s ease-out; }
@keyframes czFlip { from { transform: rotateY(90deg); } }
.cz-hilo-trail { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 560px; }
.cz-trail-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--text-faint); }
.cz-hilo-moves { display: flex; flex-direction: column; gap: 6px; }
.cz-go.hl { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px; }
.cz-go.hl small { font-weight: 500; font-size: 11.5px; opacity: .85; }
.cz-bj { display: flex; flex-direction: column; gap: 26px; width: 100%; max-width: 520px; }
.cz-bj-hand { display: flex; flex-direction: column; gap: 8px; }
.cz-bj-who { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.cz-bj-who b { color: var(--text-normal); margin-left: 4px; }
.cz-bj-cards { display: flex; gap: 8px; min-height: 88px; flex-wrap: wrap; }
.cz-bj-moves { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cz-bj-moves .cz-btn2 { grid-column: 1 / 3; }

/* Crash */
.cz-g-crash .cz-stage { padding: 0; }
.cz-crash { position: relative; width: 100%; height: 360px; }
.cz-crash canvas { width: 100%; height: 100%; display: block; }
.cz-cr-num { position: absolute; top: 34%; left: 0; right: 0; text-align: center; font-size: 60px; font-weight: 800; font-variant-numeric: tabular-nums; pointer-events: none; }
.cz-cr-sub { position: absolute; top: calc(34% + 74px); left: 0; right: 0; text-align: center; font-size: 13.5px; color: var(--text-muted); pointer-events: none; padding: 0 10px; }

/* Mega Ticket */
.cz-mega { display: flex; justify-content: center; }
.cz-ticket { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 40px; border-radius: 14px; border: 2px dashed var(--cz-line); color: var(--text-muted); text-align: center; }
.cz-ticket svg { color: var(--accent); }
.cz-ticket.ready { border-color: var(--cz-gold); color: var(--text-normal); }
.cz-ticket.won { border-color: var(--cz-green); color: var(--cz-green); }
.cz-count { font-size: 34px; font-weight: 800; color: var(--text-normal); font-variant-numeric: tabular-nums; }

/* motion off (Epilepsy mode, or the computer asks for less motion): no spinning, no sliding */
html[data-epilepsy] .cz * { transition-duration: 0s !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { .cz * { transition-duration: 0s !important; animation: none !important; } }

/* phones */
@media (max-width: 860px) {
  .cz { padding: 12px 12px 30px; }
  .cz-game-main { grid-template-columns: 1fr; }
  .cz-stage { order: -1; min-height: 280px; padding: 12px; }
  .cz-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .cz-dice-num { font-size: 42px; } .cz-limbo-num { font-size: 56px; } .cz-cr-num { font-size: 44px; }
  .cz-crash { height: 280px; }
  .cz-reel { width: 74px; }
  .cz-rt-n, .cz-rt-o { font-size: 10px; min-height: 30px; padding: 3px 0; min-width: 0; }
  .cz-rt-grid, .cz-rt-nums, .cz-rt-cols, .cz-rt-dozens, .cz-rt-outs, .cz-rt-table { gap: 2px; }
  .cz-rt-o { gap: 3px; } .cz-rt-dot { width: 8px; height: 8px; }
  .cz-wheel-wrap { width: 250px; }
  .cz-rt-chip { min-width: 18px; height: 18px; font-size: 9px; }
  .cz-keno { gap: 4px; }
}
.cz-egg { font-size: 12px; color: var(--text-faint); }

/* v4.67: Provably Fair and Referrals panels, and each game's house edge */
.cz-fair-link { display: inline-flex; align-items: center; gap: 4px; }
.cz-panel { background: var(--bg-secondary); border: 1px solid var(--cz-line); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 13.5px; }
.cz-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 15px; }
.cz-panel-text { color: var(--text-muted); line-height: 1.5; margin: 6px 0; }
.cz-panel-sub { margin: 12px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.cz-fine { font-size: 12px; }
.cz-fair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 8px 0; }
.cz-fair-grid > div { background: var(--bg-tertiary); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.cz-fair-lbl { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 3px; }
.cz-fair-code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; color: var(--text-normal); }
.cz-fair-change { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.cz-fair-change input, .cz-ref-link { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border-radius: 7px; border: 1px solid var(--cz-line); background: var(--bg-input); color: var(--text-normal); font: inherit; }
.cz-btn { border: 0; border-radius: 7px; padding: 8px 14px; font-weight: 700; cursor: pointer; background: var(--accent); color: #fff !important; }
.cz-btn:hover { filter: brightness(1.08); }
.cz-fair-old { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 10px; margin: 8px 0; line-height: 1.5; }
.cz-fair-bets { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.cz-fair-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 8px; border-radius: 6px; background: var(--bg-tertiary); }
.cz-fair-row > span:first-child { flex: 1 1 auto; }
.cz-fair-n { color: var(--text-muted); font-size: 12px; }
.cz-fair-res { color: var(--text-muted); font-size: 12px; }
.cz-fair-out { font-size: 12.5px; color: var(--text-muted); }
.cz-fair-out.good { color: var(--cz-green); font-weight: 600; }
.cz-fair-out.bad { color: var(--cz-red); font-weight: 600; }
.cz-ref-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 10px 0; }
.cz-ref-stats > div { background: var(--bg-tertiary); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.cz-ref-stats b { font-family: ui-monospace, Consolas, monospace; font-size: 18px; color: var(--cz-green); }
.cz-ref-stats span { font-size: 12px; color: var(--text-muted); }
.cz-ref-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.cz-edge { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
