/* Diezporras — la porra del 29N */
:root {
  --bg: #05060f;
  --tinta: #f3f4ff;
  --tenue: #9aa0c3;
  --apagado: #5d6388;
  --linea: rgba(255, 255, 255, .09);
  --cristal: rgba(255, 255, 255, .045);
  --cian: #38f3ff;
  --rosa: #ff3d9a;
  --lima: #c6ff3d;
  --violeta: #8b5cff;
  --pc: var(--cian);      /* color del partido en contexto */
  --pc2: var(--violeta);
  --display: 'Unbounded', system-ui, sans-serif;
  --texto: 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radio: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--tinta); font-family: var(--texto);
  font-size: 16px; line-height: 1.55; min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--cian); color: #000; }

/* ============ FONDO ============ */
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.a1 { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax;
  background: radial-gradient(circle, #2b3bff 0%, transparent 62%); animation: deriva1 26s ease-in-out infinite alternate; }
.a2 { width: 60vmax; height: 60vmax; right: -25vmax; top: 5vmax;
  background: radial-gradient(circle, #ff2e88 0%, transparent 60%); opacity: .34; animation: deriva2 32s ease-in-out infinite alternate; }
.a3 { width: 65vmax; height: 65vmax; left: 10vmax; bottom: -40vmax;
  background: radial-gradient(circle, #00d5ff 0%, transparent 60%); opacity: .25; animation: deriva3 38s ease-in-out infinite alternate; }
@keyframes deriva1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes deriva2 { to { transform: translate(-16vmax, 18vmax) scale(.85); } }
@keyframes deriva3 { to { transform: translate(12vmax, -16vmax) scale(1.2); } }
.rejilla {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--linea) 1px, transparent 1px), linear-gradient(90deg, var(--linea) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  opacity: .5;
}
.grano {
  position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 4vw, 40px); padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(rgba(5, 6, 15, .85), rgba(5, 6, 15, .55)); backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--linea);
}
.marca { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-family: var(--display); font-weight: 800; letter-spacing: .02em; }
.marca-10 {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 14px; color: #05060f;
  background: linear-gradient(135deg, var(--cian), var(--violeta) 55%, var(--rosa)); box-shadow: 0 0 22px rgba(56, 243, 255, .45);
}
.marca-txt { font-size: 15px; }
.nav-links { display: none; gap: 22px; margin-left: 18px; font-size: 14px; color: var(--tenue); }
.nav-links a { text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--tinta); }
.nav-sala { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.chip-sala {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 999px; min-width: 0;
  background: var(--cristal); border: 1px solid var(--linea); font-size: 13px; font-weight: 600;
}
.chip-sala .av { font-size: 17px; line-height: 1; }
.chip-sala span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26vw; }
.btn-icono {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: #05060f; background: linear-gradient(120deg, var(--cian), #9dfcff); box-shadow: 0 0 24px rgba(56, 243, 255, .35);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn-icono:active { transform: scale(.94); }
@media (min-width: 820px) { .nav-links { display: flex; } }

/* ============ HERO ============ */
.hero { position: relative; padding: clamp(18px, 4vw, 40px) clamp(18px, 5vw, 56px) 56px; text-align: center; max-width: 1100px; margin: 0 auto; }
.hemi-wrap { position: relative; width: min(100%, 560px); margin: 0 auto 6px; aspect-ratio: 2 / 1.02; }
#hemi { width: 100%; height: 100%; display: block; }
.hemi-centro { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); display: grid; line-height: 1; }
.hemi-centro b {
  font-family: var(--display); font-weight: 800; font-size: clamp(26px, 7vw, 54px);
  background: linear-gradient(180deg, #fff, #8aa0ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hemi-centro span { font-family: var(--mono); font-size: clamp(9px, 2.2vw, 12px); letter-spacing: .18em; text-transform: uppercase; color: var(--tenue); margin-top: 5px; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 7px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue);
  border: 1px solid var(--linea); background: var(--cristal);
}
.pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--lima); box-shadow: 0 0 0 0 rgba(198, 255, 61, .7); animation: pulso 1.8s infinite; }
@keyframes pulso { 70% { box-shadow: 0 0 0 10px rgba(198, 255, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(198, 255, 61, 0); } }

.titular { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 10.5vw, 104px); line-height: .98; letter-spacing: -.035em; margin: 18px 0 16px; }
.titular .linea { display: block; overflow: hidden; padding-bottom: .08em; }
.titular .linea > span { display: inline-block; transform: translateY(110%); animation: sube 1s var(--ease) forwards; }
.titular .linea:nth-child(2) > span { animation-delay: .12s; }
@keyframes sube { to { transform: none; } }
.neon {
  font-style: normal;
  background: linear-gradient(100deg, var(--cian) 0%, #7aa2ff 30%, var(--rosa) 60%, #ffb347 85%, var(--cian) 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brillo 7s linear infinite; filter: drop-shadow(0 0 26px rgba(120, 140, 255, .35));
}
@keyframes brillo { to { background-position: -220% 0; } }
.sub { max-width: 560px; margin: 0 auto; color: var(--tenue); font-size: clamp(15px, 2.4vw, 18px); }

.cuenta { display: inline-flex; align-items: flex-start; gap: clamp(6px, 2vw, 14px); margin-top: 30px; }
.cuenta > i { font-family: var(--display); font-style: normal; font-size: clamp(22px, 6vw, 40px); color: var(--apagado); padding-top: clamp(8px, 2vw, 16px); animation: parpadeo 1s steps(2) infinite; }
@keyframes parpadeo { 50% { opacity: .2; } }
.cuenta-caja {
  position: relative; min-width: clamp(62px, 17vw, 108px); padding: clamp(10px, 2.4vw, 18px) 6px 10px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)); border: 1px solid var(--linea);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 18px 40px -18px rgba(0, 0, 0, .8); overflow: hidden;
}
.cuenta-caja::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .35); }
.cuenta-caja b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 7.5vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; }
.cuenta-caja b.tic { animation: tic .45s var(--ease); }
@keyframes tic { 0% { transform: translateY(-35%); opacity: 0; filter: blur(4px); } 100% { transform: none; opacity: 1; filter: none; } }
.cuenta-caja span { display: block; margin-top: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--apagado); }
.cuenta-pie { margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--apagado); text-transform: uppercase; }

