/* Rock Paper Scissors — vanilla DOM, no framework, no iframe.
   Mounted into #rps-game in the outer SEO shell. Visual language mirrors
   the Limbo game (panel bg, gold accent, win/lose colors). */

#rps-game {
  /* Panel sits ONE notch brighter than the near-black page bg, with a faint
     cool tint, so it reads as a distinct surface floating above the
     background instead of melting into it. */
  --panel-bg: #20212B;
  --panel-radius: 10px;
  --text-muted: #8C8C91;
  --win: #35C759;
  --lose: #FF3B31;
  /* Tie is a neutral "push" — no win/loss. Keep it grey so it never reads as
     the brand gold (which is reserved for value/CTA/brand). */
  --tie: #B8B8BE;
  --grey: #8E8E92;
  /* Brand gold — exactly three fixed tones used everywhere (no stray yellows):
     hi (highlight) → base (accent) → lo (shadow/gradient end). */
  --gold-hi: #FFE066;
  --gold:    #FFD700;
  --gold-lo: #FFAA00;
  --accent: var(--gold);

  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#rps-game .rps-inner {
  width: 100%;
  max-width: 800px;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (min-width: 501px) { #rps-game .rps-inner { padding-top: 28px; } }

/* ============== Board (conveyor + result + hand buttons) ============== */
#rps-game .rps-board {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 340px;
  border-radius: var(--panel-radius);
  background: var(--panel-bg);
  /* Faint edge + top inner highlight + soft drop shadow so the panel reads
     as a raised surface above the near-black page background. */
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 28px rgba(0,0,0,0.45);
  padding: 46px 14px 22px;   /* top padding leaves room for the history row */
  box-sizing: border-box;
  transition: background 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;     /* contain the belt's left/right overflow */
}

/* ---- Horizontal conveyor ----
   The board (overflow:hidden) contains the left/right overflow; the conveyor
   itself does NOT clip vertically, so the current slot's scale-up is not cut
   at the top/bottom. Vertical padding gives the scaled current slot room. */
#rps-game .rps-conveyor {
  --slot-w: 100px;
  width: 100%;
  padding: 16px 0;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
}
#rps-game .rps-conveyor-track {
  display: flex;
  align-items: flex-start;
  /* Center the CURRENT slot (not the whole window): shift left by the number
     of slots before it, so unflipped cards extend to the right of center. */
  transform: translateX(calc(50% - (var(--center-index, 0) + 0.5) * var(--slot-w)));
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0.20, 1);
  will-change: transform;
}

/* One slot = house card (top) + multiplier (middle) + player card (bottom). */
#rps-game .rps-slot {
  flex: 0 0 var(--slot-w);
  width: var(--slot-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  box-sizing: border-box;
  /* Default (resolved/left-side) slots sit at a steady mid opacity. Upcoming
     slots override this via --dist below to fade with distance. */
  opacity: 0.55;
  transition: opacity 0.3s, transform 0.3s;
}
/* Upcoming cards: near = clear, far = faint. dist 1 ≈ 0.68, then -0.11/step,
   clamped so distant cards never fully vanish. */
#rps-game .rps-slot[style*="--dist"] {
  opacity: clamp(0.34, calc(0.79 - 0.11 * var(--dist, 1)), 0.72);
}
#rps-game .rps-slot.current { opacity: 1; transform: scale(1.08); }
/* Empty left-side placeholder slots (reserve space so current stays centered). */
#rps-game .rps-slot.placeholder { opacity: 0.28; }
#rps-game .rps-slot.placeholder .rps-card-brand { opacity: 0.4; }
#rps-game .rps-odds--ghost { background: transparent; border-color: transparent; }

/* ---- House-hand flip card ---- */
#rps-game .rps-card {
  width: 100%;
  aspect-ratio: 4 / 5;
  perspective: 800px;
}
#rps-game .rps-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}
#rps-game .rps-card.flipped .rps-card-inner { transform: rotateY(180deg); }
#rps-game .rps-card-back,
#rps-game .rps-card-face {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  box-sizing: border-box;
}
/* Card back — branded "Crash or Cash" art (Rainbet-style): deep gradient,
   inner rounded frame, diagonal repeating stripes, and the brand wordmark
   set on a slant in a gold gradient. */
