/* Estadísticas CASLA — tema clean (papel editorial)
   Azul más oscuro que el mock original (#1f63b3 → #123f78) en acentos, botones y bandas. */

:root {
  --paper: #ffffff;
  --ink: #14181f;
  --azul: #0c335f;
  --azul-2: #123f78;
  --azul-3: #e4ecf4;
  --azul-deep: #071525;
  --rojo: #c81e3a;
  --rojo-2: #e2314a;
  --rojo-3: #fdecee;
  --rojo-deep: #8c1526;
  --azul-casla: #1a365d;
  --rojo-casla: #e1262d;
  --gris: #5c6470;
  --gris-claro: #8a919c;
  --linea: #e3e5e9;
  --panel: #f7f6f3;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.theme-clean {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.theme-clean a { color: inherit; text-decoration: none; }
body.theme-clean img { max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gris);
}
.eyebrow.rojo { color: var(--rojo); }
.eyebrow.azul { color: var(--azul-2); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- HEADER ---------- */
body.theme-clean > header,
.site-header {
  border-bottom: 1px solid var(--linea);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
  overflow: visible;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-with-alert { display: flex; align-items: center; gap: 4px; flex: none; }
.logo-mark {
  width: 48px; height: 48px; border-radius: 50%;
  flex: none; object-fit: contain; display: block;
  background: transparent;
}
.logo-text {
  font-family: Fraunces, serif; font-weight: 600; font-size: 19px; letter-spacing: .01em;
}
.logo-text span { color: var(--rojo-2); }

.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav > a,
.nav-drop > summary {
  position: relative;
  font-size: 13.5px; font-weight: 500; color: var(--gris);
  padding-bottom: 4px;
  list-style: none;
  cursor: pointer;
}
.site-nav > a::after,
.nav-drop > summary::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--rojo-2); transform: scaleX(0); transform-origin: right;
  transition: transform .25s ease;
}
.site-nav > a:hover,
.nav-drop > summary:hover { color: var(--azul-2); }
.site-nav > a:hover::after,
.nav-drop > summary:hover::after,
.site-nav > a.is-active::after { transform: scaleX(1); transform-origin: left; }
.site-nav > a.is-active { color: var(--azul-2); }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop { position: relative; }
.nav-drop[open] > summary { color: var(--azul-2); }
.nav-panel {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--linea); border-radius: 4px;
  min-width: 220px; padding: 10px 0;
  box-shadow: 0 18px 34px -18px rgba(20,24,31,.28);
  z-index: 60;
}
.nav-panel a {
  display: block; padding: 8px 16px; font-size: 13.5px; color: var(--ink); font-weight: 500;
}
.nav-panel a:hover { background: var(--azul-3); color: var(--azul); }
.nav-panel .nav-label {
  display: block; padding: 8px 16px 4px;
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gris-claro);
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-search { position: relative; }
.header-search input {
  width: 180px; padding: 8px 12px 8px 32px;
  border: 1px solid var(--linea); border-radius: 2px;
  font-size: 13px; font-family: Inter, sans-serif; background: var(--panel); color: var(--ink);
}
.header-search input:focus { outline: none; border-color: var(--azul-2); background: #fff; }
.header-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--gris-claro); font-size: 12px; }

.btn-ingresar {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  padding: 8px 16px; border: 1px solid var(--azul-2); border-radius: 2px;
  color: var(--azul-2); transition: background .2s, color .2s;
  background: transparent;
}
.btn-ingresar:hover { background: var(--azul-2); color: #fff; }

.user-menu {
  position: relative;
  flex: none;
}
.user-menu > summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--azul-2);
  border-radius: 2px;
  color: var(--azul-2);
  background: transparent;
  transition: background .2s, color .2s;
}
.user-menu > summary::-webkit-details-marker,
.user-menu > summary::marker { display: none; content: none; }
.user-menu > summary::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 8px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.user-menu > summary:hover,
.user-menu[open] > summary {
  background: var(--azul-2);
  color: #fff;
}
.user-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  min-width: 168px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 4px;
  box-shadow: 0 16px 40px -12px rgba(20,24,31,.35);
  z-index: 80;
}
.user-panel a {
  display: block;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.user-panel a:hover { background: var(--azul-3); color: var(--azul); }

.nav-toggle {
  display: none; background: none; border: 0; font-size: 20px; color: var(--ink); cursor: pointer;
}

.mobile-nav {
  display: none; border-top: 1px solid var(--linea); background: #fff; padding: 12px 0 20px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block; padding: 10px 0; font-size: 14px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--linea);
}
.mobile-nav .nav-label {
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gris-claro); padding: 16px 0 6px;
}

/* ---------- TICKER ---------- */
.ticker {
  background: var(--azul-deep);
  overflow: hidden; white-space: nowrap;
  border-bottom: 2px solid var(--rojo-2);
}
.ticker-track {
  display: inline-flex; width: max-content;
  animation: scrollTicker 34s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: #dce6f4;
  padding: 9px 26px; white-space: nowrap;
}
.ticker a.ticker-item,
.ticker a.ticker-item:link,
.ticker a.ticker-item:visited {
  color: #dce6f4 !important;
  text-decoration: none;
}
.ticker a.ticker-item:hover,
.ticker a.ticker-item:hover b { color: #fff !important; }
.ticker-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rojo-2); flex: none; }
.ticker-item b { color: #fff !important; font-weight: 600; }
@keyframes scrollTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- HERO / HOME ---------- */
.hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--linea);
  background:
    radial-gradient(650px 300px at 100% -10%, var(--azul-3) 0%, transparent 65%),
    radial-gradient(500px 260px at -10% 110%, var(--rojo-3) 0%, transparent 60%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: end;
}
.hero h1 {
  font-family: Fraunces, serif; font-weight: 500;
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06;
  margin: 14px 0 18px; letter-spacing: -.01em;
}
.hero h1 em { font-style: italic; color: var(--rojo-2); }
.hero p.lede {
  font-size: 16px; color: var(--gris); max-width: 46ch; line-height: 1.6; margin: 0 0 26px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primario {
  background: var(--azul-2); color: #fff !important; font-weight: 600; font-size: 13.5px;
  padding: 12px 22px; border-radius: 2px; display: inline-block;
  border-bottom: 3px solid var(--rojo-2);
  transition: transform .15s, box-shadow .15s;
}
.btn-primario:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(18,63,120,.5); }
.btn-secundario {
  font-weight: 600; font-size: 13.5px; color: var(--azul-2);
  padding: 12px 6px; border-bottom: 1px solid var(--linea);
}

