/**
 * smgr/css/pages/trotamundos.css — estilos del mini-juego "Trotamundos"
 * portado al chrome "Foco". Mismo recipe que masomenos.css:
 *   · :root con las variables --g-* SIN scope (custom props globales).
 *   · body { background } del original → .game-scope { background }.
 *   · TODO el resto de selectores prefijado con ".game-scope " para aislar el
 *     juego de rincon.css y viceversa.
 *   · Reset de aislamiento arriba (img, button).
 *   · Reglas de menú/logo del sitio clásico (.logo-main) eliminadas.
 *   Los escudos de la ruta llegan del backend como rutas absolutas
 *   (/imgs/202526/{COD}_b.gif), así que no requieren reescritura aquí.
 */

/* ===== 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; }

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

.game-scope #tr-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: 640px; margin-left: auto; margin-right: auto; }

/* hero */
.game-scope .tr-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 .tr-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 .tr-hero .wm b { color:var(--g-orange); font-weight:700; }
.game-scope .tr-hero .hero-lockup { display:block; height:74px; max-width:92%; margin:0 auto; }
.game-scope .tr-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 */
.game-scope .tr-card { background:var(--g-surface); border-radius:16px; box-shadow:0 4px 16px rgba(15,23,42,.07); padding:20px; }
.game-scope .tr-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 .tr-hub { text-align:center; margin-top:16px; } .game-scope .tr-hub a { color:var(--g-muted); font-weight:600; font-size:13px; text-decoration:none; } .game-scope .tr-hub a:hover { text-decoration:underline; }

/* landing leaderboards */
.game-scope .tr-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 .tr-boards { grid-template-columns:1fr; } }

