/* RenRize — link in bio
   Valores por defecto del tema "Noche RenRize". El Worker los reemplaza con el tema elegido en el portal. */
:root {
  --bg: #170b21;       /* fondo */
  --surface: #241332;  /* superficies */
  --line: #3a2250;     /* bordes */
  --accent: #f59fc6;   /* acento principal */
  --accent-2: #5ee6d2; /* segundo acento, foco */
  --text: #fff3f8;     /* texto */
  --muted: #c9b5d6;    /* texto secundario */

  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 700; /* grosor de títulos: cada fuente trae el suyo */
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --col: 460px;
  --gutter: 16px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
svg { fill: currentColor; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 12px; }

/* Fondo borroso detrás de la columna (solo se ve en pantallas anchas) */
.backdrop {
  position: fixed; inset: -10%;
  background: center 30% / cover no-repeat;
  filter: blur(70px) saturate(1.3) brightness(.45);
  z-index: -1;
}

.page {
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overflow: clip;
}
@media (min-width: 560px) {
  .page {
    margin-block: 32px;
    min-height: auto;
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(8, 2, 14, .6), 0 0 0 1px rgba(255, 255, 255, .06);
  }
}

/* ---------- Hero: la foto se funde y el logo es el nombre ---------- */
.hero { text-align: center; padding-bottom: 8px; }
/* El desvanecido va en el contenedor: así no se mueve cuando la foto tiene zoom */
.hero-photo {
  aspect-ratio: 4 / 5; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 98%);
          mask-image: linear-gradient(to bottom, #000 50%, transparent 98%);
}
.hero-photo img, .hero-photo video { width: 100%; height: 100%; object-fit: cover; }
.hero-logo {
  margin: -34% auto 0;
  width: 64%;
  position: relative;
  filter: drop-shadow(0 8px 24px color-mix(in srgb, var(--bg) 70%, transparent));
}
.hero-logo img { width: 100%; height: auto; }
.handle {
  margin: 14px 0 0;
  font-weight: 500; font-size: 16px;
  color: var(--accent);
}
.bio { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
/* Por encima de la foto aunque tenga zoom (una foto con zoom se pinta en su propia capa) */
.handle, .bio { position: relative; }

.socials {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  padding: 20px 0 4px;
  container-type: inline-size;
}
.socials a {
  --size: clamp(32px, calc((100cqi - 48px) / 7), 42px); /* 7 íconos caben en una fila según el ancho disponible */
  width: var(--size); height: var(--size); border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .2s, color .2s, transform .16s var(--ease-out);
}
.socials svg { width: 20px; height: 20px; }
.socials a:active { transform: scale(.92); }
@media (hover: hover) {
  .socials a:hover { background: var(--brand); color: var(--brand-ink, #fff); box-shadow: none; }
}

/* Momento de carga: la foto se asienta y aparece el logo */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img { animation: settle 1.6s var(--ease-out) both; }
  .hero-logo { animation: rise .9s var(--ease-out) .35s both; }
  @keyframes settle { from { transform: scale(1.08); opacity: .4; } }
  @keyframes rise { from { transform: translateY(18px) scale(.96); opacity: 0; } }
}

/* ---------- Secciones ---------- */
main { padding: 0 var(--gutter); }
section { margin-top: 36px; scroll-margin-top: 72px; } /* que la barra superior no tape el título al saltar con un link */
h2 {
  margin: 0 0 12px 4px;
  font: var(--display-weight) 19px/1.2 var(--display);
  letter-spacing: .01em;
}

/* Tarjeta ancha con foto */
.feature {
  position: relative; display: block;
  aspect-ratio: 16 / 10;
  border-radius: 24px; overflow: hidden;
  background: var(--surface);
  transition: transform .16s var(--ease-out);
}
.feature > img { width: 100%; height: 100%; object-fit: cover; }
.feature::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 95%, transparent) 0%, color-mix(in srgb, var(--bg) 45%, transparent) 45%, transparent 75%);
}
.feature-text {
  position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.feature-text strong { font: var(--display-weight) 22px/1.15 var(--display); }
.feature-text > span { color: var(--muted); font-size: 14px; }
.feature-logo { height: 26px; width: auto; margin-bottom: 8px; filter: brightness(0) invert(1); }
.feature-icon {
  width: 34px; height: 34px; border-radius: 10px; margin-bottom: 8px;
  display: grid; place-items: center; background: var(--brand);
}
.feature-icon svg { width: 18px; height: 18px; }
.feature + .tiles, .tiles + .feature { margin-top: 10px; }

/* Tarjetas en dos columnas */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  position: relative; display: block;
  aspect-ratio: 4 / 5;
  border-radius: 20px; overflow: hidden;
  background: var(--surface);
  transition: transform .16s var(--ease-out);
}
.tile > img { width: 100%; height: 100%; object-fit: cover; }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 90%, transparent), transparent 50%);
}
.tile-label {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; line-height: 1.2;
}
.tile-label svg { width: 18px; height: 18px; flex: none; }