.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15.5px; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s, background .25s; isolation: isolate;
}
.btn:active { transform: scale(.96); }
.btn-pri { color: #05060f; background: linear-gradient(110deg, var(--cian), #8fb2ff 50%, var(--rosa)); background-size: 180% 100%; box-shadow: 0 10px 40px -8px rgba(56, 243, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .6); animation: brillo-btn 5s ease-in-out infinite alternate; }
@keyframes brillo-btn { to { background-position: 100% 0; } }
.btn-pri:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -8px rgba(255, 61, 154, .6), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-sec { background: var(--cristal); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(10px); }
.btn-sec:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.mis-salas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.mis-salas a { font-size: 13px; padding: 7px 14px; border-radius: 999px; text-decoration: none; color: var(--tenue); border: 1px dashed rgba(255, 255, 255, .2); transition: all .2s; }
.mis-salas a:hover { color: var(--tinta); border-color: var(--cian); }

/* ============ BLOQUES ============ */
.bloque { max-width: 1200px; margin: 0 auto; padding: clamp(48px, 9vw, 110px) clamp(18px, 5vw, 56px) 0; scroll-margin-top: 60px; }
.bloque-cab { margin-bottom: 30px; }
.etiqueta { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--cian); padding: 5px 11px; border: 1px solid rgba(56, 243, 255, .35); border-radius: 999px; background: rgba(56, 243, 255, .06); }
.bloque h2 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 6vw, 56px); line-height: 1.04; letter-spacing: -.03em; margin: 16px 0 10px; }
.bloque-sub { color: var(--tenue); max-width: 620px; }
.sub-cab { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--tenue); margin: 44px 0 16px; display: flex; align-items: center; gap: 14px; }
.sub-cab::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--linea), transparent); }

/* aparición al hacer scroll */
.rv { opacity: 0; transform: translateY(28px) scale(.985); filter: blur(6px); transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; filter: none; }

