/* Tokens de diseno, reset y accesibilidad (compartido) */
    :root {
      interpolate-size: allow-keywords;
      /* Marca — morado monocromo (mismo ADN que unete.html) */
      --p: #7c3aed;
      --pd: #5b21b6;
      --pdd: #4c1d95;
      --pk: #8b5cf6;      /* violeta claro: acentos secundarios y gradientes */
      --pkd: #7c3aed;
      --pk-tx: #6d28d9;   /* violeta para texto pequeño sobre claro (AA 6.4:1) */
      /* Superficies y texto */
      --w: #ffffff;
      --ow: #f7f5fc;
      --dk: #12082e;
      --dk2: #1d1040;
      --tx: #3d3060;
      --tx2: #6f6790;     /* texto secundario (AA 5.2:1 sobre crema) */
      --lp: #ede9fc;
      /* Semánticos */
      --ok: #15803d;
      --danger: #dc2626;
      --warn: #b45309;
      /* Radios */
      --r-s: 10px;
      --r-m: 14px;
      --r-l: 18px;
      --r-xl: 22px;
      /* Sombras tintadas al violeta de la marca */
      --sh-1: 0 1px 2px rgba(18, 8, 46, .04), 0 2px 12px rgba(61, 43, 158, .06);
      --sh-2: 0 2px 6px rgba(18, 8, 46, .05), 0 10px 30px rgba(61, 43, 158, .10);
      --sh-3: 0 6px 16px rgba(18, 8, 46, .08), 0 24px 70px rgba(61, 43, 158, .16);
      /* Grano sutil para superficies oscuras */
      --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
      /* Tema claro monocromo (login y onboarding, tomado de unete.html) */
      --uw: #7c3aed;
      --uw-dark: #5b21b6;
      --uw-soft: rgba(124, 58, 237, .6);
      --uw-muted: rgba(124, 58, 237, .35);
      --uw-faint: rgba(124, 58, 237, .06);
      --uw-light: rgba(124, 58, 237, .1);
      --uw-mid: rgba(124, 58, 237, .18);
      --uw-border: rgba(124, 58, 237, .25)
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--w);
      color: var(--tx);
      overflow-x: clip;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      /* Sin doble toque para acercar: descuadraba el diseño. El zoom vive
         solo en el visor de fotos, que lo reactiva con touch-action:none */
      touch-action: manipulation
    }

    h1, h2, h3, h4 {
      text-wrap: balance
    }

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

    button {
      -webkit-tap-highlight-color: transparent
    }

    :focus-visible {
      outline: 2.5px solid var(--p);
      outline-offset: 2px
    }

    .story-viewer :focus-visible {
      outline-color: white
    }

    ::selection {
      background: rgba(117, 83, 232, .22)
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important
      }
    }

    /* ── Pantalla de carga inicial ─────────────────────────────── */
    #bootSplash {
      position: fixed;
      inset: 0;
      z-index: 99998;
      background: #ffffff;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 22px;
      transition: opacity .3s ease
    }

    #bootSplash.out {
      opacity: 0;
      pointer-events: none
    }

    #bootSplash img {
      width: 76px;
      height: 76px;
      border-radius: 18px;
      box-shadow: 0 10px 26px rgba(124, 58, 237, .22);
      animation: bsPulse 1.6s ease-in-out infinite
    }

    @keyframes bsPulse {
      0%, 100% { transform: scale(1) }
      50% { transform: scale(1.06) }
    }

    .bs-dots {
      display: flex;
      gap: 7px
    }

    .bs-dots span {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--uw);
      opacity: .25;
      animation: bsDot 1.2s ease-in-out infinite
    }

    .bs-dots span:nth-child(2) { animation-delay: .15s }
    .bs-dots span:nth-child(3) { animation-delay: .3s }

    @keyframes bsDot {
      0%, 100% { opacity: .25; transform: translateY(0) }
      40% { opacity: 1; transform: translateY(-4px) }
    }

    /* ── Error de red al arrancar ──────────────────────────────── */
    #netError {
      position: fixed;
      inset: 0;
      z-index: 99997;
      background: #ffffff;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 24px;
      text-align: center
    }

    #netError.on {
      display: flex
    }

    .ne-icon {
      width: 76px;
      height: 76px;
      border-radius: 50%;
      background: rgba(124, 58, 237, .08);
      color: var(--uw);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.7rem;
      margin-bottom: 6px;
      position: relative
    }

    .ne-icon::after {
      content: '';
      position: absolute;
      width: 3px;
      height: 52px;
      background: var(--uw);
      border-radius: 3px;
      transform: rotate(45deg);
      box-shadow: 0 0 0 3px #ffffff
    }

    #netError h2 {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 1.9rem;
      font-weight: 900;
      text-transform: uppercase;
      color: var(--uw);
      margin: 0
    }

    #netError p {
      color: var(--tx2);
      font-size: .92rem;
      max-width: 340px;
      line-height: 1.55;
      margin: 0
    }

    #netError button {
      margin-top: 12px;
      background: var(--uw);
      color: #ffffff;
      border: none;
      border-radius: 12px;
      padding: 13px 28px;
      font-family: 'DM Sans', sans-serif;
      font-size: .95rem;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: background .2s, transform .1s ease-out
    }

    #netError button:hover {
      background: var(--uw-dark)
    }

    #netError button:active {
      transform: scale(.97)
    }

