:root {
  --fondo: #0b0c0e;
  --tile: #16171a;
  --tile-2: #1f2125;
  --linea: rgb(255 255 255 / .07);
  --texto: #f2f3f5;
  --gris: #8c9099;
  --rojo: #ff3a1f;
  --amarillo: #ffd23f;
  --radio: 24px;
  --hueco: 12px;
  --mono: "Geist Mono", ui-monospace, monospace;
  color-scheme: dark;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--texto); font: 400 15px/1.55 Geist, system-ui, sans-serif;
  /* Retícula de puntos */
  background: radial-gradient(rgb(255 255 255 / .09) 1px, transparent 1.4px) 0 0 / 22px 22px, var(--fondo);
  background-attachment: fixed;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--rojo); color: #fff; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }

.ancho { width: min(1280px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }

.boton { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: var(--texto); color: var(--fondo); font-weight: 600; white-space: nowrap; transition: transform .2s; }
.boton:hover { transform: translateY(-1px); }
.boton--gris { background: var(--tile-2); color: var(--texto); }

/* Cabecera flotante */
.cabecera {
  position: sticky; top: 12px; z-index: 30; margin: 12px 0 var(--hueco);
  display: flex; align-items: center; gap: 16px;
  padding: 8px 8px 8px 14px; border-radius: 18px;
  background: rgb(22 23 26 / .72); backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--linea);
}
.marca { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-right: auto; }
.marca img { border-radius: 8px; }
.menu { display: flex; gap: 2px; }
.menu a { padding: 8px 12px; border-radius: 10px; color: var(--gris); font-weight: 500; transition: background .15s, color .15s; }
.menu a:hover { background: var(--tile-2); color: var(--texto); }
.menu a[aria-current] { color: var(--texto); background: var(--tile-2); }
.cabecera__socio { background: var(--rojo); color: #fff; }
.menu-boton { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--tile-2); cursor: pointer; }
.menu-boton span { display: block; width: 16px; height: 2px; margin: 4px auto; background: var(--texto); border-radius: 2px; }
@media (max-width: 960px) {
  .menu-boton { display: block; }
  .menu { display: none; position: absolute; inset: calc(100% + 8px) 0 auto; flex-direction: column; padding: 8px; border-radius: 18px; background: var(--tile); border: 1px solid var(--linea); }
  .menu.abierto { display: flex; }
  .menu a { padding: 12px 14px; font-size: 1.05rem; }
}
@media (max-width: 520px) { .marca span { display: none; } }

/* Bloques (tiles) */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 150px; grid-auto-flow: dense; gap: var(--hueco); }
.t[hidden] { display: none !important; }
.t { display: block; position: relative; overflow: hidden; border-radius: var(--radio); background: var(--tile); padding: 22px; border: 1px solid var(--linea); transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .35s; }
a.t:hover { transform: translateY(-3px); border-color: rgb(255 255 255 / .16); }
.t p { margin: 0; color: var(--gris); }

.t--foto { padding: 0; border: 0; background: var(--tile-2); }
.t--foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.t--foto:hover img { transform: scale(1.05); }
.t--foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(0 0 0 / .85), rgb(0 0 0 / .1) 55%, transparent); }
.t__pie { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; }
.t__pie .mono { color: rgb(255 255 255 / .75); }
.t__pie h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin-top: 8px; text-wrap: balance; }
.t__pie h3 { font-size: 1.4rem; margin-top: 6px; text-wrap: balance; }
.chip { display: inline-block; padding: 5px 10px; border-radius: 999px; background: rgb(255 255 255 / .16); backdrop-filter: blur(8px); }

