/* ===============================
   Kochkurs Fotowand — Design System
   =============================== */

:root {
  /* Warm palette — default (Kochbuch) */
  --paper: #f6efe3;
  --paper-2: #efe5d1;
  --paper-3: #e8dcc2;
  --ink: #2b2620;
  --ink-2: #4a4038;
  --ink-muted: #7a6e60;
  --ink-soft: #a89a85;
  --line: #d9ccb1;
  --line-soft: #e5d9bf;
  --olive: #5a6b3a;
  --olive-deep: #3f4e26;
  --terracotta: #b86b4a;
  --terracotta-soft: #d38a6a;
  --mustard: #c89b3a;
  --sage: #8a9a6b;
  --cream: #fbf6ea;
  --postit: #fdf2b5;
  --postit-pink: #fbd6c8;
  --postit-green: #d8e4b8;
  --postit-blue: #c9dce6;
  --carrot-orange: #F66F00;
  --carrot-light: #FF8A1A;
  --shadow-soft: 0 1px 2px rgba(43,38,32,0.06), 0 4px 16px rgba(43,38,32,0.08);
  --shadow-card: 0 2px 4px rgba(43,38,32,0.08), 0 12px 28px rgba(43,38,32,0.10);
  --shadow-postit: 0 1px 1px rgba(43,38,32,0.12), 0 8px 18px rgba(43,38,32,0.18);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  --font-serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-hand: "Caveat", "Shadows Into Light", cursive;
}


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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(rgba(43,38,32,0.035) 1px, transparent 1px),
    radial-gradient(rgba(43,38,32,0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  opacity: 0.7; z-index: 0; mix-blend-mode: multiply;
}

h1,h2,h3,h4 { font-family: var(--font-serif); font-weight: 500; color: var(--ink); letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 44px; line-height: 1.05; font-weight: 400; }
h2 { font-size: 28px; line-height: 1.15; }
h3 { font-size: 20px; }
p { margin: 0; }

button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 18px; border-radius: var(--r-md);
  font-weight: 500; font-size: 14px; transition: all 0.15s ease;
  border: 1px solid transparent; line-height: 1; white-space: nowrap;
  text-decoration: none;
}
.btn-primary  { background: var(--carrot-orange); color: var(--cream); }
.btn-primary:hover { background: var(--carrot-light); }
.btn-secondary { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--paper-3); }
.btn-ghost    { color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger   { background: transparent; color: var(--terracotta); border-color: var(--terracotta); }
.btn-danger:hover { background: var(--terracotta); color: var(--cream); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

.input, .textarea, .select {
  width: 100%; padding: 10px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--cream);
  color: var(--ink); font-size: 14px; transition: border-color 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--carrot-light);
  box-shadow: 0 0 0 3px rgba(90,107,58,0.12);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ink-muted); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 6px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
  background: var(--paper-3); color: var(--ink-2); border: 1px solid var(--line);
}
.badge-olive   { background: rgba(90,107,58,0.12); color: var(--olive-deep); border-color: rgba(90,107,58,0.25); }
.badge-terra   { background: rgba(184,107,74,0.12); color: var(--terracotta); border-color: rgba(184,107,74,0.3); }
.badge-mustard { background: rgba(200,155,58,0.14); color: #8a6918; border-color: rgba(200,155,58,0.35); }

.card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); }
.divider { height: 1px; background: var(--line-soft); width: 100%; }

.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1{gap:4px;} .gap-2{gap:8px;} .gap-3{gap:12px;} .gap-4{gap:16px;} .gap-5{gap:24px;} .gap-6{gap:32px;}
.spacer { flex: 1; }
.muted  { color: var(--ink-muted); }
.soft   { color: var(--ink-soft); }
.serif  { font-family: var(--font-serif); }
.hand   { font-family: var(--font-hand); }
.small  { font-size: 13px; }
.xs     { font-size: 12px; }

