:root {
  --cream: #fbf1df;
  --paper: #fffaf0;
  --brown: #3b2416;
  --sauce: #8c3a1b;
  --muted: #7a6552;
  --line: #e4d3b4;
  --green: #2e8b47;
  --red: #c0392b;
  --grey: #9b928a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex; flex-direction: column; height: 100dvh;
  background: var(--cream); color: var(--brown); font: 15px/1.4 var(--sans);
}
a { color: var(--sauce); }

/* Kopfzeile */
.top { padding: 10px 16px 6px; background: var(--brown); color: var(--cream); }
.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0; font: italic 700 1.7rem/1.1 var(--serif); letter-spacing: .01em; }
h1::before { content: "🕯️ "; font-style: normal; font-size: .8em; }
.countdown {
  font: 600 .95rem var(--sans); font-variant-numeric: tabular-nums;
  background: #5a3824; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.tagline { margin: 2px 0 4px; font: italic .9rem var(--serif); color: #e9d3ae; }
.stats { margin: 0; font-size: .9rem; }
.stats strong { font-size: 1.15rem; color: #ffd98a; }
.stats .sep { opacity: .6; margin: 0 4px; }

.notice {
  margin: 0; padding: 7px 16px; font-size: .82rem; line-height: 1.3;
  background: #f6dfae; border-bottom: 1px solid var(--line); color: #4d3018;
}
.notice::before { content: "⚠️ "; }

/* Karte */
.map-wrap { position: relative; flex: 1; min-height: 300px; }
#map { position: absolute; inset: 0; background: #efe6d6; }
.legend {
  position: absolute; left: 10px; bottom: 22px; z-index: 500;
  display: flex; gap: 10px; flex-wrap: wrap; max-width: calc(100% - 180px);
  background: rgba(255, 250, 240, .92); padding: 5px 9px; border-radius: 8px; font-size: .78rem;
  box-shadow: 0 1px 4px rgba(59, 36, 22, .25);
}
.legend span { white-space: nowrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.dot.a { background: var(--green); } .dot.s { background: var(--red); } .dot.g { background: var(--grey); }
.near {
  position: absolute; right: 10px; bottom: 22px; z-index: 500;
  font: 600 .95rem var(--sans); color: var(--cream); background: var(--sauce);
  border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(59, 36, 22, .35);
}
.near:disabled { opacity: .6; }
.toast {
  position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 600;
  width: min(92%, 420px); background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; font-size: .9rem; box-shadow: 0 2px 8px rgba(59, 36, 22, .3);
}
.toast button { margin-left: 6px; }

/* Marker */
.pin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 3px rgba(0, 0, 0, .45); }
.pin.a { background: var(--green); width: 22px; height: 22px; }
.pin.s { background: var(--red); }
.pin.g { background: var(--grey); width: 12px; height: 12px; opacity: .85; }
.cl {
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  color: #fff; font: 700 12px var(--sans); border: 3px solid rgba(255, 255, 255, .8);
  box-shadow: 0 0 4px rgba(0, 0, 0, .35);
}
.cl.a { background: var(--green); } .cl.s { background: var(--red); } .cl.g { background: var(--grey); }
.me { width: 14px; height: 14px; border-radius: 50%; background: #2a6fdb; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(42, 111, 219, .3); }

/* Popup */
.leaflet-popup-content-wrapper { background: var(--paper); color: var(--brown); border-radius: 10px; }
.leaflet-popup-tip { background: var(--paper); }
.leaflet-popup-content { margin: 12px 14px; font: 14px/1.4 var(--sans); min-width: 210px; }
.pop h3 { margin: 0 0 2px; font: 700 1.05rem var(--serif); }
.pop .addr { margin: 0 0 6px; color: var(--muted); }
.pop .st { margin: 0 0 2px; font-weight: 600; }
.pop .st.a { color: var(--green); } .pop .st.s { color: var(--red); } .pop .st.g { color: var(--muted); }
.pop .age { margin: 0 0 8px; font-size: .82rem; color: var(--muted); }
.pop .links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pop .wolt { font-weight: 600; }
.btn-link { background: none; border: 0; padding: 0; color: var(--sauce); text-decoration: underline; font: inherit; cursor: pointer; }
.report { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.report label { display: block; font-size: .82rem; margin: 4px 0 2px; }
.report select, .report textarea { width: 100%; font: 14px var(--sans); padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--brown); }
.report textarea { height: 64px; resize: vertical; }
.report .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.report .row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.report button[type=submit] { background: var(--sauce); color: var(--cream); border: 0; border-radius: 6px; padding: 6px 12px; font: 600 .85rem var(--sans); cursor: pointer; }
.report .msg { margin: 6px 0 0; font-size: .85rem; }

/* Fusszeile */
.bottom { padding: 6px 16px calc(6px + env(safe-area-inset-bottom)); font-size: .75rem; color: var(--muted); background: var(--cream); border-top: 1px solid var(--line); }

@media (min-width: 760px) {
  .top { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 24px; }
  .title-row { grid-column: 1; }
  .tagline { grid-column: 1; }
  .stats { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  h1 { font-size: 2.1rem; }
}

/* Unterseiten (Impressum, Datenschutz) */
.page { max-width: 46rem; margin: 0 auto; padding: 24px 16px 48px; height: auto; display: block; }
.page h1 { font-size: 2rem; margin-bottom: 12px; }
.page h1::before { content: none; }
.page h2 { font: 700 1.2rem var(--serif); margin-top: 24px; }
.todo { background: #ffe08a; padding: 0 4px; }
