/* ============================================================================
   ShinyLuck - On-chain American Roulette
   Somnia visual language: near-black canvas, mono type, purple/blue neon,
   soft grain + line grid, premium glow. Vanilla, no framework.
   ============================================================================ */

.rl-root {
  /* ---- palette (Somnia brand) ---- */
  --rl-bg:        #070707;
  --rl-panel:     #0c0c10;
  --rl-panel-2:   #101015;
  --rl-line:      #1c1c24;
  --rl-line-soft: #15151b;
  --rl-ink:       #f5f5f5;
  --rl-ink-dim:   #b9b9c4;
  --rl-muted:     #6f6f7e;
  --rl-faint:     #3a3a45;

  --rl-purple:    #7c20f0;   /* somnia purple */
  --rl-purple-2:  #5601bf;   /* deep */
  --rl-blue:      #6e6eed;   /* dreamdex blue */
  --rl-magenta:   #ff3df0;
  --rl-cyan:      #25e8d6;

  --rl-red:       #d43800;   /* brand red - roulette red */
  --rl-red-2:     #ff5a2a;
  --rl-black:     #16161a;   /* roulette black pocket */
  --rl-green:     #00653e;   /* brand green - zero pockets */
  --rl-green-2:   #00a866;

  --rl-win:       #ffd54a;

  --rl-accent:    var(--rl-purple);
  --rl-glow:      120, 32, 240;   /* rgb of accent for glows */

  /* ---- type ---- */
  --rl-mono: "Source Code Pro", "IBM Plex Mono", ui-monospace, monospace;

  --rl-radius: 4px;
  --rl-gap: 14px;

  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  color: var(--rl-ink);
  background: var(--rl-bg);
  font-family: var(--rl-mono);
  letter-spacing: -0.03em;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}
.rl-root *, .rl-root *::before, .rl-root *::after { box-sizing: border-box; }

/* bonus mode reskin - hotter palette */
.rl-root.rl-bonus {
  --rl-accent:  var(--rl-magenta);
  --rl-purple:  #ff3df0;
  --rl-blue:    #ff7a3d;
  --rl-glow:    255, 61, 240;
}

/* ---------- texture layers ---------- */
.rl-grain, .rl-grid, .rl-scan { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.rl-grain {
  opacity: 0.05; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.rl-grid {
  opacity: 0.5;
  background-image:
    linear-gradient(var(--rl-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rl-line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 78%);
          mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 78%);
}
.rl-scan {
  opacity: 0.35;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px);
}
.rl-glowfield {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 22% 8%, rgba(var(--rl-glow), 0.16), transparent 60%),
    radial-gradient(50% 50% at 92% 14%, rgba(110,110,237,0.12), transparent 60%),
    radial-gradient(70% 60% at 50% 110%, rgba(var(--rl-glow), 0.10), transparent 60%);
  transition: background 0.6s ease;
}

/* ============================== LAYOUT ============================== */
.rl-app {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  grid-template-rows: auto 1fr;
  grid-template-areas: "top  top" "main rail";
  gap: var(--rl-gap);
  height: 100%;
  padding: 16px 18px 18px;
}

/* ---------- top bar ---------- */
.rl-topbar {
  grid-area: top;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--rl-panel-2), var(--rl-panel));
  border: 1px solid var(--rl-line);
  border-radius: var(--rl-radius);
}
.rl-brand { display: flex; align-items: center; gap: 12px; }
.rl-logomark {
  font-size: 26px; font-weight: 700; line-height: 1;
  color: var(--rl-ink); letter-spacing: -0.05em;
  text-shadow: 0 0 18px rgba(var(--rl-glow), 0.55);
}
.rl-logomark b { color: var(--rl-accent); }
.rl-brand-name { font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--rl-ink-dim); }
.rl-brand-sub  { font-size: 11px; color: var(--rl-muted); }
.rl-chain-pill {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rl-ink-dim);
  padding: 6px 11px; border: 1px solid var(--rl-line);
  border-radius: 999px; background: rgba(255,255,255,0.02);
}
.rl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rl-green-2);
  box-shadow: 0 0 10px var(--rl-green-2); animation: rl-pulse 2s infinite; }
