/* ============================================================================
   Batch 3 boards — lucky5 / roulette12 / roulette13
   ============================================================================

   Every rule below is copied from the reference's own stylesheet, with the
   source cited. Nothing here is invented: the failure mode this project keeps
   hitting is a rule that "looks right" but has no reference behind it.

   WHY THESE RULES WERE MISSING AT EVERY WIDTH (not only on phones)

   The reference keys a whole block of board layout on the game's PAGE-LEVEL
   class, which sits on the page container, not on the board — its "Lucky7A"
   section begins with a `.lucky7a .casino-table-full-box` rule that sets
   display:flex (style.css:5563).

   Our page root did not carry `lucky7a`, so the rule could never match and
   lucky5's board rendered as a plain vertical stack at every viewport: measured
   2026-09-24 at 390x844, `.lucky7acards` was 388x807 (11 cards stacked, each
   382px wide and 68px tall) where the reference is 390x156 with 32x63 cards in
   a wrapped flex row, and the whole page was 1818px against the reference's
   1038px.

   WHY THE ROOTS CARRY `.casino-container-box` TOO

   This is the one place where copying the reference verbatim would give the
   WRONG cascade. The generated parity sheet roots every rule it ports at
   `.casino-container-box` (see tmp-browser/port-casino-responsive.py), which
   adds one class of specificity. The reference's own breakpoint rule

     .casino-table-left-box { padding: 0 5px }        responsive.css:316  (0,1,0)

   therefore becomes (0,2,0) on our side and starts BEATING the reference's
   page-class rule

     .lucky7a .casino-table-left-box { padding: 10px }  style.css:5577 (0,2,0)

   which wins in the reference purely on specificity. Measured symptom: our
   `.casino-table-left-box` was 185x78 against the reference's 186x98 — exactly
   the 2x10px of padding the tie stole.

   Merging the page class with the prefix (`.casino-container-box.lucky7a`, two
   classes on the SAME element) restores the reference's relative weight in both
   directions: these desktop rules now beat the sheet's bare `.casino-table-left-box`
   rule, and still lose to the sheet's own `.lucky7a` breakpoint rules, which are
   emitted with the identical merged root.

   NOTE ON COMMENTS IN THIS FILE: do not paste the reference's section banners
   here. A CSS comment cannot contain another comment terminator, so writing the
   marker pair inside a comment closes it early and the next rule is consumed as
   part of a malformed selector — that is how the first version of this file
   silently dropped both `.casino-table-full-box` rules while the browser
   reported the sheet as loaded and healthy.
   ============================================================================ */

/* Lucky7A board shell — reference style.css:5562-5593 */
.casino-container-box.lucky7a .casino-table-full-box {
  display: flex;
  flex-wrap: wrap;
  padding: 4px;
  border: 0;
  justify-content: space-between;
  align-items: flex-start;
}

.casino-container-box.lucky7a .lucky7low,
.casino-container-box.lucky7a .lucky7high {
  width: 45%;
}

.casino-container-box.lucky7a .casino-table-left-box,
.casino-container-box.lucky7a .casino-table-right-box {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  border: 0;
}

.casino-container-box.lucky7a .lucky7odds {
  width: calc(50% - 10px);
  margin-right: 10px;
}

/* Lucky 5 specifics — reference style.css:12395-12403 */
.casino-container-box.lucky5.lucky7a .casino-table-full-box.lucky7acards {
  justify-content: center;
}

.casino-container-box.lucky5.lucky7a .card-odd-box {
  margin-right: 10px;
}

/* The Low/High odds cells fill their column in the reference, because nothing
   constrains them there: `.casino-table-full-box` is a flex row and the cell is
   its flex item. Our teenpatti1day board CSS pins a percentage width on
   `.casino-odds-box` (the 20-20 board needs it), which used to apply here too —
   measured 31px wide against the reference's 153px. This restores the
   reference's geometry for the lucky7a board only. */
.casino-container-box.lucky7a .lucky7low .casino-odds-box,
.casino-container-box.lucky7a .lucky7high .casino-odds-box,
.casino-container-box.lucky7a .lucky7odds .casino-odds-box {
  width: 100%;
}

/* ---------------------------------------------------------------------------
   LUCKY7A LINE GROUPS — reference style.css:5590 + 5596

   The lucky7 BOARD (as opposed to lucky5's cut-down one) carries four Line
   groups, each a `.lucky7cards` holding an odds head and a
   `.card-odd-box-container` of three card cells. Neither container existed on
   our side, and that was invisible until 2026-09-25 because the only `lucky7a`
   game we shipped was lucky5, which renders NO Line groups at all — the board
   matched the reference anyway. Measured on the live reference lucky7eu
   (1600x1600) the groups are 204x130 at x 285/501/716/932, and `.lucky7cards`
   is 24% wide with a 130px fixed height and the row background.
   --------------------------------------------------------------------------- */
.casino-container-box.lucky7a .lucky7cards .card-odd-box-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* The base rule is split in two on purpose, because the reference's own phone
   override touches only `width`. Keeping everything else at every width is what
   makes the phone board right: measured at 390x844 the reference's groups are
   186x130, and a version that carried `height: 130px` only above 768 came out
   186x86 (its height collapsed to the head + 45px cards). `#f2f2f2` is the
   reference's own `--bg-table-row` (style.css:30), spelled out because that
   variable is not defined in any of our sheets. */
.casino-container-box.lucky7a .lucky7cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  background-color: #f2f2f2;
  padding: 10px 0 0 0;
  height: 130px;
  align-content: flex-start;
}

/* 24% is the reference's base width; below 768 its responsive.css:519
   (`width: 49%; margin-top: 10px`, same specificity, later in source) takes
   over. Our port of that phone rule already exists in the generated parity
   sheet as `.casino-container-box .lucky7cards` (0,2,0); rooting this copy at
   the page class raises it to (0,3,0) and would reverse that, so the desktop
   width is stated as a breakpoint instead of a base rule. */
@media only screen and (min-width: 768px) {
  .casino-container-box.lucky7a .lucky7cards {
    width: 24%;
  }
}

/* ---------------------------------------------------------------------------
   ROULETTE (roulette12 / roulette13 / roulette11)

   The reference re-lays the roulette board for portrait screens — which is every
   phone and tablet held upright — and it does so through a
   `@media (orientation: portrait)` block keyed on BARE board class names:
   `.board-in`, `.board-center`, `.board-bottom`, `.board-right`, `.board-cell`,
   `.bet-chip-area`. None of those carry a casino-only token, so the parity
   generator (port-casino-responsive.py, `is_casino`) dropped every one of them,
   and our roulette board stayed on the landscape grid.

   Measured 2026-09-24 at 390x844: our `.casino-table-box` was 388x329 against
   the reference's 390x545, `.roulette-box-container` 378x319 against 380x535,
   and `.board-cell` 25..106 x 50..214 against the reference's 42..222 x 35..146.

   Ported below, scoped to the roulette page class so these generic names can
   never reach another game. Two reference rules in that block are deliberately
   NOT repeated here because the parity sheet already emits them with the same
   merge:
     .roulette .board-center { background-color: #fff }
     .roulette.roulette11 .casino-table-box { padding: 5px }
   and the reference's `.board-bottom { gap: 1 }` is omitted as written: it has
   no unit, so no browser applies it.
   --------------------------------------------------------------------------- */
@media (orientation: portrait) {
  .casino-container-box.roulette .board-in {
    grid-template-rows: 28fr 336fr 40fr;
    grid-template-columns: 80fr 206fr;
    grid-template-areas: ".      center" "bottom center" ".      right ";
    max-width: calc(100% - 70px);
    margin-right: auto;
  }

  .casino-container-box.roulette .board-right {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: unset;
    gap: 1px;
  }

  .casino-container-box.roulette .board-cell {
    border-radius: 0;
    min-height: 35px;
  }

  .casino-container-box.roulette .board-cell-in .rate {
    line-height: 10px;
    font-size: 10px;
    bottom: 4px;
  }

  .casino-container-box.roulette .board-bottom .board-cell-in .rate {
    transform: rotate(90deg);
    bottom: unset;
    left: 0;
  }

  .casino-container-box.roulette .board-right .board-cell:first-child {
    order: 1;
    border-radius: 0;
  }

  .casino-container-box.roulette .board-right .board-cell:last-child {
    order: -1;
    border-radius: 0;
  }

  .casino-container-box.roulette .board-bottom {
    grid-template-rows: repeat(6, 1fr);
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas: "first-half  first " "even        first " "red         second" "black       second" "odd         third " "second-half third ";
  }

  .casino-container-box.roulette .board-bottom .board-text {
    transform: rotate(90deg);
  }

  .casino-container-box.roulette .board-bottom .board-cell:first-child {
    grid-area: first;
  }

  .casino-container-box.roulette .board-bottom .board-cell:nth-child(2) {
    grid-area: second;
  }

  .casino-container-box.roulette .board-bottom .board-cell:nth-child(3) {
    grid-area: third;
  }

  .casino-container-box.roulette .board-bottom .board-cell:nth-child(4) {
    grid-area: first-half;
    border-radius: 0;
  }

  .casino-container-box.roulette .board-bottom .board-cell:nth-child(5) {
    grid-area: even;
  }

  .casino-container-box.roulette .board-bottom .board-cell:nth-child(6) {
    grid-area: red;
  }

  .casino-container-box.roulette .board-bottom .board-cell:nth-child(7) {
    grid-area: black;
  }

  .casino-container-box.roulette .board-bottom .board-cell:nth-child(8) {
    grid-area: odd;
  }

  .casino-container-box.roulette .board-bottom .board-cell:last-child {
    border-radius: 0;
    grid-area: second-half;
  }

  .casino-container-box.roulette .board-center {
    grid-template-rows: repeat(13, 1fr);
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: "zero zero zero" "a    b    c   " "d    e    f   " "g    h    i   " "j    k    l   " "m    n    o   " "p    q    r   " "s    t    u   " "v    w    x   " "y    z    aa  " "ab   ac   ad  " "ae   af   ag  " "ah   ai   aj  ";
  }

  .casino-container-box.roulette .board-center .bet-chip-area.center-left {
    width: 50%;
    height: 50%;
    transform: translate3d(-50%, -50%, 0);
    z-index: 20;
    top: 0;
    left: 50%;
  }

  .casino-container-box.roulette .board-center .bet-chip-area.bottom-left {
    left: 0;
    width: 50%;
    height: 50%;
    z-index: 20;
    top: 0;
    transform: translate3d(-50%, -50%, 0);
  }

  .casino-container-box.roulette .board-center .bet-chip-area.top-center {
    width: 50%;
    height: 50%;
    z-index: 20;
    top: 50%;
    right: 0;
    transform: translate3d(50%, -50%, 0);
  }
}

/* ---------------------------------------------------------------------------
   ROULETTE — the board's desktop frame (10px), which no media query carries

   style.css:11376  `.roulette.roulette11 .casino-table-box { padding: 10px }`
   (repeated verbatim at 12119). This is the only rule that gives the roulette
   board its inset frame: it replaces the base sheet's `padding-right: 4px`
   (style.css:4570 / our casino-boards.css:590) with 10px on all four sides, so
   `.board-in` sits 10px inside `.casino-table-box` on every side.

   The parity sheet could not carry it: port-casino-responsive.py is generated
   from the reference's RESPONSIVE sheet only, and the two rules it does hold for
   this selector are the narrow-screen variants — `padding: 5px` inside
   `@media (orientation: portrait)` (portrait, responsive.css:4105) and
   `padding: 5px` for `max-width: 767px` (responsive.css:803). Both stay, and the
   portrait one still wins here because it carries the extra `.roulette11` class
   (0,4,0 against this rule's 0,3,0) — which is exactly the reference's own
   cascade: 0,3,0 for the 10px against 0,1,0 for the 5px.

   Measured 2026-09-25 at 1600x1200, ours vs tridevexch:

     element                 ours (before)   tridevexch
     .casino-table-box       858x319         855x339   (10 + 319 + 10)
     .board-in               854x319 at x=291  835x319 at x=295
     .casino-table (board)   858x370         855x390

   The 3px of width and the x offset are the column-width residual (our `.col-8`
   content box is 860 against the reference's 855); the 20px of height is this
   rule and nothing else. Scoped to the roulette page class, which only
   roulette11/12/13 carry (see casino-page-classes.ts), so it cannot reach another
   game's board.
   --------------------------------------------------------------------------- */
.casino-container-box.roulette .casino-table-box {
  padding: 10px;
}

/* Unique Roulette (the family's only BARE `roulette` page — see
   casino-page-classes.ts, `rourroullete: 'roulette'`) is the one member the
   reference does NOT frame. Its board root holds `.roulette-box-container`
   directly, with no `.casino-table-box` child at all, and `.casino-table`
   carries `padding: 0` (measured 1600x1200 on tridevexch /casino/ourroullete:
   table 855x319 at [285,514], container 855x319, `.board-in` 855x319 at
   [285,514], `gap` 2.125px).

   The 10px rule above is ported from `.roulette.roulette11 .casino-table-box`
   but keyed on the PAGE class, so it also hit this page and supplied the whole
   +20px. Measured live on our page 2026-10-29 at 1600x1200:

     as deployed    table 858x339   box 858x339 (10px pad)   board-in 838x319 at x=301
     padding: 0     table 858x319   box 858x319 (0)           board-in 858x319 at x=291

   i.e. dropping the padding alone gives the reference's 319 height and its
   board-in origin (the 3px of width is this app's column-width residual). The
   ELEMENT must stay: unwrapping it is what inflated `.board-in` to 786, because
   the grid's `height: 100%` then resolves against the table's definite height
   (probe: tmp-browser/mg-ourroullete-frame-live.mjs — states A/B/C/D).
   Scoped with `:not(.roulette11)`, so the framed variants keep their 10px (and
   their own 5px portrait rule). */
.casino-container-box.roulette:not(.roulette11) .casino-table-box {
  padding: 0;
}

/* The Statistics box's own row rhythm. Every other rule for this table is
   already byte-identical to the reference's (`.roulette11-table-row` /
   `-cell`, style.css:11396/11406 — see casino-boards.css:601), but the ROW
   HEIGHT is inherited and ours is not the reference's: our site-wide base is
   `html/body { line-height: 15px }` (style.css:45) where the reference lays these
   boxes out at 24px (measured on its `.transfer-board`, `line-height: 24px`).

   That single inherited line is the whole of the box's height difference —
   measured 2026-09-25 at 1600x1200, ours vs tridevexch:

     .roulette-rules  430x151     450x195
     rows             5 x 24px     5 x 33px  (4px padding x2 + 24 + 1px border)
     statCells        12           12

   Same defect class the game-rules body had (casino-markets-rules-v9.css:1996
   says the 15px override "is what crushed the" provider rules), fixed the same
   local way rather than by touching the site-wide base.
   --------------------------------------------------------------------------- */
.casino-container-box.roulette .roulette-rules {
  line-height: 24px;
}

/* roulette13 has no Back/Lay switch — on tridev OR in its own market payload.

   Measured 2026-09-25 at 1600x1200, the reference's `.transfer-board` holds:

     /casino/roulette12   .switch-board-icon BackLay (200x40)   board 855x390
     /casino/roulette11   .switch-board-icon BackLay (200x40)   board 855x390
     /casino/roulette13   NO switch child at all                 board 855x350

   and the same again at 390x844 (r13's transfer board is 390x0 with the switch
   absent), so this is a property of the game, not a breakpoint. The payload
   agrees: all 146 selections of the live roulette13 market publish `l: 0`
   (zero lay odds) where roulette12 publishes `l: 40` on every one of its 146 —
   a back-only book, which is why the reference ships no switch to flip. Hiding
   it also lands the board on the reference's 350: transfer 11 (the base
   `.transfer-board` padding, 3px top + 8px bottom) + table-box 339.
   --------------------------------------------------------------------------- */
.casino-container-box.roulette13 .switch-board-icon {
  display: none;
}

/* ---------------------------------------------------------------------------
   Reference breakpoint rules the port could not carry.

   The parity generator keeps a rule only if its selector mentions a casino-only
   token (port-casino-responsive.py, `is_casino`). These two do not, so they were
   dropped — and they are visible: `.card-odd-box img` renders at 65px from our
   own desktop sheet (casino-markets-rules-v10.css:59) where the reference shows
   45px at 390, which is the 10px difference between our 166px card container and
   the reference's 156px.

   Scoping them to the lucky7a page class keeps the port honest: they can only
   ever affect a game whose root carries that class.
   --------------------------------------------------------------------------- */
@media only screen and (max-width: 767px) {
  /* reference responsive.css:364.

     The extra class on the card container is load-bearing, not decoration. Our
     game body carries the resolved UI family code as a class
     (`card-body lucky7`, CasinoWrapper.tsx:1696), and this family's code is
     literally `lucky7` — the same name the reference uses for the single 7-card
     cell inside the board. So the reference's

       .lucky7a .lucky7 img { height: 50px }        responsive.css:510

     which the parity sheet ports as
       .casino-container-box.lucky7a .lucky7 img
     matches EVERY image on the page through that body wrapper, not just the
     board cell: our 11 card images measured 50px against the reference's 45px,
     which is exactly the 10px difference between our 166px card container and
     the reference's 156px.

     Naming the container explicitly outranks the parity sheet's copy of that
     rule (0,4,1 against 0,3,1) without touching the board cell itself, which
     correctly stays 50px. Any future family whose UI code collides with a
     reference board class will need the same treatment. */
  .casino-container-box.lucky7a .lucky7acards .card-odd-box img {
    height: 45px;
  }

  /* Same compensation for the lucky7 board's Line-group cells (lucky5 renders
     none, so this only ever fires on lucky7eu/lucky7eu2). The reference's phone
     rule `.card-odd-box img { height: 45px }` (responsive.css:364) applies to
     these too, and measured 390x844 they are 32x45 with the 3 cells 36 apart.
     Without this they took the 50px from the `.lucky7` name collision above and
     measured 36x50. */
  .casino-container-box.lucky7a .lucky7cards .card-odd-box img {
    height: 45px;
  }
}

