/* ============================================================================
   Benjamin kit: one look for every MYBC-provider original on the Benjamin brand.

   Source: the finished Benjamin skin of Blackjack (frontends/blackjack/styles.css,
   ":root.brand-benjamin" block), itself built on the Benjamin.bet site tokens
   (welldone-front-go src/lib/brand/benjamin/tokens.css). Blackjack keeps its own
   copy until its PR merges; every other game loads this file.

   Load it BEFORE the game's own styles.css (its rules win over the base sheet by
   their :root.brand-benjamin scope; the game's own Benjamin fit, written after it
   at the same scope, refines it):
     <link rel="stylesheet" href="../benjamin-kit/benjamin.css?v=kit-1">
     <link rel="stylesheet" href="styles.css?v=...">
   The big win overlay is fetched only on the Benjamin brand, for example:
     script.src = "../benjamin-kit/benjamin-big-win.js?v=kit-1"
   Served at /benjamin-kit/ (frontends/Dockerfile copies the folder, nginx serves it
   from the frontends root; scripts/build-pages.sh copies it into dist/).

   Scope: every rule sits under :root.brand-benjamin (the class the games already
   put on <html> once the server names the brand), so mybc, setantabet, aviator and
   the neutral loading state never match anything here.

   What is in it, in order:
     1  faces and tokens          site primitives, the games' base tokens remapped
     2  ground and type           vault black, one soft green pool, Inter everywhere
     3  top bar                   round icon buttons, History pill, menu, result dots
     4  balance                   coin + number (currency once); .bn-top-balance on phones
     5  panel                     .m-controls card, 24px radius, 12px inset, rows
     6  buttons                   .bn-btn-primary (site green), .bn-btn-secondary (tile)
     7  bet row                   .bn-bet-ctl: five separate 12px cells, 8px gap
     8  choices                   .bn-choice-group / .bn-choice (risk, difficulty, mode)
     9  ladder                    the shared MultiplierTimeline (.mt-timeline / .mt-chip)
    10  result language           .bn-pill (+ --win/--push/--loss), cashout pill, gain chip
    11  play surface light        .bn-res on the surface: .bn-trim-lit (svg), .bn-felt-bloom,
                                  .bn-lit-edge (any rounded box)
    12  sheets                    drawers, history, provably fair, how to play, loading
    13  typed bet field           .bn-bet-field (the value cell as an input)
   Radius system (concentric): panel 24, things on its 12px inset 12, small 8, pills 999.
   No gold, no mascot, no halo or blur effects, no em or en dashes in copy.
   ========================================================================== */

/* ── 1  Faces and tokens ── */
@font-face {
  font-family: 'Benjamin Inter';
  src: url('fonts/inter-latin-wght-normal.woff2?v=1') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Benjamin Unbounded';
  src: url('fonts/unbounded-latin-wght-normal.woff2?v=1') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}
