:root {
  --bg: #f6f8fb;
  --surface: rgba(255,255,255,.88);
  --surface-solid: #fff;
  --text: #101828;
  --muted: #667085;
  --line: rgba(16,24,40,.12);
  --primary: #3157ff;
  --primary-2: #00b894;
  --dark: #10182f;
  --danger: #e11d48;
  --shadow: 0 18px 48px rgba(16,24,40,.10);
  --radius: 5px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
.skip-link { position: absolute; left: -999px; top: 10px; background: #fff; padding: .6rem 1rem; border-radius: 6px; z-index: 1000; }
.skip-link:focus { left: 10px; }
.site-header { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 100; width: min(1160px, calc(100% - 28px)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .8rem; border: 1px solid rgba(255,255,255,.34); background: rgba(255,255,255,.74); backdrop-filter: blur(18px); border-radius: 6px; box-shadow: 0 12px 34px rgba(16,24,40,.11); }
.brand { display: inline-flex; align-items: center; gap: .62rem; font-weight: 900; letter-spacing: -.025em; padding: .28rem .55rem; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 5px; background: linear-gradient(135deg, #10182f, #00b894); box-shadow: 0 10px 22px rgba(16,24,40,.18); overflow: hidden; }
.brand-mark img { width: 42px; height: 42px; display: block; }
.brand-title { font-size: 1.18rem; }
.main-nav { display: flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .94rem; }
.main-nav a { padding: .7rem .86rem; border-radius: 6px; color: rgba(16,24,40,.82); }
.main-nav a:hover { background: rgba(49,87,255,.08); color: var(--primary); }
.nav-donate { background: var(--dark) !important; color: white !important; }
.nav-toggle { display: none; border: 0; background: #fff; width: 44px; height: 44px; border-radius: 6px; font-size: 1.35rem; }
.donation-ribbon { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: .1rem; padding: .9rem 1.05rem; border-radius: 6px; background: linear-gradient(135deg, #3157ff, #00b894); color: white; box-shadow: 0 18px 46px rgba(49,87,255,.30); }
.donation-ribbon span { font-size: .82rem; opacity: .9; }
main { padding-top: 96px; }
.has-hero main { padding-top: 0; }
.hero { --hero-opacity: 1; --hero-scale: 1; position: relative; min-height: 100svh; overflow: hidden; display: grid; place-items: center; color: white; background: #070b17; }
.hero-video, .hero-glow { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: var(--hero-opacity); transform: scale(var(--hero-scale)); transition: opacity .08s linear, transform .08s linear; }
.hero-video { filter: contrast(1.02) brightness(.86); }
.hero-glow { background: linear-gradient(180deg, rgba(7,11,23,.14), rgba(7,11,23,.66)); }
.hero-content { position: relative; z-index: 2; width: min(1100px, calc(100% - 36px)); padding-top: 70px; }
.hero h1 { max-width: 900px; font-size: clamp(3rem, 7.8vw, 6.2rem); line-height: .95; letter-spacing: -.065em; margin: .08em 0 .2em; }
.hero p { max-width: 640px; font-size: clamp(1.02rem, 1.8vw, 1.25rem); color: rgba(255,255,255,.84); }
.eyebrow { margin: 0 0 .6rem; color: var(--primary); text-transform: uppercase; font-size: .78rem; font-weight: 850; letter-spacing: .15em; }
.hero .eyebrow { color: #86efac; }
.hero-actions, .admin-actions, .row-actions, .publish-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; color: rgba(255,255,255,.82); display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; background: rgba(255,255,255,.10); backdrop-filter: blur(10px); animation: scrollHintFloat 1.45s ease-in-out infinite; }
.scroll-hint .scroll-icon { width: 14px; height: 14px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-1px, -1px); }
@keyframes scrollHintFloat { 0%, 100% { translate: 0 0; opacity: .72; } 50% { translate: 0 7px; opacity: 1; } }
.section { width: min(1040px, calc(100% - 36px)); margin: 0 auto; padding: 18px 0; }
.section-wide { width: min(1240px, calc(100% - 36px)); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 24px; }
.section-heading.left-only { justify-content: flex-start; text-align: left; }
.section-heading.left-only h2 { text-align: left; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.12; }
h1 { font-size: clamp(1.85rem, 3.2vw, 3rem); margin: 0; }
h2 { font-size: clamp(1.42rem, 2.4vw, 2.15rem); margin: 0; }
h3 { font-size: 1.22rem; margin: 0 0 .5rem; }
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 0; border-radius: 999px; padding: .9rem 1.2rem; font-weight: 850; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--primary), #6d5dfc); box-shadow: 0 14px 30px rgba(49,87,255,.25); }
.btn-dark { color: white; background: var(--dark); }
.btn-ghost { color: var(--dark); background: rgba(16,24,40,.07); }
.btn-danger { color: white; background: var(--danger); }
.btn.small { padding: .55rem .75rem; font-size: .86rem; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card, .card, .empty-state, .admin-post-card, .comment { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(16px); overflow: hidden; }
.post-cover { aspect-ratio: 16 / 10; overflow: hidden; display: block; background: #dbe5ff; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-cover img { transform: scale(1.04); }
.post-card-body { padding: 1.15rem; }
.meta, .muted { color: var(--muted); }
.meta { font-size: .92rem; margin: .3rem 0 .7rem; }
.archive-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.archive-item { border-radius: 6px; background: #fff; border: 1px solid var(--line); padding: .65rem; box-shadow: 0 10px 24px rgba(16,24,40,.07); }
.archive-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; margin-bottom: .55rem; }
.archive-item span { display: block; font-weight: 800; }
.archive-item small { color: var(--muted); }
.donation-cta { text-align: center; background: linear-gradient(135deg, rgba(49,87,255,.12), rgba(0,184,148,.13)); border: 1px solid rgba(49,87,255,.15); border-radius: 6px; padding: 52px 24px; margin-bottom: 72px; }
.page-hero { width: min(1160px, calc(100% - 36px)); margin: 0 auto; padding: 140px 0 36px; }
.page-hero.slim { padding-bottom: 10px; }
.prose { font-size: 1.08rem; line-height: 1.78; }
.prose p, .prose ul, .prose ol { color: #344054; }
.prose a { color: var(--primary); font-weight: 750; text-decoration: underline; text-underline-offset: .18em; }
.prose img, .prose video { border-radius: 6px; box-shadow: 0 14px 34px rgba(16,24,40,.10); margin: 1.2rem 0; }
.blog-title { padding-bottom: 24px; }
.post-map-wrap { display: block; width: min(1040px, calc(100% - 36px)); min-height: 200px; margin: 0 auto 22px; }
.post-map { display: block; width: 100%; height: 200px; min-height: 200px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #e7edf5; }
.post-map .leaflet-control-attribution { font-size: 10px; }
.map-placeholder { width: 100%; height: 200px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #e7edf5; }
.blog-content { padding-top: 26px; }
.blog-content figure { margin: 1.15rem 0; }
.blog-content figure.post-media { width: min(360px, 100%); }
.blog-content figure.post-media img, .blog-content figure.post-media video { width: 100%; }
.blog-content img { width: min(360px, 100%); height: auto; cursor: zoom-in; }
.blog-content figcaption { color: var(--muted); font-size: .92rem; margin-top: .16rem; line-height: 1.35; }
.gallery-launch { padding-top: 0; }
.comments { padding-top: 30px; }
.comment { padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.comment time { display: block; color: var(--muted); font-size: .9rem; margin-top: .1rem; }
.comment-form { padding: 1.3rem; margin-top: 1.8rem; }
label { display: grid; gap: .45rem; font-weight: 750; margin-bottom: 1rem; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: .9rem 1rem; font: inherit; background: white; color: var(--text); }
textarea { resize: vertical; }
.form-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.donate-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; align-items: start; }
.donate-card, .bank-card, .auth-card, .user-form { padding: 1.45rem; }
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 1rem 0; }
.amount-button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 1rem; font-weight: 900; font-size: 1.2rem; cursor: pointer; }
.amount-button.active { color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.selected-amount { font-weight: 900; padding: 1rem; border-radius: 6px; background: rgba(49,87,255,.08); margin: 1rem 0; }
#paypal-button-container { opacity: .35; pointer-events: none; transition: opacity .2s; }
#paypal-button-container.ready { opacity: 1; pointer-events: auto; }
.notice { padding: 1rem; border-radius: 6px; background: #fff7ed; color: #9a3412; }
.bank-details { display: grid; grid-template-columns: 150px 1fr; gap: .7rem 1rem; }
.bank-details dt { color: var(--muted); }
.bank-details dd { margin: 0; font-weight: 800; }
.auth-page { min-height: 68vh; display: grid; place-items: center; }
.auth-card { width: min(480px, 100%); }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; gap: 24px; width: min(1320px, calc(100% - 36px)); padding-top: 130px; }
.admin-nav { position: sticky; top: 105px; align-self: start; display: grid; gap: 8px; padding: 1rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 10px 28px rgba(16,24,40,.07); }
.admin-nav a { padding: .8rem .9rem; border-radius: 6px; font-weight: 800; color: var(--muted); }
.admin-nav a.active, .admin-nav a:hover { background: rgba(49,87,255,.1); color: var(--primary); }
.admin-content { min-width: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1.3rem 0; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem; box-shadow: 0 10px 28px rgba(16,24,40,.07); }
.stat-card span { color: var(--muted); font-weight: 750; }
.stat-card strong { display: block; font-size: 1.75rem; margin-top: .35rem; }
.stat-card.wide { margin: 1rem 0; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 6px; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(16,24,40,.07); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .84rem; text-transform: uppercase; letter-spacing: .08em; }
.admin-title-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.post-list-admin { display: grid; gap: 16px; }
.admin-post-card { display: grid; grid-template-columns: 190px 1fr; gap: 1.1rem; padding: .8rem; }
.admin-post-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.toolbar { position: sticky; top: 96px; z-index: 8; display: flex; flex-wrap: wrap; gap: 6px; padding: .65rem; border: 1px solid var(--line); border-radius: 6px 8px 0 0; background: #fff; }
.toolbar button { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: .55rem .7rem; cursor: pointer; font-weight: 800; }
.wysiwyg { min-height: 560px; padding: 1.4rem; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; line-height: 1.75; font-size: 1.06rem; outline: none; }
.wysiwyg:focus { box-shadow: 0 0 0 4px rgba(49,87,255,.12); }
.wysiwyg:empty::before { content: attr(data-placeholder); color: var(--muted); }
.wysiwyg figure { margin: 1.2rem 0; }
.wysiwyg figcaption { color: var(--muted); font-size: .92rem; text-align: center; margin-top: .16rem; line-height: 1.35; }
.media-panel { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1rem; box-shadow: 0 10px 28px rgba(16,24,40,.07); max-height: calc(100vh - 120px); overflow: auto; }
.upload-drop { display: block; text-align: center; padding: 1rem; border: 2px dashed rgba(49,87,255,.35); border-radius: 6px; background: rgba(49,87,255,.06); cursor: pointer; }
.upload-drop input { display: none; }
.upload-progress { color: var(--muted); font-size: .9rem; min-height: 1.4rem; margin: .5rem 0; }
.media-list { display: grid; gap: 12px; }
.media-item { border: 1px solid var(--line); border-radius: 6px; padding: .6rem; background: #f8fafc; }
.media-item img, .media-item video { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; margin-bottom: .45rem; }
.media-item strong { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.media-item small { display: block; color: var(--muted); margin-top: .2rem; }
.compact-actions { margin-top: .55rem; }
.pill { display: inline-flex; border-radius: 999px; padding: .25rem .55rem; font-size: .78rem; font-weight: 850; background: rgba(49,87,255,.1); color: var(--primary); }
.flash { width: min(1040px, calc(100% - 36px)); margin: 104px auto -72px; padding: 1rem; border-radius: 6px; font-weight: 750; }
.flash-success { background: #ecfdf5; color: #065f46; }
.flash-error { background: #fff1f2; color: #9f1239; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; width: min(1160px, calc(100% - 36px)); margin: 0 auto; padding: 40px 0 80px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-actions { display: flex; gap: 1rem; flex-wrap: wrap; font-weight: 800; }
.slideshow-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(3,7,18,.94); display: grid; grid-template-columns: 72px 1fr 72px; grid-template-rows: 1fr auto; align-items: center; justify-items: center; color: white; }
.slide-stage { grid-column: 2; width: min(1200px, 100%); height: min(78vh, 820px); display: grid; place-items: center; }
.slide-stage img, .slide-stage video { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.slide-caption { grid-column: 1 / -1; padding: 1rem; color: rgba(255,255,255,.8); }
.slide-close, .slide-prev, .slide-next { border: 0; color: white; background: rgba(255,255,255,.14); border-radius: 50%; width: 52px; height: 52px; font-size: 2rem; cursor: pointer; }
.slide-close { position: absolute; right: 24px; top: 24px; }
.empty-state { padding: 2rem; }
.image-lightbox { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 28px; background: rgba(3,7,18,.92); cursor: zoom-out; }
.image-lightbox img { max-width: min(1200px, 96vw); max-height: 90vh; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.image-lightbox button { position: fixed; top: 22px; right: 22px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 2rem; cursor: pointer; }

@media (max-width: 960px) {
  .nav-toggle { display: grid; place-items: center; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 66px; padding: .8rem; background: rgba(255,255,255,.96); border-radius: 6px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .main-nav.open { display: flex; }
  .post-grid, .donate-layout, .admin-shell, .editor-layout, .stats-grid { grid-template-columns: 1fr; }
  .admin-nav, .media-panel, .toolbar { position: static; }
  .admin-shell { padding-top: 120px; }
  .admin-post-card { grid-template-columns: 1fr; }
  .form-grid.two, .amount-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}
@media (max-width: 680px) {
  .hero h1 { font-size: 3.15rem; }
  .donation-ribbon { left: 18px; right: 18px; bottom: 14px; }
  .post-map { height: 200px; }
  .slideshow-overlay { grid-template-columns: 54px 1fr 54px; }
  .section-heading { display: block; }
}

/* Feinschliff Juni 2026 */
:root { --radius: 5px; }
#blog { scroll-margin-top: 112px; }
.site-header { border-radius: 6px; }
.main-nav { gap: .22rem; font-size: .91rem; }
.main-nav a { padding: .62rem .72rem; border-radius: 6px; }
.nav-toggle,
.skip-link,
.donation-ribbon,
.archive-item,
.archive-item img,
.donation-cta,
.prose img,
.prose video,
.post-map,
.map-placeholder,
input,
textarea,
select,
.amount-button,
.selected-amount,
.notice,
.admin-nav,
.admin-nav a,
.stat-card,
.table-wrap,
.admin-post-card img,
.toolbar,
.toolbar button,
.wysiwyg,
.media-panel,
.upload-drop,
.media-item,
.media-item img,
.media-item video,
.flash,
.slide-stage img,
.slide-stage video,
.image-lightbox img { border-radius: 6px; }
.post-card, .card, .empty-state, .admin-post-card, .comment { border-radius: var(--radius); }

.post-map-wrap { display: block; width: min(1040px, calc(100% - 36px)); min-height: 200px; margin-left: auto; margin-right: auto; }
.post-map { height: 200px; cursor: grab; }
.post-map:active { cursor: grabbing; }
.post-map .leaflet-control-container a { text-decoration: none; }
.route-section { padding-top: 18px; }
.route-map-wrap { width: 100%; margin: 0 auto 14px; }
.route-map { width: 100%; height: 240px; }
.route-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .9rem; }

.blog-title .edit-post-button { margin-top: .8rem; }
.blog-content a,
.wysiwyg a,
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: .18em; font-weight: 750; cursor: pointer; pointer-events: auto; position: relative; z-index: 1; }
.blog-content a:hover,
.wysiwyg a:hover,
.prose a:hover { color: #163bd6; }
.blog-content img { position: relative; z-index: 0; }
.blog-content figure { margin: 1rem 0; }
.blog-content figcaption { margin-top: 0; line-height: 1.18; }
.wysiwyg figcaption { margin-top: .28rem; line-height: 1.3; }
.wysiwyg figure { margin: 1.05rem 0; }

.sortable-media-list .media-item { position: relative; padding-top: 2.15rem; cursor: grab; transition: transform .12s ease, opacity .12s ease, border-color .12s ease; }
.sortable-media-list .media-item:active { cursor: grabbing; }
.media-item.dragging { opacity: .55; border-color: var(--primary); transform: scale(.985); }
.media-drag-handle { position: absolute; top: .45rem; right: .5rem; width: 1.35rem; height: 1.35rem; display: grid; place-items: center; border-radius: 5px; background: rgba(16,24,40,.08); color: var(--muted); font-weight: 900; user-select: none; }
.media-drag-handle:hover { color: var(--primary); background: rgba(49,87,255,.12); }

@media (max-width: 920px) {
  .route-map { height: 220px; }
  .main-nav a { padding: .72rem .8rem; }
}

.blog-content img[data-full] { cursor: zoom-in; }
.media-item img { background: #eef2f7; }

/* Leaflet-Fallback: notwendig, falls die externe Leaflet-CSS nicht geladen wird.
   Ohne diese Regeln erscheinen die Kartenkacheln als kleines Bild in der Mitte. */
.leaflet-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #dbe4ef;
  outline-offset: 1px;
  touch-action: none;
}
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}
.leaflet-tile {
  width: 256px;
  height: 256px;
  filter: inherit;
  visibility: hidden;
}
.leaflet-tile-loaded {
  visibility: inherit;
}
.leaflet-zoom-box {
  width: 0;
  height: 0;
  box-sizing: border-box;
  z-index: 800;
}
.leaflet-overlay-pane svg {
  user-select: none;
}
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control { float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-control-zoom {
  border: 1px solid rgba(16,24,40,.18);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16,24,40,.14);
}
.leaflet-control-zoom a {
  display: block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  text-decoration: none !important;
  color: #101828;
  background: #fff;
  font-size: 18px;
  font-weight: 800;
  border-bottom: 1px solid rgba(16,24,40,.12);
}
.leaflet-control-zoom a:last-child { border-bottom: 0; }
.leaflet-control-zoom a:hover { background: #f2f5fa; }
.leaflet-control-attribution {
  padding: 2px 6px;
  background: rgba(255,255,255,.82);
  color: #334155;
  font-size: 10px;
}
.leaflet-control-attribution a {
  color: #3157ff;
  text-decoration: underline;
}
.leaflet-interactive { cursor: pointer; }
.leaflet-popup {
  position: absolute;
  text-align: center;
  margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
  padding: 1px;
  text-align: left;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16,24,40,.22);
}
.leaflet-popup-content {
  margin: 10px 12px;
  line-height: 1.35;
  font-size: .9rem;
}
.leaflet-popup-tip-container {
  width: 40px;
  height: 20px;
  position: absolute;
  left: 50%;
  margin-left: -20px;
  overflow: hidden;
  pointer-events: none;
}
.leaflet-popup-tip {
  width: 14px;
  height: 14px;
  padding: 1px;
  margin: -7px auto 0;
  transform: rotate(45deg);
  background: #fff;
  box-shadow: 0 8px 22px rgba(16,24,40,.22);
}


/* Karten-Fix: stabile Groesse und korrekte Leaflet-Kacheln trotz globaler img-Regeln. */
.post-map-wrap { display: block; min-height: 200px; }
.post-map { display: block; height: 200px; min-height: 200px; }
.route-map { height: 240px; min-height: 240px; }
.map-placeholder-panel {
  display: grid;
  place-items: center;
  height: 200px;
  min-height: 200px;
  background: #e7edf5 url('/assets/img/map-placeholder-bike.svg') center / cover no-repeat;
}
.map-placeholder-panel::after {
  content: '';
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, rgba(231,237,245,.12), rgba(231,237,245,.04));
}
.leaflet-container img,
.leaflet-container video,
.leaflet-container canvas {
  max-width: none !important;
  max-height: none !important;
}
.leaflet-container img.leaflet-tile {
  width: 256px !important;
  height: 256px !important;
}
.leaflet-container .leaflet-control-container a {
  color: #101828;
  pointer-events: auto;
}

/* Leaflet-SRI-Fix: Attribution dezent halten, aber OSM-Hinweis erhalten. */
.leaflet-container { font: inherit; }
.leaflet-control-attribution { border-radius: 4px 0 0 0; opacity: .82; }
.leaflet-control-attribution:hover { opacity: 1; }

/* Robustheits-Fix Karte: Kacheln immer sichtbar lassen. Manche Browser/CDN-Kombinationen
   setzen die Leaflet-Ladeklasse erst spät; visibility:hidden erzeugt dann scheinbar leere Karten. */
.leaflet-container .leaflet-tile,
.leaflet-tile,
.leaflet-tile-loaded {
  visibility: visible !important;
  opacity: 1 !important;
}
.leaflet-container .leaflet-layer,
.leaflet-container .leaflet-tile-pane,
.leaflet-container .leaflet-map-pane {
  width: 100%;
  height: 100%;
}
.post-map.map-loading::before,
.route-map.map-loading::before {
  content: 'Karte wird geladen …';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #475467;
  font-weight: 800;
  background: #e7edf5;
  z-index: 1;
}
.post-map.map-ready::before,
.route-map.map-ready::before { content: none; }
.map-error-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #475467;
  font-weight: 800;
  background: #e7edf5;
  z-index: 2;
}
.map-tile-error::after {
  content: 'Kartenkacheln konnten nicht geladen werden';
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1001;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,.86);
  color: #475467;
  font-size: 11px;
}

/* Robuste Karten ohne Leaflet-Abhaengigkeit */
.ct-map {
  position: relative;
  overflow: hidden;
  background: #dbe4ef;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.ct-map.ct-map-dragging { cursor: grabbing; }
.ct-map-tiles,
.ct-map-points {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ct-map-tile {
  position: absolute !important;
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: initial !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none;
}
.ct-map-point {
  position: absolute;
  z-index: 20;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239,68,68,.42), 0 5px 12px rgba(16,24,40,.25);
  cursor: pointer;
  padding: 0;
}
.ct-map-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 30;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(16,24,40,.18);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16,24,40,.14);
}
.ct-map-controls button {
  width: 31px;
  height: 31px;
  border: 0;
  border-bottom: 1px solid rgba(16,24,40,.12);
  background: #fff;
  color: #101828;
  font-size: 19px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}
.ct-map-controls button:last-child { border-bottom: 0; }
.ct-map-controls button:hover { background: #f2f5fa; }
.ct-map-attribution {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 2px 6px;
  border-radius: 5px 0 0 0;
  background: rgba(255,255,255,.82);
  color: #334155;
  font-size: 10px;
  line-height: 1.35;
}
.ct-map-attribution a { color: #3157ff; text-decoration: underline; }
.ct-map-popup {
  position: absolute;
  z-index: 40;
  transform: translate(-50%, calc(-100% - 12px));
  max-width: min(260px, calc(100% - 34px));
  padding: .45rem .6rem;
  border-radius: 5px;
  background: #fff;
  color: #101828;
  box-shadow: 0 10px 26px rgba(16,24,40,.22);
  font-size: .88rem;
  font-weight: 750;
  pointer-events: none;
}
.ct-map-popup::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
}
.map-tile-error::after {
  content: 'Kartenkacheln konnten nicht geladen werden.';
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 35;
  padding: .35rem .5rem;
  border-radius: 5px;
  background: rgba(255,255,255,.9);
  color: #7f1d1d;
  font-size: .78rem;
  font-weight: 750;
}

/* Patch: Upload-Fortschritt, 300px-Karten, klickbare GPS-Bilder */
.post-map-wrap {
  min-height: 300px !important;
}
.post-map,
.route-map,
.map-placeholder,
.map-placeholder-panel {
  height: 300px !important;
  min-height: 300px !important;
}
@media (max-width: 680px) {
  .post-map,
  .route-map,
  .map-placeholder,
  .map-placeholder-panel {
    height: 300px !important;
    min-height: 300px !important;
  }
}

.upload-progress {
  display: none;
  gap: .42rem;
  margin: .6rem 0 1rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}
.upload-progress.active {
  display: grid;
}
.upload-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16,24,40,.10);
}
.upload-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width .16s ease;
}
.upload-progress.success .upload-progress-text { color: #047857; font-weight: 750; }
.upload-progress.error .upload-progress-text { color: #b42318; font-weight: 750; white-space: pre-line; }
.upload-progress.error .upload-progress-bar { background: var(--danger); }

.ct-map-point:hover,
.ct-map-point:focus-visible {
  width: 18px;
  height: 18px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.92), 0 0 0 6px rgba(239,68,68,.38), 0 8px 18px rgba(16,24,40,.28);
}
.image-lightbox {
  grid-template-rows: 1fr auto;
}
.image-lightbox img {
  align-self: end;
  max-height: calc(92vh - 64px);
}
.image-lightbox-caption {
  align-self: start;
  max-width: min(1200px, 96vw);
  margin-top: .55rem;
  padding: .45rem .75rem;
  border-radius: 5px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
  font-size: .95rem;
  text-align: center;
  cursor: default;
}

.blog-content a[href],
.prose a[href] {
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
}
.blog-content a:not([href]) {
  color: inherit;
  text-decoration: none;
  cursor: text;
}
.blog-content figcaption { margin-top: -.05rem !important; }
.wysiwyg figcaption { margin-top: .24rem !important; }


/* Patch: Header-Logo, neutraler Hero-Film, Link-/Kartenkorrekturen */
.blog-content a[href], .wysiwyg a[href], .editor-link[href] {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}
.blog-content a:not([href]), .wysiwyg a:not([href]) {
  color: #b42318;
  text-decoration: underline dotted;
}
.ct-map-points { z-index: 12; pointer-events: none; }
.ct-map-point { pointer-events: auto; }
@media (max-width: 760px) {
  .brand-mark { width: 43px; height: 43px; }
  .brand-mark img { width: 38px; height: 38px; }
  .brand-title { font-size: 1.05rem; }
}

/* Patch: kompaktere Bildansicht, Upload-Gesamtfortschritt und luftigere Admin-Ansicht */
.hero-video { filter: none !important; }
.hero-glow { background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.50)) !important; }

.image-lightbox {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px !important;
  background: rgba(15, 23, 42, .58) !important;
  cursor: zoom-out;
}
.image-lightbox-panel {
  position: relative;
  display: inline-grid;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  border-radius: 5px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .42);
  cursor: default;
}
.image-lightbox-panel img,
.image-lightbox img {
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100vh - 112px) !important;
  object-fit: contain;
  border-radius: 0 !important;
  box-shadow: none !important;
  align-self: auto !important;
}
.image-lightbox-caption {
  align-self: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: .55rem .8rem !important;
  border-radius: 0 !important;
  background: rgba(17, 24, 39, .96) !important;
  color: rgba(255,255,255,.94) !important;
  font-size: .92rem;
  line-height: 1.35;
  text-align: center;
}
.image-lightbox-close,
.image-lightbox button {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  z-index: 2;
  width: 38px !important;
  height: 38px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, .72) !important;
  color: #fff !important;
  font-size: 1.7rem !important;
  line-height: 1 !important;
  cursor: pointer;
}
.image-lightbox-close:hover,
.image-lightbox button:hover { background: rgba(15, 23, 42, .92) !important; }

.upload-progress.active {
  display: grid;
  padding: .75rem .8rem;
  border: 1px solid rgba(16,24,40,.10);
  border-radius: 5px;
  background: #f8fafc;
}
.upload-progress-track { height: 9px; background: rgba(16,24,40,.09); }
.upload-progress.processing .upload-progress-bar {
  background-image: linear-gradient(90deg, var(--primary), var(--primary-2), var(--primary));
  background-size: 200% 100%;
  animation: uploadProgressMove 1.05s linear infinite;
}
.upload-drop:has(input:disabled) {
  opacity: .62;
  cursor: progress;
}
@keyframes uploadProgressMove {
  from { background-position: 0 0; }
  to { background-position: 200% 0; }
}

.admin-shell {
  grid-template-columns: 260px minmax(0, 1fr) !important;
  gap: 36px !important;
  width: min(1360px, calc(100% - 56px)) !important;
  padding-top: 150px !important;
  padding-bottom: 72px;
}
.admin-nav {
  padding: 1.25rem !important;
  gap: 10px !important;
  top: 116px !important;
}
.admin-nav a {
  padding: .95rem 1rem !important;
}
.admin-content {
  display: block;
  min-width: 0;
}
.admin-content > .eyebrow {
  margin-bottom: .9rem;
}
.admin-content > h1 {
  margin-bottom: 1.65rem;
}
.stats-grid {
  gap: 22px !important;
  margin: 1.8rem 0 2.1rem !important;
}
.stat-card {
  padding: 1.65rem 1.75rem !important;
}
.stat-card strong {
  margin-top: .55rem !important;
}
.admin-actions {
  margin: .35rem 0 2.05rem;
  gap: 1rem !important;
}
.admin-content h2 {
  margin: 2rem 0 .95rem;
}
.table-wrap {
  margin-top: .75rem;
}
th, td {
  padding: 1rem 1.1rem !important;
}
.admin-title-row {
  margin-bottom: 1.6rem !important;
}
.post-list-admin {
  gap: 22px !important;
}
.admin-post-card {
  gap: 1.35rem !important;
  padding: 1.05rem !important;
}
.editor-layout {
  gap: 32px !important;
}
.media-panel {
  padding: 1.25rem !important;
}
.wysiwyg {
  padding: 1.65rem !important;
}
.publish-row {
  margin-top: 1.1rem;
}
@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr !important;
    width: min(100% - 28px, 760px) !important;
    gap: 22px !important;
    padding-top: 120px !important;
  }
  .admin-nav { position: static !important; }
}

/* Patch: Galerie unter Blogtext und kompakte Diashow */
.all-images-section {
  padding-top: 10px;
  padding-bottom: 34px;
}
.all-images-title {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 900;
  cursor: pointer;
}
.all-images-title:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: .18em;
}
.all-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}
.gallery-thumb {
  display: grid;
  gap: .36rem;
  padding: .35rem;
  border: 1px solid rgba(16,24,40,.11);
  border-radius: 5px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 18px rgba(16,24,40,.06);
  cursor: zoom-in;
  text-align: left;
}
.gallery-thumb:hover {
  border-color: rgba(49,87,255,.35);
  box-shadow: 0 12px 26px rgba(49,87,255,.12);
}
.gallery-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}
.gallery-thumb span {
  min-height: 1.2em;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-slideshow.slideshow-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  background: rgba(15, 23, 42, .58) !important;
  color: #fff;
  cursor: zoom-out;
}
.slideshow-panel {
  position: relative;
  display: inline-grid;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 5px;
  background: #111827;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .42);
  cursor: default;
}
.compact-slideshow .slide-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}
.compact-slideshow .slide-stage img,
.compact-slideshow .slide-stage video {
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100vh - 112px) !important;
  object-fit: contain;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.compact-slideshow .slide-caption {
  margin: 0 !important;
  padding: .55rem .85rem !important;
  background: rgba(17, 24, 39, .96) !important;
  color: rgba(255,255,255,.94) !important;
  font-size: .9rem;
  line-height: 1.35;
  text-align: center;
}
.compact-slideshow .slide-close,
.compact-slideshow .slide-prev,
.compact-slideshow .slide-next {
  position: absolute !important;
  z-index: 2;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, .72) !important;
  color: #fff !important;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.compact-slideshow .slide-close {
  top: 8px !important;
  right: 8px !important;
  width: 38px !important;
  height: 38px !important;
  font-size: 1.7rem !important;
  line-height: 1 !important;
}
.compact-slideshow .slide-prev,
.compact-slideshow .slide-next {
  top: 50% !important;
  transform: translateY(-50%);
  width: 42px !important;
  height: 42px !important;
  font-size: 2.25rem !important;
  line-height: 1 !important;
}
.compact-slideshow .slide-prev { left: 8px !important; }
.compact-slideshow .slide-next { right: 8px !important; }
.compact-slideshow .slide-close:hover,
.compact-slideshow .slide-prev:hover,
.compact-slideshow .slide-next:hover {
  background: rgba(15, 23, 42, .92) !important;
}

