:root{ --bg:#0a0a0a; --ink:#ffffff; --gold:#ffcc00; --line:#ffffff22; }
    body{ margin:0; background:var(--bg); color:var(--ink); font-family:Inter,system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif; }
    .container{ max-width:2000px; margin:0 auto; padding:18px 16px; }
    header{ display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:14px; border-bottom:1px solid var(--line); padding-bottom:0px; }
    .title{ font-weight:900; letter-spacing:.06em; color:var(--gold); font-size:clamp(22px,4.3vw,34px); text-align:left; }
    .actions{ margin-left:auto; display:flex; }
    .btn{ border:1px solid #b28900; background:transparent; color:var(--gold); font-weight:800; padding:5px 5px; border-radius:10px; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
    .cat-inline{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
    .cat-btn{ display:inline-block; padding:10px 18px; border:1px solid #b28900; border-radius:12px;background:linear-gradient(180deg,#ffd966 0%, #ffcc00 60%, #e5b300 100%);color:#1b1600; font-weight:900; letter-spacing:.06em; text-transform:uppercase;font-size:clamp(14px,1.8vw,16px); text-decoration:none;box-shadow:inset 0 -2px 0 #b28900, 0 2px 8px rgba(0,0,0,.4);user-select:none; cursor:pointer; opacity:.5; transition:opacity .15s ease-in-out; }
    .cat-btn.active{ opacity:1; transform:translateY(-1px); }
    .pill-wrap { display:flex; justify-content:flex-start; gap:16px; margin-top:18px; flex-wrap:wrap; }
    .pill-btn { display:inline-block; padding:12px 22px; border:2px solid #b28900; border-radius:14px; background:#0f0f11; color:#ffd966; font-weight:900; letter-spacing:.06em; text-transform:uppercase; font-size:clamp(16px,2vw,20px); text-decoration:none; box-shadow:inset 0 0 0 3px #1b1600; user-select:none; cursor:pointer; opacity:.5; transition:opacity .15s ease-in-out; }
    .pill-btn.active { background:#1b1b1b; opacity:1; }
    .grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; margin-top:22px; }
    @media (max-width:1100px){ .grid{ grid-template-columns:1fr; } }
    .card{ background:#16171a; border:1px solid var(--line); border-radius:20px; padding:20px 12px 8px; box-shadow:0 10px 24px #0006; max-width:640px; justify-self:start; }
    .h1{ margin:0; font-size:clamp(22px,4.6vw,30px); font-weight:900; letter-spacing:.06em; color:var(--gold); }
    .h2{ margin:16px 0 10px; font-size:clamp(14px,2.6vw,14px); font-weight:800; opacity:.95; }
    .rule{ height:1px; background:var(--line); margin:10px 0 6px; }
    .row{ display:grid; grid-template-columns:35px 1fr auto 1fr 35px; align-items:center; gap:10px; padding:8px 0; position:relative; }
    .row + .row::before{ content:""; position:absolute; top:0; left:0; right:0; height:1px; background:var(--line); }
    .score-badge{ width:32px; height:32px; border-radius:10px; background:var(--gold); box-shadow:0 5px 0 #b28900; display:flex; align-items:center; justify-content:center; font-weight:900; color:#1b1600; }
    .team-name{ font-weight:800; letter-spacing:.04em; }
    .vs{ font-weight:900; letter-spacing:.28em; color:#d0d0d0; }
    .fecha-header{ display:flex; align-items:center; gap:.5rem; }
    .fecha-header .h2{ flex:1 1 auto; }
    .fecha-text{ margin-left:auto; background:#000; color:#fff; border:1px solid #444; padding:.35rem .5rem; border-radius:.5rem; min-width:9rem; text-align:center; }

/* --- siguiente bloque de estilos --- */

/* === Scoped POSICIONES styles === */
#posiciones {
  --bg: #0a0a0d;
  --text: #f6f7fb;
  --yellow: #ffef5e;
  --whitepill: #ffffff;
  --square: #f4f5f9;
  --board: #000000;
  --shadow: 0 10px 26px rgba(0,0,0,.35);
}#posiciones * { box-sizing:border-box }html, #posiciones { height:100% }#posiciones {
  margin:0;
  background: var(--bg);
  color:var(--text);
  display:flex; align-items:flex-start; justify-content:center;
  padding:28px 14px 60px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}#posiciones /* ==== LAYOUT DOS TABLAS ==== */
.tables {
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:24px;
  max-width:min(1200px, 96vw);
}#posiciones /* cada bloque poster se ajusta al contenido, #posiciones pero podemos forzar ancho por JS */
.poster { width:max-content; max-width:92vw; }#posiciones .table-wrap {
  display:inline-block;
  width:max-content;     /* se ajusta al contenido por defecto */
  max-width:100%;
  overflow:auto;
  border-radius:20px;
  box-shadow: var(--shadow);
}#posiciones /* aseguramos que hero y board ocupen 100% del ancho del contenedor cuando se sincronice */
.hero, #posiciones .board { width:100%; }#posiciones /* encabezado */
.hero {
  position:relative;
  background:#0d0d10;
  border-radius:14px 14px 0 0;
  padding:16px 14px 6px;
  text-align:center;
  overflow:hidden;
}#posiciones .hero .subtitle {
  font-weight:800; letter-spacing:.12em;
  color:#ffd84a; opacity:.95; font-size:14px;
}#posiciones .hero h1 {
  margin:4px 0 2px;
  font-family:"Bebas Neue", system-ui, sans-serif;
  font-size: clamp(44px, 8vw, 72px);
  line-height:.9; letter-spacing:.02em;
  text-transform:uppercase; color:#e9e9ee;
}#posiciones .hero .a { color:#ffd84a; }#posiciones .hero .b { color:#ffd84a; }#posiciones .hero::after {
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(circle at 92% 14%, rgba(255,216,74,.18) 0 2px, transparent 3px) 0 0/18px 18px no-repeat;
  pointer-events:none;
}#posiciones /* tablero negro */
.board {
  background: var(--board);
  border-radius:0 0 20px 20px;
  padding:14px 10px 16px;
}#posiciones /* columnas: la de equipo queda en auto para respetar la pastilla */
.cols {
  display:grid;
  grid-template-columns:44px auto 44px 44px 44px;
  gap:10px;
  padding:6px 6px 8px;
  color:#ffd84a;
  font-size:12px; letter-spacing:.12em; text-transform:uppercase; opacity:.95;
}#posiciones /* filas */
.row {
  display:grid;
  grid-template-columns:44px auto 44px 44px 44px;
  gap:10px;
  padding:7px 6px;
}#posiciones /* casilleros */
.square {
  height:34px; border-radius:10px;
  background:var(--square);
  display:flex; align-items:center; justify-content:center;
  color:#111; font-weight:800;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.15);
  white-space:nowrap;
}#posiciones /* pastillas */
.pill {
  height:34px; border-radius:10px;
  display:inline-flex; align-items:center;
  padding:0 14px; font-weight:900; letter-spacing:.06em;
  text-transform:uppercase; color:#101114;
  overflow:hidden; box-shadow: var(--shadow);
  white-space:nowrap; max-width:100%;
}#posiciones .pill.yellow { background:var(--yellow); }#posiciones .pill.white {  background:var(--whitepill); }
/* responsive */
@#posiciones media (max-width:360px) {#posiciones .cols, #posiciones .row {
    grid-template-columns:40px auto 40px 40px 40px;
    gap:8px;
  }#posiciones .square, #posiciones .pill { height:32px; }#posiciones .pill { padding:0 12px; font-size:12px; }
}
@#posiciones media (prefers-reduced-motion: reduce) {#posiciones .row:hover .pill, #posiciones .row:hover .square { transform:none !important; transition:none !important; }
}

