:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #23241f;
  --muted: #6b6b63;
  --line: #e2e0d8;
  --primary: #2e7d5b;
  --primary-dark: #245f47;
  /* Alias-Namen, die an mehreren Stellen verwendet werden */
  --green: #2e7d5b;
  --greenD: #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; }
.my-stands { margin-top: .8rem; padding: .6rem .8rem; background: #eef4f0; border: 1px solid #d3e3da;
  border-radius: var(--radius); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.my-stands[hidden] { display: none; }
.my-stands-label { color: var(--greenD, #245f47); font-size: .9rem; font-weight: 600; }
.linklike { background: none; border: none; color: var(--muted); text-decoration: underline;
  cursor: pointer; font-size: .85rem; padding: 0; }
.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; }
.welcome { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: var(--radius); padding: .9rem 1.1rem; margin: .2rem 0 1.2rem; }
.welcome p { color: var(--ink); margin: 0; line-height: 1.6; }
.event-when { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  background: #eef4f0; border: 1px solid #d3e3da; border-left: 4px solid var(--green);
  border-radius: var(--radius); padding: .7rem 1rem; margin: 0 0 1.2rem; }
.event-when .when-main { font-size: 1.05rem; color: var(--ink); }
.event-when .when-cal { display: inline-block; background: var(--green); color: #fff;
  text-decoration: none; border-radius: var(--radius); padding: .35rem .8rem; font-size: .92rem;
  font-weight: 600; white-space: nowrap; }
.event-when .when-cal:hover { background: var(--greenD, #245f47); }
.seller-heading { font-size: 1.3rem; margin: 0 0 .1rem; }
.intro .lead { margin-top: 0; }
.seller-tip { display: flex; align-items: center; gap: 1rem; margin-top: 1rem;
  background: #fff7ec; border: 1px solid #f0dcbf; border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: .8rem 1rem; }
.seller-tip img { flex: 0 0 auto; }
.seller-tip p { color: var(--ink); margin: 0; font-weight: 600; line-height: 1.45; }
@media (max-width: 480px) {
  .seller-tip { flex-direction: column; text-align: center; gap: .5rem; }
}

/* 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; }

/* ---- Startseite (Layout Vorschlag 2) ---- */
.page-title { font-size: 1.75rem; line-height: 1.2; margin: .3rem 0 1rem; color: var(--ink); }
.page-title .accent { color: var(--accent); }

.welcome .when-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .8rem; }
.chip-info { display: inline-flex; align-items: center; gap: .4rem; background: #eef4f0;
  border: 1px solid #d3e3da; color: var(--greenD); border-radius: 999px; padding: .35rem .75rem;
  font-size: .92rem; font-weight: 600; }
.btn-cal { display: inline-block; background: var(--card); color: var(--greenD); border: 1px solid #d3e3da;
  border-radius: var(--radius); padding: .4rem .8rem; font-size: .92rem; font-weight: 600; text-decoration: none; }
.btn-cal:hover { background: #eef4f0; }

.seller-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.3rem; margin: 0 0 1.2rem; }
.seller-card h2 { font-size: 1.3rem; margin: 0 0 .5rem; }
.seller-body { display: flex; gap: 1.1rem; align-items: center; }
.seller-body img { flex: 0 0 auto; }
.seller-body .muted { color: var(--muted); margin: 0; }
.seller-body .tip { color: var(--ink); font-weight: 600; margin: .35rem 0 0; }

.maphead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .6rem; margin: .2rem 0 .6rem; }
.maphead h2 { font-size: 1.3rem; margin: 0; }
.map-hint.under-map { display: block; margin: .5rem 0 0; }

.highlights { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.3rem; margin-top: 1.2rem; }
.highlights h2 { font-size: 1.3rem; margin: 0 0 .3rem; }
.highlights ul { list-style: none; margin: .3rem 0 0; padding: 0; }
.highlights li { position: relative; padding: .4rem 0 .4rem 1.9rem; border-bottom: 1px dashed var(--line); }
.highlights li:last-child { border-bottom: none; }
.highlights li::before { content: "✓"; position: absolute; left: 0; top: .4rem; width: 1.35rem; height: 1.35rem;
  background: #eef4f0; color: var(--green); border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: .8rem; font-weight: 700; }
.highlights .closing { margin: 1rem 0 0; text-align: center; font-size: 1.15rem; font-weight: 700; color: var(--greenD); }

.flyer { display: flex; gap: 1.2rem; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.3rem; margin-top: 1.2rem; }
.flyer img { width: 170px; max-width: 40%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.flyer .txt h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.flyer .txt p { color: var(--muted); margin: 0 0 .7rem; }
@media (max-width: 560px) {
  .seller-body { flex-direction: column; text-align: center; }
  .flyer { flex-direction: column; text-align: center; }
  .flyer img { max-width: 65%; }
}

/* 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; }

/* T-Online-Hinweis (erscheint nur per JS bei @t-online.de) */
.alert-tonline { display: flex; gap: .75rem; border-left: 4px solid var(--danger);
  padding: .9rem 1rem; color: #7d2b1f; }
.alert-tonline[hidden] { display: none; }
.alert-tonline .ico { font-size: 1.25rem; line-height: 1.2; }
.alert-tonline strong { display: block; margin-bottom: .25rem; font-size: 1rem; }
.alert-tonline p { margin: 0 0 .4rem; font-size: .95rem; }
.alert-tonline p:last-of-type { margin-bottom: .2rem; }
.providers { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.providers span { background: #fff; border: 1px solid #e6c3bc; border-radius: 999px;
  padding: .2rem .6rem; font-size: .85rem; }
.entry-form input.bad { border-color: var(--danger); background: #fffafa;
  box-shadow: 0 0 0 3px rgba(179,64,47,.09); }
.field-error { display: flex; gap: .5rem; margin: .4rem 0 0; color: var(--danger);
  font-size: .9rem; font-weight: 400; }
.field-error[hidden] { display: none; }
.btn-primary[disabled] { background: #a9c4b7; border-color: #a9c4b7; cursor: not-allowed; }

/* 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; }
.qr-page .qr-box { display: flex; justify-content: center; margin: 1.2rem 0; }
.qr-page .qr-box img { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
  background: #fff; max-width: 100%; height: auto; }
.qr-downloads { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.qr-downloads .btn-primary { color: #fff; }
.message-card .btn-primary { color: #fff; }

/* Danke-Seite nach dem Flohmarkt */
.thanks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; margin-top: 1.2rem; }
.thanks-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.thanks-card h2 { font-size: 1.05rem; margin: 0 0 .4rem; }
.thanks-card p { margin: 0; color: var(--muted); }
.closing-big { margin: 1.6rem 0 .4rem; text-align: center; font-size: 1.35rem;
  font-weight: 700; color: var(--greenD); }

/* Eigener Standort auf der Karte */
.loc-btn { background: #fff; border: 2px solid var(--green); border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; font: 700 16px/1.2 inherit;
  color: var(--greenD); padding: .7rem 1.15rem; display: flex; align-items: center; gap: .5rem;
  white-space: nowrap; }
.loc-btn:hover { background: #eef4f0; }
.loc-btn.active { background: var(--green); border-color: var(--greenD); color: #fff;
  font-size: 18px; padding: .75rem 1.3rem; }
.loc-btn.active:hover { background: var(--greenD); }
.loc-btn.busy { opacity: .75; cursor: progress; }
.loc-btn .loc-x { margin-left: .2rem; padding: 0 .3rem; border-radius: 50%;
  font-size: 15px; opacity: .6; }
.loc-btn .loc-x:hover { opacity: 1; background: rgba(0,0,0,.08); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8;
  border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 1px 4px rgba(0,0,0,.4); }
.me-pulse { animation: me-pulse 2s ease-out infinite; }
@keyframes me-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(26,115,232,.45); }
  70%  { box-shadow: 0 0 0 18px rgba(26,115,232,0); }
  100% { box-shadow: 0 0 0 0 rgba(26,115,232,0); }
}
.map-wrap { position: relative; }
.loc-msg { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 1000;
  background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: 8px; font-size: .9rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.3); max-width: 90%; text-align: center; }
.loc-msg.err { background: var(--danger); }

/* 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; }
.leaflet-popup-content .popup-nav { display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .7rem; background: var(--green); color: #fff !important; text-decoration: none;
  border-radius: 8px; padding: .45rem .8rem; font-weight: 600; font-size: .92rem; }
.leaflet-popup-content .popup-nav:hover { background: var(--greenD); }

/* 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; }
}