/* ===== game ===== */
.game-scope #state-game { display:none; }
.game-scope .tr-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:8px; }
.game-scope .tr-top .mode-pill { font-size:12px; font-weight:700; color:#fff; background:var(--g-navy2); padding:4px 11px; border-radius:999px; }
.game-scope .tr-top .mode-pill.daily { background:var(--g-orange); color:#1f2937; }
.game-scope .tr-top .left { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:15px; }
.game-scope .tr-top .left b { font-size:22px; color:var(--g-navy2); }
.game-scope .tr-guess-btn { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; background:linear-gradient(135deg,var(--g-navy2),var(--g-navy)); color:#fff; border:none; border-radius:12px; padding:14px; font-weight:700; font-size:16px; cursor:pointer; margin-bottom:14px; }
.game-scope .tr-guess-btn:disabled { opacity:.5; cursor:default; }

/* la ruta (timeline de escudos) */
.game-scope .tr-trail-card { background:var(--g-surface); border:1px solid var(--g-border); border-radius:14px; padding:16px 16px 8px; box-shadow:0 2px 10px rgba(15,23,42,.05); }
.game-scope .tr-trail-head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:6px; }
.game-scope .tr-trail-head .th { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:15px; color:var(--g-navy); }
.game-scope .tr-trail-head .ts { font-size:12px; color:var(--g-muted); }
.game-scope .tr-trail { position:relative; margin:6px 0 4px; }
.game-scope .tr-trail::before { content:''; position:absolute; left:25px; top:14px; bottom:14px; width:2px; background:#e2e8f0; }
.game-scope .tr-stop { position:relative; display:flex; align-items:center; gap:14px; padding:7px 0; }
.game-scope .tr-stop .dot { flex:0 0 28px; width:28px; height:28px; border-radius:50%; background:#fff; border:2px solid #cbd5e1; color:var(--g-muted); font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center; z-index:1; font-family:'Space Grotesk',sans-serif; }
.game-scope .tr-stop.filled .dot { border-color:var(--g-navy2); color:var(--g-navy2); }
.game-scope .tr-shield { flex:0 0 60px; width:60px; height:60px; border-radius:11px; display:flex; align-items:center; justify-content:center; }
.game-scope .tr-shield.full { background:#fff; border:1px solid var(--g-border); box-shadow:0 1px 4px rgba(15,23,42,.06); }
.game-scope .tr-shield.full img { width:46px; height:46px; object-fit:contain; }
.game-scope .tr-shield.blank { background:#eef2f8; border:2px dashed #cbd5e1; color:#94a3b8; font-size:26px; font-weight:700; line-height:1; }
.game-scope .tr-stop .lbl { font-size:12px; color:var(--g-muted); }
.game-scope .tr-stop.just-in { animation:trpop .35s ease; }
@keyframes trpop { from { transform:scale(.7); opacity:0; } to { transform:scale(1); opacity:1; } }

.game-scope .tr-tried { margin:12px 2px 0; display:none; }
.game-scope .tr-tried .tt-h { font-size:12px; font-weight:700; color:var(--g-muted); margin-bottom:5px; }
.game-scope .tr-chips { display:flex; flex-wrap:wrap; gap:6px; }
.game-scope .tr-chip { font-size:12.5px; font-weight:600; background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; border-radius:999px; padding:3px 10px; }
.game-scope .tr-chip i { font-size:10px; margin-right:3px; opacity:.8; }
.game-scope .tr-empty-hint { text-align:center; color:var(--g-muted); font-size:12.5px; line-height:1.45; padding:14px 4px 6px; }
.game-scope .tr-surrender { display:block; margin:14px auto 0; background:#eef2f8; color:var(--g-navy); border:none; border-radius:10px; padding:9px 16px; font-weight:700; font-size:13.5px; cursor:pointer; }

/* search modal (móvil: anclado arriba + cap visualViewport) */
.game-scope .tr-search-back { position:fixed; inset:0; background:rgba(15,23,42,.5); display:none; align-items:flex-start; justify-content:center; z-index:9999; }
.game-scope .tr-search-back.tr-open { display:flex; }
@media (min-width:560px){ .game-scope .tr-search-back.tr-open { align-items:center; } }
.game-scope .tr-search { background:#fff; width:100%; max-width:520px; border-radius:0 0 16px 16px; max-height:80vh; display:flex; flex-direction:column; }
@media (min-width:560px){ .game-scope .tr-search { border-radius:16px; } }
.game-scope .tr-search-head { padding:14px 16px; border-bottom:1px solid var(--g-border); }
.game-scope .tr-search-crit { font-size:13px; color:var(--g-muted); }
.game-scope .tr-search-crit b { color:var(--g-navy); }
.game-scope .tr-search-head input { width:100%; margin-top:8px; padding:11px 13px; border:2px solid var(--g-border); border-radius:10px; font-size:16px; }
.game-scope .tr-search-head input:focus { outline:none; border-color:var(--g-navy2); }
.game-scope .tr-search-close { float:right; background:none; border:none; font-size:22px; color:#94a3b8; cursor:pointer; line-height:1; }
.game-scope .tr-results { overflow-y:auto; padding:6px 8px 14px; min-height:0; -webkit-overflow-scrolling:touch; }
.game-scope .tr-result { display:flex; align-items:center; gap:10px; padding:10px 10px; border-bottom:1px solid #f1f5f9; cursor:pointer; }
.game-scope .tr-result:hover { background:#f7fafc; }
.game-scope .tr-result .rn { font-weight:600; font-size:14.5px; }
.game-scope .tr-search-msg { padding:14px; text-align:center; color:#94a3b8; font-size:13px; }
.game-scope .tr-toast { padding:8px 14px; margin:0 12px; background:#fef3c7; color:#92400e; border-radius:8px; font-size:13px; font-weight:600; }

/* ===== 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 .tr-reveal { background:#f8fafc; border:1px solid var(--g-border); border-radius:12px; padding:14px 16px; margin:16px 0; }
.game-scope .tr-reveal .rv-nom { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:20px; line-height:1.1; }
.game-scope .tr-reveal .rv-meta { font-size:12.5px; color:var(--g-muted); margin-top:3px; }
.game-scope .tr-reveal .rv-route { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; margin-top:12px; }
.game-scope .tr-reveal .rv-route img { width:38px; height:38px; object-fit:contain; background:#fff; border:1px solid var(--g-border); border-radius:8px; padding:2px; }
.game-scope .tr-reveal .rv-route .arr { color:#cbd5e1; font-size:12px; }
.game-scope .over-emoji { font-size:26px; line-height:1.25; letter-spacing:3px; margin:8px 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 .tr-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 .tr-btn.primary { background:var(--g-navy2); color:#fff; } .game-scope .tr-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:64px; line-height:1.18; letter-spacing:10px; margin-top:40px; white-space:pre; font-family:'Apple Color Emoji','Segoe UI Emoji',sans-serif; }
.game-scope .share-card .sc-score { font-size:40px; margin-top:30px; } .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; }
