/* Actual Deportes — estilos del sitio público.
   Los colores y fuentes se controlan desde el panel (/admin → Apariencia). */

:root {
  --primary: #E8392B;
  --accent: #FFD400;
  --bg: #0B0D12;
  --surface: #151922;
  --text: #F4F5F7;
  --muted: #9AA3B2;
  --radius: 10px;
  --font-h: 'Oswald', 'Arial Narrow', sans-serif;
  --font-b: 'Inter', system-ui, sans-serif;
  --line: color-mix(in srgb, var(--text) 10%, transparent);
  --surface-2: color-mix(in srgb, var(--surface) 80%, var(--text) 6%);
  --max: 1240px;
}

html[data-theme="light"] {
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --text: #12151C;
  --muted: #5E6676;
  --accent: #D97706;
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --surface-2: color-mix(in srgb, var(--surface) 88%, var(--text) 6%);
}

html[data-theme="light"] .badge.breaking {
  background: #FFD400;
  color: #111;
}

html[data-theme="light"] .brand-mark {
  box-shadow: inset 0 0 0 1px var(--line);
}

html[data-theme="light"] .card:not(.ad-feed),
html[data-theme="light"] .hero-side .card-h {
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid var(--line);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .2s ease, color .2s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
h1, h2, h3, h4 { font-family: var(--font-h); text-transform: uppercase; line-height: 1.08; margin: 0; letter-spacing: .01em; }

/* ---------- Ticker de última hora ---------- */
.ticker { display: flex; align-items: stretch; background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; overflow: hidden; height: 36px; }
.ticker-label { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: color-mix(in srgb, #000 22%, var(--primary)); font-family: var(--font-h); text-transform: uppercase; letter-spacing: .06em; z-index: 1; }
.ticker-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.ticker-track { display: flex; align-items: center; white-space: nowrap; animation: marquee var(--ticker-speed, 40s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a, .ticker-track span { padding: 0 28px; position: relative; }
.ticker-track > *::after { content: '•'; position: absolute; right: -4px; opacity: .6; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--primary); display: grid; place-items: center; font-family: var(--font-h); font-weight: 700; font-size: 20px; letter-spacing: -.02em; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-family: var(--font-h); font-weight: 700; text-transform: uppercase; font-size: 20px; letter-spacing: .03em; line-height: 1; }
.brand-name small { display: block; font-size: 10px; letter-spacing: .18em; color: var(--muted); font-weight: 500; margin-top: 3px; }
.brand-logo-img { height: 44px; width: auto; }
.main-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.main-nav > :first-child { margin-left: auto; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; font-family: var(--font-h); text-transform: uppercase; font-size: 15px; letter-spacing: .04em; color: var(--muted); transition: color .15s, background .15s; }
.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a.active { color: #fff; background: var(--primary); }
.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: border-color .15s, background .15s, color .15s; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-btn { font-family: var(--font-h); font-weight: 700; font-size: 13px; letter-spacing: .05em; width: auto; min-width: 40px; padding: 0 11px; border-radius: 999px; }
.search-bar { display: flex; gap: 8px; padding-bottom: 14px; }
.search-bar[hidden] { display: none; }
.search-bar input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; outline: none; }
.search-bar input:focus { border-color: var(--primary); }
.search-bar button, .btn { height: 46px; padding: 0 22px; border: 0; border-radius: var(--radius); background: var(--primary); color: #fff; font-family: var(--font-h); text-transform: uppercase; letter-spacing: .05em; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--text); }

@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; height: auto; padding-top: 12px; gap: 12px; }
  .main-nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 16px 10px; }
  .main-nav > :first-child { margin-left: 0; }
  .brand { margin-right: auto; }
}
/* Celulares angostos: logo y botones más compactos para que quepan en una sola fila */
@media (max-width: 420px) {
  .header-row { gap: 8px; }
  .brand { gap: 9px; min-width: 0; }
  .brand-mark { width: 38px; height: 38px; font-size: 17px; }
  .brand-name { font-size: 17px; }
  .brand-name small { font-size: 9px; letter-spacing: .14em; }
  .brand-logo-img { height: 38px; }
  .header-tools { gap: 6px; }
  .header-tools .icon-btn { width: 38px; height: 38px; }
  .header-tools .lang-btn { width: auto; min-width: 38px; padding: 0 9px; }
}

/* ---------- Generales ---------- */
/* main.wrap: con solo "main", el padding de .wrap anulaba este espacio y la portada quedaba pegada al anuncio */
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
/* Mientras carga la siguiente página: se atenúa solo si tarda más de un instante */
main.is-loading { opacity: .55; pointer-events: none; transition: opacity .2s ease .15s; }
.section { margin: 40px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-title { font-size: 26px; display: flex; align-items: center; gap: 12px; }
.section-title::before { content: ''; width: 6px; height: 26px; background: var(--sec-color, var(--primary)); border-radius: 3px; }
.see-more { font-family: var(--font-h); text-transform: uppercase; font-size: 14px; color: var(--muted); letter-spacing: .05em; white-space: nowrap; }
.see-more:hover { color: var(--primary); }
.badge { display: inline-block; padding: 4px 9px; border-radius: 5px; background: var(--cat, var(--primary)); color: #fff; font-family: var(--font-h); text-transform: uppercase; font-size: 12px; letter-spacing: .07em; line-height: 1.2; }
.badge.breaking { background: var(--accent); color: #111; }
.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.loading { display: flex; gap: 8px; justify-content: center; padding: 120px 0; }
.loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); animation: pulse 1s infinite; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }
.empty { text-align: center; padding: 80px 16px; color: var(--muted); }
.empty h2 { color: var(--text); margin-bottom: 8px; }

/* Imagen o portada de respaldo */
.thumb { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); aspect-ratio: 16 / 10; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; background:
    radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--cat, var(--primary)) 70%, transparent), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--cat, var(--primary)) 35%, var(--surface)), var(--surface)); }
