import { CheckIcon, UserRoundIcon } from 'lucide-react' import Image from 'next/image' import { CardNameTileCanvas } from '@/components/cards/CardNameTileCanvas' import type { CardModel } from '@/lib/cardModels' import { cn } from '@/lib/utils' /** * S13/S15/S31/S34 — artwork preview of one card model, shared by the home * section and the `/cards` gallery. The name tile reuses the empty master with a * `SEU NOME` preview drawn by the real composer pipeline (S14); the photo tiles * show the official transparent overlay above a neutral photo slot; the team * tiles show `previewSrc` (the filled example) and the colinha tile shows the * approved art itself (`assetSrc`, S34), with the `NOVO` badge. * * The box ratio comes from an in-flow spacer, never from `aspect-ratio` — see * the comment on the spacer for the WebKit bug that collapsed the tiles. */ export const CardModelTile = ({ model, fontFamily, selected = false, }: { model: CardModel fontFamily: string selected?: boolean }) => { const ratio = model.height / model.width return ( {/* The tile height comes from this in-flow ratio spacer — a percentage padding resolved against the tile width — and NOT from `aspect-ratio`: WebKit loses the aspect-ratio height of a flex item on relayout (https://bugs.webkit.org/show_bug.cgi?id=265243, fixed only in WebKit main 2026-05), which collapsed the tiles to their labels on Orion/Safari. The spacer is engine-proof and keeps the master's exact ratio. */}