@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Cinzel:wght@600;700&family=Rubik:wght@400;500;700&display=swap');

:root {
  --felt-dark: #062a1a;
  --felt: #0c4429;
  --felt-light: #145c37;
  --gold: #e9c65f;
  --gold-bright: #ffe08a;
  --gold-dark: #a97e1e;
  --wine: #7a0f1c;
  --wine-bright: #b3182a;
  --blue: #2255c9;
  --green-chip: #1f9d55;
  --yellow-chip: #e8c93a;
  --ink: #0a0a0a;
  --cream: #f4e9cf;
  --panel: rgba(6, 20, 14, 0.86);
  --panel-border: rgba(233, 198, 95, 0.55);
  --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.65);
  --radius-lg: 22px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  font-family: 'Rubik', sans-serif;
  user-select: none;
}

body {
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.04) 0%, rgba(0,0,0,0.55) 70%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 6px),
    radial-gradient(ellipse at 50% 0%, var(--felt-light) 0%, var(--felt) 45%, var(--felt-dark) 100%);
  background-blend-mode: normal;
}

.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.screen.active { display: flex; }

h1, h2, h3, .title-font {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.04em;
}

/* ---------- Vignette overlay used on every screen ---------- */
.exit-app-btn {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 300;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--cream);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-deep);
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.exit-app-btn:hover { opacity: 1; border-color: var(--wine-bright); color: var(--wine-bright); }

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 220px rgba(0,0,0,0.75);
  z-index: 5;
}

/* scrollbars off for the app-window feel */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }

button {
  font-family: 'Rubik', sans-serif;
  cursor: pointer;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dark));
  color: #221600;
  box-shadow: 0 6px 0 #7a5a10, 0 10px 18px rgba(0,0,0,0.45);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #7a5a10, 0 4px 10px rgba(0,0,0,0.4); }
.btn.secondary {
  background: linear-gradient(180deg, #3a4048, #1b1f24);
  color: var(--cream);
  box-shadow: 0 6px 0 #0c0e10, 0 10px 18px rgba(0,0,0,0.45);
}
.btn.wine {
  background: linear-gradient(180deg, var(--wine-bright), var(--wine));
  color: var(--cream);
  box-shadow: 0 6px 0 #4a0a12, 0 10px 18px rgba(0,0,0,0.45);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); }

/* =========================================================
   SPLASH SCREEN
   ========================================================= */
#splash-screen {
  gap: 28px;
  overflow: hidden;
  background: #000000;
}
#splash-screen::before, #splash-screen::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  will-change: transform;
}
#splash-screen::before {
  background: radial-gradient(circle, rgba(20,146,85,0.35) 0%, transparent 70%);
  top: -20%;
  left: -15%;
  animation: blob-drift-1 4.5s ease-in-out infinite;
}
#splash-screen::after {
  background: radial-gradient(circle, rgba(12,68,41,0.4) 0%, transparent 70%);
  bottom: -25%;
  right: -15%;
  animation: blob-drift-2 5.5s ease-in-out infinite;
}
@keyframes blob-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24vw, 16vh) scale(1.2); }
}
@keyframes blob-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18vw, -22vh) scale(1.25); }
}
.splash-logo-wrap {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: min(190px, 30vw);
}
.splash-logo-img {
  display: block;
  width: 100%;
  height: auto;
}
.splash-o-wrap {
  position: absolute;
  left: 34.86%;
  top: 50%;
  width: 22.5%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}
#splash-wheel-holder, #splash-target-holder {
  position: absolute;
  inset: 0;
  display: block;
}
#splash-wheel {
  display: block;
  width: 100%;
  height: 100%;
  animation: spin-wheel 6s cubic-bezier(0.35, 0, 0.2, 1) infinite;
  transform-origin: 50% 50%;
}
@keyframes spin-wheel {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.wheel-slice { transition: fill-opacity 0.25s ease, filter 0.25s ease; }
.wheel-slice.lit { filter: drop-shadow(0 0 10px currentColor); }

#splash-target {
  position: absolute;
  width: 46%;
  height: 46%;
  top: 27%;
  left: 27%;
  animation: spin-target 6s linear infinite reverse;
  transform-origin: 50% 50%;
}
.target-ring { transition: opacity 0.2s ease, filter 0.35s ease; opacity: 0; }
.target-ring.lit { opacity: 1; filter: drop-shadow(0 0 6px rgba(179,24,42,0.9)); }
.target-cross { opacity: 0; transition: opacity 0.2s ease; }
.target-cross.lit { opacity: 1; }

/* logo estatico de la mira en el centro de la ruleta (siempre visible) */
.hub-logo-static .target-ring, .hub-logo-static .target-cross { opacity: 1; }

/* =========================================================
   MAIN MENU
   ========================================================= */