@media (max-width: 680px) {
  .all-images-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
  .gallery-thumb span { display: none; }
  .compact-slideshow.slideshow-overlay { padding: 14px !important; }
  .slideshow-panel { max-width: calc(100vw - 28px); max-height: calc(100vh - 28px); }
  .compact-slideshow .slide-stage img,
  .compact-slideshow .slide-stage video {
    max-width: calc(100vw - 28px) !important;
    max-height: calc(100vh - 96px) !important;
  }
}


/* Patch: kompakte Diashow sauber in Bild + Unterzeile, Hero-Blogbutton wie Spendenbutton */
.hero-actions .btn-ghost[href="#blog"],
.hero-actions .btn-primary[href="#blog"] {
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary), #6d5dfc) !important;
  box-shadow: 0 14px 30px rgba(49,87,255,.25) !important;
}
.compact-slideshow .slideshow-panel,
.slideshow-panel {
  display: inline-grid !important;
  grid-template-columns: minmax(0, auto) !important;
  grid-template-rows: auto auto !important;
  align-items: start !important;
  justify-items: center !important;
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100vh - 48px) !important;
  overflow: visible !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
}
.compact-slideshow .slide-stage {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100vh - 96px) !important;
  display: grid !important;
  place-items: center !important;
  background: #111827 !important;
  border-radius: 5px 5px 0 0 !important;
  overflow: hidden !important;
}
.compact-slideshow .slide-stage img,
.compact-slideshow .slide-stage video {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100vh - 128px) !important;
  object-fit: contain !important;
}
.compact-slideshow .slide-caption {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: block !important;
  width: 100% !important;
  max-width: calc(100vw - 48px) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border-radius: 0 0 5px 5px !important;
  text-align: center !important;
  white-space: normal !important;
}
.compact-slideshow .slide-prev,
.compact-slideshow .slide-next {
  z-index: 5 !important;
}
.compact-slideshow .slide-close {
  z-index: 6 !important;
}

