/* ============================================================
   B26 – Spain 2026 · Foto-Karte
   Editorial-Theme im Magazin-Stil (angelehnt an National
   Geographic): Schwarz/Weiß, kräftige Condensed-Typografie,
   Rahmen-Logo, Akzent in Vermilion statt Gelb.
   ============================================================ */

:root {
  --paper: #ffffff;
  --ink: #101418;
  --ink-80: #2a3138;
  --gray: #5f6b76;
  --gray-light: #eef0f2;
  --gray-mid: #d8dde1;
  --accent: #e14e1d;        /* Vermilion statt NatGeo-Gelb */
  --accent-dark: #b83c12;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(16, 20, 24, 0.18);
  --shadow-soft: 0 2px 12px rgba(16, 20, 24, 0.12);
  --radius: 2px;            /* bewusst kantig, editorial */
  --font-head: "Barlow Condensed", sans-serif;
  --font-body: "Inter", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; border: none; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  overflow: hidden;
  height: 100dvh;
}

/* Das Markenzeichen: der Rahmen */
.ng-frame {
  display: inline-grid; place-content: center;
  border: 3px solid var(--accent);
  font-family: var(--font-head); font-weight: 700;
  color: currentColor; line-height: 1;
  padding: 4px 9px 5px;
  letter-spacing: 0.02em;
}

.kicker {
  font-family: var(--font-body); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent);
}

#map { position: fixed; inset: 0; z-index: 1; background: #e8eaec; }