@keyframes rl-pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.rl-spacer { flex: 1; }

.rl-stat { display: flex; flex-direction: column; gap: 3px; min-width: 96px; }
.rl-stat .rl-k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rl-muted); }
.rl-stat .rl-v { font-size: 19px; font-weight: 600; color: var(--rl-ink); }
.rl-stat .rl-v small { font-size: 12px; color: var(--rl-muted); font-weight: 400; }
.rl-stat.rl-accent-stat .rl-v { color: var(--rl-accent); text-shadow: 0 0 14px rgba(var(--rl-glow),0.5); }
.rl-vsep { width: 1px; align-self: stretch; background: var(--rl-line); margin: 2px 0; }

.rl-iconbtn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--rl-line); border-radius: var(--rl-radius);
  background: rgba(255,255,255,0.02); color: var(--rl-ink-dim);
  cursor: pointer; transition: 0.15s;
}
.rl-iconbtn:hover { border-color: var(--rl-accent); color: var(--rl-ink); }
.rl-iconbtn svg { width: 18px; height: 18px; }

/* ============================== MAIN (wheel + board) ============================== */
.rl-main {
  grid-area: main; min-width: 0; min-height: 0;
  display: grid; grid-template-rows: minmax(0, 0.92fr) auto;
  gap: var(--rl-gap);
}

/* ---- wheel stage ---- */
.rl-stage {
  position: relative; min-height: 0;
  display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px;
  padding: 16px;
  background:
    radial-gradient(80% 90% at 30% 20%, rgba(var(--rl-glow),0.07), transparent 60%),
    linear-gradient(180deg, var(--rl-panel-2), var(--rl-panel));
  border: 1px solid var(--rl-line); border-radius: var(--rl-radius);
  overflow: hidden;
}
.rl-wheel-wrap {
  position: relative; min-width: 0; display: grid; place-items: center;
}
.rl-wheel-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* sound toggle floats over the wheel stage (moved out of the top bar) */
.rl-sound-float { position: absolute; top: 14px; right: 14px; z-index: 6; }

/* provably-fair card (rail) */
.rl-fair-card .rl-fair-link { color: var(--rl-cyan); text-decoration: none; }
.rl-fair-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: baseline; }
.rl-fair-k { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rl-muted); }
.rl-fair-v { font-size: 12px; color: var(--rl-ink-dim); text-align: right; }
.rl-fair-seed { font-size: 10px; color: var(--rl-cyan); word-break: break-all; text-align: right; }

/* phase / countdown over wheel */
.rl-phase {
  position: absolute; left: 16px; top: 14px;
  display: flex; align-items: center; gap: 10px; z-index: 3;
}
.rl-phase-led { width: 9px; height: 9px; border-radius: 50%; background: var(--rl-muted); transition: 0.3s; }
.rl-phase-label { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rl-ink-dim); }
.rl-root[data-phase="open"]  .rl-phase-led { background: var(--rl-green-2); box-shadow: 0 0 12px var(--rl-green-2); }
.rl-root[data-phase="lock"]  .rl-phase-led { background: var(--rl-red-2);  box-shadow: 0 0 12px var(--rl-red-2); }
.rl-root[data-phase="spin"]  .rl-phase-led { background: var(--rl-accent); box-shadow: 0 0 12px var(--rl-accent); }
.rl-root[data-phase="pay"]   .rl-phase-led { background: var(--rl-win);    box-shadow: 0 0 12px var(--rl-win); }

