/* KTC casino screen (system/ktc/casino/view.php, js/ktc/ktc_casino.js). KTC brand: Outfit for text
   (loaded by ktc-onboarding.css), the purple-to-cyan gradient for the one primary action, sticker
   buttons whose edge collapses on press. Everything is scoped under .ktc_casino, so a game can't
   restyle the chat around it. Spacing on 4/8/12/16/24. */
:where(:root) {
	--kc-gradient: linear-gradient(135deg, #fc00ff, #7a5cff 50%, #00dbde);
	--kc-edge: #14061f;          /* the dark edge every KTC item has (art/kit.py) */
	--kc-surface: #1a1328;
	--kc-raised: #2a2140;
	--kc-line: #14061f;
	--kc-ink: #ffffff;
	--kc-muted: rgba(255, 255, 255, 0.72);
	--kc-dim: rgba(255, 255, 255, 0.55);
	--kc-win: #8fd14f;
	--kc-lose: #ff8a9e;
	--kc-gold: #ffc94a;
}
/* stage first: the game takes the room, its choices sit under it, and the dock (result, bet, play)
   stays at the bottom in reach of a thumb. Sections are spaced by the column's gap, not margins. */
html .ktc_casino { display: flex; flex-direction: column; gap: 12px; padding: 16px; color: var(--kc-ink); font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif; text-align: center; }
html .ktc_casino button { font-family: inherit; }
html .ktc_casino p { margin: 0; }

/* header: game, your gold, sound, close */
html .kc_head { display: flex; align-items: center; gap: 8px; text-align: left; }
html .kc_title { flex: 1; min-width: 0; margin: 0; font-size: 20px; font-weight: 800; }
html .kc_title i { margin-right: 4px; background: linear-gradient(135deg, #c471ed, #6b9aeb, #12c2e9); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html .kc_balance { display: flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--kc-raised); font-size: 15px; font-weight: 700; color: var(--kc-gold); font-variant-numeric: tabular-nums; }
html .kc_balance { position: relative; }
html .kc_balance img { width: 18px; height: 18px; }
html .kc_delta { position: absolute; top: 100%; right: 8px; z-index: 6; color: var(--kc-gold); font-size: 15px; font-weight: 900; white-space: nowrap; text-shadow: 0 1px 0 var(--kc-edge), 0 2px 8px rgba(0, 0, 0, .6); pointer-events: none; animation: kc_delta 1.2s ease-out forwards; }
@keyframes kc_delta { 0% { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; transform: translateY(2px); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-4px); } }
html .kc_balance.is_bump { animation: kc_bump .18s ease-out; }
html .kc_balance.is_up { box-shadow: 0 0 0 2px rgba(255, 201, 74, 0.45), 0 0 16px rgba(255, 201, 74, 0.35); }
html .kc_icon_btn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--kc-dim); font-size: 17px; cursor: pointer; }
/* hover only where there's a mouse, or a tapped button stays lit on a phone; a press shows everywhere */
@media (hover: hover) and (pointer: fine) {
	html .kc_icon_btn:hover { background: var(--kc-raised); color: var(--kc-ink); }
}
html .kc_icon_btn { transition: transform .1s ease-out, background-color .1s ease-out; touch-action: manipulation; }
html .kc_icon_btn:active { transform: scale(.92); background: rgba(255, 255, 255, .14); }
html .kc_icon_btn[aria-pressed="true"] { color: var(--kc-lose); }
@keyframes kc_bump { 50% { transform: scale(1.12); } }

