:root {
  --papier: #f5f3ec;
  --karte: #ffffff;
  --tinte: #1c2722;
  --leise: #66726b;
  --linie: #e3e0d6;
  --gruen: #1d7a5b;
  --gruen-dunkel: #145a43;
  --gruen-hell: #e2f1ea;
  --sonne: #f3b62f;
  --rot: #c2412d;
  --rund: 18px;
  --schatten: 0 1px 2px rgba(28, 39, 34, .06), 0 8px 24px rgba(28, 39, 34, .07);
  --kopf: 58px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
a { color: var(--gruen-dunkel); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Kopfzeile bleibt stehen */
.kopf {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: calc(var(--kopf) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--linie);
}
.kopf h1 { font-size: 17px; margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf .unter { font-size: 12.5px; color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf .mitte { flex: 1; min-width: 0; }
.marke { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 18px; letter-spacing: -.01em; text-decoration: none; color: var(--tinte); }
.logo { width: 32px; height: 32px; flex: none; }
.rund-knopf {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--tinte); text-decoration: none;
}
.rund-knopf:active { background: var(--gruen-hell); }
.rund-knopf svg, .knopf svg { width: 22px; height: 22px; }
main { padding: calc(var(--kopf) + env(safe-area-inset-top) + 14px) 14px 32px; max-width: 720px; margin: 0 auto; }

.karte-box { background: var(--karte); border-radius: var(--rund); box-shadow: var(--schatten); padding: 18px; margin-bottom: 14px; }
.karte-box h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.karte-box p { margin: 0 0 10px; color: var(--leise); }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--gruen); color: #fff; font-weight: 650; text-decoration: none;
}
.knopf:active { background: var(--gruen-dunkel); }
.knopf.zweit { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.knopf.rot { background: #fbe9e5; color: var(--rot); }
.knopf.klein { min-height: 36px; padding: 0 13px; font-size: 14px; }
.knopf:disabled { opacity: .55; }

/* Startseite */
.held {
  border-radius: 24px; padding: 26px 20px 22px; margin-bottom: 14px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, #2f9c78 0%, transparent 60%), linear-gradient(160deg, #1d7a5b, #124a3a);
}
.held::after {
  content: ""; position: absolute; right: -38px; bottom: -58px; width: 130px; height: 130px; border-radius: 50%;
  background: var(--sonne); opacity: .9;
}
.held h2 { margin: 0 0 10px; font-size: 27px; line-height: 1.12; letter-spacing: -.02em; max-width: 14em; position: relative; z-index: 1; }
.held p { margin: 0 0 14px; max-width: 30em; opacity: .93; position: relative; z-index: 1; }
.schritte { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.schritte li {
  counter-increment: s; background: var(--karte); border-radius: 14px; padding: 12px 14px 12px 52px; position: relative;
  box-shadow: var(--schatten); font-weight: 600;
}
.schritte li::before {
  content: counter(s); position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 28px; height: 28px; border-radius: 50%;
  background: var(--sonne); display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.kartenfeld { height: 300px; border-radius: 14px; overflow: hidden; margin: 10px 0 6px; background: #dfe7df; z-index: 0; position: relative; }
.kartenfeld.hoch { height: 380px; }
.kleintext { font-size: 13px; color: var(--leise); }
.spotliste { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.spotliste a {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--papier);
  text-decoration: none; color: var(--tinte);
}
.spotliste .punkt { width: 38px; height: 38px; border-radius: 12px; background: var(--gruen); color: #fff; display: grid; place-items: center; flex: none; }
.spotliste .punkt svg { width: 20px; height: 20px; }
.spotliste b { display: block; }
.spotliste small { color: var(--leise); }
.zahl-marke { display: inline-block; background: var(--gruen-hell); color: var(--gruen-dunkel); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 650; }

.radar { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.radar li { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 14px; background: var(--papier); }
.kompass { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #fff; border: 2px solid var(--gruen); display: grid; place-items: center; }
.kompass svg { width: 20px; height: 20px; color: var(--gruen); }
.radar b { display: block; }
.radar small { color: var(--leise); display: block; }
.radar em { font-style: normal; display: block; font-size: 14px; margin-top: 2px; }

.nadel {
  display: block; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--gruen);
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.nadel.gelb { background: var(--sonne); }
.nadel.grau { background: #8a938d; }

/* Spot-Kanal */
body.kanal { background: var(--papier); }
body.kanal main { padding-bottom: 150px; }
.reiter { display: flex; gap: 6px; background: #e9e6dc; border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.reiter button { flex: 1; border: 0; background: transparent; border-radius: 999px; min-height: 38px; font-weight: 650; color: var(--leise); }
.reiter button[aria-selected="true"] { background: #fff; color: var(--tinte); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.spotinfo p { margin: 0 0 10px; color: var(--tinte); }
.spotinfo .zeile { display: flex; flex-wrap: wrap; gap: 6px; }
.neu-band { background: var(--sonne); border-radius: 14px; padding: 10px 14px; font-weight: 700; margin-bottom: 12px; }
details.naechste { background: var(--karte); border-radius: var(--rund); box-shadow: var(--schatten); margin-bottom: 14px; }
details.naechste summary { list-style: none; padding: 14px 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; cursor: pointer; }
details.naechste summary::-webkit-details-marker { display: none; }
details.naechste summary svg { width: 20px; height: 20px; color: var(--gruen); }
details.naechste summary::after { content: "+"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--leise); }
details.naechste[open] summary::after { content: "–"; }
details.naechste .radar { margin: 0; padding: 0 12px 12px; }

.verlauf { display: flex; flex-direction: column; gap: 10px; }
.blase { max-width: 86%; align-self: flex-start; }
.blase.meins { align-self: flex-end; }
.blase .kopfzeile { font-size: 12.5px; color: var(--leise); margin: 0 6px 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.blase.meins .kopfzeile { justify-content: flex-end; }
.blase .kopfzeile b { color: var(--tinte); }
.blase .koerper { background: var(--karte); border-radius: 18px 18px 18px 6px; box-shadow: var(--schatten); overflow: hidden; }
.blase.meins .koerper { background: var(--gruen-hell); border-radius: 18px 18px 6px 18px; }
.blase .koerper p { margin: 0; padding: 10px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.blase .foto { display: block; width: 100%; border: 0; padding: 0; background: #dfe7df; }
.blase .foto img { display: block; width: 100%; height: auto; }
.abzeichen { background: var(--gruen); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 650; }
.blase .mehr { border: 0; background: transparent; color: var(--leise); padding: 0 4px; font-size: 16px; line-height: 1; }
.leer { text-align: center; color: var(--leise); padding: 44px 20px; }
.leer svg { width: 54px; height: 54px; color: var(--gruen); opacity: .7; display: block; margin: 0 auto 10px; }
.mitte-zeile { text-align: center; margin: 4px 0 8px; }

.raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.raster button { aspect-ratio: 1; border: 0; padding: 0; background: #dfe7df; border-radius: 8px; overflow: hidden; }
.raster img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Eingabe unten */
.eingabe {
  position: fixed; inset: auto 0 0 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--linie); padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.eingabe .innen { max-width: 720px; margin: 0 auto; }
.eingabe .zeile { display: flex; align-items: flex-end; gap: 8px; }
.eingabe textarea {
  flex: 1; min-width: 0; resize: none; border: 1px solid var(--linie); border-radius: 22px; padding: 11px 15px; max-height: 120px;
  background: var(--papier); outline: none; font-size: 16px; line-height: 1.3;
}
.eingabe textarea:focus { border-color: var(--gruen); background: #fff; }
.eingabe .foto-knopf, .eingabe .senden {
  width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center;
}
.eingabe .foto-knopf { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.eingabe .senden { background: var(--gruen); color: #fff; }
.eingabe .senden:disabled { background: #b9c4be; }
.eingabe svg { width: 23px; height: 23px; }
.eingabe .zusatz { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.eingabe .name {
  border: 1px solid var(--linie); border-radius: 999px; padding: 6px 12px; width: 150px; background: var(--papier); font-size: 16px; outline: none;
}
.eingabe .name:focus { border-color: var(--gruen); background: #fff; }
.chip { border: 1px solid var(--linie); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.chip svg { width: 16px; height: 16px; }
.chip.an { background: var(--gruen); color: #fff; border-color: var(--gruen); }
.vorschau { position: relative; display: inline-block; margin-bottom: 8px; }
.vorschau img { height: 84px; border-radius: 12px; display: block; }
.vorschau button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--tinte); color: #fff; font-size: 16px; line-height: 1; }
.eingabe .fuss { font-size: 11.5px; color: var(--leise); margin-top: 6px; text-align: center; }

/* Großansicht */
.gross { position: fixed; inset: 0; z-index: 60; background: rgba(12, 18, 15, .94); display: grid; place-items: center; padding: 12px; }
.gross img { max-width: 100%; max-height: calc(100vh - 90px); border-radius: 10px; }
.gross .zu { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 24px; }
.gross .wer { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; opacity: .85; }

/* Auswahlblatt (Melden/Löschen) */
.blatt-hinter { position: fixed; inset: 0; z-index: 50; background: rgba(12, 18, 15, .4); display: flex; align-items: flex-end; }
.blatt { background: #fff; width: 100%; border-radius: 22px 22px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.blatt .knopf { width: 100%; }

#meldung {
  position: fixed; left: 50%; bottom: 170px; translate: -50% 20px; z-index: 70; background: var(--tinte); color: #fff; padding: 11px 16px;
  border-radius: 14px; max-width: calc(100vw - 32px); opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; text-align: center;
}
#meldung.an { opacity: 1; translate: -50% 0; }

/* Verwaltung */
.feld { display: grid; gap: 4px; margin-bottom: 12px; }
.feld label { font-size: 13.5px; font-weight: 650; }
.feld input[type=text], .feld input[type=password], .feld input[type=number], .feld textarea {
  border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px; background: #fff; width: 100%; font-size: 16px; outline: none;
}
.feld input:focus, .feld textarea:focus { border-color: var(--gruen); }
.feld small { color: var(--leise); }
.haken { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.haken input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--gruen); }
.knopfzeile { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-spot { border-top: 1px solid var(--linie); padding: 14px 0; display: grid; grid-template-columns: 92px 1fr; gap: 14px; }
.admin-spot:first-child { border-top: 0; }
.admin-spot .qr { width: 92px; height: 92px; border-radius: 10px; background: #fff; border: 1px solid var(--linie); }
.admin-spot h3 { margin: 0 0 2px; font-size: 16px; }
.admin-spot .knopfzeile { margin-top: 8px; }
.status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--gruen-hell); color: var(--gruen-dunkel); }
.status.versteckt { background: #eee; color: #666; }
.status.vorschlag { background: #fff1cf; color: #7a5600; }
.mod { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linie); }
.mod:first-child { border-top: 0; }
.mod img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: #dfe7df; }
.mod .ohne { width: 72px; height: 72px; border-radius: 10px; background: var(--papier); }
.mod p { margin: 2px 0 8px; overflow-wrap: anywhere; color: var(--tinte); }

@media (min-width: 720px) {
  .raster { grid-template-columns: repeat(4, 1fr); }
  .blase { max-width: 70%; }
  .held h2 { font-size: 34px; }
}
