/**
 * smgr/css/pages/masomenos.css — estilos del mini-juego "Más o Menos"
 * portado al chrome "Foco". PLANTILLA para el resto de mini-juegos.
 *
 * Reglas del port:
 *   · El bloque :root con las variables --mm-* se deja SIN scope (custom props
 *     globales inofensivas; el juego las necesita).
 *   · body { background } del original pasa a .game-scope { background } para que
 *     el fondo inmersivo del juego cubra SOLO el área de juego, no toda la página
 *     (el chrome Foco sigue claro).
 *   · TODO el resto de selectores va prefijado con ".game-scope " para aislar el
 *     juego de los globales de rincon.css y viceversa.
 *   · Reset de aislamiento arriba: neutraliza los resets de rincon.css (img,
 *     button) que distorsionarían el juego.
 */

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

/* ===== Reset de aislamiento (contrarresta rincon.css dentro del juego) ===== */
.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(--mm-bg); }

.game-scope #mm-app { max-width: 860px; margin: 18px auto 40px; padding: 0 12px; font-family: Roboto, sans-serif; color: var(--mm-ink); }
/* La landing (hero + modos + clasificaciones) aprovecha todo el ancho; el juego y el
   resultado se mantienen centrados y enfocados, sin estirarse. */
.game-scope #state-game, .game-scope #state-over { max-width: 720px; margin-left: auto; margin-right: auto; }