.ficha {
  background: linear-gradient(180deg, #fff 0%, var(--azul-3) 140%);
  border: 1px solid var(--linea);
  border-top: 4px solid var(--azul-2);
  padding: 22px 22px 18px;
  position: relative;
  box-shadow: 0 18px 34px -22px rgba(12,51,95,.35);
  transition: transform .2s ease, box-shadow .2s ease;
  display: block;
}
.ficha:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -20px rgba(12,51,95,.45); }
.ficha::before {
  content: ""; position: absolute; top: -1px; right: 22px; width: 26px; height: 10px;
  background: var(--rojo-2);
}
.ficha-num {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--gris-claro);
  display: flex; justify-content: space-between; margin-bottom: 14px;
}
.ficha-partido { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ficha-equipo { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; text-align: center; min-width: 0; }
.escudo {
  width: 48px; height: 48px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.escudo img { width: 100%; height: 100%; object-fit: contain; }
.escudo.rival { background: transparent; }
.ficha-equipo span { font-size: 12.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha-resultado {
  font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: 22px; color: var(--rojo-2);
  padding: 0 6px; flex: none;
}
.ficha-meta {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--linea);
  font-size: 12px; color: var(--gris); display: flex; justify-content: space-between; gap: 8px;
}
.ficha-col { display: flex; flex-direction: column; gap: 0; }
.ficha-col.has-next { box-shadow: 0 18px 34px -22px rgba(12,51,95,.35); }
.ficha-col.has-next .ficha { border-bottom: none; box-shadow: none; }
.ficha-col.has-next .ficha:hover { transform: none; box-shadow: none; }
.ficha-next {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; background: var(--rojo); color: #fff;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; line-height: 1.35;
}
.ficha-next .kicker {
  display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.75); margin-bottom: 2px;
}
.ficha-next .kicker i { margin-right: 4px; }
.ficha-next .when { flex: none; color: rgba(255,255,255,.9); text-align: right; }

.stat-rail {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin-top: 52px; background: var(--azul-deep); border-radius: 4px; overflow: hidden;
}
.stat-rail div { padding: 22px 10px; border-left: 1px solid rgba(255,255,255,.12); text-align: left; }
.stat-rail div:first-child { border-left: none; }
.stat-num {
  font-family: Fraunces, serif; font-weight: 600; font-size: clamp(22px, 2.6vw, 32px); color: #fff;
  display: block;
}
.stat-num.rojo { color: #ff8f9d; }
.stat-label { font-size: 12px; color: #9fb3ce; margin-top: 4px; display: block; }
.stat-rail.entity-result-rail { margin: 0 0 28px; }
.stat-rail.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-rail.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-rail.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stat-rail.cols-6 { grid-template-columns: repeat(6, 1fr); }
.stat-rail.cols-7 { grid-template-columns: repeat(7, 1fr); }
.stat-rail.cols-8 { grid-template-columns: repeat(8, 1fr); }
.stat-rail.cols-7 .stat-num,
.stat-rail.cols-8 .stat-num { font-size: clamp(18px, 1.8vw, 28px); }
.stat-rail.cols-7 div,
.stat-rail.cols-8 div { padding: 18px 8px; }
.stat-label .percent {
  font-family: "IBM Plex Mono", monospace;
  color: rgba(255,255,255,.72);
  margin-left: 6px;
  white-space: nowrap;
}

/* ---------- SECTIONS (home) ---------- */
.page-home section { padding: 56px 0; border-bottom: 1px solid var(--linea); }
.page-home section.tint-azul { background: var(--azul-3); }
.page-home section.tint-rojo { background: var(--rojo-3); }
.page-home section.tint-panel { background: var(--panel); }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; gap: 20px;
}
.section-head h2 {
  font-family: Fraunces, serif; font-weight: 500; font-size: 28px; margin: 6px 0 0;
}
.ver-todos { font-size: 13px; font-weight: 600; color: var(--rojo-2); white-space: nowrap; }
.ver-todos:after { content: " →"; }

.explora-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--linea);
  border: 1px solid var(--linea);
}
.explora-item {
  background: var(--paper); padding: 20px 16px; min-height: 104px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background .15s, transform .15s;
}
.explora-item:hover { background: var(--azul-3); transform: translateY(-2px); }
.explora-item .n { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--rojo-2); }
.explora-item .t { font-family: Fraunces, serif; font-weight: 500; font-size: 16px; }

.lista-partidos { border-top: 1px solid var(--linea); }
.fila-partido {
  display: grid; grid-template-columns: 70px 140px 1fr 66px 1fr;
  align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--linea);
  transition: background .15s;
  color: inherit;
}
.fila-partido:hover { background: var(--panel); }
.fila-partido .fecha { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--gris-claro); }
.fila-partido .torneo { font-size: 12px; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-partido .equipo { font-size: 14.5px; font-weight: 500; display: flex; align-items: center; gap: 10px; min-width: 0; font-family: Fraunces, serif; }
.fila-partido .equipo span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-partido .equipo.der { justify-content: flex-end; }
.fila-partido .mini {
  width: 26px; height: 26px; flex: none; object-fit: contain;
  background: transparent;
}
.fila-partido .marcador {
  font-family: "IBM Plex Mono", monospace; font-weight: 700; text-align: center;
  background: #fff; border: 1px solid var(--linea); padding: 4px 0; font-size: 13px; border-radius: 3px;
}
.fila-partido .marcador.win { color: var(--azul-2); border-color: var(--azul-2); }
.fila-partido .marcador.loss { color: var(--rojo-2); border-color: var(--rojo-2); }
.fila-partido .marcador.draw { color: var(--gris); }

.destacados-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.destacado-card {
  background: #fff; border: 1px solid var(--linea); border-radius: 6px; overflow: hidden;
  transition: transform .2s, box-shadow .2s; display: block; color: inherit;
}
.destacado-card:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -18px rgba(20,24,31,.25); }
.destacado-media {
  height: 140px; position: relative;
  display: flex; align-items: flex-end; padding: 14px;
  overflow: hidden;
}
.destacado-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.destacado-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,21,37,.75), transparent 60%);
}
.destacado-media.azul { background: linear-gradient(135deg, var(--azul-2), var(--azul-deep)); }
.destacado-media.rojo { background: linear-gradient(135deg, var(--rojo-2), var(--rojo-deep)); }
.destacado-media.mix { background: linear-gradient(135deg, var(--azul-2) 0%, var(--azul-2) 45%, var(--rojo-2) 55%, var(--rojo-2) 100%); }
.destacado-media span {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: rgba(255,255,255,.9);
  letter-spacing: .08em; text-transform: uppercase; position: relative; z-index: 1;
}
.destacado-body { padding: 18px 18px 20px; }
.destacado-body h4 { font-family: Fraunces, serif; font-weight: 500; font-size: 18px; margin: 0 0 6px; }
.destacado-body p { font-size: 13px; color: var(--gris); margin: 0 0 12px; line-height: 1.5; }
.destacado-stats { display: flex; gap: 16px; border-top: 1px solid var(--linea); padding-top: 12px; }
.destacado-stats div { font-size: 12px; color: var(--gris); }
.destacado-stats b { display: block; font-family: "IBM Plex Mono", monospace; color: var(--ink); font-size: 14px; }

