/* =========================================
   NextVision · Tour NV TPRM – styles.css (v4.0 Auto-Start Timer)
   ========================================= */
:root {
  /* Paleta oficial NextVision · azul Pantone 2925 + verde 7488 */
  --nv-blue-refined: #3580ff;
  --nv-blue-soft:    #5BA1FF;
  --nv-green-refined: #5fff46;
  --nv-green-soft:    #8FF080;
  --nv-accent:       #4FBCC4;  /* teal intermedio del gradiente */
  /* Alias para no romper código existente */
  --ssc-violet-refined: var(--nv-accent);

  --bg-dark: #0A0F1A;
  --panel-bg: rgba(16, 23, 39, 0.9);
  --text-primary: #FFFFFF;
  --text-secondary: #a8b2d1;
  --border-color: rgba(53, 128, 255, 0.25);
  /* Gradient NV oficial: azul → teal → verde (sin violeta) */
  --aurora-gradient: linear-gradient(135deg, var(--nv-blue-refined) 0%, var(--nv-accent) 50%, var(--nv-green-refined) 100%);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Roboto', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  --transition-speed: 0.6s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font-body); background: var(--bg-dark); color: var(--text-primary); overflow: hidden; }

#plexus-background { position: fixed; inset: 0; z-index: 0; opacity: 0.6; }

.boot-sequence { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: var(--bg-dark); color: var(--nv-green-refined); font-family: var(--font-mono); transition: opacity 0.5s ease-out; }
.boot-sequence.hidden { opacity: 0; pointer-events: none; }
.boot-content { width: min(600px, 90vw); }
#boot-text::after { content: '▋'; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.boot-logo { text-align: center; opacity: 0; transition: opacity 0.5s; }
.boot-logo.visible { opacity: 1; }
.boot-logo img { max-width: 200px; margin-top: 20px; }
.boot-logos-container { display: flex; justify-content: center; align-items: center; gap: 24px; }
.boot-logos-container img { max-height: 40px; max-width: 150px; }

.tour-stage { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; padding: 16px 24px 84px; opacity: 0; transition: opacity 0.5s; position: relative; }
.tour-stage.visible { opacity: 1; }

.floating-panel { aspect-ratio: 16 / 9; width: min(97vw, calc((100vh - 110px) * 16 / 9)); height: auto; max-height: calc(100vh - 110px); background: var(--panel-bg); backdrop-filter: blur(12px); border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(10, 15, 26, 0.8); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: scale(0.95); animation: panelFadeIn 0.8s ease-out forwards; border: 1px solid transparent; background-clip: padding-box; position: relative; }
.floating-panel::before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; margin: -1px; border-radius: inherit; background: var(--aurora-gradient); }
@keyframes panelFadeIn { to { opacity: 1; transform: scale(1); } }
.panel-header { padding: 10px 16px; background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--border-color); text-align: center; font-size: 0.8rem; color: var(--text-secondary); position: relative; }
.panel-header .header-light { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; background: var(--nv-green-refined); border-radius: 50%; box-shadow: 0 0 8px var(--nv-green-refined); }

.image-container { flex-grow: 1; position: relative; overflow: hidden; transition: transform var(--transition-speed) ease-out; }
#panelImage { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: opacity 0.3s ease-in-out; }
/* Iframe interactivo (e.g. entregables carousel). Se renderiza a 1920x1080 nativo,
   se escala con CSS variable --frame-scale calculada por tour.js según ancho real. */
#panelFrame {
  position: absolute; top: 0; left: 0;
  width: 1920px; height: 1080px;
  border: 0;
  transform: scale(var(--frame-scale, 0.667));
  transform-origin: 0 0;
}

/* Auto-scroll vertical para imágenes muy altas (ej. la página Programa).
   La imagen llena el panel con object-fit:cover y va paseando object-position
   desde top → bottom durante la duración del step. */
.image-container[data-scroll="true"] #panelImage {
  animation: imgScroll var(--scroll-duration, 12s) ease-in-out forwards;
}
@keyframes imgScroll {
  0%, 8%    { object-position: center 0%; }     /* pausa breve arriba */
  92%, 100% { object-position: center 100%; }   /* pausa breve abajo */
}
/* v6: la captura tiene protagonismo total. El spotlight es solo un halo verde
   muy sutil + un dot pulsante chico en el centro del foco. Sin anillo elíptico
   (porque el padre no es cuadrado y se estiraba feo). */
