function openWizard(editId) {
    try { if (!OPT) await loadOptions(); } catch (e) { toast(e.message, "err", 6000); return; }
    editingId = editId || null;
    Object.assign(C, DEF());
    step = 1;
    if (editingId) {
      try {
        const c = await GET(`/campaigns/${editingId}`);
        Object.assign(C, DEF(), {
          name: c.name, recipient_list_id: c.recipient_list_id,
          subject_set_ids: c.subject_set_ids || [], template_ids: c.template_ids || [],
          message_type: c.message_type, attach_mode: c.attach_mode,
          attach_pdf: c.attach_pdf, attach_pdf_template_id: c.attach_pdf_template_id,
          attachment_id: c.attachment_id, variable_config: c.variable_config || {},
          account_ids: c.account_ids || [], rotation_strategy: c.rotation_strategy,
          rotation_weights: c.rotation_weights || {}, subject_rotation: c.subject_rotation,
          template_sequence_mode: c.template_sequence_mode, phone_selection: c.phone_selection,
          max_per_account: c.max_per_account, send_interval_seconds: c.send_interval_seconds,
          rate_per_minute: c.rate_per_minute, max_retries: c.max_retries,
          retry_delay_seconds: c.retry_delay_seconds, unsubscribe_enabled: c.unsubscribe_enabled,
          preview_sample_size: c.preview_sample_size,
        });
      } catch (e) { toast(e.message, "err"); return; }
    }
    const wrap = el("div", {},
      el("div", { class: "wiz-steps", id: "wSteps" }),
      el("div", { class: "step-body
