/* Bilderupload.org – Styles v1.0 */
:root {
  --bg: #f8f9fb;
  --bg-card: #ffffff;
  --text: #0b0b0b;
  --muted: #5b5f6b;
  --border: #dfe3ea;
  --primary: #2563eb;
  --primary-contrast: #ffffff;
  --danger: #d92d20;
  --danger-bg: #fdecee;
  --radius: 12px;
  --radius-sm: 8px;
  --ring: 2px solid #93c5fd;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

.theme-dark {
  --bg: #0b0b0b;
  --bg-card: #121212;
  --text: #e8e8e8;
  --muted: #a3aab5;
  --border: #222;
  --primary: #60a5fa;
  --primary-contrast: #0b0b0b;
  --danger: #ff6666;
  --danger-bg: #3a0b0e;
  --ring: 2px solid #2563eb;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 6px 18px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
}

.site-header, .site-footer {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.site-footer { border-top: 1px solid var(--border); border-bottom: none; }
.site-header .container, .site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
}
.logo {
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--text);
}
.dm-toggle {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
.dm-toggle:hover { filter: brightness(0.98); }
.dm-toggle:focus-visible { outline: var(--ring); outline-offset: 2px; }

.site-main .container { padding: 16px 8px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 16px 0;
}
.lead { color: var(--muted); margin-top: -4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
  text-decoration: none;
}
.btn:hover { background: rgba(0,0,0,.03); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: var(--ring); outline-offset: 2px; }
.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.05); }

.upload-form .form-row {
  margin: 12px 0;
  display: grid;
  gap: 6px;
}
.upload-form label {
  font-weight: 600;
}
.upload-form input[type="text"],
.upload-form input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.upload-form input[type="file"] {
  padding: 8px;
  background: transparent;
}
.actions { margin-top: 10px; }

.progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.07);
  margin: 14px 0 0;
  overflow: hidden;
}
.theme-dark .progress { background: rgba(255,255,255,.08); }
.progress .bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
  border-radius: inherit;
  transition: width .15s ease;
}

.error-list { margin-top: 12px; }
.error-card {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(217,45,32,.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 6px 0;
}
.theme-dark .error-card {
  border-color: rgba(255,102,102,.3);
}

.result .result-links { display: grid; gap: 6px; margin: 10px 0 12px; }
.result .result-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result .result-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.recent-item {
  display: block;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.recent-item img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.recent-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.0), rgba(0,0,0,.55));
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
}
.muted { color: var(--muted); }

.site-footer {
  margin-top: 24px;
}

/* Fokus sichtbar zugänglich */
:focus-visible {
  outline: var(--ring);
  outline-offset: 2px;
}

/* Responsiv */
@media (max-width: 640px) {
  .site-header .container, .site-footer .container { padding: 10px 6px; }
  .site-main .container { padding: 12px 6px; }
  .recent-item img { height: 100px; }
}

/* Spezifische Klassen aus dem HTML */
.upload-section.card { margin-top: 16px; }
.recent-section.card { }

/* Kleinere Optimierungen für Dark Mode Kontrast */
.theme-dark .btn { background: #171717; border-color: #2a2a2a; }
.theme-dark .btn:hover { background: #1b1b1b; }
.theme-dark .card { border-color: #1f1f1f; }
.theme-dark .result .result-preview { background: #0f0f0f; border-color: #1f1f1f; }
.theme-dark .recent-item { background: #141414; border-color: #1f1f1f; }
/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  padding: 16px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.55);
  z-index: 9999;
}
.modal-card {
  width: min(520px, 100%);
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.modal-body p { margin: 0 0 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}
.btn-danger:hover { filter: brightness(1.05); }

.btn-sm {
  padding: 6px 10px;
  font-size: 0.875rem;
}
/* Design-Refresh: Markenfarben, Header-Gradient, größerer Footer, Dropzone, Success-Buttons, Bildseite-Layout */

/* Farb-Overrides (Blaupalette + Akzente) */
:root {
  --primary: #2497d4;
  --primary-2: #5bc7f8;
  --success: #22c55e; /* grün für positive Aktionen */
  --bg: #f7fbff;
  --bg-card: #ffffff;
  --text: #0b0b0b;
  --muted: #627083;
  --border: #dbe7f3;
  --ring: 2px solid #5bc7f8;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 28px rgba(0,0,0,.05);
}
.theme-dark {
  --primary: #2497d4;
  --primary-2: #5bc7f8;
  --success: #22c55e;
  --bg: #0e1318;
  --bg-card: #10161c;
  --text: #e6eef6;
  --muted: #94aabc;
  --border: #1f2a36;
  --ring: 2px solid #2497d4;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 30px rgba(0,0,0,.35);
}

/* Header mit Verlauf, Linkfarben auf weiß */
.site-header {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%);
  border-bottom: none;
  color: #fff;
}
.site-header .container { padding: 14px 10px; }
.site-header .logo { color: #fff; }
.site-header a { color: #fff; opacity: .95; }
.site-header a:hover { opacity: 1; }
.dm-toggle {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
}
.dm-toggle:hover { background: rgba(255,255,255,.2); }

/* Größerer Footer mit mehr Raum */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 28px 10px; }
.site-footer .container { display: grid; gap: 10px; justify-content: space-between; }
.footer-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; }
.footer-columns h4 { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; opacity: .9; }
.footer-columns a { color: var(--text); opacity: .9; font-size: .95rem; }
.footer-columns a:hover { opacity: 1; }

/* Footer: Menü mit kleineren Pills + Icons */
.site-footer .site-nav { display: inline-flex; align-items: center; gap: 8px; }
.site-footer .site-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .92rem;
  color: var(--text);
  background: rgba(0,0,0,.03);
  border: 1px solid var(--border);
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.site-footer .site-nav .nav-link:hover {
  background: rgba(36,151,212,.08);
  border-color: var(--primary);
  transform: translateY(-1px);
}
/* Footer Icons (größenangepasst) */
.site-footer .site-nav .nav-link::before {
  content: '';
  width: 14px;
  height: 14px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-size: 14px 14px;    mask-size: 14px 14px;
}

/* Buttons: Success-Grün ergänzen */
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: transparent;
}
.btn-success:hover { filter: brightness(1.03); }

/* Outline-Variante (optional) */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: rgba(36,151,212,.08); }

/* Dropzone für modernen Upload inkl. Drag&Drop */
.dropzone {
  position: relative;
  border: 2px dashed rgba(36,151,212,.6);
  background: linear-gradient(180deg, rgba(91,199,248,.10), rgba(91,199,248,.04));
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: center;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
}
.dropzone:hover { background: linear-gradient(180deg, rgba(91,199,248,.14), rgba(91,199,248,.06)); }
.dropzone.is-dragover {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 4px rgba(91,199,248,.15);
}
.dropzone .dz-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(36,151,212,.12);
  color: var(--primary);
  font-size: 22px;
}
.dropzone .dz-help { color: var(--muted); font-size: 14px; }
.dropzone .dz-cta { display: inline-flex; gap: 8px; align-items: center; }
.dropzone .dz-cta .btn { padding: 8px 12px; }

