/**
 * smgr/css/pages/conexiones.css — estilos de "Conexiones" 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 { --g-navy:#1e3a5f; --g-navy2:#2c5282; --g-orange:#ed8936; --g-ok:#16a34a; --g-bad:#ef4444;
    --g-bg:#eef2f8; --g-surface:#fff; --g-border:#e2e8f0; --g-muted:#64748b; --g-ink:#0f172a;
    --cx-c0:#e9b949; --cx-c1:#5aa469; --cx-c2:#5a8fd6; --cx-c3:#9d6fc7; }

/* ===== 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(--g-bg); }

.game-scope #cx-app { max-width: 860px; margin: 16px auto 40px; padding: 0 12px; font-family: Roboto, sans-serif; color: var(--g-ink); }
.game-scope #state-game, .game-scope #state-over { max-width: 600px; margin-left: auto; margin-right: auto; }

/* hero */
.game-scope .cx-hero { background:linear-gradient(135deg,var(--g-navy),var(--g-navy2)); color:#fff; border-radius:16px; padding:26px 22px; text-align:center; position:relative; overflow:hidden; box-shadow:0 4px 16px rgba(15,23,42,.08); }
.game-scope .cx-hero .wm { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:clamp(2rem,7vw,2.7rem); letter-spacing:-.02em; line-height:1; }
.game-scope .cx-hero .wm b { color:var(--g-orange); font-weight:700; }
.game-scope .cx-hero .hero-lockup { display:block; height:74px; max-width:92%; margin:0 auto; }
.game-scope .cx-hero .sub { margin:12px auto 0; max-width:480px; opacity:.92; font-size:14.5px; line-height:1.45; }
.game-scope .challenge-badge { display:inline-block; background:var(--g-orange); color:#1f2937; font-weight:700; font-size:12px; letter-spacing:.06em; padding:4px 12px; border-radius:999px; margin-bottom:8px; }

/* landing (mismo patrón que la familia) */
.game-scope .cx-card { background:var(--g-surface); border-radius:16px; box-shadow:0 4px 16px rgba(15,23,42,.07); padding:20px; }
.game-scope .cx-body { margin-top:14px; }
.game-scope .guest-block { margin:0 auto 16px; max-width:340px; }
.game-scope .guest-block label { font-size:13px; font-weight:700; color:var(--g-muted); display:block; margin-bottom:4px; }
.game-scope .guest-block input { width:100%; padding:11px 13px; border:2px solid var(--g-border); border-radius:10px; font-size:16px; }
.game-scope .guest-block input:focus { outline:none; border-color:var(--g-navy2); }
.game-scope .guest-hint { font-size:12px; color:var(--g-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(--g-border); border-radius:14px; padding:16px; cursor:pointer; display:flex; flex-direction:column; gap:9px; transition:.15s; }
.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(--g-orange); } .game-scope .mode-libre:hover { border-color:var(--g-navy2); }
.game-scope .mc-head { display:flex; align-items:center; gap:10px; font-weight:700; font-size:16px; }
.game-scope .mc-ico { width:32px; height:32px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; font-size:16px; flex:0 0 32px; }
.game-scope .mode-daily .mc-ico { background:#fed7aa; color:#c2410c; } .game-scope .mode-libre .mc-ico { background:#dbeafe; color:var(--g-navy2); }
.game-scope .mc-desc { font-size:12.5px; color:#475569; line-height:1.4; }
.game-scope .mc-rec { font-size:12px; color:#475569; padding:5px 9px; background:#fff; border-radius:6px; border:1px dashed #cbd5e1; }
.game-scope .mc-cta { margin-top:auto; align-self:stretch; text-align:center; font-weight:700; font-size:13.5px; color:#fff; padding:10px; border-radius:10px; }
.game-scope .mode-daily .mc-cta { background:linear-gradient(135deg,var(--g-orange),#dd6b20); } .game-scope .mode-libre .mc-cta { background:linear-gradient(135deg,var(--g-navy2),var(--g-navy)); }
.game-scope .mode-card.done { background:#f1f5f9; border-color:#cbd5e1; } .game-scope .mode-card.done .mc-ico { background:#dcfce7; color:var(--g-ok); }
.game-scope .mode-card.highlight { border-color:var(--g-navy2); box-shadow:0 4px 14px rgba(44,82,130,.14); }
.game-scope .mc-cta.ghost { background:#e2e8f0; color:var(--g-navy); }
.game-scope .cx-hub { text-align:center; margin-top:16px; } .game-scope .cx-hub a { color:var(--g-muted); font-weight:600; font-size:13px; text-decoration:none; } .game-scope .cx-hub a:hover { text-decoration:underline; }
.game-scope .cx-boards { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:18px; }
.game-scope .board { background:#f8fafc; border:1px solid var(--g-border); border-radius:12px; padding:12px 14px; }
.game-scope .board h4 { margin:0 0 2px; font-size:13px; font-weight:700; color:var(--g-navy); text-transform:uppercase; letter-spacing:.04em; }
.game-scope .board-sub { font-size:11px; color:var(--g-muted); margin:0 0 8px; }
.game-scope .board .nm-sub { color:var(--g-muted); font-weight:400; }
.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; gap:8px; 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 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.game-scope .board li .nm::before { content:counter(r) ". "; color:var(--g-muted); }
.game-scope .board li .st { font-weight:700; color:var(--g-ok); font-family:'Space Grotesk',sans-serif; white-space:nowrap; }
.game-scope .board .empty { font-size:12px; color:var(--g-muted); padding:6px 0; }
.game-scope .board-all { display:inline-block; margin-top:9px; font-size:12.5px; font-weight:700; color:var(--g-navy2); text-decoration:none; }
.game-scope .board-all:hover { text-decoration:underline; } .game-scope .board-all i { font-size:11px; margin-left:3px; }
@media (max-width:560px){ .game-scope .cx-boards { grid-template-columns:1fr; } }

/* ===== game ===== */
.game-scope #state-game { display:none; }
.game-scope .cx-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; gap:8px; }
.game-scope .cx-top .mode-pill { font-size:12px; font-weight:700; color:#fff; background:var(--g-navy2); padding:4px 11px; border-radius:999px; }
.game-scope .cx-top .mode-pill.daily { background:var(--g-orange); color:#1f2937; }
.game-scope .cx-top .left { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:15px; color:var(--g-navy); }
.game-scope .cx-instr { text-align:center; font-size:13px; color:var(--g-muted); margin:2px 0 12px; }
.game-scope .cx-solved { display:flex; flex-direction:column; gap:8px; margin-bottom:8px; }
.game-scope .cx-bar { border-radius:10px; padding:8px 10px; text-align:center; color:#1f2937; }
.game-scope .cx-bar .bl { font-weight:700; font-size:13.5px; font-family:'Space Grotesk',sans-serif; }
.game-scope .cx-bar .bn { font-size:12.5px; margin-top:1px; }
.game-scope .cx-c0 { background:var(--cx-c0); } .game-scope .cx-c1 { background:var(--cx-c1); } .game-scope .cx-c2 { background:var(--cx-c2); } .game-scope .cx-c3 { background:var(--cx-c3); }
.game-scope .cx-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.game-scope .cx-tile { background:#fff; border:1px solid var(--g-border); border-radius:10px; min-height:64px; display:flex; align-items:center; justify-content:center; text-align:center; padding:4px 5px; font-size:12.5px; font-weight:600; line-height:1.12; cursor:pointer; user-select:none; word-break:break-word; box-shadow:0 1px 3px rgba(15,23,42,.05); transition:transform .08s, background .12s; }
.game-scope .cx-tile:active { transform:scale(.96); }
.game-scope .cx-tile.sel { background:var(--g-navy); color:#fff; border-color:var(--g-navy); }
.game-scope .cx-tile.shake { animation:cxshake .4s; }
@keyframes cxshake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }
.game-scope .cx-mist { display:flex; align-items:center; justify-content:center; gap:8px; margin:14px 0 6px; font-size:13px; color:var(--g-muted); }
.game-scope .cx-dots { display:inline-flex; gap:6px; }
.game-scope .cx-dot { width:13px; height:13px; border-radius:50%; background:var(--g-navy2); }
.game-scope .cx-dot.used { background:#cbd5e1; }
.game-scope .cx-ctrls { display:flex; gap:9px; justify-content:center; margin-top:10px; flex-wrap:wrap; }
.game-scope .cx-btn2 { border:1.5px solid var(--g-navy); background:#fff; color:var(--g-navy); border-radius:999px; padding:9px 18px; font-weight:700; font-size:14px; cursor:pointer; }
.game-scope .cx-btn2:disabled { opacity:.4; cursor:default; }
.game-scope .cx-btn2.solid { background:var(--g-navy); color:#fff; }
.game-scope .cx-btn2.solid:disabled { background:#94a3b8; border-color:#94a3b8; color:#fff; }
.game-scope .cx-toast { position:fixed; left:50%; transform:translateX(-50%); top:70px; background:#1f2937; color:#fff; padding:9px 18px; border-radius:999px; font-weight:700; font-size:14px; z-index:9999; opacity:0; transition:opacity .2s; pointer-events:none; }
.game-scope .cx-toast.show { opacity:1; }
.game-scope .cx-surrender { display:block; margin:14px auto 0; background:#eef2f8; color:var(--g-navy); border:none; border-radius:10px; padding:8px 16px; font-weight:700; font-size:13px; cursor:pointer; }

/* ===== over ===== */
.game-scope #state-over { display:none; }
.game-scope .over-card { background:var(--g-surface); border-radius:16px; box-shadow:0 4px 16px rgba(15,23,42,.07); padding:24px 20px; text-align:center; }
.game-scope .over-card .msg { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:24px; }
.game-scope .over-card .res { font-size:14px; color:var(--g-muted); margin-top:4px; }
.game-scope .cx-over-sol { display:flex; flex-direction:column; gap:7px; margin:16px 0; }
.game-scope .over-emoji { font-size:24px; line-height:1.22; letter-spacing:2px; margin:6px 0 14px; white-space:pre; font-family:'Apple Color Emoji','Segoe UI Emoji',sans-serif; }
.game-scope .over-actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:6px; }
.game-scope .cx-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 .cx-btn.primary { background:var(--g-navy2); color:#fff; } .game-scope .cx-btn.ghost { background:#eef2f8; color:var(--g-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(--g-muted); margin-top:8px; }
.game-scope .vuelve { font-size:13px; color:var(--g-muted); margin-top:10px; display:none; }

/* share card offscreen */
.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:54px 64px; box-sizing:border-box; }
.game-scope .share-card .sc-top { font-size:34px; font-weight:700; } .game-scope .share-card .sc-top b { color:#f6ad55; }
.game-scope .share-card .sc-mark { height:60px; vertical-align:middle; margin-right:16px; } .game-scope .share-card .sc-wm { vertical-align:middle; }
.game-scope .share-card .sc-mode { float:right; font-size:18px; background:rgba(255,255,255,.15); padding:6px 16px; border-radius:999px; }
.game-scope .share-card .sc-tag { display:block; opacity:.85; font-size:22px; font-weight:500; margin-top:8px; }
.game-scope .share-card .sc-emoji { font-size:54px; line-height:1.2; letter-spacing:8px; margin-top:34px; white-space:pre; font-family:'Apple Color Emoji','Segoe UI Emoji',sans-serif; }
.game-scope .share-card .sc-score { font-size:38px; margin-top:26px; } .game-scope .share-card .sc-score b { color:#86efac; }
.game-scope .share-card .sc-cta { position:absolute; bottom:48px; left:64px; right:64px; display:flex; justify-content:space-between; align-items:flex-end; }
.game-scope .share-card .sc-cta .l1 { font-size:28px; font-weight:700; } .game-scope .share-card .sc-cta .l2 { font-size:21px; opacity:.85; }
