.sv-gallery .gallery-heading,.sv-gallery #inhalt.gallery-grid{box-sizing:border-box;background:#fcfffb;border:1px solid #c6c8d0;position:relative;margin-left:0!important;width:auto;color:#535660}
.sv-gallery .gallery-heading{top:-100px!important;padding:24px 26px 12px;border-radius:18px 18px 0 0;border-bottom:0}
.sv-gallery .gallery-heading h3{margin:0 0 12px;color:#292d76;font-size:26px}
.sv-gallery .gallery-heading p{margin:12px 0 0;font-size:14px}
.sv-gallery .gallery-heading nav{line-height:1.7;overflow-wrap:anywhere}
.sv-gallery #inhalt.gallery-grid{top:-100px!important;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:18px;padding:20px 26px 26px;border-top:0;border-radius:0 0 18px 18px}
.sv-gallery #inhalt[style*="display: none"]{display:none!important}
.sv-gallery .gallery-tile{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px;border:1px solid #dce0e8;border-radius:14px;text-decoration:none;background:white;color:#292d76;transition:box-shadow .15s}
.sv-gallery .gallery-tile:hover{box-shadow:0 4px 16px #292d761a;border-color:#9296b2}
.sv-gallery .gallery-tile strong{font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.sv-gallery .gallery-tile small{font-size:13px;color:#606471;margin-top:auto}
.sv-gallery .gallery-thumb{position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;background:#f1f2f7;border-radius:9px;overflow:hidden}
.sv-gallery .gallery-thumb img{display:block;width:100%;height:100%;object-fit:contain}
.sv-gallery .gallery-symbol{display:flex;align-items:center;justify-content:center;height:135px;font-size:52px;color:#292d76}
.sv-gallery .gallery-badge{position:absolute;bottom:7px;left:7px;background:#292d76;color:white;border-radius:6px;padding:3px 8px;font-size:13px}
.sv-gallery a:focus-visible,.sv-gallery button:focus-visible{outline:3px solid #8389ce;outline-offset:3px}
.sv-gallery #divfoot{top:-100px!important}
body.gallery-viewing{overflow:hidden}
#gallery-viewer{box-sizing:border-box;width:min(1200px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:16px;border:1px solid #c6c8d0;border-radius:18px;background:#fcfffb;color:#292d76;box-shadow:0 16px 60px #0005}
#gallery-viewer::backdrop{background:rgba(12,15,35,.85)}
#gallery-viewer .gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:4px 0}
#gallery-caption{margin:0;font-size:18px;font-weight:bold;overflow-wrap:anywhere}
#gallery-viewer button{flex-shrink:0;border:0;border-radius:10px;background:#292d76;color:white;width:44px;height:44px;font-size:28px;cursor:pointer}
#gallery-viewer button:disabled{opacity:.3;cursor:default}
#gallery-viewer .gallery-stage{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:12px;margin:12px 0}
#gallery-media{height:min(70dvh,740px);display:flex;align-items:center;justify-content:center;min-width:0;background:#111421;border-radius:10px;overflow:hidden}
#gallery-media img,#gallery-media video{width:100%;height:100%;object-fit:contain}
#gallery-media audio{width:90%}
#gallery-original{color:#292d76;font-size:14px;text-align:right}
#gallery-counter{white-space:nowrap}
#gallery-error{font-size:14px}
@media(max-width:650px){
.sv-gallery .gallery-heading{padding:20px 16px 12px;top:-30px!important}
.sv-gallery #inhalt.gallery-grid{top:-30px!important;padding:16px;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
.sv-gallery .gallery-tile{padding:8px}
.sv-gallery .gallery-symbol{height:100px}
.sv-gallery #divfoot{top:-30px!important}
#gallery-viewer{padding:12px}
#gallery-caption{font-size:15px}
#gallery-viewer .gallery-stage{grid-template-columns:44px minmax(0,1fr) 44px;gap:8px}
#gallery-media{grid-column:1/-1;grid-row:1;height:60dvh}
#gallery-prev{grid-column:1;grid-row:2}#gallery-next{grid-column:3;grid-row:2}
}

/* Externe Links im gemeinsamen Seitendesign. */
#WWWwarn {
    box-sizing:border-box;
    width:calc(100% - 24px) !important;
    max-width:800px !important;
    height:auto !important;
    padding:24px !important;
    background:#fcfffb !important;
    border:1px solid #c6c8d0 !important;
    border-radius:18px !important;
    box-shadow:0 8px 28px rgba(41,45,118,.09);
    color:#535660;
    font-size:16px;
    line-height:1.6;
    overflow-wrap:anywhere;
}
#WWWwarn > table,
#WWWwarn > [data-ki-close] {
    width:100%;
    margin:0 0 20px;
    padding:0 0 16px !important;
    border-bottom:1px solid #e0e2e9;
    color:#292d76;
    font-size:22px;
    line-height:1.35;
    text-decoration:none !important;
}
#WWWwarn > table { border-spacing:0; }
#WWWwarn > table td { padding:0; vertical-align:middle; }
#WWWwarn > table td:first-child { padding-right:16px; }
#WWWwarn > table a,
#WWWwarn > [data-ki-close] > strong:last-child {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    box-sizing:border-box;
    width:42px;
    height:42px;
    margin-left:12px;
    border:1px solid #dcdeea;
    border-radius:8px;
    background:#f0f1f7;
    color:#292d76;
    font-size:18px;
    text-decoration:none;
}
#WWWwarn > table a:hover,
#WWWwarn > [data-ki-close]:hover > strong:last-child { background:#e2e4f0; }
#WWWwarn > div,
#WWWwarn #bund-ki-text {
    padding:0 !important;
    margin:0 !important;
    background:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    line-height:1.6 !important;
}
#WWWwarn > div > table { width:100%; border-spacing:0; }
#WWWwarn > div > table td { padding:0; text-align:left; }
#WWWwarn img[src$="fehle_transr.gif"] { width:40px; height:auto; margin:4px 14px 8px 0 !important; }
#WWWwarn a[title="Externe Webseite"] {
    display:inline-block;
    box-sizing:border-box;
    max-width:100%;
    padding:11px 18px;
    border:1px solid #292d76;
    border-radius:8px;
    background:#292d76;
    color:white !important;
    font-weight:bold;
    text-align:center;
    text-decoration:none !important;
}
#WWWwarn a[title="Externe Webseite"] u { text-decoration:none; }
#WWWwarn a[title="Externe Webseite"]:hover { background:#1e225c; }
#WWWwarn :focus-visible { outline:3px solid #967322; outline-offset:3px; }
@media(max-width:600px) {
    #WWWwarn { padding:20px !important; }
    #WWWwarn > table,#WWWwarn > [data-ki-close] { font-size:20px; }
    #WWWwarn a[title="Externe Webseite"] { width:100%; }
}

.sv-gallery .gallery-heading nav a{color:#292d76;text-decoration:underline;background:transparent}

@media(max-width:950px){.sv-gallery .gallery-heading,.sv-gallery #inhalt.gallery-grid,.sv-gallery #divfoot{top:-30px!important}}