/* Password strength */
.pw-strength { margin-top: 8px; }
.pw-strength-bars { display: flex; gap: 4px; margin-bottom: 4px; }
.pw-strength-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--line); transition: background 0.2s; }
.pw-strength-label { font-size: 11px; color: var(--ink-muted); }

/* Shake animation for login error */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}
.shake { animation: shake 0.35s ease; }

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: var(--cream);
  padding: 12px 18px; border-radius: var(--r-md);
  font-size: 14px; box-shadow: var(--shadow-card);
  animation: toastIn 0.2s ease;
}
@keyframes toastIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }

/* ===== Mobile ===== */
@media (max-width: 760px) {
  h1 { font-size: 30px !important; }
  h2 { font-size: 22px !important; }
  .hide-mobile { display: none !important; }
  .login-grid { grid-template-columns: 1fr !important; }
  .login-hero { min-height: 180px !important; padding: 20px !important; }
  .login-hero-title { font-size: 28px !important; }
  .login-hero-sub { display: none; }
  .login-form-wrap { padding: 24px 20px !important; }
  .top-bar { padding: 10px 14px !important; gap: 8px !important; }
  .role-switch-pill { display: none !important; }
  .admin-shell { grid-template-columns: 1fr !important; }
  .admin-sidebar {
    position: static !important; height: auto !important; width: 100% !important;
    display: flex; gap: 4px; overflow-x: auto; padding: 10px !important;
    border-right: none !important; border-bottom: 1px solid var(--line) !important;
  }
  .admin-sidebar nav { flex-direction: row !important; flex-shrink: 0; }
  .admin-sidebar nav a { white-space: nowrap; padding: 8px 12px !important; font-size: 13px !important; }
  .admin-sidebar .sidebar-footer { display: none !important; }
  .admin-main { padding: 20px !important; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

/* ===== TopBar ===== */
.top-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px; height: 60px;
  background: var(--cream); border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line-soft);
}
.top-bar-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.top-bar-logo-badge {
  width: 36px; height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.top-bar-logo-name {
  font-family: var(--font-serif); font-size: 16px; color: #EB3E1A;
}
.top-bar-user {
  display: flex; align-items: center; gap: 8px;
}
.top-bar-user-name {
  font-size: 14px; color: var(--ink-2);
}

/* Role Switch Pill */
.role-switch-pill {
  display: flex; padding: 3px;
  background: var(--paper-2);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.role-switch-pill__btn {
  padding: 4px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: transparent; color: var(--ink-muted);
  text-decoration: none; white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.role-switch-pill__btn--active {
  background: var(--cream); color: var(--ink);
  box-shadow: var(--shadow-soft);
}

/* Topbar User Dropdown */
.topbar-user-menu {
  position: relative;
}
.topbar-user-trigger {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 4px;
  border-radius: var(--r-md);
}
.topbar-user-trigger:hover { background: var(--paper-2); }
.topbar-user-info {
  text-align: left;
}
.topbar-user-name {
  display: block; font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--ink);
}
.topbar-user-role {
  display: block; font-size: 11px; color: var(--ink-muted); line-height: 1.2;
}
.topbar-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
  min-width: 180px; z-index: 60; padding: 4px;
}
.topbar-menu-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13px; text-decoration: none;
  color: var(--ink); background: none; border: none; cursor: pointer;
  text-align: left;
}
.topbar-menu-item:hover { background: var(--paper-2); }
.topbar-menu-item--danger { color: var(--terracotta); }
.topbar-menu-item--danger:hover { background: var(--paper-2); }
.topbar-menu-divider {
  border: none; border-top: 1px solid var(--line); margin: 4px 0;
}

/* ===== Avatar ===== */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 600; color: #fff;
  flex-shrink: 0; user-select: none;
}
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-more {
  background: var(--paper-3) !important;
  color: var(--ink-muted) !important;
  font-size: 11px !important; font-weight: 500 !important;
  border: 1px solid var(--line);
}
.avatar-row {
  display: flex; align-items: center;
}
.avatar-row .avatar + .avatar { margin-left: -8px; }
.avatar-row .avatar {
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--line-soft);
}