/* big result badge that flashes after landing */
.rl-result-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(0.6);
  z-index: 4; pointer-events: none; opacity: 0;
  display: grid; place-items: center; width: 122px; height: 122px; border-radius: 50%;
  font-size: 56px; font-weight: 700; color: #fff;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 0 60px rgba(0,0,0,0.7), 0 0 50px currentColor;
  transition: opacity 0.3s, transform 0.4s cubic-bezier(.2,1.4,.4,1);
}
.rl-result-badge.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* "no more bets" sweep */
.rl-nobets {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: grid; place-items: center; opacity: 0;
}
.rl-nobets.show { opacity: 1; animation: rl-nobets-anim 1.6s ease both; }
.rl-nobets span {
  font-size: clamp(22px, 4vw, 40px); font-weight: 700; letter-spacing: 0.12em;
  color: #fff; text-transform: uppercase; text-shadow: 0 0 26px var(--rl-red-2);
  padding: 14px 30px; border: 2px solid var(--rl-red-2); border-radius: 6px;
  background: rgba(212,56,0,0.12); backdrop-filter: blur(2px);
}
@keyframes rl-nobets-anim {
  0% { opacity: 0; transform: scale(1.25); }
  18% { opacity: 1; transform: scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---- countdown ring panel (right of wheel) ---- */
.rl-timerbox {
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.rl-ring-wrap { position: relative; display: grid; place-items: center; padding: 6px 0; }
.rl-ring { transform: rotate(-90deg); }
.rl-ring-track { fill: none; stroke: var(--rl-line); stroke-width: 9; }
.rl-ring-prog  { fill: none; stroke: var(--rl-accent); stroke-width: 9; stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(var(--rl-glow),0.8)); transition: stroke 0.4s; }
.rl-ring-center { position: absolute; display: grid; place-items: center; text-align: center; }
.rl-ring-num { font-size: 46px; font-weight: 700; line-height: 1; color: var(--rl-ink); }
.rl-ring-cap { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--rl-muted); margin-top: 6px; }
.rl-root[data-phase="lock"] .rl-ring-num,
.rl-root[data-phase="spin"] .rl-ring-num { color: var(--rl-red-2); }
/* Settling: window closed, waiting for the on-chain result (reveal-bot mines
   the settle tx 1-4s later). Pulse the ring + center so the gap reads as the
   chain working, not a hang. Cleared the instant resolveRound() spins. */
.rl-root.rl-settling .rl-ring-prog { stroke: var(--rl-accent); animation: rl-settle-pulse 1.1s ease-in-out infinite; }
.rl-root.rl-settling .rl-ring-num  { color: var(--rl-accent); animation: rl-settle-pulse 1.1s ease-in-out infinite; }
@keyframes rl-settle-pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }

.rl-mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rl-mini {
  background: rgba(255,255,255,0.02); border: 1px solid var(--rl-line);
  border-radius: var(--rl-radius); padding: 9px 10px; min-width: 0;
}
.rl-mini .rl-k { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rl-muted); }
.rl-mini .rl-v { font-size: 15px; font-weight: 600; margin-top: 3px; }
.rl-mini .rl-v.red { color: var(--rl-red-2); } .rl-mini .rl-v.green { color: var(--rl-green-2); }

/* ============================== BETTING BOARD ============================== */
.rl-boardpanel {
  position: relative; min-height: 0;
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(var(--rl-glow),0.05), transparent 55%),
    linear-gradient(180deg, #0d0d12, #0a0a0d);
  border: 1px solid var(--rl-line); border-radius: var(--rl-radius);
}
.rl-board-head { display: flex; align-items: center; gap: 14px; }
.rl-board-title { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--rl-ink-dim); }
.rl-board-title::before { content:""; width: 8px; height: 20px; background: var(--rl-accent); box-shadow: 0 0 12px rgba(var(--rl-glow),0.7); }
.rl-readouts { margin-left: auto; display: flex; gap: 22px; }
.rl-readout .rl-k { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rl-muted); }
.rl-readout .rl-v { font-size: 18px; font-weight: 600; }
.rl-readout.max .rl-v { color: var(--rl-win); }

