/* ============================================================
   Quiniela Mundial 2026 — app styles
   Built on Quantia tokens (colors_and_type.css + kit.css).
   Mobile-first; desktop-compatible.
   ============================================================ */

:root {
  --qm-maxw: 720px;
  --qm-tabbar-h: 66px;
  --gold: #E7A50F;
  --gold-soft: #F6C84C;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--fg-1);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(95,56,170,.06), transparent 60%),
    radial-gradient(120% 60% at 0% 0%, rgba(221,49,86,.05), transparent 55%),
    var(--bg-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: var(--font-head); cursor: pointer; border: none; background: none; }
input { font-family: var(--font-body); }
img { display: block; }
::selection { background: rgba(221,49,86,.18); }

/* ---------- app frame ---------- */
.qm-app { min-height: 100vh; }
.qm-main {
  max-width: var(--qm-maxw);
  margin: 0 auto;
  padding: 20px 16px calc(var(--qm-tabbar-h) + 32px);
}
@media (min-width: 880px) {
  .qm-main { padding: 32px 24px 64px; }
}

/* ---------- top app bar ---------- */
.qm-topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--q-mesh);
  color: #fff;
  overflow: hidden;
}
.qm-topbar::after {
  content: ""; position: absolute; right: -60px; top: -40px; width: 220px; height: 220px;
  background: url("assets/blob-white.png") center/contain no-repeat; opacity: .08; pointer-events: none;
}
.qm-topbar .inner {
  max-width: var(--qm-maxw); margin: 0 auto; padding: 0 18px;
  height: 56px; display: flex; align-items: center; gap: 14px; position: relative; z-index: 1;
}
@media (min-width: 880px) {
  /* header un poco más ancho que el contenido (720px) para que entren los
     ítems del colaborador-admin: Partidos · Tabla · Ranking · Mis Ligas · Admin · Reglas */
  .qm-topbar .inner { height: 66px; padding: 0 30px; gap: 18px; max-width: 960px; }
}
.qm-brand { display: flex; align-items: center; gap: 10px; }
.qm-brand .iso { width: 30px; height: 30px; border-radius: 9px; }
.qm-brand .wm { height: 17px; opacity: .96; }
.qm-brand .tag {
  font-family: var(--font-head); font-weight: 800; font-size: 13px; letter-spacing: -.01em;
  line-height: 1; color: #fff;
}
.qm-brand .tag small { display: block; font-weight: 600; font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.7); margin-top: 3px; white-space: nowrap; }
.qm-brand .tag { white-space: nowrap; }

/* desktop nav lives in top bar */
.qm-topnav { display: none; margin-left: auto; gap: 4px; }
@media (min-width: 880px) { .qm-topnav { display: flex; } }
.qm-topnav button {
  color: rgba(255,255,255,.78); font-weight: 600; font-size: 15px; padding: 9px 16px;
  border-radius: var(--radius-pill); transition: background .18s, color .18s; display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.qm-topnav button:hover { color: #fff; background: rgba(255,255,255,.12); }
.qm-topnav button.on { color: #fff; background: rgba(255,255,255,.18); }

.qm-usermenu { margin-left: auto; position: relative; }
@media (min-width: 880px) { .qm-usermenu { margin-left: 20px; } }
.qm-pts-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius-pill);
  padding: 7px 13px 7px 11px; color: #fff; cursor: pointer; transition: background .15s, border-color .15s;
}
.qm-pts-pill:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.34); }
.qm-pts-pill .av {
  width: 26px; height: 26px; border-radius: 50%; background: var(--q-gradient);
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 12px; color: #fff;
}
.qm-pts-pill b { font-family: var(--font-head); font-weight: 800; font-size: 15px; }
.qm-pts-pill > span { font-size: 11px; color: rgba(255,255,255,.72); }
.qm-pts-pill svg { opacity: .82; margin-left: 1px; }

/* user menu popover */
.qm-menu-backdrop { position: fixed; inset: 0; z-index: 55; }
.qm-usermenu-pop {
  position: fixed; z-index: 60;
  min-width: 232px; background: #fff; color: var(--fg-1);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 14px 36px rgba(20,12,40,.22); padding: 10px;
}
.qm-usermenu-pop .who { display: flex; gap: 10px; align-items: center; padding: 6px 6px 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.qm-usermenu-pop .who b { font-family: var(--font-head); font-size: 14px; display: block; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-usermenu-pop .who small { font-size: 11.5px; color: var(--fg-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.qm-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 8px; border-radius: 9px; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--accent); transition: background .15s; }
.qm-menu-item:hover { background: rgba(221,49,86,.09); }
/* "Reglas y FAQ" en el avatar solo aplica en móvil; en desktop vive en el topbar */
@media (min-width: 880px) { .qm-menu-item-mobile { display: none; } }

/* ---------- bottom tab bar (mobile) ---------- */
.qm-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  height: var(--qm-tabbar-h);
  background: rgba(255,255,255,.9); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
@media (min-width: 880px) { .qm-tabbar { display: none; } }
.qm-tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--fg-3); font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: .01em;
  border-radius: var(--radius-md); transition: color .15s, background .15s; position: relative;
}
.qm-tabbar button svg { width: 22px; height: 22px; }
.qm-tabbar button.on { color: var(--accent); }
.qm-tabbar button.on::before {
  content: ""; position: absolute; top: 4px; width: 26px; height: 3px; border-radius: 3px; background: var(--accent);
}

/* ---------- section headers ---------- */
.qm-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}
.qm-eyebrow img { height: 13px; }
.qm-h {
  font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em;
  font-size: 30px; line-height: 1.08; margin: 8px 0 0;
}
@media (min-width: 880px) { .qm-h { font-size: 38px; } }
.qm-sub { color: var(--fg-3); font-size: 15px; line-height: 1.55; margin: 8px 0 0; max-width: 52ch; }

