/* Blackjack. The table reuses the Thurupu card table (body.thurupu-mode) and
   the chip, bet, mini card, control and result styles from poker.css; these
   rules cover the dealer, the shoe and the hands. */
.blackjack-tile .game-tile-art{background:radial-gradient(ellipse at 70% 25%,#5a8bb055,transparent 60%),linear-gradient(150deg,#21414f,#1d3a30)}
.bj-tile-art{position:absolute;left:50%;top:50%;width:214px;height:150px;transform:translate(-50%,-50%)}
.bj-tile-art .playing-card{position:absolute;margin:0;width:92px;height:132px}
.bj-tile-card.one{left:12px;top:8px;transform:rotate(-10deg)}
.bj-tile-card.two{left:62px;top:4px;transform:rotate(4deg);box-shadow:0 8px 16px #00000033}
.bj-tile-21{position:absolute;right:0;bottom:6px;display:grid;place-items:center;width:62px;height:62px;border-radius:50%;background:#f3cf7b;color:#1f3a31;font:700 1.6rem Georgia,serif;border:3px dashed #fff3d6;box-shadow:0 0 0 2px #a07a2a,0 6px 12px #0003}
@media (max-width:580px){.bj-tile-art{transform:translate(-50%,-50%) scale(.9)}}
.bj-rules-card h2{font-size:1.5rem}

/* Seats: the player's cards small with the total, the bet below. */
.bj-seats .seat-hand{gap:5px}
.bj-seat-hand{display:inline-flex;align-items:center;border-radius:5px}
.bj-seat-hand.bj-current{box-shadow:0 0 0 2px #f3cf7b}
.bj-seat-total{margin-left:3px;font-size:.64rem;font-weight:800;line-height:1;padding:2px 4px;border-radius:7px;background:#0d2e23aa;color:#f6ecd0;font-variant-numeric:tabular-nums}
.bj-hand-count{font-size:.6rem;color:#f6ecd0;white-space:nowrap}
.bj-outcome.won{background:#bfe3a8;color:#1d4a22}
.bj-outcome.lost{background:#f1c9bf;color:#6e2219}
.bj-outcome.even{background:#e2e2d4}
.bj-pending{visibility:hidden}

/* The middle: the dealer's cards and total, the shoe, and the hands of the
   player whose turn it is. Card size comes from the space inside the seats. */
@property --bj-card{syntax:'<length>';inherits:true;initial-value:60px}
.table-orbit .bj-center,.audience-board .table-orbit .bj-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1;display:grid;justify-items:center;align-content:center;gap:6px;width:max-content;max-width:calc(100cqw - 2 * var(--seat-width) - 12px);
  --bj-card:clamp(24px,min(calc((100cqw - 2 * var(--seat-width) - 40px) / 4),calc((100cqh - 2 * var(--seat-height) - 120px) / 2.9)),78px)}
.bj-dealer,.bj-focus{display:grid;justify-items:center;gap:4px}
.bj-label{font-size:.7rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#e9ecd7cc}
.bj-felt{margin:0;font-size:.62rem;letter-spacing:.04em;color:#e9ecd7aa;text-align:center;text-transform:uppercase;white-space:nowrap}
.bj-cards{display:flex;align-items:flex-start}
.bj-card{flex:0 0 auto;width:var(--bj-card)}
.bj-card+.bj-card{margin-left:calc(var(--bj-card) * -.42)}
.bj-card .playing-card{margin:0;width:var(--bj-card);height:calc(var(--bj-card) * 1.4);border-radius:calc(var(--bj-card) * .1);box-shadow:0 2px 5px #0b221a40}
.bj-card .playing-card.back{border-width:3px;box-shadow:0 2px 5px #0b221a40}
.bj-card .card-back-symbol{inset:4px;font-size:calc(var(--bj-card) * .42)}
.bj-card .simple-card .card-value{font-size:40cqw;margin:8% 0 0 9%}
.bj-card .simple-card .card-suit{font-size:38cqw;margin:4% 0 0 9%}
.bj-empty{gap:6px}
.bj-empty span{display:block;width:var(--bj-card);height:calc(var(--bj-card) * 1.4);border-radius:calc(var(--bj-card) * .1);border:1.5px dashed #e0edcd55;background:#0d2e2326}
.bj-focus .bj-hands{--bj-card:calc(var(--bj-card-focus,1) * var(--bj-card))}
/* The hole card stays face down until the dealer turns it over. */
.bj-hole-cover .playing-card,.bj-mini.bj-hole-cover{position:relative}
.bj-hole-cover .playing-card:after{content:"";position:absolute;inset:-1px;border-radius:inherit;border:3px solid #e4dbbd;background-color:#839276;background-image:repeating-linear-gradient(45deg,transparent 0,transparent 5px,#ffffff19 5px,#ffffff19 6px),repeating-linear-gradient(-45deg,transparent 0,transparent 5px,#ffffff19 5px,#ffffff19 6px)}
.bj-in-flight{visibility:hidden}
.bj-total{display:inline-block;padding:2px 9px;border-radius:999px;background:#0d2e23aa;border:1px solid #b8ca9a33;color:#f6ecd0;font-size:.74rem;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.bj-total.bj-showing{opacity:.8}
.bj-shoe{position:absolute;right:calc(-1 * var(--bj-card) * .9);top:0;display:inline-flex;flex-direction:column;align-items:center;gap:2px;pointer-events:auto}
.bj-shoe-back{display:block;width:calc(var(--bj-card) * .42);height:calc(var(--bj-card) * .58);border-radius:3px;border:1.5px solid #e4dbbd;background:#839276 repeating-linear-gradient(45deg,transparent 0,transparent 2px,#ffffff22 2px,#ffffff22 3px);box-shadow:1.5px 1.5px 0 #fffdf2,2.5px 2.5px 0 #d4d1bd,3.5px 3.5px 0 #fffdf2}
.bj-shoe b{font-size:.6rem;font-weight:800;color:#e9ecd7;font-variant-numeric:tabular-nums}

/* Hands: one or more, each with its total and bet; the hand being played is
   outlined when there are several. After a round each shows its result. */
.bj-hands{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:10px}
.bj-hand{display:grid;justify-items:center;gap:4px;padding:3px;border-radius:10px}
.bj-hand.bj-current{box-shadow:0 0 0 2px #f3cf7b;background:#f3cf7b22}
.bj-hand-meta{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px}
.bj-hand-bet{display:inline-flex;align-items:center;gap:3px;font-size:.66rem;font-weight:700;color:#e9ecd7;white-space:nowrap}
.bj-result-tag{display:inline-block;padding:1px 7px;border-radius:9px;font-size:.66rem;font-weight:800;background:#e2e2d4;color:#2c3a2e;white-space:nowrap}
.bj-win .bj-result-tag,.bj-blackjack .bj-result-tag{background:#bfe3a8;color:#1d4a22}
.bj-lose .bj-result-tag,.bj-bust .bj-result-tag{background:#f1c9bf;color:#6e2219}
.bj-blackjack .bj-card .playing-card{box-shadow:0 0 0 2px #f3cf7b,0 2px 5px #0b221a40}
/* Your own hands, in the hand area below the table. */
.bj-own{display:flex;justify-content:center;align-items:center;padding:6px 0 4px;min-height:calc(var(--hand-card-height,0px) * .9)}
.bj-own .bj-hands{--bj-card:calc(var(--hand-card-width) * .62)}
.bj-own .bj-split{--bj-card:calc(var(--hand-card-width) * .4)}
.bj-own .bj-hand-bet{color:#3d5446}
.bj-own .bj-total{background:#234436;color:#fff8e6}
.bj-own .bj-hand.bj-current{background:#f3cf7b33}
.bj-bet-row .pk-raise-amount{min-width:84px}
.bj-actions .btn{min-width:0}
.audience-board .bj-label{font-size:.95rem}
.audience-board .bj-total{font-size:1rem}
.audience-board .bj-felt{font-size:.8rem}
.in-game .bj-felt{display:none}
.in-game .table-orbit .bj-center{--bj-card:clamp(20px,min(calc((100cqw - 2 * var(--seat-width) - 40px) / 4),calc((100cqh - 2 * var(--seat-height) - 70px) / 2.9)),60px);gap:3px}
.in-game .bj-own{padding:2px 0}
.in-game .bj-own .bj-hands{--bj-card:calc(var(--hand-card-width) * .5)}