:root.brand-benjamin {
  /* site primitives */
  --bn-ground-0: #0b0d0c;
  --bn-ground-1: #161a18;
  --bn-ground-2: #202522;
  --bn-ground-3: #2a302c;
  --bn-recess: #121514;
  --bn-seal: #1f6f4a;
  --bn-cream: #ede7d3;
  --bn-paper: #f6f2e6;
  --bn-ink: #0b1f17;
  --bn-text-muted: #a9b1ac;
  --bn-text-meta: #959d98;
  --bn-disabled: #59615c;
  --bn-primary: #28c775;
  --bn-primary-hover: #2fd17c;
  --bn-primary-press: #17a75d;
  --bn-primary-fill: linear-gradient(180deg, #34d683 0%, #1db868 100%);
  --bn-primary-fill-hover: linear-gradient(180deg, #45e293 0%, #26c673 100%);
  --bn-mint: #8debb6;
  --bn-selected: #173a2b;
  --bn-selected-edge: #35a06c;
  --bn-error: #f2806b;
  --bn-error-tint: rgba(242, 128, 107, 0.14);
  --bn-pending: #f5d565;
  --bn-positive-tint: rgba(141, 235, 182, 0.12);
  --bn-line: rgba(237, 231, 211, 0.12);
  --bn-line-2: rgba(237, 231, 211, 0.24);
  --bn-line-3: rgba(237, 231, 211, 0.36);
  --bn-edge: inset 0 0 0 1px rgba(237, 231, 211, 0.12);
  --bn-lift: 0 24px 64px -24px rgba(0, 0, 0, 0.7);
  /* site semantic aliases (the result language) */
  --c-win: #28c775;
  --c-pending: #f5d565;
  --c-error: #f2806b;

  /* the games' base tokens, remapped (shared template names) */
  --bg: #0b0d0c;
  --bg-secondary: #161a18;
  --surface-default: #202522;
  --surface-raised: #2a302c;
  --surface-overlay: #0b0d0c;
  --border-default: rgba(237, 231, 211, 0.12);
  --border-strong: rgba(237, 231, 211, 0.24);
  --content-primary: #ffffff;
  --content-secondary: #ede7d3;
  --content-tertiary: #959d98;
  --content-disabled: #59615c;
  --content-inverse: #0b1f17;
  --brand-primary: #28c775;
  --brand-rgb: 40, 199, 117;
  --brand-secondary: #17a75d;
  --brand-highlight: #2fd17c;
  --brand-border: #35a06c;
  --action-primary: #28c775;
  --action-rgb: 40, 199, 117;
  --action-secondary: #17a75d;
  --action-text: #0b1f17;
  --status-success: #8debb6;
  --status-success-strong: #28c775;
  --status-success-rgb: 141, 235, 182;
  --status-error: #f2806b;
  --status-error-rgb: 242, 128, 107;
  --shadow-neutral: #0b0d0c;
  --brand: #28c775;
  --red: #f2806b;
  --green: #8debb6;
  --amber: #f5d565;
  --tx: #ffffff;
  --tx2: #ede7d3;
  --tx3: #959d98;
  --card: #161a18;
  --card2: #202522;
  --elev: #202522;
  --brd: rgba(237, 231, 211, 0.12);
  --brd2: rgba(237, 231, 211, 0.24);
  --blue: #28c775;
  --purple: #28c775;
  --font-primary: 'Benjamin Inter', 'Inter', system-ui, sans-serif;
  --font-mono: 'Benjamin Inter', 'Inter', system-ui, sans-serif;
  --font-display: 'Benjamin Unbounded', 'Unbounded', 'Benjamin Inter', sans-serif;
}

/* ── 2  Ground and type: flat vault black with one soft pool of light where the
   play surface stands. No pattern, no frame. ── */
:root.brand-benjamin,
:root.brand-benjamin.is-loading,
:root.brand-benjamin.is-loading body,
:root.brand-benjamin .loading-screen {
  background: #0b0d0c;
}
:root.brand-benjamin {
  /* The game ground: the site's vault black with a faint green light behind the play area. */
  --bn-room:
    radial-gradient(56% 48% at 50% 40%, rgba(31, 111, 74, 0.20) 0%, rgba(31, 111, 74, 0.06) 55%, rgba(11, 13, 12, 0) 78%),
    #0b0d0c;
}
:root.brand-benjamin body {
  background: var(--bn-room);
  font-family: var(--font-primary);
}
/* One sans everywhere (the base sheets hardcode their face per element). */
:root.brand-benjamin body * { font-family: var(--font-primary); }
/* ...except the big win overlay, which sets its own faces (benjamin-big-win.js). */
:root.brand-benjamin body .bnbw,
:root.brand-benjamin body .bnbw * { font-family: var(--num); }
:root.brand-benjamin body .bnbw .bnbw-lab,
:root.brand-benjamin body .bnbw .bnbw-lab * { font-family: var(--disp); }
:root.brand-benjamin .bn-num,
:root.brand-benjamin .m-bet-balance,
:root.brand-benjamin .m-bet-value,
:root.brand-benjamin .cashout-alert-mult,
:root.brand-benjamin .round-toast-detail,
:root.brand-benjamin .hist-payout-chip,
:root.brand-benjamin .hist-mult-chip { font-variant-numeric: tabular-nums; }

/* ── 3  Top bar: round icon buttons and the History pill ── */
:root.brand-benjamin .m-header-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--bn-ground-1);
  border: none;
  box-shadow: var(--bn-edge);
  color: var(--bn-cream);
  transition: background-color 0.18s ease-out, box-shadow 0.18s ease-out;
}
:root.brand-benjamin .m-header-btn--lg { width: 40px; height: 40px; border-radius: 999px; }
:root.brand-benjamin .m-header-btn:hover,
:root.brand-benjamin .m-header-history-btn:hover { background: var(--bn-ground-2); box-shadow: inset 0 0 0 1px var(--bn-line-3); }
:root.brand-benjamin .m-header-btn svg,
:root.brand-benjamin .m-header-history-btn svg { color: var(--bn-cream); }
:root.brand-benjamin .m-header-btn svg path[fill],
:root.brand-benjamin .m-header-history-btn svg path[fill],
:root.brand-benjamin .m-header-btn svg circle[fill] { fill: var(--bn-cream); }
:root.brand-benjamin .m-header-history-btn {
  height: 36px;
  padding: 0 16px 0 12px;
  gap: 8px;
  border-radius: 999px;
  border: none;
  background: var(--bn-ground-1);
  box-shadow: var(--bn-edge);
  color: var(--bn-cream);
  font-weight: 600;
  font-size: 14px;
}
:root.brand-benjamin .m-header-dot { background: var(--bn-ground-1); box-shadow: var(--bn-edge); border: none; border-radius: 999px; }
:root.brand-benjamin .m-header-dot svg path { fill: var(--bn-mint); }
:root.brand-benjamin .m-header-dot--loss svg path { fill: var(--bn-error); }
:root.brand-benjamin .m-header-dot--push svg path { fill: var(--bn-pending); }
:root.brand-benjamin .m-menu {
  background: var(--bn-ground-1);
  border: none;
  border-radius: 14px;
  box-shadow: var(--bn-edge), 0 24px 64px -16px rgba(0, 0, 0, 0.7);
}
:root.brand-benjamin .m-menu-item { color: var(--bn-cream); border-radius: 10px; }
:root.brand-benjamin .m-menu-item:hover,
:root.brand-benjamin .m-menu-item:active { background: var(--bn-ground-2); }
:root.brand-benjamin .m-menu-item svg path[fill] { fill: var(--bn-cream); }
:root.brand-benjamin .m-menu-item svg path[stroke] { stroke: var(--bn-cream); }

/* ── 4  Balance: the coin is the currency marker, the number has no symbol.
   Desktop: left object of the panel's bet row. Phones: .bn-top-balance, a calm
   pill centred in the top bar (markup: coin + .bn-top-balance-amt + gain). ── */