/* --- siguiente bloque de estilos --- */

header{ align-items:center; }
  .title{ text-align:center !important; }
  .liga-logo{ width:60px; height:60px; object-fit:contain; }

/* --- siguiente bloque de estilos --- */

header .logo-link{ display:inline-block; line-height:0; }

/* ===== Ajustes finales de POSICIONES (desktop + responsive) ===== */
#posiciones{
  padding: 22px 12px 40px;
}

#posiciones .tables{
  display:grid !important;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 26px !important;
  align-items:start;
  justify-content:center;
  width:min(1320px, 100%);
  max-width:min(1320px, 100%);
  margin:0 auto;
}

#posiciones .poster{
  width:100%;
  max-width:none;
}

#posiciones .table-wrap{
  width:100% !important;
  max-width:none;
  overflow:hidden;
  border-radius:20px;
}

#posiciones .hero{
  padding: 14px 12px 8px;
}

#posiciones .hero .subtitle{
  font-size: 11px;
  letter-spacing: .14em;
  line-height: 1.1;
  margin-bottom: 2px;
}

#posiciones .hero h1{
  margin: 0;
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(22px, 2vw, 30px) !important;
  line-height: .95;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: visible;
}

#posiciones .hero .a,
#posiciones .hero .b,
#posiciones .hero .c,
#posiciones .hero .d{
  color:#ffd84a;
}

