  /* ---------- Blackjack, Dice 21 (dice-21.md): its own pieces; the rest is the poker and Blackjack pages' (loads after blackjack.css) ---------- */
  /* Table setup: the Blind card in the bet card's place, and on a singleplayer table the Computer's skill tiles (poker's, pickers.css); the page sits a notch tighter so it still fits one screen */
  .bjsetup.d21solo .pkhead { margin: 6px 0 8px; font-size: 17px; }
  /* ---------- the table (§6, frames 2 and 5): the Blackjack screen with the poker table's layout; #bj[data-mode] scopes it ---------- */
  /* the strip, two rows: the avatar, the name, the level tag, the last move in yellow and the stack; their hand with its pill on the right */
  .pkstrip.d21strip { flex-direction: column; align-items: stretch; gap: 8px; }
  .d21strip .d21top { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .d21strip .d21row { display: flex; align-items: center; gap: 10px; min-height: 38px; }
  .d21items { display: flex; align-items: center; gap: 5px; flex: 1 1 auto; min-width: 0; --pd: 30px; }
  .d21items .fdie { font-size: calc(var(--pd) * .5); border-width: 2.5px; } .d21items .fdie::before { inset: 14%; border-width: 1.5px; }
  .d21items .pdie { border-width: 2.5px; }
  .d21items .pdie.gold, .d21items .d21mini.gold { box-shadow: 0 0 0 3px #FFD23F, 0 3px 0 3px var(--ink2); }
  .d21items.cards > * + * { margin-left: calc(-1 * var(--ov, 0px)); } /* (past what fits beside the pill, the mini cards overlap) */
  .d21mini { display: inline-grid; place-items: center; width: 26px; height: 36px; flex: 0 0 auto; box-sizing: border-box; background: #FFF4D6; border: 2.5px solid var(--ink2); border-radius: 6px; box-shadow: 0 3px 0 var(--ink2); color: var(--ink2); font: 17px/1 var(--lilita); } /* (a mini card shows only its total, so it reads at that size) */
  .d21mini.back { background: repeating-linear-gradient(135deg, #8F57EA 0 4px, #7B45D6 4px 8px); color: #fff; text-shadow: 1px 1px 0 var(--ink2), -1px -1px 0 var(--ink2), 1px -1px 0 var(--ink2), -1px 1px 0 var(--ink2); }
  .d21strip .bjtot { margin-left: auto; flex: 0 0 auto; } .d21strip .bjtot.long { font-size: 16px; padding: 0 10px; }
  .d21items > .deal { animation: pkdeal .3s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i, 0) * .1s); --dy: 54px; } /* (theirs slide up to the strip: poker's deal-in) */
  /* the felt: their chips, then the spacer, the pot, the status line, your chips (poker's middle); the white 1ST pill at the right, on the first player's side (poker's D) */
  #bj[data-mode="dice21"] .bjfeltmid { justify-content: flex-start; gap: var(--d21gap, 12px); }
  #bj[data-mode="dice21"] .bjfeltmid::before { content: ""; flex: 1 1 0; }
  #bj[data-mode="dice21"] .bjfeltmid .pkstatwrap { flex: 1 1 0; margin-top: calc(-1 * var(--d21gap, 12px)); }
  #bj[data-mode="dice21"] .bjfelt.fit-1 .bjfeltmid { --d21gap: 6px; } #bj[data-mode="dice21"] .bjfelt.fit-2 .bjfeltmid { --d21gap: 3px; } #bj[data-mode="dice21"] .bjfelt.fit-3 .bjfeltmid { --d21gap: 0px; } /* (the fit loop's steps take the felt's air, as at the other tables) */
  .d21first { position: absolute; right: 16px; bottom: 8px; padding: 7px 12px 6px; border-radius: 999px; background: #fff; border: 3px solid var(--ink2); box-shadow: 0 3px 0 var(--ink2); font: 20px/1 var(--lilita); color: var(--ink2); text-transform: uppercase; z-index: 3; }
  .d21first.top { bottom: auto; top: 14px; }
  /* your hand card (poker's card, the words on the left): the total big with the hint, your hand on the right, the meter under both */
  #bj[data-mode="dice21"] .handcard.bjcard { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  #bj[data-mode="dice21"] .handcard.bjcard .hinfo { order: 1; min-width: 0; } #bj[data-mode="dice21"] .handcard.bjcard .d21mine { order: 2; } #bj[data-mode="dice21"] .handcard.bjcard .strength { order: 3; grid-column: 1 / -1; }
  #bj[data-mode="dice21"] .handcard.bjcard .hhint { display: block; font-size: 15px; line-height: 1.2; height: 3.6em; min-height: 0; overflow: hidden; } /* (three lines' room in every state, a long hint stepped down to fit it: the card is one height) */
  .handcard .d21big { display: block; position: relative; margin: 2px 0 2px; font: 42px/1 var(--lilita); font-weight: 400; white-space: nowrap; }
  .handcard .d21big small { display: inline-block; vertical-align: top; margin: .12em .16em 0 0; font-size: .36em; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: #6b5a2a; }
  .handcard .d21big .real { visibility: hidden; } .handcard .d21big .mask { position: absolute; inset: 0; overflow: hidden; }
  .d21mine { position: relative; align-self: center; }
  .d21mine.dice { display: grid; grid-template-columns: repeat(2, var(--pd)); gap: 6px; --pd: 34px; } /* (a 2-column grid: two rows for 3–4 dice, smaller for more) */
  .d21mine.dice.n3 { --pd: 28px; gap: 4px; } .d21mine.dice.n4 { --pd: 22px; gap: 3px; }
  .d21mine.dice .fdie { width: var(--pd); height: var(--pd); font-size: calc(var(--pd) * .5); }
  .d21mine.cards { display: flex; align-items: center; gap: 4px; --cw: 36px; --pd: calc(var(--cw) * .46); }
  .d21mine.cards.fan > * + * { margin-left: calc((3 * var(--cw) + 8px - var(--n) * var(--cw)) / (var(--n) - 1)); } /* (past three the cards overlap: the row stays three cards wide, so six fit) */
  .d21mine.cards .bjcardt { border-width: 2.5px; box-shadow: 0 3px 0 var(--ink2); }
  .d21mine > .bjpend { opacity: 0; } .d21mine > .bjpend .pdie { transform: none; } /* (the item landing: in its place but unseen until its dice are down; a card's dice in a line, where the 3D dice land) */
  .d21mine > .deal { animation: pkdeal .3s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i, 0) * .1s); } /* (yours drop in from the felt) */
  body.fast .d21mine > .deal, body.fast .d21items > .deal { animation-duration: .16s; animation-delay: calc(var(--i, 0) * .05s); }
  .d21dw { position: relative; display: inline-flex; }
  .d21eye { position: absolute; right: -7px; bottom: -7px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #FFD23F; border: 2px solid var(--ink2); box-sizing: border-box; color: var(--ink2); z-index: 1; } /* (your hidden hits: only you can see them) */
  .d21eye svg { width: 13px; height: 13px; }
  .d21mine.n3 .d21eye, .d21mine.cards .d21eye { width: 16px; height: 16px; right: -5px; bottom: -5px; } .d21mine.n3 .d21eye svg, .d21mine.cards .d21eye svg { width: 10px; height: 10px; }
  .d21mine.cards .d21eye { right: auto; left: -5px; } /* (a fanned card's right side is under the next one: its eye sits at the corner that shows) */
  .d21mine.n4 .d21eye { width: 13px; height: 13px; right: -4px; bottom: -4px; border-width: 1.5px; } .d21mine.n4 .d21eye svg { width: 8px; height: 8px; } /* (eight dice: the eyes a size down, so the dice still read) */
  .d21roll { z-index: 6; }
  /* the reveal: the hidden items turn over one after another */
  .d21flip { animation: d21flip .25s ease-out both; } body.fast .d21flip { animation-duration: .13s; }
  @keyframes d21flip { from { transform: rotateY(90deg); } }
  /* the action row: Fold grey, Hit blue, I'm in green, Double orange, one height in every state */
  .pkact .row.d21act .big { flex: 1 1 0; } .pkact .row.d21act .big.fold { flex: 0 0 24%; }
  .pkact .row.d21act .big.hit { background: #3FA9F5; } .pkact .row.d21act .big.hit:disabled { opacity: .5; }
  .pkact .row.d21act .big.imin { background: #3DBF7A; } .pkact .row.d21act .big.double { background: #FF8A3D; flex: 1 1 0; }
  .pkact .row.d21act .big.imin .sub, .pkact .row.d21act .big.double .sub { color: #fff; opacity: 1; text-shadow: 1px 1px 0 var(--ink2), -1px -1px 0 var(--ink2), 1px -1px 0 var(--ink2), -1px 1px 0 var(--ink2); }
  .pkact .row.d21act.n4 .big { padding-left: 4px; padding-right: 4px; } .pkact .row.d21act.n4 .big.fold { flex-basis: 21%; }
  /* How to play: the version's rules, then the example pots */
  .d21pots { display: grid; gap: 4px; margin: 10px 0 12px; padding: 10px 12px; background: rgba(0,0,0,.18); border-radius: 14px; font: 14px/1.2 var(--lilita); color: #fff; }
  .d21ph, .d21pr { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.5fr) minmax(0, .65fr); gap: 8px; align-items: baseline; }
  .d21ph { font: 800 11px/1.2 var(--nunito); letter-spacing: .08em; text-transform: uppercase; color: #FFD23F; }
  .d21pr span:last-child, .d21ph span:last-child { text-align: right; }
  /* phones */
  @media (max-width: 680px) {
    .d21strip .d21row { min-height: 34px; } .pkstrip.d21strip { gap: 6px; }
    .handcard .d21big { font-size: 38px; }
    .d21first { right: 10px; }
  }
  @media (max-height: 760px) { .handcard .d21big { font-size: 32px; } #bj[data-mode="dice21"] .handcard.bjcard .hhint { font-size: 14px; } .d21mine.dice { --pd: 30px; gap: 5px; } .d21mine.dice.n3 { --pd: 25px; } .d21mine.dice.n4 { --pd: 20px; } }
  @media (max-height: 700px) { .handcard .d21big { font-size: 28px; } .d21first { font-size: 17px; padding: 5px 10px 4px; } .pkstrip.d21strip { gap: 3px; padding-top: 6px; padding-bottom: 6px; } .d21strip .d21row { min-height: 28px; } .d21items { --dmax: 26px; } .d21mini { width: 23px; height: 32px; font-size: 15px; } } /* (a short phone: the strip's two rows a notch tighter, so the felt keeps its room) */
  body.rm .d21items > .deal, body.rm .d21mine > .deal, body.rm .d21flip { animation: none; } /* (Reduce motion: the deal and the reveal are instant; the timers that pace them are unchanged) */