#rps-game .rps-card-back {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 9px),
    linear-gradient(155deg, #2A2A3E 0%, #15151f 100%);
  border: 1.5px solid rgba(255,215,0,0.20);
  overflow: hidden;
}
/* Diagonal brand wordmark — white. */
#rps-game .rps-card-brand {
  position: relative;
  z-index: 1;
  transform: rotate(-32deg);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 13px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  text-align: center;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  user-select: none;
}
@media (min-width: 560px) { #rps-game .rps-card-brand { font-size: 15px; } }
@media (max-width: 380px) { #rps-game .rps-card-brand { font-size: 11px; } }
#rps-game .rps-card-face {
  transform: rotateY(180deg);
  background: #0F1722;
  border: 1.5px solid rgba(255,255,255,0.08);
  font-size: 54px;
  line-height: 1;
}
/* Current (next-to-flip) face-down card gets a gold halo. */
#rps-game .rps-card.current .rps-card-back {
  border-color: rgba(255,215,0,0.7);
  box-shadow: 0 0 12px rgba(255,215,0,0.25);
  animation: rps-pulse 1.3s ease-in-out infinite;
}
@keyframes rps-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255,215,0,0.18); }
  50%      { box-shadow: 0 0 16px rgba(255,215,0,0.40); }
}
#rps-game .rps-card.win  .rps-card-face { border-color: rgba(53,199,89,0.7);  box-shadow: 0 0 12px rgba(53,199,89,0.25); }
#rps-game .rps-card.lose .rps-card-face { border-color: rgba(255,59,49,0.7);  box-shadow: 0 0 12px rgba(255,59,49,0.25); }
/* Tie: neutral grey face — the run continues, no win/loss styling. */
#rps-game .rps-card.tie  .rps-card-face { border-color: rgba(142,142,146,0.6); box-shadow: 0 0 10px rgba(142,142,146,0.18); opacity: 0.85; }

/* ---- Multiplier (middle of each slot) ---- */
#rps-game .rps-odds {
  min-width: 52px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
#rps-game .rps-odds.passed {
  color: #06210F;
  background: linear-gradient(135deg, #35C759, #1FA34A);
  border-color: rgba(53,199,89,0.6);
}
#rps-game .rps-odds.next {
  color: #1A1A2E;
  background: linear-gradient(135deg, var(--gold), var(--gold-lo));
  border-color: rgba(255,215,0,0.6);
  box-shadow: 0 0 12px rgba(255,215,0,0.3);
}

/* ---- Player thrown-hand card (bottom of slot) — same size as the house card ---- */
#rps-game .rps-pcell {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
  line-height: 1;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  transition: border-color .2s, background .2s;
}
#rps-game .rps-pcell:empty { border-style: dashed; border-color: rgba(255,255,255,0.10); }
#rps-game .rps-pcell.win  { border-color: rgba(53,199,89,0.5); background: rgba(53,199,89,0.10); }
#rps-game .rps-pcell.lose { border-color: rgba(255,59,49,0.5); background: rgba(255,59,49,0.10); }
#rps-game .rps-pcell.tie  { border-color: rgba(142,142,146,0.5); background: rgba(142,142,146,0.08); opacity: 0.85; }

/* ---- Result + streak readouts ---- */
#rps-game .rps-result-text {
  font-family: 'Orbitron', 'Inter', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  min-height: 24px;
  letter-spacing: 0.5px;
  margin-top: 6px;
  text-align: center;
}
#rps-game .rps-result-text.win  { color: var(--win); text-shadow: 0 0 22px rgba(53,199,89,0.45); }
#rps-game .rps-result-text.lose { color: var(--lose); text-shadow: 0 0 18px rgba(255,59,49,0.35); }
#rps-game .rps-result-text.tie  { color: var(--tie); }
#rps-game .rps-streak-info { font-size: 14px; color: var(--text-muted); text-align: center; }
#rps-game .rps-streak-info b { color: #fff; font-size: 16px; }
#rps-game .rps-streak-odds { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }

/* Larger slots on wide screens. */
@media (min-width: 560px) {
  #rps-game .rps-conveyor { --slot-w: 118px; }
  #rps-game .rps-card-face,
  #rps-game .rps-pcell { font-size: 63px; }
}
@media (max-height: 700px) {
  #rps-game .rps-board { min-height: 280px; padding: 12px 12px 16px; gap: 7px; }
  #rps-game .rps-result-text { font-size: 17px; }
}
@media (max-width: 380px) {
  #rps-game .rps-conveyor { --slot-w: 77px; }
  #rps-game .rps-card-face,
  #rps-game .rps-pcell { font-size: 42px; }
  #rps-game .rps-odds { min-width: 42px; font-size: 10px; }
}

/* ============== History row (pinned to the top of the board panel) ===== */
#rps-game .rps-history {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  width: auto;
  height: 26px;
  z-index: 2;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 100%);
}
#rps-game .rps-history-track {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  width: 100%;
}
#rps-game .rps-hist-cell {
  flex: 0 0 auto;
  min-width: 40px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  will-change: transform, opacity;
  transform: translateZ(0);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0.20, 1), opacity 0.42s ease-in;
}
#rps-game .rps-hist-cell.win  { background: rgba(53, 199, 89, 0.20); color: var(--win); }
#rps-game .rps-hist-cell.lose { background: rgba(255, 59, 49, 0.18); color: var(--lose); }
#rps-game .rps-hist-cell.exiting { transform: translate3d(-80px, 0, 0); opacity: 0; }

/* ============== Hand buttons (housed inside the board) ==============
   Narrower than full width and centered, so they read as in-panel game
   controls rather than a full-width toolbar. */
#rps-game .rps-hands {
  width: 100%;
  max-width: 360px;
  margin: 18px auto 0;     /* sit just below the result banner */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
#rps-game .rps-hand-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 70px;
  border-radius: var(--panel-radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.045) 100%);
  border: 1.5px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 6px rgba(0,0,0,0.25);
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
#rps-game .rps-hand-btn:hover {
  border-color: rgba(255,215,0,0.55);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 16px rgba(255,215,0,0.14);
}
#rps-game .rps-hand-btn:active { transform: scale(0.95); }
#rps-game .rps-hand-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
#rps-game .rps-hand-emoji { font-size: 30px; line-height: 1; }
#rps-game .rps-hand-name { font-size: 11px; font-weight: 700; letter-spacing: 0.4px; color: rgba(255,255,255,0.82); text-transform: uppercase; }
@media (max-height: 700px) {
  #rps-game .rps-hands { margin-top: 12px; }
  #rps-game .rps-hand-btn { height: 58px; }
  #rps-game .rps-hand-emoji { font-size: 26px; }
}
@media (max-width: 400px) {
  #rps-game .rps-hands { max-width: 300px; gap: 8px; }
  #rps-game .rps-hand-btn { height: 56px; }
}

/* ============== Actions row: bet | balance | cash out ============== */
#rps-game .rps-actions {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(96px, 1fr) minmax(120px, 1.1fr);
  gap: 10px;
  align-items: stretch;
}
#rps-game .rps-bet {
  background: linear-gradient(180deg, #292a36 0%, #1c1d26 100%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--panel-radius);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    inset 0 -2px 0 rgba(0,0,0,0.25),
    0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
}
#rps-game .rps-bet-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 0; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
#rps-game .rps-bet-btn:hover { background: rgba(255,255,255,0.12); }
#rps-game .rps-bet-btn:active { transform: scale(0.94); }
#rps-game .rps-bet-btn:disabled { opacity: 0.4; cursor: not-allowed; }
#rps-game .rps-bet-btn svg { width: 18px; height: 18px; fill: currentColor; }
#rps-game .rps-bet-readout { text-align: center; }
#rps-game .rps-bet-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; }
#rps-game .rps-bet-value { font-size: 18px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }

#rps-game .rps-balance {
  background: linear-gradient(180deg, #292a36 0%, #1c1d26 100%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--panel-radius);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    inset 0 -2px 0 rgba(0,0,0,0.25),
    0 2px 8px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 6px 8px;
}
#rps-game .rps-balance-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; }
#rps-game .rps-balance-value { font-size: 18px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Action button — Tower-style CTA. BET (green default) → Cash Out (orange,
   pulsing). Disabled/mid-throw shows a flat gray. */