/* ============ LA PORRA ============ */
.opciones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .opciones { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .opciones { grid-template-columns: repeat(4, 1fr); } }
.opcion {
  --pc: #fff; position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 18px; text-align: left; overflow: hidden;
  background: var(--cristal); border: 1px solid var(--linea); transition: transform .25s var(--ease), border-color .25s, background .25s, box-shadow .25s;
}
.opcion::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--pc) 28%, transparent), transparent 60%); opacity: 0; transition: opacity .3s; }
.opcion:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pc) 55%, transparent); }
.opcion:hover::before { opacity: .6; }
.opcion > * { position: relative; }
.opcion .cara { width: 46px; height: 46px; flex: none; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, var(--pc), var(--pc2)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 12px; color: rgba(0, 0, 0, .7); }
.opcion .cara img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.opcion .txt { min-width: 0; display: grid; }
.opcion .txt b { font-family: var(--display); font-weight: 700; font-size: clamp(11px, 3.1vw, 13.5px); letter-spacing: -.02em; color: var(--pc); white-space: nowrap; line-height: 1.15; }
.opcion .txt b.larga { font-size: clamp(9.5px, 2.6vw, 12.5px); }
.opcion .txt span { font-size: 11.5px; color: var(--tenue); line-height: 1.2; margin-top: 2px; }
.opcion .marca-ok { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #05060f; background: var(--pc); transform: scale(0); transition: transform .4s cubic-bezier(.3, 1.8, .5, 1); }
.opcion.elegida { background: color-mix(in srgb, var(--pc) 14%, rgba(255, 255, 255, .04)); border-color: var(--pc); box-shadow: 0 0 0 1px var(--pc), 0 14px 46px -14px var(--pc); }
.opcion.elegida::before { opacity: 1; }
.opcion.elegida .marca-ok { transform: scale(1); }
.opciones.cerrada .opcion { pointer-events: none; }
.opciones.cerrada .opcion:not(.elegida) { opacity: .45; }

.tablero { margin-top: 26px; padding: clamp(18px, 3vw, 28px); border-radius: var(--radio); background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border: 1px solid var(--linea); backdrop-filter: blur(14px); }
.tablero-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tablero-cab h3 { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.tablero-cab small { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--tenue); }
.barra { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .06); margin-bottom: 18px; }
.barra i { display: block; height: 100%; background: var(--pc); transition: flex-basis .9s var(--ease); box-shadow: inset -2px 0 0 rgba(5, 6, 15, .6); }
.gente { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); list-style: none; padding: 0; }
.persona { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--linea); }
.persona.yo { border-color: rgba(56, 243, 255, .5); background: rgba(56, 243, 255, .06); }
.persona .av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 21px; background: rgba(255, 255, 255, .07); }
.persona .quien { display: grid; min-width: 0; line-height: 1.25; }
.persona .quien b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.persona .quien span { font-size: 12px; color: var(--apagado); }
.pick { margin-left: auto; padding: 5px 11px; border-radius: 999px; font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 60%, transparent); background: color-mix(in srgb, var(--pc) 12%, transparent); white-space: nowrap; }
.pick.oculto { color: var(--tenue); border-style: dashed; border-color: rgba(255, 255, 255, .25); background: none; font-family: var(--mono); font-weight: 500; }
.pick.falta { color: var(--apagado); border-color: transparent; background: none; font-family: var(--mono); font-weight: 400; }
.tablero-pie { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.tablero-pie p { font-size: 13px; color: var(--tenue); }
.enlace { color: var(--cian); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(56, 243, 255, .4); }

/* ============ PARTIDOS ============ */
.grid-partidos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; perspective: 1400px; }
@media (min-width: 760px) { .grid-partidos { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.partido {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 0%;
  position: relative; display: block; width: 100%; text-align: left; aspect-ratio: 3 / 4.25; border-radius: var(--radio); overflow: hidden; isolation: isolate;
  background: #0b0d1c; border: 1px solid var(--linea); transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .4s, border-color .4s;
}
.partido:hover { border-color: color-mix(in srgb, var(--pc) 70%, transparent); box-shadow: 0 30px 80px -30px var(--pc), 0 0 0 1px color-mix(in srgb, var(--pc) 40%, transparent); transition: transform .1s linear, box-shadow .4s, border-color .4s; }
.partido img.foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: grayscale(1) contrast(1.15) brightness(.9); transform: scale(1.04); transition: filter .7s var(--ease), transform 1.2s var(--ease); z-index: -3; }
.partido:hover img.foto, .partido.viva img.foto { filter: grayscale(.15) contrast(1.05); transform: scale(1.1); }
.partido .tinte { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 30%, transparent) 0%, transparent 35%, rgba(5, 6, 15, .55) 62%, #05060f 96%), linear-gradient(135deg, color-mix(in srgb, var(--pc2) 50%, transparent), transparent 55%); mix-blend-mode: normal; }
.partido .destello { position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--pc) 45%, transparent), transparent 55%); opacity: 0; transition: opacity .4s; mix-blend-mode: screen; }
.partido:hover .destello { opacity: 1; }
.partido .sin-foto { position: absolute; inset: 0; z-index: -3; background: radial-gradient(circle at 30% 20%, var(--pc), var(--pc2) 70%); }
.partido .arriba { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; }
.partido .arriba span { padding: 4px 8px; border-radius: 999px; background: rgba(5, 6, 15, .55); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partido .abajo { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(12px, 3vw, 22px); transform: translateZ(40px); }
.partido .sigla { display: block; font-family: var(--display); font-weight: 900; font-size: clamp(22px, 5.6vw, 44px); line-height: .95; letter-spacing: -.04em; color: var(--pc); text-shadow: 0 0 32px color-mix(in srgb, var(--pc) 60%, transparent); }
.partido .sigla.larga { font-size: clamp(16px, 4.2vw, 32px); }
.partido .cand { display: block; margin-top: 8px; font-weight: 700; font-size: clamp(13px, 2.6vw, 17px); line-height: 1.2; }
.partido .lema { display: block; margin-top: 3px; font-size: clamp(11px, 2.1vw, 13.5px); color: var(--tenue); font-style: italic; }
.partido .ver { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta); opacity: .75; }
.partido .ver i { display: inline-block; font-style: normal; transition: transform .3s var(--ease); }
.partido:hover .ver i { transform: translateX(5px); }