/* ---------------------------------------------------------------------------
   LUCKY 5 — THE LIVE-STREAM BAND (board and stream together, as on tridev)

   Measured 2026-09-25 at 1600x1600, ours vs tridevexch /casino/lucky5:

     element                 ours            tridevexch
     .casino-video           853x480         855x357
     .casino-video-box       853x480         635x357  (right-aligned)
     .casino-video-cards     853x500, at 0,0 50x60,  at 0,0
     .flip-card              853x500         40x50
     .flip-card img          200x250         40x50
     .casino-table (board)   855x337         855x337   <- ALREADY IDENTICAL
     .lucky7acards           855x113         855x113   <- ALREADY IDENTICAL
     .card-odd-box           46x83           46x83     <- ALREADY IDENTICAL

   The board itself was never the problem. The stream band was, and the two
   symptoms the user reported come from one cause:

     * `.casino-stream-stage` is OUR class (style.css:1659) and it carries
       `min-height: 420px; aspect-ratio: 16 / 9` — neither of which exists
       anywhere in the reference. So our video area was 16:9 of the FULL column
       (853 -> 480) instead of 16:9 of the reference's right-aligned, 220px-
       narrower box (635 -> 357).
     * `.video-box-container` is `.casino-stream-frame`, which style.css:1670
       makes `position: absolute; inset: 0`. A positioned element paints ABOVE
       in-flow content, so the stream iframe covered the live-card overlay the
       moment `tv` resolved. Before that it had not, which is exactly the
       report: big cards on open, then "cards are not anywhere" once the stream
       starts. And because `.casino-video-cards` had no rules of its own for
       this page (the whole block below existed only under `.Tp1Day`), the
       overlay sat in flow at full column width with the card images at their
       natural 200x250 — the "very big" cards.

   Everything below is the reference's own rule, cited, rooted at the lucky5
   page class so it can never reach another game. Sources:

     style.css:4370   .video-box-container { max-width: calc(100% - 220px) }
     style.css:4393   .casino-video-cards  { absolute top-left, pad 5px }
     style.css:4404   .flip-card          { 50x40 }
     style.css:4441   .flip-card-front/back { absolute, 100%, backface hidden }
     style.css:4471   .casino-video-cards img { height/width 100% }
     responsive.css:312 / 441   <=767px: container uncapped, flip-card 20x16
     responsive.css:3327       1200-1399px: flip-card 40x32
     responsive.css:3579       1400-1599px: flip-card 45x36

   `.casino-video-cards` is `position: absolute` with `z-index: 2`, which is the
   load-bearing line: tridevexch keeps the dealt card visible IN the black band
   to the left of a right-aligned video, and that only works if the overlay
   paints above the frame. Zero-size geometry is per the reference too — the
   220px band is empty black on both sites, and the board still lands at
   y=514 (152 + 357 + 5) exactly as the reference measured.
   --------------------------------------------------------------------------- */
.casino-container-box.lucky7a .video-box-container {
  max-width: calc(100% - 220px);
  margin-left: auto;
}

/* Our `.casino-stream-frame` is absolute by default; the reference's box is in
   flow so its 56.25% padding is what gives the band its height. */
.casino-container-box.lucky7a .casino-stream-frame {
  position: static;
  inset: auto;
  width: 100%;
  overflow: hidden;
}

/* `.casino-stream-stage` is ours, so its invented floor and ratio have to be
   cancelled here: the reference's band height is the video box's padding, and
   nothing else. min-height/ratio would pin the band to 480 and push the board
   below the fold — the "cards are not anywhere" half of the report. */
.casino-container-box.lucky7a .casino-stream-stage {
  min-height: 0;
  aspect-ratio: auto;
}

.casino-container-box.lucky7a .casino-video-cards {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.4);
  height: auto;
  padding: 5px;
  z-index: 2;
  max-width: 220px;
}

.casino-container-box.lucky7a .casino-video-cards h5 {
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
}

.casino-container-box.lucky7a .casino-video-cards .flip-card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.casino-container-box.lucky7a .casino-video-cards .flip-card {
  background-color: transparent;
  perspective: 1000px;
  height: 50px;
  width: 40px;
  margin-right: 5px;
}

.casino-container-box.lucky7a .casino-video-cards .flip-card:last-child {
  margin-right: 0;
}

.casino-container-box.lucky7a .casino-video-cards .flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
}

.casino-container-box.lucky7a .casino-video-cards .flip-card-front,
.casino-container-box.lucky7a .casino-video-cards .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.casino-container-box.lucky7a .casino-video-cards .flip-card-back {
  transform: rotateY(180deg);
}

/* Without this the card images keep their natural 200x250 inside the 40x50
   flip-card, which is what made the overlay read as "very big cards".

   The extra `.flip-card` step is load-bearing, not decoration. The reference's
   own rule is `.casino-video-cards img` (style.css:4471, 0,1,1), but our game
   body carries the resolved family code as a class -> `.card-body lucky7`, and
   the parity sheet ports the reference's phone rule
   `.lucky7a .lucky7 img { height: 50px }` (responsive.css:510) as
   `.casino-container-box.lucky7a .lucky7 img` (0,3,1). That outranks our
   (0,3,1) copy on source order (the parity sheet is linked last) and measured
   16x50 inside a 16x20 flip-card at 390x844. Naming the flip-card takes this to
   (0,4,1), which wins in both directions without touching the board cell the
   parity rule exists for. Same collision the note at the end of this file
   describes, reached through the stream overlay instead of the board. */
.casino-container-box.lucky7a .casino-video-cards .flip-card img {
  height: 100%;
  width: 100%;
}

/* The reference puts the band and the board back to back: video bottom 509,
   board top 514 — the 5px is the board's own `margin: 5px 0 0`. Our page wraps
   the band in a `.card` whose body carries an inline `min-height: 400px`, so
   the board started 60px low (44px of floor under a 356px band, plus
   `.card.m-b-10`'s 10px). Neither exists in the reference, and both are inline
   / !important, hence !important here. Scoped to the direct children of the
   lucky5 column so it can never reach the sidebar's own `.card.m-b-10.my-bet`,
   which shares the class list but lives in `.col-4`. */
.casino-container-box.lucky7a .col-8 > .card > .card-body {
  min-height: 0 !important;
}

.casino-container-box.lucky7a .col-8 > .card.my-bet {
  margin-bottom: 0 !important;
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .casino-container-box.lucky7a .casino-video-cards .flip-card {
    height: 40px;
    width: 32px;
  }
}

@media only screen and (min-width: 1400px) and (max-width: 1599px) {
  .casino-container-box.lucky7a .casino-video-cards .flip-card {
    height: 45px;
    width: 36px;
  }
}

@media only screen and (max-width: 767px) {
  .casino-container-box.lucky7a .video-box-container {
    max-width: 100%;
  }

  .casino-container-box.lucky7a .casino-video-cards h5 {
    font-size: 12px;
    line-height: 1;
  }

  .casino-container-box.lucky7a .casino-video-cards .flip-card {
    height: 20px;
    width: 16px;
  }
}

/* ---------------------------------------------------------------------------
   CASINO VIDEO CLOCK — the reference's own tile size, at both widths

   Every casino band draws the round clock from the same markup — we render
   `div.clock.clock2digit.flip-clock-wrapper` (CasinoTimer.tsx), which is the
   reference's own root class — but our two sheets disagree with the reference
   about how big a tile is:

     our flipclock.css:67   .flip-clock-wrapper ul { width: 60px; height: 90px; ... }
     our style.css:2204     .clock2digit { transform: scale(0.6) }
     the reference          .flip-clock-wrapper ul { width: 40px !important; height: 60px !important }
                            (style.css:4491-4504) and NO scale on the wrapper

   so ours painted a 0.6-scaled 60x90 tile (36x54) at EVERY width where the
   reference paints a flat 40x60 at desktop and 18x27 on phones
   (responsive.css:452-466). Measured live 2026-09-25, 1600x1600, ours vs
   tridevexch (lucky5 and lucky7eu are identical on both sides):

     element        ours           tridevexch
     .clock         84x60          100x70
     .clock ul      36x54          40x60   (font 40px, line-height 57px, margin 5px)
     .clock .inn    46x…           47x…    (font 50px)

   and at 390x844, same two pages:

     .clock         84x60          44x31
     .clock ul      36x54          18x27   (font 20px, line-height 25px, margin 2px)

   The clock is `position: absolute` inside the band on both sites, so nothing
   below it moves when it changes size — the board's y is untouched. Rooted at
   the casino page container (which every casino page carries) rather than at one
   game's class, because the reference's rule is not game-scoped either: the only
   per-family part is the tile COLOUR, which stays in the roulette block below
   (`.roulette .flip-clock-wrapper ul li a div div.inn`, style.css:4511).
   --------------------------------------------------------------------------- */
.casino-container-box .casino-video .clock,
.casino-container-box .casino-stream-stage .clock {
  transform: none;
}

.casino-container-box .casino-video .clock ul,
.casino-container-box .casino-stream-stage .clock ul {
  width: 40px !important;
  height: 60px !important;
  line-height: 57px !important;
  font-size: 40px !important;
}

.casino-container-box .casino-video .clock ul li,
.casino-container-box .casino-stream-stage .clock ul li {
  line-height: 57px !important;
}

/* The tile colour is the reference's own clock colour — `var(--bg-secondary)`
   (style.css:4506), which is #0470A5 on this platform (casino-markets-rules-v9
   documents the same value for the pane title). Measured LIVE on tridevexch
   2026-09-25: rgb(4, 112, 165) on both roulette12 and lucky7eu, at 1600 and at
   390 — i.e. the reference's `.roulette .flip-clock-wrapper ul li a div div.inn
   { background-color: rgb(64, 60, 60) }` (style.css:4511) is NOT in effect there,
   so no per-family colour override belongs here. Our own base is #2e2e2e
   (style.css:3830). */
.casino-container-box .casino-video .clock ul li a div div.inn,
.casino-container-box .casino-stream-stage .clock ul li a div div.inn {
  font-size: 50px !important;
  background-color: #0470a5 !important;
}

@media only screen and (max-width: 767px) {
  .casino-container-box .casino-video .clock ul,
  .casino-container-box .casino-stream-stage .clock ul {
    width: 18px !important;
    height: 27px !important;
    line-height: 25px !important;
    font-size: 20px !important;
    margin: 2px !important;
  }

  .casino-container-box .casino-video .clock ul li,
  .casino-container-box .casino-stream-stage .clock ul li {
    line-height: 25px !important;
  }

  .casino-container-box .casino-video .clock ul li a div div.inn,
  .casino-container-box .casino-stream-stage .clock ul li a div div.inn {
    font-size: 20px !important;
  }
}

/* ---------------------------------------------------------------------------
   ROULETTE — THE LIVE-STREAM BAND (board and stream laid out together)

   The same defect class the lucky5 block above fixes, on the roulette page
   class, and the same source rules. Measured 2026-09-25 at 1600x1200, ours vs
   tridevexch /casino/roulette12:

     element                     ours          reference
     .casino-video (band)        853x480       855x357
     .video-box-container        853x480       635x357, x=+220 from the left
     .casino-video-cards         absent        absolute 90x74 at x=+130
     .flip-card                  n/a           80x64
     .clock.flip-clock-wrapper   bottom-right  top-left
     .casino-table (board)       858x370       855x390   <- 1px per-cell deltas only

   `.casino-stream-stage` is OUR class (style.css:1659) and carries
   `min-height: 420px; aspect-ratio: 16 / 9` — neither exists anywhere in the
   reference — so our band was 16:9 of the FULL column (853 -> 480) instead of
   16:9 of the reference's right-aligned, 220px-narrower box (635 -> 357).
   `.casino-stream-frame` is OUR class too (style.css:1673, absolute inset 0).
   Both are cancelled here exactly as in the lucky5 block.

   The reference also moves the round clock from the band's bottom-right to its
   TOP-LEFT for roulette — the 220px strip on the left of the band is the
   clock-and-live-cards rail, which is why the video is pushed 220px right.

   Sources:
     style.css:4370   .video-box-container { max-width: calc(100% - 220px); margin-left: auto }
     style.css:4380   .casino-video-box { position: relative; padding-bottom: 56.25% }
     style.css:4393   .casino-video-cards { absolute top-left, bg rgba(0,0,0,.4), pad 5px }
     style.css:4480   .clock { absolute; right 10px; bottom 10px }
     style.css:10593  .roulette .clock { right: unset; left: 0; bottom: unset; top: 0 }
     style.css:11026  .roulette .casino-video-cards { top: 0; transform: unset; left: 130px }
     style.css:11032  .roulette .flip-card { height: 64px; width: 80px }
   --------------------------------------------------------------------------- */
.casino-container-box.roulette .video-box-container {
  max-width: calc(100% - 220px);
  margin-left: auto;
}

/* Our `.casino-stream-frame` is absolute by default; the reference's box is in
   flow, so its 56.25% padding is what gives the band its height. */
.casino-container-box.roulette .casino-stream-frame {
  position: static;
  inset: auto;
  width: 100%;
  overflow: hidden;
}

/* Ours, so its invented floor and ratio have to go: the reference's band height
   is the video box's padding and nothing else. */
.casino-container-box.roulette .casino-stream-stage {
  min-height: 0;
  aspect-ratio: auto;
}

/* The reference's roulette clock is the top-left of the band, not the fixed
   bottom-right `.casino-video .clock` ours inherits (casino-markets-rules-v9.css).

   Our `.clock2digit` (style.css:2204) also carries `transform: scale(0.6)` and
   opposite `right/bottom` insets — neither exists in the reference, and the
   scale is what left the clock hanging 28px right / 20px low inside its own
   top-left corner (measured 2026-09-25: 84x60 at +28,+20 where the reference is
   100x70 at 0,0, because a 140x100 element scaled 0.6 about its centre keeps
   its centre).

   The clock's SIZE is not here: it is the same 40x60 tile on every casino page
   (see the CASINO VIDEO CLOCK block above), so only the placement and the
   roulette-only tile colour live in this block. */
.casino-container-box.roulette .casino-video .clock,
.casino-container-box.roulette .casino-stream-stage .clock {
  right: unset;
  left: 0;
  bottom: unset;
  top: 0;
  text-align: left !important;
  transform: none;
  max-width: none;
}

/* NB: no tile-colour rule here — the reference's live roulette clock uses the
   same blue as every other casino clock (see the CASINO VIDEO CLOCK block).
   style.css:4511's `.roulette ... .inn { background-color: rgb(64,60,60) }` is
   absent on tridevexch, measured 2026-09-25 at 1600 and 390. */

/* The live-card rail. Our roulette board renders no stream overlay (the provider
   publishes no dealt card for roulette), so this exists to keep the rail's
   geometry identical to the reference's for the day one is added — and to stop
   the overlay, if it ever renders, from sitting in flow at full column width
   with natural-size artwork (the "very big cards" half of the lucky5 report). */
.casino-container-box.roulette .casino-video-cards {
  position: absolute;
  top: 0;
  left: 130px;
  height: auto;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px;
  z-index: 2;
}

.casino-container-box.roulette .casino-video-cards .flip-card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.casino-container-box.roulette .casino-video-cards .flip-card {
  background-color: transparent;
  perspective: 1000px;
  height: 64px;
  width: 80px;
  margin-right: 5px;
}

.casino-container-box.roulette .casino-video-cards .flip-card:last-child {
  margin-right: 0;
}

.casino-container-box.roulette .casino-video-cards .flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
}

.casino-container-box.roulette .casino-video-cards .flip-card-front,
.casino-container-box.roulette .casino-video-cards .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.casino-container-box.roulette .casino-video-cards .flip-card-back {
  transform: rotateY(180deg);
}

.casino-container-box.roulette .casino-video-cards .flip-card img {
  height: 100%;
  width: 100%;
}

/* The reference puts the band and the board back to back (video bottom 509,
   board top 514 — the 5px is the board's own `margin: 5px 0 0`). Our page wraps
   the band in a `.card` whose body carries an inline `min-height: 400px`, and
   `.card.m-b-10` adds 10px the reference does not have. Both are inline /
   !important, hence !important here. Scoped to the direct children of the
   roulette column so it can never reach the sidebar's own
   `.card.m-b-10.my-bet`, which shares the class list but lives in `.col-4`. */
.casino-container-box.roulette .col-8 > .card > .card-body {
  min-height: 0 !important;
}

.casino-container-box.roulette .col-8 > .card.my-bet {
  margin-bottom: 0 !important;
}

@media only screen and (max-width: 767px) {
  .casino-container-box.roulette .video-box-container {
    max-width: 100%;
  }

  .casino-container-box.roulette .casino-stream-stage {
    min-height: 0;
  }
}

/* ---------------------------------------------------------------------------
   ROULETTE — THE COIN RAIL (`.casino-coins-container`)

   The user-reported "coins with livestream, and 3 buttons Undo bet / repeat /
   clear, but it's not showing on maaganga". It was not showing because nothing
   on our side ever rendered it: the reference mounts it INSIDE the live band as
   `div.casino-video > div.casino-coins-container`, and we rendered no such node
   at all. Everything below is the reference's own rule, cited.

   Measured live 2026-09-25, /casino/roulette12 at 1600x1400 (tmp-browser/
   td-roulette-coins.mjs): the container is [285,334,220,170] — i.e. absolute,
   left 0, bottom 5, inside the 855x357 band, opposite the top-left clock — and
   holds a 210x115 coin box with the active chip at 60px and the rest at 50px,
   plus a 210x40 button row of three 68x40 buttons.

   Sources:
     style.css:11103  .casino-coins-container  (absolute, bottom 5, left 0,
                      flex column, gap 5, background #0000004a, padding 5,
                      width 220)
     style.css:11121  .casino-coin              position: relative
     style.css:11142  .casino-coin-box          flex wrap centre, gap 5
     style.css:11152  .coin-btns                flex wrap centre, width 100%
     style.css:11162  .coin-btns .btn            68x40, ripple-free, bold 12px
     style.css:11178  .coin-btns .btn:disabled   #6a6a6a, opacity 1
     style.css:10861  .board-cell-in .bet-chip-area.coin-place
     style.css:10865  .board-cell-in .casino-coin            width 35px
     style.css:10869  .board-cell-in .casino-coin .bet-chip-holder  35x35
     style.css:11384  .roulette.roulette11 .coin-btns .btn-danger/-info/-warning

   `.bet-chip-holder` (50/60), `.casino-coin.active .bet-chip-holder` (60), the
   chip internals and the SVG amount are already ported and byte-equal in
   casino-markets-rules-v9.css:1106-1207, so they are NOT repeated here.
   --------------------------------------------------------------------------- */
.casino-container-box.roulette .casino-coins-container {
  position: absolute;
  bottom: 5px;
  left: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #0000004a;
  padding: 5px;
  border-radius: 0;
  width: 220px;
}

.casino-container-box.roulette .casino-coin-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 5px;
}

.casino-container-box.roulette .coin-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 2px;
}

.casino-container-box.roulette .coin-btns > div {
  display: flex;
  align-items: center;
  justify-content: center;
}

