:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #23241f;
  --muted: #6b6b63;
  --line: #e2e0d8;
  --primary: #2e7d5b;
  --primary-dark: #245f47;
  --danger: #b3402f;
  --accent: #d98324;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--primary-dark); }

.testbanner {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: #b3402f;
  color: #fff;
  text-align: center;
  padding: .55rem 1rem;
  font-size: .95rem;
  line-height: 1.35;
  border-bottom: 2px solid #8f3123;
}
.testbanner strong { text-transform: uppercase; letter-spacing: .03em; }

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: .8rem 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700;
  font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.brand-logo { display: block; border-radius: 8px; }
.lead { font-size: 1.15rem; color: var(--ink); margin: .2rem 0 .9rem; }
.map-hint { display: inline-block; margin-left: .6rem; color: var(--muted); font-size: .92rem; }
.add-popup { display: flex; flex-direction: column; gap: .5rem; text-align: center; }
.add-popup .btn { color: #fff; }
#geoloc-btn { margin: .2rem 0 .5rem; }
.container { max-width: 900px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.site-footer {
  text-align: center; color: var(--muted); font-size: .9rem;
  padding: 1.5rem 1rem; border-top: 1px solid var(--line);
}

h1 { font-size: 1.6rem; margin: .2rem 0 .4rem; }
.intro { margin-bottom: 1rem; }
.intro p { color: var(--muted); margin: .2rem 0 .8rem; }

/* Buttons */
.btn {
  display: inline-block; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .55rem 1rem; font-size: 1rem; text-decoration: none;
  transition: background .12s, border-color .12s;
}
.btn:hover { border-color: #c9c7bd; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { background: #fff; color: var(--danger); border-color: #e6c3bc; }
.btn-danger:hover { background: #fbeceb; }
.btn-small { padding: .3rem .6rem; font-size: .85rem; }

/* Map */
.map { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.map-large { height: 62vh; min-height: 380px; }
.map-pick { height: 340px; margin-top: .5rem; }

/* Filter chips */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .8rem 0; }
.filters-label { color: var(--muted); font-size: .9rem; margin-right: .2rem; }
.chip {
  cursor: pointer; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: .3rem .8rem; font-size: .9rem; color: var(--ink);
}
.chip[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-reset { border-style: dashed; }

/* Forms */
.entry-form label { display: block; margin: .9rem 0; font-weight: 600; }
.entry-form small { font-weight: 400; color: var(--muted); }
.entry-form input[type=text],
.entry-form input[type=email],
.entry-form textarea {
  width: 100%; margin-top: .3rem; padding: .55rem .65rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 1rem; font-family: inherit; background: #fff;
}
.entry-form input:disabled { background: #f0efea; color: var(--muted); }
.cats { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; }
.cats legend { padding: 0 .4rem; color: var(--muted); font-weight: 600; }
.cat-check { display: inline-flex; align-items: center; gap: .35rem; font-weight: 400;
  margin: .2rem 1rem .2rem 0; }
.pos-field { margin: 1rem 0; }
.geocode { display: flex; gap: .4rem; }
.geocode input { flex: 1; padding: .5rem .65rem; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 1rem; }
.geocode-results { list-style: none; margin: .3rem 0 0; padding: 0; }
.geocode-results li { padding: .45rem .6rem; border: 1px solid var(--line);
  border-top: none; cursor: pointer; font-size: .9rem; background: #fff; }
.geocode-results li:first-child { border-top: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.geocode-results li:hover { background: #f2f7f4; }
.hint { color: var(--muted); font-size: .88rem; margin: .4rem 0 0; }
.hint.set { color: var(--primary-dark); font-weight: 600; }
.form-actions { display: flex; gap: .6rem; margin-top: 1.2rem; }
.delete-form { margin-top: 1.5rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.alert { background: #fbeceb; color: var(--danger); border: 1px solid #e6c3bc;
  border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .8rem; }

/* Card / message */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); }
.message-card p { color: var(--muted); }
.message-card h2 { font-size: 1.1rem; margin: 1.1rem 0 .3rem; }
.impressum-address { font-style: normal; line-height: 1.6; margin: .4rem 0; }
.message-card .btn-primary { color: #fff; }

/* Popups */
.leaflet-popup-content h3 { margin: 0 0 .3rem; font-size: 1rem; }
.leaflet-popup-content .cats-line { color: var(--muted); font-size: .82rem; margin: .3rem 0 0; }

/* Admin table */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--card); }
.admin-table th, .admin-table td { border: 1px solid var(--line); padding: .45rem .55rem;
  text-align: left; vertical-align: top; }
.admin-table th { background: #efeee8; }
.desc-cell { max-width: 240px; white-space: pre-wrap; }
.actions form { display: flex; flex-wrap: wrap; gap: .3rem; }
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; }
.badge-pending_admin { background: #fff3e0; color: #a15c00; }
.badge-pending_email { background: #eef1f5; color: #55607a; }
.badge-approved { background: #e5f3ec; color: var(--primary-dark); }
.badge-rejected { background: #fbeceb; color: var(--danger); }

@media (max-width: 560px) {
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; text-align: center; }
}
