/* Party card games: playing cards, the projector table, and the phone controls. */
.pcard { display: block; width: 100%; height: auto; filter: drop-shadow(0 .4vh .6vh rgba(0,0,0,.45)); }
.pcard-wrap { display: inline-block; }
.pcard-wrap.is-new { animation: bj-deal .45s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: var(--d, 0ms); }
@keyframes bj-deal { from { transform: translateY(-40%) rotate(-12deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- projector ---------- */
#sc-games { padding: 0.5vh 2vw 2vh; }
.bj { display: grid; grid-template-columns: 1fr 20vw; gap: 1.6vw; height: 100%; }
.bj-main { display: grid; grid-template-rows: auto 1fr; gap: 1.2vh; min-height: 0; }
.bj-top-slot { display: grid; gap: 1vh; }
.bj-table { min-height: 0; }
.bj-dealer { display: flex; align-items: center; gap: 2vw; padding: 1.4vh 2vw; border-radius: 14px;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--ecto) 45%, #0b3d25) 0%, #0a2a1a 100%);
    border: .4vh solid color-mix(in srgb, var(--gold) 70%, transparent); box-shadow: inset 0 0 4vh rgba(0,0,0,.5); }
.bj-dealer-label { font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 4vh; color: #fff; min-width: 16vw; display: grid; gap: .6vh; }
.bj-dealer-label b { font-size: 7vh; color: var(--gold); line-height: 1; }
.bj-rule { font-size: 1.7vh; font-weight: 700; color: color-mix(in srgb, #fff 70%, transparent); letter-spacing: .02em; }
.bj-cards { display: flex; gap: .6vw; }
.bj-cards.is-dealer .pcard-wrap { width: 9vh; }
.bj-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .6vh 1.4vw; text-align: center; padding: .8vh 1.4vw; border-radius: 12px;
    background: var(--panel-2, #24242B); border: .25vh solid var(--pumpkin); }
.bj-banner.is-bet { border-color: var(--gold); }
.bj-banner.is-dealer { border-color: var(--violet); }
.bj-banner.is-done { border-color: var(--ecto); }
.bj-timer { display: inline-flex; align-items: center; gap: .6vw; padding: .5vh 1.2vw; border-radius: 999px; background: color-mix(in srgb, var(--pumpkin) 22%, transparent);
    font-family: Rubik, Inter, sans-serif; font-weight: 800; font-size: 2.4vh; color: var(--text, #F2EFEA); white-space: nowrap; }
.bj-timer b { font-variant-numeric: tabular-nums; color: var(--pumpkin); font-size: 3vh; }
.bj-timer.low { background: color-mix(in srgb, var(--blood) 28%, transparent); animation: bg-pulse .6s ease-in-out infinite; }
.bj-timer.low b { color: #ff6377; }
.bj-seats { display: grid; gap: 1.2vh 1vw; grid-template-columns: repeat(auto-fill, minmax(17vw, 1fr)); align-content: start; overflow: hidden; }
.bj-seat { background: var(--panel, #1C1C21); border-radius: 12px; padding: 1vh .8vw; border: .25vh solid transparent; display: grid; gap: .8vh; }
.bj-seat.is-playing { border-color: var(--gold); box-shadow: 0 0 2vh color-mix(in srgb, var(--gold) 35%, transparent); }
.bj-seat.res-win, .bj-seat.res-blackjack { border-color: var(--ecto); }
.bj-seat.res-lose, .bj-seat.is-busted { opacity: .75; filter: grayscale(.5); }
.bj-seat-top { display: flex; justify-content: space-between; align-items: center; font-size: 2.2vh; }
.bj-seat-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bj-chip { color: var(--gold); font-weight: 800; }
.bj-seat .bj-cards .pcard-wrap { width: 5.6vh; margin-right: -1.4vh; }
.bj-seat-foot { display: flex; justify-content: space-between; align-items: center; }
.bj-total { font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 3.2vh; }
.bj-badge { font-size: 1.8vh; font-weight: 800; padding: .3vh .6vw; border-radius: 6px; background: var(--panel-3, #2E2E37); }
.bj-badge.is-win, .bj-badge.is-blackjack { background: var(--ecto); color: #fff; }
.bj-badge.is-lose { background: var(--blood); color: #fff; }
.bj-badge.is-push { background: var(--violet); color: #fff; }
.bj-badge.is-thinking { background: var(--gold); color: #1a1400; animation: bj-pulse 1.2s ease-in-out infinite; }
@keyframes bj-pulse { 50% { opacity: .55; } }
.bj-empty { grid-column: 1 / -1; text-align: center; font-size: 3vh; color: var(--muted, #A7A2B0); padding: 6vh 0; }
.bj-leaders { background: var(--panel, #1C1C21); border-radius: 14px; padding: 2vh 1.2vw; overflow: hidden; }
.bj-leaders h3 { margin: 0 0 1.4vh; font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 3vh; }
.bj-leaders ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1vh; }
.bj-leaders li { display: grid; grid-template-columns: 3.4vh 1fr auto; gap: .6vw; align-items: center; font-size: 2.3vh; }
.bj-rank { display: grid; place-items: center; width: 3.4vh; height: 3.4vh; border-radius: 50%; background: var(--panel-3, #2E2E37); font-weight: 800; font-size: 1.8vh; }
.bj-leaders li:nth-child(1) .bj-rank { background: var(--gold); color: #1a1400; }
.bj-lname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bj-leaders b { color: var(--gold); }

/* ---------- phone ---------- */
.bj-phone { text-align: center; display: grid; gap: .9rem; }
.bj-stack { font-size: 1rem; color: var(--muted, #A7A2B0); }
.bj-stack b { color: var(--gold); font-size: 1.2rem; }
.bj-say { margin: 0; font-weight: 700; font-size: 1.05rem; }
.bj-phone .bj-clock { width: 2.2rem; height: 2.2rem; min-width: 0; font-size: 1rem; margin-left: .4rem; }
.bj-bet-amt { font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 3rem; color: var(--gold); line-height: 1; }
.bj-chip-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.bj-chip-btn { aspect-ratio: 1; border-radius: 50%; border: .3rem dashed rgba(255,255,255,.75); font-weight: 900; font-size: 1rem; color: #fff; cursor: pointer; }
.bj-chip-btn.c10 { background: #2E7BD6; } .bj-chip-btn.c50 { background: #C8102E; } .bj-chip-btn.c100 { background: #15151A; } .bj-chip-btn.c500 { background: #7A3FC4; }
.bj-chip-btn:disabled { opacity: .35; }
.bj-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.bj-big { font-size: 1.25rem; padding: .9rem; }
.bj-moves { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .5rem; }
.bj-moves .is-double { background: var(--gold); color: #1a1400; }
.bj-my-cards { display: flex; justify-content: center; }
.bj-my-cards .pcard-wrap { width: 5.2rem; margin-right: -1.2rem; }
.bj-my-cards .pcard-wrap:last-child { margin-right: 0; }
.bj-my-total { font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 2rem; }
.bj-result { font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 1.8rem; padding: .8rem; border-radius: 10px; background: var(--panel-3, #2E2E37); display: grid; }
.bj-result span { font-size: 1rem; font-weight: 700; }
.bj-result.is-win, .bj-result.is-blackjack { background: var(--ecto); }
.bj-result.is-lose { background: var(--blood); }
.bj-result.is-push { background: var(--violet); }
@media (prefers-reduced-motion: reduce) { .pcard-wrap.is-new, .bj-badge.is-thinking { animation: none; } }
.bj-bust { font-size: 3.2vh; color: var(--blood); vertical-align: middle; }

/* ---------- Chip Leaders (projector): a podium for the top three, the rest of the field beside it ---------- */
#sc-chips { padding: 2.4vh 3vw 2.4vh; }
.cb { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 2vh; min-height: 0; }
.cb-head { display: flex; align-items: center; gap: 1.4vw; flex-wrap: wrap; }
.cb-icon { font-size: 7vh; line-height: 1; animation: bj-coin 2.4s ease-in-out infinite; }
.cb-head h2 { margin: 0; font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 6.6vh; line-height: 1; letter-spacing: -.02em; }
.cb-sub { font-size: 2.2vh; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.cb-stats { margin-left: auto; display: flex; gap: 1vw; }
.cb-stats span { padding: .9vh 1.6vw; border-radius: 99px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 .2vh rgba(255, 216, 74, .35); font-weight: 800; font-size: 2.2vh; color: #e8dcc0; white-space: nowrap; }
.cb-stats b { font-family: Rubik, Inter, sans-serif; font-weight: 900; color: var(--gold); font-size: 2.8vh; }
.cb-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3vw; min-height: 0; align-items: stretch; }
/* the podium */
.cb-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 1.2vw; min-height: 0; padding-top: 4vh; }
.cb-step { position: relative; display: grid; justify-items: center; align-content: end; gap: .6vh; min-width: 0; text-align: center; animation: cb-rise .8s cubic-bezier(.2, 1.3, .4, 1) var(--d) both; }
.cb-step.empty { visibility: hidden; }
.cb-crown { font-size: 7vh; line-height: 1; margin-bottom: -2vh; z-index: 2; filter: drop-shadow(0 .6vh 1vh rgba(0, 0, 0, .6)); animation: cb-bob 2.4s ease-in-out infinite; }
.cb-av { display: grid; place-items: center; flex: none; width: 5.6vh; height: 5.6vh; border-radius: 50%; font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 2.2vh; color: #1a1206;
    background: radial-gradient(circle at 35% 30%, #fff6c8, var(--gold) 55%, #a8741a); box-shadow: 0 .4vh 1vh rgba(0, 0, 0, .5), inset 0 0 0 .3vh rgba(255, 255, 255, .35); }
.cb-av.big { width: 15vh; height: 15vh; font-size: 6vh; box-shadow: 0 0 0 .7vh rgba(255, 216, 74, .35), 0 1.4vh 3vh rgba(0, 0, 0, .6), inset 0 0 0 .5vh rgba(255, 255, 255, .35); }
.cb-s2 .cb-av.big { width: 12vh; height: 12vh; font-size: 4.8vh; background: radial-gradient(circle at 35% 30%, #fff, #c9d1de 55%, #7c8698); }
.cb-s3 .cb-av.big { width: 11vh; height: 11vh; font-size: 4.4vh; background: radial-gradient(circle at 35% 30%, #ffe2c4, #d9925a 55%, #8a4b1e); }
.cb-pname { max-width: 100%; font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 3.6vh; line-height: 1.05; overflow-wrap: anywhere; text-wrap: balance; }
.cb-s1 .cb-pname { font-size: 4.4vh; }
.cb-step small { margin-top: -.4vh; font-weight: 700; font-size: 1.8vh; color: var(--muted); }
.cb-pchips { display: inline-flex; align-items: center; gap: .6vh; font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 3.4vh; color: var(--gold); }
.cb-pchips i { width: 2.6vh; height: 2.6vh; border-radius: 50%; background: radial-gradient(circle, var(--gold) 0 38%, #b8801a 40% 52%, var(--gold) 54%); box-shadow: 0 0 0 .25vh #7a5410; }
.cb-s1 .cb-pchips { font-size: 4.4vh; }
.cb-block { width: 100%; display: grid; place-items: start center; padding-top: 1vh; border-radius: 1.4vh 1.4vh 0 0; margin-top: 1vh;
    background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 55%, #2a1a06), color-mix(in srgb, var(--gold) 18%, #120a02)); box-shadow: inset 0 .5vh 0 rgba(255, 255, 255, .3), 0 2vh 4vh rgba(0, 0, 0, .5); }
.cb-block em { font-style: normal; font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 6vh; color: rgba(255, 255, 255, .9); text-shadow: 0 .4vh 0 rgba(0, 0, 0, .35); }
.cb-s1 .cb-block { height: 22vh; } .cb-s2 .cb-block { height: 15vh; background: linear-gradient(180deg, #8f98a8, #2c3038); } .cb-s3 .cb-block { height: 11vh; background: linear-gradient(180deg, #b0703e, #3a1e0a); }
/* the rest of the field */
.cb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1vh; align-content: center; min-height: 0; }
.cb-list.two { grid-template-columns: 1fr 1fr; column-gap: 1.2vw; }
.cb-row { position: relative; display: grid; grid-template-columns: 4vh auto minmax(0, 1fr) auto; gap: 1vw; align-items: center; padding: 1vh 1.2vw 1.6vh; border-radius: 1.4vh; overflow: hidden;
    background: rgba(20, 14, 34, .78); box-shadow: inset 0 0 0 .15vh rgba(255, 255, 255, .08); animation: cb-in .5s ease var(--d) both; }
.cb-rank { font-family: Rubik, Inter, sans-serif; font-size: 3vh; font-weight: 900; text-align: center; color: #cfc4e8; }
.cb-name { font-weight: 900; font-size: 2.7vh; line-height: 1.1; overflow-wrap: anywhere; }
.cb-list.two .cb-name { font-size: 2.3vh; }
.cb-chips { font-family: Rubik, Inter, sans-serif; font-size: 2.9vh; font-weight: 900; color: var(--gold); text-align: right; }
.cb-bar { position: absolute; left: 1.2vw; right: 1.2vw; bottom: .6vh; height: .6vh; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.cb-bar span { display: block; height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, #a8741a, var(--gold)); animation: cb-grow 1.2s ease-out var(--d) both; }
.cb-more { align-self: center; justify-self: center; max-width: 34vw; padding: 3vh 2vw; border-radius: 2vh; border: .3vh dashed rgba(255, 216, 74, .4); text-align: center; font-weight: 800; font-size: 3vh; color: #e8dcc0; }
/* nobody playing yet */
.cb.is-empty .cb-wait { display: grid; justify-items: center; align-content: center; gap: 2vh; text-align: center; min-height: 0; }
.cb-stacks { display: flex; align-items: flex-end; gap: 2vw; height: 22vh; }
.cb-stacks i { display: flex; flex-direction: column-reverse; animation: cb-stack 3.2s ease-in-out calc(var(--i) * .35s) infinite; }
.cb-stacks b { display: block; width: 11vh; height: 2.2vh; margin-top: -.6vh; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #fff3b0, var(--gold) 45%, #a8741a 70%); box-shadow: 0 .3vh 0 #6a4810, inset 0 0 0 .35vh rgba(255, 255, 255, .25); }
.cb-stacks i:nth-child(2n) b { background: radial-gradient(ellipse at 50% 40%, #ffd0e0, #e2335a 45%, #8a1430 70%); box-shadow: 0 .3vh 0 #5a0a1e, inset 0 0 0 .35vh rgba(255, 255, 255, .25); }
.cb-stacks i:nth-child(3) b { background: radial-gradient(ellipse at 50% 40%, #e4d4ff, #8b5cf6 45%, #4a2496 70%); box-shadow: 0 .3vh 0 #2a1060, inset 0 0 0 .35vh rgba(255, 255, 255, .25); }
.cb-wait h3 { margin: 1vh 0 0; font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 6vh; }
.cb-wait p { margin: 0; font-weight: 800; font-size: 2.8vh; color: #e8dcc0; }
.cb-games { display: flex; flex-wrap: wrap; justify-content: center; gap: 1vh 1vw; max-width: 80vw; margin-top: 1.5vh; }
.cb-games span { display: inline-flex; align-items: center; gap: .6vh; padding: .8vh 1.4vw; border-radius: 99px; background: rgba(255, 255, 255, .07); font-weight: 800; font-size: 2.1vh; }
.cb-games em { font-style: normal; font-size: 2.6vh; }
@keyframes cb-in { from { transform: translateX(3vw); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cb-grow { from { width: 0; } }
@keyframes cb-rise { from { transform: translateY(8vh); opacity: 0; } }
@keyframes cb-bob { 50% { transform: translateY(-1vh) rotate(-6deg); } }
@keyframes cb-stack { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6vh); } }
@keyframes bj-coin { 50% { transform: rotateY(180deg); } }
@media (prefers-reduced-motion: reduce) { .cb-row, .cb-bar span, .cb-icon, .cb-step, .cb-crown, .cb-stacks i { animation: none; } }

/* ---------- step tracker and help ---------- */
.bj-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.bj-steps li { display: grid; justify-items: center; gap: .15rem; font-size: .7rem; font-weight: 800; color: var(--muted, #A7A2B0); text-align: center; line-height: 1.1; }
.bj-steps li b { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--panel-3, #2E2E37); color: var(--muted, #A7A2B0); font-size: .8rem; }
.bj-steps li.done b { background: var(--ecto); color: #fff; }
.bj-steps li.on { color: #fff; }
.bj-steps li.on b { background: var(--pumpkin); color: #fff; box-shadow: 0 0 .8rem var(--pumpkin); }
.bj-steps.big li { font-size: 2vh; }
.bj-steps.big li b { width: 4.4vh; height: 4.4vh; font-size: 2.2vh; }
.bj-banner .bj-sub { font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: 2.4vh; color: var(--text, #F2EFEA); }
.bj-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.bj-help-btn { border: 0; border-radius: 99px; padding: .35rem .8rem; background: var(--panel-3, #2E2E37); color: var(--text, #F2EFEA); font: inherit; font-weight: 800; font-size: .8rem; cursor: pointer; }
.bj-help { text-align: left; display: grid; gap: .6rem; }
.bj-help h3 { margin: 0; font-family: Rubik, Inter, sans-serif; font-weight: 900; }
.bj-help ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; line-height: 1.35; }
.bj-row-hand { display: grid; gap: .3rem; justify-items: center; }
.bj-row-hand .lbl { font-weight: 800; color: var(--muted, #A7A2B0); font-size: .85rem; }
.bj-row-hand .lbl b { color: var(--text, #F2EFEA); font-size: 1.2rem; }
.bj-my-cards.sm .pcard-wrap { width: 3.6rem; margin-right: -.8rem; }
.bj-waiting { opacity: .55; justify-content: center; }
.bj-moves .btn { display: grid; gap: .1rem; }
.bj-moves .btn small { font-size: .7rem; font-weight: 700; opacity: .85; }

/* =================== Animated table (casino-table.js), projector and phone =================== */
.ct { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 1.2vw; min-height: 0; }
.ct.is-compact { display: block; }
.ct-felt { position: relative; min-height: 0; padding: 2.2vh 2vw 2.6vh; border-radius: 0 0 50% 50% / 0 0 22% 22%;
    background: radial-gradient(ellipse at 50% 0%, #1f8a55 0%, #0f5a36 55%, #093d25 100%);
    box-shadow: inset 0 0 0 .8vh #6b4a1c, inset 0 0 0 1.3vh #c9a24a, inset 0 2vh 6vh rgba(0, 0, 0, .45), 0 2vh 5vh rgba(0, 0, 0, .5); overflow: visible; }
.ct-felt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .18;
    background-image: repeating-radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .15) 0 1px, transparent 1px 3px); }
.ct-dealer { position: relative; display: grid; justify-items: center; gap: .6vh; margin-bottom: 1vh; }
.ct-dlabel { font-family: var(--display); font-weight: 900; font-size: 2.6vh; color: #f4e7c2; letter-spacing: .06em; text-transform: uppercase; }
.ct-dlabel b { display: inline-block; min-width: 4vh; margin-left: .6vw; padding: .2vh .8vw; border-radius: 99px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 2.6vh; }
.ct-dlabel b:empty { display: none; }
.ct-dcards { display: flex; justify-content: center; min-height: 15vh; }
.ct-dcards .ct-card { width: 10vh; margin: 0 -1.2vh; }
.ct-shoe { position: absolute; right: 2vw; top: 0; width: 9vh; height: 12vh; border-radius: 1vh 1vh .6vh .6vh; background: linear-gradient(160deg, #3a2a14, #1d140a); box-shadow: 0 .8vh 1.6vh rgba(0, 0, 0, .5), inset 0 0 0 .3vh #8a6a2e; transform: rotate(-8deg); }
.ct-shoe i { position: absolute; left: 12%; right: 12%; top: 14%; height: 55%; border-radius: .6vh; background: repeating-linear-gradient(0deg, #f3efe6 0 .35vh, #c9c2b3 .35vh .5vh); }
.ct-arc { display: flex; justify-content: center; gap: 3vw; margin: .2vh 0 1.4vh; font-family: var(--display); font-weight: 800; font-size: 1.9vh; letter-spacing: .22em; text-transform: uppercase; color: rgba(244, 231, 194, .55); }
.ct-seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4vh 1.2vw; }
.ct-empty { text-align: center; color: rgba(244, 231, 194, .7); font-weight: 800; font-size: 2.4vh; }
.ct-empty:empty { display: none; }

.ct-seat { position: relative; display: grid; justify-items: center; gap: .5vh; width: 15vh; padding: .8vh .4vw 1vh; border-radius: 1.4vh; transition: box-shadow .3s, background .3s; }
.ct-seat.is-arriving { animation: ct-sit .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ct-sit { from { opacity: 0; transform: translateY(3vh) scale(.8); } }
.ct-seat.is-thinking { background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 .3vh rgba(255, 210, 90, .8), 0 0 3vh rgba(255, 210, 90, .5); animation: ct-think 1.2s ease-in-out infinite; }
@keyframes ct-think { 50% { box-shadow: 0 0 0 .3vh rgba(255, 210, 90, .3), 0 0 1vh rgba(255, 210, 90, .2); } }
.ct-seat.is-me .ct-name { color: var(--gold); }
.ct-seat.is-me .ct-name::after { content: " (You)"; font-weight: 700; }
.ct-seat.shake { animation: ct-shake .5s linear; }
@keyframes ct-shake { 20%, 60% { transform: translateX(-.8vh) rotate(-2deg); } 40%, 80% { transform: translateX(.8vh) rotate(2deg); } }
.ct-spot { position: relative; width: 8vh; height: 8vh; border-radius: 50%; border: .3vh dashed rgba(244, 231, 194, .45); display: grid; place-items: center; }
.ct-spot.glow { box-shadow: 0 0 3vh var(--gold); border-color: var(--gold); }
.ct-stack { position: relative; width: 5.2vh; height: 5.2vh; }
.ct-amt { position: absolute; bottom: -1.2vh; left: 50%; transform: translateX(-50%); padding: .1vh .7vh; border-radius: 99px; background: rgba(0, 0, 0, .65); color: #fff; font-weight: 900; font-size: 1.6vh; white-space: nowrap; }
.ct-amt:empty { display: none; }
.ct-pop { position: absolute; left: 50%; top: -1vh; font-weight: 900; font-size: 2.4vh; color: var(--gold); text-shadow: 0 .3vh .6vh #000; animation: ct-pop 1.4s ease-out forwards; pointer-events: none; }
@keyframes ct-pop { 0% { opacity: 0; transform: translate(-50%, 1vh) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -1vh) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -5vh) scale(1); } }

/* chips: a colored disc with edge stripes, stacked with depth */
.ct-chip { position: absolute; left: 0; bottom: calc(var(--i, 0) * .45vh); width: 5.2vh; height: 5.2vh; border-radius: 50%; display: block;
    background: radial-gradient(circle, var(--cc) 0 42%, #fff 42% 46%, var(--cc) 46% 100%);
    box-shadow: inset 0 0 0 .5vh rgba(255, 255, 255, 0), 0 .3vh 0 rgba(0, 0, 0, .45);
    -webkit-mask: none; }
.ct-chip::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(#fff 0 12deg, transparent 12deg 45deg); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); opacity: .9; }
.ct-chip.c10 { --cc: #2e7bd6; } .ct-chip.c50 { --cc: #c8102e; } .ct-chip.c100 { --cc: #222; } .ct-chip.c500 { --cc: #7a3fc4; }
.ct-chip-fly { position: fixed; width: 5.2vh; height: 5.2vh; bottom: auto; }
.ct-flyer { position: fixed; z-index: 60; pointer-events: none; }

/* cards: two faces with a real 3D flip */
.ct-card { position: relative; width: 6.4vh; aspect-ratio: 250 / 350; perspective: 60vh; }
.ct-cards { display: flex; justify-content: center; min-height: 9vh; }
.ct-cards .ct-card { margin: 0 -1.1vh; }
.ct-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, 1.3, .5, 1); }
.ct-card.down .ct-in { transform: rotateY(180deg); }
.ct-in .f, .ct-in .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ct-in .b { transform: rotateY(180deg); }
.ct-in svg { width: 100%; height: 100%; filter: drop-shadow(0 .4vh .6vh rgba(0, 0, 0, .45)); }
.ct-card.suspense { animation: ct-sus 1.1s ease-in-out; }
@keyframes ct-sus { 0%, 100% { transform: none; } 20% { transform: translateY(-1.4vh) rotate(-4deg); } 40% { transform: translateY(-1.4vh) rotate(4deg); } 60% { transform: translateY(-1.8vh) rotate(-3deg) scale(1.08); } 80% { transform: translateY(-1vh) rotate(2deg) scale(1.08); } }
.ct-card.suspense .ct-in .b svg { filter: drop-shadow(0 0 2vh var(--gold)); }

.ct-foot { display: flex; gap: .6vw; align-items: center; font-weight: 800; font-size: 1.9vh; color: #fff; max-width: 100%; }
.ct-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11vh; }
.ct-total { min-width: 3vh; padding: 0 .6vh; border-radius: 99px; background: rgba(0, 0, 0, .5); text-align: center; }
.ct-total:empty { display: none; }
.ct-badge span { display: inline-block; padding: .3vh 1vh; border-radius: 99px; font-weight: 900; font-size: 1.7vh; background: rgba(0, 0, 0, .55); animation: ct-sit .4s both; }
.ct-badge .is-win { background: var(--ecto); } .ct-badge .is-blackjack { background: var(--gold); color: #1a1206; } .ct-badge .is-lose { background: var(--blood); } .ct-badge .is-push { background: #555; }
.ct-stamp, .ct-dstamp { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); pointer-events: none; z-index: 3; }
.ct-dstamp { top: 55%; }
.ct-st { display: inline-block; padding: .4vh 1.4vh; border: .4vh solid currentColor; border-radius: 1vh; font-family: var(--display); font-weight: 900; font-size: 3vh; text-transform: uppercase; white-space: nowrap; background: rgba(0, 0, 0, .55); animation: ct-stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.ct-st.is-bust { color: #ff4d5e; transform: rotate(-12deg); }
.ct-st.is-bj { color: var(--gold); transform: rotate(-8deg); }
.ct-st.is-dbust { color: #7dffb0; font-size: 5vh; transform: rotate(-6deg); }
@keyframes ct-stamp { from { opacity: 0; scale: 3; } to { opacity: 1; scale: 1; } }

.ct-feed { width: 22vw; display: flex; flex-direction: column; gap: .8vh; overflow: hidden; max-height: 60vh; }
.ct-toast { padding: 1vh 1.2vw; border-radius: 1vh; background: rgba(20, 20, 26, .85); border-left: .5vh solid var(--gold); font-size: 2vh; font-weight: 700; animation: ct-toast .5s cubic-bezier(.2, 1.3, .4, 1) both; transition: opacity 1s; }
.ct-toast.is-old { opacity: .45; }
@keyframes ct-toast { from { opacity: 0; transform: translateX(3vw); } }

/* phone size */
.ct.is-compact .ct-felt { padding: .7rem .5rem 1rem; border-radius: 0 0 1.4rem 1.4rem; }
.ct.is-compact .ct-dlabel { font-size: .8rem; }
.ct.is-compact .ct-dlabel b { font-size: .85rem; min-width: 1.4rem; }
.ct.is-compact .ct-dcards { min-height: 3.6rem; }
.ct.is-compact .ct-dcards .ct-card { width: 2.5rem; margin: 0 -.3rem; }
.ct.is-compact .ct-shoe { width: 1.8rem; height: 2.4rem; right: .4rem; }
.ct.is-compact .ct-arc { font-size: .55rem; gap: .8rem; margin: .1rem 0 .5rem; }
.ct.is-compact .ct-seats { gap: .4rem; }
.ct.is-compact .ct-seat { width: 4.6rem; padding: .3rem .1rem .4rem; border-radius: .6rem; gap: .2rem; }
.ct.is-compact .ct-spot { width: 2.2rem; height: 2.2rem; }
.ct.is-compact .ct-stack, .ct.is-compact .ct-chip { width: 1.5rem; height: 1.5rem; }
.ct.is-compact .ct-chip { bottom: calc(var(--i, 0) * .12rem); }
.ct.is-compact .ct-amt { font-size: .55rem; bottom: -.45rem; }
.ct.is-compact .ct-pop { font-size: .8rem; }
.ct.is-compact .ct-cards { min-height: 2.6rem; }
.ct.is-compact .ct-card { width: 1.8rem; }
.ct.is-compact .ct-cards .ct-card { margin: 0 -.35rem; }
.ct.is-compact .ct-foot { font-size: .62rem; gap: .2rem; }
.ct.is-compact .ct-name { max-width: 3.2rem; }
.ct.is-compact .ct-badge span { font-size: .55rem; padding: .05rem .35rem; }
.ct.is-compact .ct-st { font-size: .7rem; border-width: 2px; padding: .05rem .3rem; }
.ct.is-compact .ct-st.is-dbust { font-size: 1rem; }
.ct.is-compact .ct-chip-fly { width: 1.5rem; height: 1.5rem; }
@media (prefers-reduced-motion: reduce) { .ct *, .ct-flyer { animation-duration: .01s !important; transition-duration: .01s !important; } }
.ct-chip-fly.sm { width: 1.5rem; height: 1.5rem; }
.ct-chip-fly.sm::before { -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); }
.bjp { display: grid; gap: .8rem; }
.bjp-head, .bjp-body { display: grid; gap: .6rem; justify-items: center; text-align: center; }
.bjp-head .bj-top { width: 100%; }
.bjp-table { margin: 0 -.4rem; }
.bj-result { position: relative; overflow: hidden; }
.bj-result.rain { animation: bj-winpop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes bj-winpop { from { transform: scale(.6); opacity: 0; } }
.bj-coinrain { position: absolute; inset: 0; pointer-events: none; font-style: normal; letter-spacing: 1.2rem; font-size: 1.2rem; animation: bj-rain 1.6s ease-in 2; opacity: 0; }
@keyframes bj-rain { 0% { transform: translateY(-120%); opacity: 1; } 100% { transform: translateY(120%); opacity: 0; } }

/* projector layout for the animated table */
.bj-side { display: grid; grid-template-rows: 1fr auto; gap: 1.4vh; min-height: 0; }
.bj-feed-box { background: var(--panel, #1C1C21); border-radius: 14px; padding: 1.6vh 1vw; min-height: 0; overflow: hidden; }
.bj-feed-box h3, .bj-side .bj-leaders h3 { margin: 0 0 1vh; font-size: 2.2vh; }
.bj-side .ct-feed { width: auto; max-height: none; }
.bj-side .bj-leaders { max-height: 34vh; }
.bj-table { height: 100%; }
.bj-table .ct { height: 100%; grid-template-columns: 1fr; }
.bj-table .ct-felt { display: flex; flex-direction: column; height: 100%; }
/* idle shuffle: a fan of cards riffling in the center while the table waits */
.ct-shuffle { position: absolute; left: 50%; top: 52%; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .5s; z-index: 1; }
.ct-shuffle.on { opacity: 1; }
.ct-shuffle i { position: absolute; left: -4.5vh; top: -6.5vh; width: 9vh; height: 13vh; border-radius: 1vh; background: repeating-linear-gradient(45deg, var(--violet) 0 1.4vh, color-mix(in srgb, var(--violet) 80%, #000) 1.4vh 2.8vh); box-shadow: inset 0 0 0 .3vh var(--gold), 0 1vh 2vh rgba(0,0,0,.5); }
.ct-shuffle i::after { content: var(--theme-icon, "🎃"); position: absolute; inset: 0; display: grid; place-items: center; font-size: 4.4vh; }
.ct-shuffle.on.m-riffle i { animation: ct-riffle 2.4s ease-in-out infinite; }

 
 

/* five idle routines, cycled by casino-table.js */
.ct-shuffle.on.m-riffle i { animation-delay: calc(var(--n) * .3s); }
.ct-shuffle i::before { content: attr(data-f); position: absolute; inset: 0; display: grid; place-items: center; border-radius: 1vh; background: #fbf8f1; color: #15151a; font-family: var(--display); font-weight: 900; font-size: 3.6vh; opacity: 0; box-shadow: inset 0 0 0 .3vh #d9d0bb; }
.ct-shuffle i.red::before { color: #c8102e; }
.ct-shuffle.on.m-fan i { transform-origin: 50% 110%; animation: ct-fan 3.5s cubic-bezier(.3, 1.3, .5, 1) infinite; }
@keyframes ct-fan { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(calc((var(--n) - 3.5) * 13deg)) translateY(-1vh); } }
.ct-shuffle.on.m-cascade i { animation: ct-cascade 1.7s ease-in-out calc(var(--n) * .11s) infinite; }
@keyframes ct-cascade { 0% { transform: translate(-17vh, 2vh) rotate(-14deg); } 50% { transform: translate(0, -13vh) rotate(0); } 100% { transform: translate(17vh, 2vh) rotate(14deg); } }
.ct-shuffle.on.m-flip i { transform: translateX(calc((var(--n) - 3.5) * 10.5vh)); animation: ct-flipcard 3.5s ease-in-out calc(var(--n) * .16s) infinite; }
.ct-shuffle.on.m-flip i::before { animation: ct-flipface 3.5s steps(1) calc(var(--n) * .16s) infinite; }
.ct-shuffle.on.m-flip i::after { animation: ct-flipback 3.5s steps(1) calc(var(--n) * .16s) infinite; }
@keyframes ct-flipback { 0% { opacity: 1; } 18% { opacity: 0; } 82% { opacity: 1; } }
.ct-shuffle i::after { z-index: 1; } .ct-shuffle i::before { z-index: 2; }
@keyframes ct-flipcard { 0%, 12% { transform: translateX(calc((var(--n) - 3.5) * 10.5vh)) rotateY(0); } 24%, 76% { transform: translateX(calc((var(--n) - 3.5) * 10.5vh)) rotateY(180deg) scaleX(-1); } 88%, 100% { transform: translateX(calc((var(--n) - 3.5) * 10.5vh)) rotateY(0); } }
@keyframes ct-flipface { 0% { opacity: 0; } 18% { opacity: 1; } 82% { opacity: 0; } }
.ct-shuffle.on.m-deal i { animation: ct-dealout 3.2s cubic-bezier(.3, 1.2, .5, 1) calc(var(--n) * .12s) infinite; }
@keyframes ct-dealout { 0%, 100% { transform: translate(0, 0) rotate(0); } 35%, 65% { transform: translate(calc((var(--n) - 3.5) * 11vh), calc(12vh - (var(--n) - 3.5) * (var(--n) - 3.5) * .9vh)) rotate(calc((var(--n) - 3.5) * 6deg)); } }
@keyframes ct-riffle {
    0% { transform: translate(-14vh, 0) rotate(-18deg) scale(.9); opacity: 0; }
    15% { opacity: 1; }
    50% { transform: translate(0, -1vh) rotate(0deg) scale(1); opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translate(14vh, 0) rotate(18deg) scale(.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ct-shuffle.on i { animation: none; } .ct-shuffle.on i:nth-child(n+4) { display: none; } }

.bj-table .ct-seats { flex: 1; align-content: center; }
.ct-dstamp { top: 78%; }
.bj-table .ct-seat { width: 17vh; }
.bj-table .ct-card { width: 7.2vh; }
.bj-table .ct-dcards .ct-card { width: 11vh; }
.bj-table .ct-felt { padding-bottom: 5vh; }
.bj-table .ct-dcards { min-height: 13vh; }
.bj-table .ct-dcards .ct-card { width: 9.6vh; }

/* ---------- phone fit: side-by-side moves, pinned action bar, no clipped party ---------- */
.bjp-body > * { max-width: 100%; }
.bjp-body .bj-moves, .bjp-body .bj-chip-row, .bjp-body .bj-row, .bj-dock { justify-self: stretch; width: 100%; }
.bj-moves { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.bj-moves .bj-big { padding: .75rem .3rem; font-size: 1.15rem; }
.bj-dock { position: sticky; bottom: 0; z-index: 5; display: grid; gap: .5rem; margin: 0 -1.25rem -1.25rem; padding: .7rem 1.25rem calc(.8rem + env(safe-area-inset-bottom, 0px)); border-radius: 1rem 1rem 0 0;
    background: linear-gradient(180deg, rgba(20, 20, 26, .85), rgba(12, 12, 16, .98)); backdrop-filter: blur(8px); box-shadow: 0 -.6rem 1.4rem rgba(0, 0, 0, .5); }
.bj-dock .bj-chip-row { gap: .4rem; }
.bj-dock .bj-chip-btn { width: auto; max-width: 3.6rem; justify-self: center; font-size: .85rem; border-width: .22rem; }
.bj-dock-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; }
.bj-dock-row .bj-bet-amt { font-size: 2rem; min-width: 4rem; }
.bj-dock .bj-big { width: 100%; }
.bj-phone .bj-my-cards .pcard-wrap { width: 4.2rem; margin-right: -1rem; }
.bj-phone .bj-result { font-size: 1.4rem; }
.bjp { gap: .6rem; }
.bj-party { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.bj-party i { position: absolute; top: -3rem; left: calc(var(--x) * 1%); font-style: normal; font-size: 1.8rem; animation: bj-party 2.6s ease-in var(--d) forwards; }
@keyframes bj-party { 0% { transform: translateY(0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(110vh) rotate(var(--r)); opacity: 0; } }

/* the Blackjack marquee sits at the top of the side panel, above Live */
.bj-side { grid-template-rows: auto minmax(0, 1fr) auto; }
.bj-side .bj-marq { justify-content: center; }
.bj-side .bj-marq b { font-size: 4.2vh; }
/* the phone's small table: no shuffle show over the felt text (the phone says what to do just below it) */
.ct.is-compact .ct-shuffle { display: none; }
.bj-lempty { display: block !important; grid-template-columns: none !important; white-space: nowrap; }
/* names break between words only; the field gets the wider column */
.cb-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); }
.cb-pname, .cb-name { overflow-wrap: break-word; word-break: normal; hyphens: none; }
.cb-row { grid-template-columns: 3.6vh auto minmax(0, 1fr) auto; }
.cb-list.two .cb-row { padding: .8vh 1vw 1.4vh; column-gap: .8vw; }
.cb-list.two .cb-av { width: 4.4vh; height: 4.4vh; font-size: 1.8vh; }
.cb-list.two .cb-name { font-size: 2.2vh; }
.cb-list.two .cb-chips { font-size: 2.5vh; }
.cb-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.cb-list:not(.two) .cb-row { padding: 1.4vh 1.4vw 2vh; }
.cb-list:not(.two) .cb-name { font-size: 3vh; }
.cb-list:not(.two) .cb-chips { font-size: 3.2vh; }
/* the Blackjack sign fits its side column on 16:10 and 4:3 screens too */
.bj-side .bj-marq b { font-size: min(4.2vh, 2.1vw); }
.bj-side .bj-marq > span { font-size: min(5vh, 2.5vw); }
/* blackjack side: an empty live feed says so instead of sitting as a blank black box */
.bj-feed-box { display: flex; flex-direction: column; }
.bj-side .ct-feed:empty { flex: 1; display: grid; place-items: center; text-align: center; }
.bj-side .ct-feed:empty { align-content: center; gap: 1vh; }
.bj-side .ct-feed:empty::before { content: '🪙'; font-size: 7vh; line-height: 1; }
.bj-side .ct-feed:empty::after { content: 'No Bets Yet'; font-family: var(--display); font-weight: 800; font-size: 2.8vh; color: rgba(255, 255, 255, .5); }
.ct-arc span { white-space: nowrap; } .ct.is-compact .ct-arc { flex-wrap: wrap; row-gap: .15rem; } @media (max-width: 380px) { .ct.is-compact .ct-arc { letter-spacing: .12em; } } /* narrow phones: each rule stays whole */

/* readability pass (Oct 28): the small projector text one size up so it reads from the back of the room */
.ct-arc { font-size: 2.2vh; }
.bj-steps.big li { font-size: 2.3vh; }
.bj-feed-box h3, .bj-side .bj-leaders h3 { font-size: 2.6vh; }
.bj-leaders li { font-size: 2.5vh; }
