.dm-photo-navigation {
    margin-top: 1.1rem;
    padding: clamp(0.9rem, 1.8vw, 1.25rem);
    border: 1px solid rgba(44, 60, 52, 0.14);
    background: linear-gradient(180deg, rgba(247, 244, 236, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 16px 36px rgba(26, 41, 34, 0.08);
}

.dm-photo-navigation__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.dm-photo-navigation__label--next,
.dm-photo-navigation__cell--next {
    text-align: right;
}

.dm-photo-navigation__label--parent,
.dm-photo-navigation__cell--parent {
    text-align: center;
}

.dm-photo-navigation__cell {
    min-width: 0;
    font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.45vw, 1.12rem);
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(44, 60, 52, 0.7);
}

.dm-photo-navigation__cell a {
    color: inherit;
    text-decoration: none;
}

.dm-photo-navigation__cell--previous a,
.dm-photo-navigation__cell--parent a,
.dm-photo-navigation__cell--next a {
    display: inline-block;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    white-space: nowrap;
    overflow-wrap: anywhere;
}

.dm-photo-navigation__cell--parent {
    white-space: nowrap;
}

.dm-photo-navigation__label--empty {
    opacity: 0.35;
}

.dm-photo-navigation__cell a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

@media (max-width: 767.98px) {
    .dm-photo-navigation {
        margin-top: 0.45rem;
        padding: 0.65rem;
    }

    .dm-photo-navigation__cell {
        font-size: 0.78rem;
        letter-spacing: 0.02em;
    }

    .dm-photo-navigation__row {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 0.35rem;
    }

    .dm-photo-navigation__label--next,
    .dm-photo-navigation__cell--next,
    .dm-photo-navigation__label--parent,
    .dm-photo-navigation__cell--parent {
        text-align: center;
    }

    .dm-photo-navigation__cell--previous {
        text-align: left;
    }

    .dm-photo-navigation__cell--next {
        text-align: right;
    }
}

figure + .dm-photo-navigation,
.dm-public-image + .dm-photo-navigation {
    margin-top: 0.45rem;
}

figure.photo {
    margin-bottom: 0.45rem;
}

figure.photo + .dm-photo-navigation,
.dm-public-image + .dm-photo-navigation {
    margin-top: 0.2rem;
}
