/**
 * smgr/css/pages/reydelapista.css — estilos de "Rey de la Pista" portados al
 * chrome "Foco". Mismo recipe que masomenos.css:
 *   · :root con variables (custom props globales inofensivas) SIN scope.
 *   · body { background } → .game-scope { background } (fondo solo del juego).
 *   · resto de selectores prefijados con ".game-scope " para aislar el juego.
 *   · reset de aislamiento arriba (contrarresta img/button de rincon.css).
 *   · reglas de logo/menú viejo eliminadas.
 */

/* ===== Variables del juego (globales, sin scope) ===== */
:root{ --r-navy:#1e3a5f; --r-navy2:#2c5282; --r-orange:#ed8936; --r-gold:#f59e0b; --r-green:#16a34a;
    --r-red:#ef4444; --r-bg:#eef2f8; --r-surface:#fff; --r-border:#e2e8f0; --r-muted:#64748b; --r-ink:#0f172a; }

/* ===== Reset de aislamiento ===== */
.game-scope img { max-width: none; }
.game-scope button { font: inherit; }

/* Fondo inmersivo del juego (antes en body). Solo cubre el área de juego. */
.game-scope{ background:var(--r-bg); }

.game-scope #rp-app{ max-width:720px; margin:16px auto 40px; padding:0 12px; font-family:Roboto,sans-serif; color:var(--r-ink); }

/* landing */
.game-scope .rp-landing{ background:var(--r-surface); border-radius:16px; overflow:hidden; box-shadow:0 4px 16px rgba(15,23,42,.07); }
.game-scope .rp-hero{ background:linear-gradient(135deg,var(--r-navy),var(--r-navy2)); color:#fff; padding:26px 22px 22px; text-align:center; }
.game-scope .rp-hero .lk{ display:inline-flex; align-items:center; gap:11px; }
.game-scope .rp-hero .lk img{ width:46px; height:46px; }
.game-scope .rp-hero h1{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:clamp(1.7rem,6vw,2.3rem); margin:0; }
.game-scope .rp-hero .sub{ margin:12px auto 0; max-width:480px; opacity:.92; font-size:14.5px; line-height:1.45; }
.game-scope .rp-body{ padding:20px; }
.game-scope .guest-block{ margin:0 auto 16px; max-width:340px; text-align:left; }
.game-scope .guest-block label{ font-size:13px; font-weight:700; color:var(--r-muted); display:block; margin-bottom:4px; }
.game-scope .guest-block input{ width:100%; padding:11px 13px; border:2px solid var(--r-border); border-radius:10px; font-size:16px; }
.game-scope .guest-block input:focus{ outline:none; border-color:var(--r-navy2); }
.game-scope .guest-hint{ font-size:12px; color:var(--r-muted); margin-top:4px; } .game-scope .guest-err{ display:none; font-size:12px; color:#dc2626; font-weight:600; margin-top:4px; }
.game-scope .guest-block.error input{ border-color:#dc2626; box-shadow:0 0 0 3px rgba(220,38,38,.15); } .game-scope .guest-block.error .guest-hint{ display:none; } .game-scope .guest-block.error .guest-err{ display:block; }

.game-scope .rp-play-btn{ display:block; width:100%; max-width:340px; margin:0 auto; border:none; border-radius:12px; padding:15px; font-weight:700; font-size:17px; color:#fff; cursor:pointer;
    background:linear-gradient(135deg,var(--r-orange),#dd6b20); }
.game-scope .rp-play-btn:active{ transform:scale(.99); }
.game-scope .rp-rules{ margin:18px auto 0; max-width:480px; }
.game-scope .rp-rules ol{ padding-left:20px; margin:0; } .game-scope .rp-rules li{ font-size:13px; color:#475569; line-height:1.5; margin-bottom:5px; }
.game-scope .rp-howto-link{ display:block; text-align:center; margin-top:10px; font-size:13px; color:var(--r-navy2); font-weight:600; cursor:pointer; }
.game-scope .rp-pb{ text-align:center; font-size:13px; color:var(--r-muted); margin-top:12px; } .game-scope .rp-pb b{ color:var(--r-orange); font-family:'Space Grotesk',sans-serif; }

.game-scope .board{ background:#f8fafc; border:1px solid var(--r-border); border-radius:12px; padding:12px 14px; margin-top:18px; }
.game-scope .board h4{ margin:0 0 7px; font-size:12.5px; font-weight:700; color:var(--r-navy); text-transform:uppercase; letter-spacing:.04em; }
.game-scope .board ol{ margin:0; padding-left:0; list-style:none; counter-reset:r; }
.game-scope .board li{ display:flex; justify-content:space-between; font-size:13px; padding:4px 0; border-bottom:1px dashed #e8edf3; counter-increment:r; }
.game-scope .board li:last-child{ border-bottom:none; } .game-scope .board li .nm::before{ content:counter(r) ". "; color:var(--r-muted); }
.game-scope .board li .st{ font-weight:700; color:var(--r-orange); font-family:'Space Grotesk',sans-serif; } .game-scope .board .nm-sub{ color:var(--r-muted); font-weight:400; font-size:11px; }
.game-scope .board .empty{ font-size:12px; color:var(--r-muted); padding:6px 0; }
.game-scope .board-all{ display:inline-block; margin-top:8px; font-size:12px; font-weight:700; color:var(--r-navy2); text-decoration:none; }
.game-scope .rp-hub{ text-align:center; margin-top:14px; } .game-scope .rp-hub a{ color:var(--r-muted); font-weight:600; font-size:13px; text-decoration:none; }

/* game */
.game-scope #state-game{ display:none; }
.game-scope .rp-hud{ display:flex; align-items:center; justify-content:space-between; gap:8px; background:var(--r-navy); color:#fff; border-radius:12px; padding:10px 14px; }
.game-scope .rp-hud .h-round{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:15px; } .game-scope .rp-hud .h-round b{ color:var(--r-gold); }
.game-scope .rp-hud .h-streak{ font-size:12.5px; opacity:.9; }
.game-scope .rp-hud .h-tally{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:18px; }
.game-scope .rp-hud .h-tally .you{ color:#86efac; } .game-scope .rp-hud .h-tally .cpu{ color:#fca5a5; }

/* stat strip */
.game-scope .rp-strip{ display:grid; grid-template-columns:repeat(5,1fr); gap:6px; margin:10px 0; }
.game-scope .rp-chip{ background:#fff; border:2px solid var(--r-border); border-radius:10px; padding:7px 2px; text-align:center; font-size:11px; }
.game-scope .rp-chip .lbl{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:13px; color:var(--r-navy); }
.game-scope .rp-chip .who{ font-size:11px; color:var(--r-muted); margin-top:1px; }
.game-scope .rp-chip .mk{ font-size:13px; margin-top:1px; height:16px; }
.game-scope .rp-chip.cur{ border-color:var(--r-orange); background:#fff7ed; }
.game-scope .rp-chip.won{ border-color:#86efac; background:#dcfce7; } .game-scope .rp-chip.won .mk{ color:var(--r-green); }
.game-scope .rp-chip.lost{ border-color:#fca5a5; background:#fef2f2; } .game-scope .rp-chip.lost .mk{ color:var(--r-red); }

.game-scope .rp-prompt{ text-align:center; font-size:14px; color:var(--r-ink); margin:14px 0 8px; font-weight:600; }
.game-scope .rp-prompt .stat-em{ color:var(--r-orange); font-weight:700; } .game-scope .rp-prompt small{ display:block; font-weight:400; color:var(--r-muted); font-size:12px; margin-top:2px; }

.game-scope .rp-cpu-zone{ display:none; margin-bottom:10px; }
.game-scope .rp-cpu-zone.show{ display:block; }
.game-scope .rp-cpu-zone .cz-label{ text-align:center; font-size:11.5px; font-weight:700; color:var(--r-red); text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
.game-scope .rp-cpu-zone .rp-card{ margin:0 auto; }

/* card */
/* mano: SIEMPRE 5 en una fila (slots fijos → las cartas no cambian de tamaño al gastarse) */
.game-scope .rp-hand{ display:grid; grid-template-columns:repeat(5,1fr); gap:6px; align-items:start; }
.game-scope .rp-card{ width:100%; background:var(--r-surface); border:2px solid var(--r-border); border-radius:12px; overflow:hidden;
    cursor:pointer; user-select:none; -webkit-tap-highlight-color:transparent; transition:transform .08s, border-color .12s, box-shadow .12s; }
.game-scope .rp-card.tappable:active{ transform:scale(.96); }
.game-scope .rp-card.tappable:hover{ border-color:var(--r-orange); }
.game-scope .rp-card .c-top{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:7px 5px 6px; background:linear-gradient(135deg,var(--r-navy),var(--r-navy2)); color:#fff; text-align:center; }
.game-scope .rp-card .c-faces{ display:flex; align-items:center; gap:4px; }
.game-scope .rp-card .c-em{ width:26px; height:26px; flex:0 0 26px; }
.game-scope .rp-card .c-face{ object-fit:cover; object-position:top center; border-radius:6px; background:#e2e8f0; }
.game-scope .rp-card .c-shield{ object-fit:contain; }
.game-scope .rp-card .c-top .c-name{ font-weight:700; font-size:10.5px; line-height:1.15; width:100%;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; height:24px; }
.game-scope .rp-card .c-stats{ padding:4px 4px 6px; }
.game-scope .rp-card .c-stat{ display:flex; justify-content:space-between; align-items:center; padding:2px 4px; border-radius:5px; }
.game-scope .rp-card .c-stat .s-lbl{ color:var(--r-muted); font-weight:600; font-size:9px; }
.game-scope .rp-card .c-stat .s-val{ font-family:'Space Grotesk',sans-serif; font-weight:700; color:var(--r-ink); font-size:11px; }
.game-scope .rp-card .c-stat.hot{ background:#fff7ed; } .game-scope .rp-card .c-stat.hot .s-lbl{ color:var(--r-orange); } .game-scope .rp-card .c-stat.hot .s-val{ color:var(--r-orange); }
.game-scope .rp-card.win{ border-color:var(--r-green); box-shadow:0 0 0 3px rgba(22,163,74,.25); }
.game-scope .rp-card.lose{ border-color:var(--r-red); box-shadow:0 0 0 3px rgba(239,68,68,.2); opacity:.85; }
.game-scope .rp-card.dim{ opacity:.5; }
/* carta sola (CPU, recompensa del swap) y duelo de revelado: ancho fijo, centradas */
.game-scope .rp-cpu-zone .rp-card, .game-scope #sw-reward-card .rp-card{ width:140px; margin:0 auto; }
.game-scope .rp-versus .rp-card{ width:150px; flex:0 0 auto; }

/* reveal */
.game-scope .rp-reveal{ display:none; }
.game-scope .rp-reveal.show{ display:block; }
.game-scope .rp-versus{ display:flex; align-items:center; justify-content:center; gap:12px; }
.game-scope .rp-versus .vs{ font-family:'Space Grotesk',sans-serif; font-weight:700; color:var(--r-muted); font-size:16px; }
.game-scope .rp-verdict{ text-align:center; font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:22px; margin:12px 0 0; }
.game-scope .rp-verdict.win{ color:var(--r-green); } .game-scope .rp-verdict.lose{ color:var(--r-red); }

/* swap */
.game-scope #state-swap{ display:none; }
.game-scope .swap-card{ background:var(--r-surface); border-radius:16px; box-shadow:0 4px 16px rgba(15,23,42,.07); padding:22px 18px; }
.game-scope .swap-card h2{ font-family:'Space Grotesk',sans-serif; text-align:center; color:var(--r-green); font-size:22px; margin:0 0 2px; }
.game-scope .swap-card .sw-sub{ text-align:center; color:var(--r-muted); font-size:13px; margin-bottom:16px; }
.game-scope .sw-step{ font-weight:700; font-size:13.5px; color:var(--r-navy); margin:14px 0 8px; }
.game-scope .rp-card.drop-sel{ border-color:var(--r-red); box-shadow:0 0 0 3px rgba(239,68,68,.22); }
.game-scope .cpu-down{ display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.game-scope .cpu-down .dn{ aspect-ratio:3/4; border-radius:12px; background:linear-gradient(135deg,var(--r-navy),var(--r-navy2)); display:flex; align-items:center; justify-content:center;
    color:#fff; font-size:22px; cursor:pointer; border:2px solid transparent; -webkit-tap-highlight-color:transparent; transition:transform .08s, border-color .12s; }
.game-scope .cpu-down .dn:hover{ border-color:var(--r-gold); } .game-scope .cpu-down .dn:active{ transform:scale(.96); }
.game-scope #sw-peeked-card .rp-card{ width:140px; margin:0 auto; }
.game-scope .sw-keep{ display:block; margin:14px auto 0; border:2px solid var(--r-border); background:#fff; color:var(--r-muted); border-radius:10px; padding:10px 18px; font-weight:700; font-size:14px; cursor:pointer; }
.game-scope .sw-keep:active{ transform:scale(.98); }
.game-scope .sw-forced{ margin-top:14px; padding-top:12px; border-top:1px dashed var(--r-border); }
.game-scope .sw-forced .sf-head{ font-size:12px; font-weight:700; color:var(--r-muted); margin-bottom:8px; }
.game-scope .sw-forced .sf-pair{ display:flex; align-items:flex-start; justify-content:center; gap:8px; }
.game-scope .sw-forced .rp-card{ width:118px; margin:0; }
.game-scope .sw-forced .sf-out{ opacity:.65; } .game-scope .sw-forced .sf-arrow{ color:var(--r-muted); align-self:center; }
.game-scope .sw-forced .sf-tag{ display:block; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; margin-bottom:3px; }
.game-scope .sw-forced .sf-tag.out{ color:var(--r-red); } .game-scope .sw-forced .sf-tag.in{ color:var(--r-green); }
.game-scope .sw-reward{ text-align:center; }
.game-scope .sw-reward .rw-label{ font-weight:700; color:var(--r-green); margin-bottom:8px; }
.game-scope .sw-cont{ display:block; width:100%; max-width:300px; margin:16px auto 0; border:none; border-radius:11px; padding:13px; font-weight:700; font-size:15px; color:#fff; background:var(--r-navy2); cursor:pointer; }

/* over */
.game-scope #state-over{ display:none; }
.game-scope .over-card{ background:var(--r-surface); border-radius:16px; box-shadow:0 4px 16px rgba(15,23,42,.07); padding:26px 22px; text-align:center; }
.game-scope .over-card .res-msg{ font-weight:700; font-size:18px; margin-bottom:4px; }
.game-scope .over-card .res-score{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:64px; line-height:1; color:var(--r-orange); }
.game-scope .over-card .res-label{ font-size:15px; color:var(--r-muted); } .game-scope .over-card .res-sub{ font-size:13px; color:var(--r-muted); margin-top:6px; }
.game-scope .over-actions{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:16px; }
.game-scope .rp-btn{ border:none; border-radius:11px; padding:12px 18px; font-weight:700; font-size:15px; cursor:pointer; display:inline-flex; align-items:center; gap:8px; }
.game-scope .rp-btn.primary{ background:var(--r-navy2); color:#fff; } .game-scope .rp-btn.ghost{ background:#eef2f8; color:var(--r-navy); }
.game-scope .share-grid{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:14px; }
.game-scope .share-grid button{ width:46px; height:46px; border-radius:50%; border:none; color:#fff; font-size:18px; cursor:pointer; }
.game-scope .sh-x{background:#000}.game-scope .sh-wa{background:#25d366}.game-scope .sh-tg{background:#229ed9}.game-scope .sh-fb{background:#1877f2}.game-scope .sh-copy{background:#64748b}
.game-scope .share-hint{ font-size:12px; color:var(--r-muted); margin-top:8px; }

/* how-to modal */
.game-scope .rp-modal-back{ position:fixed; inset:0; background:rgba(15,23,42,.55); display:none; align-items:center; justify-content:center; z-index:9999; padding:14px; }
.game-scope .rp-modal-back.open{ display:flex; }
.game-scope .rp-modal{ background:#fff; border-radius:16px; width:100%; max-width:460px; max-height:86vh; overflow-y:auto; padding:22px; }
.game-scope .rp-modal h3{ margin:0 0 12px; color:var(--r-navy2); font-family:'Space Grotesk',sans-serif; }
.game-scope .rp-modal ol{ padding-left:20px; } .game-scope .rp-modal li{ font-size:14px; line-height:1.5; margin-bottom:8px; color:#334155; }
.game-scope .rp-modal .close-x{ float:right; font-size:24px; color:#94a3b8; cursor:pointer; border:none; background:none; line-height:1; }
.game-scope .howto-harder{ margin-top:14px; padding:12px 14px; background:#fff7ed; border:1px solid #fed7aa; border-radius:12px; }
.game-scope .howto-harder .hh-head{ font-weight:700; color:var(--r-orange-dk,#c2691f); font-size:13.5px; margin-bottom:6px; }
.game-scope .howto-harder ul{ margin:0; padding-left:18px; } .game-scope .howto-harder li{ font-size:13px; line-height:1.45; color:#475569; margin-bottom:4px; }
.game-scope .howto-harder .hh-foot{ margin:6px 0 0; font-size:12px; color:var(--r-muted); }
/* modal de "nueva regla" (aviso just-in-time) */
.game-scope .rule-modal{ max-width:380px; text-align:center; }
.game-scope .rule-modal .rule-ico{ font-size:46px; line-height:1; margin-bottom:6px; }
.game-scope .rule-modal h3{ color:var(--r-orange-dk,#c2691f); }
.game-scope .rule-modal p{ font-size:14.5px; line-height:1.5; color:#334155; margin:0 0 18px; }
.game-scope .rule-modal .rule-go{ border:none; border-radius:11px; padding:12px 22px; font-weight:700; font-size:15px; color:#fff; cursor:pointer; background:linear-gradient(135deg,var(--r-orange),#dd6b20); }
.game-scope .rule-modal .rule-go:active{ transform:scale(.98); }

/* offscreen share card */
.game-scope .share-card{ position:fixed; left:-20000px; top:0; width:1200px; height:675px; background:linear-gradient(135deg,#1e3a5f,#2c5282); color:#fff; font-family:'Space Grotesk',Roboto,sans-serif; padding:56px 64px; box-sizing:border-box; }
.game-scope .share-card .sc-top{ display:flex; align-items:center; gap:14px; font-size:30px; font-weight:700; } .game-scope .share-card .sc-top img{ width:48px; height:48px; }
.game-scope .share-card .sc-score{ font-size:150px; font-weight:700; line-height:1; margin-top:24px; color:#fdba74; }
.game-scope .share-card .sc-label{ font-size:30px; opacity:.9; margin-top:-4px; }
.game-scope .share-card .sc-grid{ font-size:44px; letter-spacing:4px; margin-top:24px; }
.game-scope .share-card .sc-cta{ position:absolute; bottom:54px; left:64px; right:64px; display:flex; justify-content:space-between; align-items:flex-end; }
.game-scope .share-card .sc-cta .l1{ font-size:34px; font-weight:700; } .game-scope .share-card .sc-cta .l2{ font-size:22px; opacity:.85; }

@media (max-width:560px){
    .game-scope #rp-app{ margin-top:10px; }
    .game-scope .rp-hand{ gap:4px; }
    .game-scope .rp-card .c-top{ padding:6px 3px 5px; gap:3px; } .game-scope .rp-card .c-em{ width:21px; height:21px; flex-basis:21px; }
    .game-scope .rp-card .c-top .c-name{ font-size:9px; height:22px; }
    .game-scope .rp-card .c-stats{ padding:3px 3px 5px; } .game-scope .rp-card .c-stat{ padding:1.5px 3px; }
    .game-scope .rp-card .c-stat .s-lbl{ font-size:8px; } .game-scope .rp-card .c-stat .s-val{ font-size:10px; }
    .game-scope .rp-versus .rp-card{ width:44%; max-width:150px; }
    .game-scope .rp-chip .lbl{ font-size:12px; } .game-scope .rp-chip .who{ font-size:10px; }
    .game-scope .over-card .res-score{ font-size:54px; }
}