.casino-container-box.roulette .coin-btns .btn {
  border: 0;
  border-radius: 0;
  height: 40px;
  width: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  padding: 0;
  gap: 3px;
  color: #fff;
}

/* The red `Undo Bet` is a roulette11-AND-12/13 rule, not a roulette rule.
   Measured 2026-10-27 on /casino/ourroullete (the one page whose class list is
   the bare `roulette`): its `Undo Bet` computes `rgb(106, 106, 106)` — the
   provider's own `.coin-btns .btn:disabled { background-color: #6a6a6a }`
   (style.css:11178), which on the family pages is OUTRANKED by the per-button
   `.roulette.roulette11 .btn-danger/-info/-warning` colours (style.css:11384)
   and therefore never shows. With the background kept only in the roulette11
   scope, each page gets the colour its own cascade gives it. */
.casino-container-box.roulette.roulette11 .coin-btns .btn {
  background: #ff0000;
}

.casino-container-box.roulette:not(.roulette11) .coin-btns .btn:disabled {
  background-color: #6a6a6a;
}

/* The reference does NOT grey its disabled buttons. Measured 2026-10-24 on
   /casino/roulette12 at 1600x1200 in the open window (tmp-browser/
   td-roulette-open-rail.mjs): with no chips staged, `Undo Bet` is disabled yet
   still `rgb(255, 0, 0)`, and `Clear` is disabled yet still `rgb(253, 207, 19)`
   with black text — only `Repeat` is enabled. The provider's own
   `.coin-btns .btn:disabled` rule (style.css:11178) is outranked by the
   per-button `.rouletteNN .btn-danger/-info/-warning` colours, so the grey it
   declares never shows. We applied the grey, which is why the rail's buttons
   read grey where tridev's read red / teal / yellow. Keeping `opacity: 1`
   because Bootstrap would otherwise fade a disabled `.btn` to 0.65. */
.casino-container-box.roulette .coin-btns .btn:disabled {
  opacity: 1;
}

/* The labels (`Undo Bet` / `Repeat` / `Clear`) are emitted as Bootstrap's
   `d-none d-md-flex`, which is broken in this app: diamond-theme.css re-declares
   `.d-none` broadly enough that the `d-md-flex` half never wins (the same fault
   documented in casino-markets-rules-v10.css for `.casino-table-header`). The
   reference shows icon + label at desktop and icon only on a phone, so the
   label is restored at the md breakpoint and left hidden below it. */
@media (min-width: 768px) {
  .casino-container-box.roulette .coin-btns .btn > .d-md-flex {
    display: flex !important;
  }
}

/* The reference's own per-button colours (`--bg-info` #097c93,
   `--bg-fancy` #fdcf13), and the black text the warning button needs. Scoped to
   `roulette11` exactly as on the reference (style.css:11384), so a bare-roulette
   page keeps the provider's plain grey disabled button — see the note above. */
.casino-container-box.roulette.roulette11 .coin-btns .btn-danger {
  background-color: #ff0000;
}

.casino-container-box.roulette.roulette11 .coin-btns .btn-info {
  background-color: #097c93;
}

.casino-container-box.roulette.roulette11 .coin-btns .btn-warning {
  background-color: #fdcf13;
  color: #000;
}

/* The chip that a placed bet leaves on the board cell.

   Our ring is 35px here where the rail's is 50 — the reference's own
   `.board-cell-in .casino-coin` override (style.css:10865), not a scale factor.
   The mobile `<=400px` rule in the parity sheet shrinks the RAIL's holder to
   40px and would drag this one with it, so the board's chip is restated with an
   extra class of specificity. */
.casino-container-box.roulette .board-cell-in .casino-coin {
  width: 35px;
}

.casino-container-box.roulette .board-cell-in .casino-coin .bet-chip-holder {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
}

/* ---------------------------------------------------------------------------
   ROULETTE ON A PHONE — THE REFERENCE'S OWN PORTRAIT LAYOUT

   CORRECTED 2026-09-25. A previous version of this block called the reference's
   portrait treatment a defect and deliberately refused to copy it. That was
   wrong: the user confirmed with players on tridevexch that this family's phone
   behaviour is correct, so we now reproduce it. The deviation is deleted with
   the comment that justified it.

   What the reference does in portrait — its own rules, cited, under
   `@media (orientation: portrait)` (responsive-d247.css:3791-4224, a window that
   covers EVERY portrait width, not just phones):

     .casino-video                              position: unset, 0 tall
     .roulette .video-box-container             absolute, width 50%, height 120
     .casino-coins-container                    absolute, right 5, width auto,
                                                transparent, chips in a column
     .coin-btns .btn                            40x40 round (30x30 under 400px)
     4117 .roulette.roulette11 .flip-clock-wrapper
                              top 45 !important, left 5 !important
     4121 .roulette.roulette11 .casino-coins-container          top 55
     4203 .roulette.roulette11.roulette13 .casino-coins-container  top 45
     4211 .roulette.roulette11.roulette13 .flip-clock-wrapper
                              right 5 !important, left unset !important, top 5 !important

   so the BOARD is the first thing on the page, the stream tile hangs at half
   width under the board's left edge, and the chips plus Undo Bet / Repeat /
   Clear are a 50px column down the board's right edge. The clock is top-left on
   roulette11/12 and top-right on roulette13.

   Measured live 2026-09-25 on /casino/roulette13 at 390x844 in the betting
   window (three consecutive samples, identical): board [0,153,390,550], band
   [0,153,390,0] static, tile 195x120 at x=0 with its top at board bottom + 4,
   rail [335,198,50,428] (top 45, right 5, transparent), coin box 50x275,
   coin-btns 50x148 with 30x30 buttons and 12px/18px labels, clock
   [341,158,44,31].

   HOW WE GET THERE. Our DOM is not the reference's: the band and the board are
   SIBLINGS and the band is rendered first, so no offset can put the board on
   top, and the reference's offsets resolve against a wrapper that is exactly
   `board + 120` tall. So this block:

     1. turns the page column (the compact layout's tab pane, or the desktop
        layout's `.col-8`) into a single-column GRID and dissolves the band's
        card with `display: contents`, so the game header, the band's body and
        the board's body all become grid items;
     2. puts the board's body and the band's body in the SAME grid cell — the
        band's body then stretches to the board's height, giving it the board's
        top edge and the board's bottom edge, i.e. the wrapper the reference's
        own offsets assume (`top: 55px` for the rail, `top: 100%` for the tile);
     3. applies the reference's rules verbatim, with the tile expressed from the
        top so it cannot depend on how tall the page happens to be.

   `:has()` is what identifies the two bodies: both carry the same `card-body
   <gameCode>` classes and only one of them holds `.casino-video`.

   Specificity note: the parity sheet owns `.casino-container-box.roulette
   .video-box-container` and friends at (0,3,0)-(0,5,0) and is linked AFTER this
   file — so the rules below add the `.casino-video` step (or name
   roulette11/roulette13 explicitly) to outrank them rather than relying on
   source order. The `!important`s are the reference's own (responsive.css
   :4118-4122).
   --------------------------------------------------------------------------- */
/* The reference's own scope for all of it: `@media (orientation: portrait)`,
   i.e. EVERY portrait width, phones and wide portrait windows alike
   (responsive-d247.css:3791). */
@media (orientation: portrait) {
  /* 0. THE SPACE UNDER THE BOARD. The reference reserves it inside
        `.casino-detail`, which is the board plus 120px of `padding-bottom`, and
        two of its own absolute rules depend on that box existing:

          .roulette .casino-last-results   bottom: 55px  ->  board bottom + 5
          .roulette .video-box-container   top: 100% + 4 ->  the 120px tile's room

        Our DOM has no `.casino-detail`, and none of the boxes it does have ended
        below the board — the compact tab pane and the page container both ended
        exactly AT the board's bottom. So the strip's `bottom: 55px` resolved
        against a block with no reserved space and drew itself 115px UP over the
        board's outer-bet rows, and the 120px stream tile ran 117px into the
        footer. Measured 2026-09-26 at 390x844 (tmp-browser/overlap-probe.mjs):
        strip [230,691,160,60] against board 211..806, tile 810..930 against a
        footer starting at 813.

        So the reservation goes on the grid container, which is where our layout
        column actually ends, and the strip reads it back through the same custom
        property (casino-responsive-parity.css). At phone widths it is the
        reference's 120px exactly. Above them it is the height OUR tile actually
        takes, because our tile grows with the column where the reference's fixed
        120px box lets its own 16:9 inner overflow — `0.5 x 0.5625 = 28.125%` of
        a column that measures 53.6% of the viewport at these widths, i.e.
        `15.1vw`, capped at the 250px the column stops growing at.

        The extra 8px is the tile's own 4px offset under the board plus a little
        air: the tile's box ends at board + 4 + 120 = 124, and our casino
        container sits ~4px closer to the footer than the reference's does (its
        `.casino-detail` ends at board + 120 and its footer starts at board + 130,
        so its 120px reservation still clears the tile by 6). Measured after the
        first attempt at 390x844: the tile overlapped the footer by exactly 3px. */
  .casino-container-box.roulette {
    --roulette-foot-reserve: max(128px, min(calc(15.1vw + 12px), 258px))
  }

  /* 1. The page column becomes one grid column and the band's card dissolves,
        so the game header, the band's body and the board's body are all grid
        items of the same container. In the compact layout that container is the
        tab pane; in the desktop layout it is `.col-8`. */
  .casino-container-box.roulette > .col-8.col-lg-8,
  .casino-container-box.roulette .tab-pane.active {
    display: grid;
    grid-template-columns: 1fr;
    padding-bottom: var(--roulette-foot-reserve);
  }

  /* `:has(> .casino-header)` matters: the compact layout's PLACED BET tab holds
     a `.card.my-bet` too, and dissolving THAT one would drop the card box off the
     bet history the moment the user switches tabs. Only the band's card carries
     the game header. */
  .casino-container-box.roulette > .col-8.col-lg-8 > .card.my-bet:has(> .casino-header),
  .casino-container-box.roulette .tab-pane.active > .card.my-bet:has(> .casino-header) {
    display: contents;
  }

  .casino-container-box.roulette > .col-8.col-lg-8 .casino-header,
  .casino-container-box.roulette .tab-pane.active .casino-header {
    grid-row: 1;
    grid-column: 1;
  }

  /* 2. Board and band in ONE grid cell. The band's body then comes out exactly
        as tall as the board — its top edge is the board's top, its bottom edge
        the board's bottom — which is the wrapper the reference's own offsets
        assume (`top: 55px` for the rail, `top: 100%` for the tile).

        `:has()` is what tells the two bodies apart: both carry the same
        `card-body <gameCode>` classes and only one of them holds the band. */
  .casino-container-box.roulette .card-body:has(> .casino-video),
  .casino-container-box.roulette .card-body:has(.roulette-game-shell) {
    grid-row: 2;
    grid-column: 1;
    min-height: 0;
  }

  /* 3. The band takes no room, as on the reference: `position: unset`, and its
        only height source (the 56.25% box) is absolute here, so 0. */
  .casino-container-box.roulette .casino-video.casino-stream-stage,
  .casino-container-box.roulette .casino-video.casino-stream-stage-mobile {
    position: static;
    height: 0;
    min-height: 0;
    aspect-ratio: auto;
    overflow: visible;
  }

  /* 4. The stream tile: half the column at the left, one 4px gap under the
        board. The reference's rule is `width: 50%; height: 120px; bottom:
        -4px`; ours is the same box measured from the top of a parent whose
        bottom edge IS the board's bottom, so it lands on board bottom + 4 at
        every width and cannot depend on the page height.

        The 16:9 inner box is the reference's own, and at phone widths it is
        exactly their pair (195 wide -> 110 tall inside their 120px box).
        `min-height: 120px` keeps that outer/inner pair on a phone; on a wide
        portrait window the reference's fixed 120px box lets the same 56.25%
        inner overflow by 121px, which we do not copy. */
  .casino-container-box.roulette .casino-video .video-box-container,
  .casino-container-box.roulette.roulette11 .casino-video .video-box-container,
  .casino-container-box.roulette.roulette11.roulette13 .casino-video .video-box-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    bottom: auto;
    width: 50%;
    max-width: 50%;
    height: auto;
    min-height: 120px;
    margin: 4px 0 0 0;
  }

  .casino-container-box.roulette .casino-video .casino-video-box {
    position: relative;
    height: auto;
    padding-bottom: 56.25%;
  }

  /* 5. The coin rail: the reference's portrait rule verbatim (4044-4054) — a
        50px column against the board's right edge, 55px down on roulette11/12
        (4121) and 45px down on roulette13 (4203), transparent, no padding. */
  .casino-container-box.roulette .casino-video .casino-coins-container,
  .casino-container-box.roulette.roulette11 .casino-video .casino-coins-container,
  .casino-container-box.roulette.roulette11.roulette13 .casino-video .casino-coins-container {
    position: absolute;
    top: 55px;
    right: 5px;
    left: auto;
    bottom: auto;
    width: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    transform: unset;
    flex-direction: column;
  }

  .casino-container-box.roulette.roulette11.roulette13 .casino-video .casino-coins-container {
    top: 45px;
  }

  .casino-container-box.roulette .casino-video .casino-coin-box {
    flex-direction: column;
  }

  /* The buttons stack inside the rail. width: 100% is not decoration — the rail
     is `width: auto`, so its shrink-to-fit width comes from the 50px coin box
     and the buttons stretch to it, exactly as the reference's
     `.coin-btns { width: 100% }` does. */
  .casino-container-box.roulette .casino-video .coin-btns,
  .casino-container-box.roulette.roulette11 .casino-video .coin-btns,
  .casino-container-box.roulette.roulette11.roulette13 .casino-video .coin-btns {
    flex-direction: column;
    width: 100%;
  }

  .casino-container-box.roulette .casino-video .coin-btns > div {
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
  }

  /* The reference's own button size here (responsive-d247.css:4080). */
  .casino-container-box.roulette .casino-video .coin-btns .btn,
  .casino-container-box.roulette.roulette11 .casino-video .coin-btns .btn,
  .casino-container-box.roulette.roulette11.roulette13 .casino-video .coin-btns .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }

  /* The reference's phone label is 12px (line-height 18 = 1.5), which makes an
     item 30 + 18 = 48px tall; ours inherited the 16px body size and measured 54.
     Measured on the reference at 390x844: items 43x48 / 33x48 / 30x48, 2px
     apart. */
  .casino-container-box.roulette .casino-video .coin-btns > div > .d-md-none {
    font-size: 12px;
  }

  /* 6. The clock: top-left, 45px down on roulette11/12 (4117); top-right, 5px
        down on roulette13 (4211). The `!important`s are the reference's own. */
  .casino-container-box.roulette .casino-video .clock,
  .casino-container-box.roulette.roulette11 .casino-video .clock,
  .casino-container-box.roulette.roulette11.roulette13 .casino-video .clock {
    top: 45px !important;
    left: 5px !important;
    right: auto !important;
    bottom: auto !important;
    text-align: left !important;
  }

  .casino-container-box.roulette.roulette11.roulette13 .casino-video .clock {
    top: 5px !important;
    right: 5px !important;
    left: auto !important;
  }

  /* 7. THE SECOND STATE: the round in play. Everything above describes the
        BETTING WINDOW. The reference has a second portrait state and we were
        missing it entirely, which is why our phone view stayed a board with a
        thumbnail under it while theirs fills the screen with the stream.

        The reference's own rules (responsive-d247.css:3800-3826, all inside
        `@media (orientation: portrait)`):

          .roulette .casino-video.full                  absolute, height
              calc(100% - 120px), width 100%, background #0000008c (55% black),
              z-index 1000, top 0                    (4133 / 4199)
          .roulette .casino-video.full .video-box-container
              top 50%, left 50%, translate(-50%,-50%), width 95%,
              height auto

        and in that state its JS unmounts `casino-coins-container`, so the chip
        rail and Undo Bet / Repeat / Clear are gone.

        WHEN IT APPLIES. Measured on the reference at 390x844 by sampling a
        whole round (tmp-browser/roulette-state-probe.mjs): `full` is present
        exactly when EVERY one of its 49 `.board-cell`s carries the suspended
        flag, and absent exactly when none of them does. Correlation was exact
        over 14 samples on both slugs — e.g. roulette12: samples 2-10
        cells=49/suspended=49 band=[0,153,390,595] absolute `.casino-video
        full`; samples 11-14 cells=49/suspended=0 band=[0,153,390,0] static,
        rail present. Our own board toggles the same way (49 cells, all-open or
        all-suspended in stretches of 10-20s), so the state can be read off the
        board in pure CSS with `:has()` — no JS change, no rebuild.

        The `:has(.casino-table .board-cell)` half is the loading guard: before
        the board has rendered there are no cells, and \"no cell is open\" would
        otherwise be vacuously true and veiled the page while it loaded. The
        reference needs no guard because it toggles a class in JS.

        Geometry: the band's card-body already shares the board's grid cell, so
        the band's containing block IS the board's box — `top: 0; height: 100%`
        is the reference's `top: 0; height: calc(100% - 120px)` of its
        board+120 wrapper. The tile then stretches from the band's centre to 4px
        below its bottom edge (`top: 50%` + the base rule's `bottom: -4px`),
        which is the reference's own box arithmetic: measured there at
        390x844, roulette12's container is 371x301.59 at y=300 in a 595.19 band
        (= 50% + 4) and roulette13's is 371x279.09 in a 550.19 band, with the
        16:9 inner box 371x208 at the container's top — the stream that fills
        the phone screen. */
  .casino-container-box.roulette:has(.casino-table .board-cell):not(:has(.casino-table .board-cell:not(.suspended-box))) .casino-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: #0000008c;
  }

  .casino-container-box.roulette:has(.casino-table .board-cell):not(:has(.casino-table .board-cell:not(.suspended-box))) .casino-video .video-box-container {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: -4px;
    margin: 0;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 95%;
    height: auto;
    min-height: 0;
  }

  /* The reference unmounts the rail while the round is in play. */
  .casino-container-box.roulette:has(.casino-table .board-cell):not(:has(.casino-table .board-cell:not(.suspended-box))) .casino-video .casino-coins-container {
    display: none;
  }
}

/* The reference's own narrow-phone clause (responsive-d247.css:4226). */
@media (orientation: portrait) and (max-width: 400px) {
  .casino-container-box.roulette .casino-video .coin-btns .btn,
  .casino-container-box.roulette.roulette11 .casino-video .coin-btns .btn,
  .casino-container-box.roulette.roulette11.roulette13 .casino-video .coin-btns .btn {
    width: 30px;
    height: 30px;
  }
}

