/* =========================================================
   GAMBETAZO · estilos
   Minimalista: una tipografía, un color de acento, líneas finas.
   ========================================================= */

:root {
  --bg: #f5f5f1;
  --surface: #ffffff;
  --surface-2: #efefe9;
  --surface-3: #e6e6df;
  --ink: #121212;
  --ink-2: #4a4a46;
  --muted: #8b8b84;
  --line: #e2e2da;
  --line-2: #d2d2c9;
  --accent: #10a45a;
  --accent-ink: #ffffff;
  --accent-soft: #e2f4ea;
  --good: #129b52;
  --good-soft: #dcf3e5;
  --warn: #c99700;
  --warn-soft: #fbf0c8;
  --bad: #d7332c;
  --bad-soft: #fbe3e1;
  --g1: #f3d36b;
  --g2: #9ed69a;
  --g3: #9dc3f2;
  --g4: #c9a8f0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0e0d;
    --surface: #151715;
    --surface-2: #1c1f1c;
    --surface-3: #242824;
    --ink: #f0f0ec;
    --ink-2: #c3c3bc;
    --muted: #80837d;
    --line: #262a26;
    --line-2: #343934;
    --accent: #2bd17a;
    --accent-ink: #06170d;
    --accent-soft: #123222;
    --good: #2bd17a;
    --good-soft: #123222;
    --warn: #e7b923;
    --warn-soft: #362c0c;
    --bad: #f0605a;
    --bad-soft: #3a1614;
    --g1: #b89a33;
    --g2: #4f9a4b;
    --g3: #4b7fbf;
    --g4: #8a62bd;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d0e0d;
  --surface: #151715;
  --surface-2: #1c1f1c;
  --surface-3: #242824;
  --ink: #f0f0ec;
  --ink-2: #c3c3bc;
  --muted: #80837d;
  --line: #262a26;
  --line-2: #343934;
  --accent: #2bd17a;
  --accent-ink: #06170d;
  --accent-soft: #123222;
  --good: #2bd17a;
  --good-soft: #123222;
  --warn: #e7b923;
  --warn-soft: #362c0c;
  --bad: #f0605a;
  --bad-soft: #3a1614;
  --g1: #b89a33;
  --g2: #4f9a4b;
  --g3: #4b7fbf;
  --g4: #8a62bd;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 760px; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; font-weight: 800; letter-spacing: -0.03em; font-size: 19px;
}
.logo-mark {
  width: 26px; height: 26px; border-radius: 8px; background: var(--ink);
  display: grid; place-items: center; flex: none;
}
.logo-mark svg { width: 16px; height: 16px; color: var(--bg); }
.logo small { font-weight: 500; color: var(--muted); font-size: 13px; letter-spacing: 0; margin-left: 2px; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2);
  text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.games-menu { position: relative; }
.games-menu-list {
  position: absolute; right: 0; top: 44px; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  display: none;
}
.games-menu.open .games-menu-list { display: block; }
.games-menu-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 9px; text-decoration: none; font-weight: 500;
}
.games-menu-list a:hover, .games-menu-list a[aria-current="page"] { background: var(--surface-2); }
.games-menu-list a span { color: var(--muted); font-size: 12px; font-weight: 500; }
.games-menu-list a span.new { color: var(--accent); font-weight: 700; }

/* ---------- Botones y controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform .08s ease, background .15s ease, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

.seg {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  background: var(--surface-2); border-radius: 12px;
}
.seg button {
  border: 0; background: transparent; height: 32px; padding: 0 13px; border-radius: 9px;
  font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 600;
  white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }

.input {
  width: 100%; height: 50px; padding: 0 16px 0 44px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); }
.input::placeholder { color: var(--muted); }
.search { position: relative; width: 100%; }
.search > svg { position: absolute; left: 15px; top: 15px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search.disabled { opacity: .5; pointer-events: none; }

/* Autocompletado */
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  list-style: none; margin: 0; padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  max-height: 336px; overflow: auto; display: none;
}
.ac-list.up { top: auto; bottom: calc(100% + 6px); }
.ac-list.open { display: block; }
.ac-list li {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer;
  font-weight: 500;
}
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--surface-2); }
.ac-list li.used { opacity: .45; }
.ac-list li small { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ac-list li small .flag { display: inline-block; vertical-align: -2px; }
.ac-empty { padding: 10px; color: var(--muted); font-size: 14px; }

/* ---------- Avatares, escudos y banderas ---------- */
.av {
  position: relative; flex: none; overflow: hidden; border-radius: 50%;
  background: var(--surface-3); display: grid; place-items: center;
  width: 44px; height: 44px;
}
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; opacity: 0; transition: opacity .25s ease; }
.av.has-img img { opacity: 1; }
.av-ini { font-weight: 700; color: var(--muted); font-size: 14px; letter-spacing: -0.02em; }
.av.xs { width: 26px; height: 26px; }
.av.xs .av-ini { font-size: 10px; }
.av.sm { width: 34px; height: 34px; }
.av.sm .av-ini { font-size: 12px; }
.av.lg { width: 72px; height: 72px; }
.av.lg .av-ini { font-size: 22px; }
.av.xl { width: 132px; height: 132px; }
.av.xl .av-ini { font-size: 38px; }
.av.sq { border-radius: 14px; }

