        <header class="page-heading"><p class="eyebrow">INFRAESTRUCTURA</p><h1>Economía de {{ planet.name }}</h1><p>Amplía la producción, la energía, los almacenes y las instalaciones del planeta.</p></header>
        {% set build_queue = queues|selectattr('category','equalto','building')|selectattr('planet_id','equalto',planet.id)|list %}
        {% if build_queue %}{% set q = build_queue[0] %}<section class="active-queue" data-queue-id="{{ q.id }}" aria-labelledby="build-queue-title"><div><span>Construcción en curso</span><strong id="build-queue-title">{{ (BUILDINGS.get(q.item)).name }} nivel {{ q.target_level }}</strong></div><div class="queue-time"><span>Tiempo restante</span><time class="countdown" data-end="{{ q.completes_at }}">{{ (q.completes_at-now)|duration }}</time></div><form method="post" action="{{ url_for('cancel_action') }}"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="queue_id" value="{{ q.id }}"><input type="hidden" name="return_section" value="economy"><button class="button button-danger" type="submit">Cancelar y recuperar 75 %</button></form></section>{% endif %}
        <section aria-labelledby="building-catalog-title"><h2 id="building-catalog-title" class="section-title">Catálogo de edificios</h2><div class="card-grid">
          {% for entry in entries %}<article class="tech-card">
            <div class="card-number" aria-hidden="true">{{ '%02d'|format(loop.index) }}</div>
            <div class="card-copy"><h3>{{ entry.definition.name }} <span>Nivel {{ entry.level }}</span></h3><p>{{ entry.definition.description }}</p>
              {% if entry.missing %}<p class="requirement">Requiere: {{ entry.missing|join(', ') }}</p>{% endif %}
              <dl class="cost-list"><div><dt>Metal</dt><dd>{{ entry.cost.metal|number }}</dd></div><div><dt>Cristal</dt><dd>{{ entry.cost.crystal|number }}</dd></div><div><dt>Deuterio</dt><dd>{{ entry.cost.deuterium|number }}</dd></div><div><dt>Tiempo</dt><dd>{{ entry.duration|duration }}</dd></div></dl>
              <a href="{{ url_for('game_view', section='encyclopedia') }}#wiki-building-{{ entry.key }}">Consultar ficha completa</a>
            </div>
            <form method="post" action="{{ url_for('build_action') }}" data-cost-metal="{{ entry.cost.metal }}" data-cost-crystal="{{ entry.cost.crystal }}" data-cost-deuterium="{{ entry.cost.deuterium }}"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="item" value="{{ entry.key }}"><button class="button button-primary" type="submit" {% if build_queue or not entry.met %}disabled{% endif %}>Construir nivel {{ entry.level + 1 }}</button></form>
          </article>{% endfor %}
        </div></section>
