/*
 * snipdgen.com — integración del kit v2 de Codex (15/10/2026).
 *
 * Tres secciones: #feed (Feed Scanner), #watch (Watch It Work), #radar (On Radar + cierre + pie).
 * Las referencias del kit son el objetivo visual, NUNCA fondo: la página se compone con las capas
 * separadas del kit (entornos, telemetría, líquidos, carcasas, tarjetas) y UI viva en HTML.
 *
 * ESCRITORIO (≥1100 px): cada sección pinta una «escena» con la proporción de la referencia
 * (1672×941). Todo dentro se coloca en % de la escena y se mide en `--u` (1 px de la referencia),
 * así que la composición encaja igual a 1440, 1672 o 1920 de ancho.
 * MÓVIL/TABLET (<1100 px): se apila en el orden del kit (`layout-map.json › mobile`) sobre los
 * entornos verticales.
 */

:root {
  --negro: #050505;
  --rojo: #ff1738;
  --rojo-hover: #ff2947;
  --rojo-pulsado: #e70e2d;
  --rojo-apagado: #a9142d;
  --blanco: #ffffff;
  --gris: #a1a1aa;
  --gris-2: #71717a;
  --vidrio: rgb(16 16 18 / 82%);
  --linea: rgb(255 255 255 / 10%);
  --verde: #19ff94;
  --display: "Russo One", Inter, system-ui, sans-serif;
  --texto: Inter, system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--negro);
  color: var(--blanco);
  font-family: var(--texto);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.rojo {
  color: var(--rojo);
}

/* Los iconos del kit van con `currentColor`: como <img> saldrían negros. Se pintan por máscara. */
.ico {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}