.crest {
  position: relative; width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line);
  display: grid; place-items: center; color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: -0.02em;
}
.crest img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; opacity: 0; transition: opacity .2s; }
.crest.has-img { background: #fff; }
.crest.has-img img { opacity: 1; }
.crest.has-img .crest-ini { visibility: hidden; }
.crest.sm { width: 26px; height: 26px; font-size: 8px; }
.crest.lg { width: 56px; height: 56px; font-size: 14px; }
.crest.xl { width: 120px; height: 120px; font-size: 30px; }
.flag { width: 36px; height: 24px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); background: var(--surface-3); flex: none; }
.flag.sm { width: 21px; height: 14px; border-radius: 3px; }
.flag.lg { width: 54px; height: 36px; border-radius: 6px; }
.trophy {
  position: relative; width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--warn-soft); color: var(--warn); display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line);
}
.trophy img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.trophy svg { width: 22px; height: 22px; }
.trophy.sm { width: 26px; height: 26px; }
.trophy.lg { width: 56px; height: 56px; }
.pos-ic {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 11px;
}
.pos-ic.sm { width: 26px; height: 26px; font-size: 8.5px; }
.pos-ic.lg { width: 56px; height: 56px; font-size: 14px; }

/* ---------- Home ---------- */
.hero { padding: 56px 0 28px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -0.045em; max-width: 12ch; }
.hero p { margin-top: 14px; color: var(--ink-2); font-size: 17px; max-width: 52ch; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 14px; }
.section-title h2 { font-size: 20px; font-weight: 700; }

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.game-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.game-card .thumb { aspect-ratio: 16 / 10; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.game-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-card h3 { font-size: 17px; font-weight: 700; }
.game-card p { color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.game-card .foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; }
.game-card .play { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.game-card .play svg { width: 16px; height: 16px; transition: transform .18s; }
.game-card:hover .play svg { transform: translateX(3px); }

.faq { margin: 48px 0 24px; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 500; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 0 16px; color: var(--ink-2); }

.footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0 36px; color: var(--muted); font-size: 13px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Mini previsualizaciones ---------- */
.pv { width: 100%; height: 100%; display: grid; place-items: center; padding: 14px; }
.pv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 62%; max-width: 190px; }
.pv-grid > div { aspect-ratio: 1; border-radius: 6px; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.pv-grid > div.h { background: transparent; }
.pv-grid .av { width: 100%; height: 100%; border-radius: 6px; }
.pv-grid .crest { width: 74%; height: 74%; font-size: 7px; }
.pv-bingo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 66%; max-width: 200px; }
.pv-bingo > div { aspect-ratio: 1; border-radius: 6px; background: var(--surface); display: grid; place-items: center; }
.pv-bingo > div.on { background: var(--accent-soft); }
.pv-bingo .crest, .pv-bingo .flag, .pv-bingo .award-ic { transform: scale(.62); }
.pv-wordle { display: grid; gap: 4px; }
.pv-wordle .r { display: flex; gap: 4px; }
.pv-wordle .r span { width: 24px; height: 24px; border-radius: 5px; background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.pv-wordle .r span.g { background: var(--good); color: #fff; }
.pv-wordle .r span.y { background: var(--warn); color: #fff; }
.pv-conn { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 64%; max-width: 196px; }
.pv-conn > div { aspect-ratio: 1.3; border-radius: 6px; background: var(--surface); }
.pv-conn > div.a { background: var(--g1); } .pv-conn > div.b { background: var(--g2); }
.pv-top { width: 68%; max-width: 210px; display: grid; gap: 4px; }
.pv-top > div { height: 13px; border-radius: 4px; background: var(--surface); display: flex; align-items: center; gap: 5px; padding: 0 5px; font-size: 8px; font-weight: 800; color: var(--muted); }
.pv-top > div.on { background: var(--accent-soft); color: var(--accent); }
.pv-top > div i { height: 4px; border-radius: 3px; background: currentColor; opacity: .35; flex: 1; }
.pv-guess { display: flex; align-items: center; gap: 14px; }
.pv-guess .av { width: 86px; height: 86px; }
.pv-guess .av img { filter: blur(7px) grayscale(.4); transform: scale(1.1); }
.pv-guess .q { font-size: 40px; font-weight: 800; color: var(--muted); }
.pv-imp { position: relative; width: 150px; height: 108px; }
.pv-imp .av { position: absolute; width: 34px; height: 34px; }
.pv-imp .av.bad { box-shadow: 0 0 0 3px var(--bad); }
.pv-imp .av.ok { box-shadow: 0 0 0 3px var(--good); }
.pv-pitch {
  width: 58%; max-width: 180px; aspect-ratio: 1.15; border-radius: 8px; position: relative;
  background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent);
}
.pv-pitch::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; background: color-mix(in srgb, var(--accent) 35%, transparent); transform: translateX(-50%); display: none; }
.pv-pitch span { position: absolute; width: 16px; height: 11px; border-radius: 2px; transform: translate(-50%, -50%); overflow: hidden; }
.pv-pitch span img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Página de juego ---------- */
.game-head { padding: 34px 0 18px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.game-head h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -0.04em; }
.game-head p { color: var(--muted); margin-top: 6px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.intro { display: grid; grid-template-columns: 1fr 1.15fr; overflow: hidden; }
.intro .intro-pv { background: var(--surface-2); min-height: 280px; display: grid; place-items: center; border-right: 1px solid var(--line); }
.intro .intro-pv .pv { transform: scale(1.35); }
.intro .intro-body { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.intro ul { margin: 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 6px; }
.opt-group { display: grid; gap: 8px; }
.opt-group label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.intro .done-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--good-soft); color: var(--good); font-weight: 600; font-size: 14px; }
.intro .done-note svg { width: 18px; height: 18px; flex: none; }

.stage { display: none; scroll-margin-top: 76px; }
.stage.on { display: block; }
.hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.hud .l, .hud .r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lives { display: inline-flex; gap: 3px; align-items: center; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--bad); }
.lives svg { width: 16px; height: 16px; transition: color .2s, transform .2s; }
.lives svg.off { color: var(--line-2); transform: scale(.8); }
.lives-inf { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.clock { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; }
.clock svg { width: 15px; height: 15px; color: var(--muted); }
.clock.low { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.score-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; }
.score-pill span { color: var(--muted); font-weight: 600; }

.howto { margin-top: 44px; display: grid; gap: 12px; color: var(--ink-2); }
.howto h2 { font-size: 20px; color: var(--ink); margin-bottom: 2px; }
.howto h3 { font-size: 15px; color: var(--ink); margin-top: 8px; }
.howto ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }

.end-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }

