/*
 * MHL-FILES-GALLERY-REFERENCE-WIDTH-V1
 * Nur /files und /gallery:
 * Gleiche äußere Shell-Breite wie die gemeinsame Referenzregel.
 * Keine Änderungen an Farben, Typografie, Bildern oder Kartenrastern.
 */

html body.files-page main#content.site-main.shell,
html body.r207-gallery-page main#content.site-main.shell {
    width: min(
        calc(100% - (var(--r47-gutter) * 2)),
        var(--r47-shell)
    ) !important;
    max-width: var(--r47-shell) !important;
    min-width: 0 !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
}

/*
 * Die direkten Inhaltscontainer nutzen die gesamte Breite der
 * angeglichenen Haupt-Shell. Keine zusätzlichen seitlichen
 * 16-px-Ränder und keine separate 1540-px-Begrenzung.
 */
html body.files-page main#content.site-main.shell > .page-header,
html body.r207-gallery-page main#content.site-main.shell > .page-header,
html body.r207-gallery-page main#content.site-main.shell > .r207-gallery-shell,
html body.files-page main#content.site-main.shell > .mhl-downloads-final,
html body.files-page main#content.site-main.shell > .mhl-pdf-companion-final,
html body.files-page main#content.site-main.shell > .mhl-wallpapers-final,
html body.files-page main#content.site-main.shell > .mhl-downloads-clean,
html body.files-page main#content.site-main.shell > .mhl-companion-clean,
html body.files-page main#content.site-main.shell > .mhl-wallpapers-clean {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* Bestehende Raster und Umbrüche bleiben für alle Viewports erhalten. */