#main-menu {
  width: 100%;
  height: 100%;
  padding: 26px 34px 20px;
  gap: 18px;
  background: #000;
}
.menu-body-scroll {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.menu-header {
  width: 100%;
  margin: -26px -34px 18px;
  padding: 16px 34px 34px;
  background: linear-gradient(180deg, #0f3f27 0%, #0a2c1b 55%, #000000 100%);
}
.menu-header-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-img { height: 40px; width: auto; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45)); }

.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.balance-group { display: flex; align-items: center; gap: 6px; }

.icon-circle-btn {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(20,92,55,0.55), rgba(6,20,14,0.9));
  border: 1px solid var(--panel-border);
  color: var(--gold-bright);
  box-shadow: var(--shadow-deep);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.icon-circle-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.icon-circle-btn svg { width: 19px; height: 19px; }

.roulette-circle-btn { padding: 6px; display: none; } /* juegos ocultos por ahora, ver GAMES_HIDDEN en main.js */
.roulette-tab-icon { width: 100%; height: 100%; display: inline-flex; }
.roulette-tab-icon svg { width: 100%; height: 100%; animation: spin-wheel 10s linear infinite; }

.balance-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  padding: 4px 10px;
  font-weight: 700;
  color: var(--gold-bright);
}
.balance-chip .balance-amount-line { font-size: 15px; }
.balance-chip .balance-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.75;
}

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  padding: 9px 16px;
  color: var(--cream);
  opacity: 0.85;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.search-box:focus-within { opacity: 1; border-color: var(--gold); }
.search-box svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }
.search-box input {
  background: none; border: none; outline: none;
  color: var(--cream); font-family: 'Rubik', sans-serif; font-size: 13px;
  width: 130px;
}
.search-box input::placeholder { color: rgba(244,233,207,0.5); }

.menu-row-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 1180px;
}
.scroll-arrow {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--gold-bright);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-deep);
}
.scroll-arrow:hover { border-color: var(--gold); background: rgba(233,198,95,0.14); }
.scroll-arrow:disabled { opacity: 0.3; cursor: default; }

.menu-grid-small {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.menu-grid-small::-webkit-scrollbar { display: none; }
.menu-grid-small .tile { flex: 0 0 170px; width: 170px; height: 170px; }
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1180px;
  flex: 1;
  min-height: 0;
}
.tile {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(20,92,55,0.55), rgba(6,20,14,0.9));
  box-shadow: var(--shadow-deep), inset 0 0 0 1px rgba(255,255,255,0.03);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tile:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 24px 45px rgba(0,0,0,0.55), 0 0 0 1px var(--gold);
}
.tile:active { transform: translateY(-1px); }
.tile .tile-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10%;
}
.tile .tile-art svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5)); border-radius: 10px; overflow: hidden; }
.tile .tile-art.tile-art-fill { padding: 0; }
.tile .tile-art.tile-art-fill img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .tile-art.tile-art-fill ~ .tile-label { display: none; }
.tile .tile-label {
  position: relative;
  z-index: 2;
  padding: 12px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 30%, transparent 100%);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--gold-bright);
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
.tile .tile-tag {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 20px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--panel-border);
  color: var(--cream);
  opacity: 0.85;
}

.menu-row-small { min-height: 150px; }
.menu-row-big { min-height: 240px; }

.menu-footer {
  width: 100%;
  max-width: 1180px;
  display: flex;
  justify-content: flex-end;
}
.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--gold-bright);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-deep);
}
.refresh-btn:hover { border-color: var(--gold); }
.refresh-btn svg { width: 16px; height: 16px; transition: transform 0.5s ease; }
.refresh-btn.spinning svg { transform: rotate(360deg); }
.refresh-toast {
  position: fixed;
  bottom: 70px; right: 34px;
  background: var(--panel);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
  box-shadow: var(--shadow-deep);
}
.refresh-toast.show { opacity: 1; transform: translateY(0); }

/* =========================================================
   GAME SHELL (shared by all games)
   ========================================================= */
#game-container {
  width: 100%;
  height: 100%;
  padding: 18px 26px;
  gap: 14px;
  background: linear-gradient(160deg, rgba(20,92,55,0.4), rgba(6,20,14,0.92));
}
.game-topbar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-topbar .left { display: flex; align-items: center; gap: 14px; }
.game-topbar-info { display: flex; align-items: center; gap: 10px; }
.back-btn {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--cream);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.back-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.help-btn {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--gold-bright);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; font-family: 'Cinzel', serif;
  margin-left: 4px;
}
.help-btn:hover { border-color: var(--gold); background: rgba(233,198,95,0.14); }