/* ---------- buttons ---------- */
.qm-btn {
  font-weight: 700; font-size: 15px; border-radius: var(--radius-pill);
  padding: 12px 22px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform .14s, box-shadow .2s, background .2s, color .2s, filter .2s; white-space: nowrap;
}
.qm-btn:active { transform: scale(.97); }
.qm-btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.qm-btn-primary:hover { background: var(--accent-hover); }
.qm-btn-grad { background: var(--q-gradient-h); color: #fff; box-shadow: 0 10px 24px rgba(120,40,130,.28); }
.qm-btn-grad:hover { filter: brightness(1.07); }
.qm-btn-ghost { background: #fff; color: var(--accent); border: 1.5px solid var(--border); }
.qm-btn-ghost:hover { border-color: var(--accent); }
.qm-btn-dark { background: var(--q-plum); color: #fff; }
.qm-btn-block { width: 100%; }
.qm-btn[disabled] { opacity: .45; pointer-events: none; }
.qm-btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- generic card ---------- */
.qm-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- personal stat bar ---------- */
.qm-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-top: 18px;
}
.qm-stat { background: #fff; padding: 14px 10px; text-align: center; }
.qm-stat .n {
  font-family: var(--font-head); font-weight: 900; font-size: 26px; line-height: 1; letter-spacing: -.02em;
  color: var(--fg-1);
}
.qm-stat.accent .n { color: var(--accent); }
.qm-stat.gold .n { color: var(--gold); }
.qm-stat.ok .n { color: var(--ok); }
.qm-stat .l {
  font-family: var(--font-head); font-weight: 700; font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-3); margin-top: 6px;
}
@media (min-width: 880px) { .qm-stat .n { font-size: 32px; } }

/* ---------- matches filter bar ---------- */
.qm-filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-top: 18px; -webkit-overflow-scrolling: touch; }
.qm-filters button { white-space: nowrap; font-family: var(--font-head); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: var(--radius-pill); color: var(--fg-2); background: #fff; border: 1px solid var(--border); transition: all .15s; }
.qm-filters button.on { background: var(--accent); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }

/* ---------- urgent pending nudge ---------- */
.qm-pending-nudge { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid rgba(221,49,86,.3); background: linear-gradient(100deg, rgba(221,49,86,.1), rgba(95,56,170,.06)); color: var(--fg-1); font-family: var(--font-body); font-size: 14px; text-align: left; transition: transform .15s, box-shadow .15s; }
.qm-pending-nudge:hover { box-shadow: var(--shadow-md); }
.qm-pending-nudge:active { transform: scale(.99); }
.qm-pending-nudge .bolt { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.qm-pending-nudge > span:nth-child(2) { flex: 1; }
.qm-pending-nudge b { font-family: var(--font-head); font-weight: 800; }
.qm-pending-nudge svg:last-child { color: var(--accent); flex: none; }

/* ---------- focus banner (closes today/tomorrow) ---------- */
.qm-focus { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid rgba(221,49,86,.35); border-left: 4px solid var(--accent); background: rgba(221,49,86,.06); color: var(--fg-1); font-family: var(--font-body); font-size: 14px; text-align: left; transition: transform .15s, box-shadow .15s; }
.qm-focus:hover { box-shadow: var(--shadow-md); }
.qm-focus:active { transform: scale(.99); }
.qm-focus .blt { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.qm-focus > span:nth-child(2) { flex: 1; }
.qm-focus b { font-family: var(--font-head); font-weight: 800; color: var(--accent); }
.qm-focus svg:last-child { color: var(--accent); flex: none; }

/* ---------- group-stage progress ---------- */
.qm-progress { margin-top: 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.qm-progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.qm-progress-top .lbl { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--fg-2); }
.qm-progress-top .num { font-family: var(--font-head); font-weight: 800; font-size: 13px; color: var(--fg-1); }
.qm-progress-top .num b { color: var(--accent); }
.qm-progress-bar { height: 9px; border-radius: var(--radius-pill); background: var(--bg-3); overflow: hidden; }
.qm-progress-bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); transition: width .4s cubic-bezier(.22,1,.36,1); }
.qm-progress-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--fg-3); }
.qm-leaguepill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-head); font-weight: 800; font-size: 11px; color: var(--brand-2); background: rgba(95,56,170,.1); padding: 4px 9px; border-radius: var(--radius-pill); white-space: nowrap; }

/* ---------- matchday group header ---------- */
.qm-groupbar {
  display: flex; align-items: center; gap: 12px; margin: 30px 0 14px;
}
.qm-groupbar .gtag {
  font-family: var(--font-head); font-weight: 800; font-size: 13px; color: #fff;
  background: var(--q-gradient-h); padding: 5px 12px; border-radius: var(--radius-pill); letter-spacing: .02em;
}
.qm-groupbar .glabel { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--fg-1); }
.qm-groupbar .gline { flex: 1; height: 1px; background: var(--border); }
.qm-groupbar .gcount { font-size: 12px; color: var(--fg-3); font-weight: 700; }
.qm-groupbar.is-focus .glabel { color: var(--accent); }
.qm-groupbar .qm-focus-tag { font-family: var(--font-head); font-weight: 800; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: rgba(221,49,86,.12); padding: 3px 9px; border-radius: var(--radius-pill); }