#rps-game .rps-cashout {
  position: relative;
  border: 0;
  border-radius: 12px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .8px;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0,0,0,.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 6px;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 200ms ease;
  background: linear-gradient(180deg, #2bd957 0%, #16a23a 100%);
  box-shadow:
    0 4px 14px rgba(43,217,87,.45),
    0 0 24px rgba(43,217,87,.18),
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -2px 0 rgba(0,0,0,.2);
  -webkit-tap-highlight-color: transparent;
}
#rps-game .rps-cashout::before {
  content: '';
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 45%;
  border-radius: 11px 11px 50% 50% / 11px 11px 100% 100%;
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0));
  pointer-events: none;
}
#rps-game .rps-cashout:not(:disabled):hover  { filter: brightness(1.08); }
#rps-game .rps-cashout:not(:disabled):active { transform: translateY(1px); filter: brightness(.95); }
/* Cash Out (live streak) — orange, pulsing. */
#rps-game .rps-cashout.active {
  background: linear-gradient(180deg, #ffb547 0%, #f08a1c 100%);
  box-shadow:
    0 4px 14px rgba(240,138,28,.5),
    0 0 24px rgba(240,138,28,.22),
    inset 0 1px 0 rgba(255,255,255,.4),
    inset 0 -2px 0 rgba(0,0,0,.22);
  animation: rps-cta-pulse 1.8s ease-in-out infinite;
}
@keyframes rps-cta-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(240,138,28,.5), 0 0 24px rgba(240,138,28,.22), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.22); }
  50%      { box-shadow: 0 4px 18px rgba(240,138,28,.6), 0 0 36px rgba(240,138,28,.4),  inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(0,0,0,.22); }
}
/* Disabled / waiting-to-throw — flat gray. */
#rps-game .rps-cashout:disabled {
  background: linear-gradient(180deg, #3a3a48 0%, #25252f 100%);
  color: rgba(255,255,255,0.45);
  box-shadow: none;
  cursor: not-allowed;
  animation: none;
}
#rps-game .rps-cashout:disabled::before { opacity: 0.3; }

/* ============== Footer row (sound) ============== */
#rps-game .rps-foot-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;   /* auto bet left, sound right */
  margin-top: -6px;
}
/* ---- Auto bet switch (left, Limbo parity) ---- */
#rps-game .rps-auto-left { display: flex; align-items: center; gap: 10px; }
#rps-game .rps-auto-label { font-size: 14px; font-weight: 600; color: #fff; }
#rps-game .rps-auto-count { color: var(--accent); font-variant-numeric: tabular-nums; margin-left: 4px; }
#rps-game .rps-auto-switch {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  border: 0;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
#rps-game .rps-auto-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
#rps-game .rps-auto-switch[data-on="1"] { background: var(--win); }
#rps-game .rps-auto-switch[data-on="1"]::after { transform: translateX(20px); }
/* ---- Right cluster: Tips + Sound ---- */
#rps-game .rps-foot-right { display: flex; align-items: center; gap: 0; }
/* Tips button (ported from Tower) — jumps to the How to Play section. */
#rps-game .rps-tips {
  height: 32px;
  padding: 0 2px 0 8px;
  background: transparent;
  border: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 100ms ease;
  -webkit-tap-highlight-color: transparent;
}
#rps-game .rps-tips .rps-tips-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
}
#rps-game .rps-tips svg { width: 18px; height: 18px; fill: currentColor; transition: fill 140ms ease; }
#rps-game .rps-tips:hover  { background: rgba(255,255,255,.06); color: #ffd54a; }
#rps-game .rps-tips:active { transform: scale(0.95); }

#rps-game .rps-sound-btn {
  background: transparent; border: 0; color: #fff;
  cursor: pointer; padding: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background 0.15s, transform 0.1s;
}
#rps-game .rps-sound-btn:hover { background: rgba(255,255,255,0.06); }
#rps-game .rps-sound-btn:active { transform: scale(0.94); }
#rps-game .rps-sound-btn svg { width: 24px; height: 24px; fill: currentColor; }