/* ===== Walls overview ===== */
.walls-page { min-height: 100vh; padding-bottom: 64px; }
.walls-hero {
  max-width: 1100px; margin: 0 auto;
  padding: 48px 32px 40px;
}
.walls-greeting {
  font-size: 12px; color: var(--ink-muted);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px;
}
.walls-hero-title {
  font-size: 42px; font-weight: 400; margin-bottom: 10px;
}
.walls-hero-desc {
  color: var(--ink-muted); font-size: 16px; max-width: 620px; line-height: 1.6;
}
.walls-container {
  max-width: 1100px; margin: 0 auto;
  padding: 0 32px;
}
.walls-section-title {
  font-size: 13px; font-weight: 600; color: var(--ink-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 20px; font-family: var(--font-sans);
}
.walls-empty { color: var(--ink-muted); padding: 48px 0; text-align: center; }
.walls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ===== WallCard ===== */
.wall-card {
  display: flex; flex-direction: column;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-soft);
  text-decoration: none; color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.wall-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.wall-card--locked { cursor: default; }

/* ===== Gesperrte Wände — eigene Sektion ===== */
.walls-locked-section { margin-top: 64px; }
.walls-locked-title {
  font-family: var(--font-serif); font-size: 22px; color: var(--ink-2);
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.walls-locked-title span { font-family: var(--font-sans); font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.walls-locked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.walls-locked-card {
  padding: 18px;
  background: var(--paper-2);
  border-radius: var(--r-lg);
  border: 1px dashed var(--line);
  opacity: 0.7;
  display: flex; align-items: center; gap: 10px;
}
.walls-locked-card-info .wall-card-title { font-size: 17px; }
.wall-card-cover {
  position: relative; height: 200px; overflow: hidden; flex-shrink: 0;
}
.wall-card-cover img,
.wall-card-cover-gradient {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.wall-card-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(43,38,32,0.40) 0%, transparent 50%);
  pointer-events: none;
}
.wall-card-date-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(251,246,234,0.95);
  color: var(--ink); font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  display: flex; align-items: center; gap: 5px;
}
.wall-card-lock-icon {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--ink-soft);
}
.wall-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 4px; }
.wall-card-title { font-family: var(--font-serif); font-size: 22px; font-weight: 500; line-height: 1.2; }
.wall-card-subtitle { font-size: 13px; color: var(--ink-muted); }
.wall-card-locked-hint { color: var(--ink-soft); font-style: italic; }
.wall-card-meta {
  font-size: 13px; color: var(--ink-muted);
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
}
.wall-card-meta-dot { color: var(--line); }

/* ===== Wall detail page ===== */
.wall-page { min-height: 100vh; padding-bottom: 64px; }
.wall-back { padding: 16px 24px 0; }
.wall-page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  max-width: 1400px; margin: 16px auto 32px;
  padding: 0 32px;
}
.wall-page-header-main { flex: 1; min-width: 280px; }
.wall-page-label {
  font-size: 12px; color: var(--ink-muted);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px;
}
.wall-page-title {
  font-size: 52px; font-weight: 400; margin-bottom: 8px;
}
.wall-page-subtitle {
  font-size: 17px; color: var(--ink-muted);
  font-family: var(--font-serif); font-style: italic; margin-bottom: 14px;
}
.wall-page-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-muted);
}
.wall-page-meta-item { display: flex; align-items: center; gap: 6px; }
.wall-page-avatars { display: flex; gap: 3px; flex-shrink: 0; }

/* ===== Collage grid ===== */
.collage-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 80px 24px;
  color: var(--ink-soft); text-align: center;
}
.collage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 24px 40px;
}