/* Filas con miniatura y fondo borroso de la misma foto */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 18px 8px 8px;
  border-radius: 18px;
  background: var(--surface);
  transition: transform .16s var(--ease-out);
}
.row::before {
  content: ""; position: absolute; inset: -40px; z-index: -2;
  background: var(--img) center / cover;
  filter: blur(26px) saturate(1.4);
  opacity: .7;
}
.row::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 35%, transparent), color-mix(in srgb, var(--bg) 75%, transparent));
  transition: opacity .2s;
}
.row .thumb { position: relative; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; flex: none; }
.row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-title { flex: 1; font-weight: 600; font-size: 16px; }
.row svg { width: 18px; height: 18px; opacity: .75; flex: none; }

.feature:active, .tile:active, .row:active { transform: scale(.98); }
@media (hover: hover) {
  .row:hover::after { opacity: .7; }
  .feature:hover > img, .tile:hover > img, .feature:hover > .slides, .tile:hover > .slides { filter: brightness(1.08); }
}

.pill {
  display: block; margin-top: 10px; padding: 14px 18px;
  border-radius: 999px; text-align: center;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background-color .2s, transform .16s var(--ease-out);
}
.pill:active { transform: scale(.98); }
@media (hover: hover) { .pill:hover { background: var(--surface); } }

/* Patrocinadores: logos en blanco para que se lean igual */
.sponsors {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.sponsors > * {
  display: grid; place-items: center;
  height: 76px; padding: 0 18px;
  border-radius: 16px;
  background: var(--surface);
}
.sponsors img {
  max-height: 30px; width: auto;
  filter: brightness(0) invert(1);
  opacity: .85;
  transition: opacity .2s;
}
@media (hover: hover) { .sponsors a:hover img { opacity: 1; } }

/* ---------- Contacto ---------- */
.lede { margin: 0 4px 16px; color: var(--muted); font-size: 15px; }
.lede a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.form small { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 0; border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font: 400 16px/1.4 var(--body); /* 16px evita el zoom en iPhone */
  transition: box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 120px; }
.form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%);
  background-position: right 20px center, right 15px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-2); }