/* ---------- Modal "Como jugar" ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(2, 8, 5, 0.72);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 30px;
}
.modal-overlay.active { display: flex; }
.modal-panel {
  position: relative;
  background: linear-gradient(160deg, rgba(20,92,55,0.55), rgba(6,20,14,0.97));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  padding: 30px 34px;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
}
.modal-panel h2 { color: var(--gold-bright); margin: 0 0 18px; font-size: 22px; text-align: center; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--cream);
  font-size: 26px; line-height: 1; opacity: 0.7;
}
.modal-close:hover { opacity: 1; color: var(--gold-bright); }
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.help-card {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.help-card .help-icon {
  font-size: 34px; line-height: 1;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(233,198,95,0.10);
  border-radius: 50%;
}
.help-card .help-step-title { font-weight: 700; color: var(--gold-bright); font-size: 13.5px; }
.help-card .help-step-text { font-size: 12.5px; opacity: 0.85; line-height: 1.4; }
.game-title { font-size: 20px; color: var(--gold-bright); margin: 0; font-family: 'Rubik', sans-serif; font-weight: 700; letter-spacing: normal; }

#game-stage {
  width: 100%;
  max-width: 1200px;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(20,92,55,0.4), rgba(6,20,14,0.92));
  box-shadow: var(--shadow-deep);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* generic card look used by blackjack / solitaire / poker */
.playing-card {
  width: 74px; height: 104px;
  border-radius: 8px;
  background: #fbf6e9;
  border: 1px solid #00000022;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 7px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  position: relative;
  color: var(--ink);
}
.playing-card.red { color: var(--wine-bright); }
.playing-card.back {
  background:
    repeating-linear-gradient(45deg, var(--wine-bright) 0 6px, var(--wine) 6px 12px);
  border: 3px solid var(--gold);
}
.playing-card .corner { font-size: 15px; line-height: 1; }
.playing-card .corner.bottom { align-self: flex-end; transform: rotate(180deg); }
.playing-card .pip { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:30px; }
.playing-card.small { width: 52px; height: 74px; }
.playing-card.small .corner { font-size: 11px; }
.playing-card.small .pip { font-size: 20px; }
.playing-card.big { width: 100px; height: 140px; }
.playing-card.big .corner { font-size: 19px; }
.playing-card.big .pip { font-size: 38px; }
.playing-card.huge { width: 128px; height: 179px; }
.playing-card.huge .corner { font-size: 23px; }
.playing-card.huge .pip { font-size: 46px; }