/* El icono del navegador de los CTA: un aro de tres gajos nuestro. */
.icono-nav {
  position: relative;
  flex: none;
  width: 1.45em;
  height: 1.45em;
  border-radius: 50%;
  background: conic-gradient(from -30deg, #fff 0 33%, #dcdce0 0 66%, #b8b8bf 0);
}

.icono-nav::after {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  background: var(--rojo);
  box-shadow: 0 0 0 0.12em #fff;
}

/* ─── CTA: idle · hover · pressed · focus-visible · disabled (INTERACTION-STATES) ─── */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 44px;
  padding: 0 1.4em;
  border-radius: 999px;
  border: 2px solid var(--rojo);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 14px rgb(255 23 56 / 30%);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.cta--rojo {
  background: var(--rojo);
}

.cta:hover {
  transform: translateY(-2px);
  border-color: rgb(255 255 255 / 24%);
  box-shadow: 0 0 22px rgb(255 23 56 / 52%);
}

.cta--rojo:hover {
  background: var(--rojo-hover);
}

.cta--linea:hover {
  background: rgb(255 23 56 / 10%);
}

.cta:active {
  transform: translateY(1px) scale(0.985);
  background-color: var(--rojo-pulsado);
  border-color: var(--rojo);
  box-shadow: 0 0 10px rgb(255 23 56 / 20%);
}

.cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.cta:disabled {
  background: #3a111a;
  border-color: #57202a;
  box-shadow: none;
  opacity: 0.55;
}

.cta-flecha {
  font-size: 1.15em;
  transition: transform 180ms ease;
}

.cta:hover .cta-flecha {
  transform: translateX(4px);
}

/* ─── Cabecera fija ─── */

.cab {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: clamp(64px, 5.1vw, 86px);
  padding: 0 2.4vw;
  background: linear-gradient(180deg, rgb(5 5 5 / 86%), rgb(5 5 5 / 58%));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}

.cab-marca img {
  width: clamp(170px, 20.3vw, 380px);
  height: auto;
}

.cab-nav {
  display: flex;
  gap: clamp(28px, 3.6vw, 64px);
}

.cab-nav a,
.pie-nav a {
  position: relative;
  padding: 12px 0;
  font-size: clamp(13px, 1vw, 17px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e4e4e7;
}

.cab-nav a::after,
.pie-nav a::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.cab-nav a:hover::after,
.pie-nav a:hover::after,
.cab-nav a[data-activa]::after,
.pie-nav a[data-activa]::after {
  transform: scaleX(1);
}

.cab-nav a[data-activa],
.pie-nav a[data-activa] {
  color: #fff;
}

.cab-cta {
  justify-self: end;
  height: clamp(44px, 3.1vw, 54px);
  font-size: clamp(14px, 1.05vw, 18px);
}

/* ─── Piezas comunes ─── */

.seccion {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.fondo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.fondo-env {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cejilla {
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #e4e4e7;
}

.titulo {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.84;
  text-transform: uppercase;
}

.lema {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f4f4f5;
  white-space: nowrap;
}

.cuerpo {
  line-height: 1.42;
  color: #f4f4f5;
}

/* ═══════════════ ESCRITORIO ═══════════════ */

@media (min-width: 1100px) {
  .escena {
    --u: calc(100cqw / 1672);
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 1672 / 941;
    container-type: inline-size;
  }

  .escena > * {
    position: absolute;
  }

  .feed,
  .radar {
    min-height: max(100svh, 56.28vw);
  }

  /* ─── Feed Scanner ─── */

  .respira {
    animation: respira 9s ease-in-out infinite;
  }

  @keyframes respira {
    50% {
      transform: scale(1.012);
    }
  }

  .telemetria {
    position: absolute;
    left: 0;
    right: 0;
    top: 4%;
    height: 92%;
    overflow: hidden;
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(90deg, transparent 29%, #000 36%, #000 75%, transparent 83%);
    mask-image: linear-gradient(90deg, transparent 29%, #000 36%, #000 75%, transparent 83%);
  }

  .tele {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .tele--a {
    animation: tele-a 12s linear infinite;
  }

  .tele--b {
    left: 2%;
    animation: tele-b 18s linear infinite;
  }

  @keyframes tele-a {
    0% {
      transform: translateY(-7%);
      opacity: 0;
    }
    12%,
    88% {
      opacity: 0.5;
    }
    100% {
      transform: translateY(7%);
      opacity: 0;
    }
  }

  @keyframes tele-b {
    0% {
      transform: translateY(-4%) scale(1.03);
      opacity: 0;
    }
    15%,
    85% {
      opacity: 0.2;
    }
    100% {
      transform: translateY(9%) scale(1.03);
      opacity: 0;
    }
  }

  .barrido {
    position: absolute;
    left: 30%;
    right: 8%;
    top: 0;
    height: 14%;
    background: linear-gradient(180deg, transparent, rgb(255 60 80 / 12%) 60%, rgb(255 255 255 / 10%) 62%, transparent 64%);
    animation: barrido 2.8s linear infinite;
  }

  @keyframes barrido {
    from {
      transform: translateY(-100%);
    }
    to {
      transform: translateY(720%);
    }
  }

  .bloom {
    position: absolute;
    left: 38%;
    top: 0;
    width: 50%;
    height: 70%;
    background: radial-gradient(50% 55% at 50% 45%, rgb(255 23 56 / 26%), transparent 70%);
    animation: bloom 4.6s ease-in-out infinite;
  }

  @keyframes bloom {
    0%,
    100% {
      opacity: 0.84;
    }
    50% {
      opacity: 1;
    }
  }

  .liquido {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
    transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  }

  .feed .fondo::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
      radial-gradient(42% 34% at 12% 82%, rgb(5 5 5 / 72%), transparent 75%),
      linear-gradient(90deg, rgb(5 5 5 / 55%), transparent 34%);
  }

  .feed-copia {
    z-index: 5;
    left: 2.8%;
    top: 17.4%;
    width: 33%;
  }

  .cejilla {
    font-size: calc(15 * var(--u));
  }

  .titulo {
    margin-top: calc(14 * var(--u));
    font-size: calc(104 * var(--u));
    letter-spacing: -0.015em;
  }

  .lema {
    margin-top: calc(20 * var(--u));
    font-size: calc(20.5 * var(--u));
    letter-spacing: 0.19em;
  }

  .cuerpo {
    max-width: calc(380 * var(--u));
    margin-top: calc(20 * var(--u));
    font-size: calc(17.5 * var(--u));
  }

  .cuerpo + .cuerpo {
    margin-top: calc(15 * var(--u));
  }

  .cta--grande {
    min-height: calc(62 * var(--u));
    margin-top: calc(24 * var(--u));
    padding: 0 calc(30 * var(--u));
    font-size: calc(20 * var(--u));
    gap: calc(16 * var(--u));
  }

  .ventajas {
    z-index: 5;
    left: 2.8%;
    top: 74.4%;
    display: flex;
  }

  .ventajas li {
    display: flex;
    flex-direction: column;
    gap: calc(4 * var(--u));
    padding: 0 calc(28 * var(--u));
    border-left: 1px solid rgb(255 255 255 / 22%);
  }

  .ventajas li:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .ventajas .ico {
    font-size: calc(42 * var(--u));
    margin-bottom: calc(10 * var(--u));
  }

  .ventajas b {
    font-size: calc(14.5 * var(--u));
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .ventajas span {
    font-size: calc(12.5 * var(--u));
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gris);
  }

  .riel {
    z-index: 5;
    left: 80.1%;
    top: 16.4%;
    display: flex;
    gap: calc(26 * var(--u));
    font-size: calc(12.4 * var(--u));
    line-height: 1.62;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #e4e4e7;
    white-space: nowrap;
  }

  .riel p + p {
    margin-top: calc(42 * var(--u));
    padding-left: calc(28 * var(--u));
    border-left: 1px solid rgb(255 255 255 / 30%);
  }

  /* El navegador: carcasa del kit + UI viva encima. Medidas sacadas de la carcasa (1536×1024). */
  .navegador {
    z-index: 3;
    left: 33.1%;
    top: 12.6%;
    width: 63.6%;
    aspect-ratio: 1536 / 1024;
    font-size: calc(13 * var(--u));
    transform: perspective(1600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transform-style: preserve-3d;
    animation: flota 6.5s ease-in-out infinite;
  }

  .navegador.aparece {
    animation:
      aparece 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both,
      flota 6.5s ease-in-out 700ms infinite;
  }

  @keyframes flota {
    50% {
      translate: 0 -7px;
    }
  }

  @keyframes aparece {
    from {
      opacity: 0;
      translate: 0 28px;
    }
  }

  .navegador-carcasa {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .navegador::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(60% 50% at 30% 60%, rgb(40 40 44 / 70%), transparent 70%),
      rgb(8 8 10 / 92%);
    clip-path: polygon(7.6% 23%, 92.4% 19.6%, 92.7% 92%, 7.2% 84%);
  }

  .navegador-ext {
    position: absolute;
    left: 86%;
    top: 13.7%;
    display: grid;
    place-items: center;
    width: 3.7%;
    aspect-ratio: 1.45;
    border-radius: 999px;
    border: 2px solid var(--rojo);
    background: #0b0b0c;
    box-shadow: 0 0 calc(12 * var(--u)) rgb(255 23 56 / 60%);
  }

  .navegador-ext img {
    width: 66%;
    height: auto;
  }

  .navegador-lateral {
    position: absolute;
    left: 8.4%;
    top: 37.5%;
    width: 10.4%;
    display: flex;
    flex-direction: column;
    gap: calc(6 * var(--u));
    font-size: calc(13.5 * var(--u));
    color: #d4d4d8;
    filter: blur(0.3px);
  }

  .navegador-lateral li {
    padding: calc(9 * var(--u)) calc(14 * var(--u));
    border-radius: calc(10 * var(--u));
  }

  .navegador-lateral .activo {
    background: rgb(255 23 56 / 24%);
    color: #fff;
  }

  /* ─── Watch It Work ─── */

  .watch {
    min-height: 82svh;
    padding: 8vw 12vw 7vw;
  }

  /* ─── On Radar ─── */

  .profundidad {
    position: absolute;
    left: 27.5%;
    top: 6%;
    width: 37%;
    height: 73%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent);
  }

  .prof {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .prof--a {
    animation: prof-a 15s linear infinite;
  }

  .prof--b {
    animation: prof-b 23s linear infinite;
  }

  @keyframes prof-a {
    0% {
      transform: translate(-10px, -18%);
      opacity: 0;
    }
    12%,
    86% {
      opacity: 0.28;
    }
    50% {
      transform: translate(10px, 0%);
    }
    100% {
      transform: translate(-10px, 18%);
      opacity: 0;
    }
  }

  @keyframes prof-b {
    0% {
      transform: translate(10px, -14%) scale(0.9);
      opacity: 0;
    }
    12%,
    86% {
      opacity: 0.48;
    }
    50% {
      transform: translate(-10px, 2%) scale(0.9);
    }
    100% {
      transform: translate(10px, 16%) scale(0.9);
      opacity: 0;
    }
  }

  .radar-copia {
    z-index: 5;
    left: 2.8%;
    top: 16.8%;
    width: 31%;
  }

  .radar-copia .lema {
    margin-top: calc(26 * var(--u));
  }

  .radar-copia .cuerpo {
    max-width: calc(345 * var(--u));
  }

  .chorro {
    z-index: 3;
    left: 27%;
    top: 9%;
    width: 41%;
    height: 75%;
  }

  .salpicadura,
  .salpicadura-brillo {
    position: absolute;
    left: 0;
    top: 29%;
    width: 100%;
    height: 36%;
    object-fit: contain;
    z-index: 2;
  }

  .salpicadura-brillo {
    z-index: 1;
  }

  .onda {
    position: absolute;
    z-index: 1;
    left: 30%;
    top: 43%;
    width: 40%;
    height: 9%;
  }

  .tarjetas {
    position: absolute;
    container-type: inline-size;
    left: 29%;
    top: 0;
    width: 40%;
    height: 100%;
    z-index: 3;
    clip-path: inset(-30% -30% 0 -30%);
  }

  .llamadas {
    position: absolute;
    left: 67%;
    top: 0;
    width: 30%;
    height: 100%;
    z-index: 4;
  }

  /*
   * La carcasa del kit es más alargada que el panel de la referencia: con «contain» quedaba
   * estrecha. Va como border-image (9 trozos): las esquinas y la barra «Chrome» no se deforman
   * y el marco ocupa el sitio exacto de la referencia (x 1225–1632, y 100–768).
   */
  .lateral {
    z-index: 3;
    left: 70.6%;
    top: 6.4%;
    width: 29.7%;
    height: 80%;
    font-size: calc(14 * var(--u));
  }

  .lateral::before {
    content: "";
    position: absolute;
    inset: 0;
    border-style: solid;
    border-color: transparent;
    border-width: calc(94.5 * var(--u)) calc(126 * var(--u)) calc(54 * var(--u)) calc(162 * var(--u));
    border-image: url(kit/radar/side-panel-shell.webp) 189 252 108 324 fill stretch;
  }

  .lateral-carcasa {
    display: none;
  }

  .lateral-ui {
    position: absolute;
    left: 10.2%;
    top: 12.2%;
    width: 79.7%;
    height: 81%;
    display: flex;
    flex-direction: column;
  }

  .suelo {
    z-index: 1;
    left: 0;
    right: 0;
    top: 83.4%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 16%) 20%, rgb(255 255 255 / 16%) 80%, transparent);
  }

  .cierre {
    z-index: 5;
    left: 31%;
    top: 84.5%;
    width: 39%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(10 * var(--u));
  }

  .cierre-titulo {
    font-family: var(--display);
    font-weight: 400;
    font-size: calc(40 * var(--u));
    text-transform: uppercase;
    white-space: nowrap;
  }

  .cierre-fila {
    display: flex;
    align-items: center;
    gap: calc(30 * var(--u));
    font-size: calc(18 * var(--u));
  }

  .cierre-cta {
    min-width: calc(234 * var(--u));
    min-height: max(44px, calc(46 * var(--u)));
  }

  .cierre-sep {
    width: 1px;
    height: calc(38 * var(--u));
    background: rgb(255 255 255 / 28%);
  }

  .cierre-ext {
    display: flex;
    align-items: center;
    gap: calc(14 * var(--u));
  }

  .riesgo {
    font-size: calc(15 * var(--u));
    color: var(--gris-2);
  }

  .pie-marca {
    z-index: 5;
    left: 4.5%;
    top: 89%;
    width: 14%;
  }

  .pie-marca img {
    width: 100%;
    height: auto;
  }

  .pie-nav {
    z-index: 5;
    left: 76%;
    top: 89.4%;
    display: flex;
    gap: calc(38 * var(--u));
  }

  .pie-nav a {
    font-size: calc(14 * var(--u));
  }

  .pie-nav::before {
    content: "";
    position: absolute;
    left: calc(-56 * var(--u));
    top: calc(-24 * var(--u));
    width: 1px;
    height: calc(80 * var(--u));
    background: rgb(255 255 255 / 22%);
  }
}

/* ═══════════════ Watch It Work ═══════════════ */

.watch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2vw;
  text-align: center;
  background:
    radial-gradient(40% 50% at 50% 45%, rgb(255 23 56 / 16%), transparent 70%),
    var(--negro);
}

/* El chorro central que baja del hero y se estrecha hacia el vídeo al hacer scroll. */
.caudal {
  position: absolute;
  z-index: 0;
  left: 28%;
  width: 44%;
  top: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 4%;
  transform: scaleX(calc(1 - var(--estrecha, 0) * 0.55));
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
  mask-image: linear-gradient(180deg, #000, transparent 70%);
  pointer-events: none;
}

.caudal i {
  width: 2px;
  background: linear-gradient(180deg, rgb(255 23 56 / 0%), rgb(255 23 56 / 90%) 30%, rgb(255 255 255 / 70%) 34%, rgb(255 23 56 / 80%) 40%, transparent 70%);
  background-size: 100% 220%;
  box-shadow: 0 0 10px rgb(255 23 56 / 70%);
  animation: caudal 3.2s linear infinite;
}

.caudal i:nth-child(2) {
  animation-duration: 2.4s;
  width: 3px;
}

.caudal i:nth-child(3) {
  animation-duration: 3.8s;
}

@keyframes caudal {
  from {
    background-position: 0 100%;
  }
  to {
    background-position: 0 -120%;
  }
}

.watch-copia,
.video {
  position: relative;
  z-index: 1;
}

.watch .cejilla {
  font-size: clamp(12px, 0.95vw, 16px);
}

.titulo-2 {
  margin-top: 0.6em;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3.9vw, 66px);
  line-height: 1;
  text-transform: uppercase;
}

.video {
  width: min(66vw, 1110px);
  opacity: 0;
  translate: 0 24px;
  transition:
    opacity 600ms ease,
    translate 600ms ease;
}

.video.visible {
  opacity: 1;
  translate: 0 0;
}

.video-marco {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 1.2vw;
  padding: 2px;
  background: linear-gradient(140deg, var(--rojo), rgb(255 23 56 / 8%) 35%, rgb(255 255 255 / 16%) 60%, var(--rojo));
  box-shadow: 0 0 6vw rgb(255 23 56 / 24%);
}

.video-pieza {
  position: absolute;
  inset: 2px;
  display: block;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: calc(1.2vw - 2px);
  background: #050505;
  object-fit: cover;
  cursor: pointer;
}

.video-pieza:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -5px;
}

.video-sonido {
  position: absolute;
  right: clamp(12px, 1.2vw, 18px);
  bottom: clamp(12px, 1.2vw, 18px);
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  background: rgb(5 5 5 / 72%);
  color: #fff;
  box-shadow: 0 4px 18px rgb(0 0 0 / 35%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, scale 160ms ease;
}

.video-sonido:hover,
.video-sonido[aria-pressed="true"] {
  border-color: var(--rojo);
  background: rgb(255 23 56 / 88%);
}

.video-sonido:hover {
  scale: 1.06;
}

.video-sonido-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-sonido-icon--activo,
.video-sonido[aria-pressed="true"] .video-sonido-icon--apagado {
  display: none;
}

.video-sonido[aria-pressed="true"] .video-sonido-icon--activo {
  display: block;
}

.video-sonido:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Al final de la sección, puntos de telemetría que «se hacen» tarjetas (opacidad y escala). */
.puntos-caen {
  position: absolute;
  z-index: 0;
  left: 40%;
  right: 40%;
  bottom: 0;
  height: 16%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.puntos-caen i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rojo);
  box-shadow: 0 0 10px var(--rojo);
  animation: punto-cae 2.6s ease-in infinite;
}

.puntos-caen i:nth-child(2n) {
  background: #fff;
  animation-delay: 0.6s;
}

.puntos-caen i:nth-child(3n) {
  animation-delay: 1.2s;
}

@keyframes punto-cae {
  0% {
    transform: translateY(-40px) scale(1);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(60px) scale(3.2, 1.6);
    border-radius: 3px;
    opacity: 0;
  }
}

/* ═══════════════ On Radar: tarjetas, llamadas y panel lateral ═══════════════ */

.tarjeta {
  position: absolute;
  left: 0;
  width: 100%;
  aspect-ratio: 820 / 293;
  font-size: 4.3cqw;
  transition:
    top 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 520ms ease,
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tarjeta-flota {
  position: absolute;
  inset: 0;
  rotate: var(--giro, 3deg);
  animation: tarjeta-flota var(--flotar, 5s) ease-in-out infinite;
}

@keyframes tarjeta-flota {
  50% {
    translate: 0 -5px;
  }
}

.tarjeta-base,
.tarjeta-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 220ms ease;
}

.tarjeta-hover {
  opacity: 0;
}

.tarjeta:hover .tarjeta-hover,
.tarjeta[data-estado="locked"] .tarjeta-hover,
.tarjeta[data-estado="sniped"] .tarjeta-hover {
  opacity: 1;
}

.tarjeta:hover .tarjeta-flota {
  translate: 0 -5px;
}

/* El contenido vivo, sobre el vidrio limpio de la tarjeta (cuerpo en 10–90 % × 23–75 %). */
.tarjeta-logo {
  position: absolute;
  left: 15.4%;
  top: 33.5%;
  width: 11.2%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 30%);
  transition: transform 220ms ease;
}

.tarjeta:hover .tarjeta-logo {
  transform: scale(1.04);
}

.tarjeta-txt {
  position: absolute;
  left: 30.5%;
  top: 31%;
  right: 30%;
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  line-height: 1.1;
}

.tarjeta-txt b {
  font-weight: 700;
  font-size: 1.15em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tarjeta-txt span {
  font-size: 0.86em;
  color: var(--gris);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tarjeta-txt em {
  font-style: normal;
  font-family: var(--display);
  font-size: 1.25em;
  color: var(--rojo);
}

.tarjeta-tiempo {
  position: absolute;
  right: 20%;
  top: 27%;
  font-size: 0.95em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #f4f4f5;
}

.tarjeta-marca {
  position: absolute;
  right: 21%;
  top: 56%;
  width: 0.95em;
  height: 0.95em;
}

.tarjeta[data-estado="watch"] .tarjeta-marca {
  border-radius: 50%;
  border: 2px solid var(--rojo);
  animation: pulso 1.8s ease-out infinite;
}

.tarjeta[data-estado="locked"] .tarjeta-marca {
  --ico: url(kit/ui/lock.svg);
  background: var(--rojo);
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
  animation: candado 460ms ease-out;
}

.tarjeta[data-estado="sniped"] .tarjeta-marca {
  border-radius: 50%;
  background: var(--rojo);
  box-shadow: 0 0 0.6em var(--rojo);
}

@keyframes pulso {
  0% {
    box-shadow: 0 0 0 0 rgb(255 23 56 / 70%);
  }
  100% {
    box-shadow: 0 0 0 0.7em rgb(255 23 56 / 0%);
  }
}

@keyframes candado {
  0% {
    transform: scale(0.82);
  }
  60% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* SNIPED: un barrido blanco-rojo, una sola vez. */
.tarjeta-barrido {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 23%;
  bottom: 25%;
  border-radius: 0.6em;
  overflow: hidden;
  pointer-events: none;
}

.tarjeta-barrido::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 75%), rgb(255 23 56 / 70%), transparent);
  transform: translateX(-10%);
  opacity: 0;
}

.tarjeta.barre .tarjeta-barrido::after {
  animation: barre 260ms ease-out;
}

@keyframes barre {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 1;
    transform: translateX(360%);
  }
}

.tarjeta.nueva {
  opacity: 0;
  transform: translateY(-70px) scale(0.92);
}

.tarjeta.sale {
  opacity: 0;
}

.llamada {
  position: absolute;
  left: 22%;
  display: inline-flex;
  align-items: center;
  height: calc(46 * var(--u, 1px));
  padding: 0 calc(22 * var(--u, 1px));
  border-radius: calc(8 * var(--u, 1px));
  border: 2px solid var(--rojo);
  background: rgb(8 8 9 / 86%);
  font-size: calc(19 * var(--u, 1px));
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 calc(18 * var(--u, 1px)) rgb(255 23 56 / 40%);
  transition:
    top 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 300ms ease;
}

.llamada::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: calc(30 * var(--u, 1px));
  height: 2px;
  background: var(--rojo);
}