/* ---------- Modal y toast ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 10, 10, .42); opacity: 0; transition: opacity .2s ease;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal-back.open { opacity: 1; }
.modal {
  width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  transform: translateY(10px) scale(.98); transition: transform .22s ease;
}
.modal.wide { max-width: 620px; }
.modal-back.open .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 0 22px; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 16px 22px 22px; display: grid; gap: 16px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; }

.result-hero { text-align: center; display: grid; justify-items: center; gap: 8px; padding-top: 4px; }
.result-hero .big { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; }
.result-hero p { color: var(--ink-2); }
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stats-row .fire { background: var(--warn-soft); }
.stats-row .fire b { color: var(--warn); }
.stats-row div { background: var(--surface-2); border-radius: 12px; padding: 10px 6px; text-align: center; }
.stats-row b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats-row span { font-size: 11px; color: var(--muted); font-weight: 600; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table th, .stats-table td { padding: 10px 6px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.countdown { text-align: center; font-size: 13px; color: var(--muted); }
.countdown b { color: var(--ink); font-variant-numeric: tabular-nums; }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: 22px; z-index: 120; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); animation: toast-in .22s ease; max-width: 100%;
}
.toast.bad { background: var(--bad); color: #fff; }
.toast.good { background: var(--good); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } }
.shake { animation: shake .45s ease; }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.04); } 100% { transform: none; opacity: 1; } }
.pop { animation: pop .3s ease both; }

/* ---------- Grid ---------- */
.grid-wrap { display: grid; justify-items: center; gap: 16px; }
.gboard { display: grid; grid-template-columns: .9fr repeat(3, 1fr); gap: 6px; width: 100%; max-width: 560px; }
.gboard .corner { display: grid; place-items: center; }
.gboard .corner b { font-size: 12px; color: var(--muted); font-weight: 700; text-align: center; line-height: 1.2; }
.ghead { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 6px 2px; min-height: 92px; }
.ghead span { font-size: 12px; font-weight: 700; line-height: 1.15; }
.ghead.row { flex-direction: column; }
.gcell {
  position: relative; aspect-ratio: 1; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; overflow: hidden; display: grid; place-items: center; padding: 0; transition: border-color .15s, box-shadow .15s, background .15s;
}
.gcell:hover:not(.filled) { background: var(--surface-2); }
.gcell.sel { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.gcell.cand { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--accent-soft); }
.gcell.filled { cursor: default; border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.gcell.ghost { cursor: default; }
.gcell .av { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.gcell .av-ini { font-size: 22px; }
.gcell .nm {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 6px; font-size: 11.5px; font-weight: 700; line-height: 1.15;
  color: #fff; text-align: center; background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}
.gcell.ghost .av { opacity: .38; filter: grayscale(1); }
.gcell.ghost .nm { background: linear-gradient(transparent, rgba(0, 0, 0, .5)); }
.gcell .cnt { position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); }
.gcell .plus { width: 22px; height: 22px; color: var(--line-2); }
.grid-input { width: 100%; max-width: 560px; display: flex; gap: 8px; }
.grid-hint { font-size: 13px; color: var(--muted); text-align: center; min-height: 20px; }

/* ---------- Bingo ---------- */
.bingo-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.bingo-player { padding: 22px; display: grid; justify-items: center; gap: 12px; text-align: center; position: sticky; top: 76px; }
.bingo-player h3 { font-size: 20px; }
.bingo-player .left { font-size: 13px; color: var(--muted); }
.bingo-player .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.bingo-player .btns .btn { padding: 0 10px; font-size: 14px; }
.bboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bcell {
  position: relative; min-height: 118px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px 6px;
  cursor: pointer; text-align: center; font-size: 12.5px; font-weight: 700; line-height: 1.2; transition: background .15s, border-color .15s;
  overflow: hidden;
}
.bcell:hover:not(.filled) { background: var(--surface-2); border-color: var(--line-2); }
.bcell.filled { cursor: default; background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.bcell.filled { justify-content: flex-start; gap: 5px; padding: 8px 6px; }
.bcell .cat-mini { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--good); max-width: 100%; }
.bcell .cat-mini span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcell .who-av .av { width: 48px; height: 48px; }
.bcell .who-name { font-size: 11.5px; font-weight: 800; line-height: 1.15; }
.bcell.wrong { background: var(--bad-soft); border-color: var(--bad); }

/* ---------- Wordle ---------- */
.wordle-wrap { display: grid; justify-items: center; gap: 16px; }
.hints { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 26px; }
.wboard { display: grid; gap: 6px; }
.wrow { display: flex; gap: 6px; justify-content: center; }
.wtile {
  width: min(54px, calc((100vw - 32px - 7 * 6px) / 8)); aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--line-2);
  display: grid; place-items: center; font-size: 24px; font-weight: 800; text-transform: uppercase; background: var(--surface);
}
.wtile.filled { border-color: var(--muted); animation: pop .12s ease; }
.wtile.g, .wtile.y, .wtile.x { border-color: transparent; color: #fff; }
.wtile.g { background: var(--good); }
.wtile.y { background: var(--warn); }
.wtile.x { background: var(--muted); }
.wtile.flip { animation: flip .45s ease both; }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.kbd { display: grid; gap: 6px; width: 100%; max-width: 520px; }
.kbd .kr { display: flex; gap: 5px; justify-content: center; }
.kbd button {
  flex: 1; max-width: 46px; height: 54px; border-radius: 9px; border: 0; background: var(--surface-3); font-weight: 700; font-size: 15px; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.kbd button.wide { max-width: 72px; flex: 1.5; font-size: 12px; }
.kbd button svg { width: 20px; height: 20px; }
.kbd button.g { background: var(--good); color: #fff; }
.kbd button.y { background: var(--warn); color: #fff; }
.kbd button.x { background: var(--muted); color: #fff; opacity: .55; }

/* ---------- Conexiones ---------- */
.conn-wrap { display: grid; gap: 12px; max-width: 720px; margin: 0 auto; }
.cboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ctile {
  position: relative; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; min-height: 112px;
  font-weight: 700; font-size: 12.5px; line-height: 1.2; text-align: center; transition: transform .12s, background .15s, border-color .15s;
}
.ctile:hover { border-color: var(--line-2); }
.ctile.on { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: scale(.97); }
.ctile .av { width: 54px; height: 54px; }
.cgroup {
  grid-column: 1 / -1; border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; color: #111;
  animation: pop .35s ease both;
}
.cgroup.k0 { background: var(--g1); } .cgroup.k1 { background: var(--g2); } .cgroup.k2 { background: var(--g3); } .cgroup.k3 { background: var(--g4); }
:root[data-theme="dark"] .cgroup { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cgroup { color: #fff; } }
.cgroup .ttl { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.cgroup .ppl { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 600; opacity: .9; }
.cgroup .ppl span { display: inline-flex; align-items: center; gap: 6px; }
.conn-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- Top 10 ---------- */
.top-wrap { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }
.top-title { padding: 18px 20px; display: grid; gap: 4px; }
.top-title h2 { font-size: 21px; }
.top-title p { color: var(--muted); font-size: 14px; }
.tlist { display: grid; gap: 6px; }
.trow {
  display: grid; grid-template-columns: 30px 34px 1fr auto; align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
}
.trow .n { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.trow .nm { font-weight: 700; }
.trow .nm.hidden { height: 10px; border-radius: 5px; background: var(--surface-3); width: 60%; }
.trow .ht { font-size: 12.5px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.trow.ok { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, var(--line)); }
.trow.miss { background: var(--surface-2); }
.trow.miss .nm { color: var(--muted); }

/* ---------- Adivina ---------- */
.guess-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.mystery { padding: 22px; display: grid; justify-items: center; gap: 14px; text-align: center; position: sticky; top: 76px; }
.mystery .ph { width: 190px; height: 190px; border-radius: 22px; overflow: hidden; background: var(--surface-3); position: relative; }
.mystery .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: filter .6s ease, transform .6s ease; }
.mystery .ph .q { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: var(--muted); }
.mystery .tries { display: flex; gap: 5px; }
.mystery .tries i { width: 22px; height: 6px; border-radius: 3px; background: var(--line-2); }
.mystery .tries i.used { background: var(--bad); }
.mystery .tries i.win { background: var(--good); }
.clue-list { display: grid; gap: 8px; }
.clue { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.clue .k { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); width: 96px; flex: none; }
.clue .v { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.clue.locked .v { color: var(--muted); font-weight: 500; }
.clue.new { animation: pop .35s ease both; border-color: var(--accent); }
.career { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.career .step { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 99px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.career .arrow { color: var(--muted); font-size: 12px; }
.guesses { display: grid; gap: 6px; }
.grow { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); animation: pop .25s ease both; }
.grow .nm { font-weight: 700; }
.grow .cmp { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.grow.win { background: var(--good-soft); border-color: var(--good); }

/* ---------- Impostor ---------- */
.imp-wrap { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.imp-cat { padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.imp-cat h2 { font-size: 20px; }
.imp-cat p { color: var(--muted); font-size: 13.5px; }
.iboard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.itile {
  position: relative; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding: 14px 6px 12px;
  font-weight: 700; font-size: 12.5px; line-height: 1.2; text-align: center; transition: background .15s, border-color .15s, transform .12s;
}
.itile .av { width: 64px; height: 64px; }
.itile:hover { border-color: var(--line-2); }
.itile.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.itile.ok { background: var(--good-soft); border-color: var(--good); box-shadow: none; }
.itile.bad { background: var(--bad-soft); border-color: var(--bad); box-shadow: none; }
.itile.missed { border-style: dashed; border-color: var(--good); }
.itile .tag { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.itile .tag svg { width: 13px; height: 13px; }
.itile.ok .tag { background: var(--good); }
.itile.bad .tag { background: var(--bad); }
.itile.locked { cursor: default; }
.rounds { display: flex; gap: 6px; }
.rounds i { width: 28px; height: 6px; border-radius: 3px; background: var(--line-2); }
.rounds i.cur { background: var(--ink); }
.rounds i.ok { background: var(--good); }
.rounds i.ko { background: var(--bad); }

/* ---------- Once ---------- */
.once-wrap { display: grid; grid-template-columns: minmax(0, 580px) 320px; justify-content: center; gap: 16px; align-items: start; }
.pitch {
  position: relative; width: 100%; aspect-ratio: 0.86; border-radius: 18px; overflow: hidden;
  background:
    repeating-linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)) 0 9.09%, color-mix(in srgb, var(--accent) 11%, var(--surface)) 9.09% 18.18%);
  border: 1px solid var(--line);
}
.pitch svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; color: color-mix(in srgb, var(--accent) 35%, transparent); }
.slot {
  position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; width: 92px; text-align: center;
}
.slot .disc {
  width: 58px; height: 58px; border-radius: 50%; background: var(--surface); border: 2px dashed color-mix(in srgb, var(--accent) 50%, var(--line-2));
  display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--muted); position: relative; overflow: hidden;
}
.slot.filled .disc { border: 2px solid var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.slot .disc .av { position: absolute; inset: 0; width: 100%; height: 100%; }
.slot .lbl { font-size: 11px; font-weight: 700; line-height: 1.15; background: var(--surface); padding: 2px 7px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.slot .lbl .flag { width: 14px; height: 10px; border-radius: 2px; }
.slot.cand .disc { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.once-side { display: grid; gap: 12px; position: sticky; top: 76px; }
.country-card { padding: 20px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.country-card h3 { font-size: 24px; letter-spacing: -0.03em; }
.country-card .sub { font-size: 13px; color: var(--muted); }
.queue { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.queue .flag { opacity: .35; }
.queue .flag.done { opacity: 1; }
.queue .flag.cur { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .bingo-wrap, .guess-wrap, .once-wrap { grid-template-columns: 1fr; }
  .bingo-player, .mystery, .once-side { position: static; }
  .bingo-player { grid-template-columns: auto 1fr; justify-items: start; text-align: left; align-items: center; padding: 16px; }
  .bingo-player .av.xl { width: 88px; height: 88px; grid-row: span 3; }
  .bingo-player .btns { grid-column: 1 / -1; }
  .once-side { order: -1; }
}
@media (max-width: 720px) {
  .intro { grid-template-columns: 1fr; }
  .intro .intro-pv { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--line); }
  .intro .intro-pv .pv { transform: scale(1.1); }
  .intro .intro-body { padding: 20px; }
  .bboard { grid-template-columns: repeat(3, 1fr); }
  .bcell { min-height: 100px; font-size: 11.5px; }
  .iboard { grid-template-columns: repeat(3, 1fr); }
  .stats-row b { font-size: 19px; }
  .topbar .logo small { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 14.5px; }
  .hero { padding: 36px 0 18px; }
  .gboard { gap: 4px; }
  .ghead { min-height: 74px; }
  .ghead span { font-size: 10.5px; }
  .ghead .crest, .ghead .award-ic, .ghead .pos-ic { width: 32px; height: 32px; font-size: 8.5px; }
  .ghead .flag { width: 30px; height: 20px; }
  .gcell { border-radius: 10px; }
  .gcell .nm { font-size: 10px; padding: 12px 3px 4px; }
  .cboard { gap: 6px; }
  .ctile { min-height: 96px; padding: 8px 4px; font-size: 11px; }
  .ctile .av { width: 44px; height: 44px; }
  .trow { grid-template-columns: 22px 30px 1fr auto; gap: 8px; padding: 8px 10px; }
  .slot { width: 72px; }
  .slot .disc { width: 46px; height: 46px; font-size: 10px; }
  .slot .lbl { font-size: 9.5px; padding: 1px 5px; }
  .kbd button { height: 50px; font-size: 13px; }
  .clue .k { width: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Añadidos: racha, juegos nuevos y previsualizaciones
   ========================================================= */
.streak-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 11px 0 8px; margin-right: 4px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer;
}
.streak-chip svg { width: 18px; height: 18px; }
.streak-chip.on { color: #e8590c; border-color: color-mix(in srgb, #e8590c 35%, var(--line)); background: color-mix(in srgb, #e8590c 8%, var(--surface)); }
.streak-hero { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, #e8590c 9%, var(--surface-2)); }
.streak-hero .flame { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, #e8590c 18%, transparent); color: #e8590c; flex: none; }
.streak-hero .flame svg { width: 26px; height: 26px; }
.streak-hero b { font-size: 18px; }
.streak-hero p { color: var(--ink-2); font-size: 13.5px; }

.home-streak { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.home-streak .card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.home-streak .card svg { width: 22px; height: 22px; }
.home-streak .card b { font-size: 18px; display: block; line-height: 1.1; }
.home-streak .card span { font-size: 12.5px; color: var(--muted); }
.home-streak .fire-ic { color: #e8590c; }
.home-streak .ok-ic { color: var(--good); }
.new-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 99px; }

/* Previsualizaciones nuevas */
.pv-crest .crest.xl { width: 92px; height: 92px; }
.pv-crest .crest img { filter: blur(5px); }
.pv-pen { display: grid; justify-items: center; gap: 10px; }
.pv-goal { position: relative; width: 150px; height: 64px; border: 3px solid var(--ink); border-bottom: 0; border-radius: 4px 4px 0 0;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 10px 10px; }
.pv-keeper { position: absolute; left: 28px; bottom: 0; width: 18px; height: 38px; border-radius: 9px 9px 3px 3px; background: var(--accent); transform: rotate(-24deg); }
.pv-ball { position: absolute; right: 22px; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--ink); }
.pv-score { display: flex; gap: 5px; }
.pv-score i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.pv-score i.ok { background: var(--good); box-shadow: none; }
.pv-score i.ko { background: var(--bad); box-shadow: none; }
.pv-clock { display: grid; justify-items: center; gap: 10px; }
.pv-clock b { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.pv-chips { display: flex; gap: 6px; }
.pv-memo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 60%; max-width: 190px; }
.pv-memo > div { aspect-ratio: .8; border-radius: 7px; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.pv-memo .av { width: 100%; height: 100%; border-radius: 0; }
.pv-memo .flag { width: 70%; height: auto; aspect-ratio: 3 / 2; }
.pv-memo .mcard.back { display: block; width: 100%; height: 100%; }

/* ---------- Escudo borroso ---------- */
.mystery .crest-big { width: 190px; height: 190px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; position: relative; }
.mystery .crest-big img { width: 78%; height: 78%; object-fit: contain; transition: filter .6s ease, transform .6s ease; }
.mystery .crest-big .q { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: var(--muted); }
.clue .players-row { display: flex; flex-wrap: wrap; gap: 8px; }
.clue .players-row > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* ---------- Penales ---------- */
.pen-wrap { display: grid; gap: 14px; max-width: 720px; margin: 0 auto; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 18px; }
.scoreboard .team { display: grid; gap: 6px; }
.scoreboard .team:last-child { justify-items: end; text-align: right; }
.scoreboard .team b { font-size: 14px; }
.scoreboard .dots { display: flex; gap: 5px; flex-wrap: wrap; }
.scoreboard .dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.scoreboard .dots i.ok { background: var(--good); box-shadow: none; }
.scoreboard .dots i.ko { background: var(--bad); box-shadow: none; }
.scoreboard .res { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.goal-scene { position: relative; height: 170px; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, var(--surface) 0 70%, color-mix(in srgb, var(--accent) 16%, var(--surface)) 70%); border: 1px solid var(--line); }
.goal-frame { position: absolute; left: 50%; top: 22px; width: 300px; max-width: 76%; height: 104px; transform: translateX(-50%); border: 5px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 14px 14px; }
.keeper { position: absolute; left: 50%; bottom: 44px; width: 30px; height: 64px; margin-left: -15px; border-radius: 15px 15px 6px 6px; background: #e8590c; transition: transform .45s cubic-bezier(.3, .8, .4, 1); transform-origin: 50% 100%; }
.keeper::before { content: ""; position: absolute; left: 50%; top: -18px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: inherit; }
.keeper.mine { background: var(--accent); }
.pen-ball { position: absolute; left: 50%; bottom: 10px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #111; transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.pen-ball::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #111; }
.pen-msg { position: absolute; left: 0; right: 0; top: 4px; text-align: center; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pen-msg.goal { color: var(--good); font-size: 15px; }
.pen-msg.save { color: var(--bad); font-size: 15px; }
.question { padding: 18px; display: grid; gap: 14px; }
.question .qhead { display: flex; align-items: center; gap: 14px; }
.question .qhead h3 { font-size: 18px; }
.question .qhead p { color: var(--muted); font-size: 13px; }
.qbar { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.qbar i { display: block; height: 100%; background: var(--ink); transition: width 1s linear; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 700; font-size: 14px; text-align: left; transition: background .15s, border-color .15s;
}
.opt:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-2); }
.opt:disabled { cursor: default; }
.opt.ok { background: var(--good-soft); border-color: var(--good); }
.opt.ko { background: var(--bad-soft); border-color: var(--bad); }
.opt.dim { opacity: .5; }

/* ---------- Contrarreloj ---------- */
.cr-wrap { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.cr-cat { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.cr-cat h2 { font-size: 21px; }
.cr-cat p { color: var(--muted); font-size: 13.5px; }
.cr-big { display: flex; align-items: center; justify-content: center; gap: 28px; }
.cr-big > div { text-align: center; }
.cr-big .n { font-size: 54px; font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; line-height: 1; }
.cr-big .n.low { color: var(--bad); }
.cr-big .lbl { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cr-found { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-found .pchip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--good-soft); font-weight: 700; font-size: 13px; animation: pop .3s ease both; }
.cr-found .pchip.miss { background: var(--surface-2); color: var(--muted); }
.cr-found .pchip .av { width: 28px; height: 28px; }

/* ---------- Memotest ---------- */
.memo-wrap { display: grid; gap: 14px; justify-items: center; }
.mboard { display: grid; gap: 10px; width: 100%; max-width: 640px; }
.mcard { position: relative; display: block; width: 100%; aspect-ratio: .78; border-radius: 14px; cursor: pointer; perspective: 800px; border: 0; padding: 0; background: transparent; }
.mcard .in { position: absolute; inset: 0; transition: transform .45s ease; transform-style: preserve-3d; }
.mcard.up .in, .mcard.done .in { transform: rotateY(180deg); }
.mcard .face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; overflow: hidden; }
.mcard .front, .mcard.back { background: var(--ink); color: var(--bg); border-radius: 7px; }
.mcard .front svg { width: 30%; height: 30%; opacity: .45; }
.mcard .rear { transform: rotateY(180deg); background: var(--surface); border: 1px solid var(--line); padding: 8px; align-content: center; justify-items: center; gap: 6px; }
.mcard .rear .av { width: 74%; height: auto; aspect-ratio: 1; }
.mcard .rear .flag { width: 78%; height: auto; aspect-ratio: 3 / 2; }
.mcard .rear .crest { width: 70%; height: auto; aspect-ratio: 1; }
.mcard .rear small { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mcard .rear .big-txt { font-size: 13px; font-weight: 800; text-align: center; line-height: 1.2; padding: 0 4px; }
.mcard.done .rear { border-color: var(--good); background: var(--good-soft); }
.mcard.miss .rear { border-color: var(--bad); background: var(--bad-soft); }

@media (max-width: 720px) {
  .options { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .scoreboard .res { font-size: 26px; }
}
@media (max-width: 520px) {
  .streak-chip { padding: 0 9px 0 6px; margin-right: 0; }
  .mboard { gap: 6px; }
  .mcard .rear { padding: 5px; }
  .mcard .rear small { font-size: 9.5px; }
  .cr-big .n { font-size: 42px; }
}

/* Barra superior compacta en móviles */
@media (max-width: 520px) {
  .topbar .container { gap: 6px; }
  .logo { font-size: 17px; gap: 7px; }
  .topnav { gap: 0; }
  .topnav .icon-btn { width: 34px; height: 34px; }
  .topnav a.icon-btn[href="#como-jugar"] { display: none; }
  .streak-chip { height: 30px; }
}
@media (max-width: 360px) {
  .logo-mark { display: none; }
}

/* =========================================================
   Ajustes: trofeos, fotos de penales, opciones y botones
   ========================================================= */
.trophy { border-radius: 12px; }
.trophy.sm { border-radius: 7px; }
.trophy.lg { border-radius: 14px; }
.trophy img { width: 100%; height: 100%; }
.trophy.contain img { padding: 3px; }
.pv-bingo .trophy { border-radius: 8px; }

.seg button, .btn, .opt, .bcell, .gcell, .ctile, .itile, .mcard { -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.stage-opts { margin-bottom: 8px; color: var(--muted); padding: 0 8px; }
.stage-opts:hover { color: var(--ink); }

/* Foto real del penal */
.pen-frame {
  position: relative; aspect-ratio: 16 / 9; max-height: 360px; width: 100%; border-radius: 16px; overflow: hidden;
  background: #0d0d0d; border: 1px solid var(--line);
}
.pen-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pen-frame.pre img { filter: brightness(.72) saturate(.9); }
.pen-frame.shot img { animation: pf-zoom 2.2s ease-out both; }
@keyframes pf-zoom { from { transform: scale(1.12); filter: brightness(1.15); } to { transform: scale(1); filter: none; } }
.pf-badge {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  padding: 7px 16px; border-radius: 99px; font-weight: 800; font-size: 14px; letter-spacing: .06em;
  background: rgba(0, 0, 0, .6); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap;
}
.pen-frame.shot .pf-badge { font-size: 22px; padding: 9px 22px; animation: pop .35s ease both; }
.pen-frame.shot.goal .pf-badge { background: rgba(18, 155, 82, .92); }
.pen-frame.shot.save .pf-badge { background: rgba(215, 51, 44, .92); }
.pf-foot {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px;
  padding: 26px 12px 9px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff;
}
.pf-cap { font-weight: 700; font-size: 14px; }
.pf-credit { font-size: 10.5px; opacity: .75; color: #fff; text-decoration: none; white-space: nowrap; }
.pf-credit:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 520px) {
  .pf-cap { font-size: 12px; }
  .pf-credit { font-size: 9px; }
  .pen-frame.shot .pf-badge { font-size: 17px; }
}

/* La vista previa de la intro no debe tapar ni capturar clics de los botones de opciones */
.intro .intro-pv { position: relative; overflow: hidden; }
.intro .intro-pv .pv, .game-card .thumb .pv { pointer-events: none; }
.intro .intro-body { position: relative; z-index: 1; }
.seg button { min-height: 36px; }

/* Logo (versión negra en tema claro, blanca en tema oscuro) */
.logo-img { width: 30px; height: 30px; flex: none; display: block; }
.logo-img.on-dark { display: none; }
:root[data-theme="dark"] .logo-img.on-light { display: none; }
:root[data-theme="dark"] .logo-img.on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-img.on-light { display: none; }
  :root:not([data-theme="light"]) .logo-img.on-dark { display: block; }
}
@media (max-width: 360px) { .logo-img { width: 26px; height: 26px; } }

/* Foto del penal como fondo recortado en la jugada (no se puede arrastrar) */
.pen-frame .pf-img {
  position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat;
  transform: scale(var(--z, 1)); pointer-events: none;
}
.pen-frame.pre .pf-img { filter: brightness(.78) saturate(.95); }
.pen-frame.shot .pf-img { animation: pf-zoom2 2.2s ease-out both; }
@keyframes pf-zoom2 { from { transform: scale(calc(var(--z, 1) * 1.12)); filter: brightness(1.15); } to { transform: scale(var(--z, 1)); filter: none; } }
.pen-frame { user-select: none; -webkit-user-select: none; }

/* Imagen misteriosa (canvas) */
.mystery-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.mystery .ph, .mystery .crest-big { -webkit-user-select: none; user-select: none; }

/* =========================================================
   Trayectoria, Ordénalo y Once de Clubes
   ========================================================= */
.name-ic { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); font-family: Georgia, serif; font-style: italic; }

/* Trayectoria */
.tray-wrap { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.tray-card { padding: 18px; display: grid; gap: 16px; }
.tray-head { display: flex; align-items: center; gap: 14px; }
.tray-head h3 { font-size: 18px; margin-bottom: 6px; }
.tray-head .hints { justify-content: flex-start; }
.tl-photo { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; flex: none; overflow: hidden; }
.tl-photo .q { font-size: 30px; font-weight: 800; color: var(--muted); }
.tl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; counter-reset: tl; }
.tl-step { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.tl-n { position: absolute; top: 6px; right: 8px; font-size: 11px; font-weight: 800; color: var(--muted); }
.tl-txt { display: grid; min-width: 0; }
.tl-txt b { font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.tl-txt span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Ordénalo */
.ord-wrap { display: grid; gap: 14px; max-width: 820px; margin: 0 auto; }
.ord-player { padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.ord-player h3 { font-size: 21px; margin: 2px 0 6px; }
.ord-player .muted { font-size: 13px; }
.ord-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ord-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.ord-slots, .ord-pool { display: grid; gap: 6px; }
.ord-slot, .ord-card {
  display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 6px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; text-align: left; cursor: pointer;
}
.ord-card:hover, .ord-slot.on:hover { border-color: var(--line-2); background: var(--surface-2); }
.ord-slot { border-style: dashed; cursor: default; }
.ord-slot.on { border-style: solid; cursor: pointer; }
.ord-slot b { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; flex: none; }
.ord-slot.ok { background: var(--good-soft); border-color: var(--good); cursor: default; }
.ord-slot.ok b { background: var(--good); color: #fff; }
.ord-slot small { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Once de Clubes */
.queue-crests { gap: 4px; }
.queue-crests .crest { opacity: .35; }
.queue-crests .crest.done, .queue-crests .crest.cur { opacity: 1; }
.queue-crests .crest.cur { box-shadow: 0 0 0 2px var(--ink); }
.slot .lbl .crest.sm { width: 14px; height: 14px; }

/* Vistas previas nuevas */
.pv-tray { display: flex; align-items: center; gap: 6px; }
.pv-tray .arr { color: var(--muted); font-weight: 800; }
.pv-tray .q { font-size: 30px; font-weight: 800; color: var(--muted); margin-left: 6px; }
.pv-ord { display: grid; gap: 5px; width: 62%; max-width: 190px; }
.pv-ord > div { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px; border-radius: 7px; background: var(--surface); font-size: 10px; }
.pv-ord > div.ok { background: var(--good-soft); color: var(--good); }
.pv-ord i { flex: 1; height: 5px; border-radius: 3px; background: currentColor; opacity: .25; }
.pv-pitch-clubs span { width: 18px; height: 18px; border-radius: 50%; overflow: visible; }
.pv-pitch-clubs .crest.sm { width: 18px; height: 18px; }

@media (max-width: 720px) {
  .ord-cols { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 1fr 1fr; }
}
