/* ====================================================================
   BOCASCORE — diseño "La franja"
   ====================================================================
   Un solo tema: azul Boca con amarillo. La banda horizontal amarilla de
   la camiseta es el único recurso decorativo: subraya la cabecera y cruza
   el hero del partido, con los escudos y el marcador sobre ella.

   Colores:   azul #22396B (base) · azul profundo #16264B · amarillo #F9BE3D
   Tipografía: Big Shoulders Display (marcadores, nombres, títulos grandes)
               Archivo (todo lo demás)
   Estructura: superficies planas, radios chicos, sin sombras salvo en menús
   ==================================================================== */

:root {
  --bg: #22396b;
  --bg-deep: #16264b;
  --panel: #2c4478;
  --panel-deep: #1b2d58;

  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.32);

  --ink: #ffffff;
  --muted: #b4c0dc;

  --gold: #f9be3d;
  --gold-dim: rgba(249, 190, 61, 0.16);
  --ink-on-gold: #16264b;
  --away-col: #8fa3c8;
  --red: #f0907a;
  --green: #a9cf9b;

  --radius: 6px;
  --radius-sm: 4px;
  --franja: 4px;

  --font-head: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Big Shoulders Display", "Archivo Narrow", "Arial Narrow", sans-serif;
  --font-narrow: var(--font-head);
  --font-mono: var(--font-head);
}

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

html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--gold); color: var(--ink-on-gold); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }

.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

main.container { padding-top: 40px; padding-bottom: 88px; min-height: 60vh;}

/* CLS: reserve space for async-injected content */
#next-match, #last-result { min-height: 300px; }
#next-intl { min-height: 0; }
#live-match[hidden] { display: none; }
#live-match:not([hidden]) { margin-bottom: 40px; }

/* live — card grande sobre #next-intl, marcador+minuto+detalle Promiedos */
.live-badge { font-size: 14px; font-weight: 700; color: var(--red); display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; background: var(--red); border-radius: 50%; animation: livePulse 1.2s infinite; display: inline-block; }
.live-minute { font-size: 13px; font-weight: 700; background: var(--gold); color: var(--ink-on-gold); padding: 1px 8px; border-radius: 3px; }
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:.45} }
.live-details { margin-top: 16px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.live-details .list-note {
  display: block; font-size: 14px; font-weight: 600; color: var(--muted);
  margin: 24px 0 12px;
}
.live-details .goals li { font-size: 13px; }
#standings-table { min-height: 350px; }
#recent-transfers { min-height: 120px; }


.section { margin-bottom: 56px; }
.empty { color: var(--muted); font-size: 14px; padding: 20px 0; }

.page-title {
  font-family: var(--font-display); font-size: 48px; font-weight: 900; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 28px;
}

.list-note {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin: 24px 0 10px;
}

.error-banner {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 40px 0;
  font-size: 14px;
}
.error-banner code { font-family: var(--font-mono); color: var(--gold); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ------------------------------ cabecera ------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-deep);
  /* la franja en miniatura */
  box-shadow: inset 0 calc(-1 * var(--franja)) 0 var(--gold);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 68px; padding-bottom: var(--franja);
}

.brand {
  font-family: var(--font-display); font-weight: 900; font-size: 30px;
  letter-spacing: 0.04em; line-height: 1; color: var(--gold); flex-shrink: 0;
}
.brand:hover { color: var(--gold); }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav > a {
  font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 8px 10px; white-space: nowrap;
  text-underline-offset: 8px; text-decoration-thickness: 3px;
}
.main-nav > a:hover { color: var(--gold); }
.main-nav > a[aria-current="page"] { color: var(--gold); text-decoration: underline; }

.nav-menu-btn {
  display: none; align-items: center; gap: 8px;
  background: transparent; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 8px 12px; font: 600 14px var(--font-head);
}
.nav-menu-btn:hover { color: var(--gold); border-color: var(--gold); }
.nav-menu-btn svg { display: block; width: 20px; height: 20px; }

.more { position: relative; margin-left: 6px; }
.more-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 7px 12px; font: 600 14px var(--font-head);
}
.more-btn::after {
  content: ''; width: 6px; height: 6px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.more-btn:hover, .more-btn[aria-expanded="true"] { color: var(--gold); border-color: var(--gold); }
.more-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 6px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4); z-index: 100;
}
.more-panel.open { display: flex; flex-direction: column; }
.more-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink); cursor: pointer; text-align: left;
  font: 600 14px var(--font-head);
}
.more-item:hover { background: var(--bg-deep); color: var(--gold); }
.more-item svg { flex-shrink: 0; color: var(--muted); }
.more-item:hover svg { color: var(--gold); }

@media (max-width: 1040px) {
  .nav-menu-btn { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-deep); padding: 8px 24px 16px;
    border-bottom: var(--franja) solid var(--gold);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .main-nav > a[aria-current="page"] { text-decoration: none; box-shadow: inset 3px 0 0 var(--gold); padding-left: 12px; }
  .more { margin: 8px 0 0; }
  .more-btn { display: none; }
  .more-panel { display: flex; flex-direction: column; position: static; background: transparent; border: 0; box-shadow: none; padding: 0; min-width: 0; }
  .more-item { padding: 14px 0; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--line); }
}

/* ------------------------------ tarjetas ------------------------------ */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.home-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 24px; align-items: stretch; }
.home-grid.section { margin-bottom: 32px; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; gap: 32px; } }

.hero-card {
  --crest: 76px;
  --band: 14px;
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--bg-deep); border-radius: var(--radius);
  padding: 20px 24px 22px;
}
.hero-card.is-result { --crest: 44px; --band: 8px; }
.hero-card.is-detail { --crest: 76px; --band: 14px; margin-bottom: 32px; }
.hero-comp { font-size: 14px; font-weight: 600; color: var(--gold); }
@media (max-width: 480px) { .hero-card.is-detail { --crest: 64px; } .hero-card.is-detail .team-name { font-size: 24px; } }

.hero-top { display: flex; align-items: center; gap: 14px; min-height: 24px; }
.kicker { font-size: 14px; font-weight: 600; color: var(--gold); }
a.kicker:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* la franja: cruza la tarjeta detrás de los escudos */
.hero-teams {
  position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px;
  margin: 22px 0 18px;
}
.hero-teams::before {
  content: ''; position: absolute; left: -24px; right: -24px;
  top: calc((var(--crest) - var(--band)) / 2); height: var(--band);
  background: var(--gold); transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-franja-done]) .hero-card.is-next .hero-teams::before { animation: franja-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes franja-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-width: 0; }