.form button {
  margin-top: 4px; padding: 15px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--bg);
  font: 700 16px/1 var(--body);
  cursor: pointer;
  transition: transform .16s var(--ease-out), opacity .2s;
}
.form button:active { transform: scale(.98); }
.form button[disabled] { opacity: .6; cursor: progress; }
.form-status { margin: 0; min-height: 1.5em; font-size: 14px; color: var(--muted); }
.form-status[data-state="ok"] { color: var(--accent-2); }
.form-status[data-state="error"] { color: var(--accent); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Pie ---------- */
.footer { padding: 48px var(--gutter) calc(32px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 13px; }
.footer img { width: 72px; height: auto; margin: 0 auto 10px; opacity: .8; }
.footer p { margin: 0; }

/* ---------- Barra que aparece al bajar ---------- */
.minibar {
  position: fixed; top: 0; left: 50%; z-index: 10;
  width: 100%; max-width: var(--col);
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--gutter);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
          backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transform: translate(-50%, -100%);
  transition: transform .3s var(--ease-out);
}
.minibar.is-visible { transform: translate(-50%, 0); }
.minibar img { width: 32px; height: 32px; border-radius: 50%; }
.minibar span { flex: 1; font: var(--display-weight) 15px/1 var(--display); }
.minibar a {
  padding: 8px 14px; border-radius: 999px;
  background: #9146ff; font-weight: 700; font-size: 13px;
}
@media (min-width: 560px) {
  .minibar { border-radius: 0 0 20px 20px; }
}

/* ---------- Bloques que arma el portal ---------- */
.blocks > * + * { margin-top: 10px; }

/* Nombre en letra gruesa sobre el final de la foto, con el @ debajo */
.hero-name {
  margin: -16% 0 0; position: relative;
  padding: 0 var(--gutter);
  font: 800 clamp(30px, 9vw, 40px)/1.1 var(--body);
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  text-shadow: 0 4px 20px color-mix(in srgb, var(--bg) 80%, transparent);
}
.hero-name + .handle { margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-name { animation: rise .9s var(--ease-out) .35s both; }
}

.heading-block { margin-top: 44px; }
.heading { font-size: 24px; }
.prose { color: var(--muted); font-size: 15px; margin: 0 4px; }
.prose p { margin: 0 0 10px; }
.heading-block .prose { margin-top: -4px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

.info { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.info a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 16px; background: var(--surface);
  overflow-wrap: anywhere;
}
.info svg { width: 20px; height: 20px; flex: none; color: var(--accent-2); }
.info span { display: grid; font-weight: 600; }
.info small { font-weight: 400; color: var(--muted); }

/* ---------- Formularios de la Fase 2 ---------- */
.form label > span small, .form .hint { font-weight: 400; color: var(--muted); }
.form .hint { font-size: 12px; }
.form .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.form .check input { width: 20px; height: 20px; margin: 1px 0 0; padding: 0; flex: none; accent-color: var(--accent); box-shadow: none; }
.form input[type=file] { padding: 10px; font-size: 14px; }
.form .note { margin: -4px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.form .note a, .footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.form.compact { gap: 10px; }
.cf-turnstile { min-height: 65px; }

/* ---------- Aviso de privacidad ---------- */
.legal { padding: 24px var(--gutter) 48px; }
.legal main { padding: 0; }
.legal h1 { font: 800 30px/1.15 var(--body); margin: 18px 0 14px; }
.legal h2 { margin: 26px 0 8px; font: 700 18px/1.3 var(--body); }
.legal p { color: var(--muted); }
.legal a { color: var(--accent); }

/* ---------- Aviso de cookies (solo si hay pixels configurados) ---------- */
.footer .link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.consent {
  position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  width: min(440px, calc(100% - 24px)); transform: translateX(-50%);
  display: grid; gap: 10px; padding: 14px 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 20px 50px color-mix(in srgb, var(--bg) 70%, black);
  font-size: 14px; color: var(--muted);
}
.consent[hidden] { display: none; }
.consent p { margin: 0; }
.consent a { color: var(--text); }
.consent div { display: flex; gap: 8px; justify-content: flex-end; }
/* ---------- Fase 4: videos ---------- */
.video {
  position: relative; display: block; overflow: hidden;
  border-radius: 18px; background: var(--surface);
  transition: transform .16s var(--ease-out);
}
.video.wide { aspect-ratio: 16 / 9; }
.video.tall { aspect-ratio: 9 / 16; }
.video > img { width: 100%; height: 100%; object-fit: cover; }
.video::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 85%, transparent), transparent 55%);
}
.video .play {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85);
}
.video .play::before {
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff;
}
.video.big .play { width: 66px; height: 66px; margin: -33px 0 0 -33px; }
.video-title {
  position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1;
  font-weight: 700; font-size: 14px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video.big .video-title { font-size: 16px; }
.video:active { transform: scale(.98); }
.video.playing::after { display: none; }
.video.playing iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Carrusel ---------- */
.carousel { position: relative; }
.carousel .track {
  display: grid; grid-auto-flow: column; gap: 10px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  scroll-padding: 0 var(--gutter);
}
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .track > * { scroll-snap-align: start; }
.carousel.wide .track { grid-auto-columns: 78%; }
.carousel.tall .track { grid-auto-columns: 44%; }
.carousel.cards .track { grid-auto-columns: 72%; }
.car-btn {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 700 22px/1 var(--body); cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--bg) 60%, transparent);
}
.car-btn.prev { left: 6px; }
.car-btn.next { right: 6px; }
.car-btn:disabled { opacity: 0; pointer-events: none; }