.rankings { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.ranking-col { background: #fff; border: 1px solid var(--linea); border-radius: 6px; padding: 22px; }
.ranking-col h3 {
  font-family: Fraunces, serif; font-weight: 500; font-size: 18px;
  border-bottom: 2px solid var(--azul-2); padding-bottom: 10px; margin: 0 0 4px;
}
.ranking-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--linea);
  transition: padding-left .15s; color: inherit;
}
.ranking-row:hover { padding-left: 6px; }
.ranking-row .pos {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--gris-claro);
  width: 22px; font-weight: 600; text-align: center; flex: none;
}
.ranking-row .campeon-star {
  color: #e0b43a;
  font-size: 15px;
  filter: drop-shadow(0 0 1px rgba(184, 134, 11, .45));
}
.ranking-row img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none;
  border: 1px solid var(--linea);
}
.ranking-row img.flag {
  width: 42px; height: 28px; border-radius: 2px; object-fit: cover;
}
.ranking-row .nombre { flex: 1; font-size: 14.5px; font-weight: 500; font-family: Fraunces, serif; }
.ranking-row .nombre span { font-family: Inter, sans-serif; font-weight: 400; }
.ranking-row .cant { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--gris); }

.archivo-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end;
  background: var(--panel); border: 1px solid var(--linea);
  padding: 16px 18px; margin: 0 0 18px;
}
.archivo-toolbar input[type="search"] {
  flex: 1 1 240px; min-width: 200px; max-width: 480px;
  height: 42px; padding: 0 14px 0 38px;
  border: 1px solid var(--linea); border-radius: 2px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239aa3b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px 50%;
  font-family: Inter, sans-serif; font-size: 14px; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--ink);
  appearance: none; -webkit-appearance: none;
}
.archivo-toolbar input[type="search"]::placeholder { color: var(--gris-claro); }
.archivo-toolbar input[type="search"]:focus {
  outline: none; border-color: var(--azul-2); background-color: #fff;
}
.archivo-toolbar input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
.archivo-sort-wrap {
  display: flex; flex-direction: column; align-items: stretch; gap: 5px;
  font-family: "IBM Plex Mono", monospace; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gris);
}
.archivo-sort-wrap select {
  appearance: none; -webkit-appearance: none;
  height: 42px; min-width: 200px; padding: 0 36px 0 12px;
  border: 1px solid var(--linea); border-radius: 2px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%230c335f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-family: Inter, sans-serif; font-size: 13px; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--ink);
}
.archivo-sort-wrap select:focus { outline: none; border-color: var(--azul-2); }
.archivo-count-label {
  margin-left: auto; padding-bottom: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; color: var(--gris); letter-spacing: 0; text-transform: none;
}
.archivo-list {
  background: #fff; border: 1px solid var(--linea); border-radius: 6px;
  padding: 6px 22px 10px;
}
.archivo-row {
  display: flex; align-items: center; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--linea);
  color: inherit; transition: padding-left .15s;
}
.archivo-row:last-child { border-bottom: 0; }
.archivo-row:hover { padding-left: 6px; }
.archivo-row .who {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0;
}
.archivo-row .pos {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--rojo-2);
  width: 18px; flex: none; font-weight: 600;
}
.archivo-row .who img.flag {
  width: 42px; height: 28px; border-radius: 2px; object-fit: cover; flex: none;
  border: 1px solid var(--linea);
}
.archivo-row .who img.crest {
  width: 36px; height: 36px; object-fit: contain; flex: none;
}
.archivo-row .who img.face {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none;
  border: 1px solid var(--linea);
}
.archivo-row .nombre {
  font-family: Fraunces, serif; font-weight: 500; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.archivo-row .meta {
  display: block; font-family: Inter, sans-serif; font-size: 12px;
  color: var(--gris); font-weight: 400; margin-top: 2px;
}
.archivo-row .stats {
  display: flex; gap: 16px; flex: none; align-items: flex-end;
}
.archivo-row .stat {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gris); text-align: right; min-width: 42px;
}
.archivo-row .stat b {
  display: block; font-family: "IBM Plex Mono", monospace;
  font-size: 15px; font-weight: 600; color: var(--ink);
  letter-spacing: 0; text-transform: none;
}
.archivo-row .stat i {
  font-style: normal; font-family: "IBM Plex Mono", monospace;
  font-size: 10px; color: var(--gris); font-weight: 400; margin-left: 3px;
}
.archivo-row .stat.win-n b { color: var(--azul-2); }
.archivo-row .stat.loss-n b { color: var(--rojo-2); }
.archivo-row .bar { width: 120px; flex: none; }
.archivo-empty { display: none; padding: 28px 0; color: var(--gris); margin: 0; }
.archivo-list.is-empty .archivo-empty { display: block; }

@media (max-width: 800px) {
  .archivo-row { flex-wrap: wrap; }
  .archivo-row .stats { width: 100%; justify-content: space-between; gap: 8px; }
  .archivo-row .stat-hide-sm { display: none; }
  .archivo-row .bar { width: 100%; }
  .archivo-toolbar { align-items: stretch; }
  .archivo-toolbar input[type="search"],
  .archivo-sort-wrap,
  .archivo-sort-wrap select { max-width: none; width: 100%; min-width: 0; }
  .archivo-count-label { margin-left: 0; width: 100%; padding-bottom: 0; }
}

.camisetas-strip { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.camiseta {
  flex: none; width: 150px; border-radius: 6px; overflow: hidden; border: 1px solid var(--linea);
  transition: transform .2s; background: #fff; display: block; color: inherit;
}
.camiseta:hover { transform: translateY(-4px); }
.camiseta-swatch, .camiseta img.camiseta-photo {
  height: 120px; width: 100%; object-fit: cover; display: block; background: var(--panel);
}
.camiseta p {
  font-size: 13px; padding: 10px 12px; margin: 0; color: var(--ink);
  font-family: Fraunces, serif; font-weight: 500;
}
.camiseta p + p {
  padding-top: 0; font-size: 12px; color: var(--gris);
  font-family: "IBM Plex Mono", monospace; font-weight: 400;
}

.trofeos { display: flex; gap: 1px; background: var(--linea); border: 1px solid var(--linea); }
.trofeo {
  flex: 1; color: #fff; padding: 26px 22px; position: relative; min-height: 160px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; transition: transform .2s;
}
.trofeo:hover { transform: translateY(-3px); }
.trofeo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.trofeo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,21,37,.88), rgba(7,21,37,.25));
}
.trofeo .eyebrow, .trofeo h4 { position: relative; z-index: 1; }
.trofeo .eyebrow { color: rgba(255,255,255,.8); }
.trofeo h4 {
  font-family: Fraunces, serif; font-weight: 500; font-size: 19px; margin: 10px 0 0; color: #fff;
}

