/* === ImagineCamino — Dark Mode PWA Styles ===
 * REQ-FE-001: Dark mode theme matching spec
 * UI-DESIGN-KONZEPT P1/P2: Icon-Sprite, Typografie, Fokus, Markenelemente
 */

/* Selbst gehostete Variable-Fonts (offline-fähig, kein CDN) */
@font-face {
  font-family: 'Inter';
  src: url(/static/assets/fonts/inter-var.woff2) format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url(/static/assets/fonts/fraunces-var.woff2) format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-primary: #0c1018;
  --bg-secondary: #141c2e;
  --bg-card: #17203a;
  --bg-card-hover: #1c2745;
  --bg-input: #1e2a48;
  --bg-hover: #243052;
  --text-primary: #eaeef5;
  --text-secondary: #94a0b8;
  --text-muted: #8693a8; /* A11Y-01: >= 4,5:1 auf Hintergrund, Card, Card-Hover und Eingabefeld (vorher #6b7a94: 3,3:1 auf Eingabefeldern) */
  --accent: #e8a838;
  --accent-hover: #f0b848;
  --accent-glow: rgba(232,168,56,.12);
  --success: #34d058;
  --danger: #f85149;
  --warning: #d4a020;
  --border: #1e2a42;
  --border-subtle: #172038;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Segoe UI', serif;
  /* Spacing-Skala (neue Regeln nur noch hiermit) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
}

/* === Icon-System (assets/icons.svg Sprite) === */
.icon {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.24em;
  fill: none;
  stroke: currentColor;
  flex-shrink: 0;
}
.icon--lg { width: 1.6em; height: 1.6em; vertical-align: -0.4em; }
.icon--filled { fill: currentColor; }

/* === Fokus-Sichtbarkeit (Tastatur-Navigation) === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Native Form-Controls (Range-Slider, Checkboxen, Progress) in Markenfarbe */
input, select, textarea, progress { accent-color: var(--accent); }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 20px;
}

/* Ab echter Desktop-Breite mehr Fläche für die Foto-Galerie nutzen (Design-
   Audit 16.07.2026: 760px liess bei 1440px ~47% des Viewports ungenutzt).
   Formulare/Karten bleiben unangetastet — sie haben eigene, engere
   max-width-Werte (z.B. .hero-card, .settings-grid) unabhängig von body. */
@media (min-width: 1200px) {
  body { max-width: 1120px; }
}

/* View transitions */
.view {
  animation: viewFadeIn 0.3s ease;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Header === */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: opacity 0.15s;
}

.brand:hover { opacity: 0.85; }

.brand-logo {
  height: 52px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.nav-link:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--text-muted); }
.nav-link.nav-logout { color: var(--text-muted); border-color: transparent; }
.nav-link.nav-logout:hover { color: var(--danger); }

/* Angemeldete E-Mail-Adresse im Header */
.nav-user-email {
  margin-left: auto;
  padding: 0 12px;
  font-size: 0.9em;
  color: var(--text-secondary);
  line-height: 40px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Language Toggle === */
.lang-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,.12);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .05em;
  transition: background .2s;
  z-index: 10;
}
.lang-toggle:hover { background: rgba(255,255,255,.2); color: #fff; }

/* === Hero / Landing === */
.hero {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Hero-Rotation (app.js initHeroRotation): Fallback ist das bisherige,
     einzige Motiv — ohne JS oder mit nur einem Eintrag unverändert. */
  background-image: var(--hero-photo-desktop, url(/static/assets/hero-desktop.webp));
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .hero-bg {
    background-image: var(--hero-photo-mobile, url(/static/assets/hero-mobile.webp));
    background-position: center 20%;
  }
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(10,14,24,.88) 0%, rgba(10,14,24,.55) 45%, rgba(10,14,24,.15) 100%),
    linear-gradient(to bottom, rgba(10,14,24,.1) 0%, rgba(10,14,24,.3) 50%, rgba(10,14,24,.85) 100%);
}