/* ---------- Kopfzeile ---------- */
.topbar-b26 {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.brand-b26 { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand-b26 .script {
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  border: 3px solid var(--accent); padding: 2px 8px 3px; line-height: 1;
}
.brand-sub {
  font-size: 0.68rem; font-weight: 700; color: var(--white);
  letter-spacing: 0.24em; text-transform: uppercase;
}
a.topbar-btn { text-decoration: none; display: inline-block; }

.topbar-right { display: flex; gap: 10px; align-items: center; }
.topbar-btn {
  color: var(--white); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(255,255,255,0.1); font-family: var(--font-body);
  cursor: pointer; padding: 8px 12px; border-radius: var(--radius);
  transition: background 0.15s;
}
.topbar-btn:hover { background: rgba(255,255,255,0.18); }
.topbar-btn:active { background: rgba(255,255,255,0.24); }
.project-select {
  margin-left: 8px;
  max-width: 140px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 13px;
}
.admin-member-select {
  margin-top: 6px;
  max-width: 100%;
  padding: 6px;
  border-radius: 6px;
}
.user-chip {
  color: var(--white); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: none; font-family: var(--font-body); cursor: pointer;
  padding: 8px 10px; border-radius: var(--radius);
  transition: background 0.15s;
}
.user-chip:active { background: rgba(255,255,255,0.12); }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: transparent; color: var(--white);
  font-size: 1rem; cursor: pointer;
  transition: background 0.15s;
}
.icon-btn:active { background: rgba(255,255,255,0.15); }

/* ---------- FAB ---------- */
.fab {
  position: fixed; right: 14px; bottom: calc(160px + var(--safe-bottom)); z-index: 25;
  width: 58px; height: 58px; border-radius: var(--radius);
  background: var(--accent);
  color: var(--white); cursor: pointer;
  box-shadow: var(--shadow);
  display: grid; place-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s;
  animation: fab-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fab:active { transform: scale(0.9); background: var(--accent-dark); }
@keyframes fab-in { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- Zeitleiste ---------- */
.timeline {
  position: fixed; left: 0; right: 0;
  bottom: 0; z-index: 20;
  background: var(--paper);
  padding: 14px 18px calc(12px + var(--safe-bottom));
  box-shadow: 0 -4px 24px rgba(16, 20, 24, 0.15);
}
.timeline::before {
  content: ""; position: absolute; top: 0; left: 18px; right: 18px; height: 3px;
  background: var(--accent);
}

.timeline-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.timeline-label {
  font-family: var(--font-head); font-weight: 600; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink); min-height: 1.2em;
}
.window-chips { display: flex; gap: 4px; }
.chip-b26 {
  background: var(--gray-light);
  color: var(--gray); font-family: var(--font-body); font-weight: 700;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  border-radius: var(--radius); padding: 6px 12px; cursor: pointer;
  transition: all 0.15s;
}
.chip-b26.active { background: var(--ink); color: var(--white); }

.slider-wrap { user-select: none; -webkit-user-select: none; }
.slider-track {
  position: relative; height: 34px; border-radius: var(--radius);
  background: var(--gray-light);
  overflow: hidden;
  touch-action: none; cursor: pointer;
}
.slider-density { position: absolute; inset: 0; }
.slider-density span {
  position: absolute; bottom: 0; width: 3px;
}
.slider-window {
  position: absolute; top: 0; bottom: 0;
  background: rgba(225, 78, 29, 0.16);
  box-shadow: inset 3px 0 0 var(--accent), inset -3px 0 0 var(--accent);
  transition: opacity 0.2s;
}
.slider-handle {
  position: absolute; top: 0; bottom: 0; width: 18px; margin-left: -9px;
  background: var(--ink);
  display: grid; place-content: center; color: var(--white);
  transition: transform 0.1s;
}
.slider-handle::after { content: "‖"; font-size: 0.7rem; }
.slider-track.dragging .slider-handle { transform: scaleX(1.2); }
.timeline.all-mode .slider-window, .timeline.all-mode .slider-handle { opacity: 0.25; }

.slider-dates {
  display: flex; justify-content: space-between;
  font-size: 0.64rem; color: var(--gray); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; margin-top: 6px;
}

/* ---------- Karten-Marker ---------- */
.photo-marker { background: none; }
.photo-marker .pm {
  width: 46px; height: 46px; border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--c, var(--accent)), 0 6px 16px rgba(16, 20, 24, 0.35);
  overflow: hidden;
  transform-origin: bottom center;
  animation: marker-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.photo-marker .pm img { width: 100%; height: 100%; object-fit: cover; }
.photo-marker .pm-count {
  position: absolute; top: -8px; right: -10px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-content: center;
  background: var(--accent); color: var(--white);
  font-family: var(--font-body); font-size: 0.66rem; font-weight: 700;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  z-index: 2;
}
.photo-marker .pm-play {
  position: absolute; inset: 0; display: grid; place-content: center;
  color: var(--white); font-size: 0.95rem;
  background: rgba(16, 20, 24, 0.35);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  pointer-events: none;
}
.photo-marker .pm-name {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  background: var(--c, var(--accent)); color: var(--white);
  font-family: var(--font-body); font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: var(--radius); white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
@keyframes marker-pop { from { transform: scale(0); } to { transform: scale(1); } }

.home-marker { background: none; }
.home-marker .hm {
  width: 30px; height: 30px;
  display: grid; place-content: center;
  background: var(--ink); color: var(--white);
  border: 2px solid var(--white);
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  animation: marker-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Ortungsbanner ---------- */
.locate-banner {
  position: fixed; top: calc(66px + var(--safe-top)); left: 50%;
  transform: translateX(-50%) translateY(-180px);
  opacity: 0; pointer-events: none;
  z-index: 30;
  background: var(--ink); color: var(--white);
  padding: 11px 18px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.82rem;
  box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
  max-width: 92vw; white-space: nowrap;
}
.locate-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1; pointer-events: auto;
}
.locate-banner button {
  background: var(--accent); color: var(--white);
  border-radius: var(--radius); padding: 5px 12px;
  font-weight: 700; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; cursor: pointer;
}

body.locating .leaflet-marker-pane,
body.locating .leaflet-tooltip-pane { pointer-events: none !important; }
body.locating .leaflet-marker-pane * { pointer-events: none !important; }
body.locating #map { cursor: crosshair; }

/* ---------- Sheet (Upload/Bearbeiten) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(16, 20, 24, 0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
  display: flex; align-items: flex-end; justify-content: center;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  background: var(--paper);
  width: min(100%, 520px);
  /* overflow+transform on the same node breaks native <select> dropdowns */
  overflow: visible;
  padding: 10px 24px calc(24px + var(--safe-bottom));
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  border-top: 4px solid var(--accent);
}
.sheet-backdrop.show .sheet { transform: translateY(0); }
.sheet-grip {
  width: 40px; height: 4px; border-radius: var(--radius); background: var(--gray-mid);
  margin: 8px auto 14px;
}
.sheet h2 {
  font-family: var(--font-head); font-size: 1.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink); margin-bottom: 12px;
}
.edit-preview {
  width: 100%; max-height: 30dvh; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 10px; background: var(--gray-light);
}
.edit-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.flag {
  font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  border-radius: var(--radius); padding: 5px 10px;
}
.flag.ok { background: var(--gray-light); color: var(--ink-80); }
.flag.warn { background: var(--accent); color: var(--white); }

.field {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px;
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--gray);
}
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  border-radius: var(--radius);
  padding: 12px 14px; outline: none;
  background: var(--gray-light);
  box-shadow: inset 0 -2px 0 var(--gray-mid);
  transition: box-shadow 0.15s;
}
.field input:focus, .field textarea:focus {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.sheet-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 4px; }