.grid-territoriales { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-territoriales { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-territoriales { grid-template-columns: repeat(3, 1fr); } }
.terr { --mx: 50%; --my: 50%; position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px 12px 12px; border-radius: 20px; text-align: left; overflow: hidden; background: var(--cristal); border: 1px solid var(--linea); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.terr::before { content: ''; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--pc) 26%, transparent), transparent 60%); opacity: 0; transition: opacity .3s; }
.terr:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pc) 60%, transparent); box-shadow: 0 20px 50px -24px var(--pc); }
.terr:hover::before { opacity: 1; }
.terr > * { position: relative; }
.terr .cara { width: 62px; height: 62px; flex: none; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, var(--pc), var(--pc2)); display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: rgba(0, 0, 0, .65); }
.terr .cara img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: grayscale(.6); transition: filter .4s; }
.terr:hover .cara img { filter: none; }
.terr .txt { display: grid; min-width: 0; line-height: 1.3; }
.terr .txt b { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--pc); }
.terr .txt span { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terr .txt small { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--apagado); }
.terr .flecha { margin-left: auto; color: var(--tenue); transition: transform .3s var(--ease), color .3s; }
.terr:hover .flecha { transform: translateX(4px); color: var(--pc); }

/* ============ CARAS (carrusel) ============ */
.carrusel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px clamp(18px, 5vw, 56px) 26px; margin: 0 calc(-1 * clamp(18px, 5vw, 56px)); scrollbar-width: none; -webkit-overflow-scrolling: touch; perspective: 1200px; }
.carrusel::-webkit-scrollbar { display: none; }
.cromo { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; flex: none; width: clamp(170px, 44vw, 236px); aspect-ratio: 3 / 4.1; border-radius: 20px; overflow: hidden; scroll-snap-align: center; isolation: isolate; background: #0b0d1c; border: 1px solid var(--linea); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease), box-shadow .4s; text-align: left; }
.cromo:hover { box-shadow: 0 26px 60px -26px var(--pc); transition: transform .1s linear, box-shadow .4s; }
.cromo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; z-index: -3; transition: transform 1s var(--ease); }
.cromo:hover img { transform: scale(1.07); }
.cromo .sin-foto { position: absolute; inset: 0; z-index: -3; display: grid; place-items: center; padding-bottom: 30%; background: radial-gradient(circle at 30% 15%, color-mix(in srgb, var(--pc) 85%, #fff), var(--pc2) 75%); font-family: var(--display); font-weight: 900; font-size: 54px; letter-spacing: -.05em; color: rgba(5, 6, 15, .35); }
.cromo::before { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, transparent 45%, rgba(5, 6, 15, .92) 92%); }
/* brillo holográfico */
.cromo::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 20%, rgba(56, 243, 255, .35) 36%, rgba(255, 61, 154, .32) 50%, rgba(198, 255, 61, .25) 62%, transparent 78%); background-size: 250% 250%; background-position: var(--mx) var(--my); }
.cromo:hover::after { opacity: 1; }
.cromo .placa { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 9.5px; color: #05060f; background: var(--pc); box-shadow: 0 0 18px color-mix(in srgb, var(--pc) 70%, transparent); }
.cromo .datos { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; display: grid; gap: 2px; }
.cromo .datos b { font-size: 15.5px; font-weight: 800; line-height: 1.15; }
.cromo .datos span { font-size: 12px; color: var(--tenue); }
.cromo .datos small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--pc); margin-top: 4px; }