.thumb-fallback span { font-family: var(--font-h); font-weight: 700; font-size: clamp(40px, 9vw, 120px); color: rgba(255,255,255,.12); letter-spacing: -.03em; }

/* ---------- Portada (hero) ---------- */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; }
.hero-main .thumb { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.hero-main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.88)); pointer-events: none; }
.hero-main .hero-body { position: relative; z-index: 1; padding: 28px; color: #fff; }
.hero-main h1 { font-size: clamp(28px, 4vw, 46px); margin: 12px 0 10px; }
.hero-main p { margin: 0 0 12px; color: rgba(255,255,255,.85); max-width: 640px; }
.hero-main .meta { color: rgba(255,255,255,.75); }
.hero-side { display: grid; gap: 16px; align-content: space-between; }
.hero-side .card-h { background: var(--surface); border-radius: var(--radius); padding: 10px; }
.hero-side .card-h h3 { font-size: 17px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-main { min-height: 380px; }
  .hero-main .hero-body { padding: 20px; }
}

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 12px; }
/* Fondo de tarjeta, igual que las notas laterales de la portada */
.card:not(.ad-feed) { background: var(--surface); border-radius: var(--radius); padding: 10px 10px 14px; }
.card:not(.ad-feed) > :not(.thumb) { margin-left: 4px; margin-right: 4px; }
.card h3 { font-size: 20px; transition: color .15s; }
.card:hover h3 { color: var(--primary); }
.card p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-h { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.card-h .thumb { aspect-ratio: 1 / 1; }
.card-h h3 { font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-h:hover h3 { color: var(--primary); }
.card-h .badge { font-size: 10px; padding: 3px 7px; margin-bottom: 6px; }

/* Lista con barra lateral */
.with-side { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
@media (max-width: 1000px) { .with-side { grid-template-columns: 1fr; } }
.sidebar { display: grid; gap: 24px; position: sticky; top: 90px; }
@media (max-width: 1000px) { .sidebar { position: static; } }
.panel { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.panel h3 { font-size: 20px; margin-bottom: 14px; }
.top-list { list-style: none; margin: 0; padding: 0; counter-reset: top; }
.top-list li { counter-increment: top; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.top-list li:first-child { border-top: 0; padding-top: 0; }
.top-list li::before { content: counter(top); font-family: var(--font-h); font-size: 30px; line-height: 1; color: var(--primary); font-weight: 700; }
.top-list a { font-weight: 600; font-size: 15px; line-height: 1.35; }
.top-list a:hover { color: var(--primary); }

/* ---------- Marcadores ---------- */
.matches { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.match { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.match-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; gap: 8px; }
.match-status { color: var(--accent); white-space: nowrap; }
.match-status.live { color: #fff; background: var(--primary); padding: 1px 7px; border-radius: 4px; }
.team { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; font-weight: 600; }
.team-logo { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); overflow: hidden; }
.team-logo img { width: 100%; height: 100%; object-fit: contain; }
.team-score { font-family: var(--font-h); font-size: 22px; min-width: 20px; text-align: right; }

/* ---------- Publicidad ---------- */
.ad-slot { display: grid; gap: 6px; justify-items: center; }
.ad-slot:empty { display: none; }
.ad-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); justify-self: start; }
.ad-creative { display: block; width: 100%; border-radius: var(--radius); overflow: hidden; text-align: center; }
/* min-height: sin él la imagen "lazy" mide 0 px antes de cargar y Chrome de escritorio nunca la pide */
.ad-creative img { width: 100%; height: auto; min-height: 1px; margin: 0 auto; }
/* Carrusel: varias campañas en el mismo espacio */
.ad-creative.ad-in { animation: adIn .45s ease; }
@keyframes adIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ad-creative.ad-in { animation: none; } }
.ad-dots { display: flex; justify-content: center; gap: 2px; }
.ad-dots button { width: 22px; height: 18px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.ad-dots button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--text) 25%, transparent); transition: background .2s, width .2s; }
.ad-dots button[aria-current="true"]::before { width: 16px; border-radius: 4px; background: var(--primary); }
.ad-sticky .ad-dots { display: none; }
.ad-house { display: grid; place-items: center; align-content: center; gap: 4px; width: 100%; min-height: 110px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--muted); text-align: center; transition: border-color .15s, color .15s; }
.ad-house span { font-family: var(--font-h); text-transform: uppercase; letter-spacing: .08em; font-size: 18px; color: var(--text); }
.ad-house small { font-size: 12px; }
.ad-house:hover { border-color: var(--primary); }
.ad-house:hover span { color: var(--primary); }
.sidebar .ad-house { min-height: 250px; }
/* Anuncio superior: franja propia, separada de las noticias, con la etiqueta alineada al banner */
.ad-header { margin-top: 16px; }
.ad-header:not(:empty) { padding-bottom: 8px; }
/* Mismo ancho que las noticias, alineado a sus bordes */
.ad-header .ad-creative, .ad-header .ad-label { justify-self: stretch; }
.ad-header .ad-label { width: 100%; }
.ad-house.ad-house-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; min-height: 0; height: 56px; padding: 0 16px; }
.ad-house-line span { font-size: 15px; }
.ad-house-line small::before { content: '·'; margin-right: 12px; opacity: .6; }
@media (max-width: 640px) { .ad-house.ad-house-line { height: 44px; } .ad-house-line span { font-size: 13px; } .ad-house-line small { font-size: 11px; } }
.article-body .ad-inline, .article .ad-inline { margin: 1.6em 0; }
.article .ad-inline .ad-creative { max-width: 728px; }
.ad-feed { justify-content: center; }
.ad-feed .ad-creative img { aspect-ratio: 16 / 10; object-fit: cover; }
.ad-feed .ad-house { min-height: 100%; aspect-ratio: 16 / 10; }
.ad-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 44px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(0,0,0,.25); }
.ad-sticky .ad-label { display: none; }
.ad-sticky .ad-creative { max-width: 360px; margin: 0 auto; border-radius: 6px; }
.ad-close { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 13px; }
@media (min-width: 761px) { .ad-sticky { display: none; } }
@media (max-width: 760px) { body:has(.ad-sticky:not([hidden])) .site-footer { padding-bottom: 96px; } }
/* Aviso de vista previa (cambios del panel sin guardar, solo en esta pestaña) */
.preview-bar { background: var(--accent); color: #111; font-size: 14px; position: relative; z-index: 80; }
.preview-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.preview-bar strong { font-family: var(--font-h); text-transform: uppercase; letter-spacing: .06em; }
.preview-bar small { display: block; margin-top: 4px; font-size: 13px; }
.preview-bar .btn { background: #111; color: #fff; border-color: #111; }
/* Favoritos al inicio de la portada */
.fav-home { margin-top: 20px; padding: 18px 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 12%, var(--surface)), var(--surface) 55%); }
.fav-home .section-title { color: var(--text); }
.fav-home-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 10px; }
.fav-home-sub h3 { margin: 0; font-family: var(--font-h); text-transform: uppercase; font-size: 15px; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 640px) { .fav-home { padding: 14px 14px 18px; } }
/* Costados: fijos a los lados del contenido, solo donde caben sin taparlo */
.ad-rail { display: none; }
@media (min-width: 1600px) {
  /* Centrado a la altura de la vista, sin subirse al encabezado */
  .ad-rail { display: block; position: fixed; top: max(96px, calc(50vh - 220px)); z-index: 40; width: 160px; }
  .ad-rail-left { right: calc(50% + var(--max) / 2 + 16px); }
  .ad-rail-right { left: calc(50% + var(--max) / 2 + 16px); }
  .ad-rail .ad-house { min-height: 440px; gap: 8px; padding: 20px 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 14%, var(--surface)), var(--surface) 70%); }
  .ad-rail .ad-house::before { content: '📣'; font-size: 30px; margin-bottom: 4px; }
  .ad-rail .ad-house span { font-size: 17px; line-height: 1.2; }
}