/* ---------- Konto & Verwaltung ---------- */
.field-hint {
  font-weight: 400; text-transform: none; letter-spacing: 0;
  font-size: 0.72rem; color: var(--gray); margin-left: 6px;
}
.color-picker {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0;
}
.color-swatch {
  width: 36px; height: 36px; border-radius: var(--radius);
  cursor: pointer; position: relative;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.08);
  transition: transform 0.12s, box-shadow 0.12s;
}
.color-swatch:active { transform: scale(0.94); }
.color-swatch.selected {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink);
}
.acc-section { margin-bottom: 15px; }
.acc-section summary {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--gray);
  cursor: pointer; padding: 6px 0; list-style-position: inside;
}
.acc-section[open] summary { margin-bottom: 10px; color: var(--ink); }

.admin-area {
  margin-top: 22px; padding-top: 16px;
  border-top: 2px solid var(--gray-mid);
}
.admin-title-spaced { margin-top: 22px; }
.admin-title {
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.admin-badge {
  background: var(--ink); color: var(--white);
  font-family: var(--font-body); font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 3px 7px; border-radius: var(--radius);
}
.admin-sub {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--gray); margin: 18px 0 10px;
}
.user-list { display: flex; flex-direction: column; }
.user-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1px solid var(--gray-light);
  font-size: 0.9rem;
}
.user-row-name { flex: 1; font-weight: 600; color: var(--ink); min-width: 40%; }
.user-row-name small { color: var(--gray); font-weight: 400; }
.user-row.inactive .user-row-name { color: var(--gray); }
.user-row.inactive .author-dot { opacity: 0.4; }
.user-row-actions { display: flex; gap: 6px; margin-left: auto; }
.btn-outline.tiny { padding: 7px 10px; font-size: 0.62rem; letter-spacing: 0.06em; }
.btn-outline.tiny.danger { color: var(--accent-dark); }
a.btn-outline.tiny { text-decoration: none; display: inline-flex; align-items: center; }
.admin-badge.off { background: var(--gray); }
.admin-form { display: flex; flex-direction: column; gap: 10px; }
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="number"] {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  border-radius: var(--radius); padding: 12px 14px; outline: none;
  background: var(--gray-light);
  box-shadow: inset 0 -2px 0 var(--gray-mid);
  transition: box-shadow 0.15s;
}
.admin-form input[type="text"]:focus,
.admin-form input[type="email"]:focus,
.admin-form input[type="number"]:focus { box-shadow: inset 0 -2px 0 var(--accent); }
.admin-map-hint {
  font-size: 0.72rem; font-weight: 600; color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.admin-pick-map {
  height: min(42vh, 320px);
  border-radius: var(--radius);
  background: var(--gray-light);
  box-shadow: inset 0 0 0 2px var(--gray-mid);
  z-index: 1;
}
.admin-result {
  margin-top: 14px; padding: 12px 14px;
  background: var(--gray-light); border-left: 3px solid var(--accent);
  border-radius: var(--radius); font-size: 0.88rem; line-height: 1.5;
}
.admin-result code {
  font-size: 1rem; font-weight: 700; color: var(--accent-dark);
  user-select: all; -webkit-user-select: all;
}
.admin-result small { color: var(--gray); }

/* ---------- Admin page ---------- */
body.admin-page {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100dvh;
  background: var(--paper);
}
.admin-page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(72px + var(--safe-top)) 20px calc(40px + var(--safe-bottom));
}
.admin-page-title {
  font-family: var(--font-head); font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink);
  margin-bottom: 18px;
}
.admin-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.admin-nav-btn {
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--gray-light); color: var(--ink-80); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-nav-btn:hover { background: var(--gray-mid); }
.admin-nav-btn.active {
  background: var(--ink); color: var(--white);
}
.admin-panel[hidden] { display: none !important; }
.admin-panel-head {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 14px;
  margin-bottom: 18px;
}
.admin-panel-lead {
  color: var(--gray); font-size: 0.92rem; line-height: 1.4; margin-top: 4px;
  max-width: 36em;
}
.admin-projects-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.admin-project-picker {
  border: 2px solid var(--gray-mid);
  border-radius: var(--radius);
  padding: 12px 14px 14px;
  background: var(--paper);
}
.admin-picker-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 360px; overflow-y: auto;
}
.admin-picker-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left;
  padding: 12px 12px; border-radius: var(--radius);
  background: var(--gray-light); color: var(--ink); cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, box-shadow 0.15s;
}
.admin-picker-item:hover { background: #e4e7ea; }
.admin-picker-item.active {
  background: var(--ink); color: var(--white);
  box-shadow: inset 3px 0 0 var(--accent);
}
.admin-picker-name {
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.admin-picker-slug {
  font-size: 0.74rem; font-weight: 600; opacity: 0.75;
}
.admin-picker-empty {
  color: var(--gray); font-weight: 600; font-size: 0.88rem;
  padding: 8px 2px;
}
.admin-project-workspace {
  min-height: 280px;
}
.admin-empty {
  border: 2px dashed var(--gray-mid);
  border-radius: var(--radius);
  padding: 36px 22px;
  color: var(--gray); font-weight: 600; line-height: 1.45;
}
.admin-detail-head {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.admin-detail-title {
  font-family: var(--font-head); font-size: 1.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink);
}
.admin-detail-slug {
  color: var(--gray); font-weight: 600; font-size: 0.85rem; margin-top: 4px;
}
.admin-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 22px;
}
.admin-info-grid .wide { grid-column: 1 / -1; }
.admin-info-grid dt {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--gray); margin-bottom: 4px;
}
.admin-info-grid dd {
  font-weight: 600; color: var(--ink); line-height: 1.35;
}
.admin-form-inline {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 12px;
}
.admin-form-inline .admin-member-select {
  flex: 1; min-width: 160px; margin-top: 0;
  padding: 10px 12px;
  background: var(--gray-light);
  font-family: var(--font-body); font-size: 0.95rem;
}
.btn-ghost {
  background: transparent; color: var(--gray);
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 10px 12px; cursor: pointer;
}
.btn-ghost:hover { color: var(--ink); }
body.admin-page .toast-b26 {
  bottom: calc(28px + var(--safe-bottom));
}
body.admin-page .leaflet-control-zoom {
  margin-top: 10px !important;
}
@media (min-width: 900px) {
  .admin-projects-layout {
    grid-template-columns: minmax(220px, 280px) 1fr;
    align-items: start;
  }
  .admin-picker-list { max-height: min(70vh, 640px); }
}