/* ============ CLAVES ============ */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; perspective: 1400px; }
@media (min-width: 860px) { .bento { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.celda { --rx: 0deg; --ry: 0deg; padding: clamp(16px, 3vw, 26px); border-radius: var(--radio); background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .015)); border: 1px solid var(--linea); transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.celda .num { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(30px, 7.5vw, 58px); line-height: 1; letter-spacing: -.04em; background: linear-gradient(120deg, #fff 20%, var(--cian)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.celda .num small { font-size: .5em; letter-spacing: 0; }
.celda p { margin-top: 10px; font-size: 13.5px; color: var(--tenue); }
.c-xl { grid-column: span 2; background: linear-gradient(140deg, rgba(56, 243, 255, .14), rgba(139, 92, 255, .1) 50%, rgba(255, 61, 154, .1)); }
.c-xl .num { font-size: clamp(56px, 15vw, 120px); }
.c-ancha { grid-column: 1 / -1; }
.linea-tiempo { list-style: none; padding: 0; display: grid; gap: 0; }
.linea-tiempo li { position: relative; display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 11px 0 11px 22px; color: var(--tenue); font-size: 14.5px; }
.linea-tiempo li::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--linea); }
.linea-tiempo li::after { content: ''; position: absolute; left: 0; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: #1b1f3a; border: 1px solid var(--apagado); }
.linea-tiempo li b { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--apagado); padding-top: 2px; }
.linea-tiempo li.hecho { color: var(--tinta); }
.linea-tiempo li.hecho::after { background: var(--cian); border-color: var(--cian); box-shadow: 0 0 12px var(--cian); }
.linea-tiempo li.hecho b { color: var(--cian); }
.linea-tiempo li.dia-d { color: var(--tinta); font-weight: 700; }
.linea-tiempo li.dia-d::after { background: var(--rosa); border-color: var(--rosa); box-shadow: 0 0 0 0 rgba(255, 61, 154, .7); animation: pulso-rosa 1.8s infinite; }
.linea-tiempo li.dia-d b { color: var(--rosa); }
@keyframes pulso-rosa { 70% { box-shadow: 0 0 0 10px rgba(255, 61, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 154, 0); } }
@media (min-width: 860px) {
  .linea-tiempo { grid-template-columns: repeat(6, 1fr); }
  .linea-tiempo li { grid-template-columns: 1fr; padding: 24px 12px 0 0; gap: 6px; }
  .linea-tiempo li::before { left: 0; right: 0; top: 4px; bottom: auto; width: auto; height: 1px; }
  .linea-tiempo li::after { top: 0; }
}

/* ============ PIE ============ */
.pie { max-width: 1200px; margin: clamp(60px, 10vw, 120px) auto 0; padding: 36px clamp(18px, 5vw, 56px) calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); color: var(--apagado); font-size: 13px; display: grid; gap: 14px; }
.pie-marca { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 800; color: var(--tinta); }
.pie p { max-width: 720px; }
.pie a { color: var(--tenue); }
.pie-creditos summary { cursor: pointer; color: var(--tenue); }
.pie-creditos ul { margin-top: 10px; padding-left: 18px; display: grid; gap: 4px; font-size: 12px; }