@media (max-width: 768px) {
  .hero-bg::after {
    background:
      linear-gradient(to bottom, rgba(10,14,24,.75) 0%, rgba(10,14,24,.4) 35%, rgba(10,14,24,.5) 60%, rgba(10,14,24,.92) 100%);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 48px 24px 32px;
  margin-right: auto;
  margin-left: 8%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 768px) {
  .hero {
    align-items: flex-start;
  }
  .hero-content {
    margin: 0 auto;
    padding-top: 28px;
    align-items: center;
    text-align: center;
  }
}

.hero-logo {
  height: 120px;
  width: auto;
  margin-bottom: 36px;
  filter: drop-shadow(0 3px 16px rgba(0,0,0,.5));
}

@media (max-width: 768px) {
  .hero-logo {
    height: 72px;
    margin-bottom: 24px;
  }
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 620;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 10px;
  text-shadow:
    0 0 20px rgba(255,255,255,.25),
    0 0 40px rgba(255,255,255,.1),
    0 2px 12px rgba(0,0,0,.6);
}

.hero-sub {
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255,255,255,.78);
  margin-bottom: 28px;
  max-width: 340px;
  text-shadow:
    0 0 16px rgba(255,255,255,.15),
    0 1px 6px rgba(0,0,0,.5);
}

@media (max-width: 768px) {
  .hero-sub { max-width: 300px; }
}

.hero-card {
  width: 100%;
  background: rgba(26, 31, 54, .88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.hero-footer {
  margin-top: 20px;
  font-size: 0.75rem;
  color: rgba(255,255,255,.35);
  letter-spacing: 0.02em;
}

@media (max-height: 640px) {
  .hero-content { padding-top: 24px; }
  .hero-headline { font-size: 1.3rem; }
  .hero-logo { height: 36px; margin-bottom: 16px; }
}

/* === Landing-Hero (öffentliche Startseite) ===
   Dieselbe Hintergrundgrafik wie die Auth-Seite, aber als Banner über der
   Galerie — Besucher sehen sie als Erstes, Login/Registrierung ist Schritt 2. */
.landing-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  background-image:
    linear-gradient(to right, rgba(10,14,24,.88) 0%, rgba(10,14,24,.55) 45%, rgba(10,14,24,.15) 100%),
    linear-gradient(to bottom, rgba(10,14,24,.1) 0%, rgba(10,14,24,.3) 50%, rgba(10,14,24,.75) 100%),
    var(--hero-photo-desktop, url(/static/assets/hero-desktop.webp));
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .landing-hero {
    min-height: 40vh;
    background-image:
      linear-gradient(to bottom, rgba(10,14,24,.7) 0%, rgba(10,14,24,.35) 40%, rgba(10,14,24,.8) 100%),
      var(--hero-photo-mobile, url(/static/assets/hero-mobile.webp));
    background-position: center 20%;
  }
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 460px;
  padding: 36px 32px;
}

@media (max-width: 768px) {
  .landing-hero-content {
    margin: 0 auto;
    padding: 28px 20px;
    text-align: center;
  }
}

.landing-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .landing-cta { justify-content: center; }
}

.landing-cta .btn-primary {
  width: auto;
  padding: 11px 22px;
}

.btn-ghost-hero {
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(10,14,24,.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.btn-ghost-hero:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
}

/* === Skeleton-Loading (UI-Konzept D1) === */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.skeleton-card .sk-cover { height: 150px; border-radius: 0; }
.skeleton-card .sk-line { height: 13px; margin: 12px 14px 0; width: 65%; }
.skeleton-card .sk-line:last-child { width: 40%; margin-bottom: 16px; }

/* === Toast mit Status-Icon (UI-Konzept D3) === */
.message .icon { margin-right: 2px; }

/* === Micro-Motion (UI-Konzept D4) === */
.btn-action, .btn, .btn-ghost-hero, .empty-cta {
  transition: transform .15s, box-shadow .15s, background .15s, color .15s, border-color .15s;
}
.btn-action:hover, .btn:hover, .empty-cta:hover { transform: translateY(-1px); }
.btn-action:active, .btn:active { transform: translateY(0); }

/* === Touch-Ziele ≥ 44px auf Touch-Geräten (UI-Konzept D5) === */
@media (pointer: coarse) {
  .nav-link, .tab { min-height: 44px; }
  .sub-remove { min-width: 40px; min-height: 40px; }
}

/* === Reduzierte Bewegung respektieren (UI-Konzept D7) === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Wegpunkt-Schritt-Indikator (UI-Konzept B4) === */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-4) auto 0;
  max-width: 320px;
}
.step { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.step-dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
}
.step--done .step-dot { border-color: var(--accent); background: var(--accent); }
.step--active .step-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.step-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; white-space: nowrap; }
.step--done .step-label, .step--active .step-label { color: var(--accent); }
.step-line { flex: 1 1 auto; border-top: 2px dashed var(--border); margin: 0 6px 15px; min-width: 26px; }