/* ---------- Home / projects landing ---------- */
body.home-page {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100dvh;
  background: var(--paper);
}
.home-main {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(88px + var(--safe-top)) 20px calc(48px + var(--safe-bottom));
}
.home-kicker {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.26em; color: var(--gray); margin-bottom: 10px;
}
.home-title {
  font-family: var(--font-head); font-size: clamp(2.4rem, 8vw, 3.6rem); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; line-height: 0.95;
  color: var(--ink); margin-bottom: 12px;
}
.home-lead {
  color: var(--ink-80); font-size: 1.05rem; line-height: 1.45;
  margin-bottom: 28px; max-width: 34em;
}
.home-list {
  display: flex; flex-direction: column;
  border-top: 2px solid var(--ink);
}
.home-project {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--gray-mid);
  text-decoration: none; color: inherit;
  transition: background 0.15s, padding-left 0.15s;
}
.home-project:hover,
.home-project:focus-visible {
  background: var(--gray-light);
  padding-left: 8px;
  outline: none;
}
.home-project-name {
  grid-column: 1;
  font-family: var(--font-head); font-size: 1.55rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink);
}
.home-project-meta {
  grid-column: 1;
  font-size: 0.78rem; font-weight: 600; color: var(--gray);
  letter-spacing: 0.04em; margin-top: 4px;
}
.home-project-arrow {
  grid-column: 2; grid-row: 1 / -1;
  font-family: var(--font-head); font-size: 1.8rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.home-empty {
  padding: 28px 4px;
  color: var(--gray); font-weight: 600; line-height: 1.45;
}
body.home-page .toast-b26 {
  bottom: calc(28px + var(--safe-bottom));
}
body.home-page .user-chip { cursor: default; }

.media-stats { display: flex; flex-direction: column; gap: 14px; }
.media-stats-loading { color: var(--gray); font-size: 0.85rem; font-weight: 600; }
.media-summary {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.media-stat {
  background: var(--gray-light); border-radius: var(--radius);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.media-stat.wide { grid-column: 1 / -1; }
.media-stat-label {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--gray);
}
.media-stat-value {
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 700;
  color: var(--ink); line-height: 1.1;
}
.media-stat-sub { font-size: 0.72rem; color: var(--gray); font-weight: 600; }
.media-user-table, .media-item-table {
  width: 100%; border-collapse: collapse; font-size: 0.78rem;
}
.media-user-table th, .media-item-table th {
  text-align: left; font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--gray);
  padding: 6px 8px 8px 0; border-bottom: 1px solid var(--gray-mid);
}
.media-user-table td, .media-item-table td {
  padding: 8px 8px 8px 0; border-bottom: 1px solid var(--gray-light);
  vertical-align: middle;
}
.media-user-table td.num, .media-item-table td.num {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.media-user-table tr:last-child td, .media-item-table tr:last-child td { border-bottom: none; }
.media-user-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.media-item-scroll {
  max-height: 220px; overflow-y: auto; border-radius: var(--radius);
  background: var(--gray-light); padding: 8px 10px;
}
.media-type-badge {
  display: inline-block; font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 2px 6px; border-radius: var(--radius);
  background: var(--gray-mid); color: var(--ink-80);
}
.media-type-badge.video { background: var(--ink); color: var(--white); }
.media-missing { color: var(--accent-dark); font-weight: 700; }

.btn-sun {
  background: var(--accent); color: var(--white);
  border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 14px 28px; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-sun:active { background: var(--accent-dark); transform: scale(0.97); }
.btn-outline {
  background: var(--gray-light); color: var(--ink);
  border-radius: var(--radius); font-family: var(--font-body); font-weight: 700;
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 12px 18px; cursor: pointer; transition: all 0.15s;
}
.btn-outline.small { padding: 8px 14px; font-size: 0.68rem; }
.btn-outline.set { background: var(--ink); color: var(--white); }
.btn-ghost {
  background: none; color: var(--accent-dark); font-family: var(--font-body);
  font-weight: 700; font-size: 0.76rem; text-transform: uppercase;
  letter-spacing: 0.1em; cursor: pointer; padding: 12px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(5, 7, 9, 0.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
  padding: 20px;
}
.lightbox.show { opacity: 1; pointer-events: auto; }
.lightbox-inner {
  display: flex; flex-direction: column; align-items: center;
  width: min(100%, 640px);
}
.lightbox-sidebar { width: 100%; }
.lightbox-stage {
  display: grid; place-content: center;
  max-width: 100%;
}
.lightbox img, .lightbox video {
  max-width: 100%; max-height: 70dvh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  transform: scale(0.95); transition: transform 0.25s ease;
}
.lightbox.show img, .lightbox.show video { transform: scale(1); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 64px;
  background: rgba(255,255,255,0.1); color: var(--white);
  font-size: 1.7rem; font-weight: 700; line-height: 1;
  cursor: pointer; backdrop-filter: blur(4px);
  border-radius: var(--radius);
  transition: background 0.15s;
}
.lightbox-nav:active { background: var(--accent); }
.lightbox-nav.prev { left: 8px; }
.lightbox-nav.next { right: 8px; }
.lightbox-counter {
  margin-left: auto; color: rgba(255,255,255,0.6);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em;
}
.lightbox-close {
  position: absolute; top: calc(14px + var(--safe-top)); right: 16px;
  width: 40px; height: 40px; border-radius: var(--radius);
  background: rgba(255,255,255,0.12); color: var(--white); font-size: 1.05rem;
  cursor: pointer; backdrop-filter: blur(4px);
}
.lightbox-info {
  color: var(--white); width: min(100%, 640px); margin-top: 18px;
  display: flex; flex-direction: column; gap: 7px;
  padding-left: 12px;
  box-shadow: inset 3px 0 0 var(--accent);
}
.lightbox-meta { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.lightbox-meta b { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }
.lightbox-meta span:last-child { color: rgba(255,255,255,0.55); }
.author-dot { width: 11px; height: 11px; border-radius: var(--radius); background: var(--accent); }
.lightbox-info p { font-size: 0.95rem; color: rgba(255,255,255,0.85); line-height: 1.5; }
.lightbox-info .btn-outline {
  align-self: flex-start; background: rgba(255,255,255,0.12); color: var(--white); margin-top: 4px;
}

/* ---------- Upload-Fortschritt & Toast ---------- */
.upload-progress {
  position: fixed; top: calc(70px + var(--safe-top)); left: 50%;
  transform: translateX(-50%) translateY(-180px); z-index: 45;
  opacity: 0; pointer-events: none;
  background: var(--ink); border-radius: var(--radius); padding: 11px 20px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 0.8rem; color: var(--white);
  transition: transform 0.3s, opacity 0.25s;
}
.upload-progress.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0 70%, rgba(255,255,255,0.25) 70% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-b26 {
  position: fixed; bottom: calc(180px + var(--safe-bottom)); left: 50%;
  transform: translateX(-50%) translateY(30px); z-index: 60;
  background: var(--ink); color: var(--white); font-weight: 600; font-size: 0.84rem;
  padding: 12px 22px; border-radius: var(--radius); opacity: 0; pointer-events: none;
  transition: all 0.3s; box-shadow: var(--shadow); max-width: 90vw; text-align: center;
  border-left: 3px solid var(--accent);
}
.toast-b26.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Login-Seite ---------- */
.login-body { background: var(--paper); overflow: hidden; }
.login-scene { min-height: 100dvh; display: grid; place-content: center; position: relative; }

/* dezente Magazin-Struktur: schwarzes Band unten */
.login-scene::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: max(9dvh, 56px); background: var(--ink);
}
.login-scene::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: max(9dvh, 56px);
  height: 4px; background: var(--accent);
}

.login-card {
  position: relative; z-index: 2;
  background: var(--paper);
  padding: 20px 10px; width: min(88vw, 360px);
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes card-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.login-emblem {
  font-family: var(--font-head); font-weight: 700; font-size: 2.4rem;
  border: 4px solid var(--accent); padding: 4px 16px 6px; line-height: 1;
  color: var(--ink);
}
.login-card h1 {
  font-family: var(--font-head); font-weight: 700; font-size: 2.6rem;
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1;
  color: var(--ink);
}
.login-sub {
  color: var(--gray); font-weight: 700; font-size: 0.66rem;
  text-transform: uppercase; letter-spacing: 0.26em; margin-bottom: 10px;
}
.login-card input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  border-radius: var(--radius);
  padding: 13px 16px; outline: none; background: var(--gray-light);
  box-shadow: inset 0 -2px 0 var(--gray-mid);
  transition: box-shadow 0.15s;
}
.login-card input:focus { box-shadow: inset 0 -2px 0 var(--accent); }
.login-card .btn-sun { width: 100%; padding: 15px; font-size: 0.84rem; }
.login-error { color: var(--accent-dark); font-weight: 600; font-size: 0.8rem; min-height: 1.1em; }

/* ---------- Leaflet-Feintuning ---------- */
.leaflet-control-zoom {
  border: none !important; box-shadow: var(--shadow-soft) !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  margin-top: calc(72px + var(--safe-top)) !important;
}
.leaflet-control-zoom a {
  color: var(--ink) !important; font-weight: 700;
  background: var(--paper) !important; border: none !important;
}
.leaflet-control-attribution { font-size: 0.6rem !important; background: rgba(255,255,255,0.78) !important; }
.leaflet-tooltip {
  background: var(--ink); color: var(--white); font-family: var(--font-body);
  font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  border: none; box-shadow: var(--shadow-soft); border-radius: var(--radius);
}
.leaflet-tooltip::before { display: none; }

/* ============================================================
   Desktop (≥ 1024px) – Dashboard-Layout, Mobile unverändert
   ============================================================ */
@media (min-width: 1024px) {
  :root { --sidebar-w: 340px; }

  #map { right: var(--sidebar-w); }
  .topbar-b26 { right: var(--sidebar-w); }

  .locate-banner { max-width: min(92vw, 520px); }

  .fab {
    bottom: calc(28px + var(--safe-bottom));
  }

  .timeline {
    left: auto; right: 0; width: var(--sidebar-w);
    top: calc(56px + var(--safe-top)); bottom: 0;
    padding: 18px 20px 20px;
    box-shadow: -4px 0 24px rgba(16, 20, 24, 0.12);
    overflow-y: auto;
  }
  .timeline::before {
    top: 18px; bottom: 18px; left: 0; right: auto;
    width: 3px; height: auto;
  }
  .timeline-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .window-chips { flex-wrap: wrap; }

  .toast-b26 {
    bottom: calc(28px + var(--safe-bottom));
    max-width: min(90vw, 480px);
  }

  .sheet-backdrop {
    align-items: flex-end;
    justify-content: center;
    padding: 0 24px;
  }
  .sheet {
    width: min(100%, 720px);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
  }
  .sheet-grip { display: none; }
  .edit-preview { max-height: 22vh; }

  .admin-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .admin-form input[type="text"]:first-child,
  .admin-form input[type="email"]:first-child { grid-column: 1 / -1; }
  .admin-form .admin-map-hint,
  .admin-form .admin-pick-map,
  .admin-form .btn-sun { grid-column: 1 / -1; }
  .admin-pick-map { height: 360px; }
  .media-summary { grid-template-columns: repeat(3, 1fr); }
  .media-item-scroll { max-height: 320px; }
  .user-row { flex-wrap: nowrap; }
  .user-row-name { min-width: 0; }

  .lightbox {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    padding: 0;
  }
  .lightbox-inner {
    flex-direction: row;
    align-items: stretch;
    width: min(100%, 1280px);
    max-width: none;
    height: 100%;
    max-height: 100dvh;
  }
  .lightbox-stage {
    flex: 1;
    min-width: 0;
    display: grid;
    place-content: center;
    padding: 72px 24px 24px 72px;
  }
  .lightbox img, .lightbox video {
    max-width: 100%;
    max-height: calc(100dvh - 96px);
    width: auto;
    height: auto;
  }
  .lightbox-sidebar {
    width: min(380px, 34vw);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.04);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 72px 28px 28px;
    overflow-y: auto;
  }
  .lightbox-info {
    width: 100%;
    margin-top: 0;
    padding-left: 0;
    box-shadow: none;
    gap: 14px;
  }
  .lightbox-meta { flex-wrap: wrap; }
  .lightbox-info p { font-size: 1.05rem; }
  .lightbox-nav.prev { left: 20px; }
  .lightbox-nav.next { right: calc(min(380px, 34vw) + 20px); }
  .lightbox-close { top: 18px; right: 18px; }

  .login-scene {
    place-content: center;
    padding: 48px;
    background:
      linear-gradient(135deg, var(--gray-light) 0%, var(--paper) 45%, var(--paper) 100%);
  }
  .login-scene::before,
  .login-scene::after { display: none; }
  .login-card {
    width: min(480px, 42vw);
    padding: 48px 52px;
    gap: 16px;
    align-items: stretch;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-mid);
  }
  .login-card h1 { font-size: 3rem; }
  .login-emblem { font-size: 2.8rem; }
}