/* ---------------------------------------------------------------------------
   MATKA — WORLI / WORLI2 / WORLI3

   Same two deviations the lucky7a and roulette families needed, measured live
   2026-09-26 at 1600x1200 against /casino/worli3 through the warm headful
   session (tmp-browser/worli3-geom.mjs):

     1. The reference's page container is `casino-page-container worli matka`
        and it holds the header, `.matka-tabs`, the video and `.casino-detail`
        as FLAT children. We wrap the header/tabs/video in a
        `div.card.m-b-10.my-bet` whose `m-b-10` margin-bottom pushed the board
        10px away from the video band — the reference's video bottom and board
        top touch (699 / 699 with the board's own 5px margin inside
        `.casino-detail`).
     2. The video card's body carries an inline `min-height: 400px` that the
        reference has no equivalent of.

   Scoped to the `.col-8` column's direct children so it can never reach the
   sidebar's own `.card.m-b-10.my-bet`, which shares the class list but lives in
   `.col-4` — exactly how the lucky7a and roulette blocks above are scoped. */
.casino-container-box.worli .col-8 > .card > .card-body {
  min-height: 0 !important;
}

.casino-container-box.worli .col-8 > .card.my-bet {
  margin-bottom: 0 !important;
}

/* ===========================================================================
   BATCH 5 — 32 CARDS A / 32 CARDS B / 3 CARDS JUDGEMENT (2026-10-05)

   Three bespoke boards plus the live band, all captured from the live TD DOM
   (tmp-browser/td-board-dom.mjs and td-roulette-layout.mjs). The page classes
   (`cards32a` / `cards32b` / `threecardj`) are put on our page root by
   CASINO_PAGE_CLASSES, so every rule below is page-class rooted and can never
   reach another game.

   The board census rules are d247's own, verbatim:

     style.css:5518  .cards32a .casino-nation-detail { width: 60% }
     style.css:5522  .cards32a .casino-odds-box      { width: 20% }
     style.css:5528  .cards32b .casino-nation-detail { width: 60% }
     style.css:5532  .cards32b .casino-odds-box      { width: 20% }
     style.css:5536  .cards32b .cards32total .casino-odds-box { height:69px; width:40% }
     style.css:5541  .card32numbers-container { display:flex; flex-wrap:wrap }
     style.css:5546  .cards32b .card32numbers-container .casino-odds-box { border-bottom:1px solid var(--table-border) }
     style.css:5550  .cards32b .card32numbers-container .casino-odds-box.suspended-box::before { top:-12px }
     style.css:5554  .card32numbers .casino-odds { font-family:Casino; font-size:48px; height:40px; line-height:40px }
     style.css:6309  .threecardjbox { flex; wrap; width:100%; align-content:center }
     style.css:6315  .threecard-title { width:10%; text-align:center; 1px #000 borders; flex column }
     style.css:6331  .threecardj-cards { width:90%; flex; wrap; center; border:1px solid #000; padding:4px 4px 0 }
     style.css:6345  .threecardj-cards img { border:2px solid transparent }
     style.css:6350  .threecardj-cards .selected img { border:2px solid var(--bg-success) }
     responsive.css:670/674  <=767px  .threecard-title / .threecardj-cards { width:100% }

   The live band is the SAME shape as the lucky7a/roulette families (reference:
   .casino-video 855x357, .video-box-container 635x357 right-aligned, board top
   514), so the same rules are reproduced here for the three new page classes
   rather than re-scoped onto lucky7a's block — that block is load-bearing for
   lucky5/lucky7 and must not be re-tested by a batch-5 change.
   --------------------------------------------------------------------------- */

/* ---- card32 (.cards32a) and card32eu (.cards32b) board census ---- */
.casino-container-box.cards32a .casino-nation-detail,
.casino-container-box.cards32b .casino-nation-detail {
  width: 60%;
}

.casino-container-box.cards32a .casino-odds-box,
.casino-container-box.cards32b .casino-odds-box {
  width: 20%;
}

.casino-container-box.cards32b .cards32total .casino-odds-box {
  height: 69px;
  width: 40%;
}

.casino-container-box.cards32b .card32numbers-container {
  display: flex;
  flex-wrap: wrap;
}

.casino-container-box.cards32b .card32numbers-container .casino-odds-box {
  border-bottom: 1px solid var(--table-border);
}

.casino-container-box.cards32b .card32numbers-container .casino-odds-box.suspended-box::before {
  top: -12px;
}

.casino-container-box.cards32b .card32numbers .casino-odds {
  font-family: Casino;
  font-size: 48px;
  height: 40px;
  line-height: 40px;
}

/* ---- 3cardj (.threecardj) board ---- */
.casino-container-box.threecardj .threecardjbox {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-content: center;
}

.casino-container-box.threecardj .threecard-title {
  width: 10%;
  text-align: center;
  border-left: 1px solid #000;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
}

.casino-container-box.threecardj .threecardj-cards {
  width: 90%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border: 1px solid #000;
  padding: 4px;
  padding-bottom: 0;
}

.casino-container-box.threecardj .threecardj-cards .card-odd-box .threecard-info {
  width: 100%;
}

.casino-container-box.threecardj .threecardj-cards img {
  border: 2px solid transparent;
}

.casino-container-box.threecardj .threecardj-cards .selected img {
  border: 2px solid var(--bg-success);
}

/* A shut Yes/No panel carries the reference's own `suspended-box` on the whole
   `.threecardjbox` (measured on tridevexch 2026-10-30: `threecardjbox back
   suspended-box` with the odds at 0). Its global `.suspended-box` skin paints a
   17px white lock over a #373636d6 veil; ours is scoped per board, so 3cardj
   needs its own copy or a closed market showed no padlock and no overlay at all
   (user report: "nothing like this"). */
.casino-container-box.threecardj .threecardjbox.suspended-box {
  position: relative;
  cursor: not-allowed;
}
.casino-container-box.threecardj .threecardjbox.suspended-box::before {
  background-image: url('../img/icons/lock.svg');
  background-size: 17px 17px;
  background-repeat: no-repeat;
  background-position: center;
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: invert(1);
  -webkit-filter: invert(1);
  pointer-events: none;
}
.casino-container-box.threecardj .threecardjbox.suspended-box::after {
  content: '';
  background-color: #373636d6;
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* The face is the bet entry point on the reference (cards open the slip), so it
   has to read as clickable; a shut panel says not-allowed. */
.casino-container-box.threecardj .threecardj-cards .card-odd-box {
  cursor: pointer;
}
.casino-container-box.threecardj .threecardjbox.suspended-box .card-odd-box {
  cursor: not-allowed;
}

@media only screen and (max-width: 767px) {
  .casino-container-box.threecardj .threecard-title {
    width: 100%;
  }

  .casino-container-box.threecardj .threecardj-cards {
    width: 100%;
  }
}

/* ---- the shared live band for all three page classes ---- */
.casino-container-box.cards32a .video-box-container,
.casino-container-box.cards32b .video-box-container,
.casino-container-box.threecardj .video-box-container {
  max-width: calc(100% - 220px);
  margin-left: auto;
}

.casino-container-box.cards32a .casino-stream-frame,
.casino-container-box.cards32b .casino-stream-frame,
.casino-container-box.threecardj .casino-stream-frame {
  position: static;
  inset: auto;
  width: 100%;
  overflow: hidden;
}

.casino-container-box.cards32a .casino-stream-stage,
.casino-container-box.cards32b .casino-stream-stage,
.casino-container-box.threecardj .casino-stream-stage {
  min-height: 0;
  aspect-ratio: auto;
}

.casino-container-box.cards32a .casino-video-cards,
.casino-container-box.cards32b .casino-video-cards,
.casino-container-box.threecardj .casino-video-cards {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.4);
  height: auto;
  padding: 5px;
  z-index: 2;
  max-width: 220px;
}

/* The reference reaches these h5s through its GLOBAL heading scale
   (style.css ~line 291: `h5 { font-size: 18px; font-weight: 400;
   margin-bottom: 0 }`) and then bolds them with `.casino-video-cards h5`.
   We ship only half of that: the bold/upper/white, not the scale, so our h5
   kept Bootstrap's 1.25rem (20px) with its `.5rem` bottom margin. Measured on
   card32 2026-10-06 against the live reference overlay: each player row
   (`.casino-video-cards > div`) came out 82px tall here vs the reference's
   72px — exactly the 10px of `20px * 1.2 + 8px margin` vs `18px * 1.2 + 0` —
   and because the row is sized by that label, the overlay itself was 129px
   wide vs the reference's 117px. The reference's overlay is 117x308 for four
   players at 1600px (rows 107x72, cards 40x50). */
.casino-container-box.cards32a .casino-video-cards h5,
.casino-container-box.cards32b .casino-video-cards h5,
.casino-container-box.threecardj .casino-video-cards h5 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0;
}

.casino-container-box.cards32a .casino-video-cards .flip-card-container,
.casino-container-box.cards32b .casino-video-cards .flip-card-container,
.casino-container-box.threecardj .casino-video-cards .flip-card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.casino-container-box.cards32a .casino-video-cards .flip-card,
.casino-container-box.cards32b .casino-video-cards .flip-card,
.casino-container-box.threecardj .casino-video-cards .flip-card {
  background-color: transparent;
  perspective: 1000px;
  height: 50px;
  width: 40px;
  margin-right: 5px;
}

.casino-container-box.cards32a .casino-video-cards .flip-card:last-child,
.casino-container-box.cards32b .casino-video-cards .flip-card:last-child,
.casino-container-box.threecardj .casino-video-cards .flip-card:last-child {
  margin-right: 0;
}

.casino-container-box.cards32a .casino-video-cards .flip-card-inner,
.casino-container-box.cards32b .casino-video-cards .flip-card-inner,
.casino-container-box.threecardj .casino-video-cards .flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
}

.casino-container-box.cards32a .casino-video-cards .flip-card-front,
.casino-container-box.cards32a .casino-video-cards .flip-card-back,
.casino-container-box.cards32b .casino-video-cards .flip-card-front,
.casino-container-box.cards32b .casino-video-cards .flip-card-back,
.casino-container-box.threecardj .casino-video-cards .flip-card-front,
.casino-container-box.threecardj .casino-video-cards .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.casino-container-box.cards32a .casino-video-cards .flip-card-back,
.casino-container-box.cards32b .casino-video-cards .flip-card-back,
.casino-container-box.threecardj .casino-video-cards .flip-card-back {
  transform: rotateY(180deg);
}

.casino-container-box.cards32a .casino-video-cards .flip-card img,
.casino-container-box.cards32b .casino-video-cards .flip-card img,
.casino-container-box.threecardj .casino-video-cards .flip-card img {
  height: 100%;
  width: 100%;
}

.casino-container-box.cards32a .col-8 > .card > .card-body,
.casino-container-box.cards32b .col-8 > .card > .card-body,
.casino-container-box.threecardj .col-8 > .card > .card-body {
  min-height: 0 !important;
}

.casino-container-box.cards32a .col-8 > .card.my-bet,
.casino-container-box.cards32b .col-8 > .card.my-bet,
.casino-container-box.threecardj .col-8 > .card.my-bet {
  margin-bottom: 0 !important;
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .casino-container-box.cards32a .casino-video-cards .flip-card,
  .casino-container-box.cards32b .casino-video-cards .flip-card,
  .casino-container-box.threecardj .casino-video-cards .flip-card {
    height: 40px;
    width: 32px;
  }
}

@media only screen and (min-width: 1400px) and (max-width: 1599px) {
  .casino-container-box.cards32a .casino-video-cards .flip-card,
  .casino-container-box.cards32b .casino-video-cards .flip-card,
  .casino-container-box.threecardj .casino-video-cards .flip-card {
    height: 45px;
    width: 36px;
  }
}

/* ---------------------------------------------------------------------------
   BATCH 5 — RESPONSIVE (portraits / small laptops)

   The reference scales the 3-Cards Judgement card strip with the viewport:
   responsive.css:364 `<=767` -> 45px, :2926 `768-1199` -> 55px, :3187
   `1200-1399` -> 45px, :3443 `1400-1599` -> 50px, while style.css:4881 keeps the
   65px base at >=1600. We shipped only that base, so at 390px our panels came
   out 198px tall against the reference's 151px (measured live 2026-10-06 with
   board-boxes-diff.mjs 3cardj 390: TD `.card-odd-box` 33x45 fs12/lh18, ours
   47x65 fs13/lh19.5).

   The reference also swaps its global heading scale below 768px
   (responsive.css:29 `h4 { font-size: 16px }`, `h5 { font-size: 14px }`), which
   is what shrinks both the odds `h4` (19.2px here vs our 24px) and the live
   stream's `.casino-video-cards h5` (the reference has no font-size of its own
   there — it inherits 14px on phones).
   --------------------------------------------------------------------------- */
@media only screen and (min-width: 768px) and (max-width: 1199px) {
  .casino-container-box.threecardj .card-odd-box img {
    height: 55px;
  }
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .casino-container-box.threecardj .card-odd-box img {
    height: 45px;
  }
}

@media only screen and (min-width: 1400px) and (max-width: 1599px) {
  .casino-container-box.threecardj .card-odd-box img {
    height: 50px;
  }
}

@media only screen and (max-width: 767px) {
  .casino-container-box.cards32a .video-box-container,
  .casino-container-box.cards32b .video-box-container,
  .casino-container-box.threecardj .video-box-container {
    max-width: 100%;
  }

  .casino-container-box.threecardj .card-odd-box img {
    height: 45px;
  }

  /* The reference's phone heading scale (responsive.css:29). */
  .casino-container-box.cards32a .casino-table h4,
  .casino-container-box.cards32b .casino-table h4,
  .casino-container-box.threecardj .casino-table h4 {
    font-size: 16px;
    line-height: 1.2;
  }

  .casino-container-box.cards32a .casino-video-cards h5,
  .casino-container-box.cards32b .casino-video-cards h5,
  .casino-container-box.threecardj .casino-video-cards h5 {
    font-size: 14px;
  }

  /* 32 Cards A/B phone overlay (2026-10-24). The reference scales its flip
     cards down on phones with the UNSCOPED `@media (max-width: 767px)
     { .flip-card { height: 20px; width: 16px } }`, and its heading scale puts
     the group label at 12px/1. Measured live on tridevexch /casino/card32 at
     390: panel 81x150, each group 71x32 (h5 12px/12px, card 16x20, 4px between
     groups). Ours kept the desktop 40x50 cards and the 14px/1.2 label, so four
     groups measured 83x67 each and the panel 93x289 inside a 217px stream box —
     the last player's card sat under the bottom edge. */
  .casino-container-box.cards32a .casino-video-cards h5,
  .casino-container-box.cards32b .casino-video-cards h5 {
    font-size: 12px;
    line-height: 1;
  }

  .casino-container-box.cards32a .casino-video-cards .flip-card,
  .casino-container-box.cards32b .casino-video-cards .flip-card {
    height: 20px;
    width: 16px;
  }

  /* The reference swaps its phone base to `body { font-size: 12px }`
     (responsive.css:6), so its board header row — which sizes itself from that
     base and nothing else — becomes 12px/18px + its 5px of cell padding = 23px.
     Our v9 header pin (16px/24px, correct at desktop) stayed in force on phones
     and measured 29px: measured live 2026-10-06 at 390px, TD left-box header
     368x23 against our 366x29, which is the whole 6px card32 board delta
     (TD 390x223, ours 388x229). 0,2,0 — same specificity as the v9 pin, but
     this sheet loads after it. */
  .casino-table .casino-table-header {
    font-size: 12px;
    line-height: 18px;
  }

  /* The card strip is width:100% here, so the reference's title becomes a
     full-width 20px strip (text row 18px + its 1px top/bottom borders). Our
     title row kept the board's 13px/19.5px base and came out 21.5px.
     Measured 2026-10-06 at 390px: TD [0,371 390x20], ours [1,463 388x22]. */
  .casino-container-box.threecardj .threecard-title {
    font-size: 14px;
    line-height: 18px;
  }
}



