/* ============================================================================
   d247 casino game-market template
   Copied from d247.com/tridevexch.com live CSS (Aug 2026) so every casino
   game renders with the identical market table look: compact rows, blue back /
   slate lay odds boxes, volume labels, suspended overlays, fancy min/max.
   ============================================================================ */

/* d247 table color palette (matches the provider frontend) */
:root {
  --g-table-border: #c7c8ca;
  /* Several board rules below are ports of the reference's own declarations and
     therefore spell the border variable the way d247 does (`var(--table-border)`,
     see style.css:5546 on the 32-Cards number strip). This app never defined
     that name, so those borders silently vanished (measured on card32eu
     2026-10-06: our number cells 50px tall against the reference's 51px, 2px of
     board height). Aliased rather than rewritten at each call site so every
     verbatim port keeps working as the reference intends. */
  --table-border: #c7c8ca;
  --g-bg-table: #f7f7f7;
  --g-bg-table-row: #f2f2f2;
  --g-text-table: #333;
  --g-bg-primary: #0088cc;
  --g-bg-secondary: #2c3e50;
  --g-text-info: #17a2b8;
  --g-back-bg: #72bbef;
  --g-back-bg-active: #5a9fd6;
  --g-lay-bg: #faa9ba;
  --g-lay-bg-active: #dd8ba0;
  --g-text-white: #fff;
}

/* d247 board variables (verbatim from d247 style.css :root) — the worli
   matka CSS below references these; without them the cells rendered with
   our own green/grey fallbacks instead of d247's blue. Scoped to the board
   so global consumers (e.g. the withdraw page's var(--bg-success)) are
   unaffected. */
.matka.worli,
.worli.matka {
  --back: #72bbef;
  --bg-success: #086f3f;
  --bg-secondary85: #2c3e50d9;
}

/* ---- market containers ---- */
.game-market {
  background: var(--g-bg-table);
  color: var(--g-text-table);
  margin-top: 4px;
}

.game-market .market-title {
  background: var(--g-bg-secondary);
  color: var(--g-text-white);
  padding: 3px 8px;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
}

/* ---- header row (nation label + Back / Lay) ---- */
.market-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0;
  border-bottom: 0.01em solid var(--g-table-border);
}

.market-header .market-nation-detail .market-nation-name {
  font-size: 12px;
  color: var(--g-text-info);
  font-weight: bold;
}

/* ---- data row ---- */
.market-row {
  background-color: var(--g-bg-table-row);
  display: flex;
  flex-wrap: wrap;
  border-bottom: 0.01em solid var(--g-table-border);
}