.clasicos-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.clasico-card {
  display: block; border: 1px solid var(--linea); border-radius: 6px; overflow: hidden; background: #fff;
  transition: transform .2s;
}
.clasico-card:hover { transform: translateY(-3px); }
.clasico-card img { width: 100%; height: 88px; object-fit: cover; display: block; }
.clasico-card .bar { display: flex; height: 4px; }
.clasico-card .bar .w { background: #22a06b; }
.clasico-card .bar .d { background: #d4a017; }
.clasico-card .bar .l { background: var(--rojo-2); }
.clasico-card span {
  display: block; padding: 10px 12px; font-size: 13px; font-weight: 500;
  font-family: Fraunces, serif;
}

.memorables-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.memorable-card {
  position: relative; height: 160px; border-radius: 6px; overflow: hidden; display: block;
}
.memorable-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.memorable-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,21,37,.85), transparent 55%);
}
.memorable-card .txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; z-index: 1; color: #fff; }
.memorable-card h4 { margin: 0; font-family: Fraunces, serif; font-weight: 500; font-size: 16px; color: #fff; }
.memorable-card span { font-size: 12px; color: rgba(255,255,255,.7); font-family: "IBM Plex Mono", monospace; }

.side-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.hoy-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--linea); color: inherit;
}
.hoy-list a:hover { background: var(--panel); }
.hoy-list .left { display: flex; align-items: center; gap: 10px; }
.hoy-list img { width: 28px; height: 28px; object-fit: contain; }
.cumple-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cumple-item {
  text-align: center; padding: 12px; border: 1px solid var(--linea); border-radius: 6px; background: #fff;
}
.cumple-item img, .cumple-item .ph {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px;
  background: var(--panel); display: flex; align-items: center; justify-content: center; color: var(--gris-claro);
}
.cumple-item .nm { display: block; font-size: 13px; font-weight: 500; font-family: Fraunces, serif; }
.cumple-item .ed { font-size: 12px; color: var(--gris); }

.cumple-search {
  background: var(--panel); border: 1px solid var(--linea); border-radius: 6px; padding: 22px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.cumple-search h3 { font-family: Fraunces, serif; font-weight: 500; font-size: 20px; margin: 0 0 4px; }
.cumple-search p { margin: 0; font-size: 13px; color: var(--gris); }
.cumple-search form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cumple-search select {
  padding: 8px 10px; border: 1px solid var(--linea); border-radius: 2px; font-size: 13px; background: #fff;
}

.more-btn {
  display: block; width: 100%; margin-top: 10px; padding: 8px;
  font-size: 13px; font-weight: 600; color: var(--azul-2); background: none; border: 1px dashed var(--linea);
  cursor: pointer; border-radius: 2px;
}

/* ---------- FOOTER ---------- */
.site-footer { background: var(--azul-deep); color: #fff; border-top: 4px solid var(--rojo-2); }
.footer-inner { padding: 44px 0 30px; display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.site-footer .logo-text { color: #fff; }
.site-footer .logo-text span { color: #ff9aa5; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 36px 48px; }
.footer-cols > div { min-width: 140px; }
.footer-cols h5 {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55);
  margin: 0 0 12px; font-family: "IBM Plex Mono", monospace;
}
.footer-cols a { display: block; font-size: 13.5px; margin-bottom: 9px; color: rgba(255,255,255,.9); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0;
  display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.55); gap: 12px;
}
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: rgba(255,255,255,.7); font-size: 16px; }
.footer-social a:hover { color: #fff; }

/* ---------- INNER PAGES (misma estética que la home) ---------- */
.page-main { padding: 36px 0 72px; min-height: 60vh; }

.page-inner {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
}
.page-inner h1, .page-inner h2, .page-inner h3, .page-inner h4 {
  font-family: Fraunces, serif;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}

.page-head { margin-bottom: 32px; padding-bottom: 22px; border-bottom: 1px solid var(--linea); }
.page-head h1 {
  font-size: clamp(28px, 4vw, 42px); line-height: 1.08;
  margin: 6px 0 10px;
}
.page-head .lede { font-size: 15px; color: var(--gris); margin: 0; max-width: 54ch; line-height: 1.55; }

.error-404 {
  text-align: center;
  padding: 40px 0 24px;
  max-width: 640px;
  margin: 0 auto;
}
.error-404 > .eyebrow { display: block; }
.error-404 h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin: 8px 0 10px;
  line-height: 1.08;
}
.error-404 .lede {
  font-size: 15px;
  color: var(--gris);
  margin: 0 auto 22px;
  max-width: 42ch;
  line-height: 1.55;
}
.error-404-gif {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 4px;
  border: 1px solid var(--linea);
  box-shadow: 0 18px 34px -22px rgba(12,51,95,.35);
}
.error-404-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.btn-edit {
  position: fixed; top: 88px; right: 16px; z-index: 40;
  font-size: 12px; font-weight: 600; padding: 7px 12px;
  border: 1px solid var(--azul-2); color: var(--azul-2); background: #fff; border-radius: 2px;
}
.btn-edit:hover { background: var(--azul-2); color: #fff; }

.entity-hero {
  display: grid; grid-template-columns: 132px 1fr; gap: 28px; align-items: end;
  background: linear-gradient(180deg, #fff 0%, var(--azul-3) 160%);
  border: 1px solid var(--linea); border-top: 4px solid var(--azul-2);
  padding: 26px 26px 22px; margin-bottom: 28px; position: relative;
  box-shadow: 0 18px 34px -22px rgba(12,51,95,.35);
}
.entity-hero::before {
  content: ""; position: absolute; top: -1px; right: 22px; width: 26px; height: 10px;
  background: var(--rojo-2);
}
.entity-hero.vs { grid-template-columns: 1fr; }
.entity-photo {
  width: 132px; height: 132px; object-fit: cover; object-position: top;
  border: 1px solid var(--linea); background: #fff; display: block;
}
.entity-photo.round { border-radius: 50%; object-fit: cover; }
.entity-photo.contain { object-fit: contain; padding: 8px; }
.entity-photo.flag {
  width: 168px; height: 112px; object-fit: cover; object-position: center;
  padding: 0; border-radius: 3px;
  box-shadow: 0 6px 16px -8px rgba(12,51,95,.35);
}
.entity-hero h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 6px 0 10px; line-height: 1.08; }
.entity-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 13px; color: var(--gris); }
.entity-meta b { font-family: "IBM Plex Mono", monospace; color: var(--ink); font-weight: 600; }
.entity-actions { margin-top: 14px; }

.match-ficha {
  background: linear-gradient(180deg, #fff 0%, var(--azul-3) 140%);
  border: 1px solid var(--linea); border-top: 4px solid var(--azul-2);
  padding: 22px 22px 20px; margin-bottom: 28px; position: relative;
  box-shadow: 0 18px 34px -22px rgba(12,51,95,.35);
}
.match-ficha::before {
  content: ""; position: absolute; top: -1px; right: 22px; width: 26px; height: 10px;
  background: var(--rojo-2);
}
.match-ficha .ficha-num { margin-bottom: 18px; }
.match-ficha .ficha-equipo span { font-family: Fraunces, serif; font-size: 16px; font-weight: 500; }
.match-ficha .ficha-resultado { font-size: 36px; }
.match-ficha .escudo { width: 64px; height: 64px; }

.layout-2 { display: grid; grid-template-columns: 250px 1fr; gap: 36px; align-items: start; }
.layout-2.wide-side { grid-template-columns: 1.4fr 1fr; }

.filter-bar, .filtro-partidos, .filtro-jugador, .filtro-competiciones {
  background: var(--panel); border: 1px solid var(--linea); padding: 18px; margin-bottom: 22px;
}
.filter-bar h5, .filtro-partidos h5, .filtro-jugador h5, .filtro-competiciones h5 {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gris); margin: 0 0 14px; font-weight: 500;
}
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.filter-bar label, .filtro-partidos label, .filtro-jugador label, .filtro-competiciones label {
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gris); display: block; margin-bottom: 5px;
}
.filter-bar select, .filtro-partidos select, .filtro-jugador select, .filtro-competiciones select,
.filter-bar input, .filtro-partidos input, .filter-bar textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--linea); border-radius: 2px;
  background: #fff; font-family: Inter, sans-serif; font-size: 13px; color: var(--ink);
}