/* Aviso de cookies */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; max-width: 720px; margin: 0 auto; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.consent p { margin: 0; font-size: 14px; color: var(--muted); flex: 1 1 280px; }
.consent a { color: var(--text); text-decoration: underline; }
.consent div { display: flex; gap: 8px; }
.consent .btn { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Nota ---------- */
.article { max-width: 780px; margin: 0 auto; }
.article-head { margin: 8px 0 24px; }
.article-head-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.article-controls { display: inline-flex; align-items: center; gap: 6px; }
.ctrl-pill { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-family: var(--font-h); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; transition: border-color .15s, color .15s, background .15s; }
.ctrl-pill:hover { border-color: var(--primary); color: var(--primary); }
.ctrl-pill svg { width: 14px; height: 14px; flex: none; }
.article-head h1 { font-size: clamp(30px, 5vw, 52px); margin: 14px 0; }
.article-head .lead { font-size: 19px; color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.article-cover { margin: 0 0 28px; }
.article-cover .thumb { aspect-ratio: 16 / 9; }
.article-cover figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.article-body { font-size: 18px; line-height: 1.75; }
.article-body p { margin: 0 0 1.2em; }
.article-body h2 { font-size: 28px; margin: 1.6em 0 .6em; }
.article-body h3 { font-size: 22px; margin: 1.4em 0 .5em; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body img, .article-body video { border-radius: var(--radius); margin: 1.4em auto; height: auto; }
.article-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); margin: 1.4em 0; }
.article-body iframe.embed-widget { aspect-ratio: auto; height: 600px; margin-bottom: .4em; } /* widgets de datos: alto fijo */
.article-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 5px solid var(--primary); font-family: var(--font-h); font-size: 24px; line-height: 1.3; text-transform: uppercase; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .4em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.tags a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.tags a:hover { border-color: var(--primary); color: var(--primary); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share strong { font-family: var(--font-h); text-transform: uppercase; font-weight: 500; margin-right: 6px; letter-spacing: .05em; }
.share a, .share button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.share a:hover, .share button:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.share svg { width: 18px; height: 18px; }
.page-head { margin: 8px 0 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(32px, 5vw, 54px); display: flex; align-items: center; gap: 14px; }
.page-head h1::before { content: ''; width: 8px; height: .9em; background: var(--cat, var(--primary)); border-radius: 4px; }
.page-head p { color: var(--muted); margin: 8px 0 0; }
.load-more { display: flex; justify-content: center; margin-top: 32px; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 16px; letter-spacing: .06em; margin-bottom: 14px; color: var(--muted); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid ul a:hover { color: var(--primary); }
.footer-about p { color: var(--muted); font-size: 14px; margin: 14px 0; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); }
.socials a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.socials svg { width: 18px; height: 18px; }
.newsletter p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--primary); }
.footer-bottom .powered b { color: var(--text); font-weight: 600; letter-spacing: .02em; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 100; }