/* ---------- match card ---------- */
.qm-match {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.qm-match.is-live { border-color: rgba(221,49,86,.45); box-shadow: 0 0 0 3px rgba(221,49,86,.08), var(--shadow-md); }
.qm-match.is-exact { border-color: rgba(31,138,91,.55); box-shadow: 0 0 0 3px rgba(31,138,91,.12); }
.qm-match.is-pending { border-color: rgba(221,49,86,.32); }

/* partido destacado (2x) — tarjeta con peso visual */
.qm-match.is-featured {
  border-color: rgba(231,165,15,.6);
  box-shadow: 0 0 0 3px rgba(231,165,15,.12), var(--shadow-md);
  background: linear-gradient(180deg, rgba(231,165,15,.08), #fff 130px);
}
.qm-featured-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: -16px -16px 14px; padding: 8px 14px;
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .04em;
  text-transform: uppercase; color: #3d2a00;
}
.qm-featured-banner .x2 { font-weight: 900; letter-spacing: .02em; white-space: nowrap; }
.qm-match.compact .qm-featured-banner { margin: -12px -14px 10px; font-size: 11px; }

.qm-match .top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: 12px; color: var(--fg-3); font-weight: 600;
}
.qm-match .top .when { font-family: var(--font-head); }
.qm-match .top .grp {
  font-family: var(--font-head); font-weight: 800; font-size: 11px; letter-spacing: .04em;
  color: var(--brand-2); background: rgba(95,56,170,.1); padding: 3px 8px; border-radius: var(--radius-pill);
}
.qm-match .top .spacer { flex: 1; }

/* status chips */
.qm-chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head);
  font-weight: 800; font-size: 11px; letter-spacing: .02em; padding: 4px 10px; border-radius: var(--radius-pill);
}
.qm-chip.live { background: var(--accent); color: #fff; }
.qm-chip.live .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: qm-pulse 1.1s infinite; }
.qm-chip.open { background: var(--q-mist); color: var(--brand-2); }
.qm-chip.pending { background: rgba(221,49,86,.12); color: var(--accent); }
.qm-chip.locked { background: var(--bg-3); color: var(--fg-3); }
.qm-chip.final { background: var(--bg-3); color: var(--fg-2); }
@keyframes qm-pulse { 0%,100%{ opacity:1; transform:scale(1);} 50%{opacity:.35; transform:scale(.7);} }

/* countdown chip (kickoff is near) */
.qm-cd { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-head); font-weight: 800; font-size: 11px; letter-spacing: .02em; padding: 4px 9px; border-radius: var(--radius-pill); white-space: nowrap; }
.qm-cd.soon { background: rgba(201,138,18,.14); color: var(--warn); }
.qm-cd.urgent { background: var(--accent); color: #fff; }
.qm-cd.urgent .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: qm-pulse 1.3s infinite; }

/* market + crowd probability bars (sits between the fixture and the predline) */
.qm-odds { margin: 12px 0 4px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgba(241,236,243,.45); }
.qm-odds-legend { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; font-family: var(--font-head); font-size: 10.5px; font-weight: 700; color: var(--fg-3); }
.qm-odds-legend span { display: inline-flex; align-items: center; gap: 4px; }
.qm-odds-legend i { width: 8px; height: 8px; border-radius: 2px; }
.qm-odds-row { display: flex; align-items: center; gap: 10px; }
.qm-odds-row + .qm-odds-row { margin-top: 9px; }
.qm-odds-label { width: clamp(132px, 46%, 208px); flex: none; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-head); font-size: 11px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-odds-label svg { flex: none; }
.qm-odds-label b { font-weight: 800; }
.qm-odds-label .src { color: var(--fg-3); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.qm-odds-bar { flex: 1; min-width: 0; display: flex; height: 20px; border-radius: 6px; overflow: hidden; gap: 2px; font-family: var(--font-head); font-size: 11px; font-weight: 800; }
.qm-odds-bar > div { overflow: hidden; } /* a % label never spills into the next segment */
/* narrow screens (the common phone case): stack the one-line label above a
   full-width bar so the source/freshness shows in full and segments are wide
   enough to host their % labels. */
@media (max-width: 560px) {
  .qm-odds-row { flex-direction: column; align-items: stretch; gap: 5px; }
  .qm-odds-row + .qm-odds-row { margin-top: 11px; }
  .qm-odds-label { width: auto; max-width: 100%; }
  .qm-odds-bar { width: 100%; }
}

/* teams + score row */
.qm-fix { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.qm-team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; min-width: 0; }
.qm-flag { font-size: 38px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(46,11,61,.18)); }
.qm-tname { font-family: var(--font-head); font-weight: 800; font-size: 15px; line-height: 1.2; min-width: 0; max-width: 100%; overflow-wrap: anywhere; text-wrap: balance; }
.qm-tname small { display: block; font-weight: 700; font-size: 10px; letter-spacing: .06em; color: var(--fg-3); text-transform: uppercase; margin-top: 3px; }

.qm-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 86px; }

/* live marker (no score — informational, time-based) */
.qm-livemark { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-head); font-weight: 900; font-size: 13px; letter-spacing: .08em; color: var(--accent); white-space: nowrap; }
.qm-livemark .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: qm-pulse 1.1s infinite; }
.qm-match.compact .qm-livemark { font-size: 11px; }

/* score steppers */
.qm-score { display: flex; align-items: center; gap: 8px; }
.qm-stepper { display: flex; flex-direction: column; align-items: center; gap: 0; }
.qm-stepper .v {
  font-family: var(--font-head); font-weight: 900; font-size: 30px; line-height: 1; width: 40px; text-align: center;
  color: var(--fg-1); letter-spacing: -.02em;
}
.qm-step-btns { display: flex; gap: 6px; margin-top: 4px; }
.qm-step-btns button {
  width: 30px; height: 26px; border-radius: 8px; background: var(--bg-3); color: var(--brand-2);
  font-weight: 900; font-size: 15px; display: grid; place-items: center; transition: background .15s, transform .12s;
}
.qm-step-btns button:hover { background: var(--q-mist); }
.qm-step-btns button:active { transform: scale(.9); }
.qm-vs { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--fg-3); }

