.photo-tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:18px; }
.photo-tile { position:relative; min-height:320px; background:linear-gradient(160deg,var(--nrr-photos-index-photo-tile-background),var(--nrr-photos-index-photo-tile-background-2)); color:var(--nrr-photos-index-photo-tile-text); text-decoration:none; display:flex; align-items:flex-end; overflow:hidden; border:1px solid var(--nrr-photos-index-photo-tile-border); }
.photo-tile img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.photo-tile .overlay { position:relative; width:100%; padding:14px; background:linear-gradient(180deg,var(--nrr-photos-index-photo-tile-overlay-background),var(--nrr-photos-index-photo-tile-overlay-background-2)); text-shadow:0 2px 8px var(--nrr-photos-index-photo-tile-overlay-text-shadow); }
.photo-tile .overlay .small,
.photo-tile .overlay .muted,
.photo-tile .overlay .small.muted { color:var(--nrr-photos-index-overlay-small-muted-text); }
.photo-tile-title { font-size:26px; font-weight:900; line-height:1.1; }
.photo-masonry { column-count:3; column-gap:18px; }
.photo-card { break-inside:avoid; margin:0 0 18px; border:1px solid var(--nrr-photos-index-photo-card-border); background:var(--nrr-photos-index-photo-card-background); display:block; color:var(--nrr-photos-index-photo-card-text); text-decoration:none; }
.photo-card img { display:block; width:100%; aspect-ratio:4 / 3; height:auto; object-fit:cover; background:var(--nrr-photos-index-photo-card-background-2); }
.photo-card .meta { padding:10px 12px; }
.photo-card .meta strong { display:block; margin-bottom:5px; }
.photo-placeholder { min-height:160px; display:flex; align-items:center; justify-content:center; text-align:center; padding:18px; background:linear-gradient(135deg,var(--nrr-photos-index-photo-placeholder-background),var(--nrr-photos-index-photo-placeholder-background-2)); }
.photo-toolbar--tight { margin-bottom: 0; }
.photo-toolbar--end { justify-content: flex-end; }
.photo-photo-delete-actions { margin-top: 14px; }
.photo-card-link-reset { color: inherit; text-decoration: none; display: block; }
@media (max-width: 1100px) { .photo-masonry { column-count:2; } }
@media (max-width: 720px) { .photo-masonry { column-count:1; } }
@media (max-width: 640px) { .photo-tiles { grid-template-columns:1fr; } }

.photo-chapter-sort-divider {
    align-items: center;
    color: var(--nrr-photos-index-photo-chapter-sort-divider-text);
    display: grid;
    gap: 12px;
    grid-column: 1 / -1;
    grid-template-columns: minmax(42px, 1fr) auto minmax(42px, 1fr);
    margin: 2px auto;
    width: min(760px, 88%);
}

.photo-chapter-sort-divider span {
    background: linear-gradient(90deg, var(--nrr-photos-index-photo-chapter-sort-divider-background), var(--nrr-photos-index-photo-chapter-sort-divider-background-2), var(--nrr-photos-index-photo-chapter-sort-divider-background-2-2));
    height: 1px;
}

.photo-chapter-sort-divider strong {
    align-items: center;
    display: inline-flex;
    font-size: 18px;
    justify-content: center;
    line-height: 1;
    text-shadow: 0 1px 8px var(--nrr-photos-index-photo-chapter-sort-divider-text-shadow);
}


.photo-toolbar--all-chapter-header {
    align-items: flex-start;
}

.photo-toolbar--all-chapter-header .wayfinder-header {
    flex: 1 1 360px;
    margin-bottom: 0;
}

.photo-toolbar--all-chapter-header form {
    flex: 1 1 320px;
}

@media (max-width: 720px) {
    .photo-toolbar--all-chapter-header {
        display: grid;
        gap: 14px;
    }

    .photo-toolbar--all-chapter-header form,
    .photo-toolbar--all-chapter-header .nrr-select,
    .photo-toolbar--all-chapter-header .photo-filter-button {
        min-width: 0;
        width: 100%;
    }
}