/* === Markenelemente: Trail-Divider & Berg-Fuß (UI-Konzept B1) === */
.trail-divider {
  display: block;
  width: min(100%, 700px);
  height: 40px;
  margin: var(--space-5) auto var(--space-3);
  color: var(--border);
  /* Der Pfad "zeichnet sich" beim Laden von links nach rechts — die globale
     prefers-reduced-motion-Regel neutralisiert die Animation automatisch. */
  animation: trail-draw 1.4s ease-out both;
}

@keyframes trail-draw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.how-it-works {
  margin: var(--space-6) 0 var(--space-7);
  position: relative;
}

/* Topografische Höhenlinien als dezenter Hintergrund (z-index -1: hinter den
   Inhalt, aber vor den Seitenhintergrund). */
.how-it-works::before {
  content: '';
  position: absolute;
  inset: -24px 0;
  z-index: -1;
  background: url(/static/assets/deco/contours.svg) right center / 340px auto no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.how-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-4);
}

/* Verbindende Trail-Linie hinter den Wegpunkt-Nummern — macht aus drei
   Spalten sichtbar EINEN Weg. Nur wenn die Schritte nebeneinander liegen. */
@media (min-width: 760px) {
  .how-steps::before {
    content: '';
    position: absolute;
    top: 13px;
    /* Von der Mitte des ersten Wegpunkt-Badges bis zur Mitte des dritten:
       Badge-Zentrum = 2 Spalten + 2 Gaps (à 32px) + halber Badge (14px). */
    left: 14px;
    right: calc(33.333% - 35px);
    border-top: 2px dashed var(--border);
  }
}

.how-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
}

.how-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
}

.how-illu {
  width: 132px;
  height: auto;
  margin-top: var(--space-2);
}

/* Scroll-Reveal (per JS nur aktiviert, wenn Motion erlaubt ist — ohne JS
   bleibt alles sofort sichtbar) */
.reveal-pending {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}
.reveal-pending.reveal-in {
  opacity: 1;
  transform: none;
}

/* Muschel-Ornament an Sektions-Überschriften (Landing) + Footer */
.heading-shell {
  width: 1.15em;
  height: 1.15em;
  margin-right: 7px;
  vertical-align: -0.22em;
  color: var(--accent);
  opacity: 0.9;
  fill: none;
  stroke: currentColor;
}
.site-footer-shell {
  width: 22px;
  height: 22px;
  color: var(--accent);
  opacity: 0.55;
  fill: none;
  stroke: currentColor;
}

.how-step h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: var(--space-1) 0 0;
}

.how-step p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  max-width: 34ch;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding: var(--space-5) 0 var(--space-4);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.site-footer-brand { font-size: 0.78rem; color: var(--text-muted); }
.site-footer-links { display: flex; gap: var(--space-5); }
.site-footer-links a { font-size: 0.8rem; color: var(--text-secondary); text-decoration: none; }
.site-footer-links a:hover { color: var(--accent); }

.mountain-footer {
  height: 130px;
  margin-top: var(--space-8);
  background-image: url(/static/assets/deco/mountains-faint.svg);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  pointer-events: none;
}


/* === Dashboard: Summary Strip === */
.dash-summary {
  display: flex;
  gap: 0;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.stat-cell {
  flex: 1;
  padding: 18px 12px 16px;
  text-align: center;
  position: relative;
}

.stat-cell + .stat-cell::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border);
}