.hero-crest {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: var(--crest); height: var(--crest); border-radius: 50%; background: var(--bg-deep);
}
.hero-card .hero-crest .team-logo {
  display: block; margin: 0; width: calc(var(--crest) - 14px); height: calc(var(--crest) - 14px);
  object-fit: contain; vertical-align: top;
}
.hero-card .hero-crest .team-logo[hidden] { display: block !important; visibility: hidden; }

.hero-card .team-name {
  font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.02;
  text-transform: uppercase; letter-spacing: 0.01em; overflow-wrap: anywhere;
}
.hero-card.is-result .team-name { font-size: 22px; }

.hero-plate {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 128px; height: var(--crest); padding: 0 18px;
  background: var(--gold); color: var(--ink-on-gold);
}
.hero-card.is-result .hero-plate { min-width: 84px; padding: 0 10px; }
.hero-score {
  font-family: var(--font-display); font-weight: 900; line-height: 0.9; white-space: nowrap;
  font-size: calc(var(--crest) * 0.82); letter-spacing: 0.01em;
}
.hero-score.is-time { font-size: calc(var(--crest) * 0.7); }
.hero-pens { font-size: 12px; font-weight: 700; margin-top: 2px; }

/* resultado: borde superior de color + placa del marcador según el resultado */
.hero-card.res-win { border-top: 4px solid var(--green); }
.hero-card.res-loss { border-top: 4px solid var(--red); }
.hero-card.res-draw { border-top: 4px solid var(--away-col); }
.hero-card.res-draw .hero-plate { background: var(--away-col); color: var(--bg-deep); }
.hero-card.res-loss .hero-plate { background: var(--bg-deep); color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }

.hero-meta { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 15px; color: var(--muted); }
.hero-meta span:first-child { color: var(--ink); font-weight: 600; }

/* tarjeta clickeable */
.hero-card.is-link { cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
.hero-card.is-link .hero-crest { transition: transform 0.2s ease; }
.hero-card.is-link:hover, .hero-card.is-link:focus-visible {
  transform: translateY(-3px);
  background: #1b2d58;
  box-shadow: inset 0 0 0 2px var(--gold), 0 10px 24px rgba(8, 16, 36, 0.4);
  outline: none;
}
.hero-card.is-link:hover .hero-crest { transform: scale(1.07); }
.hero-card.is-link:active { transform: translateY(-1px); }

/* aparición de los modales (transmisiones, wordle, llaves) */
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.bracket-modal:not([hidden]) .bracket-modal-backdrop { animation: modal-fade 0.22s ease-out both; }
.bracket-modal:not([hidden]) .bracket-modal-content { animation: modal-rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .bracket-modal:not([hidden]) .bracket-modal-backdrop, .bracket-modal:not([hidden]) .bracket-modal-content { animation: none; }
  .hero-card.is-link, .hero-card.is-link .hero-crest { transition: none; }
}

/* enlaces de acción: texto amarillo subrayado */
.more-link {
  display: inline-block; margin-top: 18px;
  font-size: 15px; font-weight: 600; color: var(--gold);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.more-link:hover { color: var(--ink); }

.live-card, .hero-card.is-live { box-shadow: inset 0 0 0 2px var(--gold); }

.mini-transfers .transfer-row { grid-template-columns: 140px auto 1fr auto; padding: 14px 0; }
.mini-transfers .transfer-row:last-child { border-bottom: none; }
.mini-transfers .t-clubs { display: none; }

/* ------------------------------ partidos ------------------------------ */

/* season selector */
#season-select-wrap { margin-bottom: 20px; }

#season-select {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b8c3db' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

#season-select:hover { border-color: var(--ink); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }

.filters button {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filters button:hover { border-color: var(--ink); }

/* activo: amarillo pleno con texto azul, patrón primario del oficial */
.filters button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-on-gold);
}

.match-list { border-top: 1px solid var(--line); }

.match-row {
  display: grid;
  grid-template-columns: 120px 1fr 230px;
  gap: 8px 28px;
  align-items: center;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.match-row:hover { background: var(--panel); color: var(--ink); }

.match-row .m-date,
.match-row .m-comp { font-size: 14px; color: var(--muted); line-height: 1.35; }
.match-row .m-comp { text-align: right; }

.match-center { display: flex; align-items: center; gap: 16px; }

.match-center .team {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.05;
  text-transform: uppercase; letter-spacing: 0.01em;
}
.match-center .team.right { justify-content: flex-end; text-align: right; }
.match-center .team.win { color: var(--gold); }

.score-chip { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1; min-width: 72px; text-align: center; }
.score-chip.tbd { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--muted); }

/* --------------------------- detalle de partido --------------------------- */

.detail-head { text-align: center; margin-bottom: 40px; }

.detail-head .comp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-head .scoreline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 26px 0 18px;
  background: var(--bg-deep);
  border-radius: var(--radius);
  padding: 24px 32px;
}

.detail-head .scoreline .team-name {
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 700;
  text-transform: uppercase;
  flex: 1;
}

.detail-head .scoreline .team-name.right { text-align: right; }

/* marcador display: amarillo, como los títulos del oficial */
.detail-head .big-score {
  font-family: var(--font-mono);
  font-size: clamp(38px, 8vw, 56px);
  line-height: 1;
  color: var(--gold);
}

.two-col { display: grid; grid-template-columns: 5fr 7fr; gap: 16px; align-items: start; }

.lineup h3, .telemetry-block h3 {
  font-family: var(--font-narrow);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-bottom: 18px;
}

.lineup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.lineup-head h3 { margin: 0; }
.formation-tag {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  padding: 5px 10px 4px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--ink-on-gold);
  white-space: nowrap;
}