/* the stage each game draws on, with the effects layer (particles, flash, pops, big wins) on top */
html .kc_stage { position: relative; flex: 1 0 auto; display: flex; align-items: center; justify-content: center; min-height: 300px; overflow: hidden; border-radius: 16px; background: radial-gradient(circle at 50% 40%, rgba(196, 113, 237, 0.18), rgba(18, 194, 233, 0.06) 55%, transparent 75%), var(--kc-surface); transition: filter .3s; }
html .is_animating .kc_stage { cursor: pointer; }
html .kc_stage.is_lost { filter: saturate(.55) brightness(.85); }
html .ktc_casino .kc_stage.is_won { animation: kc_won .8s ease-out; }
@keyframes kc_won { 0%, 40% { box-shadow: inset 0 0 0 3px var(--kc-gold), inset 0 0 44px rgba(255, 201, 74, .4); } 100% { box-shadow: inset 0 0 0 0 rgba(255, 201, 74, 0); } }
html .kc_fx { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
html .kc_fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
html .kc_flash { position: absolute; inset: 0; background: #ffffff; opacity: 0; }
html .kc_flash.is_on { animation: kc_flash .22s ease-out; }
@keyframes kc_flash { 0% { opacity: var(--kc-flash, .3); } 100% { opacity: 0; } }
html .kc_pop { position: absolute; left: 50%; top: 42%; color: var(--kc-gold); font-size: 30px; font-weight: 900; white-space: nowrap; text-shadow: 0 2px 0 #7a4f00, 0 4px 16px rgba(0, 0, 0, 0.6); transform: translate(-50%, -50%); animation: kc_rise 1.1s cubic-bezier(.2, .8, .3, 1) forwards; }
html .kc_pop.is_small { font-size: 22px; }
@keyframes kc_rise { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -55%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -130%) scale(1); } }
html .kc_bigwin { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: radial-gradient(circle, rgba(32, 12, 60, 0.82), rgba(10, 6, 20, 0.9) 70%); pointer-events: auto; cursor: pointer; animation: kc_fade .2s ease-out; }
html .kc_bigwin b { font-size: 44px; font-weight: 900; letter-spacing: .02em; background: linear-gradient(180deg, #fff6d0, #ffc94a 55%, #e08a00); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 3px 0 #7a4f00); animation: kc_slam .45s cubic-bezier(.2, 1.6, .4, 1); }
html .kc_bigwin span { color: var(--kc-ink); font-size: 22px; font-weight: 800; }
html .kc_bigwin em { color: var(--kc-gold); font-size: 30px; font-style: normal; font-weight: 900; font-variant-numeric: tabular-nums; }
html .kc_bigwin.is_out { opacity: 0; transition: opacity .25s; }
@keyframes kc_slam { 0% { transform: scale(2.6); opacity: 0; } 60% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1); } }
@keyframes kc_fade { from { opacity: 0; } }
html .kc_coin_fly { position: fixed; z-index: 10000; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; transition: transform .65s cubic-bezier(.5, -0.3, .7, 1), opacity .65s; }

/* a game's choices: two or more sticker toggles */
html .kc_choices { display: flex; gap: 12px; }
html .kc_choice { flex: 1; padding: 12px; border: 2px solid var(--kc-line); border-radius: 12px; background: var(--kc-raised); color: var(--kc-muted); font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #111; transition: transform .08s, box-shadow .08s, border-color .15s; }
html .kc_choice:active { transform: translateY(3px); box-shadow: none; }
html .kc_choice.is_on { border-color: #12c2e9; color: var(--kc-ink); }
html .kc_rule { color: var(--kc-dim); font-size: 13px; }
html .kc_rule b { color: var(--kc-ink); }
/* once a member has played a game a few times its how-to lines go; a problem with the bet still shows, and odds and pay tables always stay */
html .ktc_casino.is_regular .kc_hint:not(.is_bad) { display: none; }

/* the dock: result line, bet stepper and the play button, kept in reach at the bottom */
html .kc_dock { position: sticky; bottom: 0; z-index: 4; display: flex; flex-direction: column; gap: 8px; margin: 0 -16px -16px; padding: 4px 16px 16px; background: linear-gradient(transparent, var(--panel, #1b1b1b) 12px); }
html .kc_bet { text-align: left; }
html .kc_label { display: block; margin: 0 0 6px; color: var(--kc-dim); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
html .kc_dock .kc_label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html .kc_bet_row { display: flex; align-items: center; gap: 8px; }
html .kc_bet_field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
html .kc_bet_coin { position: absolute; left: 12px; width: 18px; height: 18px; pointer-events: none; }
html .kc_bet_row input { flex: 1; min-width: 0; height: 48px; padding: 0 12px 0 38px; font-family: inherit; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
html .kc_auto .kc_bet_row input { padding-left: 12px; }
html .kc_bet_row input.is_bad { border-color: #ff5c7a !important; }
html .kc_chip { min-width: 48px; height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--kc-raised); color: var(--kc-ink); font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #111; transition: transform .08s, box-shadow .08s; }
html .kc_chip:active { transform: translateY(3px); box-shadow: none; }
html .kc_note { margin-top: 4px; color: var(--kc-dim); font-size: 12px; font-weight: 700; }
html .kc_dock .kc_note:not(.is_bad) { display: none; }
html .kc_note.is_bad { color: var(--kc-lose); }

/* the one primary action; while a play animates it reads Stop and skips to the result */
html .kc_play { display: block; width: 100%; min-height: 56px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--kc-gradient); color: var(--kc-ink); font-size: 19px; font-weight: 900; letter-spacing: .01em; cursor: pointer; box-shadow: 0 5px 0 var(--kc-edge), 0 10px 20px rgba(0, 0, 0, 0.35); transition: transform .08s, box-shadow .08s, filter .15s; }
@media (hover: hover) and (pointer: fine) {
	html .kc_play:hover:not(:disabled) { filter: brightness(1.08); }
}
html .kc_play:active:not(:disabled) { transform: translateY(5px); box-shadow: none; }
html .kc_play:disabled { filter: grayscale(.85) brightness(.7); box-shadow: none; cursor: not-allowed; }
html .is_playing .kc_play:disabled { cursor: progress; }
html .is_animating .kc_play { background: var(--kc-raised); box-shadow: 0 5px 0 #111; color: var(--kc-muted); }

/* result and recent results */
html .kc_result { min-height: 24px; font-size: 17px; font-weight: 800; }
html .kc_result.is_win { color: var(--kc-win); animation: kc_pop .35s ease-out; }
html .kc_result.is_lose { color: var(--kc-dim); }
html .kc_result.is_bad { color: var(--kc-lose); font-size: 14px; }
html .kc_recent { display: flex; gap: 6px; min-height: 24px; overflow: hidden; }
html .kc_recent:not(:empty)::before, html .kc_history:not(:empty)::before { content: 'Recent'; flex: none; align-self: center; color: var(--kc-muted); font-size: 12px; font-weight: 700; }
html .kc_history:not(:empty)::before { content: 'Crashed at'; }
html .kc_recent_chip { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 6px; box-sizing: border-box; border-radius: 8px; font-size: 12px; font-weight: 800; }
html .kc_recent_chip.is_new { animation: kc_pop .35s ease-out; }
html .kc_recent_chip.is_win { background: rgba(143, 209, 79, 0.18); color: var(--kc-win); }
html .kc_recent_chip.is_lose { background: rgba(255, 138, 158, 0.14); color: var(--kc-lose); }
@keyframes kc_pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ── Coinflip ── */
html .kc_coin_stage { perspective: 800px; }
html .kc_coin { position: relative; width: 160px; height: 160px; transform-style: preserve-3d; }
html .kc_coin_face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; backface-visibility: hidden; font-size: 64px; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.35), inset 0 -10px 20px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.45); }
html .kc_heads { background: radial-gradient(circle at 35% 30%, #ffe08a, #ffc94a 45%, #d99a1e); color: #8a5a00; }
html .kc_tails { background: radial-gradient(circle at 35% 30%, #e6c8ff, #c471ed 45%, #7a3fb0); color: #3d1466; transform: rotateY(180deg); }

/* ── Dice ── */
html .kc_dice_stage { flex-direction: column; gap: 12px; }
html .kc_dice { display: flex; gap: 24px; }
html .kc_die { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: 100px; height: 100px; padding: 14px; box-sizing: border-box; border-radius: 20px; background: linear-gradient(160deg, #ffffff, #e4ddf3); box-shadow: inset 0 -6px 0 rgba(91, 63, 158, 0.25), 0 8px 20px rgba(0, 0, 0, 0.45); }
html .kc_pip { width: 15px; height: 15px; margin: auto; border-radius: 50%; background: #2b1a4f; visibility: hidden; }
html .kc_die[data-face="1"] .kc_p5,
html .kc_die[data-face="2"] :is(.kc_p3, .kc_p7),
html .kc_die[data-face="3"] :is(.kc_p3, .kc_p5, .kc_p7),
html .kc_die[data-face="4"] :is(.kc_p1, .kc_p3, .kc_p7, .kc_p9),
html .kc_die[data-face="5"] :is(.kc_p1, .kc_p3, .kc_p5, .kc_p7, .kc_p9),
html .kc_die[data-face="6"] :is(.kc_p1, .kc_p3, .kc_p4, .kc_p6, .kc_p7, .kc_p9) { visibility: visible; }
html .kc_die.is_rolling { animation: kc_tumble .36s linear infinite; }
html .kc_die.is_rolling + .kc_die.is_rolling { animation-direction: reverse; animation-duration: .3s; }
@keyframes kc_tumble { 0% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-10px) rotate(90deg); } 50% { transform: translateY(0) rotate(180deg); } 75% { transform: translateY(-6px) rotate(270deg); } 100% { transform: translateY(0) rotate(360deg); } }
html .kc_dice_sum { min-height: 20px; color: var(--kc-muted); font-size: 15px; font-weight: 700; }
html .kc_choices_grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
html .kc_choices_grid .kc_choice { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; }
html .kc_choice_pays { color: var(--kc-dim); font-size: 12px; font-weight: 700; }
html .kc_choice_pays b { color: var(--kc-gold); }

/* ── Roulette ── */
html .kc_wheel_wrap { position: relative; width: 240px; height: 240px; margin: 12px 0; }
html .kc_wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px #3a2a5e, 0 10px 28px rgba(0, 0, 0, 0.5); }
html .kc_pocket { stroke: rgba(255, 255, 255, 0.25); stroke-width: .6; }
html .kc_pocket.kc_red { fill: #e5395b; }
html .kc_pocket.kc_black { fill: #1c1c24; }
html .kc_pocket.kc_green { fill: #2fa36b; }
html .kc_pocket_n { fill: #ffffff; font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif; font-size: 10px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; }
html .kc_wheel_hub { fill: var(--kc-surface); stroke: #3a2a5e; stroke-width: 4; }
html .kc_wheel_pointer { position: absolute; top: -12px; left: 50%; z-index: 1; width: 0; height: 0; margin-left: -12px; border: 12px solid transparent; border-top: 20px solid var(--kc-gold); border-bottom: 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); transform-origin: 50% 0; transition: transform .12s ease-out; }
html .kc_wheel_pointer.is_tick { transform: rotate(-16deg); transition: none; }
html .kc_wheel_result { position: absolute; top: 50%; left: 50%; width: 100px; transform: translate(-50%, -50%); font-size: 34px; font-weight: 800; line-height: 40px; }
html .kc_wheel_result.kc_red { color: #ff6b85; }
html .kc_wheel_result.kc_black { color: var(--kc-ink); }
html .kc_wheel_result.kc_green { color: #4fd18f; }
html .kc_roulette_bets { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; }
html .kc_roulette_bets .kc_choice { grid-column: span 3; display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; font-size: 15px; }
html .kc_roulette_bets .kc_rb_low, html .kc_roulette_bets .kc_rb_high, html .kc_roulette_bets .kc_rb_number, html .kc_roulette_bets [class*="kc_rb_dozen"] { grid-column: span 4; }
html .kc_rb_red .kc_choice_name { color: #ff6b85; }
html .kc_numbers { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
html .kc_numbers[hidden] { display: none; }
html .kc_number { height: 36px; border: 2px solid transparent; border-radius: 8px; color: #ffffff; font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
html .kc_number.kc_red { background: #b8304b; }
html .kc_number.kc_black { background: #2e2e38; }
html .kc_number.kc_green { grid-column: 1 / -1; background: #23845a; }
html .kc_number.is_on { border-color: #12c2e9; box-shadow: 0 0 0 2px rgba(18, 194, 233, 0.35); }

/* ── Wheel ── */
html .kc_prize_wrap { width: 260px; height: 260px; }
html .kc_segment { stroke: rgba(255, 255, 255, 0.2); stroke-width: .6; }
html .kc_w0 { fill: #23232c; background: #23232c; }
html .kc_w1 { fill: #4a5a7a; background: #4a5a7a; }
html .kc_w2 { fill: #1d9cc4; background: #1d9cc4; }
html .kc_w3 { fill: #7b55d6; background: #7b55d6; }
html .kc_w4 { fill: #d94f9b; background: #d94f9b; }
html .kc_w5 { fill: #f0b429; background: #f0b429; }
html .kc_segment_n { fill: #ffffff; font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif; font-size: 9px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; }
html .kc_paylist { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
html .kc_payitem { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--kc-raised); font-size: 13px; font-weight: 800; }
html .kc_payitem > i { width: 10px; height: 10px; border-radius: 50%; }
html .kc_payitem small { color: var(--kc-dim); font-size: 11px; font-weight: 700; }

/* ── Slots ── */
html .kc_reels { display: flex; gap: 8px; padding: 8px; border-radius: 16px; background: #15151b; box-shadow: inset 0 0 0 2px #3a2a5e; }
html .kc_reel { width: 96px; height: 112px; overflow: hidden; border-radius: 12px; background: linear-gradient(#e9e4f5, #ffffff 30%, #ffffff 70%, #e9e4f5); transition: box-shadow .2s; }
html .kc_reel.is_line { box-shadow: 0 0 0 3px var(--kc-gold), 0 0 18px rgba(255, 201, 74, 0.6); }
html .kc_reel_strip { will-change: transform; }
html .kc_sym { display: flex; align-items: center; justify-content: center; height: 112px; font-size: 52px; }
html .kc_s_clover { color: #2fa36b; }
html .kc_s_lemon { color: #e6b800; }
html .kc_s_bell { color: #e07b1f; }
html .kc_s_star { color: #8a4fe0; }
html .kc_s_gem { color: #12a4d9; }
html .kc_slots_pays .kc_payitem span { display: inline-flex; gap: 2px; font-size: 12px; }
html .kc_slots_pays .kc_payitem span i { filter: brightness(1.25); }
html .kc_rule .kc_s_clover { filter: brightness(1.25); }

/* ── Plinko ── */
html .kc_plinko_stage { padding: 16px 0 12px; }
html .kc_board { --kc-gap: 34px; position: relative; width: calc(9 * var(--kc-gap)); }
html .kc_pin_row { display: flex; justify-content: center; gap: calc(var(--kc-gap) - 6px); height: 24px; align-items: center; }
html .kc_pin { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); transition: background .3s, box-shadow .3s; }
html .kc_pin.is_hit { background: #ffffff; box-shadow: 0 0 8px 2px rgba(255, 201, 74, 0.8); transition: none; }
html .kc_ball { position: absolute; z-index: 1; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--kc-gold) 60%, #c98a00); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
html .kc_ball.is_landed { opacity: 0; transition: opacity .5s ease .1s !important; }   /* balls are made per drop (KtcCasino.games.plinko.drop) */
html .kc_buckets { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; margin-top: 8px; }
html .kc_bucket { padding: 6px 0; border-radius: 6px; background: var(--kc-raised); color: var(--kc-muted); font-size: 11px; font-weight: 800; transition: background .2s, color .2s, transform .2s; }
html .kc_bucket:first-child, html .kc_bucket:last-child { color: var(--kc-gold); }
html .kc_bucket.is_hit { background: #fc00ff; color: var(--kc-ink); animation: kc_spring .45s cubic-bezier(.16, 1, .3, 1); transform: translateY(3px); }
@keyframes kc_spring { 0% { transform: translateY(8px) scaleY(.8); } 100% { transform: translateY(3px); } }

/* ── Blackjack ── */
html .kc_table { flex-direction: column; justify-content: space-between; gap: 12px; min-height: 240px; padding: 12px; background: radial-gradient(ellipse at 50% 50%, rgba(47, 163, 107, 0.22), transparent 70%), var(--kc-surface); }
html .kc_hand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
html .kc_hand_label { margin: 0; color: var(--kc-dim); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
html .kc_hand_label b { margin-left: 4px; color: var(--kc-ink); font-size: 16px; }
html .kc_cards { display: flex; justify-content: center; min-height: 96px; }
html .kc_card { display: flex; flex-direction: column; justify-content: space-between; width: 66px; height: 96px; margin-left: 2px; padding: 6px 8px; box-sizing: border-box; border-radius: 8px; background: #ffffff; color: #1c1c24; text-align: left; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); }
html .kc_card:first-child { margin-left: 0; }
/* a long hand overlaps to stay on the table; up to four cards keep their suit in view */
html .kc_cards:has(.kc_card:nth-child(5)) .kc_card:not(:first-child) { margin-left: -20px; }
html .kc_cards:has(.kc_card:nth-child(7)) .kc_card:not(:first-child) { margin-left: -38px; }
html .kc_card b { font-size: 18px; font-weight: 800; line-height: 1; }
html .kc_card i { align-self: flex-end; font-size: 26px; font-style: normal; line-height: 1; }
html .kc_card.kc_red { color: #d62a4a; }
html .kc_card.kc_back { background: repeating-linear-gradient(45deg, #5b3f9e 0 6px, #6b4fc0 6px 12px); box-shadow: inset 0 0 0 3px #ffffff, 0 4px 10px rgba(0, 0, 0, 0.4); }
html .kc_card.is_dealt { animation: kc_deal .25s ease-out; }
@keyframes kc_deal { from { transform: translateY(-24px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
html .kc_actions[hidden] { display: none; }
/* a hand in play: Hit and Stand take the thumb position from the bet and Deal, and hold it while
   a card is dealt so nothing jumps */
html .ktc_casino[data-game="blackjack"].is_playing :is(.kc_bet, .kc_play, .kc_rule) { display: none; }
html .ktc_casino[data-game="blackjack"].is_playing .kc_actions { order: 1; margin-bottom: 8px; }
html .ktc_casino[data-game="blackjack"].is_playing .kc_actions[hidden] { display: flex; visibility: hidden; }
html .ktc_casino[data-game="blackjack"].is_playing .kc_actions .kc_choice { min-height: 56px; }
html .ktc_casino[data-game="blackjack"].is_playing .kc_dock { order: 2; }

/* ── Crash: a rocket rides the curve over a sky that streams faster and warms as the multiplier
   climbs; the last crash points run along the top and this round's players sit bottom right ── */
html .kc_crash_stage { min-height: 380px; background: radial-gradient(ellipse at 20% 110%, rgba(196, 113, 237, 0.22), transparent 60%), linear-gradient(#141428, #1c1830 60%, #241a36); }
html .kc_sky, html .kc_stars, html .kc_heat { position: absolute; inset: 0; pointer-events: none; }
html .kc_stars { background-image: radial-gradient(1.5px 1.5px at 20px 30px, rgba(255, 255, 255, 0.8), transparent), radial-gradient(1px 1px at 80px 70px, rgba(255, 255, 255, 0.6), transparent), radial-gradient(1px 1px at 50px 110px, rgba(255, 255, 255, 0.5), transparent), radial-gradient(2px 2px at 110px 20px, rgba(196, 233, 255, 0.9), transparent); background-size: 130px 130px; opacity: .7; }
html .kc_heat { background: radial-gradient(ellipse at 85% 10%, rgba(255, 122, 47, 0.55), rgba(255, 77, 77, 0.18) 45%, transparent 75%); opacity: 0; }
html .kc_curve { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
html .kc_curve path { fill: none; stroke: #12c2e9; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(18, 194, 233, 0.6)); }
html .kc_pad { position: absolute; left: 14px; bottom: 10px; width: 44px; height: 6px; border-radius: 3px; background: #00dbde; box-shadow: 0 0 12px rgba(0, 219, 222, 0.5); }
html .kc_rocket { position: absolute; left: 0; top: 0; z-index: 2; width: 40px; height: 68px; margin: -34px 0 0 -20px; will-change: transform; filter: drop-shadow(0 0 10px rgba(122, 92, 255, .35)); }
html .kc_rocket svg { display: block; width: 100%; height: 100%; overflow: visible; }
html .kc_rocket.is_gone { visibility: hidden; }
html .kc_rocket.is_pad { animation: kc_idle 1.6s ease-in-out infinite; }
/* the KTC rocket: a white hull with the dark edges of the KTC items, pink fins and a cyan window */
html .kc_smoke { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
html .kc_rocket { z-index: 2; }
html .kc_hull, html .kc_fin, html .kc_nose, html .kc_band, html .kc_nozzle, html .kc_window { stroke: #14061f; stroke-width: 1.8; stroke-linejoin: round; }
html .kc_hull { fill: #ffffff; }
html .kc_fin { fill: #fc00ff; }
html .kc_nose, html .kc_band { fill: #7a5cff; }
html .kc_nozzle { fill: #3a2a5e; }
html .kc_window { fill: #12c2e9; stroke: #ffffff; stroke-width: 2.2; }
html .kc_glint { fill: #e4ddf3; opacity: 1; }
html .kc_flame { fill: #ff7a2f; transform-origin: 0 15px; animation: kc_flicker .12s ease-in-out infinite alternate; }
html .kc_flame_core { fill: #fff3c4; transform-origin: 0 15px; animation: kc_flicker .09s ease-in-out infinite alternate-reverse; }
html .kc_rocket.is_pad .kc_flame { transform: scaleY(.25); animation: none; }
html .kc_rocket.is_pad .kc_flame_core { transform: scaleY(.3); animation: none; }
@keyframes kc_flicker { from { transform: scaleY(.8) scaleX(.9); } to { transform: scaleY(1.2) scaleX(1.05); } }
@keyframes kc_idle { 50% { margin-top: -38px; } }
html .kc_history { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; overflow: hidden; }
html .kc_history .kc_recent_chip { flex: none; width: auto; padding: 0 8px; backdrop-filter: blur(4px); }
html .kc_flight { position: absolute; top: 24%; left: 0; right: 0; z-index: 3; pointer-events: none; }   /* over the rocket, so the number never hides */
html .kc_mult { font-size: 56px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5); }
html .kc_mult.is_flying { color: var(--kc-ink); }
html .kc_mult.is_crashed { color: var(--kc-lose); }
html .kc_flight_note { margin-top: 4px; color: var(--kc-muted); font-size: 14px; font-weight: 700; }
html .kc_countdown { display: block; width: 120px; height: 4px; margin: 10px auto 0; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
html .kc_countdown[hidden] { display: none; }
html .kc_countdown i { display: block; height: 100%; width: 0; background: #00dbde; }
html .kc_out_tag { position: absolute; z-index: 2; padding: 2px 8px; border-radius: 999px; background: rgba(143, 209, 79, 0.2); color: var(--kc-win); font-size: 12px; font-weight: 800; white-space: nowrap; pointer-events: none; transform: translate(-50%, -50%); animation: kc_drift 1.8s ease-out forwards; }
@keyframes kc_drift { 0% { opacity: 0; margin-top: 0; } 12% { opacity: 1; } 100% { opacity: 0; margin-top: 46px; margin-left: -30px; } }
html .kc_players { position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 46%; max-width: 200px; padding: 6px 10px; border-radius: 12px; background: rgba(10, 8, 20, 0.55); backdrop-filter: blur(6px); text-align: left; }
html .kc_players_head { color: var(--kc-dim); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
html .kc_players ul { margin: 0; padding: 0; list-style: none; }
html .kc_players li { display: flex; gap: 6px; padding: 3px 0; font-size: 13px; font-weight: 700; }
html .kc_players li.kc_more { color: var(--kc-dim); font-size: 12px; }
html .kc_player_name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html .kc_player_bet { color: var(--kc-gold); }
html .kc_player_out { min-width: 40px; text-align: right; color: var(--kc-dim); }
html .kc_player_out.is_win { color: var(--kc-win); }
html .kc_auto_chip { flex: none; padding: 0 10px; font-size: 13px; }
html .kc_auto_chip b { color: var(--kc-gold); }
html .kc_auto_chip[aria-expanded="true"] { box-shadow: 0 0 0 2px #12c2e9; }
html .kc_auto_panel { padding: 10px; border-radius: 12px; background: var(--kc-raised); }
html .kc_auto_panel[hidden] { display: none; }
html .kc_auto_row { display: flex; gap: 6px; }
html .kc_auto_row input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; font-family: inherit; font-size: 16px; font-weight: 800; }
html .kc_auto_row input.is_bad { border-color: #ff5c7a !important; }
html .kc_auto_row .kc_chip { min-width: 0; height: 40px; padding: 0 10px; background: var(--kc-surface); font-size: 13px; }

html .kc_ben { display: none; position: absolute; left: 6px; bottom: 4px; z-index: 2; width: 60px; height: 60px; pointer-events: none; transform-origin: 50% 100%; }
html .kc_ben.is_in { animation: kc_ben_in .5s cubic-bezier(.16, 1, .3, 1) both; }
html .kc_ben.is_happy { animation: kc_ben_happy .7s ease-out; }
html .kc_ben.is_wow { animation: kc_ben_happy .45s ease-out 3; }
html .kc_ben.is_sad { animation: kc_ben_sad 1s ease-out; }
@keyframes kc_ben_in { 0% { opacity: 0; transform: translateY(24px); } 100% { opacity: 1; transform: none; } }
@keyframes kc_ben_happy { 0%, 100% { transform: none; } 30% { transform: translateY(-16px) rotate(-6deg); } 60% { transform: translateY(0) rotate(5deg) scaleY(.95); } 80% { transform: translateY(-5px); } }
@keyframes kc_ben_sad { 0%, 100% { transform: none; } 30%, 70% { transform: translateY(6px) rotate(-7deg); } }
/* phones: the game fills the screen instead of floating in a box */
@media (max-width: 600px) {
	html #large_modal:has(.ktc_casino) .large_modal_in { width: 100%; max-width: 100% !important; min-height: 100%; margin: 0; border: 0; border-radius: 0; }
	html .ktc_casino { min-height: 100dvh; box-sizing: border-box; padding: 12px 16px 16px; }
	html .kc_stage { min-height: 46dvh; }
	html .kc_reel { width: 29vw; max-width: 116px; height: 140px; }
	html .kc_sym { height: 140px; font-size: 76px; }
	html .kc_board { --kc-gap: min(44px, calc((100vw - 40px) / 9)); }
	html .kc_pin_row { height: 32px; }
	html .kc_bucket { padding: 9px 0; font-size: 12px; }
	html .kc_ball { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
	html .kc_wheel_wrap:has(.kc_pocket) { width: min(80vw, 310px); height: min(80vw, 310px); }
	html .kc_pocket_n { font-size: 11px; }
	html .kc_pop.is_small { font-size: 28px; }
	/* Ben Bot watches from the corner of the stage and reacts to the result (KtcCasino.ben) */
	html .kc_ben { display: block; }
	/* Crash never scrolls: the column is exactly the screen and the stage takes what is left */
	html .ktc_casino[data-game="crash"] { height: 100dvh; min-height: 0; overflow: hidden; }
	html .ktc_casino[data-game="crash"] .kc_stage { flex: 1 1 0; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
	html .kc_choice, html .kc_chip, html .kc_play { transition: none; }
	html .kc_result.is_win { animation: none; }
	html .kc_die.is_rolling { animation: none; }
	html .kc_card.is_dealt { animation: none; }
	html .kc_ben, html .kc_stage.is_won, html .kc_delta { animation: none; }
	html .kc_pop, html .kc_bigwin b, html .kc_bucket.is_hit, html .kc_recent_chip.is_new { animation: none; }
	html .kc_wheel_pointer.is_tick { transform: none; }
	html .kc_rocket.is_pad, html .kc_flame, html .kc_flame_core, html .kc_out_tag { animation: none; }
}

/* ── The KTC look, shared by every game: the same rules as the KTC items (art/kit.py) — dark
   edges, solid KTC colours, white details, light from the top left — on a deep violet
   stage with soft pink and cyan glows and a faint dot grid, like the shop's ads. Buttons are
   chunky stickers whose dark bottom edge collapses on press. The gradient is kept for button
   highlights (the chosen option, Play); game objects are solid. ── */
html .ktc_casino .kc_stage { border: 2px solid var(--kc-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 18px rgba(0, 0, 0, .35);
	background:
		radial-gradient(circle at 12% 8%, rgba(252, 0, 255, .16), transparent 45%),
		radial-gradient(circle at 92% 96%, rgba(0, 219, 222, .14), transparent 45%),
		radial-gradient(rgba(255, 255, 255, .045) 1.2px, transparent 1.6px) 0 0 / 22px 22px,
		linear-gradient(#1e1530, #150f24); }
html .ktc_casino .kc_choice, html .ktc_casino .kc_chip { border: 2px solid var(--kc-edge); background: var(--kc-raised); color: var(--kc-muted); box-shadow: 0 3px 0 var(--kc-edge), inset 0 1px 0 rgba(255, 255, 255, .07); }
html .ktc_casino .kc_choice.is_on { border-color: var(--kc-edge); background: var(--kc-gradient); color: #ffffff; text-shadow: 0 1px 0 var(--kc-edge); }
html .ktc_casino .kc_choice.is_on .kc_choice_pays { color: rgba(255, 255, 255, .85); }
html .ktc_casino .kc_choice.is_on .kc_choice_pays b { color: #ffffff; }
html .ktc_casino .kc_play { border: 2px solid var(--kc-edge); box-shadow: 0 5px 0 var(--kc-edge), 0 10px 22px rgba(122, 92, 255, .35); text-shadow: 0 2px 0 var(--kc-edge); }
html .ktc_casino .kc_bet_row input { border: 2px solid var(--kc-edge) !important; background: var(--kc-surface) !important; color: #ffffff; }
html .ktc_casino .kc_balance { border: 2px solid var(--kc-edge); }
html .ktc_casino .kc_recent_chip { border: 1.5px solid var(--kc-edge); }

/* Coinflip: the coin is a KTC poker chip, white spots round its rim */
html .ktc_casino .kc_coin_face { border: 4px solid var(--kc-edge); font-size: 58px; color: #ffffff; box-shadow: inset 0 -10px 18px rgba(20, 6, 31, .35), inset 0 6px 10px rgba(255, 255, 255, .25), 0 10px 26px rgba(0, 0, 0, .5); }
html .ktc_casino .kc_coin_face i { filter: drop-shadow(0 3px 0 var(--kc-edge)); }
html .ktc_casino .kc_coin_face::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: repeating-conic-gradient(#ffffff 0 16deg, transparent 16deg 45deg); -webkit-mask-image: radial-gradient(circle, transparent 0 66%, #000 67% 100%); mask-image: radial-gradient(circle, transparent 0 66%, #000 67% 100%); }
html .ktc_casino .kc_coin_face::after { content: ''; position: absolute; inset: 22%; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .8); }
html .ktc_casino .kc_heads { background: #fc00ff; }
html .ktc_casino .kc_tails { background: #7a5cff; }

/* Dice: the KTC Dice */
html .ktc_casino .kc_die { border: 3px solid var(--kc-edge); background: #7a5cff; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), inset 0 -6px 0 rgba(20, 6, 31, .3), 0 10px 22px rgba(0, 0, 0, .45); }
html .ktc_casino .kc_pip { background: #ffffff; box-shadow: 0 2px 0 rgba(20, 6, 31, .45); }

/* Roulette: red, black and green keep their meaning, in KTC's colours */
html .ktc_casino .kc_wheel { box-shadow: 0 0 0 4px var(--kc-edge), 0 0 0 8px #7a5cff, 0 0 0 10px var(--kc-edge), 0 12px 30px rgba(0, 0, 0, .55); }
html .ktc_casino .kc_pocket { stroke: var(--kc-edge); stroke-width: .9; }
html .ktc_casino .kc_pocket.kc_red { fill: #ff2e7a; }
html .ktc_casino .kc_pocket.kc_black { fill: #1c1430; }
html .ktc_casino .kc_pocket.kc_green { fill: #00b8a9; }
html .ktc_casino .kc_wheel_hub { fill: #1a1328; stroke: var(--kc-edge); stroke-width: 5; }
html .ktc_casino .kc_wheel_pointer { border-top-color: #ffffff; filter: drop-shadow(0 2px 0 var(--kc-edge)) drop-shadow(0 0 6px rgba(122, 92, 255, .8)); }
html .ktc_casino .kc_number { border: 2px solid var(--kc-edge); }
html .ktc_casino .kc_number.kc_red { background: #d61f66; }
html .ktc_casino .kc_number.kc_black { background: #2a2140; }
html .ktc_casino .kc_number.kc_green { background: #00998c; }
html .ktc_casino .kc_number.is_on { border-color: #ffffff; box-shadow: 0 0 0 2px #00dbde; }
html .ktc_casino .kc_wheel_result.kc_red { color: #ff5c9a; }
html .ktc_casino .kc_wheel_result.kc_green { color: #2ee6d6; }
html .ktc_casino .kc_rb_red .kc_choice_name { color: #ff5c9a; }
html .ktc_casino .kc_rb_red.is_on .kc_choice_name { color: #ffffff; }

/* Wheel: the KTC palette, darkest to brightest by prize, with dark edges and white pegs */
html .ktc_casino .kc_segment { stroke: var(--kc-edge); stroke-width: .9; }
html .ktc_casino .kc_w0 { fill: #1c1430; background: #1c1430; }
html .ktc_casino .kc_w1 { fill: #4b3d7a; background: #4b3d7a; }
html .ktc_casino .kc_w2 { fill: #00b8c4; background: #00b8c4; }
html .ktc_casino .kc_w3 { fill: #7a5cff; background: #7a5cff; }
html .ktc_casino .kc_w4 { fill: #fc00ff; background: #fc00ff; }
html .ktc_casino .kc_w5 { fill: #ffc94a; background: #ffc94a; }
html .ktc_casino .kc_prize_wrap .kc_wheel { box-shadow: 0 0 0 4px var(--kc-edge), 0 0 0 9px #ffffff, 0 0 0 11px var(--kc-edge), 0 12px 30px rgba(0, 0, 0, .55); }
html .ktc_casino .kc_payitem { border: 1.5px solid var(--kc-edge); }
html .ktc_casino .kc_payitem > i { border: 1.5px solid var(--kc-edge); }

/* Slots: the reels in a violet housing */
html .ktc_casino .kc_reels { padding: 10px; border: 3px solid var(--kc-edge); border-radius: 18px; background: #7a5cff; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), inset 0 -6px 0 rgba(20, 6, 31, .3), 0 10px 24px rgba(0, 0, 0, .45); }
html .ktc_casino .kc_reel { border: 3px solid var(--kc-edge); background: linear-gradient(#e7e2f6, #ffffff 30%, #ffffff 70%, #e7e2f6); }
html .ktc_casino .kc_sym i { filter: drop-shadow(0 2px 0 rgba(20, 6, 31, .55)); }
html .ktc_casino .kc_s_clover { color: #19b36b; }
html .ktc_casino .kc_s_lemon { color: #f2c200; }
html .ktc_casino .kc_s_bell { color: #ff8a1f; }
html .ktc_casino .kc_s_star { color: #7a5cff; }
html .ktc_casino .kc_s_gem { color: #fc00ff; }
html .ktc_casino .kc_reel.is_line { box-shadow: 0 0 0 3px #ffffff, 0 0 20px rgba(255, 255, 255, .7); }

/* Plinko: white pins with dark rings, a pink ball with a glint, buckets tinted by their prize */
html .ktc_casino .kc_pin { background: #ffffff; box-shadow: 0 0 0 1.5px var(--kc-edge); }
html .ktc_casino .kc_pin.is_hit { box-shadow: 0 0 0 1.5px var(--kc-edge), 0 0 10px 3px rgba(252, 0, 255, .75); }
html .ktc_casino .kc_ball { width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid var(--kc-edge); box-sizing: border-box; background: radial-gradient(circle at 32% 28%, #ffffff 0 18%, transparent 20%), #fc00ff; box-shadow: 0 3px 6px rgba(0, 0, 0, .5); }
html .ktc_casino .kc_bucket { border: 1.5px solid var(--kc-edge); background: var(--kc-raised); color: #ffffff; }
html .ktc_casino .kc_bucket:nth-child(4), html .ktc_casino .kc_bucket:nth-child(5), html .ktc_casino .kc_bucket:nth-child(6) { background: #241b38; color: var(--kc-muted); }
html .ktc_casino .kc_bucket:nth-child(2), html .ktc_casino .kc_bucket:nth-child(8) { background: #4b3d7a; }
html .ktc_casino .kc_bucket:nth-child(3), html .ktc_casino .kc_bucket:nth-child(7) { background: #3a2f62; }
html .ktc_casino .kc_bucket:first-child, html .ktc_casino .kc_bucket:last-child { background: #fc00ff; color: #ffffff; }
html .ktc_casino .kc_bucket.is_hit { background: #ffffff; color: var(--kc-edge); }

/* Blackjack: violet felt, white cards with dark edges, KTC card backs */
html .ktc_casino .kc_table { background:
		radial-gradient(ellipse at 50% 50%, rgba(122, 92, 255, .28), transparent 70%),
		radial-gradient(rgba(255, 255, 255, .04) 1.2px, transparent 1.6px) 0 0 / 22px 22px,
		linear-gradient(#22183a, #160f26); }
html .ktc_casino .kc_card { border: 2px solid var(--kc-edge); box-shadow: 0 4px 0 rgba(20, 6, 31, .6), 0 8px 16px rgba(0, 0, 0, .4); }
html .ktc_casino .kc_card.kc_red { color: #e5197a; }
html .ktc_casino .kc_card.kc_back { position: relative; background: #7a5cff; box-shadow: inset 0 0 0 4px #ffffff, inset 0 0 0 6px var(--kc-edge), 0 4px 0 rgba(20, 6, 31, .6); }
html .ktc_casino .kc_card.kc_back::after { content: 'KTC'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #ffffff; font-family: var(--font-display, 'KTC'), 'Outfit', sans-serif; font-size: 17px; font-weight: 700; text-shadow: 0 2px 0 var(--kc-edge); }

/* the Casino menu: each game keeps its own icon, on a tile of its own solid KTC colour with the dark
   edge, like the Market's and Leaderboards' tiles (css/ktc/ktc-onboarding.css). Dark icons on the
   light colours. A phone's Games tab draws them its own way (css/ktc/ktc-mobile.css) */
html #game_menu .kc_menu_icon { display: block; text-align: center; }
@media (min-width: 769px) {
	html #game_menu .kc_menu_icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 auto; box-sizing: border-box; border: 2px solid #14061f; border-radius: 9px; background: #7a5cff; color: #ffffff; -webkit-text-fill-color: currentColor; font-size: 16px; line-height: 1; }
	html #game_menu .fmenu_item[onclick*="'slots'"] .kc_menu_icon { background: #fc00ff; }
	html #game_menu .fmenu_item[onclick*="'crash'"] .kc_menu_icon { background: #ff5c9a; }
	html #game_menu .fmenu_item[onclick*="'blackjack'"] .kc_menu_icon { background: #e9e4f5; color: #14061f; }
	html #game_menu .fmenu_item[onclick*="'roulette'"] .kc_menu_icon { background: #8fd14f; color: #14061f; }
	html #game_menu .fmenu_item[onclick*="'coinflip'"] .kc_menu_icon { background: #ffc94a; color: #14061f; }
	html #game_menu .fmenu_item[onclick*="'dice'"] .kc_menu_icon { background: #00dbde; color: #14061f; }
}

/* ── The stage runs to the window's top and side edges, like the shop's ad, with the header (game,
   gold, sound, close) and the recent results laid over its top. The stage pads its top so its
   own content starts below them. ── */
html #large_modal .large_modal_in:has(.ktc_casino) { overflow: hidden; }
html .ktc_casino { position: relative; padding-top: 0; }
html .ktc_casino .kc_head { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: 10px 10px 0 16px; }
html .ktc_casino .kc_title { text-shadow: 0 2px 0 var(--kc-edge); }
html .ktc_casino .kc_balance { background: rgba(20, 6, 31, .55); backdrop-filter: blur(6px); }
html .ktc_casino .kc_icon_btn { border-radius: 50%; background: rgba(20, 6, 31, .55); color: var(--kc-muted); backdrop-filter: blur(6px); }
@media (hover: hover) and (pointer: fine) {
	html .ktc_casino .kc_icon_btn:hover { background: rgba(20, 6, 31, .8); color: var(--kc-ink); }
}
html .ktc_casino .kc_icon_btn:active { background: rgba(20, 6, 31, .9); color: var(--kc-ink); }
@media (prefers-reduced-motion: reduce) {
	html .kc_icon_btn:active { transform: none; }
}
html .ktc_casino .kc_recent { position: absolute; top: 56px; left: 16px; right: 16px; z-index: 5; pointer-events: none; }
html .ktc_casino .kc_stage { margin: 0 -16px; padding-top: 88px; border-width: 0 0 2px; border-radius: 0; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .04); }
html .ktc_casino .kc_crash_stage { padding-top: 0; }
html .ktc_casino .kc_history { top: 86px; left: 16px; right: 16px; }
html .ktc_casino .kc_plinko_stage { padding-top: 92px; }
html .ktc_casino .kc_flight { top: max(24%, 122px); }

/* ── One canvas for the whole window: the stage's violet, glows and dot grid run behind the
   choices and the dock too, so the game isn't a box above its controls. The stage itself is see-
   through; Crash's sky and Blackjack's felt become the whole window's. ── */
html .ktc_casino {
	--kc-canvas-end: #150f24;
	background:
		radial-gradient(circle at 12% 4%, rgba(252, 0, 255, .16), transparent 40%),
		radial-gradient(circle at 92% 98%, rgba(0, 219, 222, .14), transparent 40%),
		radial-gradient(rgba(255, 255, 255, .045) 1.2px, transparent 1.6px) 0 0 / 22px 22px,
		linear-gradient(#1e1530, var(--kc-canvas-end));
}
html .ktc_casino[data-game="crash"] { --kc-canvas-end: #241a36; background:
		radial-gradient(ellipse at 20% 70%, rgba(196, 113, 237, .2), transparent 55%),
		linear-gradient(#141428, #1c1830 55%, var(--kc-canvas-end)); }
html .ktc_casino[data-game="blackjack"] { --kc-canvas-end: #160f26; background:
		radial-gradient(ellipse at 50% 30%, rgba(122, 92, 255, .28), transparent 60%),
		radial-gradient(rgba(255, 255, 255, .04) 1.2px, transparent 1.6px) 0 0 / 22px 22px,
		linear-gradient(#22183a, var(--kc-canvas-end)); }
html .ktc_casino .kc_stage, html .ktc_casino .kc_crash_stage, html .ktc_casino .kc_table { border: 0; background: none; box-shadow: none; }
html .ktc_casino .kc_dock { background: none; }   /* the canvas shows through, glows and all */

/* ── Crash runs every frame, so nothing on its stage may repaint or re-blur each frame on a phone:
   the stars slide on the compositor (a tile bigger than the stage, moved by transform), the curve's
   glow is a wide faint stroke instead of a blur filter, the chips and panels over the sky are
   solid tints instead of backdrop blurs, and the stage is its own layer before lift-off shakes it. ── */
html .ktc_casino .kc_crash_stage { will-change: transform; }
html .ktc_casino .kc_stars { inset: 0 -130px -130px 0; will-change: transform; }
html .ktc_casino .kc_curve path { filter: none; }
html .ktc_casino .kc_curve .kc_curve_glow { stroke: rgba(18, 194, 233, .22); stroke-width: 9; }
html .ktc_casino[data-game="crash"] .kc_history .kc_recent_chip, html .ktc_casino[data-game="crash"] .kc_players,
html .ktc_casino[data-game="crash"] .kc_balance, html .ktc_casino[data-game="crash"] .kc_icon_btn { backdrop-filter: none; }
html .ktc_casino[data-game="crash"] .kc_players, html .ktc_casino[data-game="crash"] .kc_balance, html .ktc_casino[data-game="crash"] .kc_icon_btn { background-color: rgba(20, 6, 31, .78); }