/* ===== Photo tile (Polaroid) ===== */
.photo-tile {
  position: relative;
  background: #fff;
  padding: 8px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, z-index 0s 0.18s;
  will-change: transform;
}
.photo-tile:hover {
  transform: translateY(-4px) scale(1.03) !important;
  box-shadow: 0 8px 24px rgba(43,38,32,0.22), 0 2px 6px rgba(43,38,32,0.12);
  z-index: 20;
  transition: transform 0.18s ease, box-shadow 0.18s ease, z-index 0s;
}
.photo-tile-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  width: 100%;
}
.photo-tile-image img,
.photo-placeholder {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* photo-tile-actions: oben rechts, nur bei hover sichtbar */
.photo-tile-actions {
  position: absolute;
  top: 10px; right: 10px;
  display: flex; gap: 6px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s;
}
.photo-tile:hover .photo-tile-actions {
  opacity: 1; pointer-events: auto;
}
.photo-tile-action-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(251,246,234,0.95);
  display: grid; place-items: center;
  color: var(--ink-2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  text-decoration: none;
  transition: color 0.12s;
}
.photo-tile-action-btn.liked { color: var(--terracotta); }

/* photo-tile-badges: unten links, immer sichtbar */
.photo-tile-badges {
  position: absolute;
  bottom: 10px; left: 10px;
  display: flex; gap: 6px; font-size: 11px;
}
.photo-tile-badge {
  background: rgba(251,246,234,0.95);
  padding: 3px 8px; border-radius: 999px;
  display: flex; align-items: center; gap: 4px;
  font-weight: 500;
}
.photo-tile-badge--likes    { color: var(--terracotta); }
.photo-tile-badge--comments { color: var(--olive-deep); }

/* ===== Lightbox ===== */
.opacity-0   { opacity: 0 !important; }
.opacity-100 { opacity: 1; }

.lb-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(43,38,32,0.82);
  display: flex;
  transition: opacity 0.2s ease;
}

.lb-shell {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  min-height: 0;
}

/* Photo-Bereich */
.lb-photo-area {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  position: relative;
}

/* Schließen-Button */
.lb-close {
  position: absolute; top: 20px; right: 20px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(251,246,234,0.12); color: var(--cream);
  display: grid; place-items: center;
  border: none; cursor: pointer;
  transition: background 0.15s;
}
.lb-close:hover { background: rgba(251,246,234,0.22); }

/* Nav-Pfeile */
.lb-nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: #fff;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.18); z-index: 20;
  transition: background 0.15s;
}
.lb-nav:hover { background: rgba(255,255,255,0.22); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Foto-Wrapper */
.lb-frame-wrap {
  position: relative;
  max-width: 680px; width: 100%;
}

/* Polaroid */
.lb-polaroid {
  position: relative;
  background: #fff;
  padding: 14px 14px 50px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  overflow: visible;
}

/* Caption innerhalb Polaroid */
.lb-polaroid-caption {
  position: absolute;
  bottom: 12px; left: 20px; right: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-hand); font-size: 20px; color: var(--ink-2);
}
.lb-polaroid-caption-date {
  font-family: var(--font-sans); font-size: 12px; color: var(--ink-soft);
}

/* Post-its */
.postit {
  pointer-events: auto;
  position: absolute;
  min-width: 90px; max-width: 150px;
  padding: 10px 12px 14px;
  background: var(--postit);
  box-shadow: var(--shadow-postit);
  transform: rotate(var(--postit-angle, 2deg));
  font-family: var(--font-hand); font-size: 20px; line-height: 1.4;
  color: var(--ink);
  z-index: 2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: default;
}
.postit:hover {
  transform: rotate(var(--postit-angle, 2deg)) translateY(-4px);
  box-shadow: 0 6px 20px rgba(43,38,32,0.28);
  z-index: 10;
}
.postit::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 14px; height: 14px;
  background: linear-gradient(225deg, var(--paper-2) 50%, transparent 50%);
}
.postit-pink  { background: var(--postit-pink); }
.postit-green { background: var(--postit-green); }
.postit-blue  { background: var(--postit-blue); }