/* ===========================================================================
   BATCH 6 — RACE FAMILY: race2 / race17 / race20 (2026-10-06)

   Three slugs, one resolved UI code (`race2020` — see GAME_CODE_ALIASES). Until
   this pass all three rendered through GenericCasino's flat bookmaker table and
   carried no page class at all, so the reference's whole race layout was
   unreachable. Measured live against tridevexch 2026-10-06 with
   tmp-browser/td-race-html.mjs (warm headful session on :9720 — headless gets a
   Cloudflare challenge), and with tmp-browser/board-boxes-diff.mjs on our side:

     /casino/race2   page class `queen`     board 855x88
        div.casino-table
          div.casino-table-box
            div.casino-odd-box-container x4   (205x88 each)
              div.casino-nation-name  "Player A".."Player D"   205x24
              div.casino-odds-box.back                            101x46
              div.casino-odds-box.lay                             101x46
              div.casino-nation-book                              205x18

     /casino/race17  page class `raceto17`  board 855x88 — the SAME box template
        with the provider's four book labels ("Race to 17", "Big Card (7,8,9) - 2",
        "Zero Card - 2", "Any Zero").

     /casino/race20  page class `race20`    board 855x357
        two `.casino-table-box` blocks: four 205x109 suit boxes (K card art in
        the name), then `.casino-table-left-box` (No/Yes toggle + Total points +
        No/Yes toggle + Total cards) and `.casino-table-right-box` (six 173x88
        `Win with N` boxes in a 3x2 grid).

   Reference sources ported below (verbatim, page-class rooted):

     style.css:5490  .queen .casino-odd-box-container { width:calc(25% - 7.5px);
                     margin-right:10px; flex; wrap; space-between }
     style.css:5498  .queen .casino-odd-box-container:last-child { margin-right:0 }
     style.css:5502  .queen .casino-nation-name { width:100%; text-align:center }
     style.css:5507  .queen .casino-odds-box { width:49% }
     style.css:5511  .queen .casino-nation-book { width:100%; text-align:center }
     style.css:6505  .raceto17 ... (identical five rules)
     style.css:6360  .race-total-point { flex; center; margin-bottom:5px; 14px;
                     background:#404040; padding:5px }
     style.css:6368  .race-total-point > div { 1px solid yellow; padding:5px;
                     text-align:center; line-height:1; margin-right:5px }
     style.css:6376  .race20 .flip-card-container { justify-content:flex-start }
     style.css:6380  .race20 .flip-card { height:30px; width:24px }
     style.css:6385  .race20 .casino-odd-box-container { width:calc(25% - 7.5px);
                     margin-right:10px; flex; wrap; space-between }
     style.css:6393  .race20 .casino-odd-box-container:last-child { margin-right:0 }
     style.css:6397  .race20 .casino-nation-name { width:100%; text-align:center }
     style.css:6402  .race20 .casino-odds-box { width:49% }
     style.css:6406  .race20 .casino-nation-name img { height:40px; margin-bottom:5px }
     style.css:6411  .race20 .casino-table-left-box { width:33%; padding:5px 5px 0 }
     style.css:6416  .race20 .casino-table-left-box .casino-odd-box-container
                     { width:100%; align-items:center; margin-bottom:10px }
     style.css:6422  ... .casino-nation-name, ... .casino-odds-box { width:33.33% }
     style.css:6427  ... > .casino-nation-book { width:66.66%; text-align:center;
                     margin-left:auto; margin-top:5px }
     style.css:6434  .race20 .casino-table-right-box { width:66%; flex; wrap;
                     space-between; align-items:center; padding:5px 5px 0 }
     style.css:6443  .race20 .casino-table-right-box .casino-odd-box-container
                     { width:calc(33.33% - 10px) }
     style.css:6447  .race20 .casino-table-right-box .casino-odd-box-container:nth-child(3n)
                     { margin-right:0 }
     style.css:6451  .race20 .casino-table-right-box .casino-odds-box { width:100% }
     style.css:6455  .race20 .casino-last-results .result { #d5d5d5; 1px #626262 }
     style.css:6460  .race20 .casino-last-results .result img { height:30px }

     responsive.css:489/493/497  <=767px  .queen .casino-table-box { padding:5px }
                                 .queen .casino-odd-box-container { width:calc(50% - 10px) }
                                 .queen .casino-odd-box-container:nth-child(2n)
                                   { margin-right:0 }
     responsive.css:674/678/682/686/690  <=767px  .race20 .casino-table-box
                                 { padding:5px }, .casino-odd-box-container
                                 { width:calc(50% - 5px) }, :nth-child(2n)
                                 { margin-right:0 }, .casino-table-left-box
                                 { width:100% }, .casino-table-right-box { width:100% }
     responsive.css:692/696/700  <=767px  .raceto17 .casino-table-box { padding:5px }
                                 .raceto17 .casino-odd-box-container
                                 { width:calc(50% - 5px) }, :nth-child(2n)
                                 { margin-right:0 }
     responsive.css:2728 <=767px  .race20 .flip-card { height:20px; width:16px }
     responsive.css:901  <=767px  .race20 .casino-last-results .result img
                                 { height:25px }

   NOTE on the shipped responsive sheet: casino-responsive-parity.css already
   carries these race20/queen breakpoint rules, but written as
   `.casino-container-box .race20 …` (page class as a DESCENDANT). Our page root
   carries the page class on the `.casino-container-box` element itself, so every
   one of those selectors was unreachable — the same reason the desktop box
   census above was missing. The copies below are page-class rooted so they can
   actually match; the earlier ones stay untouched because they are inert, not
   because they are equivalent.
   --------------------------------------------------------------------------- */

/* ---- the shared live band for the three race page classes ---- */
.casino-container-box.queen .video-box-container,
.casino-container-box.raceto17 .video-box-container,
.casino-container-box.race20 .video-box-container {
  max-width: calc(100% - 220px);
  margin-left: auto;
}

.casino-container-box.queen .casino-stream-frame,
.casino-container-box.raceto17 .casino-stream-frame,
.casino-container-box.race20 .casino-stream-frame {
  position: static;
  inset: auto;
  width: 100%;
  overflow: hidden;
}

.casino-container-box.queen .casino-stream-stage,
.casino-container-box.raceto17 .casino-stream-stage,
.casino-container-box.race20 .casino-stream-stage {
  min-height: 0;
  aspect-ratio: auto;
}

.casino-container-box.queen .casino-video-cards,
.casino-container-box.raceto17 .casino-video-cards,
.casino-container-box.race20 .casino-video-cards {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.4);
  height: auto;
  padding: 5px;
  z-index: 2;
  max-width: 220px;
}

.casino-container-box.queen .casino-video-cards h5,
.casino-container-box.raceto17 .casino-video-cards h5,
.casino-container-box.race20 .casino-video-cards h5 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0;
}

/* The reference alternates its Total 0..3 headings white / green, and its
   green is the theme's #086f3f, not bootstrap's .text-success (measured on
   tridevexch /casino/queen 2026-10-24: rgb(8,111,63)). */
.casino-container-box.queen .casino-video-cards h5.text-success {
  color: #086f3f !important;
}

.casino-container-box.queen .casino-video-cards .flip-card-container,
.casino-container-box.raceto17 .casino-video-cards .flip-card-container,
.casino-container-box.race20 .casino-video-cards .flip-card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.casino-container-box.queen .casino-video-cards .flip-card,
.casino-container-box.raceto17 .casino-video-cards .flip-card,
.casino-container-box.race20 .casino-video-cards .flip-card {
  background-color: transparent;
  perspective: 1000px;
  height: 50px;
  width: 40px;
  margin-right: 5px;
}

.casino-container-box.queen .casino-video-cards .flip-card:last-child,
.casino-container-box.raceto17 .casino-video-cards .flip-card:last-child,
.casino-container-box.race20 .casino-video-cards .flip-card:last-child {
  margin-right: 0;
}

.casino-container-box.queen .casino-video-cards .flip-card-inner,
.casino-container-box.raceto17 .casino-video-cards .flip-card-inner,
.casino-container-box.race20 .casino-video-cards .flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
}

.casino-container-box.queen .casino-video-cards .flip-card-front,
.casino-container-box.queen .casino-video-cards .flip-card-back,
.casino-container-box.raceto17 .casino-video-cards .flip-card-front,
.casino-container-box.raceto17 .casino-video-cards .flip-card-back,
.casino-container-box.race20 .casino-video-cards .flip-card-front,
.casino-container-box.race20 .casino-video-cards .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.casino-container-box.queen .casino-video-cards .flip-card-back,
.casino-container-box.raceto17 .casino-video-cards .flip-card-back,
.casino-container-box.race20 .casino-video-cards .flip-card-back {
  transform: rotateY(180deg);
}

.casino-container-box.queen .casino-video-cards .flip-card img,
.casino-container-box.raceto17 .casino-video-cards .flip-card img,
.casino-container-box.race20 .casino-video-cards .flip-card img {
  height: 100%;
  width: 100%;
}

.casino-container-box.queen .col-8 > .card > .card-body,
.casino-container-box.raceto17 .col-8 > .card > .card-body,
.casino-container-box.race20 .col-8 > .card > .card-body {
  min-height: 0 !important;
}

.casino-container-box.queen .col-8 > .card.my-bet,
.casino-container-box.raceto17 .col-8 > .card.my-bet,
.casino-container-box.race20 .col-8 > .card.my-bet {
  margin-bottom: 0 !important;
}