@media (max-width: 680px) {
  .compact-slideshow .slideshow-panel,
  .slideshow-panel,
  .compact-slideshow .slide-stage,
  .compact-slideshow .slide-stage img,
  .compact-slideshow .slide-stage video,
  .compact-slideshow .slide-caption {
    max-width: calc(100vw - 28px) !important;
  }
  .compact-slideshow .slide-stage img,
  .compact-slideshow .slide-stage video {
    max-height: calc(100vh - 112px) !important;
  }
}

/* Patch: aufgeraeumtes responsives Hauptmenue und Medien loeschen */
.site-header {
  width: min(1240px, calc(100% - 36px)) !important;
  padding: .72rem .92rem !important;
}
.main-nav {
  gap: .38rem !important;
  font-size: 1.03rem !important;
  font-weight: 850 !important;
  letter-spacing: -.018em;
}
.main-nav a,
.main-nav .nav-user {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .72rem .92rem !important;
  border-radius: 5px !important;
  line-height: 1;
}
.main-nav a {
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.main-nav a:hover {
  transform: translateY(-1px);
}
.nav-user {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475467;
  background: rgba(16,24,40,.055);
  cursor: default;
}
.nav-donate {
  padding-inline: 1.08rem !important;
  box-shadow: 0 10px 22px rgba(16,24,40,.16);
}
#blog,
.section-wide {
  scroll-margin-top: 118px;
}
.media-item.is-deleting {
  opacity: .55;
  pointer-events: none;
}
.media-item .btn-danger {
  background: rgba(225, 29, 72, .10);
  color: #be123c;
}
.media-item .btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

@media (max-width: 1180px) {
  .site-header {
    top: 12px;
    width: min(760px, calc(100% - 24px)) !important;
  }
  .nav-toggle {
    display: grid !important;
    place-items: center;
  }
  .main-nav {
    display: none !important;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    gap: .28rem !important;
    padding: .75rem;
    border: 1px solid rgba(16,24,40,.10);
    border-radius: 5px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 42px rgba(16,24,40,.14);
  }
  .main-nav.open {
    display: flex !important;
  }
  .main-nav a,
  .main-nav .nav-user {
    width: 100%;
    justify-content: flex-start;
    min-height: 46px;
    padding: .86rem 1rem !important;
  }
  .nav-user {
    max-width: none;
    order: 90;
  }
  .nav-donate {
    order: 99;
    justify-content: center !important;
    margin-top: .25rem;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 18px) !important;
    padding: .55rem .62rem !important;
  }
  .brand {
    gap: .5rem;
    padding-left: .1rem;
  }
  .brand-mark {
    width: 42px !important;
    height: 42px !important;
  }
  .brand-mark img {
    width: 36px !important;
    height: 36px !important;
  }
  .brand-title {
    font-size: 1.04rem !important;
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  main {
    padding-top: 112px;
  }
  .has-hero main {
    padding-top: 0;
  }
  .section,
  .section-wide,
  .page-hero {
    width: min(100% - 24px, 760px) !important;
  }
  .post-grid {
    grid-template-columns: 1fr !important;
  }
  .archive-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .row-actions.compact-actions {
    gap: .4rem;
  }
  .media-item .btn.small {
    padding: .5rem .6rem;
    font-size: .8rem;
  }
}

@media (max-width: 420px) {
  .brand-title {
    max-width: 42vw;
  }
  .archive-strip {
    grid-template-columns: 1fr;
  }
}

/* PayPal Hosted-Buttons: vereinfachte Auswahl */
.amount-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: #f4f6fb;
  color: #7d879c;
}
.amount-button[data-free-paypal] {
  grid-column: 1 / -1;
}
.paypal-donate-container.ready {
  margin-top: 1.25rem;
}