.stat-icon {
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: block;
  opacity: 0.7;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-value.accent { color: var(--accent); }
.stat-value.warn { color: var(--warning); }

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 6px;
  font-weight: 500;
}

/* === Dashboard: Toolbar === */
.dash-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-heading {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent) 0%, #d49520 100%);
  color: #08111f;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(232,168,56,.2);
}

.btn-action:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #e0a828 100%);
  box-shadow: 0 4px 16px rgba(232,168,56,.3);
  transform: translateY(-1px);
}

.btn-action-icon {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 800;
}

/* === Dashboard: Neues Album (Inline-Formular) === */
.new-album-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.na-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.na-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  resize: none;
}

.na-input:focus { outline: none; border-color: var(--accent); }

.na-actions {
  display: flex;
  gap: 8px;
}

.btn-ghost-sm {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-ghost-sm:hover { background: var(--bg-hover); color: var(--text-primary); }

/* === Dashboard: Album-Karten (Cover-Design) === */
.album-grid {
  display: grid;
  /* auto-fit statt auto-fill: mit wenigen Alben (aktuell 2 auf der
     Startseite) strecken sich die vorhandenen Karten über die Reihe,
     statt neben unsichtbaren leeren Spalten-Slots klein zu wirken. */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.album-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
  /* Deckelt die Kartenbreite, wenn auto-fit sie bei wenigen Alben sonst auf
     die ganze Zeile strecken würde — die 140px hohe Titelbild-Fläche würde
     bei z.B. 550px Breite unangenehm breit/flach wirken. */
  max-width: 320px;
}

.album-card:hover {
  border-color: rgba(232,168,56,.2);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  transform: translateY(-3px);
}

.acard-cover {
  position: relative;
  height: 140px;
  background: linear-gradient(135deg, #1a2540 0%, #0e1525 100%);
  background-size: cover;
  background-position: center;
}

/* Hover-Flourish: eine gestrichelte Trail-Linie "zeichnet sich" unten über
   das Titelbild — der Weg als Mikro-Interaktion. */
.acard-cover::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  border-bottom: 2px dashed rgba(232, 168, 56, .75);
  opacity: 0;
  transform: scaleX(.25);
  transform-origin: left;
  transition: opacity .25s, transform .4s ease-out;
  pointer-events: none;
}
.album-card:hover .acard-cover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Ohne Titelbild: gebrandetes Berg-Motiv statt leerem Rechteck — damit auch
   ein frisches (bildloses) Album beim ersten Öffnen bewusst wirkt. */
.acard-cover--empty {
  background:
    url(/static/assets/deco/mountains-faint.svg) center bottom / 135% auto no-repeat,
    linear-gradient(135deg, #213054 0%, #0e1525 100%);
}

.acard-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,12,22,.85) 0%, rgba(8,12,22,.1) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 14px;
}

.acard-top { display: flex; justify-content: flex-end; }

.vis-badge {
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.vis-badge.public { background: rgba(52,208,88,.2); color: var(--success); }
.vis-badge.unlisted { background: rgba(232,168,56,.2); color: var(--accent); }
.vis-badge.restricted { background: rgba(212,160,32,.2); color: var(--warning); }

.acard-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.acard-body {
  padding: 10px 14px 6px;
  flex: 1;
}

.acard-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255,255,255,.04);
  color: var(--text-secondary);
}

.chip.needs-action {
  background: rgba(212,160,32,.08);
  color: var(--warning);
}

.acard-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acard-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* === Leer-Zustände (mit Trail-Illustration, UI-Konzept B2) === */
.empty-state {
  text-align: center;
  padding: var(--space-8) 20px;
}

.empty-illu {
  width: 220px;
  max-width: 70%;
  height: auto;
  margin: 0 auto var(--space-4);
  display: block;
  opacity: 0.9;
}

.empty-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.empty-cta {
  margin: 0 auto;
}

/* === Upload-View === */
.upload-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.upload-card {
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.upload-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.upload-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.upload-card-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.upload-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-top: 4px;
}

.upload-card-status {
  font-size: 0.82rem;
  margin-top: 10px;
  min-height: 1.2em;
}