/* felt + grid */
.rl-felt {
  position: relative;
  display: grid;
  grid-template-columns: 0.55fr repeat(12, 1fr);
  grid-auto-rows: 1fr;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--rl-line);
  border-radius: var(--rl-radius);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 7px),
    radial-gradient(140% 120% at 50% 0%, #14141b, #0a0a0e);
  flex: 1; min-height: 0;
  transition: 0.3s;
}
.rl-cell {
  position: relative; display: grid; place-items: center;
  border: 1px solid var(--rl-faint);
  border-radius: 3px; cursor: pointer;
  font-size: clamp(11px, 1.15vw, 17px); font-weight: 600;
  color: var(--rl-ink);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  transition: transform 0.08s, box-shadow 0.15s, border-color 0.15s, filter 0.15s;
  overflow: visible;
}
.rl-cell.num.red   { background: linear-gradient(180deg, #e8420a, var(--rl-red)); border-color: #ff6a36; }
.rl-cell.num.black { background: linear-gradient(180deg, #1f1f25, var(--rl-black)); border-color: #34343e; }
.rl-cell.zero      { background: linear-gradient(180deg, #019a5e, var(--rl-green)); border-color: #00c277; color:#fff; }
.rl-cell.outside   { background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012)); font-size: clamp(10px,0.95vw,14px); letter-spacing: 0.06em; text-transform: uppercase; color: var(--rl-ink-dim); }
.rl-cell .pay-tag {
  position: absolute; top: 3px; right: 5px; font-size: 9px; font-weight: 400;
  color: rgba(255,255,255,0.5); letter-spacing: 0;
}
.rl-cell:hover { transform: translateY(-1px); border-color: #fff; box-shadow: 0 0 0 1px #fff, 0 6px 16px rgba(0,0,0,0.5); z-index: 3; }
.rl-cell.hl { box-shadow: 0 0 0 2px var(--rl-accent), 0 0 18px rgba(var(--rl-glow),0.6); border-color: var(--rl-accent); z-index: 2; }
.rl-cell.win {
  animation: rl-cellwin 0.7s ease infinite alternate; z-index: 4;
}
@keyframes rl-cellwin {
  from { box-shadow: 0 0 0 2px var(--rl-win), 0 0 10px rgba(255,213,74,0.5); }
  to   { box-shadow: 0 0 0 3px var(--rl-win), 0 0 28px rgba(255,213,74,0.95); }
}
.rl-cell.lose { filter: grayscale(0.6) brightness(0.5); }

/* number color dot for red/black quick scan on outside not needed */

/* chip stack on a cell */
.rl-chipstack {
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  display: grid; place-items: center; pointer-events: none; z-index: 5;
}
.rl-chip-disc {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff;
  background: radial-gradient(circle at 50% 35%, #fff2, transparent 60%), var(--chip, var(--rl-purple));
  border: 2px dashed rgba(255,255,255,0.85);
  box-shadow: 0 3px 6px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(0,0,0,0.25);
}
.rl-chip-cnt {
  position: absolute; top: -8px; right: -10px;
  font-size: 9px; font-weight: 700; color: #07120c;
  background: var(--rl-win); border-radius: 999px; padding: 1px 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.rl-cell-total {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: #07120c;
  background: var(--rl-ink); padding: 1px 6px; border-radius: 999px; z-index: 6;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
@keyframes rl-chip-pop { 0%{transform:translateX(-50%) scale(0) translateY(-14px)} 60%{transform:translateX(-50%) scale(1.18) translateY(0)} 100%{transform:translateX(-50%) scale(1)} }
.rl-chipstack.pop { animation: rl-chip-pop 0.32s cubic-bezier(.2,1.5,.4,1); }

/* ghost chip from community feed */
.rl-ghost-chip {
  position: absolute; width: 22px; height: 22px; border-radius: 50%; pointer-events: none; z-index: 7;
  background: radial-gradient(circle at 50% 35%, #fff5, transparent), var(--rl-blue);
  border: 2px solid rgba(255,255,255,0.7); opacity: 0;
  animation: rl-ghost 1.1s ease both;
}
@keyframes rl-ghost { 0%{opacity:0; transform: translateY(-22px) scale(0.4)} 30%{opacity:0.95; transform: translateY(0) scale(1)} 100%{opacity:0; transform: scale(0.9)} }

/* board lock overlay */
.rl-felt.locked { filter: saturate(0.5) brightness(0.62); }
.rl-felt.locked .rl-cell { cursor: not-allowed; }
.rl-felt::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--rl-radius);
  background: linear-gradient(100deg, transparent 30%, rgba(212,56,0,0.18) 50%, transparent 70%);
  background-size: 250% 100%; background-position: 150% 0; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.rl-felt.sweep::after { opacity: 1; animation: rl-sweep 1.1s ease; }
@keyframes rl-sweep { from { background-position: 150% 0; } to { background-position: -120% 0; } }

/* ============================== CONTROLS ============================== */
.rl-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rl-chips { display: flex; gap: 9px; }
.rl-denom {
  position: relative; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: radial-gradient(circle at 50% 32%, rgba(255,255,255,0.28), transparent 55%), var(--chip);
  border: 3px dashed rgba(255,255,255,0.5);
  box-shadow: 0 4px 10px rgba(0,0,0,0.55), inset 0 0 0 4px rgba(0,0,0,0.18);
  transition: transform 0.12s, box-shadow 0.15s;
}
.rl-denom small { font-size: 8px; opacity: 0.7; font-weight: 400; }
.rl-denom:hover { transform: translateY(-2px); }
.rl-denom.sel { border-color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 22px rgba(255,255,255,0.4), 0 6px 14px rgba(0,0,0,0.6); transform: translateY(-3px); }

.rl-btns { display: flex; gap: 8px; margin-left: auto; }
.rl-btn {
  font-family: var(--rl-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rl-ink-dim); cursor: pointer;
  padding: 11px 16px; border: 1px solid var(--rl-line); border-radius: var(--rl-radius);
  background: rgba(255,255,255,0.02); transition: 0.15s;
}
.rl-btn:hover:not(:disabled) { color: var(--rl-ink); border-color: var(--rl-accent); box-shadow: 0 0 14px rgba(var(--rl-glow),0.3); }
.rl-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.rl-btn.primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(180deg, var(--rl-purple), var(--rl-purple-2));
  box-shadow: 0 0 20px rgba(var(--rl-glow),0.45);
}
.rl-btn.primary:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 0 28px rgba(var(--rl-glow),0.7); }

/* ============================== RIGHT RAIL ============================== */
.rl-rail {
  grid-area: rail; min-height: 0;
  display: grid; grid-template-rows: auto auto auto 1fr; gap: var(--rl-gap);
}
.rl-card {
  background: linear-gradient(180deg, var(--rl-panel-2), var(--rl-panel));
  border: 1px solid var(--rl-line); border-radius: var(--rl-radius);
  padding: 13px 14px; min-height: 0; display: flex; flex-direction: column;
  /* keep all card content inside the card box - long hex seeds / many
     history pills / feed rows must never spill past the rail's right edge */
  min-width: 0; overflow: hidden;
}
.rl-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.rl-card-head .rl-k { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--rl-muted); }
.rl-card-head .rl-k::before { content: "> "; color: var(--rl-accent); }
.rl-card-head .rl-more { margin-left: auto; font-size: 10px; color: var(--rl-faint); }

/* recent results strip - clip the row so pills past the card width are
   hidden instead of pushing the card wider than the rail */
.rl-history { display: flex; gap: 6px; overflow: hidden; max-width: 100%; }
.rl-pill {
  flex: 0 0 auto; min-width: 34px; height: 38px; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff; border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.12);
  animation: rl-pill-in 0.4s ease;
}
.rl-pill.red { background: linear-gradient(180deg,#e8420a,var(--rl-red)); }
.rl-pill.black { background: linear-gradient(180deg,#23232a,var(--rl-black)); }
.rl-pill.green { background: linear-gradient(180deg,#019a5e,var(--rl-green)); }
@keyframes rl-pill-in { from { transform: translateX(-12px) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* stats card */
.rl-statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.rl-srow { display: flex; flex-direction: column; gap: 5px; }
.rl-srow .rl-k { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rl-muted); }
.rl-bar { height: 6px; border-radius: 3px; background: var(--rl-line); overflow: hidden; display: flex; }
.rl-bar i { display: block; height: 100%; }
.rl-bar i.red { background: var(--rl-red-2); } .rl-bar i.black { background: #4b4b58; }
.rl-bar i.odd { background: var(--rl-blue); } .rl-bar i.even { background: var(--rl-cyan); }
.rl-srow .rl-sval { font-size: 12px; color: var(--rl-ink-dim); display: flex; justify-content: space-between; }

.rl-hotcold { display: flex; gap: 8px; margin-top: 12px; }
.rl-hc { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.rl-hc .rl-k { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.rl-hc.hot .rl-k { color: var(--rl-red-2); } .rl-hc.cold .rl-k { color: var(--rl-blue); }
.rl-hc-nums { display: flex; gap: 5px; }
.rl-hc-num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 3px;
  font-size: 12px; font-weight: 700; color: #fff; border: 1px solid rgba(255,255,255,0.12); }
.rl-hc-num.red { background: var(--rl-red); } .rl-hc-num.black { background: var(--rl-black); } .rl-hc-num.green { background: var(--rl-green); }

/* community feed */
.rl-feed-card { overflow: hidden; }
.rl-feed { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 7px; position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 6px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 6px), transparent 100%); }
.rl-feed-row {
  display: flex; align-items: center; gap: 9px; font-size: 12px;
  padding: 7px 9px; border: 1px solid var(--rl-line-soft); border-radius: 3px;
  background: rgba(255,255,255,0.015); animation: rl-feed-in 0.4s ease;
}
@keyframes rl-feed-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.rl-feed-row.you { border-color: var(--rl-accent); background: rgba(var(--rl-glow),0.07); }
.rl-feed-row > * { min-width: 0; } /* let children shrink instead of overflowing the card */
.rl-feed-addr { color: var(--rl-ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-feed-mid { flex: 1; color: var(--rl-muted); min-width: 0; }
.rl-feed-amt { white-space: nowrap; }
.rl-feed-tag { padding: 2px 7px; border-radius: 3px; font-size: 10px; font-weight: 700; color: #fff; }
.rl-feed-amt { color: var(--rl-ink); font-weight: 600; }
.rl-feed-row.win .rl-feed-amt { color: var(--rl-win); }

/* toast / errors */
.rl-toast-wrap { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.rl-toast {
  font-size: 12px; letter-spacing: 0.04em; padding: 10px 16px; border-radius: var(--rl-radius);
  background: var(--rl-panel-2); border: 1px solid var(--rl-line); color: var(--rl-ink);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6); animation: rl-toast-in 0.3s ease;
}
.rl-toast.err { border-color: var(--rl-red-2); color: var(--rl-red-2); }
.rl-toast.win { border-color: var(--rl-win); color: var(--rl-win); }
@keyframes rl-toast-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* particle canvas for win bursts */
.rl-fx { position: absolute; inset: 0; z-index: 30; pointer-events: none; }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1180px) {
  .rl-app { grid-template-columns: 1fr; grid-template-areas: "top" "main" "rail"; overflow: auto; height: auto; min-height: 100%; }
  .rl-rail { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .rl-feed-card { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .rl-stage { grid-template-columns: 1fr; }
  .rl-timerbox { flex-direction: row; flex-wrap: wrap; }
  .rl-readouts { display: none; }
  .rl-rail { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .rl-app { padding: 10px; }
  .rl-felt { grid-template-columns: 0.5fr repeat(12,1fr); font-size: 9px; }
  .rl-denom { width: 44px; height: 44px; }
}