/* Patch: Spendenstand auf Startseite und manuelle Überweisungen im Adminbereich */
.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: end;
  gap: 2rem;
}
.hero-content > .eyebrow,
.hero-content > h1,
.hero-content > p,
.hero-content > .hero-actions {
  grid-column: 1;
}
.hero-donation-status {
  grid-column: 2;
  grid-row: 1 / span 4;
  align-self: end;
  justify-self: end;
  width: min(360px, 100%);
  display: grid;
  gap: .45rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  box-shadow: 0 22px 70px rgba(0,0,0,.30);
  backdrop-filter: blur(18px);
  color: #fff;
}
.hero-donation-status:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, rgba(255,255,255,.28), rgba(255,255,255,.12));
}
.hero-donation-label {
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
}
.hero-donation-status strong {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: .98;
  letter-spacing: -.06em;
}
.hero-donation-goal {
  color: rgba(255,255,255,.82);
  font-weight: 750;
}
.hero-donation-bar {
  display: block;
  height: 9px;
  margin-top: .2rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.20);
}
.hero-donation-bar i {
  display: block;
  height: 100%;
  min-width: 3%;
  border-radius: inherit;
  background: linear-gradient(90deg, #86efac, #00b894);
  box-shadow: 0 0 22px rgba(134,239,172,.45);
}
.admin-donation-form-card {
  padding: 1.45rem;
  margin: 1.3rem 0 1.5rem;
}
.manual-donation-form {
  margin-top: 1rem;
}
.donations-table-wrap table th,
.donations-table-wrap table td {
  vertical-align: top;
}
.donation-note-cell {
  max-width: 260px;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.table-actions form {
  margin: 0;
}

@media (max-width: 920px) {
  .hero-content {
    display: block;
    padding-bottom: 110px;
  }
  .hero-donation-status {
    margin-top: 1.4rem;
    width: min(420px, 100%);
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding-top: 96px;
    padding-bottom: 120px;
  }
  .hero-donation-status {
    padding: 1rem;
  }
  .hero-donation-status strong {
    font-size: 2.05rem;
  }
  .admin-donation-form-card {
    padding: 1rem;
  }
}


/* Patch: Hero-Slogan wieder zweizeilig, schwebenden Spendenbutton entfernen */
.hero-title span {
  display: block;
}
.donation-ribbon {
  display: none !important;
}
@media (max-width: 520px) {
  .hero-title span {
    display: inline;
  }
  .hero-title span + span::before {
    content: " ";
  }
}

/* Patch: Hero-Slogan auf breiten Displays wirklich zweizeilig über beide Spalten */
@media (min-width: 921px) {
  .hero-content {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  }
  .hero-content > h1,
  .hero-title {
    grid-column: 1 / -1 !important;
    max-width: min(1180px, 100%) !important;
    width: 100%;
    position: relative;
    z-index: 3;
  }
  .hero-title span {
    display: block;
  }
  .hero-title span:first-child {
    white-space: nowrap;
  }
  .hero-donation-status {
    grid-column: 2;
    grid-row: 3 / span 2;
    z-index: 4;
  }
}

@media (min-width: 921px) and (max-width: 1280px) {
  .hero h1,
  .hero-title {
    font-size: clamp(3.8rem, 7.1vw, 5.7rem) !important;
  }
}

@media (max-width: 700px) {
  .hero-title span:first-child {
    white-space: normal;
  }
}

/* Patch: FAQ-Editor und robustere WYSIWYG-Bedienung */
.faq-editor-form.card {
  padding: 0 !important;
  overflow: visible;
}
.faq-editor-note {
  display: block;
  margin: 0 !important;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  line-height: 1.55;
}
.faq-editor-form .toolbar {
  position: static !important;
  top: auto !important;
  z-index: 1 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.faq-editor-form .faq-wysiwyg {
  min-height: 520px;
  border-top: 0 !important;
  border-radius: 0 !important;
  padding-top: 1.45rem !important;
  overflow: visible;
}
.faq-editor-form .publish-row {
  margin-top: 0 !important;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.9);
}
.wysiwyg p {
  margin: 0 0 1rem;
}
.wysiwyg h2,
.wysiwyg h3 {
  margin: 1.2rem 0 .45rem;
}
.wysiwyg figure + p,
.wysiwyg figcaption + p {
  margin-top: .95rem;
}
.toolbar button[data-cmd="removeFormat"] {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .faq-editor-form .toolbar {
    gap: 5px;
    padding: .55rem !important;
  }
  .faq-editor-form .toolbar button {
    padding: .5rem .58rem;
  }
}

/* Patch: Teamseite und Spendenbescheinigung */
.form-grid.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.main-nav a[href="/team.php"] {
  white-space: nowrap;
}
.team-hero {
  padding-bottom: 1rem;
}
.team-section {
  padding-top: 1rem;
}
.team-grid-modern {
  display: grid;
  gap: 34px;
}
.team-card-modern {
  display: grid;
  grid-template-columns: minmax(280px, .88fr) minmax(0, 1.12fr);
  gap: 34px;
  align-items: start;
  padding: clamp(1.1rem, 2vw, 2rem);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(236,242,255,.76));
  box-shadow: 0 18px 48px rgba(15,23,42,.08);
  overflow: hidden;
}
.team-card-modern.reverse .team-media-stack {
  order: 2;
}
.team-media-stack {
  display: grid;
  gap: 14px;
  align-self: start;
}
.team-copy {
  align-self: start;
}
.team-photo,
.team-video,
.team-placeholder {
  width: 100%;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 14px 34px rgba(15,23,42,.14);
  background: #e8eef7;
}
.team-photo {
  aspect-ratio: 4 / 3;
  margin: 0;
}
.team-photo img,
.team-video {
  display: block;
  width: 100%;
  height: auto;
}
.team-photo img {
  height: 100%;
  object-fit: cover;
}
.team-video {
  max-height: 280px;
  background: #111827;
}
.team-placeholder {
  min-height: 240px;
  display: grid;
  place-items: center;
  font-size: 4rem;
}
.team-number {
  display: none !important;
}
.team-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}
.team-role {
  margin: .25rem 0 1.1rem;
  color: var(--muted);
  font-weight: 800;
}
.team-qa h3 {
  margin-top: 1rem;
  margin-bottom: .25rem;
  font-size: 1.08rem;
}
.team-qa p {
  margin-top: 0;
}
.team-admin-form {
  display: grid;
  gap: 22px;
}
.team-admin-intro {
  margin: .2rem 0 0;
}
.team-admin-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  padding: 1.25rem;
}
.team-admin-media {
  display: grid;
  align-content: start;
  gap: 10px;
}
.team-admin-media img,
.team-admin-media video,
.team-admin-placeholder {
  width: 100%;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #eef2ff;
}
.team-admin-media img {
  aspect-ratio: 4/3;
  object-fit: cover;
}
.team-admin-media video {
  max-height: 180px;
}
.team-admin-placeholder {
  min-height: 170px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}
.team-admin-fields {
  display: grid;
  gap: 14px;
}
.team-qa-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 220px;
}
.team-admin-submit {
  position: sticky;
  bottom: 0;
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  padding: 1rem;
}
.paypal-standard-form {
  display: grid;
  gap: 1rem;
}
.free-amount-label {
  margin-top: .25rem;
}
.receipt-request-box {
  border: 1px solid rgba(49,87,255,.16);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(49,87,255,.045);
}
.receipt-toggle-label {
  margin: 0;
  font-weight: 850;
}
.receipt-fields {
  margin-top: 1rem;
  display: grid;
  gap: 12px;
}
.receipt-fields[hidden] {
  display: none !important;
}
.donate-submit-button {
  justify-self: start;
}
.donation-receipt-cell {
  white-space: pre-line;
  min-width: 190px;
  color: var(--muted);
  font-size: .92rem;
}
.admin-receipt-box {
  background: rgba(255,255,255,.72);
}
@media (max-width: 1000px) {
  .team-card-modern,
  .team-card-modern.reverse {
    grid-template-columns: 1fr;
  }
  .team-card-modern.reverse .team-media-stack {
    order: 0;
  }
  .team-admin-card {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .form-grid.three,
  .team-card-modern,
  .team-admin-card {
    grid-template-columns: 1fr;
  }
  .team-copy h2 {
    font-size: 2rem;
  }
  .receipt-request-box {
    padding: .85rem;
  }
  .donate-submit-button {
    width: 100%;
  }
}

/* Patch: editierbare statische Seiten */
.static-page-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 1.2rem;
}
.static-page-tab {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 24px rgba(16,24,40,.06);
  color: var(--text);
}
.static-page-tab strong {
  display: block;
  margin-bottom: .3rem;
  font-size: 1.05rem;
}
.static-page-tab span {
  display: block;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}
.static-page-tab.active,
.static-page-tab:hover {
  border-color: rgba(49,87,255,.45);
  background: rgba(49,87,255,.08);
}
.static-page-editor-form.card {
  padding: 0 !important;
  overflow: visible;
}
.static-page-editor-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.86);
}
.static-page-editor-head label {
  display: block;
  margin-bottom: .65rem;
}
.static-page-editor-form .toolbar {
  position: static !important;
  top: auto !important;
  z-index: 1 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.static-page-wysiwyg {
  min-height: 500px;
  border-top: 0 !important;
  border-radius: 0 !important;
  padding-top: 1.45rem !important;
}
.static-page-editor-form .publish-row {
  margin-top: 0 !important;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.92);
}
.page-intro-content {
  max-width: 760px;
  margin: .75rem 0 0;
}
.page-intro-content :last-child {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .static-page-switcher {
    grid-template-columns: 1fr;
  }
}

/* Patch: kompaktere Kopfbereiche fuer statische Seiten */
.page-hero,
.page-hero.slim,
.page-hero.donation-page,
.team-hero {
  padding-top: clamp(30px, 4vw, 48px) !important;
  padding-bottom: clamp(10px, 1.7vw, 18px) !important;
}

.page-hero .eyebrow,
.team-hero .eyebrow {
  margin-bottom: .32rem !important;
}

.page-hero h1,
.team-hero h1 {
  margin: 0 !important;
}

.page-hero h1 + p,
.team-hero h1 + p,
.page-hero .admin-title-row + p {
  margin-top: .75rem !important;
  margin-bottom: 0 !important;
}

.page-hero .page-intro-content {
  margin-top: .95rem !important;
}

.page-hero + .section,
.page-hero + .section-wide,
.page-hero + .donate-layout,
.team-hero + .team-section {
  padding-top: clamp(12px, 2vw, 24px) !important;
}

.route-section {
  padding-top: clamp(12px, 2vw, 22px) !important;
}

.route-section + .section.prose {
  padding-top: clamp(18px, 2.4vw, 30px) !important;
}

@media (max-width: 760px) {
  .page-hero,
  .page-hero.slim,
  .page-hero.donation-page,
  .team-hero {
    padding-top: 24px !important;
    padding-bottom: 10px !important;
  }

  .page-hero + .section,
  .page-hero + .section-wide,
  .page-hero + .donate-layout,
  .team-hero + .team-section {
    padding-top: 12px !important;
  }
}

/* Spenden: zwei Bankkonten und gemeinsame Spendenbescheinigung */
.donate-section {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}
.donate-section .donate-payment-form {
  display: grid;
  gap: 22px;
}
.donate-section .donate-layout {
  width: 100%;
  margin: 0;
}
.donation-status-notice {
  margin-bottom: 18px;
}
.bank-account-list {
  display: grid;
  gap: 1rem;
}
.bank-account-block {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem;
  background: rgba(255,255,255,.72);
}
.bank-account-block h3 {
  margin: 0 0 .75rem;
  font-size: 1.02rem;
  color: var(--primary);
}
.donation-receipt-wide {
  width: 100%;
  margin: 0;
}
.donate-actions-wide {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.donate-actions-wide .donate-submit-button {
  margin-top: 0;
}
@media (max-width: 760px) {
  .donate-section {
    width: min(100% - 24px, 1120px);
  }
  .bank-details {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
  .bank-details dd {
    margin-bottom: .65rem;
    overflow-wrap: anywhere;
  }
}

/* Patch: PayPal-Button im PayPal-Kasten und schicker Button fuer Spendenbescheinigung */
.donate-actions-in-card {
  margin-top: 1.1rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.donate-actions-in-card .donate-submit-button {
  margin: 0;
}
.receipt-choice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.receipt-choice-row h2 {
  margin: 0 0 .25rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}
.receipt-choice-row p {
  margin: 0;
}
.receipt-toggle-button {
  flex: 0 0 auto;
  border: 1px solid rgba(49,87,255,.28);
  border-radius: 999px;
  padding: .85rem 1.1rem;
  background: rgba(255,255,255,.92);
  color: var(--primary);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(16,24,40,.08);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.receipt-toggle-button:hover,
.receipt-toggle-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(49,87,255,.55);
  box-shadow: 0 16px 34px rgba(16,24,40,.12);
  outline: none;
}
.receipt-toggle-button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
@media (max-width: 760px) {
  .receipt-choice-row {
    align-items: stretch;
    flex-direction: column;
  }
  .receipt-toggle-button,
  .donate-actions-in-card .donate-submit-button {
    width: 100%;
  }
}

/* Patch: logischere Spendenbedienung mit Überweisungsvormerkung */
.donation-amount-box {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
}
.donation-amount-box h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}
.donation-amount-box p {
  margin: 0;
}
.bank-action-row {
  margin-top: 1.1rem;
}
.bank-submit-button {
  background: var(--dark);
  color: #fff;
}
.compact-bank-list .bank-account-block {
  padding: .9rem;
}
.bank-pledge-page {
  width: min(980px, calc(100% - 36px));
  margin-inline: auto;
}
.bank-pledge-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  gap: 1.25rem;
}
.bank-reference-box {
  display: grid;
  gap: .35rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(49,87,255,.22);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(49,87,255,.08), rgba(0,184,148,.08));
}
.bank-reference-box span,
.bank-reference-box small {
  color: var(--muted);
}
.bank-reference-box strong {
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  letter-spacing: .04em;
  color: var(--primary);
}
.pledge-bank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.pledge-bank-list .bank-account-block h2 {
  margin: 0 0 .85rem;
  font-size: 1.08rem;
  color: var(--primary);
}
.donation-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.pill-warn {
  background: rgba(245,158,11,.14);
  color: #92400e;
}
.donation-row-actions {
  min-width: 168px;
}
.donation-row-actions form + form {
  margin-top: .4rem;
}
@media (max-width: 1100px) {
  .donation-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .pledge-bank-list,
  .donation-stats-grid {
    grid-template-columns: 1fr;
  }
  .bank-pledge-page {
    width: min(100% - 24px, 980px);
  }
}