/* Tarjeta del carrusel de links */
.card { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: var(--surface); }
.card > img { width: 100%; height: 100%; object-fit: cover; }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--bg) 92%, transparent), transparent 55%); }
.card-text { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; display: grid; gap: 2px; }
.card-text svg { width: 18px; height: 18px; margin-bottom: 4px; }
.card-text strong { font: var(--display-weight) 18px/1.15 var(--display); }
.card-text > span { color: var(--muted); font-size: 13px; }
.card:active { transform: scale(.98); }

/* ---------- Cuadrícula social ---------- */
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 16px; overflow: hidden; }
.social-grid a { position: relative; display: block; aspect-ratio: 1; background: var(--surface); overflow: hidden; }
.social-grid img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.social-grid .sg-icon { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.social-grid .sg-icon svg { width: 12px; height: 12px; }
@media (hover: hover) { .social-grid a:hover img { opacity: .85; } }

/* ---------- Eventos ---------- */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.event { display: flex; gap: 14px; padding: 14px; border-radius: 18px; background: var(--surface); align-items: flex-start; }
.event.live { box-shadow: inset 0 0 0 2px var(--accent); }
.event.past { opacity: .6; }
.ev-date { flex: none; width: 52px; padding: 6px 0; border-radius: 12px; background: var(--bg); text-align: center; line-height: 1.1; }
.ev-date span { display: block; font-size: 12px; font-weight: 700; text-transform: capitalize; color: var(--accent); }
.ev-date strong { font: var(--display-weight) 22px/1.1 var(--display); }
.ev-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ev-status { font-size: 12px; font-weight: 700; color: var(--accent-2); }
.event.live .ev-status { color: var(--accent); }
.event.live .ev-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.ev-title { font-size: 16px; line-height: 1.25; }
.ev-time { font-size: 13px; color: var(--muted); }
.ev-time:first-letter { text-transform: uppercase; }
.ev-body p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.ev-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ev-actions a { padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); }
.ev-actions .ev-main { background: var(--accent); color: var(--bg); box-shadow: none; }
.ev-img { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; }

/* Rechazar y Aceptar con el mismo peso visual: no se empuja a aceptar */
.consent button { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--muted); background: none; color: var(--text); font: 600 14px var(--body); cursor: pointer; }

/* ---------- Fondo: capa de color encima de la imagen difuminada ---------- */
.backdrop-tint { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* Logos con su color original (opción por sección en el portal) */
.logos-original .sponsors img, .logos-original .feature-logo { filter: none; opacity: 1; }

/* ---------- Contacto: botón que despliega el formulario ---------- */
.reveal > summary { list-style: none; }
.reveal > summary::-webkit-details-marker { display: none; }
.reveal-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 18px; border-radius: 999px;
  background: var(--accent); color: var(--bg);
  font-weight: 700; cursor: pointer; user-select: none;
  transition: transform .16s var(--ease-out), opacity .2s;
}
.reveal-btn::after {
  content: ""; width: 8px; height: 8px; margin-top: -4px;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
  transition: transform .25s var(--ease-out), margin .25s var(--ease-out);
}
.reveal[open] > .reveal-btn { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.reveal[open] > .reveal-btn::after { transform: rotate(-135deg); margin-top: 4px; }
.reveal-btn:active { transform: scale(.98); }
.reveal > .form { margin-top: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .reveal[open] > .form { animation: reveal-in .35s var(--ease-out); }
  @keyframes reveal-in { from { opacity: 0; transform: translateY(-6px); } }
}

/* ---------- Galería: la foto se abre aquí mismo ---------- */
html.lb-open { overflow: hidden; }
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(6, 2, 10, .92); color: #fff;
  display: grid; place-items: center;
}
.lightbox:not([open]) { display: none; }
.lightbox::backdrop { background: transparent; }
.lightbox img {
  max-width: calc(100vw - 32px); max-height: calc(100dvh - 120px);
  width: auto; height: auto; border-radius: 12px; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lb-caption { position: absolute; left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .8); }
