:root {
  color-scheme: light;
  --bg: #fdfbf7;
  --ink: #1f1a17;
  --muted: #6b625b;
  --accent: #ef6f3a;
  --accent-hover: #d55a29;
  --accent-soft: #fff1eb;
  --card: #ffffff;
  --stroke: #e9e0d6;
  --shadow-sm: 0 4px 12px rgba(31, 26, 23, 0.05);
  --shadow-md: 0 12px 30px rgba(31, 26, 23, 0.08);
  --radius: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

p {
  margin: 0 0 16px 0;
  color: var(--muted);
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.admin-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.hero {
  display: grid;
  gap: 48px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: flex-start;
  margin-bottom: 80px;
}

.hero__content {
  padding-right: 20px;
  padding-top: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
}

.subtitle {
  font-size: 1.25rem;
  max-width: 500px;
  margin-bottom: 32px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__chips span {
  border: 1px solid var(--stroke);
  padding: 8px 16px;
  border-radius: 999px;
  background: white;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.hero__chips span:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── Hero steps ────────────────────────────────────────────────────────────── */
.hero__steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.hero__step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--stroke);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.hero__step:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent-hover);
}

.hero__step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(239, 111, 58, 0.3);
}

.hero__step strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.hero__step p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.hero__panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--stroke);
  position: relative;
  overflow: hidden;
}

.hero__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #f9b18d);
}

.form {
  display: grid;
  gap: 16px;
}

.form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-group {
  display: grid;
  gap: 4px;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fcfaf8;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form__row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.inline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}

.inline input {
  margin-top: 3px;
}

.primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(239, 111, 58, 0.2);
}

.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 111, 58, 0.3);
}

.primary:active {
  transform: translateY(0);
}

.secondary {
  background: white;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.secondary:hover {
  background: var(--accent-soft);
}

.helper {
  min-height: 1rem;
  font-size: 0.8rem;
  margin: 2px 0 0 0;
  line-height: 1.3;
}

#uploadStatus {
  font-weight: 600;
  text-align: center;
  margin-top: 8px;
}

#uploadStatus.success { color: #10b981; }
#uploadStatus.error { color: #ef4444; }

.board {
  margin-top: 40px;
}

.board__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--stroke);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  font-family: "Fraunces", serif;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.entries {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.entry {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--stroke);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative; /* Für den Bearbeiten-Stift */
}

.entry:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}

.entry h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.entry__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  font-family: "Manrope", sans-serif;
}

.entry__meta {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  line-height: 1.2;
}

.entry__media {
  width: 100%;
  border-radius: 16px;
  background: #f9f7f5;
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.entry__media:hover {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.entry__media a {
  display: block;
  width: 100%;
  height: 100%;
}

.entry__media img,
.entry__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.entry__media:hover img,
.entry__media:hover video {
  opacity: 0.9;
}

.entry__media audio {
  width: calc(100% - 32px);
}

.report-link {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.2;
}

.report-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.status--hidden {
  background: #f2f2f2;
  color: #6c6c6c;
  border-color: #d9d9d9;
}

.status--visible {
  background: #e8f7f1;
  color: #1a6a4f;
  border-color: #bfe6d6;
}

.secondary--required {
  animation: shake 0.4s ease;
  border-color: #ef4444;
  color: #ef4444;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ─── Skeleton loader ──────────────────────────────────────────────────────── */
.entry--loading {
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--stroke) 25%,
    #f0ebe4 50%,
    var(--stroke) 75%
  );
  background-size: 200% 100%;
  border-radius: 8px;
  animation: shimmer 1.4s infinite;
}

.skeleton--title {
  height: 18px;
  width: 45%;
  border-radius: 999px;
}

.skeleton--media {
  height: 180px;
  border-radius: 16px;
  width: 100%;
}

.skeleton--text {
  height: 14px;
  width: 90%;
}

.skeleton--text.short {
  width: 55%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Empty state ──────────────────────────────────────────────────────────── */
.entry--empty {
  text-align: center;
  color: var(--muted);
  grid-column: 1 / -1;
  padding: 48px 24px;
  border-style: dashed;
}

/* ─── Personal Protocol ────────────────────────────────────────────────────── */
.personal-protocol {
  margin-top: 80px;
  background: var(--card);
  border-radius: 32px;
  padding: 48px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-md);
}

.personal-protocol__content {
  max-width: 800px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  gap: 12px;
  margin: 32px 0;
  max-width: 500px;
}

.search-box input {
  flex: 1;
}

.search-results {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  gap: 12px;
}

.result-card h4 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  color: var(--ink);
}