/* Kompaktere Spendenverwaltung */
.donations-admin-shell {
  width: min(1520px, calc(100% - 28px));
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
}
.donations-compact-table-wrap {
  overflow-x: auto;
}
.donations-compact-table {
  min-width: 880px;
  table-layout: fixed;
}
.donations-compact-table th,
.donations-compact-table td {
  padding: .72rem .78rem;
  font-size: .92rem;
  line-height: 1.35;
}
.donations-compact-table th:nth-child(1) { width: 18%; }
.donations-compact-table th:nth-child(2) { width: 18%; }
.donations-compact-table th:nth-child(3) { width: 25%; }
.donations-compact-table th:nth-child(4) { width: 23%; }
.donations-compact-table th:nth-child(5) { width: 16%; }
.donation-booking-cell,
.donation-person-cell {
  display: grid;
  gap: .22rem;
}
.donation-booking-cell strong {
  font-size: 1.05rem;
}
.donation-booking-cell span,
.donation-person-cell span {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.donations-compact-table .pill {
  display: inline-flex;
  width: fit-content;
  vertical-align: middle;
  font-size: .78rem;
  padding: .2rem .48rem;
}
.donations-compact-table .donation-receipt-cell,
.donations-compact-table .donation-note-cell {
  max-width: none;
  overflow-wrap: anywhere;
}
.donations-compact-table .donation-row-actions {
  min-width: 0;
  display: grid;
  gap: .45rem;
}
.donations-compact-table .donation-row-actions form {
  margin: 0;
}
.donations-compact-table .donation-row-actions .btn.small {
  width: 100%;
  min-height: 34px;
  padding: .48rem .62rem;
  font-size: .82rem;
  white-space: nowrap;
}
@media (max-width: 920px) {
  .donations-admin-shell {
    width: min(100% - 24px, 1520px);
    grid-template-columns: 1fr;
  }
  .donations-compact-table {
    min-width: 820px;
  }
}

/* Projektseite: Infokästen und Afrika-Karte */
.project-overview-section {
  padding-top: 0.5rem;
}
.project-overview-layout {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 3vw, 1.6rem);
  align-items: stretch;
}
.africa-map-card,
.project-info-card {
  padding: clamp(1rem, 2.4vw, 1.45rem);
  border-radius: 8px;
}
.africa-map-card img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(6, 47, 60, 0.12);
}
.project-info-boxes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.project-info-card h2,
.africa-map-card h2 {
  margin: 0.15rem 0 0.7rem;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}
.project-info-card .eyebrow,
.africa-map-card .eyebrow {
  margin-top: 0;
}
.compact-prose > :first-child { margin-top: 0; }
.compact-prose > :last-child { margin-bottom: 0; }
.project-box-admin-form {
  margin-top: 1.2rem;
  padding: clamp(1rem, 2.4vw, 1.35rem);
}
.project-box-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.project-box-admin-card {
  border: 1px solid rgba(20, 40, 60, 0.1);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255,255,255,.76);
  display: grid;
  gap: .85rem;
}
.project-box-admin-card textarea {
  font-family: inherit;
}

/* Statische Seiten: Medien-Upload im Editor */
.static-page-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: clamp(1rem, 2.4vw, 1.4rem);
  align-items: start;
}
.static-page-editor-main {
  min-width: 0;
}
.static-page-media-panel {
  position: sticky;
  top: 88px;
}
.page-media-list .media-item {
  cursor: default;
}
.page-media-list .media-drag-handle {
  display: none;
}

/* Blog ohne GPS: zwei Bilder statt Kartenplatzhalter */
.no-geo-image-pair {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.65rem, 2vw, 1rem);
  min-height: 300px;
}
.no-geo-image {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 18px 40px rgba(6, 47, 60, 0.13);
}
.no-geo-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: transform .22s ease;
}
.no-geo-image:hover img,
.no-geo-image:focus-visible img {
  transform: scale(1.025);
}
.no-geo-image:focus-visible {
  outline: 3px solid rgba(49,87,255,.38);
  outline-offset: 3px;
}
.gallery-thumb span,
.slide-caption,
.image-lightbox-caption {
  overflow-wrap: anywhere;
}

/* Spenden: klarer Ablauf */
.donate-payment-form {
  display: grid;
  gap: 1rem;
}
.donate-step {
  position: relative;
}
.donate-step-number {
  position: absolute;
  top: .9rem;
  right: .95rem;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(49,87,255,.12), rgba(0,184,148,.14));
  color: var(--primary);
  font-weight: 900;
}
.donation-process-hint {
  padding: 1.15rem 1.25rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(49,87,255,.06), rgba(0,184,148,.07));
}
.donation-process-hint h2 {
  margin: 0 0 .6rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}
.donation-process-hint ol {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--text);
}
.donate-step-method {
  margin-top: .2rem;
}
.donate-step-method > .donate-step-number {
  z-index: 2;
}

@media (max-width: 900px) {
  .project-overview-layout,
  .project-box-admin-grid,
  .static-page-editor-layout,
  .no-geo-image-pair {
    grid-template-columns: 1fr;
  }
  .static-page-media-panel {
    position: static;
  }
  .no-geo-image-pair {
    width: min(100% - 24px, 1120px);
  }
  .no-geo-image img {
    height: 220px;
  }
}

/* Patch: Spendenseite logischere Reihenfolge und gefälligere Karten */
.donate-section-modern {
  width: min(1120px, calc(100% - 36px));
  padding-top: 24px;
}
.donate-section-modern .donate-payment-form {
  gap: 18px;
}
.donate-section-modern .donate-step-number {
  display: none !important;
}
.donation-flow-card,
.donate-section-modern .donation-amount-box,
.donate-section-modern .donation-receipt-wide,
.donation-method-card {
  padding: clamp(1.2rem, 2.4vw, 1.75rem);
  border-radius: 8px;
}
.donation-flow-card {
  background:
    radial-gradient(circle at top right, rgba(0,184,148,.16), transparent 35%),
    linear-gradient(135deg, rgba(49,87,255,.08), rgba(255,255,255,.92));
}
.donation-flow-card h2,
.donate-section-modern .donation-amount-box h2,
.donate-section-modern .donation-receipt-wide h2,
.donation-method-head h2,
.donation-method-card h3 {
  margin: 0 0 .65rem;
  padding: 0;
}
.donation-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  margin-top: .9rem;
}
.donation-flow-steps div {
  display: grid;
  gap: .45rem;
  align-content: start;
  padding: .9rem;
  border-radius: 8px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(49,87,255,.10);
}
.donation-flow-steps strong {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 24px rgba(49,87,255,.18);
}
.donation-flow-steps span {
  color: #344054;
  font-weight: 650;
  line-height: 1.35;
}
.donation-recipient-note {
  margin: 1rem 0 0;
}
.donate-section-modern .amount-grid {
  margin: .8rem 0 1rem;
}
.donate-section-modern .receipt-choice-row {
  align-items: center;
}
.donate-section-modern .receipt-toggle-button {
  min-width: min(100%, 310px);
  white-space: normal;
}
.donation-method-section {
  display: grid;
  gap: .9rem;
}
.donation-method-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}
.donate-section-modern .donate-layout.donation-options-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 2.4vw, 1.4rem);
  align-items: stretch;
}
.donation-method-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.donation-method-card h3 {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
}
.donation-method-card .donate-actions-in-card {
  margin-top: auto;
  padding-top: 1rem;
}
.donation-method-card .btn {
  min-width: min(100%, 260px);
}
.bank-account-block h4 {
  margin: 0 0 .65rem;
  color: var(--primary);
  font-size: 1rem;
  letter-spacing: -.02em;
}
@media (max-width: 980px) {
  .donation-flow-steps,
  .donate-section-modern .donate-layout.donation-options-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 680px) {
  .donate-section-modern {
    width: min(100% - 24px, 1120px);
  }
  .donation-flow-steps,
  .donate-section-modern .donate-layout.donation-options-grid {
    grid-template-columns: 1fr !important;
  }
  .donate-section-modern .receipt-choice-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Patch: Projektseite Infokästen im Fließtext wie Teamkarten */
.project-flow-content::after {
  content: "";
  display: block;
  clear: both;
}
.project-inline-card,
.project-africa-inline-card {
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(236,242,255,.76));
  box-shadow: 0 18px 48px rgba(15,23,42,.08);
  padding: clamp(1rem, 2vw, 1.35rem);
}
.project-inline-card {
  width: min(390px, 42%);
  margin-top: .15rem;
  margin-bottom: 1.1rem;
}
.project-inline-card-right {
  float: right;
  margin-left: clamp(1rem, 2.6vw, 1.6rem);
}
.project-inline-card-left {
  float: left;
  margin-right: clamp(1rem, 2.6vw, 1.6rem);
}
.project-inline-card h2,
.project-africa-inline-card h2 {
  margin: 0 0 .65rem;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}
.project-inline-card .eyebrow,
.project-africa-inline-card .eyebrow {
  margin-top: 0;
}
.project-africa-inline-card {
  margin: 1.5rem auto;
  width: min(760px, 100%);
  clear: both;
}
.project-africa-inline-card img {
  width: 100%;
  height: auto;
  margin: .75rem 0 0;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(6,47,60,.12);
}
.project-overview-layout-modern {
  grid-template-columns: 1fr;
}
.project-overview-layout-modern .project-africa-inline-card {
  width: min(760px, 100%);
  margin: 0 auto;
}
.project-overview-layout-modern .project-info-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.35rem);
  align-items: stretch;
}
.project-overview-layout-modern .project-inline-card {
  float: none;
  width: 100%;
  margin: 0;
}
.project-marker-help code {
  padding: .1rem .35rem;
  border-radius: 4px;
  background: rgba(16,24,40,.08);
  font-weight: 800;
}
@media (max-width: 820px) {
  .project-inline-card,
  .project-inline-card-left,
  .project-inline-card-right {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }
  .project-overview-layout-modern .project-info-boxes {
    grid-template-columns: 1fr;
  }
}

/* Patch: Blog ohne GPS-Bilder auf Artikelbreite, ohne Bildtexte in Galerie/Diashow */
.post-map-wrap:has(.no-geo-image-pair) {
  width: min(1040px, calc(100% - 36px));
}
.no-geo-image-pair {
  width: 100% !important;
  min-height: 0;
  padding: clamp(.65rem, 1.8vw, .9rem);
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,.10);
  background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(236,242,255,.72));
  box-shadow: 0 18px 48px rgba(15,23,42,.08);
}
.no-geo-image {
  box-shadow: 0 14px 34px rgba(15,23,42,.12);
}
.no-geo-image img {
  height: clamp(220px, 28vw, 340px);
}
.gallery-thumb span,
.compact-slideshow .slide-caption,
.slide-caption:empty {
  display: none !important;
}
.gallery-thumb {
  padding: 0 !important;
}
.gallery-thumb img {
  margin: 0 !important;
}
.compact-slideshow .slide-stage {
  margin-bottom: 0 !important;
}
@media (max-width: 760px) {
  .post-map-wrap:has(.no-geo-image-pair) {
    width: min(100% - 24px, 1040px);
  }
  .no-geo-image-pair {
    grid-template-columns: 1fr;
  }
  .no-geo-image img {
    height: 230px;
  }
}

/* Patch: Spenden Schritt 3 als vollwertiger Kasten und freundlichere Abstände */
.donate-step-method-card {
  display: grid;
  gap: clamp(1rem, 2vw, 1.35rem);
  padding: clamp(1.1rem, 2.4vw, 1.6rem) !important;
}
.donate-step-method-card .donation-method-head {
  margin: 0;
  padding: 0 0 .85rem;
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.donate-step-method-card .donation-method-head h2 {
  margin: .18rem 0 .35rem;
}
.donate-step-method-card .donation-method-head .muted {
  margin: 0;
}
.donate-step-method-card .donation-options-grid {
  margin: 0;
}
.donate-step-method-card .donation-method-card {
  background: rgba(255,255,255,.82);
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 12px 30px rgba(15,23,42,.06);
}
.donate-step-method-card .donation-method-card h3 {
  margin-top: 0;
}

/* Patch: WYSIWYG-Infokästen auf der Projektseite */
.project-box-wysiwyg-wrap {
  display: grid;
  gap: .55rem;
  margin: .8rem 0 .9rem;
}
.project-box-wysiwyg-wrap > label {
  font-weight: 850;
  color: #172033;
}
.project-box-wysiwyg {
  min-height: 180px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 8px;
  background: #fff;
  padding: .95rem 1rem;
  line-height: 1.6;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.03);
}
.project-box-wysiwyg:focus {
  outline: 3px solid rgba(49,87,255,.16);
  border-color: rgba(49,87,255,.45);
}
.compact-toolbar {
  position: static !important;
  top: auto !important;
  padding: .45rem;
  gap: .4rem;
  border-radius: 8px;
}
.compact-toolbar button {
  padding: .48rem .64rem;
}