/* Portada */
.hola { grid-column: span 7; grid-row: span 2; display: flex; gap: 24px; align-items: stretch; }
.hola__logo { width: auto; height: 100%; aspect-ratio: 946 / 960; object-fit: cover; border-radius: 16px; flex: none; }
.hola__texto { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.hola h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); }
.hola__fila { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.hola__fila p { flex: 1 1 220px; }
.ultima { grid-column: span 5; grid-row: span 3; }

.prox { grid-column: span 4; color: var(--texto); display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, #1d1f23, var(--tile)); }
.cuenta { display: flex; gap: 18px; }
.cuenta b { display: block; font-size: 2.2rem; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.cuenta small { color: var(--gris); font-size: .72rem; }
.prox__nota { color: var(--gris); font-size: .8rem; }
.prox__pasada { display: none; font-weight: 600; }
.prox__nota::first-letter { text-transform: uppercase; }
.prox--pasada .cuenta, .prox--pasada .prox__nota { display: none; }
.prox--pasada .prox__pasada { display: block; }

.vel { grid-column: span 3; background: var(--rojo); border: 0; color: #fff; }
.vel .mono { color: rgb(255 255 255 / .8); }
.vel { display: flex; flex-direction: column; justify-content: center; }
.vel strong { display: block; font-size: 3.2rem; font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.vel p { color: rgb(255 255 255 / .85); }

.n-alta { grid-column: span 4; grid-row: span 2; }
.n-media { grid-column: span 4; grid-row: span 2; }
.n-cuadro { grid-column: span 4; grid-row: span 2; }
.n-ancha { grid-column: span 6; }

.socio { grid-column: span 6; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--amarillo); color: #111; border: 0; }
.socio h2 { font-size: 1.9rem; }
.socio p { color: rgb(0 0 0 / .65); }
.socio span { font-size: 2rem; transition: transform .3s; }
.socio:hover span { transform: translateX(6px); }


.clasif { grid-column: span 4; grid-row: span 2; display: flex; flex-direction: column; }
.clasif ol { list-style: none; margin: auto 0 0; padding: 0; }
.clasif li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--linea); }
.clasif__pos { font: 500 .8rem var(--mono); color: var(--gris); width: 1.2em; }
.clasif li:first-child .clasif__pos { color: var(--amarillo); }
.clasif__nombre { flex: 1; font-weight: 600; font-size: 1.05rem; }
.clasif__valor { font-variant-numeric: tabular-nums; font-weight: 600; }
.clasif__valor small { color: var(--gris); font-weight: 400; }

.pista { grid-column: span 12; grid-row: span 2; }
.todas { margin-top: var(--hueco); text-align: center; font-weight: 600; padding: 18px; }

/* Listado de noticias */
.titular { margin-bottom: var(--hueco); padding: clamp(28px, 5vw, 56px) clamp(22px, 4vw, 48px); }
.titular h1 { font-size: clamp(2.4rem, 6vw, 5rem); margin-top: 14px; max-width: 20ch; text-wrap: balance; }
.titular .mono a { color: var(--texto); }
.titular .mono a:hover { color: var(--rojo); }
.bento--lista { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 300px; }
.n-destacada { grid-column: span 2; }
.paginacion { display: flex; justify-content: space-between; margin: var(--hueco) 0; }

/* Contenido de noticias y páginas */
.articulo { display: grid; gap: var(--hueco); }
.articulo .titular { margin: 0; }
/* Lectura de noticias y páginas: letra con serifa, párrafos separados y ancho de línea cómodo */
.prosa { --lectura: "Source Serif 4", Georgia, serif; padding: clamp(28px, 5vw, 64px) clamp(20px, 6vw, 80px); overflow-wrap: anywhere; }
/* (doble clase para ganar a ".t p", que pone los márgenes de los bloques a 0) */
.prosa.prosa > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.prosa p, .prosa li, .prosa blockquote { font-family: var(--lectura); font-size: 1.36rem; line-height: 1.72; color: #e4e5e9; font-optical-sizing: auto; }
.prosa p { margin-top: 0; margin-bottom: 1.3em; }
.prosa > p:first-child { font-size: 1.52rem; line-height: 1.6; color: var(--texto); }
@media (max-width: 600px) { .prosa p, .prosa li { font-size: 1.1rem; } .prosa > p:first-child { font-size: 1.22rem; } }
.prosa > :last-child { margin-bottom: 0; }
.prosa strong { color: #fff; font-weight: 650; }
.prosa a { color: var(--texto); text-decoration: underline; text-decoration-color: var(--rojo); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prosa a:hover { color: var(--rojo); }
/* Un enlace solo en su párrafo (p. ej. «Ver la clasificación completa») se muestra como botón */
.prosa p:has(> a:only-child) { margin-top: 2em; }
.prosa p:has(> a:only-child) > a:not([href$=".pdf"]) { display: inline-flex; gap: 8px; align-items: center; padding: 12px 18px; border-radius: 12px; background: var(--tile-2); font: 600 1rem Geist, sans-serif; text-decoration: none; transition: background .2s; }
.prosa p:has(> a:only-child) > a:not([href$=".pdf"])::after { content: "→"; }
.prosa p:has(> a:only-child) > a:not([href$=".pdf"]):hover { background: var(--rojo); color: #fff; }
.prosa img { margin: 0 auto; border-radius: 14px; cursor: zoom-in; }
.prosa p:has(> img:only-child) { margin: 36px auto; text-align: center; }
.prosa p:has(> img:only-child) img { width: 100%; max-height: 720px; object-fit: cover; }
.prosa h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 1.8em; margin-bottom: .6em; }
.prosa h3 { font-size: 1.35rem; margin-top: 1.6em; margin-bottom: .5em; }
.prosa blockquote { margin: 2em auto; padding: 4px 0 4px 22px; border-left: 3px solid var(--rojo); font-style: italic; color: var(--texto); }
.prosa blockquote p { margin: 0; }
.prosa hr { border: 0; height: 1px; background: var(--linea); margin: 48px auto; }
.prosa ul, .prosa ol { padding-left: 1.3em; margin-bottom: 1.3em; }
.prosa li { margin-bottom: .4em; }
.prosa li::marker { color: var(--rojo); }
.prosa iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 14px; margin: 32px auto; }
.prosa iframe.formulario { aspect-ratio: auto; height: 1100px; background: #fff; }
.prosa table { width: 100%; border-collapse: collapse; margin: 24px auto; font-size: 1rem; }
.prosa th, .prosa td { padding: 14px 0; border-bottom: 1px solid var(--linea); text-align: left; }
.prosa th { font: 500 .72rem var(--mono); text-transform: uppercase; color: var(--gris); }
.prosa td:last-child { text-align: right; }
.prosa a[href$=".pdf"] { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 14px; background: var(--tile-2); text-decoration: none; font: 600 1rem Geist, sans-serif; }
.prosa a[href$=".pdf"]::after { content: "PDF ↓"; font: 500 .72rem var(--mono); color: var(--rojo); align-self: center; }

/* Galería automática: imágenes seguidas se agrupan en mosaico (lo hace web.js) */
.galeria { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; margin: 32px auto; }
.galeria img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.galeria--dos { grid-template-columns: 1fr 1fr; }
.galeria--dos img { aspect-ratio: 3/4; }

.visor { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .92); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.visor img { max-height: 92vh; width: auto; border-radius: 12px; }
.visor button { position: absolute; top: 50%; width: 48px; height: 48px; border: 0; border-radius: 14px; background: rgb(255 255 255 / .12); color: #fff; font-size: 1.6rem; cursor: pointer; transform: translateY(-50%); }
.visor .ant { left: 16px; } .visor .sig { right: 16px; }

.vecinas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hueco); }
.vecinas .t { font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.vecinas .mono { display: block; margin-bottom: 8px; }
.vecinas__sig { text-align: right; }

/* Pie */
.pie { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 24px; margin: var(--hueco) 0 24px; padding: 28px; border-radius: var(--radio); background: var(--tile); border: 1px solid var(--linea); }
.pie__marca { display: flex; gap: 12px; align-items: center; }
.pie__marca img { border-radius: 10px; }
.pie__marca b { display: block; }
.pie__marca span { color: var(--gris); font-size: .85rem; }
.pie__col { display: flex; flex-direction: column; gap: 4px; }
.pie__col .mono { margin-bottom: 4px; }
.pie__col a:hover { color: var(--rojo); }

/* Colores por tipo de evento */
.tipo-club { --c: var(--rojo); --ct: #fff; }
.tipo-fuera { --c: var(--amarillo); --ct: #111; }
.tipo-otro { --c: #d9dce1; --ct: #111; }
.tipo-festivo { --c: #4b4f58; --ct: #fff; }

/* Calendario */
.leyenda { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; color: var(--gris); font-size: .9rem; }
.leyenda span { display: inline-flex; align-items: center; gap: 8px; }
.leyenda i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.temporada { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.temporada__nav { display: flex; gap: 4px; flex-wrap: wrap; }
.temporada__nav a, .temporada__nav span { padding: 7px 13px; border-radius: 999px; background: var(--tile-2); font-weight: 500; font-size: .9rem; }
.temporada__nav a:hover { background: #2a2c31; }
.temporada__año.activo { background: var(--texto); color: var(--fondo); }
.temporada__flecha.desactivada { opacity: .35; }
.leyenda__nota { margin: 18px 0 0; color: var(--gris); }
.meses { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: var(--hueco); }
.mes { display: flex; flex-direction: column; gap: 16px; transition: opacity .3s; }
.mes h2 { font-size: 1.5rem; }
.mes.pasado { opacity: .45; }
.mes.pasado:hover { opacity: 1; }
.mes.actual { border-color: var(--rojo); box-shadow: 0 0 0 1px var(--rojo); }
.mes__rejilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.mes__cab { font: 500 .65rem var(--mono); color: var(--gris); padding-bottom: 4px; }
.mes__dia { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; font-size: .82rem; font-variant-numeric: tabular-nums; color: #c9ccd2; }
.mes__dia.con-evento { background: var(--c); color: var(--ct); font-weight: 600; cursor: help; }
.mes__dia.hoy { outline: 2px solid var(--texto); outline-offset: 1px; }
.mes__lista { list-style: none; margin: auto 0 0; padding: 12px 0 0; border-top: 1px solid var(--linea); display: grid; gap: 6px; font-size: .9rem; }
.mes__lista li { display: flex; gap: 10px; align-items: baseline; }
.mes__lista b { flex: none; min-width: 3.6em; padding: 2px 6px; border-radius: 6px; background: var(--c); color: var(--ct); font: 500 .72rem var(--mono); text-align: center; }
.mes__lista a { text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 3px; }
.mes__lista a::after { content: " · resultados"; color: var(--gris); font-size: .8em; }
.mes__lista li.pasado { opacity: .5; text-decoration: line-through; text-decoration-color: var(--gris); }
.mes__vacio { color: var(--gris); }

/* Reglamentos */
.titular__intro { max-width: 60ch; margin: 16px 0 0; color: var(--gris); font-size: 1.05rem; }
.saltos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip-enlace { padding: 8px 14px; border-radius: 999px; background: var(--tile-2); font-weight: 500; transition: background .2s; }
.reglas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: var(--hueco); }
.regla { scroll-margin-top: 96px; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radio); background: var(--tile); border: 1px solid var(--linea); }
.regla__foto { position: relative; aspect-ratio: 16 / 9; background: var(--tile-2); overflow: hidden; }
.regla__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.regla:hover .regla__foto img { transform: scale(1.04); }
.regla__foto::before { content: ""; position: absolute; inset: auto 0 0; z-index: 1; height: 4px; background: var(--c); }
.regla__foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(10 11 13 / .95), rgb(10 11 13 / .55) 35%, transparent 70%); }
.regla__titulo { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; display: flex; flex-wrap: wrap; align-items: end; gap: 6px 14px; }
.regla__etiqueta { flex-basis: 100%; font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.regla__titulo h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: .95; }
.regla__marca { margin-bottom: 4px; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .16); backdrop-filter: blur(8px); font: 500 .72rem var(--mono); text-transform: uppercase; }
.regla__cuerpo { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 20px; flex: 1; }
.regla__clave { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 8px; }
.regla__clave div { padding: 12px 14px; border-radius: 14px; background: var(--tile-2); border-left: 3px solid var(--c); }
.regla__clave dt { font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.regla__clave dd { margin: 4px 0 0; font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.regla__libres { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.regla__libres li { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--linea); color: var(--gris); font-size: .85rem; }
.regla__notas { margin: 4px 0 0 !important; color: var(--gris); }
.regla__credito { margin: auto 0 0 !important; padding-top: 10px; font-size: .72rem; color: #5d616a; }
.regla__credito a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.documentos { margin-top: var(--hueco); display: grid; gap: 8px; }
.documento { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 14px; background: var(--tile-2); font-weight: 600; transition: background .2s; }
.documento:hover { background: #2a2c31; }
.documento .mono { color: var(--rojo); }


/* Puntos de color de categoría */
.punto { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--c); margin-right: .4em; vertical-align: .12em; }
.chip-enlace i, .pestanas i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 8px; }
.chip-enlace:hover { background: var(--c, var(--rojo)); color: var(--ct, #fff); }
.chip-enlace:hover i { background: currentColor; }

/* Clasificación */
.pestanas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pestanas button { font: 500 .95rem Geist, sans-serif; color: var(--texto); padding: 9px 16px; border: 0; border-radius: 999px; background: var(--tile-2); cursor: pointer; transition: background .2s; }
.pestanas button[aria-selected="true"] { background: var(--c, var(--texto)); color: var(--ct, var(--fondo)); }
.pestanas button[aria-selected="true"] i { background: currentColor; }
.panel { border-top: 3px solid var(--c, var(--texto)); }
.panel h2 { font-size: 1.8rem; }
.panel__nota { margin: 6px 0 18px !important; }
.general, .resultado { list-style: none; margin: 0; padding: 0; }
.general li, .resultado li { display: grid; grid-template-columns: 3em minmax(120px, 1fr) repeat(3, 6.5em) 5em; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--linea); }
.resultado li { grid-template-columns: 3em minmax(120px, 1fr) 7em 8em 4.5em 5em; }
/* Carreras de las que solo se tienen los puntos: sin columnas de vueltas, mejor vuelta y pole */
.resultado.resultado--puntos li { grid-template-columns: 3em 1fr 5em; }
.resultado--puntos li > :nth-child(3), .resultado--puntos li > :nth-child(4), .resultado--puntos li > :nth-child(5) { display: none; }
.resultado .vueltas { color: var(--texto); font-weight: 600; }
.resultado small { color: var(--gris); }
.general__dato.pole { color: var(--amarillo); font-weight: 600; }
.general__cab, .resultado__cab { padding: 0 0 10px !important; border-top: 0 !important; }
.general__cab span:nth-child(n+3), .resultado__cab span:nth-child(n+3) { text-align: right; }
.general__pos { font: 500 1rem var(--mono); color: var(--gris); }
.general li:nth-child(2) .general__pos, .resultado li:nth-child(2) .general__pos { color: var(--amarillo); }
.general li:nth-child(3) .general__pos, .resultado li:nth-child(3) .general__pos { color: #d7d9de; }
.general li:nth-child(4) .general__pos, .resultado li:nth-child(4) .general__pos { color: #d39a5f; }
.general__nombre { font-weight: 600; font-size: 1.05rem; }
.general__dato { text-align: right; color: var(--gris); font-variant-numeric: tabular-nums; }
.general__dato.rapida { color: #b18cff; font-weight: 600; }
.general__dato.rapida::before { content: "⏱ "; }
.general__puntos { text-align: right; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.general__vacio { display: block !important; color: var(--gris); }
.seccion-titulo { font-size: 1.8rem; margin: 40px 6px 16px; }
.carreras { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--hueco); }
.carrera { display: flex; flex-direction: column; gap: 6px; border-top: 3px solid var(--c); }
.carrera h3 { font-size: 1.4rem; }
.carrera__cat { align-self: start; padding: 4px 10px; border-radius: 999px; background: var(--c); color: var(--ct); font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.carrera__podio { display: grid; gap: 4px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linea); }
.carrera__podio span { display: flex; gap: 10px; }
.carrera__podio b { font: 500 .8rem var(--mono); color: var(--gris); width: 1em; }
.titular--categoria { border-top: 3px solid var(--c); }
.titular--categoria .carrera__cat { display: inline-block; margin-top: 18px; }
@media (max-width: 700px) {
  .general li { grid-template-columns: 2.2em 1fr 3.2em 4em; }
  .general li > :nth-child(3), .general li > :nth-child(5) { display: none; }
  .resultado li { grid-template-columns: 2.2em 1fr 4.6em 4em; }
  .resultado li > :nth-child(4), .resultado li > :nth-child(5) { display: none; }
  .resultado.resultado--puntos li { grid-template-columns: 2.2em 1fr 4em; }
}

/* Galería: álbum en columnas tipo mosaico */
.mosaico { columns: 4 240px; column-gap: 10px; }
.mosaico figure { break-inside: avoid; margin: 0 0 10px; position: relative; border-radius: 14px; overflow: hidden; background: var(--tile-2); }
.mosaico img { width: 100%; cursor: zoom-in; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.mosaico figure:hover img { transform: scale(1.03); }
.mosaico figcaption { position: absolute; inset: auto 0 0; padding: 28px 12px 10px; font-size: .85rem; background: linear-gradient(0deg, rgb(0 0 0 / .8), transparent); pointer-events: none; }

/* Móvil y tablet: los bloques se apilan y toman la altura de su contenido */
@media (max-width: 960px) {
  .bento, .bento--lista { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .bento > * { grid-column: span 2 !important; grid-row: auto !important; }
  .bento > .t--foto { min-height: 300px; }
  .bento > .ultima { min-height: 380px; }
  .bento > .prox, .bento > .vel { grid-column: span 1 !important; min-height: 150px; }
  .cuenta { gap: 10px; } .cuenta b { font-size: 1.5rem; }
  .vel strong { font-size: 2.4rem; }
  .clasif ol { margin-top: 16px; }
  .pie { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hola { flex-direction: column; gap: 18px; }
  .hola__logo { height: 88px; width: 88px; }
  .hola__texto { gap: 16px; }
  .vecinas, .pie { grid-template-columns: 1fr; }
  .prox .mono, .vel .mono { font-size: .62rem; }
}

/* ── Estilo Apple: cajas de cristal, bordes de luz y aparición suave al hacer scroll ── */
:root {
  --radio: 30px;
  --hueco: 16px;
  --cristal: rgb(28 29 34 / .52);
  --suave: cubic-bezier(.16, 1, .3, 1);
}

/* ── Fondo: retícula + brillos de color detrás, para que el cristal tenga algo que desenfocar ── */
body {
  background:
    radial-gradient(rgb(255 255 255 / .06) 1px, transparent 1.4px) 0 0 / 22px 22px,
    radial-gradient(1100px 760px at 12% -8%, rgb(255 255 255 / .09), transparent 68%),
    radial-gradient(900px 760px at 95% 30%, rgb(70 110 255 / .16), transparent 70%),
    radial-gradient(900px 700px at 40% 110%, rgb(70 110 255 / .10), transparent 70%),
    #08090b;
  background-attachment: fixed;
}

/* ── Cajas de cristal ── */
.t {
  border-radius: var(--radio);
  transition: transform .7s var(--suave), box-shadow .7s var(--suave);
}
.t:not(.t--foto):not(.vel):not(.socio) {
  background:
    linear-gradient(180deg, rgb(255 255 255 / .055), rgb(255 255 255 / .01)),
    var(--cristal);
  backdrop-filter: blur(28px) saturate(1.7);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  border: 0;
  box-shadow: 0 1px 2px rgb(0 0 0 / .35), 0 24px 50px -18px rgb(0 0 0 / .6);
}
/* Borde de luz: más brillante arriba a la izquierda y desvanecido abajo */
.t::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(150deg, rgb(255 255 255 / .28), rgb(255 255 255 / .06) 35%, rgb(255 255 255 / .02) 65%, rgb(255 255 255 / .1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
a.t:hover { transform: translateY(-5px); box-shadow: 0 2px 4px rgb(0 0 0 / .3), 0 36px 70px -20px rgb(0 0 0 / .75); }
a.t:active { transform: translateY(-1px) scale(.995); transition-duration: .15s; }

/* ── Bloques de color ── */
.vel {
  background: var(--rojo);
  box-shadow: 0 24px 50px -16px rgb(255 58 31 / .6);
}
.socio {
  background: var(--amarillo);
  box-shadow: 0 24px 50px -16px rgb(255 200 40 / .45);
}
.vel strong { letter-spacing: -.06em; }

/* ── Fotos: pie en una franja de cristal ── */
.t--foto { box-shadow: 0 24px 50px -18px rgb(0 0 0 / .65); }
.t--foto::after { background: linear-gradient(0deg, rgb(0 0 0 / .35), transparent 45%); }
.t--foto .t__pie {
  left: 10px; right: 10px; bottom: 10px; padding: 14px 16px; border-radius: calc(var(--radio) - 10px);
  background: rgb(20 21 26 / .5);
  backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .12);
}
.t--foto .t__pie h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.t--foto .t__pie h3 { font-size: 1.2rem; }
.t--foto img { transition: transform 1.4s var(--suave); }
.t--foto:hover img { transform: scale(1.06); }
.chip { background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .18); }

/* ── Cabecera ── */
.cabecera {
  border-radius: 22px; border: 0; position: sticky;
  background: rgb(18 19 23 / .55);
  backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), inset 0 0 0 1px rgb(255 255 255 / .06), 0 12px 32px -12px rgb(0 0 0 / .7);
}
.boton, .menu a { border-radius: 999px; }
.cabecera__socio { background: var(--rojo); box-shadow: 0 6px 16px -6px rgb(255 58 31 / .7); }
.menu a[aria-current] { background: rgb(255 255 255 / .1); }

/* ── Tipografía ── */
h1, h2, h3 { letter-spacing: -.045em; }
.hola h1, .titular h1 {
  background: linear-gradient(180deg, #fff 30%, #a9acb5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.t:not(.vel):not(.socio) p { color: #a1a4ad; }
.cuenta b, .clasif__valor, .general__puntos { font-variant-numeric: tabular-nums; }

/* Próxima carrera: punto rojo "en directo" */
.prox > .mono::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
  background: var(--rojo); box-shadow: 0 0 0 0 rgb(255 58 31 / .6); animation: latido 2s infinite; vertical-align: 1px;
}
@keyframes latido { 70% { box-shadow: 0 0 0 7px rgb(255 58 31 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 58 31 / 0); } }


/* ── Aparición suave al hacer scroll ── */
.revelar { opacity: 0; transform: translateY(24px) scale(.985); }
.revelar.visible { opacity: 1; transform: none; transition: opacity .9s var(--suave), transform .9s var(--suave); }
@media (prefers-reduced-motion: reduce) {
  .revelar { opacity: 1; transform: none; }
  .prox > .mono::before { animation: none; }
}

/* Móvil: sin el bloque de bienvenida; en su lugar, una tarjeta pequeña al calendario */
.cal-movil { display: none; }
@media (max-width: 600px) {
  .bento > .hola { display: none; }
  .bento > .cal-movil { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
  .cal-movil b { display: block; font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
  .cal-movil > span:last-child { font-size: 1.4rem; }
}