.lightbox button {
  position: absolute; display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
  font: 400 28px/1 var(--body);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox button[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] img { animation: lb-in .25s var(--ease-out); }
  @keyframes lb-in { from { opacity: 0; transform: scale(.96); } }
}

/* ---------- Twitch en vivo ---------- */
.live-card { border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1.5px #9146ff; }
.live-player { position: relative; aspect-ratio: 16 / 9; background: #000; }
/* Twitch solo reproduce solo (autoplay) si el reproductor mide al menos 400×300; en computadora se respeta */
@media (min-width: 560px) { .live-player { min-height: 300px; } }
.live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-info { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 4px; }
.live-badge {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 6px; background: #e91916; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .live-badge:not(.off)::before { animation: live-pulse 1.4s ease-in-out infinite; }
  @keyframes live-pulse { 50% { opacity: .3; } }
}
.live-text { display: grid; gap: 2px; min-width: 0; }
.live-text strong { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.live-text small { color: var(--muted); font-size: 13px; }
.live-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 10px 14px 14px; padding: 12px; border-radius: 999px;
  background: #9146ff; color: #fff; font-weight: 700; font-size: 15px;
  transition: transform .16s var(--ease-out);
}
.live-cta svg { width: 18px; height: 18px; }
.live-cta:active { transform: scale(.98); }
/* Vista previa del portal cuando no estás en vivo */
.live-off { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; border: 1.5px dashed var(--line); color: var(--muted); font-size: 14px; }
.live-off p { margin: 0; }
.live-off strong { color: var(--text); }
.live-badge.off { background: var(--line); color: var(--muted); }

/* ---------- Slideshow en las fotos de las tarjetas ----------
   is-on = la foto que se ve · was-on = la anterior mientras sale. main.js cambia las clases. */
.slides { position: absolute; inset: 0; overflow: hidden; }
.slide { position: absolute; inset: 0; overflow: hidden; transition: none; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.fx-fade .slide, .fx-zoom .slide { opacity: 0; }
.fx-fade .slide.was-on, .fx-zoom .slide.was-on { opacity: 1; }
.fx-fade .slide.is-on, .fx-zoom .slide.is-on { opacity: 1; z-index: 1; transition: opacity .9s ease; }

.fx-slide .slide { transform: translateX(100%); }
.fx-slide .slide.is-on { transform: none; z-index: 1; transition: transform .7s var(--ease-out); }
.fx-slide .slide.was-on { transform: translateX(-100%); transition: transform .7s var(--ease-out); }

/* Zoom suave: la foto se acerca poco a poco mientras está en pantalla */
@media (prefers-reduced-motion: no-preference) {
  .fx-zoom .slide.is-on { animation: slide-kb var(--every, 4s) linear both; }
  .fx-zoom .slide.was-on { transform: scale(1.08); }
  @keyframes slide-kb { from { transform: scale(1); } to { transform: scale(1.08); } }
}

/* ---------- Barra de anuncio ---------- */
.announce {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 11px 44px 11px 16px; position: relative;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2)));
  color: var(--bg); font-weight: 700; font-size: 14px; line-height: 1.3; text-align: center;
}
.announce-go { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; transition: transform .2s var(--ease-out); }
@media (hover: hover) { a.announce:hover .announce-go { transform: translate(3px, -50%); } }

/* ---------- Etiqueta "En vivo" (solo se ve cuando el canal principal transmite) ---------- */
.live-tag { display: none; }
.is-live .live-tag {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 3px 7px; border-radius: 6px; background: #e91916; color: #fff;
  font: 800 10px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase;
}
.is-live .live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.is-live .tile .live-tag, .is-live .card .live-tag { position: absolute; top: 10px; left: 10px; z-index: 2; }
.is-live .feature-text .live-tag { margin-bottom: 8px; }
.is-live .row-title .live-tag { margin-left: 8px; vertical-align: 2px; }
.socials a.has-live { position: relative; }
.is-live .socials a.has-live::after {
  content: ""; position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: #e91916; box-shadow: 0 0 0 2px var(--bg);
}
.minibar .cta-live { display: none; }
.is-live .minibar .cta-live { display: inline-flex; align-items: center; gap: 6px; }
.is-live .minibar .cta-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; }
.is-live .minibar .cta-off { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .is-live .live-tag::before, .is-live .socials a.has-live::after, .is-live .minibar .cta-live::before { animation: live-pulse 1.4s ease-in-out infinite; }
}