.postit-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
}
.postit-user { font-size: 18px; color: var(--ink-muted); }
.postit-delete {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(184,107,74,0.18); color: var(--terracotta);
  display: none; grid; place-items: center;
  font-size: 11px; line-height: 1; padding: 0; cursor: pointer;
  border: none;
}
.postit:hover .postit-delete { display: grid; }

/* Action-Bar */
.lb-action-bar {
  margin-top: 18px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* Like-Button */
.lb-like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-md); border: none;
  background: rgba(251,246,234,0.12); color: var(--cream);
  font-size: 14px; cursor: pointer;
  transition: background 0.12s;
}
.lb-like-btn:hover  { background: rgba(251,246,234,0.20); }
.lb-like-btn.liked  { background: var(--terracotta); color: var(--cream); }

/* Emoji-Reaktionen Pill */
.lb-reactions-pill {
  display: flex; gap: 4px;
  background: rgba(251,246,234,0.12);
  padding: 4px; border-radius: 999px;
}
.reaction-btn {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 4px 8px; border-radius: 999px; font-size: 14px;
  color: rgba(255,255,255,0.65);
  border: 1px solid transparent;
  background: rgba(255,255,255,0.06);
  transition: background 0.12s, border-color 0.12s;
}
.reaction-btn:hover { background: rgba(255,255,255,0.13); }
.reaction-btn.active {
  background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.28);
  color: #fff;
}
.reaction-count { font-size: 11px; color: rgba(255,255,255,0.45); }
.reaction-btn.active .reaction-count { color: rgba(255,255,255,0.75); }

/* Download-Button in Action-Bar */
.lb-download-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-md);
  background: rgba(251,246,234,0.12); color: var(--cream);
  font-size: 13px; text-decoration: none;
  transition: background 0.12s;
  margin-left: auto;
}
.lb-download-btn:hover { background: rgba(251,246,234,0.20); color: var(--cream); }

/* Composer-Bar */
.lb-composer-bar {
  background: var(--paper);
  padding: 16px;
  border-top: 1px solid var(--line);
  display: flex; gap: 12px; align-items: flex-end;
  flex-shrink: 0;
}
.lb-color-picker {
  display: flex; gap: 6px; align-items: center; flex-shrink: 0;
}
.color-dot {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.1s, transform 0.1s;
}
.color-dot:hover    { transform: scale(1.15); }
.color-dot.active   { border-color: var(--ink-2); }
.color-dot-yellow   { background: var(--postit); }
.color-dot-pink     { background: var(--postit-pink); }
.color-dot-green    { background: var(--postit-green); }
.color-dot-blue     { background: var(--postit-blue); }

.lb-composer-input {
  flex: 1; min-height: 44px; padding: 8px 12px;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-md); color: var(--ink);
  font-family: var(--font-hand); font-size: 17px;
  resize: none; line-height: 1.4;
}
.lb-composer-input::placeholder { color: var(--ink-soft); }
.lb-composer-input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(90,107,58,0.12); }

.lb-submit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; flex-shrink: 0;
  background: var(--olive-deep); border: none;
  border-radius: var(--r-md); color: var(--cream); font-size: 13px; white-space: nowrap;
  transition: background 0.12s;
}
.lb-submit-btn:hover   { background: var(--olive); }
.lb-submit-btn:disabled { opacity: 0.4; pointer-events: none; }

/* ===== Responsive — Walls & Collage ===== */
@media (max-width: 1100px) {
  .collage-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .collage-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .walls-hero { padding: 24px 20px 16px; }
  .walls-container { padding: 0 16px; }
  .walls-grid { grid-template-columns: 1fr; }
  .walls-locked-grid { grid-template-columns: 1fr; }
  .wall-back { margin-left: 16px; margin-right: 16px; }
  .wall-page-header { margin: 12px 16px 24px; padding: 0; }
  .wall-page-title  { font-size: 36px; }
  .wall-page-avatars { display: none; }
  .collage-grid { grid-template-columns: repeat(2, 1fr); padding: 0 16px 32px; gap: 12px; }
}