.llamada::after {
  content: "";
  position: absolute;
  right: calc(100% + 26 * var(--u, 1px));
  top: 50%;
  width: calc(12 * var(--u, 1px));
  height: calc(12 * var(--u, 1px));
  border-radius: 50%;
  border: 2px solid var(--rojo);
  background: var(--negro);
  transform: translateY(-50%);
}

.salpicadura {
  transform-origin: 50% 55%;
  animation: salpica 4s ease-in-out infinite;
  transition: translate 200ms ease;
}

/* El líquido vive: respira, se mece y ondula (antes solo respiraba un 2 % y parecía quieto). */
@keyframes salpica {
  0%,
  100% {
    scale: 1 0.96;
    rotate: 0deg;
    translate: 0 0;
  }
  25% {
    scale: 1.025 1.03;
    rotate: -0.8deg;
    translate: -4px -2px;
  }
  50% {
    scale: 0.99 1.06;
    rotate: 0.4deg;
    translate: 2px -5px;
  }
  75% {
    scale: 1.03 0.99;
    rotate: 0.9deg;
    translate: 5px -1px;
  }
}

/* Una copia detrás, más grande y desenfocada, que late con otro ritmo: el brillo del líquido. */
.salpicadura-brillo {
  transform-origin: 50% 55%;
  filter: blur(10px) saturate(1.4);
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: brillo 2.7s ease-in-out infinite;
}

