body {
    font-family: Comic Sans MS, sans-serif;
    background: url("Plakat_ohne_Text.png");
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    margin: 0;
}

body::before {
    content: "";
    position: fixed;
    min-height: 100vh;
    inset: 0;
    backdrop-filter: blur(3px);
    z-index: 0;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    justify-content: center;
    z-index: 1;
    position: relative;
    padding: 18px 25px 35px;
}

.grid-item {
    z-index: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.grid-media-button {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    border-radius: 9px;
    overflow: hidden;
    background: rgba(255, 247, 220, 0.7);
    cursor: zoom-in;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.grid-img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
    display: block;
}

.video-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.58);
    color: white;
    font-size: 24px;
    line-height: 1;
    padding-left: 3px;
    pointer-events: none;
}

.media-download-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 7px 8px;
    border-radius: 9px;
    background: rgba(160, 150, 100, 0.93);
    color: rgb(95, 21, 21);
    font-family: Comic Sans MS, sans-serif;
    font-weight: bold;
    font-size: 13px;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 5px 13px rgba(0, 0, 0, 0.14);
}

.media-download-btn:hover,
.gallery-action-btn:hover,
.gallery-tab:hover {
    filter: brightness(1.06);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.84);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

.lightbox .lightboximg,
.lightbox .lightboxvideo {
    max-width: 92%;
    max-height: 86%;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    background: rgba(255, 255, 255, 0.05);
}

.lightbox .lightboxvideo {
    display: none;
}

.lightbox .next-img {
    transform: translateX(-100%);
    opacity: 0;
}

.lightbox .prev-img {
    transform: translateX(100%);
    opacity: 0;
}

.lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 50px;
    color: #d8d8d8;
    cursor: pointer;
    content: "\00d7";
    z-index: 3;
}

.lightbox .previous-btn {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 50px;
    color: #d8d8d8;
    cursor: pointer;
    z-index: 3;
}

.lightbox .next-btn {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 50px;
    color: #d8d8d8;
    cursor: pointer;
    z-index: 3;
}


.lightbox.is-loading .lightboximg,
.lightbox.is-loading .lightboxvideo {
    opacity: 0.22;
    filter: blur(1px);
}

.lightbox .lightboximg.is-lightbox-ready,
.lightbox .lightboxvideo.is-lightbox-ready {
    opacity: 1;
    filter: none;
}

.lightbox-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 190px;
    padding: 18px 22px;
    border-radius: 18px;
    background: rgba(20, 12, 12, 0.72);
    color: #fff7dc;
    font-family: Comic Sans MS, sans-serif;
    font-weight: bold;
    text-align: center;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(5px);
}

.lightbox.is-loading .lightbox-loader {
    display: flex;
}

.lightbox-loader-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid rgba(255, 247, 220, 0.25);
    border-top-color: rgba(255, 247, 220, 0.95);
    animation: mediaSpin 0.85s linear infinite;
}

.lightbox-loader-text {
    font-size: 15px;
    line-height: 1.25;
}

/* Kleine Ergänzungen, Grunddesign bleibt */
.gallery-actions,
.gallery-download-actions {
    position: relative;
    z-index: 1;
    padding: 20px 25px 0 25px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-action-btn,
.gallery-tab {
    display: inline-block;
    padding: 10px 16px;
    background: rgb(160, 150, 100);
    color: rgb(95, 21, 21);
    font-family: Comic Sans MS, sans-serif;
    font-weight: bold;
    border-radius: 12px;
    text-decoration: none;
    border: 0;
}

.gallery-tab {
    cursor: pointer;
    opacity: 0.74;
}

.gallery-tab.is-active {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(95, 21, 21, 0.25) inset;
}

.gallery-tabs {
    position: relative;
    z-index: 1;
    padding: 12px 25px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-download-actions {
    display: none;
    padding-top: 10px;
}

.gallery-download-actions.is-visible {
    display: flex;
}

.gallery-zip-btn {
    background: rgba(160, 150, 100, 0.93);
}

.gallery-message {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 70px;
    padding: 18px 24px;
    background: rgba(160, 150, 100, 0.92);
    color: rgb(95, 21, 21);
    font-family: Comic Sans MS, sans-serif;
    font-weight: bold;
    text-align: center;
    border-radius: 14px;
    max-width: 360px;
}

.gallery-upload-status {
    margin-top: 0;
}

/* Galerie Kamera-Button */
#galleryUploadLabel {
    cursor: pointer;
}

#galleryUploadLabel input {
    display: none;
}

/* Galerie Upload-Button erst nach gültigem Zugang anzeigen */
#galleryUploadLabel {
    display: none !important;
}

