{#if board}
{board.label}{format === 'colors' ? ' · Color' : ''}
{matchedKeys.size}/{board.faces.length}{moves ? ` · ${moves} moves` : ''}
{#if board.matchN === 3 && flipped.length > 0 && flipped.length < 3}Pick 3 · {flipped.length}/3{:else}{board.matchN === 3 ? 'Match 3 of a kind' : 'Match pairs'}{/if}
{/if}
{#if format === 'colors'}
Assist {assist ? 'on' : 'off'}
{/if} {#if isFree}
New board
{/if}
{#if board}
{#each board.cards as card (card.id)} {@const up = matchedIds.has(card.id) || flipped.includes(card.id)} {@const matched = matchedIds.has(card.id)}
flip(card)}>
{#if format === 'colors'}
{#if assist}
{COLOR_BY_KEY[card.key]?.assist}
{/if}
{:else}
{/if} {#if matched}
✓
{/if}
{/each}
{#if done && celebrated}
Lovely — you cleared {isFree ? 'the board' : "today's set"}.{isFree ? '' : ' Fresh one tomorrow.'}
{copied ? 'Copied!' : 'Share result'}
{/if} {/if}