@keyframes brillo {
  0%,
  100% {
    opacity: 0.3;
    scale: 1.04 1;
  }
  50% {
    opacity: 0.75;
    scale: 1.12 1.18;
  }
}

/* La onda que se abre en el centro del charco. */
.onda {
  border-radius: 50%;
  border: 2px solid rgb(255 60 80 / 70%);
  box-shadow: 0 0 18px rgb(255 23 56 / 60%);
  opacity: 0;
  pointer-events: none;
  animation: onda 2.2s ease-out infinite;
}

@keyframes onda {
  0% {
    opacity: 0.85;
    transform: scale(0.35);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

/* Gotas en arco: suben, se frenan y caen. */
.gota--arco {
  width: 0.55em;
  height: 0.55em;
  animation: gota-arco var(--t, 1300ms) cubic-bezier(0.3, 0.6, 0.6, 1) forwards;
}

@keyframes gota-arco {
  0% {
    transform: translate(0, 0) scale(0.5);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  45% {
    transform: translate(calc(var(--dx) * 0.55), var(--alto)) scale(1);
  }
  100% {
    transform: translate(var(--dx), var(--cae)) scale(0.4);
    opacity: 0;
  }
}

.salpicadura.bloquea {
  animation:
    bloquea 460ms ease-out,
    salpica 4s ease-in-out 460ms infinite;
}

@keyframes bloquea {
  50% {
    scale: 1.045;
    filter: brightness(1.25);
  }
}

.salpicadura.dispara {
  translate: 0 -3px;
}

.gotas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.gota {
  position: absolute;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb3be, var(--rojo) 55%, #7d0517);
  box-shadow: 0 0 0.5em rgb(255 23 56 / 80%);
  animation: gota 900ms cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}

@keyframes gota {
  0% {
    transform: translate(0, 0) scale(0.6);
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.3);
    opacity: 0;
  }
}

/* ─── El aviso «muy pronto» ─── */

.pronto {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 28px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid var(--rojo);
  background: #0b0b0c;
  font-weight: 600;
  box-shadow: 0 18px 50px rgb(0 0 0 / 70%);
  transform: translateX(-50%);
}

@keyframes bajar {
  50% {
    translate: 0 5px;
  }
}

/* ═══════════════ MÓVIL Y TABLET (< 1100 px) ═══════════════ */

@media (max-width: 1099px) {
  .cab {
    grid-template-columns: auto 1fr;
    padding: 0 16px;
  }

  .cab-nav {
    display: none;
  }

  .cab-cta {
    padding: 0 14px;
    font-size: 14px;
  }

  .feed,
  .radar {
    padding: 96px 20px 48px;
  }

  .escena {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 34px;
    max-width: 640px;
    margin: 0 auto;
  }

  .fondo-env {
    opacity: 0.9;
  }

  /* El entorno vertical es muy brillante en el centro: un velo para que el texto se lea. */
  .fondo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(5 5 5 / 78%) 0%, rgb(5 5 5 / 62%) 45%, rgb(5 5 5 / 30%) 70%, rgb(5 5 5 / 55%) 100%);
  }

  .telemetria,
  .liquido,
  .bloom,
  .profundidad,
  .riel,
  .navegador-carcasa,
  .navegador-ext,
  .navegador-lateral,
  .suelo,
  .llamadas {
    display: none;
  }

  .cejilla {
    font-size: 12px;
  }

  .titulo {
    margin-top: 10px;
    font-size: clamp(56px, 17vw, 96px);
  }

  .lema {
    margin-top: 16px;
    font-size: clamp(12px, 3.4vw, 18px);
    letter-spacing: 0.14em;
    white-space: normal;
  }

  .cuerpo {
    margin-top: 16px;
    font-size: 16px;
  }

  .cta--grande {
    min-height: 54px;
    margin-top: 24px;
    padding: 0 26px;
    font-size: 17px;
  }

  .ventajas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .ventajas li {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .ventajas .ico {
    font-size: 30px;
    margin-bottom: 6px;
  }

  .ventajas b {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .ventajas span {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gris);
  }

  .navegador {
    font-size: clamp(10px, 2.6vw, 13px);
  }

  .watch {
    padding: 80px 20px 64px;
    gap: 22px;
  }

  .video {
    width: 100%;
  }

  .radar-copia {
    order: 1;
  }

  .chorro {
    order: 2;
    position: relative;
    height: 340px;
  }

  .salpicadura,
  .salpicadura-brillo {
    position: absolute;
    left: -10%;
    width: 120%;
    top: 26%;
  }

  .onda {
    position: absolute;
    left: 25%;
    width: 50%;
    top: 40%;
    height: 9%;
  }

  .tarjetas {
    position: absolute;
    container-type: inline-size;
    inset: 0 8%;
  }

  .lateral {
    order: 3;
    position: relative;
    width: min(100%, 420px);
    margin: 0 auto;
    aspect-ratio: 860 / 1487;
    font-size: clamp(10px, 2.9vw, 13.5px);
  }

  .lateral-carcasa {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .lateral-ui {
    position: absolute;
    left: 11.7%;
    top: 12.4%;
    width: 76.5%;
    height: 81%;
    display: flex;
    flex-direction: column;
  }

  .cierre {
    order: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
  }

  .cierre-titulo {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(24px, 6.4vw, 40px);
    text-transform: uppercase;
  }

  .cierre-fila {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .cierre-cta {
    min-width: 220px;
  }

  .cierre-sep {
    display: none;
  }

  .cierre-ext {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .riesgo {
    font-size: 13px;
    color: var(--gris-2);
  }

  .pie-marca {
    order: 5;
    align-self: center;
    width: 200px;
  }

  .pie-marca img {
    width: 100%;
    height: auto;
  }

  .pie-nav {
    order: 6;
    display: flex;
    justify-content: center;
    gap: 22px;
  }

  .pie-nav a {
    font-size: 12px;
  }

  .llamada {
    display: none;
  }
}

/* ─── Pestaña oculta: nada decorativo se mueve ─── */

[data-oculta] .fondo *,
[data-oculta] .caudal *,
[data-oculta] .puntos-caen *,
[data-oculta] .navegador,
[data-oculta] .tarjeta-flota,
[data-oculta] .salpicadura,
[data-oculta] .salpicadura-brillo,
[data-oculta] .onda {
  animation-play-state: paused !important;
}

/* ─── Reducir movimiento: entornos quietos, sin paralaje, transiciones de 160 ms ─── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }

  
  .tarjeta,
  .llamada,
  .video {
    transition-duration: 160ms !important;
    transition-property: opacity !important;
  }

  .tele--b,
  .prof--b {
    display: none;
  }

  .tele--a {
    opacity: 0.72;
  }

  .prof--a {
    opacity: 0.28;
  }
}

/* ═══════════════ El bot de verdad dentro de la web ═══════════════ */

/*
 * El panel es el de la extensión tal cual (bot/panel.css + bot/control.css, traídos de LARPX):
 * mide 420×680 como el emergente y cada marco lo escala entero a su sitio (--k lo pone main.js).
 */
.bot-marco {
  position: relative;
}

.bot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 420px;
  height: 680px;
  overflow: hidden;
  transform: translateX(-50%) scale(var(--k, 1));
  transform-origin: 50% 0;
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
}

.bot .sd-panel {
  height: 100%;
}

/* En la web se tocan el control, «Reset PnL», la píldora, las pestañas y los ajustes; lo que en la
   extensión abre la terminal (filas, chips, la línea de sucesos, el saldo) aquí no lleva a ningún sitio. */
/* Las vistas, los apartados y la hoja de CUSTOM se cambian con [hidden]; panel.css les pone display. */
.bot [hidden] {
  display: none !important;
}

.bot .sd-feed button,
.bot .sd-chip,
.bot .sd-ticker button,
.bot .sd-cerrada,
.bot .sd-sucesos button,
.bot .sd-cuenta button,
.bot .sd-filtros button {
  pointer-events: none;
}

.bot-marco--popup .bot {
  border-radius: 10px;
  border: 1px solid #2a2a2f;
  box-shadow:
    0 24px 60px rgb(0 0 0 / 65%),
    0 0 40px rgb(255 23 56 / 16%);
}

.bot-marco--lateral {
  position: absolute;
  inset: 0;
}

.bot-marco--lateral .bot {
  border-radius: 8px;
}

/* La página del New que el bot escanea (detrás del emergente). */
.pagina {
  display: none;
}

@media (min-width: 1100px) {
  /* El emergente, grande, colgando del icono de la extensión (como en la maqueta del owner, 16/10). */
  .bot-marco--popup {
    position: absolute;
    z-index: 2;
    left: 61.6%;
    top: 18.6%;
    width: 36.6%;
    height: 85%;
  }

  /* La pestaña: el kit traía «New Tab» pintado; se borró de la carcasa y va aquí, con su inclinación. */
  .navegador-pestana {
    position: absolute;
    left: 17.1%;
    top: 12.1%;
    font-size: calc(15 * var(--u));
    font-weight: 500;
    color: #ececf0;
    white-space: nowrap;
    transform: translateY(-50%) rotate(-2.3deg);
    transform-origin: 0 50%;
  }

  /*
   * El tiro (handoff coin-ingestion v1): capas PNG del kit + DOM, colocadas por main.js en px del
   * navegador. Mezcla normal: el líquido y el vórtice conservan su cuerpo negro-cromo (con «screen»
   * desaparecía, y el plan pide verlo).
   */
  .haz {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    transition: opacity 500ms ease;
  }

  .haz[data-sale] {
    opacity: 0;
  }

  .haz > * {
    position: absolute;
    left: 0;
    top: 0;
  }

  .haz img {
    display: block;
    max-width: none;
  }

  .haz-tray {
    transform-origin: 0 0;
  }

  .haz-flujo {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 14%, rgb(255 130 150 / 85%) 30%, transparent 70%);
  }

  .haz-nodo {
    width: 0;
    height: 0;
  }

  .haz-nodo i {
    position: absolute;
    left: -11px;
    top: -11px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--rojo);
    opacity: 0;
  }

  .haz-nodo[data-vivo] i {
    animation: haz-pulso 520ms ease-out both;
  }

  .haz-nodo[data-n="1"][data-vivo] i {
    border-color: #ffd0d6;
  }

  .haz-nodo[data-n="2"][data-vivo] i {
    border-color: #fff;
    box-shadow: 0 0 14px var(--rojo);
    animation-duration: 720ms;
  }

  @keyframes haz-pulso {
    0% {
      opacity: 1;
      transform: scale(0.5);
    }
    100% {
      opacity: 0;
      transform: scale(2.6);
    }
  }

  .haz-nodo b {
    position: absolute;
    left: 0;
    bottom: 32px;
    font-family: var(--display);
    font-size: calc(12.5 * var(--u));
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;
    color: #fff;
    text-shadow:
      0 0 6px rgb(0 0 0 / 95%),
      0 0 14px rgb(255 23 56 / 55%);
    opacity: 0;
    transform: translate(-50%, 6px);
    transition:
      opacity 200ms ease,
      transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .haz-nodo[data-vivo] b {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  /* El vórtice vive dentro del círculo del escáner (recortado por él). */
  .haz-portal {
    border-radius: 50%;
    overflow: hidden;
    opacity: 0;
  }

  .haz-vortice {
    position: absolute;
    transform-origin: 58.6% 50%;
  }

  .haz-coin {
    will-change: transform, opacity;
  }

  .haz-coin-gira {
    position: absolute;
    inset: 0;
  }

  .haz-coin-logo {
    position: absolute;
    left: 24.5%;
    top: 24.5%;
    width: 51%;
    height: 51%;
    border-radius: 50%;
    object-fit: cover;
    background: #0b0b0c;
  }

  /* El vidrio de la coin del kit (el logo es el de cada coin): brillo arriba y borde escarchado. */
  .haz-coin-vidrio {
    position: absolute;
    inset: 24.5%;
    border-radius: 50%;
    background:
      radial-gradient(circle at 32% 26%, rgb(255 255 255 / 60%), transparent 34%),
      radial-gradient(circle, transparent 58%, rgb(214 230 255 / 45%) 100%);
  }

  .haz-coin-aro {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .haz-impacto {
    opacity: 0;
    transform-origin: 67.6% 53.6%;
  }

  .pagina {
    position: absolute;
    left: 19.8%;
    top: 21.5%;
    width: 31.4%;
    height: 63%;
    display: flex;
    flex-direction: column;
    font-size: calc(14 * var(--u));
    color: #d4d4d8;
  }

  .pagina-cab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5em 0.75em;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
  }

  .pagina-cab b {
    font-size: 1.2em;
    font-weight: 700;
    color: #fff;
  }

  .pagina-cab span {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-size: 0.9em;
    color: #2ee59d;
  }

  .pagina-cab i {
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: #2ee59d;
    box-shadow: 0 0 0.6em #2ee59d;
  }

  .pagina-filas {
    position: relative;
    flex: 1;
    overflow: hidden;
  }

  .pagina-filas li {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(100% / 5);
    display: grid;
    grid-template-columns: 2.6em minmax(0, 1fr) 2.6em 5em;
    align-items: center;
    gap: 0.7em;
    padding: 0 0.5em;
    border-bottom: 1px solid rgb(255 255 255 / 6%);
    transition:
      transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 320ms ease,
      background-color 320ms ease;
  }

  .pagina-filas li.entra {
    animation: pf-entra 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  @keyframes pf-entra {
    from {
      opacity: 0;
      background-color: rgb(255 23 56 / 18%);
    }
  }

  .pagina-filas img {
    width: 2.3em;
    height: 2.3em;
    border-radius: 50%;
    object-fit: cover;
  }

  .pf-nombre {
    min-width: 0;
  }

  .pf-nombre b {
    display: block;
    font-weight: 700;
    color: #fff;
  }

  .pf-nombre i {
    display: block;
    overflow: hidden;
    font-style: normal;
    font-size: 0.85em;
    color: #8b8b93;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .pf-edad {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #9a9aa1;
  }

  .pf-mc b {
    display: block;
    text-align: right;
    font-weight: 600;
    color: #fff;
  }

  .pf-mc i {
    position: relative;
    display: block;
    height: 0.32em;
    margin-top: 0.4em;
    border-radius: 9px;
    background: rgb(255 255 255 / 10%);
    overflow: hidden;
  }

  .pf-mc i::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--p);
    background: linear-gradient(90deg, #7a0d1c, #ff1738);
  }

  /* La coin en la que el bot acaba de entrar: marcada en la página. */
  .pf-caza {
    position: absolute;
    left: 3.2em;
    top: 0.25em;
    padding: 0.1em 0.5em;
    border-radius: 999px;
    background: #ff1738;
    font-size: 0.66em;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
    transition:
      opacity 260ms ease,
      transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .pagina-filas li[data-cazada] {
    background: rgb(255 23 56 / 9%);
    box-shadow: inset 2px 0 0 #ff1738;
  }

  .pagina-filas li[data-cazada] .pf-caza {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1099px) {
  .bot-marco--popup {
    width: min(100%, 380px);
    aspect-ratio: 420 / 680;
    margin: 0 auto;
  }
}

/* ═══════════════ La cifra de la casa: 97 %+ ═══════════════ */

.riel-dato b {
  display: block;
  font-family: var(--display);
  font-size: 3.1em;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--verde);
  text-shadow: 0 0 0.5em rgb(25 255 148 / 45%);
}

.riel-dato span {
  display: block;
}

.riel-dato .riel-pie {
  margin-top: 0.3em;
  font-size: 0.8em;
  color: var(--gris);
}

.riel-dato sup,
.dato-movil sup {
  font-size: 0.7em;
}

.dato-movil {
  display: none;
}

@media (max-width: 1099px) {
  .dato-movil {
    display: block;
    margin-top: 18px;
    font-size: 15px;
    color: var(--gris);
  }

  .dato-movil b {
    margin-right: 4px;
    font-family: var(--display);
    font-size: 30px;
    color: var(--verde);
    text-shadow: 0 0 14px rgb(25 255 148 / 45%);
    vertical-align: -3px;
  }
}

/* ═══════════════ «View Plans»: el pop-up de los planes ═══════════════ */

[data-planes-abiertos] {
  overflow: hidden;
}

.planes {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.planes[hidden] {
  display: none;
}

.planes-velo {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: planes-velo 220ms ease both;
}

@keyframes planes-velo {
  from {
    opacity: 0;
  }
}

.planes-caja {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  padding: 40px 40px 28px;
  border-radius: 22px;
  border: 1px solid rgb(255 23 56 / 45%);
  background:
    radial-gradient(70% 50% at 50% 0%, rgb(255 23 56 / 16%), transparent 70%),
    linear-gradient(180deg, #0f0f11, #08080a);
  box-shadow:
    0 0 60px rgb(255 23 56 / 18%),
    0 30px 80px rgb(0 0 0 / 70%);
  text-align: center;
  animation: planes-caja 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes planes-caja {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

.planes-cerrar {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 4%);
  cursor: pointer;
}

.planes-cerrar::before,
.planes-cerrar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}

.planes-cerrar::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.planes-cerrar:hover {
  border-color: var(--rojo);
}

.planes-titulo {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.planes-sub {
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 16px;
  color: var(--gris);
}

.planes-periodo {
  display: inline-flex;
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--linea);
  background: rgb(255 255 255 / 3%);
}

.planes-periodo button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--gris);
  cursor: pointer;
}

.planes-periodo button i {
  margin-left: 6px;
  font-style: normal;
  font-size: 12px;
  color: var(--verde);
}

.planes-periodo button[aria-pressed="true"] {
  background: var(--rojo);
  color: #fff;
}

.planes-periodo button[aria-pressed="true"] i {
  color: #fff;
}

.planes-lista {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
  text-align: left;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  border-radius: 18px;
  border: 1px solid var(--linea);
  background: rgb(255 255 255 / 3%);
}

.plan--destacado {
  border-color: var(--rojo);
  background:
    radial-gradient(90% 60% at 50% 0%, rgb(255 23 56 / 18%), transparent 75%),
    rgb(255 255 255 / 3%);
  box-shadow: 0 0 40px rgb(255 23 56 / 22%);
}

.plan-marca {
  position: absolute;
  top: -12px;
  left: 50%;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--rojo);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.plan h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-lema {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--gris);
}

.plan-precio {
  margin: 18px 0 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-precio b {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 400;
}

.plan-precio span {
  font-size: 14px;
  color: var(--gris);
}

.plan ul {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 22px;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
}

.plan li {
  position: relative;
  padding-left: 24px;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.32em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--rojo);
  border-bottom: 2px solid var(--rojo);
  transform: rotate(-45deg);
}

.plan-cta {
  width: 100%;
}

.planes-nota {
  margin: 22px 0 0;
  font-size: 12.5px;
  color: var(--gris-2);
}

@media (max-width: 860px) {
  .planes-caja {
    padding: 32px 18px 22px;
  }

  .planes-lista {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ═══════════════ La fila que el escáner mira, y el «LIVE DEMO» ═══════════════ */

@media (min-width: 1100px) {
  .pagina-cab .pagina-demo {
    gap: 0.55em;
    padding: 0.35em 0.9em;
    border-radius: 999px;
    border: 1px solid rgb(255 23 56 / 55%);
    background: rgb(255 23 56 / 10%);
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
  }

  .pagina-cab .pagina-demo i {
    background: var(--rojo);
    box-shadow: 0 0 0.6em var(--rojo);
    animation: demo-punto 1.4s ease-in-out infinite;
  }

  @keyframes demo-punto {
    50% {
      opacity: 0.35;
    }
  }

  .pagina-filas img {
    width: 2.6em;
    height: 2.6em;
  }

  /* Mientras el escáner la mira, «Scanning · Score NN» ocupa el sitio del nombre. */
  .pf-escaneo {
    display: none;
    white-space: nowrap;
    font-style: normal;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--rojo);
  }

  .pagina-filas li[data-fase="escaneando"] {
    z-index: 2;
    border-radius: 0.7em;
    background: rgb(255 23 56 / 14%);
    box-shadow:
      inset 0 0 0 1.5px var(--rojo),
      0 0 1.6em rgb(255 23 56 / 45%);
  }

  .pagina-filas li[data-fase="escaneando"] .pf-escaneo {
    display: block;
  }

  .pagina-filas li[data-fase="escaneando"] .pf-nombre i {
    display: none;
  }

  .pagina-filas li[data-fase="escaneando"] .pf-caza {
    opacity: 0;
  }
}

/* ═══════════════ Primera pantalla como la maqueta del 16/10 ═══════════════ */

/*
 * El emergente del hero, en Inicio, mide lo que su contenido (como un emergente de Chrome de
 * verdad): control, línea, chips, cifras y menú, sin hueco. Lo marca main.js (`data-ajustado`).
 */
.bot[data-ajustado] {
  height: auto;
}

.bot[data-ajustado] .sd-panel {
  height: auto;
}

.bot[data-ajustado] .sd-cuerpo {
  flex: none;
  overflow: visible;
}

@media (min-width: 1100px) {
  /* El navegador sube y tapa el riel: la cifra de la casa va junto a «View Plans». */
  .riel {
    display: none;
  }

  .dato-movil {
    display: inline-flex;
    flex-direction: column;
    max-width: calc(210 * var(--u));
    margin: 0 0 0 calc(34 * var(--u));
    vertical-align: bottom;
    font-size: calc(12.5 * var(--u));
    line-height: 1.3;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gris);
  }

  .dato-movil b {
    font-family: var(--display);
    font-size: calc(42 * var(--u));
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--verde);
    text-shadow: 0 0 0.45em rgb(25 255 148 / 45%);
  }

  .dato-movil span {
    white-space: nowrap;
  }
}


/* ─── Canjear un código de activación (pop-up de planes) ─── */

.canje {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--linea);
}

.canje-abrir {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gris);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.canje-abrir b {
  color: var(--blanco);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.canje-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.canje-form input {
  flex: 1 1 240px;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 16%);
  background: #0b0b0c;
  color: var(--blanco);
  font: 600 15px/1 ui-monospace, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.canje-form input:focus {
  outline: none;
  border-color: var(--rojo);
}

.canje-error {
  flex-basis: 100%;
  margin: 0;
  min-height: 1em;
  font-size: 13px;
  color: #ff6b7d;
}

.canje-pasos h3 {
  margin: 6px 0 14px;
  font: 22px/1.15 var(--display);
}

.canje-pasos ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.canje-pasos li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding-left: 38px;
  position: relative;
  color: #e4e4e7;
  font-size: 14.5px;
  counter-increment: paso;
}

.canje-pasos li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--rojo);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--blanco);
}

