/* =========================================================
   WP Modern Roulette — Game Styles (M3)
   Two themes keyed on #wpmr-game-root[data-wpmr-theme]:
     light (2a — warm off-white, white cards, green primary)
     dark  (2b — charcoal cards, brighter green, muted red)
   Theme blocks contain CUSTOM PROPERTIES ONLY (CLAUDE.md 23a):
   both themes share every layout rule below. Container-query
   driven: the game reflows on its own width (container: wpmr),
   never on the viewport, so it works beside the CTA sidebar.
   The wheel is pure CSS (conic-gradients) per the mockups.
   ========================================================= */

/* ---- Game layout wrapper (game + optional sidebar CTA) ---- */
.wpmr-game-layout { display: block; }

@media (min-width: 900px) {
  .wpmr-game-layout.wpmr-has-cta {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 20px;
    align-items: start;
  }
}

/* ---- Desktop sidebar CTA (outside the game root — static colours) ---- */
.wpmr-cta-sidebar { display: none; }

@media (min-width: 900px) {
  .wpmr-cta-sidebar { display: block; }
  .wpmr-cta-sidebar-inner {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    padding: 18px 16px;
    background: rgba(14,107,61,.07);
    border: 1px solid rgba(14,107,61,.22);
    border-radius: 12px;
  }
  .wpmr-cta-sidebar-icon { color: #0e6b3d; display: flex; align-items: center; }
  .wpmr-cta-sidebar-heading { font-size: 14px; font-weight: 700; color: #0b5531; line-height: 1.35; }
  .wpmr-cta-sidebar-sub { font-size: 12px; color: #6f6a5e; line-height: 1.5; margin: 0; }
  .wpmr-cta-sidebar-btn {
    display: block; width: 100%; text-align: center; padding: 9px 14px; border-radius: 999px;
    font-size: 13px; font-weight: 700;
    text-decoration: none; cursor: pointer; transition: opacity .15s, transform .1s;
  }
  .wpmr-cta-sidebar-btn:hover  { opacity: .88; transform: translateY(-1px); }
  .wpmr-cta-sidebar-btn:active { transform: none; }
  .wpmr-cta-sidebar-btn-primary { background: #0e6b3d; color: #fff; }
  .wpmr-cta-sidebar-btn-secondary { background: none; border: 1px solid rgba(14,107,61,.35); color: #0b5531; }
  .wpmr-cta-sidebar-btn-secondary:hover { border-color: #0e6b3d; }
}

/* ---- Guest CTA — mobile banner (outside the root) ---- */
.wpmr-cta-mobile-banner { display: none; }
@media (max-width: 899px) {
  .wpmr-cta-mobile-banner {
    display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; margin-top: 8px;
    background: rgba(14,107,61,.07); border: 1px solid rgba(14,107,61,.22); border-radius: 12px;
  }
  .wpmr-cta-mobile-heading { font-size: 13px; font-weight: 700; color: #0b5531; line-height: 1.35; }
  .wpmr-cta-mobile-actions { display: flex; gap: 8px; }
}
.wpmr-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: opacity .15s, transform .1s; padding: 0 16px; flex: 1;
}
.wpmr-cta-btn:hover  { opacity: .88; transform: translateY(-1px); }
.wpmr-cta-btn:active { transform: none; }
.wpmr-cta-btn-primary { background: #0e6b3d; color: #fff; }
.wpmr-cta-btn-secondary { background: none; border: 1px solid rgba(14,107,61,.35); color: #0b5531; }

/* ---- Reset ---- */
.wpmr-game-container *,
.wpmr-game-container *::before,
.wpmr-game-container *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* =========================================================
   TOKENS — light (default) and dark. Double id beats Elementor
   (CLAUDE.md 23); theme override blocks must keep the double id.
   ========================================================= */
#wpmr-game-root#wpmr-game-root {
  /* Theme: light (2a) */
  --wpmr-bg:          #f1eee7;
  --wpmr-card:        #ffffff;
  --wpmr-line:        #e3ded3;
  --wpmr-ink:         #16181a;
  --wpmr-ink-rgb:     22,24,26;
  --wpmr-muted:       #8b8578;
  --wpmr-soft:        #6f6a5e;
  --wpmr-faint:       #a09a8c;
  --wpmr-cell:        #faf8f4;
  --wpmr-cell-line:   #e3ded3;
  --wpmr-green:       #0e6b3d;
  --wpmr-green-ink:   #ffffff;
  --wpmr-green-text:  #0b5531;
  --wpmr-green-rgb:   14,107,61;
  --wpmr-red:         #b3261e;
  --wpmr-black:       #16181a;
  --wpmr-gold:        #b98a2c;
  --wpmr-gold-rgb:    185, 138, 44;
  --wpmr-win:         #0e6b3d;
  --wpmr-card-shadow: 0 1px 2px rgba(20,22,24,.06), 0 12px 28px rgba(20,22,24,.07);
  --wpmr-overlay-bg:  rgba(16,18,20,.55);
  --wpmr-spin-shadow: 0 8px 20px rgba(14,107,61,.28);
}

#wpmr-game-root#wpmr-game-root[data-wpmr-theme="dark"] {
  /* Theme: dark (2b) — palette only, same layout. */
  --wpmr-bg:          #0b0d0f;
  --wpmr-card:        #191d21;
  --wpmr-line:        #2e3439;
  --wpmr-ink:         #ece9e3;
  --wpmr-ink-rgb:     236,233,227;
  --wpmr-muted:       #8d94a0;
  --wpmr-soft:        #aab0ba;
  --wpmr-faint:       #6a7078;
  --wpmr-cell:        #23282d;
  --wpmr-cell-line:   #3a4147;
  --wpmr-green:       #12864e;
  --wpmr-green-ink:   #ffffff;
  --wpmr-green-text:  #8fe0b2;
  --wpmr-green-rgb:   18,134,78;
  --wpmr-red:         #ab2a22;
  --wpmr-black:       #0e1113;
  --wpmr-gold:        #e6c479;
  --wpmr-gold-rgb:    230, 196, 121;
  --wpmr-win:         #59c98b;
  --wpmr-card-shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 28px rgba(0,0,0,.35);
  --wpmr-overlay-bg:  rgba(5,6,8,.66);
  --wpmr-spin-shadow: 0 8px 20px rgba(18,134,78,.35);
}

/* =========================================================
   Root
   ========================================================= */
#wpmr-game-root {
  container: wpmr / inline-size;
  position: relative;
  /* Own stacking context: the game's internal layers (overlays, modal,
     toasts - z-index up to 99999) must never paint over page chrome such
     as the header account-pill dropdown (0.10.4). */
  isolation: isolate;
  z-index: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--wpmr-bg);
  color: var(--wpmr-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.wpmr-game-container.wpmr-fullscreen,
.wpmr-game-container:fullscreen {
  border-radius: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
}

.wpmr-game-inner { display: flex; flex-direction: column; flex: 1; position: relative; }

/* ---- Init loader ---- */
.wpmr-init-loader {
  position: absolute; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: var(--wpmr-bg); color: var(--wpmr-muted); font-size: 13px; letter-spacing: .08em;
  transition: opacity .3s;
}
.wpmr-init-loader.hidden { opacity: 0; pointer-events: none; }
.wpmr-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(var(--wpmr-ink-rgb), .12); border-top-color: var(--wpmr-green);
  animation: wpmr-spin .75s linear infinite;
}
@keyframes wpmr-spin { to { transform: rotate(360deg); } }

/* ---- Shared bits ---- */
.wpmr-mini-label {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--wpmr-muted); font-weight: 600;
}
.wpmr-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--wpmr-card);
  box-shadow: var(--wpmr-card-shadow);
}
.wpmr-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wpmr-card-title { font-size: 14px; font-weight: 600; }
.wpmr-card-note { font-size: 11px; color: var(--wpmr-muted); }
.wpmr-status { min-height: 1.3em; font-size: 12px; color: var(--wpmr-muted); text-align: right; }

/* =========================================================
   Top bar
   ========================================================= */
.wpmr-topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: var(--wpmr-card);
  border-bottom: 1px solid var(--wpmr-line);
}
.wpmr-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wpmr-brand-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--wpmr-green) 0 25%, var(--wpmr-red) 25% 50%, var(--wpmr-black) 50% 75%, var(--wpmr-green) 75% 100%);
}
.wpmr-brand-name { font-weight: 700; letter-spacing: .14em; font-size: 14px; text-transform: uppercase; }
.wpmr-brand-sub { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--wpmr-muted); }
.wpmr-hud { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wpmr-limits { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--wpmr-muted); }
.wpmr-balance-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--wpmr-bg); border: 1px solid var(--wpmr-line);
}
.wpmr-balance-pill.is-demo { background: var(--wpmr-card); border-style: dashed; }
.wpmr-balance-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--wpmr-muted); }
.wpmr-balance-value { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wpmr-hud-login {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px;
  border: 0; border-radius: 999px; background: var(--wpmr-green); color: var(--wpmr-green-ink);
  font-weight: 700; font-size: 12px; text-decoration: none; cursor: pointer;
}
.wpmr-hud-login[hidden] { display: none; }
.wpmr-iconbtn {
  width: 34px; height: 34px; border-radius: 999px; flex: none;
  border: 1px solid var(--wpmr-line); background: none; color: var(--wpmr-muted);
  display: grid; place-items: center; font-size: 13px; cursor: pointer;
  font-family: inherit;
}
.wpmr-iconbtn:hover { color: var(--wpmr-ink); border-color: var(--wpmr-muted); }
.wpmr-iconbtn[aria-pressed="true"] { color: var(--wpmr-green-text); border-color: var(--wpmr-green); }

/* =========================================================
   Main area
   ========================================================= */
.wpmr-main {
  flex: 1;
  display: flex; flex-wrap: wrap; align-items: stretch;
  gap: 14px;
  padding: 14px;
}
.wpmr-side { display: flex; flex-direction: column; gap: 14px; flex: 1 1 240px; min-width: 0; }
.wpmr-bet-card { flex: 2 1 340px; min-width: 0; }
.wpmr-wheel-card { flex: 1 1 auto; align-items: center; justify-content: center; }

/* =========================================================
   Wheel — pure CSS per the mockup: ~30 nodes, three conic
   gradients, no images/canvas. Colors are theme-invariant.
   ========================================================= */
.wpmr-wheelbox { width: min(100%, 270px); margin: 0 auto; }
.wpmr-wheel {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%;
  container-type: inline-size;
}
.wpmr-wheel-rim {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 210deg, #4a3520 0deg, #7a5a34 22deg, #3a2a18 92deg, #6b4d2c 168deg, #2e2114 238deg, #7a5a34 300deg, #4a3520 360deg);
  box-shadow: 0 18px 42px rgba(0,0,0,.45), inset 0 0 0 1px rgba(226,197,124,.35);
}
.wpmr-wheel-bowl {
  position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #2a2118 0%, #151009 55%, #0a0705 100%);
  box-shadow: inset 0 8px 18px rgba(0,0,0,.75), inset 0 0 0 1px rgba(226,197,124,.28);
}
.wpmr-rotor {
  position: absolute; inset: 0; border-radius: 50%;
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 4s cubic-bezier(.12,.8,.16,1);
}
.wpmr-wheel-ring {
  position: absolute; inset: 15%; border-radius: 50%; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(226,197,124,.5), 0 0 8px rgba(0,0,0,.6);
}
.wpmr-wheel-pockets,
.wpmr-wheel-zero,
.wpmr-wheel-seps { position: absolute; inset: 0; border-radius: 50%; }
/* European: 360/37 = 9.7297° per pocket; strict red/black alternation. */
.wpmr-wheel-pockets { background: repeating-conic-gradient(from 4.865deg, #a5121c 0deg 9.7297deg, #14171b 9.7297deg 19.4595deg); }
.wpmr-wheel-zero    { background: conic-gradient(from -4.865deg, #0d7a3f 0deg 9.7297deg, rgba(0,0,0,0) 9.7297deg 360deg); }
.wpmr-wheel-seps    { background: repeating-conic-gradient(from 4.4deg, rgba(226,197,124,.55) 0deg .5deg, rgba(0,0,0,0) .5deg 9.7297deg); }
/* American: 360/38 = 9.4737° and a second green at index 19 (the 00). */
.wpmr-wheel[data-wheel="american"] .wpmr-wheel-pockets { background: repeating-conic-gradient(from 4.7368deg, #a5121c 0deg 9.4737deg, #14171b 9.4737deg 18.9474deg); }
.wpmr-wheel[data-wheel="american"] .wpmr-wheel-zero {
  background:
    conic-gradient(from -4.7368deg, #0d7a3f 0deg 9.4737deg, rgba(0,0,0,0) 9.4737deg 360deg),
    conic-gradient(from 175.2632deg, #0d7a3f 0deg 9.4737deg, rgba(0,0,0,0) 9.4737deg 360deg);
}
.wpmr-wheel[data-wheel="american"] .wpmr-wheel-seps { background: repeating-conic-gradient(from 4.3deg, rgba(226,197,124,.55) 0deg .5deg, rgba(0,0,0,0) .5deg 9.4737deg); }

.wpmr-wheel-num {
  position: absolute;
  font-size: 9px; font-weight: 700; color: rgba(255,255,255,.92);
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
  pointer-events: none; user-select: none;
}
@supports (width: 1cqw) {
  .wpmr-wheel-num { font-size: 3.6cqw; }
}
.wpmr-wheel-cone {
  position: absolute; inset: 32%; border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #3b2c1a 0%, #1d150c 60%, #0c0806 100%);
  box-shadow: inset 0 0 0 1px rgba(226,197,124,.4), 0 -4px 12px rgba(0,0,0,.55);
}
.wpmr-wheel-goldring {
  position: absolute; inset: 38%; border-radius: 50%;
  background: conic-gradient(from 0deg, #8a6a3c, #e2c57c 12%, #6b4d2c 30%, #e2c57c 52%, #5a4126 72%, #d9bb72 88%, #8a6a3c 100%);
  box-shadow: inset 0 0 4px rgba(0,0,0,.5);
}
.wpmr-wheel-cap {
  position: absolute; inset: 44.5%; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #f4e3ad, #8a6a3c 70%, #4a3520 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,.6);
}
.wpmr-wheel-sheen {
  position: absolute; inset: 6%; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle at 34% 26%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 46%),
    radial-gradient(circle at 70% 82%, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 55%);
}
.wpmr-ball-orbit {
  position: absolute; inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 4s cubic-bezier(.16,.84,.22,1);
  pointer-events: none;
}
.wpmr-ball {
  position: absolute; left: 50%; top: 10%;
  width: 3.4%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 34% 28%, #ffffff, #d9d4c6 60%, #8f8a7c 100%);
  animation: wpmr-ballglow 2.4s ease-in-out infinite;
}
@keyframes wpmr-ballglow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 0 10px 2px rgba(255,255,255,.55); }
  50%      { box-shadow: 0 0 0 1px rgba(255,255,255,.8), 0 0 18px 5px rgba(255,255,255,.85); }
}

/* ---- Result line under the wheel ---- */
.wpmr-resultline { display: flex; align-items: center; gap: 12px; width: 100%; }
.wpmr-result-badge {
  min-width: 48px; min-height: 40px; padding: 4px 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--wpmr-black); color: #fff;
  font-weight: 700; font-size: 24px; font-variant-numeric: tabular-nums;
}
.wpmr-result-badge.is-red { background: var(--wpmr-red); }
.wpmr-result-badge.is-green { background: var(--wpmr-green); }
.wpmr-lastwrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wpmr-last { display: flex; gap: 4px; min-height: 26px; }
.wpmr-last-num {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--wpmr-black);
}
.wpmr-last-num.is-red { background: var(--wpmr-red); }
.wpmr-last-num.is-green { background: var(--wpmr-green); }

/* =========================================================
   Statistics card
   ========================================================= */
.wpmr-hcrow { display: flex; gap: 6px; min-height: 28px; }
.wpmr-hc {
  flex: 1; padding: 5px 0; border-radius: 9px; text-align: center;
  font-size: 12px; font-weight: 700;
  background: var(--wpmr-cell); color: var(--wpmr-soft);
}
.wpmr-hc.is-hot1 { background: var(--wpmr-green); color: var(--wpmr-green-ink); }
.wpmr-hc.is-hot2 { background: rgba(var(--wpmr-green-rgb), .16); color: var(--wpmr-green-text); }
.wpmr-hc.is-hot3 { background: rgba(var(--wpmr-green-rgb), .10); color: var(--wpmr-green-text); }
.wpmr-sessionline {
  display: flex; justify-content: space-between; gap: 8px;
  padding-top: 9px; border-top: 1px solid var(--wpmr-line);
  font-size: 12px; color: var(--wpmr-soft);
}
.wpmr-sessionline b { color: var(--wpmr-ink); font-variant-numeric: tabular-nums; }
.wpmr-sessionline b.is-plus { color: var(--wpmr-win); }

/* =========================================================
   Betting board
   ========================================================= */
.wpmr-cell {
  position: relative;
  border: 1px solid var(--wpmr-cell-line); border-radius: 10px;
  background: var(--wpmr-cell); color: var(--wpmr-ink);
  font-family: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: filter .12s, transform .08s;
}
.wpmr-cell:hover { filter: brightness(1.06); }
.wpmr-cell:active { transform: scale(.97); }
.wpmr-cell:focus-visible { outline: 2px solid var(--wpmr-gold); outline-offset: 2px; }
.wpmr-cell-sub { font-size: 10px; opacity: .8; font-weight: 500; }
.wpmr-cell.is-hit { animation: wpmr-hit 1.2s ease-out; }
@keyframes wpmr-hit {
  0%   { box-shadow: 0 0 0 0 var(--wpmr-gold); }
  100% { box-shadow: 0 0 0 12px rgba(var(--wpmr-gold-rgb),0); }
}

/* Quick row: RED / BLACK / GREEN 0 */
.wpmr-quick { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.wpmr-q { min-height: 48px; border-radius: 12px; }
.wpmr-q .wpmr-cell-label { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; }
.wpmr-tone-red   { background: var(--wpmr-red);   color: #fff; border: 0; }
.wpmr-tone-black { background: var(--wpmr-black); color: #fff; border: 0; }
.wpmr-tone-zero .wpmr-cell-label { color: var(--wpmr-green-text); }

/* Outside + dozens */
.wpmr-outside { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.wpmr-dozens  { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.wpmr-o { min-height: 42px; }
.wpmr-o .wpmr-cell-label { text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }

/* Section dividers */
.wpmr-strip-label {
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--wpmr-muted);
}
.wpmr-strip-label::after { content: ""; flex: 1; height: 1px; background: var(--wpmr-line); }

/* Numbers strip: mobile-first = 6-col sequential grid, no zero/column
   rails (the quick GREEN 0 covers zero). Desktop re-flows the same DOM. */
.wpmr-numstrip { display: grid; grid-template-columns: 1fr; gap: 5px; }
.wpmr-zerocol { display: none; }
.wpmr-colcol  { display: none; }
.wpmr-numbers { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 5px; }
.wpmr-n { min-height: 46px; border-radius: 9px; font-size: 15px; font-weight: 700; }
.wpmr-n.wpmr-tone-red   { background: var(--wpmr-red);   color: #fff; border: 0; }
.wpmr-n.wpmr-tone-black { background: var(--wpmr-black); color: #fff; border: 0; }
.wpmr-n.wpmr-tone-zero  { background: var(--wpmr-green); color: var(--wpmr-green-ink); border: 0; }
.wpmr-n.wpmr-tone-zero .wpmr-cell-label { color: inherit; }

/* Called-bet pills */
.wpmr-called { display: flex; flex-wrap: wrap; gap: 7px; }
.wpmr-pill {
  min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--wpmr-cell-line); background: var(--wpmr-cell); color: var(--wpmr-soft);
  font-family: inherit; font-weight: 600; font-size: 12px; cursor: pointer;
  transition: filter .12s;
}
.wpmr-pill:hover { filter: brightness(1.06); color: var(--wpmr-ink); }
.wpmr-pill:focus-visible { outline: 2px solid var(--wpmr-gold); outline-offset: 2px; }

/* Your bets (slip) */
.wpmr-yourbets {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--wpmr-line);
}
.wpmr-slip { display: flex; flex-wrap: wrap; gap: 7px; min-height: 30px; align-items: center; }
.wpmr-slip-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--wpmr-bg); font-size: 12px; color: var(--wpmr-ink);
  border: 0; font-family: inherit; cursor: pointer;
}
.wpmr-slip-pill b { font-variant-numeric: tabular-nums; }
.wpmr-slip-pill .wpmr-slip-x { color: var(--wpmr-faint); font-weight: 700; }
.wpmr-possible { display: flex; justify-content: flex-end; gap: 7px; font-size: 12px; color: var(--wpmr-muted); }
.wpmr-possible b { color: var(--wpmr-green-text); font-variant-numeric: tabular-nums; }

/* Guest inline card (discreet, never a blocking overlay) */
.wpmr-guest-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--wpmr-cell); border: 1px solid var(--wpmr-cell-line);
  animation: wpmr-rise .3s ease-out both;
}
.wpmr-guest-card[hidden] { display: none; }
.wpmr-guest-text { flex: 1 1 220px; font-size: 12.5px; line-height: 1.45; color: var(--wpmr-soft); }
.wpmr-guest-text b { color: var(--wpmr-ink); }
.wpmr-guest-btn {
  flex: none; display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--wpmr-green); color: var(--wpmr-green-ink);
  font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer;
}

/* Chips placed on cells: absolutely centered in the reserved slot. */
.wpmr-chipslot { position: absolute; inset: 0; pointer-events: none; }
.wpmr-placed {
  position: absolute; left: 50%; top: 50%;
  width: 30px; height: 30px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(0,0,0,.3)), var(--chipc, #1f7a46);
  box-shadow: 0 3px 8px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.18);
  display: grid; place-items: center;
  animation: wpmr-pop .35s ease-out both;
}
.wpmr-placed::before {
  content: ""; position: absolute; inset: 9%; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.75); opacity: .75;
}
.wpmr-placed-face {
  position: absolute; inset: 24%; border-radius: 50%;
  background: rgba(250,248,243,.94); color: #15181c;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
@keyframes wpmr-pop {
  0%   { transform: translate(-50%,-50%) scale(.7); opacity: 0; }
  70%  { transform: translate(-50%,-50%) scale(1.06); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
.wpmr-o .wpmr-placed, .wpmr-q .wpmr-placed {
  left: auto; right: 4px; transform: translateY(-50%);
  animation: wpmr-pop-r .35s ease-out both;
}
@keyframes wpmr-pop-r {
  0%   { transform: translateY(-50%) scale(.7); opacity: 0; }
  70%  { transform: translateY(-50%) scale(1.06); opacity: 1; }
  100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

/* =========================================================
   Bottom bar
   ========================================================= */
.wpmr-bottombar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 12px 18px;
  background: var(--wpmr-card);
  border-top: 1px solid var(--wpmr-line);
}
.wpmr-chipwrap { display: flex; flex-direction: column; gap: 4px; }
.wpmr-chips { display: flex; align-items: center; gap: 8px; }
.wpmr-chip {
  position: relative; width: 46px; height: 46px; border-radius: 50%; flex: none;
  border: 0; cursor: pointer; font-family: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(0,0,0,.3)), var(--chipc, #1f7a46);
  box-shadow: 0 3px 8px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.18);
  transition: transform .12s;
}
.wpmr-chip::before {
  content: ""; position: absolute; inset: 9%; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.75); opacity: .75;
}
.wpmr-chip-face {
  position: absolute; inset: 24%; border-radius: 50%;
  background: rgba(250,248,243,.94); color: #15181c;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.wpmr-chip:hover { transform: translateY(-2px); }
.wpmr-chip[aria-pressed="true"] { outline: 2px solid var(--wpmr-gold); outline-offset: 3px; transform: translateY(-2px); }
.wpmr-actions { display: flex; align-items: center; gap: 7px; }
.wpmr-btn {
  min-height: 42px; padding: 0 14px;
  border: 1px solid var(--wpmr-cell-line); border-radius: 10px;
  background: var(--wpmr-cell); color: var(--wpmr-soft);
  font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
  transition: filter .12s;
}
.wpmr-btn:hover { filter: brightness(1.06); color: var(--wpmr-ink); }
.wpmr-btn:disabled { opacity: .45; cursor: default; }
.wpmr-spinwrap { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.wpmr-totalwrap { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.wpmr-total { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wpmr-spin {
  min-height: 50px; padding: 0 34px;
  border: 0; border-radius: 999px;
  background: var(--wpmr-green); color: var(--wpmr-green-ink);
  font-family: inherit; font-weight: 700; letter-spacing: .14em; font-size: 15px;
  text-transform: uppercase; cursor: pointer;
  box-shadow: var(--wpmr-spin-shadow);
  transition: filter .12s, transform .1s;
}
.wpmr-spin:hover { filter: brightness(1.08); }
.wpmr-spin:active { transform: translateY(1px); }
.wpmr-spin:disabled { opacity: .5; cursor: default; box-shadow: none; }
.wpmr-spin-sm { min-height: 44px; padding: 0 20px; font-size: 13px; letter-spacing: .1em; }
.wpmr-disclaimer { flex: 1 1 100%; font-size: 10.5px; color: var(--wpmr-faint); }

/* =========================================================
   Win overlay
   ========================================================= */
.wpmr-overlay {
  position: absolute; inset: 0; z-index: 40;
  display: grid; place-items: center; padding: 20px;
  background: var(--wpmr-overlay-bg);
}
.wpmr-overlay[hidden] { display: none; }
.wpmr-overlay-card {
  width: min(100%, 430px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 24px;
  border-radius: 20px; background: var(--wpmr-card);
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
  text-align: center;
  animation: wpmr-rise .28s ease-out both;
}
.wpmr-overlay-result { display: flex; align-items: center; gap: 12px; }
.wpmr-result-big { min-width: 64px; min-height: 56px; font-size: 34px; border-radius: 14px; }
.wpmr-overlay-desc { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.wpmr-overlay-desc b { font-size: 15px; font-weight: 600; }
.wpmr-overlay-desc span { font-size: 12px; color: var(--wpmr-muted); }
.wpmr-overlay-net { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; padding-top: 12px; border-top: 1px solid var(--wpmr-line); }
.wpmr-overlay-amount { font-size: 38px; font-weight: 700; line-height: 1.1; color: var(--wpmr-win); font-variant-numeric: tabular-nums; }
.wpmr-overlay.is-lose .wpmr-overlay-amount { color: var(--wpmr-ink); }
.wpmr-overlay-rows { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.wpmr-overlay-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--wpmr-soft); }
.wpmr-overlay-row b { color: var(--wpmr-win); font-variant-numeric: tabular-nums; }
.wpmr-overlay-row.is-zero { color: var(--wpmr-faint); }
.wpmr-overlay-row.is-zero b { color: var(--wpmr-faint); font-weight: 400; }
.wpmr-overlay-actions { width: 100%; display: flex; gap: 8px; margin-top: 4px; }
.wpmr-overlay-actions .wpmr-btn { flex: 1; min-height: 46px; border-radius: 999px; }
.wpmr-overlay-actions .wpmr-spin { flex: 1; }
@keyframes wpmr-rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* =========================================================
   Toast / modal / SEO fallback (chrome ported from the base)
   ========================================================= */
.wpmr-toast {
  position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--wpmr-card); border: 1px solid var(--wpmr-line); border-radius: 10px;
  box-shadow: var(--wpmr-card-shadow);
  padding: 9px 18px; font-size: 13px; color: var(--wpmr-ink); text-align: center;
  max-width: calc(100% - 32px); pointer-events: none; animation: wpmr-toast-in .2s ease;
}
.wpmr-toast-badge { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-color: var(--wpmr-green); font-weight: 700; pointer-events: none; }
.wpmr-toast-badge-icon { font-size: 22px; line-height: 1; }
.wpmr-toast-badge--rare, .wpmr-toast-badge--epic { border-color: #7f8cf2; box-shadow: 0 0 0 1px rgba(127,140,242,.4), 0 8px 24px rgba(0,0,0,.25); }
.wpmr-toast-badge--legendary, .wpmr-toast-badge--mythic { border-color: var(--wpmr-gold); box-shadow: 0 0 0 1px rgba(var(--wpmr-gold-rgb),.5), 0 0 24px rgba(var(--wpmr-gold-rgb),.3); }
@keyframes wpmr-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.wpmr-toast.error { border-color: var(--wpmr-red); color: var(--wpmr-red); }

.wpmr-modal-overlay {
  position: absolute; inset: 0; z-index: 99999;
  background: var(--wpmr-overlay-bg); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.wpmr-modal {
  background: var(--wpmr-card); border: 1px solid var(--wpmr-line); border-radius: 16px;
  padding: 28px 24px; max-width: 400px; width: 100%; text-align: center; box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.wpmr-modal-icon { font-size: 44px; margin-bottom: 14px; }
.wpmr-modal h2   { font-size: 19px; font-weight: 700; color: var(--wpmr-ink); margin-bottom: 10px; }
.wpmr-modal p    { font-size: 14px; color: var(--wpmr-muted); line-height: 1.55; margin-bottom: 22px; }
.wpmr-modal-btns { display: flex; flex-direction: column; gap: 9px; }
.wpmr-modal-btn-primary {
  display: block; padding: 14px; border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
  background: var(--wpmr-green); color: var(--wpmr-green-ink); font-size: 15px; font-weight: 800;
}
.wpmr-modal-btn-secondary {
  display: block; padding: 12px; border-radius: 999px; text-decoration: none; cursor: pointer;
  background: var(--wpmr-cell); color: var(--wpmr-ink); border: 1px solid var(--wpmr-cell-line); font-size: 14px; font-weight: 600;
}
.wpmr-modal-btn-close { background: none; border: none; color: var(--wpmr-muted); font-size: 13px; cursor: pointer; padding: 4px; font-family: inherit; }

.wpmr-seo-content { padding: 18px 22px; color: var(--wpmr-soft); font-size: 14px; line-height: 1.65; }
.wpmr-seo-content a { color: var(--wpmr-green-text); text-decoration: underline; }
.wpmr-seo-content p { margin: 0 0 10px; }
.wpmr-seo-content ul { margin: 0 0 10px 18px; }

.wpmr-sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; }

/* =========================================================
   Wide containers (>= 640px): side-by-side layout and the
   classic 12×3 numbers strip. Same DOM, CSS placement only —
   tab order and screen-reader order stay sequential 1..36.
   ========================================================= */
@container wpmr (min-width: 640px) {
  .wpmr-main { flex-wrap: nowrap; }
  .wpmr-side { max-width: 340px; }

  .wpmr-numstrip { grid-template-columns: auto 1fr auto; }
  .wpmr-zerocol { display: grid; }
  .wpmr-zerocol .wpmr-cell { height: 100%; min-width: 34px; }
  .wpmr-colcol { display: grid; grid-template-rows: repeat(3, 1fr); gap: 5px; min-width: 42px; }
  .wpmr-colcol .wpmr-cell { min-height: 0; font-size: 11px; font-weight: 600; background: var(--wpmr-cell); color: var(--wpmr-soft); border: 1px solid var(--wpmr-cell-line); }

  .wpmr-numbers { grid-template-columns: repeat(12, minmax(0,1fr)); grid-template-rows: repeat(3, 1fr); }
  .wpmr-numbers .wpmr-cell { min-height: 34px; font-size: 12.5px; }
  /* Classic orientation: 3-6-9… top row, 1-4-7… bottom, streets left→right. */
  .wpmr-numbers .wpmr-cell:nth-child(3n+1) { grid-row: 3; }
  .wpmr-numbers .wpmr-cell:nth-child(3n+2) { grid-row: 2; }
  .wpmr-numbers .wpmr-cell:nth-child(3n)   { grid-row: 1; }
  .wpmr-numbers .wpmr-cell:nth-child(-n+3)              { grid-column: 1; }
  .wpmr-numbers .wpmr-cell:nth-child(n+4):nth-child(-n+6)   { grid-column: 2; }
  .wpmr-numbers .wpmr-cell:nth-child(n+7):nth-child(-n+9)   { grid-column: 3; }
  .wpmr-numbers .wpmr-cell:nth-child(n+10):nth-child(-n+12) { grid-column: 4; }
  .wpmr-numbers .wpmr-cell:nth-child(n+13):nth-child(-n+15) { grid-column: 5; }
  .wpmr-numbers .wpmr-cell:nth-child(n+16):nth-child(-n+18) { grid-column: 6; }
  .wpmr-numbers .wpmr-cell:nth-child(n+19):nth-child(-n+21) { grid-column: 7; }
  .wpmr-numbers .wpmr-cell:nth-child(n+22):nth-child(-n+24) { grid-column: 8; }
  .wpmr-numbers .wpmr-cell:nth-child(n+25):nth-child(-n+27) { grid-column: 9; }
  .wpmr-numbers .wpmr-cell:nth-child(n+28):nth-child(-n+30) { grid-column: 10; }
  .wpmr-numbers .wpmr-cell:nth-child(n+31):nth-child(-n+33) { grid-column: 11; }
  .wpmr-numbers .wpmr-cell:nth-child(n+34)              { grid-column: 12; }

  .wpmr-placed { width: 26px; height: 26px; }
  .wpmr-placed-face { font-size: 9px; }
}

/* =========================================================
   Narrow containers (< 640px): the mobile stack from the
   mockup — horizontal wheel card, no stats card, 6-col grid.
   ========================================================= */
@container wpmr (max-width: 639px) {
  .wpmr-brand-sub { display: none; }
  .wpmr-limits { display: none; }
  .wpmr-balance-label { display: none; }
  .wpmr-main { padding: 10px; gap: 10px; }
  .wpmr-side { flex: 1 1 100%; }
  .wpmr-bet-card { flex: 1 1 100%; }

  .wpmr-wheel-card { flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; }
  .wpmr-wheelbox { flex: none; width: 84px; margin: 0; }
  .wpmr-resultline { flex: 1; min-width: 0; }
  .wpmr-result-badge { font-size: 22px; min-height: 38px; }

  /* Mockup-faithful: the statistics card is desktop-only. */
  .wpmr-stats-card { display: none; }

  .wpmr-chips { gap: 6px; }
  .wpmr-chip { width: 38px; height: 38px; }
  .wpmr-chip-face { font-size: 11px; }
  .wpmr-actions { order: 4; flex: 1 1 100%; }
  .wpmr-actions .wpmr-btn { flex: 1; }
  .wpmr-spinwrap { margin-left: auto; }
  .wpmr-spin { min-height: 46px; padding: 0 22px; font-size: 14px; }
  .wpmr-bottombar { gap: 10px; padding: 10px 12px; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .wpmr-rotor, .wpmr-ball-orbit { transition: none; }
  .wpmr-ball { animation: none; box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
  .wpmr-placed, .wpmr-o .wpmr-placed, .wpmr-q .wpmr-placed { animation: none; }
  .wpmr-cell.is-hit { animation: none; outline: 2px solid var(--wpmr-gold); outline-offset: 1px; }
  .wpmr-overlay-card, .wpmr-guest-card { animation: none; }
  .wpmr-spinner { animation-duration: 1.5s; }
}