/* ============ DIÁLOGOS ============ */
dialog { border: 0; padding: 0; color: var(--tinta); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(3, 4, 12, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: aparece .3s ease; }
@keyframes aparece { from { opacity: 0; } }
.modal { width: min(460px, calc(100vw - 28px)); margin: auto; }
.modal[open] { animation: entra-modal .45s var(--ease); }
@keyframes entra-modal { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.modal-cuerpo { position: relative; display: grid; gap: 14px; padding: 26px 22px 22px; border-radius: 26px; background: linear-gradient(160deg, #141833, #0a0c1c); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 40px 120px -20px #000, 0 0 80px -30px var(--violeta); }
.modal-cuerpo h3 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1.15; }
.modal-sub { color: var(--tenue); font-size: 14px; margin-top: -6px; }
.modal-nota { font-size: 12px; color: var(--apagado); text-align: center; }
.modal-cuerpo [data-panel] { display: grid; gap: 14px; }
.cerrar { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--tenue); font-size: 13px; z-index: 2; }
.pestanas { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .06); margin-right: 44px; }
.pestana { padding: 9px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--tenue); transition: all .25s; }
.pestana.activa { background: var(--tinta); color: #05060f; }
.campo { display: grid; gap: 6px; }
.campo > span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--tenue); }
.campo input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .35); color: var(--tinta); font: inherit; font-size: 16px; font-weight: 600; outline: none; transition: border-color .2s, box-shadow .2s; }
.campo input:focus { border-color: var(--cian); box-shadow: 0 0 0 4px rgba(56, 243, 255, .16); }
.campo-code { display: flex; align-items: center; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .35); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.campo-code:focus-within { border-color: var(--cian); box-shadow: 0 0 0 4px rgba(56, 243, 255, .16); }
.campo-code i { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--apagado); padding-left: 14px; white-space: nowrap; }
.campo-code input { border: 0; background: none; padding-left: 2px; box-shadow: none !important; font-family: var(--mono); min-width: 0; }
.error { color: #ff7b9c; font-size: 13px; min-height: 0; }
.error:empty { display: none; }
.modal .btn { width: 100%; }
.quien-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.quien-lista button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); font-weight: 700; font-size: 14px; transition: all .2s; }
.quien-lista button:focus-visible, .btn:focus-visible { outline: 2px solid var(--cian); outline-offset: 2px; }
.quien-lista button:hover { border-color: var(--cian); background: rgba(56, 243, 255, .1); }
.quien-sep { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--apagado); margin: 12px 0 0; }
.emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.emojis button { width: 40px; height: 40px; border-radius: 12px; font-size: 21px; background: rgba(255, 255, 255, .05); border: 1px solid transparent; transition: all .2s; }
.emojis button.activa { border-color: var(--cian); background: rgba(56, 243, 255, .14); transform: scale(1.1); }