/* Vorschau-Thumb in der Dropzone */
.dz-preview {
  display: none;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.dz-preview.visible { display: block; }
.dz-preview img { display: block; width: 100%; height: auto; }

/* Bildansicht Layout (image.php) */
.image-view-grid { display: grid; grid-template-columns: 1fr 360px; gap: 16px; }
.image-view-meta .actions .btn { min-width: 140px; }
@media (max-width: 900px) {
  .image-view-grid { grid-template-columns: 1fr; }
}

/* Feinschliff Progressbar mit Markenverlauf */
.progress .bar {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

/* Header-Navigation (optional, falls später ergänzt) */
.site-nav { display: inline-flex; gap: 12px; align-items: center; }
.site-nav a { color: #fff; font-weight: 600; }
/* Galerie-Karten Grid und Vorschaubilder */
#myGalleries, .galleries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.gallery-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}
.gallery-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.theme-dark .gallery-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.gallery-card:focus-visible {
  outline: var(--ring);
  outline-offset: -2px;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 92px;
  gap: 6px;
  padding: 6px;
  background: transparent;
}
.gallery-thumbs img,
.gallery-thumbs .thumb-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.thumb-ph {
  background: linear-gradient(135deg, rgba(36,151,212,.10), rgba(91,199,248,.06));
}

.gallery-title {
  padding: 10px 12px 2px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 0 12px 8px;
}

@media (max-width: 640px) {
  .gallery-thumbs { grid-auto-rows: 72px; }
}
/* Galerie-Aktionsleiste unter Karten */
.gallery-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  align-items: center;
}
.gallery-actions .btn { flex: 0 0 auto; }
/* Text-Variante nicht mehr strecken */
.gallery-actions .btn.btn-primary { flex: 0 0 auto; }

/* Galerie-Aktionen – kompakte Text+Icon Buttons (einheitlich, nicht rund) */
.gallery-actions .btn.btn-sm {
  width: auto;
  height: 30px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
}

/* Einheitliche Vektor-Icons via CSS-Masken */
.gallery-actions .btn.btn-sm::before {
  content: '';
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 16px 16px;
  mask-size: 16px 16px;
}

/* Farben/Stile aus einem Guss */
.gallery-actions [data-action="open"] {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: transparent;
}
.gallery-actions [data-action="open"]:hover { filter: brightness(1.05); }

.gallery-actions [data-action="share"] {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.gallery-actions [data-action="share"]:hover {
  background: rgba(36,151,212,.08);
  border-color: var(--primary);
}

.gallery-actions [data-action="delete"] {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(217,45,32,.3);
}

/* Icons per Maske – klare, konsistente Formen */
.gallery-actions [data-action="open"]::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h7v2H7v10h10v-5h2v7H5V5z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h7v2H7v10h10v-5h2v7H5V5z"/></svg>');
}

.gallery-actions [data-action="share"]::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 12a3 3 0 013-3h3v2H10a1 1 0 000 2h3v2h-3a3 3 0 01-3-3zm10-5h-3V5h3a4 4 0 110 8h-3v-2h3a2 2 0 100-4zM14 11h-4v2h4v-2z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 12a3 3 0 013-3h3v2H10a1 1 0 000 2h3v2h-3a3 3 0 01-3-3zm10-5h-3V5h3a4 4 0 110 8h-3v-2h3a2 2 0 100-4zM14 11h-4v2h4v-2z"/></svg>');
}

.gallery-actions [data-action="delete"]::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6 19a2 2 0 002 2h8a2 2 0 002-2V7H6v12zm3.5-9h1v8h-1V10zm5 0h1v8h-1V10zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6 19a2 2 0 002 2h8a2 2 0 002-2V7H6v12zm3.5-9h1v8h-1V10zm5 0h1v8h-1V10zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"/></svg>');
}