#galleryUploadLabel.is-visible {
    display: inline-block !important;
}

@media (max-width: 560px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
        padding-inline: 14px;
    }

    .gallery-actions,
    .gallery-tabs,
    .gallery-download-actions {
        padding-inline: 14px;
    }

    .lightbox .previous-btn {
        left: 8px;
    }

    .lightbox .next-btn {
        right: 8px;
    }
}

/* Performance: Medien werden erst kurz vor dem Sichtbereich geladen. */
.lazy-media {
    opacity: 0;
    transition: opacity 0.28s ease;
}

.lazy-media.is-loaded {
    opacity: 1;
}

.lazy-media.is-loading {
    opacity: 0.18;
}

.grid-media-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg,
            rgba(255, 247, 220, 0.26) 0%,
            rgba(255, 255, 255, 0.58) 38%,
            rgba(255, 247, 220, 0.26) 72%
        );
    background-size: 220% 100%;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

.grid-media-button.is-awaiting-media::before {
    opacity: 1;
    animation: mediaShimmer 1.15s linear infinite;
}

.media-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-left: -13px;
    margin-top: -13px;
    border-radius: 50%;
    border: 3px solid rgba(95, 21, 21, 0.22);
    border-top-color: rgba(95, 21, 21, 0.72);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

.grid-media-button.is-awaiting-media .media-loader {
    opacity: 1;
    animation: mediaSpin 0.85s linear infinite;
}

.grid-media-button.is-media-ready .media-loader {
    display: none;
}

.grid-media-button .grid-img,
.grid-media-button .video-badge {
    position: relative;
    z-index: 1;
}

@keyframes mediaShimmer {
    0% { background-position: 150% 0; }
    100% { background-position: -70% 0; }
}

@keyframes mediaSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .grid-media-button.is-awaiting-media::before,
    .grid-media-button.is-awaiting-media .media-loader {
        animation: none;
    }
}

.gallery-sentinel {
    grid-column: 1 / -1;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 247, 220, 0.78);
    color: rgb(95, 21, 21);
    font-family: Comic Sans MS, sans-serif;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
}

.gallery-sentinel:hover {
    filter: brightness(1.04);
}

.gallery-card.is-stale-media {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity .18s ease, transform .18s ease;
}

/* Video-/Bild-Kacheln niemals verschwinden lassen, wenn nur die Vorschau nicht geladen werden kann */
.media-preview-error {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.media-card.media-preview-error .image-button,
.card.media-preview-error .image-button {
    position: relative;
    background: rgba(95, 21, 21, 0.55);
}

.media-card.media-preview-error .image-button::after,
.card.media-preview-error .image-button::after {
    content: "Vorschau nicht verfügbar – Download nutzen";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 7px;
    border-radius: 10px;
    background: rgba(95, 21, 21, 0.92);
    color: rgb(245, 225, 165);
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    pointer-events: none;
}

/* Video-Kacheln: immer sichtbar und eindeutig erkennbar, auch ohne Browser-Vorschau */
#grid .is-video-button {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(245, 225, 165, 0.20), rgba(95, 21, 21, 0.52)),
        rgba(160, 150, 100, 0.72);
}

#grid .is-video-button video {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background:
        radial-gradient(circle at center, rgba(245, 225, 165, 0.20), rgba(95, 21, 21, 0.52)),
        rgba(160, 150, 100, 0.72);
}

#grid .is-video-button .video-badge {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(95, 21, 21, 0.88);
    color: rgb(245, 225, 165);
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 8px 22px rgba(0,0,0,.28);
    pointer-events: none;
}

#grid .is-video-button .video-preview-label {
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: 7px;
    z-index: 4;
    padding: 6px 8px;
    border-radius: 9px;
    background: rgba(95, 21, 21, 0.86);
    color: rgb(245, 225, 165);
    font-size: 11px;
    font-weight: bold;
    line-height: 1.15;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

/* Video-Fallback: echte aktuelle Klassen aus der Galerie */
.gallery-card .grid-media-button {
    position: relative;
    overflow: hidden;
}

.gallery-card .grid-media-button video.media-preview-error,
.gallery-card .grid-media-button video.grid-img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background:
        radial-gradient(circle at center, rgba(245, 225, 165, 0.22), rgba(95, 21, 21, 0.58)),
        rgba(160, 150, 100, 0.78) !important;
}

/* Play-Icon immer anzeigen */
.gallery-card .grid-media-button .video-badge {
    position: absolute !important;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: grid !important;
    place-items: center;
    background: rgba(95, 21, 21, 0.9);
    color: rgb(245, 225, 165);
    font-size: 26px;
    font-weight: bold;
    box-shadow: 0 8px 22px rgba(0,0,0,.32);
    pointer-events: none;
}

