/* Onboarding de primera vez (tu algoritmo) */
    /* ── ONBOARDING de primera vez (blanco/morado, estilo unete + Apple) ── */
    #obView {
      position: fixed;
      inset: 0;
      z-index: 1600;
      background: #ffffff;
      color: var(--uw);
      font-family: 'Barlow', 'DM Sans', sans-serif;
      display: none;
      flex-direction: column;
      overflow: hidden
    }

    #obView.on {
      display: flex;
      animation: obFade .35s ease
    }

    @keyframes obFade {
      from { opacity: 0 }
      to { opacity: 1 }
    }

    .ob-top {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 22px;
      padding-top: calc(14px + env(safe-area-inset-top, 0px));
      background: var(--uw-faint);
      flex-shrink: 0
    }

    .ob-top img {
      width: 30px;
      height: 30px;
      border-radius: 7px;
      object-fit: cover
    }

    .ob-top span {
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 900;
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 1px
    }

    .ob-steps {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      max-width: 640px;
      width: 100%;
      margin: 0 auto;
      padding: 22px 22px 0;
      flex-shrink: 0
    }

    .ob-step-ind {
      border-top: 3px solid var(--uw-mid);
      padding: 10px 10px 0 2px;
      transition: border-color .3s
    }

    .ob-step-ind b {
      display: block;
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 22px;
      font-weight: 900;
      color: var(--uw-muted);
      line-height: 1;
      transition: color .3s
    }

    .ob-step-ind span {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--uw-soft);
      display: block;
      margin-top: 3px
    }

    .ob-step-ind.active {
      border-top-color: var(--uw)
    }

    .ob-step-ind.active b {
      color: var(--uw)
    }

    .ob-step-ind.done {
      border-top-color: var(--uw-soft)
    }

    .ob-body {
      flex: 1;
      overflow-y: auto;
      position: relative;
      -webkit-overflow-scrolling: touch
    }

    .ob-watermark {
      position: fixed;
      right: -10px;
      bottom: 64px;
      font-family: 'Barlow Condensed', sans-serif;
      font-size: clamp(140px, 34vw, 300px);
      font-weight: 900;
      color: var(--uw-faint);
      line-height: 1;
      pointer-events: none;
      user-select: none;
      transition: opacity .3s
    }

    .ob-view {
      display: none;
      max-width: 640px;
      margin: 0 auto;
      padding: 26px 22px 40px;
      position: relative
    }

    .ob-view.active {
      display: block;
      animation: obSlide .38s cubic-bezier(.22, 1, .36, 1)
    }

    .ob-view.active.back {
      animation-name: obSlideBack
    }

    @keyframes obSlide {
      from { opacity: 0; transform: translateX(26px) }
      to { opacity: 1; transform: translateX(0) }
    }

    @keyframes obSlideBack {
      from { opacity: 0; transform: translateX(-26px) }
      to { opacity: 1; transform: translateX(0) }
    }

    .ob-label {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-bottom: 8px
    }

    .ob-h {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: clamp(2.4rem, 9vw, 3.8rem);
      font-weight: 900;
      text-transform: uppercase;
      line-height: .92;
      letter-spacing: -1px;
      margin-bottom: 14px;
      text-wrap: balance
    }

    .ob-p {
      font-size: .95rem;
      font-weight: 500;
      color: var(--uw-soft);
      line-height: 1.6;
      max-width: 48ch;
      margin-bottom: 22px
    }

    .ob-feature {
      display: flex;
      gap: 14px;
      align-items: flex-start;
      padding: 14px 0;
      border-top: 1px solid var(--uw-light)
    }

    .ob-feature i {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: var(--uw-faint);
      color: var(--uw);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      flex-shrink: 0
    }

    .ob-feature b {
      display: block;
      font-size: .95rem;
      font-weight: 700
    }

    .ob-feature span {
      font-size: .84rem;
      color: var(--uw-soft);
      line-height: 1.5
    }

    .ob-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 9px
    }

    .ob-chip {
      background: var(--uw-faint);
      border: 1.5px solid var(--uw-border);
      color: var(--uw);
      border-radius: 50px;
      padding: 10px 18px;
      font-family: 'Barlow', 'DM Sans', sans-serif;
      font-size: .9rem;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      transition: background .18s, border-color .18s, color .18s, transform .1s ease-out
    }

    .ob-chip:hover {
      border-color: var(--uw)
    }

    .ob-chip:active {
      transform: scale(.95)
    }

    .ob-chip.on {
      background: var(--uw);
      border-color: var(--uw);
      color: white
    }

    .ob-chip i {
      font-size: .8rem
    }

    .ob-cards {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 12px
    }

    .ob-card {
      text-align: left;
      background: white;
      border: 1.5px solid var(--uw-border);
      border-radius: 16px;
      padding: 18px 16px;
      cursor: pointer;
      font-family: 'Barlow', 'DM Sans', sans-serif;
      color: var(--uw);
      position: relative;
      transition: border-color .18s, background .18s, transform .1s ease-out
    }

    .ob-card:hover {
      border-color: var(--uw)
    }

    .ob-card:active {
      transform: scale(.98)
    }

    .ob-card.selected {
      border-color: var(--uw);
      background: var(--uw-faint);
      box-shadow: 0 0 0 3px rgba(124, 58, 237, .12)
    }

    .ob-card.selected::after {
      content: '\2713';
      position: absolute;
      top: 12px;
      right: 12px;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--uw);
      color: white;
      font-size: .7rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center
    }

    .ob-card i {
      font-size: 1.15rem;
      margin-bottom: 8px;
      display: block
    }

    .ob-card b {
      display: block;
      font-size: .98rem;
      font-weight: 700;
      margin-bottom: 4px
    }

    .ob-card span {
      font-size: .8rem;
      color: var(--uw-soft);
      line-height: 1.45;
      display: block
    }

    /* Toggle tipo iOS en morado */
    .ob-row {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 16px 0;
      border-top: 1px solid var(--uw-light)
    }

    .ob-row-txt {
      flex: 1
    }

    .ob-row-txt b {
      display: block;
      font-size: .95rem;
      font-weight: 700
    }

    .ob-row-txt span {
      font-size: .83rem;
      color: var(--uw-soft);
      line-height: 1.5
    }

    .ob-switch {
      position: relative;
      width: 52px;
      height: 31px;
      flex-shrink: 0
    }

    .ob-switch input {
      position: absolute;
      inset: 0;
      opacity: 0;
      cursor: pointer;
      z-index: 2
    }

    .ob-switch em {
      position: absolute;
      inset: 0;
      background: var(--uw-mid);
      border-radius: 50px;
      transition: background .25s
    }

    .ob-switch em::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 25px;
      height: 25px;
      border-radius: 50%;
      background: white;
      box-shadow: 0 2px 6px rgba(18, 8, 46, .25);
      transition: transform .25s cubic-bezier(.22, 1, .36, 1)
    }

    .ob-switch input:checked + em {
      background: var(--uw)
    }

    .ob-switch input:checked + em::after {
      transform: translateX(21px)
    }

    .ob-push-btn {
      background: var(--uw-faint);
      border: 1.5px solid var(--uw-border);
      color: var(--uw);
      border-radius: 11px;
      padding: 10px 16px;
      font-family: 'Barlow', 'DM Sans', sans-serif;
      font-size: .85rem;
      font-weight: 700;
      cursor: pointer;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      transition: background .18s, transform .1s ease-out
    }

    .ob-push-btn:hover {
      background: var(--uw-light)
    }

    .ob-push-btn:active {
      transform: scale(.96)
    }

    .ob-push-btn.ok {
      background: rgba(21, 128, 61, .08);
      border-color: rgba(21, 128, 61, .3);
      color: #15803d;
      cursor: default
    }

    .ob-foot {
      flex-shrink: 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      max-width: 640px;
      width: 100%;
      margin: 0 auto;
      padding: 14px 22px;
      padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
      border-top: 1px solid var(--uw-light);
      background: white;
      position: relative;
      z-index: 2
    }

    .ob-back {
      background: white;
      border: 1.5px solid var(--uw-border);
      color: var(--uw);
      border-radius: 12px;
      padding: 12px 22px;
      font-family: 'Barlow', 'DM Sans', sans-serif;
      font-size: .9rem;
      font-weight: 700;
      cursor: pointer;
      transition: border-color .18s, background .18s, transform .1s ease-out, opacity .2s
    }

    .ob-back:hover {
      border-color: var(--uw);
      background: var(--uw-faint)
    }

    .ob-back:active {
      transform: scale(.97)
    }

    .ob-back[disabled] {
      opacity: 0;
      pointer-events: none
    }

    .ob-next {
      background: var(--uw);
      color: white;
      border: none;
      border-radius: 12px;
      padding: 13px 26px;
      font-family: 'Barlow', 'DM Sans', sans-serif;
      font-size: .92rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: background .18s, transform .1s ease-out
    }

    .ob-next:hover {
      background: var(--uw-dark)
    }

    .ob-next:active {
      transform: scale(.97)
    }

    .ob-skip {
      background: none;
      border: none;
      color: var(--uw);
      font-family: 'Barlow', 'DM Sans', sans-serif;
      font-size: .88rem;
      font-weight: 600;
      cursor: pointer;
      margin-top: 14px;
      text-align: left;
      padding: 0;
      transition: color .15s
    }

    .ob-skip:hover {
      color: var(--uw-dark)
    }

    /* ── Paso de credencial ────────────────────────────────────── */
    .ob-inp {
      width: 100%;
      border: 1.5px solid var(--uw-border);
      background: var(--uw-faint);
      border-radius: 12px;
      padding: 13px 16px;
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 1.15rem;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--uw-dark);
      outline: none;
      transition: border-color .2s, background .2s
    }

    .ob-inp::placeholder {
      color: var(--uw-muted);
      letter-spacing: .06em
    }

    .ob-inp:focus {
      border-color: var(--uw);
      background: #fff
    }

    .ob-vinc-btn {
      width: 100%;
      margin-top: 10px;
      background: var(--uw);
      color: #fff;
      border: none;
      border-radius: 12px;
      padding: 13px;
      font-family: 'Barlow', 'DM Sans', sans-serif;
      font-size: .93rem;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: background .2s, transform .1s ease-out
    }

    .ob-vinc-btn:hover { background: var(--uw-dark) }
    .ob-vinc-btn:active { transform: scale(.98) }
    .ob-vinc-btn:disabled { opacity: .6; cursor: not-allowed; transform: none }

    /* Confirmación tras vincular */
    .ob-ok {
      display: none;
      align-items: center;
      gap: 12px;
      background: rgba(21, 128, 61, .07);
      border: 1.5px solid rgba(21, 128, 61, .25);
      border-radius: 14px;
      padding: 14px 16px
    }

    .ob-ok.on { display: flex }

    .ob-ok i {
      color: var(--ok);
      font-size: 1.5rem;
      flex-shrink: 0
    }

    .ob-ok b {
      display: block;
      font-size: .95rem;
      color: var(--ok)
    }

    .ob-ok span {
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 900;
      letter-spacing: .06em;
      font-size: .95rem;
      color: var(--uw-dark)
    }

    /* Separador "¿No tienes?" */
    .ob-sep {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 22px 0 14px;
      color: var(--uw-soft);
      font-size: .8rem;
      font-weight: 600
    }

    .ob-sep::before,
    .ob-sep::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--uw-light)
    }

    /* Pasos para recuperar la credencial perdida */
    .ob-ayuda {
      display: none;
      margin-top: 10px;
      background: var(--uw-faint);
      border: 1px solid var(--uw-light);
      border-radius: 14px;
      padding: 16px 18px
    }

    .ob-ayuda.on { display: block }

    /* Solo el título va en bloque: los <b> dentro de la lista son en línea
       (si no, "nombre completo", "estado" y "municipio" se parten en renglones) */
    .ob-ayuda > b {
      display: block;
      font-size: .88rem;
      color: var(--uw-dark);
      margin-bottom: 8px
    }

    .ob-ayuda li b {
      color: var(--uw-dark)
    }

    .ob-ayuda ol {
      margin: 0 0 10px;
      padding-left: 18px;
      color: var(--tx2);
      font-size: .86rem;
      line-height: 1.6
    }

    .ob-ayuda li { margin-bottom: 5px }

    .ob-ayuda a {
      color: var(--uw);
      font-weight: 600;
      text-decoration: underline;
      word-break: break-all
    }

    .ob-ayuda p {
      margin: 0;
      font-size: .82rem;
      color: var(--tx2);
      opacity: .85;
      line-height: 1.55
    }

    @media (max-width: 480px) {
      .ob-step-ind span {
        display: none
      }

      .ob-cards {
        grid-template-columns: 1fr
      }
    }