/* Mobile: Buttons umbrechen und gleichmäßig verteilen */
@media (max-width: 640px) {
  .gallery-actions {
    flex-wrap: wrap;
  }
  .gallery-actions .btn {
    flex: 1 1 calc(50% - 8px);
  }
}
/* Aktionen unter Einzelkarten (Galerieseite und Recent-Add-Bereich) */
.item-actions {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.item-actions .btn { flex: 0 0 auto; }
.item-actions .btn.btn-success { flex: 1 1 auto; }

/* Kompakte Buttons (Text+Icon) angleichen */
.item-actions .btn.btn-sm {
  width: auto;
  height: 30px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
}

/* Icon-only Link für Seitenaufruf innerhalb von Karten */
.item-actions [data-action="page"] {
  width: 34px;
  min-width: 34px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  text-indent: -9999px; /* kein Text, Icon via ::before */
  overflow: hidden;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.item-actions [data-action="page"]:hover {
  background: rgba(36,151,212,.08);
  border-color: var(--primary);
}
.item-actions [data-action="page"]::before {
  content: '';
  width: 16px;
  height: 16px;
  display: inline-block;
  text-indent: 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 16px 16px;
  mask-size: 16px 16px;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h7v2H7v10h10v-5h2v7H5V5z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h7v2H7v10h10v-5h2v7H5V5z"/></svg>');
}

/* Visuelles Feedback: Karte wurde hinzugefügt */
.recent-item.added {
  outline: 2px solid rgba(34,197,94,.4);
  outline-offset: -2px;
}

/* Mobile: Buttons umbrechen und gleichmäßig verteilen */
@media (max-width: 640px) {
  .item-actions { flex-wrap: wrap; }
  .item-actions .btn { flex: 1 1 calc(50% - 8px); }
}
/* Spezieller Stil: „Galerie anlegen“-Button mit Icon und deutlicherem Kontrast */
.btn-create-gallery {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(36,151,212,.22);
  padding: 12px 16px;
  font-weight: 600;
  gap: 8px;
}
.btn-create-gallery .ic {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  background: rgba(255,255,255,.22);
  border-radius: 50%;
  font-weight: 700;
  margin-right: 4px;
}
.btn-create-gallery:hover { filter: brightness(1.05); }
.theme-dark .btn-create-gallery {
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

/* Galerieansicht: „Eigene letzte Uploads hinzufügen“ – kleinere Kacheln und Buttons */
.recent-add-grid {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.recent-add-grid .recent-item img {
  height: 90px;
}
.recent-add-grid .item-actions {
  padding: 4px;
  gap: 6px;
}
.recent-add-grid .item-actions .btn {
  padding: 4px 8px;
  font-size: 0.78rem;
  height: 28px;
  line-height: 1;
}
/* Grüner „Hinzufügen“-Button kleiner und mit kontrastreichem Hover */
.recent-add-grid .item-actions .btn-success {
  background: var(--success);
  color: #fff;
  border-color: transparent;
}
.recent-add-grid .item-actions .btn-success:hover {
  filter: none;           /* kein Aufhellen, Text bleibt gut lesbar */
  background: #16a34a;    /* etwas dunkleres Grün für Hover */
  color: #fff;
}
.recent-add-grid .item-actions .btn {
  padding: 5px 8px;
  font-size: 0.8rem;
}

/* Galerieansicht: Bilder in dieser Galerie – etwas größere Kacheln */
.gallery-images {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.gallery-images .recent-item img {
  height: 160px;
}

/* Meta-Bereich unter Thumbs (Titel, Datum, Maße, Größe) */
.item-meta {
  padding: 8px 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.item-meta .meta-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta .meta-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Entfernen-Button klarer darstellen */
.btn-remove {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(217,45,32,.3);
}
.btn-remove:hover { filter: brightness(1.03); }
/* Ergebnis-Links nach Upload: Eingabefelder + Kopier-Buttons */
.result .link-row { display: grid; gap: 6px; margin: 8px 0; }
.result .link-row .small { font-size: 12px; }
.small { font-size: 12px; }

.result .link-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.result .link-input-wrap input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.result .link-input-wrap .btn { white-space: nowrap; height: 38px; }

@media (max-width: 640px) {
  .result .link-input-wrap {
    grid-template-columns: 1fr;
  }
  .result .link-input-wrap .btn {
    height: auto;
  }
}
/* Ergebnisbereich – modernes Layout mit Icons, kompakter Vorschau und Info-Panel */
.result .result-top {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 12px;
  align-items: start;
  margin: 8px 0 12px;
}
@media (max-width: 800px) {
  .result .result-top { grid-template-columns: 1fr; }
}

/* Vorschau kompakter, mit feinem Rahmen/Hintergrund und Overlay-Action */
.result .result-preview {
  position: relative;
  max-width: 340px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(91,199,248,.06), rgba(91,199,248,.03));
  padding: 8px;
  box-shadow: var(--shadow);
}
.result .result-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.result .preview-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  backdrop-filter: blur(6px);
}

/* Icon-Buttons (rund) – für Kopieren und „Bild anzeigen“ Overlay */
.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.btn-icon:hover { background: rgba(36,151,212,.08); border-color: var(--primary); }
.btn-icon::before {
  font-size: 18px;
  line-height: 1;
}
.btn-icon.view-btn::before { content: '👁'; }

/* Linkboxen: Kopier-Button als Icon ohne Text */
.result .link-input-wrap [data-copy] {
  min-width: 38px;
  padding: 0;
  text-indent: -9999px; /* Text ausblenden, Icon via ::before */
  overflow: hidden;
  border-radius: 999px;
}
.result .link-input-wrap [data-copy]::before {
  content: '📋';
  text-indent: 0;
  font-size: 16px;
  display: inline-block;
}

/* Info-Panel rechts neben der Vorschau */
.result .result-info {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 12px;
}
.result .ri-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.result .ri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.result .ri-grid > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.result .ri-grid > div span {
  color: var(--muted);
  margin-right: 8px;
}
/* Galerie-Aktionen – konsistente Buttons und CSS-Masken-Icons (nicht rund) */
.gallery-actions .btn.btn-sm {
  /* Überschreibt frühere runde/ikonische Styles zugunsten einheitlicher Text+Icon Buttons */
  width: auto;
  height: 30px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
}

/* Vorher gesetzte Emoji/Zeichen-Icons neutralisieren und durch Masken ersetzen */
.gallery-actions .btn.btn-sm::before {
  content: '';
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 16px 16px;
  mask-size: 16px 16px;
}

/* Farben/Stile aus einem Guss */
.gallery-actions [data-action="open"] {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: transparent;
}
.gallery-actions [data-action="open"]:hover { filter: brightness(1.05); }

.gallery-actions [data-action="share"] {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.gallery-actions [data-action="share"]:hover {
  background: rgba(36,151,212,.08);
  border-color: var(--primary);
}

.gallery-actions [data-action="delete"] {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(217,45,32,.3);
}

/* Einheitliche Vektor-Icons via CSS-Masken (Material-ähnliche, klare Formen) */
/* Open (external-link) */
.gallery-actions [data-action="open"]::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h7v2H7v10h10v-5h2v7H5V5z"/&gt;&lt;/svg&gt;');
          mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h7v2H7v10h10v-5h2v7H5V5z"/&gt;&lt;/svg&gt;');
}

/* Share (Link-Kette, neutral) */
.gallery-actions [data-action="share"]::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M7 12a3 3 0 013-3h3v2H10a1 1 0 000 2h3v2h-3a3 3 0 01-3-3zm10-5h-3V5h3a4 4 0 110 8h-3v-2h3a2 2 0 100-4zM14 11h-4v2h4v-2z"/&gt;&lt;/svg&gt;');
          mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M7 12a3 3 0 013-3h3v2H10a1 1 0 000 2h3v2h-3a3 3 0 01-3-3zm10-5h-3V5h3a4 4 0 110 8h-3v-2h3a2 2 0 100-4zM14 11h-4v2h4v-2z"/&gt;&lt;/svg&gt;');
}

/* Delete (Papierkorb, klar) */
.gallery-actions [data-action="delete"]::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M6 19a2 2 0 002 2h8a2 2 0 002-2V7H6v12zm3.5-9h1v8h-1V10zm5 0h1v8h-1V10zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"/&gt;&lt;/svg&gt;');
          mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M6 19a2 2 0 002 2h8a2 2 0 002-2V7H6v12zm3.5-9h1v8h-1V10zm5 0h1v8h-1V10zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"/&gt;&lt;/svg&gt;');
}

/* Falls frühere runde Icon-Only-Buttons aktiv waren, hier explizit neutralisieren */
.gallery-actions .icon-btn::before { content: none !important; }
/* Override: „Hinzufügen“-Button in Recent-Add nicht strecken, kleinere kompakte Darstellung mit gutem Hover-Kontrast */
.recent-add-grid .item-actions .btn-success { 
  flex: 0 0 auto; /* nicht auf volle Breite strecken */
}
/* Fallback-Icons (SVG via background-image, farblich mit currentColor) – stellt sichtbare Symbole sicher, auch wenn CSS-Masken nicht greifen */
.gallery-actions .btn.btn-sm::before {
  content: '';
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: transparent; /* Fallback: kein farbiges Quadrat hinter dem SVG-Icon */
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  -webkit-mask-image: none; /* Masken im Fallback deaktivieren */
          mask-image: none;
}

/* Öffnen */
.gallery-actions .btn.btn-sm[data-action="open"]::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h7v2H7v10h10v-5h2v7H5V5z"/></svg>');
}

/* Teilen */
.gallery-actions .btn.btn-sm[data-action="share"]::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 12a3 3 0 013-3h3v2H10a1 1 0 000 2h3v2h-3a3 3 0 01-3-3zm10-5h-3V5h3a4 4 0 110 8h-3v-2h3a2 2 0 100-4zM14 11h-4v2h4v-2z"/></svg>');
}

