The plate grid — figure, plate, zoom badge, caption
One <figure> per image inside .gallery. The plate anchor is a BOX (.gallery-plate — never a bare inline anchor), the zoom badge is inert to the pointer, the accessible name rides aria-label (never title — the tooltip layer would put a tooltip on a moving target), and the group value is per entity.
From the files jsonb — g.lightbox.gallery(files, { group })
Client-rendered pages (a lister row's expansion, an API payload) skip the hand-written markup: g.lightbox.gallery(files, { group }) turns the stored files gallery jsonb (file-selekt's shape — path, variants, caption) into exactly the markup above. Inject it, then g.lightbox.refresh() — lister loads re-scan by themselves. Stored order = display order; bare paths prefix g.settings.filesUrl, absolute CDN paths pass through.