/* cancha: vertical, ataque arriba y arquero abajo */
.pitch {
  --stripe: rgba(255, 255, 255, 0.035);
  position: relative;
  isolation: isolate;
  max-width: 540px;
  margin: 0 auto 12px;
  aspect-ratio: 5 / 6;
  padding: 6% 2%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--stripe) 50%, transparent 50%) 0 0 / 100% 25%,
    linear-gradient(180deg, #1d3a5e 0%, #183052 100%);
}
.pitch-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  fill: none;
  stroke: rgba(255, 255, 255, 0.26);
  stroke-width: 0.35;
}
.pitch-lines .dot { fill: rgba(255, 255, 255, 0.4); stroke: none; }
.pitch-row { display: flex; justify-content: space-evenly; align-items: flex-start; }
.pitch-player { display: flex; flex-direction: column; align-items: center; width: 0; flex: 1 1 0; min-width: 0; max-width: 92px; }
.pitch-shirt { position: relative; display: block; margin-bottom: 4px; }
/* camiseta: disco azul con la franja amarilla atravesando el número */
.pitch-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(30px, 8.2vw, 40px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(180deg, #2f5ab0 0 22%, var(--gold) 22% 78%, #2f5ab0 78%);
  color: var(--ink-on-gold);
  font-family: var(--font-display);
  font-size: clamp(15px, 4.2vw, 19px);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(8, 16, 36, 0.45);
}
.pitch-name {
  display: block;
  max-width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(12px, 3.3vw, 15px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  color: #fff;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 3px rgba(8, 16, 36, 0.9);
}
.rating {
  position: absolute;
  right: -12px;
  bottom: -3px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(8, 16, 36, 0.5);
}
.rating.high { background: var(--green); color: #0c1524; }
.rating.mid { background: var(--gold); color: var(--ink-on-gold); }
.rating.low { background: var(--red); color: #0c1524; }
.pitch-cap {
  position: absolute;
  left: -6px;
  top: -4px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--gold);
  border: 1px solid var(--gold);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.pitch-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }

.starters { list-style: none; }

.starters li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.starters .num { font-family: var(--font-mono); font-size: 12px; color: var(--gold); min-width: 18px; }

.subs { list-style: none; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.subs li { font-size: 13px; color: var(--ink); padding: 5px 10px; border-radius: var(--radius-sm); background: var(--panel-deep); border: 1px solid var(--line); }

.telemetry-block { margin-bottom: 20px; }

/* posesión */
.poss-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.poss-track { display: flex; height: 10px; background: var(--away-col); border-radius: 2px; overflow: hidden; }
.poss-track i { display: block; height: 100%; background: var(--gold); }

/* filas comparativas */
.cmp { display: grid; grid-template-columns: 44px 1fr 150px 1fr 44px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cmp:last-child { border-bottom: none; }

.cmp-val { font-family: var(--font-mono); font-size: 13px; }
.cmp-val.right { text-align: right; }
.cmp-val.leading { color: var(--gold); }

.cmp-label { font-family: var(--font-narrow); font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); text-align: center; }

.cmp-bar { position: relative; height: 6px; background: rgba(0, 0, 0, 0.22); border-radius: 2px; }
.cmp-bar i { position: absolute; top: 0; height: 100%; border-radius: 2px; }
.cmp-bar.home i { right: 0; background: var(--gold); }
.cmp-bar.away i { left: 0; background: var(--away-col); }

/* goles y cambios en la ficha */
.events-block { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }

.two-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 48px; }

.goals { list-style: none; font-size: 14px; }
.goals li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.goals.right { text-align: right; }

.g-min { color: var(--gold); margin-right: 10px; }
.cambia-por { color: var(--muted); font-size: 12px; }

/* timeline markers (fallback para Promiedos, sin emojis) */
.ev { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.ev-gol { background: var(--gold); }
.ev-amarilla { background: var(--gold); border-radius: 1px; }
.ev-roja { background: var(--red); }
.ev-doble-amarilla { background: linear-gradient(90deg, var(--gold) 50%, var(--red) 50%); border-radius: 1px; }
.ev-penal-errado { background: transparent; border: 2px solid var(--red); }
.ev-anulado { background: #888; }
.ev-ocasion { background: transparent; border: 2px solid rgba(255,255,255,0.5); }
.ev-cambio { background: #888; }

/* timeline emojis + tags */
.ev-emoji { margin-right: 6px; font-size: 14px; vertical-align: middle; }
.ev-tag { font-family: var(--font-narrow); font-size: 13px; letter-spacing: 0.01em; color: var(--muted); margin-left: 6px; }

/* plantilla */
.squad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 24px; }
.player-card { padding: 14px 16px; }
.p-num { font-family: var(--font-display); font-size: 40px; font-weight: 900; line-height: 1; color: var(--gold); display: block; margin-bottom: 6px; }
.p-name { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; }
.p-meta { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 4px; }

/* logos en tablas */
.table-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-right: 6px;
  vertical-align: -4px;
}

/* logos: reserve space even when hidden to prevent CLS */
.team-logo[hidden] {
  visibility: hidden;
  width: 32px;
  height: 32px;
  display: inline !important;
}
.table-logo[hidden] {
  visibility: hidden;
  width: 24px;
  height: 24px;
  display: inline !important;
}

/* tablas de posiciones */
.table-header { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.table-header .list-note { margin-bottom: 0; }
#torneo-table-select {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 28px 6px 10px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b8c3db' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
#torneo-year-select:hover,
#torneo-table-select:hover { border-color: var(--ink); }
.standings-wrap { overflow-x: auto; background: var(--bg-deep); border-radius: var(--radius); padding: 4px 8px 8px; }

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--font-mono);
}

.standings-table thead th { position: sticky; top: 0; background: var(--bg-deep); z-index: 1; }
.standings-table th {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-align: center;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line-strong);
}

.standings-table .th-equipo { text-align: left; min-width: 120px; }
.standings-table .th-trend { min-width: 60px; }

.standings-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.standings-table .td-pos { color: var(--muted); width: 28px; }
.standings-table .td-equipo { text-align: left; font-family: var(--font-head); font-size: 15px; font-weight: 600; }
.standings-table .td-pts { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--gold); }
.standings-table .td-trend { text-align: center; }

.standings-table .boca-row {
  background: rgba(249, 190, 61, 0.08);
}

.standings-table .boca-row .td-equipo {
  color: var(--gold);
  font-weight: 700;
}

.dif-pos { color: var(--green); }
.dif-neg { color: var(--red); }

.pts-ded { font-size: 11px; color: var(--muted); }

.trend-v, .trend-e, .trend-d {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 1px;
}

.trend-v { background: var(--green); }
.trend-e { background: #888; }
.trend-d { background: var(--red); }

/* llaves eliminatorias */
.bracket { background: transparent; }
.bracket-stages {
  display: flex; gap: 44px; align-items: stretch; position: relative;
  overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 0 4px 14px; min-height: 240px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.bracket-stages::-webkit-scrollbar { height: 6px; width: 6px; }
.bracket-stages::-webkit-scrollbar-track { background: transparent; }
.bracket-stages::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

/* conectores */
.bracket-svg-layer { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 1; overflow: visible; }
.bracket-line { fill: none; stroke: var(--line-strong); stroke-width: 1.5; shape-rendering: geometricPrecision; }
.bracket-line.is-boca { stroke: var(--gold); stroke-width: 2; }

.bracket-stage { flex: 0 0 196px; min-width: 196px; display: flex; flex-direction: column; position: relative; scroll-snap-align: start; z-index: 2; }
.bracket-stage-matches { position: relative; flex: none; }
.bracket-stage-matches .bracket-match { position: absolute; left: 0; right: 0; }
.bracket-stage-name {
  position: sticky; top: 0; z-index: 3;
  background: var(--bg-deep);
  font: 600 13px var(--font-head); color: var(--muted);
  padding: 6px 2px 8px; margin-bottom: 8px;
  border-bottom: 2px solid var(--line); white-space: nowrap;
}
.bracket-stage.is-current .bracket-stage-name { color: var(--gold); border-bottom-color: var(--gold); }

.bracket-match {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border-radius: var(--radius);
  transition: box-shadow 0.15s ease;
}
.bracket-match:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.bracket-match.is-boca { box-shadow: inset 3px 0 0 var(--gold); }
.bracket-match.is-boca:hover { box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 1px var(--line-strong); }
.bracket-match.is-tbd { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.bracket-team {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 10px; height: 36px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.bracket-team + .bracket-team { border-top: 1px solid var(--line); }
.bracket-team.loser { color: var(--muted); font-weight: 500; }
.bracket-team.loser .bracket-logo { opacity: 0.55; }
.bracket-team.boca .bracket-team-main span { color: var(--gold); }
.bracket-team.tbd { color: var(--muted); font-style: italic; font-weight: 400; }
.bracket-team-main { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.bracket-team-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bracket-team-score {
  font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1;
  min-width: 16px; text-align: right; flex-shrink: 0; color: var(--ink);
}
.bracket-team.loser .bracket-team-score { color: var(--muted); font-weight: 700; }
.bracket-team.winner .bracket-team-score { color: var(--gold); }
.bracket-team-score .dash { opacity: 0.35; }
.bracket-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; background: #fff; border-radius: 50%; padding: 1px; }
.bracket-logo.is-empty { display: none; }
.bracket-empty { font-size: 14px; color: var(--muted); text-align: center; padding: 28px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* panel de llaves (home) */
.bracket-panel { background: var(--bg-deep); border-radius: var(--radius); padding: 16px 18px 8px; margin-bottom: 40px; }
.bracket-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.bracket-panel-head .list-note { margin: 0; }
.bracket-panel .bracket-stages { max-height: 600px; }
.bracket-toggle {
  display: block; margin: 4px auto 10px; padding: 6px 0; background: transparent; border: 0; cursor: pointer;
  font: 600 14px var(--font-head); color: var(--gold);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.bracket-toggle:hover { color: var(--ink); }
.bracket-panel-body.is-switching { animation: modal-fade 0.25s ease-out both; }
.bracket-torneo-section .standings-scroll { max-height: none; overflow: visible; }
.bracket-torneo-section .bracket-stages { max-height: 70vh; }
@media (max-width: 480px) {
  .bracket-panel { padding: 14px 12px 6px; }
  .bracket-stage { flex-basis: 176px; min-width: 176px; }
  .bracket-stages { gap: 36px; }
  .bracket-panel-head .movimientos-tabs { width: 100%; }
  .bracket-panel-head .mov-tab { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .bracket-panel-body.is-switching { animation: none; } }

/* bracket modal — colores del template (azul royal + amarillo) */
.bracket-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.bracket-modal[hidden] { display: none; }
.bracket-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.bracket-modal-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: 92vh;
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
}
.bracket-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.bracket-modal-head h3 {
  font-family: var(--font-narrow); font-size: 13px; font-weight: 700;
  letter-spacing: 0.01em; color: var(--muted);
}
.bracket-modal-head small { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-left: 10px; }
.bracket-modal-close {
  font-size: 20px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.bracket-modal-close:hover { color: var(--ink); }
.bracket-modal-body { padding: 10px 14px; background: var(--bg); }

/* streams modal */
.stream-modal .bracket-modal-content {
  max-width: 480px;
}
.streams-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stream-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.stream-item:hover {
  background: var(--bg-deep);
  border-color: var(--gold);
  transform: translateX(2px);
}
.stream-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stream-name {
  font-family: var(--font-narrow);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.stream-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.stream-badge {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-deep);
  color: var(--muted);
  border: 1px solid var(--line-strong);
}
.stream-badge.yt { color: #ff5555; border-color: rgba(255, 85, 85, 0.4); }
.stream-badge.kick { color: #53fc18; border-color: rgba(83, 252, 24, 0.4); }

/* wordle modal */
.wordle-modal .bracket-modal-content {
  max-width: 500px;
  background: var(--bg);
}
.wordle-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wordle-action-btn {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--panel);
  color: var(--gold);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wordle-action-btn:hover {
  background: var(--gold);
  color: var(--ink-on-gold);
  border-color: var(--gold);
}
.wordle-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 24px;
  gap: 14px;
}
.wordle-message {
  min-height: 24px;
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--gold);
  text-align: center;
  transition: opacity 0.2s ease;
  opacity: 0;
}
.wordle-message.visible { opacity: 1; }
.wordle-message.error { color: var(--red); }

.wordle-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.wordle-row {
  display: grid;
  grid-template-columns: repeat(var(--word-len, 5), 1fr);
  gap: 6px;
}
.wordle-cell {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-narrow);
  font-size: 20px;
  font-weight: 700;
  background: var(--panel);
  color: var(--ink);
  border: 2px solid var(--line-strong);
  border-radius: 4px;
  user-select: none;
  transition: border-color 0.15s ease, background 0.25s ease, transform 0.25s ease;
}

@media (max-width: 420px) {
  .wordle-cell {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

.wordle-cell.pop {
  animation: wordlePop 0.1s ease-in-out;
  border-color: var(--gold);
}
.wordle-cell.correct {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #ffffff;
}
.wordle-cell.present {
  background: #c99318;
  border-color: #c99318;
  color: #ffffff;
}
.wordle-cell.absent {
  background: rgba(120, 120, 120, 0.25);
  border-color: transparent;
  color: var(--muted);
}
.wordle-cell.flip {
  animation: wordleFlip 0.5s ease;
}
.wordle-row.shake {
  animation: wordleShake 0.4s ease;
}

@keyframes wordlePop {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
@keyframes wordleFlip {
  0% { transform: rotateX(0); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}
@keyframes wordleShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* keyboard */
.wordle-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 440px;
}
.wordle-kb-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.wordle-key {
  height: 42px;
  flex: 1;
  max-width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  padding: 0;
}
.wordle-key.wide-key {
  flex: 1.5;
  max-width: 58px;
  font-size: 11px;
}
.wordle-key:hover {
  background: var(--bg-deep);
  border-color: var(--gold);
}
.wordle-key.correct {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #ffffff;
}
.wordle-key.present {
  background: #c99318;
  border-color: #c99318;
  color: #ffffff;
}
.wordle-key.absent {
  background: rgba(120, 120, 120, 0.25);
  border-color: transparent;
  color: var(--muted);
  opacity: 0.45;
}

/* scroll en tabla anual: 15 filas visibles */
.standings-scroll { max-height: 580px; overflow-y: auto; }
.standings-scroll::-webkit-scrollbar { width: 6px; }
.standings-scroll::-webkit-scrollbar-track { background: transparent; }
.standings-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

/* scroll en listas de partidos */
.match-scroll { max-height: 560px; overflow-y: auto; }
.match-scroll::-webkit-scrollbar { width: 6px; }
.match-scroll::-webkit-scrollbar-track { background: transparent; }
.match-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

/* museo */
.museo-stats { display: flex; gap: 32px; margin-bottom: 40px; }
.museo-stat { text-align: center; }
.museo-stat-num { display: block; font-family: var(--font-display); font-size: 64px; font-weight: 900; color: var(--gold); line-height: 0.9; }
.museo-stat-label { font-family: var(--font-narrow); font-size: 14px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); margin-top: 8px; display: block; }

.museo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; perspective: 900px; }
.museo-card { text-align: center; padding: 28px 16px; }
.museo-card-cant { display: block; font-family: var(--font-display); font-size: 52px; font-weight: 900; color: var(--gold); line-height: 0.9; margin-bottom: 10px; }
.museo-card-name { font-family: var(--font-narrow); font-size: 14px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); }

/* próximo partido internacional */
.next-intl-section { background: var(--bg-deep); border-radius: var(--radius); padding: 16px 20px; }
.intl-head { display: flex; justify-content: space-between; align-items: baseline; }
.intl-head .list-note { margin: 0; color: var(--gold); }
/* secciones de partidos */
.matches-section { background: var(--bg-deep); border-radius: var(--radius); padding: 20px; }
.bracket-torneo-section { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* escudos: borde blanco translúcido, se integran sobre el azul */
.team-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-right: 9px;
  vertical-align: -9px;
}

.match-center .team.right .team-logo { margin-right: 0; margin-left: 9px; }

.hero-card .team-logo { width: 36px; height: 36px; vertical-align: -10px; }
.hero-card .team-name.away .team-logo { margin-right: 0; margin-left: 9px; }

/* ------------------------------ movimientos ------------------------------ */

.movimientos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.movimientos-header .page-title {
  margin: 0;
}

.movimientos-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--bg-deep);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.mov-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
}

.mov-tab:hover {
  color: var(--ink);
  background: var(--panel);
}

.mov-tab.active {
  background: var(--gold);
  color: var(--ink-on-gold);
  border-color: var(--gold);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.mov-tab .tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.15);
  font-weight: 600;
}

.transfer-list { border-top: 1px solid var(--line); }

.transfer-row {
  display: grid;
  grid-template-columns: 96px minmax(160px, 1.2fr) minmax(180px, 1.5fr) minmax(120px, 1fr);
  gap: 6px 18px;
  align-items: baseline;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.transfer-row:hover { background: var(--panel); }

.t-date { font-size: 14px; color: var(--muted); }

.badge {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  padding: 2px 7px;
  text-align: center;
}

/* todos los badges son outline: se diferencian por color, sin fondo */
.badge.alta { color: var(--gold); border-color: var(--gold); }
.badge.baja { color: var(--red); border-color: var(--red); }
.badge.prestamo { color: #38bdf8; border-color: #38bdf8; }
.badge.renovacion { color: var(--green); border-color: var(--green); }

.t-player strong { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; }
.t-player small { font-size: 14px; color: var(--muted); }

.t-clubs { font-size: 14px; color: var(--muted); }

.t-fee { font-size: 15px; font-weight: 600; text-align: right; color: var(--ink); }

/* ------------------------------ pie ------------------------------ */

.site-footer { background: var(--bg-deep); border-top: 1px solid var(--line); padding: 26px 0 34px; }
.site-footer p { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }

.scraper-status { margin-top: 8px; }
.scraper-status.ok { color: var(--green); }
.scraper-status.error { color: var(--red); }

/* ------------------------------ fade listas ------------------------------ */

#list-upcoming, #list-finished, #transfer-list, #squad-list {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s cubic-bezier(0.66, 0.01, 0.18, 1), transform 0.3s cubic-bezier(0.66, 0.01, 0.18, 1);
}
#list-upcoming.is-visible, #list-finished.is-visible, #transfer-list.is-visible, #squad-list.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------ responsive ------------------------------ */

@media (max-width: 960px) {
  /* la fila de movimientos (4 columnas) */
  .transfer-row { grid-template-columns: 1fr auto; }
  .badge { justify-self: start; }
  .t-player { grid-column: 1 / -1; }
  .t-clubs { grid-column: 1 / -1; }
  .t-fee { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 860px) {
  .home-grid, .two-col { grid-template-columns: 1fr; }
  .two-teams { grid-template-columns: 1fr; gap: 2px; }
  .goals.right { text-align: left; }

  /* Remueve scroll anidado en mobile para scroll natural y sin cortes */
  .match-scroll { max-height: none; overflow-y: visible; }

  .match-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 4px; }
  .match-row .m-date { order: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
  .match-row .match-center { order: 2; }
  .match-row .m-comp { order: 3; text-align: left; font-size: 13px; }

  .match-center {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .match-center .team { white-space: normal; word-break: break-word; font-size: 21px; gap: 8px; }
  .match-center .team.right {
    justify-content: flex-end;
    text-align: right;
  }
  .match-center .team-logo { width: 22px; height: 22px; flex-shrink: 0; }
  .score-chip { font-size: 26px; min-width: 52px; }

  /* standings: ocultar columnas menos importantes */
  .standings-table { font-size: 12px; }
  .standings-table .th-trend, .standings-table .td-trend { display: none; }
  .standings-table .cmp { gap: 4px; }

  /* scoreline detalle */
  .detail-head .scoreline { gap: 16px; padding: 18px 16px; flex-wrap: wrap; }
  .detail-head .scoreline .team-name { font-size: 18px; white-space: normal; }
  .detail-head .big-score { font-size: 32px; }
  .detail-head .scoreline .team-logo { width: 28px; height: 28px; }

  /* museo */
  .museo-stats { gap: 16px; }
  .museo-stat-num { font-size: 52px; }
  .museo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

  /* próximo internacional */
  .next-intl-section .match-center {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .match-center .team { font-size: 19px; }
  .score-chip { font-size: 24px; min-width: 44px; }
  .filters { gap: 6px; margin-bottom: 20px; }
  .filters button { padding: 7px 12px; font-size: 13px; }
  /* tabla: solo PJ, DIF y PTS */
  .standings-table th:nth-child(n+4):nth-child(-n+8),
  .standings-table td:nth-child(n+4):nth-child(-n+8) { display: none; }
}

/* ==========================================================================
   BOCASCORE — Armador de 11 Titular (Plantilla Builder)
   ========================================================================== */

/* Manager / Director Técnico */
.manager-section {
  margin-bottom: 24px;
}
.manager-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-width: 360px;
}
.manager-badge {
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--bg-deep);
  color: var(--gold);
  border: 1px solid var(--line-strong);
  padding: 4px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.manager-info {
  display: flex;
  flex-direction: column;
}
.manager-name {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.manager-meta {
  font-size: 12px;
  color: var(--muted);
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-title-row .page-title {
  margin-bottom: 0;
}

.view-switch {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}
.view-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-narrow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.view-btn:hover {
  color: var(--ink);
}
.view-btn.active {
  background: var(--gold);
  color: var(--ink-on-gold);
}

.plantilla-view[hidden] {
  display: none !important;
}

/* Layout del Builder */
body[data-page="plantilla"] .container {
  max-width: 1200px;
}

.builder-layout {
  display: grid;
  grid-template-columns: 210px 1fr 290px;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 600px;
  width: 100%;
}
@media (max-width: 1060px) {
  .builder-layout { grid-template-columns: 190px 1fr 260px; gap: 8px; }
}
@media (max-width: 900px) {
  .builder-layout { grid-template-columns: 1fr; gap: 14px; padding: 10px; }
  .builder-side-menu { border-right: none !important; border-bottom: 1px solid var(--line); }
  .builder-panel { border-left: none !important; border-top: 1px solid var(--line); }
}

/* Side Menu Táctico */
.builder-side-menu {
  background: var(--bg-deep);
  border-right: 1px solid var(--line);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.builder-menu-title {
  font-family: var(--font-narrow);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--muted);
  font-weight: 700;
}
.builder-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.builder-group label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.builder-select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 7px 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
}
.builder-select:focus {
  border-color: var(--gold);
}
.builder-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 7px 8px;
  font-family: var(--font-narrow);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.builder-btn:hover {
  background: var(--panel-deep);
  border-color: var(--gold);
}
.builder-btn-accent {
  background: var(--gold);
  color: var(--ink-on-gold);
  border-color: var(--gold);
}
.builder-btn-accent:hover {
  filter: brightness(1.08);
}
.builder-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}
.builder-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 5px 8px;
  border-radius: 2px;
  color: var(--muted);
}
.builder-pill b {
  color: var(--gold);
}
.builder-help {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* Área de la Cancha */
.builder-pitch-area {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg);
  min-width: 0;
}
.builder-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.builder-legend i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border: 1px solid var(--line-strong);
  vertical-align: middle;
  margin-right: 3px;
}
.builder-pitch {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 0.72;
  background: #1c3622;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  padding: 6px;
  box-shadow: inset 0 0 16px rgba(0,0,0,0.4);
}
.builder-pitch::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.builder-pitch::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.builder-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.builder-circle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.builder-area-top, .builder-area-bot {
  position: absolute;
  left: 50%;
  width: 170px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}
.builder-area-top { top: 6px; transform: translateX(-50%); border-top: none; }
.builder-area-bot { bottom: 6px; transform: translateX(-50%); border-bottom: none; }
.builder-area-top::after, .builder-area-bot::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 68px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.builder-area-top::after { bottom: 0; transform: translateX(-50%); border-bottom: none; }
.builder-area-bot::after { top: 0; transform: translateX(-50%); border-top: none; }

.builder-grid {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 6px 8px;
}
.builder-pitch-row {
  display: flex;
  justify-content: space-evenly;
  gap: 4px;
  width: 100%;
}
.builder-slot {
  flex: 1;
  min-width: 68px;
  max-width: 92px;
  height: 52px;
  background: rgba(18, 20, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.builder-slot.hover {
  border-color: var(--gold);
  background: rgba(46, 51, 38, 0.95);
  transform: scale(1.02);
}
.builder-slot.filled {
  border-color: var(--line-strong);
  background: var(--panel);
}
.builder-slot.invalid {
  animation: builder-shake 0.35s ease;
  border-color: var(--red) !important;
}
.builder-slot .pos {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.builder-slot .hint {
  font-size: 7.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slot-player {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--panel-deep);
  padding: 2px 4px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  gap: 2px;
}
.slot-player-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 100%;
  overflow: hidden;
}
.slot-player-main .slot-num {
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.slot-player-main .slot-name {
  font-size: 9.5px;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}
.slot-player-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.slot-player-meta .slot-badge {
  font-size: 7.5px;
  font-weight: 800;
  padding: 0 3px;
  border-radius: 2px;
  color: #fff;
}
.slot-player-meta .slot-badge.ARQ { background: #22396b; }
.slot-player-meta .slot-badge.DEF { background: #2a593d; }
.slot-player-meta .slot-badge.MED { background: #8a6d25; }
.slot-player-meta .slot-badge.DEL { background: #8a3a3a; }
.slot-player-meta .slot-foot {
  font-size: 7.5px;
  background: var(--bg-deep);
  color: var(--muted);
  padding: 0 3px;
  font-weight: 700;
  font-family: var(--font-mono);
  border-radius: 2px;
}

.slot-remove {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 8px;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 5;
  padding: 0;
}
.builder-slot.filled:hover .slot-remove {
  opacity: 1;
}
.slot-tag {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-deep);
  color: var(--gold);
  padding: 0 4px;
  font-size: 7.5px;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  z-index: 4;
}

/* Panel Derecho de Jugadores */
.builder-panel {
  background: var(--bg-deep);
  border-left: 1px solid var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.builder-panel-head {
  font-family: var(--font-narrow);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--muted);
  font-weight: 800;
}
.builder-search-wrap {
  position: relative;
}
.builder-search-wrap input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 30px 8px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  outline: none;
}
.builder-search-wrap input:focus {
  border-color: var(--gold);
}
.builder-search-wrap .search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translatey(-50%);
  opacity: 0.5;
  font-size: 13px;
}
.builder-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.builder-chip {
  padding: 4px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-family: var(--font-narrow);
  font-size: 10.5px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  border-radius: 2px;
  transition: background 0.12s, color 0.12s;
}
.builder-chip:hover {
  color: var(--ink);
}
.builder-chip.active {
  background: var(--gold);
  color: var(--ink-on-gold);
  border-color: var(--gold);
}
.builder-players {
  display: grid;
  gap: 6px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 2px;
}
.builder-players::-webkit-scrollbar { width: 5px; }
.builder-players::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }

.builder-player-card {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: grab;
  user-select: none;
  position: relative;
  border-radius: var(--radius-sm);
  transition: border-color 0.12s, background 0.12s;
}
.builder-player-card:hover {
  border-color: var(--gold);
  background: var(--panel-deep);
}
.builder-player-card.dragging {
  opacity: 0.45;
}
.builder-player-card.used {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(1);
}
.builder-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-size: 11px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.1);
}
.builder-player-info {
  flex: 1;
  min-width: 0;
}
.builder-player-info b {
  display: block;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}
.builder-player-info small {
  color: var(--muted);
  font-size: 9.5px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 1px;
}
.builder-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  background: var(--bg-deep);
  color: var(--ink);
  border-radius: 2px;
}
.builder-badge.ARQ { background: #22396b; color: #fff; }
.builder-badge.DEF { background: #2a593d; color: #fff; }
.builder-badge.MED { background: #8a6d25; color: #fff; }
.builder-badge.DEL { background: #8a3a3a; color: #fff; }
.builder-meta {
  font-size: 8.5px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  padding: 1px 4px;
  color: var(--muted);
  border-radius: 2px;
}
.builder-drag-handle {
  font-size: 13px;
  opacity: 0.35;
  color: var(--muted);
}
.builder-note {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

/* Toast & Ghost */
.builder-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(80px);
  background: #111;
  color: #fff;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  transition: transform 0.25s ease;
  z-index: 9999;
}
.builder-toast.show {
  transform: translateX(-50%) translateY(0);
}

.builder-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  background: var(--gold);
  color: var(--ink-on-gold);
  padding: 6px 12px;
  font-family: var(--font-narrow);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  transform: translate(-50%, -60%);
  border: 1px solid #1a1a1a;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

@keyframes builder-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
}


/* Armador: sin touch-action el navegador cancela el gesto para scrollear
   (pointercancel) y el arrastre táctil no funcionaba */
.builder-player-card:not(.used) .builder-drag-handle,
.slot-player {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}


/* --------------------------- pestañas del partido --------------------------- */

.detail-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); margin-bottom: 28px; overflow-x: auto; }
.detail-tab {
  flex-shrink: 0; background: transparent; border: 0; cursor: pointer; color: var(--muted);
  font: 600 16px var(--font-head); padding: 12px 18px;
  box-shadow: inset 0 -4px 0 transparent; transition: color 0.15s, box-shadow 0.15s;
}
.detail-tab:hover { color: var(--ink); }
.detail-tab.active { color: var(--gold); box-shadow: inset 0 -4px 0 var(--gold); }
.detail-panel { max-width: 760px; margin: 0 auto; }
.detail-panel[hidden] { display: none; }
.detail-panel .empty { text-align: center; padding: 48px 16px; font-size: 16px; }


/* líderes de la temporada */
.leaders { margin-bottom: 40px; }
.leaders[hidden] { display: none; }
.leaders-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.leaders-head .list-note { margin: 0; }
.leaders-meta { font-size: 13px; color: var(--muted); }
.leaders-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .leaders-grid { grid-template-columns: 1fr; } }
.leader-col { background: var(--bg-deep); border-radius: var(--radius); padding: 18px 20px 14px; display: flex; flex-direction: column; }
.leader-title { font: 600 14px var(--font-head); color: var(--ink); margin-bottom: 14px; }
.leader-title span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.leader-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.leader-row {
  display: grid; grid-template-columns: 26px 1fr auto; column-gap: 10px; row-gap: 5px; align-items: baseline;
}
.leader-rank { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1; color: var(--muted); }
.leader-name { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-name small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.leader-val { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; color: var(--ink); }
.leader-bar { grid-column: 2 / 4; height: 5px; background: var(--line); border-radius: 1px; overflow: hidden; }
.leader-bar i { display: block; height: 100%; background: var(--gold); }
.leader-row:not(.is-first) .leader-bar i { background: var(--away-col); }
.leader-row.is-first .leader-rank, .leader-row.is-first .leader-val { color: var(--gold); }
.leader-row.is-first .leader-name { font-size: 17px; }
.leader-row.is-first .leader-val { font-size: 34px; }
.leader-row.is-first .leader-bar { height: 8px; }
.leader-col .bracket-toggle { margin: auto 0 4px; padding-top: 14px; text-align: left; }
.leader-col .leader-note { margin-top: 12px; }
.leader-row { min-height: 58px; align-content: center; }
.leader-row.is-first { min-height: 69px; }
.leaders-modal .bracket-modal-content { max-width: 480px; }
.leaders-modal-body { padding: 8px 22px 22px; overflow-y: auto; max-height: min(70vh, 640px); }
.leader-note { font-size: 12px; color: var(--muted); margin-top: 8px; }


/* el once histórico */
.once-modal .bracket-modal-content { max-width: 560px; }
.once-body { padding: 16px 14px 24px; display: flex; flex-direction: column; gap: 14px; }
.once-loading { text-align: center; color: var(--muted); padding: 32px 8px; }
.once-clue { text-align: center; }
.once-clue strong { font-family: var(--font-display); font-weight: 800; font-size: 26px; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05; }
.once-clue p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.once-clue-extra { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; color: var(--gold) !important; font-weight: 600; }
.once-clue-extra.muted { color: var(--muted) !important; font-weight: 400; }
.once-pitch { width: 100%; max-width: 420px; margin: 0 auto; }
.once-slot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1 1 0; min-width: 0; max-width: 92px; padding: 0;
  background: none; border: 0; cursor: pointer; color: #fff; font: inherit;
}
.once-disc {
  display: grid; place-items: center; width: clamp(34px, 9vw, 42px); aspect-ratio: 1; border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.55); background: rgba(8, 16, 36, 0.35);
  font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1; color: rgba(255, 255, 255, 0.8);
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.once-slot:hover .once-disc { transform: scale(1.06); }
.once-slot.is-selected .once-disc { border-color: var(--gold); background: var(--gold-dim); }
.once-slot.is-filled .once-disc { border: 2px solid #fff; background: linear-gradient(180deg, #2f5ab0 0 22%, var(--gold) 22% 78%, #2f5ab0 78%); color: var(--ink-on-gold); }
.once-slot.correct .once-disc, .once-slot.revealed .once-disc { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.once-slot.present .once-disc { background: #c99318; border-color: #c99318; color: #fff; }
.once-slot.absent .once-disc { background: #5b6678; border-color: #5b6678; color: #e4e9f2; }
.once-slot.revealed .once-disc { background: #3d5a99; border-color: #3d5a99; }
.once-slot-name {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(12px, 3.3vw, 15px); text-transform: uppercase;
  letter-spacing: 0.02em; line-height: 1.05; text-align: center; overflow-wrap: anywhere; text-shadow: 0 1px 3px rgba(8, 16, 36, 0.9);
}
.once-slot:not(.is-filled) .once-slot-name { opacity: 0.6; font-weight: 600; }
.once-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.once-count { font-size: 14px; color: var(--muted); }
.once-check {
  padding: 9px 20px; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--gold); color: var(--ink-on-gold); font: 700 15px var(--font-head);
}
.once-check:disabled { opacity: 0.4; cursor: not-allowed; }
.once-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.once-chip {
  padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--panel-deep);
  color: var(--ink); font: 600 14px var(--font-head); cursor: pointer; transition: background 0.12s ease, border-color 0.12s ease;
}
.once-chip:hover { border-color: var(--gold); }
.once-chip.is-selected { background: var(--gold); border-color: var(--gold); color: var(--ink-on-gold); }
.once-chip.is-placed { opacity: 0.35; cursor: default; }
.once-chip.k-absent { text-decoration: line-through; color: var(--muted); }
.once-chip.k-present { border-color: #c99318; }
.once-chip.k-correct { border-color: #2e7d32; }
.once-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 12px; color: var(--muted); align-items: center; }
.once-legend span { display: inline-flex; align-items: center; gap: 6px; }
.once-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.once-legend .g { --c: #2e7d32; } .once-legend .y { --c: #c99318; } .once-legend .x { --c: #5b6678; }
.once-final { text-align: center; padding: 14px; border-radius: var(--radius); background: var(--bg-deep); }
.once-final strong { font-size: 17px; color: var(--gold); }
.once-final p { font-size: 14px; margin-top: 4px; }
.once-final .muted { color: var(--muted); }


/* museo: cromo dorado con brillo holográfico al pasar el mouse (como los cromos de Steam).
 * La celda (.museo-card) queda quieta y recibe el mouse; la que se inclina es la cara (.museo-face).
 * Así el borde no "parpadea" cuando la cara se mueve debajo del puntero. */
.museo-card { padding: 0; background: none; border: 0; box-shadow: none; text-align: center; }
.museo-face {
  position: relative; overflow: hidden; isolation: isolate; height: 100%;
  padding: 28px 16px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  backface-visibility: hidden; will-change: transform;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.museo-face::before, .museo-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: 1; }
/* destello blanco que sigue al puntero */
.museo-face::before { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 55%); mix-blend-mode: soft-light; }
/* lámina holográfica: bandas doradas y arcoíris suave que se desplazan con el puntero */
.museo-face::after {
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 250, 215, 0.7) 34%, rgba(255, 200, 90, 0) 42%, rgba(255, 255, 255, 0.6) 52%, transparent 68%),
    repeating-linear-gradient(115deg, rgba(255, 120, 120, 0.22) 0 14px, rgba(255, 220, 120, 0.22) 14px 28px, rgba(120, 220, 170, 0.18) 28px 42px, rgba(120, 160, 255, 0.2) 42px 56px);
  background-size: 260% 260%, 100% 100%;
  background-position: var(--mx, 50%) var(--my, 50%), 0 0;
  mix-blend-mode: color-dodge;
}
.museo-face > * { position: relative; z-index: 2; }
.museo-card-cant, .museo-card-name { transition: color 0.3s ease; }

@media (hover: hover) {
  .museo-card:hover { position: relative; z-index: 3; }
  .museo-card:hover .museo-face {
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.05);
    transition: transform 0.12s ease-out, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    background: linear-gradient(135deg, #fbe08a 0%, #f9be3d 42%, #dc9b1c 100%);
    border-color: #ffe9a8;
    box-shadow: 0 14px 30px rgba(8, 16, 36, 0.55), 0 0 22px rgba(249, 190, 61, 0.45);
  }
  .museo-card:hover .museo-face::before, .museo-card:hover .museo-face::after { opacity: 1; }
  .museo-card:hover .museo-card-cant { color: var(--ink-on-gold); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35); }
  .museo-card:hover .museo-card-name { color: #3a2c08; font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) {
  .museo-card:hover .museo-face { transform: none; }
  .museo-face::before, .museo-face::after { display: none; }
}


/* transición suave entre páginas (View Transitions entre documentos): el header queda fijo y el contenido se desvanece */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
::view-transition-old(root) { animation: 0.15s ease-in both vt-out; }
::view-transition-new(root) { animation: 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both vt-in; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}


/* statdle xeneize */
.statdle-modal .bracket-modal-content { max-width: 520px; }
.sd-body { padding: 16px 14px 24px; display: flex; flex-direction: column; gap: 14px; }
.sd-intro { font-size: 14px; color: var(--muted); text-align: center; }
.sd-clues { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sd-clue { background: var(--bg-deep); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; animation: modal-fade 0.3s ease-out both; }
.sd-clue-label { font-size: 12px; color: var(--muted); }
.sd-clue strong { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.05; color: var(--gold); text-transform: uppercase; overflow-wrap: anywhere; }
.sd-clue.is-hidden { background: transparent; box-shadow: inset 0 0 0 1px var(--line); animation: none; }
.sd-clue.is-hidden strong { color: var(--line-strong); }
.sd-input { position: relative; }
.sd-input input { width: 100%; padding: 11px 14px; font: 500 16px var(--font-head); color: var(--ink); background: var(--panel-deep); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.sd-input input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.sd-sugs { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 5; display: flex; flex-direction: column; background: var(--bg-deep); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 10px 24px rgba(8, 16, 36, 0.5); overflow: hidden; }
.sd-sugs[hidden] { display: none; }
.sd-sugs button { text-align: left; padding: 10px 14px; background: none; border: 0; color: var(--ink); font: 500 15px var(--font-head); cursor: pointer; }
.sd-sugs button:hover, .sd-sugs button:focus-visible { background: var(--panel); outline: none; }
.sd-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sd-count { font-size: 14px; color: var(--muted); }
.sd-skip { padding: 8px 16px; background: transparent; color: var(--gold); border: 1px solid var(--gold); border-radius: var(--radius-sm); font: 600 14px var(--font-head); cursor: pointer; }
.sd-skip:hover:not(:disabled) { background: var(--gold); color: var(--ink-on-gold); }
.sd-skip:disabled { opacity: 0.4; cursor: not-allowed; }
.sd-tries { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.sd-tries li { padding: 4px 10px; border-radius: var(--radius-sm); background: var(--panel-deep); color: var(--muted); font-size: 13px; text-decoration: line-through; }
.sd-final { text-align: center; padding: 14px; border-radius: var(--radius); background: var(--bg-deep); }
.sd-final strong { font-size: 17px; color: var(--gold); }
.sd-final p { font-size: 14px; color: var(--muted); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .sd-clue { animation: none; } }