.canje-pasos li > span {
  flex: 1 1 260px;
  min-width: 0;
}

.canje-pasos code {
  padding: 2px 7px;
  border-radius: 6px;
  background: #0b0b0c;
  border: 1px solid var(--linea);
  font: 13px ui-monospace, Menlo, monospace;
  word-break: break-all;
}

.canje-copiar {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 18%);
  background: none;
  color: var(--blanco);
  font: 600 11.5px/1 var(--texto);
  cursor: pointer;
}

.canje-copiar[data-copiado] {
  border-color: var(--verde);
  color: var(--verde);
}

.canje [hidden] {
  display: none !important;
}

.canje,
.canje-pasos {
  text-align: left;
}

.canje-pasos {
  margin-top: 6px;
}


/* ═══════════════ Un solo plan (16/10): Daily · Weekly · Monthly, sin scroll en ninguna pantalla ═══════════════ */

/* «View Plans»: rojo fuerte con neón que late, para que llame. */
.cta[data-planes],
.cta--neon {
  background: var(--rojo);
  border-color: #ff5a72;
  color: #fff;
  text-shadow: 0 0 8px rgb(255 255 255 / 55%);
  box-shadow:
    0 0 0 1px rgb(255 23 56 / 60%),
    0 0 14px rgb(255 23 56 / 95%),
    0 0 34px rgb(255 23 56 / 70%),
    0 0 70px rgb(255 23 56 / 40%),
    inset 0 0 12px rgb(255 255 255 / 22%);
  animation: neon-late 2.4s ease-in-out infinite;
}