/* Löschen */
.gallery-actions .btn.btn-sm[data-action="delete"]::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M6 19a2 2 0 002 2h8a2 2 0 002-2V7H6v12zm3.5-9h1v8h-1V10zm5 0h1v8h-1V10zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"/></svg>');
}

/* Header: Mobile Navigation (Hamburger) */
.nav-toggle { display: none; }

@media (max-width: 800px) {
  .site-header .container { position: relative; }

  /* eingeklappte Navigation */
  .site-nav {
    display: none;
    position: absolute;
    left: 8px; right: 8px;
    top: calc(100% + 8px);
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 6px;
    z-index: 50;
  }
  .site-nav a {
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
  }
  .site-nav a:hover { background: rgba(255,255,255,.12); }

  /* Hamburger-Button sichtbar */
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 8px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.35);
    cursor: pointer;
  }
  .nav-toggle .bar {
    display: block;
    width: 18px; height: 2px;
    background: #fff;
    margin: 2px 0;
    transition: transform .15s ease, opacity .15s ease;
  }

  /* geöffnet */
  .site-header.is-open .site-nav { display: flex; }
  .site-header.is-open .nav-toggle .bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .site-header.is-open .nav-toggle .bar:nth-child(2) { opacity: 0; }
  .site-header.is-open .nav-toggle .bar:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }
}
/* Header: Desktop Navigation rechts ausgerichtet, moderne Pill-Links + Icons */
@media (min-width: 801px) {
  .site-header .container {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .site-header .logo { flex: 0 0 auto; }

  /* Reihenfolge: Aktionen vor die Navigation, Navigation ganz rechts */
  .header-actions {
    order: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .site-nav {
    order: 2;
    margin-left: auto;            /* schiebt die Navigation ans rechte Containerende */
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  /* Pill-Links */
  .site-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.25);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.15),
      0 1px 8px rgba(0,0,0,.08);
    transition: background .15s ease, border-color .15s ease, transform .05s ease, box-shadow .15s ease;
  }
  .site-nav .nav-link:hover {
    background: rgba(255,255,255,.20);
    border-color: rgba(255,255,255,.45);
    text-decoration: none;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.2),
      0 3px 14px rgba(0,0,0,.14);
    transform: translateY(-1px);
  }
  .site-nav .nav-link:active { transform: translateY(0); }
  .site-nav .nav-link:focus-visible {
    outline: 2px solid rgba(255,255,255,.70);
    outline-offset: 2px;
  }

  /* Icons vor den Labels via CSS-Maske */
  .site-nav .nav-link::before {
    content: '';
    width: 16px;
    height: 16px;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: 16px 16px;
            mask-size: 16px 16px;
  }
  /* Home */
  .site-nav .nav-home::before {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 1 12h3v8z"/></svg>');
            mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 1 12h3v8z"/></svg>');
  }
  /* Galerie */
  .site-nav .nav-gallery::before {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z"/></svg>');
            mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z"/></svg>');
  }
  /* AGB */
  .site-nav .nav-agb::before {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6v20h12V8l-4-6zM13 11H8v2h5v-2zm-5 4h8v2H8v-2z"/></svg>');
            mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6v20h12V8l-4-6zM13 11H8v2h5v-2zm-5 4h8v2H8v-2z"/></svg>');
  }
  /* Impressum */
  .site-nav .nav-impressum::before {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 7h-2V7h2v2zm0 2h-2v6h2v-6z"/></svg>');
            mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 7h-2V7h2v2zm0 2h-2v6h2v-6z"/></svg>');
  }
}
/* Upload-CTA: prominenter „Hochladen“-Button, besonders im Dark Mode */
#btnUpload {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
  padding: 12px 18px;
  font-weight: 700;
  letter-spacing: .2px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(36,151,212,.28), 0 2px 8px rgba(0,0,0,.10);
  transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
}
#btnUpload:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(36,151,212,.34), 0 4px 10px rgba(0,0,0,.12);
}
#btnUpload:active { transform: translateY(0); }
#btnUpload:focus-visible {
  outline: 3px solid rgba(91,199,248,.6);
  outline-offset: 2px;
}
.theme-dark #btnUpload {
  background: linear-gradient(90deg, #5bc7f8, #2497d4);
  color: #0b0b0b;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 36px rgba(36,151,212,.45), 0 4px 16px rgba(0,0,0,.55);
}