.market-nation-detail {
  width: calc(100% - 160px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 14px;
  align-items: center;
  min-height: 34px;
}

.market-nation-detail .market-nation-name,
.market-nation-name {
  font-weight: 400;
  max-width: 100%;
  width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  line-height: normal;
}

.market-nation-book {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
}

.market-nation-book .market-book {
  font-size: 14px;
  font-weight: bold;
  line-height: normal;
}

/* ---- odds boxes ---- */
.market-odd-box {
  width: 80px;
  padding: 2px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-left: 1px solid var(--g-table-border);
  cursor: pointer;
  min-height: 28px;
  user-select: none;
}

.market-odd-box.back {
  background-color: var(--g-back-bg);
  color: #000;
}

.market-odd-box.lay {
  background-color: var(--g-lay-bg);
  color: #000;
}

.market-odd-box.back:hover,
.market-odd-box.back.active {
  background-color: var(--g-back-bg-active);
}

.market-odd-box.lay:hover,
.market-odd-box.lay.active {
  background-color: var(--g-lay-bg-active);
}

.market-odd {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.1;
}

.market-volume {
  font-size: 12px;
  font-weight: 100;
  line-height: 1;
  opacity: 0.9;
}

/* ---- suspended rows ---- */
.suspended-row {
  position: relative;
}

.suspended-row::after {
  content: attr(data-title);
  background-color: #373636d6;
  color: #ff0000;
  font-weight: bold;
  font-size: 16px;
  text-transform: uppercase;
  position: absolute;
  height: 100%;
  width: 100%;
  right: 0;
  top: 0;
  cursor: not-allowed;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 3;
}

/* ---- fancy markets ---- */
.fancy-market {
  border-bottom: 1px solid var(--g-table-border);
}

.fancy-market .market-row {
  border-bottom: 0;
}

.fancy-min-max-box {
  width: 80px;
  padding: 0 5px;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.fancy-min-max {
  font-size: 11px;
  font-weight: bold;
  color: var(--g-text-info);
  word-break: break-all;
  line-height: 1.15;
  text-align: right;
}

/* fancy two-column grid needs the full-width nation + odd boxes */
.row.row10 {
  margin: 0;
}

.row.row10 > .col-md-6 {
  padding: 0;
}

/* when market-header has a fancy-min-max-box, keep Back/Lay width stable */
.market-header .market-odd-box {
  min-height: 24px;
}

.market-header .market-nation-detail {
  min-height: 24px;
}

/* ---- hover states / click feedback (d247 uses .active for pressed odds) ---- */
.market-odd-box.back:active,
.market-odd-box.lay:active {
  transform: scale(0.97);
}

.market-odd-box.betting-disabled {
  cursor: pointer;
}

.suspended-row .market-odd-box {
  cursor: not-allowed;
}

/* ============================================================================
   d247 casino game-page shell (copied from tridevexch/d247 style.css)
   ============================================================================ */
.casino-header {
  background-color: var(--bg-secondary, #20242c);
  color: var(--text-secondary, #fff);
  padding: 5px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-radius: 6px 6px 0 0;
}

.casino-header .casino-name {
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  /* Reset the generic tile-caption .casino-name rule from style.css
     (position: absolute; width: 100%; bottom: -15px; gradient bg; centered;
     small 11px font) so the in-game header title stays in-flow at the top
     of the casino header, exactly like d247. Without this, the name is
     ripped out of the header (collapsing it to ~10px) and re-rendered
     below the live stream. */
  position: static;
  width: auto;
  bottom: auto;
  left: auto;
  right: auto;
  top: auto;
  background: none;
  padding: 0;
  text-align: left;
  border-radius: 0;
}

.casino-header .casino-name a {
  color: #ffffff;
  font-weight: 400;
  text-decoration: underline;
  text-transform: capitalize;
  cursor: pointer;
  /* d247/tridevexch parity: clear gap between the game name and the Rules link */
  margin-left: 10px;
}

.casino-header .casino-rules-link {
  font-size: 12px;
  color: #ffffff;
}

.casino-rid {
  font-size: 16px;
  font-weight: 400;
  /* d247/tridevexch parity: the theme sets --text-secondary to a DARK slate
     (#2c3e50) which renders the Round ID / Range bar dark-on-dark. Force
     white so the header is legible on the dark header band. */
  color: #ffffff;
}
.casino-rid small,
.casino-rid span {
  color: #ffffff;
}

/* d247/tridevexch result modal (built by the fan html-cards endpoint) */
.casino-result-modal .casino-result-round-id {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  /* The reference carries no padding here (measured: padding 0 against our
     4px 0). The 4px was compensating for the crushed 15px line-height, which
     the `line-height: 1.5` rule below now fixes at the source. */
  padding: 0;
}

.casino-result-modal .casino-result-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
}

.casino-result-modal .casino-result-cards img {
  height: 50px;
  width: auto;
  margin-right: 5px;
}

.casino-result-modal .casino-result-cards img:last-child {
  margin-right: 0;
}

/* Unique Teenpatti's result box: six numbered slots, each a 30x30 s-icon above an
   80x100 card face. Measured on the reference's own dialog 2026-10-22
   (`.unique-teen20-box` 1120x145 with `gap: 10px`; `.unique-teen20-card`
   80x135 with 5px vertical margins — icon 30 + 5 + card 100). The generic
   result-card rule above sizes every face 50px high, so these slots were
   rendering 50x50 and the whole dialog came out 95px short of the reference's.
   The card is a wrapping flex row because that is what puts the icon on its own
   line above the face in the reference's box. */
.casino-result-modal .casino-result-cards.unique-teen20-box {
  gap: 10px;
}

.casino-result-modal .casino-result-cards.unique-teen20-box .unique-teen20-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 80px;
  height: 135px;
  margin: 5px 0;
}

.casino-result-modal .casino-result-cards.unique-teen20-box .unique-teen20-card img {
  display: block;
  height: auto;
}

.casino-result-modal .casino-result-cards.unique-teen20-box .unique-teen20-card img:first-child {
  width: 30px;
  height: 30px;
  margin-right: 5px;
}

.casino-result-modal .casino-result-cards.unique-teen20-box .unique-teen20-card img:last-child {
  width: 80px;
  height: 100px;
  margin-right: 0;
}

/* The reference has NO `.result-title` rule of its own — its card-column
   headings are plain `<h4 class="result-title">` and therefore take its global
   heading scale (`h4 { font-size: 20px; font-weight: 400; margin-bottom: 0 }`,
   measured 2026-10-22 on the reference's trap dialog: 20px/24px, weight 400,
   margin 0). Ours carried a 16px/700 heading with a 4px top margin, which made
   every card column 0.8px short and printed the hand labels bold where the
   reference prints them regular. */
.casino-result-modal .result-title {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

/* Queen's result dialog prints each hand's total in a `badge bg-success`:
   "Total 0 - <badge>10</badge>". The reference's badge is the theme green
   #086f3f with WHITE text and 5.25/9.75 padding; bootstrap's `.bg-success` is
   #28a745 with black text, which is what ours rendered (measured live
   2026-10-24 on both dialogs). Scoped to the queen dialog. */
.queen .casino-result-modal .badge.bg-success {
  background-color: #086f3f !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  padding: 5.25px 9.75px;
  border-radius: 4px;
}

.casino-result-desc {
  display: flex;
  flex-wrap: wrap;
  padding: 6px;
  box-shadow: 0 0 4px -1px;
  margin-top: 10px;
}

.casino-result-desc-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.casino-result-desc-item div:first-child {
  margin-right: 2%;
  opacity: 0.6;
  width: 30%;
  text-align: right;
}

.casino-result-desc-item div:last-child {
  word-break: break-all;
  width: 60%;
}

.casino-winner-icon {
  margin: 0 10px;
}

.casino-winner-icon i {
  font-size: 26px;
  animation: winnerbox 1.5s infinite;
  border-radius: 50%;
  color: #169733;
}

@keyframes winnerbox {
  0% {
    box-shadow: 0 0 0 0 rgba(29, 127, 30, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(29, 127, 30, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(29, 127, 30, 0);
  }
}

.casino-video {
  position: relative;
  background-color: #000;
  color: #fff;
}

.video-box-container {
  max-width: 100%;
  margin-left: auto;
}

.casino-video-box {
  position: relative;
  padding-bottom: 56.25%;
}

.casino-video-box iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* d247 clock: absolute bottom-right of the video area */
.casino-video .clock,
.casino-stream-stage .clock {
  position: absolute !important;
  right: 10px;
  bottom: 10px;
  text-align: right !important;
  top: unset;
  left: unset;
  margin: 0 !important;
  width: auto !important;
}

/* ---------------------------------------------------------------------------
 * d247 / tridevexch stream-box parity:
 *   - ALL games: no iframe zoom (style.css scales via --casino-stream-zoom
 *     1.16/1.08 which cut the video edges — tridevexch does not zoom)
 *   - teen-family games (.Tp1Day wrapper): live cards overlay INSIDE the
 *     stream box (absolute top-left), video right-aligned 16:9 box like d247
 * --------------------------------------------------------------------------- */
.casino-stream-stage {
  --casino-stream-zoom: 1;
}

.casino-stream-stage .casino-stream-iframe {
  transform: none !important;
}

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

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

.Tp1Day .casino-video {
  position: relative;
  overflow: hidden;
}

/* d247: the stream box hugs the 16:9 video (no min-height dead space) */
.Tp1Day .casino-stream-stage {
  min-height: 0;
}

.Tp1Day .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;
}

.Tp1Day .casino-video-cards h5 {
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  font-size: 12px;
  line-height: 1.1;
  margin: 0 0 3px;
}

.Tp1Day .casino-video-cards .flip-card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
}

.Tp1Day .casino-video-cards .flip-card {
  background-color: transparent;
  perspective: 1000px;
  height: 50px;
  width: 40px;
  margin-right: 3px;
}

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

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

.Tp1Day .casino-video-cards .flip-card-front,
.Tp1Day .casino-video-cards .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;
  border-radius: 3px;
}

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

.Tp1Day .casino-video-cards img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .Tp1Day .video-box-container {
    max-width: 100%;
  }
  .Tp1Day .casino-video-cards .flip-card {
    height: 22px;
    width: 18px;
  }
  .Tp1Day .casino-video-cards h5 {
    font-size: 10px;
  }
}

/* The "Last Result / View All" bar the reference renders directly under the
   board on EVERY casino page (measured live 2026-09-26: 855x33 at 1600x1200 for
   both roulette12 and lucky7, 390x33 at 390x844 for lucky7, hidden for the
   roulette family in portrait by casino-responsive-parity.css — the reference's
   own `.roulette` scope).

   The colour is the reference's LIVE `--bg-secondary85`: it computes
   `rgba(4, 112, 165, 0.85)` (#0470A5D9) there, while the `#2c3e50d9` this file
   already uses for worli cells comes from the older style-d247 sheet — their
   runtime palette moved to #0470A5 / #0CA1F8, which is the same blue this file
   uses for the roulette pane title below. Text is white on it, links included
   (the reference's `a` inherits `--text-secondary`, which is #FFFFFF there). */
.casino-last-result-title {
  padding: 6px;
  background-color: #0470a5d9;
  color: #fff;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  width: 100%;
}

.casino-last-result-title a {
  color: #fff;
  cursor: pointer;
}

.casino-last-results {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 4px;
  width: 100%;
}

.casino-last-results .result {
  background: #355e3b;
  color: #fff;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  margin-left: 5px;
}

/* ROULETTE RESULT CHIPS ARE COLOURED LIKE THE NUMBER, AT EVERY WIDTH.

   The reference's chips carry the colour as a class (`<span class="result
   red">25</span>`, `.result black`, `.result green` for 0) and its own sheet
   paints them at `.roulette .casino-last-results .result.*`. Live computed on
   /casino/roulette12 2026-09-26: 1600x1200 red rgb(178,18,31) = #b2121f, black
   rgb(17,17,17) = #111111; 390x844 red rgb(219,49,49) = #db3131, black
   rgb(63,63,63) = #3f3f3f. Those portrait values are already in
   casino-responsive-parity.css, but they sit INSIDE its
   `@media (orientation: portrait)` block — so on a desktop the colour never
   applied and every chip fell back to the base `.casino-last-results .result`
   green, leaving a row of green balls under a red/black board. These are the
   landscape/desktop values; the portrait block, being in a later file with the
   same specificity, still wins where it matches. */
.casino-container-box.roulette .casino-last-results .result.green {
  background-color: #17732e;
}

.casino-container-box.roulette .casino-last-results .result.red {
  background-color: #b2121f;
}

.casino-container-box.roulette .casino-last-results .result.black {
  background-color: #111111;
}

.casino-container-box.roulette .casino-last-results .result.yellow {
  background-color: #fef0a9;
  color: #000;
}

/* The compact layout's ninth-plus-one: the reference wraps its `...` chip in an
   anchor that points at the results page (the roulette family hides the
   "Last Result / View All" bar in portrait, so this is the only way through).
   Nothing to style beyond the anchor not underlining its chip. */
.casino-last-results .more-result {
  text-decoration: none;
}

/* THE CHIP'S OWN COLOUR VOCABULARY — the reference's, verbatim.

   tridevexch/d247 paint every last-result chip as `<span class="result">` plus at
   most one badge class, and the badge is what colours the label
   (style.css:4731-4745):

     .result-a    #ff4500   .result-b    #ffff33
     .result-c    #33c6ff   .result-tie  #5fff33

   plus `cursor: pointer` on the base chip (style.css:4725) — the chips open the
   round's result modal, and that affordance used to come from our own
   `.last-result` class, which the reference does not have. The badge classes
   below are what LastResults.tsx now emits (see REFERENCE_CHIP_TOKEN there);
   before that the badges were spelled `ball-runs playera|playerb|…`, so these
   two rules were dead and every chip kept the base white label. */
.casino-last-results .result {
  cursor: pointer;
}

.casino-last-results .result.result-a {
  color: #ff4500;
}

.casino-last-results .result.result-b {
  color: #ffff33;
}

.casino-last-results .result.result-c {
  color: #33c6ff;
}

.casino-last-results .result.result-tie {
  color: #5fff33;
}

/* cmatch20 — a BALL, not a coloured circle (style.css:7637/7642):

     .cricket20 .casino-last-results .result     { background-color: transparent;
                                                   border: 1px solid 0; }
     .cricket20 .casino-last-results .result img { height: 30px }

   (`border: 1px solid 0` is the reference's own invalid declaration — it always
   drops, so it is not ported.) The chip keeps the base `.result` box (30x30,
   margin-left 5px, pointer) and drops its green fill, and the ball image fills
   it. Its icons are the reference's own artwork, self-hosted at
   `public/imgs/casino/cricket20/ballN.png`; LastResults maps the provider's
   result straight onto `ballN` (see the `cricket2020` case there).

   Same compound rule as baccarat above: the reference's page container is
   `casino-page-container cricket20` (measured live 2026-10-07 with
   tmp-browser/td-cmatch20-recon.mjs) and our page root carries the class on the
   `.casino-container-box` element itself. */
.casino-container-box.cricket20 .casino-last-results .result {
  background-color: transparent;
}

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

/* The reference's own <=767px icon scale (responsive.css:901). The copy in the
   generated casino-responsive-parity.css is dead (page class as a descendant);
   the race20 half of that pair is already re-ported compound in
   casino-batch3-boards.css, this is the cricket20 half. */
@media (max-width: 767px) {
  .casino-container-box.cricket20 .casino-last-results .result img {
    height: 25px;
  }
}

/* Baccarat recolours the two badges to a BACKGROUND (style.css:5789/5794):
   Player blue #086cb8, Banker red #ae2130, both with white text, and Tie left as
   the plain base chip.

   THE SELECTOR HAS TO BE COMPOUND. The reference's page container is
   `casino-page-container baccarat` (measured live 2026-10-07 with
   tmp-browser/td-chip-anatomy.mjs) — the class sits on the SAME element as the
   page wrapper — and this app mirrors that shape on
   `casino-container-box ${casinoPageClass}` (CasinoWrapper.tsx), so the ported
   rule has to read `.casino-container-box.baccarat …`. Written as
   `.casino-container-box .baccarat …` it asks for a `.baccarat` ELEMENT nested
   inside the container box, which no page has, and the two colours silently
   dropped while the chips kept the base green — the same descendant-vs-compound
   fault that hid the whole race family and the queen board
   (docs/casino-batch6-race-family.md).

   baccarat carries the class from CASINO_PAGE_CLASSES (and baccarat12 carries
   `baccarat baccarat2`, the reference's own stacking for the 12-card variant),
   so both the bare and the `baccarat2`-only spellings are listed. Dry-run
   before shipping, with tmp-browser/ours-pageclass-sim.mjs against the live
   site: adding the class changes 0 of the probed nodes (board, sidebar
   My-Bet table, video band, header, remark, odds boxes) and 0px of page
   height — only the two chip colours move. */
.casino-container-box.baccarat .casino-last-results .result.result-a,
.casino-container-box.baccarat2 .casino-last-results .result.result-a {
  background-color: #086cb8;
  color: #fff;
}

.casino-container-box.baccarat .casino-last-results .result.result-b,
.casino-container-box.baccarat2 .casino-last-results .result.result-b {
  background-color: #ae2130;
  color: #fff;
}

@media (max-width: 767px) {
  .casino-rid {
    font-size: 13px;
  }
  .casino-header .casino-name {
    font-size: 14px;
  }
}
/*Worli Matka*/

.worli .tab-content {
width: 100%;
}

.worlibox {
display: flex;
  margin-top: 5px;
  flex-wrap: wrap;
  position: relative;
  width: 100%;
}

.worli-left {
width: 60%;
  display: flex;
  flex-wrap: wrap;
}

.worli-box-title {
width: 100%;
  text-align: center;
  margin: 5px 0;
  min-height: 24px;
}

.worli-box-row {
width: 100%;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.worli-odd-box {
text-align: center;
  height: 70px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
}

.worli-left .worli-odd-box,
.worli-full .worli-odd-box {
width: calc(20% - 2px);
  margin-right: 2px;
}

.worli-odd-box .worli-odd {
font-size: 40px;
  height: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "CasinoNumFont";
}

.worli-right {
width: 40%;
  display: flex;
  flex-wrap: wrap;
}

.worli-right .worli-odd-box {
width: calc(50% - 2px);
  margin-right: 2px;
}

.worli-full {
width: 100%;
  display: flex;
  flex-wrap: wrap;
  margin-top: 5px;
}

.worli-odd-box.back.selected {
background-color: var(--bg-success, #086f3f) !important;
  color: #fff;
}

.sp .worli-right .worli-odd-box,
.dp .worli-right .worli-odd-box,
.chart56 .worli-right .worli-odd-box,
.chart64 .worli-right .worli-odd-box,
.colordp .worli-right .worli-odd-box {
height: 142px;
  width: 100%;
}

.trio .worli-full .worli-odd-box {
width: 100%;
}

.abr .worli-left .worli-odd-box {
width: calc(33.33% - 2px);
}

.abr .worli-right .worli-odd-box {
width: 100%;
}

.abr .worli-right .worli-odd-box:last-child {
margin-right: 0;
}

.abr .worli-right .worli-odd-box:last-child {
margin-right: 0;
}

.worli-cards-container {
display: flex;
  flex-wrap: wrap;
}

.worli-cards-block {
width: calc(10% - 9px);
  text-align: center;
  background-color: var(--bg-secondary85);
  padding: 10px;
  font-size: 20px;
  color: var(--text-secondary);
  border-radius: 8px;
  box-shadow: 0 0 2px;
  margin-right: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.worli-cards-block:nth-child(10n) {
margin-right: 0;
}

.worli-cards-block span {
margin-right: 5px;
}

/*Matka*/

.matka .matka-tabs {
margin-bottom: 4px;
  margin-top: 4px;
}

.matka .matka-tabs .nav-pills {
gap: 0 4px;
  flex-wrap: nowrap;
  overflow: auto;
  white-space: nowrap;
}

.matka .matka-tabs .nav-pills .nav-link {
background: #374151;
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  padding: 4px 8px;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.matka .matka-tabs .nav-pills .nav-link.active,
.matka .matka-tabs .nav-pills .show > .nav-link {
color: #fff;
  background-color: #125e7b;
  font-weight: bold;
}

.matka .matka-tabs .remaining-time {
display: flex;
  align-items: center;
  gap: 6px;
}

.matka .matka-tabs .remaining-time span {
font-weight: bold;
  color: #fdcf13;
  font-size: 12px;
}

.matka .matka-tabs .remaining-time img {
height: 18px;
}

/* d247 style.css:1675 ships a GLOBAL `.nav-pills .nav-link span {
   line-height: 1 }`. We never ported it, so inside a period tab every span
   inherited the link's own `line-height: 1.2`: the name span measured 16.8px at
   14px and the remaining-time span 14.4px at 12px, against the reference's 14
   and 12. The tab came out 60px tall against the reference's 58.2 and the 14
   tabs accumulated a visible drift down the strip. Scoped to the matka family
   rather than ported globally, so it can never move another board's nav-pills;
   porting it globally is the reference's own shape and a separate, board-wide
   re-verification. Measured live 2026-09-26 at 1600x1200 on /casino/worli3.

   Deliberately NOT applied to the `.game-time` span (its date line): the
   reference's own `.game-time` box is 13.2px tall (11px font at the link's
   1.2 line-height inherited by the div) and Chrome sizes our div from its
   inline child, so giving that span `line-height: 1` collapsed the div to 11px
   and the whole tab to 56px against the reference's 58.2. The two selectors
   below are the two spans the reference's rule actually needs — name
   (14px -> 14) and countdown (12px -> 12). */
.matka .matka-tabs .nav-pills .nav-link > span,
.matka .matka-tabs .remaining-time span {
  line-height: 1;
}

.matka .casino-detail {
display: flex;
  flex-wrap: wrap;
}

.matka .casino-table {
width: 100%;
  align-items: flex-start;
  /* d247: .casino-table is a flex container (style.css 4561-4568) so the
     game tabs (nav-pills column) sit on the left and the numbers box
     (flex:1) fills the right — instead of stacking full-width. */
  display: flex;
  flex-wrap: wrap;
  /* d247's global `.casino-table { margin-top: 5px }` (style.css:4561-4567).
     Measured live 2026-09-26 at 1600x1200 on /casino/worli3: the reference's
     `.casino-detail` ends at y=699 and its `.casino-table` starts at 704; ours
     both sat at 726, i.e. the board was 5px high inside its own detail box.
     Scoped to matka because our sheets define no `.casino-table` at all, so the
     reference rule is missing from EVERY board; adding it globally would move
     every already-verified board 5px and belongs in its own re-verification. */
  margin-top: 5px;
}

.matka .matka-coins {
width: 100%;
  background: #00000024;
  color: #000;
  padding: 4px 8px;
  margin-bottom: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
}

.matka .matka-coins .matka-total-coin {
display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

/* .matka .matka-coins .matka-total-coin .bet-chip-holder {
height: 70px;
    width: 70px;
}

*/
/* .matka .matka-coins .bet-chip-amount text {
font-family: "antonio";
    font-size: 24px;
}

*/
/* .matka .matka-coins .matka-total-coin .bet-chip-amount text {
font-size: 20px;
}

*/
.matka .matka-coins .matka-coin-title {
font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin-bottom: 6px;
}

.matka .matka-coins .matka-coin-title span {
font-weight: bold;
  font-size: 12px;
  background: #0000001a;
  padding: 4.5px 9px;
  color: #000;
  text-transform: uppercase;
}

.matka .matka-coins .matka-other-coins {
display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.matka .matka-coins .matka-total-coin .casino-coin,
.matka .matka-coins .matka-other-coins .casino-coin {
display: flex;
  justify-content: center;
  align-items: center;
}

.matka .matka-coins .matka-total-coin .casino-coin img {
height: 60px;
}

.matka .matka-coins .matka-total-coin .casino-coin span,
.matka .matka-coins .matka-other-coins .casino-coin span {
position: absolute;
  font-family: "antonio";
  font-size: 14px;
  font-weight: 600;
  color: #e1e1e1;
}

.matka .matka-coins .matka-other-coins .casino-coin span {
font-size: 16px;
}

.matka .matka-coins .matka-other-coins .casino-coin img {
height: 50px;
}

.matka .casino-detail .nav-pills {
flex-direction: column;
}

.matka .casino-detail .casino-box {
flex: 1;
  margin-left: 4px;
}

.matka .casino-detail .casino-table-full-box {
border: 0;
}

.matka .worlibox,
.matka .worli-full {
margin-top: 0;
}

.matka .casino-detail .nav-pills .nav-link {
  /* d247: game tabs are light grey (#cccccc = --bg-sidebar) with black text;
     our theme never defined --bg-sidebar/--text-sidebar, so they fell back to
     Bootstrap's blue/white. Pin the exact d247 colors. */
  background-color: #cccccc;
  color: #000000;
  border-radius: 0;
  border-right: 0;
  border-bottom: 1px solid #2c3e50;
  font-weight: 500;
  font-size: 16px;
}

.matka .casino-detail .nav-pills .nav-link.active,
.matka .casino-detail .nav-pills .show > .nav-link {
  background-color: #2c3e50;
  color: #ffffff;
}

/* d247 matka header: navy bar (#2c3e50) with white text. Our theme's
   --text-secondary is #2c3e50, which made the title dark-on-dark. The header
   is a direct child of the .card, so match via :has() on the card-body. */
.card:has(> .card-body.worli3) > .casino-header,
.card:has(> .card-body.worlimatka) > .casino-header {
  background-color: #2c3e50;
  color: #ffffff;
}

.card:has(> .card-body.worli3) > .casino-header .casino-name a,
.card:has(> .card-body.worlimatka) > .casino-header .casino-name a {
  color: #ffffff;
  font-weight: 400;
  text-decoration: underline;
  text-transform: capitalize;
}

.matka .jodi .worli-full .worli-odd-box,
.matka .pana .worli-full .worli-odd-box {
margin-bottom: 2px;
  width: calc(10% - 2px);
}

.matka .pana .worli-odd-box .worli-odd {
font-size: 30px;
}

.matka.worli .pana .tab-content h4 {
color: #000;
  font-size: 18px;
  font-weight: bold;
  padding: 4px 8px;
  display: inline-block;
  border-bottom: 3px solid var(--bg-primary);
  margin-bottom: 10px;
}

.matka .casino-detail .pana .nav-pills {
flex-direction: row;
}

.matka .casino-detail .pana .nav-pills .nav-link {
background-color: #0000001a;
  color: #000;
}

.matka .casino-detail .pana .nav-pills .nav-link.active,
.matka .casino-detail .pana .nav-pills .show > .nav-link {
background-color: #00000036;
  font-weight: bold;
}

.matka .worli-clear-box {
background-color: #00000014;
  padding: 5px;
  padding-right: 5px;
  padding-left: 5px;
  font-size: 14px;
  box-shadow: 0 0 1px;
}

.matka-del-bet {
font-size: 20px;
  cursor: pointer;
}

.matka-result.casino-last-results .result {
padding: 0 2px;
  width: auto;
  border-radius: 4px;
  min-width: 70px;
  color: #222;
  background-color: #ccc;
}

.matka .casino-video .video-box-container {
max-width: 100%;
}

.matka .game-time {
margin-top: -3px;
  font-size: 11px;
}

.matka.worli .pana .worli-full .worli-box-row {
gap: 8px;
}

.matka.worli .pana .worli-full .worli-odd-box {
width: calc(10% - 7.5px);
  margin: 0;
}

.worli.matka .pana .worli-odd-box {
height: auto;
}

.matka.worli .pana .worli-odd-box .worli-odd.back {
width: 70%;
  background: var(--back);
  color: #000;
  z-index: 1;
}

.worli.matka .pana .worli-sub-odd-box-container {
width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--back);
  margin-top: -20px;
  padding: 25px 6px 6px 6px;
  z-index: 0;
  background: #ffffff0f;
}

.worli.matka .pana .worli-sub-odd-box-container .worli-sub-odd-box {
margin-bottom: 2px;
}

.worli.matka .pana .worli-sub-odd-box-container .worli-sub-odd-box span {
height: 30px;
}

.worli.matka .suspended-box::before {
z-index: 2;
}

.worli.matka .suspended-box::after {
z-index: 1;
}

.matka .matka-coins .matka-other-coins .casino-coin.selected .bet-chip-holder {
box-shadow: 0 0 10px #1fb512;
  border-radius: 50%;
  transition: all ease-in-out 0.8s;
  transform: scale(1.05);
}

.matka .bet-chip-amount text {
font-size: 28px;
}
/* ---- worli matka board cells — verbatim d247 (style.css 1927-1941) ----
   d247 colors every back cell light blue (#72bbef) and lay cells pink
   (#faa9ba) via the generic .back/.lay rules; the worli grid uses .back on
   both the odd boxes and the pana sub-odd boxes. */
.worli .worli-odd-box.back,
.matka .worli-odd-box.back {
  background-color: var(--back, #72bbef);
  color: #000;
  margin-bottom: 2px;
}
.worli .worli-sub-odd-box.back,
.matka .worli-sub-odd-box.back {
  background-color: var(--back, #72bbef);
  color: #000;
  margin-bottom: 2px;
}
/* The reference has NO `.game-time span` rule of its own: `.matka .game-time {
   font-size: 11px }` (style.css:12891) is inherited by the span and the colour
   is the link's own #fff. Ours overrode both — `font-size: 10px` and a grey
   #9ca3af label — so the game time measured 81.95px wide at 1600x1200 against
   the reference's 90.14, which is also what made each period tab 98px against
   the reference's 107.14 (the tab is a flex column sized by its widest child).
   Measured live 2026-09-26. */
.matka .matka-tabs .game-time span {
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
}
.matka .matka-tabs .nav-link.active .game-time span {
  color: #fff;
}
.worli .worli-odds-value {
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
  width: 100%;
}
.worli .worli-odd-box {
  position: relative;
  overflow: hidden;
}

/* ---- bet-chip (1-click coin bar) — verbatim d247 style.css 11204-11315 ---- */
/* NO `--g-chip-outer-color` HERE, ON PURPOSE. The provider's `.bet-chip-top
   { background-color: var(--g-chip-outer-color) }` refers to a variable their
   own stylesheet never defines — so on the reference it is invalid at
   computed-value time and the layer paints NOTHING (`rgba(0, 0, 0, 0)`,
   measured 2026-10-24 on /casino/roulette12 at 1600x1200 during an OPEN round,
   tmp-browser/td-roulette-open-rail.mjs). A previous pass invented #0b3c50
   here, which painted an opaque dark-teal disc over every chip: the coins read
   as dull slate instead of their per-amount colour (blue / green / violet),
   exactly the "coin colours are not as on tridev" report. The chip's colour is
   `--g-chip-inner-color` on `.bet-chip-front`; the top face is only a shading
   + rim overlay. */
:root {
  --g-black-rgb: 0, 0, 0;
  --g-ttf: ease;
}
.bet-chip-holder {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  cursor: pointer;
}
.casino-coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.casino-coin.active .bet-chip-holder {
  height: 60px;
  width: 60px;
  /* The base rule pins `flex: 0 0 50px`, and in a flex row the BASIS — not
     `width` — is the main size, so the active coin came out 50x60 (a squashed
     oval) where the reference measures 60x60. Measured both sides 2026-10-24. */
  flex: 0 0 60px;
}
.bet-chip {
  position: relative;
  width: 100%;
  border-radius: 50%;
  box-shadow: 0 0.1328125311rem 0.2656250623rem 0 rgba(var(--g-black-rgb), 0.8);
  transition: transform 180ms var(--g-ttf);
}
.bet-chip:before {
  content: "";
  display: block;
  padding-bottom: 100%;
}
.bet-chip-front {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: var(--g-chip-inner-color);
  background-repeat: no-repeat, no-repeat;
  background-position: center bottom, center;
  background-size: 100% auto, cover;
  border-radius: 50%;
  transition: transform 360ms var(--g-ttf), border-radius 360ms var(--g-ttf);
  z-index: 1;
}
.bet-chip-top {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: var(--g-chip-outer-color);
  border-radius: 50%;
  z-index: 2;
}
.bet-chip-top:before,
.bet-chip-top:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
}
.bet-chip-top:before {
  /* The provider's rule is empty (its `background-color` is commented out): no
     rim, no border. An earlier pass drew a 3px dashed grey ring here, which is
     not on the reference's chips at all. */
  width: 64%;
  height: 64%;
  margin: auto;
  z-index: 2;
}
.bet-chip-top:after {
  /* The provider's chip face: white rim dashes, two white rings and the
     top/bottom shading. It is a real, visible layer on the reference
     (`opacity: 1`, `background-size: cover`, measured 2026-10-24); our port
     swapped in a hidden clock.png, which left the plain coloured disc. */
  background-image: url('../img/roulette/icon.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: 3;
  opacity: 1;
}
.bet-chip-amount {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bet-chip-amount svg {
  width: 100%;
  height: 100%;
  display: block;
}
.bet-chip-amount text {
  font-size: 32px;
  font-weight: bold;
  fill: #fff;
}
.casino-coin.active .bet-chip-amount text {
  font-weight: bold;
}
.matka .matka-coins .matka-total-coin .casino-coin,
.matka .matka-coins .matka-other-coins .casino-coin {
  display: flex;
  justify-content: center;
  align-items: center;
}
.matka .matka-coins .matka-other-coins .casino-coin:hover .bet-chip-holder {
  transform: scale(1.08);
}

/* ============================================================================
   d247 Teen Patti board (casino-table template)
   Copied from d247.com teen62 live board CSS (Aug 2026): Player A/B boxes with
   Main + Consecutive back/lay rows, plus the full-width other-odds grid
   (Odd/Even x Card 1-6). Uses the --g-* d247 palette defined above. All
   selectors are scoped under .teenpatti1day so legacy board classes in the
   same bundle can never collide.
   ============================================================================ */
.teenpatti1day.casino-table {
  background-color: var(--g-bg-table);
  color: var(--g-text-table);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  /* tridevexch/d247 center the board in a fixed 855px column (measured live
     at 1600px viewport); our grid column is 876px so the board rendered 9px
     wider. Clamp to the same 855px (fluid at narrower viewports) so every
     cell size matches the reference pixel-for-pixel. */
  max-width: 855px;
  margin: 5px auto 0;
  font-size: 13px;
}
.teenpatti1day .casino-table-box {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  padding-right: 4px;
}
.teenpatti1day .casino-table-full-box {
  width: 100%;
  border-left: 1px solid var(--g-table-border);
  border-right: 1px solid var(--g-table-border);
  border-top: 1px solid var(--g-table-border);
  background-color: var(--g-bg-table-row);
}
.teenpatti1day .casino-table-left-box,
.teenpatti1day .casino-table-center-box,
.teenpatti1day .casino-table-right-box {
  width: calc(50% - 2px);
  border-left: 1px solid var(--g-table-border);
  border-right: 1px solid var(--g-table-border);
  border-top: 1px solid var(--g-table-border);
  background-color: var(--g-bg-table-row);
}
.teenpatti1day .casino-table-box-divider {
  background-color: var(--g-table-border);
  width: 2px;
}
.teenpatti1day .casino-table-header,
.teenpatti1day .casino-table-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: 1px solid var(--g-table-border);
}

/* The board wrapper below sets `font-size: 13px`, and NO rule sizes the header
   row, so our header inherited 13px/19.5px while tridevexch's renders at the
   page's 16px/24px (measured live 2026-10-06 on card32: TD header box 29px tall,
   ours 24.5px — the 4px that made the whole card32 board 120px against TD's
   124px). The header is the one row with no explicit type scale, so pin it to
   the reference's instead of touching the shared 13px base — the cell rules
   (.casino-nation-name, .casino-odds) already carry their own sizes. */
.teenpatti1day .casino-table-header {
  font-size: 16px;
  line-height: 24px;
}
.teenpatti1day .casino-nation-detail {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  padding-left: 5px;
  min-height: 46px;
  width: 60%;
}
.teenpatti1day .casino-table-header .casino-nation-detail {
  font-weight: bold;
  min-height: unset;
}
.teenpatti1day .casino-nation-name {
  font-size: 16px;
  font-weight: bold;
  /* tridevexch/d247 parity: the site-wide html/body line-height:15px
     crushes board names to 15px; tridevexch renders them at 24px (1.5x
     of the 16px font). Without this the name text is clipped flat. */
  line-height: 24px;
}
.teenpatti1day .casino-odds-box {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 0;
  font-weight: bold;
  border-left: 1px solid var(--g-table-border);
  cursor: pointer;
  min-height: 46px;
  width: 20%;
}
.teenpatti1day .casino-table-header .casino-odds-box {
  cursor: unset;
  padding: 2px;
  min-height: unset;
  height: auto !important;
}
.teenpatti1day .casino-odds-box.back {
  background: var(--g-back-bg);
  color: #000;
}
.teenpatti1day .casino-odds-box.lay {
  background: var(--g-lay-bg);
  color: #000;
}
.teenpatti1day .casino-odds-box.suspended-box {
  /* tridevexch parity: no cell opacity — the .suspended-box::after dark
     overlay (diamond-theme) alone marks suspension, so the lock icon stays
     crisp instead of being faded with the cell. */
  cursor: not-allowed;
}
/* Other-odds grid: label column + 6 card columns */
.teenpatti1day .teenpatti1day-other-odds .casino-nation-detail {
  width: 22%;
}
.teenpatti1day .teenpatti1day-other-odds .casino-odds-box {
  width: 13%;
}
.teenpatti1day .teenpatti1day-other-odds .casino-odds-box.suspended-box::before {
  top: -12px;
}
/* Under/Over 21 rows nested inside the player box (tridevexch parity):
   two uo-box columns, each = label + single back cell, no lay. */
.teenpatti1day .under-over-row .uo-box {
  display: flex;
  flex-wrap: wrap;
  width: 48%;
  margin-top: 10px;
  border: 1px solid var(--g-table-border);
}
.teenpatti1day .under-over-row .uo-box .casino-nation-detail {
  width: 70%;
}
.teenpatti1day .under-over-row .uo-box .casino-odds-box {
  width: 30%;
}
/* Player card strip */
.teenpatti1day .teenpatti-cards {
  display: flex;
  gap: 28px;
  padding: 8px 4px;
}
.teenpatti1day .teenpatti-cards h5 {
  font-size: 13px;
  font-weight: bold;
  margin: 0 0 4px;
}
.teenpatti1day .flip-card-container {
  display: flex;
  gap: 6px;
}
.teenpatti1day .teenpatti-card-img {
  height: 64px;
  border-radius: 4px;
}

/* worli matka cells with no odds / suspended — d247 shows label-only,
   no bet action. Match the generic disabled affordance. */
.worli-odd-box.betting-disabled,
.worli-sub-odd-box.betting-disabled {
  cursor: not-allowed;
  opacity: 0.85;
}
.worli-odd-box.betting-disabled:hover,
.worli-sub-odd-box.betting-disabled:hover {
  transform: none;
  box-shadow: none;
}


/* d247 odds number typography (missing before — inherited browser defaults) */
.teenpatti1day .casino-odds {
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
}
.teenpatti1day .casino-table-header .casino-odds {
  font-size: 16px;
}
.teenpatti1day .casino-odds-box.back .casino-odds {
  color: #222;
}
.teenpatti1day .casino-odds-box.lay .casino-odds {
  color: #222;
}
.teenpatti1day .casino-odds-box.suspended-box .casino-odds {
  color: #999;
}

/* d247/tridevexch casino remark marquee below the board (replaces the legacy
   notice-casino-odds box that rendered as a broken clipped row). */
.casino-remark {
  padding: 0 5px;
  color: var(--g-text-info);
  font-weight: bold;
  font-size: 12px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  /* The reference's own `.casino-remark` is `display: block` (measured
     2026-10-07 on cmatch20: 855x18, static, overflow hidden, 12px/18px). Ours
     was inline-block, which matters because it has to be a block box for the
     floated/static marquee inside it to give the line its 18px. */
  display: block;
  width: 100%;
}
.casino-remark marquee {
  width: 100%;
}
/* Our site-wide `marquee` reset (style.css:1129 — `position: absolute;
   bottom: -7px; right: 0; width: 55%`, written for the legacy news ticker)
   also hits the BOARD remark, which takes the marquee out of flow: the
   `.casino-remark` wrapper collapsed to `height: 0px` and the board ended up
   short by exactly the remark's line (measured live 2026-10-06 on 3cardj: our
   board 218px vs the reference's 236px = 107 + 107 + 4 margin + 18 remark).
   The reference's own remark marquee is `position: static`, `display: block`,
   `float: right`, `width: calc(100% - 60px)` (its leftover icon gutter) and
   sits in an 18px line box — reproduced here for every board remark
   (`.casino-table` root), since the reference's rule is not game-specific.
   Verified after this change: our 3cardj board measures 236px, matching TD. */
/* THE SELECTOR CANNOT BE SCOPED TO `.casino-table`. It was written
   `.casino-table .casino-remark marquee` in batch 5, on the assumption that the
   remark sits inside the board root — which is where the REFERENCE puts it, but
   not where this app mounts it: CasinoWrapper renders the remark in the
   card-body as a SIBLING of the board (except for cmatch20, whose board carries
   it — see renderCricket20Board). So the fix never matched, and every game's
   remark measured 0px tall with the legacy absolutely-positioned marquee still
   inside it — measured 2026-10-07 with tmp-browser/ours-remark-check.mjs on
   cmatch20 (858x0, marquee absolute 14px italic) and card32. Unscoped now: the
   header ticker is a `marquee.casino-remark` (the class is ON the marquee, not
   a wrapper around one), so it still cannot match this rule. */
.casino-remark marquee {
  position: static;
  bottom: auto;
  right: auto;
  display: block;
  float: right;
  width: calc(100% - 60px);
  /* The same site-wide reset also sets `font-size: 14px; font-style: italic`,
     so the remark's line box came out 21px against the reference's 18px (12px
     at `line-height: 18px`, inherited from `.casino-remark`). Measured on
     3cardj 2026-10-06: board 239px vs the reference's 236px — the last 3px. */
  font-size: 12px;
  font-style: normal;
  line-height: 18px;
  /* The same reset also sets `color: var(--primary-color)` (style.css:1129,
     and `--primary-color: #fff` is defined once, in theme.css:7). Because that
     declaration lands ON the `<marquee>` element it beats inheritance, so the
     remark's text was painted WHITE while `.casino-remark`'s own
     `color: var(--g-text-info)` never reached it — the marquee was present and
     scrolling but invisible against the light card body. Reported by the user
     2026-10-09 on teen3 / teen32 / teen33 / teen41 / teen42 / patti2 ("its
     there but not visible, its white in color"), which is why it showed on some
     games only: on a dark-backed remark the same white happened to be legible.
     `inherit` restores the wrapper's ported reference colour
     (`--g-text-info: #17a2b8`, from the reference's own
     `.casino-remark { color: var(--text-info) }`). Safe for the header ticker:
     that one is a `marquee.casino-remark` (the class is ON the marquee), so the
     descendant selector below cannot match it. */
  color: inherit;
}

/* ============================================================================
   dolidana (doli-main template) + mogambo (mini-baccarat) — tridevexch parity
   Replicates tridevexch.com's dedicated dolidana board (players-bet rows,
   side-bets, Particular Pair / Odds of Sum Total groups) and mogambo's
   mini-baccarat left/right boxes with the 3 Card Total row.
   ============================================================================ */
.teenpatti1day .doli-table,
.teenpatti1day .mogambo-table {
  display: block;
}
/* ============================================================================
   tridevexch/d247 parity: the casino stage (video box + every board — teen,
   doli, generic market) is centered in a fixed 855px column (measured live at
   1600px viewport); our bootstrap col-8 renders 876px so everything was 9-21px
   wider. Clamp both to the reference column (fluid at narrower viewports) so
   video + board sizes match pixel-for-pixel.
   ============================================================================ */
.casino-container-box .casino-video,
.casino-container-box .game-market {
  max-width: 855px;
  margin-left: auto;
  margin-right: auto;
}

/* dolidana board — tridevexch/d247 parity (port of their doli-main CSS):
   Player A/B on the LEFT (40%) with the Any Pair / Odd+Even / <7 7 >7
   side-bets on the RIGHT (60%), then Particular Pair (35%) beside the
   Odds of Sum Total (65%) below. Cells use fixed percentage widths so the
   arrangement never wraps by content: 3 pair cells per row, 6 sum cells
   per row, exactly like the reference sites. */
.teenpatti1day .doli-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
}
.teenpatti1day .doli-main .players-bet {
  width: calc(40% - 5px);
  display: flex;
  flex-wrap: wrap;
  border-left: 1px solid var(--g-table-border);
  border-right: 1px solid var(--g-table-border);
  border-top: 1px solid var(--g-table-border);
  background-color: var(--g-bg-table-row);
}
.teenpatti1day .doli-main .players-bet .casino-table-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px solid var(--g-table-border);
}
.teenpatti1day .doli-main .casino-nation-detail {
  width: 80%;
  border-left: 1px solid var(--g-table-border);
  border-top: 1px solid var(--g-table-border);
}
.teenpatti1day .doli-main .doli-odds-box {
  width: 20%;
}
.teenpatti1day .doli-main .casino-odds-box {
  width: 100%;
}
.teenpatti1day .doli-main .side-bets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: calc(60% - 5px);
  gap: 10px;
}
.doli-main .any-pair {
  width: calc(20% - 7px);
}
.teenpatti1day .doli-main .side-bets .any-pair .doli-odds-box {
  width: 100%;
}
.teenpatti1day .doli-main .side-bets .any-pair .casino-odds-box {
  width: 100%;
  border-radius: 4px;
  height: 60px;
}
.teenpatti1day .doli-main .side-bets .odd-even-pair {
  width: calc(35% - 7px);
  background: #0000000a;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.teenpatti1day .doli-main .side-bets .lucky7-pair {
  width: calc(45% - 7px);
  background: #0000000a;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.teenpatti1day .doli-main .side-bets .bets-box {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.teenpatti1day .doli-main .side-bets .odd-even-pair .bets-box .doli-odds-box {
  width: calc(50% - 5px);
}
.teenpatti1day .doli-main .side-bets .lucky7-pair .bets-box .doli-odds-box {
  width: calc(33.33% - 5px);
}
.teenpatti1day .doli-main .side-bets .bets-box .casino-odds-box {
  width: 100%;
}
/* One doli bet: label above a single back cell.
   Reference shape, measured on tridev 2026-09-24: the platform's only label rule
   is `.doli-dana .odd-name { font-size; font-weight: bold; text-align: center }`,
   and `.doli-odds-box` itself carries no padding and no display override (it
   computes to display:block / padding:0, label 14px tall at 390px). Our earlier
   version added `padding: 4px`, a flex column and a 28px min-height, which made
   every doli cell taller than the reference at every width and left the label at
   12px where the reference drops to 9px on phones. */
.doli-dana .odd-name {
  font-size: 12px;
  font-weight: bold;
  color: var(--g-text-table);
  text-align: center;
}
.teenpatti1day .doli-odds-box .casino-odds-box {
  width: 100%;
  min-width: 0;
  min-height: 44px;
}
.teenpatti1day .seven-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.teenpatti1day .seven-box img {
  height: 44px;
  width: auto;
}
/* doli odds/volume typography (d247 parity) */
.teenpatti1day .doli-table .casino-odds {
  font-size: 16px;
}
.teenpatti1day .doli-table .casino-volume {
  font-weight: 400;
}
/* Particular Pair / Odds of Sum Total groups with h4 headers */
.teenpatti1day .doli-other-bets {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
  margin-top: 8px;
}
.teenpatti1day .doli-other-bets .particular-pair {
  width: calc(35% - 5px);
  background: #0000000a;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
}
.teenpatti1day .doli-other-bets .sum-odds {
  width: calc(65% - 5px);
  background: #0000000a;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
}
.teenpatti1day .doli-other-bets .bets-box {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.teenpatti1day .doli-other-bets h4 {
  font-size: 16px;
  font-weight: bold;
  color: var(--g-text-table);
  margin-bottom: 4px;
  text-align: center;
}
.teenpatti1day .doli-other-bets .particular-pair .bets-box .doli-odds-box {
  width: calc(33.33% - 5px);
}
.teenpatti1day .doli-other-bets .sum-odds .bets-box .doli-odds-box {
  width: calc(16.66% - 5px);
}
.teenpatti1day .doli-other-bets .doli-odds-box .casino-odds-box,
.teenpatti1day .doli-main .side-bets .casino-odds-box {
  border-radius: 4px;
}

/* matched size under the odds (doli players-bet + mogambo 3 Card Total) */
.teenpatti1day .casino-odds-box .casino-volume {
  /* tridevexch/d247 parity: 12px volume text */
  font-size: 12px;
  font-weight: 100;
  line-height: 1;
  opacity: 0.9;
}
/* mogambo mini-baccarat boxes */
.teenpatti1day .mogambo-table .casino-table-left-box,
.teenpatti1day .mogambo-table .casino-table-right-box {
  width: calc(50% - 2px);
}
.teenpatti1day .casino-table-row.mini-baccarat {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: 1px solid var(--g-table-border);
}
.teenpatti1day .casino-table-row.mini-baccarat .casino-nation-detail {
  width: 60%;
}
.teenpatti1day .three-card-total .casino-table-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: 1px solid var(--g-table-border);
}
.teenpatti1day .three-card-total .casino-odds-box {
  width: 20%;
}
.teenpatti1day .three-card-total .casino-table-left-box {
  width: 100%;
}

/* Doli Dana result modal — dice-style sum card (tridevexch parity) */
.casino-result-modal .casino-result-dice-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}
.casino-result-modal .casino-result-dice {
  display: inline-flex;
  width: 64px;
  height: 64px;
  background: #fff;
  border: 2px solid #c00;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: #c00;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.casino-result-modal .casino-result-dice-sum {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}
.casino-result-modal .casino-result-dice-empty {
  padding: 16px 0;
  color: #888;
}

/* Doli Dana dice faces (result modal) */
.casino-result-modal .casino-die {
  display: inline-grid;
  grid-template-columns: repeat(3, 12px);
  grid-template-rows: repeat(3, 12px);
  gap: 2px;
  align-items: center;
  justify-items: center;
  width: 46px;
  height: 46px;
  background: #fff;
  border: 2px solid #c00;
  border-radius: 8px;
  padding: 4px;
  margin: 4px 3px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.casino-result-modal .casino-die i { width: 8px; height: 8px; display: block; }
.casino-result-modal .casino-die i.casino-die-pip {
  border-radius: 50%;
  background: #c00;
}

/* Roulette winning number chip */
.casino-result-modal .casino-roulette-num { margin-top: 10px; }
.casino-result-modal .casino-roulette-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  border: 3px solid #f5d9a0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Rank-only card faces (3-card judgement / war) */
.casino-result-modal .casino-rank-cards { margin-top: 10px; }
.casino-result-modal .casino-rank-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 62px;
  margin: 0 4px;
  background: #fff;
  border: 1px solid #999;
  border-radius: 6px;
  font-weight: 700;
  font-size: 18px;
  color: #111;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* tridevexch teen result modal: Player A | result box | Player B on one row */
.casino-result-modal .casino-result-cols .casino-result-desc {
  margin-top: 18px;
}

.casino-result-modal .casino-result-cols .casino-result-cards {
  min-height: 55px;
}

/* rules modal images: centered, not stretched */
.casino-rules-img {
  display: block;
  max-width: 420px;
  width: 100%;
  margin: 6px auto 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* tridevexch mogambo: yellow "Total: X" pill above the Daga/Teja + Mogambo cards */
.Tp1Day .casino-video-cards .stream-total {
  color: #000;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 21.6px;
  margin: 0 0 4px;
  padding: 4px;
  background: rgba(255, 227, 0, 0.78);
  display: inline-block;
  border-radius: 3px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/* rules modal provider images (teen/mogambo/poison/joker): the legacy
   `.cc-rules img { height: 30px }` thumbnail rule squashes these big provider
   images — restore natural aspect ratio, centered, not distorted. Small card
   icons in Super Over / Cricket TV rules don't carry these classes, so they
   keep the 30px thumbnail treatment. */
.cc-rules img.casino-rules-img,
.cc-rules img.wd-100 {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
  margin: 6px auto 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* d247/tridevexch parity: dolidana Win/Loss dice rules widget (right sidebar) *//* d247/tridevexch parity: Win/Loss dice rules table under My Bet. Their
   widget is .sidebar-box + .sidebar-title (30px primary-blue bar, bold 14px
   h4) over a #f7f7f7 table with 30px dice faces — mirror it exactly. */
.doli-dana-rules .card-header {
  background-color: #0088cc;
  height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  border-radius: 3px 3px 0 0;
}
.doli-dana-rules .card-header .card-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.doli-dana-rules table.table,
.doli-dana-rules .table-responsive {
  background-color: #f7f7f7;
  margin-bottom: 0;
}
.doli-dana-rules td,
.doli-dana-rules th {
  text-align: center;
  vertical-align: middle;
  padding: 2px 6px;
}
.doli-dana-rules td img,
.doli-dana-rules th img {
  height: 30px !important;
  width: 30px !important;
  margin-right: 5px;
  vertical-align: middle;
}
.doli-dana-rules td img:last-child {
  margin-right: 0;
}

/* ============================================================================
   goal2 result modal — the soccer-ball card, ported verbatim from
   d247/tridevexch's stylesheet (.goal-result / .cricket20ballresult in
   d247-assets/css/style.css). Their goal2 modal shows the winning combination
   as a ball image with a "<Method> by <Player>" caption instead of the generic
   "Winner" box. Scoped to .casino-result-modal so nothing else can pick the
   absolutely-positioned caption up.
   ============================================================================ */
.casino-result-modal .goal-result img {
  height: 250px;
}

.casino-result-modal .goal-result span {
  position: absolute;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
  top: unset;
  left: 58%;
  bottom: -10px;
  color: #000;
  font-weight: bold;
  font-size: 15px;
  width: 60%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.casino-result-modal .cricket20ballresult {
  position: relative;
  width: auto;
  left: unset;
  top: unset;
  margin: 0;
  display: inline-block;
  animation: none;
}

/* Lucky 15's result is a cricket ball with the outcome over it. The reference
   sizes that ball from its own sheet — 150px wide at desktop, 50px with an
   11px caption on phones (d247 style.css .cricket20ballpopup img { width:150px }
   and the <=767px override { width:50px; span font-size:11px }). Without these
   the image painted at its natural size on a phone and the dialog measured
   390x230 against the reference's 390x115 (measured live 2026-10-30).
   `:not(.goal-result)` keeps goal2's 250px soccer ball out of the rule. */
.casino-result-modal .cricket20ballresult:not(.goal-result) img {
  width: 150px;
}

.casino-result-modal .cricket20ballresult:not(.goal-result) span {
  position: absolute;
  top: 50%;
  left: 40%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 26px;
}

@media (max-width: 767px) {
  /* The reference's phone dialog is 390x115 with a 50px ball and a 71px body:
     the ball sits 15px ABOVE its row (measured live 2026-10-30 — popup y=56
     while its row starts y=71, the row itself only 35 tall). Without the
     lift our copy measured 390x130. */
  .casino-result-modal .cricket20ballresult:not(.goal-result) {
    margin-top: -15px;
  }

  .casino-result-modal .cricket20ballresult:not(.goal-result) img {
    width: 50px;
  }

  .casino-result-modal .cricket20ballresult:not(.goal-result) span {
    font-size: 11px;
  }
}

/* ============================================================================
   Dialog sizes: tridev marks BOTH the casino result modal and the casino rules
   modal `modal-dialog modal-xl` (measured on tridevexch goal2, 2026-09-22:
   dialog rect 1140px wide inside a 1600px viewport; the rules dialog is the
   same `modal-xl` with a 1140px body). Our bootstrap is BS4 build, which ships
   `.modal-dialog { max-width: 500px }` but has no `modal-xl` rule at all, so a
   500px box was what desktop users got - the "looks like mobile" report.
   BS4's own values, added here because the class alone does nothing:
     >=992px  -> 800px
     >=1200px -> 1140px
   ============================================================================ */
@media (min-width: 992px) {
  .modal-dialog.modal-xl {
    max-width: 800px;
  }
}

@media (min-width: 1200px) {
  .modal-dialog.modal-xl {
    max-width: 1140px;
  }
}

/* The RESULT dialog's top offset — the same 5% trap the rules modal had.
   style.css:7416 `.modal-content { margin-top: 5% }` is 57px at this dialog's
   1140px width, and because `.modal-dialog` has neither a border nor padding
   that child margin COLLAPSES straight through it, so the whole dialog sat at
   y=57 where the reference's is at y=24 (measured 2026-09-24, /casino/lucky5:
   theirs dialog [230,24,1140,283] header [230,24,1140,50]; ours
   dialog [230,57,1140,283] header [230,57,1140,50] — same size, shifted 33px).
   Zeroing the content margin alone leaves BS4's own `margin: 1.75rem auto` =
   28px, so the dialog also takes the reference's own top offset.

   That offset is `1vh`, NOT a fixed length: d247's stylesheet has
   `.modal-dialog { margin: 1vh auto }` (style-d247.css:1735), which is why the
   two earlier measurements of the same dialog disagreed — 24px at a 2400px-tall
   capture and 12px at 1200px. Pinning 24px matched only the tall capture and
   left every desktop dialog 12px lower than the reference at 1200 (measured
   2026-10-25: TD result dialog y=12, ours y=24, same 157px height; TD rules
   dialog y=12, ours y=24, same 1152px height). */
.casino-result-modal .modal-dialog {
  margin: 1vh auto;
}

.casino-result-modal .modal-content {
  margin-top: 0;
}

/* Ported from d247 (style.css:3204): the rules body scrolls inside the dialog
   instead of stretching it past the viewport. Their live rules body measures
   98vh-120px, which is what this is. */
.rules-modal .modal-body {
  max-height: calc(98vh - 120px);
  overflow-x: hidden;
  overflow-y: auto;
}

/* The reference's own global `.modal-body` box (d247-assets/css/style.css:1746)
   and its <=767px form (responsive.css:1064), applied to our casino result
   dialog so the two dialogs are the same size as well as the same shape.
   Measured on goal2 at 1600x2400: their result body is 1140x302 with 10px
   padding (ours was 1140x313 with bootstrap's 16px), and 10px is the difference
   between a 352px and a 362px dialog. Kept off `.rules-modal` because their
   rules body is the 98vh-120px box above. */
.casino-result-modal .modal-body {
  max-height: calc(98vh - 50px);
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
}

@media only screen and (max-width: 767px) {
  .casino-result-modal .modal-body {
    max-height: calc(100vh - 44px);
    padding: 0;
  }
}

/* ============================================================================
   Casino RULES dialog body, two panes: sport sidebar + the active sport's pane.
   Ported from the reference's own rules (`d247-assets/css/style.css:3137-3176`
   and `responsive.css:1196-1216` for the <=767px form, where the sidebar goes
   full width and its nav becomes one horizontally scrolling row) and then
   reconciled against the LIVE dialog, measured 2026-09-22 at 1600px on goal2:
     dialog `modal-dialog modal-xl` 1140px, body padding 10px, flex/wrap,
     sidebar 224px (20%) at #cccccc with #000 links, content 896px (80%),
     active tab `--bg-primary` #0CA1F8 on `--text-primary` #FFFEFE,
     pane title `--bg-secondary` #0470A5 on #fff, 18px bold, 5px 10px.
   NOTE their runtime palette (#0CA1F8 / #0470A5) is NOT the #0088cc / #2c3e50
   in their style.css :root — the live theme overrides it — so these are the
   measured live values, not the file's variables.
   The link box is deliberately NOT overridden: the reference sets only colour
   and border on `.nav .nav-item a`, so bootstrap's own `.nav-link` box applies
   there and here alike (measured 16px left padding, 16px font on both).
   The pane markup is the reference's own, shipped verbatim in
   /rules/casino-sport-rules.json.
   ============================================================================ */
.rules-modal .modal-body.sport-rules-body {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  padding: 10px;
}

/* ----------------------------------------------------------------------------
   Rules / result dialog TEXT BOX — ported from the reference's computed values,
   measured on tridev's live goal2 dialogs 2026-09-22 at 1600px (both dialogs,
   via goal2-result-deep.mjs + goal2-rule-find.mjs):

     property        ours              tridev
     line-height     15px              24px
     body colour     #444              #000
     td padding      4.8px 12px        5px 5px
     td borders      1px all round     1px left/right, 0 top/bottom
     td align        top               middle
     .text-danger    #dc3545           #bd1828
     nav-link fill   #0888cc           transparent (#cccccc sidebar)

   24px is not an arbitrary number: it is bootstrap's own `body { line-height:
   1.5 }` at the 16px font, which tridev keeps and our site-wide `html/body {
   line-height: 15px }` overrides everywhere — that override is what crushed the
   rules pane (2197px against their 2553px for identical text) and shrank the
   result bar's line boxes to 15px.

   The table box is their own rule (`d247-assets/css/style.css:1820`):
     .modal .table td, .modal .table th {
       padding: 5px; font-size: 16px; white-space: nowrap; vertical-align: middle;
     }
     .modal.rules-modal .table td, .modal.rules-modal .table th { white-space: normal }
   and `.text-danger` is their `--text-danger: #bd1828` (style.css:34,741).

   Only the text inside `.rules-content` is retargeted — NOT the whole modal
   body — because the sport sidebar's own line-height already measured equal to
   tridev's (same 39 tabs, same box heights), and widening it would push the
   sidebar past their measurements.
   ---------------------------------------------------------------------------- */
.rules-modal .rules-content,
.casino-result-modal .modal-body {
  line-height: 1.5;
  color: #000;
}

.rules-modal .modal-body .table td,
.rules-modal .modal-body .table th {
  padding: 5px;
  font-size: 16px;
  white-space: normal;
  vertical-align: middle;
  border: 0;
  border-left: 1px solid #c7c8ca;
  border-right: 1px solid #c7c8ca;
  /* Our global `style.css:7978 .table { line-height: normal }` flattens every
     rules cell to a 19px line box; tridev's cells inherit the body's 1.5 and
     measure 24px. Measured per-row on goal2 2026-09-22: our 5-row table 183px
     (rowHeights 29/29/29/48/48) against their 224px (35/35/35/59/59), i.e.
     10 + 19n against their 11 + 24n — 456px across the pane's three tables.
     The `1.5` also reaches the `<span>` inside each cell, which is how their
     spans read 24px too. */
  line-height: 1.5;
}

/* The horizontal rule between rows lives on the ROW, not the cell: measured on
   tridev's live rules table, `tr` computes border-top/bottom `1px solid
   rgb(199,200,202)` while `td` computes 0 on both (its left/right 1px is what
   we already ported). With `border-collapse: collapse` that is exactly the 1px
   per row we were short — their rows 35/59/83/… against our 34/58/82/…, table
   224 against 218 — and it is a visible separator, so leaving it out was a real
   difference, not a rounding artefact. */
.rules-modal .modal-body .table tr {
  border-top: 1px solid #c7c8ca;
  border-bottom: 1px solid #c7c8ca;
}

/* bootstrap's `.text-danger { color: #dc3545 !important }` is what we were
   showing; the reference overrides it with `--text-danger` (!important too). */
.rules-modal .modal-body .text-danger {
  color: #bd1828 !important;
}

/* The reference's sidebar link fill measures rgb(204,204,204) — the sidebar's
   own colour. Ours picked up `style.css:9637 .nav-pills .nav-link {
   background-color: var(--bg-sidebar) }` = the site blue #0888cc, so every
   sport row was painted blue instead of grey. Measured, not guessed. */
.rules-modal .rules-left-sidebar .nav .nav-item a {
  background-color: #cccccc;
}

.rules-modal .rules-left-sidebar {
  background-color: #cccccc;
  width: 20%;
  color: #000000;
  min-height: calc(98vh - 70px);
  overflow-x: hidden;
  overflow-y: auto;
}

.rules-modal .rules-left-sidebar .nav {
  display: block;
  padding: 0;
}

.rules-modal .rules-left-sidebar .nav .nav-item {
  width: 100%;
}

.rules-modal .rules-left-sidebar .nav .nav-item a {
  display: block;
  color: #000000;
  border-bottom: 1px solid #000000;
  border-right: 0;
  border-radius: 0;
  cursor: pointer;
}

.rules-modal .rules-left-sidebar .nav .nav-item a.active {
  background-color: #0ca1f8;
  color: #fffefe;
}

.rules-content {
  width: 80%;
  padding: 0 5px;
}

.rules-content-title {
  background-color: #0470a5;
  color: #ffffff;
  padding: 5px 10px;
  font-size: 18px;
  font-weight: bold;
}

.rules-content-desc {
  padding: 10px;
}

@media only screen and (max-width: 767px) {
  .rules-modal .rules-left-sidebar {
    width: 100%;
    min-height: unset;
    margin-top: 5px;
  }

  .rules-modal .rules-left-sidebar .nav {
    display: flex;
    flex-wrap: nowrap;
    overflow: auto;
  }

  .rules-modal .rules-left-sidebar .nav .nav-item {
    width: auto;
    flex: 1 1 auto;
    white-space: nowrap;
  }

  .rules-content {
    width: 100%;
    margin-top: 10px;
  }
}

/* ============================================================================
   Casino RULES dialog — header, close control and top offset, ported from
   d247's live box (measured 2026-09-22 at 1600x2400 on goal2 with
   tmp-browser/d247-rules-header.mjs and tmp-browser/mg-goal2-rules-dom.mjs).

   d247, measured:
     dialog   `.modal-dialog.modal-xl` 1140px, margin 24px auto, y = 24
     header   58px tall, padding 10px, background rgb(0,136,204) = #0088CC,
              colour #FFF, font-size 16px, display flex, align-items center,
              justify-content space-between, no border, no radius
     title    `.modal-title.h4` — 20px / 700 / #FFF / margin 0
     language `.rules-langualge` (their spelling), margin-right 20px, holding a
              `button.dropdown-toggle.btn` with flag_english.png + "English"
     close    `button.btn-close` — 32x32 at the right end, padding 8px,
              border-radius 4px, margin -8px -8px -8px 0
     content  `.modal-content` with NO top margin

   Ours before this block:
     dialog   y = 57 with a 44px header on the theme colour, because our global
              `.modal-header` (style.css:103) paints the theme background and
              stops at 44px, and because style.css:7416
              `.modal-content { margin-top: 5% }` adds 5% of the 1140px dialog
              width = 57px. That 5% is what put the dialog 33px below d247's — it
              was never the dialog's own margin, which is why setting that to
              zero in an earlier attempt changed nothing.

   The dialog's 24px top offset and the overlay's scroll box are set on the
   component (CasinoRulesDetail's `style` prop), because react-modal writes the
   overlay's defaults as inline styles. Our Bootstrap is BS4, which has no
   `.btn-close` and no `.modal-title.h4`, so both are defined here.
   ============================================================================ */

.rules-modal .modal-content {
  /* style.css:7416 sets `margin-top: 5%` for every dialog; d247's rules dialog
     has no content margin, and 5% of 1140px is the 57px offset this removes. */
  margin-top: 0;
}

.rules-modal .modal-header {
  height: 58px;
  padding: 10px;
  background: #0088cc;
  color: #fff;
  border: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rules-modal .modal-header .modal-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin: 0;
}

.rules-modal .modal-header .rules-langualge {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0 20px 0 0;
}

.rules-modal .modal-header .rules-langualge .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.rules-modal .modal-header .rules-langualge .btn:hover,
.rules-modal .modal-header .rules-langualge .btn:focus {
  background: rgba(255, 255, 255, 0.12);
}

.rules-modal .modal-header .rules-langualge .btn img {
  display: block;
  width: 24px;
  height: 16px;
}

/* BS4 ships no `.btn-close`; d247's is Bootstrap 5's 32x32 X on the blue bar. */
.rules-modal .modal-header .btn-close {
  box-sizing: content-box;
  width: 16px;
  height: 16px;
  padding: 8px;
  margin: -8px -8px -8px 0;
  border: 0;
  border-radius: 4px;
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e")
    center/1em auto no-repeat;
  opacity: 0.9;
  cursor: pointer;
}

.rules-modal .modal-header .btn-close:hover {
  opacity: 1;
}

/* ============================================================================
   Casino GAME rules dialog — the game's OWN rules, not the site's.

   Measured on tridevexch.com 2026-09-23 (tmp-browser/td-rules-batch.mjs), by
   clicking the IN-PAGE Rules control beside the game name — the one a user
   clicks. It is a different dialog from the top-bar site-rules one:

     property        site rules (CasinoSportRules)   game rules (this block)
     dialog          modal-dialog modal-xl 1140px    modal-dialog modal-lg 800px
     header height   58px                            50px
     header title    "Rules"                         "Goal 2 Rules" / "Poker 1-Day Rules"
     language box    yes (flag + English)            NO
     body            10px pad, 98vh-120px scroll     10px pad, 100vh-98px scroll
     content         sport sidebar + pane            provider HTML (own <style>)

   Measured dialog rect at 1600x2400: [400, 24, 800, 1674] with margin 24px auto;
   header [400, 24, 800, 50] bg rgb(12,161,248); title 20px/700 #FFFEFE; close
   32x32 `.btn-close` opacity 1; body [400, 74, 800, 1624] max-height 2302px =
   2400 - 98, i.e. 100vh - (24px margin x2 + 50px header).
   ============================================================================ */

.rules-modal.game-rules-modal .modal-content {
  background: #fff;
  border: 0;
  border-radius: 0;
}

/* BS4's `.modal-lg` is 800px from 992px up; pinned explicitly so a theme rule
   cannot silently resize this dialog, and kept off small screens where BS4's
   own stacking rules apply (the reference ships the same plain class list). */
@media (min-width: 992px) {
  .modal-dialog.modal-lg.game-rules-modal {
    max-width: 800px;
  }
}

.rules-modal.game-rules-modal .modal-header {
  height: 50px;
  padding: 10px;
  background: #0ca1f8;
  color: #fff;
  border: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rules-modal.game-rules-modal .modal-header .modal-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin: 0;
}

.rules-modal.game-rules-modal .modal-header .btn-close {
  opacity: 1;
}

.rules-modal .modal-body.game-rules-body {
  padding: 10px;
  /* 100vh minus the dialog's own top+bottom offset (2 x 1vh, the reference's
     `.modal-dialog { margin: 1vh auto }`) and the 50px header — i.e. the body
     always fills what is left of the viewport. The old `100vh - 98px` baked in
     a 24px margin and therefore under-sized the body by exactly the difference
     at any viewport that is not 2400px tall (measured 2026-10-25 at 1600x1200:
     TD body 800x1126, ours 800x1102). */
  max-height: calc(100vh - 50px - 2vh);
  overflow-x: hidden;
  overflow-y: auto;
  color: #000;
}

/* The line-height the game-rules BODY was missing.

   The 1.5 above reaches `.rules-content` (the sport pane) and the result modal,
   but the provider's own game rules (goal / goal2 / dolidana / lucky5) render
   into `.modal-body.game-rules-body`, which was left inheriting the site-wide
   `html/body { line-height: 15px }`. Measured 2026-09-24 on /casino/lucky5:
   the reference's rules dialog is [400,24,800,704] with a 654px body; ours was
   [400,24,800,496] with a 446px body for character-identical text (textContent
   2628 = 2628) — a 1.5x ratio, exactly. The provider's tables need their own
   rule too, because `style.css:7978 .table { line-height: normal }` outranks
   the wrapper. */
.rules-modal .modal-body.game-rules-body {
  line-height: 1.5;
}

.rules-modal .modal-body.game-rules-body .table td,
.rules-modal .modal-body.game-rules-body .table th {
  line-height: 1.5;
}

/* The provider's HTML brings its own <style> for `.rules-section` (colours,
   card widths, scrollbar). What it does NOT bring is the box it sits in, so the
   text alignment and image sizing are set here. */
.rules-modal .casino-game-rules .rules-section {
  text-align: left;
  margin-bottom: 10px;
  /* The provider's `<style>` block brings the margin but not this padding; the
     reference paints it from its own sheet at BOTH widths (measured 2026-10-22
     on btable: `.rules-section` `padding: 0px 20px` at 390 AND at 1600, so its
     100% column is 340px wide inside our 380). Without it every rules line sat
     20px left of the reference's at 1600 and flushed to the phone's edges at
     390, where the first list item wrapped to 2 lines against the reference's
     3 and the dialog came out 18px short. */
  padding: 0 20px;
}

.rules-modal .casino-game-rules .rules-section img {
  max-width: 100%;
}

/* …but the reference does NOT cap them everywhere. Its main sheet carries
   `.rules-section img { max-width: 300px }` and SOME of its casino pages load a
   second sheet that re-declares it `max-width: 100%`; which one wins is a
   property of the page, not of the markup (which is byte-identical — teen6 and
   teenunique ship the SAME `<img class="img-fluid">` and the same teen6.jpg).
   Measured on tridevexch 2026-10-22, one run each, dialog height + image width:

     teen6       800x1961   image 506x866  (natural — uncapped)
     teen20      800x2352   image 506x866  (natural — uncapped)
     teenunique  800x771    image 300x513  (capped)
     joker1      800x1157   images 300 wide (capped)

   So the cap is applied per game, keyed on the `game-rules-<slug>` class the
   dialog carries. Without it teenunique's schematic painted 740x866 and its
   dialog came out 1137 tall against 771; capping every game instead made teen6
   353px short of the reference. */
.rules-modal.game-rules-teenunique .casino-game-rules .rules-section img,
.rules-modal.game-rules-joker1 .casino-game-rules .rules-section img,
.rules-modal.game-rules-joker120 .casino-game-rules .rules-section img {
  max-width: 300px;
}

/* The reference's heading scale (its sheet: `h4 { font-size: 20px; font-weight:
   400; margin-bottom: 0 }`, `h6 { margin-bottom: 0 }`; ours is Bootstrap's
   24px/500 with a .5rem margin). Measured 2026-10-22: teenunique's "Standard
   Rules" h4 is 24px tall there against our 29px plus 8px of margin, and each
   of dum10's two `.rules-highlight` h6 blocks carries 8px less there — the
   whole 16px the dum10 dialog was too tall. Scoped to the provider's rules
   markup so the app's own headings are untouched. */
.rules-modal .casino-game-rules .rules-section h4 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 0;
}

.rules-modal .casino-game-rules .rules-section h5 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 0;
}

.rules-modal .casino-game-rules .rules-section h6 {
  margin-bottom: 0;
}

/* The provider's rules lists are written as `ul.pl-4 pr-4.list-style`. On the
   reference those utilities resolve to ZERO padding (their stylesheet resets
   them), so the body text starts flush at the body's 10px inset and the dialog
   measures 800x755 on btable. Ours applied Bootstrap's `.pl-4`/`.pr-4`
   (1.5rem = 24px), which pushed every line 24px right and re-wrapped the rows:
   measured 2026-10-22 on /casino/btable, first `ul` 306px tall against the
   reference's 303, dialog 746 against 755. Zeroing the two utility paddings
   inside the game rules restores the reference's line boxes.

   `!important` because Bootstrap 4's own spacing utilities are themselves
   `!important` (`style.css: .pl-4 { padding-left: 1.5rem !important }`) —
   without it this rule loses the cascade and the 24px stands (measured: it did
   exactly that on the first attempt). */
.rules-modal .casino-game-rules .rules-section ul.pl-4,
.rules-modal .casino-game-rules .rules-section ul.pr-4 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Same story for the provider's `.ml-1` (and its spaced siblings) inside these
   rules: on the reference they resolve to 0px, while our stylesheet maps `.ml-1`
   to 10px. Measured 2026-10-22 on the btable `.cards-box`: reference 182.37px
   wide with the card span's margin-left 0, ours 192.39px with 10px — the whole
   box sat 10px wider than the reference. Zeroed only inside the provider's
   rules markup so our own `.ml-1` (boards, bet slip) keeps its spacing. */
.rules-modal .casino-game-rules .rules-section .ml-1 {
  margin-left: 0 !important;
}

/* The provider's HTML does NOT bring these two: the reference paints the rules
   text's own highlight spans from ITS stylesheet —
     `.rules-section .rules-highlight     { color: var(--bg-primary) !important;
                                            font-weight: bold; font-size: 18px !important }`
     `.rules-section .rules-sub-highlight { color: var(--bg-primary) !important;
                                            font-size: 16px !important; font-weight: bold !important }`
   (its style.css:4939/4945). Our sheets carried NEITHER, so the provider's
   inline <style> block won the cascade — and that block says `#FDCF13` at 14px,
   i.e. the provider's own yellow. Measured 2026-10-16 with element-probe.mjs on
   /casino/aaa (the user's "rules are not updated correctly" report):

     `.rules-sub-highlight`   TD rgb(12,161,248) 16px   ours rgb(253,207,19) 14px
     `.rules-section`         TD 780x82 / 780x430       ours 780x82 / 780x430  (equal)
     dialog title + body text identical (6551-char body, 2 sections, both slugs)

   So the rules CONTENT was already byte-identical to the reference and the
   remaining difference was this styling: every heading (EVEN/ODD/RED/… in aaa,
   and the same classes in the teen/lucky5/roulette/card32 bodies) rendered in the
   provider's yellow at 14px instead of the site blue at 16px.

   The colour is written literally instead of `var(--bg-primary)`: the reference's
   own theme.css carries #0088CC, but tridevexch's runtime palette resolves
   `--bg-primary` to #0CA1F8 — the same blue our own game-rules `.modal-header`
   paints — and no sheet of ours declares the variable, so `var(--bg-primary)`
   here would resolve to nothing. Kept `!important` because that is what beats
   the inline block, exactly as it does on the reference. */
.rules-modal .casino-game-rules .rules-section .rules-highlight {
  color: #0ca1f8 !important;
  font-weight: bold;
  font-size: 18px !important;
}

.rules-modal .casino-game-rules .rules-section .rules-sub-highlight {
  color: #0ca1f8 !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

/* The same dialog on a PHONE, measured on the reference 2026-10-22
   (`VW=390 node tmp-browser/td-rules-frame.mjs btable`): dialog 390x618,
   header 390x44, body 390x574 with padding 0 and 12px/18px text — i.e. the
   reference's page-wide phone base font (12px/1.5), which this app does not
   adopt globally (see the tracker note: it would change every board). Ours
   measured 390x806 / header 50 / body 756 at 16px/24px with 10px padding.
   Scoped to the game-rules dialog only, since that is the surface being
   compared here; the header drops its fixed 50px and resolves to its own
   10px padding + 24px title, which IS the reference's 44px. */
@media (max-width: 767.98px) {
  .rules-modal.game-rules-modal .modal-header {
    height: auto;
  }

  .rules-modal .modal-body.game-rules-body {
    padding: 0;
    font-size: 12px;
  }

  /* CasinoRulesDetail pins the desktop 24px top offset as an INLINE style (the
     reason that lives on the component: react-modal writes the overlay defaults
     inline). The reference's phone dialog starts at y=0, so the inline margin
     has to be beaten from a sheet — `!important` is what does it. */
  .rules-modal.game-rules-modal {
    margin: 0 auto !important;
  }
}

/* ============================================================================
   Result dialog frame — dolidana, measured on tridevexch 2026-09-24.

   Reference (`modal-dialog modal-xl`, opened by clicking any round badge in
   `.casino-last-results`):
     header  [251,-41,1140,50]  bg rgb(12,161,248)  padding 10px
             display flex · justify-content space-between · align-items center
             border-bottom 0 · border-radius 0
     title   `.modal-title`  20px / 700 / #FFFEFE · margin 0 · height 30
     close   `button.btn-close`  32x32 · padding 8px
     body    `.modal-body`  padding 10px · colour #000
     class census inside the dialog: 6x .casino-result-desc-item, 2x .col-md-6,
       .casino-result-modal, .casino-result-round-id, .casino-result-cards,
       .casino-result-desc

   Ours before this block: a 49px header painted with the THEME blue (#0088cc)
   instead of the runtime palette the reference uses for its dialogs, because the
   global `.modal-header` (style.css:103) paints the theme background and stops
   at 44px, and the title had no `.modal-title` class at all so nothing sized it.
   ============================================================================ */

/* BS4 has no `.btn-close` (it is `.close`), so the reference's close button has
   to be defined here or it renders as the browser default. */
.modal.casino-result-modal .modal-header .btn-close {
  width: 32px;
  height: 32px;
  padding: 8px;
  margin: -8px -8px -8px auto;
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFFEFE'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707A1 1 0 0 1 .293.293z'/%3e%3c/svg%3e")
    center / 16px no-repeat;
  border: 0;
  border-radius: 4px;
  opacity: 1;
  cursor: pointer;
}

.modal.casino-result-modal .modal-header {
  height: 50px;
  padding: 10px;
  /* The runtime palette the reference uses for its casino dialogs — NOT the
     #0088cc site theme its own stylesheet defines. */
  background: #0ca1f8;
  color: #fffefe;
  border: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal.casino-result-modal .modal-header .modal-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #fffefe;
  margin: 0;
}

.modal.casino-result-modal .modal-body {
  padding: 10px;
  color: #000;
}

/* The reference's OWN phone rules for this dialog, read from its stylesheet
   (2026-10-22, `node tmp-browser/td-css-rules.mjs --slug=btable
   --pat=casino-result`):

     @media only screen and (max-width: 767px) {
       .casino-result-modal .casino-result-cards img { height: 35px; }
       .casino-result-modal { padding: 5px; }
     }

   plus the page-wide 12px/1.5 phone base those dialogs inherit, which this app
   does not adopt globally. Measured on the reference at 390x900: dialog
   390x240, header 44 (10px padding + its 24px title), body 390x196 padding 0,
   desc row 18px, card 28x35, root padding 5px. Ours was 390x355 with a 50px
   header, 10px body padding, 16px/24px text, 24px rows, 40x50 cards and no
   root padding.

   Placed at the END of this sheet on purpose: it has to outrank the desktop
   `.modal.casino-result-modal …` declarations above (equal specificity, so
   source order decides) — the same trap that had left the earlier `padding: 0`
   phone body rule inert at line ~2225. */
@media only screen and (max-width: 767px) {
  .modal.casino-result-modal .modal-header {
    /* 10px padding + the 20px/1.2 title's 24px line box = the reference's 44px */
    height: auto;
  }

  .modal.casino-result-modal .modal-dialog {
    /* the reference's phone dialog sits at y=0, not at the desktop 24px */
    margin: 0 auto;
  }

  .modal.casino-result-modal .modal-body {
    /* 5px, not 0. The reference's phone body measures padding 0 but its content
       sits inside the provider's own `.casino-result-modal` wrapper, which
       carries `padding: 5px` (style-d247.css:10547) — so the round-id starts
       5px in and 5px down, and the body is 5+18+8+40+5 = 76 tall. We have no
       such wrapper, so the padding goes on the body itself (measured
       2026-10-25 at 390x844: TD body 390x76, round-id [5,49,380,18], artwork
       [173,80,45,35]; ours with padding 0 was 390x66, round-id [0,44,390,18],
       artwork [173,75,45,35]). */
    padding: 5px;
    font-size: 12px;
  }

  /* The provider wrapper must NOT add its own 5px here. The reference's phone
     sheet pads `.casino-result-modal` (style-d247.css:10547) and its BODY
     carries padding 0, so the round-id starts 5px in. We split the same inset
     the other way — body 5px (rule above), inner wrapper 0 — because most of
     the fan's result branches wrap their body in `<div class="casino-result-modal">`
     (resultRoot in CasinoController). Padding BOTH sides counted the inset
     twice: measured 2026-10-30 at 390x844 on lucky7eu, ours rendered a
     390x250 dialog with round-id [10,54,370] against the reference's 390x240
     with [5,49,380]. Families whose body arrives without the wrapper (lucky5,
     baccarat's older branches) are unaffected either way. */
  .modal.casino-result-modal .modal-body > .casino-result-modal {
    padding: 0;
  }

  .modal.casino-result-modal .casino-result-cards img {
    height: 35px;
  }

  /* The reference's phone heading scale is 16px/1.2 with no margin (measured
     2026-10-22 on trap at 390: `.result-title` 16px/19.2, margin 0), where the
     desktop rule above carries its 20px h4 scale down. Our 4px top margin was
     doubling on trap's two columns and making that dialog 8px too tall. */
  .modal.casino-result-modal .result-title {
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
  }

  /* Unique Teenpatti's slots at 390 (measured on the same reference run): card
     40x80, s-icon 25x25, face 40x50, with the desktop 10px gap kept. Without
     these the desktop 80x135 slots put three cards per row over two rows and the
     dialog measured 385px against the reference's 175. */
  .casino-result-modal .casino-result-cards.unique-teen20-box .unique-teen20-card {
    width: 40px;
    height: 80px;
  }

  .casino-result-modal .casino-result-cards.unique-teen20-box .unique-teen20-card img:first-child {
    width: 25px;
    height: 25px;
  }

  .casino-result-modal .casino-result-cards.unique-teen20-box .unique-teen20-card img:last-child {
    width: 40px;
    height: 50px;
  }
}

/* The reference's PHONE values for the game-rules dialog, all measured on
   tridevexch at 390x900 on 2026-10-22 (dum10, trap, teenunique):

     - `h4` is 16px/1.2 (the reference's phone heading scale), against the 20px
       we carry down from the desktop rule above — teenunique's has 24px there
       against our 29px.
     - table cells are 12px/18px, inheriting the reference's page-wide phone
       base font, so dum10's table is 204px tall there against our 246px (its
       cells stay at the desktop 16px/24px in our app, which does not adopt that
       base globally).
     - the body's scroll cap is `100vh - 30px` there (dialog 914px tall at a
       900px viewport), not the desktop `100vh - 98px`: dum10's two sections
       total 926px and the reference lets the page scroll, while ours clipped at
       802px and came out 68px shorter.

   Equal specificity to the desktop rules, so these win on source order. */
@media only screen and (max-width: 767px) {
  /* The per-game 300px cap is a DESKTOP value: the reference's phone dialogs
     paint the schematic at the body's full width (measured 2026-10-22 on
     teenunique at 390: image 350 wide, 599 tall). */
  .rules-modal.game-rules-teenunique .casino-game-rules .rules-section img,
  .rules-modal.game-rules-joker1 .casino-game-rules .rules-section img,
  .rules-modal.game-rules-joker120 .casino-game-rules .rules-section img {
    max-width: 100%;
  }

  .rules-modal .casino-game-rules .rules-section h4 {
    font-size: 16px;
    line-height: 1.2;
  }

  .rules-modal .casino-game-rules .rules-section .table td,
  .rules-modal .casino-game-rules .rules-section .table th {
    font-size: 12px;
    line-height: 18px;
  }

  .rules-modal .modal-body.game-rules-body {
    max-height: calc(100vh - 30px);
  }
}
