/* ============================================================
   instalar.css — tutorial público /instalar (iPhone y Android)
   Misma marca que la app (cristal líquido), pero independiente
   de style.css para que la página cargue ligera y sin sesión.
   ============================================================ */
:root {
  --bg: #0d0a1f; --pink: #ff7a45; --purple: #a98bff; --cyan: #4fe3c1; --lima: #e4ff6b;
  --text: #f6f3ff; --muted: rgba(246, 243, 255, .72);
  --glass: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  --glass-line: rgba(255, 255, 255, .2);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 18px 44px -26px rgba(4, 2, 18, .8);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: 'Geist', system-ui, sans-serif;
  line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100dvh;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--lima); }

/* Atmósfera (igual que la app) */
.aurora { position: fixed; inset: -10%; pointer-events: none; z-index: 0; }
.aurora .blob { position: absolute; border-radius: 50%; filter: blur(70px); }
.aurora .b1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: #ff7a45; opacity: .45; }
.aurora .b2 { width: 50vmax; height: 50vmax; right: -18vmax; top: 10vmax; background: #a98bff; opacity: .5; }
.aurora .b3 { width: 40vmax; height: 40vmax; left: -14vmax; bottom: -6vmax; background: #4fe3c1; opacity: .34; }
.aurora .b4 { width: 32vmax; height: 32vmax; right: -8vmax; bottom: -12vmax; background: #e4ff6b; opacity: .22; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .35; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"); }

/* Esqueleto: una columna que llena la pantalla */
.ins {
  position: relative; z-index: 1; max-width: 520px; margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom));
}
.ins-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ins-back { color: var(--muted); text-decoration: none; font-size: .9rem; padding: 10px 2px; min-height: 44px; display: inline-flex; align-items: center; }
.ins-back:hover, .ins-back:focus-visible { color: var(--text); }

/* Selector iPhone / Android */
.ins-seg { display: flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); }
.ins-seg button {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-weight: 600; font-size: .9rem; color: rgba(246, 243, 255, .78);
}
.ins-seg button[aria-selected="true"] { background: var(--lima); color: #1b1530; }
.ins-seg button:focus-visible { outline: 2px solid var(--lima); outline-offset: 2px; }

/* Avisos (navegador de Instagram, compu, ya instalada) */
.ins-alert {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 20px;
  background: var(--glass); border: 1px solid rgba(79, 227, 193, .45); box-shadow: var(--glass-shadow); font-size: .92rem;
}
.ins-alert b { color: #fff; }
.ins-copy {
  align-self: flex-start; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08); font-weight: 600; cursor: pointer;
}

/* Historias */
.ins-stories { flex: 1; min-height: 540px; display: flex; flex-direction: column; gap: 10px; }
.ins-bars { display: flex; gap: 4px; padding: 0 2px; }
.ins-bars span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); transition: background .25s; }
.ins-bars span.on { background: var(--lima); }
.ins-track {
  flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-behavior: smooth;
  scrollbar-width: none; border-radius: 26px;
}
.ins-track::-webkit-scrollbar { display: none; }
.ins-track:focus-visible { outline: 2px solid var(--lima); outline-offset: 3px; }
.ins-slide {
  flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always;
  display: flex; flex-direction: column; gap: 6px; padding: 4px 6px 0;
}
.ins-k { font-family: 'Geist Mono', monospace; font-weight: 500; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--lima); }
.ins-k span { color: var(--muted); }
.ins-slide h2 { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 1.45rem; line-height: 1.1; letter-spacing: -.01em; color: #fff; text-shadow: 0 1px 14px rgba(13, 10, 31, .6); }
.ins-t { font-size: .95rem; color: var(--muted); }

/* La captura llena el espacio que sobra y respeta su proporción */
.ins-media { flex: 1; min-height: 240px; display: grid; place-items: center; padding: 8px 0 4px; container-type: size; }
.ins-phone {
  position: relative; height: 52vh; aspect-ratio: var(--w) / var(--h);
  height: min(100cqh, calc(100cqw * var(--h) / var(--w)));
  border-radius: 7% / 3.5%; overflow: hidden; border: 2px solid rgba(255, 255, 255, .22);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .85); background: #000;
}
.ins-phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ins-ring {
  position: absolute; border: 3px solid var(--lima); border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(13, 10, 31, .55), 0 0 22px 4px rgba(228, 255, 107, .55);
  animation: ins-pulse 2.2s ease-in-out infinite;
}
.ins-ring.pill { border-radius: 999px; }
.ins-ring.alt { border: 2px dashed var(--cyan); box-shadow: none; animation: none; }
.ins-tag {
  position: absolute; padding: 4px 10px; border-radius: 999px; background: var(--lima); color: #1b1530;
  font-weight: 600; font-size: .78rem; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .6);
}
.ins-tag.up { transform: translateY(calc(-100% - 6px)); }
.ins-tag.down { margin-top: 6px; }
.ins-tag.alt { background: var(--cyan); color: #0d0a1f; }
@keyframes ins-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* Pasos sin captura: tarjetas de cristal */
.ins-cards { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 8px 0 4px; overflow-y: auto; }
.ins-card { padding: 18px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); }
.ins-card h3 { font-family: 'Geist Mono', monospace; font-weight: 500; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.ins-card p { font-size: .95rem; }
.ins-card p + p { margin-top: 8px; }
.ins-icon { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 18px; }
.ins-icon .ico-wrap { position: relative; width: 120px; height: 120px; }
.ins-icon img { width: 120px; height: 120px; border-radius: 27px; display: block; box-shadow: 0 20px 50px -16px rgba(169, 139, 255, .7); }
.ins-icon.round img { border-radius: 50%; }
.ins-icon .ins-ring { inset: -10px; border-radius: 34px; }
.ins-icon.round .ins-ring { border-radius: 50%; }
.ins-icon b { font-size: 1.05rem; font-weight: 500; color: #fff; }
.ins-list { list-style: none; counter-reset: paso; display: flex; flex-direction: column; gap: 10px; }
.ins-list li { counter-increment: paso; display: flex; align-items: center; gap: 12px; font-size: .98rem; }
.ins-list li::before {
  content: counter(paso); flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lima); color: #1b1530; font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: .8rem;
}
.ins-list b, .ins-card b { color: #fff; font-weight: 600; }
.ins-small { font-size: .82rem !important; color: var(--muted); }

/* Navegación */
.ins-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; }
.ins-arrow {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow);
}
.ins-arrow:disabled { opacity: .35; cursor: default; }
.ins-arrow:focus-visible { outline: 2px solid var(--lima); outline-offset: 2px; }
.ins-count { font-family: 'Geist Mono', monospace; font-size: .8rem; letter-spacing: .1em; color: var(--muted); }
.ins-noscript { padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .ins-track { scroll-behavior: auto; }
  .ins-ring { animation: none; }
  .ins-bars span { transition: none; }
}
@media (max-height: 640px) {
  .ins-slide h2 { font-size: 1.2rem; }
  .ins-t { font-size: .88rem; }
  .ins-slide > .ins-small { font-size: .74rem !important; line-height: 1.3; }   /* la nota se queda (en iPhone SE suele haber iOS viejito), pero más compacta */
  .ins-stories { min-height: 460px; }
  .ins-arrow { width: 46px; height: 46px; }
}