/* ---------- Escudos ---------- */
.crest { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 9px/1 var(--font-b); letter-spacing: .02em; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.crest.sm { width: 22px; height: 22px; font-size: 8px; }
.crest-img { background: transparent; box-shadow: none; }
.crest img { width: 100%; height: 100%; object-fit: contain; }
.team { grid-template-columns: 28px 1fr auto; }

/* ---------- Tablas de posiciones ---------- */
.standings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 22px; }
.standings-grid > *, .sidebar > * { min-width: 0; }
.standings td.tm span:last-child { min-width: 0; }
@media (max-width: 420px) { .standings-card { padding: 14px 12px 12px; } .standings td, .standings th { padding-left: 4px; padding-right: 4px; } }
.standings-card { padding: 18px 18px 14px; }
.st-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.st-head h3 { margin: 0; font-size: 19px; }
.st-note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
/* Widget de Sofascore en tablas y resultados */
.sofa-widget iframe { display: block; width: 100%; border: 0; border-radius: var(--radius); background: var(--surface); }
/* Con widget, la tarjeta no dibuja su propio recuadro: el widget ya trae el suyo (sin "tarjeta dentro de tarjeta") */
.standings-card.has-widget, .st-tabs { background: transparent; border: 0; padding: 0; }
.standings-grid { align-items: start; }
/* Pestañas de ligas en la portada */
.st-tabbar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding-bottom: 2px; }
.st-tabbar::-webkit-scrollbar { display: none; }
.st-tab { flex: none; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-family: var(--font-h); text-transform: uppercase; letter-spacing: .04em; font-size: 14px; cursor: pointer; }
.st-tab:hover { color: var(--text); }
.st-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.st-tabs .st-pane:not(:has(.sofa-widget)) { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.sofa-widget .st-note a { text-decoration: underline; }
.st-other { font-size: 18px; margin: 28px 0 10px; }
.table-scroll { overflow-x: auto; margin: 0 -4px; }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.standings th { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 6px 6px 8px; border-bottom: 1px solid var(--line); }
.standings td { text-align: center; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.standings tr:last-child td { border-bottom: 0; }
.standings .tm { text-align: left; }
.standings td.tm { display: flex; align-items: center; gap: 9px; font-weight: 600; white-space: nowrap; }
.standings td.tm span:last-child { overflow: hidden; text-overflow: ellipsis; }
.standings .pts { font-weight: 800; color: var(--text); }
.standings .pos { position: relative; width: 34px; font-weight: 700; color: var(--muted); }
.standings .pos[style]::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--zone); }
.standings tbody tr:hover td { background: color-mix(in srgb, var(--text) 4%, transparent); }
.standings:not(.compact) { font-size: 15px; background: var(--surface); border-radius: var(--radius); }
.standings:not(.compact) td { padding: 10px 8px; }
@media (max-width: 640px) { .standings .wide { display: none; } }
.zones { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.zones span { display: inline-flex; align-items: center; gap: 7px; }
.zones i { width: 10px; height: 10px; border-radius: 3px; }
.sidebar .standings-card .st-head h3 { font-size: 17px; }

/* ---------- Página "Anúnciate" ---------- */
.mk-hero { padding: 36px 0 12px; max-width: 760px; }
.mk-hero h1 { font-size: clamp(34px, 6vw, 60px); margin: 14px 0 12px; }
.mk-hero p { color: var(--muted); font-size: 18px; margin: 0 0 22px; }
.mk-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.mk-tile b { display: block; font-family: var(--font-h); font-size: 42px; line-height: 1; color: var(--text); }
.mk-tile span { color: var(--muted); font-size: 14px; }
.mk-sources { margin-top: 16px; }
.mk-src { display: grid; grid-template-columns: 130px 1fr 48px; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; }
.mk-src i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--primary) var(--w), color-mix(in srgb, var(--text) 8%, transparent) var(--w)); }
.mk-src b { text-align: right; font-variant-numeric: tabular-nums; }
.mk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.mk-slot h3 { font-size: 19px; margin: 0; }
.mk-slot p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.mk-slot-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.mk-state { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; border-radius: 5px; background: color-mix(in srgb, #2BB673 20%, transparent); color: #4fd391; }
.mk-state.busy { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--muted); }
.mk-price { color: var(--accent) !important; font-weight: 700; font-size: 16px !important; }
.mk-how ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); }
.mk-how li { margin-bottom: 8px; }
.mk-how b { color: var(--text); }
@media (max-width: 480px) { .mk-src { grid-template-columns: 96px 1fr 40px; } }

