/* =========================================================
   CASINO TRAINER · styles.css
   Sistema de diseño: tokens, componentes (cartas, fichas,
   mesas), pantallas de juego, coach y centro de aprendizaje.
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  --bg: #0b0a08;
  --bg-2: #15120e;
  --bg-3: #1d1914;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);

  --ink: #f5efe0;
  --ink-2: rgba(245, 239, 224, .74);
  --ink-3: rgba(245, 239, 224, .56);

  --gold: #d4af37;
  --gold-2: #f2d27a;
  --gold-3: #a8842a;

  --felt: #0f5132;
  --felt-2: #0b3d26;
  --felt-hi: #1a7a4d;
  --rail: #3b1f14;
  --rail-2: #6a3822;

  --ivory: #f7f2e6;
  --card-red: #c62828;
  --card-black: #16161a;

  --green: #34c77b;
  --red: #e5645c;
  --blue: #4a9be0;
  --purple: #a57be6;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r1: 8px; --r2: 12px; --r3: 20px; --rf: 999px;

  --coach-w: 340px;
  --cw: 56px; /* ancho base de carta; cada contenedor lo redefine */

  --noise: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --felt-bg: var(--noise), radial-gradient(ellipse at 50% 38%, #1d8454 0%, #13603c 42%, #0b3d26 100%);
  --rail-bg: linear-gradient(180deg, #7a4128 0%, #4a2616 48%, #2e170e 100%);

  color-scheme: dark;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 78% -12%, rgba(19, 96, 60, .38), transparent 62%),
    radial-gradient(800px 480px at -10% 0%, rgba(212, 175, 55, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--gold-2); }
svg { display: block; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sq:focus-visible, .game-tile:focus-visible { outline-offset: -2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 500; padding: 10px 16px;
  border-radius: var(--r1); background: var(--gold); color: #1b1406; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.muted { color: var(--ink-3); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 8px; }

/* ---------- 3. BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--rf);
  border: 1px solid transparent; font-weight: 600; font-size: 15px; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .36; cursor: not-allowed; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }

.btn-primary, .btn-gold {
  background: linear-gradient(180deg, #f6dc8c 0%, #d4af37 55%, #b8912a 100%);
  color: #1d1504;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 22px rgba(212, 175, 55, .22);
}
.btn-primary:hover:not(:disabled), .btn-gold:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 28px rgba(212, 175, 55, .34); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: rgba(212, 175, 55, .5); }
.btn-green { background: linear-gradient(180deg, #2fb46e, #1b7a48); color: #fff; }
.btn-red { background: linear-gradient(180deg, #d0463d, #9b2b24); color: #fff; }
.btn-ghost-red { background: rgba(229, 100, 92, .08); border-color: rgba(229, 100, 92, .45); color: #ffb4ad; }

.icon-btn {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink);
  transition: background-color .2s, border-color .2s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface-2); border-color: rgba(212, 175, 55, .5); }

.link-btn { background: none; border: 0; color: var(--gold-2); font-weight: 600; padding: 6px 0; margin-top: 6px; text-align: left; }
.link-btn:hover { text-decoration: underline; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: var(--rf);
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: rgba(212, 175, 55, .16); color: var(--gold-2);
}

/* ---------- 4. CARTAS ---------- */
.card {
  width: var(--cw); height: calc(var(--cw) * 1.4);
  border-radius: calc(var(--cw) * .11);
  position: relative; flex: none; display: inline-block;
  font-family: Georgia, 'Times New Roman', serif; line-height: 1;
  user-select: none; -webkit-user-select: none;
}
.card-face {
  background: linear-gradient(160deg, #fffdf8 0%, #f3ecdc 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(0, 0, 0, .16), 0 calc(var(--cw) * .06) calc(var(--cw) * .16) rgba(0, 0, 0, .38);
}
.card-face.red { color: var(--card-red); }
.card-face.black { color: var(--card-black); }
.ci {
  position: absolute; top: calc(var(--cw) * .07); left: calc(var(--cw) * .08);
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--cw) * .01);
}
.ci .card-rank { font-size: calc(var(--cw) * .3); font-weight: 700; letter-spacing: -.06em; }
.ci .ci-s { font-size: calc(var(--cw) * .22); }
.ci-br { top: auto; left: auto; bottom: calc(var(--cw) * .07); right: calc(var(--cw) * .08); transform: rotate(180deg); }
.card-suit {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: calc(var(--cw) * .56); padding-top: calc(var(--cw) * .04);
}
.card-back {
  background:
    radial-gradient(circle at 50% 50%, rgba(242, 210, 122, .95) 0 6%, transparent 6.5%),
    radial-gradient(circle at 50% 50%, transparent 0 13%, rgba(242, 210, 122, .5) 13.5% 15%, transparent 15.5%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .1) 0 1.5px, transparent 1.5px 6px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .1) 0 1.5px, transparent 1.5px 6px),
    linear-gradient(160deg, #8e2436, #5a1020);
  box-shadow:
    inset 0 0 0 calc(var(--cw) * .055) #f7f2e6,
    inset 0 0 0 calc(var(--cw) * .07) rgba(0, 0, 0, .22),
    0 0 0 1px rgba(0, 0, 0, .35),
    0 calc(var(--cw) * .06) calc(var(--cw) * .16) rgba(0, 0, 0, .4);
}
.card-empty {
  background: rgba(0, 0, 0, .12);
  border: 1.5px dashed rgba(255, 255, 255, .2);
}
.card-row { --cw: 60px; display: flex; gap: 8px; justify-content: center; align-items: center; min-height: calc(var(--cw) * 1.4); flex-wrap: wrap; }
.mini-cards { --cw: 36px; display: flex; gap: 4px; flex-wrap: wrap; }

.card.dealing { animation: dealCard .42s cubic-bezier(.2, .8, .2, 1) both; }
.card.flipping { animation: flipCard .5s ease-in-out; }
@keyframes dealCard {
  0% { transform: translateY(-46px) rotate(-10deg) scale(.82); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
@keyframes flipCard {
  0% { transform: perspective(700px) rotateY(0); }
  50% { transform: perspective(700px) rotateY(90deg); }
  100% { transform: perspective(700px) rotateY(0); }
}

/* ---------- 5. FICHAS ---------- */
.chip {
  --chip: #c0392b; --stripe: #fff; --chip-ink: #fff;
  width: 20px; height: 20px; border-radius: 50%; flex: none; position: relative;
  display: inline-grid; place-items: center;
  border: 0; padding: 0;
  background:
    radial-gradient(circle, var(--chip) 0 55%, transparent 56%),
    repeating-conic-gradient(var(--chip) 0 22.5deg, var(--stripe) 22.5deg 45deg);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .28), 0 2px 4px rgba(0, 0, 0, .5);
  color: var(--chip-ink); font-family: var(--font); font-weight: 800;
}
.chip::after {
  content: ''; position: absolute; inset: 20%; border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .55);
}
.chip-1 { --chip: #ece4cf; --stripe: #2b64a8; --chip-ink: #17304f; }
.chip-1::after { border-color: rgba(23, 48, 79, .45); }
.chip-5 { --chip: #c0392b; --stripe: #f7f2e6; }
.chip-25 { --chip: #1e7d4a; --stripe: #f7f2e6; }
.chip-100 { --chip: #1b1b1f; --stripe: #d4af37; --chip-ink: var(--gold-2); }
.chip-lg {
  width: 50px; height: 50px; font-size: 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chip-1.chip-lg { text-shadow: none; }
.chip-lg:hover:not(:disabled) { transform: translateY(-4px) rotate(-8deg); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .28), 0 8px 14px rgba(0, 0, 0, .55); }
.chip-lg:active:not(:disabled) { transform: translateY(0) scale(.95); }
.chip-lg:disabled { opacity: .4; cursor: not-allowed; }
.chip-tray { display: flex; gap: 10px; align-items: center; justify-content: center; }
.chip-ico {
  width: 24px; height: 24px; border-radius: 50%; flex: none; position: relative;
  background:
    radial-gradient(circle, #1b1b1f 0 54%, transparent 55%),
    repeating-conic-gradient(#1b1b1f 0 22.5deg, #d4af37 22.5deg 45deg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4);
}
.chip-ico::after { content: ''; position: absolute; inset: 30%; border-radius: 50%; background: var(--gold); opacity: .85; }

/* ---------- 6. MESAS (paño y baranda) ---------- */
.table-rail {
  position: relative; padding: 14px; border-radius: 44px;
  background: var(--rail-bg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -4px 8px rgba(0, 0, 0, .5);
}
.felt {
  position: relative; border-radius: 32px;
  background: var(--felt-bg);
  box-shadow: inset 0 0 0 2px rgba(201, 162, 74, .5), inset 0 12px 40px rgba(0, 0, 0, .42);
}
.felt-label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
}
.felt-hint { color: rgba(255, 255, 255, .7); font-size: 14px; text-align: center; }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); text-align: center; margin-bottom: 10px; }
.score-bubble {
  display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 9px;
  border-radius: var(--rf); background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .2);
  color: #fff; font-family: var(--font); font-size: 14px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.score-bubble:empty { display: none; }

.result-banner {
  position: absolute; left: 50%; top: 50%; z-index: 8;
  transform: translate(-50%, -50%) scale(.92); opacity: 0; pointer-events: none;
  max-width: min(92%, 460px); width: max-content;
  padding: 12px 22px; border-radius: 14px; text-align: center;
  font-family: var(--display); font-weight: 700; font-size: clamp(17px, 2.3vw, 24px); line-height: 1.25;
  background: rgba(10, 9, 7, .9); border: 1.5px solid var(--line-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  transition: opacity .25s ease, transform .25s ease;
}
.result-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: winPop .45s ease-out; }
.result-banner.win { color: #8ff0b8; border-color: rgba(52, 199, 123, .7); }
.result-banner.lose { color: #ffb8b1; border-color: rgba(229, 100, 92, .7); }
.result-banner.push { color: #a9d3ff; border-color: rgba(74, 155, 224, .7); }
.result-banner.bj { color: var(--gold-2); border-color: var(--gold); box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 40px rgba(212, 175, 55, .3); }
@keyframes winPop {
  0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* ---------- 7. HOME ---------- */
.screen-home { min-height: 100vh; display: flex; flex-direction: column; }
.site-nav {
  width: 100%; max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 19px; }
.brand svg { width: 34px; height: 34px; }
.site-nav nav { display: flex; align-items: center; gap: 4px; }
.site-nav nav a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: var(--rf); color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: background-color .2s, color .2s;
}
.site-nav nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav nav svg { width: 18px; height: 18px; }
.nav-gh { border: 1px solid var(--line-2); }

#home-main { flex: 1; }
section.hero {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(20px, 5vw, 64px) clamp(16px, 4vw, 48px) clamp(48px, 7vw, 96px);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center;
}
section.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(50px, 8vw, 100px);
  line-height: .95; letter-spacing: -.015em; margin: 16px 0 20px;
}
section.hero h1 span {
  background: linear-gradient(100deg, #fbe7a6 0%, #d4af37 40%, #a8842a 62%, #f2d27a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(16px, 1.55vw, 19px); color: var(--ink-2); max-width: 36ch; line-height: 1.6; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-facts { list-style: none; display: flex; gap: clamp(20px, 3vw, 40px); margin-top: 40px; }
.hero-facts li { color: var(--ink-3); font-size: 13px; }
.hero-facts strong { display: block; font-family: var(--display); font-size: 30px; line-height: 1.1; color: var(--gold-2); }

.hero-art { display: grid; place-items: center; }
.hero-table {
  width: min(100%, 560px); aspect-ratio: 1.3; border-radius: 50%; padding: clamp(12px, 1.6vw, 18px);
  background: var(--rail-bg);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .15), inset 0 -5px 10px rgba(0, 0, 0, .5);
}
.hero-felt {
  position: relative; height: 100%; border-radius: 50%; overflow: hidden;
  background: var(--felt-bg);
  box-shadow: inset 0 0 0 2px rgba(201, 162, 74, .55), inset 0 18px 50px rgba(0, 0, 0, .45);
}
.hero-emboss {
  position: absolute; left: 50%; top: 15%; transform: translateX(-50%);
  font-family: var(--display); font-weight: 800; letter-spacing: .32em; text-transform: uppercase; white-space: nowrap;
  font-size: clamp(11px, 1.3vw, 15px); color: rgba(0, 0, 0, .3); text-shadow: 0 1px 0 rgba(255, 255, 255, .07);
}
.hero-fan { position: absolute; left: 50%; top: 62%; width: 0; height: 0; }
.fan-card {
  position: absolute; left: 0; top: 0;
  transform-origin: 50% 190%;
  transform: translate(-50%, -62%) rotate(calc(var(--i) * 12deg));
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.fan-card .mini-cards { --cw: clamp(58px, 7.4vw, 94px); }
.hero-table:hover .fan-card { transform: translate(-50%, -66%) rotate(calc(var(--i) * 17deg)); }
.hero-chips { position: absolute; left: 11%; bottom: 24%; display: flex; gap: 8px; align-items: flex-end; }
.stack { display: flex; flex-direction: column-reverse; }
.stack i {
  display: block; width: clamp(30px, 3.4vw, 44px); height: clamp(9px, 1vw, 12px); border-radius: 50%; margin-top: -5px;
  background: repeating-linear-gradient(90deg, var(--c) 0 6px, #f7f2e6 6px 9px);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35), 0 1px 0 rgba(0, 0, 0, .45);
}
.stack i:last-child { background: radial-gradient(ellipse at 50% 40%, var(--c) 0 55%, #f7f2e6 56% 64%, var(--c) 65%); }
.s100 { --c: #1b1b1f; } .s25 { --c: #1e7d4a; } .s5 { --c: #c0392b; }

.games, .features { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.section-head { margin-bottom: 26px; max-width: 640px; }
.section-head h2 { font-family: var(--display); font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; margin-bottom: 8px; }
.section-head p { color: var(--ink-2); font-size: 16px; }
.games-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.game-tile {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border-radius: var(--r3); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.game-tile:hover {
  transform: translateY(-4px); border-color: rgba(212, 175, 55, .55);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .5), 0 0 44px rgba(212, 175, 55, .12);
}
.tile-art {
  display: grid; place-items: center; aspect-ratio: 16 / 9;
  background: var(--felt-bg); border-bottom: 1px solid rgba(212, 175, 55, .28);
  box-shadow: inset 0 -20px 40px rgba(0, 0, 0, .25);
}
.tile-art svg { width: 74%; height: auto; overflow: visible; transition: transform .35s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .4)); }
.game-tile:hover .tile-art svg { transform: scale(1.05) translateY(-2px); }
.tile-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; flex: 1; }
.tile-title { font-family: var(--display); font-size: 21px; font-weight: 700; }
.tile-desc { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: var(--rf); background: var(--surface-2); color: var(--ink-2); }
.tag.gold { background: rgba(212, 175, 55, .14); color: var(--gold-2); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-top: 56px; padding-bottom: 72px; }
.feature { padding: 24px; border-radius: var(--r3); border: 1px solid var(--line); background: var(--surface); }
.feature h3 { font-family: var(--display); font-size: 20px; margin: 14px 0 6px; }
.feature p { color: var(--ink-2); font-size: 14.5px; }
.f-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(212, 175, 55, .12); color: var(--gold-2); border: 1px solid rgba(212, 175, 55, .35); }
.f-ico svg { width: 22px; height: 22px; }

.site-foot {
  width: 100%; max-width: 1240px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 26px clamp(16px, 4vw, 48px) calc(26px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px;
}
.site-foot strong { color: var(--ink); }
.site-foot a { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-2); text-decoration: none; font-weight: 600; }
.site-foot a:hover { text-decoration: underline; }
.site-foot svg { width: 18px; height: 18px; }

/* ---------- 8. PÁGINAS (lobby y aprendizaje) ---------- */
.screen-page { min-height: 100vh; padding: clamp(16px, 4vw, 40px) clamp(16px, 4vw, 40px) 64px; }
.page-head { max-width: 1100px; margin: 0 auto 28px; display: flex; align-items: center; gap: 16px; }
.page-head h2 { font-family: var(--display); font-size: clamp(30px, 4.2vw, 46px); line-height: 1.05; margin-top: 4px; }

.levels { list-style: none; max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.level-card {
  --accent: var(--gold);
  width: 100%; height: 100%; text-align: left; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px; padding: 24px 22px 22px;
  border-radius: var(--r3); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.level-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.level-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 20px 44px rgba(0, 0, 0, .45); }
.lv1 { --accent: var(--green); } .lv2 { --accent: var(--blue); } .lv3 { --accent: var(--purple); } .lv4 { --accent: var(--gold); }
.level-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.level-step { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 19px; color: #111; background: var(--accent); }
.level-bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.level-bars i { width: 5px; border-radius: 2px; background: rgba(255, 255, 255, .15); }
.level-bars i:nth-child(1) { height: 7px; } .level-bars i:nth-child(2) { height: 11px; } .level-bars i:nth-child(3) { height: 15px; } .level-bars i:nth-child(4) { height: 18px; }
.lv1 .level-bars i:nth-child(-n+1), .lv2 .level-bars i:nth-child(-n+2), .lv3 .level-bars i:nth-child(-n+3), .lv4 .level-bars i { background: var(--accent); }
.last-tag { display: none; margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--rf); background: rgba(255, 255, 255, .08); color: var(--ink-2); }
.level-card.is-last .last-tag { display: inline-block; }
.level-name { font-family: var(--display); font-size: 24px; font-weight: 700; }
.level-desc { color: var(--ink-2); font-size: 14.5px; }
.level-list { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 12px; }
.level-list span { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.level-list span::before { content: ''; width: 14px; height: 14px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), inset 0 0 0 7px var(--accent); }
.level-cta { margin-top: auto; font-weight: 700; color: var(--accent); }

/* ---------- 9. PANTALLA DE JUEGO (shell) ---------- */
.game-screen {
  height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(19, 96, 60, .22), transparent 70%);
}
.g-top {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(12px, 2.5vw, 24px);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 10, 8, .82);
}
.g-title { min-width: 0; }
.g-title h2 { font-family: var(--display); font-size: clamp(19px, 2.2vw, 24px); line-height: 1.1; outline: none; }
.g-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }
.g-stats { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.g-stats:empty { display: none; }
.stat-pill {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: var(--rf);
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--ink-3); white-space: nowrap;
}
.stat-pill strong { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.bal-pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: var(--rf);
  background: linear-gradient(180deg, #2b2418, #16120b); border: 1px solid rgba(212, 175, 55, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.g-stats:empty + .bal-pill, .g-title + .bal-pill { margin-left: auto; }
.bal-pill strong { color: var(--gold-2); font-size: 16px; font-variant-numeric: tabular-nums; transition: color .3s; }
.bal-pill strong.up, .stat-pill strong.up { color: #8ff0b8; }
.bal-pill strong.down { color: #ffb8b1; }

.g-stage { flex: 1; min-height: 0; overflow: auto; display: flex; padding: clamp(12px, 2.5vw, 28px); }
.g-stage > * { margin: auto; }

.g-dock {
  flex: none; position: relative; z-index: 6;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 19, 14, .96), rgba(11, 10, 8, .98));
}
.dock-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; max-width: 780px; margin: 0 auto; }
.bet-total { color: var(--ink-3); font-size: 13px; }
.bet-total strong { color: var(--gold-2); font-size: 18px; margin-left: 4px; font-variant-numeric: tabular-nums; }

.act {
  position: relative; flex-direction: column; gap: 2px; min-width: 112px; min-height: 58px; padding: 0 16px;
  border-radius: 14px; color: #fff; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 16px rgba(0, 0, 0, .35);
}
.act span { font-size: 16px; font-weight: 700; }
.act small { font-size: 11px; font-weight: 500; opacity: .82; }
.act kbd {
  position: absolute; top: 5px; right: 7px; font-family: var(--font); font-size: 10px; font-weight: 700;
  padding: 0 4px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .35); opacity: .7;
}
.act-fold { background: linear-gradient(180deg, #c9443b, #8f231d); }
.act-check { background: linear-gradient(180deg, #3a7cc0, #1f4f86); }
.act-call { background: linear-gradient(180deg, #2aa865, #17703f); }
.act-raise { background: linear-gradient(180deg, #f6dc8c, #d4af37 55%, #b08624); color: #1d1504; border-color: rgba(0, 0, 0, .15); }
.act-raise kbd { border-color: rgba(0, 0, 0, .35); }
.act-allin { background: linear-gradient(180deg, #8a5bd6, #5b2f9e); }

/* ---------- 10. COACH ---------- */
#coach-panel {
  flex: none; display: flex; flex-direction: column; position: relative; z-index: 5;
  background: linear-gradient(180deg, rgba(26, 22, 16, .98), rgba(15, 13, 10, .99));
  border-top: 1px solid rgba(212, 175, 55, .28);
}
.coach-head {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 16px;
  background: none; border: 0; text-align: left;
}
.coach-ico { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #f6dc8c, #b8912a); color: #2a1e05; }
.coach-ico svg { width: 17px; height: 17px; }
.coach-title { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--gold-2); flex: none; }
.coach-peek { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: var(--ink-2); }
.coach-peek[data-tone="red"] { color: #ffb8b1; } .coach-peek[data-tone="gold"] { color: var(--gold-2); }
.coach-peek[data-tone="green"] { color: #8ff0b8; } .coach-peek[data-tone="blue"] { color: #a9d3ff; } .coach-peek[data-tone="purple"] { color: #d6bdff; }
.coach-chev { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); transition: transform .25s; }
.coach-chev svg { width: 16px; height: 16px; }
#coach-panel.expanded .coach-chev { transform: rotate(180deg); }
#coach-body { display: none; padding: 4px 16px 16px; overflow-y: auto; max-height: 42vh; max-height: 42dvh; }
#coach-panel.expanded #coach-body { display: block; }

.c-rec {
  display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; padding: 12px 14px; border-radius: 14px;
  --tone: var(--green);
  background: color-mix(in srgb, var(--tone) 9%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
}
.c-rec[data-tone="red"] { --tone: var(--red); } .c-rec[data-tone="gold"] { --tone: var(--gold); }
.c-rec[data-tone="blue"] { --tone: var(--blue); } .c-rec[data-tone="purple"] { --tone: var(--purple); }
.rec-label { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.rec-action { font-size: 22px; font-weight: 800; letter-spacing: .02em; color: color-mix(in srgb, var(--tone) 70%, #fff); line-height: 1.15; }
.rec-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.c-section { margin-bottom: 16px; }
.c-section h3 { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.c-tip { font-size: 14px; line-height: 1.55; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .035); border-left: 3px solid var(--gold); }
.c-tip.plain { border-left-color: rgba(255, 255, 255, .18); color: var(--ink-2); font-size: 13.5px; }
.strength-track { height: 8px; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.strength-fill { height: 100%; width: 0; border-radius: 8px; background: var(--gold); transition: width .5s ease, background-color .5s ease; }
.strength-lbl { display: block; margin-top: 5px; font-size: 13px; font-weight: 600; }
.c-odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.c-odds div { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .035); }
.c-odds span { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.c-odds strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.c-msgs { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.c-msg { font-size: 12.5px; line-height: 1.4; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .03); border-left: 2px solid var(--blue); color: var(--ink-2); animation: fadeIn .3s; }
.c-msg.success { border-left-color: var(--green); } .c-msg.warning { border-left-color: var(--gold); } .c-msg.error { border-left-color: var(--red); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* Coach acoplado como columna en escritorio */
@media (min-width: 1100px) {
  body.in-game .game-screen { padding-right: var(--coach-w); }
  body.in-game #coach-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: var(--coach-w); z-index: 30;
    border-top: 0; border-left: 1px solid rgba(212, 175, 55, .22);
  }
  .coach-head { min-height: 64px; padding: 14px 20px; border-bottom: 1px solid var(--line); cursor: default; pointer-events: none; }
  .coach-peek, .coach-chev { display: none; }
  .coach-title { font-size: 19px; }
  #coach-body, #coach-panel.expanded #coach-body { display: block; flex: 1; max-height: none; padding: 18px 20px 28px; }
}

/* ---------- 11. PÓKER ---------- */
.poker-stage { padding: 76px 118px 154px; }
.poker-table {
  --cw: 40px;
  position: relative; width: min(100%, 940px, calc((100dvh - 420px) * 2.1)); min-width: 520px; aspect-ratio: 2.1 / 1;
}
.pt-rail {
  position: absolute; inset: 0; padding: 18px; border-radius: var(--rf);
  background: var(--rail-bg);
  box-shadow: 0 34px 80px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .15), inset 0 -5px 10px rgba(0, 0, 0, .55);
}
.pt-felt {
  position: relative; height: 100%; border-radius: var(--rf);
  background: var(--felt-bg);
  box-shadow: inset 0 0 0 2px rgba(201, 162, 74, .55), inset 0 16px 50px rgba(0, 0, 0, .45);
}
.pt-felt::before { content: ''; position: absolute; inset: 14px; border-radius: var(--rf); border: 1px solid rgba(242, 210, 122, .16); }
.felt-emboss {
  position: absolute; left: 50%; top: 61%; transform: translateX(-50%);
  font-family: var(--display); font-weight: 800; font-size: clamp(11px, 1.3vw, 15px); letter-spacing: .34em; text-transform: uppercase; white-space: nowrap;
  color: rgba(0, 0, 0, .26); text-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}

.seat { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; transition: opacity .3s, filter .3s; }
.seat[data-i="1"] { left: 3%; top: 60%; }
.seat[data-i="2"] { left: 27%; top: 3%; }
.seat[data-i="3"] { left: 73%; top: 3%; }
.seat[data-i="4"] { left: 97%; top: 60%; }
.seat[data-i="0"] { left: 50%; top: 100%; transform: translate(-50%, -50%); }
.seat.folded { opacity: .42; filter: grayscale(.7); }

.seat-cards { display: flex; justify-content: center; gap: 3px; margin-bottom: -12px; position: relative; z-index: 0; min-height: calc(var(--cw) * 1.4); }
.seat:not(.hero) .seat-cards .card:first-child { transform: rotate(-6deg) translateY(2px); }
.seat:not(.hero) .seat-cards .card:last-child:not(:first-child) { transform: rotate(6deg) translateY(2px); }
.seat-info {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; min-width: 156px;
  padding: 5px 12px 5px 5px; border-radius: var(--rf);
  background: linear-gradient(180deg, rgba(34, 29, 22, .97), rgba(14, 12, 9, .97));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .5);
  transition: border-color .3s, box-shadow .3s;
}
.seat-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 16px; color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.seat[data-i="0"] .seat-avatar { background: linear-gradient(135deg, #f6dc8c, #b8912a); color: #1d1504; }
.seat[data-i="1"] .seat-avatar { background: linear-gradient(135deg, #4a9be0, #1f4f86); }
.seat[data-i="2"] .seat-avatar { background: linear-gradient(135deg, #e5645c, #8f231d); }
.seat[data-i="3"] .seat-avatar { background: linear-gradient(135deg, #a57be6, #5b2f9e); }
.seat[data-i="4"] .seat-avatar { background: linear-gradient(135deg, #34c77b, #17703f); }
.seat-meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.seat-name { font-size: 12.5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.seat-chips { font-size: 14.5px; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.seat-position:empty { display: none; }
.seat-position {
  margin-left: auto; padding: 3px 7px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .88);
}
.seat-position[data-pos="BTN"] { background: rgba(212, 175, 55, .22); color: var(--gold-2); }
.seat.active .seat-info { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212, 175, 55, .35), 0 0 26px rgba(212, 175, 55, .4); }
.seat.active:not(.hero) .seat-info::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: -6px; height: 3px; border-radius: 3px;
  background: var(--gold); transform-origin: left; animation: turnTimer 1.1s linear forwards;
}
@keyframes turnTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.seat.winner .seat-info { border-color: var(--green); box-shadow: 0 0 0 2px rgba(52, 199, 123, .4), 0 0 32px rgba(52, 199, 123, .45); }

.hero .seat-cards { --cw: 74px; gap: 6px; margin-bottom: -10px; }
.hero .seat-info { min-width: 176px; border-color: rgba(212, 175, 55, .45); }

.seat-bet:empty { display: none; }
.seat-bet {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 4px; border-radius: var(--rf); background: rgba(0, 0, 0, .5);
  color: #fff; font-weight: 700; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.seat-bet::before, .zone-bet::before {
  content: ''; width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, #c0392b 0 50%, transparent 52%), repeating-conic-gradient(#c0392b 0 30deg, #f7f2e6 30deg 60deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.seat[data-i="1"] .seat-bet { left: calc(100% + 12px); top: 62%; }
.seat[data-i="2"] .seat-bet, .seat[data-i="3"] .seat-bet { top: calc(100% + 10px); left: 50%; transform: translateX(-50%); }
.seat[data-i="4"] .seat-bet { right: calc(100% + 12px); top: 62%; }
.seat[data-i="0"] .seat-bet { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }

.seat-action {
  position: absolute; left: 50%; top: -6px; z-index: 7; transform: translate(-50%, -100%);
  padding: 4px 11px; border-radius: var(--rf); font-size: 11.5px; font-weight: 700; white-space: nowrap;
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none;
  background: #2a2a2a; color: #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, .45);
}
.seat-action.show { opacity: 1; }
.seat-action.a-fold { background: #7e2520; color: #ffd6d2; }
.seat-action.a-check { background: #1f4f86; color: #d6eaff; }
.seat-action.a-call { background: #17703f; color: #d4ffe6; }
.seat-action.a-raise { background: #d4af37; color: #1d1504; }
.seat-action.a-allin { background: #5b2f9e; color: #ecdcff; }
.hero .seat-action { top: auto; bottom: 10px; left: auto; right: calc(100% + 10px); transform: none; }

.community { position: absolute; left: 50%; top: 47%; z-index: 2; transform: translate(-50%, -50%); display: flex; gap: 8px; --cw: clamp(48px, 6.4vw, 64px); }
.pot {
  position: absolute; left: 50%; top: 24%; z-index: 2; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 8px; padding: 5px 16px 5px 8px; border-radius: var(--rf);
  background: rgba(0, 0, 0, .42); border: 1px solid rgba(255, 255, 255, .08);
}
.pot-chips-visual { display: flex; padding-left: 8px; }
.pot-chips-visual:empty { display: none; }
.pot-chips-visual .chip { width: 18px; height: 18px; margin-left: -8px; }
.pot-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.pot-val { font-size: 17px; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }

.dealer-btn {
  position: absolute; z-index: 4; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 40% 35%, #fff, #e3dccb); color: #161616; font-weight: 800; font-size: 12px;
  box-shadow: inset 0 0 0 2px rgba(212, 175, 55, .75), 0 3px 8px rgba(0, 0, 0, .55);
  transition: left .5s ease, top .5s ease;
}
.dealer-btn[data-seat="0"] { left: 64%; top: 84%; }
.dealer-btn[data-seat="1"] { left: 14%; top: 42%; }
.dealer-btn[data-seat="2"] { left: 38%; top: 17%; }
.dealer-btn[data-seat="3"] { left: 62%; top: 17%; }
.dealer-btn[data-seat="4"] { left: 86%; top: 42%; }

.raise-area { max-width: 560px; margin: 0 auto 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.raise-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.raise-head label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.raise-val { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.raise-area input[type=range] { width: 100%; height: 28px; -webkit-appearance: none; appearance: none; background: transparent; }
.raise-area input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--gold-3), var(--gold)); }
.raise-area input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--gold-3), var(--gold)); }
.raise-area input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4cf, var(--gold)); border: 2px solid #1d1504; }
.raise-area input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 2px solid #1d1504; }
.raise-presets { display: flex; gap: 8px; margin: 8px 0 10px; }
.raise-presets button { flex: 1; min-height: 38px; border-radius: var(--rf); background: var(--surface); border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.raise-presets button:hover { border-color: var(--gold); color: var(--gold-2); }
.raise-confirm { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- 12. BLACKJACK ---------- */
.bj-table {
  width: min(100%, 820px); position: relative; padding: 14px 14px 18px;
  border-radius: 22px 22px 50% 50% / 22px 22px 58% 58%;
  background: var(--rail-bg);
  box-shadow: 0 34px 80px rgba(0, 0, 0, .65), inset 0 2px 0 rgba(255, 255, 255, .14), inset 0 -5px 10px rgba(0, 0, 0, .5);
}
.bj-rack {
  position: absolute; left: 50%; top: 0; z-index: 2; transform: translate(-50%, -40%);
  display: flex; gap: 4px; padding: 6px 10px; border-radius: 10px;
  background: linear-gradient(180deg, #1a1410, #0c0907); box-shadow: 0 6px 14px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(212, 175, 55, .3);
}
.bj-rack i { width: 14px; height: 22px; border-radius: 3px; background: repeating-linear-gradient(180deg, var(--c) 0 3px, rgba(0, 0, 0, .35) 3px 4px); }
.bj-rack i:nth-child(4n+1) { --c: #1b1b1f; } .bj-rack i:nth-child(4n+2) { --c: #1e7d4a; } .bj-rack i:nth-child(4n+3) { --c: #c0392b; } .bj-rack i:nth-child(4n+4) { --c: #ece4cf; }
.bj-felt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px clamp(16px, 4vw, 44px) clamp(40px, 6vw, 64px);
  border-radius: 12px 12px 50% 50% / 12px 12px 58% 58%;
  background: var(--felt-bg);
  box-shadow: inset 0 0 0 2px rgba(201, 162, 74, .5), inset 0 14px 44px rgba(0, 0, 0, .45);
}
.bj-felt .card-row { --cw: clamp(52px, 7vw, 70px); }
.bj-hand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bj-mid { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }
.bj-mid .bj-arc, .bj-mid .bj-rules-mini { transition: opacity .25s ease; }
.bj-mid:has(.result-banner.show) .bj-arc, .bj-mid:has(.result-banner.show) .bj-rules-mini { opacity: 0; }
.bj-arc { width: min(100%, 560px); height: auto; margin: 0 0 -18px; pointer-events: none; }
.arc-main { font-family: var(--display); font-weight: 700; font-size: 25px; letter-spacing: 4px; fill: rgba(242, 210, 122, .8); }
.arc-sub { font-family: var(--font); font-weight: 600; font-size: 13px; letter-spacing: 4px; fill: rgba(255, 255, 255, .58); }
.bj-rules-mini { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bet-circle {
  width: 84px; height: 84px; margin-top: 10px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid rgba(242, 210, 122, .7); box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .14), 0 0 0 5px rgba(242, 210, 122, .08);
}
.bet-circle-label { font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.bet-circle strong { font-size: 21px; color: var(--gold-2); font-variant-numeric: tabular-nums; line-height: 1.1; }
#bj-player-cards { gap: 10px; }
.bj-split { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 14px; border: 1.5px dashed transparent; transition: border-color .2s, background-color .2s; }
.bj-split-cards { display: flex; gap: 5px; }
.bj-split.is-active { border-color: var(--gold); background: rgba(0, 0, 0, .16); }
.bj-split.is-bust { opacity: .55; }
.bj-split-label { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .85); }
#screen-blackjack-game[data-phase="betting"] .dock-play,
#screen-blackjack-game:not([data-phase="betting"]) .dock-bet { display: none; }

/* ---------- 13. BACCARAT ---------- */
.bac-table { width: min(100%, 860px); }
.bac-felt { padding: clamp(18px, 3vw, 30px); display: flex; flex-direction: column; gap: 22px; }
.bac-hands { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 3vw, 28px); }
.bac-hand {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 10px 16px; border-radius: 18px;
  background: rgba(0, 0, 0, .12); border: 1px solid rgba(255, 255, 255, .08); transition: box-shadow .3s, border-color .3s;
}
.bac-hand h3 { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 19px; }
.bac-hand h3::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.bac-hand.is-player { --dot: #4a9be0; } .bac-hand.is-banker { --dot: #e5645c; }
.bac-hand .card-row { --cw: clamp(46px, 6.4vw, 64px); gap: 6px; }
.bac-hand.is-winner { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212, 175, 55, .35), 0 0 34px rgba(212, 175, 55, .3); }
.bac-zones { display: grid; grid-template-columns: 1fr .85fr 1fr; gap: 12px; }
.bac-zone {
  position: relative; min-height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 46px 46px 16px 16px; border: 1.5px solid rgba(242, 210, 122, .55);
  background: rgba(0, 0, 0, .14); color: var(--ink);
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .15s;
}
.bac-zone:hover:not(:disabled) { background: rgba(242, 210, 122, .08); }
.bac-zone:disabled { cursor: default; }
.zone-name { font-family: var(--display); font-size: clamp(15px, 2vw, 19px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.z-player .zone-name { color: #a9d3ff; } .z-banker .zone-name { color: #ffb8b1; } .z-tie .zone-name { color: #8ff0b8; }
.zone-pay { font-size: 12px; color: rgba(255, 255, 255, .72); }
.bac-zone.is-selected { border: 2px solid var(--gold); background: rgba(242, 210, 122, .14); box-shadow: 0 0 0 4px rgba(242, 210, 122, .12), 0 0 30px rgba(242, 210, 122, .22); }
.bac-zone.is-winner { box-shadow: 0 0 0 3px rgba(52, 199, 123, .55), 0 0 30px rgba(52, 199, 123, .35); }
.zone-bet:empty { display: none; }
.zone-bet {
  position: absolute; top: -13px; right: 12px; display: flex; align-items: center; gap: 5px;
  padding: 2px 9px 2px 3px; border-radius: var(--rf); background: #111; border: 1px solid rgba(212, 175, 55, .5);
  color: var(--gold-2); font-size: 12.5px; font-weight: 700;
}
#screen-baccarat[data-phase="dealing"] .dock-bet { opacity: .6; }

/* ---------- 14. TRUCO ---------- */
.truco-wrap { width: min(100%, 660px); display: flex; flex-direction: column; gap: 14px; }
.score-board { display: grid; gap: 8px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.score-line { display: grid; grid-template-columns: 52px 1fr auto auto; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.score-line strong { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }
.score-line small { color: var(--ink-3); }
.score-track { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.score-track i { display: block; height: 100%; width: 0; border-radius: 8px; transition: width .6s ease; }
.you .score-track i { background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); }
.rival .score-track i { background: linear-gradient(90deg, #9b2b24, var(--red)); }
.truco-table { border-radius: 40px; }
.truco-felt { border-radius: 28px; padding: 18px clamp(12px, 3vw, 28px) 20px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.t-area { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.t-hand-ai { --cw: 40px; gap: 6px; }
.t-hand { --cw: clamp(62px, 13vw, 80px); gap: 10px; }
.t-rounds { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 3vw, 22px); --cw: clamp(40px, 9vw, 54px); }
.t-round { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.t-slot {
  width: calc(var(--cw) + 8px); height: calc(var(--cw) * 1.4 + 8px); border-radius: 10px;
  display: grid; place-items: center; border: 1.5px dashed rgba(255, 255, 255, .28);
}
.t-round.is-current .t-slot { border-color: rgba(242, 210, 122, .7); }
.t-round-label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.t-round.won .t-round-label { color: #8ff0b8; } .t-round.lost .t-round-label { color: #ffb8b1; } .t-round.tied .t-round-label { color: var(--gold-2); }
.t-card {
  background: linear-gradient(160deg, #fffdf8, #f1e9d6);
  box-shadow: inset 0 0 0 calc(var(--cw) * .05) #fffdf8, inset 0 0 0 calc(var(--cw) * .065) currentColor, 0 0 0 1px rgba(0, 0, 0, .18), 0 4px 10px rgba(0, 0, 0, .38);
  border: 0; padding: 0;
}
.t-espadas { color: #1f4e8c; } .t-bastos { color: #5e3a17; } .t-copas { color: #b52020; } .t-oros { color: #9c7300; }
.t-corner { position: absolute; font-family: Georgia, serif; font-weight: 700; font-size: calc(var(--cw) * .27); line-height: 1; }
.t-corner.tl { top: calc(var(--cw) * .1); left: calc(var(--cw) * .12); }
.t-corner.br { bottom: calc(var(--cw) * .1); right: calc(var(--cw) * .12); transform: rotate(180deg); }
.t-icon { position: absolute; inset: 22% 18%; display: grid; place-items: center; }
.t-icon svg { width: 100%; height: 100%; }
button.t-card { transition: transform .2s ease, box-shadow .2s ease; }
button.t-card:hover { transform: translateY(-8px); box-shadow: inset 0 0 0 calc(var(--cw) * .05) #fffdf8, inset 0 0 0 calc(var(--cw) * .065) currentColor, 0 0 0 2px var(--gold), 0 12px 22px rgba(0, 0, 0, .45); }
.t-examples { --cw: 52px; gap: 8px; margin: 8px 0; }
#screen-truco .truco-answer, #screen-truco .truco-over { display: none; }
#screen-truco[data-mode="answer"] .truco-play, #screen-truco[data-mode="over"] .truco-play { display: none; }
#screen-truco[data-mode="answer"] .truco-answer, #screen-truco[data-mode="over"] .truco-over { display: flex; }
.offer { flex-basis: 100%; text-align: center; font-weight: 700; color: var(--gold-2); }

/* ---------- 15. DOMINÓ ---------- */
.domino-wrap { width: min(100%, 900px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.domino-ai { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; min-height: 34px; }
.domino-back {
  width: 17px; height: 34px; border-radius: 4px;
  position: relative;
  background: radial-gradient(circle at 50% 50%, var(--gold-2) 0 2px, transparent 2.5px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 5px),
    linear-gradient(160deg, #7a1d1d, #4a0f12);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), inset 0 0 0 1.5px rgba(212, 175, 55, .55), 0 3px 6px rgba(0, 0, 0, .35);
}
.domino-table { width: 100%; border-radius: 40px; }
.domino-felt { border-radius: 28px; min-height: 210px; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.domino-ends { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .72); min-height: 24px; }
.domino-ends strong { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 6px; border-radius: 6px; background: rgba(0, 0, 0, .4); color: var(--gold-2); font-size: 14px; }
.domino-board { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; align-content: center; min-height: 120px; --dw: clamp(17px, 2.8vw, 24px); }
.domino {
  --dw: 34px;
  display: inline-flex; align-items: center; flex: none; padding: calc(var(--dw) * .06);
  border-radius: calc(var(--dw) * .2); border: 0;
  background: linear-gradient(160deg, #fffdf8, #ebe2cd);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 3px 7px rgba(0, 0, 0, .38), inset 0 1px 0 #fff;
}
.domino-board .domino { --dw: inherit; }
.domino.h { flex-direction: row; }
.domino.v { flex-direction: column; }
.d-half { width: var(--dw); height: var(--dw); padding: calc(var(--dw) * .13); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.d-half i { display: block; width: 76%; height: 76%; place-self: center; border-radius: 50%; }
.d-half i.on { background: radial-gradient(circle at 35% 35%, #555, #0d0d0d 70%); }
.d-bar { flex: none; background: rgba(0, 0, 0, .28); }
.domino.h .d-bar { width: 1.5px; align-self: stretch; margin: 12% 0; }
.domino.v .d-bar { height: 1.5px; align-self: stretch; margin: 0 12%; }
.domino.is-end { box-shadow: 0 0 0 2px var(--gold), 0 3px 7px rgba(0, 0, 0, .38); }
.domino-hand-wrap { width: 100%; }
.domino-hand { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; --dw: clamp(30px, 6.5vw, 40px); }
.domino-hand .domino { --dw: inherit; transition: transform .2s ease, box-shadow .2s ease, opacity .2s; }
.domino-hand .domino:not(.is-playable) { opacity: .62; }
.domino-hand .domino.is-playable { box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 0 0 3px rgba(212, 175, 55, .45), 0 3px 7px rgba(0, 0, 0, .38); }
.domino-hand button.domino:hover { transform: translateY(-5px); }
.domino-hand .domino.is-selected { transform: translateY(-12px); opacity: 1; box-shadow: 0 0 0 3px var(--gold), 0 14px 24px rgba(0, 0, 0, .5); }
.learn-card .domino { --dw: 26px; }

/* ---------- 16. AJEDREZ ---------- */
.chess-wrap { --board: min(90vw, calc(100dvh - 230px), 540px); width: min(100%, 1000px); display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 40px); justify-content: center; align-items: flex-start; }
.chess-board-wrap { position: relative; width: var(--board); padding: 12px; border-radius: 12px; background: var(--rail-bg); box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .14); }
.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 2px rgba(201, 162, 74, .6); }
.sq { position: relative; border: 0; padding: 0; display: grid; place-items: center; aspect-ratio: 1; }
.sq.light { background: #f0d9b5; } .sq.dark { background: #b58863; }
.sq.is-last { box-shadow: inset 0 0 0 999px rgba(245, 222, 60, .42); }
.sq.is-selected { box-shadow: inset 0 0 0 999px rgba(30, 125, 74, .45); }
.sq.is-move::after { content: ''; width: 30%; height: 30%; border-radius: 50%; background: rgba(15, 70, 40, .45); }
.sq.is-capture::after { content: ''; position: absolute; inset: 5%; border-radius: 50%; border: calc(var(--board) * .009) solid rgba(15, 70, 40, .55); }
.sq:hover { filter: brightness(1.05); }
.coord { position: absolute; font-family: var(--font); font-weight: 700; font-size: calc(var(--board) * .024); line-height: 1; pointer-events: none; }
.coord.rank { top: 5%; left: 6%; } .coord.file { bottom: 5%; right: 7%; }
.sq.light .coord { color: #a07a54; } .sq.dark .coord { color: #f5e6cc; }
.piece { font-family: 'Segoe UI Symbol', 'Apple Symbols', 'Noto Sans Symbols 2', 'DejaVu Sans', serif; line-height: 1; }
.sq .piece { font-size: calc(var(--board) * .098); position: relative; z-index: 1; }
.piece.white { color: #fdfaf2; text-shadow: 0 0 1px #000, 1px 0 0 #1a1a1a, -1px 0 0 #1a1a1a, 0 1px 0 #1a1a1a, 0 -1px 0 #1a1a1a, 0 3px 4px rgba(0, 0, 0, .45); }
.piece.black { color: #17150f; text-shadow: 0 1px 0 rgba(255, 255, 255, .25), 0 3px 4px rgba(0, 0, 0, .35); }
.chess-board-wrap .result-banner { top: auto; bottom: 22px; transform: translateX(-50%) scale(.92); }
.chess-board-wrap .result-banner.show { transform: translateX(-50%); animation: none; }
.chess-side { width: min(100%, 360px); display: flex; flex-direction: column; gap: 14px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--rf); background: var(--surface); border: 1px solid var(--line); }
.seg button {
  flex: 1 0 auto; min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--rf);
  background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"], .seg button.active { background: linear-gradient(180deg, #f6dc8c, #d4af37); color: #1d1504; }
.piece-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.piece-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background-color .2s; }
.piece-btn .piece { font-size: 34px; }
.piece-btn:hover { border-color: rgba(212, 175, 55, .5); }
.piece-btn.is-active { border-color: var(--gold); background: rgba(212, 175, 55, .1); }
.piece-name { font-size: 13px; font-weight: 600; }
.piece-val { font-size: 11px; color: var(--ink-3); }
.info-card { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); }
.info-card h3 { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 19px; color: var(--gold-2); margin-bottom: 6px; }
.info-card h3 .piece { font-size: 28px; }
.info-card p { font-size: 14px; color: var(--ink-2); }
.info-card p + p { margin-top: 8px; }
.info-card .eyebrow { font-size: 11px; }
.p-dots { display: flex; gap: 7px; margin: 8px 0 10px; }
.p-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.p-dot.done { background: var(--green); }
.p-dot.current { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1 1 auto; min-height: 42px; padding: 0 14px; font-size: 14px; }

/* ---------- 17. CENTRO DE APRENDIZAJE ---------- */
.learn-wrap { max-width: 980px; margin: 0 auto; }
.learn-tabs.seg { overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; border-radius: 16px; }
.learn-tabs.seg::-webkit-scrollbar { display: none; }
.seg-sub { margin: 4px 0 20px; }
.learn-card { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: var(--r3); padding: clamp(18px, 3.5vw, 40px); }
#learn-content h3 { font-family: var(--display); font-size: clamp(22px, 2.6vw, 28px); color: var(--gold-2); margin: 32px 0 10px; line-height: 1.2; }
#learn-content > h3:first-child, #strategy-content > h3:first-child { margin-top: 0; }
#learn-content h4 { font-size: 17px; margin: 22px 0 8px; color: var(--ink); }
#learn-content p { color: var(--ink-2); font-size: 15px; line-height: 1.7; margin-bottom: 10px; }
#learn-content ul, #learn-content ol { margin: 0 0 14px 20px; }
#learn-content li { color: var(--ink-2); font-size: 15px; line-height: 1.65; margin-bottom: 5px; }
#learn-content strong { color: var(--ink); }
#learn-content code { font-size: 14px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--gold-2); }
.table-scroll { overflow-x: auto; margin: 12px 0 16px; border-radius: 12px; border: 1px solid var(--line); }
#learn-content table { width: 100%; border-collapse: collapse; min-width: 420px; }
#learn-content th { background: rgba(255, 255, 255, .05); padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink); }
#learn-content td { padding: 10px 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
td.act-hit { color: #8ff0b8 !important; font-weight: 600; } td.act-stand { color: #a9d3ff !important; font-weight: 600; } td.act-double { color: var(--gold-2) !important; font-weight: 600; }
.tip-box { background: rgba(212, 175, 55, .07); border-left: 3px solid var(--gold); padding: 12px 16px; border-radius: 0 12px 12px 0; margin: 16px 0; }
.tip-box p { color: var(--ink) !important; margin: 0 !important; }
#learn-content ol.hand-list { list-style: none; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.hand-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin: 0 !important; }
.hand-num { font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--gold-2); text-align: center; }
.hand-body h4 { margin: 0 0 2px !important; font-size: 16px !important; }
.hand-body p { margin: 0 !important; font-size: 14px !important; }
#learn-content .hand-prob { color: var(--ink-3); font-size: 12.5px !important; margin-top: 4px !important; }
.hand-item .mini-cards { --cw: 38px; flex-wrap: nowrap; }
.search-sticky { position: sticky; top: 0; z-index: 3; padding: 10px 0 12px; margin-top: -4px; background: linear-gradient(180deg, #121009 75%, rgba(18, 16, 9, 0)); }
.search-input { width: 100%; height: 48px; padding: 0 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink); font-size: 16px; }
.search-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .2); }
.glossary-item { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
#learn-content .glossary-item h4 { margin: 0 0 2px; color: var(--gold-2); font-size: 15px; }
#learn-content .glossary-item p { margin: 0; font-size: 14px; line-height: 1.5; }
#learn-content ol.rank-list { columns: 2; column-gap: 32px; }
.piece-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.piece-row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.piece-row .piece { font-size: 42px; flex: none; }
#learn-content .piece-row h4 { margin: 0 0 2px; font-size: 16px; }
#learn-content .piece-row p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.piece-row .piece-val { font-family: var(--font); font-weight: 500; }
#learn-content .mini-cards { margin: 8px 0 12px; }

/* ---------- 18. MODALES ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px;
  background: rgba(5, 4, 3, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal.open { display: flex; }
.modal-box {
  width: min(100%, 640px); max-height: 88vh; max-height: 88dvh; overflow-y: auto; padding: 26px;
  border-radius: 22px; background: linear-gradient(180deg, #1f1a14, #12100c); border: 1px solid rgba(212, 175, 55, .32);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65); animation: slideUp .3s ease-out;
}
.modal-small { width: min(100%, 440px); }
.modal-box h2 { font-family: var(--display); font-size: 28px; line-height: 1.15; margin-bottom: 10px; }
.modal-box > p { color: var(--ink-2); }
#poker-result-modal[data-outcome="win"] h2 { color: var(--gold-2); }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-result .modal-btns .btn { width: 100%; }
.res-pot { color: var(--ink-2); margin-bottom: 12px; }
.res-pot strong { color: var(--gold-2); font-size: 20px; }
.res-winner { padding: 14px 16px; border-radius: 14px; background: rgba(52, 199, 123, .07); border: 1px solid rgba(52, 199, 123, .32); }
.res-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8ff0b8; }
.res-winner h4 { font-size: 18px; margin: 2px 0 6px; }
.res-winner h4 span { color: var(--ink-2); font-weight: 500; }
.result-cards { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; --cw: 40px; margin: 8px 0; }
.res-plus { margin: 0 4px; color: var(--ink-3); font-weight: 700; }
.res-note { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.res-sub { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 20px 0 6px; }
.result-hand { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin: 8px 0; }
.result-hand.is-folded { opacity: .6; }
.res-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.res-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--rf); }
.res-tag.red { background: rgba(229, 100, 92, .14); color: #ffb8b1; }
.res-tag.gold { background: rgba(212, 175, 55, .16); color: var(--gold-2); }
.res-muted { font-size: 13px; color: var(--ink-3); }
.modal-analysis:empty { display: none; }
.modal-analysis { margin-top: 14px; }
.lesson { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; background: rgba(212, 175, 55, .07); }
.lesson.red { border-left-color: var(--red); background: rgba(229, 100, 92, .06); }
.lesson h4 { font-size: 14px; color: var(--gold-2); margin-bottom: 4px; }
.lesson.red h4 { color: #ffb8b1; }
.lesson p { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.lesson p + p { margin-top: 6px; }

/* ---------- 19. CELEBRACIÓN ---------- */
.chip-burst { position: fixed; left: 50%; top: 42%; width: 0; height: 0; z-index: 300; pointer-events: none; }
.chip-burst i {
  position: absolute; width: 26px; height: 26px; margin: -13px; border-radius: 50%;
  --chip: #c0392b; --stripe: #f7f2e6;
  background: radial-gradient(circle, var(--chip) 0 52%, transparent 54%), repeating-conic-gradient(var(--chip) 0 22.5deg, var(--stripe) 22.5deg 45deg);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .4);
  animation: burst 1.2s cubic-bezier(.15, .7, .3, 1) both;
}
.chip-burst .c1 { --chip: #ece4cf; --stripe: #2b64a8; } .chip-burst .c25 { --chip: #1e7d4a; } .chip-burst .c100 { --chip: #1b1b1f; --stripe: #d4af37; }
@keyframes burst {
  0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--x), calc(var(--y) + 180px)) scale(1) rotate(var(--r)); opacity: 0; }
}

/* ---------- 20. RESPONSIVE ---------- */
@media (max-width: 1099px) {
  .poker-stage { padding: 72px 104px 150px; }
}
@media (max-width: 980px) {
  section.hero { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; }
  .hero-table { width: min(100%, 440px); }
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .poker-stage { padding: 12px 10px 14px; }
  .poker-table {
    width: 100%; max-width: 460px; min-width: 0; aspect-ratio: auto;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas: "s1 s2 s3 s4" "pot pot pot pot" "board board board board" "hero hero hero hero";
    gap: 8px 6px; padding: 30px 4px 4px;
    min-height: 100%; margin: 0 auto; align-content: space-evenly;
  }
  .pt-rail { inset: 44px -2px 64px; padding: 10px; border-radius: 50% / 26%; }
  .pt-felt, .pt-felt::before { border-radius: 50% / 26%; }
  .felt-emboss { display: none; }
  .seat, .seat[data-i] { position: relative; left: auto; top: auto; transform: none; }
  .seat[data-i="1"] { grid-area: s1; } .seat[data-i="2"] { grid-area: s2; } .seat[data-i="3"] { grid-area: s3; } .seat[data-i="4"] { grid-area: s4; }
  .seat[data-i="0"] { grid-area: hero; margin-top: 4px; }
  .seat:not(.hero) { --cw: 20px; }
  .seat:not(.hero) .seat-cards { margin-bottom: -6px; gap: 2px; }
  .seat:not(.hero) .seat-info { flex-direction: column; gap: 3px; min-width: 0; width: 100%; padding: 6px 4px 7px; border-radius: 14px; text-align: center; }
  .seat:not(.hero) .seat-avatar { width: 28px; height: 28px; font-size: 13px; }
  .seat:not(.hero) .seat-meta { align-items: center; }
  .seat:not(.hero) .seat-name { font-size: 11px; }
  .seat:not(.hero) .seat-chips { font-size: 12.5px; }
  .seat:not(.hero) .seat-position { position: absolute; top: -7px; right: -2px; margin: 0; padding: 2px 5px; font-size: 9.5px; background: #2d271d; border: 1px solid rgba(255, 255, 255, .16); }
  .seat:not(.hero) .seat-position[data-pos="BTN"] { background: #4a3a10; color: var(--gold-2); border-color: rgba(212, 175, 55, .6); }
  .seat:not(.hero) .seat-bet, .seat[data-i="1"] .seat-bet, .seat[data-i="4"] .seat-bet { top: calc(100% + 4px); left: 50%; right: auto; transform: translateX(-50%); font-size: 11px; padding: 2px 7px 2px 3px; }
  .seat:not(.hero) .seat-bet::before { width: 12px; height: 12px; }
  .seat:not(.hero) .seat-action { top: -4px; transform: translate(-50%, -100%); font-size: 10.5px; padding: 3px 8px; }
  .seat.active:not(.hero) .seat-info::after { left: 10px; right: 10px; bottom: -4px; }
  .pot { grid-area: pot; position: relative; left: auto; top: auto; transform: none; justify-self: center; margin-top: 26px; }
  .community { grid-area: board; position: relative; left: auto; top: auto; transform: none; justify-self: center; gap: 5px; --cw: min(56px, calc((100vw - 64px) / 5.3)); }
  .dealer-btn { display: none; }
  .hero .seat-cards { --cw: 72px; }
  .hero .seat-info { min-width: 168px; }
  .seat[data-i="0"] .seat-bet { bottom: auto; top: 20px; left: calc(50% + 76px); transform: none; }
  .hero .seat-action { top: 20px; bottom: auto; right: calc(50% + 76px); }

  .act { flex: 1 1 0; min-width: 0; min-height: 54px; padding: 0 4px; border-radius: 12px; }
  .act span { font-size: 14.5px; }
  .act small { font-size: 10.5px; }
  .act kbd { display: none; }
  .actions-row { flex-wrap: nowrap; gap: 6px; }
  .dock-play { flex-wrap: nowrap; gap: 6px; }
}
@media (max-width: 600px) {
  .games-grid { grid-template-columns: 1fr; }
  .levels { grid-template-columns: 1fr; }
  .site-nav nav a:not(.nav-gh) { display: none; }
  .hero-facts { gap: 22px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .g-top { flex-wrap: wrap; row-gap: 8px; padding: 8px 12px; }
  .g-stats { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; overflow-x: auto; }
  .stat-pill { padding: 4px 10px; }
  .g-title + .g-stats + .bal-pill, .g-title + .bal-pill { margin-left: auto; }
  .bal-pill { order: 2; }
  .g-dock { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
  .dock-bet .chip-tray { flex: 1 1 100%; }
  .dock-bet .btn { flex: 1 1 0; }
  .chip-lg { width: 48px; height: 48px; }
  .bet-total { flex: 1 1 100%; text-align: center; }
  .bj-felt { padding: 30px 12px 44px; border-radius: 10px 10px 50% 50% / 10px 10px 34% 34%; }
  .bj-table { border-radius: 20px 20px 50% 50% / 20px 20px 36% 36%; }
  .bj-arc { display: none; }
  .bj-rules-mini { position: static !important; width: auto; height: auto; clip: auto; white-space: normal; text-align: center; margin: 6px 0; font-family: var(--display); font-size: 13px; letter-spacing: .06em; color: rgba(242, 210, 122, .85); }
  .bac-zones { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .bac-zone { min-height: 76px; border-radius: 30px 30px 12px 12px; }
  .bac-hand h3 { font-size: 16px; }
  .table-rail { padding: 10px; border-radius: 30px; }
  .felt { border-radius: 22px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 92dvh; }
  .modal-btns .btn { flex: 1; }
  .hand-item { grid-template-columns: 34px minmax(0, 1fr); gap: 10px 12px; }
  .hand-item .mini-cards { grid-column: 1 / -1; --cw: min(38px, calc((100vw - 110px) / 5)); }
  .piece-table { grid-template-columns: 1fr; }
  #learn-content ol.rank-list { columns: 1; }
  .piece-picker { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 96px; overflow-x: auto; padding-bottom: 4px; }
  .chess-side { width: 100%; }
  .domino-felt { min-height: 170px; padding: 12px 10px 16px; }
}
@media (max-width: 380px) {
  section.hero h1 { font-size: 46px; }
  .hero-facts strong { font-size: 24px; }
  .bal-pill { padding-right: 10px; }
  .bal-pill strong { font-size: 15px; }
  .act span { font-size: 13.5px; }
}
@media (hover: none) {
  .act kbd { display: none; }
}

/* Movimiento reducido: sin animaciones de reparto, giro, pulso ni escalonado */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .game-tile:hover, .level-card:hover, .btn:hover { transform: none; }
}
.screen main:focus, .screen[tabindex="-1"]:focus { outline: none; }
@media (max-width: 760px) {
  .bj-mid { min-height: 46px; justify-content: center; }
  .bj-mid .result-banner { padding: 8px 16px; font-size: 17px; }
}