#posiciones .cols,
#posiciones .row{
  grid-template-columns: 32px minmax(0, 1fr) 30px 46px 32px;
  gap: 6px;
}

#posiciones .cols{
  padding: 6px 4px 8px;
  font-size: 11px;
}

#posiciones .row{
  padding: 5px 4px;
}

#posiciones .square,
#posiciones .pill{
  height: 28px;
  border-radius: 9px;
  font-size: 11px;
}

#posiciones .pill{
  padding: 0 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
  font-size: 10px;
}

/* Tablet: 2 x 2 */
@media (max-width: 1100px){
  #posiciones .tables{
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    width:min(760px, 100%);
    max-width:min(760px, 100%);
    gap:20px !important;
  }

  #posiciones .hero h1{
    font-size: clamp(22px, 3.5vw, 28px) !important;
  }
}

/* Teléfonos: 1 por fila para que no se corte nada */
@media (max-width: 560px){
  #posiciones{
    padding: 18px 8px 28px;
  }

  #posiciones .tables{
    grid-template-columns: 1fr;
    width:min(360px, 100%);
    max-width:min(360px, 100%);
    gap:16px !important;
  }

  #posiciones .table-wrap{
    width:100% !important;
  }

  #posiciones .hero{
    padding: 12px 10px 8px;
  }

  #posiciones .hero .subtitle{
    font-size: 10px;
  }

  #posiciones .hero h1{
    font-size: 24px !important;
  }

  #posiciones .cols,
  #posiciones .row{
    grid-template-columns: 30px minmax(0, 1fr) 28px 40px 30px;
    gap: 5px;
  }

  #posiciones .cols{
    font-size: 10px;
  }

  #posiciones .square,
  #posiciones .pill{
    height: 30px;
    font-size: 10px;
  }

  #posiciones .pill{
    padding: 0 6px;
    font-size: 9.5px;
    letter-spacing: .02em;
  }
}


/* ===== Ajuste del visor de fixture para que coincida con fixture.html ===== */
.grid{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(320px, 1fr)) !important;
  gap:20px !important;
  align-items:start;
  width:min(1320px, 100%);
  max-width:min(1320px, 100%);
  margin:24px auto 0 !important;
}

.grid > section.card[data-group]{
  width:100%;
  max-width:640px;
  justify-self:center !important;
  background:#16171a;
  border:1px solid var(--line);
  border-radius:20px;
  padding:20px 12px 8px;
  box-shadow:0 10px 24px #0006;
}

.grid > section.card[data-group] > .h1{
  margin:0;
  font-size:clamp(22px, 4.6vw, 30px) !important;
  font-weight:900;
  letter-spacing:.06em;
  color:var(--gold);
}

.grid > section.card[data-group] .fecha-header{
  display:flex;
  align-items:center;
  gap:.5rem;
}

.grid > section.card[data-group] .fecha-header .h2{
  flex:1 1 auto;
  margin:16px 0 10px;
  font-size:14px !important;
  font-weight:800;
  opacity:.95;
}

.grid > section.card[data-group] .fecha-text{
  margin-left:auto;
  background:#000;
  color:#fff;
  border:1px solid #444;
  padding:.35rem .5rem;
  border-radius:.5rem;
  min-width:9rem;
  text-align:center;
  font-weight:800;
}

.grid > section.card[data-group] .rule{
  height:1px;
  background:var(--line);
  margin:10px 0 6px;
}

.grid > section.card[data-group] .rows{
  display:block;
}

.grid > section.card[data-group] .row{
  display:grid !important;
  grid-template-columns:35px 35px minmax(0,210px) 40px minmax(0,210px) 35px 35px;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:8px 0;
  position:relative;
}

.grid > section.card[data-group] .row + .row::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:1px;
  background:var(--line);
}