/* ===== Lightbox Mobile ===== */
@media (max-width: 760px) {
  .lb-photo-area { padding: 16px; }
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
  .lb-reactions-pill { display: none; }
  .postit { display: none; }
}
@media (max-width: 1150px) {
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
}

/* ===== Upload (Phase 4) ===== */
.upload-zone {
  border: 2px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--cream);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.upload-zone:hover,
.upload-zone--active {
  border-color: var(--olive);
  background: rgba(90,107,58,0.04);
}

.upload-queue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--cream); border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.upload-queue-item--uploading { border-color: var(--mustard); }
.upload-queue-item--done      { border-color: var(--olive); background: rgba(90,107,58,0.03); }
.upload-queue-item--error     { border-color: var(--terracotta); background: rgba(184,107,74,0.04); }

.upload-queue-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: grid; place-items: center;
}
.upload-queue-item--pending   .upload-queue-icon { color: var(--ink-soft); }
.upload-queue-item--uploading .upload-queue-icon { color: var(--mustard); }
.upload-queue-item--done      .upload-queue-icon { color: var(--olive); }
.upload-queue-item--error     .upload-queue-icon { color: var(--terracotta); }

.upload-progress {
  width: 100%; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden;
}
.upload-progress-bar {
  height: 100%; background: var(--mustard); border-radius: 2px;
  transition: width 0.3s ease;
}
.upload-progress-bar--done { background: var(--olive); }

@keyframes upload-spin {
  to { transform: rotate(360deg); }
}
.upload-spin { animation: upload-spin 0.9s linear infinite; transform-origin: center; }

/* Admin photo grid */
.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.admin-photo-card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.admin-photo-card--cover {
  outline: 2px solid var(--olive-deep);
}
.admin-photo-thumb {
  position: relative;
  width: 100%; aspect-ratio: 3/2; overflow: hidden; background: var(--paper-2);
}
.cover-badge {
  position: absolute; top: 6px; left: 6px; z-index: 1;
  background: rgba(43,38,32,0.65); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--r-sm);
  pointer-events: none;
}
.admin-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-photo-info { padding: 8px 10px; }
.photo-title-edit { position: relative; }
.photo-title-text {
  font-size: 13px; font-weight: 500; margin: 0;
  display: flex; align-items: center; gap: 4px; overflow: hidden;
  cursor: text; padding: 2px 4px; margin-left: -4px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  transition: background 0.12s;
}
.photo-title-text span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.photo-title-text:hover { background: var(--paper-2); }
.photo-title-edit-icon {
  display: none; flex-shrink: 0; color: var(--ink-soft);
}
.photo-title-text:hover .photo-title-edit-icon { display: block; }
.photo-title-input {
  font-size: 13px; font-weight: 500;
  width: 100%; padding: 2px 4px; margin-left: -4px;
  background: var(--paper); border: 1px solid var(--olive-deep);
  border-radius: var(--r-sm); outline: none; box-sizing: border-box;
}

@media (max-width: 640px) {
  .admin-photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
}
.admin-photo-card-footer {
  padding: 6px 10px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: flex-end;
}

/* ===== Admin Shell (Phase 5) ===== */
.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 60px);
}
.admin-sidebar {
  position: sticky; top: 60px;
  height: calc(100vh - 60px); overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--paper-2);
  display: flex; flex-direction: column;
  padding: 0;
}
.admin-sidebar-section-label {
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 6px;
}
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px; flex: 1; }
.admin-nav-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--r-md);
  font-size: 14px; color: var(--ink-2);
  text-decoration: none;
  transition: background 0.12s;
}
.admin-nav-link:hover { background: var(--paper-2); }
.admin-nav-link.active { background: rgba(90,107,58,0.10); color: var(--olive-deep); font-weight: 500; }
.admin-nav-link-inner { display: flex; align-items: center; gap: 8px; }
.sidebar-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--terracotta); color: #fff; flex-shrink: 0;
}
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  margin-top: auto;
}
.admin-main { padding: 32px 40px; min-width: 0; }