/* Wenn Browser keine Vorschau rendern kann: Hinweis auf die Kachel legen */
.gallery-card .grid-media-button:has(video.media-preview-error)::after {
    content: "Video öffnen oder downloaden";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 6;
    padding: 7px 8px;
    border-radius: 10px;
    background: rgba(95, 21, 21, 0.9);
    color: rgb(245, 225, 165);
    font-size: 12px;
    font-weight: bold;
    line-height: 1.15;
    text-align: center;
    pointer-events: none;
}

/* Loader bei Fehler-Vorschau ausblenden, sonst wirkt es wie dauerhaftes Laden */
.gallery-card .grid-media-button:has(video.media-preview-error) .media-loader {
    display: none !important;
}

/* Saubere Video-Kachel: kein fetter Textblock mehr */
.gallery-card .grid-media-button {
    position: relative;
    overflow: hidden;
}

.gallery-card .grid-media-button video.grid-img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background:
        radial-gradient(circle at center, rgba(245, 225, 165, 0.14), rgba(95, 21, 21, 0.50)),
        rgba(160, 150, 100, 0.72) !important;
}

/* Play-Kreis bleibt, aber dezenter */
.gallery-card .grid-media-button .video-badge {
    position: absolute !important;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: grid !important;
    place-items: center;
    background: rgba(95, 21, 21, 0.82);
    color: rgb(245, 225, 165);
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 8px 22px rgba(0,0,0,.32);
    pointer-events: none;
}

/* Den hässlichen Hinweis-Text wieder entfernen/überschreiben */
.gallery-card .grid-media-button:has(video.media-preview-error)::after {
    content: "" !important;
    display: none !important;
}

/* Wenn Vorschau fehlt, trotzdem nicht leer wirken lassen */
.gallery-card .grid-media-button:has(video.media-preview-error) {
    background:
        radial-gradient(circle at center, rgba(245, 225, 165, 0.18), rgba(95, 21, 21, 0.58)),
        rgba(160, 150, 100, 0.78) !important;
}

/* Loader weg, wenn Video-Vorschau nicht kommt */
.gallery-card .grid-media-button:has(video.media-preview-error) .media-loader {
    display: none !important;
}

/* Finale stabile Video-Kachel ohne Browser-Preview */
.video-download-placeholder {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 9px 9px 0 0;
    background:
        radial-gradient(circle at center, rgba(245, 225, 165, 0.20), rgba(95, 21, 21, 0.58)),
        rgba(160, 150, 100, 0.78) !important;
    color: rgb(245, 225, 165);
    text-align: center;
    box-sizing: border-box;
    padding: 12px;
}

.video-placeholder-play {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(95, 21, 21, 0.88);
    color: rgb(245, 225, 165);
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 8px 22px rgba(0,0,0,.32);
}

.video-placeholder-text {
    max-width: 95%;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(95, 21, 21, 0.82);
    color: rgb(245, 225, 165);
    font-size: 11px;
    font-weight: bold;
    line-height: 1.18;
}

/* Alte Video-Vorschau-Elemente optisch neutralisieren, falls Browser noch Cache hat */
.gallery-card video.media-preview-error {
    display: none !important;
}

/* FINAL: stabile Video-Kachel ohne echten Video-Player im Grid */
.video-download-placeholder {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 9px 9px 0 0;
    background:
        radial-gradient(circle at center, rgba(245, 225, 165, 0.20), rgba(95, 21, 21, 0.58)),
        rgba(160, 150, 100, 0.78) !important;
    color: rgb(245, 225, 165);
    text-align: center;
    box-sizing: border-box;
    padding: 12px;
}

.video-placeholder-play {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(95, 21, 21, 0.88);
    color: rgb(245, 225, 165);
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 8px 22px rgba(0,0,0,.32);
}

.video-placeholder-text {
    max-width: 95%;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(95, 21, 21, 0.82);
    color: rgb(245, 225, 165);
    font-size: 11px;
    font-weight: bold;
    line-height: 1.18;
}

/* FINAL: stabile Video-Kachel ohne echten Video-Player im Grid */
.video-download-placeholder {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 9px 9px 0 0;
    background:
        radial-gradient(circle at center, rgba(245, 225, 165, 0.20), rgba(95, 21, 21, 0.58)),
        rgba(160, 150, 100, 0.78) !important;
    color: rgb(245, 225, 165);
    text-align: center;
    box-sizing: border-box;
    padding: 12px;
}