/* hoja de partido */
.hoja { width: min(760px, 100vw); height: 100dvh; margin: 0 0 0 auto; }
.hoja[open] { animation: entra-hoja .55s var(--ease); }
@keyframes entra-hoja { from { transform: translateY(8%); opacity: 0; } }
@media (min-width: 800px) { @keyframes entra-hoja { from { transform: translateX(12%); opacity: 0; } } }
.hoja-cuerpo { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; background: #080a17; border-left: 1px solid var(--linea); }
.hoja-cab { position: relative; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px clamp(18px, 4vw, 34px); overflow: hidden; isolation: isolate; }
.hoja-cab img.fondo-foto { position: absolute; right: 0; top: 0; width: 72%; height: 100%; object-fit: cover; object-position: 50% 12%; z-index: -3; mask-image: linear-gradient(90deg, transparent, #000 45%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); filter: saturate(.9); }
.hoja-cab::before { content: ''; position: absolute; inset: 0; z-index: -4; background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--pc) 55%, transparent), transparent 60%), linear-gradient(135deg, color-mix(in srgb, var(--pc2) 60%, #05060f), #05060f 70%); }
.hoja-cab::after { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, transparent 35%, #080a17 98%); }
.hoja .cerrar { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; background: rgba(5, 6, 15, .6); backdrop-filter: blur(10px); color: #fff; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .2); }
.hoja-cab .ambito { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.hoja-cab h3 { font-family: var(--display); font-weight: 900; font-size: clamp(44px, 12vw, 84px); line-height: .92; letter-spacing: -.05em; color: var(--pc); text-shadow: 0 0 50px color-mix(in srgb, var(--pc) 55%, transparent); margin-top: 8px; overflow-wrap: anywhere; }
.hoja-cab h3.larga { font-size: clamp(32px, 8.6vw, 60px); }
.hoja-cab .nombre { font-weight: 700; font-size: 17px; margin-top: 8px; }
.hoja-cab .lema { font-style: italic; color: var(--tenue); margin-top: 2px; }
.hoja-sec { padding: 22px clamp(18px, 4vw, 34px) 0; }
.hoja-sec h4 { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--tenue); margin-bottom: 14px; display: flex; gap: 12px; align-items: center; }
.hoja-sec h4::after { content: ''; flex: 1; height: 1px; background: var(--linea); }
.datos-rapidos { display: flex; flex-wrap: wrap; gap: 8px; }
.datos-rapidos span { padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--cristal); border: 1px solid var(--linea); }
.hoja-nota { margin-top: 12px; font-size: 13.5px; color: var(--tenue); }
.hoja .carrusel { padding-top: 4px; padding-bottom: 8px; margin: 0 calc(-1 * clamp(18px, 4vw, 34px)); padding-left: clamp(18px, 4vw, 34px); padding-right: clamp(18px, 4vw, 34px); }
.hoja .cromo { width: clamp(150px, 40vw, 190px); }
.propuestas { list-style: none; padding: 0; display: grid; gap: 8px; counter-reset: p; }
.propuestas li { counter-increment: p; position: relative; padding: 14px 16px 14px 58px; border-radius: 16px; background: var(--cristal); border: 1px solid var(--linea); font-size: 14.5px; line-height: 1.45; opacity: 0; transform: translateX(18px); animation: entra-prop .6s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 200ms); }
@keyframes entra-prop { to { opacity: 1; transform: none; } }
.propuestas li::before { content: '0' counter(p); position: absolute; left: 16px; top: 13px; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--pc); }
.atrib { margin-top: 10px; font-size: 12px; color: var(--apagado); }
.btn-programa { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; text-decoration: none; color: #05060f; background: linear-gradient(120deg, var(--pc), color-mix(in srgb, var(--pc) 60%, #fff)); box-shadow: 0 18px 50px -18px var(--pc); transition: transform .25s var(--ease); }
.btn-programa:hover { transform: translateY(-3px); }
.btn-programa .ico { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; background: rgba(5, 6, 15, .85); color: var(--pc); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.btn-programa b { display: block; font-size: 15px; line-height: 1.25; }
.btn-programa small { display: block; font-size: 12px; opacity: .75; line-height: 1.3; margin-top: 2px; }
.btn-programa .va { margin-left: auto; font-size: 20px; }
.btn-programa.antiguo { background: var(--cristal); color: var(--tinta); border: 1px dashed rgba(255, 255, 255, .3); box-shadow: none; }
.hoja-fin { padding: 28px clamp(18px, 4vw, 34px) calc(40px + env(safe-area-inset-bottom)); }
.hoja-fin .btn { width: 100%; }

/* ============ TOSTADA Y CONFETI ============ */
.tostada { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 300%); z-index: 2147483647; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; background: #f3f4ff; color: #05060f; box-shadow: 0 20px 60px -10px #000; transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.tostada.ver { transform: translate(-50%, 0); }
#confeti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2147483646; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; filter: none; }
  .titular .linea > span { transform: none; }
}
