.wmf-article-back {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    font: 700 14px/20px var(--wmf-sans);
}

.wmf-article-back .wmf-icon {
    width: 12px;
    height: 12px;
    transform: rotate(180deg);
}

.wmf-site .wmf-article-back:hover {
    text-decoration: none;
}

.wmf-article-back:is(:hover, :focus-visible) span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wmf-gallery-page {
    --wmf-muted: #a6a6a6;
}

.wmf-gallery-heading {
    display: grid;
    gap: 20px;
}

.wmf-gallery-heading .wmf-title-prefix {
    font-size: 38px;
    line-height: 44px;
}

.wmf-gallery-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 20px;
}

.wmf-gallery .wmf-breadcrumbs {
    flex-wrap: nowrap;
    font-size: 14px;
    line-height: 20px;
}

.wmf-gallery .wmf-breadcrumbs a.wmf-crumb-article,
.wmf-gallery .wmf-breadcrumbs a.wmf-crumb-category {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wmf-gallery .wmf-breadcrumbs a.wmf-crumb-category {
    flex-shrink: 0;
    max-width: 30%;
}

.wmf-gallery .wmf-breadcrumbs > :is(:first-child, [aria-current]) {
    flex-shrink: 0;
}

.wmf-gallery .wmf-gallery-related {
    margin: 0;
    padding-top: 32px;
}

.wmf-gallery .wmf-gallery-related h2 {
    margin: 0 0 20px;
}

.wmf-related-gallery-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wmf-gallery-related .wmf-card .wmf-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 8px;
}

.wmf-gallery-related .wmf-card h3 {
    margin: 0;
    font: 700 15px/20px var(--wmf-sans);
}

.wmf-related-photo-count {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgb(0 0 0 / 35%);
    color: #fff;
    font: 700 14px/20px var(--wmf-sans);
}

.wmf-related-photo-count .wmf-icon {
    width: 16px;
    height: 20px;
    padding: 0 1.5px;
    object-fit: contain;
}

.wmf-gallery-related .wmf-card a:is(:hover, :focus-visible) .wmf-related-photo-count .wmf-icon {
    transform: none;
}

@media (max-width: 600px) {
    .wmf-gallery-heading .wmf-title-prefix {
        font-size: 25px;
        line-height: 30px;
    }

    .wmf-gallery .wmf-breadcrumbs {
        margin-bottom: 8px;
    }

    .wmf-gallery .wmf-crumb-category {
        display: none;
    }

    .wmf-discussion-page .wmf-breadcrumbs {
        flex-wrap: nowrap;
    }

    .wmf-discussion-page .wmf-breadcrumbs > :not(a.wmf-crumb-article) {
        flex-shrink: 0;
    }

    .wmf-discussion-page a.wmf-crumb-article {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wmf-related-gallery-list {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 20px;
    }

    .wmf-gallery-related .wmf-card h3 {
        font-size: 16px;
        line-height: 22px;
    }
}