/* big static score (final/live/locked) */
.qm-bigscore { display: flex; align-items: center; gap: 10px; }
.qm-bigscore .g {
  font-family: var(--font-head); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em;
}
.qm-bigscore .sep { font-weight: 800; color: var(--fg-3); font-size: 22px; }
.qm-bigscore.live .g { color: var(--accent); }

/* prediction confirm + save row */
.qm-predline {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px;
  padding-top: 14px; border-top: 1px dashed var(--border);
}
.qm-mypred { font-size: 13px; color: var(--fg-3); display: flex; align-items: center; gap: 8px; }
.qm-mypred b { font-family: var(--font-head); color: var(--fg-1); font-weight: 800; }
.qm-saved { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.qm-unsaved { color: var(--accent); font-weight: 800; display: inline-flex; align-items: center; gap: 7px; }
.qm-unsaved .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: qm-pulse 1.5s infinite; }
.qm-unsaved b { font-family: var(--font-head); }

/* unsaved match-card emphasis + chip */
.qm-match.is-dirty { border-color: rgba(221,49,86,.5); box-shadow: 0 0 0 3px rgba(221,49,86,.09), var(--shadow-sm); }
.qm-chip.dirty { background: var(--accent); color: #fff; }
.qm-chip.dirty .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }

/* ---------- sticky batch-save bar ---------- */
.qm-has-savebar { padding-bottom: 80px; }
.qm-savebar {
  position: fixed; left: 0; right: 0; z-index: 60;
  bottom: calc(var(--qm-tabbar-h) + 14px);
  display: flex; justify-content: center; padding: 0 12px;
  pointer-events: none;
  animation: qm-savebar-up .26s cubic-bezier(.4,0,.2,1) both;
}
@media (min-width: 880px) { .qm-savebar { bottom: 22px; } }
@keyframes qm-savebar-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.qm-savebar-inner {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  width: min(640px, 100%);
  background: var(--q-plum); color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-pill);
  padding: 9px 9px 9px 18px;
  box-shadow: 0 18px 44px rgba(46,11,61,.42);
}
.qm-savebar-count { display: flex; align-items: baseline; gap: 7px; margin-right: auto; min-width: 0; }
.qm-savebar-count .n { font-family: var(--font-head); font-weight: 900; font-size: 23px; line-height: 1; }
.qm-savebar-count .l { font-size: 13px; color: rgba(255,255,255,.72); font-weight: 600; white-space: nowrap; }
.qm-savebar-discard {
  color: rgba(255,255,255,.78); font-family: var(--font-head); font-weight: 700; font-size: 14px;
  padding: 9px 12px; border-radius: var(--radius-pill); transition: background .15s, color .15s; white-space: nowrap;
}
.qm-savebar-discard:hover { color: #fff; background: rgba(255,255,255,.12); }
.qm-savebar-discard[disabled] { opacity: .5; pointer-events: none; }
.qm-savebar-go { padding: 11px 20px; font-size: 15px; }
@media (max-width: 380px) {
  .qm-savebar-inner { padding-left: 14px; gap: 6px; }
  .qm-savebar-discard { padding: 9px 8px; }
  .qm-savebar-go { padding: 11px 16px; }
}

/* outcome badge (final) */
.qm-outcome {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; font-size: 13px;
  padding: 7px 12px; border-radius: var(--radius-pill);
}
.qm-outcome .dot { width: 9px; height: 9px; border-radius: 50%; }
/* exacto (+3) = verde · resultado (+1) = amarillo */
.qm-outcome.exact { background: rgba(31,138,91,.12); color: #15694A; }
.qm-outcome.exact .dot { background: var(--ok); }
.qm-outcome.result { background: rgba(231,165,15,.14); color: #9A6D00; }
.qm-outcome.result .dot { background: var(--gold); }
.qm-outcome.miss { background: var(--bg-3); color: var(--fg-3); }
.qm-outcome.miss .dot { background: var(--q-grey-300); }
.qm-outcome.none { background: var(--bg-3); color: var(--fg-3); }
.qm-outcome.none .dot { background: var(--q-grey-300); }
.qm-outcome .pts { opacity: .8; font-weight: 800; }

/* compact match-card variant */
.qm-match.compact { padding: 12px 14px; }
.qm-match.compact .qm-tname { font-size: 14px; }
.qm-match.compact .qm-flag { font-size: 24px; }
.qm-match.compact .qm-stepper .v { font-size: 24px; width: 32px; }
.qm-match.compact .qm-bigscore .g { font-size: 26px; }

/* ---------- leaderboard ---------- */
.qm-lb { margin-top: 18px; }
.qm-lb-row {
  /* rank col fits a 2-digit position + 2-digit movement (e.g. "11 ▼10") so it
     never overlaps the name. name col keeps a protected minimum (matches
     PREDS_NAME_MIN in ui.jsx) so the recent-results badges never squeeze it. */
  display: grid; grid-template-columns: 56px minmax(112px, 1fr) auto auto; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px 14px; margin-bottom: 8px; transition: transform .18s, box-shadow .18s;
}
.qm-lb-row:hover { box-shadow: var(--shadow-md); }
.qm-lb-row.me {
  background: linear-gradient(100deg, rgba(221,49,86,.08), rgba(95,56,170,.07));
  border-color: rgba(221,49,86,.4); box-shadow: 0 0 0 2px rgba(221,49,86,.12);
}
.qm-lb-rank { display: flex; align-items: center; gap: 6px; }
.qm-lb-rank .pos {
  font-family: var(--font-head); font-weight: 900; font-size: 18px; color: var(--fg-1); width: 24px; text-align: center;
}
.qm-lb-row.top1 .pos { color: var(--gold); }
.qm-lb-row.top2 .pos { color: #9AA0A6; }
.qm-lb-row.top3 .pos { color: #B06A2C; }
.qm-medal { font-size: 18px; }

.qm-move { display: inline-flex; align-items: center; gap: 1px; font-family: var(--font-head); font-weight: 800; font-size: 11px; }
.qm-move.up { color: var(--ok); }
.qm-move.down { color: var(--accent); }
.qm-move.flat { color: var(--q-grey-300); }

.qm-lb-id { min-width: 0; }
.qm-lb-id .nm { font-family: var(--font-head); font-weight: 800; font-size: 15px; line-height: 1.2; display: flex; align-items: center; gap: 7px; min-width: 0; }
.qm-lb-id .nm .txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qm-lb-id .you { flex: none; font-size: 9px; font-weight: 800; letter-spacing: .08em; color: #fff; background: var(--accent); padding: 2px 6px; border-radius: var(--radius-pill); }
.qm-lb-id .ar { font-size: 12px; color: var(--fg-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qm-lb-right { display: flex; align-items: center; gap: 14px; }
.qm-strip { display: flex; gap: 4px; }
.qm-strip i {
  width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center; font-size: 9px; font-style: normal; font-weight: 900; color: #fff;
}
.qm-strip i.exact { background: var(--ok); }
.qm-strip i.result { background: var(--gold); }
.qm-strip i.miss { background: var(--q-grey-300); }
.qm-strip i.none { background: var(--bg-3); color: var(--q-grey-300); border: 1px solid var(--border); }
@media (max-width: 560px) { .qm-strip { display: none; } }

/* last-3 prediction strip (its own column, between name and points) */
.qm-preds { display: flex; gap: 5px; flex-wrap: nowrap; }
.qm-pred { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 38px; padding: 3px 5px; border-radius: 8px; border: 1px solid var(--border); background: #fff; line-height: 1; }
.qm-pred .fl { font-size: 11px; letter-spacing: -2px; }
.qm-pred b { font-family: var(--font-head); font-weight: 800; font-size: 12px; }
.qm-pred .mk { font-style: normal; font-size: 10px; font-weight: 900; opacity: .9; }
.qm-pred.exact { background: rgba(31,138,91,.12); border-color: rgba(31,138,91,.4); color: #15694A; }
.qm-pred.result { background: rgba(231,165,15,.14); border-color: rgba(231,165,15,.5); color: #9A6D00; }
.qm-pred.miss { background: var(--bg-3); color: var(--fg-3); }
.qm-pred.none { border-style: dashed; color: var(--q-grey-300); background: transparent; }
@media (max-width: 460px) { .qm-pred { min-width: 34px; padding: 3px 4px; } .qm-pred .fl { font-size: 10px; } .qm-pred b { font-size: 11px; } }

.qm-lb-pts { text-align: right; min-width: 52px; }
.qm-lb-pts .p { font-family: var(--font-head); font-weight: 900; font-size: 22px; line-height: 1; letter-spacing: -.02em; }
.qm-lb-pts .pl { font-size: 10px; color: var(--fg-3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* podium variant */
.qm-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin: 20px 0 24px; }
.qm-pod {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 10px; text-align: center;
  position: relative; box-shadow: var(--shadow-sm);
}
.qm-pod .av { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 900; color: #fff; font-size: 17px; }
.qm-pod.p1 { padding-top: 26px; border-color: rgba(231,165,15,.5); box-shadow: 0 0 0 2px rgba(231,165,15,.16), var(--shadow-md); }
.qm-pod.p1 .av { background: linear-gradient(160deg, var(--gold-soft), var(--gold)); width: 56px; height: 56px; }
.qm-pod.p2 .av { background: linear-gradient(160deg, #C9CDD2, #9AA0A6); }
.qm-pod.p3 .av { background: linear-gradient(160deg, #D7A472, #B06A2C); }
.qm-pod .crown { font-size: 22px; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); }
.qm-pod .nm { font-family: var(--font-head); font-weight: 800; font-size: 13px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qm-pod .pp { font-family: var(--font-head); font-weight: 900; font-size: 22px; margin-top: 4px; letter-spacing: -.02em; }
.qm-pod .pp small { font-size: 11px; color: var(--fg-3); font-weight: 700; }
.qm-pod.me { background: linear-gradient(100deg, rgba(221,49,86,.08), rgba(95,56,170,.07)); }

/* ---------- register ---------- */
.qm-reg-wrap { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.qm-reg-hero {
  background: var(--q-mesh); color: #fff; position: relative; overflow: hidden;
  padding: 30px 20px 26px;
}
.qm-reg-hero .iso2 { position: absolute; right: -50px; bottom: -70px; width: 230px; opacity: .14; }
.qm-reg-card-wrap { display: grid; place-items: start center; padding: 0 16px 40px; }
.qm-reg-card {
  width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: 26px 24px; margin-top: -28px; position: relative; z-index: 2;
}
.qm-field { margin-bottom: 16px; }
.qm-field label { display: block; font-family: var(--font-head); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 7px; }
.qm-input {
  width: 100%; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  color: var(--fg-1); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.qm-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(221,49,86,.14); }
.qm-input[readonly] { background: var(--bg-3); color: var(--fg-2); cursor: default; }
.qm-input.err { border-color: var(--error); box-shadow: 0 0 0 3px rgba(221,49,86,.12); }
.qm-readonly-hint { font-size: 12px; color: var(--ok); font-weight: 700; margin-top: 6px; display: inline-flex; gap: 6px; align-items: center; }
.qm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qm-chip-sel {
  padding: 10px 14px; border-radius: var(--radius-pill); font-family: var(--font-head); font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--border); color: var(--fg-2); background: #fff; transition: all .15s;
}
.qm-chip-sel:hover { border-color: var(--border-strong); }
.qm-chip-sel.on { background: var(--q-gradient-h); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.qm-error-msg { background: rgba(221,49,86,.1); color: #B0214A; border: 1px solid rgba(221,49,86,.3); border-radius: var(--radius-md); padding: 11px 14px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }

/* ---------- admin ---------- */
.qm-admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 18px 0 18px; -webkit-overflow-scrolling: touch; }
.qm-admin-tabs button {
  white-space: nowrap; font-family: var(--font-head); font-weight: 700; font-size: 14px; padding: 9px 15px;
  border-radius: var(--radius-pill); color: var(--fg-2); background: #fff; border: 1px solid var(--border); transition: all .15s;
}
.qm-admin-tabs button.on { background: var(--q-plum); color: #fff; border-color: transparent; }
.qm-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.qm-panel h3 { font-family: var(--font-head); font-weight: 800; font-size: 18px; margin: 0 0 4px; }
.qm-panel .ph { font-size: 13px; color: var(--fg-3); margin: 0 0 16px; line-height: 1.5; }
.qm-list { display: flex; flex-direction: column; gap: 8px; }
.qm-listitem { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; }
.qm-listitem .x { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; background: #fff; border: 1px solid var(--border); color: var(--fg-3); display: grid; place-items: center; font-weight: 800; transition: all .15s; }
.qm-listitem .x:hover { background: var(--accent); color: #fff; border-color: transparent; }
.qm-tagdom { font-size: 11px; font-weight: 800; color: var(--brand-2); background: rgba(95,56,170,.1); padding: 3px 8px; border-radius: var(--radius-pill); }
.qm-row2 { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.qm-row-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.qm-mini { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px; display: block; font-family: var(--font-head); }
.qm-sel {
  font-size: 15px; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: #fff; color: var(--fg-1); outline: none;
}
.qm-sel:focus { border-color: var(--accent); }
.qm-invite-out { background: var(--q-plum); color: #fff; border-radius: var(--radius-md); padding: 12px 14px; margin-top: 12px; font-family: var(--font-body); font-size: 13px; word-break: break-all; line-height: 1.7; }
.qm-invite-out .lnk { color: var(--q-magenta-soft); font-weight: 600; }
.qm-divider { height: 1px; background: var(--border); margin: 18px 0; }

/* ---------- import / export panel ---------- */
.qm-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.qm-tpl-btn {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--bg-2);
  border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--fg-1);
  transition: border-color .18s, background .18s, transform .18s;
}
.qm-tpl-btn:hover { border-color: var(--accent); background: #fff; transform: translateY(-1px); }
.qm-tpl-btn span { flex: 1; }
.qm-tpl-btn b { font-family: var(--font-head); font-size: 12px; color: var(--accent); }
.qm-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 28px 16px; border: 2px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--bg-2); cursor: pointer; text-align: center; color: var(--fg-3);
  transition: border-color .18s, background .18s;
}
.qm-drop:hover { border-color: var(--accent); background: #fff; }
.qm-drop b { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--fg-1); }
.qm-drop span { font-size: 12px; }
.qm-import-errs {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-md);
  background: rgba(221,49,86,.07); border: 1px solid rgba(221,49,86,.3); font-size: 13px; color: var(--fg-1);
}
.qm-import-errs b { font-family: var(--font-head); display: block; margin-bottom: 8px; color: var(--accent); }
.qm-import-errs ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.qm-import-ok {
  margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-md); font-family: var(--font-head); font-weight: 700; font-size: 14px;
  background: rgba(21,110,73,.08); border: 1px solid rgba(21,110,73,.3); color: var(--ok); display: flex; align-items: center; gap: 8px;
}

.qm-admin-match { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 8px; background: var(--bg-2); }
.qm-admin-match .info { font-size: 14px; }
.qm-admin-match .info b { font-family: var(--font-head); font-weight: 800; }
.qm-admin-match .info .meta { font-size: 12px; color: var(--fg-3); margin-top: 3px; }
.qm-mini-score { display: flex; align-items: center; gap: 6px; }
.qm-mini-score input { width: 46px; text-align: center; font-family: var(--font-head); font-weight: 800; font-size: 16px; padding: 8px 4px; border: 1.5px solid var(--border); border-radius: 8px; outline: none; }
.qm-mini-score input:focus { border-color: var(--accent); }

/* ---------- toast ---------- */
.qm-toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--qm-tabbar-h) + 16px); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 880px) { .qm-toast-wrap { bottom: 24px; } }
.qm-toast {
  background: var(--q-plum); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 14px;
  padding: 12px 18px; border-radius: var(--radius-pill); box-shadow: var(--shadow-lg); display: inline-flex; align-items: center; gap: 9px;
  animation: qm-toastin .3s cubic-bezier(.4,0,.2,1) both;
}
.qm-toast.ok { background: linear-gradient(120deg, var(--ok), #156E49); }
.qm-toast.gold { background: linear-gradient(120deg, var(--gold-soft), var(--gold)); color: #3b2a00; }
@keyframes qm-toastin { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- empty / misc ---------- */
.qm-empty { text-align: center; padding: 48px 20px; color: var(--fg-3); }
.qm-empty .iso3 { width: 64px; opacity: .5; margin: 0 auto 14px; }
.qm-empty p { font-size: 15px; }

.qm-fadein { animation: qm-fu .45s cubic-bezier(.4,0,.2,1) both; }
@keyframes qm-fu { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- confetti ---------- */
.qm-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.qm-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: qm-fall linear forwards; }
@keyframes qm-fall { to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }

/* ---------- demo switcher ---------- */
.qm-demo-fab {
  position: fixed; left: 16px; right: auto; bottom: calc(var(--qm-tabbar-h) + 84px); z-index: 70;
  width: 50px; height: 50px; border-radius: 50%; background: var(--q-plum); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg); border: 2px solid rgba(255,255,255,.25);
  transition: transform .18s;
}
@media (min-width: 880px) { .qm-demo-fab { bottom: 88px; } }
.qm-demo-fab:hover { transform: scale(1.06); }
.qm-demo-fab svg { width: 22px; height: 22px; }
.qm-demo-panel {
  position: fixed; left: 16px; right: auto; bottom: calc(var(--qm-tabbar-h) + 144px); z-index: 71;
  width: 300px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px; animation: qm-fu .22s ease both;
}
@media (min-width: 880px) { .qm-demo-panel { bottom: 148px; } }
.qm-demo-panel .dh { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.qm-demo-panel .dh b { font-family: var(--font-head); font-weight: 800; font-size: 14px; }
.qm-demo-panel .dh .tagx { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--q-gradient-h); padding: 3px 8px; border-radius: var(--radius-pill); }
.qm-demo-panel .dh .close { margin-left: auto; color: var(--fg-3); font-size: 18px; }
.qm-demo-sec { font-family: var(--font-head); font-weight: 800; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin: 14px 0 7px; }
.qm-demo-sec:first-of-type { margin-top: 0; }
.qm-seg { display: flex; background: var(--bg-3); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.qm-seg button { flex: 1; font-family: var(--font-head); font-weight: 700; font-size: 12px; padding: 7px 6px; border-radius: var(--radius-pill); color: var(--fg-3); transition: all .15s; }
.qm-seg button.on { background: #fff; color: var(--accent); box-shadow: var(--shadow-sm); }
.qm-demo-panel select.qm-sel { width: 100%; font-size: 14px; padding: 9px 10px; }
.qm-demo-reset { width: 100%; margin-top: 14px; font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--accent); padding: 9px; border-radius: var(--radius-md); border: 1px solid var(--border); transition: all .15s; }
.qm-demo-reset:hover { background: rgba(221,49,86,.08); border-color: rgba(221,49,86,.3); }

/* ---------- support / help FAB (abajo-derecha, sobre la barra Guardar todo) ---------- */
.qm-support-fab {
  position: fixed; right: 16px; left: auto; bottom: calc(var(--qm-tabbar-h) + 84px); z-index: 70;
  width: 50px; height: 50px; border-radius: 50%; background: var(--q-gradient-h); color: #fff;
  display: grid; place-items: center; box-shadow: 0 12px 28px rgba(120,40,130,.34); border: 2px solid rgba(255,255,255,.25);
  transition: transform .18s;
}
@media (min-width: 880px) { .qm-support-fab { bottom: 88px; } }
.qm-support-fab:hover { transform: scale(1.06); }
.qm-support-fab svg { width: 22px; height: 22px; }
.qm-modal .ph { margin: 0 0 16px; font-size: 13px; color: var(--fg-3); line-height: 1.5; }

/* ---------- Tabla de posiciones (group standings) ---------- */
.qm-std-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 18px; }
.qm-std-group { background: var(--bg-1, #fff); border: 1px solid var(--border); border-radius: var(--radius-lg, 16px); padding: 12px 12px 8px; box-shadow: var(--shadow-sm); }
.qm-std-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qm-std-head .g { font-family: var(--font-head); font-weight: 900; font-size: 16px; letter-spacing: -.01em; }
.qm-std-table { font-size: 13px; }
.qm-std-row { display: grid; grid-template-columns: 22px 1fr repeat(7, 26px); align-items: center; gap: 2px; padding: 6px 4px; border-radius: 8px; }
.qm-std-row > span:not(.team):not(.pos) { text-align: center; color: var(--fg-2, #444); font-variant-numeric: tabular-nums; }
.qm-std-row .pos { text-align: center; font-weight: 800; color: var(--fg-3); }
.qm-std-row .pts { font-weight: 900; color: var(--fg-1, #111); }
.qm-std-row .team { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.qm-std-row .team .fl { font-size: 16px; flex: none; }
.qm-std-row .team b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.qm-std-row .team small { color: var(--fg-3); font-size: 10px; flex: none; }
.qm-std-th { font-family: var(--font-head); font-weight: 800; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-3); border-bottom: 1px solid var(--border); border-radius: 0; }
.qm-std-th .pts { color: var(--fg-3); }
.qm-std-row.adv { background: linear-gradient(100deg, rgba(95,56,170,.07), rgba(221,49,86,.05)); }
.qm-std-row.third { background: rgba(231,165,15,.10); }

/* ---------- modal (admin popups) ---------- */
.qm-modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(20,12,40,.45); display: grid; place-items: start center; padding: 64px 16px; overflow: auto; backdrop-filter: blur(2px); }
.qm-modal { background: #fff; color: var(--fg-1); border-radius: var(--radius-lg, 16px); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(20,12,40,.3); width: 100%; max-width: 560px; padding: 18px 18px 20px; }
.qm-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.qm-modal-head b { font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.qm-modal-head .close { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--fg-3); transition: background .15s; }
.qm-modal-head .close:hover { background: var(--bg-3, rgba(0,0,0,.05)); }

/* ---------- reglas & FAQ (modal content) ---------- */
.qm-rules { font-size: 14px; line-height: 1.6; color: var(--fg-2); margin-top: 6px; }
.qm-rules h4 {
  font-family: var(--font-head); font-weight: 900; font-size: 17px; letter-spacing: -.01em;
  color: var(--fg-1); margin: 0 0 8px; display: flex; align-items: center; gap: 8px;
}
.qm-rules h5 { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--fg-1); margin: 16px 0 4px; }
.qm-rules p { margin: 4px 0 10px; }
.qm-rules b { color: var(--fg-1); font-weight: 800; }
.qm-rules ol { margin: 6px 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.qm-rules table.qm-rules-pts { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.qm-rules-pts td { border: 1px solid var(--border); padding: 10px 11px; vertical-align: middle; font-size: 13px; }
.qm-rules-pts td.pts { text-align: center; font-family: var(--font-head); font-weight: 900; white-space: nowrap; width: 74px; }
.qm-rules-pts tr.exact td.pts { color: var(--ok); }
.qm-rules-pts tr.result td.pts { color: var(--gold); }
.qm-rules-pts tr.miss td.pts { color: var(--fg-3); }
.qm-rules .note {
  background: var(--q-mist); border-left: 3px solid var(--brand-2); border-radius: 8px;
  padding: 10px 12px; margin: 8px 0 12px; font-size: 13px; color: var(--fg-2);
}
.qm-rules-divider { height: 1px; background: var(--border); margin: 22px 0 18px; }
.qm-rules-faq-q { font-family: var(--font-head); font-weight: 800; color: var(--fg-1); font-size: 14px; margin: 14px 0 2px !important; }

/* ============================================================
   Modal de anuncio "Mis Ligas" (.la-*) — ver leagues-announce.jsx
   Bottom-sheet en móvil, tarjeta centrada ≥880px (patrón de .lg-sheet).
   ============================================================ */
.la-scrim {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(20,12,40,.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
  animation: lg-fade .2s ease both;
}
@media (min-width: 880px) { .la-scrim { align-items: center; padding: 24px; } }

.la-modal {
  position: relative; width: 100%; max-width: 440px; background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; overflow: hidden;
  box-shadow: 0 28px 70px rgba(20,12,40,.42), 0 8px 20px rgba(46,11,61,.18);
  animation: lg-up .28s cubic-bezier(.4,0,.2,1) both;
}
@media (min-width: 880px) {
  .la-modal { border-radius: var(--radius-xl); animation: lg-pop .26s cubic-bezier(.4,0,.2,1) both; }
}

.la-handle {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%); z-index: 4;
  width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.5);
}
@media (min-width: 880px) { .la-handle { display: none; } }

.la-close {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.22); color: #fff;
  border: 1px solid rgba(255,255,255,.34); backdrop-filter: blur(4px);
  display: grid; place-items: center; transition: background .15s, transform .15s;
}
.la-close svg { width: 16px; height: 16px; }
.la-close:hover { background: rgba(255,255,255,.34); }
.la-close:active { transform: scale(.94); }

/* hero */
.la-hero {
  position: relative; padding: 30px 26px; text-align: center; overflow: hidden;
  background: linear-gradient(138deg, var(--q-magenta) 0%, var(--q-purple) 54%, var(--q-violet) 100%);
}
.la-badge {
  display: inline-flex; align-items: center; gap: 7px; position: relative; z-index: 2;
  font-family: var(--font-head); font-weight: 800; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.26);
  padding: 6px 13px; border-radius: var(--radius-pill); margin-bottom: 22px;
}

/* podio estático */
.la-podium { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center; gap: 12px; }
.la-spot { display: flex; flex-direction: column; align-items: center; }
.la-ava {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 900; font-size: 15px; color: #fff;
  border: 2.5px solid rgba(255,255,255,.55); box-shadow: 0 6px 16px rgba(20,12,40,.28); margin-bottom: 8px;
}
.la-ava.la-first { width: 60px; height: 60px; font-size: 18px; border-color: var(--gold); }
.la-ayou { background: linear-gradient(150deg, var(--gold-soft), var(--gold)); color: var(--q-plum); }
.la-a2 { background: linear-gradient(150deg, #BFB3CC, #8A7C92); }
.la-a3 { background: linear-gradient(150deg, #D79A6A, #B06C3C); }
.la-crown { color: var(--gold); margin-bottom: 4px; filter: drop-shadow(0 3px 6px rgba(20,12,40,.35)); }
.la-crown svg { width: 26px; height: 20px; display: block; }
.la-bar {
  width: 64px; border-radius: 12px 12px 0 0; background: rgba(255,255,255,.20);
  display: grid; place-items: start center; padding-top: 7px;
  font-family: var(--font-head); font-weight: 900; font-size: 13px; color: #fff;
}
.la-bar.la-b1 { height: 56px; background: rgba(255,255,255,.30); }
.la-bar.la-b2 { height: 40px; }
.la-bar.la-b3 { height: 28px; }

/* cuerpo */
.la-body { padding: 26px 28px 28px; text-align: center; }
.la-body h1 {
  font-family: var(--font-head); font-weight: 900; font-size: 25px; line-height: 1.16; letter-spacing: -.02em;
  color: var(--fg-1); margin: 0 0 12px; text-wrap: balance;
}
.la-lead { font-size: 15px; line-height: 1.58; color: var(--fg-2); margin: 0 auto 22px; max-width: 34ch; }
.la-lead strong { color: var(--fg-1); font-weight: 800; }

.la-actions { display: flex; flex-direction: column; gap: 10px; }
.la-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 800; font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--q-gradient-h); padding: 16px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-accent); transition: transform .15s, box-shadow .15s, filter .15s;
}
.la-btn-primary svg { width: 17px; height: 17px; }
.la-btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 14px 32px rgba(221,49,86,.4); }
.la-btn-primary:active { transform: scale(.985); }
.la-btn-ghost {
  font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--fg-3);
  padding: 11px; border-radius: var(--radius-md); transition: color .15s, background .15s;
}
.la-btn-ghost:hover { color: var(--fg-1); background: var(--bg-3); }

.la-note {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 16px 0 0; font-size: 12px; font-weight: 600; color: var(--fg-3);
}
.la-note .la-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.la-note svg { width: 14px; height: 14px; color: var(--accent); }