:root.brand-benjamin .m-bet-currency {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--bn-selected);
  color: var(--bn-mint);
  box-shadow: inset 0 0 0 1px var(--bn-selected-edge);
  font-weight: 700;
}
:root.brand-benjamin .m-bet-balance {
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease-out;
}
:root.brand-benjamin .m-bet-balance.m-bet-balance--win,
:root.brand-benjamin .bn-top-balance-amt.bn-top-balance-amt--win { color: var(--bn-mint); }
:root.brand-benjamin .m-bet-left { position: relative; overflow: visible; gap: 8px; min-width: 0; }
:root.brand-benjamin .bn-top-balance { display: none; }
/* The gain: shows on a win, then settles into the balance (never moves the row). */
:root.brand-benjamin .m-bet-gain {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  margin-top: -10px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bn-positive-tint);
  color: var(--bn-mint);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  animation: bnGain 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes bnGain {
  0% { opacity: 0; transform: translateY(6px); }
  15% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translate(-14px, 0); }
}
@keyframes bnGainUp {
  0% { opacity: 0; transform: translateY(6px); }
  15% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-12px); }
}
@media (max-width: 767px) {
  :root.brand-benjamin .m-header {
    height: calc(56px + env(safe-area-inset-top, 0px));
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  :root.brand-benjamin .bn-top-balance {
    position: absolute;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: flex !important;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    height: 40px;
    max-width: calc(100% - 128px);
    padding: 0 14px 0 8px;
    border-radius: 999px;
    background: var(--bn-ground-1);
    box-shadow: var(--bn-edge);
    white-space: nowrap;
    z-index: 5;
  }
  :root.brand-benjamin .bn-top-balance-amt {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease-out;
  }
  :root.brand-benjamin .bn-top-gain {
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    bottom: auto;
    width: max-content;
    margin: 0 auto;
    background: var(--bn-ground-1);
    box-shadow: inset 0 0 0 1px var(--bn-selected-edge);
    animation-name: bnGainUp;
  }
  /* the balance lives in the top bar, so the panel's row holds only the bet control */
  :root.brand-benjamin .bn-bet-bar .m-bet-left { display: none; }
}

/* ── 5  Panel: one calm charcoal card, hairline edge, 24px corners, rows on a
   12px inset. Desktop order: primary action, game row(s), bet row (hairline on
   top). Phones (the thumb zone): bet row, game row(s), primary action lowest.
   Geometry around the card (margins, max width) stays with each game. ── */
:root.brand-benjamin .m-controls {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: none;
  border-radius: 24px;
  background: var(--bn-ground-1);
  box-shadow: var(--bn-edge), var(--bn-lift);
  overflow: visible;
  -webkit-mask: none;
  mask: none;
}
:root.brand-benjamin .m-controls .m-action-row {
  box-sizing: border-box;
  padding: 12px;
  margin: 0;
  min-height: 0;
  gap: 8px;
  background: transparent;
  border: none;
}
/* a game row inside the panel (risk choice, mode, ladder): on the 12px inset,
   directly under the action with no extra gap */
:root.brand-benjamin .m-controls .bn-row {
  box-sizing: border-box;
  width: auto;
  margin: 0 12px 12px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 12px;
}
:root.brand-benjamin .m-controls .bn-bet-bar,
:root.brand-benjamin .bn-bet-bar {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: auto;
  height: 57px;
  min-height: 57px;
  max-height: 57px;
  padding: 12px;
  margin: 0;
  background: transparent;
  border: none;
  border-top: 1px solid var(--bn-line);
  border-radius: 0;
}
@media (max-width: 767px) {
  :root.brand-benjamin .m-controls .bn-bet-bar {
    order: -1;
    border-top: none;
    border-bottom: 1px solid var(--bn-line);
    height: 69px;
    min-height: 69px;
    max-height: 69px;
  }
  :root.brand-benjamin .m-controls .bn-row { order: 0; margin: 12px 12px 0; }
  :root.brand-benjamin .m-controls .m-action-row {
    order: 1;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── 6  Buttons ── */
/* Primary: the site's filled cash green, a rounded rectangle (12px on the panel
   inset), ink label, no shadow. */
:root.brand-benjamin .bn-btn-primary,
:root.brand-benjamin .m-btn-deal {
  box-sizing: border-box;
  border: none;
  border-radius: 12px;
  background: var(--bn-primary-fill);
  color: var(--bn-ink);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  box-shadow: none;
  filter: none;
  transition: background 0.18s ease-out, transform 0.12s ease-out;
}
:root.brand-benjamin .bn-btn-primary:hover:not(:disabled),
:root.brand-benjamin .m-btn-deal:hover:not(:disabled) { background: var(--bn-primary-fill-hover); }
:root.brand-benjamin .bn-btn-primary:active:not(:disabled),
:root.brand-benjamin .m-btn-deal:active:not(:disabled) { background: var(--bn-primary-press); transform: scale(0.98); }
:root.brand-benjamin .bn-btn-primary:disabled,
:root.brand-benjamin .m-btn-deal:disabled { background: var(--bn-ground-2); color: var(--bn-text-muted); opacity: 1; }
:root.brand-benjamin .bn-btn-primary:focus-visible,
:root.brand-benjamin .bn-btn-secondary:focus-visible { outline: 2px solid var(--bn-mint); outline-offset: 2px; }
:root.brand-benjamin .bn-btn-amt { margin-left: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Secondary: a charcoal tile with one hairline (Blackjack's action tiles). Money
   it takes home reads mint (cash out), a loss action coral (.bn-btn-secondary--loss). */
:root.brand-benjamin .bn-btn-secondary {
  box-sizing: border-box;
  border: none;
  border-radius: 12px;
  background: var(--bn-ground-2);
  box-shadow: var(--bn-edge);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  filter: none;
  transition: background-color 0.18s ease-out, box-shadow 0.18s ease-out, transform 0.12s ease-out;
}
:root.brand-benjamin .bn-btn-secondary:hover:not(:disabled) { background: var(--bn-ground-3); box-shadow: inset 0 0 0 1px var(--bn-line-2); }
:root.brand-benjamin .bn-btn-secondary:active:not(:disabled) { transform: scale(0.98); }
:root.brand-benjamin .bn-btn-secondary:disabled { opacity: 0.55; box-shadow: none; color: var(--bn-disabled); }
:root.brand-benjamin .bn-btn-secondary--money { color: var(--bn-mint); }
:root.brand-benjamin .bn-btn-secondary--loss { color: var(--bn-error); }
:root.brand-benjamin .bn-btn-secondary svg path:not([fill="none"]) { fill: currentColor; }

/* ── 7  Bet row: five separate outlined cells 1/2, -, value, +, 2X with an 8px
   gap, equal height, each 12px (panel 24 minus the 12 inset). The value cell is a
   readout: a darker recess, mint figures. Markup:
     <div class="bn-bet-ctl" role="group">
       <button class="bn-bet-cell bn-bet-cell--half">1/2</button>
       <button class="bn-bet-cell bn-bet-cell--adj">-</button>
       <button class="bn-bet-cell bn-bet-cell--val">1.00</button>  (or input.bn-bet-input)
       <button class="bn-bet-cell bn-bet-cell--adj">+</button>
       <button class="bn-bet-cell bn-bet-cell--dbl">2X</button>
     </div> ── */
:root.brand-benjamin .bn-bet-ctl {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
  height: 32px;
  margin-left: auto;
}
:root.brand-benjamin .bn-bet-cell {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 100%;
  min-width: 40px;
  margin: 0;
  padding: 0 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--bn-line-2);
  color: #ffffff;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.18s ease-out, color 0.18s ease-out, box-shadow 0.25s ease-out;
}
:root.brand-benjamin .bn-bet-cell--adj { width: 36px; min-width: 36px; padding: 0; font-size: 16px; }
:root.brand-benjamin .bn-bet-cell--val {
  width: 92px;
  min-width: 92px;
  padding: 0 8px;
  background: var(--bn-recess);
  box-shadow: inset 0 0 0 1px var(--bn-line), inset 0 1px 2px rgba(0, 0, 0, 0.35);
  color: var(--bn-mint);
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: text;
}
:root.brand-benjamin .bn-bet-cell:hover:not(:disabled) { background: var(--bn-ground-2); box-shadow: inset 0 0 0 1px var(--bn-line-3); }
:root.brand-benjamin .bn-bet-cell:active:not(:disabled) { background: var(--bn-ground-3); }
:root.brand-benjamin .bn-bet-cell--val:hover:not(:disabled),
:root.brand-benjamin .bn-bet-cell--val:active:not(:disabled) { background: var(--bn-recess); box-shadow: inset 0 0 0 1px var(--bn-line-3), inset 0 1px 2px rgba(0, 0, 0, 0.35); }
:root.brand-benjamin .bn-bet-cell:focus-visible { outline: none; background: var(--bn-ground-2); box-shadow: inset 0 0 0 1.5px var(--bn-selected-edge); }
:root.brand-benjamin .bn-bet-cell:disabled { color: var(--bn-disabled); box-shadow: inset 0 0 0 1px var(--bn-line); cursor: default; }
:root.brand-benjamin .bn-bet-cell--val:disabled { color: var(--bn-mint); opacity: 0.55; }
:root.brand-benjamin .bn-bet-cell--on { background: var(--bn-selected); box-shadow: inset 0 0 0 1px var(--bn-selected-edge); color: #ffffff; }
:root.brand-benjamin .bn-bet-input {
  appearance: textfield;
  -moz-appearance: textfield;
  outline: none;
  background: var(--bn-ground-0);
  text-align: center;
  box-shadow: inset 0 0 0 1.5px var(--bn-selected-edge);
}
:root.brand-benjamin .bn-bet-input::-webkit-outer-spin-button,
:root.brand-benjamin .bn-bet-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
:root.brand-benjamin .bn-bet-note {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  color: var(--bn-text-muted);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  :root.brand-benjamin .bn-bet-ctl { flex: 1 1 auto; height: 44px; margin-left: 0; }
  :root.brand-benjamin .bn-bet-cell { flex: 1 1 0; min-width: 0; width: auto; padding: 0; font-size: 14px; }
  :root.brand-benjamin .bn-bet-cell--adj { font-size: 18px; }
  :root.brand-benjamin .bn-bet-cell--val { flex: 1.9 1 0; font-size: 15px; }
  :root.brand-benjamin .bn-bet-note { text-align: center; font-size: 13px; }
}

/* ── 8  Choices (risk, difficulty, mode, rows): one row of separate 12px cells
   with an 8px gap, the bet row's outline; the selected cell takes the site's
   selected fill and edge. A cell holds a value (white) over a label (muted). ── */
:root.brand-benjamin .bn-choice-group {
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: auto;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 12px;
  box-shadow: none;
}
:root.brand-benjamin .bn-choice {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  padding: 0 10px;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--bn-line-2);
  color: #ffffff;
  filter: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.18s ease-out, box-shadow 0.18s ease-out, color 0.18s ease-out;
}
:root.brand-benjamin .bn-choice:hover:not(:disabled):not(.bn-choice--on) { background: var(--bn-ground-2); box-shadow: inset 0 0 0 1px var(--bn-line-3); }
:root.brand-benjamin .bn-choice--on,
:root.brand-benjamin .bn-choice--on:hover {
  background: var(--bn-selected);
  box-shadow: inset 0 0 0 1px var(--bn-selected-edge);
}
:root.brand-benjamin .bn-choice:disabled { cursor: default; opacity: 1; }
:root.brand-benjamin .bn-choice:disabled:not(.bn-choice--on) { box-shadow: inset 0 0 0 1px var(--bn-line); }
:root.brand-benjamin .bn-choice:disabled:not(.bn-choice--on) .bn-choice-val { color: var(--bn-disabled); }
:root.brand-benjamin .bn-choice:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--bn-selected-edge); }
:root.brand-benjamin .bn-choice-val {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
:root.brand-benjamin .bn-choice-lbl {
  color: var(--bn-text-muted);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
:root.brand-benjamin .bn-choice--on .bn-choice-val { color: var(--bn-mint); }
:root.brand-benjamin .bn-choice--on .bn-choice-lbl { color: var(--bn-cream); }
/* A three step level meter (risk): cream steps, filled up to the level. */
:root.brand-benjamin .bn-level { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
:root.brand-benjamin .bn-level i { display: block; width: 3px; border-radius: 2px; background: var(--bn-line-3); }
:root.brand-benjamin .bn-level i:nth-child(1) { height: 5px; }
:root.brand-benjamin .bn-level i:nth-child(2) { height: 8px; }
:root.brand-benjamin .bn-level i:nth-child(3) { height: 12px; }
:root.brand-benjamin .bn-level i.on { background: var(--bn-cream); }
:root.brand-benjamin .bn-choice--on .bn-level i.on { background: var(--bn-mint); }

/* ── 9  Ladder: the shared MultiplierTimeline (inline-styled in the games, so
   these rules carry !important). Separate 12px cells like the bet row: played =
   quiet, current = selected fill with mint figures, next = white with a hairline. */
:root.brand-benjamin .mt-timeline:not(.mt-timeline--inline) {
  width: auto !important;
  height: 48px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 12px !important;
}
/* the row scrolls: its far edge fades out instead of cutting a cell */
:root.brand-benjamin .mt-timeline.bn-row {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
:root.brand-benjamin .mt-chip {
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: inset 0 0 0 1px var(--bn-line-2);
  border: none !important;
}
:root.brand-benjamin .mt-chip span { color: #ffffff !important; font-size: 14px !important; font-weight: 700 !important; font-variant-numeric: tabular-nums; }
:root.brand-benjamin .mt-chip svg path { fill: var(--bn-cream); stroke: var(--bn-cream); }
:root.brand-benjamin .mt-chip[data-state="played"] { box-shadow: inset 0 0 0 1px var(--bn-line); }
:root.brand-benjamin .mt-chip[data-state="played"] span { color: var(--bn-disabled) !important; }
:root.brand-benjamin .mt-chip[data-state="current"] {
  background: var(--bn-selected) !important;
  box-shadow: inset 0 0 0 1px var(--bn-selected-edge);
}
:root.brand-benjamin .mt-chip[data-state="current"] span { color: var(--bn-mint) !important; }

/* ── 10  Result language ──
   One small pill: charcoal, the result on its edge (green win, lemon push, coral
   loss), a short entrance, no loop. The play surface carries the rest (section 11).
     <div class="bn-pill bn-pill--win"><span class="bn-pill-lbl">Win</span>
       <span class="bn-pill-amt">1.92</span></div>
   The shared template's .cashout-alert takes the same pill with
   .cashout-alert--bn-pill (+ --bn-push / --bn-loss), and .round-toast with
   .round-toast--bn (+ --win / --push / --loss). */
:root.brand-benjamin .bn-pill,
:root.brand-benjamin .cashout-alert.cashout-alert--bn-pill,
:root.brand-benjamin .round-toast.round-toast--bn {
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  min-width: 0;
  min-height: 36px;
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: var(--bn-ground-1);
  box-shadow: inset 0 0 0 1.5px var(--bn-primary), 0 24px 64px -16px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  animation: bnPillIn 0.48s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
:root.brand-benjamin .bn-pill--push,
:root.brand-benjamin .cashout-alert.cashout-alert--bn-push,
:root.brand-benjamin .round-toast.round-toast--bn.round-toast--push { box-shadow: inset 0 0 0 1.5px var(--bn-pending), 0 24px 64px -16px rgba(0, 0, 0, 0.7); }
:root.brand-benjamin .bn-pill--loss,
:root.brand-benjamin .cashout-alert.cashout-alert--bn-loss,
:root.brand-benjamin .round-toast.round-toast--bn.round-toast--loss { box-shadow: inset 0 0 0 1.5px var(--bn-error), 0 24px 64px -16px rgba(0, 0, 0, 0.7); }
:root.brand-benjamin .bn-pill--info,
:root.brand-benjamin .round-toast.round-toast--bn.round-toast--info { box-shadow: inset 0 0 0 1px var(--bn-line-2), 0 24px 64px -16px rgba(0, 0, 0, 0.7); }
:root.brand-benjamin .bn-pill--info .bn-pill-amt,
:root.brand-benjamin .round-toast--bn.round-toast--info .round-toast-detail { color: #ffffff; font-family: var(--font-primary); font-weight: 600; font-size: 13px; }
:root.brand-benjamin .bn-pill-lbl,
:root.brand-benjamin .cashout-alert--bn-pill .cashout-alert-label,
:root.brand-benjamin .round-toast--bn .round-toast-chip {
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}
:root.brand-benjamin .bn-pill-amt,
:root.brand-benjamin .cashout-alert--bn-pill .cashout-alert-mult,
:root.brand-benjamin .round-toast--bn .round-toast-detail {
  color: var(--bn-mint);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
:root.brand-benjamin .bn-pill--push .bn-pill-amt,
:root.brand-benjamin .cashout-alert--bn-push .cashout-alert-mult,
:root.brand-benjamin .round-toast--bn.round-toast--push .round-toast-detail { color: var(--bn-pending); }
:root.brand-benjamin .bn-pill--loss .bn-pill-amt,
:root.brand-benjamin .cashout-alert--bn-loss .cashout-alert-mult,
:root.brand-benjamin .round-toast--bn.round-toast--loss .round-toast-detail { color: #ffffff; }
/* the shared template's parts inside the pill: plain text, no chips */
:root.brand-benjamin .round-toast--bn .round-toast-chip,
:root.brand-benjamin .round-toast--bn .round-toast-detail {
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
:root.brand-benjamin .cashout-alert--bn-pill .cashout-alert-content { display: flex; flex-direction: row; align-items: center; gap: 10px; white-space: nowrap; }
:root.brand-benjamin .cashout-alert--bn-pill .cashout-alert-chip,
:root.brand-benjamin .bn-pill-mult {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bn-ground-2);
  box-shadow: none;
  color: var(--bn-cream);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
:root.brand-benjamin .cashout-alert--bn-pill canvas { display: none; }
@keyframes bnPillIn {
  0% { opacity: 0; transform: scale(0.88); }
  100% { opacity: 1; transform: scale(1); }
}
/* The template centres .round-toast with translate(-50%, -50%); its entrance keeps it. */
:root.brand-benjamin .round-toast.round-toast--bn { animation-name: bnPillInC; }
@keyframes bnPillInC {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* A round toast's detail is a short sentence, not an amount: the sans, a step smaller. */
:root.brand-benjamin .round-toast--bn .round-toast-detail { font-family: var(--font-primary); font-size: 15px; }
/* ...unless it is the amount ("Pot raised 1.92"): the display figures, like the cashout pill. */
:root.brand-benjamin .round-toast--bn .round-toast-detail--amt { font-family: var(--font-display); font-size: 16px; }
@media (min-width: 768px) and (min-height: 600px) {
  :root.brand-benjamin .bn-pill,
  :root.brand-benjamin .cashout-alert.cashout-alert--bn-pill,
  :root.brand-benjamin .round-toast.round-toast--bn { min-height: 44px; padding: 12px 22px; }
  :root.brand-benjamin .bn-pill-lbl,
  :root.brand-benjamin .cashout-alert--bn-pill .cashout-alert-label,
  :root.brand-benjamin .round-toast--bn .round-toast-chip { font-size: 14px; }
  :root.brand-benjamin .bn-pill-amt,
  :root.brand-benjamin .cashout-alert--bn-pill .cashout-alert-mult { font-size: 20px; }
  :root.brand-benjamin .round-toast--bn .round-toast-detail { font-size: 17px; }
:root.brand-benjamin .round-toast--bn .round-toast-detail--amt { font-size: 20px; }
}
/* Toasts that are not results (insufficient balance and the like). */
:root.brand-benjamin .insufficient-toast {
  background: var(--bn-ground-2);
  box-shadow: var(--bn-edge);
  border: none;
  border-radius: 999px;
}
:root.brand-benjamin .insufficient-toast span { color: #ffffff; }
:root.brand-benjamin .free-round-winnings { color: var(--bn-mint); }

/* ── 11  Play surface light: the game's own surface lights by result, the way
   the Blackjack table trim does. Put .bn-res-host on the surface and, for the
   moment of the result, .bn-res plus one of .bn-res--win / --push / --loss.
   Inside it, any of:
     svg.bn-trim-lit   the surface's own outline as two paths (glow, core), stroke
                       var(--bn-res-glow) and var(--bn-res-core) (game supplies the path)
     .bn-felt-bloom    a soft light on the cloth (place it per game)
     .bn-lit-edge      for a plain rounded box: an inset ring, radius inherited ── */
:root.brand-benjamin .bn-res-host {
  --bn-res-glow: #28c775;
  --bn-res-core: #5be39a;
  --bn-res-bloom-a: rgba(52, 214, 131, 0.30);
  --bn-res-bloom-b: rgba(40, 199, 117, 0.12);
  --bn-res-trim: 1;
  --bn-res-felt: 1;
}
:root.brand-benjamin .bn-res-host.bn-res--push {
  --bn-res-glow: #f5d565;
  --bn-res-core: #f5d565;
  --bn-res-bloom-a: rgba(245, 213, 101, 0.30);
  --bn-res-bloom-b: rgba(245, 213, 101, 0.12);
  --bn-res-felt: 0.5;
}
:root.brand-benjamin .bn-res-host.bn-res--loss {
  --bn-res-glow: #f2806b;
  --bn-res-core: #f2806b;
  --bn-res-bloom-a: rgba(242, 128, 107, 0.30);
  --bn-res-bloom-b: rgba(242, 128, 107, 0.12);
  --bn-res-felt: 0.5;
}
:root.brand-benjamin .bn-trim-lit,
:root.brand-benjamin .bn-felt-bloom,
:root.brand-benjamin .bn-lit-edge {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.52s ease-out;
}
:root.brand-benjamin .bn-trim-lit { inset: 0; width: 100%; height: 100%; z-index: 0; overflow: visible; }
:root.brand-benjamin .bn-felt-bloom {
  left: 12%;
  right: 12%;
  top: 22%;
  height: 48%;
  z-index: 0;
  background: radial-gradient(closest-side, var(--bn-res-bloom-a), var(--bn-res-bloom-b) 55%, transparent 100%);
}
:root.brand-benjamin .bn-lit-edge {
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px var(--bn-res-core), inset 0 0 18px -6px var(--bn-res-glow);
  z-index: 1;
}
:root.brand-benjamin .bn-res-host.bn-res .bn-trim-lit,
:root.brand-benjamin .bn-res-host.bn-res .bn-lit-edge { opacity: var(--bn-res-trim); }
:root.brand-benjamin .bn-res-host.bn-res .bn-felt-bloom { opacity: var(--bn-res-felt); }
:root.brand-benjamin .bn-res-host.bn-res--loss .bn-trim-lit,
:root.brand-benjamin .bn-res-host.bn-res--loss .bn-felt-bloom,
:root.brand-benjamin .bn-res-host.bn-res--loss .bn-lit-edge { transition-duration: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  :root.brand-benjamin .bn-pill,
  :root.brand-benjamin .cashout-alert.cashout-alert--bn-pill,
  :root.brand-benjamin .round-toast.round-toast--bn,
  :root.brand-benjamin .m-bet-gain,
  :root.brand-benjamin .bn-top-gain { animation: none; }
  :root.brand-benjamin .bn-trim-lit,
  :root.brand-benjamin .bn-felt-bloom,
  :root.brand-benjamin .bn-lit-edge { transition: none; }
}

/* ── 12  Sheets: drawers and modals (history, fairness, how to play), the site's
   sheet: charcoal, hairline edge; inner cards a step up; tabs = the site's
   Segmented control. Shared template class names. ── */
:root.brand-benjamin .overlay,
:root.brand-benjamin .drawer-backdrop { background: rgba(0, 0, 0, 0.72); }
:root.brand-benjamin .modal,
:root.brand-benjamin .drawer { border: none; box-shadow: var(--bn-edge), 0 24px 64px -16px rgba(0, 0, 0, 0.7); }
:root.brand-benjamin .modal,
:root.brand-benjamin .drawer-header,
:root.brand-benjamin .drawer-content { background: var(--bn-ground-1); }
:root.brand-benjamin .drawer-header { border-bottom: 1px solid var(--bn-line); }
:root.brand-benjamin .drawer-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
:root.brand-benjamin .drawer-close {
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--bn-line-2);
}
:root.brand-benjamin .drawer-close:hover { box-shadow: inset 0 0 0 1px var(--bn-line-3); background: var(--bn-ground-2); }
:root.brand-benjamin .drawer-close svg path[stroke] { stroke: var(--bn-cream); }
:root.brand-benjamin .drawer-close svg path[fill]:not([fill="none"]) { fill: var(--bn-cream); }
:root.brand-benjamin .drawer-tabs {
  background: var(--bn-ground-0);
  border: none;
  box-shadow: var(--bn-edge);
  border-radius: 999px;
}
:root.brand-benjamin .drawer-tab { border-radius: 999px; color: var(--bn-text-muted); font-weight: 700; }
:root.brand-benjamin .drawer-tab--active {
  background: var(--bn-selected);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px var(--bn-selected-edge);
}
/* History */
:root.brand-benjamin .hist-item { background: var(--bn-ground-2); box-shadow: var(--bn-edge); border: none; border-radius: 14px; }
:root.brand-benjamin .hist-info-sub,
:root.brand-benjamin .hist-seed-label { color: var(--bn-text-meta); }
:root.brand-benjamin .hist-seeds { background: var(--bn-ground-1); }
:root.brand-benjamin .hist-payout-chip,
:root.brand-benjamin .hist-mult-chip,
:root.brand-benjamin .hist-chip { border-radius: 999px; font-weight: 700; }
:root.brand-benjamin .hist-payout-chip,
:root.brand-benjamin .hist-mult-chip,
:root.brand-benjamin .hist-payout-chip--push { background: var(--bn-ground-3); color: var(--bn-cream); }
:root.brand-benjamin .hist-payout-chip--win,
:root.brand-benjamin .hist-chip--win { background: var(--bn-positive-tint); color: var(--bn-mint); }
:root.brand-benjamin .hist-payout-chip--lose,
:root.brand-benjamin .hist-chip--lose { background: var(--bn-error-tint); color: var(--bn-error); }
:root.brand-benjamin .hist-icon svg path[fill="#F43F5E"],
:root.brand-benjamin .hist-icon svg path[fill="#f43f5e"] { fill: var(--bn-error); }
:root.brand-benjamin .hist-icon svg path[fill="#22C55E"],
:root.brand-benjamin .hist-icon svg path[fill="#22c55e"],
:root.brand-benjamin .hist-icon svg path[fill="#4ADE80"] { fill: var(--bn-mint); }
:root.brand-benjamin .hist-icon svg path[fill="#FFD106"],
:root.brand-benjamin .hist-icon svg path[fill="#ffd106"] { fill: var(--bn-pending); }
:root.brand-benjamin .hist-verify-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--bn-line-3);
  color: #ffffff;
}
:root.brand-benjamin .hist-verify-btn:hover:not(:disabled) { background: var(--bn-ground-1); box-shadow: inset 0 0 0 1px #ffffff; }
/* Provably fair */
:root.brand-benjamin .pf-steps { background: var(--bn-ground-0); box-shadow: var(--bn-edge); }
:root.brand-benjamin .pf-step-icon { background: var(--bn-selected); box-shadow: inset 0 0 0 1px var(--bn-selected-edge); }
:root.brand-benjamin .pf-step-icon svg path[stroke] { stroke: var(--bn-mint); }
:root.brand-benjamin .pf-step-icon svg path[fill]:not([fill="none"]) { fill: var(--bn-mint); }
:root.brand-benjamin .pf-input { background: var(--bn-ground-0); border-color: var(--bn-line-2); border-radius: 12px; }
:root.brand-benjamin .pf-input:focus-within { border-color: var(--bn-selected-edge); box-shadow: 0 0 0 3px rgba(40, 199, 117, 0.14); }
:root.brand-benjamin .pf-input--success { border-color: var(--bn-selected-edge); }
:root.brand-benjamin .pf-input--danger { border-color: var(--bn-error); }
:root.brand-benjamin .pf-input-value--green,
:root.brand-benjamin .pf-result-title { color: var(--bn-mint); }
:root.brand-benjamin .pf-input-btn { border-radius: 999px; background: var(--bn-ground-2); }
:root.brand-benjamin .pf-btn { border: none; border-radius: 12px; background: var(--bn-primary-fill); color: var(--bn-ink); font-weight: 700; }
:root.brand-benjamin .pf-btn--ghost { background: transparent; border: none; box-shadow: inset 0 0 0 1px var(--bn-line-3); color: #ffffff; }
:root.brand-benjamin .pf-proof { background: var(--bn-ground-2); border-color: var(--bn-line-2); }
:root.brand-benjamin .pf-proof--ok { background: var(--bn-positive-tint); border-color: var(--bn-selected-edge); }
:root.brand-benjamin .pf-proof--bad,
:root.brand-benjamin .pf-result--error { background: var(--bn-error-tint); border-color: rgba(242, 128, 107, 0.6); }
:root.brand-benjamin .pf-result-shield svg path[stroke] { stroke: var(--bn-mint); }
/* How to play */
:root.brand-benjamin .htp-card,
:root.brand-benjamin .htp-acc { background: var(--bn-ground-2); box-shadow: var(--bn-edge); border: none; border-radius: 14px; }
:root.brand-benjamin .htp-preview-img { background: var(--bn-ground-1); }
:root.brand-benjamin .htp-chip,
:root.brand-benjamin .htp-risk-chip { background: var(--bn-ground-1); border-radius: 999px; }
:root.brand-benjamin .htp-chip--green { background: var(--bn-positive-tint); color: var(--bn-mint); }
:root.brand-benjamin .htp-chip--yellow { background: rgba(245, 213, 101, 0.12); color: var(--bn-pending); }
:root.brand-benjamin .htp-stat-value--green,
:root.brand-benjamin .htp-preview-label--green { color: var(--bn-mint); }
:root.brand-benjamin .htp-preview-label--yellow { color: var(--bn-pending); }
:root.brand-benjamin .htp-preview-btn--green { background: var(--bn-primary); }
:root.brand-benjamin .htp-warning-red { color: var(--bn-error); }
:root.brand-benjamin .htp-fullrules-btn {
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--bn-line-3);
  border: none;
  color: #ffffff;
}
:root.brand-benjamin .rules-tr--head { background: var(--bn-selected); color: #ffffff; }
/* Loading: the game's name, a thin green line, the wordmark with its bill at the foot. */
:root.brand-benjamin .loading-bar-wrap { background: var(--bn-ground-2); border-radius: 999px; }
:root.brand-benjamin .loading-bar { background: var(--bn-selected-edge); border-radius: 999px; }
:root.brand-benjamin .loading-text { color: var(--bn-text-muted); }
:root.brand-benjamin .loading-watermark-label { display: none; }
:root.brand-benjamin .loading-watermark img { height: 44px; width: auto; }

/* ── 13  Typed bet field ── the value cell as a typed input: the readout look, the kit's
   editing edge on focus. Was the same copy in mines, moles, tower, penaltyrush and rps.
   Kept last so it sits where those copies were in the cascade (after every kit rule). */
:root.brand-benjamin .bn-bet-field {
  appearance: textfield;
  -moz-appearance: textfield;
  border: none;
  outline: none;
  text-align: center;
  font-family: var(--font-primary);
}
:root.brand-benjamin .bn-bet-field::-webkit-outer-spin-button,
:root.brand-benjamin .bn-bet-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
:root.brand-benjamin .bn-bet-field:focus { background: var(--bn-ground-0); box-shadow: inset 0 0 0 1.5px var(--bn-selected-edge); }