/* Dropzone Redesign: moderner Karteneffekt mit Gradient-Border und sanfter Glow-Animation */
.dropzone {
  position: relative;
  border: 2px solid transparent; /* Border via layered backgrounds */
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 12px;
  align-items: center;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, rgba(36,151,212,.45), rgba(91,199,248,.35)) border-box,
    radial-gradient(1200px circle at 10% -10%, rgba(91,199,248,.08), transparent 36%);
  box-shadow: 0 10px 28px rgba(0,0,0,.06), inset 0 -1px 0 rgba(255,255,255,.08);
  transition: transform .06s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease;
}
.dropzone:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0,0,0,.08), inset 0 -1px 0 rgba(255,255,255,.10);
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, rgba(36,151,212,.55), rgba(91,199,248,.45)) border-box,
    radial-gradient(1200px circle at 10% -10%, rgba(91,199,248,.10), transparent 38%);
}
.dropzone.is-dragover {
  box-shadow: 0 0 0 6px rgba(91,199,248,.15), 0 18px 44px rgba(36,151,212,.22);
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, rgba(36,151,212,.75), rgba(91,199,248,.65)) border-box,
    radial-gradient(1200px circle at 10% -10%, rgba(91,199,248,.14), transparent 40%);
}

/* Dark-Mode-Optimierung für Dropzone */
.theme-dark .dropzone {
  background:
    linear-gradient(#10161c, #0e1318) padding-box,
    linear-gradient(135deg, rgba(91,199,248,.55), rgba(36,151,212,.45)) border-box,
    radial-gradient(1200px circle at 10% -10%, rgba(91,199,248,.10), transparent 40%);
  box-shadow: 0 12px 36px rgba(0,0,0,.55), inset 0 -1px 0 rgba(255,255,255,.03);
}
.theme-dark .dropzone:hover {
  background:
    linear-gradient(#10161c, #0e1318) padding-box,
    linear-gradient(135deg, rgba(91,199,248,.70), rgba(36,151,212,.60)) border-box,
    radial-gradient(1200px circle at 10% -10%, rgba(91,199,248,.14), transparent 42%);
  box-shadow: 0 16px 42px rgba(0,0,0,.6), inset 0 -1px 0 rgba(255,255,255,.05);
}
.theme-dark .dropzone.is-dragover {
  box-shadow: 0 0 0 8px rgba(91,199,248,.22), 0 22px 52px rgba(36,151,212,.35);
}

/* Dropzone Icon: größer, mit weicher Glaskarte */
.dropzone .dz-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(91,199,248,.16), rgba(91,199,248,.08));
  color: var(--primary);
  font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 4px 14px rgba(36,151,212,.15);
}