.cta[data-planes]:hover,
.cta--neon:hover {
  background: #ff2a4a;
  border-color: #ff8095;
  box-shadow:
    0 0 0 1px rgb(255 23 56 / 80%),
    0 0 18px rgb(255 23 56),
    0 0 46px rgb(255 23 56 / 85%),
    0 0 90px rgb(255 23 56 / 55%),
    inset 0 0 14px rgb(255 255 255 / 30%);
}

@keyframes neon-late {
  50% {
    box-shadow:
      0 0 0 1px rgb(255 23 56 / 70%),
      0 0 20px rgb(255 23 56),
      0 0 48px rgb(255 23 56 / 85%),
      0 0 96px rgb(255 23 56 / 50%),
      inset 0 0 14px rgb(255 255 255 / 28%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta[data-planes],
  .cta--neon {
    animation: none;
  }
}

/* La caja: nunca scroll. Lo que hay se ajusta al alto de la pantalla. */
.planes {
  padding: 12px;
}

.planes-caja {
  width: min(760px, 100%);
  max-height: calc(100svh - 24px);
  overflow: hidden;
  padding: clamp(22px, 4.2svh, 40px) clamp(18px, 4vw, 44px) clamp(16px, 3svh, 28px);
}

.planes-titulo {
  margin-top: 6px;
  font-size: clamp(26px, min(5.2svh, 4.4vw), 48px);
}

.planes-cuerpo[hidden] {
  display: none;
}

.planes-sub {
  margin-top: clamp(6px, 1.4svh, 14px);
  font-size: clamp(13px, 1.9svh, 16px);
}

.periodos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 14px);
  margin-top: clamp(12px, 2.6svh, 26px);
}