/* ============== Modals (ported from limbo) ============== */
.rps-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.rps-modal {
  background: #1C1C1D;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 22px 22px 18px;
  width: 100%; max-width: 320px;
  color: #fff; text-align: center;
}
.rps-modal-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.rps-modal-msg { font-size: 14px; color: #8C8C91; margin-bottom: 18px; line-height: 1.4; }
.rps-modal-actions { display: flex; justify-content: center; gap: 10px; }
.rps-modal-btn {
  /* Modals mount on document.body (outside #rps-game), so the --gold vars
     don't cascade here — keep the literal brand gold gradient. */
  flex: 1; height: 42px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #FFD700, #FFAA00);
  color: #1A1A2E; font-size: 14px; font-weight: 800; letter-spacing: 0.4px;
  cursor: pointer;
}
.rps-modal-btn:active { transform: scale(0.97); }

/* ============== Auto-times picker modal (ported from limbo) ============== */
.rps-modal-back {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.rps-auto-modal {
  background: #1C1C1D;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 18px 14px;
  width: 100%; max-width: 320px;
  color: #fff;
}
.rps-auto-modal-title { font-size: 16px; font-weight: 800; text-align: center; margin: 0 0 14px; }
.rps-auto-modal-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.rps-auto-modal-opt {
  height: 44px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 14px;
}
.rps-auto-modal-opt:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,215,0,0.35); }
.rps-auto-modal-num { font-weight: 800; color: #FFD700; }
.rps-auto-modal-suffix { color: #8C8C91; font-size: 12px; }
.rps-auto-modal-cancel {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.rps-auto-modal-cancel:hover { background: rgba(255,255,255,0.10); }

/* ============== Sound settings dialog (ported from limbo) ============== */
.rps-ss-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
  animation: rps-ss-mask-in 180ms ease;
  font-family: 'Inter', system-ui, sans-serif;
}
@keyframes rps-ss-mask-in { from { opacity: 0; } to { opacity: 1; } }
.rps-ss-dialog {
  width: 340px; max-width: 100%;
  background: #1A2332;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; overflow: hidden; color: #fff;
  animation: rps-ss-dialog-in 220ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes rps-ss-dialog-in {
  from { opacity: 0; transform: scale(0.94) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.rps-ss-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.rps-ss-title { color: rgba(255,255,255,.75); font-size: 14px; font-weight: 700; letter-spacing: 1.5px; }
.rps-ss-close {
  background: transparent; border: 0; color: rgba(255,255,255,.4);
  cursor: pointer; padding: 4px; display: inline-flex; border-radius: 4px;
  transition: color .15s, background .15s;
}
.rps-ss-close:hover { color: #fff; background: rgba(255,255,255,.08); }
.rps-ss-row {
  display: flex; align-items: center; padding: 14px 20px; gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.rps-ss-row:last-child { border-bottom: none; }
.rps-ss-label { flex: 0 0 40%; color: rgba(255,255,255,.6); font-size: 15px; }
.rps-ss-switch { position: relative; display: inline-block; margin-left: auto; cursor: pointer; }
.rps-ss-switch input { appearance: none; position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.rps-ss-switch-track {
  display: inline-block; width: 44px; height: 24px; border-radius: 12px;
  background: rgba(255,255,255,.12); transition: background .2s; position: relative;
}
.rps-ss-switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(255,255,255,.7); transition: transform .2s, background .2s;
}
.rps-ss-switch input:checked + .rps-ss-switch-track { background: rgba(74,158,255,.4); }
.rps-ss-switch input:checked + .rps-ss-switch-track .rps-ss-switch-thumb { transform: translateX(20px); background: #4A9EFF; }
input.rps-ss-slider {
  flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: linear-gradient(to right, #4A9EFF 0%, #4A9EFF var(--fill, 100%),
    rgba(255,255,255,.12) var(--fill, 100%), rgba(255,255,255,.12) 100%);
  outline: none; cursor: pointer;
}
input.rps-ss-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: pointer;
}
input.rps-ss-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: pointer;
}

/* ============== Narrow phone (≤ 360px) ============== */
@media (max-width: 360px) {
  #rps-game .rps-actions { grid-template-columns: minmax(96px, 1fr) minmax(76px, 1fr) minmax(104px, 1fr); gap: 8px; }
  #rps-game .rps-bet-value, #rps-game .rps-balance-value { font-size: 16px; }
  #rps-game .rps-cashout { font-size: 13px; }
}
