#game:has(.bj){background:radial-gradient(ellipse at 50% -10%,rgba(232,180,34,.16),transparent 55%),linear-gradient(#1a0a12,#0a0408)}
/* Blackjack: the same dark half-moon table + blonde dealer as poker; players sit on an arc facing her */
.bj{direction:rtl;container-type:inline-size;width:100%;max-width:min(1120px,max(560px,calc((100dvh - 425px) * 1.55)));margin:0 auto;user-select:none}
.bj-stage,.bj-table{position:relative;width:100%;aspect-ratio:16/10.3;container-type:inline-size;--bjcw:6.4cqw}
.bj .pk-table{z-index:2}
.bj .pk-dealerbox{z-index:1}
.bj .pc{--cw:var(--bjcw,6.4cqw);filter:drop-shadow(0 .4cqw .5cqw #000a)}.bj .pc-inner{filter:none}
.bj-rules{position:absolute;left:50%;top:50.5%;transform:translateX(-50%);z-index:3;white-space:nowrap;font-family:var(--display);font-size:max(8px,1.15cqw);letter-spacing:.25cqw;color:#e8b422;opacity:.5;pointer-events:none}
.bj-limits{position:absolute;top:15%;left:2.5%;z-index:4;font-size:max(10px,1.2cqw);background:#000a;border:1px solid #e8b42255;border-radius:1.2cqw;padding:.4cqw 1cqw;text-align:center;line-height:1.5}
.bj-shoe{position:absolute;top:5%;right:3%;z-index:4;text-align:center;font-size:max(10px,1.2cqw)}
.bj-shoe .box{width:6cqw;height:3.2cqw;margin:0 auto .4cqw;border-radius:.6cqw;background:linear-gradient(#222,#000);border:.25cqw solid #e8b422;position:relative;overflow:hidden}
.bj-shoe .fill{position:absolute;bottom:0;left:0;right:0;background:#8e1426;transition:height .5s}
.bj-tray{position:absolute;top:5%;left:2.5%;z-index:4;width:6.4cqw;height:4.2cqw;border-radius:.6cqw;background:linear-gradient(#1a1a1a,#050505);border:.25cqw solid #8a6a1f;display:flex;align-items:flex-end;justify-content:center;gap:.2cqw;padding:.4cqw;box-shadow:inset 0 0 8px #000}
.bj-tray i{width:1.5cqw;height:2.8cqw;border-radius:2px;background:linear-gradient(90deg,#fffdf6,#d8d0b8);transform:skewX(-10deg)}.bj-tray i:nth-child(2){height:2.2cqw}.bj-tray i:nth-child(3){height:3.1cqw}
.bj-dealer{position:absolute;top:31.4%;left:50%;transform:translateX(-50%);z-index:4;text-align:center;--bjcw:7.4cqw}
.bj-cards{display:flex;direction:ltr;justify-content:center;min-height:calc(var(--cw)*1.4 + .4cqw)}
.bj-cards .pc{margin:.2cqw 0 .2cqw calc(var(--cw)*-.5)}.bj-cards .pc:first-child{margin-left:0}
.bj-tag{display:inline-block;min-width:3.4cqw;padding:.1cqw .9cqw;border-radius:1.4cqw;background:#000b;border:1px solid #e8b42277;font-size:max(10px,1.3cqw);font-weight:700;direction:ltr;margin-top:.2cqw}
.bj-tag.bj{background:var(--gold);color:#2a1700}.bj-tag.bust{background:#9b1c1c}.bj-tag.win{background:#1e7a3a}.bj-tag.push{background:#555}.bj-tag.lose{background:#7a2a2a}
.bj-banner{position:absolute;top:54.4%;left:50%;transform:translate(-50%,-50%);z-index:4;font-family:var(--display);font-size:max(13px,2.1cqw);color:#fff3b0;text-shadow:0 .2cqw .5cqw #000;text-align:center;white-space:nowrap}
.bj-banner .bj-cd{background:#000a;border-radius:1.2cqw;padding:0 1cqw;margin-inline-start:.6cqw;direction:ltr;display:inline-block}
.bj-bar{position:absolute;top:57%;left:50%;z-index:4;width:min(30%,260px);height:5px;transform:translateX(-50%);border-radius:3px;background:#0006;overflow:hidden;transition:opacity .3s;opacity:0}
.bj-bar i{display:block;height:100%;background:linear-gradient(90deg,#f0c35a,#fff3b0);transform-origin:100% 50%}
.bj-seats{position:absolute;inset:0;z-index:5;pointer-events:none}
.bj-seats>*{pointer-events:auto}
.bj-seat{position:absolute;transform:translate(-50%,-50%);width:0;height:0}
.bj-spot{position:absolute;left:-31px;top:-31px;width:62px;height:62px;border-radius:50%;border:2px solid #e8b42299;background:#0004;display:flex;align-items:center;justify-content:center;cursor:pointer}
.bj-seat.empty .bj-spot{opacity:.3;border-style:dashed}
.bj-seat.me .bj-spot{border-color:var(--gold);box-shadow:0 0 12px #e8b42288}
.bj-seat.turn .bj-spot{box-shadow:0 0 0 4px #7CFC8A,0 0 22px #7CFC8A;animation:bjp 1s infinite}
@keyframes bjp{50%{filter:brightness(1.25)}}
.bj-spot .bjs{position:relative;width:46px;height:46px}.bj-spot .bjs svg{position:absolute;left:0}
.bj-amt{position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);background:#000c;color:var(--gold);border-radius:10px;font-size:12px;font-weight:700;padding:0 7px;direction:ltr}
.bj-pp{position:absolute;left:34px;top:-6px;width:32px;height:32px;border-radius:50%;border:1.5px dashed #e8b42299;font-size:10px;display:flex;align-items:center;justify-content:center;color:#e8b422;cursor:pointer;background:#0004}
.bj-pp.sel,.bj-spot.sel{outline:2px solid #fff3b0}
.bj-pp .bj-amt{bottom:-9px}
.bj-hands{position:absolute;bottom:38px;left:0;transform:translateX(-50%);display:flex;gap:.8cqw;direction:ltr}
.bj-hand{display:flex;flex-direction:column;align-items:center;border-radius:.9cqw;padding:0 .2cqw}.bj-hand.active{box-shadow:0 0 0 2px #7CFC8A,0 0 14px #7CFC8A;background:#0003}
.pc.dbl{transform:rotate(90deg);margin-right:calc(var(--cw)*.3)}
.bj-plate{position:absolute;top:34px;left:0;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center}
.bj-seat.empty .bj-plate{display:none}
.bj-av{position:relative;width:4.6cqw;height:4.6cqw;min-width:30px;min-height:30px;border-radius:50%;border:.28cqw solid #e8b422;background:#1a1218;display:flex;align-items:center;justify-content:center;font:700 2cqw var(--display);color:#fff;box-shadow:0 .4cqw .9cqw #000b;z-index:1}
.bj-av svg{width:100%;height:100%;display:block;border-radius:50%}
.bj-nm{margin-top:-.8cqw;padding:.15cqw 1.1cqw .2cqw;min-width:8cqw;max-width:11cqw;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:max(9px,1.3cqw);background:linear-gradient(#25252d,#0a0a0d);border:1px solid #e8b42288;border-radius:1.4cqw;box-shadow:0 .3cqw .7cqw #000a}
.bj-seat.me .bj-av{border-color:#fff3b0;box-shadow:0 0 1.4cqw #e8b422aa,0 .4cqw .9cqw #000b}.bj-seat.me .bj-nm{border-color:var(--gold);color:var(--gold)}
.bj-seat.turn .bj-av{box-shadow:0 0 0 .3cqw #7CFC8A,0 0 2cqw #7CFC8A}
.bj-seat.away .bj-av{filter:grayscale(.8)}
.bj-ctl{max-width:980px;margin:12px auto 0;display:flex;flex-direction:column;gap:8px;align-items:center}
.bj-ctl .row{margin:0}
.bj-chip{background:none;border:0;padding:0;border-radius:50%;filter:drop-shadow(0 3px 3px #000a)}.bj-chip:disabled{opacity:.3}
.bj-chip:hover:not(:disabled){transform:translateY(-4px)}
.bj-big{font-family:var(--display);font-size:18px;padding:10px 22px}
.bj-info{font-size:13px;opacity:.85;text-align:center}
.bj-hist{display:flex;gap:4px;justify-content:center;margin-top:6px;direction:ltr}.bj-hist i{font-style:normal;font-size:11px;background:#0007;border-radius:8px;padding:0 6px}
.bj-ann{position:absolute;top:30%;left:50%;transform:translateX(-50%);font-family:var(--display);font-size:clamp(22px,5cqw,44px);color:#fff3b0;text-shadow:0 0 18px var(--gold),0 3px 6px #000;pointer-events:none;white-space:nowrap}

.bj-ann{z-index:9}
.bj-ctl{max-width:100%}
html{overflow-anchor:none}
#game:has(.bj){min-height:0;padding:8px;border-width:6px}
main:has(.bj){padding-block:6px}
#game:has(.bj) #gbar{margin-bottom:6px;padding:3px 10px}
.bj-ctl{min-height:190px;justify-content:flex-start}
.bj-ctl .row{min-height:44px}
.bj-rules{display:none}
/* short screens: everything fits, and the dealer's total does not sit on the phase text */
@media(max-height:730px){.bj{zoom:.93}.bj-ctl{min-height:0}.bj-banner{top:56%}.bj-bar{top:59.6%}main:has(.bj) #game{min-height:0}main:has(.bj) #chat{min-height:0;height:calc(100dvh - 130px)}}