.periodos button {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: clamp(10px, 2svh, 20px) 6px;
  border-radius: 16px;
  border: 1px solid var(--linea);
  background: rgb(255 255 255 / 3%);
  color: #fff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.periodos button:hover {
  border-color: rgb(255 23 56 / 55%);
  transform: translateY(-2px);
}

.periodos button[aria-checked="true"] {
  border-color: var(--rojo);
  background:
    radial-gradient(90% 70% at 50% 0%, rgb(255 23 56 / 26%), transparent 75%),
    rgb(255 255 255 / 4%);
  box-shadow:
    0 0 0 1px var(--rojo),
    0 0 26px rgb(255 23 56 / 45%);
}

.periodo-nombre {
  font-size: clamp(11px, 1.6svh, 13px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gris);
}

.periodos button[aria-checked="true"] .periodo-nombre {
  color: #fff;
}

.periodos b {
  font-family: var(--display);
  font-size: clamp(24px, min(5svh, 5.6vw), 44px);
  font-weight: 400;
  line-height: 1.1;
}

.periodo-por {
  font-size: clamp(11px, 1.5svh, 13px);
  color: var(--gris);
}

.incluye {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(6px, 1.3svh, 12px) 22px;
  margin: clamp(14px, 2.8svh, 26px) 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: clamp(12.5px, 1.8svh, 14.5px);
}

.incluye li {
  position: relative;
  padding-left: 22px;
}

.incluye li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.32em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--rojo);
  border-bottom: 2px solid var(--rojo);
  transform: rotate(-45deg);
}

.planes-cta {
  width: min(420px, 100%);
  margin-top: clamp(14px, 2.8svh, 26px);
  min-height: clamp(42px, 6svh, 54px);
  font-size: clamp(14px, 2svh, 17px);
}

.planes-caja .planes-nota {
  margin-top: clamp(8px, 1.6svh, 16px);
  font-size: clamp(11px, 1.5svh, 12.5px);
}

.planes-caja .canje {
  margin-top: clamp(10px, 2svh, 18px);
  padding-top: clamp(8px, 1.6svh, 14px);
}

/* Los pasos de instalación, también sin scroll (ocupan el sitio del plan). */
.planes-caja .canje-pasos h3 {
  font-size: clamp(18px, 3svh, 22px);
  margin: 4px 0 clamp(8px, 1.6svh, 14px);
}

.planes-caja .canje-pasos ol {
  gap: clamp(6px, 1.3svh, 12px);
}

.planes-caja .canje-pasos li {
  font-size: clamp(12.5px, 1.8svh, 14.5px);
}

@media (max-width: 640px) {
  .incluye {
    grid-template-columns: 1fr;
  }

  .periodos button {
    border-radius: 12px;
  }
}

/* Pantallas bajas: lo accesorio se va antes que el scroll. */
@media (max-height: 760px) and (max-width: 640px) {
  .incluye li:nth-child(n + 5) {
    display: none;
  }
}

@media (max-height: 640px) {
  .planes-sub {
    display: none;
  }

  .incluye li:nth-child(n + 5) {
    display: none;
  }
}

/* Móvil: al abrir el canje, lo incluido deja sitio al campo del código. */
@media (max-width: 640px) {
  .planes-caja[data-canjeando] .incluye,
  .planes-caja[data-canjeando] .planes-sub {
    display: none;
  }
}


/* ═══════════════ LA PANTALLA EN PERSPECTIVA (16/10): todo lo de dentro, pegado al cristal de la carcasa ═══════════════ */

.pantalla {
  display: contents;
}

@media (min-width: 1100px) {
  .pantalla {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    transform-origin: 0 0;
    /* ancho, alto y matrix3d: main.js (encajarPantalla) */
  }

  /* El fondo oscuro de la pantalla, con el contorno EXACTO del hueco de la carcasa. */
  .navegador::before {
    clip-path: polygon(7.75% 23.73%, 92.25% 19.43%, 92.38% 91.41%, 7.29% 82.32%);
  }

  /* Dentro del plano, en % de la pantalla (como una ventana de Chrome de verdad). */
  .pantalla .navegador-lateral {
    left: 1.6%;
    top: 13%;
    width: 13%;
  }

  .pantalla .pagina {
    left: 16.5%;
    top: 3.5%;
    width: 41%;
    height: 93%;
  }

  /* El emergente cuelga del icono de la extensión, DENTRO de la ventana, pegado arriba a la derecha. */
  .pantalla .bot-marco--popup {
    left: auto;
    right: 0.6%;
    top: 0;
    /* el ancho del propio emergente (420×680 a la escala del alto): el bot queda centrado y el tiro lo encuentra */
    width: 32%;
    height: 100%;
  }
}

/* «View Plans»: el neón, ahora con un trazo negro degradado por encima (negro + rojo fuerte, como el fondo). */
.cta[data-planes],
.cta--neon {
  border: 2.5px solid transparent;
  background:
    linear-gradient(#ff1738, #e40f2d) padding-box,
    linear-gradient(135deg, #000 0%, #2a0008 30%, #ff1738 50%, #2a0008 70%, #000 100%) border-box;
  background-size: 100% 100%, 220% 220%;
  animation:
    neon-late 2.4s ease-in-out infinite,
    neon-trazo 4s linear infinite;
}

.cta[data-planes]:hover,
.cta--neon:hover {
  background:
    linear-gradient(#ff2a4a, #f01535) padding-box,
    linear-gradient(135deg, #000 0%, #3a000c 30%, #ff4d68 50%, #3a000c 70%, #000 100%) border-box;
  background-size: 100% 100%, 220% 220%;
}

@keyframes neon-trazo {
  from {
    background-position: 0 0, 0% 50%;
  }

  to {
    background-position: 0 0, 220% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta[data-planes],
  .cta--neon {
    animation: none;
  }
}


/* ═══════════════ El bot del banner: MISMO ALTO EN TODAS sus pantallas (Inicio, Feed, History, Settings) ═══════════════ */
@media (min-width: 1100px) {
  /* Un poco por dentro del borde de la ventana, como un emergente de Chrome de verdad. */
  .pantalla .bot-marco--popup {
    top: 1%;
    height: 94%;
  }

  /* En Inicio ya no se encoge a su contenido (era el salto al cambiar de pantalla). */
  .pantalla .bot[data-ajustado] {
    height: 680px;
  }

  .pantalla .bot[data-ajustado] .sd-panel {
    height: 100%;
  }

  .pantalla .bot[data-ajustado] .sd-cuerpo {
    flex: 1;
    overflow: hidden;
  }
}


/* ═══════════════ LA PRIMERA PANTALLA ENTERA: no se ve hasta que está todo (main.js), y entra con un fundido ═══════════════ */
#feed .fondo,
#feed .escena {
  transition: opacity 450ms ease;
}

html.sd-cargando #feed .fondo,
html.sd-cargando #feed .escena {
  opacity: 0;
}

.planes-caja[data-checkout] .planes-cuerpo,
.planes-caja[data-checkout] .canje,
.planes-caja[data-checkout] > .cejilla,
.planes-caja[data-checkout] > .planes-titulo {
  display: none;
}

.pago {
  width: min(620px, 100%);
  margin: 0 auto;
  text-align: left;
}

.pago[hidden] {
  display: none;
}

.pago-volver {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: none;
  font: 700 12px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gris);
  cursor: pointer;
}

.pago-volver:hover {
  color: #fff;
}

.solana-pago {
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  padding: 7px 12px;
  border: 1px solid rgb(153 69 255 / 40%);
  border-radius: 999px;
  background: rgb(153 69 255 / 9%);
}

.solana-pago img {
  width: 21px;
  height: 21px;
}

.solana-pago span {
  color: var(--gris);
}

.solana-pago b {
  color: #19fb9b;
}

.pago h2 {
  margin: 18px 0 4px;
  font-family: var(--display);
  font-size: clamp(31px, 5vw, 47px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.pago-intro {
  margin: 8px 0 20px;
  color: var(--gris);
}

.pago-resumen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pago-resumen > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--linea);
  border-radius: 14px;
  background: rgb(255 255 255 / 3%);
}

.pago-resumen span,
.pago-cantidad > span {
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gris);
}

.sol-verde {
  color: #19fb9b;
}

.pago-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.pago-form .planes-cta {
  margin-inline: auto;
  justify-self: center;
}

.pago-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.pago-form input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: #09090b;
  color: #fff;
  font: 500 15px Inter, system-ui, sans-serif;
  outline: none;
}