/* ---- the shared single-box census: queen (queen + race2) and raceto17 ---- */
.casino-container-box.queen .casino-odd-box-container,
.casino-container-box.raceto17 .casino-odd-box-container {
  width: calc(25% - 7.5px);
  margin-right: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.casino-container-box.queen .casino-odd-box-container:last-child,
.casino-container-box.raceto17 .casino-odd-box-container:last-child {
  margin-right: 0;
}

.casino-container-box.queen .casino-nation-name,
.casino-container-box.raceto17 .casino-nation-name {
  width: 100%;
  text-align: center;
}

.casino-container-box.queen .casino-odds-box,
.casino-container-box.raceto17 .casino-odds-box {
  width: 49%;
}

.casino-container-box.queen .casino-nation-book {
  width: 100%;
  text-align: center;
}

/* ---- race20 ---- */
.casino-container-box.race20 .race-total-point {
  color: #fff;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 5px;
  font-size: 14px;
  background: #404040;
  padding: 5px;
}

.casino-container-box.race20 .race-total-point > div {
  border: 1px solid yellow;
  padding: 5px;
  text-align: center;
  line-height: 1;
  margin-right: 5px;
}

/* The reference carries this pair at `.race20 .flip-card-container` /
   `.race20 .flip-card` (style.css:6376/6380) where the shared plumbing above it
   is the plain global `.flip-card-container` / `.flip-card` — so its override
   wins on specificity. Our copy of the plumbing is page-class rooted
   (0,4,0), so the override has to carry the SAME weight or the shared 40x50
   wins instead: measured on our site 2026-10-06 the race20 cards came out 40x50
   against the reference's 24x30 until these selectors were deepened. */
.casino-container-box.race20 .casino-video-cards .flip-card-container {
  justify-content: flex-start;
}

.casino-container-box.race20 .casino-video-cards .flip-card {
  height: 30px;
  width: 24px;
}

.casino-container-box.race20 .casino-odd-box-container {
  width: calc(25% - 7.5px);
  margin-right: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.casino-container-box.race20 .casino-odd-box-container:last-child {
  margin-right: 0;
}

.casino-container-box.race20 .casino-nation-name {
  width: 100%;
  text-align: center;
}

.casino-container-box.race20 .casino-odds-box {
  width: 49%;
}

.casino-container-box.race20 .casino-nation-name img {
  height: 40px;
  margin-bottom: 5px;
}

.casino-container-box.race20 .casino-table-left-box {
  width: 33%;
  padding: 5px 5px 0 5px;
}

.casino-container-box.race20 .casino-table-left-box .casino-odd-box-container {
  width: 100%;
  align-items: center;
  margin-bottom: 10px;
}

.casino-container-box.race20 .casino-table-left-box .casino-odd-box-container .casino-nation-name,
.casino-container-box.race20 .casino-table-left-box .casino-odd-box-container .casino-odds-box {
  width: 33.33%;
}

.casino-container-box.race20 .casino-table-left-box .casino-odd-box-container > .casino-nation-book {
  width: 66.66%;
  text-align: center;
  margin-left: auto;
  margin-top: 5px;
}

.casino-container-box.race20 .casino-table-right-box {
  width: 66%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 5px 5px 0 5px;
}

.casino-container-box.race20 .casino-table-right-box .casino-odd-box-container {
  width: calc(33.33% - 10px);
}

.casino-container-box.race20 .casino-table-right-box .casino-odd-box-container:nth-child(3n) {
  margin-right: 0;
}

.casino-container-box.race20 .casino-table-right-box .casino-odds-box {
  width: 100%;
}

.casino-container-box.race20 .casino-last-results .result {
  background-color: #d5d5d5;
  border: 1px solid #626262;
}

.casino-container-box.race20 .casino-last-results .result img {
  height: 30px;
}

@media only screen and (max-width: 767px) {
  /* Same fault as the batch-5 header pin: our v9 board base pins
     `.casino-nation-name` to the DESKTOP 16px/24px, while the reference's
     `body { font-size: 12px }` on phones puts every name line at 12px/18px.
     In race20's left box that is two No/Yes rows of 6px each: measured
     2026-10-06 at 390px, TD's left box 380x220 against our 378x232 — exactly
     the 12px, and the whole 24px board delta (TD 390x644, ours 388x668). */
  .casino-container-box.queen .casino-nation-name,
  .casino-container-box.raceto17 .casino-nation-name,
  .casino-container-box.race20 .casino-nation-name {
    line-height: 18px;
  }

  .casino-container-box.queen .casino-table-box {
    padding: 5px;
  }

  .casino-container-box.queen .casino-odd-box-container {
    width: calc(50% - 10px);
  }

  .casino-container-box.queen .casino-odd-box-container:nth-child(2n) {
    margin-right: 0;
  }

  .casino-container-box.race20 .casino-table-box {
    padding: 5px;
  }

  .casino-container-box.race20 .casino-odd-box-container {
    width: calc(50% - 5px);
  }

  .casino-container-box.race20 .casino-odd-box-container:nth-child(2n) {
    margin-right: 0;
  }

  .casino-container-box.race20 .casino-table-left-box {
    width: 100%;
  }

  .casino-container-box.race20 .casino-table-right-box {
    width: 100%;
  }

  .casino-container-box.race20 .casino-video-cards .flip-card {
    height: 20px;
    width: 16px;
  }

  .casino-container-box.race20 .casino-last-results .result img {
    height: 25px;
  }

  .casino-container-box.raceto17 .casino-table-box {
    padding: 5px;
  }

  .casino-container-box.raceto17 .casino-odd-box-container {
    width: calc(50% - 5px);
  }

  .casino-container-box.raceto17 .casino-odd-box-container:nth-child(2n) {
    margin-right: 0;
  }
}

/* ---------------------------------------------------------------------------
   BATCH 7 — Cricket Match 20-20 (cmatch20): the reference's `.cricket20` board,
   ported 2026-10-07 (see docs/casino-cmatch20-chips-and-board.md).

   Every value below was read off the LIVE reference at 1600x1600 with
   tmp-browser/td-cricket20-styles.mjs — not transcribed from the sheet — so
   the port matches what the reference actually computes:

     .casino-table          855x607   display flex, wrap, margin-top 5px
     .cricket20-container   855x585   flex, wrap, justify-content space-between
     .cricket20-left/right  423.5px   width calc(50% - 4px), padding 5px,
                                      background rgb(242,242,242),
                                      box-shadow 0 0 3px #aaa
     .score-box             414x64    margin 30px top / 45px bottom, padding 0,
                                      background score-bg.png 100% 100% centre
     .team-score            414x62    flex, space-between, centre, 10px 20px,
                                      #fff, 14px
     .ball-icon             60x50     absolute, left 50%, top -25px,
                                      translateX(-50%), img 60px
     .blbox                 170x40    absolute, left 50%, bottom -15px,
                                      translateX(-50%), flex centred
     .blbox .casino-odds-box          width 35%, line-height 40px, border 0,
                                      colour #000, min-height 46px (shared base)
     .blbox .casino-odds             18px / bold / line-height 18

   Two deliberate departures from the reference's own text, both measured:
   `background: var(--bg-table-row)` resolves to rgb(242,242,242) on the
   reference, and our theme never defines that variable (the parity sheet uses
   it too, so those rules silently drop) — the literal is used here; and our
   shared `.casino-odds-box` base lives in `.teenpatti1day`, which is why the
   board root below keeps that class (the same way every other bespoke board
   reuses the ported base). Rooted on the page class, COMPOUND, because our page
   root carries `cricket20` on the `.casino-container-box` element itself
   (defect (b) in the batch-6 write-up).
   --------------------------------------------------------------------------- */

.casino-container-box.cricket20 .casino-table {
  display: flex;
  flex-wrap: wrap;
  margin-top: 5px;
}

.casino-container-box.cricket20 .cricket20-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}

.casino-container-box.cricket20 .cricket20-left,
.casino-container-box.cricket20 .cricket20-right {
  width: calc(50% - 4px);
  padding: 5px;
  background: #f2f2f2;
  box-shadow: 0 0 3px #aaa;
}

.casino-container-box.cricket20 .score-box {
  position: relative;
  height: 64px;
  margin-top: 30px;
  margin-bottom: 45px;
  padding: 0;
  background-image: url(../imgs/casino/cricket20/score-bg.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

/* THE LEGACY GLOBAL `.team-score` HAS TO BE UNDONE HERE. public/css/style.css:5004
   carries a bare `.team-score` from the old 20Cricket page — `position:absolute`,
   `left:20%`, `width:50%`, `height:50px`, column flex centred over a 50% black
   wash. It is still live (that sheet loads as #user-styles), so without the
   unset below our panel's score line collapsed to 207x50 at x=380 and the two
   teams' lines OVERLAPPED — measured 2026-10-07 with
   tmp-browser/x-cricket20-board-diff.mjs against the reference's 414x62 at the
   panel's edges. The reference's computed set is pinned below (static, auto
   width/height, row flex, space-between, 10px 20px, 14px white). */
.casino-container-box.cricket20 .team-score {
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  background-color: transparent;
  flex-direction: row;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  color: #fff;
  font-size: 14px;
}

/* The reference's team lines carry `ml-1`/`ml-2` on their two spans and its own
   sheet never defines them — measured `margin-left: 0px` on BOTH spans
   (tmp-browser/x-cricket20-misc-diff.mjs). Our style.css:8603 defines
   `.ml-1 { margin-left: 10px !important }` (and ml-2 elsewhere), so our score
   line was inset 10/8px and the team block measured 96px wide against the
   reference's 78px for identical text. The classes stay in the markup (same as
   the reference); only their local meaning is cancelled here. */
.casino-container-box.cricket20 .team-score .ml-1,
.casino-container-box.cricket20 .team-score .ml-2 {
  margin-left: 0 !important;
}

.casino-container-box.cricket20 .ball-icon {
  position: absolute;
  left: 50%;
  top: -25px;
  height: 50px;
  transform: translateX(-50%);
}

.casino-container-box.cricket20 .ball-icon img {
  height: 60px;
}

.casino-container-box.cricket20 .blbox {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: 50%;
  width: 170px;
  height: 40px;
  transform: translateX(-50%);
  bottom: -15px;
}

/* The reference's `.cricket20 .blbox div` — 35% of the 170px box (59.5px), no
   border (which is what removes the shared base's 1px left rule) and the box's
   40px line-height. */
.casino-container-box.cricket20 .blbox div {
  width: 35%;
  text-align: center;
  color: #000;
  height: 40px;
  line-height: 40px;
  border: 0;
}

.casino-container-box.cricket20 .blbox .casino-odds {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  line-height: 18px;
}

@media only screen and (max-width: 767px) {
  /* The reference's own phone rules (responsive.css:867-905): one column, the
     panels' 30px top margin becomes 0 and their bottom margin grows to 60px,
     and the odds pair drops 10px. */
  .casino-container-box.cricket20 .cricket20-left,
  .casino-container-box.cricket20 .cricket20-right {
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
  }

  .casino-container-box.cricket20 .score-box {
    margin-top: 0;
    margin-bottom: 60px;
  }

  .casino-container-box.cricket20 .blbox {
    bottom: -25px;
  }
}

/* ============================================================================
   BATCH 8 — 1 Card Meter (cmeter1)

   The reference paints TWO DIFFERENT boards for the two slugs that resolve to
   the provider code `cmeter2020`:

     /casino/cmeter   -> `.cmeter`          Low/High card grid (style.css:7381)
     /casino/cmeter1  -> `.one-card-meter`  two Fighter buttons (style.css:8193)

   We aliased both to the Low/High grid, so `cmeter1` rendered an 855x688 grid
   where the reference paints an 855x71 fighter board. `/casino/cmeter` itself
   currently redirects to /casino-list (measured 2026-10-07 — the same "not
   published" state as teen62/baccarat12), so only the `cmeter1` half is
   measurable; the `.cmeter` class is added from the sheet, not the DOM.

   Every rule below is the reference's own, cited. Rooted at
   `.casino-container-box.one-card-meter` (the class our page root carries) so
   it can never reach another game.
   ============================================================================ */

/* Board shell — reference style.css:8193-8210 */
.casino-container-box.one-card-meter .meter-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn {
  width: calc(50% - 2px);
}

.casino-container-box.one-card-meter .meter-btns .meter-btn-box {
  width: 100%;
}

/* The two fighter buttons — reference style.css:8208-8384. The `::after` is the
   3px-bordered plate (red on Fighter A, yellow on Fighter B) and sits at
   z-index -2, behind the button's own `.back` fill; the `:before` is the green
   hover sweep. */
.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-1,
.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-2 {
  transition: all 0.5s;
  position: relative;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 0;
  z-index: 1;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-1 img {
  transform: rotate(90deg);
  height: 40px;
  margin-left: 10px;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-2 img {
  transform: rotate(270deg);
  height: 40px;
  margin-right: 10px;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-1:hover img {
  transition: all 0.5s;
  margin-left: 30px;
  transform: scale(1.5) rotate(90deg);
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-2:hover img {
  transition: all 0.5s;
  margin-right: 30px;
  transform: scale(1.5) rotate(270deg);
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--back, #72bbef);
  border-radius: 0;
  z-index: -2;
  border: 3px solid #e22739;
  box-shadow: 0 0px 6px #c8c8c8;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--back, #72bbef);
  border-radius: 0;
  z-index: -2;
  border: 3px solid #ecc116;
  box-shadow: 0 0px 6px #c8c8c8;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-1:before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: green;
  transition: all 0.3s;
  border-radius: 0;
  z-index: -1;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-2:before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0%;
  height: 100%;
  background-color: green;
  transition: all 0.3s;
  border-radius: 0;
  z-index: -1;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-1:hover,
.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-2:hover {
  color: #fff;
}

.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-1:hover:before,
.casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-2:hover:before {
  width: 100%;
}

/* ---- the live band + the two-card overlay (the lucky7a shape, style.css:4370/4393/4404/4441/4471) ---- */
.casino-container-box.one-card-meter .video-box-container {
  max-width: calc(100% - 220px);
  margin-left: auto;
}

.casino-container-box.one-card-meter .casino-stream-frame {
  position: static;
  inset: auto;
  width: 100%;
  overflow: hidden;
}

.casino-container-box.one-card-meter .casino-stream-stage {
  min-height: 0;
  aspect-ratio: auto;
}

.casino-container-box.one-card-meter .casino-video-cards {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.4);
  height: 85px;
  width: 135px;
  padding: 5px;
  z-index: 2;
  max-width: 220px;
}

.casino-container-box.one-card-meter .casino-video-cards .flip-card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.casino-container-box.one-card-meter .casino-video-cards .flip-card {
  background-color: transparent;
  perspective: 1000px;
  height: 50px;
  width: 40px;
  margin-right: 5px;
}

.casino-container-box.one-card-meter .casino-video-cards .flip-card:last-child {
  margin-right: 0;
}

.casino-container-box.one-card-meter .casino-video-cards .flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
}

.casino-container-box.one-card-meter .casino-video-cards .flip-card-front,
.casino-container-box.one-card-meter .casino-video-cards .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.casino-container-box.one-card-meter .casino-video-cards .flip-card-back {
  transform: rotateY(180deg);
}

.casino-container-box.one-card-meter .casino-video-cards .flip-card img {
  height: 100%;
  width: 100%;
}

/* The reference puts the band and the board back to back (band bottom 509,
   board top 514 — the 5px is the board's own `margin: 5px 0 0`). Our page wraps
   the band in a `.card` whose body carries an inline `min-height: 400px`, which
   leaves 44px of dead space under a 356px band: measured live 2026-10-07, the
   board sat at y=581 against the reference's 514. Neither the floor nor
   `.card.m-b-10`'s margin exists in the reference, and both are inline /
   !important, hence !important here. Scoped to the direct children of the
   cmeter1 column so it can never reach the sidebar's own `.card.m-b-10.my-bet`,
   which shares the class list but lives in `.col-4`. */
.casino-container-box.one-card-meter .col-8 > .card > .card-body {
  min-height: 0 !important;
}

.casino-container-box.one-card-meter .col-8 > .card.my-bet {
  margin-bottom: 0 !important;
}

/* reference responsive.css:3104 (768-1199) and :3676 (1200-1599) */
@media only screen and (min-width: 768px) and (max-width: 1199px) {
  .casino-container-box.one-card-meter .casino-video-cards {
    height: 75px;
    width: 120px;
  }
}

@media only screen and (min-width: 1200px) and (max-width: 1599px) {
  .casino-container-box.one-card-meter .casino-video-cards {
    height: 75px;
    width: 120px;
  }
}

/* reference responsive.css:1266-1290 (<=767px): the buttons stack and the
   arrows flip so they still point at the top card */
@media only screen and (max-width: 767px) {
  .casino-container-box.one-card-meter .video-box-container {
    max-width: 100%;
  }

  .casino-container-box.one-card-meter .meter-btns .meter-btn {
    width: 100%;
  }

  .casino-container-box.one-card-meter .meter-btns .meter-btn:not(:last-child) {
    margin-bottom: 20px;
  }

  .casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-1 img {
    transform: rotate(180deg);
  }

  .casino-container-box.one-card-meter .meter-btns .meter-btn .btn-fighter-2 img {
    transform: rotate(0);
  }

  .casino-container-box.one-card-meter .casino-video-cards {
    height: 42px;
    width: 70px;
  }

  .casino-container-box.one-card-meter .casino-video-cards .flip-card {
    height: 20px;
    width: 16px;
  }
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .casino-container-box.one-card-meter .casino-video-cards .flip-card {
    height: 40px;
    width: 32px;
  }
}

@media only screen and (min-width: 1400px) and (max-width: 1599px) {
  .casino-container-box.one-card-meter .casino-video-cards .flip-card {
    height: 45px;
    width: 36px;
  }
}

/* ============================================================================
   BATCH 9 — Baccarat (baccarat)

   The reference paints a TWO-ROW odds board beside a Statistics pie. Ours was
   GenericCasino's flat nine-row market list, with the main odds (Player,
   Banker, Tie, …) ABOVE the other odds — the reverse of the reference, whose
   markup (read off the app's own React props, 2026-10-07) is:

     .casino-table-full-box
       .baccarat-graph.text-center        18%    Statistics + PieChart (160px)
       .baccarat-odds-container           80%
         .baccarat-other-odds             682x76   Perfect Pair / Big / Small
                                                    / Either Pair (4 x 24%)
         .baccarat-main-odds.mt-3         682x88   Player Pair 16%+1%,
                                                    Player/Tie/Banker 22% each,
                                                    Banker Pair 16%+1%

   Measured geometry at 1600: `.casino-table` 855x185, `.baccarat-graph`
   154x184, `.baccarat-odds-container` 682x180, other-odds 682x76 (four
   164x58 boxes), main-odds 682x88 (70px boxes), each container followed by the
   18px `.casino-nation-book`. Box heights are 58 = 5+24+24+5 (padding + two
   24px spans) and 70 (fixed) respectively — which is why the ROW heights are
   76 and 88 and not 58 and 70.

   Every rule below is the reference's own (style.css:5610-5790) with two
   spelling changes, both required:

     * `--bg-secondary` / `--text-secondary` are NOT defined by our theme
       (`--bg-secondary85` is a different variable, and our `--text-secondary`
       is a DARK slate — see casino-markets-rules-v9.css:306). The reference
       computes `rgb(44,62,80)` / `#fff` for this box, so the literals are used,
       the same way batch 7 spelled out `--bg-table-row`.
     * the four bare selectors the reference declares globally
       (`.baccarat-odds-container`, `.player-pair-box-container`,
       `.player-box-container`/`.tie-box-container`/`.banker-box-container`,
       `.banker-pair-box-container`) are rooted on the page class here so they
       can never reach another game.

   Rooted COMPOUND at `.casino-container-box.baccarat` because our page root
   carries `baccarat` on the `.casino-container-box` element itself, and the
   board root keeps `teenpatti1day`, which is where the shared `.casino-odds-box`
   / `.casino-nation-book` bases live.
   ============================================================================ */

.casino-container-box.baccarat .casino-table {
  display: flex;
  flex-wrap: wrap;
  margin-top: 5px;
}

/* reference style.css:5610 */
.casino-container-box.baccarat .casino-table-full-box {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

/* reference style.css:5618 / 5622 — 18% + 80% of the full box */
.casino-container-box.baccarat .baccarat-graph {
  width: 18%;
}

/* The panel is exactly h4 + 160px chart on the reference (154x184 measured,
   and 388x179 on a phone where the h4 drops to 16px). Bootstrap's own h4
   margin-bottom would add 8px, so it is zeroed here — the reference has none
   (its h4 box and the chart div are vertically adjacent: 516..540..700). */
.casino-container-box.baccarat .baccarat-graph h4 {
  margin-bottom: 0;
  line-height: 1.2;
}

.casino-container-box.baccarat .baccarat-odds-container {
  width: 80%;
}

/* reference style.css:5626 / 5634 / 5638 — the OTHER-odds row, which sits
   ABOVE the main row. Four 24% containers, `space-between` supplying the gaps
   (measured 9px between 164px boxes at 1600). */
.casino-container-box.baccarat .baccarat-other-odds {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.casino-container-box.baccarat .baccarat-other-odd-box-container {
  width: 24%;
}

/* Baccarat 2 (`baccarat12`, public route /casino/baccarat2) carries FIVE other
   boxes — Score 1-4 / 5-6 / 7 / 8 / 9 — where baccarat has four. The reference
   sizes them at 19% (style.css:5822 `.baccarat.baccarat2
   .baccarat-other-odd-box-container`), which is what fits five across the
   682px container with `space-between`'s gaps. Measured 2026-10-29 on
   /casino/baccarat2: five 130x76 containers from x=457 to x=1139. */
.casino-container-box.baccarat2 .baccarat-other-odd-box-container {
  width: 19%;
}

/* The drawn third card is fanned out of the hand and rotated — the reference's
   own rules (style.css:5799-5812), used by the live board AND the result dialog
   (`<img class="l-rotate">` / `<img class="r-rotate">`). */
.l-rotate,
.r-rotate {
  margin-left: 5px !important;
  margin-right: 10px !important;
}
.l-rotate > img,
img.l-rotate {
  transform: rotate(270deg);
}
.r-rotate > img,
img.r-rotate {
  transform: rotate(90deg);
}

.casino-container-box.baccarat .baccarat-other-odd-box {
  background-color: #2c3e50;
  color: #fff;
  text-align: center;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* The box has NO height on the reference — it is 5 + two text lines + 5, and
     the text inherits the reference's body metrics (measured: 16px/24px at
     1600 giving 58px, and 11px/16.5px at <=1199 giving 43px). Our body is
     13px/19.5px, which made the box 49px and every row 9px short, so the two
     values are spelled out. */
  font-size: 16px;
  line-height: 1.5;
}

/* reference style.css:5650 — the main row, `mt-3` = 16px below the other row */
.casino-container-box.baccarat .baccarat-main-odds {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  margin-top: 16px;
}

/* reference style.css:5658 / 5663 / 5677 / 5685 — Player Pair, 16% + 1% gap,
   the left half of the rounded pill. */
.casino-container-box.baccarat .player-pair-box-container {
  width: 16%;
  margin-right: 1%;
}

.casino-container-box.baccarat .player-pair-box {
  background-color: #086cb8;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  text-align: left;
  color: #fff;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  flex-direction: column;
}

.casino-container-box.baccarat .player-pair-box.suspended-box:after {
  border-radius: 30px 0 0 30px;
  -webkit-border-radius: 30px 0 0 30px;
  -moz-border-radius: 30px 0 0 30px;
  -ms-border-radius: 30px 0 0 30px;
  -o-border-radius: 30px 0 0 30px;
}

.casino-container-box.baccarat .player-pair-box > div {
  line-height: 1;
}

/* reference style.css:5689 / 5695 / 5702 / 5708 — Player / Tie / Banker, 22%
   each, height 70. Player and Banker carry the dealt cards (20px, 10px gutter). */
.casino-container-box.baccarat .player-box-container,
.casino-container-box.baccarat .tie-box-container,
.casino-container-box.baccarat .banker-box-container {
  width: 22%;
}

.casino-container-box.baccarat .player-box {
  background-color: #086cb8;
  color: #fff;
  padding: 10px;
  height: 70px;
}

.casino-container-box.baccarat .player-box > div {
  line-height: 1;
  display: flex;
  flex-wrap: wrap;
}

.casino-container-box.baccarat .player-box img,
.casino-container-box.baccarat .banker-box img {
  height: 20px;
  margin-right: 10px;
  z-index: 1;
}

/* reference style.css:5723 / 5733 */
.casino-container-box.baccarat .tie-box {
  background-color: #279532;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  flex-direction: column;
  height: 70px;
}

.casino-container-box.baccarat .tie-box > div {
  line-height: 1;
}

/* reference style.css:5737 / 5752 — Banker */
.casino-container-box.baccarat .banker-box {
  background-color: #ae2130;
  color: #fff;
  padding: 10px;
  height: 70px;
}

.casino-container-box.baccarat .banker-box > div {
  line-height: 1;
  display: flex;
  flex-wrap: wrap;
}

/* reference style.css:5764 / 5769 / 5783 / 5791 — Banker Pair, the right half of
   the rounded pill (16% + 1% gap on the left). */
.casino-container-box.baccarat .banker-pair-box-container {
  width: 16%;
  margin-left: 1%;
}

.casino-container-box.baccarat .banker-pair-box {
  background-color: #ae2130;
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  text-align: left;
  color: #fff;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  height: 70px;
}

.casino-container-box.baccarat .banker-pair-box.suspended-box:after {
  border-radius: 0 30px 30px 0;
  -webkit-border-radius: 0 30px 30px 0;
  -moz-border-radius: 0 30px 30px 0;
  -ms-border-radius: 0 30px 30px 0;
  -o-border-radius: 0 30px 30px 0;
}

.casino-container-box.baccarat .banker-pair-box > div {
  line-height: 1;
}

/* reference responsive.css:524-537 (<=767px): the graph goes full width above
   the odds, and the dealt cards shrink. */
@media only screen and (max-width: 767px) {
  .casino-container-box.baccarat .baccarat-graph {
    width: 100%;
    margin-bottom: 10px;
  }

  /* measured 390x844: h4 388x19 at 16px/19.2, chart div 388x160 */
  .casino-container-box.baccarat .baccarat-graph h4 {
    font-size: 16px;
    line-height: 1.2;
  }

  .casino-container-box.baccarat .baccarat-odds-container {
    width: 100%;
  }

  .casino-container-box.baccarat .player-box img,
  .casino-container-box.baccarat .banker-box img {
    height: 15px;
    margin-right: 4px;
  }
}

/* reference responsive.css:2724 (<=1199px) and :2880 (<=374px) */
@media only screen and (max-width: 1199px) {
  .casino-container-box.baccarat .baccarat-other-odd-box {
    font-size: 11px;
    line-height: 1.5;
  }
}

@media only screen and (max-width: 374px) {
  .casino-container-box.baccarat .baccarat-other-odd-box {
    font-size: 10px;
  }
}

/* ============================================================================
   BATCH 10 — Lottery Card (lottcard)

   Every rule below is the reference's own (d247's sheets — same platform, same
   CSS as tridevexch — read 2026-10-08 while tridevexch was behind Cloudflare's
   "under attack" interstitial), cited by line. Four declarations were spelled
   out as literals because our theme does not define the variable they use:

     --table-border   #c7c8ca   (our style.css never defines it; the reference
                                 does, style-d247.css:28, and the board computes
                                 rgb(199,200,202))
     --bg-sidebar     #ccc      (nav pill at rest; computed rgb(204,204,204))
     --text-sidebar   #000      (computed rgb(0,0,0))
     --bg-secondary   #2c3e50   (active pill + the pill's right border)
     --text-secondary #fff      (active pill text, Random-Bets text) — note OUR
                                 --text-secondary is a dark slate, so it cannot
                                 be used here
     --bg-secondary70 rgba(44,62,80,.7)   Random-Bets panel
     --bg-primary90/65 rgba(0,136,204,.9)/rgba(0,136,204,.65)  Random-Bets button
     --bg-info        #097c93   Repeat/Clear/Remove

   Rooted at `.casino-container-box.lottery` (the page class our root carries)
   so it can never reach another game. The `.single`/`.double`/`.tripple` pane
   classes ARE the reference's own selectors and are load-bearing, not cosmetic.
   ============================================================================ */

/* reference style.css:7844 */
.casino-container-box.lottery .casino-table {
  background-color: #c7c8ca;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 5px 0 0;
  /* the reference inherits its body metrics (16px/24px); ours is 13px/19.5px */
  font-size: 16px;
  line-height: 1.5;
}

/* reference style.css:1659-1688 — the nav pills. Bootstrap 4 (which we load)
   styles `.nav-pills .nav-link` itself, so these are the reference's overrides
   of exactly that rule, reproduced. */
.casino-container-box.lottery .nav-pills .nav-link {
  background-color: #ccc;
  color: #000;
  border-radius: 0;
  border-right: 1px solid #2c3e50;
  font-weight: 500;
  font-size: 16px;
  text-align: center;
  line-height: 1;
  cursor: pointer;
}

.casino-container-box.lottery .nav-pills .nav-item:last-child .nav-link {
  border-right: 0;
}

.casino-container-box.lottery .nav-pills .nav-link.active,
.casino-container-box.lottery .nav-pills .show > .nav-link {
  background-color: #2c3e50;
  color: #fff;
}

/* reference style.css:7848 — the three panes (Single / Double / Tripple) */
.casino-container-box.lottery .single,
.casino-container-box.lottery .double,
.casino-container-box.lottery .tripple {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  height: auto;
  align-items: flex-start;
  padding: 5px;
}

/* reference style.css:7859 */
.casino-container-box.lottery .lottery-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  padding: 0;
  width: 100%;
}

/* reference style.css:7869 — 10 cards at 10%, one row of 847px at 1600 */
.casino-container-box.lottery .lottery-box .lottery-card {
  width: 10%;
  text-align: center;
  margin: 5px 0;
}

/* reference style.css:7875 */
.casino-container-box.lottery .lottery-box .lottery-card img {
  width: 55px;
  cursor: pointer;
}

/* reference style.css:7922 — the Random-Bets denomination buttons */
.casino-container-box.lottery .lottery-btn.active {
  border: 1px solid rgba(0, 136, 204, 0.9);
  background-color: rgba(0, 136, 204, 0.65);
  color: #fff;
}

/* reference style.css:7928-7950 */
.casino-container-box.lottery .random-bets {
  width: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background-color: rgba(44, 62, 80, 0.7);
  color: #fff;
  border-radius: 16px;
  padding: 5px;
  margin: 10px auto 0;
}

.casino-container-box.lottery .random-bets h4 {
  font-size: 16px;
}

.casino-container-box.lottery .random-bets button {
  min-width: 50px;
  height: 40px;
  margin-right: 7px;
  margin-bottom: 7px;
  border-radius: 8px;
}

/* reference style.css:7952-7964 — Repeat / Clear / Remove. Bootstrap's
   `d-xl-none` hides the trio from 1200px up on its own. */
.casino-container-box.lottery .lottery-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 5px;
}

.casino-container-box.lottery .lottery-buttons .btn {
  background: #097c93;
  color: #fff;
  width: 30%;
  font-size: 18px;
}

/* WHY THIS NEEDS !important — our THEME redefines the bootstrap utility.

   diamond-theme.css:1577-1585 (loaded AFTER this sheet) declares, for the phone
   header's search row:

     @media (min-width: 1200px)   { .d-xl-none { display: none !important } }
     @media (max-width: 1199.98px){ .d-xl-none { display: block !important } }

   Bootstrap's own `d-xl-none` only HIDES at >=1200 and otherwise leaves the
   element's display alone, which is what the reference's markup relies on: its
   `.lottery-buttons` carries the class and is `display: flex` below 1200. The
   theme's global block shim therefore wins over the reference's own rule (it is
   `!important`, so it beats any specificity) and the trio came out left-aligned
   — measured 2026-10-08 at 390: our buttons at x 6/119/233 against the
   reference's 5/138/271, i.e. `display: flex` never applied.

   Scoped to this game's board and to <=1199.98px so nothing else that uses
   `d-xl-none` (the header search row, the match lists) is touched; from 1200px
   up the theme's hide still applies and matches the reference. The blunt shim
   itself is a latent hazard for any future board that copies the reference's
   own markup — worth a sweep of its own (the tracker already carries the
   "legacy/global CSS leaking into bespoke boards" item). */
@media only screen and (max-width: 1199.98px) {
  .casino-container-box.lottery .lottery-buttons {
    display: flex !important;
  }
}

/* reference style.css:7966-7990 — the Lottery strip's own chip shape. One
   `.lottery-result-group` pill per past round (44x34 at 1600: padding 5 + a 24px
   line box), each holding that round's numbers as plain `.lottery-result-icon`
   divs — NOT the shared `span.result` green circle.

   Both colours are spelled out, and that is not cosmetic. The reference declares
   both in its global `:root` (`--bg-secondary85: #2c3e50d9`, `--text-secondary:
   #fff`), but OUR sheets only define `--bg-secondary85` inside
   `.matka.worli, .worli.matka` (casino-markets.css:31 and
   casino-markets-rules-v9.css:39) — so `var(--bg-secondary85)` resolves to
   nothing for every other game and the pill painted transparent. That was caught
   by measuring the same markup under both sheet stacks
   (tmp-browser/x-lottcard-static-css.mjs): ours computed
   `background-color: rgba(0, 0, 0, 0)` against the reference's
   `rgba(44, 62, 80, 0.85)`. Our `--text-secondary` is a dark slate where the
   reference computes #fff, so it is spelled for the same reason it was in the
   baccarat block. */
.casino-container-box.lottery .casino-last-results .lottery-result-group {
  padding: 5px;
  margin-right: 5px;
  background-color: #2c3e50d9;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 5px;
}

.casino-container-box.lottery .casino-last-results .lottery-result-icon {
  margin-right: 5px;
}

.casino-container-box.lottery .casino-last-results .lottery-result-icon:last-child {
  margin-right: 0;
}

/* ---- the live band + its three-card overlay (style.css:4370/4393/4404/4441/4471)

   The reference's overlay for this game is a VERTICAL stack: one wrapper div per
   dealt card, the first bare and the rest `.mt-1`, each holding a
   `.flip-card-container` with a single 40x50 `.flip-card` (front+back). The base
   `.casino-video-cards` (absolute, top-left, bg rgba(0,0,0,.4), padding 5px,
   height auto) therefore measures 50x168 at 1600 and 26x78 at 390 (3x20 + 2x4
   + 10) — no width/height needs pinning, unlike cmeter1's two-card strip. */

/* reference style.css:4370 — the band reserves 220px on its left, so the stream
   itself is 16:9 of (100% - 220px): 637x358 in a 857px column. Our `.casino-video`
   was full width and 480px tall, which pushed the board 122px below the
   reference's (measured 2026-10-08: board top MG 653 vs TD 515). Same rule
   cmeter1 / lucky7a / roulette already carry. */
.casino-container-box.lottery .video-box-container {
  max-width: calc(100% - 220px);
  margin-left: auto;
}

.casino-container-box.lottery .casino-stream-frame {
  position: static;
  inset: auto;
  width: 100%;
  overflow: hidden;
}

.casino-container-box.lottery .casino-stream-stage {
  min-height: 0;
  aspect-ratio: auto;
}

.casino-container-box.lottery .casino-video-cards {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.4);
  height: auto;
  padding: 5px;
  z-index: 2;
}

.casino-container-box.lottery .casino-video-cards .flip-card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.casino-container-box.lottery .casino-video-cards .flip-card {
  background-color: transparent;
  perspective: 1000px;
  height: 50px;
  width: 40px;
  margin-right: 5px;
}

.casino-container-box.lottery .casino-video-cards .flip-card:last-child {
  margin-right: 0;
}

.casino-container-box.lottery .casino-video-cards .flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
}

.casino-container-box.lottery .casino-video-cards .flip-card-front,
.casino-container-box.lottery .casino-video-cards .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.casino-container-box.lottery .casino-video-cards .flip-card-back {
  transform: rotateY(180deg);
}

.casino-container-box.lottery .casino-video-cards .flip-card img {
  height: 100%;
  width: 100%;
}

/* The reference puts the band and the board back to back (video bottom 509,
   board top 514 — the 5px is the board's own `margin: 5px 0 0`). Our page wraps
   the band in a `.card` whose body carries an inline `min-height: 400px`, which
   leaves dead space under a 357px band; neither the floor nor
   `.card.m-b-10`'s margin exists in the reference and both are inline /
   !important. This is the same fix lucky7a / cmeter1 / baccarat needed — see the
   notes in those blocks. Scoped to the direct children of the column so it can
   never reach the sidebar's own `.card.m-b-10.my-bet` (which shares the class
   list but lives in `.col-4`). */
.casino-container-box.lottery .col-8 > .card > .card-body {
  min-height: 0 !important;
}

.casino-container-box.lottery .col-8 > .card.my-bet {
  margin-bottom: 0 !important;
}

/* reference responsive.css:976-1022 (<=767px) — the cards wrap to two rows of
   5, the Repeat/Clear/Remove trio becomes full width, and the tab bar spreads */
@media only screen and (max-width: 767px) {
  .casino-container-box.lottery .lottery-box .lottery-card {
    width: 20%;
  }

  .casino-container-box.lottery .lottery-buttons {
    width: 100%;
    padding: 5px;
  }

  .casino-container-box.lottery .casino-last-results {
    padding: 5px;
    margin-top: 5px;
  }

  /* reference responsive.css:1001-1010 — five pills per row on a phone (the
     strip measures 390x76: two rows of 5, each 34 + 5 margin) */
  .casino-container-box.lottery .casino-last-results .lottery-result-group {
    width: calc(20% - 5px);
  }

  .casino-container-box.lottery .casino-table .nav {
    width: 100%;
  }

  .casino-container-box.lottery .casino-table .nav .nav-item {
    flex: auto;
  }

  .casino-container-box.lottery .casino-video-cards .flip-card {
    height: 20px;
    width: 16px;
  }

  /* reference responsive.css:312 — the band goes full width on a phone */
  .casino-container-box.lottery .video-box-container {
    max-width: 100%;
  }
}

/* reference responsive.css:3327 (1200-1399) and :3579 (1400-1599) — the two
   global `.flip-card` steps below the 1600 base of 40x50. */
@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .casino-container-box.lottery .casino-video-cards .flip-card {
    height: 40px;
    width: 32px;
  }
}

@media only screen and (min-width: 1400px) and (max-width: 1599px) {
  .casino-container-box.lottery .casino-video-cards .flip-card {
    height: 45px;
    width: 36px;
  }
}

/* ---------------------------------------------------------------------------
   Trio — ported from the reference's own `.trio` block (style.css:6564-6595,
   responsive.css:718-742) and measured live 2026-10-24 at 1600 and 390 with
   tmp-browser/td-board-metrics-3games.mjs.

     .casino-table          855x296   three `.casino-table-box` rows, 88 tall,
                                      16px apart (the markup's own `mt-3`)
     row 1 cells            274x88    width calc(33.33% - 10px), margin-right 10
     row 2 `.triocards`     205x88    width calc(25% - 7.5px)
     row 3 `.trioodds`      160x88    width calc(20% - 10px)
     .casino-odds-box        49%      inside a cell (100% on the trioodds row,
                                      which is back-only and has no lay box)
     .casino-nation-name     24px     16px / bold, centred
     .casino-volume          80/100   only the Session row carries it (the
                                      provider's bbhav/lbhav), 12px / 100

   At 390 the reference wraps: rows get 5px padding, triocards becomes 2x2
   (calc(50% - 3px), 10px bottom margin), trioodds 3 per row at
   calc(33.33% - 4px) with its last row CENTRED, and names drop to 11px.
   Rooted on the page class, COMPOUND — our container element carries `trio`.
   --------------------------------------------------------------------------- */

.casino-container-box.trio .casino-table-box {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.casino-container-box.trio .casino-odd-box-container {
  width: calc(33.33% - 10px);
  margin-right: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.casino-container-box.trio .casino-nation-name {
  width: 100%;
  text-align: center;
}

.casino-container-box.trio .casino-odds-box {
  /* cancels the teenpatti1day base 20% */
  width: 49%;
}

.casino-container-box.trio .casino-odd-box-container:last-child {
  margin-right: 0;
}

.casino-container-box.trio .triocards .casino-odd-box-container {
  width: calc(25% - 7.5px);
}

.casino-container-box.trio .trioodds .casino-odd-box-container {
  width: calc(20% - 10px);
}

.casino-container-box.trio .trioodds .casino-odds-box {
  width: 100%;
}

@media only screen and (max-width: 767px) {
  .casino-container-box.trio .casino-table-box {
    padding: 5px;
  }

  .casino-container-box.trio .casino-odd-box-container {
    width: calc(33.33% - 4px);
    margin-right: 5px;
  }

  .casino-container-box.trio .triocards .casino-odd-box-container {
    width: calc(50% - 3px);
    margin-bottom: 10px;
  }

  .casino-container-box.trio .triocards .casino-odd-box-container:nth-child(2n) {
    margin-right: 0;
  }

  .casino-container-box.trio .trioodds .casino-odd-box-container {
    width: calc(33.33% - 4px);
    margin-bottom: 10px;
  }

  .casino-container-box.trio .trioodds .casino-odd-box-container:nth-child(3n) {
    margin-right: 0;
  }

  .casino-container-box.trio .casino-table-box.trioodds {
    justify-content: center;
  }

  .casino-container-box.trio .casino-nation-name {
    font-size: 11px;
    /* the v9 desktop rule pins 24px; the reference's name line-height is
       always 1.5x its font (11px -> 16.5px at 390), and the fixed 24px made
       every trio cell 88 tall against TD's 81. */
    line-height: 16.5px;
  }
}

/* Trio's live-stream strip: ONE label-less `.flip-card-container` of three
   40x50 cards on a 5px pitch (`1.jpg` backs until the deal). The generic
   Tp1Day strip spaces the cards with `space-between` and a 3px margin, which
   blew the box up to 142x60 against the reference's 140x60; at 390 its cards
   are 16x20 on the same 5px pitch, not 18x22. Measured live 2026-10-24 with
   tmp-browser/td-trio-stream.mjs (14 samples). */
.casino-container-box.trio .casino-video-cards .flip-card-container {
  justify-content: flex-start;
  /* Tp1Day adds `gap: 3px` on top of the card margin; the reference's pitch is
     exactly 5px (40+5 desktop, 16+5 at 390), so the gap has to go. */
  gap: 0;
}

.casino-container-box.trio .casino-video-cards .flip-card {
  margin-right: 5px;
}

.casino-container-box.trio .casino-video-cards .flip-card:last-child {
  margin-right: 0;
}

@media only screen and (max-width: 767px) {
  .casino-container-box.trio .casino-video-cards .flip-card {
    width: 16px;
    height: 20px;
  }
}

/* ---------------------------------------------------------------------------
   1 CARD 20-20 (teen120) — the reference's `.onecard20` block
   (style.css:6738-6768, responsive.css:826-836), measured live 2026-10-24
   (tmp-browser/td-teen120-colors.mjs):

     .casino-table-full-box       855x94  flex, wrap, padding 4, border 0
     .onecard20oddbox             243x86  margin-right 8
       .casino-odds (price)        18 tall 18px/18 bold, centred
       .casino-odds-box          243x46  margin 2px 0, padding 6, 18px label
       .casino-nation-book        18 tall
     .onecard20player/dealer/pair  width calc(29% - 3px)
     .onecard20tie                 width calc(13% - 15px)
     .onecard20pair                margin-right 0; 5px left divider
                                   (rgb(4,112,165) = the reference's
                                   --bg-secondary) + 8px left padding

   The PRICE sits on the line above the cell and the cell text is always the
   market NAME — sampled through a whole round (td-teen120-states.mjs): the
   suspended state only adds `.suspended-box` and zeroes the price, it never
   swaps the label for odds. At 390 the cells are 29% - 7 / 13% - 4 with a 6px
   right margin.
   --------------------------------------------------------------------------- */

.casino-container-box.onecard20 .casino-table-full-box {
  display: flex;
  flex-wrap: wrap;
  padding: 4px;
  border: 0;
}

.casino-container-box.onecard20 .onecard20player,
.casino-container-box.onecard20 .onecard20dealer,
.casino-container-box.onecard20 .onecard20pair {
  width: calc(29% - 3px);
}

.casino-container-box.onecard20 .casino-odds-box {
  /* the base `teenpatti1day .casino-odds-box` is 20% wide */
  width: 100%;
  margin: 2px 0;
  padding: 6px;
}

.casino-container-box.onecard20 .onecard20oddbox {
  margin-right: 8px;
}

.casino-container-box.onecard20 .onecard20tie {
  width: calc(13% - 15px);
}

.casino-container-box.onecard20 .onecard20pair {
  margin-right: 0;
  border-left: 5px solid var(--g-bg-secondary, #2c3e50);
  padding-left: 8px;
}

/* teen120's live-stream overlay follows the reference's `.onecard20` rules, not
   the Tp1Day ones the alias would pick: tridevexch's `.casino-video-cards` is
   67x161 at 1600 (padding 5, h5 18px/1.2, 40x50 flip-card) and 48x82 at 390
   (h5 12px/1, 16x20 flip-card). Its Dealer group ALSO carries `mt-1` on the
   `.flip-card-container`, which is the 4px between the label and the back.
   Measured live 2026-10-24 with tmp-browser/td-teen120-stream.mjs. */
@media only screen and (min-width: 768px) {
  .casino-container-box.onecard20 .casino-video-cards h5 {
    font-size: 18px;
    line-height: 1.2;
    margin: 0;
  }
}

.casino-container-box.onecard20 .casino-video-cards > .mt-1 .flip-card-container {
  margin-top: 4px;
}

@media only screen and (max-width: 767px) {
  .casino-container-box.onecard20 .onecard20oddbox {
    margin-right: 6px;
  }

  .casino-container-box.onecard20 .casino-video-cards h5 {
    font-size: 12px;
    line-height: 1;
    margin: 0;
  }

  .casino-container-box.onecard20 .casino-video-cards .flip-card {
    width: 16px;
    height: 20px;
  }

  .casino-container-box.onecard20 .onecard20player,
  .casino-container-box.onecard20 .onecard20dealer,
  .casino-container-box.onecard20 .onecard20pair {
    width: calc(29% - 7px);
  }

  .casino-container-box.onecard20 .onecard20tie {
    width: calc(13% - 4px);
  }

  /* the reference shrinks the in-box market label with the board at 390:
     `.onecard20oddbox .casino-odds-box` computes 12px/18px, not the desktop
     16px/24px (measured live 2026-10-24). The price above it stays 14px. */
  .casino-container-box.onecard20 .casino-odds-box {
    font-size: 12px;
    line-height: 18px;
  }
}

/* ---------------------------------------------------------------------------
   Note Number (notenum) — ported from the reference's own `.note-number` block
   (style.css:6731-6801, responsive.css:784-820) and measured live 2026-10-24
   with tmp-browser/nt-ref.mjs + tmp-browser/nt-style.mjs:

     .casino-table                    855x421
     row 1 .casino-table-box          855x228   padding-right 4
       .casino-odd-box-container-box  855/3-10 = 274x218
         .casino-odd-box-container    274x99    two per box, name 30 + mb 5
                                                + back/lay 46 each + book 18,
                                                margin-bottom 10 on BOTH
       (so the box is 99+10+99+10 = 218 and the row 218+10 = 228)
     row 2 .casino-table-box.mt-3     855x177
       .casino-table-left-box         281x177   33%, padding 5 5 0, mb 10 on
                                                each 269x75 Baccarat container
       .casino-table-right-box        562x113   66%, ten .card-odd-box 46x102
     name                            16/24 bold centred, 30px `single/` sprites
                                     with a 5px right margin
     .casino-odds-box                 49% inside a cell; 100% in the Baccarat
                                     containers and in the card grid
     @390                             row 1 stacks: each box 380x206, each
                                     container 380x93 (the reference's
                                     `z .note-number …` is an invalid selector,
                                     so the container stays 100%);
                                     row 2 = left 380x86 + right 380x93,
                                     names 12/18, sprites 24px/2px, cards 32x82
                                     with 45px art, odds 14/14
   --------------------------------------------------------------------------- */

.casino-container-box.note-number .casino-odd-box-container-box {
  width: calc(33.33% - 10px);
  margin: 0 10px 10px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.casino-container-box.note-number .casino-odd-box-container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
}

.casino-container-box.note-number .casino-nation-name {
  width: 100%;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 5px;
}

.casino-container-box.note-number .casino-nation-name img {
  height: 30px;
  margin-right: 5px;
}

.casino-container-box.note-number .casino-odds-box {
  /* cancels the teenpatti1day base 20% */
  width: 49%;
  text-align: center;
}

.casino-container-box.note-number .casino-table-left-box {
  width: 33%;
  padding: 5px 5px 0;
  border-bottom: 1px solid var(--g-table-border, #c7c8ca);
}

.casino-container-box.note-number .casino-table-left-box .casino-odd-box-container {
  width: 100%;
}

.casino-container-box.note-number .casino-table-left-box .casino-odds-box {
  width: 100%;
}

.casino-container-box.note-number .casino-table-right-box {
  width: 66%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  padding: 5px 5px 0;
  border-bottom: 1px solid var(--g-table-border, #c7c8ca);
}

.casino-container-box.note-number .card-odd-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  flex-direction: column;
  align-items: center;
  margin: 0 4px 4px 0;
  cursor: pointer;
}

.casino-container-box.note-number .card-odd-box .casino-odds {
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 14px;
}

.casino-container-box.note-number .card-odd-box img {
  height: 65px;
}

@media only screen and (max-width: 767px) {
  .casino-container-box.note-number .casino-table-box {
    padding: 5px;
  }

  .casino-container-box.note-number .casino-odd-box-container-box {
    width: 100%;
    margin-right: 0;
  }

  .casino-container-box.note-number .casino-nation-name {
    font-size: 12px;
    line-height: 18px;
  }

  .casino-container-box.note-number .casino-nation-name img {
    height: 24px;
    margin-right: 2px;
  }

  .casino-container-box.note-number .casino-table-left-box {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }

  .casino-container-box.note-number .casino-table-left-box .casino-odd-box-container {
    width: calc(50% - 5px);
  }

  .casino-container-box.note-number .casino-table-right-box {
    width: 100%;
    justify-content: center;
  }

  .casino-container-box.note-number .card-odd-box img {
    height: 45px;
  }

  .casino-container-box.note-number .casino-odds {
    font-size: 14px;
    line-height: 14px;
  }
}

/* Note Number's live-stream overlay: the reference stacks SIX single-card
   wrappers vertically (the first bare, the rest `.mt-1`), 40x50 on a 4px pitch
   inside a 50px box — 50x330 at 1600 — and 16x20 cards in a 26x150 box at 390.
   Every other Tp1Day game uses the 18x22 phone card, so this is scoped here.
   Measured live 2026-10-24 (tmp-browser/nt-ref.mjs, two rounds). */
@media only screen and (max-width: 767px) {
  .casino-container-box.note-number .casino-video-cards .flip-card {
    width: 16px;
    height: 20px;
  }
}

/* ---------------------------------------------------------------------------
   Lottery Card (lottcard) RULES dialog — the provider's tabbed body.
   Measured live 2026-10-24 (tmp-browser/lottcard-rules-box.mjs), dialog
   800x426 at (400,24): header 50, body 800x376 with padding 10 → 780 wide.
     nav-pills .nav-link        68/75 x 32   padding 8 16, 16/16, radius 0
       active                  bg rgb(4,112,165), white text
       inactive                bg rgb(204,204,204)
     .tab-content             780x320      margin-top 4
     .lottery-rules-row       778x101      flex (Tripple 116 when its note
                                           wraps to three lines)
     .lottery-rules-title-name 156x100     padding 5, centred column;
                                           22/33 title over 16/24 note
     .lottery-rules-cards     622x100      flex centre, padding 10 0
     .lottery-card            40x80        margin-right 5; 40x56 image over a
                                           40x24 digit label
   Rooted on `.game-rules-lottcard`, the class CasinoRulesDetail adds for this
   slug, so none of it can leak into another game's dialog.
   --------------------------------------------------------------------------- */

.game-rules-lottcard .modal-body {
  padding: 10px;
}

.game-rules-lottcard .lottery-rules .nav-pills {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.game-rules-lottcard .lottery-rules .nav-item {
  display: block;
}

.game-rules-lottcard .lottery-rules .nav-link {
  display: block;
  padding: 8px 16px;
  font-size: 16px;
  line-height: 16px;
  color: #222;
  background: #ccc;
  border-radius: 0;
  text-decoration: none;
}

.game-rules-lottcard .lottery-rules .nav-link.active,
.game-rules-lottcard .lottery-rules .nav-link:hover {
  color: #fff;
  background: #0470a5;
}

.game-rules-lottcard .lottery-rules .tab-content {
  margin-top: 4px;
}

.game-rules-lottcard .lottery-rules-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  /* the reference's own `.lottery-rules-row { border-bottom: 1px solid
     var(--text-fancy) }`; --text-fancy has no equivalent in our sheets, so the
     dialog's own border colour is used. */
  border-bottom: 1px solid #ddd;
}

.game-rules-lottcard .lottery-rules-title-name {
  width: 20%;
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-right: 1px solid #ddd;
}

.game-rules-lottcard .lottery-rules-title-name > div {
  width: 100%;
}

.game-rules-lottcard .lottery-rules-title-name > div:first-child {
  font-size: 22px;
  font-weight: bold;
  line-height: 33px;
}

.game-rules-lottcard .lottery-rules-title-name > div:last-child {
  font-size: 16px;
  line-height: 24px;
}

.game-rules-lottcard .lottery-rules-cards {
  width: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
}

.game-rules-lottcard .lottery-rules-cards .lottery-card {
  width: 40px;
  margin-right: 5px;
  padding: 5px 0 0;
  text-align: center;
}

.game-rules-lottcard .lottery-rules-cards .lottery-card:last-child {
  margin-right: 0;
}

.game-rules-lottcard .lottery-rules-cards .lottery-card img {
  width: 40px;
  height: 56px;
}

.game-rules-lottcard .lottery-rules-cards .lottery-card > div {
  font-size: 16px;
  line-height: 24px;
}

.game-rules-lottcard .tab-pane h4 {
  font-size: 20px;
  line-height: 24px;
  margin: 0 0 8px;
}

.game-rules-lottcard .tab-pane table {
  width: 100%;
  margin-bottom: 0;
  background: #f7f7f7;
  border-collapse: collapse;
}

.game-rules-lottcard .tab-pane th,
.game-rules-lottcard .tab-pane td {
  padding: 5px;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  border: 1px solid #ddd;
}

/* Lottery Card pick display — the balls the reference paints while the slip is
   open (`.lottery-place-balls`: flex, padding 6, 50px spinning balls, 100px for
   the Single pane). The reference renders this block `.d-xl-none` because its
   desktop shows the picks in the 450px right sidebar, which our page has no slot
   for; ours renders it at every width so a half-picked Double/Tripple is visible
   on desktop too. Measured from the reference's style.css:7891-7930. */
.casino-container-box.lottery .lottery-place-balls {
  display: flex;
  padding: 6px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.casino-container-box.lottery .lottery-place-balls img {
  width: 50px;
  margin-right: 20px;
  animation: lottery-ballspin 5000ms linear infinite;
}

.casino-container-box.lottery .lottery-place-balls img:last-child {
  margin-right: 0;
}

.casino-container-box.lottery .single .lottery-place-balls img {
  width: 100px;
}

.casino-container-box.lottery .lottery-place-balls .btn {
  margin-left: 8px;
}

@keyframes lottery-ballspin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* 2026-10-24 — two phone deltas found by measuring the finished batch at 390.
   (a) 3cardj's live-stream strip: the reference's box is 68x30 with three
       16x20 cards on a 5px pitch, ours was still the desktop 140x60 / 40x50
       (trio, which shares the strip, already had its phone size). */
@media only screen and (max-width: 767px) {
  .casino-container-box.threecardj .casino-video-cards .flip-card {
    width: 16px;
    height: 20px;
  }
}

/* (b) lottcard's last-result pills: the reference's phone pills are 71x28
       (12px/18px digits inside a 5px padding), so ten of them make two rows of
       5 and the strip measures 390x76. Ours kept the desktop 24px line box and
       came out 390x88. */
@media only screen and (max-width: 767px) {
  .casino-container-box.lottery .casino-last-results .lottery-result-group {
    height: 28px;
  }

  .casino-container-box.lottery .casino-last-results .lottery-result-icon {
    font-size: 12px;
    line-height: 18px;
  }
}

/* (c) lottcard rules dialog: the reference's rule card is exactly 40x80 (a
       40x56 image over a 40x24 digit) with the 5px top offset INSIDE that
       height, so each row is 100/116 tall and the dialog 800x426. Ours added
       the 5px on top of an 80px box and each row came out 106 (dialog 434). */
.game-rules-lottcard .lottery-rules-cards .lottery-card {
  padding: 0;
  height: 80px;
}

.game-rules-lottcard .lottery-rules-cards .lottery-card img {
  display: block;
}

/* ---------------------------------------------------------------------------
   BATCH 6 — RACE FAMILY PHONE CARDS (2026-10-31)
   ---------------------------------------------------------------------------
   The desktop rule above sizes every race flip-card 40x50 at (0,4,0). The
   reference's own <=767px rules shrink them to 16x20 on all three pages:

     responsive.css:2728   .race20 .flip-card { height:20px; width:16px }
     .queen / .raceto17    the same 16x20 card, with a 12px h5

   Our copies in casino-responsive-parity.css are either shallower (race20:
   0,3,0 — it never won against the 0,4,0 desktop rule, which is why race20's
   phone cards stayed 40x50) or page-class-descendant (queen, dead). Stating
   them here, after the desktop block and at equal-or-higher specificity, makes
   the phone size independent of stylesheet order.

   Measured live 2026-10-24 on tridevexch /casino/queen at 390: group
   52.77x32, card 16x20, h5 12px. */
@media only screen and (max-width: 767px) {
  .casino-container-box.queen .casino-video-cards .flip-card,
  .casino-container-box.raceto17 .casino-video-cards .flip-card,
  .casino-container-box.race20 .casino-video-cards .flip-card {
    height: 20px;
    width: 16px;
  }

  .casino-container-box.queen .casino-video-cards h5,
  .casino-container-box.raceto17 .casino-video-cards h5,
  .casino-container-box.race20 .casino-video-cards h5 {
    font-size: 12px;
    line-height: 1;
  }

  /* race17's vertical stack: keep the rows tight on a phone. */
  .casino-container-box.raceto17 .casino-video-cards {
    padding: 4px;
  }

  /* The desktop band above keeps `.video-box-container` at `calc(100% - 220px)`
     at every width. The reference uncaps it at <=767px (responsive.css:
     `.video-box-container { max-width: 100% }`), so its phone band is the full
     column and 16:9 of it — measured 390x219 at a 390 viewport. Ours stayed
     220px short: measured 2026-10-31 at 390, band 386x93, video 166x93, race17
     overlay 52x136 — the vertical race overlays ran 43px+ past the band and
     painted under the board. Uncapping moves the band to 386x217, the
     reference's shape. */
  .casino-container-box.queen .video-box-container,
  .casino-container-box.raceto17 .video-box-container,
  .casino-container-box.race20 .video-box-container {
    max-width: 100%;
  }
}

/* Race result dialog — the reference's own result component renders
   `.race-result-box`, but its sheet scopes the base box under `.race-modal`,
   which our `.casino-result-modal` wrapper never carries. Ported from
   style-d247.css:6464-6505 so the four suit rows, the K art and the vertical
   WINNER strip land exactly where d247/tridev put them. */
.casino-result-modal .race-result-box {
  width: 386px;
  position: relative;
  z-index: 10;
  margin: 0 auto;
}

.casino-result-modal .race-result-box .casino-result-cards {
  position: relative;
  justify-content: flex-start;
}

.casino-result-modal .race-result-box .casino-result-cards .k-image {
  position: absolute;
  right: -50px;
}

.casino-result-modal .race-result-box .video-winner-text {
  color: var(--text-info);
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  width: 42px;
  height: 100%;
  border: 1px solid var(--text-info);
  padding: 2px 12px;
  background-color: var(--bg-body);
  z-index: 100;
}

.casino-result-modal .race-result-box .casino-winner-icon {
  right: -95px;
  top: 15px;
  position: absolute;
}

@media only screen and (max-width: 767px) {
  .casino-result-modal .race-result-box {
    width: 235px;
  }

  .casino-result-modal .race-result-box .video-winner-text {
    font-size: 16px;
    width: 30px;
  }

  .casino-result-modal .race-result-box .casino-result-cards .k-image {
    right: -35px;
  }

  .casino-result-modal .race-result-box .casino-winner-icon {
    right: -70px;
    top: 5px;
  }
}

/* ---------------------------------------------------------------------------
   Super Over family (superover / superover2 / superover3) result scorecard.
   Captured from tridevexch 2026-11-01: the reference's own `.score-head` and
   `.five-cricket-result h4` blocks, with the reference's resolved colours
   (`--bg-secondary85` / `--bg-primary90` / white text). The desktop table is
   fixed-layout; the reference switches it back to auto on phones and pins the
   first/last header cells to 60px.
   --------------------------------------------------------------------------- */
.five-cricket-result .score-head {
  background-color: #2c3e50d9;
  padding: 10px;
  color: #fff;
}

.five-cricket-result h4 {
  background-color: #0088cce6;
  color: #fff;
  padding: 5px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0;
}

.five-cricket-result .text-fancy {
  color: #fdcf13;
}

.five-cricket-result .table {
  table-layout: fixed;
  background-color: #f7f7f7;
  color: #333;
  margin-bottom: 0;
}

.five-cricket-result .table th,
.five-cricket-result .table td {
  border-top: 0;
  border-bottom: 1px solid #c7c8ca;
  padding: 5px;
  font-size: 16px;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}

.five-cricket-result .table tbody tr {
  background-color: #f2f2f2;
}

.five-cricket-result .table tbody {
  border: 0 !important;
}

.five-cricket-result .table .text-danger {
  color: #bd1828 !important;
}

.five-cricket-result .text-end {
  text-align: right;
}

@media (max-width: 767px) {
  .modal .five-cricket-result .table td,
  .modal .five-cricket-result .table th {
    font-size: 12px;
  }

  .five-cricket-result h4 {
    font-size: 16px;
  }

  .modal .five-cricket-result .table th:first-child,
  .modal .five-cricket-result .table th:nth-child(8n),
  .modal .five-cricket-result .table th:nth-child(9n) {
    width: 60px;
  }

  .five-cricket-result .table {
    table-layout: unset;
  }
}

/* ============================================================================
   Mini SuperOver (superover3) — the reference's `.super-over` page
   ============================================================================

   Captured from tridevexch /casino/superover3 at 1600px on 2026-11-01:

     .scorecard.mb-1                    855x66  (5px padding, 4px bottom margin)
     .casino-video                      855x357
       .video-box-container             635x357 (right-aligned, 220px left rail)
       .casino-video-cards              10x14 between rounds, absolute top-left
     .casino-detail
       .game-market.market-2            Bookmaker (flex-grows full width)
       .game-market.market-6            Fancy / Tie / Fancy1 (full width)

   The base sheet sets `.video-box-container { max-width: 100% }`; the
   reference's base rule reserves 220px for the stream rail. Keep the reference
   value scoped to this page only, and reserve the same rail in the live band.
   ========================================================================== */

.super-over .video-box-container {
  max-width: calc(100% - 220px);
  margin-left: auto;
}

.super-over .casino-video.casino-stream-stage {
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
}

.super-over .casino-stream-frame {
  position: static;
  inset: auto;
  width: 100%;
  overflow: hidden;
}

.super-over .casino-video {
  overflow: hidden;
}

.super-over .casino-video-cards {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  max-width: 220px;
  height: auto;
  padding: 5px;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.super-over .casino-video-cards img {
  width: auto;
  height: 40px;
}

.super-over .scorecard {
  width: 100%;
  margin: 0 0 4px;
  padding: 5px;
  z-index: 1;
}

.super-over .scorecard::before {
  z-index: -1;
}

.super-over .scorecard .row {
  margin: 0;
}

.super-over .scorecard .row > [class*='col-'],
.super-over .scorecard .row > [class*='col'] {
  padding: 0;
}

.super-over .scorecard p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

/* The shared `.team-name` rule is 14px, but the reference scorecard has no
   such override: its team-name and CRR spans inherit the paragraph's 16px. */
.super-over .scorecard .team-name,
.super-over .scorecard .score {
  font-size: 16px;
  line-height: 24px;
}

.super-over .scorecard .text-end {
  text-align: right;
}

@media (min-width: 1200px) {
  .super-over .scorecard .text-xl-end {
    text-align: right;
  }
}

.super-over .casino-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.super-over .game-market {
  margin-top: 4px;
}

.super-over .game-market.market-2 {
  width: calc(50% - 4px);
  min-width: calc(33.33% - 4px);
  max-width: calc(100% - 4px);
  flex: 1;
  margin: 4px 2px 0;
}

.super-over .game-market.market-6 {
  width: calc(100% - 4px);
  min-width: calc(100% - 4px);
  max-width: calc(100% - 4px);
  flex: 1;
  margin: 4px 2px 0;
}

.super-over .market-2 .market-nation-detail {
  width: calc(100% - 160px);
}

.super-over .market-2 .market-odd-box {
  flex: 0 0 80px;
  width: 80px;
}

.super-over .market-6 .market-nation-detail {
  width: calc(100% - 240px);
}

.super-over .market-6 .market-odd-box {
  flex: 0 0 80px;
  width: 80px;
}

.super-over .market-6 .fancy-min-max-box {
  flex: 0 0 80px;
  width: 80px;
}

.super-over .game-market .market-title {
  padding: 4px;
  font-size: 14px;
}

.super-over .market-title,
.super-over .market-title span {
  text-transform: none;
}

@media (max-width: 767px) {
  .super-over .video-box-container {
    max-width: 100%;
  }

  .super-over .casino-video-cards img {
    height: 24px;
  }

  .super-over .game-market.market-2,
  .super-over .game-market.market-6 {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .super-over .game-market .market-title {
    padding: 3px 6px;
    font-size: 13px;
  }

  .super-over .market-nation-detail {
    font-size: 13px;
  }

  .super-over .market-2 .market-nation-detail,
  .super-over .market-6 .market-nation-detail {
    width: calc(100% - 40%);
  }

  .super-over .market-2 .market-odd-box,
  .super-over .market-6 .market-odd-box {
    width: 20%;
    flex: 0 0 20%;
    padding: 2px 0;
  }

  .super-over .market-6 .fancy-min-max-box {
    display: none;
  }
}