/* Spotlight desactivado por completo: la guía Nex reemplaza el puntito/halo.
   Los slides son diseños autocontenidos; no hay foco puntual que destacar. */
.spotlight-overlay { position: absolute; inset: 0; background: transparent; pointer-events: none; }
.spotlight-overlay::after { display: none; }

.card-container { position: absolute; inset: 0; pointer-events: none; z-index: 20; }

/* ===== NEX · personaje guía de IA ===== */
.nex-card {
  position: absolute;
  pointer-events: none;                 /* solo el bubble captura clicks */
  opacity: 0;
  transition: opacity .45s ease-out;
}
/* 6 posiciones intencionales */
.nex-card.pos-bl { left: 40px;  bottom: 38px; right: auto; top: auto; }
.nex-card.pos-br { right: 40px; bottom: 38px; left: auto;  top: auto; }
.nex-card.pos-bc { left: 50%;   bottom: 38px; right: auto; top: auto; transform: translateX(-50%); }
.nex-card.pos-tl { left: 40px;  top: 30px;    right: auto; bottom: auto; }
.nex-card.pos-tr { right: 40px; top: 30px;    left: auto;  bottom: auto; }
.nex-card.pos-tc { left: 50%;   top: 30px;    right: auto; bottom: auto; transform: translateX(-50%); }
/* media-izquierda / media-derecha: en el hueco vertical entre las tarjetas de arriba y abajo */
.nex-card.pos-ml { left: 28px;  top: 64%;     right: auto; bottom: auto; transform: translateY(-50%); }
.nex-card.pos-mr { right: 28px; top: 64%;     left: auto;  bottom: auto; transform: translateY(-50%); }
.nex-card.visible { opacity: 1; }
/* vertical: el avatar se alinea al lado de la posición; la cola (arriba) lo sigue */
.nex-card.pos-br .nex-inner, .nex-card.pos-tr .nex-inner { align-items: flex-end; }
.nex-card.pos-bc .nex-inner, .nex-card.pos-tc .nex-inner { align-items: center; }
.nex-card.pos-br .nex-bubble::after, .nex-card.pos-tr .nex-bubble::after { left: auto; right: 38px; }
.nex-card.pos-bc .nex-bubble::after, .nex-card.pos-tc .nex-bubble::after { left: 50%; margin-left: -8px; }

/* wrapper vertical: avatar ARRIBA, globo abajo (ocupa menos ancho, pisa menos texto) */
.nex-inner {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  transform: translateY(30px);
  transition: transform .55s cubic-bezier(.34,1.3,.5,1);
}
.nex-card.visible .nex-inner { animation: nexBob 4.5s ease-in-out infinite; transform: translateY(0); }
@keyframes nexBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---- Avatar personaje ---- */
.nex-avatar {
  position: relative; width: 100px; height: 100px; flex-shrink: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4f9bff 0%, #2563eb 45%, #16a34a 115%);
  box-shadow: 0 10px 26px rgba(37,99,235,.40), inset 0 -6px 14px rgba(0,0,0,.18), inset 0 4px 10px rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
}
.nex-orb { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(37,99,235,.45); animation: nexPulse 2.6s ease-out infinite; }
.nex-orb.o2 { animation-delay: 1.3s; border-color: rgba(22,163,74,.4); }
@keyframes nexPulse { 0% { transform: scale(.82); opacity: .85; } 100% { transform: scale(1.5); opacity: 0; } }
.nex-face { display: flex; gap: 12px; align-items: center; position: relative; z-index: 2; }
.nex-eye { width: 14px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 0 12px rgba(255,255,255,.7); animation: nexBlink 4s ease-in-out infinite; }
@keyframes nexBlink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
.nex-mouth { display: none; position: absolute; z-index: 2; }