/* Dropzone Hilfetext/Call-to-Action klarer */
.dropzone .dz-help { color: var(--muted); font-size: 14px; }
.dropzone .dz-cta { display: inline-flex; gap: 10px; align-items: center; }
.dropzone .dz-cta .btn { padding: 9px 14px; border-radius: 10px; }

/* Mobile Feinschliff für Dropzone */
@media (max-width: 640px) {
  .dropzone { padding: 16px; }
  .dropzone .dz-icon { width: 48px; height: 48px; font-size: 22px; }
}
/* Dropzone – komplett modernisierte Headline-/Typografie und CTA-Button */
.dropzone .dz-head {
  display: grid;
  gap: 6px;
  justify-items: center;
  align-items: center;
  text-align: center;
}
.dropzone .dz-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .2px;
  color: var(--text);
}
.theme-dark .dropzone .dz-title { color: #e6eef6; }

.dropzone .dz-sub {
  font-size: .95rem;
  color: var(--muted);
}

.dropzone .dz-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* CTA in der Dropzone: prominent wie der Haupt-Upload-Button */
.dropzone .dz-cta .btn {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(36,151,212,.22);
  transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
}
.dropzone .dz-cta .btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(36,151,212,.30);
}
.dropzone .dz-cta .btn:active { transform: translateY(0); }
.dropzone .dz-cta .btn:focus-visible {
  outline: 3px solid rgba(91,199,248,.6);
  outline-offset: 2px;
}
.theme-dark .dropzone .dz-cta .btn {
  background: linear-gradient(90deg, #5bc7f8, #2497d4);
  color: #0b0b0b;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(36,151,212,.45), 0 4px 16px rgba(0,0,0,.55);
}
/* Dropzone – moderne Typografie und Icon-Maske (Cloud-Upload) */
.dropzone .dz-head {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-items: center;
  text-align: center;
  padding: 4px 0 2px;
}
.dropzone .dz-title {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: .2px;
  color: var(--text);
}
.theme-dark .dropzone .dz-title { color: #e6eef6; }
.dropzone .dz-sub {
  font-size: .95rem;
  color: var(--muted);
  letter-spacing: .1px;
}

/* Cloud-Upload Icon per CSS-Maske, Text/Emoji ausgeblendet */
.dropzone .dz-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(91,199,248,.16), rgba(91,199,248,.10));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 18px rgba(36,151,212,.18);
  color: transparent; /* Emoji-Text ausblenden */
  overflow: hidden;
  text-indent: -9999px;
}
.dropzone .dz-icon::before {
  content: '';
  width: 28px; height: 28px;
  display: inline-block;
  background-color: var(--primary);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 28px 28px;   mask-size: 28px 28px;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 18H6a4 4 0 010-8c.29 0 .57.03.84.08A6 6 0 0118 7a5 5 0 011 9.9V18zm-7-7v6h2v-6h3l-4-4-4 4h3z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 18H6a4 4 0 010-8c.29 0 .57.03.84.08A6 6 0 0118 7a5 5 0 011 9.9V18zm-7-7v6h2v-6h3l-4-4-4 4h3z"/></svg>');
}

/* Format-Badges (statt einfachem Text) */
.dropzone .dz-badges {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}
.dropzone .dz-badges span {
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(36,151,212,.10);
  border: 1px solid rgba(36,151,212,.35);
  color: var(--text);
}
.theme-dark .dropzone .dz-badges span {
  background: rgba(91,199,248,.12);
  border-color: rgba(91,199,248,.40);
  color: #e6eef6;
}

/* CTA in der Dropzone als Primary-Button */
.dropzone .dz-cta .btn {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(36,151,212,.22);
  transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
}
.dropzone .dz-cta .btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(36,151,212,.30);
}
.dropzone .dz-cta .btn:active { transform: translateY(0); }
.dropzone .dz-cta .btn:focus-visible {
  outline: 3px solid rgba(91,199,248,.6);
  outline-offset: 2px;
}
.theme-dark .dropzone .dz-cta .btn {
  background: linear-gradient(90deg, #5bc7f8, #2497d4);
  color: #0b0b0b;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(36,151,212,.45), 0 4px 16px rgba(0,0,0,.55);
}

/* Dragover-Zustand: Titel etwas betonen */
.dropzone.is-dragover .dz-title { color: var(--primary); }
.theme-dark .dropzone.is-dragover .dz-title { color: #5bc7f8; }
/* Header/Footermenü – Optik-Upgrade mit Icons, Hover-Underline und feineren Größen */
/* Generische Icon-Basis für alle .nav-link (Header + Footer) */
.site-nav .nav-link {
  position: relative;
}
.site-nav .nav-link::before {
  content: '';
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-size: 16px 16px;    mask-size: 16px 16px;
}
/* Einzelne Piktogramme (Bootstrap-ähnlich) */
.site-nav .nav-home::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 1 12h3v8z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 1 12h3v8z"/></svg>');
}
.site-nav .nav-gallery::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z"/></svg>');
}
.site-nav .nav-agb::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6v20h12V8l-4-6zM13 11H8v2h5v-2zm-5 4h8v2H8v-2z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6v20h12V8l-4-6zM13 11H8v2h5v-2zm-5 4h8v2H8v-2z"/></svg>');
}
.site-nav .nav-impressum::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 7h-2V7h2v2zm0 2h-2v6h2v-6z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 7h-2V7h2v2zm0 2h-2v6h2v-6z"/></svg>');
}
.site-nav .nav-report::before {
  /* Achtung: Nur im Footer gesetzt – Header hat keinen „Melden“-Punkt */
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M1 21h22L12 2 1 21zm12-3h-2v2h2v-2zm0-8h-2v6h2V10z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M1 21h22L12 2 1 21zm12-3h-2v2h2v-2zm0-8h-2v6h2V10z"/></svg>');
}