#map { height: calc(100vh - 280px); min-height: 480px; border: 1px solid var(--linea); }

.mufometro {
  position: relative; height: 10px; margin: 16px 0 8px;
  background: linear-gradient(90deg, var(--rojo-2), #c9a227, var(--azul-2));
}
.mufometro-marker {
  position: absolute; top: 50%; width: 14px; height: 14px;
  background: #fff; border: 2px solid var(--ink); border-radius: 50%;
  transform: translate(-50%, -50%);
}

.goles-minutos { display: flex; flex-wrap: wrap; gap: 6px; }
.g1000_minutos {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--azul-2); color: #fff; font-family: "IBM Plex Mono", monospace;
  font-size: 13px; font-weight: 600; position: relative;
}
.g1000_minutos.goles-0 { background: var(--panel); color: var(--gris-claro); }
.g1000_minutos span {
  position: absolute; top: -6px; right: -6px;
  font-size: 9px; background: var(--rojo-2); color: #fff;
  padding: 2px 4px; line-height: 1;
}

.panel {
  background: #fff; border: 1px solid var(--linea); border-radius: 6px; margin-bottom: 24px; overflow: hidden;
}
.panel-head {
  padding: 16px 20px; border-bottom: 1px solid var(--linea);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
}
.panel-head h2, .panel-head h3 { font-size: 18px; margin: 0; }
.panel-body { padding: 18px 20px; }

.cuenta-page { max-width: 960px; }
.cuenta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}
.cuenta-card {
  background: #fff;
  border: 1px solid var(--linea);
  padding: 24px 24px 22px;
  margin: 0;
}
.cuenta-card h3 {
  font-family: Fraunces, serif;
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 18px;
}
.cuenta-rows { display: grid; gap: 16px; }
.cuenta-rows > div { display: grid; gap: 4px; }
.cuenta-rows dt,
.cuenta-field label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gris);
  display: block;
  margin: 0 0 8px;
}
.cuenta-rows dd {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.cuenta-form { display: grid; gap: 18px; }
.cuenta-field { display: block; }
body.theme-clean .cuenta-form input[type="password"],
body.theme-clean .cuenta-form input[type="email"],
body.theme-clean .cuenta-form input[type="text"] {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px !important;
  margin: 0;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--gris) !important;
  border-radius: 2px !important;
  font-family: Inter, sans-serif !important;
  font-size: 15px !important;
  line-height: 48px;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
body.theme-clean .cuenta-form input::placeholder {
  color: var(--gris-claro);
  opacity: 1;
}
body.theme-clean .cuenta-form input:focus {
  outline: none;
  background: #fff !important;
  border-color: var(--azul-2) !important;
  box-shadow: 0 0 0 3px var(--azul-3);
}
.cuenta-ok {
  background: #eef6f0;
  border: 1px solid #1f8a54;
  color: #1f8a54;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
}
.cuenta-errors { color: var(--rojo-2); font-size: 13px; margin: 6px 0 0; }
.cuenta-errors ul { margin: 0; padding-left: 18px; }
.cuenta-logout {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 0;
}
.btn-cerrar {
  display: inline-block;
  background: var(--rojo-2);
  color: #fff !important;
  font-weight: 600;
  font-size: 13.5px;
  padding: 12px 22px;
  border-radius: 2px;
  border: 0;
  border-bottom: 3px solid var(--rojo-deep);
  transition: transform .15s, box-shadow .15s;
}
.btn-cerrar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px rgba(140,21,38,.45);
  color: #fff !important;
}

.meta-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px;
  background: var(--linea); border: 1px solid var(--linea); margin-bottom: 28px;
}
.meta-item { background: #fff; padding: 16px 14px; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; }
a.meta-item:hover { background: var(--azul-3); }
.meta-item .n { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--rojo-2); letter-spacing: .08em; text-transform: uppercase; }
.meta-item .t { font-family: Fraunces, serif; font-weight: 500; font-size: 15px; margin-top: 8px; display: block; line-height: 1.25; }

.camiseta-usada {
  display: flex; align-items: center; gap: 18px;
  border: 1px solid var(--linea); background: #fff;
  padding: 12px 16px; margin: 16px 0 20px; color: inherit;
}
.camiseta-usada:hover { background: var(--azul-3); }
.camiseta-usada img {
  width: 72px; height: 72px; object-fit: contain; flex: none;
}
.camiseta-usada .n {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--rojo-2);
  letter-spacing: .08em; text-transform: uppercase; display: block;
}
.camiseta-usada .t {
  font-family: Fraunces, serif; font-weight: 500; font-size: 16px; display: block; margin-top: 4px;
}

.mini-stats { display: flex; gap: 22px; flex-wrap: wrap; border-top: 1px solid var(--linea); padding-top: 14px; margin-top: 8px; }
.mini-stats div { font-size: 12px; color: var(--gris); }
.mini-stats b { display: block; font-family: "IBM Plex Mono", monospace; color: var(--ink); font-size: 18px; font-weight: 600; }

.num { font-family: "IBM Plex Mono", monospace; }
.num.rojo { color: var(--rojo-2); }
.num.azul { color: var(--azul-2); }

.win-n { color: var(--azul-2); }
.draw-n { color: var(--gris); }
.loss-n { color: var(--rojo-2); }

.leyenda { font-size: 13px; color: var(--gris); margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 14px 20px; }
.leyenda b { font-family: "IBM Plex Mono", monospace; font-weight: 600; color: var(--ink); }

.tabla, table.datatable {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
}
.tabla th, table.datatable thead th {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gris); font-weight: 500; text-align: left;
  padding: 10px 12px; border-bottom: 2px solid var(--azul-2); background: #fff;
}
.tabla td, table.datatable tbody td {
  padding: 12px; border-bottom: 1px solid var(--linea); color: var(--ink); vertical-align: middle;
}
.tabla tbody tr:hover td, table.datatable tbody tr:hover td { background: var(--panel); }
.tabla .pos { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--rojo-2); font-weight: 600; width: 28px; }
.tabla a, table.datatable tbody td a {
  font-family: Fraunces, serif; font-weight: 500;
}
.tabla a:hover, table.datatable tbody td a:hover { color: var(--azul-2); }
.tabla img.mini, table.datatable img.mini {
  width: 28px; height: 28px; object-fit: contain; border-radius: 50%;
  border: 1px solid var(--linea); background: #fff; vertical-align: middle; margin-right: 8px;
}