/* ===== Moods de Nex (gesto + color por momento) ===== */
/* ALERTA (problema) — rojo, ojos redondos bien abiertos + temblor */
.nex-card.mood-alert .nex-avatar { background: radial-gradient(circle at 35% 30%, #ff9a9a 0%, #ef4444 48%, #b91c1c 120%);
  box-shadow: 0 10px 26px rgba(239,68,68,.5), inset 0 -6px 14px rgba(0,0,0,.2), inset 0 4px 10px rgba(255,255,255,.3);
  animation: nexShake .42s ease-in-out 4; }
.nex-card.mood-alert .nex-orb, .nex-card.mood-alert .nex-orb.o2 { border-color: rgba(239,68,68,.55); }
.nex-card.mood-alert .nex-eye { width: 15px; height: 15px; border-radius: 50%; }
@keyframes nexShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
/* FELIZ (valor / cierre) — verde, ojos redondos + gran sonrisa 😄 */
.nex-card.mood-happy .nex-avatar { background: radial-gradient(circle at 35% 30%, #7af0ad 0%, #16a34a 50%, #15803d 120%);
  box-shadow: 0 10px 26px rgba(22,163,74,.45), inset 0 -6px 14px rgba(0,0,0,.18), inset 0 4px 10px rgba(255,255,255,.35); }
.nex-card.mood-happy .nex-orb { border-color: rgba(22,163,74,.5); }
.nex-card.mood-happy .nex-orb.o2 { border-color: rgba(53,128,255,.45); }
.nex-card.mood-happy .nex-face { transform: translateY(-7px); gap: 13px; }
/* Ojos: misma forma (óvalo alto) que el Nex principal azul */
.nex-card.mood-happy .nex-eye { width: 14px; height: 20px; background: #fff; border: 0; border-radius: 50%; box-shadow: 0 0 10px rgba(255,255,255,.55); animation: nexBlink 4s ease-in-out infinite; }
.nex-card.mood-happy .nex-mouth { display: block; left: 50%; top: 62%; transform: translateX(-50%); width: 19px; height: 9px; border: 3px solid #fff; border-top: 0; border-radius: 0 0 20px 20px; box-shadow: 0 1px 4px rgba(255,255,255,.16); }

/* Modo compacto de Nex — para slides densos (ej. hub de pilares) donde la tarjeta grande tapa contenido */
.nex-card.nex-sm .nex-avatar { width: 72px; height: 72px; }
.nex-card.nex-sm .nex-bubble { width: clamp(300px, 21vw, 362px); padding: 15px 19px 13px; }
.nex-card.nex-sm .nex-text { font-size: 1.08rem; line-height: 1.4; }
.nex-card.nex-sm .nex-name { font-size: 1.15rem; }
.nex-card.nex-sm .nex-tagline { font-size: .88rem; }
.nex-card.nex-sm .nex-inner { gap: 8px; }
.nex-card.nex-sm .nex-eye { width: 11px; height: 16px; }

/* Caret de "escribiendo" mientras Nex habla */
.nex-text.typing::after { content: ''; display: inline-block; width: 2px; height: 1.05em; background: #2563eb; margin-left: 3px; vertical-align: -3px; animation: nexCaret .75s step-end infinite; }
@keyframes nexCaret { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* Saludo de Nex en el welcome */
.welcome-nex { display: flex; align-items: center; gap: 14px; text-align: left;
  background: linear-gradient(135deg, rgba(37,99,235,.07), rgba(22,163,74,.06));
  border: 1px solid rgba(37,99,235,.14); border-radius: 14px; padding: 14px 16px; margin: 4px 0 18px; }
.welcome-nex-av { position: relative; width: 68px; height: 68px; flex-shrink: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4f9bff 0%, #2563eb 45%, #16a34a 115%);
  box-shadow: 0 8px 20px rgba(37,99,235,.4), inset 0 -5px 12px rgba(0,0,0,.18), inset 0 3px 8px rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; animation: nexBob 4.5s ease-in-out infinite; }
.welcome-nex-av .end-nex-eyes { display: flex; gap: 10px; }
.welcome-nex-av .end-nex-eyes span { width: 10px; height: 15px; background: #fff; border-radius: 50%; box-shadow: 0 0 8px rgba(255,255,255,.7); animation: nexBlink 4s ease-in-out infinite; }
.welcome-nex-say { font-family: 'DM Sans', var(--font-body); font-size: 1.18rem; line-height: 1.5; color: #334155; }
.welcome-nex-say strong { color: #0f172a; font-weight: 700; }
.welcome-nex-say b { color: #2563eb; font-weight: 800; }
.end-nex-tag b { color: #5fff46; }

/* Form de identificación (Nex pide presentarse) */
.lead-form { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 20px; }
.lead-input { -webkit-appearance: none; appearance: none; width: 100%; font-family: 'DM Sans', var(--font-body); font-size: 1.15rem; color: #0f172a; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 15px 18px; transition: border-color .15s, box-shadow .15s; }
.lead-input::placeholder { color: #94a3b8; }
.lead-input:focus { outline: none; border-color: var(--nv-blue-refined); box-shadow: 0 0 0 3px rgba(53,128,255,.14); background: #fff; }
.lead-error { font-size: .82rem; color: #dc2626; font-weight: 600; min-height: 1em; text-align: left; }

/* Cierre: pregunta de demo + confirmación */
.end-demo-q { font-size: 1.3rem; color: var(--text-secondary); margin-bottom: 18px; }
.end-demo-q strong { color: #fff; font-weight: 700; }
.end-demo-done { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.end-demo-msg { font-family: 'DM Sans', var(--font-body); font-size: 1.15rem; line-height: 1.5; color: #fff; font-weight: 500; max-width: 460px; margin: 0 auto; padding: 16px 20px; background: linear-gradient(135deg, rgba(53,128,255,.16), rgba(95,255,70,.12)); border: 1px solid rgba(95,255,70,.3); border-radius: 14px; }
.end-demo-msg strong { color: #5fff46; font-weight: 800; }

/* ---- Globo de diálogo ---- */
.nex-bubble {
  position: relative; pointer-events: auto;
  width: clamp(440px, 31vw, 540px);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  border-radius: 20px; padding: 24px 28px 22px;
  box-shadow: 0 18px 50px rgba(8,15,28,0.28), 0 4px 14px rgba(8,15,28,0.14);
}
.nex-bubble::before {  /* borde gradient */
  content: ''; position: absolute; inset: 0; border-radius: 20px; padding: 1.5px;
  background: linear-gradient(135deg, rgba(53,128,255,.55), rgba(95,255,70,.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.nex-bubble::after {  /* cola apuntando ARRIBA hacia el avatar */
  content: ''; position: absolute; top: -7px; left: 38px;
  width: 16px; height: 16px; background: rgba(255,255,255,0.97);
  transform: rotate(45deg); border-radius: 3px;
  border-left: 1.5px solid rgba(53,128,255,.4); border-top: 1.5px solid rgba(95,255,70,.35);
}

.nex-name-row { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.nex-name { font-family: 'DM Sans', var(--font-body); font-size: 1.5rem; font-weight: 700; color: #0f172a; letter-spacing: -.01em; }
.nex-tagline { font-family: 'DM Sans', var(--font-body); font-size: 1.05rem; font-weight: 600; color: #64748b; }
.nex-tagline b { color: #2563eb; font-weight: 800; }
.nex-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #16a34a; }
.nex-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 7px #16a34a; animation: nexLive 1.6s ease-in-out infinite; }
@keyframes nexLive { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.nex-text { font-family: 'DM Sans', var(--font-body); font-size: 1.48rem; line-height: 1.5; color: #334155; font-weight: 500; letter-spacing: -.005em;
  opacity: 0; transform: translateY(6px); transition: all .4s ease-out .15s; }
.nex-card.text-visible .nex-text { opacity: 1; transform: translateY(0); }
.nex-text strong { color: #0f172a; font-weight: 700; }

.nex-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef2f7; }
.nex-progress { font-size: 0.95rem; font-weight: 600; color: #64748b; }
.card-continue-btn { -webkit-appearance: none; appearance: none; background: var(--nv-blue-refined); color: #FFFFFF; font-family: var(--font-body); font-weight: 700; font-size: 1.02rem; border: none; border-radius: 10px; padding: 12px 24px; cursor: pointer; transition: background-color 0.2s ease-in-out, transform 0.2s ease; }
.card-continue-btn:hover { background-color: var(--ssc-violet-refined); transform: scale(1.03); }

.welcome-overlay { position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(10, 23, 39, 0.7); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity 0.5s ease-in-out; }
.welcome-overlay.visible { opacity: 1; pointer-events: auto; }
.welcome-card { text-align: center; background: #fff; color: #1e293b; max-width: 600px; padding: 44px 48px; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.35); opacity: 0; transform: scale(0.95); transition: all 0.5s ease-out .2s; }
.welcome-overlay.visible .welcome-card { opacity: 1; transform: scale(1); }
.intro-logos { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 18px; }
.intro-logos img { max-height: 36px; }
.welcome-kicker { font-family: 'Plus Jakarta Sans', var(--font-heading); font-size: 11px; font-weight: 700; color: #2563eb; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; display: inline-block; padding: 6px 14px; background: rgba(37,99,235,.08); border-radius: 999px; }
.welcome-card h2 { font-family: 'Plus Jakarta Sans', var(--font-heading); font-size: 2rem; margin-bottom: 14px; color: #0f172a; line-height: 1.12; letter-spacing: -.015em; font-weight: 800; }
.welcome-card p { color: #475569; margin-bottom: 28px; font-size: 1.02rem; line-height: 1.55; font-family: 'Plus Jakarta Sans', var(--font-body); }
.welcome-card p strong { color: #0f172a; font-weight: 700; }
.countdown-timer { color: #64748b; font-size: 0.82rem; margin-bottom: 22px; font-style: normal; font-weight: 500; }
.countdown-timer span { font-weight: 800; color: #2563eb; font-variant-numeric: tabular-nums; }

.journey-bar { position: fixed; bottom: 80px; left: 0; right: 0; display: flex; justify-content: center; padding: 0 24px; gap: 1%; z-index: 10; opacity: 0; transition: opacity 0.5s; }
.journey-bar.visible { opacity: 1; }
.journey-step { display: flex; flex-direction: column; align-items: center; position: relative; flex-grow: 1; max-width: 120px; transition: transform 0.2s ease-out; }
.journey-step:hover { transform: translateY(-5px); }
.journey-step:not(:last-child)::after { content: ''; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: var(--border-color); transform: translateX(15%); transition: background 0.4s; }
.journey-step-circle { width: 30px; height: 30px; border: 2px solid var(--border-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 700; background-color: var(--bg-dark); position: relative; z-index: 2; transition: all 0.4s; box-shadow: inset 0px 1px 2px rgba(0,0,0,0.5); line-height: 1; }
.journey-step-label { margin-top: 8px; font-size: 0.75rem; color: var(--text-secondary); text-align: center; transition: color 0.4s; }
.journey-step .icon-check { width: 18px; height: 18px; color: #fff; display: none; position: absolute; top: 6px; left: 6px; }
.journey-step.active .journey-step-circle { background: var(--aurora-gradient); border: none; width: 32px; height: 32px; color: #fff; transform: scale(1.1); box-shadow: 0 0 15px 3px rgba(53, 128, 255, 0.6); animation: pulse 2.5s infinite ease-in-out; }
.journey-step.active .journey-step-label { color: transparent; background: var(--aurora-gradient); -webkit-background-clip: text; background-clip: text; font-weight: 700; }
.journey-step.completed .journey-step-circle { background: var(--aurora-gradient); border: none; color: transparent; }
.journey-step.completed .icon-check { display: block; }
.journey-step.completed .journey-step-label { color: var(--text-primary); }
.journey-step.completed::after { background: var(--aurora-gradient); }
.journey-step-circle span, .journey-step .icon-check { text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4); }
@media (max-width: 768px) { .journey-step-label { display: none; } .journey-bar { bottom: 90px; } }

.tour-footer { position: fixed; bottom: 0; left: 0; right: 0; height: 80px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; opacity: 0; transition: opacity 0.5s; z-index: 10; }
.tour-footer.visible { opacity: 1; }
.brand { display: flex; align-items: center; gap: 24px; }
.brand img { height: 32px; }
.tour-nav { display: flex; align-items: center; gap: 16px; }
.nav-button { -webkit-appearance: none; appearance: none; font-family: var(--font-heading); font-size: 2rem; width: 44px; height: 44px; background: rgba(255,255,255,0.1); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 50%; cursor: pointer; transition: all .2s; display: grid; place-items: center; }
.nav-button:hover:not(:disabled) { background: rgba(255,255,255,0.2); transform: scale(1.1); box-shadow: 0 0 15px rgba(53, 128, 255, 0.6); }
.nav-button:disabled { opacity: 0.4; cursor: not-allowed; }
.nav-button .icon { width: 18px; height: 18px; }
.nav-button .icon.hidden { display: none; }
.nav-button.discreet { width: 36px; height: 36px; opacity: 0.6; transition: all 0.2s ease-out; }
.nav-button.discreet:hover { opacity: 1; transform: scale(1.1); box-shadow: 0 0 10px rgba(53, 128, 255, 0.5); }
.nav-button.discreet .icon { width: 16px; height: 16px; }

.end-screen { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; background: rgba(10, 23, 39, 0.8); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity 0.5s; }
.end-screen.visible { opacity: 1; pointer-events: auto; }
.end-card { text-align: center; color: #fff; max-width: 760px; padding: 20px; }
.end-card img { max-width: 80px; margin: 0 auto 18px; }

/* Nex despidiéndose en el end-card */
.end-nex-av { position: relative; width: 94px; height: 94px; margin: 0 auto 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7af0ad 0%, #16a34a 50%, #15803d 120%);
  box-shadow: 0 14px 32px rgba(22,163,74,.5), inset 0 -6px 14px rgba(0,0,0,.2), inset 0 4px 10px rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; animation: nexBob 4.5s ease-in-out infinite; }
.end-nex-orb { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(95,255,70,.5); animation: nexPulse 2.6s ease-out infinite; }
.end-nex-orb.o2 { animation-delay: 1.3s; border-color: rgba(53,128,255,.5); }
.end-nex-eyes { display: flex; gap: 11px; }
.end-nex-eyes span { width: 11px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 0 10px rgba(255,255,255,.7); animation: nexBlink 4s ease-in-out infinite; }
.end-nex-av .end-nex-eyes { gap: 12px; transform: translateY(-7px); }
.end-nex-av .end-nex-eyes span { width: 13px; height: 18px; border-radius: 50%; }
.end-nex-mouth { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); width: 19px; height: 9px; border: 3.2px solid #fff; border-top: 0; border-radius: 0 0 22px 22px; box-shadow: 0 1px 4px rgba(255,255,255,.18); }
.end-nex-tag { font-family: 'DM Sans', var(--font-body); font-size: 1rem; font-weight: 700; letter-spacing: .04em; color: #5fff46; margin-bottom: 16px; }
.end-card p strong { color: #fff; font-weight: 700; }
.end-card h2 { font-family: var(--font-heading); font-size: 2.55rem; line-height: 1.12; margin-bottom: 18px; }
.end-card p { color: var(--text-secondary); font-size: 1.32rem; line-height: 1.62; margin-bottom: 28px; }
.end-proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 8px 0 30px;
              padding: 22px 28px; background: rgba(255,255,255,.04);
              border: 1px solid rgba(255,255,255,.08); border-radius: 14px; }
.end-proof > div { display: flex; flex-direction: column; align-items: center; }
.end-proof strong { font-family: var(--font-heading); font-size: 1.9rem; line-height: 1; margin-bottom: 7px;
                    background: linear-gradient(135deg, var(--nv-blue-refined), var(--nv-green-refined));
                    -webkit-background-clip: text; background-clip: text; color: transparent; }
.end-proof span { font-size: .92rem; color: var(--text-secondary);
                  letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 520px) { .end-proof { grid-template-columns: repeat(2, 1fr); } }
.end-cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.end-cta-buttons a { text-decoration: none; display: inline-block; }
.cta-button { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; padding: 15px 30px; border-radius: 10px; border: 1px solid var(--ssc-violet-refined); color: var(--ssc-violet-refined); background: transparent; cursor: pointer; transition: all .2s; }
.cta-button.primary { background: var(--aurora-gradient); border: none; color: #fff; }
.cta-button:hover { border: 1px solid transparent; color: #fff; transform: scale(1.05); background: var(--aurora-gradient); background-size: 200% auto; animation: textShine 2s linear infinite; }
.restart-button { margin-top: 32px; color: var(--text-secondary); background: none; border: none; cursor: pointer; opacity: 0.7; transition: opacity .2s; text-decoration: underline; }
.restart-button:hover { opacity: 1; }

@keyframes textShine { to { background-position: 200% center; } }
@keyframes pulse {
    0% { box-shadow: 0 0 15px 3px rgba(53, 128, 255, 0.6); }
    50% { box-shadow: 0 0 20px 6px rgba(53, 128, 255, 0.4); }
    100% { box-shadow: 0 0 15px 3px rgba(53, 128, 255, 0.6); }
}
/* ═══════════════ DEV POSITIONER ═══════════════ */
#dev-overlay { position: fixed; inset: 0; z-index: 99999; pointer-events: none; }
body.dev-mode #image-container { cursor: crosshair; pointer-events: auto; }
body.dev-mode .spotlight-overlay { pointer-events: none; }

.dev-crosshair-v { position: fixed; top: 0; bottom: 0; width: 1px; background: rgba(95,255,70,.8); box-shadow: 0 0 6px rgba(95,255,70,.6); pointer-events: none; transition: none; }
.dev-crosshair-h { position: fixed; left: 0; right: 0; height: 1px; background: rgba(95,255,70,.8); box-shadow: 0 0 6px rgba(95,255,70,.6); pointer-events: none; }

.dev-marker { position: fixed; pointer-events: none; transform: translate(-50%,-50%); border-radius: 50%; }
.dev-marker.dev-focus { width: 16px; height: 16px; background: #5fff46; border: 2px solid #fff; box-shadow: 0 0 16px #5fff46; }
.dev-marker.dev-card { width: 20px; height: 20px; background: #3580ff; border: 2px solid #fff; box-shadow: 0 0 16px #3580ff; }
.dev-marker.dev-card::after { content: '📦'; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 10px; }

.dev-panel { position: fixed; top: 16px; right: 16px; width: 280px; background: rgba(8,15,28,.95); backdrop-filter: blur(10px); color: #5fff46; padding: 16px 18px; font-family: 'Roboto Mono','SF Mono',monospace; font-size: 11px; border-radius: 10px; border: 1px solid rgba(95,255,70,.30); box-shadow: 0 12px 40px rgba(0,0,0,.5); pointer-events: auto; }
.dev-panel-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 12px; letter-spacing: .04em; }
.dev-row { display: flex; justify-content: space-between; gap: 10px; margin: 4px 0; color: rgba(255,255,255,.85); }
.dev-row .lbl { color: rgba(255,255,255,.50); font-weight: 600; }
.dev-row span:not(.lbl) { color: #5fff46; font-weight: 700; }
.dev-divider { height: 1px; background: rgba(95,255,70,.20); margin: 10px 0; }
.dev-instructions { font-size: 10.5px; line-height: 1.7; color: rgba(255,255,255,.70); }
.dev-instructions .key { display: inline-block; padding: 1px 6px; background: rgba(95,255,70,.18); color: #5fff46; border-radius: 3px; font-weight: 700; margin-right: 4px; }
.dev-json { background: rgba(0,0,0,.5); padding: 6px 8px; border-radius: 5px; color: #5fff46; font-size: 10.5px; word-break: break-all; white-space: pre-wrap; margin: 4px 0 10px; }
.dev-copy-btn, .dev-close-btn { width: 100%; font-family: inherit; padding: 8px; border-radius: 6px; border: 1px solid rgba(95,255,70,.40); background: rgba(95,255,70,.10); color: #5fff46; font-weight: 700; font-size: 11px; cursor: pointer; margin-top: 6px; transition: all .15s; }
.dev-copy-btn:hover { background: rgba(95,255,70,.25); }
.dev-close-btn { background: rgba(255,255,255,.05); color: rgba(255,255,255,.50); border-color: rgba(255,255,255,.10); }