/* Patch: Projekt-Kaesten etwas teamartiger und sauber im Fliesstext */
.project-inline-card {
  margin-top: .25rem;
  margin-bottom: 1.35rem;
  align-self: start;
}
.project-inline-card .compact-prose > :first-child {
  margin-top: 0;
}
.project-inline-card .compact-prose > :last-child {
  margin-bottom: 0;
}
.project-africa-inline-card img {
  background: linear-gradient(135deg, #e7f4ff, #f8fbff);
}

/* Patch: Blog-Ersatzbilder ohne GPS auf volle Artikelbreite */
.blog-detail .post-map-wrap:has(.no-geo-image-pair) {
  width: min(1040px, calc(100% - 36px));
  max-width: 1040px;
}
.blog-detail .no-geo-image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.8rem, 2vw, 1.2rem);
  width: 100%;
  height: auto;
}
.blog-detail .no-geo-image {
  display: block;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
}
.blog-detail .no-geo-image img {
  display: block;
  width: 100%;
  height: clamp(260px, 34vw, 430px);
  object-fit: cover;
}
.compact-slideshow .slide-caption,
.gallery-thumb span {
  display: none !important;
}
@media (max-width: 760px) {
  .blog-detail .post-map-wrap:has(.no-geo-image-pair) {
    width: min(100% - 24px, 1040px);
  }
  .blog-detail .no-geo-image-pair {
    grid-template-columns: 1fr;
  }
  .blog-detail .no-geo-image img {
    height: 245px;
  }
}

/* Patch: Thumbnails-Admin und Spendenkontrolle */
.thumbnail-admin-card,
.thumbnail-error-card {
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
  margin: 1rem 0 1.25rem;
}
.thumbnail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1rem;
}
.compact-thumbnail-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0;
}
.thumbnail-error-card ul {
  margin: .6rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.paypal-control-table th:nth-child(1) { width: 15%; }
.paypal-control-table th:nth-child(2) { width: 13%; }
.paypal-control-table th:nth-child(3) { width: 18%; }
.paypal-control-table th:nth-child(4) { width: 34%; }
.paypal-control-table th:nth-child(5) { width: 20%; }
.paypal-control-table .donation-person-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  color: #344054;
  font-size: .9rem;
  line-height: 1.35;
}
@media (max-width: 760px) {
  .compact-thumbnail-stats {
    grid-template-columns: 1fr;
  }
  .thumbnail-actions .btn {
    width: 100%;
  }
}

/* Patch: schnelle Bilddarstellung, Projektkacheln mit umflossenem Medienblock, Lightbox max. 1600px */
.blog-detail .post-map-wrap:has(.no-geo-image-mosaic) {
  min-height: 200px !important;
  margin-bottom: 18px;
}
.no-geo-image-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-height: 0 !important;
  max-height: 216px;
  overflow: hidden;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid rgba(15,23,42,.10);
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(236,242,255,.76));
  box-shadow: 0 18px 42px rgba(15,23,42,.08);
}
.no-geo-image-mosaic .no-geo-image {
  margin: 0 !important;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: none;
  cursor: default !important;
}
.no-geo-image-mosaic .no-geo-image img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover;
  transform: none !important;
}
.no-geo-count-1 { grid-template-columns: 1fr; }
.no-geo-count-2 { grid-template-columns: repeat(2, 1fr); }
.no-geo-count-3 { grid-template-columns: 1.2fr .9fr .9fr; }
@media (max-width: 760px) {
  .blog-detail .post-map-wrap:has(.no-geo-image-mosaic) { min-height: auto !important; }
  .no-geo-image-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .no-geo-image-mosaic .no-geo-image img { height: 145px !important; }
}

.project-tile-card,
.project-tile-card.reverse {
  display: block !important;
  padding: clamp(1.15rem, 2.4vw, 2rem) !important;
}
.project-tile-copy::after {
  content: "";
  display: block;
  clear: both;
}
.project-tile-copy > .eyebrow,
.project-tile-copy > h2 {
  clear: both;
}
.project-tile-copy > h2 {
  margin-bottom: .95rem !important;
}
.project-tile-media {
  float: right;
  width: min(500px, 46%);
  margin: .15rem 0 1rem clamp(1rem, 2.4vw, 1.6rem);
  align-self: start;
}
.project-tile-card.reverse .project-tile-media {
  float: left;
  margin: .15rem clamp(1rem, 2.4vw, 1.6rem) 1rem 0;
}
.project-tile-image-grid {
  display: grid;
  gap: 8px;
}
.project-tile-image-count-1 { grid-template-columns: 1fr; }
.project-tile-image-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-tile-image-count-3 { grid-template-columns: 1.15fr .85fr; }
.project-tile-image-count-3 .project-tile-photo-1 { grid-row: span 2; }
.project-tile-photo {
  margin: 0 !important;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.75);
  background: #eef2f7;
  box-shadow: 0 14px 32px rgba(15,23,42,.12);
}
.project-tile-photo img {
  width: 100% !important;
  height: 100% !important;
  min-height: 150px;
  max-height: 330px;
  object-fit: cover;
  cursor: zoom-in;
}
.project-tile-image-count-3 .project-tile-photo:not(.project-tile-photo-1) img { max-height: 160px; }
.project-tile-video {
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
}
@media (max-width: 860px) {
  .project-tile-media,
  .project-tile-card.reverse .project-tile-media {
    float: none;
    width: 100%;
    margin: 0 0 1rem 0;
  }
}