.video-placeholder-play {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(95, 21, 21, 0.88);
    color: rgb(245, 225, 165);
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 8px 22px rgba(0,0,0,.32);
}

.video-placeholder-text {
    max-width: 95%;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(95, 21, 21, 0.82);
    color: rgb(245, 225, 165);
    font-size: 11px;
    font-weight: bold;
    line-height: 1.18;
}

/* FINAL FIX: Nur kaputte Video-Vorschau bekommt Text, normale Videos bleiben normal */
.gallery-card .grid-media-button:has(video.media-preview-error) .video-badge {
    display: none !important;
}

.gallery-card .grid-media-button:has(video.media-preview-error)::after {
    content: "Abspielen funktioniert aktuell nicht! Bitte Video downloaden.";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 10;
    padding: 8px;
    border-radius: 10px;
    background: rgba(95, 21, 21, 0.9);
    color: rgb(245, 225, 165);
    font-size: 12px;
    font-weight: bold;
    line-height: 1.15;
    text-align: center;
    pointer-events: none;
}

.gallery-card .grid-media-button:has(video.media-preview-error) .media-loader {
    display: none !important;
}

/* Nur bei kaputter Video-Vorschau: kleiner Hinweis statt Playbutton */
.grid-media-button {
    position: relative;
    overflow: hidden;
}

.grid-media-button.media-preview-error .video-badge {
    display: none !important;
}

.media-error-text {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 20;
    padding: 8px;
    border-radius: 10px;
    background: rgba(95, 21, 21, 0.92);
    color: rgb(245, 225, 165);
    font-size: 12px;
    font-weight: bold;
    line-height: 1.15;
    text-align: center;
    pointer-events: none;
}

.grid-media-button.media-preview-error .media-loader {
    display: none !important;
}

/* FINAL: Fehlertext mittig, Download-Buttons gleich hoch */
.gallery-card {
    display: flex;
    flex-direction: column;
}

.gallery-card .grid-media-button {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.gallery-card .grid-media-button .grid-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-card .grid-media-button.media-preview-error .video-badge {
    display: none !important;
}

.gallery-card .grid-media-button.media-preview-error .media-error-text {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    z-index: 20;
    width: calc(100% - 22px);
    min-height: 58px;
    padding: 8px 10px;
    box-sizing: border-box;
    border-radius: 12px;
    background: rgba(95, 21, 21, 0.92);
    color: rgb(245, 225, 165);
    font-size: 12px;
    font-weight: bold;
    line-height: 1.15;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gallery-card .media-download-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    box-sizing: border-box;
    margin-top: 0;
}

/* FINAL: Alle Download-Buttons in der öffentlichen Galerie exakt gleich */
.gallery-card .media-download-btn,
.gallery-card.media-preview-error .media-download-btn,
.gallery-card:has(.media-preview-error) .media-download-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;

    margin: 7px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;

    border-radius: 8px !important;
    background: rgb(160, 150, 100) !important;
    color: rgb(95, 21, 21) !important;

    font-family: "Comic Sans MS", sans-serif !important;
    font-size: 13px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
}

/* Kachel-Höhe für alle Medien gleich halten */
.gallery-card .grid-media-button {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Fehlertext darf den Button nicht beeinflussen */
.gallery-card .grid-media-button.media-preview-error .media-error-text {
    pointer-events: none !important;
    margin: 0 !important;
}

/* ABSOLUT FINAL: Alle Galerie-Karten gleiche Höhe, egal ob Video ok oder Fehler */
#grid .gallery-card {
    display: grid !important;
    grid-template-rows: 124px 31px !important;
    row-gap: 7px !important;
    width: 124px !important;
    height: 162px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#grid .gallery-card .grid-media-button {
    grid-row: 1 !important;
    width: 124px !important;
    height: 124px !important;
    min-height: 124px !important;
    max-height: 124px !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border-radius: 8px !important;
}

#grid .gallery-card .grid-media-button .grid-img,
#grid .gallery-card .grid-media-button video,
#grid .gallery-card .grid-media-button img {
    width: 124px !important;
    height: 124px !important;
    min-height: 124px !important;
    max-height: 124px !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    display: block !important;
    box-sizing: border-box !important;
}

#grid .gallery-card .media-download-btn {
    grid-row: 2 !important;
    width: 124px !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 8px !important;
    background: rgb(160, 150, 100) !important;
    color: rgb(95, 21, 21) !important;
    font-family: "Comic Sans MS", sans-serif !important;
    font-size: 13px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
}

/* Fehlertext exakt in der 124px-Vorschaufläche zentrieren */
#grid .gallery-card .grid-media-button.media-preview-error .media-error-text {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 96px !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
}