.upload-card-status.success { color: var(--success); }
.upload-card-status.error { color: var(--danger); }

.link-back {
  background: none;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 0 8px;
}
.link-back:hover { color: var(--text-primary); }
.upload-album-label { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 14px; }
.upload-album-label strong { color: var(--text-primary); }
.inline-link { color: var(--accent); text-decoration: none; margin-left: 8px; font-size: 0.85rem; }

/* === Auth Form (inside hero-card) === */

.hero-card label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-card input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.hero-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.hero-card input::placeholder { color: rgba(255,255,255,.3); }

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.5);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

/* === Upload Section === */
.upload-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.upload-section h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--accent);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

select, input[type="text"], textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}

select:focus, input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* === Image Input === */
.image-input {
  position: relative;
  margin-bottom: 14px;
}

.image-input input[type="file"] {
  display: none;
}

.image-input-label {
  display: block;
  width: 100%;
  padding: 40px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-input);
}

.image-input-label:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.image-input-label.has-image {
  border-style: solid;
  border-color: var(--accent);
  padding: 10px;
}

.image-input-label .icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.image-input-label .text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === Preview Thumbnail === */
.preview-container {
  margin-bottom: 14px;
  display: none;
}

.preview-container.visible {
  display: block;
}

.preview-container img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-sync {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  width: 100%;
  margin-bottom: 16px;
}

.btn-sync:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.btn-sync .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  padding: 0 6px;
}

.btn-sync .badge:empty {
  display: none;
}

/* === Queue Status === */
.queue-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.queue-status .badge {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.queue-status.hidden {
  display: none;
}

/* === Progress Bar === */
.progress-container {
  display: none;
  margin-bottom: 16px;
}

.progress-container.visible {
  display: block;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* === Messages === */
.message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  max-width: 90vw;
}

.message.visible {
  opacity: 1;
  pointer-events: auto;
}

.message.success {
  background: rgba(63, 185, 80, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
}

.message.error {
  background: rgba(248, 81, 73, 0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* === Offline Indicator === */
.offline-banner {
  display: none;
  background: var(--warning);
  color: var(--bg-primary);
  text-align: center;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.offline-banner.visible {
  display: block;
}

/* === Responsive Tweaks === */
@media (min-width: 768px) {
  body {
    padding: 24px;
  }

  .app-header h1 {
    font-size: 1.8rem;
  }
}

/* Mobile: Header/Nav umbrechen lassen, damit nichts rechts hinausragt */
@media (max-width: 520px) {
  .app-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand-logo { height: 40px; }
  .main-nav {
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  .nav-link {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  /* E-Mail auf eigene Zeile, volle Breite, sauber abgeschnitten */
  .nav-user-email {
    margin-left: 0;
    order: 99;
    width: 100%;
    max-width: 100%;
    padding: 0;
    line-height: 1.4;
  }
}

/* === Stapel-Upload: editierbare Warteschlange === */
.upload-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 6px 0 0;
}

.pending-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pending-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.pending-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg-input);
}

.pending-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.pending-fields input,
.pending-fields textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 7px 9px;
  font-family: var(--font);
  font-size: 0.9rem;
  resize: vertical;
}

.pending-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pending-meta.has-error {
  color: var(--danger);
}

.pending-remove {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.pending-remove:hover {
  color: var(--danger);
}

/* === Anmeldung: Textlinks (Passwort vergessen, Bestaetigungsmail erneut senden) === */
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-top: 14px; }
.auth-hint { margin: 0 0 14px; color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.link-btn {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: var(--accent); font: inherit; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover, .link-btn:focus-visible { color: var(--text); }

/* === Dashboard-Karte: Aktionen (Link kopieren) === */
.acard-actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.acard-act {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px;
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary, var(--text));
  font: inherit; font-size: 0.8rem; cursor: pointer;
}
.acard-act:hover, .acard-act:focus-visible { border-color: var(--accent); color: var(--text); }

/* === A11Y: Footer- und Textlinks mit ausreichend grosser Trefferflaeche === */
.site-footer a { display: inline-block; padding: 6px 4px; }
.link-btn { min-height: 28px; }