.result-card .meta {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.result-card .address {
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--ink);
  border: 1px dashed var(--stroke);
}

.result-card .desc {
  font-size: 1rem;
  line-height: 1.5;
}

/* ─── Cookie Banner ────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 16px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
}

@keyframes slideIn {
  from { transform: translateY(100%) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 768px) {
  .page {
    padding: 32px 20px;
  }

  .hero {
    gap: 32px;
    margin-bottom: 48px;
  }

  .hero__panel {
    padding: 24px;
  }

  .entries {
    grid-template-columns: 1fr;
  }

  .cookie-banner__content {
    flex-direction: column;
    text-align: center;
  }
}

/* ─── Required mark ────────────────────────────────────────────────────────── */
.required-mark {
  color: var(--accent);
  font-weight: 800;
}

/* ─── Entry header & badge ─────────────────────────────────────────────────── */
.entry__header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.entry__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entry__description {
  color: var(--ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
  transition: max-height 0.3s ease;
}

.entry__description.is-expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.entry__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--stroke-soft);
  min-height: 32px;
}

.btn-edit-pencil {
  position: absolute;
  top: 22px;
  right: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
  line-height: 1;
  z-index: 5;
}

.btn-edit-pencil:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

/* ─── Upload button states ─────────────────────────────────────────────────── */
.secondary--done {
  background: #e8f7f1;
  color: #1a6a4f;
  border-color: #bfe6d6;
}

.info {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 80px;
  background: #fff8f5;
  border-radius: 32px;
  padding: 48px;
  border: 1px solid #fee3d5;
}

.info h3 {
  font-size: 1.5rem;
  color: var(--accent);
}

.footer {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer__link:hover {
  text-decoration: underline;
}

/* ─── Admin List ───────────────────────────────────────────────────────────── */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.admin-item {
  background: white;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 180px 1fr 100px 120px;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.admin-item:hover {
  border-color: var(--stroke);
  box-shadow: var(--shadow-sm);
  background: #fdfcfb;
}

.admin-item .meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-item strong {
  display: block;
  font-size: 0.9rem;
}

.admin-item .noise-type {
  font-size: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.admin-item__desc {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.4;
}

.admin-item__desc small {
  color: var(--muted);
}

.admin-item__actions {
  text-align: right;
}

.report-button.delete {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
  width: 100%;
}

.report-button.delete:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

@media (max-width: 900px) {
  .admin-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .admin-item__actions {
    text-align: left;
  }
}

/* ─── Top Admin/Home Link ─────────────────────────────────────────────────── */
.admin-link-top {
  position: absolute;
  top: 24px;
  right: 24px;
  background: white;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-link-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.admin-link-top--home {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}

.admin-link-top--home:hover {
  background: white;
}

@media (max-width: 768px) {
  .admin-link-top {
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* ─── Media Modal ─────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 8, 7, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content-wrapper {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#modal-media-container img,
#modal-media-container video {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

.modal-close {
  position: absolute;
  top: 32px;
  right: 42px;
  color: white;
  font-size: 48px;
  font-weight: 300;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  z-index: 10001;
}

.modal-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .modal {
    padding: 20px;
  }
  .modal-close {
    top: 20px;
    right: 25px;
    font-size: 40px;
  }
}

/* ─── Print styles ─────────────────────────────────────────────────────────── */
@media print {
  header, footer, .hero, .board, .info, .search-box, button, .report-button, .cookie-banner, .admin-link-top, .modal {
    display: none !important;
  }
  body { background: white; color: black; margin: 0; padding: 0; }
  .personal-protocol { margin: 0; padding: 0; border: none; box-shadow: none; }
  .search-results { display: block; margin: 0; padding: 0; visibility: visible !important; }
  .search-results * { visibility: visible !important; }
  .result-card { border: 1px solid #ddd; border-radius: 4px; margin-bottom: 25px; padding: 20px; page-break-inside: avoid; }
}

/* ─── Inline Edit Styles ─────────────────────────────────────────────────── */
.edit-area {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 2px solid var(--accent-soft);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 12px;
  resize: vertical;
  display: block;
}

.edit-area:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-edit-trigger {
  font-size: 0.8rem;
  padding: 4px 12px;
  margin-top: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.btn-edit-trigger:hover {
  background: var(--accent);
  color: white;
}