/* ===== Admin Table ===== */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; font-size: 11px; font-weight: 600;
  color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--paper); cursor: pointer; }
.admin-table a { color: inherit; text-decoration: none; }
.admin-table a:hover { color: var(--olive-deep); }

/* ===== Tab Bar ===== */
.tab-bar { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; font-size: 14px; color: var(--ink-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s; background: none; border-radius: 0;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn--active { color: var(--olive-deep); border-bottom-color: var(--olive-deep); font-weight: 500; }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(20,16,12,0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-card);
  width: 100%; max-width: 460px; padding: 28px;
}
.modal-box-wide { max-width: 580px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-muted);
  display: grid; place-items: center; transition: background 0.12s; flex-shrink: 0;
}
.modal-close:hover { background: var(--paper-3); }

/* ===== Form Rows ===== */
.form-row { margin-bottom: 14px; }
.form-row .label { margin-bottom: 5px; }
.form-row-inline { display: flex; gap: 12px; }
.form-row-inline > * { flex: 1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ===== Flash Messages ===== */
.flash { padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 20px; font-size: 14px; }
.flash--success { background: rgba(90,107,58,0.10); border: 1px solid rgba(90,107,58,0.25); color: var(--olive-deep); }
.flash--error   { background: rgba(184,107,74,0.10); border: 1px solid rgba(184,107,74,0.25); color: var(--terracotta); }

/* ===== Danger Zone ===== */
.danger-zone {
  margin-top: 32px; padding: 20px;
  border: 1px solid rgba(184,107,74,0.3); border-radius: var(--r-lg);
  background: rgba(184,107,74,0.04);
}
.danger-zone-title { font-size: 13px; font-weight: 600; color: var(--terracotta); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Invite Status Badges ===== */
.badge-pending  { background: rgba(200,155,58,0.14); color: #7a5c10; border-color: rgba(200,155,58,0.35); }
.badge-accepted { background: rgba(90,107,58,0.12);  color: var(--olive-deep); border-color: rgba(90,107,58,0.25); }
.badge-revoked  { background: var(--paper-3); color: var(--ink-soft); border-color: var(--line); }

/* ===== Admin Wall Row ===== */
.admin-wall-row { color: var(--ink); text-decoration: none; display: contents; }
.admin-wall-color-dot { width: 22px; height: 22px; border-radius: 4px; flex-shrink: 0; }

/* ===== Admin Wall Cards (Phase 6) ===== */
.admin-walls-list { display: flex; flex-direction: column; gap: 12px; }
.admin-wall-card {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 20px; align-items: center;
  padding: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink);
  transition: border-color 0.15s;
}
.admin-wall-card:hover { border-color: var(--ink-soft); }
.admin-wall-thumb {
  width: 110px; height: 80px;
  overflow: hidden; border-radius: var(--r-md);
  background: var(--paper-2); flex-shrink: 0;
}
.admin-wall-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-wall-thumb-placeholder {
  width: 100%; height: 100%;
}
.admin-wall-card-title { font-family: var(--font-serif); font-size: 20px; margin-bottom: 2px; }
.admin-wall-card-sub { font-size: 13px; color: var(--ink-muted); margin-bottom: 8px; }
.admin-wall-card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--ink-muted); }
.admin-wall-card-action { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; white-space: nowrap; }

@media (max-width: 640px) {
  .admin-wall-card { grid-template-columns: 80px 1fr; }
  .admin-wall-card-action { display: none; }
  .admin-wall-thumb { width: 80px; height: 60px; }
}