.blog-content figure.post-media-block,
.page-main-content figure.post-media-block,
.project-tile-copy figure.post-media-block,
.blog-content figure.content-media-block,
.page-main-content figure.content-media-block,
.project-tile-copy figure.content-media-block {
  float: none !important;
  clear: both;
  width: min(800px, 100%) !important;
  margin: 1.15rem auto !important;
}
.blog-content img.content-image-block,
.page-main-content img.content-image-block,
.project-tile-copy img.content-image-block,
.blog-content figure.post-media-block img,
.page-main-content figure.post-media-block img,
.project-tile-copy figure.post-media-block img {
  display: block;
  width: min(800px, 100%) !important;
  max-width: 100% !important;
  height: auto !important;
  margin: .8rem auto !important;
  cursor: zoom-in;
}
.blog-content img.content-image-inline,
.page-main-content img.content-image-inline,
.project-tile-copy img.content-image-inline,
.blog-content figure.post-media-inline,
.page-main-content figure.post-media-inline,
.project-tile-copy figure.post-media-inline,
.blog-content figure.content-media-inline,
.page-main-content figure.content-media-inline,
.project-tile-copy figure.content-media-inline {
  float: right !important;
  clear: right;
  width: min(500px, 46%) !important;
  max-width: 46% !important;
  margin: .25rem 0 .95rem clamp(1rem, 2.4vw, 1.45rem) !important;
}
.blog-content figure.post-media-inline img,
.page-main-content figure.post-media-inline img,
.project-tile-copy figure.post-media-inline img,
.blog-content figure.content-media-inline img,
.page-main-content figure.content-media-inline img,
.project-tile-copy figure.content-media-inline img {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
.blog-content::after,
.page-main-content::after,
.project-tile-copy::after {
  content: "";
  display: block;
  clear: both;
}
@media (max-width: 760px) {
  .blog-content img.content-image-inline,
  .page-main-content img.content-image-inline,
  .project-tile-copy img.content-image-inline,
  .blog-content figure.post-media-inline,
  .page-main-content figure.post-media-inline,
  .project-tile-copy figure.post-media-inline,
  .blog-content figure.content-media-inline,
  .page-main-content figure.content-media-inline,
  .project-tile-copy figure.content-media-inline {
    float: none !important;
    clear: both;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1rem 0 !important;
  }
}

.image-lightbox-panel img,
.image-lightbox img {
  max-width: min(1600px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 96px) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* FINAL-FIX 2026-06-22: Performance, Spendenlayout, Projekt/Team-Bilder, Streckenplan */
.hero-video {
  display: block !important;
  opacity: var(--hero-opacity, 1) !important;
  visibility: visible !important;
  background: #07111f;
}
.hero-eyebrow span { display: block; }
.hero-eyebrow span:last-child { white-space: nowrap; }
@media (max-width: 980px) { .hero-eyebrow span:last-child { white-space: normal; } }

/* Bilder im Fließtext: einzeln 800px, im Absatz/umflossen 500px. */
.blog-content > img,
.blog-content > figure.post-media,
.page-main-content > img,
.page-main-content > figure.post-media,
.project-flow-content > img,
.project-flow-content > figure.post-media {
  width: min(800px, 100%) !important;
  max-width: 100% !important;
  float: none !important;
  clear: both;
  margin: 1.1rem auto !important;
}
.blog-content p img,
.page-main-content p img,
.project-flow-content p img,
.clean-prose p img {
  width: min(500px, 48%) !important;
  max-width: 500px !important;
  float: right;
  clear: right;
  margin: .25rem 0 1rem 1.35rem !important;
  border-radius: 8px;
}
.blog-content img,
.page-main-content img,
.project-flow-content img,
.project-tile-card img,
.team-card-modern img {
  cursor: zoom-in;
}
.image-lightbox-panel img,
.image-lightbox img {
  max-width: min(1600px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 112px) !important;
}

/* Projektkacheln wieder als klare Karten mit Rahmen; Medien erst unter Titel/Subtitle. */
.project-tile-section { padding-top: 18px; }
.project-tile-stack { display: grid; gap: 28px; }
.project-tile-card {
  display: block !important;
  padding: clamp(1.2rem, 2.5vw, 2rem) !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,242,255,.78)) !important;
  box-shadow: 0 18px 48px rgba(15,23,42,.08) !important;
  overflow: hidden;
}
.project-tile-copy::after { content: ''; display: block; clear: both; }
.project-tile-copy > .eyebrow { margin-bottom: .35rem !important; }
.project-tile-copy > h2 { margin: 0 0 1rem !important; }
.project-tile-media {
  width: min(430px, 43%);
  margin: .1rem 0 1rem 1.4rem;
  float: right;
  clear: right;
}
.project-tile-card.reverse .project-tile-media {
  float: left;
  clear: left;
  margin: .1rem 1.4rem 1rem 0;
}
.project-tile-image-grid { display: grid; gap: .55rem; }
.project-tile-image-count-1 { grid-template-columns: 1fr; }
.project-tile-image-count-2,
.project-tile-image-count-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-tile-image-count-3 .project-tile-photo-1 { grid-column: 1 / -1; }
.project-tile-photo { margin: 0 !important; overflow: hidden; border-radius: 8px; border: 1px solid rgba(15,23,42,.08); box-shadow: 0 14px 34px rgba(15,23,42,.10); background: #e7edf5; }
.project-tile-photo img { width: 100% !important; height: clamp(150px, 18vw, 235px) !important; object-fit: cover; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.project-tile-video { width: 100%; max-height: 260px; margin-top: .65rem; border-radius: 8px; background: #111827; }
.project-tile-placeholder { min-height: 180px; display: grid; place-items: center; border-radius: 8px; background: #e7edf5; font-size: 3rem; }

/* Teamkarten: Medien links/rechts, langer Text fließt um Bild/Video. */
.team-flow-card { display: block !important; padding: clamp(1.15rem, 2.5vw, 2rem) !important; }
.team-flow-card::after, .team-flow-card .team-copy::after { content: ''; display: block; clear: both; }
.team-media-float { width: min(420px, 43%); margin: .15rem 1.4rem 1rem 0; float: left; clear: left; display: grid; gap: .75rem; }
.team-media-float-right { float: right; clear: right; margin: .15rem 0 1rem 1.4rem; }
.team-flow-card .team-photo { margin: 0 !important; }
.team-flow-card .team-photo img { cursor: zoom-in; }
.team-flow-card .team-copy h2 { margin-top: 0 !important; }

/* Konsistente Typografie in Contentbereichen. */
.clean-prose h2, .clean-prose h3,
.prose h2, .prose h3,
.team-qa h2, .team-qa h3,
.project-tile-copy h2, .project-tile-copy h3,
.page-main-content h2, .page-main-content h3 {
  clear: none;
  margin-top: 1.35em !important;
  margin-bottom: .45em !important;
  line-height: 1.18 !important;
}
.clean-prose > h2:first-child, .clean-prose > h3:first-child,
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0 !important; }
.prose p, .clean-prose p { margin-top: 0; margin-bottom: 1rem; }

/* Spendenseite wieder logisch/aufgeräumt, ohne verwirrende Schrittlabel. */
.donate-clean-section .eyebrow:not(.hero-eyebrow) { letter-spacing: .14em; }
.donate-clean-section .donation-amount-box > .eyebrow,
.donate-clean-section .donation-method-head > .eyebrow { color: var(--primary); }
.donate-method-clean-card { overflow: hidden; }
.receipt-choice-clean { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: .9rem !important; align-items: stretch !important; }
.receipt-choice-clean .receipt-toggle-button {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  justify-self: stretch;
  white-space: normal !important;
  text-align: center;
  line-height: 1.25;
  padding: .85rem 1rem !important;
}
.paypal-receipt-in-card { padding: 1rem !important; overflow: hidden; }
.paypal-receipt-in-card h2 { font-size: clamp(1.2rem, 2vw, 1.55rem) !important; }
.donation-options-grid { overflow: visible; }

/* Streckenplan wieder farbiger und hochwertiger. */
.route-plan-section { padding-top: 22px !important; }
.route-table-card {
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 48px rgba(15,23,42,.08);
}
.route-table-wrap { overflow-x: auto; }
.route-plan-table { min-width: 980px; border-collapse: separate; border-spacing: 0; }
.route-plan-table thead th {
  background: linear-gradient(135deg, #d9f0ca, #c6e7b6) !important;
  color: #263a1f !important;
  border-bottom: 2px solid rgba(38,58,31,.18) !important;
  padding: 1rem .9rem !important;
}
.route-plan-table td {
  background: rgba(255,255,255,.95);
  padding: .9rem .9rem !important;
}
.route-plan-table tbody tr:nth-child(even):not(.route-sum-row):not(.route-total-row) td { background: rgba(246,250,244,.86); }
.route-plan-table a { color: var(--primary); font-weight: 850; text-decoration: underline; text-underline-offset: .18em; }
.route-sum-row td { background: #d9f0ca !important; font-weight: 850; }
.route-total-row td { background: #bfe3aa !important; font-weight: 950; border-top: 2px solid rgba(38,58,31,.20); }
.route-text-cell { font-weight: 700; }

/* Blog-Kopfbilder ohne GPS kompakt und ruhig. */
.blog-detail .no-geo-image-mosaic {
  height: 200px !important;
  max-height: 200px !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  padding: .55rem;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(236,242,255,.74));
  box-shadow: 0 16px 38px rgba(15,23,42,.08);
}
.blog-detail .no-geo-image { margin: 0 !important; border-radius: 7px; overflow: hidden; background: #e7edf5; box-shadow: none !important; cursor: default !important; }
.blog-detail .no-geo-image img { width: 100% !important; height: 100% !important; object-fit: cover; cursor: default !important; margin: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
.blog-detail .no-geo-count-1 { grid-template-columns: 1fr; }
.blog-detail .no-geo-count-2 { grid-template-columns: repeat(2, 1fr); }
.blog-detail .no-geo-count-3 { grid-template-columns: 1.2fr .9fr .9fr; }

@media (max-width: 840px) {
  .project-tile-media, .project-tile-card.reverse .project-tile-media,
  .team-media-float, .team-media-float-right {
    float: none !important;
    width: 100% !important;
    margin: .75rem 0 1rem !important;
  }
  .blog-content p img,
  .page-main-content p img,
  .project-flow-content p img,
  .clean-prose p img {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1rem 0 !important;
  }
  .donate-clean-section .donate-layout.donation-options-grid { grid-template-columns: 1fr !important; }
  .blog-detail .no-geo-image-mosaic { grid-template-columns: repeat(2, 1fr); height: 200px !important; }
}
@media (max-width: 520px) { .blog-detail .no-geo-image-mosaic { grid-template-columns: 1fr 1fr; } }


/* Patch 2026-06-22: Spendenbox, Streckenplan-Tabelle, Admin-Vorschauen, Hero-Video, Performance */
.hero-video {
  display: block !important;
  visibility: visible !important;
  opacity: var(--hero-opacity, 1) !important;
  z-index: 0 !important;
  background: #070b17;
}
.hero-glow { z-index: 1 !important; pointer-events: none; }
.hero-content { z-index: 2 !important; }

.external-donation-card h3::after { content: ''; }
.external-donation-links {
  display: grid !important;
  gap: .85rem;
  margin-top: 1.15rem;
}
.external-donation-link {
  display: grid !important;
  gap: .25rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(49,87,255,.20);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #6d5dfc);
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(49,87,255,.20);
  text-decoration: none !important;
  text-align: center;
  font-weight: 900;
}
.external-donation-link span {
  color: rgba(255,255,255,.86);
  font-weight: 650;
  font-size: .92rem;
}
.external-donation-link:hover { transform: translateY(-1px); }
.external-donation-link strong { color: #fff; }
.external-donation-link strong::after { content: ' öffnen'; font-weight: 800; opacity: .88; }

.donate-clean-section .receipt-choice-row,
.paypal-method-card .receipt-choice-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: .85rem !important;
  align-items: stretch !important;
}
.paypal-method-card .receipt-toggle-button,
.receipt-choice-clean .receipt-toggle-button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.paypal-receipt-in-card { overflow: hidden !important; }

.route-plan-section .route-table-card {
  overflow: hidden !important;
  border: 1px solid rgba(38,58,31,.18) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(15,23,42,.08) !important;
}
.route-plan-section .route-table-wrap { overflow-x: auto !important; }
.route-plan-section .route-plan-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff;
}
.route-plan-section .route-plan-table th {
  background: linear-gradient(135deg, #d9f0ca, #c6e7b6) !important;
  color: #263a1f !important;
  font-weight: 950 !important;
  border-bottom: 2px solid rgba(38,58,31,.18) !important;
}
.route-plan-section .route-plan-table td {
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid rgba(38,58,31,.12) !important;
}
.route-plan-section .route-plan-table tbody tr:nth-child(even):not(.route-sum-row):not(.route-total-row) td {
  background: rgba(246,250,244,.92) !important;
}
.route-plan-section .route-plan-table .route-sum-row td {
  background: #d9f0ca !important;
  font-weight: 900 !important;
}
.route-plan-section .route-plan-table .route-total-row td {
  background: #bfe3aa !important;
  font-weight: 950 !important;
  border-top: 2px solid rgba(38,58,31,.20) !important;
}
.route-plan-section .route-plan-table a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .36rem .62rem;
  border-radius: 999px;
  background: rgba(49,87,255,.10);
  color: var(--primary) !important;
  font-weight: 900;
  text-decoration: none !important;
}

.static-page-media-panel .media-item img,
.static-page-media-panel .media-item video,
.page-media-list .media-item img,
.page-media-list .media-item video,
.project-tile-admin-preview-grid img,
.project-tile-admin-media img,
.project-tile-admin-media video {
  width: 100% !important;
  height: 96px !important;
  max-height: 96px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  margin: 0 0 .45rem !important;
  box-shadow: none !important;
}
.project-tile-admin-preview-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: .45rem !important;
}
.project-tile-admin-card,
.project-tile-admin-media,
.static-page-media-panel { min-width: 0; }

.performance-card { padding: 1.25rem; }
.performance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.performance-list { display: grid; gap: .5rem; }
.performance-list code { overflow-wrap: anywhere; }
@media (max-width: 900px) { .performance-grid { grid-template-columns: 1fr; } }

/* PATCH 2026-06-22b: Bildqualität, Fließtextbilder, Spendenbox, Projekt/Team-Karten stabilisieren */
/* Inhaltsbilder: nie klein gerenderte Thumbnails auf 800px hochskalieren. */
.blog-content figure.post-media.post-media-block,
.blog-content figure.content-media-block,
.page-main-content figure.post-media.post-media-block,
.page-main-content figure.content-media-block,
.project-flow-content figure.post-media.post-media-block,
.project-flow-content figure.content-media-block,
.clean-prose figure.post-media.post-media-block,
.clean-prose figure.content-media-block {
  float: none !important;
  clear: both !important;
  display: block !important;
  width: min(800px, 100%) !important;
  max-width: 100% !important;
  margin: 1.15rem auto 1.25rem !important;
}
.blog-content figure.post-media.post-media-block img,
.blog-content figure.content-media-block img,
.page-main-content figure.post-media.post-media-block img,
.page-main-content figure.content-media-block img,
.project-flow-content figure.post-media.post-media-block img,
.project-flow-content figure.content-media-block img,
.clean-prose figure.post-media.post-media-block img,
.clean-prose figure.content-media-block img,
.blog-content > img,
.page-main-content > img,
.project-flow-content > img,
.clean-prose > img {
  display: block !important;
  width: min(800px, 100%) !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 1.15rem auto 1.25rem !important;
  float: none !important;
  clear: both !important;
  object-fit: contain !important;
  image-rendering: auto !important;
}

/* Wenn der Editor ein Bild bewusst im Absatz platziert, bleibt es 500px breit und wird umflossen. */
.blog-content figure.post-media.post-media-inline,
.blog-content figure.content-media-inline,
.page-main-content figure.post-media.post-media-inline,
.page-main-content figure.content-media-inline,
.project-flow-content figure.post-media.post-media-inline,
.project-flow-content figure.content-media-inline,
.clean-prose figure.post-media.post-media-inline,
.clean-prose figure.content-media-inline {
  float: right !important;
  clear: right !important;
  width: min(500px, 46%) !important;
  max-width: 500px !important;
  margin: .2rem 0 1rem clamp(1rem, 2.4vw, 1.45rem) !important;
}
.blog-content figure.post-media.post-media-inline img,
.blog-content figure.content-media-inline img,
.page-main-content figure.post-media.post-media-inline img,
.page-main-content figure.content-media-inline img,
.project-flow-content figure.post-media.post-media-inline img,
.project-flow-content figure.content-media-inline img,
.clean-prose figure.post-media.post-media-inline img,
.clean-prose figure.content-media-inline img,
.blog-content p img,
.page-main-content p img,
.project-flow-content p img,
.clean-prose p img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: contain !important;
}
.blog-content p > img,
.page-main-content p > img,
.project-flow-content p > img,
.clean-prose p > img {
  float: right !important;
  clear: right !important;
  width: min(500px, 46%) !important;
  max-width: 500px !important;
  margin: .2rem 0 1rem clamp(1rem, 2.4vw, 1.45rem) !important;
}
.blog-content::after,
.page-main-content::after,
.project-flow-content::after,
.clean-prose::after,
.project-tile-copy::after,
.team-copy::after {
  content: "";
  display: block;
  clear: both;
}

/* Projekt- und Teamkacheln: Rahmen/Kartenlook behalten und langer Text darf um die Medien laufen. */
.project-tile-card,
.team-card-modern,
.team-flow-card {
  border: 1px solid rgba(15,23,42,.12) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,242,255,.78)) !important;
  box-shadow: 0 18px 48px rgba(15,23,42,.08) !important;
}
.project-tile-media,
.team-media-float {
  max-width: 500px !important;
}
.project-tile-photo img,
.team-photo img,
.team-video,
.blog-content img,
.page-main-content img,
.project-flow-content img,
.clean-prose img {
  image-rendering: auto !important;
}

/* Spendenseite: Spendenbescheinigung-Button bleibt sauber innerhalb der PayPal-Box. */
.paypal-method-card { min-width: 0 !important; overflow: hidden !important; }
.paypal-receipt-in-card,
.receipt-request-box {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.receipt-choice-clean,
.paypal-method-card .receipt-choice-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: .85rem !important;
}
.receipt-toggle-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: center !important;
  line-height: 1.22 !important;
}
.donate-step-number { display: none !important; }

/* Streckenplan-Tabelle: farbige Gestaltung konsequent erzwingen. */
.route-table-card {
  overflow: hidden !important;
  border: 1px solid rgba(38,58,31,.18) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(15,23,42,.08) !important;
}
.route-plan-table thead th {
  background: linear-gradient(135deg, #d9f0ca, #c6e7b6) !important;
  color: #263a1f !important;
  font-weight: 950 !important;
}
.route-plan-table tbody tr:nth-child(even):not(.route-sum-row):not(.route-total-row) td { background: rgba(246,250,244,.94) !important; }
.route-plan-table .route-sum-row td { background: #d9f0ca !important; font-weight: 900 !important; }
.route-plan-table .route-total-row td { background: #bfe3aa !important; font-weight: 950 !important; }

/* Admin-Seiteneditor: Medienvorschauen klein halten. */
.static-page-media-panel .media-item img,
.static-page-media-panel .media-item video,
.page-media-list .media-item img,
.page-media-list .media-item video,
.project-tile-admin-preview-grid img,
.project-tile-admin-media img,
.project-tile-admin-media video {
  width: 100% !important;
  height: 96px !important;
  max-height: 96px !important;
  object-fit: cover !important;
  margin: 0 0 .45rem !important;
  box-shadow: none !important;
}

@media (max-width: 840px) {
  .blog-content figure.post-media.post-media-inline,
  .blog-content figure.content-media-inline,
  .page-main-content figure.post-media.post-media-inline,
  .page-main-content figure.content-media-inline,
  .project-flow-content figure.post-media.post-media-inline,
  .project-flow-content figure.content-media-inline,
  .clean-prose figure.post-media.post-media-inline,
  .clean-prose figure.content-media-inline,
  .blog-content p > img,
  .page-main-content p > img,
  .project-flow-content p > img,
  .clean-prose p > img {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1rem 0 !important;
  }
}


/* ---------------------------------------------------------
   FINAL 2026-06-25: Blog-/Editor-Medien, Videoformat, Download/Löschen
   --------------------------------------------------------- */

.blog-content figure.post-media,
.wysiwyg figure.post-media,
.blog-content figure.content-media-block,
.blog-content figure.content-media-inline,
.wysiwyg figure.content-media-block,
.wysiwyg figure.content-media-inline {
  box-sizing: border-box !important;
}

.blog-content figure.post-media img,
.wysiwyg figure.post-media img,
.blog-content figure.post-media video,
.wysiwyg figure.post-media video,
.blog-content figure.content-media-block img,
.blog-content figure.content-media-inline img,
.wysiwyg figure.content-media-block img,
.wysiwyg figure.content-media-inline img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: contain !important;
}

/* Alleinstehende Medien im Blog/Editor: 800 px. */
.blog-content figure.post-media.post-media-block,
.blog-content figure.content-media-block,
.wysiwyg figure.post-media.post-media-block,
.wysiwyg figure.content-media-block {
  float: none !important;
  clear: both !important;
  display: block !important;
  width: min(800px, 100%) !important;
  max-width: 800px !important;
  margin: 1.25rem auto !important;
}

/* Umflossene Medien innerhalb eines Absatzes: 500 px. */
.blog-content figure.post-media.post-media-inline,
.blog-content figure.content-media-inline,
.wysiwyg figure.post-media.post-media-inline,
.wysiwyg figure.content-media-inline {
  float: right !important;
  clear: none !important;
  display: block !important;
  width: min(500px, 46%) !important;
  max-width: 500px !important;
  margin: .25rem 0 1rem 1.5rem !important;
}

.blog-content figure.post-media.post-media-inline:nth-of-type(even),
.blog-content figure.content-media-inline:nth-of-type(even),
.wysiwyg figure.post-media.post-media-inline:nth-of-type(even),
.wysiwyg figure.content-media-inline:nth-of-type(even) {
  float: left !important;
  margin: .25rem 1.5rem 1rem 0 !important;
}

/* Falls Bilder ohne Figure direkt im Absatz stehen. */
.blog-content p > img,
.wysiwyg p > img {
  float: right !important;
  clear: none !important;
  width: min(500px, 46%) !important;
  max-width: 500px !important;
  height: auto !important;
  margin: .25rem 0 1rem 1.5rem !important;
}

.blog-content > img,
.wysiwyg > img {
  float: none !important;
  clear: both !important;
  display: block !important;
  width: min(800px, 100%) !important;
  max-width: 800px !important;
  height: auto !important;
  margin: 1.25rem auto !important;
}

/* Hochformatvideos maximal 480 px, Querformatvideos maximal 640 px. */
.blog-content figure.post-media.ct-video-portrait,
.wysiwyg figure.post-media.ct-video-portrait,
.slide-stage video.ct-video-portrait {
  width: min(480px, 100%) !important;
  max-width: 480px !important;
}

.blog-content figure.post-media.ct-video-landscape,
.wysiwyg figure.post-media.ct-video-landscape,
.slide-stage video.ct-video-landscape {
  width: min(640px, 100%) !important;
  max-width: 640px !important;
}

.blog-content figure.post-media.post-media-inline.ct-video-portrait,
.wysiwyg figure.post-media.post-media-inline.ct-video-portrait {
  width: min(480px, 44%) !important;
  max-width: 480px !important;
}

.blog-content figure.post-media.post-media-inline.ct-video-landscape,
.wysiwyg figure.post-media.post-media-inline.ct-video-landscape {
  width: min(640px, 50%) !important;
  max-width: 640px !important;
}

/* Fallback, bis die JS-Formatklasse nach loadedmetadata gesetzt ist. */
.blog-content figure.post-media:has(video),
.wysiwyg figure.post-media:has(video) {
  max-width: 640px !important;
}

.blog-content::after,
.wysiwyg::after {
  content: "";
  display: block;
  clear: both;
}

.media-item .compact-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .45rem !important;
}

.media-item .compact-actions .btn,
.media-item .compact-actions a.btn {
  min-height: 34px;
  line-height: 1.1;
  text-align: center;
}

.media-item.is-deleting {
  opacity: .55;
  pointer-events: none;
}

@media (max-width: 760px) {
  .blog-content figure.post-media.post-media-inline,
  .blog-content figure.content-media-inline,
  .wysiwyg figure.post-media.post-media-inline,
  .wysiwyg figure.content-media-inline,
  .blog-content figure.post-media.post-media-inline.ct-video-portrait,
  .blog-content figure.post-media.post-media-inline.ct-video-landscape,
  .wysiwyg figure.post-media.post-media-inline.ct-video-portrait,
  .wysiwyg figure.post-media.post-media-inline.ct-video-landscape,
  .blog-content p > img,
  .wysiwyg p > img {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1rem 0 !important;
  }
}


/* Patch 2026-06-29: Medienverwaltung im Blogeditor und Kommentaranzahl */
.post-comment-count {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: var(--muted);
  font-weight: 750;
}
.post-comment-count::before {
  content: "💬";
  font-size: .92em;
  opacity: .8;
}
.archive-item .post-comment-count {
  margin-top: .18rem;
  font-size: .82rem;
}

@media (min-width: 1180px) {
  .editor-shell .editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(540px, 690px) !important;
  }
}
.media-manager-panel {
  max-height: calc(100vh - 126px);
  overflow: auto;
}
.media-manager-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
  gap: 1rem;
  align-items: start;
}
.admin-media-grid.media-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: .8rem;
  align-items: start;
}
.media-manager-item {
  min-width: 0;
  padding: .55rem !important;
  cursor: pointer;
}
.media-manager-item.is-selected {
  border-color: rgba(49,87,255,.55) !important;
  box-shadow: 0 0 0 3px rgba(49,87,255,.12), 0 10px 26px rgba(49,87,255,.10);
}
.media-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #e7edf5;
  cursor: zoom-in;
}
.media-preview-trigger img,
.media-preview-trigger video,
.media-manager-item > img,
.media-manager-item > video {
  display: block !important;
  width: 100% !important;
  height: 112px !important;
  max-height: 112px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  margin: 0 0 .5rem !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  background: #e7edf5;
}
.media-manager-item strong {
  margin-top: .45rem;
  font-size: .88rem;
  line-height: 1.25;
}
.media-card-meta {
  display: grid;
  gap: .22rem;
  margin: .45rem 0 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.25;
}
.media-card-meta div {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: .35rem;
}
.media-card-meta dt {
  color: #475467;
  font-weight: 850;
}
.media-card-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.media-manager-item .compact-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .38rem;
}
.media-manager-item .btn.small {
  width: 100%;
  min-height: 32px;
  padding: .46rem .55rem;
  font-size: .78rem;
  white-space: normal;
}
.media-preview-box {
  position: sticky;
  top: 0;
  min-width: 0;
  padding: .85rem;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,242,255,.74));
  box-shadow: 0 12px 30px rgba(15,23,42,.07);
}
.media-preview-empty {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 1rem;
  border: 1px dashed rgba(49,87,255,.28);
  border-radius: 7px;
  color: var(--muted);
  text-align: center;
  font-weight: 750;
  line-height: 1.45;
}
.media-preview-content[hidden],
.media-preview-empty[hidden] {
  display: none !important;
}
.media-preview-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  max-height: 420px;
  overflow: hidden;
  border-radius: 7px;
  background: #111827;
}
.media-preview-stage img,
.media-preview-stage video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.media-preview-box h3 {
  margin: .8rem 0 .55rem;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.media-preview-data {
  display: grid;
  gap: .42rem;
  margin: 0;
  font-size: .84rem;
  line-height: 1.35;
}
.media-preview-data div {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  gap: .5rem;
  padding-bottom: .38rem;
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.media-preview-data dt {
  color: #475467;
  font-weight: 900;
}
.media-preview-data dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.media-preview-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: .85rem !important;
}
.media-preview-actions .btn {
  width: 100%;
}
@media (max-width: 1380px) {
  .media-manager-layout {
    grid-template-columns: 1fr;
  }
  .media-preview-box {
    position: static;
  }
}
@media (max-width: 1180px) {
  .media-manager-panel {
    max-height: none;
    overflow: visible;
  }
  .admin-media-grid.media-list {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  }
}

/* Patch 2026-06-29c: Medienübersicht eigene Seite, Editor-Medienauswahl 2-spaltig */
@media (min-width: 1180px) {
  .editor-shell .editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px) !important;
  }
}
.compact-editor-media-panel {
  max-height: calc(100vh - 126px);
  overflow: auto;
}
.media-panel-top-actions {
  margin: .65rem 0 .85rem !important;
}
.media-panel-top-actions .btn {
  width: 100%;
}
.editor-media-select-grid.media-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .72rem;
  align-items: start;
}
.editor-media-select-item {
  min-width: 0;
  padding: .5rem !important;
}
.editor-media-select-item img,
.editor-media-select-item video {
  display: block !important;
  width: 100% !important;
  height: 112px !important;
  max-height: 112px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  margin: 0 0 .45rem !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  background: #e7edf5;
}
.editor-media-select-item strong {
  display: block;
  min-height: 2.4em;
  font-size: .82rem !important;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.editor-media-select-item small {
  font-size: .75rem;
}
.editor-media-select-item .compact-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  margin-top: .45rem !important;
}
.editor-media-select-item .btn.small {
  width: 100%;
  min-height: 31px;
  padding: .42rem .5rem;
  font-size: .76rem;
  white-space: normal;
}

