:root {
  --bg: #07090e;
  --bg-surface: #0d121d;
  --card: rgba(18, 24, 38, 0.72);
  --card-solid: #121826;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(74, 222, 128, 0.4);
  --text: #f1f5f9;
  --muted: #8b9bb4;
  --accent: #22c55e;
  --primary: #16a34a;
  --purple: #10b981;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(720px 380px at 10% -8%, rgba(34, 197, 94, 0.15), transparent 60%),
    radial-gradient(760px 420px at 100% 2%, rgba(16, 185, 129, 0.17), transparent 62%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 0 16px 60px;
}

body.page-simple { padding-top: 0; }
body.page-simple .appbar { position: relative; top: auto; left: auto; right: auto; margin: 0 0 14px; padding: 7px 16px; }
body.page-simple .appbar-brand h1 { font-size: 1.1rem; }
body.page-simple .appbar .tabs { margin: 6px 0 0; }

#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.top-btn,
.porra-header,
.welcome,
.porra-main,
.porra-footer {
  position: relative;
  z-index: 1;
}

.top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--text);
  text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
@media (hover: hover) and (pointer: fine) { .top-btn:hover { border-color: var(--accent); transform: translateY(-1px); } }

.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1000px; margin: 0 auto 14px; position: relative; z-index: 1; }

/* ---------- Ambiente ---------- */

.grass-band {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  z-index: 60;
  background: repeating-linear-gradient(90deg, #16a34a 0 20px, #15803d 20px 40px);
  box-shadow: 0 2px 14px rgba(22, 163, 74, 0.45);
  animation: grassmove 2.6s linear infinite;
}
@keyframes grassmove {
  from { background-position: 0 0; }
  to { background-position: 40px 0; }
}

.porra-header { position: relative; }

.top-deco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}
.deco-ball { width: 76px; height: 76px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4)); animation: bob 4s ease-in-out infinite; }

.flag-wrap { position: relative; display: inline-flex; }
.flag-wrap::before {
  content: '';
  position: absolute;
  left: -3px;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #e2e8f0, #94a3b8);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.flag-corner {
  display: block;
  width: 40px;
  height: 27px;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transform-origin: left center;
  animation: wind 2.2s ease-in-out infinite;
}
@keyframes wind {
  0%, 100% { transform: skewY(0deg) scaleX(1); }
  20% { transform: skewY(-3deg) scaleX(0.98); }
  45% { transform: skewY(2.5deg) scaleX(1.015); }
  70% { transform: skewY(-2deg) scaleX(0.99); }
  85% { transform: skewY(1.5deg) scaleX(1.01); }
}

.panel { position: relative; overflow: hidden; }
.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.65), rgba(16, 185, 129, 0.65), transparent);
}

.ball { animation: bob 4s ease-in-out infinite; }

.countdown { animation: glowpulse 3.2s ease-in-out infinite; }
@keyframes glowpulse {
  0%, 100% { box-shadow: 0 0 34px rgba(34, 197, 94, 0.10); }
  50% { box-shadow: 0 0 52px rgba(34, 197, 94, 0.22); }
}

.tab.active { position: relative; overflow: hidden; }
.tab.active::after {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 4px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #22c55e, #10b981);
}

.cta-block {
  margin-top: 26px;
  padding: 22px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.10), rgba(16, 185, 129, 0.14));
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.cta-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  transition: color 0.2s;
}
@media (hover: hover) and (pointer: fine) { .back-link:hover { color: var(--accent); } }

.porra-header {
  max-width: 980px;
  margin: 0 auto 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.porra-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ball {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  filter: drop-shadow(0 6px 18px rgba(34, 197, 94, 0.4));
}
.ball-img { width: 56px; height: 56px; display: block; border-radius: 16px; }
.btn-ball { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; display: inline-block; border-radius: 6px; }
.porra-header h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.grad { color: #22c55e; }
.porra-sub { color: var(--muted); font-size: 0.9rem; }
.porra-sub strong { color: var(--text); }

.user-box { display: flex; align-items: center; justify-content: center; gap: 10px; }
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 8px;
  border-radius: 99px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.28);
  font-size: 0.85rem; font-weight: 700;
}
.user-avatar {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.78rem; font-weight: 700;
  color: #050b14;
  background: linear-gradient(135deg, #22c55e, #10b981);
}

/* Contador */
.countdown {
  max-width: 980px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 20px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.10), rgba(16, 185, 129, 0.10));
  border: 1px solid rgba(34, 197, 94, 0.28);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.08);
}
.countdown.closed {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(16, 185, 129, 0.10));
  border-color: rgba(239, 68, 68, 0.35);
}
.cd-side { display: flex; flex-direction: column; line-height: 1.1; }
.cd-label {
  font-family: 'Bricolage Grotesque', monospace;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.cd-timer {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.countdown.closed .cd-timer { color: #f87171; }
.cd-info { flex: 1; min-width: 240px; font-size: 0.95rem; }
.cd-info strong { color: var(--text); }
.cd-info .cd-team { color: var(--accent); font-weight: 700; }

.porra-main {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 26px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  backdrop-filter: blur(12px);
}
.panel + .panel { margin-top: 18px; }
.panel h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.muted { color: var(--muted); font-size: 0.92rem; }
.muted.small { font-size: 0.82rem; }
.hidden { display: none !important; }

/* Auth */
.auth-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.auth-tab {
  border: none; background: transparent; color: var(--muted);
  font-family: inherit; font-size: 0.85rem; font-weight: 700;
  padding: 8px 18px; border-radius: 9px; cursor: pointer; transition: color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}
.auth-tab.active { background: linear-gradient(135deg, #22c55e, #16a34a); color: #050b14; }
.auth-form { display: grid; gap: 12px; margin-top: 16px; max-width: 440px; }
.auth-intro { margin: 6px 0 12px; }
.auth-intro h2 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.25rem; margin-bottom: 8px; }
.auth-steps { margin: 0 0 10px 20px; display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; }
.auth-steps li { padding-left: 2px; }
.auth-form input, .select, .login-row input {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-form input:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}
.select { cursor: pointer; font-size: 0.85rem; padding: 10px 12px; }

.btn-primary {
  padding: 13px 26px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #050b14;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.3);
}
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(34, 197, 94, 0.5); } }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.big { width: 100%; padding: 16px; font-size: 1.02rem; }
a.btn-primary, a.btn-ghost { display: inline-block; text-decoration: none; text-align: center; }

.btn-ghost {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.82rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { color: var(--text); border-color: var(--border-hover); } }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.error { color: #f87171; font-size: 0.86rem; margin-top: 12px; min-height: 1.2em; }

.auth-warn {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.5;
  color: #fde68a;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(239, 68, 68, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.08) inset;
}
.auth-warn b { color: #fbbf24; }
[data-theme="light"] .auth-warn { color: #92400e; }
[data-theme="light"] .auth-warn b { color: #b45309; }

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}
.tab {
  flex: 1;
  min-width: 0;
  border: none; background: transparent; color: var(--muted);
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.84rem; font-weight: 700;
  padding: 10px 14px; border-radius: 9px; cursor: pointer; transition: color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--text); } }
.tab.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(16, 185, 129, 0.16));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
}

/* Picks */
.picks-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.picks-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.match-list { display: grid; gap: 12px; }

.match-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
@media (hover: hover) and (pointer: fine) { .match-row:hover { border-color: rgba(74, 222, 128, 0.25); } }
.match-row.missing { border-color: rgba(239, 68, 68, 0.6); background: rgba(239, 68, 68, 0.06); }

.match-info { min-width: 0; width: 100%; }
.match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 10px;
}
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
/* Nombre del equipo siempre en su propia línea, encima de la forma: así
   todas las filas tienen la misma altura, tenga el equipo un nombre
   corto (Celta) o largo (Real Sociedad). */
.team-main { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; max-width: 100%; }
.team.away .team-main { flex-direction: row-reverse; }
.tname {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}
.crest {
  width: 32px; height: 32px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.crest-fallback {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(16, 185, 129, 0.25));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', monospace; font-size: 0.62rem; font-weight: 700;
  flex-shrink: 0;
}
.match-teams .vs {
  color: var(--purple); font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  flex-shrink: 0;
}
.form { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
.f {
  position: relative;
  width: 20px; height: 20px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', monospace; font-size: 0.62rem; font-weight: 700;
  color: #050b14;
}
.f.v { background: rgba(16, 185, 129, 0.85); }
.f.e { background: rgba(148, 163, 184, 0.75); }
.f.d { background: rgba(239, 68, 68, 0.8); }
.f i {
  position: absolute; right: -3px; bottom: -3px;
  font-size: 0.5rem; font-style: normal; font-weight: 700;
  width: 11px; height: 11px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-solid); color: var(--text);
  border: 1px solid var(--border);
}
.form-empty { font-size: 0.68rem; color: var(--muted); }
.form-arrow { color: var(--muted); font-weight: 700; font-size: 0.8rem; align-self: center; margin-left: 3px; }

.legend {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  line-height: 1.5;
}
.legend b { color: var(--text); }