/* lockup */
.game-scope .mm-lockup { display:inline-flex; align-items:center; gap:.4em; font-family:'Space Grotesk',system-ui,sans-serif; font-weight:700; }
.game-scope .mm-lockup img { width:1.15em; height:1.15em; vertical-align:middle; }
.game-scope .mm-lockup .w-mas { color:#bbf7d0; } .game-scope .mm-lockup .w-menos { color:#fecaca; }

/* ===== Landing ===== */
.game-scope .mm-landing { background:var(--mm-surface); border-radius:16px; overflow:hidden;
    box-shadow:0 4px 16px rgba(15,23,42,.07),0 1px 2px rgba(15,23,42,.04); }
.game-scope .mm-hero { background:linear-gradient(135deg,var(--mm-navy) 0%,var(--mm-navy2) 100%); color:#fff; padding:30px 24px 26px; text-align:center; position:relative; }
.game-scope .mm-hero .mm-lockup { font-size:clamp(1.9rem,6vw,2.6rem); }
.game-scope .mm-hero-lockup { height:clamp(58px,13vw,82px); width:auto; max-width:92%; }
.game-scope .mm-hero .sub { margin:14px auto 0; max-width:480px; opacity:.92; font-size:15px; line-height:1.45; }
.game-scope .mm-hero .challenge-badge { display:inline-block; background:var(--mm-gold); color:#1f2937; font-weight:700; font-size:12px; letter-spacing:.08em; padding:4px 12px; border-radius:999px; margin-bottom:10px; }
.game-scope .mm-hero .challenge-summary { font-family:'Space Grotesk',sans-serif; margin-top:6px; }
.game-scope .mm-hero .challenge-summary b { font-size:2.2rem; }
.game-scope .self-notice { margin:12px auto 0; max-width:480px; background:rgba(255,255,255,.12); border-radius:10px; padding:8px 12px; font-size:13px; }

.game-scope .mm-body { padding:22px; }
.game-scope .guest-block { margin:0 auto 18px; max-width:340px; text-align:left; }
.game-scope .guest-block label { font-size:13px; font-weight:700; color:var(--mm-muted); display:block; margin-bottom:4px; }
.game-scope .guest-block input { width:100%; padding:11px 13px; border:2px solid var(--mm-border); border-radius:10px; font-size:16px; }
.game-scope .guest-block input:focus { outline:none; border-color:var(--mm-navy2); }
.game-scope .guest-hint { font-size:12px; color:var(--mm-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 .mode-picker { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.game-scope .mode-card { background:#f8fafc; border:2px solid var(--mm-border); border-radius:14px; padding:18px 16px; text-align:left; cursor:pointer; transition:.15s; display:flex; flex-direction:column; gap:11px; }
.game-scope .mode-card:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(30,58,95,.12); background:#fff; }
.game-scope .mode-daily:hover { border-color:var(--mm-orange); } .game-scope .mode-libre:hover { border-color:var(--mm-navy2); }
.game-scope .mc-head { display:flex; align-items:center; gap:10px; font-weight:700; font-size:17px; color:var(--mm-ink); }
.game-scope .mc-ico { width:34px; height:34px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; font-size:18px; flex:0 0 34px; }
.game-scope .mode-daily .mc-ico { background:#fed7aa; color:#c2410c; }
.game-scope .mode-libre .mc-ico { background:#dbeafe; color:var(--mm-navy2); }
.game-scope .mc-desc { font-size:13.5px; color:#475569; line-height:1.45; }
.game-scope .mc-rec { font-size:12.5px; color:#475569; padding:6px 10px; background:#fff; border-radius:6px; border:1px dashed #cbd5e1; }
.game-scope .mc-rec strong { color:#c2410c; } .game-scope .mode-libre .mc-rec strong { color:var(--mm-navy2); }
.game-scope .mc-cta { margin-top:auto; align-self:stretch; text-align:center; font-weight:700; font-size:14px; color:#fff; padding:11px; border-radius:10px; }
.game-scope .mode-daily .mc-cta { background:linear-gradient(135deg,var(--mm-orange),#dd6b20); }
.game-scope .mode-libre .mc-cta { background:linear-gradient(135deg,var(--mm-navy2),var(--mm-navy)); }
.game-scope .mc-cta.ghost { background:#e2e8f0; color:var(--mm-navy); }
.game-scope .mc-cta i { margin-left:6px; }
.game-scope .mode-card:hover .mc-cta { filter:brightness(1.06); }
.game-scope .mode-card.done { background:#f1f5f9; border-color:#cbd5e1; }
.game-scope .mode-card.done .mc-ico { background:#dcfce7; color:var(--mm-mas); }
.game-scope .mode-card.highlight { border-color:var(--mm-navy2); box-shadow:0 4px 14px rgba(44,82,130,.14); }
.game-scope .vuelve-manana { font-size:13px; color:var(--mm-muted); margin-top:10px; }

.game-scope .mm-boards { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:18px; }
.game-scope .board { background:#f8fafc; border:1px solid var(--mm-border); border-radius:12px; padding:12px 14px; }
.game-scope .board h4 { margin:0 0 2px; font-size:13px; font-weight:700; color:var(--mm-navy); text-transform:uppercase; letter-spacing:.04em; }
.game-scope .board-sub { font-size:11px; color:var(--mm-muted); margin:0 0 8px; }
.game-scope .board .nm-sub { color:var(--mm-muted); font-weight:400; }
.game-scope .board-all { display:inline-block; margin-top:9px; font-size:12.5px; font-weight:700; color:var(--mm-navy2); text-decoration:none; }
.game-scope .board-all:hover { text-decoration:underline; } .game-scope .board-all i { font-size:11px; margin-left:3px; }
.game-scope .mm-hub { text-align:center; margin-top:16px; }
.game-scope .mm-hub a { color:var(--mm-muted); font-weight:600; font-size:13.5px; text-decoration:none; }
.game-scope .mm-hub a:hover { text-decoration:underline; } .game-scope .mm-hub i { margin-right:5px; }
.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:3px 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(--mm-muted); }
.game-scope .board li .st { font-weight:700; color:var(--mm-mas); font-family:'Space Grotesk',sans-serif; }
.game-scope .board .empty { font-size:12px; color:var(--mm-muted); padding:6px 0; }

/* ===== Game ===== */
.game-scope #state-game { display:none; }
.game-scope .mm-topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.game-scope .mm-streak { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:18px; }
.game-scope .mm-streak b { font-size:26px; color:var(--mm-mas); }
.game-scope .mm-modepill { font-size:12px; font-weight:700; color:#fff; background:var(--mm-navy2); padding:4px 11px; border-radius:999px; }
.game-scope .mm-modepill.daily { background:var(--mm-gold); color:#1f2937; }
.game-scope .mm-best-mini { font-size:12px; color:var(--mm-muted); }

.game-scope .mm-timer { height:7px; background:#e2e8f0; border-radius:999px; overflow:hidden; margin:2px 0 10px; }
.game-scope .timer-bar { height:100%; width:100%; background:var(--mm-mas); border-radius:999px; }
.game-scope .timer-bar.low { background:var(--mm-menos); }
.game-scope .mm-question { text-align:center; font-size:15px; color:var(--mm-muted); margin:2px 0 10px; }
.game-scope .mm-stat-label { font-weight:700; color:var(--mm-navy); }

.game-scope .mm-cards { display:flex; flex-direction:column; gap:10px; position:relative; }
.game-scope .pcard { background:var(--mm-surface); border:2px solid var(--mm-border); border-radius:16px; padding:16px; display:flex; align-items:center; gap:14px; box-shadow:0 2px 8px rgba(15,23,42,.05); }
.game-scope .pcard .shield { width:56px; height:56px; object-fit:contain; flex:0 0 56px; background:#fff; border-radius:8px; }
.game-scope .pcard .who { flex:1 1 auto; min-width:0; }
.game-scope .pcard .who .nm { font-weight:700; font-size:18px; line-height:1.15; }
.game-scope .pcard .who .meta { font-size:13px; color:var(--mm-muted); margin-top:2px; }
.game-scope .pcard .who .badge { display:inline-block; font-size:11px; font-weight:700; padding:1px 7px; border-radius:6px; margin-right:6px; }
.game-scope .badge.B{background:#dbeafe;color:#1e40af}.game-scope .badge.A{background:#dcfce7;color:#166534}.game-scope .badge.P{background:#fee2e2;color:#991b1b}
.game-scope .pcard .valwrap { flex:0 0 auto; text-align:right; min-width:84px; }
.game-scope .pcard .val { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:34px; line-height:1; color:var(--mm-navy); }
.game-scope .pcard .val.q { color:var(--mm-muted); }
.game-scope .pcard .unit { font-size:11px; color:var(--mm-muted); text-transform:uppercase; letter-spacing:.03em; }
.game-scope .pcard.anchor { border-color:var(--mm-navy2); }
.game-scope .pcard.reveal-ok { border-color:var(--mm-mas); box-shadow:0 0 0 3px rgba(22,163,74,.18); }
.game-scope .pcard.reveal-bad { border-color:var(--mm-menos); box-shadow:0 0 0 3px rgba(239,68,68,.18); }

.game-scope .mm-vs { text-align:center; font-family:'Space Grotesk',sans-serif; font-weight:700; color:var(--mm-muted); font-size:13px; letter-spacing:.1em; margin:-2px 0; }

.game-scope .mm-buttons { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.game-scope .btn-guess { border:none; border-radius:14px; padding:16px; font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:20px; color:#fff; cursor:pointer; transition:.12s; display:flex; align-items:center; justify-content:center; gap:8px; }
.game-scope .btn-guess:active { transform:scale(.97); }
.game-scope .btn-guess.mas { background:var(--mm-mas); } .game-scope .btn-guess.mas:hover{background:#15803d;}
.game-scope .btn-guess.menos { background:var(--mm-menos); } .game-scope .btn-guess.menos:hover{background:#dc2626;}
.game-scope .btn-guess:disabled { opacity:.55; cursor:default; }
.game-scope .btn-guess .ar { font-size:24px; }

/* ===== Game over ===== */
.game-scope #state-over { display:none; }
.game-scope .over-card { background:var(--mm-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-streak { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:64px; line-height:1; color:var(--mm-mas); }
.game-scope .over-card .res-label { font-size:15px; color:var(--mm-muted); margin-top:2px; }
.game-scope .over-card .res-grid { font-size:22px; letter-spacing:2px; margin:14px 0; word-break:break-word; }
.game-scope .over-card .res-msg { font-weight:700; font-size:18px; margin-bottom:4px; }
.game-scope .over-card .res-fail { font-size:14px; color:var(--mm-muted); margin-top:8px; }
.game-scope .over-card .res-fail b { color:var(--mm-ink); }
.game-scope .over-actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:18px; }
.game-scope .mm-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 .mm-btn.primary { background:var(--mm-navy2); color:#fff; }
.game-scope .mm-btn.ghost { background:#eef2f8; color:var(--mm-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(--mm-muted); margin-top:8px; }

/* ===== Offscreen share card (1200x675) ===== */
.game-scope .share-card { position:fixed; left:-20000px; top:0; width:1200px; height:675px; background:linear-gradient(135deg,#1e3a5f 0%,#2c5282 100%); 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:44px; height:44px; }
.game-scope .share-card .sc-top .w-mas{color:#bbf7d0} .game-scope .share-card .sc-top .w-menos{color:#fecaca}
.game-scope .share-card .sc-mode { margin-left:auto; font-size:18px; background:rgba(255,255,255,.15); padding:6px 16px; border-radius:999px; }
.game-scope .share-card .sc-streak { font-size:170px; font-weight:700; line-height:1; margin-top:40px; color:#86efac; }
.game-scope .share-card .sc-label { font-size:30px; opacity:.9; margin-top:-6px; }
.game-scope .share-card .sc-grid { font-size:40px; letter-spacing:6px; margin-top:26px; }
.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 .mm-boards { grid-template-columns:1fr; }
    /* Como en 34-0: los dos modos siguen lado a lado en móvil (no apilados). */
    .game-scope .mode-picker { gap:10px; }
    .game-scope .mode-card { padding:14px 11px; gap:9px; }
    .game-scope .mc-head { font-size:15px; gap:8px; }
    .game-scope .mc-ico { width:30px; height:30px; flex-basis:30px; font-size:15px; }
    .game-scope .mc-desc { font-size:12.5px; }
    .game-scope .mc-rec { font-size:11.5px; padding:5px 8px; }
    .game-scope .mc-cta { font-size:13px; padding:10px; }
    .game-scope .pcard .val { font-size:30px; } .game-scope .pcard .shield { width:48px; height:48px; flex-basis:48px; }
    .game-scope .pcard .who .nm { font-size:16px; }
    .game-scope .over-card .res-streak { font-size:54px; }
}
