{% if request.user.significator %}
{% with card=request.user.significator %}
{# Mirrors the my_sign.html `.sig-stage-card` layout — corner #}
{# top-left, name + polarity qualifier in the face, mirror #}
{# corner bottom-right (pre-rotated). Sized to fill the #}
{# applet's vertical aperture via container queries in #}
{# `_billboard.scss`. `significator_reversed` is the POLARITY #}
{# axis (True ↔ levity), so the saved sig is always upright #}
{# in its polarity — no `.stage-card--reversed` rotation. #}
{% if card.deck_variant.has_card_images %}
{# Sprint A.6 — image-mode render mirrors my_sign.html's #}
{# .sig-stage-card--image treatment. Shares the SCSS rule #}
{# (comma-list selector) so the contour stroke + tray-card #}
{# silhouette black depth shadow + arcana stroke-color #}
{# come for free. #}
{% if not card.deck_variant.is_polarized %}
{# Non-polarized image deck: FLIP btn shows the deck back #}
{# image (same behavior as my_sign.html main page). Both #}
{# the back-img + flip-btn nest INSIDE the card so the #}
{# absolute-positioned FLIP btn anchors to the card's #}
{# bounds (card is position: relative in --image mode). #}
{% endif %}
{% else %}
{{ card.corner_rank }}
{% if card.suit_icon %}{% endif %}
{# `request.user.sig_face` is the rendering payload from #}
{# `TarotCard.applet_face()` — mirrors `populateCard` in #}
{# `stage-card.js:135-144`: #}
{# • Polarity-split (cards 48-49, trumps 19-21): #}
{# single-line title, qualifier blank. #}
{# • Major + qualifier: title carries a trailing #}
{# comma + qualifier renders BELOW. #}
{# • Non-Major (middle court, Schizo / Nomad w. no #}
{# qualifier): qualifier renders ABOVE the title. #}
{% with face=request.user.sig_face %}
{% if face.qualifier_first %}
{{ face.qualifier }}
{{ face.title }}
{% else %}
{{ face.title }}
{{ face.qualifier }}
{% endif %}
{% endwith %}
{{ card.get_arcana_display }}
{{ card.corner_rank }}
{% if card.suit_icon %}{% endif %}
{% endif %}
{# Stat block — same shape as my_sign.html's `.sig-stat-block` #}
{# (Emanation face label + keyword list) but no SPIN/FYI btns #}
{# since the applet is a read-only preview. Saved sigs persist #}
{# only the polarity axis (FLIP), never the orientation axis #}
{# (SPIN), so always render the upright/emanation face. #}
Emanation
{{ card.name }}
{{ card.get_arcana_display }}
{% for kw in card.keywords_upright %}
{{ kw }}
{% endfor %}
{# Sprint A.6 — applet FLIP btn handler. Mirrors my_sign.html's #}
{# `_flipToBackAnimated()` shape (rotateY 0→90→0 over 500ms, class #}
{# toggle at halfway, `data-flipping` attr for SCSS to hide the #}
{# btn). Self-contained inline script — no shared module needed #}
{# since the applet is the only consumer outside the main page #}
{# (which has its own copy). Script wrapped inside the sig-present #}
{# branch AND inside `{% with card %}` scope so `card` references #}
{# resolve + the JS selector strings don't leak into the no-sig #}
{# DOM (which would trip substring-matching tests). #}
{% if card.deck_variant.has_card_images and not card.deck_variant.is_polarized %}
{% endif %}
{% endwith %}
{% else %}