.grid > section.card[data-group] .score-badge{
  width:32px;
  height:32px;
  border-radius:10px;
  background:var(--gold);
  box-shadow:0 5px 0 #b28900;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#1b1600;
  flex:0 0 32px;
}

.grid > section.card[data-group] .extra-badge{
  background:#ffffff;
  color:#111;
  box-shadow:0 5px 0 #bfbfbf;
}

.grid > section.card[data-group] .team-name{
  min-width:0;
  width:100%;
  display:block;
  background:#000;
  color:#fff;
  border:1px solid #444;
  border-radius:10px;
  padding:6px 10px;
  font-size:16px;
  font-weight:800;
  letter-spacing:.04em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-sizing:border-box;
}

.grid > section.card[data-group] .vs{
  width:40px;
  min-width:40px;
  text-align:center;
  color:#fff;
  font-weight:900;
  letter-spacing:.18em;
  font-size:14px;
  justify-self:center;
}

@media (max-width:1100px){
  .grid{
    grid-template-columns:1fr !important;
    width:min(680px, 100%);
    max-width:min(680px, 100%);
  }
}

@media (max-width:640px){
  .grid{
    gap:16px !important;
    width:100%;
    max-width:100%;
    margin-top:18px !important;
  }

  .grid > section.card[data-group]{
    max-width:none;
    padding:16px 10px 8px;
  }

  .grid > section.card[data-group] > .h1{
    font-size:clamp(18px, 7vw, 24px) !important;
  }

  .grid > section.card[data-group] .fecha-header .h2{
    font-size:13px !important;
    margin:14px 0 8px;
  }

  .grid > section.card[data-group] .fecha-text{
    min-width:7.7rem;
    font-size:13px;
    padding:.32rem .45rem;
  }

  .grid > section.card[data-group] .row{
    grid-template-columns:30px 30px minmax(0,120px) 28px minmax(0,120px) 30px 30px;
    gap:6px;
    padding:7px 0;
  }

  .grid > section.card[data-group] .score-badge{
    width:30px;
    height:30px;
    flex-basis:30px;
    font-size:14px;
  }

  .grid > section.card[data-group] .team-name{
    padding:6px 8px;
    font-size:12px;
  }

  .grid > section.card[data-group] .vs{
    width:28px;
    min-width:28px;
    font-size:12px;
    letter-spacing:.10em;
  }
}


/* Ajuste específico para columna TR de 3 dígitos */
#posiciones .cols > :nth-child(4),
#posiciones .board .row > :nth-child(4){
  justify-self:stretch;
}

#posiciones .board .row > :nth-child(4).square{
  font-size:10px;
  padding:0 4px;
}

@media (max-width:560px){
  #posiciones .board .row > :nth-child(4).square{
    font-size:9px;
    padding:0 3px;
  }
}


.encuentros-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.35rem .7rem;
  border:1px solid #b28900;
  border-radius:.5rem;
  background:transparent;
  color:#ffcc00;
  text-decoration:none;
  font-weight:800;
  letter-spacing:.04em;
  font-size:12px;
  white-space:nowrap;
}

.encuentros-btn:hover{
  filter:brightness(1.08);
}

.grid > section.card[data-group] .fecha-header{
  gap:.45rem;
}

@media (max-width:640px){
  .encuentros-btn{
    font-size:11px;
    padding:.3rem .55rem;
  }
}


/* ===== Parciales de posiciones ===== */
.standings-progress{
  width:min(1320px, 100%);
  max-width:min(1320px, 100%);
  margin: 6px auto 0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}

.progress-btn,
.progress-select{
  border:1px solid #b28900;
  border-radius:12px;
  background:#0f0f11;
  color:#ffd966;
  font-weight:900;
  box-shadow:inset 0 0 0 2px #1b1600;
}

.progress-btn{
  min-width:46px;
  height:44px;
  padding:0 14px;
  cursor:pointer;
  font-size:18px;
}

.progress-btn:disabled{
  opacity:.45;
  cursor:default;
}

.progress-select{
  min-width:280px;
  max-width:100%;
  height:44px;
  padding:0 14px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

@media (max-width:640px){
  .standings-progress{
    gap:8px;
  }

  .progress-btn{
    min-width:42px;
    height:40px;
    font-size:16px;
  }

  .progress-select{
    min-width:220px;
    height:40px;
    font-size:13px;
  }
}