.pago-form input:focus {
  border-color: #19fb9b;
  box-shadow: 0 0 0 3px rgb(25 251 155 / 12%);
}

.pago-wallets {
  display: grid;
  gap: 9px;
}

.pago-wallets > span {
  font-size: 12px;
  color: var(--gris);
}

.pago-wallets > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pago-wallets i {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: rgb(255 255 255 / 3%);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.pago-wallets img {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 0;
  object-fit: contain;
}

.pago-error {
  min-height: 1.2em;
  margin: -8px 0 0;
  color: #ff6b7d;
  text-align: center;
}

.pago-cantidad {
  display: grid;
  gap: 4px;
  padding: 17px;
  border: 1px solid rgb(25 251 155 / 35%);
  border-radius: 15px;
  background: rgb(25 251 155 / 6%);
  text-align: center;
}

.pago-cantidad strong {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 400;
  color: #19fb9b;
}

.pago-cantidad small {
  color: var(--gris);
}

.pago-qr {
  position: relative;
  width: 236px;
  height: 236px;
  margin: 18px auto 10px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 36px rgb(25 251 155 / 15%);
}

.pago-qr > div,
.pago-qr svg {
  width: 100%;
  height: 100%;
}

.pago-qr > img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  padding: 7px;
  border: 5px solid #fff;
  border-radius: 12px;
  background: #08080a;
  transform: translate(-50%, -50%);
}

.pago-scan {
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  color: var(--gris);
}

.pago-direccion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: #09090b;
}

.pago-direccion code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 12px ui-monospace, Menlo, monospace;
  color: var(--gris);
}

.pago-direccion button,
.pago-acciones button,
.pago-acciones a,
.pago-exito button {
  padding: 8px 12px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: rgb(255 255 255 / 4%);
  color: #fff;
  font: 700 11px Inter, system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.pago-acciones {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.pago-estado {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 18px 0 0;
  color: var(--gris);
}

.pago-estado i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f5c451;
  box-shadow: 0 0 12px #f5c451;
  animation: pago-pulso 1.2s ease-in-out infinite;
}

.pago-estado[data-pagado] {
  color: #19fb9b;
}

.pago-estado[data-pagado] i {
  background: #19fb9b;
  box-shadow: 0 0 12px #19fb9b;
  animation: none;
}

@keyframes pago-pulso {
  50% { opacity: 0.3; }
}

.pago-exito {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgb(25 251 155 / 40%);
  border-radius: 14px;
  background: rgb(25 251 155 / 7%);
  text-align: center;
}

.pago-exito[hidden] {
  display: none;
}

.pago-exito > span {
  color: #19fb9b;
  font-weight: 800;
}

.pago-exito code {
  font: 700 15px ui-monospace, Menlo, monospace;
}

@media (max-width: 620px) {
  .pago-resumen {
    grid-template-columns: 1fr;
  }

  .pago-qr {
    width: 210px;
    height: 210px;
  }

  .pago-cantidad strong {
    font-size: 31px;
  }

  .pago-form .planes-cta {
    width: min(360px, 100%);
  }

  .pago-exito small {
    color: var(--gris);
    font-size: 11px;
  }
}


/* ═══════════════ Watch it work: el botón «Next video» late y llama ═══════════════ */
.video-pieza {
  transition: opacity 220ms ease;
}

.video-pieza.video-cambia {
  opacity: 0;
}

.video-siguiente[hidden] {
  display: none;
}

.video-siguiente {
  position: absolute;
  right: clamp(10px, 1.4vw, 24px);
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  translate: 0 -50%;
}

.video-siguiente-texto {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgb(5 5 5 / 78%);
  border: 1px solid rgb(255 23 56 / 55%);
  font: 700 12px / 1 var(--texto);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  translate: 8px 0;
  transition: opacity 260ms ease, translate 260ms ease;
}

.video-siguiente-aro {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(48px, 3.6vw, 62px);
  height: clamp(48px, 3.6vw, 62px);
  border-radius: 50%;
  background: var(--rojo);
  border: 2px solid #ff5a72;
  box-shadow:
    0 0 14px rgb(255 23 56 / 90%),
    0 0 36px rgb(255 23 56 / 55%);
  transition: scale 180ms ease;
}

.video-siguiente-aro svg {
  width: 46%;
  height: 46%;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Las ondas que salen del botón, y la flecha que empuja hacia la derecha. */
.video-siguiente-aro::before,
.video-siguiente-aro::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--rojo);
  opacity: 0;
}

.video-siguiente.llama .video-siguiente-aro::before {
  animation: siguiente-onda 1.8s ease-out infinite;
}

.video-siguiente.llama .video-siguiente-aro::after {
  animation: siguiente-onda 1.8s ease-out 0.9s infinite;
}

.video-siguiente.llama .video-siguiente-aro svg {
  animation: siguiente-empuja 1.8s ease-in-out infinite;
}

.video-siguiente.llama:not(.visto) .video-siguiente-texto,
.video-siguiente:hover .video-siguiente-texto,
.video-siguiente:focus-visible .video-siguiente-texto {
  opacity: 1;
  translate: 0 0;
}

.video-siguiente.llama:not(.visto) .video-siguiente-texto {
  animation: siguiente-parpadea 1.8s ease-in-out infinite;
}

.video-siguiente:hover .video-siguiente-aro {
  scale: 1.08;
}

@keyframes siguiente-onda {
  0% {
    opacity: 0.85;
    scale: 1;
  }
  100% {
    opacity: 0;
    scale: 1.9;
  }
}

@keyframes siguiente-empuja {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 4px 0;
  }
}

@keyframes siguiente-parpadea {
  50% {
    border-color: rgb(255 23 56);
    box-shadow: 0 0 14px rgb(255 23 56 / 60%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-siguiente .video-siguiente-aro::before,
  .video-siguiente .video-siguiente-aro::after,
  .video-siguiente .video-siguiente-aro svg,
  .video-siguiente .video-siguiente-texto {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .video-siguiente-texto {
    display: none;
  }
}


/* ═══════════════ «Next video» FUERA DE LA CAJA del vídeo: a su derecha, centrado, con el texto debajo ═══════════════ */
.video-siguiente {
  left: calc(100% + clamp(18px, 2.2vw, 40px));
  right: auto;
  flex-direction: column;
  gap: 12px;
}

.video-siguiente-texto,
.video-siguiente.visto .video-siguiente-texto {
  opacity: 1;
  translate: 0 0;
}

/* Sin sitio a la derecha (pantallas estrechas): debajo de la caja, centrado, con el texto al lado. */
@media (max-width: 1099px) {
  .video {
    margin-bottom: 84px;
  }

  .video-siguiente {
    left: 50%;
    top: calc(100% + 16px);
    flex-direction: row-reverse;
    translate: -50% 0;
  }

  .video-siguiente-texto {
    display: block;
  }
}

/* ═══════════════ Acceso flotante al grupo de Telegram ═══════════════ */
.telegram-flotante {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  background: #229ed9;
  color: #fff;
  box-shadow: 0 10px 30px rgb(34 158 217 / 42%), 0 3px 12px rgb(0 0 0 / 38%);
  opacity: 0;
  scale: 0.72;
  translate: 0 14px;
  transition: opacity 220ms ease, scale 220ms ease, translate 220ms ease, background 160ms ease;
}

.telegram-flotante[hidden] {
  display: none;
}

.telegram-flotante[data-visible] {
  opacity: 1;
  scale: 1;
  translate: 0 0;
}

.telegram-flotante svg {
  width: 25px;
  height: 29px;
  fill: currentcolor;
  translate: -1px 0;
}

.telegram-flotante:hover {
  background: #168dcc;
  scale: 1.07;
}

.telegram-flotante:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .telegram-flotante {
    width: 50px;
    height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .telegram-flotante {
    transition: none;
  }
}