.gallery-row { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 28px; }
.gallery-item { flex: none; width: 120px; text-align: center; color: inherit; }
.gallery-item img {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--linea); margin: 0 auto 8px; display: block;
}
.gallery-item span { font-size: 13px; font-weight: 500; display: block; font-family: Fraunces, serif; }
.gallery-item span.num { font-family: "IBM Plex Mono", monospace; font-weight: 400; }
.gallery-item:hover span { color: var(--azul-2); }

.planillas { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 28px; }
.planilla { background: #fff; border: 1px solid var(--linea); border-radius: 6px; overflow: hidden; }
.planilla-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--linea); background: var(--panel);
}
.planilla-head img { width: 28px; height: 28px; object-fit: contain; }
.planilla-head h3 { font-size: 16px; margin: 0; }
.planilla-head .note { margin-left: auto; font-size: 11px; color: var(--gris); font-family: "IBM Plex Mono", monospace; }
.planilla-body { padding: 8px 16px 16px; }
.planilla-label {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gris); margin: 14px 0 6px;
}
.planilla-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--linea); color: inherit;
}
.planilla-row:last-child { border-bottom: 0; }
.planilla-row.out { opacity: .45; }
.planilla-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.planilla-who span.nm {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: Fraunces, serif; font-weight: 500; font-size: 13px;
}
.dorsal {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--rojo-2);
  width: 22px; flex: none; font-weight: 600;
}
.mins { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--gris); flex: none; }

.timeline { border-top: 1px solid var(--linea); }
.timeline-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--linea);
}
.timeline-min { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--rojo-2); font-weight: 600; }
.timeline-row.rival .timeline-min { color: var(--azul-2); }
.timeline-kind { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); margin: 0 0 2px; }
.timeline-who {
  font-family: Fraunces, serif; font-weight: 500; font-size: 15px;
}
.timeline-who:hover { color: var(--azul-2); }
.timeline-sec {
  font-family: Fraunces, serif; font-weight: 500; font-size: 13px;
  color: var(--gris); margin: 4px 0 0;
}
.timeline-media button {
  background: none; border: 1px solid var(--linea); border-radius: 2px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; padding: 3px 8px; cursor: pointer; color: var(--azul-2);
}

.penales { border: 1px solid var(--linea); border-radius: 6px; padding: 22px; margin-bottom: 28px; }
.penales-score {
  display: flex; align-items: center; justify-content: center; gap: 28px; margin-bottom: 18px;
  font-family: "IBM Plex Mono", monospace; font-size: 32px; font-weight: 700;
}
.penal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--linea); font-size: 14px; align-items: center; }
.penal-row .nm { font-family: Fraunces, serif; font-weight: 500; }
.penal-ball { font-size: 14px; margin: 0 8px; vertical-align: middle; }
.penal-ball.ok { color: #1f8a54; }
.penal-ball.no { color: var(--rojo-2); }

.apostilla { border-left: 3px solid var(--rojo-2); padding: 4px 0 4px 18px; margin: 8px 0 28px; }
.apostilla p { font-family: Fraunces, serif; font-style: italic; font-size: 17px; line-height: 1.5; margin: 0; color: var(--ink); }

.quote-img { width: 100%; max-height: 280px; object-fit: cover; display: block; margin-bottom: 16px; }

.no-resultados {
  display: none; border: 1px dashed var(--linea); padding: 22px; text-align: center;
  color: var(--gris); margin-bottom: 16px; font-size: 14px;
}

.match-list.partidos, .list-group.partidos { border-top: 1px solid var(--linea); }
.match-list.partidos a, .list-group.partidos > a {
  display: grid; grid-template-columns: 70px 44px 70px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--linea); color: inherit;
}
.match-list.partidos a:hover, .list-group.partidos > a:hover { background: var(--panel); }
.match-list .fecha, .list-group.partidos .fecha {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--gris-claro);
}
.match-list .score {
  font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: 14px;
}
.match-list .rival { font-family: Fraunces, serif; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-list .torneo { font-size: 12px; color: var(--gris); text-align: right; }
.match-list .ev { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--gris); }

.vs-row { display: flex; align-items: center; justify-content: center; gap: 32px; margin-bottom: 18px; }
.vs-row .side { text-align: center; }
.vs-row img { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 8px; display: block; }
.vs-row h3 { font-size: 16px; margin: 0; }
.vs-mark {
  font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: .14em;
  color: var(--rojo-2); font-weight: 600;
}

.links-list a {
  display: block; padding: 12px 0; border-bottom: 1px solid var(--linea);
  font-family: Fraunces, serif; font-weight: 500;
}
.links-list a:hover { color: var(--azul-2); }

.photo-full { margin-top: 28px; border: 1px solid var(--linea); }
.photo-full img { width: 100%; display: block; }

.photo-hero { margin: 0 0 18px; border: 1px solid var(--linea); background: var(--panel); }
.photo-hero button {
  display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.photo-hero img { width: 100%; display: block; }

.partido-multimedia { margin-bottom: 12px; }
.media-strip { gap: 14px; margin-bottom: 8px; }
.media-thumb {
  flex: none; border: 1px solid var(--linea); background: var(--panel);
  padding: 0; cursor: pointer; text-align: left; color: inherit;
}
.media-thumb img {
  height: 140px; width: auto; max-width: 240px; display: block; object-fit: cover;
}
.media-thumb span {
  display: block; padding: 8px 10px; max-width: 240px;
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gris);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.media-thumb:hover { border-color: var(--azul-2); }

.media-modal-inner {
  max-width: min(1100px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}
.media-modal-inner img { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; }
.media-modal-caption {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.75); margin: 12px 0 0;
}
.media-modal-apostilla {
  border-left: 3px solid var(--rojo-2); text-align: left;
  padding: 4px 0 4px 16px; margin: 14px auto 0; max-width: 640px;
}
.media-modal-apostilla p {
  font-family: Fraunces, serif; font-style: italic; font-size: 16px;
  line-height: 1.45; margin: 0; color: #fff; white-space: pre-line;
}

.chart-box { border: 1px solid var(--linea); border-radius: 6px; margin-bottom: 24px; overflow: hidden; }
.chart-toggle {
  padding: 14px 18px; cursor: pointer; font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--azul-2);
  background: var(--panel); border: 0; width: 100%; text-align: left; font-weight: 600;
}