/* ---------- Favoritos, "Para ti" y cuenta del lector ---------- */
.account-btn.is-in { background: var(--primary); border-color: var(--primary); color: #fff; font-family: var(--font-h); font-weight: 700; font-size: 17px; }
.account-btn.is-in:hover { color: #fff; filter: brightness(1.1); }
.fav-cta { position: relative; display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; margin: 28px 0; padding: 18px 52px 18px 20px; border-radius: var(--radius); background: linear-gradient(110deg, color-mix(in srgb, var(--primary) 22%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); }
.fav-cta div { flex: 1 1 260px; }
.fav-cta strong { font-family: var(--font-h); text-transform: uppercase; font-size: 20px; letter-spacing: .02em; }
.fav-cta p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.fav-cta-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 13px; }
.fav-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 20px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.fav-note span { flex: 1 1 220px; color: var(--muted); }
.fav-note a, .fav-note button { border: 0; background: none; padding: 0; color: var(--primary); font-weight: 600; font-size: 14px; }
.for-you .section-title { color: var(--text); }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px !important; }
.fav-sync { margin: -12px 0 24px; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); font-size: 14px; color: var(--muted); }
.fav-sync a { color: var(--primary); font-weight: 600; white-space: nowrap; }
.fav-group { margin: 0 0 28px; }
.fav-group h2 { font-size: 22px; margin-bottom: 12px; }
.fav-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.fav-group-head h2 { margin: 0; }
.fav-group-head input { height: 40px; width: min(260px, 100%); padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.fav-group-head input:focus { border-color: var(--primary); }
.fav-team-group { margin-bottom: 16px; }
.fav-team-group h3 { font-size: 14px; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.fav-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s; }
.fav-chip:hover { border-color: var(--primary); }
.fav-chip[hidden] { display: none; }
.fav-chip i { font-style: normal; font-size: 17px; line-height: 1; }
.fav-chip .crest { margin-left: -6px; }
.fav-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); border-color: var(--primary); }
button.fav-chip[aria-pressed="true"]::after { content: '✓'; color: var(--primary); font-weight: 800; }
.fav-switch { display: flex; align-items: center; gap: 12px; margin: 8px 0 24px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-weight: 600; cursor: pointer; }
.fav-switch input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.fav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.fav-status { color: var(--muted); font-size: 14px; }
.fav-switch small { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; font-size: 13px; }
/* Liga con sus equipos: "Toda la liga" junto al nombre y debajo lo que verá el lector */
.fav-hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.fav-league-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.fav-league-head h3 { margin: 0; }
.fav-league-head .fav-chip { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.fav-scope { margin: 0 0 10px; min-height: 1em; color: var(--accent); font-size: 13px; font-weight: 600; }
.fav-scope:empty { display: none; }
/* Ligas para seguir completas: tarjetas grandes con "Seguir" / "Siguiendo" */
.fav-leagues { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 10px; }
.fav-league-card .fav-scope { margin: 6px 4px 0; }
.fav-chip.fav-league-btn { width: 100%; min-height: 56px; border-radius: 14px; padding: 10px 14px; gap: 10px; font-size: 15px; text-align: left; }
.fav-league-btn i { font-size: 22px; }
.fav-league-name { flex: 1; min-width: 0; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.fav-league-state { flex: none; padding: 5px 10px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.fav-league-state::before { content: attr(data-off); }
.fav-league-btn[aria-pressed="true"] .fav-league-state { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.fav-league-btn[aria-pressed="true"] .fav-league-state::before { content: attr(data-on); }
button.fav-chip.fav-league-btn[aria-pressed="true"]::after { content: none; }
.fav-team-group[hidden] { display: none; }
/* Liga recomendada según el país */
.geo-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0 0 24px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.geo-suggest > div:first-child { flex: 1 1 240px; }
.geo-suggest strong { font-family: var(--font-h); text-transform: uppercase; font-size: 17px; letter-spacing: .02em; }
.geo-suggest p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.geo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-cta + .geo-suggest, .geo-suggest + .fav-cta { margin-top: 0; }
/* Avisos de los equipos favoritos */
.push-box { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.push-box h2 { margin-top: 0; }
.push-kinds { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.push-kinds input { accent-color: var(--primary); width: 18px; height: 18px; vertical-align: -3px; }
.push-status { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.push-status:empty { display: none; }
.lang-note { margin: 0 0 22px; padding: 10px 14px; border-left: 4px solid var(--accent); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 14px; }

.acct { display: grid; place-items: start center; padding: 12px 0 24px; }
.acct-card { width: min(440px, 100%); padding: 24px; }
.acct-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 22px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.acct-tabs[hidden] { display: none; }
.acct-tabs button { height: 38px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-family: var(--font-h); text-transform: uppercase; letter-spacing: .05em; font-size: 14px; }
.acct-tabs button[aria-selected="true"] { background: var(--primary); color: #fff; }
.acct-form { display: grid; gap: 14px; }
.acct-form[hidden] { display: none; }
.acct-form h1 { font-size: 28px; }
.acct-form h3 { margin-bottom: 0; }
.acct-sub { margin: -6px 0 0; color: var(--muted); font-size: 15px; }
.form-row { display: grid; gap: 6px; }
.form-row span { font-size: 13px; font-weight: 600; color: var(--muted); }
.form-row input { height: 46px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; outline: none; width: 100%; }
.form-row input:focus { border-color: var(--primary); }
.form-row small { color: var(--muted); font-size: 12px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.form-msg { margin: 0; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, #e5484d 16%, transparent); color: var(--text); font-size: 14px; }
.form-msg[hidden] { display: none; }
.linkish { justify-self: center; border: 0; background: none; padding: 4px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--primary); }
.acct-legal { margin: 0; text-align: center; color: var(--muted); font-size: 12px; }
.acct-legal a { text-decoration: underline; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.acct-side { display: grid; gap: 16px; }
.acct-side > .btn { width: 100%; }
.acct-grid details summary { cursor: pointer; font-family: var(--font-h); text-transform: uppercase; letter-spacing: .03em; font-size: 17px; }
.acct-grid details[open] summary { margin-bottom: 14px; }
.acct-danger summary { color: #ff6b5e; }
.btn-danger { background: #c62828; }
.btn:disabled { opacity: .6; cursor: wait; }
@media (max-width: 800px) { .acct-grid { grid-template-columns: 1fr; } }

/* Boletín */
.nl-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.nl-msg { margin: 10px 0 0 !important; font-size: 14px; color: var(--text) !important; }

/* ---------- Celular: barra inferior, secciones y marcadores ---------- */
.tabbar, .scores-top { display: none; }
.matches-list { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); overflow: visible; }
@media (max-width: 760px) {
  :root { --tabbar-h: 60px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--muted); font: 500 11px/1 var(--font-b); -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .active { color: var(--primary); }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .ad-sticky { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: 6px; }
  .consent { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }

  /* El buscador vive en la barra inferior; al bajar, la fila de secciones queda pegada arriba */
  #search-toggle { display: none; }
  .site-header { transition: top .25s ease; }
  .site-header.compact { top: calc(-1 * var(--hide, 0px)); }
  .main-nav { gap: 6px; }
  .main-nav a { padding: 7px 14px; font-size: 14px; background: var(--surface); }

  /* Marcadores al inicio de la portada, en tarjetas pequeñas que se deslizan */
  .scores-top { display: block; margin: -8px 0 18px; }
  .home-matches { display: none; }
  .matches-mini { grid-auto-columns: 168px; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; scrollbar-width: none; }
  .matches-mini::-webkit-scrollbar { display: none; }
  .matches-mini .match { padding: 10px 12px; gap: 7px; }
  .matches-mini .match-top { font-size: 10px; }
  .matches-mini .match-top > span:first-child, .matches-mini .team > .team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .matches-mini .team { grid-template-columns: 22px 1fr auto; gap: 8px; font-size: 13px; }
  .matches-mini .crest { width: 22px; height: 22px; font-size: 8px; }
  .matches-mini .team-score { font-size: 17px; }
  .matches-mini .meta, .matches-mini .match-foot, .matches-mini .fav-star { display: none; }
  .matches-mini .match:has(.live) { border-color: var(--primary); }
}

/* Widgets de la biblioteca del panel (cualquier proveedor) */
.widget-slot { width: 100%; max-width: 100%; overflow: auto; }
.widget-slot:empty { display: none; }
.article-body .widget-slot { margin: 1.4em 0; }
.widget-slot iframe { width: 100%; max-width: 100%; border: 0; }

/* ---------- Entrar con redes y plan sin anuncios ---------- */
.social-login { display: grid; gap: 10px; }
.social-login[hidden], .or-line[hidden] { display: none; }
.btn-social { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); text-transform: none; font-family: var(--font-b); font-weight: 600; letter-spacing: 0; font-size: 15px; }
.btn-social:hover { border-color: var(--primary); }
.btn-social svg { flex: none; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.acct-card > .form-msg { margin-bottom: 16px; }
.acct-note { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); font-size: 14px; }
.acct-main { display: grid; gap: 20px; min-width: 0; }
.adfree { scroll-margin-top: 140px; }
.adfree.is-on { border-color: color-mix(in srgb, #2BB673 50%, var(--line)); }
.adfree.is-on h3 { color: #4fd391; }
.adfree-price { margin: -6px 0 10px; font-family: var(--font-h); font-size: 28px; color: var(--accent); }
.adfree-perks { margin: 0 0 6px; padding-left: 20px; color: var(--muted); font-size: 15px; }
.adfree .form-msg { margin-top: 10px; }
.ad-label a { margin-left: 10px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; letter-spacing: .08em; }
.ad-label a:hover { color: var(--primary); }

/* ---------- Estrella de equipo favorito, filtros de partidos y vista interna (/partido/:id) ---------- */
.crest.lg { width: 64px; height: 64px; font-size: 18px; }
@media (max-width: 520px) { .crest.lg { width: 52px; height: 52px; font-size: 15px; } }

.fav-star { flex: none; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; display: inline-grid; place-items: center; cursor: pointer; transition: color .15s, transform .15s, border-color .15s, background .15s; }
.fav-star i { font-style: normal; }
.fav-star:hover { color: var(--accent); border-color: var(--line); background: color-mix(in srgb, var(--accent) 12%, transparent); transform: scale(1.08); }
.fav-star.is-on { color: var(--accent); }
.fav-star.has-lbl { width: auto; height: 34px; padding: 0 12px; border-radius: 999px; border-color: var(--line); background: var(--bg); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.fav-star.has-lbl i { color: var(--muted); font-size: 15px; }
.fav-star.has-lbl.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.fav-star.has-lbl.is-on i { color: var(--accent); }

.match { position: relative; cursor: pointer; transition: border-color .15s, transform .15s; }
.match:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); }
.match.is-fav { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface) 60%); }
.match .team { grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 8px; }
.match .team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match .team-name:hover { color: var(--primary); }
.match .team.is-fav-team .team-name { color: var(--accent); }
.match-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--line); font-size: 12px; }
.match-foot .meta { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-link { flex: none; font-family: var(--font-h); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); font-weight: 600; }
.match-link:hover { text-decoration: underline; }

.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #fff; margin-right: 5px; vertical-align: middle; animation: livePulse 1.2s infinite ease-in-out; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.match-status.finished { color: var(--muted); }

/* Filtros de partidos y sección Mis favoritos */
.fav-matches-sec { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.section-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.match-filters { display: grid; gap: 10px; margin-bottom: 16px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.filter-pill small { opacity: .75; font-size: 12px; }
.filter-pill:hover { color: var(--text); border-color: var(--primary); }
.filter-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.fav-team-pill { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding-right: 4px; transition: border-color .15s, background .15s; }
.fav-team-pill.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, var(--surface)); }
.fav-team-select { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 8px 4px 10px; border: 0; background: none; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; }
.fav-team-select:hover { color: var(--primary); }
.fav-no-schedule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.fav-no-schedule-team { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }

/* Filas favoritas y selector de vista en tablas */
.standings tr.is-fav-row td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.standings tr.is-match-row td { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.standings td.tm .fav-star { margin-left: auto; width: 24px; height: 24px; font-size: 14px; }
.st-mode-bar { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.st-mode-btn { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-family: var(--font-h); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.st-mode-btn.active { background: var(--primary); color: #fff; }
.st-mode-pane[hidden] { display: none; }

/* Página interna de detalles del partido (/partido/:id) */
.match-back-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.match-hero { padding: 24px 20px; margin-bottom: 28px; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary) 18%, var(--surface)), var(--surface) 70%); }
.match-hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.match-hero-board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; text-align: center; }
.match-hero-team { display: grid; justify-items: center; gap: 8px; min-width: 0; }
.match-hero-team h2 { font-size: clamp(18px, 3.5vw, 28px); margin: 0; word-break: break-word; }
.match-hero-team small { color: var(--muted); font-size: 13px; }
.match-hero-center { display: grid; justify-items: center; gap: 6px; padding: 0 8px; }
.match-hero-scores { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-h); font-size: clamp(36px, 7vw, 60px); font-weight: 700; line-height: 1; }
.match-hero-scores small { color: var(--muted); font-size: .7em; }
.match-minute-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 20%, var(--bg)); border: 1px solid var(--primary); color: var(--text); font-size: 12px; font-weight: 700; }
.match-when { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 480px) {
  .match-hero { padding: 18px 12px; }
  .match-hero-board { gap: 8px; }
  .fav-star.has-lbl span { display: none; }
  .fav-star.has-lbl { width: 32px; height: 32px; padding: 0; justify-content: center; }
}


/* ---------- Partidos por fecha (Resultados) ---------- */
.day-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.day-cur { flex: 1; text-align: center; font-family: var(--font-h); text-transform: uppercase; font-size: 18px; letter-spacing: .02em; }
.day-arrow { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 22px; line-height: 1; text-decoration: none; }
.day-arrow:hover { border-color: var(--primary); }
.day-today { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.mgroups { display: grid; gap: 14px; margin-bottom: 28px; }
.mgroup { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.mgroup-head { margin: 0; padding: 12px 14px; font-size: 15px; letter-spacing: .03em; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.mgroup-head small { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 12px; }
.mgroup-star { color: var(--accent); }
.mrow { display: grid; grid-template-columns: 52px minmax(0, 1fr) 62px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 14px; color: var(--text); text-decoration: none; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.mgroup-head + .mrow { border-top: 0; }
.mrow:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.mrow.is-fav { box-shadow: inset 3px 0 0 var(--accent); }
.mrow-st { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.25; font-weight: 700; color: var(--muted); }
.mrow-st .live-dot { display: inline-block; margin-right: 4px; vertical-align: 1px; }
.mrow.state-live .mrow-st { color: var(--primary); }
.mrow-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 14px; }
.mrow-team.home { justify-content: flex-end; text-align: right; }
.mrow-team.is-fav-team .mrow-name { color: var(--accent); }
.mrow-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-score { text-align: center; font-family: var(--font-h); font-size: 18px; white-space: nowrap; }
.mrow.state-live .mrow-score { color: var(--primary); }
.mrow-vs { color: var(--muted); font-size: 13px; font-family: inherit; }
@media (max-width: 480px) {
  .mrow { grid-template-columns: 42px minmax(0, 1fr) 50px minmax(0, 1fr); gap: 6px; padding: 10px; }
  .mrow-team { font-size: 13px; gap: 6px; }
  .mrow-score { font-size: 16px; }
}

/* ---------- Página del partido: goleadores y pestañas ---------- */
.scorers { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; margin-top: 14px; font-size: 13px; color: var(--muted); }
.scorers-side { display: grid; gap: 2px; }
.scorers-side.home { text-align: right; }
.scorers-ball { font-size: 12px; opacity: .7; }
.match-detail { padding: 0; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.md-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.md-tab { flex: none; padding: 14px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent; cursor: pointer; }
.md-tab.active { color: var(--text); border-bottom-color: var(--primary); }
.md-body { padding: 16px; }
.md-empty { margin: 0; padding: 18px 16px; color: var(--muted); text-align: center; }
/* Jugadas: las del local a la izquierda y las del visitante a la derecha */
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ev { display: grid; grid-template-columns: 44px 26px minmax(0, 1fr); align-items: center; gap: 6px; width: min(100%, 520px); padding: 6px 0; }
.ev-away { margin-left: auto; grid-template-columns: minmax(0, 1fr) 26px 44px; text-align: right; }
.ev-away .ev-min { order: 3; text-align: right; }
.ev-away .ev-ico { order: 2; }
.ev-away .ev-txt { order: 1; }
.ev-min { font-weight: 700; font-size: 13px; color: var(--muted); }
.ev-ico { text-align: center; }
.ev-txt { display: grid; min-width: 0; font-size: 14px; }
.ev-txt small { color: var(--muted); font-size: 12px; }
.ev-goal .ev-txt strong, .ev-penalty .ev-txt strong, .ev-own-goal .ev-txt strong { color: var(--accent); }
.md-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.md-info dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.md-info dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; }
/* Alineaciones: cancha con las dos formaciones */
.lu-head { display: flex; justify-content: space-between; padding: 8px 4px; font-size: 14px; }
.lu-head span { color: var(--muted); font-weight: 700; }
.pitch { border-radius: 10px; padding: 8px 4px; background: linear-gradient(180deg, #16422a, #12361f); border: 2px solid rgba(255, 255, 255, .18); }
.pitch-half { display: grid; gap: 14px; padding: 10px 0; }
.pitch-half.home { border-bottom: 2px solid rgba(255, 255, 255, .18); }
.pitch-line { display: flex; justify-content: space-around; gap: 4px; }
.pl { display: grid; justify-items: center; gap: 3px; width: 64px; min-width: 0; }
.pl-num { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #111; font-weight: 800; font-size: 13px; }
.pitch-half.away .pl-num { background: var(--primary); color: #fff; }
.pl-name { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.pl-rt { display: inline-block; padding: 1px 4px; border-radius: 4px; background: #5a6170; color: #fff; font-size: 10px; font-weight: 800; }
.pl-num .pl-rt { position: absolute; top: -8px; right: -18px; }
.pl-rt.hi { background: #1f9d55; }
.pl-rt.lo { background: #d95926; }
.lu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.lu-col h3 { margin: 0 0 4px; font-size: 15px; }
.lu-col h4 { margin: 12px 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lu-coach { margin: 0; color: var(--muted); font-size: 13px; }
.lu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14px; }
.lu-num { display: inline-block; width: 24px; color: var(--muted); font-weight: 700; }
@media (max-width: 480px) { .lu-cols { grid-template-columns: 1fr; } .pl { width: 50px; } .pl-name { max-width: 50px; } .pl-num .pl-rt { right: -14px; } }
/* Estadísticas: una barra por dato, local en azul y visitante en naranja */
.st-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-weight: 700; font-size: 14px; }
.st-head span:first-child { color: #3987e5; }
.st-head span:last-child { color: #d95926; text-align: right; }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.st-vals { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.st-vals span { color: var(--muted); font-size: 13px; text-align: center; }
.st-bar { display: flex; gap: 4px; height: 8px; margin-top: 6px; }
.st-bar i { display: block; height: 100%; border-radius: 4px; }
.st-bar .h { background: #3987e5; }
.st-bar .a { background: #d95926; }
/* Cara a cara */
.h2h-list { list-style: none; margin: 0; padding: 0; display: grid; }
.h2h-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.h2h-list li:first-child { border-top: 0; }
.h2h-date { display: grid; font-size: 12px; color: var(--muted); }
.h2h-date small { font-size: 11px; }
.h2h-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.h2h-team.home { text-align: right; }
.h2h-score { text-align: center; font-family: var(--font-h); font-size: 16px; }
@media (max-width: 480px) { .h2h-list li { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); } .h2h-date { grid-column: 1 / -1; } }

/* ---------- Página de liga ---------- */
.league-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.league-head h1 { margin: 0; font-size: clamp(26px, 5vw, 38px); }
.league-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.league-tabs { margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.league-tabs .md-tab { text-decoration: none; }
.mgroup-head a { color: inherit; text-decoration: none; }
.mgroup-head a:hover { color: var(--primary); }
.mgroup-head .see-more { margin-left: auto; font-size: 12px; }
.mday { margin: 0; padding: 10px 14px 4px; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.day-arrow.is-off { opacity: .3; }
.round-nav .day-cur { font-size: 17px; }
.lt-panel { padding: 8px 10px; }
.league-overview { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.lo-main > .mgroup { margin-bottom: 20px; }
.lo-side .section:first-child, .lo-main .section:first-child { margin-top: 0; }
.lo-news { display: grid; gap: 14px; }
@media (max-width: 900px) { .league-overview { grid-template-columns: 1fr; } }
/* Racha: G verde, E gris, P rojo */
.form { display: inline-flex; gap: 3px; }
.form i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: #7a8494; }
.form .f-W { background: #1f9d55; }
.form .f-L { background: #e8392b; }
.lt-next { display: inline-flex; }
.standings.lt td.lt-form, .standings.lt td.lt-nx { white-space: nowrap; }
.standings.lt td.tm > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lt-note { margin: 10px 4px 4px; color: var(--muted); font-size: 13px; }
.pl-who { display: grid; min-width: 0; }
.pl-who strong, .pl-who small { overflow: hidden; text-overflow: ellipsis; }
.pl-who small { color: var(--muted); font-weight: 500; font-size: 12px; }
@media (max-width: 640px) {
  .standings.lt .lt-nx { display: none; }
  .standings.lt:not(.players) .fav-star { display: none; }
  .standings.lt td, .standings.lt th { padding-left: 3px; padding-right: 3px; }
  .standings.lt td.tm { gap: 6px; }
  .standings.lt td.tm > span { max-width: 86px; }
  .standings.lt .pos { width: 24px; }
  .form { gap: 2px; }
  .form i { width: 15px; height: 17px; border-radius: 4px; font-size: 10px; }
}