/* Header-Underline-Animation (Hover) */
@media (min-width: 801px) {
  .site-header .site-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    background: rgba(255,255,255,.55);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .2s ease;
  }
  .site-header .site-nav .nav-link:hover::after {
    transform: scaleX(1);
  }
}

/* Footer: feinere Typo für Überschriften und Menü-Links (kleiner, klar) */
.site-footer .footer-columns h4 {
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  opacity: .9;
}
.site-footer .site-nav .nav-link {
  font-size: .90rem !important;
}

/* Footer-Icons (angepasste Größe) */
.site-footer .site-nav .nav-link::before {
  width: 14px;
  height: 14px;
  -webkit-mask-size: 14px 14px;
          mask-size: 14px 14px;
}

/* Footer-Hover: dezenter farblicher Akzent */
.site-footer .site-nav .nav-link {
  background: rgba(0,0,0,.03);
  border: 1px solid var(--border);
}
.site-footer .site-nav .nav-link:hover {
  background: rgba(36,151,212,.08);
  border-color: var(--primary);
  transform: translateY(-1px);
}
/* Sektion-Header im ersten Container (Upload) – moderner Titel mit Icon und Akzentlinie */
.section-head {
  display: grid;
  gap: 6px;
  align-items: start;
  margin-bottom: 16px;
}
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  margin-bottom: 20px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
}
.theme-dark .section-title { color: #e6eef6; }

/* Titel-Icon (Bild/Foto) */
.section-title .st-ic {
  width: 22px;
  height: 22px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-size: 22px 22px;    mask-size: 22px 22px;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23000" viewBox="0 0 24 24"><path d="M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14h18zM8.5 13l2.5 3.01L14.5 12l4.5 6H5l3.5-5zM8 9.5A1.5 1.5 0 1 0 8 6.5 1.5 1.5 0 0 0 8 9.5z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23000" viewBox="0 0 24 24"><path d="M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14h18zM8.5 13l2.5 3.01L14.5 12l4.5 6H5l3.5-5zM8 9.5A1.5 1.5 0 1 0 8 6.5 1.5 1.5 0 0 0 8 9.5z"/></svg>');
}
/* Galerie-Icon (Grid) */
.section-title .st-ic.sec-ic-gal {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z"/></svg>');
}

/* Akzentlinie unter dem Titel – nur wenn .has-accent gesetzt wird */
.section-title.has-accent::after {
  content: '';
  display: block;
  height: 3px;
  width: 88px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  margin-top: 6px;
  margin-left: 0;
}
/* Variante ohne Akzent explizit erzwingen */
.section-title.no-accent::after { display: none !important; }

/* Untertitel dezenter, moderner */
.section-sub {
  font-size: .98rem;
  color: var(--muted);
  margin: 0;
}
/* Erlaubte-Formate-Badges im Untertitel */
.section-sub .sub-badges {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: 8px;
  vertical-align: middle;
}
.section-sub .sub-badges .badge {
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(36,151,212,.10);
  border: 1px solid rgba(36,151,212,.35);
  color: var(--text);
}
.theme-dark .section-sub .sub-badges .badge {
  background: rgba(91,199,248,.12);
  border-color: rgba(91,199,248,.40);
  color: #e6eef6;
}

/* Galerie-Action-Buttons (Öffnen/Teilen/Löschen) – sicherstellen, dass Icons sichtbar sind */
.gallery-actions .btn.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* etwas mehr Abstand, falls Text ergänzt wird */
}
/* (Icons sind bereits via ::before registriert. Fallback-BG-SVG ist aktiv.) */

/* „Galerie anlegen“-Button: Icon runder und etwas klarer */
.btn-create-gallery .ic {
  width: 20px; height: 20px;
  background: rgba(255,255,255,.24);
}

/* Optional: kleine Verbesserungen für „Deine Galerien“ Überschrift */
.galleries-grid + .muted,
#myGalleries + .muted {
  font-size: .95rem;
}
/* Recent-Icon (Uhr) für "Deine letzten Uploads" */
.section-title .st-ic.sec-ic-recent {
  -webkit-mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/&gt;&lt;/svg&gt;');
          mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/&gt;&lt;/svg&gt;');
}