.modal-overlay {
  position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center;
  background: rgba(7,21,37,.82); padding: 24px;
}
.modal-overlay.is-open, .modal-overlay.flex { display: flex; }
.modal-overlay.hidden { display: none !important; }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: 1px solid rgba(255,255,255,.4);
  color: #fff; width: 40px; height: 40px; cursor: pointer; font-size: 20px; border-radius: 2px;
}
.modal-overlay img { max-width: 100%; max-height: 85vh; }
.modal-overlay iframe { width: min(960px, 100%); height: min(54vw, 540px); border: 0; background: #000; }

.btn-ghost {
  font-size: 13px; font-weight: 600; color: var(--azul-2);
  border-bottom: 1px solid var(--linea); padding: 4px 0;
}
.btn-filtros-mobile {
  display: none; width: 100%; margin-bottom: 12px; padding: 10px;
  border: 1px solid var(--azul-2); background: #fff; color: var(--azul-2);
  font-weight: 600; font-size: 13px; cursor: pointer; border-radius: 2px;
}

.posicion-badge {
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--linea); color: var(--gris);
}
.posicion-badge-arq { border-color: #c9a227; color: #8a7018; }
.posicion-badge-def { border-color: var(--azul-2); color: var(--azul-2); }
.posicion-badge-med { border-color: #1f8a54; color: #1f8a54; }
.posicion-badge-del { border-color: var(--rojo); color: var(--rojo); }

.resultado {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: 11px;
  min-width: 22px; padding: 2px 6px; border-radius: 2px; color: #fff;
}
.resultado-g { background: var(--azul-2); }
.resultado-e { background: #c9a227; color: #14181f; }
.resultado-p { background: var(--rojo); }

.historial_line { display: flex; height: 6px; overflow: hidden; background: var(--linea); }
.historial_line .win { background: var(--azul-2); }
.historial_line .tie { background: #c9a227; }
.historial_line .lose { background: var(--rojo-2); }

.hidden { display: none !important; }
.flex { display: flex; }

.page-inner h1 i.fa, .page-inner h2 i.fa, .page-inner h3 i.fa, .page-inner h5 i.fa {
  display: none;
}

/* Forms */
.page-inner select,
.page-inner input[type="text"],
.page-inner input[type="search"],
.page-inner input[type="number"],
.page-inner input[type="date"],
.page-inner input[type="email"],
.page-inner input[type="password"],
.page-inner textarea {
  background: #fff; color: var(--ink); border: 1px solid var(--linea); border-radius: 2px;
  font-family: Inter, sans-serif; font-size: 13px;
}
.page-inner select:focus,
.page-inner input:focus,
.page-inner textarea:focus { outline: none; border-color: var(--azul-2); }

.attendance_banner {
  background: var(--azul-3); border: 1px solid var(--linea); color: var(--ink);
  border-radius: 2px; margin-bottom: 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: .02em;
  line-height: 1.45;
}
.attendance_banner p { font-family: inherit; margin: 0; }
.attendance_banner strong { font-weight: 600; color: var(--azul-deep); }
.attendance_banner button,
.attendance_banner a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.jugador-puntaje { color: var(--ink); }
.jugador-puntaje .fa-star { color: #c9a227; }
.jugador-puntaje .fa-regular { color: var(--gris-claro); }

/* Resultado badges: keep color meaning */
html body.theme-clean .resultado {
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff !important;
}
html body.theme-clean .resultado-g { background: #1f8a54; color: #fff !important; }
html body.theme-clean .resultado-e { background: #d4a017; color: #14181f !important; }
html body.theme-clean .resultado-p { background: var(--rojo); color: #fff !important; }

html body.theme-clean .posicion-badge { font-size: .65rem; padding: 2px 6px; border-radius: 9999px; font-weight: 600; }
html body.theme-clean .posicion-badge-arq { background: #e0b43a; color: #14181f; }
html body.theme-clean .posicion-badge-def { background: var(--azul-2); color: #fff; }
html body.theme-clean .posicion-badge-med { background: #1f8a54; color: #fff; }
html body.theme-clean .posicion-badge-del { background: var(--rojo); color: #fff; }

html body.theme-clean .historial_line { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 8px; }
html body.theme-clean .historial_line .win { background: #1f8a54; }
html body.theme-clean .historial_line .tie { background: #d4a017; }
html body.theme-clean .historial_line .lose { background: var(--rojo); }

/* Remap dark Tailwind utilities used by inner templates */
html body.theme-clean .text-white { color: var(--ink) !important; }
html body.theme-clean .text-gray-100 { color: var(--ink) !important; }
html body.theme-clean .text-gray-200 { color: var(--ink) !important; }
html body.theme-clean .text-gray-300,
html body.theme-clean .text-gray-400,
html body.theme-clean .text-gray-500 { color: var(--gris) !important; }
html body.theme-clean .text-gray-600 { color: var(--gris-claro) !important; }

html body.theme-clean .hover\:text-white:hover { color: var(--azul-2) !important; }
html body.theme-clean .hover\:text-sl-red:hover { color: var(--rojo-2) !important; }
html body.theme-clean .group:hover .group-hover\:text-white { color: var(--azul-2) !important; }
html body.theme-clean .group:hover .group-hover\:text-sl-red { color: var(--rojo-2) !important; }
html body.theme-clean .group:hover .group-hover\:text-sl-blue { color: var(--azul-2) !important; }

html body.theme-clean .bg-sl-dark,
html body.theme-clean .bg-sl-darker,
html body.theme-clean .bg-gray-800,
html body.theme-clean .bg-gray-900,
html body.theme-clean .bg-gray-700 {
  background-color: #fff !important;
}

html body.theme-clean .from-sl-dark,
html body.theme-clean .via-sl-dark,
html body.theme-clean .to-gray-900,
html body.theme-clean .to-sl-darker {
  --tw-gradient-from: #ffffff !important;
  --tw-gradient-to: var(--panel) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html body.theme-clean .bg-gradient-to-br,
html body.theme-clean .bg-gradient-to-r {
  border: 1px solid var(--linea);
}

html body.theme-clean .border-white\/10,
html body.theme-clean .border-white\/20,
html body.theme-clean .border-white\/30 {
  border-color: var(--linea) !important;
}

html body.theme-clean .bg-white\/5,
html body.theme-clean .bg-white\/10,
html body.theme-clean .hover\:bg-white\/10:hover,
html body.theme-clean .hover\:bg-white\/5:hover,
html body.theme-clean .bg-white\/20 {
  background-color: var(--panel) !important;
}

html body.theme-clean .placeholder-gray-400::placeholder { color: var(--gris-claro) !important; }

html body.theme-clean .from-sl-blue\/30,
html body.theme-clean .from-sl-red\/30,
html body.theme-clean .from-purple-900\/30,
html body.theme-clean .via-sl-dark,
html body.theme-clean .to-pink-900\/30 {
  --tw-gradient-from: var(--azul-3) !important;
  --tw-gradient-to: #fff !important;
}

html body.theme-clean .bg-black\/50 { background-color: rgba(20,24,31,.4) !important; }

/* Keep white text on solid color surfaces and photo overlays */
html body.theme-clean .bg-sl-red,
html body.theme-clean .bg-sl-blue,
html body.theme-clean .bg-red-600,
html body.theme-clean .bg-red-700,
html body.theme-clean .bg-green-600,
html body.theme-clean .bg-green-700,
html body.theme-clean .from-sl-red,
html body.theme-clean .from-red-600,
html body.theme-clean .via-red-600 {
  color: #fff;
}
html body.theme-clean .bg-sl-red .text-white,
html body.theme-clean .bg-sl-blue .text-white,
html body.theme-clean .bg-red-600 .text-white,
html body.theme-clean .bg-green-600 .text-white,
html body.theme-clean .bg-green-700 .text-white,
html body.theme-clean button.bg-sl-red,
html body.theme-clean a.bg-sl-red,
html body.theme-clean button.bg-red-600,
html body.theme-clean a.bg-green-600,
html body.theme-clean button.bg-green-600,
html body.theme-clean .from-sl-red .text-white,
html body.theme-clean .from-red-600 .text-white {
  color: #fff !important;
}

html body.theme-clean .absolute .text-white,
html body.theme-clean .relative.h-48 .text-white,
html body.theme-clean .relative.h-40 .text-white,
html body.theme-clean [class*="from-black"] .text-white,
html body.theme-clean [class*="from-black"] .text-gray-400 {
  color: #fff !important;
}

/* Photo overlays: caption sitting at the bottom of a card */
html body.theme-clean .absolute.bottom-0,
html body.theme-clean .absolute.bottom-0 h4,
html body.theme-clean .absolute.bottom-0 .text-white,
html body.theme-clean .absolute.bottom-0 .text-gray-400,
html body.theme-clean .absolute.bottom-0 span {
  color: #fff !important;
}

/* Match scoreboard (and similar dark heroes) keep light type */
html body.theme-clean .clean-hero-dark {
  color: #fff;
  border-color: transparent !important;
}
html body.theme-clean .clean-hero-dark .text-white,
html body.theme-clean .clean-hero-dark h2,
html body.theme-clean .clean-hero-dark .font-black,
html body.theme-clean .clean-hero-dark a {
  color: #fff !important;
}
html body.theme-clean .clean-hero-dark .text-gray-400 {
  color: rgba(255,255,255,.75) !important;
}
html body.theme-clean .clean-hero-dark .bg-white\/10,
html body.theme-clean .clean-hero-dark .hover\:bg-white\/20:hover {
  background-color: rgba(255,255,255,.14) !important;
}
html body.theme-clean .clean-hero-dark .attendance_banner {
  background: rgba(255,255,255,.92) !important;
  color: var(--ink) !important;
}
html body.theme-clean .clean-hero-dark .attendance_banner p,
html body.theme-clean .clean-hero-dark .attendance_banner a {
  color: var(--ink) !important;
}

/* Forms / filters on inner pages */
html body.theme-clean select,
html body.theme-clean input[type="text"],
html body.theme-clean input[type="search"],
html body.theme-clean input[type="number"],
html body.theme-clean input[type="date"],
html body.theme-clean input[type="email"],
html body.theme-clean input[type="password"],
html body.theme-clean textarea {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--linea) !important;
  border-radius: 2px;
}
html body.theme-clean select:focus,
html body.theme-clean input:focus,
html body.theme-clean textarea:focus {
  outline: none;
  border-color: var(--azul-2) !important;
}

html body.theme-clean .archivo-toolbar input[type="search"] {
  height: 42px !important;
  padding: 0 14px 0 38px !important;
  font-family: Inter, sans-serif !important;
  font-size: 14px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239aa3b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px 50% !important;
}
html body.theme-clean .archivo-sort-wrap select {
  height: 42px !important;
  padding: 0 36px 0 12px !important;
  font-family: Inter, sans-serif !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%230c335f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center !important;
}

html body.theme-clean table.datatable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
html body.theme-clean table.datatable thead th {
  background: var(--panel) !important;
  color: var(--ink) !important;
  border-bottom: 2px solid var(--azul-2) !important;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 10px 8px;
}
html body.theme-clean table.datatable tbody tr { background: #fff !important; }
html body.theme-clean table.datatable tbody tr:nth-child(even) { background: var(--panel) !important; }
html body.theme-clean table.datatable tbody tr:hover { background: var(--azul-3) !important; }
html body.theme-clean table.datatable tbody td {
  border-bottom: 1px solid var(--linea) !important;
  color: var(--ink) !important;
  padding: 10px 8px;
}
html body.theme-clean table.datatable tbody td a {
  font-family: Fraunces, serif;
  font-weight: 500;
}

html body.theme-clean .dataTables_wrapper { color: var(--ink); }
html body.theme-clean .dataTables_filter input {
  background: #fff !important; border: 1px solid var(--linea) !important; color: var(--ink) !important;
}
html body.theme-clean .dataTables_info { color: var(--gris) !important; }

html body.theme-clean .rounded-2xl,
html body.theme-clean .rounded-3xl { border-radius: 6px !important; }

html body.theme-clean .shadow-xl,
html body.theme-clean .shadow-2xl { box-shadow: 0 18px 30px -22px rgba(20,24,31,.2) !important; }

/* Attendance banners (HTMX) */
html body.theme-clean .attendance_banner {
  background: var(--azul-3) !important;
  border: 1px solid var(--linea) !important;
  color: var(--ink) !important;
  border-radius: 4px;
  font-family: "IBM Plex Mono", monospace;
}
html body.theme-clean .attendance_banner p,
html body.theme-clean .attendance_banner .text-gray-100 { color: var(--ink) !important; }

html body.theme-clean .jugador-puntaje { color: var(--ink); }
html body.theme-clean .jugador-puntaje .fa-star { color: #c9a227; }
html body.theme-clean .jugador-puntaje .fa-regular { color: var(--gris-claro); }

#loading {
  display: none; position: fixed; inset: 0;
  background: url("../loading.5d063f70fd5b.gif") no-repeat center center rgba(20, 24, 31, .72);
  backdrop-filter: blur(4px);
  z-index: 99999; cursor: wait;
}
#loading.loading-visible { display: block !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--panel); }
::-webkit-scrollbar-thumb { background: var(--rojo); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--rojo-deep); }

@media (max-width: 1100px) {
  .stat-rail.cols-7,
  .stat-rail.cols-8 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 980px) {
  .site-nav, .header-search { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .stat-rail,
  .stat-rail.cols-3,
  .stat-rail.cols-4,
  .stat-rail.cols-5,
  .stat-rail.cols-6 { grid-template-columns: repeat(2, 1fr); }
  .explora-grid { grid-template-columns: repeat(2, 1fr); }
  .fila-partido { grid-template-columns: 56px 1fr 56px; }
  .fila-partido .torneo { display: none; }
  .rankings { grid-template-columns: 1fr; gap: 20px; }
  .destacados-grid { grid-template-columns: 1fr; }
  .trofeos { flex-direction: column; }
  .clasicos-grid { grid-template-columns: repeat(2, 1fr); }
  .memorables-grid { grid-template-columns: 1fr 1fr; }
  .side-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .wrap { padding: 0 18px; }
  .layout-2, .planillas { grid-template-columns: 1fr; }
  .cuenta-grid { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .entity-hero { grid-template-columns: 1fr; justify-items: start; }
  .btn-filtros-mobile { display: block; }
  .match-ficha .ficha-resultado { font-size: 28px; }
  .match-list.partidos a, .list-group.partidos > a {
    grid-template-columns: 56px 36px 1fr;
  }
  .match-list .torneo { display: none; }
  .col-wide { display: none; }
}

@media (max-width: 640px) {
  .stat-rail.cols-7,
  .stat-rail.cols-8 { grid-template-columns: repeat(2, 1fr); }
}
