/* The clickable preview includes the caption without obscuring the photo. */
a.cd32-card-preview {
    display: block;
    flex: none;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
}
a.cd32-card-preview:focus-visible { outline-offset: -3px; }
.cd329-pictures {
    display: grid;
    grid-template: minmax(0,1fr) / minmax(0,1fr);
    align-items: center;
    justify-items: center;
    gap: 2px;
    height: 126px;
    background: var(--bg, #eff4fb);
}
.cd329-pictures[data-count="2"] { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cd329-pictures[data-count="3"] { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cd329-pictures[data-count="4"],
.cd24-list-row .cd329-pictures[data-count="3"] {
    grid-template: repeat(2, minmax(0,1fr)) / repeat(2, minmax(0,1fr));
}
.cd24-list-row .cd329-pictures[data-count="3"] img:first-child { grid-column: 1 / -1; }
.cd32-card-preview .cd329-pictures img {
    display: block;
    object-fit: contain;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
}
.cd329-file { display: none; width: 2.4rem; height: 60%; color: var(--muted, #64748b); }
.cd329-pictures[data-count="0"] .cd329-file { display: block; }
.cd32-card-preview .cd32-model-caption {
    display: block;
    padding: .25em .46em;
    color: #fff;
    background: #263952;
    font-size: 1.23rem;
    font-weight: 700;
    line-height: 1.22;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.cd32-model-caption small {
    display: block;
    margin-top: .12em;
    font-weight: 400;
    font-size: .83rem;
    line-height: 1.28;
}
.cd329-many .cd32-model-caption { font-size: 1rem; }
.cd24-list-row .cd32-card-preview {
    width: min(138px, 36%);
    border-radius: var(--cd25-control-radius, 3px);
}
.cd24-list-row .cd329-many { width: min(190px, 36%); }
.cd24-list-row .cd329-pictures { height: 80px; }
.cd24-list-row .cd32-model-caption { font-size: .88rem; padding: .25em .22em; }
.cd32-photo-credit { margin: .75rem 0 0; font-size: .85rem; }
.cd32-photo-credit a { text-decoration: underline; }
@media (max-width: 560px) {
    .cd24-list-row .cd329-pictures { height: 66px; }
    .cd24-list-row:has(.cd329-many) { flex-direction: column; }
    .cd24-list-row:has(.cd329-many) > .cd329-many,
    .cd24-list-row:has(.cd329-many) > .cd24-result-body { width: 100%; }
    .cd24-list-row .cd329-many .cd329-pictures { height: 100px; }
}
@media print {
    .cd32-card-preview .cd32-model-caption { color: #000; background: none; }
}