.card-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* animaciones de reparto de cartas (blackjack / poker) */
@keyframes card-deal {
  0%   { opacity: 0; transform: translateY(-46px) scale(0.82) rotate(-8deg); }
  65%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
.playing-card.deal-anim { animation: card-deal 0.38s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

@keyframes card-flip-reveal {
  0%   { transform: rotateY(180deg) scale(0.92); filter: brightness(0.6); }
  100% { transform: rotateY(0deg) scale(1); filter: brightness(1); }
}
.playing-card.flip-anim { animation: card-flip-reveal 0.45s ease-out both; backface-visibility: hidden; }

@keyframes chip-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.chip-pulse { animation: chip-pulse 0.35s ease-out; }

/* tragamonedas: ventana de rodillo con scroll real */
.slot-reel-window { overflow: hidden; position: relative; border-radius: 8px; background: #0a0a0a; transition: box-shadow 0.3s ease; }
.slot-reel-strip { display: flex; flex-direction: column; will-change: transform; }
/* Vuelo Arriesgado (Spaceman) */
.sky-stars {
  position: absolute; inset: 0;
  background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent),
                     radial-gradient(2px 2px at 90px 80px, #fff, transparent),
                     radial-gradient(1.5px 1.5px at 150px 40px, #fff, transparent),
                     radial-gradient(1.5px 1.5px at 220px 100px, #fff, transparent),
                     radial-gradient(2px 2px at 300px 60px, #fff, transparent);
  opacity: 0.5;
}
/* Lineas de velocidad detras del pajaro -- venden la sensacion de que
   vuela MUY rapido, ya que en este juego el no se mueve en X. */
.speed-lines { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.speed-line {
  position: absolute; left: -40%; width: 55%; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  opacity: 0; transform: translateX(0);
}
.speed-lines.scrolling .speed-line { animation: speed-line-move 0.5s linear infinite; }
@keyframes speed-line-move {
  0% { transform: translateX(-20%); opacity: 0; }
  15% { opacity: .9; }
  85% { opacity: .9; }
  100% { transform: translateX(260%); opacity: 0; }
}

#bird { width: 66px; height: 62px; margin-top: -31px; margin-left: -8px; }
#bird svg, #bird img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
#bird.bird-fall {
  animation: bird-fall 0.7s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}
@keyframes bird-fall {
  0% { transform: translate(0, 0) rotate(-8deg); opacity: 1; }
  30% { transform: translate(10px, 40px) rotate(140deg); opacity: 1; }
  65% { transform: translate(-6px, 120px) rotate(320deg); opacity: 1; }
  100% { transform: translate(14px, 230px) rotate(560deg); opacity: 0; }
}

#crash-tree {
  position: absolute; width: 74px; height: 86px; transform: translate(-50%, -68%);
  z-index: 2; opacity: 0; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6));
}
#crash-tree svg { width: 100%; height: 100%; display: block; }
#crash-tree.pop-in { transition: opacity 0.05s linear; opacity: 1; }

/* Cruza la Calle: escena de carretera con trafico */
#game-stage.crossy-stage { background: #000; }
.road-scene {
  width: 100%;
  max-width: 1000px;
  height: 460px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 16px;
  border: 2px solid var(--panel-border);
  box-shadow: var(--shadow-deep);
  background: #16294a;
}
.road-inner { position: relative; display: flex; height: 100%; }
.sidewalk {
  flex-shrink: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-right: 4px solid #8a8a8a;
  background: #3a8c4a url("/static/img/ai_forest.png") repeat-y center top;
  background-size: 100% auto;
}
.sidewalk svg { width: 100%; height: 100%; display: block; }
.road-lane {
  flex-shrink: 0;
  position: relative;
  height: 100%;
  background-color: #1e3962;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 70' width='40' height='70'%3E%3Crect x='14' y='8' width='12' height='34' rx='6' fill='%23fdfdfd' stroke='%231a1a1a' stroke-width='4'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% 70px;
  border-right: 5px solid #12233f;
  overflow: hidden;
}
.road-lane.current { background-color: #2c518c; }
.lane-mult-badge {
  position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  border: 2px solid var(--gold-bright);
  color: var(--gold-bright);
  font-size: 13px; font-weight: 700;
  border-radius: 50%;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  z-index: 2;
}
.lane-car {
  position: absolute;
  left: 50%;
  top: -70px;
  translate: -50% 0;
  width: 58px; height: 55px;
  z-index: 1;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.4));
}
.lane-car svg, .lane-car img { width: 100%; height: 100%; display: block; object-fit: contain; }
.lane-car.ambient-car { animation-name: car-drive; animation-timing-function: linear; animation-iteration-count: infinite; }
.lane-car.crash-car { animation: car-fast 0.3s linear forwards; filter: drop-shadow(0 0 10px rgba(255,60,60,.9)); }
@keyframes car-drive { from { top: -70px; } to { top: 470px; } }
@keyframes car-fast { from { top: -70px; } to { top: 470px; } }

.chicken-token {
  position: absolute;
  top: 50%;
  margin-top: -27px;
  width: 52px; height: 55px;
  z-index: 3;
  transition: left 0.4s cubic-bezier(0.3, 0.6, 0.3, 1);
}
.chicken-token svg, .chicken-token img { width: 100%; height: 100%; display: block; object-fit: contain; }
.chicken-bob { width: 100%; height: 100%; animation: chicken-idle 0.7s ease-in-out infinite alternate; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
@keyframes chicken-idle { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.chicken-token.hit { animation: chicken-hit 0.55s cubic-bezier(0.4, 0, 0.6, 1) forwards; z-index: 4; }
.chicken-token.hit .chicken-bob { animation: none; }
@keyframes chicken-hit {
  0% { transform: scale(1, 1) rotate(0deg); opacity: 1; filter: brightness(1); }
  30% { transform: scale(1.15, 0.7) rotate(6deg) translateY(4px); opacity: 1; filter: brightness(1); }
  55% { transform: scale(1.55, 0.32) rotate(-3deg) translateY(9px); opacity: 1; filter: brightness(0.92); }
  100% { transform: scale(1.85, 0.14) rotate(0deg) translateY(12px); opacity: 0.85; filter: brightness(0.82); }
}
/* La ficha se ve chamuscada/negra cuando muere por un rayo en vez de un
   coche -- misma animacion de aplastado, pero en silueta negra. */
.chicken-token.hit.zapped .chicken-bob,
.chicken-token.hit.zapped img { filter: brightness(0) saturate(100%); }

/* Banquetas decorativas de en medio: parecen seguras (igual que la
   banqueta inicial) pero tambien pueden matarte -- ahi cae un rayo en
   vez de pasar un coche. */
.road-lane.banqueta {
  background-color: #c2c2c2;
  background-image:
    linear-gradient(to bottom, transparent 0 84px, #1a1a1a 84px 91px, transparent 91px 100px),
    radial-gradient(circle at 25% 40%, rgba(255,255,255,0.35) 0 4px, transparent 5px),
    radial-gradient(circle at 68% 60%, rgba(0,0,0,0.12) 0 5px, transparent 6px);
  background-repeat: repeat-y;
  background-size: 100% 100px;
  box-shadow: inset 0 4px 0 #1a1a1a, inset 0 -4px 0 #1a1a1a;
}
.road-lane.banqueta .lane-mult-badge { border-color: #1a1a1a; color: #2a2a2a; background: rgba(255,255,255,0.75); }
.banqueta-decor {
  position: absolute;
  bottom: 8px;
  transform: translateX(-50%);
  width: 34px; height: 52px;
  z-index: 1;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.4));
}
.banqueta-decor svg { width: 100%; height: 100%; display: block; }
.lightning-bolt {
  position: absolute;
  left: 50%; top: 0;
  width: 46px; height: 100%;
  transform: translateX(-50%);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
}
.lightning-bolt svg { width: 100%; height: 100%; }
.lightning-bolt.strike { animation: lightning-flash 0.35s ease-out forwards; }
@keyframes lightning-flash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  30% { opacity: 0.3; }
  45% { opacity: 1; }
  100% { opacity: 0; }
}
.road-lane.banqueta.flash::before {
  content: "";
  position: absolute; inset: 0;
  background: #fff;
  opacity: 0;
  animation: banqueta-flash 0.35s ease-out forwards;
  z-index: 4;
}
@keyframes banqueta-flash {
  0% { opacity: 0; } 20% { opacity: 0.9; } 100% { opacity: 0; }
}

.keno-cell {
  width: 46px; height: 46px;
  border-radius: 8px;
  font-weight: 700; font-size: 13px;
  transition: transform 0.1s ease, background 0.2s ease;
  cursor: pointer;
}
.keno-cell:hover:not(:disabled) { transform: translateY(-2px); }
.keno-cell:disabled { cursor: default; }

/* Ruleta clasica: layout general (rueda + mesa lado a lado) */
.rc-layout { display: flex; gap: 20px; height: 100%; align-items: center; justify-content: center; flex-wrap: wrap; }
.rc-wheel-col { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; }
.rc-wheel-box { position: relative; width: 250px; height: 250px; }
.rc-table-col { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; }
.rc-controls-row { width: 420px; box-sizing: border-box; flex-wrap: wrap; justify-content: center; }

/* Ruleta clasica: mesa acostada (horizontal), igual que una mesa real */
.rc-table {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  background: #0b3d24; border: 2px solid var(--gold-dark); border-radius: 12px;
  padding: 10px;
}
.rc-grid {
  display: grid;
  grid-template-columns: 30px repeat(12, 30px) 30px;
  grid-template-rows: repeat(3, 28px) 24px 24px;
  gap: 0;
  width: 420px;
  background: #f4e9cf;
}
.rc-cell {
  position: relative;
  border: 1px solid #f4e9cf;
  color: var(--cream);
  font-weight: 700;
  font-size: 10.5px;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
  display: flex; align-items: center; justify-content: center;
}
.rc-cell:hover { transform: scale(1.08); filter: brightness(1.2); z-index: 2; }
.rc-red { background: #c0272d; }
.rc-black { background: #161616; }
.rc-green { background: #1f9d4c; }
.rc-outside { background: #0b3d24; font-size: 9.5px; }
.rc-diamond {
  width: 12px; height: 12px;
  transform: rotate(45deg);
  border: 1.5px solid var(--cream);
  display: inline-block;
}
.rc-diamond-red { background: #c0272d; }
.rc-diamond-black { background: #161616; }

/* Pista ovalada de abajo (racetrack), con los numeros en orden real */
.rc-racetrack {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #0a2e1c;
  border: 2px solid var(--gold-dark);
  border-radius: 999px;
  padding: 6px 10px;
  width: 420px;
  box-sizing: border-box;
}
.rc-racetrack::-webkit-scrollbar { display: none; }
.rc-track-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 10px;
}
.rc-chip-badge {
  position: absolute; top: -8px; right: -8px;
  background: var(--gold-bright); color: #221600;
  border: 2px solid #221600; border-radius: 50%;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,.5);
  z-index: 3;
}

/* Fichas de casino: circulos de colores como en una mesa real */
.rc-chip-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  padding: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  position: relative;
  background:
    repeating-conic-gradient(from 0deg, rgba(255,255,255,0.85) 0deg 10deg, transparent 10deg 30deg),
    radial-gradient(circle at 50% 50%, var(--chip-color) 0 60%, var(--chip-color-dark) 100%);
  box-shadow: 0 3px 5px rgba(0,0,0,.5), inset 0 0 0 3px rgba(0,0,0,.35);
  transition: transform 0.12s ease;
}
.rc-chip-btn::after {
  content: attr(data-chip);
  position: absolute; inset: 7px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.rc-chip-btn:hover { transform: translateY(-3px); }
.rc-chip-btn.active { outline: 3px solid var(--gold-bright); outline-offset: 2px; }

.slot-cell {
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; background: #fbf6e9; border-bottom: 2px solid #e5dcc0;
  flex-shrink: 0;
}

/* los pesos de la ruleta se ocultan hasta mantener presionada la tecla ¿ */
#legend-panel .prob-value { visibility: hidden; }
#legend-panel.revealed .prob-value { visibility: visible; }

/* dado con pips dibujados (no depende de fuentes con glifos de dado) */
.die {
  width: 96px; height: 96px;
  background: linear-gradient(160deg, #fffdf6, #e9e2cf);
  border-radius: 16px;
  border: 2px solid #00000025;
  box-shadow: 0 10px 18px rgba(0,0,0,0.45), inset 0 0 0 2px rgba(255,255,255,0.5);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 12px;
  gap: 2px;
  transition: transform 0.4s ease;
}
.die .pip { border-radius: 50%; background: transparent; align-self: center; justify-self: center; width: 16px; height: 16px; }
.die .pip.on { background: radial-gradient(circle at 35% 30%, #7a0f1c, #2c0508 75%); }
.die .pip.p1 { grid-area: 1 / 1; } .die .pip.p2 { grid-area: 1 / 2; } .die .pip.p3 { grid-area: 1 / 3; }
.die .pip.p4 { grid-area: 2 / 1; } .die .pip.p5 { grid-area: 2 / 2; } .die .pip.p6 { grid-area: 2 / 3; }
.die .pip.p7 { grid-area: 3 / 1; } .die .pip.p8 { grid-area: 3 / 2; } .die .pip.p9 { grid-area: 3 / 3; }

@media (max-width: 900px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Elementos exclusivos de la vista movil: ocultos por defecto en escritorio */
.mobile-search-row { display: none; }
.mobile-category-row { display: none; }
.menu-grid-mobile { display: none; }
.mobile-bottom-nav { display: none; }

/* =========================================================
   QUINIELAS Y PERFIL (secciones de la barra inferior, solo movil)
   ========================================================= */
#quinielas-screen, #perfil-screen { align-items: stretch; justify-content: flex-start; }
.quin-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; background: linear-gradient(180deg, #0f3f27 0%, #0a2c1b 55%, #000000 100%);
  flex-shrink: 0;
}
.quin-title { margin: 0; color: var(--gold-bright); font-size: 19px; font-family: 'Cinzel', serif; }
.quin-title-group { display: flex; align-items: center; gap: 10px; }
.quin-topbar-logo { height: 40px; width: auto; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45)); }
.quin-topbar .balance-group { gap: 2px; }
.quin-stage {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 16px 16px 110px; box-sizing: border-box; scrollbar-width: none; background: #000;
}
.quin-stage::-webkit-scrollbar { display: none; width: 0; }
.quin-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 480px; margin: 0 auto; width: 100%; }
/* la fuente decorativa (Cinzel) que usan h1-h3 en el resto de la app se ve
   rara mezclada con el texto normal de formularios y listas -- aqui adentro
   usamos la misma tipografia (Rubik) en negrita para todos los encabezados. */
#quinielas-screen h3, #quinielas-screen h4,
#perfil-screen h3, #perfil-screen h4 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  letter-spacing: normal;
}

.quin-actions { display: flex; gap: 10px; }
.quin-section-title { margin: 4px 0 0; color: var(--gold-bright); font-size: 15px; font-weight: 700; }
.quin-empty { text-align: center; padding: 30px 10px; opacity: .75; font-size: 13px; }
.quin-list { display: flex; flex-direction: column; gap: 10px; }
.quin-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--panel-border); border-radius: 10px; padding: 12px 14px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.quin-card:hover { border-color: var(--gold); background: rgba(255,255,255,0.05); }
.quin-card-top { display: flex; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.quin-card-name { font-weight: 700; font-size: 15px; color: var(--cream); margin-bottom: 4px; }
.quin-card-bottom { display: flex; justify-content: space-between; font-size: 12px; opacity: .7; }

.quin-form { display: flex; flex-direction: column; gap: 8px; }
.quin-label { font-size: 12px; opacity: .8; margin-top: 8px; }
.quin-input {
  background: rgba(0,0,0,.4); border: 1px solid var(--panel-border); border-radius: 8px;
  padding: 10px 12px; color: var(--cream); font-family: 'Rubik', sans-serif; font-size: 14px;
  width: 100%; box-sizing: border-box;
}
.quin-league-row, .quin-chip-row, .quin-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.quin-radio { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.quin-match-list { display: flex; flex-direction: column; gap: 10px; }
.quin-match {
  background: rgba(0,0,0,.3); border: 1px solid var(--panel-border); border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.quin-match-teams { display: flex; align-items: center; gap: 8px; }
.quin-team-logo { height: 16px; width: 16px; object-fit: contain; vertical-align: middle; margin-right: 5px; }
.quin-countdown { text-align: center; font-size: 10.5px; opacity: .65; }
.quin-match-score { display: flex; align-items: center; justify-content: center; gap: 8px; }
.quin-match-score input {
  width: 50px; text-align: center; background: rgba(0,0,0,.4); border: 1px solid var(--panel-border);
  border-radius: 6px; color: var(--cream); padding: 6px 4px;
}
.quin-match-readonly {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(0,0,0,.25); border-radius: 8px; padding: 8px 12px; font-size: 13px;
}
.quin-match-live {
  background: rgba(0,0,0,.25); border-radius: 8px; padding: 8px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.quin-match-live-teams { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
#quin-picks-modal { padding-bottom: 110px; }
#quin-picks-modal .modal-panel { background: #000; scrollbar-width: none; max-height: 72vh; }
#quin-picks-modal .modal-panel::-webkit-scrollbar { display: none; width: 0; }
#quin-picks-modal .quin-match-live-teams { font-size: 10px; white-space: nowrap; }
#quin-picks-modal .quin-team-logo { height: 13px; width: 13px; margin-right: 3px; }
.quin-match-live-scores { display: flex; gap: 8px; }
.quin-rank-list { display: flex; flex-direction: column; }
.quin-rank-row {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px;
  padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.quin-rank-list .quin-rank-row:last-child { border-bottom: none; }
.quin-rank-row span:first-child { opacity: .5; min-width: 20px; }
.quin-rank-me { background: rgba(233, 198, 95, 0.08); border-radius: 6px; }

.quin-past-list { display: flex; flex-direction: column; gap: 6px; }
.quin-past-jornada {
  background: rgba(0,0,0,.25); border: 1px solid var(--panel-border); border-radius: 10px;
  padding: 8px 12px;
}
.quin-past-jornada summary {
  cursor: pointer; font-weight: 700; font-size: 12.5px; color: var(--cream);
  list-style: none;
}
.quin-past-jornada summary::-webkit-details-marker { display: none; }
.quin-past-jornada summary::before { content: "▸ "; color: var(--gold-bright); }
.quin-past-jornada[open] summary::before { content: "▾ "; }
.quin-past-jornada .quin-match-list { margin-top: 8px; }

.pf-avatar-card { display: flex; align-items: center; gap: 12px; }
.pf-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold);
  color: #1a1a1a; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; flex-shrink: 0;
}
.pf-stats-row { display: flex; gap: 8px; margin-top: 12px; }
.pf-stat {
  flex: 1; text-align: center; background: rgba(0,0,0,.3); border-radius: 10px; padding: 10px 4px;
  border: 1px solid var(--panel-border);
}
.pf-stat-num { font-size: 20px; font-weight: 700; color: var(--gold-bright); }
.pf-stat-label { font-size: 10px; opacity: .75; margin-top: 2px; }

/* =========================================================
   VISTA MOVIL
   ========================================================= */
@media (max-width: 640px) {
  .exit-app-btn { display: none; }

  #main-menu { padding: 0; align-items: stretch; justify-content: flex-start; overflow: hidden; }
  .menu-header { margin: 0; padding: 14px 16px; background: linear-gradient(180deg, #0f3f27 0%, #0a2c1b 55%, #000000 100%); }
  .menu-header-inner { flex-wrap: nowrap; }
  .brand { flex: 0 1 auto; gap: 8px; }
  .brand-logo-img { height: 26px; }
  .quin-topbar-logo { height: 26px; }
  .header-actions { flex: 0 1 auto; margin-left: auto; }
  .search-box { display: none; }
  .roulette-circle-btn { display: none; }
  #login-btn { display: none; }
  .balance-group { justify-content: flex-end; gap: 4px; }
  .icon-circle-btn { width: 38px; height: 38px; }
  .icon-circle-btn svg { width: 17px; height: 17px; }
  .balance-chip { align-items: flex-end; }
  .balance-chip .balance-amount-line { font-size: 14px; }

  .mobile-search-row {
    display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
    background: var(--panel); border: 0 solid var(--panel-border); border-radius: 30px;
    color: var(--cream); overflow: hidden;
    max-height: 0; opacity: 0; padding: 0 16px;
    transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease, margin 0.2s ease;
  }
  .mobile-search-row.open {
    max-height: 48px; opacity: 1; padding: 9px 16px; margin-top: 12px; border-width: 1px;
  }
  .mobile-search-row svg { width: 15px; height: 15px; opacity: 0.8; flex-shrink: 0; }
  .mobile-search-row input {
    flex: 1; min-width: 0; background: none; border: none; outline: none;
    color: var(--cream); font-family: 'Rubik', sans-serif; font-size: 14px;
  }

  .mobile-category-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; width: 100%; }
  .mobile-category-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; cursor: pointer; }
  .mobile-category-circle {
    width: 50px; height: 50px; border-radius: 50%; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, rgba(20,92,55,0.55), rgba(6,20,14,0.9));
    border: 1.5px solid var(--panel-border);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .mobile-category-item.active .mobile-category-circle { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233,198,95,0.25); }
  .mobile-category-item .mobile-category-label { font-size: 10px; font-weight: 600; color: var(--cream); opacity: 0.85; }
  .mobile-category-item.active .mobile-category-label { color: var(--gold-bright); opacity: 1; }

  .menu-body-scroll {
    overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
    padding: 0 16px 110px; box-sizing: border-box;
  }
  .menu-body-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .menu-row-wrap, .menu-grid { display: none; }
  .menu-grid-mobile {
    display: flex; flex-direction: column; gap: 10px;
    padding: 10px 0 4px; width: 100%; box-sizing: border-box;
  }
  .mobile-row-carousel {
    display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth;
    scrollbar-width: none; padding: 2px 2px 4px;
  }
  .mobile-row-carousel::-webkit-scrollbar { display: none; }
  .mobile-row-carousel .tile { flex: 0 0 158px; width: 158px; height: 158px; }
  .mobile-grid-2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .mobile-grid-2col .tile { width: 100%; height: 190px; }
  .tile .tile-art { padding: 6%; }
  .tile .tile-label { font-size: 13px; padding: 10px 12px; }
  .tile .tile-tag { font-size: 9px; padding: 3px 7px; }
  .tile .tile-tag-fill { display: none; }

  .menu-footer { display: none; }

  .mobile-bottom-nav {
    display: flex; align-items: center;
    position: fixed; left: 50%; bottom: 14px; z-index: 90;
    transform: translateX(-50%);
  }
  body:not(.on-menu-screen) .mobile-bottom-nav { display: none; }
  .mobile-nav-pill {
    display: flex; justify-content: center; align-items: center; gap: 6px;
    background: rgba(6,20,14,0.92); border: 1px solid var(--panel-border);
    border-radius: 999px; padding: 9px 12px; box-shadow: var(--shadow-deep);
  }
  .mobile-nav-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: none; border: none; color: var(--cream); opacity: 0.55;
    font-size: 10px; font-weight: 600; padding: 4px 16px; border-radius: 14px;
  }
  .mobile-nav-btn.active { opacity: 1; color: var(--gold-bright); }
  .mobile-nav-icon { display: flex; }
  .mobile-nav-icon svg { width: 21px; height: 21px; }
  .mobile-nav-search-btn {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
    background: linear-gradient(160deg, rgba(20,92,55,0.75), rgba(6,20,14,0.95));
    border: 1px solid var(--panel-border); color: var(--gold-bright);
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-deep);
  }
  .mobile-nav-search-btn svg { width: 19px; height: 19px; }

  #game-container { padding: 12px; }
  .game-topbar { flex-wrap: wrap; row-gap: 8px; }
  .game-topbar .balance-chip { margin-left: auto; }
  .game-title { font-size: 16px; }
  .game-topbar-info { flex: 1 1 100%; order: 3; justify-content: center; }
  #game-stage { padding: 12px; }
  .modal-panel { padding: 20px 18px; }

  .splash-logo-wrap { width: 34vw; }

  /* Ruleta clasica: la rueda se apila arriba de la mesa y todo encoge */
  .rc-layout { flex-direction: column; flex-wrap: wrap; gap: 14px; }
  .rc-wheel-box { width: 200px; height: 200px; }
  .rc-grid {
    width: 308px;
    grid-template-columns: 22px repeat(12, 22px) 22px;
    grid-template-rows: repeat(3, 22px) 19px 19px;
  }
  .rc-cell { font-size: 9px; }
  .rc-racetrack { width: 308px; }
  .rc-track-num { width: 21px; height: 21px; font-size: 8.5px; }
  .rc-chip-btn { width: 36px; height: 36px; font-size: 9px; }
  .rc-controls-row { width: 308px; }

  /* Solitario: columnas y cartas mas angostas para que quepan mejor */
  .playing-card.tab-sm { width: 40px; height: 56px; }
  .playing-card.tab-sm .corner { font-size: 9px; }
  .playing-card.tab-sm .pip { font-size: 16px; }

  /* Tragamonedas: simbolos mas chicos para que quepan en celdas de 56px */
  .slot-cell { font-size: 28px; }
}