/* ---------- Cupones ---------- */
.coupons { display: grid; gap: 10px; }
.coupon {
  display: grid; gap: 12px; padding: 14px; border-radius: 18px;
  background: var(--surface); border: 1.5px dashed var(--line);
}
.coupon-head { display: flex; align-items: center; gap: 12px; }
.coupon-logo { height: 28px; width: auto; max-width: 96px; filter: brightness(0) invert(1); flex: none; }
.logos-original .coupon-logo { filter: none; }
.coupon-text { display: grid; gap: 2px; min-width: 0; }
.coupon-text strong { font-size: 16px; line-height: 1.25; }
.coupon-text span { color: var(--muted); font-size: 14px; }
.coupon-actions { display: flex; gap: 8px; }
.coupon-code {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0;
  padding: 10px 12px 10px 16px; border: 1.5px solid var(--accent); border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); cursor: pointer;
  font: inherit; transition: background-color .2s, transform .16s var(--ease-out);
}
.coupon-code .code { font: 800 17px/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .06em; overflow-wrap: anywhere; text-align: left; }
.coupon-code .copy { flex: none; padding: 6px 10px; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 700; font-size: 13px; }
.coupon-code.copied { border-color: var(--accent-2); }
.coupon-code.copied .copy { background: var(--accent-2); }
.coupon-code:active { transform: scale(.98); }
.coupon-go { flex: none; display: grid; place-items: center; padding: 0 16px; border-radius: 12px; font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
@media (hover: hover) { .coupon-go:hover { background: var(--bg); } }

/* ---------- Clips de Twitch ---------- */
.clip-views {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff;
  font-size: 12px; font-weight: 700;
}
/* El código siempre en una línea; si no cabe junto, "Usar ahora" baja a su propio renglón */
.coupon-actions { flex-wrap: wrap; }
.coupon-code { flex: 1 1 200px; }
.coupon-code .code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .04em; font-size: 16px; }
.coupon-go { flex: 1 0 auto; min-height: 44px; }

/* En celular la página tapa todo el fondo: no se dibuja (el difuminado es pesado y no se ve) */
@media (max-width: 559px) { .backdrop, .backdrop-tint { display: none; } }

/* ---------- Tema de temporada ---------- */
.season-banner {
  margin: 0; padding: 10px 16px; text-align: center;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--text); font-weight: 700; font-size: 14px; line-height: 1.35;
}
/* Decoración que cae: encima de todo pero sin bloquear toques; las barras y diálogos van más arriba */
.season-fx { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.season-fx span {
  position: absolute; top: -8vh; font-size: var(--size); line-height: 1; opacity: .8;
  animation: season-fall var(--dur) linear var(--delay) infinite; will-change: transform;
}
.sfx-snow span { color: #fff; text-shadow: 0 0 6px rgba(255, 255, 255, .55); opacity: .75; }
.season-fx .bit { width: calc(var(--size) * .45); height: calc(var(--size) * .7); border-radius: 2px; opacity: .85; }
.season-fx.paused span { animation-play-state: paused; }
@keyframes season-fall {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(var(--drift), 118vh, 0) rotate(var(--spin)); }
}
@media (prefers-reduced-motion: reduce) { .season-fx { display: none; } }

/* ---------- Avisos en vivo ---------- */
.notify-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.notify-btn {
  flex: 1 1 100%; min-height: 50px; padding: 14px 18px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .16s var(--ease-out), opacity .2s;
}
.notify-btn:active { transform: scale(.98); }
.notify-btn:disabled { opacity: .6; cursor: progress; }
.notify-off {
  border: 0; background: none; padding: 6px 0; color: var(--muted); font: inherit; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.notify-btn[hidden], .notify-off[hidden] { display: none; }
.notify-status { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.notify-status:empty { display: none; }
.notify-status[data-state="ok"] { color: var(--accent-2); font-weight: 600; }
.notify-status[data-state="error"] { color: var(--accent); }
