{# Chat panel body — message list + input. Loaded into #assistant-body. #}
{% load humanize %}
{# Scroll region — relative for the floating "jump to latest" pill #}
{% if messages_qs %}
{% for m in messages_qs %}
{% if m.role == 'user' %}
{% include "assistant/_message_user.html" with message=m %}
{% elif m.role == 'assistant' %}
{% include "assistant/_message_assistant.html" with message=m %}
{% endif %}
{% endfor %}
{% else %}
{% include "assistant/_empty_state.html" %}
{% endif %}
{# Scroll-to-latest — JS toggles `.is-visible` when user is scrolled away #}
{# Live status strip — sits between the messages and the input form. #}
{% include "assistant/_typing_indicator.html" %}
{# Input row — safe-area aware on mobile, send button is disabled by default #}