.match-meta {
  font-size: 0.78rem; color: var(--muted);
  margin-top: 10px; display: flex; gap: 10px;
  align-items: center; justify-content: center; flex-wrap: wrap;
}
.score-chip {
  font-family: 'Bricolage Grotesque', monospace; font-weight: 700; font-size: 0.8rem;
  padding: 2px 10px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border);
  color: var(--text); letter-spacing: 0.02em;
}

.pick-buttons { display: flex; gap: 8px; }
.pick-btn {
  position: relative;
  width: 52px; height: 46px; border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}
@media (hover: hover) and (pointer: fine) { .pick-btn:hover:not(:disabled) { border-color: var(--border-hover); color: var(--text); transform: translateY(-1px); } }
.pick-btn.selected {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent; color: #04120c;
  font-weight: 800;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.45), 0 10px 22px rgba(34, 197, 94, 0.5);
}
.pick-btn:disabled { cursor: not-allowed; }
.pick-btn.dim { opacity: 0.4; }
.pick-btn.correct {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #04120c; border-color: transparent; opacity: 1;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.5);
}
.pick-btn.correct::after {
  content: '✓'; position: absolute; top: -7px; right: -7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #10b981; color: #04120c; font-size: 0.68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.pick-btn.wrong {
  background: rgba(239, 68, 68, 0.85); color: #1a0505;
  border-color: transparent; opacity: 1;
}
.pick-btn.wrong::after {
  content: '✕'; position: absolute; top: -7px; right: -7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #ef4444; color: #fff; font-size: 0.62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

.save-row { margin-top: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.save-row .btn-primary.big { width: auto; flex: 1; min-width: 220px; }
.save-msg { font-size: 0.88rem; font-weight: 600; }
.save-msg.ok { color: #34d399; }
.save-msg.err { color: #f87171; }

/* Ranking */
.panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap; margin-bottom: 4px;
}
.pulse-chip {
  font-family: 'Bricolage Grotesque', monospace; font-size: 0.76rem; font-weight: 700;
  padding: 6px 14px; border-radius: 99px; color: var(--accent);
  background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3);
  white-space: nowrap;
}

.podium {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; align-items: end; margin: 26px 0 20px;
}
.podium:empty { display: none; }
.podium-slot {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 18px 12px 16px; border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  position: relative; overflow: hidden;
}
.podium-slot::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; }
.podium-1 { transform: translateY(-14px); border-color: rgba(251, 191, 36, 0.5); box-shadow: 0 12px 30px rgba(251, 191, 36, 0.15); }
.podium-1::before { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.podium-2 { border-color: rgba(203, 213, 225, 0.45); }
.podium-2::before { background: linear-gradient(90deg, #e2e8f0, #94a3b8); }
.podium-3 { border-color: rgba(217, 119, 6, 0.45); }
.podium-3::before { background: linear-gradient(90deg, #f59e0b, #b45309); }
.podium-medal { font-size: 1.7rem; line-height: 1; }
.podium-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.35rem; font-weight: 700; color: #050b14;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.podium-1 .podium-avatar { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.podium-2 .podium-avatar { background: linear-gradient(135deg, #f1f5f9, #94a3b8); }
.podium-3 .podium-avatar { background: linear-gradient(135deg, #fdba74, #c2410c); }
.podium-name {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1rem;
  max-width: 100%; line-height: 1.25; word-break: break-word; padding: 0 2px;
}
.podium-prize {
  font-family: 'Bricolage Grotesque', monospace; font-weight: 700; font-size: 1.05rem;
  color: #fbbf24; line-height: 1.1;
}
.podium-sub { font-size: 0.72rem; color: var(--muted); }

.rank-cards { display: grid; gap: 10px; margin-top: 6px; }
.rank-card {
  display: grid; grid-template-columns: 34px 44px 1fr auto;
  align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
@media (hover: hover) and (pointer: fine) { .rank-card:hover { transform: translateX(4px); border-color: var(--border-hover); background: rgba(255, 255, 255, 0.05); } }
.rank-card.me { border-color: rgba(34, 197, 94, 0.55); background: linear-gradient(90deg, rgba(34, 197, 94, 0.12), rgba(16, 185, 129, 0.08)); }
.rank-card.player-1 { border-color: rgba(251, 191, 36, 0.45); }
.rank-card.player-2 { border-color: rgba(203, 213, 225, 0.4); }
.rank-card.player-3 { border-color: rgba(217, 119, 6, 0.4); }
.rank-num { font-family: 'Bricolage Grotesque', monospace; font-weight: 700; font-size: 1.05rem; color: var(--muted); text-align: center; }
.rank-card.player-1 .rank-num { color: #fbbf24; }
.rank-card.player-2 .rank-num { color: #cbd5e1; }
.rank-card.player-3 .rank-num { color: #fb923c; }
.rank-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.05rem; color: #050b14;
  background: linear-gradient(135deg, #22c55e, #10b981);
}
.rank-card.player-1 .rank-avatar { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.rank-card.player-2 .rank-avatar { background: linear-gradient(135deg, #f1f5f9, #94a3b8); }
.rank-card.player-3 .rank-avatar { background: linear-gradient(135deg, #fdba74, #c2410c); }
.rank-info { min-width: 0; display: flex; flex-direction: column; }
.rank-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-badge {
  font-size: 0.66rem; font-weight: 700; color: var(--accent);
  border: 1px solid rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.1);
  padding: 1px 7px; border-radius: 99px; margin-left: 6px;
}
.rank-detail { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.rank-score { text-align: right; }
.rank-prize { font-family: 'Bricolage Grotesque', monospace; font-weight: 700; font-size: 1.2rem; color: #fbbf24; line-height: 1.1; }
.rank-prize small { display: block; font-size: 0.62rem; color: var(--muted); font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 26px; font-size: 0.92rem; }

.seg {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  margin: 14px 0 4px;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.seg-btn.active { background: linear-gradient(135deg, #22c55e, #10b981); color: #050b14; }
.jchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.jchip {
  font-family: 'Bricolage Grotesque', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
}
.jchip b { color: var(--accent); margin-left: 3px; }
[data-theme="light"] .seg { background: rgba(15, 23, 42, 0.04); }
[data-theme="light"] .jchip { background: rgba(15, 23, 42, 0.04); }

/* Resumen / premios */
.summary-chart { display: grid; gap: 10px; margin-top: 18px; }
.summary-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; }
.summary-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-bar { height: 22px; border-radius: 7px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.summary-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 7px;
  transition: width 0.6s ease;
}
.summary-amount { font-family: 'Bricolage Grotesque', monospace; font-weight: 700; color: #fbbf24; font-size: 0.95rem; }

/* Participantes */
.participants { display: grid; gap: 14px; margin-top: 18px; }
.participant {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 18px 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.participant::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #22c55e, #10b981);
}
@media (hover: hover) and (pointer: fine) { .participant:hover { border-color: var(--border-hover); transform: translateY(-2px); } }
.participant-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.participant-chevron { margin-left: auto; color: var(--muted); font-size: 0.9rem; transition: transform 0.2s ease; }
.participant-head.open .participant-chevron { transform: rotate(180deg); }
.participant-body { margin-top: 14px; }
.participant-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 1rem; font-weight: 700; color: #050b14;
  background: linear-gradient(135deg, #22c55e, #10b981);
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.participant-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.participant-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.1rem; }
.participant-meta { font-size: 0.78rem; color: var(--muted); }
.participant-badge {
  font-family: 'Bricolage Grotesque', monospace; font-weight: 700; font-size: 0.85rem;
  color: #050b14; background: linear-gradient(135deg, #34d399, #10b981);
  padding: 6px 12px; border-radius: 99px;
  flex-shrink: 0;
}
.participant-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  line-height: 1.5;
}
.participant-summary span { display: block; }
.participant-summary b { font-weight: 700; }
.ps-ok { color: #34d399; }
.ps-ok b { color: #34d399; }
.ps-ko { color: #f87171; }
.ps-ko b { color: #f87171; }
[data-theme="light"] .ps-ok, [data-theme="light"] .ps-ok b { color: #059669; }
[data-theme="light"] .ps-ko, [data-theme="light"] .ps-ko b { color: #dc2626; }
.participant-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 8px; }
.ppick {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  min-width: 0;
}
.ppick .pc { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.ppick .pt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ppick .pv {
  font-family: 'Bricolage Grotesque', monospace; font-weight: 700;
  padding: 1px 8px; border-radius: 6px; background: rgba(34, 197, 94, 0.15); color: var(--accent);
  flex-shrink: 0;
}
.ppick.ok { border-color: rgba(16, 185, 129, 0.5); }
.ppick.ok .pv { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.ppick.ko { border-color: rgba(239, 68, 68, 0.45); }
.ppick.ko .pv { background: rgba(239, 68, 68, 0.18); color: #f87171; }

/* Selector de jornada */
.jornada-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.jbtn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
@media (hover: hover) and (pointer: fine) { .jbtn:hover:not(:disabled) { border-color: var(--accent); transform: scale(1.08); } }
.jbtn:disabled { opacity: 0.3; cursor: not-allowed; }
.jlabel { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 0.95rem; }
.jlabel strong { color: var(--accent); }
.jnote { font-size: 0.76rem; color: var(--amber); font-weight: 600; }

.welcome-cta { margin-top: 16px; position: relative; z-index: 1; }
.hidden-note {
  padding: 14px 16px; border-radius: 12px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px dashed var(--border);
  color: var(--muted); font-size: 0.88rem;
}

/* Instrucciones */
.info-block { margin-top: 20px; }
.info-block h3 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.02rem; margin-bottom: 6px; color: var(--accent); }
.info-block p { color: var(--muted); font-size: 0.95rem; }
.info-block p strong, .info-block p b { color: var(--text); }
.prize-list { list-style: none; display: grid; gap: 8px; margin: 12px 0; }
.prize-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  font-size: 0.9rem;
}
.prize-list li b { color: #fbbf24; font-family: 'Bricolage Grotesque', monospace; }

.porra-footer {
  max-width: 980px; margin: 40px auto 0; text-align: center;
  color: var(--muted); font-size: 0.82rem;
}
.porra-footer::before {
  content: '';
  display: block;
  height: 8px;
  margin-bottom: 18px;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, #16a34a 0 20px, #15803d 20px 40px);
  box-shadow: 0 -2px 14px rgba(22, 163, 74, 0.4);
  animation: grassmove 2.6s linear infinite;
}
.porra-footer a { color: var(--accent); text-decoration: none; }

/* ---------- Tema claro ---------- */

[data-theme="light"] {
  --bg: #eef2f7;
  --bg-surface: #ffffff;
  --card: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --border-hover: rgba(22, 163, 74, 0.45);
  --text: #0f172a;
  --muted: #475569;
  --accent: #16a34a;
  --primary: #16a34a;
  --purple: #059669;
}
[data-theme="light"] body {
  background-color: var(--bg);
  background-image:
    radial-gradient(720px 380px at 10% -8%, rgba(22, 163, 74, 0.13), transparent 60%),
    radial-gradient(760px 420px at 100% 2%, rgba(5, 150, 105, 0.15), transparent 62%);
}
[data-theme="light"] .countdown {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), rgba(5, 150, 105, 0.1));
  border-color: rgba(22, 163, 74, 0.35);
}
[data-theme="light"] .match-row,
[data-theme="light"] .rank-card,
[data-theme="light"] .participant,
[data-theme="light"] .ppick,
[data-theme="light"] .tabs,
[data-theme="light"] .auth-tabs,
[data-theme="light"] .prize-list li,
[data-theme="light"] .step,
[data-theme="light"] .score-chip,
[data-theme="light"] .summary-bar {
  background: rgba(15, 23, 42, 0.035);
}
[data-theme="light"] .welcome {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(5, 150, 105, 0.12));
  border-color: rgba(5, 150, 105, 0.35);
}
[data-theme="light"] .user-chip { background: rgba(22, 163, 74, 0.1); border-color: rgba(22, 163, 74, 0.3); }
[data-theme="light"] .tab.active {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.16), rgba(5, 150, 105, 0.16));
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.35);
}
[data-theme="light"] .pick-btn {
  background: #eef2f7;
  border-color: rgba(15, 23, 42, 0.3);
  color: #0f172a;
  box-shadow: none;
}
[data-theme="light"] .pick-btn:hover:not(:disabled) {
  background: #e2e8f0;
  border-color: #16a34a;
  color: #0f172a;
}
[data-theme="light"] .pick-btn.selected {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.35), 0 8px 20px rgba(22, 163, 74, 0.45);
}
[data-theme="light"] .pick-btn.correct {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #04120c;
}
[data-theme="light"] .pick-btn.wrong {
  background: #ef4444;
  color: #fff;
}
[data-theme="light"] .pick-btn.dim { opacity: 0.35; }

/* ---------- Cabecera / tema ---------- */

.header-tools { display: flex; align-items: center; gap: 12px; }
.top-right-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tools-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.appbar-right {
  position: absolute;
  top: 6px;
  right: 14px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.swipe-hint { font-size: 0.66rem; color: var(--muted); text-align: right; }

.appbar {
  position: relative;
  z-index: 50;
  margin: 0 0 16px;
  padding: 11px 16px 9px;
  background: transparent;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
[data-theme="light"] .appbar { background: transparent; }
.quiniela-main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.appbar-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.appbar-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px; }
.appbar-top .appbar-brand { justify-self: start; min-width: 0; margin-top: 9px; }
.appbar-inicio { justify-self: center; }
.appbar-top .top-right-tools { justify-self: end; }
.appbar-left { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.appbar-brand { text-decoration: none; color: var(--text); flex-shrink: 0; }
.appbar-brand h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.back-mini { font-size: 0.74rem; color: var(--muted); text-decoration: none; font-weight: 700; transition: color 0.2s; }
@media (hover: hover) and (pointer: fine) { .back-mini:hover { color: var(--accent); } }
.appbar .tabs { margin: 10px 0 0; width: 100%; }
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { border-color: var(--accent); transform: scale(1.08); box-shadow: 0 0 16px rgba(34, 197, 94, 0.3); } }

/* ---------- Rediseño despejado ---------- */

.jornada-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.jornada-card.closed { border-color: rgba(239, 68, 68, 0.35); }
.jc-body { flex: 1; min-width: 0; text-align: center; }
.jc-line { display: flex; align-items: baseline; justify-content: center; gap: 12px; flex-wrap: wrap; }
.jc-jornada {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.jc-jornada b { color: var(--text); }
.jc-timer {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.jornada-card.closed .jc-timer { color: #f87171; }
.jc-info { font-size: 0.86rem; color: var(--muted); margin-top: 6px; }
.jnote { display: inline-block; margin-top: 6px; font-size: 0.74rem; color: var(--amber); font-weight: 600; }

.day-head {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 12px 2px 0;
}
.day-head:first-child { margin-top: 0; }

.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.tip { margin-top: 12px; font-size: 0.8rem; color: var(--muted); position: relative; z-index: 1; }
.tip b { color: var(--text); }
.appbar-brand h1 { font-size: clamp(1.05rem, 3vw, 1.3rem); }
.user-chip { padding: 6px 12px 6px 6px; font-size: 0.8rem; }

/* ---------- Aire y espaciado ---------- */

.porra-main { max-width: 900px; gap: 34px; }
.panel { padding: 32px 30px; border-radius: 18px; }
.panel-head { margin-bottom: 12px; }
.picks-head { margin-bottom: 18px; }
.welcome { padding: 28px 30px; }
.jornada-card { padding: 20px 22px; border-radius: 18px; }
.match-list { gap: 14px; }
.match-row { padding: 18px 20px; gap: 20px; }
.legend { margin: 0 0 20px; padding: 12px 16px; }
.match-meta { margin-top: 12px; }
.day-head { margin: 18px 2px 0; }
.participants { gap: 16px; }
.participant { padding: 20px 20px 20px 24px; }
.rank-cards { gap: 12px; }
.rank-card { padding: 16px 18px; cursor: pointer; }
.info-block { margin-top: 26px; }
.prize-list { margin: 16px 0; }
.porra-footer { margin-top: 50px; }

/* ---------- Compacto (partidos) ---------- */

.match-list { gap: 10px; }
.match-row { padding: 12px 14px; gap: 14px; }
.match-teams { gap: 10px; }
.team { gap: 6px; }
.crest { width: 24px; height: 24px; }
.crest-fallback { width: 24px; height: 24px; font-size: 0.55rem; }
.tname { font-size: 0.88rem; max-width: 128px; }
.f { width: 16px; height: 16px; font-size: 0.55rem; border-radius: 4px; }
.f i { width: 9px; height: 9px; font-size: 0.42rem; }
.match-teams .vs { font-size: 0.66rem; padding: 2px 8px; }
.pick-buttons { gap: 6px; }
.pick-btn { width: 44px; height: 40px; font-size: 1rem; }
.match-meta { margin-top: 6px; font-size: 0.72rem; gap: 8px; }
.score-chip { font-size: 0.72rem; padding: 1px 8px; }
.day-head { margin: 12px 2px 0; font-size: 0.68rem; }
.legend { font-size: 0.72rem; padding: 9px 12px; margin-bottom: 14px; }

/* Partido (resultado exacto) */
.partido-match { text-align: center; margin: 18px 0 20px; }
.pm-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.05rem;
}
.pm-row .pm-team:first-child { justify-self: end; }
.pm-row .pm-team:last-child { justify-self: start; }
.pm-row .vs { justify-self: center; }
.pm-team { display: inline-flex; align-items: center; gap: 9px; }
.pm-team .crest { width: 34px; height: 34px; }
.pm-result { margin-top: 12px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.1rem; color: #34d399; }
.pm-pending { margin-top: 12px; font-size: 0.86rem; color: var(--muted); }
.partido-prizes { margin: 14px 0 0; }
.partido-list { display: grid; gap: 10px; margin-top: 6px; }
.partido-entry {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
}
.pe-name { font-weight: 700; flex: 1; }
.pe-score { font-family: 'Bricolage Grotesque', monospace; font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.pe-tag { font-size: 0.78rem; font-weight: 700; color: var(--muted); min-width: 64px; text-align: right; }
.partido-entry.winner { border-color: rgba(16, 185, 129, 0.55); background: linear-gradient(90deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.03)); }
.partido-entry.winner .pe-score { color: #34d399; }
.partido-entry.winner .pe-tag { color: #34d399; }

.porra-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px 16px;
  margin: 16px 0;
}
.porra-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.porra-team-label { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.porra-comp { font-size: 0.82rem; color: var(--muted); }
.porra-pred { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 6px; flex-wrap: wrap; }
.porra-pred input { width: 74px; text-align: center; font-size: 1.2rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-surface); color: var(--text); }
.porra-dash { font-weight: 700; font-size: 1.2rem; color: var(--muted); }
.porra-locked { text-align: center; margin: 12px 0 4px; font-size: 0.86rem; color: var(--muted); font-weight: 600; }

/* Pujas */
.puja-countdown { text-align: center; margin-bottom: 18px; position: relative; }
.puja-refresh { position: absolute; top: 0; right: 4px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--card-solid); color: var(--text); cursor: pointer; font-size: 1.1rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .puja-refresh:hover { border-color: var(--accent); transform: rotate(90deg); } }
.bid-row.mine.losing { border-color: rgba(239, 68, 68, 0.6); background: linear-gradient(90deg, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0.02)); }
.bid-row.mine.losing .bid-amount { color: #f87171; }
.puja-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 12px; border: 2px solid var(--border); background: var(--bg-surface); }
.pj-results { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin: 2px 0 4px; }
.pj-res-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 8px; background: var(--card-solid); border: 1px solid var(--border); border-radius: 10px; color: var(--text); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .pj-res-row:hover { border-color: var(--border-hover); } }
.pj-res-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--bg-surface); }
.pj-res-info { flex: 1 1 auto; min-width: 0; }
.pj-res-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-res-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-res-val { font-weight: 700; font-size: 13px; white-space: nowrap; }
.pj-res-empty { font-size: 13px; color: var(--muted); padding: 4px; }
.pj-base-info { font-size: 14px; color: var(--muted); }
.pj-base-info b { color: var(--accent); font-size: 16px; }

/* Buscador de jugadores: píldora redondeada con lupa integrada (CSS puro,
   sin tocar el HTML de las páginas que lo usan) y un resplandor verde al
   enfocar, más vistoso que el recuadro plano de antes. */
.market-search {
  width: 100%;
  margin: 12px 0 6px;
  padding: 13px 16px 13px 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b9bb4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 15px center;
  background-size: 17px;
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.market-search::placeholder { color: var(--muted); }
.market-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16), 0 3px 14px rgba(0, 0, 0, 0.12); }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.mcard { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-solid); color: var(--text); cursor: pointer; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease; text-align: center; }
@media (hover: hover) and (pointer: fine) { .mcard:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25), 0 0 20px rgba(34, 197, 94, 0.18); } }
.mcard-img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--bg-surface); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.mcard-photo { position: relative; width: 72px; height: 72px; }
.mcard-photo .mcard-img { width: 72px; height: 72px; }
.mcard-badge { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 9px; line-height: 1; color: #fff; border: 1px solid var(--card-solid); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.mcard-badge.st-inj { background: #ef4444; }
.mcard-badge.st-doubt { background: #f59e0b; }
.mcard-badge.st-red { width: 8px; height: 11px; border-radius: 2px; background: #dc2626; right: 2px; bottom: 0; }
.mcard-body { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.mcard-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard-roles { display: flex; gap: 5px; margin: 3px 0 4px; }
.mcard-role { background: rgba(255,255,255,0.12); color: var(--text); font-size: 0.62rem; font-weight: 800; padding: 2px 7px; border-radius: 6px; letter-spacing: 0.03em; }
.mcard-role.multi { }
/* Badges de posición compartidos (POR/DEF/MED/DEL) */
.posb { display: inline-flex; align-items: center; justify-content: center; font-size: 0.56rem; font-weight: 800; letter-spacing: 0.03em; color: #fff; padding: 1px 6px; border-radius: 6px; line-height: 1.45; background: #475569; }
.posb-por { background: #16a34a; }
.posb-def { background: #b45309; }
.posb-med { background: #0891b2; }
.posb-del { background: #be123c; border-bottom-right-radius: 0; }
.posb.mcard-role, .posb.pos-badge, .posb.hist-pos, .posb.pj-preview-pos, .posb.merc-row-role, .posb.mbc-role { color: #fff; }
.mcard-team { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 0.78rem; color: var(--muted); }
.mcard-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard-crest { width: 16px; height: 16px; object-fit: contain; flex: 0 0 auto; }
.mcard-val { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; color: var(--accent); font-size: 0.95rem; margin-top: 2px; }
.mcard-trend { font-size: 0.74rem; font-weight: 700; }
.mcard-trend.up { color: #10b981; }
.mcard-trend.down { color: #ef4444; }
.mcard-trend.flat { color: var(--muted); }

/* ==== Compacto / menos vertical (móvil) ==== */
.puja-countdown { margin-bottom: 10px; }
.puja-photo { width: 84px; height: 84px; margin-bottom: 6px; }
.puja-pcard { margin: 4px 0 2px; gap: 2px; }
.puja-pcard-name { font-size: clamp(1.05rem, 4.6vw, 1.4rem); margin-top: 4px; }
.puja-pcard-team { font-size: 0.8rem; }
.puja-pcard-val { font-size: 0.92rem; }
.mcard { padding: 10px 8px; gap: 6px; border-radius: 12px; }
.mcard-photo, .mcard-photo .mcard-img, .mcard-img { width: 54px; height: 54px; }
.mcard-name { font-size: 0.82rem; }
.mcard-team { font-size: 0.72rem; }
.mcard-crest { width: 14px; height: 14px; }
.mcard-val { font-size: 0.86rem; margin-top: 1px; }
.mcard-trend { font-size: 0.68rem; }
.market-grid { gap: 9px; }
.panel { padding: 16px 14px; }
.bid-list { gap: 6px; margin-top: 10px; }
.bid-row { padding: 9px 12px; }
.bid-lead { font-size: 1.05rem; text-align: center; margin: 8px 0; }
.bid-lead b { font-size: 1.16em; color: #34d399; }
.bid-row.top { padding: 15px 15px; font-size: 1.06rem; border-width: 2px; }
.bid-row.top .bid-amount { font-size: 1.2rem; }
.bid-row.top .bid-user { font-weight: 800; }
.bid-time { font-size: 0.7rem; color: var(--muted); margin-left: auto; margin-right: 10px; }
.hb-time { font-size: 0.7rem; color: var(--muted); margin-right: 8px; }
.market-more { grid-column: 1 / -1; margin-top: 6px; }

.pj-suggest-wrap { position: relative; }
.pj-suggest-wrap input { width: 100%; padding: 16px 18px; font-size: 1.08rem; border-radius: 14px; }
.pj-suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; margin-top: 4px; max-height: 320px; overflow-y: auto; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.pj-sug-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; background: transparent; border: 0; border-bottom: 1px solid var(--border); color: var(--text); cursor: pointer; }
.pj-sug-row:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .pj-sug-row:hover { background: rgba(34, 197, 94, 0.1); } }
.pj-sug-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--bg-surface); }
.pj-sug-info { flex: 1 1 auto; min-width: 0; }
.pj-sug-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-sug-meta { display: flex; align-items: center; gap: 5px; font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.pj-sug-crest { width: 16px; height: 16px; object-fit: contain; flex: 0 0 auto; }
.pj-sug-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; }
.pj-sug-val { font-weight: 700; font-size: 0.85rem; color: var(--accent); white-space: nowrap; }
.pj-sug-trend { font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.pj-sug-trend.up { color: #10b981; }
.pj-sug-trend.down { color: #ef4444; }
.pj-sug-trend.flat { color: var(--muted); }
.market-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 20px; }

.hist-list { display: grid; gap: 12px; margin-top: 12px; }
.hist-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.hist-card.winner { border-color: rgba(16, 185, 129, 0.55); background: linear-gradient(90deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.03)); }
.hist-date { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 0.85rem; color: var(--accent); text-transform: capitalize; }
.hist-main { display: flex; align-items: center; gap: 14px; }
.hist-bids { display: grid; gap: 4px; border-top: 1px solid var(--border); padding-top: 8px; }
.hist-bid { display: flex; justify-content: space-between; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.hb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-amt { font-weight: 700; color: #ef4444; white-space: nowrap; }
.hist-bid.top .hb-amt { color: #34d399; }
.hist-bid.top .hb-name { color: var(--text); }
.hist-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--bg-surface); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); font-family: 'Bricolage Grotesque', sans-serif; }
.hist-body { flex: 1 1 auto; min-width: 0; }
.hist-player { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.05rem; }
.hist-line { font-size: 0.86rem; color: var(--muted); }
.hist-line b { color: var(--text); }
.hist-tag { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.hist-amount { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; color: var(--accent); font-size: 1.1rem; white-space: nowrap; }
.hist-imgcol { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; max-width: 88px; }
.hist-pos { font-size: 0.62rem; font-weight: 800; color: #22c55e; text-align: center; line-height: 1.15; }
.puja-won { text-align: center; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(16, 185, 129, 0.5); background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.03)); margin: 6px 0 16px; }
.pw-ico { font-size: 1.7rem; line-height: 1; }
.pw-txt { font-size: 0.8rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.pw-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(1.4rem, 6.5vw, 2rem); margin-top: 2px; }
.pw-amt { font-family: 'Bricolage Grotesque', monospace; font-weight: 700; font-size: 1.2rem; color: #34d399; margin-top: 4px; }
.pj-preview { display: flex; align-items: center; gap: 10px; }
.pj-preview-photo { position: relative; }
.pj-preview-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pj-preview-meta { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.pj-preview-crest { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
.pj-preview-val { font-weight: 700; color: var(--accent); }
.pj-base-info .up, .pj-preview-val .up { color: #10b981; }
.pj-base-info .down, .pj-preview-val .down { color: #ef4444; }
.pj-preview .puja-photo { margin: 0; width: 64px; height: 64px; }
.pj-preview-name { font-weight: 600; font-size: 14px; }
.pj-preview-pos { font-size: 0.78rem; font-weight: 800; color: var(--accent); margin: 1px 0 2px; }
.puja-player { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.4rem, 6vw, 2rem); font-weight: 700; text-align: center; }
.puja-player .stars { color: #fbbf24; font-size: 0.85em; margin-left: 6px; letter-spacing: 2px; }
.puja-base { color: var(--muted); margin-top: 4px; text-align: center; }
.puja-base b { color: var(--text); }
.puja-pcard { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 8px 0 4px; }
.puja-pcard-photo { position: relative; }
.puja-pcard-photo .puja-photo { margin: 0; }
.puja-pcard-name { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.3rem, 5vw, 1.8rem); font-weight: 700; text-align: center; margin-top: 6px; }
.puja-pcard-team { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; }
.puja-pcard-crest { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.puja-pcard-val { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.puja-pcard-val .up { color: #10b981; }
.puja-pcard-val .down { color: #ef4444; }
.puja-pcard-photo .puja-photo { border-width: 3px; }
.puja-pcard-roles { display: flex; gap: 5px; margin-top: 2px; }
.pos-badge { background: rgba(255,255,255,0.12); color: var(--text); font-size: 0.68rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; letter-spacing: 0.03em; }
.pos-badge.multi { }
.puja-timer { font-family: 'Bricolage Grotesque', monospace; font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 700; color: var(--accent); line-height: 1.1; }
.puja-timer.closed { color: #f87171; }
.puja-timer.small { font-size: clamp(1.2rem, 5.5vw, 1.7rem); }
.puja-sub { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.bid-list { display: grid; gap: 8px; margin-top: 16px; }
.bid-row { display: flex; align-items: center; gap: 12px; padding: 11px 15px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); }
.bid-row.top { border-color: rgba(16, 185, 129, 0.55); background: linear-gradient(90deg, rgba(16, 185, 129, 0.13), rgba(16, 185, 129, 0.02)); }
.bid-user { flex: 1; font-weight: 700; }
.bid-amount { font-family: 'Bricolage Grotesque', monospace; font-weight: 700; color: #ef4444; }
.bid-row.top .bid-amount { color: #34d399; }
.bid-form { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.bid-form input { flex: 1; min-width: 150px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-surface); color: var(--text); font-size: 1rem; font-family: inherit; outline: none; }
.bid-form input:focus { border-color: var(--accent); }
.bid-lead { text-align: center; margin: 16px 0 12px; font-size: 1rem; color: var(--muted); }
.bid-lead b { color: var(--text); }
.bid-note { text-align: center; color: var(--amber); font-size: 0.85rem; margin: 10px 0 2px; font-weight: 600; }
.outbid { text-align: center; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(245, 158, 11, 0.5); background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.04)); margin: 14px 0 8px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.outbid-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--amber); }
.outbid-sub { font-size: 0.9rem; color: var(--muted); }
.bid-extras { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.share-btn { display: block; margin: 18px auto 0; }
.puja-sep { height: 1px; background: var(--border); margin: 16px 0 12px; }
.puja-sec { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 0.95rem; color: var(--text); margin: 0 0 8px; }
.puja-base { margin-top: 10px; }
.puja-pcard { margin: 8px 0 4px; }
.puja-photo { margin-bottom: 8px; }
.bid-lead { margin: 4px 0 10px; }
.bid-list { gap: 8px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: #10b981; color: #04120c; font-weight: 800; padding: 14px 22px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none; transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease; z-index: 200; font-family: 'Bricolage Grotesque', sans-serif; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.winner-box { text-align: center; padding: 22px; border-radius: 16px; border: 1px solid rgba(16, 185, 129, 0.5); background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.03)); margin-top: 18px; }
.winner-box .w-name { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.5rem; font-weight: 700; }
.winner-box .w-amount { font-family: 'Bricolage Grotesque', monospace; font-weight: 700; font-size: 1.3rem; color: #34d399; margin-top: 6px; }

@media (max-width: 1140px) {
  .top-right-tools { gap: 10px; }
}
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ---------- Bienvenida ---------- */

.welcome {
  max-width: 980px;
  margin: 0 auto 22px;
  border-radius: 20px;
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(16, 185, 129, 0.14));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}
.welcome::before {
  content: '';
  position: absolute;
  right: -80px; top: -90px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent 70%);
  pointer-events: none;
}
.welcome::after {
  content: '';
  position: absolute;
  left: -70px; bottom: -100px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.3), transparent 70%);
  pointer-events: none;
}
.welcome-top { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.welcome-ball { width: clamp(76px, 17vw, 112px); height: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)); animation: bob 3.5s ease-in-out infinite; }
.welcome-trophy { font-size: 2rem; margin-left: auto; filter: drop-shadow(0 4px 10px rgba(251, 191, 36, 0.5)); animation: bob 3s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.welcome h2 { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.2rem, 3.5vw, 1.6rem); }
.welcome-sub { color: var(--muted); font-size: 0.95rem; }
.welcome-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}
.step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 0.8rem;
  color: #050b14;
  background: linear-gradient(135deg, #22c55e, #10b981);
  flex-shrink: 0;
}
.step p { font-size: 0.85rem; color: var(--muted); }
.step p b { color: var(--text); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
  .panel { padding: 14px 12px; }
  .panel + .panel { margin-top: 12px; }
  .puja-timer { font-size: clamp(1.5rem, 7.5vw, 2.2rem); }
  .puja-sub { font-size: 0.74rem; margin-top: 4px; }
  .puja-refresh { width: 30px; height: 30px; font-size: 0.95rem; }
  .puja-photo { width: 64px; height: 64px; margin-bottom: 4px; }
  .puja-pcard-name { font-size: 1.08rem; margin-top: 2px; }
  .puja-pcard-team { font-size: 0.74rem; }
  .puja-pcard-val { font-size: 0.86rem; }
  .pos-badge { font-size: 0.6rem; padding: 2px 6px; }
  .btn-primary.big { padding: 11px; font-size: 0.92rem; }
  .bid-note { font-size: 0.76rem; margin: 8px 0 2px; }
  .bid-list { gap: 4px; margin-top: 8px; }
  .bid-row { padding: 7px 10px; }
  .bid-row.top { padding: 10px 12px; font-size: 0.98rem; }
  .bid-row.top .bid-amount { font-size: 1.05rem; }
  .bid-lead { font-size: 0.95rem; margin: 6px 0; }
  .bid-extras { gap: 6px; margin-top: 6px; }
  .puja-base { font-size: 0.82rem; }
  .share-btn { margin-top: 8px; }
  .market-search { padding: 11px 14px 11px 36px; font-size: 0.9rem; margin: 8px 0 4px; background-position: 13px center; background-size: 15px; }
  .market-grid { grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 7px; margin-top: 8px; }
  .mcard { padding: 8px 6px; gap: 4px; border-radius: 10px; }
  .mcard-photo, .mcard-photo .mcard-img, .mcard-img { width: 44px; height: 44px; }
  .mcard-name { font-size: 0.74rem; }
  .mcard-team { font-size: 0.66rem; }
  .mcard-val { font-size: 0.8rem; }
  .mcard-trend { font-size: 0.62rem; }
  .mcard-role { font-size: 0.56rem; padding: 1px 5px; }
  .mcard-crest { width: 12px; height: 12px; }
  .mcard-badge { width: 12px; height: 12px; font-size: 8px; }
  .match-row { grid-template-columns: 1fr; padding: 12px; }
  .pick-buttons { justify-content: stretch; }
  .pick-btn { flex: 1; width: auto; }
  .jornada-card { padding: 14px; gap: 10px; }
  .tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; padding: 6px; }
  .tabs .tab { font-size: 0.66rem; padding: 8px 4px; line-height: 1.15; white-space: normal; }
  .appbar-brand h1 { font-size: 1rem; }
  .user-chip { padding: 5px 10px 5px 5px; font-size: 0.74rem; }
  .podium { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .podium-slot { padding: 14px 6px 12px; }
  .podium-avatar { width: 44px; height: 44px; font-size: 1.1rem; }
  .podium-name { font-size: 0.82rem; }
  .podium-1 { transform: translateY(-8px); }
  .rank-card { grid-template-columns: 26px 38px 1fr auto; gap: 10px; padding: 11px 12px; }
  .rank-avatar { width: 38px; height: 38px; font-size: 0.92rem; }
  .tname { max-width: 108px; font-size: 0.85rem; }
  .crest { width: 26px; height: 26px; }
  .summary-row { grid-template-columns: 90px 1fr auto; }
  .match-meta { margin-top: 8px; }
}
/* ---------- Barra de jornada v3 (quiniela + porra) ---------- */
.jornada-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
.jc-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.jc-jornada { font-size: .8rem; letter-spacing: .12em; }
.jc-jornada b { font-size: 1.5rem; color: var(--accent); margin-left: 4px; }
.jornada-card .jbtn { width: auto; height: 38px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: .85rem; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.45); color: var(--text); }
.jornada-card .jbtn i { font-style: normal; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.jornada-card .jb-prev { justify-self: start; }
.jornada-card .jb-next { justify-self: end; }
.jornada-card .jbtn:disabled { opacity: .25; }
.jornada-card .jc-timer { font-size: clamp(1.8rem, 8vw, 2.6rem); }
.jornada-card .jc-info { margin-top: 0; font-size: .78rem; }
.hist-jornada { font-family: 'Bricolage Grotesque', sans-serif; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 18px 2px 8px; }
.hist-jornada:first-child { margin-top: 0; }

/* ---------- Botones de jornada v4 + tarjeta de porra ---------- */
.jc-nav { grid-template-columns: 64px 1fr 64px; }
.jornada-card .jbtn { height: auto; width: 64px; padding: 0; border: 0; background: none; flex-direction: column; gap: 4px; justify-content: center; }
.jornada-card .jbtn i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; line-height: 1; padding-bottom: 4px; color: #06210f; background: linear-gradient(145deg, #4ade80, #16a34a); box-shadow: 0 6px 16px rgba(34,197,94,.35); transition: transform .15s; }
.jornada-card .jbtn:active:not(:disabled) i { transform: scale(.92); }
.jornada-card .jbtn span { font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .06em; min-height: 1em; }
.jornada-card .jbtn:disabled { opacity: .3; }
.jornada-card .jbtn:disabled i { box-shadow: none; background: rgba(127,127,127,.35); }
.jornada-card .jb-prev, .jornada-card .jb-next { justify-self: center; }
.jc-jornada { font-size: .78rem; display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.jc-jornada b { font-size: 2.1rem; margin: 2px 0 0; }

.porra-card.pc2 { position: relative; overflow: hidden; text-align: center; padding: 26px 18px 20px; border-radius: 24px; background: var(--card); border: 1px solid var(--border); }
.pc-bg { position: absolute; top: 0; bottom: 0; width: 46%; background-repeat: no-repeat; background-size: auto 130%; opacity: .2; pointer-events: none; filter: blur(.5px); }
.pc-bg-l { left: 0; background-position: -30% center; -webkit-mask-image: linear-gradient(90deg, #000 20%, transparent); mask-image: linear-gradient(90deg, #000 20%, transparent); }
.pc-bg-r { right: 0; background-position: 130% center; -webkit-mask-image: linear-gradient(270deg, #000 20%, transparent); mask-image: linear-gradient(270deg, #000 20%, transparent); }
.pc-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pc-comp { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.pc-label { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pc-when { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: .85rem; color: var(--accent); margin-bottom: 8px; }
.pc-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: 100%; margin-bottom: 14px; }
.pc-t { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(1.05rem, 5vw, 1.5rem); line-height: 1.1; color: var(--text); overflow-wrap: anywhere; }
.pc-vs { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(1.4rem, 7vw, 2rem); color: var(--text); }
.pc2 .porra-pred { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pc2 .porra-pred input { width: 64px; height: 54px; text-align: center; font-size: 1.5rem; font-weight: 800; border-radius: 14px; }
.pc2 .pc-save { margin-top: 10px; width: 100%; max-width: 320px; justify-content: center; }
.pc2 .porra-locked { margin-top: 4px; font-size: .85rem; color: var(--muted); }
.pc2 .partido-list { width: 100%; margin-top: 14px; text-align: left; }
.pc2 .empty { text-align: center; font-size: .85rem; margin: 6px 0 0; }

/* ---------- v5: escudos como imagen + barra de jornada plana ---------- */
.pc-bg { top: 50%; bottom: auto; width: 170px; height: 170px; transform: translateY(-50%); object-fit: contain; opacity: .22; background: none; -webkit-mask-image: none; mask-image: none; filter: none; }
.pc-bg-l { left: -46px; right: auto; }
.pc-bg-r { right: -46px; left: auto; }
.pc2 .empty { margin: 4px 0 0; padding: 0; }
.pc2 .partido-list { margin-top: 10px; }
.pc2 .porra-pred { margin-top: 4px; }
.pc2 .pc-save { box-shadow: none; border-radius: 14px; }

.jc-nav { grid-template-columns: 1fr auto 1fr; gap: 0; background: rgba(127,127,127,.1); border: 1px solid var(--border); border-radius: 18px; padding: 4px; }
.jornada-card .jbtn { width: auto; height: 46px; flex-direction: row; justify-content: center; gap: 6px; padding: 0 12px; border-radius: 14px; background: none; }
.jornada-card .jbtn i { width: auto; height: auto; background: none; box-shadow: none; padding: 0; color: var(--accent); font-size: 1.7rem; font-style: normal; }
.jornada-card .jbtn span { font-size: .95rem; font-weight: 800; color: var(--text); letter-spacing: .02em; }
@media (hover: hover) and (pointer: fine) { .jornada-card .jbtn:hover:not(:disabled), .jornada-card .jbtn:active:not(:disabled) { background: rgba(34,197,94,.16); transform: none; } }
.jornada-card .jbtn:disabled { opacity: .3; }
.jornada-card .jbtn:disabled i { background: none; }
.jornada-card .jb-prev { justify-self: stretch; justify-content: flex-start; }
.jornada-card .jb-next { justify-self: stretch; justify-content: flex-end; }
.jc-jornada { flex-direction: row; gap: 6px; align-items: baseline; padding: 0 10px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.jc-jornada b { font-size: 1.6rem; margin: 0; }

/* ---------- v6: selector de jornadas con chips + escudos degradados ---------- */
.jc-jornada { border: 0; padding: 0; flex-direction: row; justify-content: center; gap: 8px; align-items: baseline; }
.jc-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: nowrap; }
.jc-chip { min-width: 52px; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--border); background: rgba(127,127,127,.1); color: var(--muted); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: .92rem; cursor: pointer; }
.jc-chip.on { background: linear-gradient(145deg, #4ade80, #16a34a); border-color: transparent; color: #06210f; box-shadow: 0 4px 12px rgba(34,197,94,.35); }
.jc-chip:active { transform: scale(.95); }

.pc-bg { width: 68%; height: auto; aspect-ratio: 1; top: 50%; transform: translateY(-50%); opacity: .95; }
.pc-bg-l { left: -22%; -webkit-mask-image: linear-gradient(90deg, #000 25%, transparent 92%); mask-image: linear-gradient(90deg, #000 25%, transparent 92%); }
.pc-bg-r { right: -22%; -webkit-mask-image: linear-gradient(270deg, #000 25%, transparent 92%); mask-image: linear-gradient(270deg, #000 25%, transparent 92%); }
.pc-t, .pc-vs { font-weight: 900; color: var(--text); letter-spacing: -.01em; }
.pc-t { font-size: clamp(1.15rem, 5.6vw, 1.7rem); }
.pc-vs { font-size: clamp(1.7rem, 8vw, 2.4rem); }
.pc-teams { margin: 6px 0 18px; padding: 8px 0; }

/* ---------- Historial de la porra (centrado) ---------- */
.hist-jornada { text-align: center; }
.porra-card.hx { text-align: center; padding: 22px 16px 14px; border-radius: 22px; margin-bottom: 14px; }
.hx-date { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: capitalize; margin-bottom: 12px; }
.hx-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.hx-team { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 900; font-size: clamp(.95rem, 4.4vw, 1.25rem); line-height: 1.1; color: var(--text); }
.hx-crest { width: 52px; height: 52px; object-fit: contain; }
.hx-res { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 900; font-size: clamp(1.8rem, 9vw, 2.6rem); color: var(--text); white-space: nowrap; }
.hx-final { margin: 10px 0 14px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.hx-entry { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 12px; margin-top: 8px; border-radius: 16px; border: 1px solid var(--border); background: rgba(127,127,127,.08); }
.hx-entry.exacto { border-color: rgba(34,197,94,.6); background: rgba(34,197,94,.12); }
.hx-entry.signo { border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.1); }
.hx-entry.fallo { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.07); }
.hx-name { font-weight: 800; font-size: 1.02rem; color: var(--text); }
.hx-pred { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--text); }
.hx-why { font-size: .8rem; font-weight: 600; color: var(--muted); line-height: 1.3; }
.porra-card.hx .empty { text-align: center; }

.jc-chips { align-items: center; }
.jc-arrow { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(34,197,94,.5); background: rgba(34,197,94,.12); color: var(--accent); font-size: 1.6rem; line-height: 1; padding: 0 0 3px; cursor: pointer; font-weight: 800; }
.jc-arrow:disabled { opacity: .25; cursor: default; }
.jc-arrow:active:not(:disabled) { transform: scale(.94); }
.jc-chip { min-width: 48px; }

.hist-chips { margin-bottom: 4px; }
.jc-chip.hist-old { display: block; margin: 10px auto 0; }

.total-box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 12px; margin: 4px 0 14px; border-radius: 18px; border: 1px solid rgba(245,158,11,.5); background: rgba(245,158,11,.1); text-align: center; }
.total-box small { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.total-box b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.8rem; font-weight: 900; color: #f59e0b; }

.pc2 .pc-lock { margin: 6px 0 0; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--border); background: rgba(127,127,127,.1); font-weight: 700; font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- Partido de la quiniela estilo ficha ---------- */
.match-row.mr2 { position: relative; overflow: hidden; display: block; text-align: center; padding: 22px 16px 16px; border-radius: 22px; }
.mr2 .mr-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mr2 .pc-teams { margin: 4px 0 14px; padding: 8px 0; }
.mr2 .pick-buttons { display: flex; gap: 10px; width: 100%; justify-content: center; }
.mr2 .pick-btn { flex: 1; width: auto; max-width: 120px; height: 52px; border-radius: 14px; font-weight: 900; font-size: 1.15rem; backdrop-filter: blur(4px); }
.participant-badge { white-space: nowrap; }

/* Selección bien visible: relleno verde completo */
.pick-btn.selected, .pick-btn.selected:disabled, [data-theme="light"] .pick-btn.selected {
  background: linear-gradient(145deg, #4ade80, #16a34a) !important;
  border-color: #16a34a !important;
  color: #06210f !important;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.45) !important;
  transform: scale(1.04);
  opacity: 1 !important;
}
.pick-btn.selected::after { content: " ✓"; font-size: .8em; }

/* Forma de cada equipo (v2) */
.pc-col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.mr2 .form { gap: 4px; align-items: center; flex-wrap: nowrap; }
.mr2 .f { width: 24px; height: 24px; border-radius: 50%; font-size: .7rem; font-weight: 900; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.mr2 .f.v { background: linear-gradient(145deg, #22c55e, #15803d); }
.mr2 .f.e { background: linear-gradient(145deg, #94a3b8, #64748b); }
.mr2 .f.d { background: linear-gradient(145deg, #f87171, #dc2626); }
.mr2 .f i { width: 12px; height: 12px; font-size: .5rem; right: -4px; bottom: -4px; }
.mr2 .form-arrow { font-size: .75rem; margin-left: 1px; }
.mr2 .form-empty { font-size: .72rem; }
.mr2 .pc-teams { align-items: start; }
.mr2 .pc-vs { align-self: center; }
@media (max-width: 430px) { .mr2 .f { width: 21px; height: 21px; font-size: .62rem; } .mr2 .form { gap: 3px; } .mr2 .form-arrow { display: none; } }

/* Participantes de la porra */
.porra-card.pp { padding: 16px 14px 12px; border-radius: 22px; margin-bottom: 14px; }
.pp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pp-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 900; font-size: 1rem; color: #06210f; background: linear-gradient(145deg, #4ade80, #16a34a); box-shadow: 0 4px 12px rgba(34,197,94,.35); flex: none; }
.pp-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 900; font-size: 1.2rem; color: var(--text); line-height: 1.1; }
.pp-sub { font-size: .78rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.pp-match { padding: 12px 10px; margin-top: 8px; border-radius: 16px; border: 1px solid var(--border); background: rgba(127,127,127,.08); text-align: center; }
.pp-match.exacto { border-color: rgba(34,197,94,.6); background: rgba(34,197,94,.12); }
.pp-match.signo { border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.1); }
.pp-match.susp { opacity: .7; border-style: dashed; }
.pp-lbl { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 8px; }
.pp-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.pp-t { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: .88rem; line-height: 1.1; color: var(--text); }
.pp-t .crest, .pp-t .crest-fallback { width: 36px; height: 36px; }
.pp-score { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 900; font-size: 1.7rem; color: var(--text); padding: 4px 12px; border-radius: 12px; background: rgba(127,127,127,.14); white-space: nowrap; }
.pp-note { margin-top: 8px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.pp-note.ok { color: #16a34a; }

/* Participantes: aciertos más visuales */
.ps-ok, .ps-ko { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.ps-pills { display: contents; font-style: normal; }
.ps-pills i { font-style: normal; font-weight: 800; font-size: .78rem; padding: 3px 10px; border-radius: 999px; }
.ps-ok .ps-pills i { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 2px 8px rgba(34,197,94,.35); }
.ps-ko .ps-pills i { background: rgba(239,68,68,.16); color: #f87171; }
.ppick.ok { background: linear-gradient(135deg, rgba(34,197,94,.28), rgba(22,163,74,.12)); border-color: rgba(34,197,94,.8); box-shadow: 0 0 0 1px rgba(34,197,94,.35), 0 4px 14px rgba(34,197,94,.22); }
.ppick.ok .pt { color: var(--text); font-weight: 800; }
.ppick.ok .pv { background: #22c55e; color: #fff; box-shadow: 0 2px 6px rgba(34,197,94,.5); }
.ppick.ok .pv::after { content: " ✓"; font-size: .8em; }

/* Sin rayas de color en paneles y participantes */
.panel::before, .participant::before { display: none; }

/* Pulido de móvil: escudos de fondo más suaves (no pelean con el texto) y pestañas en una sola línea */
.pc-bg { opacity: .1; width: 140px; height: 140px; }
@media (max-width: 480px) {
  .cx-sub .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cx-sub .tabs::-webkit-scrollbar { display: none; }
  .cx-sub .tab { white-space: nowrap; padding: 12px 7px; font-size: 0.74rem; flex: 0 0 auto; }
}
/* Escudos de fondo de cada partido: bien visibles pero sin tapar nombres */
.pc-bg { opacity: .26; width: 150px; height: 150px; }
.pc-bg-l { left: -50px; }
.pc-bg-r { right: -50px; }
/* Escudos de fondo más visibles (antes muy transparentes) */
.pc-bg { opacity: .5; width: 165px; height: 165px; }
.pc-bg-l { left: -34px; }
.pc-bg-r { right: -34px; }
.pc-bg { opacity: .85; width: 180px; height: 180px; }
.pc-bg-l { left: -28px; }
.pc-bg-r { right: -28px; }
@media (max-width: 560px) {
  .pc-bg { opacity: .7; width: 115px; height: 115px; }
  .pc-bg-l { left: -42px; }
  .pc-bg-r { right: -42px; }
}

/* ======================================================================
   BOLETO · cada partido es una entrada de quiniela con talón numerado,
   perforación y casillas 1 · X · 2 para marcar.
   ====================================================================== */
.match-list { gap: 14px; }
.match-row.bq {
  --bq-paper: #101826; --bq-paper-2: #0c121d; --bq-ink: #f3f6fa; --bq-mute: #8fa0b8; --bq-line: rgba(255,255,255,.14);
  --bq-stub: rgba(34,197,94,.16); --bq-stub-ink: #4ade80; --bq-box: rgba(255,255,255,.04);
  position: relative; display: flex; align-items: stretch; gap: 0; padding: 0; border: 0; border-radius: 22px; overflow: visible; text-align: left;
  color: var(--bq-ink);
  background: linear-gradient(160deg, var(--bq-paper), var(--bq-paper-2));
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 12px 28px rgba(0,0,0,.35);
  -webkit-mask: radial-gradient(circle 10px at 66px 0, transparent 97%, #000) top / 100% 51% no-repeat, radial-gradient(circle 10px at 66px 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 10px at 66px 0, transparent 97%, #000) top / 100% 51% no-repeat, radial-gradient(circle 10px at 66px 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
}
[data-theme="light"] .match-row.bq {
  --bq-paper: #fffdf6; --bq-paper-2: #f8f1de; --bq-ink: #17201b; --bq-mute: #6b705f; --bq-line: rgba(23,32,27,.2);
  --bq-stub: #dff3e5; --bq-stub-ink: #14532d; --bq-box: rgba(255,255,255,.7);
  box-shadow: 0 1px 0 #fff inset, 0 10px 24px rgba(60,50,20,.16);
}
.match-row.bq:hover { border: 0; }
.bq-stub { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--bq-stub); color: var(--bq-stub-ink); border-radius: 22px 0 0 22px; position: relative; }
.bq-stub::after { content: ""; position: absolute; top: 14px; bottom: 14px; right: -1px; border-right: 2px dashed var(--bq-line); }
.bq-stub small { font-family: 'Bricolage Grotesque', sans-serif; font-size: .55rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.bq-stub b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.9rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.bq-main { flex: 1; min-width: 0; padding: 12px 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.bq-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .74rem; font-weight: 700; color: var(--bq-mute); }
.bq-time { font-variant-numeric: tabular-nums; }
.bq-st { padding: 2px 9px; border-radius: 999px; background: var(--bq-box); border: 1px solid var(--bq-line); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--bq-ink); }
.bq-st.live { background: #dc2626; border-color: #dc2626; color: #fff; }
.bq-st.fin { color: var(--bq-mute); }
.bq-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 4px; }
.bq-team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bq-team .crest, .bq-team .crest-fallback { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.bq-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: .95rem; line-height: 1.1; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.bq-mid { align-self: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: .72rem; letter-spacing: .14em; color: var(--bq-mute); padding: 0 2px; margin-top: -14px; }
.bq-mid.score { font-size: 1.7rem; letter-spacing: -.01em; color: var(--bq-ink); font-variant-numeric: tabular-nums; }
.bq .form { gap: 3px; flex-wrap: nowrap; justify-content: center; align-items: center; }
.bq .f { width: 18px; height: 18px; border-radius: 50%; font-size: .56rem; font-weight: 900; color: #fff; box-shadow: none; }
.bq .f i { display: none; }
.bq .f.v { background: #16a34a; } .bq .f.e { background: #64748b; } .bq .f.d { background: #dc2626; }
.bq .form-arrow, .bq .form-empty { display: none; }
.bq-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bq-pick { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 58px; border-radius: 14px; border: 2px solid var(--bq-line); background: var(--bq-box); color: var(--bq-ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s cubic-bezier(.23,1,.32,1), background-color .15s, border-color .15s, color .15s; }
.bq-pick b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.45rem; font-weight: 800; line-height: 1; }
.bq-pick small { font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bq-mute); }
.bq-pick:active:not(:disabled) { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .bq-pick:hover:not(:disabled) { border-color: #22c55e; } }
.bq-pick.selected, .bq-pick.selected:disabled { background: #22c55e; border-color: #22c55e; color: #052e14; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(34,197,94,.38); }
.bq-pick.selected small { color: rgba(5,46,20,.75); }
.bq-pick:disabled { cursor: default; }
.bq-pick.dim { opacity: .35; }
.bq-pick.correct, .bq-pick.correct:disabled { background: #22c55e; border-color: #22c55e; color: #052e14; opacity: 1; }
.bq-pick.correct small { color: rgba(5,46,20,.75); }
.bq-pick.correct::after { content: "✓"; position: absolute; top: -8px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #052e14; color: #4ade80; font-size: .7rem; font-weight: 900; }
.bq-pick.wrong, .bq-pick.wrong:disabled { background: #dc2626; border-color: #dc2626; color: #fff; opacity: 1; }
.bq-pick.wrong small { color: rgba(255,255,255,.8); }
.bq-pick.wrong::after { content: "✕"; position: absolute; top: -8px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #450a0a; color: #fca5a5; font-size: .66rem; font-weight: 900; }
.match-row.bq.missing .bq-stub { background: rgba(239,68,68,.28); color: #fca5a5; }
.match-row.bq.missing .bq-picks { outline: 2px solid rgba(239,68,68,.7); outline-offset: 4px; border-radius: 16px; }
@media (max-width: 380px) { .bq-stub { width: 54px; } .bq-stub b { font-size: 1.5rem; } .bq-team .crest, .bq-team .crest-fallback { width: 46px; height: 46px; } .bq-pick small { display: none; } .bq-pick { height: 50px; } }
@media (prefers-reduced-motion: reduce) { .bq-pick { transition: none; } }

/* ======================================================================
   QUINIELA · rediseño v2: boleto compacto (sin talón), escudos grandes,
   acierto/fallo a todo color, detalle plegable, resumen de tu jornada
   ====================================================================== */
.match-row.bq {
  --bq-paper: #131c2c; --bq-ink: #f3f6fa; --bq-mute: #9aa9be; --bq-line: rgba(255,255,255,.12); --bq-box: rgba(255,255,255,.05);
  display: block; border-radius: 22px; background: var(--bq-paper); border: 1px solid var(--bq-line);
  -webkit-mask: none; mask: none; box-shadow: 0 10px 26px rgba(0,0,0,.28); overflow: hidden;
  transition: background-color .2s ease, box-shadow .2s ease;
}
[data-theme="light"] .match-row.bq { --bq-paper: #ffffff; --bq-ink: #111827; --bq-mute: #5b6677; --bq-line: rgba(15,23,42,.12); --bq-box: rgba(15,23,42,.045); box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 10px 24px rgba(15,23,42,.08); }
.match-row.bq.hit { background: linear-gradient(180deg, rgba(34,197,94,.16), rgba(34,197,94,.05)), var(--bq-paper); border-color: rgba(34,197,94,.6); }
.match-row.bq.miss { background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(239,68,68,.04)), var(--bq-paper); border-color: rgba(239,68,68,.55); }
.bq-stub { display: none; }
.bq-main { padding: 14px 14px 14px; gap: 12px; }
.bq-head { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bq-meta { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--bq-mute); text-align: left; }
.bq-st { padding: 3px 10px; border-radius: 999px; background: var(--bq-box); border: 1px solid var(--bq-line); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--bq-ink); }
.bq-st.hit { background: #16a34a; border-color: #16a34a; color: #fff; }
.bq-st.miss { background: #dc2626; border-color: #dc2626; color: #fff; }
.bq-chev { width: 18px; height: 18px; color: var(--bq-mute); transition: transform .2s cubic-bezier(.23,1,.32,1); }
.match-row.bq.open .bq-chev { transform: rotate(180deg); }
.bq-teams { grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.bq-team { gap: 8px; }
.bq-team .crest, .bq-team .crest-fallback { width: 68px; height: 68px; }
.bq-name { font-size: .95rem; font-weight: 800; }
.bq-mid { font-size: .8rem; color: var(--bq-mute); }
.bq-mid.score { font-size: 2.1rem; font-weight: 800; color: var(--bq-ink); }
.bq-picks { gap: 8px; }
.bq-pick { min-height: 54px; border-radius: 14px; }
.bq-more { display: none; padding-top: 12px; border-top: 1px solid var(--bq-line); }
.match-row.bq.open .bq-more { display: block; animation: bqOpen .2s cubic-bezier(.23,1,.32,1); }
@keyframes bqOpen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.bq-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bq-form { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bq-form-n { font-size: .78rem; font-weight: 800; color: var(--bq-ink); letter-spacing: .04em; }
.bq-form-note { margin: 8px 0 0; text-align: center; font-size: .7rem; color: var(--bq-mute); }
.bq-others { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.bq-oth { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--bq-box); border: 1px solid var(--bq-line); font-size: .78rem; color: var(--bq-ink); }
.bq-oth b { font-weight: 800; }
.bq-oth.ok { background: rgba(34,197,94,.18); border-color: rgba(34,197,94,.55); }
.bq-oth.ko { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.5); }
@media (max-width: 380px) { .bq-team .crest, .bq-team .crest-fallback { width: 58px; height: 58px; } .bq-mid.score { font-size: 1.8rem; } }
@media (prefers-reduced-motion: reduce) { .match-row.bq.open .bq-more { animation: none; } .bq-chev { transition: none; } }

/* Resumen de tu jornada */
.my-recap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.my-recap[hidden] { display: none; }
.rc-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px; border-radius: 16px; background: rgba(127,127,127,.12); text-align: center; min-width: 0; }
.rc-cell b { font: 800 1.2rem/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; white-space: nowrap; }
.rc-cell:nth-child(2) b { color: #16a34a; }
.rc-cell small { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Cabecera de jornada más compacta */
.jornada-card { padding: 12px 14px; gap: 8px; }
.jornada-card .jc-timer { font-size: clamp(1.5rem, 6vw, 2rem); }
.jornada-card.closed .jc-timer { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; background: rgba(239,68,68,.14); width: fit-content; margin: 0 auto; }
.jornada-card.closed .jc-info { display: none; }

/* Clasificación: sin texto de ayuda, podio solo con 3+, filas desplegables */
#rankingHint { display: none; }
.podium:empty { display: none; }
.rank-item { display: flex; flex-direction: column; }
.rank-det { padding: 10px 2px 4px; }
.rank-det.hidden { display: none; }
.rank-card { cursor: pointer; }

/* Sin deslizamiento lateral en ninguna pantalla (Edu, 01/11/2026): la página solo se mueve hacia arriba y abajo.
   Las tiras con su propio scroll (escudos, filtros) siguen deslizándose dentro de su caja. */
html { overflow-x: hidden; overscroll-behavior-x: none; }
body { overflow-x: clip; overscroll-behavior-x: none; max-width: 100%; }