/* ===== User List ===== */
.user-detail-panel {
  background: var(--paper); border-top: 1px solid var(--line-soft);
  padding: 16px 14px;
}
.user-walls-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.user-wall-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.user-wall-toggle input { cursor: pointer; accent-color: var(--olive-deep); width: 14px; height: 14px; }

/* ===== Moderation ===== */
.mod-comment-row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.mod-comment-row:last-child { border-bottom: none; }
.mod-thumb { width: 72px; height: 48px; border-radius: var(--r-sm); overflow: hidden; flex-shrink: 0; background: var(--paper-3); }
.mod-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mod-meta { flex: 1; min-width: 0; }
.mod-comment-text { font-size: 14px; color: var(--ink); margin: 4px 0 8px; word-break: break-word; }
.mod-actions { display: flex; gap: 6px; }

/* ===== Page Header ===== */
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-page-header h2 { margin: 0; }

/* ===== Admin Mobile (overrides from earlier media query, kept here for completeness) ===== */
@media (max-width: 760px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static; height: auto; width: 100%;
    display: flex; gap: 0; overflow-x: auto;
    padding: 8px !important;
    border-right: none; border-bottom: 1px solid var(--line);
  }
  .admin-sidebar-section-label { display: none; }
  .admin-sidebar nav { flex-direction: row; flex-shrink: 0; padding: 0; gap: 2px; }
  .admin-nav-link { white-space: nowrap; padding: 8px 12px; font-size: 13px; }
  .sidebar-footer { display: none; }
  .admin-main { padding: 20px 16px; }
}

/* ── E-Mail-Vorlagen ──────────────────────────────────────────────────────── */
.email-preview-iframe {
  width: 100%;
  height: 480px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
}

.placeholder-hint {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ── Aktivierungs- / Invite-Seiten ────────────────────────────────────────── */
.login-success {
  color: var(--olive);
  font-size: 13px;
  margin-bottom: 12px;
}

/* ===== Phase 7: Profil-Seite ===== */
.profile-page { min-height: 100vh; padding-bottom: 64px; }
.profile-back { padding: 16px 24px 0; }
.profile-container {
  max-width: 600px; margin: 0 auto;
  padding: 24px 24px 0;
  display: flex; flex-direction: column; gap: 20px;
}
.profile-title {
  font-size: 32px; font-weight: 400; margin-bottom: 4px;
}
.profile-card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-soft);
  padding: 24px;
}
.profile-card-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.profile-card-title { font-size: 18px; margin-bottom: 16px; }
.profile-card-header .profile-card-title { margin-bottom: 0; }
.profile-card-header .avatar { width: 48px; height: 48px; font-size: 20px; }

.profile-form { display: flex; flex-direction: column; gap: 14px; }

.profile-flash {
  padding: 10px 14px; border-radius: var(--r-md);
  font-size: 13px; margin-bottom: 4px;
}
.profile-flash--ok  { background: rgba(90,107,58,0.10); border: 1px solid rgba(90,107,58,0.25); color: var(--olive-deep); }
.profile-flash--err { background: rgba(184,107,74,0.10); border: 1px solid rgba(184,107,74,0.25); color: var(--terracotta); }

.profile-toggle-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; cursor: pointer;
}
.profile-toggle-label input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--olive-deep);
}

/* Appearance Pref-Groups (Profil-Seite) */
.pref-group { display: flex; gap: 6px; flex-wrap: wrap; }
.pref-option { display: flex; align-items: center; }
.pref-option input[type="radio"] { display: none; }
.pref-option span {
  padding: 5px 13px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 500;
  background: var(--paper-2); border: 1px solid var(--line);
  color: var(--ink-2); cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pref-option:hover span { background: var(--paper-3); }
.pref-option input:checked + span {
  background: rgba(90,107,58,0.12); border-color: rgba(90,107,58,0.3);
  color: var(--olive-deep);
}

@media (max-width: 640px) {
  .profile-container { padding: 16px 16px 0; }
  .profile-card { padding: 18px; }
}