.admin-media-overview-shell {
  width: min(1800px, calc(100% - 40px)) !important;
  grid-template-columns: 220px minmax(0, 1fr) !important;
  gap: 24px !important;
}
.admin-media-overview .admin-title-row {
  align-items: flex-end;
}
.admin-media-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, 620px);
  gap: 1.25rem;
  align-items: start;
}
.admin-media-overview-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .78rem;
  align-items: start;
}
.admin-media-overview-item {
  min-width: 0;
  padding: .52rem !important;
  cursor: pointer;
}
.admin-media-overview-item.is-selected {
  border-color: rgba(49,87,255,.62) !important;
  box-shadow: 0 0 0 3px rgba(49,87,255,.13), 0 12px 30px rgba(49,87,255,.11) !important;
}
.admin-media-overview-item .media-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #e7edf5;
  cursor: zoom-in;
}
.admin-media-overview-item .media-preview-trigger img,
.admin-media-overview-item .media-preview-trigger video {
  display: block !important;
  width: 100% !important;
  height: 118px !important;
  max-height: 118px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  margin: 0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  background: #e7edf5;
}
.admin-media-overview-item strong {
  display: block;
  margin-top: .45rem;
  min-height: 2.3em;
  font-size: .82rem !important;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.admin-media-overview-item .media-card-meta {
  font-size: .69rem;
  line-height: 1.18;
  gap: .18rem;
}
.admin-media-overview-item .media-card-meta div {
  grid-template-columns: 4.8rem minmax(0, 1fr);
  gap: .25rem;
}
.admin-media-overview-item .compact-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  margin-top: .48rem !important;
}
.admin-media-overview-item .btn.small {
  width: 100%;
  min-height: 31px;
  padding: .42rem .5rem;
  font-size: .75rem;
  white-space: normal;
}
.admin-media-big-preview {
  position: sticky;
  top: 116px;
  min-width: 0;
  padding: 1rem;
}
.admin-media-big-preview .media-preview-empty {
  min-height: 560px;
}
.admin-media-big-preview .media-preview-stage {
  min-height: min(640px, calc(100vh - 310px));
  max-height: calc(100vh - 290px);
  border-radius: 9px;
}
.admin-media-big-preview .media-preview-stage img,
.admin-media-big-preview .media-preview-stage video {
  width: 100% !important;
  height: 100% !important;
  max-height: calc(100vh - 290px) !important;
  object-fit: contain !important;
}
.admin-media-big-preview h3 {
  font-size: 1.18rem;
}
.admin-media-big-preview .media-preview-data {
  font-size: .9rem;
}
.media-item.is-deleting {
  opacity: .52;
  pointer-events: none;
}

@media (max-width: 1560px) {
  .admin-media-overview-layout {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  }
  .admin-media-overview-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1280px) {
  .admin-media-overview-layout {
    grid-template-columns: 1fr;
  }
  .admin-media-big-preview {
    position: static;
    order: -1;
  }
  .admin-media-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .compact-editor-media-panel {
    max-height: none;
    overflow: visible;
  }
  .admin-media-overview-shell {
    width: min(100% - 24px, 1000px) !important;
    grid-template-columns: 1fr !important;
  }
  .admin-media-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-media-big-preview .media-preview-empty,
  .admin-media-big-preview .media-preview-stage {
    min-height: 360px;
  }
}
@media (max-width: 620px) {
  .editor-media-select-grid.media-list,
  .admin-media-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-media-overview-item .media-card-meta {
    display: none;
  }
}
