{# Step phases removed #}

Commander: {% if commander %} {{ commander }} {% else %} None selected {% endif %}

Tags: {{ deck_theme_tags|default([])|join(', ') }}

Owned-only: {{ 'On' if owned_only else 'Off' }}
Prefer-owned: {{ 'On' if prefer_owned else 'Off' }}
MDFC swap: {{ 'On' if swap_mdfc_basics else 'Off' }}
Manage Owned Library

Bracket: {{ bracket }}

{% if i and n %} Stage {{ i }}/{{ n }} {% endif %} {% set deck_count = (total_cards if total_cards is not none else 0) %} Deck {{ deck_count }}/100 {% if added_total is not none %} Added {{ added_total }} {% endif %} {% if prefer_combos %} Combos: {{ combo_target_count }} ({{ combo_balance }}) {% endif %} {% if clamped_overflow is defined and clamped_overflow and (clamped_overflow > 0) %} Clamped {{ clamped_overflow }} {% endif %} {% if stage_label and stage_label == 'Multi-Copy Package' and mc_summary is defined and mc_summary %} {{ mc_summary }} {% endif %} {% if locks and locks|length > 0 %}🔒 {{ locks|length }} locked{% endif %}
{% set pct = ((deck_count / 100.0) * 100.0) if deck_count else 0 %} {% set pct_clamped = (pct if pct <= 100 else 100) %} {% set pct_int = pct_clamped|int %}
{% if mc_adjustments is defined and mc_adjustments and stage_label and stage_label == 'Multi-Copy Package' %}
Adjusted targets: {{ mc_adjustments|join(', ') }}
{% endif %} {% if status %}
Status: {{ status }}{% if stage_label %} — {{ stage_label }}{% endif %}
{% endif %} {% if gated and (not status or not status.startswith('Build complete')) %}
Compliance gating active — resolve violations above (replace or remove cards) to continue.
{% endif %} {# Load compliance panel as soon as the page renders, regardless of final status #}
{% if status and status.startswith('Build complete') %}
{% endif %} {% if locked_cards is defined and locked_cards %} {% from 'partials/_macros.html' import lock_button %}
Locked cards (always kept)
    {% for lk in locked_cards %}
  • {{ lk.name }} {% if lk.owned %}✔ Owned{% else %}✖ Not owned{% endif %} {% if lk.in_deck %}• In deck{% else %}• Will be included on rerun{% endif %}
    {{ lock_button(lk.name, True, from_list=True, target_selector='closest li') }}
  • {% endfor %}
{% endif %}
Visible: 0
All Owned Not owned Clear
{% if added_cards is not none %} {% if history is defined and history %}
Stage timeline
Jump back to a previous stage, then you can continue forward again.
    {% for h in history %}
  • {{ h.label }}
  • {% endfor %}
{% endif %}

Cards added this stage

{% if skipped and (not added_cards or added_cards|length == 0) %}
No cards added in this stage.
{% endif %}
✔ Owned ✖ Not owned
{% if stage_label and stage_label.startswith('Creatures') %} {% set groups = added_cards|groupby('sub_role') %} {% for g in groups %} {% set group_idx = loop.index0 %} {% set role = g.grouper %} {% if role %} {% set heading = 'Theme: ' + role.title() %} {% else %} {% set heading = 'Additional Picks' %} {% endif %}
{{ heading }}
({{ g.list|length }})
{% for c in g.list %} {% set owned = (owned_set is defined and c.name and (c.name|lower in owned_set)) %} {% set is_locked = (locks is defined and (c.name|lower in locks)) %}
{{ c.name }} image
{% if owned %}✔{% else %}✖{% endif %}
{{ c.name|safe }}{% if c.count and c.count > 1 %} ×{{ c.count }}{% endif %}
{% from 'partials/_macros.html' import lock_button %} {{ lock_button(c.name, is_locked) }}
{% if c.reason %}
{{ c.reason }}
{% else %}
{% endif %}
{% endfor %}
{% endfor %} {% else %}
{% for c in added_cards %} {% set owned = (owned_set is defined and c.name and (c.name|lower in owned_set)) %} {% set is_locked = (locks is defined and (c.name|lower in locks)) %}
{{ c.name }} image
{% if owned %}✔{% else %}✖{% endif %}
{{ c.name|safe }}{% if c.count and c.count > 1 %} ×{{ c.count }}{% endif %}
{% from 'partials/_macros.html' import lock_button %} {{ lock_button(c.name, is_locked) }}
{% if c.reason %}
{{ c.reason }}
{% else %}
{% endif %}
{% endfor %}
{% endif %}
Tip: Use the 🔒 Lock button under each card to keep it across reruns. Tap or click the card art to view details without changing the lock state.
{% endif %} {% if show_logs and log %}
Show logs
{{ log }}
{% endif %} {% if status and status.startswith('Build complete') and summary %} {% include "partials/include_exclude_summary.html" %} {% include "partials/deck_summary.html" %} {% endif %}