/* Akzentlinie bei Überschriften: als Unterstreichung sauber integriert (statt "Strich rechts") */
.section-title.has-accent { position: relative; padding-bottom: 4px; }
.section-title.has-accent::after {
  content: '';
  display: block;
  height: 3px;
  width: 88px;                 /* etwas länger für bessere Wahrnehmung */
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  margin-top: 6px;
  margin-left: 0;              /* überschreibt frühere seitliche Platzierung */
}
/* UI Overrides — Section-Accent und Recent-Icon (am Dateiende, überschreibt frühere Deklarationen) */
.section-title.has-accent { position: relative; padding-bottom: 4px; }
.section-title.has-accent::after {
  content: '';
  display: block;              /* statt inline-block: echte Unterstreichung */
  height: 3px;
  width: 88px;                 /* etwas länger, moderner Look */
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  margin-top: 6px;
  margin-left: 0;              /* kein seitlicher „Strich rechts“ */
}

/* „Deine letzten Uploads“ – Uhr-Icon (setzt sich wegen später Positionierung durch) */
.section-title .st-ic.sec-ic-recent {
  width: 22px;
  height: 22px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-size: 22px 22px;    mask-size: 22px 22px;
  -webkit-mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/&gt;&lt;/svg&gt;');
          mask-image: url('data:image/svg+xml;utf8,&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/&gt;&lt;/svg&gt;');
}
/* FINAL OVERRIDES – Section-Underline fix und Recent-Icon (am Dateiende, überschreibt frühere Regeln) */
.section-head .section-title.has-accent {
  position: relative !important;
  padding-bottom: 10px !important; /* Platz für die Unterstreichung */
}
.section-head .section-title.has-accent::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 3px !important;
  width: 88px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, var(--primary), var(--primary-2)) !important;
  display: block !important;
  margin: 0 !important;           /* kein seitlicher Strich mehr */
}

/* „Deine letzten Uploads“ – Icon (Uhr) korrekt per Mask, unescaped SVG (setzt sich durch) */
.section-title .st-ic.sec-ic-recent {
  width: 22px;
  height: 22px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-size: 22px 22px;    mask-size: 22px 22px;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/></svg>');
}
/* Hotfix: Upload-Überschrift – jede Rest-Akzentlinie zuverlässig entfernen */
.upload-section .section-title::after { display: none !important; }
/* Sicherheitshalber: no-accent immer ohne Linie */
.section-title.no-accent::after { content: none !important; display: none !important; }

/* „Deine letzten Uploads“ – Icon sicher sichtbar (Mask + Fallback Background-SVG) */
.section-title .st-ic.sec-ic-recent {
  width: 22px;
  height: 22px;
  display: inline-block;
  background-color: currentColor;
  /* Primär: Mask-Icon */
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-size: 22px 22px;    mask-size: 22px 22px;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/></svg>');
          mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/></svg>');
  /* Fallback: sichtbares SVG als Background (falls Masken nicht greifen) */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11h5v-2h-4V7h-2v6z"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}
/* Enhanced Section Headers – aufwändiger Look für alle drei Bereiche */
.section-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  padding-bottom: 12px;
  margin-bottom: 4px;
}
.section-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 120px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 16px rgba(36,151,212,.18);
}
.theme-dark .section-head::after {
  box-shadow: 0 8px 18px rgba(36,151,212,.35);
}

/* Breite und Gewicht je Sektion anpassen (dezente Variation) */
.upload-section .section-head::after { width: 140px; }
.recent-section .section-head::after { width: 110px; }

/* Titel-Optik kräftiger und moderner */
.section-head .section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  font-weight: 900;
  letter-spacing: .3px;
}

/* Trailing-Icon rechts neben dem Text (für „Deine letzten Uploads“) */
.section-head .section-title.trailing-icon { display: inline-flex; }
.section-head .section-title.trailing-icon .st-ic { margin-left: 10px; }

/* Icon-Glanz und sichtbarer Kontrast (ohne Markup-Änderungen) */
.section-head .section-title .st-ic {
  position: relative;
  filter: drop-shadow(0 2px 8px rgba(36,151,212,.28));
}
.section-head .section-title .st-ic::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient( circle, rgba(36,151,212,.20), transparent 60% );
  z-index: -1;
}

/* Unterstreichung ausschließlich via .section-head::after (robust gegen alte Regeln) */
.upload-section .section-title.enhanced::after { display: none !important; } /* Safety: keine Kollisionslinie */

/* Metazeile unter den Recent-Thumbnails – bessere Lesbarkeit */
.recent-grid .item-meta {
  padding: 8px 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.recent-grid .item-meta .meta-sub {
  font-size: 12px;
  color: var(--muted);
}

/* Button-Leiste bei Recent-Karten – klare Absetzung */
.recent-grid .item-actions {
  display: flex;
  gap: 8px;
  padding: 8px 10px 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
/* Spacing-Override: mehr Abstand unter .section-head (übersteuert frühere Werte) */
.section-head { margin-bottom: 20px !important; }
.upload-section .section-head { margin-bottom: 24px !important; }
.recent-section .section-head { margin-bottom: 20px !important; }
/* Section-Head Abstände – finale, robuste Overrides (brechen Margin-Collapse) */
.card .section-head { margin-bottom: 28px !important; }
.upload-section .section-head { margin-bottom: 32px !important; }
.recent-section .section-head { margin-bottom: 24px !important; }

/* Falls Margins kollabieren: gebe dem Folgeschwester-Element zusätzlich Abstand nach oben */
.card .section-head + * { margin-top: 8px !important; }

@media (max-width: 640px) {
  .card .section-head { margin-bottom: 20px !important; }
  .card .section-head + * { margin-top: 6px !important; }
}