/* Kuscheltier-Safari – statisches Stylesheet (kein Build-Schritt nötig).
   Verspieltes, warmes Safari-Design für Familien & Kinder. */
:root {
    --gruen: #3f9d54;
    --gruen-dunkel: #2f7a41;
    --gruen-hell: #e4f4e8;
    --sonne: #f6b93b;
    --sonne-dunkel: #e59216;
    --himmel: #4aa3d8;
    --himmel-hell: #dceff8;
    --sand: #faf5ea;
    --sand-tief: #f0e7d4;
    --braun: #7a5230;
    --rot: #e0564f;
    --grau: #6b7280;
    --text: #2c2620;
    --schatten: 0 4px 16px rgba(63, 45, 20, .10);
    --schatten-tief: 0 10px 30px rgba(63, 45, 20, .16);
    --radius: 18px;
    --radius-klein: 12px;
    --font: "Segoe UI", system-ui, -apple-system, "Nunito", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    /* Sanftes Safari-Papier mit dezentem Punkte-Muster */
    background-color: var(--sand);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(122, 82, 48, .06) 1px, transparent 0);
    background-size: 22px 22px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gruen-dunkel); text-underline-offset: 2px; }

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.1rem;
}

/* ---------- Kopfzeile ---------- */
.site-header {
    background: linear-gradient(135deg, var(--gruen) 0%, var(--gruen-dunkel) 100%);
    color: #fff;
    box-shadow: var(--schatten);
    position: sticky;
    top: 0;
    z-index: 500;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .7rem;
    padding-bottom: .7rem;
    flex-wrap: wrap;
}
.site-header a { color: #fff; text-decoration: none; }
.brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: .2px;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.brand .brand-emoji { font-size: 1.5rem; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.site-nav { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.site-nav a {
    opacity: .96; font-weight: 600; padding: .35rem .7rem; border-radius: 999px;
    transition: background .15s ease;
}
.site-nav a:hover { background: rgba(255,255,255,.16); }

main { padding: 1.6rem 0 3.5rem; }

/* ---------- Hero (Startseite) ---------- */
.hero {
    position: relative;
    background: linear-gradient(135deg, #57b46d 0%, var(--gruen-dunkel) 70%);
    color: #fff;
    border-radius: var(--radius);
    padding: 2.4rem 2rem 2.6rem;
    margin-bottom: 1.8rem;
    overflow: hidden;
    box-shadow: var(--schatten);
}
.hero h1 { color: #fff; font-size: 2.4rem; margin: 0 0 .5rem; text-shadow: 0 2px 6px rgba(0,0,0,.15); }
.hero p { font-size: 1.15rem; max-width: 34rem; margin: 0 0 1.3rem; color: rgba(255,255,255,.95); }
.hero .btn { box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.hero-deko {
    position: absolute; right: -10px; bottom: -18px; font-size: 8rem; opacity: .9;
    line-height: 1; transform: rotate(8deg); pointer-events: none;
    text-shadow: 0 6px 14px rgba(0,0,0,.18);
}
.hero-mini-deko { position: absolute; top: 18px; right: 30%; font-size: 2rem; opacity: .5; transform: rotate(-12deg); }

/* ---------- Überschriften ---------- */
h1 { font-size: 2rem; margin: .2rem 0 1rem; letter-spacing: -.2px; }
h2, h3 { letter-spacing: -.2px; }
.lead { color: var(--grau); font-size: 1.08rem; }
.seiten-titel { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.seiten-titel .emoji { font-size: 1.7rem; }

/* ---------- Karten / Panels ---------- */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 1.3rem 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(122, 82, 48, .06);
}
.card h2, .card h3 { margin-top: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--gruen);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .68rem 1.5rem;
    font-size: 1rem;
    font-weight: 800;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--gruen-dunkel);
    transition: transform .1s ease, box-shadow .1s ease, background .15s ease;
}
.btn:hover { background: var(--gruen-dunkel); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gruen-dunkel); }
.btn--sekundaer {
    background: #fff; color: var(--gruen-dunkel); border: 2px solid var(--gruen);
    box-shadow: 0 4px 0 rgba(63,157,84,.25);
}
.btn--sekundaer:hover { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.btn--sonne { background: var(--sonne); color: #4a2f00; box-shadow: 0 4px 0 var(--sonne-dunkel); }
.btn--sonne:hover { background: var(--sonne-dunkel); color: #4a2f00; }
.btn--warnung { background: var(--rot); box-shadow: 0 4px 0 #b23b38; }
.btn--warnung:hover { background: #b23b38; }
.btn--klein { padding: .4rem 1rem; font-size: .9rem; box-shadow: 0 3px 0 var(--gruen-dunkel); }
.btn--klein.btn--sekundaer { box-shadow: 0 3px 0 rgba(63,157,84,.25); }

/* ---------- Formulare ---------- */
.form-feld { margin-bottom: 1.05rem; }
.form-feld label { display: block; font-weight: 700; margin-bottom: .35rem; }
.form-feld input[type=text],
.form-feld input[type=email],
.form-feld input[type=date],
.form-feld input[type=datetime-local],
.form-feld input[type=search],
.form-feld textarea,
.form-feld select {
    width: 100%;
    padding: .68rem .8rem;
    border: 2px solid var(--sand-tief);
    border-radius: var(--radius-klein);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-feld input:focus, .form-feld textarea:focus, .form-feld select:focus {
    outline: none; border-color: var(--gruen);
    box-shadow: 0 0 0 4px var(--gruen-hell);
}
.form-feld textarea { min-height: 110px; resize: vertical; }
.form-hinweis { color: var(--grau); font-size: .88rem; margin-top: .3rem; }
.checkbox-zeile { display: flex; gap: .6rem; align-items: flex-start; }
.checkbox-zeile input { margin-top: .35rem; width: 1.15rem; height: 1.15rem; accent-color: var(--gruen); }

/* ---------- Meldungen ---------- */
.flash {
    border-radius: var(--radius-klein);
    padding: .85rem 1.1rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    display: flex; align-items: center; gap: .5rem;
}
.flash--ok { background: var(--gruen-hell); color: var(--gruen-dunkel); border: 1px solid #b9e2c4; }
.flash--fehler { background: #fce8e7; color: #a1322f; border: 1px solid #f2c2c0; }
.flash::before { font-size: 1.1rem; }
.flash--ok::before { content: "✅"; }
.flash--fehler::before { content: "⚠️"; }
.fehler-liste { margin: 0; padding-left: 1.1rem; }
.fehler-liste li { list-style: none; }

/* ---------- Badges für Phasen / Status ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .28rem .75rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.badge--eintragsphase { background: var(--himmel-hell); color: #1e5a80; }
.badge--suchphase { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.badge--vor_start { background: #fdf0d0; color: #8a5a12; }
.badge--beendet, .badge--archived { background: #e9e4d9; color: #55504a; }
.badge--pending { background: #fdf0d0; color: #8a5a12; }
.badge--gefunden { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.badge--vermutlich { background: #fdf0d0; color: #8a5a12; }
.badge--entfernt { background: #e9e4d9; color: #55504a; }

/* ---------- Projekt-Raster ---------- */
.projekt-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.2rem; }
.projekt-kachel {
    display: flex; flex-direction: column; gap: .55rem; position: relative;
    padding-top: 1.5rem; overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease;
}
.projekt-kachel::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 7px;
    background: linear-gradient(90deg, var(--gruen), var(--sonne));
}
.projekt-kachel:hover { transform: translateY(-4px); box-shadow: var(--schatten-tief); }
.projekt-kachel .orte { color: var(--grau); font-size: .92rem; }
.projekt-kachel h3 { margin: .1rem 0; }
.projekt-kachel h3 a { text-decoration: none; color: var(--text); }
.projekt-kachel h3 a:hover { color: var(--gruen-dunkel); }
.termine { list-style: none; margin: .2rem 0 .3rem; padding: 0; font-size: .9rem; }
.termine li { margin: .15rem 0; }
.termine strong { font-weight: 700; }

/* Suchleiste (Dashboard) */
.such-leiste { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.such-leiste .btn { white-space: nowrap; }

/* Orts-Zeilen im Anlege-Formular */
.ort-zeile { display: flex; gap: .5rem; margin-bottom: .5rem; align-items: center; }
.ort-zeile input {
    padding: .6rem .7rem; border: 2px solid var(--sand-tief); border-radius: var(--radius-klein);
    font-size: 1rem; font-family: inherit; flex: 1; min-width: 0;
}
.ort-zeile input:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 4px var(--gruen-hell); }
.ort-entfernen { flex-shrink: 0; }
#ort-hinzufuegen { margin-top: .3rem; }

/* ---------- Tier-Kacheln (Liste) ---------- */
.tier-kopf { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.tier-kopf h3 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.tier-kopf h3::before { content: "🧸"; font-size: 1.1rem; }

/* ---------- Tabellen ---------- */
table.liste { width: 100%; border-collapse: collapse; }
table.liste th, table.liste td { text-align: left; padding: .6rem .6rem; border-bottom: 1px solid var(--sand-tief); }
table.liste th { color: var(--grau); font-size: .8rem; text-transform: uppercase; letter-spacing: .3px; width: 34%; }

/* ---------- Karte ---------- */
.karten-rahmen { position: relative; padding: .45rem; }
#karte { height: 68vh; min-height: 420px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); background: var(--himmel-hell); }
.karte-fallback {
    display: none; position: absolute; inset: .45rem; border-radius: var(--radius);
    background: var(--himmel-hell); color: #1e5a80; align-items: center; justify-content: center;
    text-align: center; padding: 2rem; font-weight: 600;
}
.karte-fallback.sichtbar { display: flex; }
/* Emoji-Marker */
.tier-marker { font-size: 1.9rem; text-align: center; line-height: 1; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); cursor: pointer; }
.leaflet-popup-content { font-family: var(--font); }
.leaflet-popup-content-wrapper { border-radius: var(--radius-klein); }

.status-punkt { font-size: .88rem; color: var(--grau); }

/* Unterstützen-Seite */
.unterstuetzen-block { text-align: center; }
.unterstuetzen-block table.liste { margin: .5rem auto 0; text-align: left; }

/* Filter-Chips (Listen-Statusfilter) */
.filter-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #fff; border: 2px solid var(--sand-tief); color: var(--text);
    border-radius: 999px; padding: .35rem .9rem; font-weight: 700; font-size: .92rem;
    text-decoration: none; transition: border-color .15s ease, background .15s ease;
}
.chip:hover { border-color: var(--gruen); }
.chip--aktiv { background: var(--gruen); color: #fff; border-color: var(--gruen); }
.chip-zahl {
    background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 .5rem; font-size: .8rem;
}
.chip--aktiv .chip-zahl { background: rgba(255,255,255,.25); }

/* Leiter-Verwaltung */
.verwalten-tabelle td { vertical-align: top; }
.verwalten-tabelle .aktionen { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.zeile-deaktiviert { opacity: .55; }
.problem-hoch { color: var(--rot); font-weight: 800; }
.leiter-hinweis {
    display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap;
    background: var(--himmel-hell); border: 1px solid #bfe0f0; font-weight: 600;
}

/* QR-Code (SVG hat feste Größe -> in den Rahmen zwingen) */
.qr-box { width: 150px; flex-shrink: 0; line-height: 0; }
.qr-box svg { width: 100%; height: auto; display: block; border-radius: 8px; }

/* ---------- Urkunden-Liste ---------- */
.urkunde-zeile { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.urkunde-zeile::before { content: "🏅"; font-size: 1.8rem; }
.urkunde-info { flex: 1; min-width: 180px; }

/* ---------- Leerer Zustand ---------- */
.leer { text-align: center; padding: 2.5rem 1rem; }
.leer .leer-emoji { font-size: 3.2rem; display: block; margin-bottom: .6rem; }

/* ---------- Fußzeile ---------- */
.site-footer { color: var(--grau); font-size: .88rem; padding: 2.5rem 0 1rem; text-align: center; }
.site-footer a { color: var(--grau); }
.site-footer .pfoten { font-size: 1.1rem; opacity: .6; letter-spacing: .3rem; }
.footer-links { display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap; margin: .6rem 0; }
.footer-links a { font-weight: 600; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Rechtstexte (Impressum / Datenschutz) */
.rechtstext h3 { margin: 1.3rem 0 .4rem; font-size: 1.08rem; }
.rechtstext h3:first-child { margin-top: 0; }
.rechtstext ul { padding-left: 1.2rem; }
.rechtstext li { margin: .3rem 0; }
.rechtstext { max-width: 780px; }

/* ---------- Fund-Overlay (Belohnung) ---------- */
.jubel {
    position: fixed; inset: 0; display: none; place-items: center;
    background: rgba(30, 20, 8, .6); z-index: 1000; text-align: center; padding: 1rem;
    backdrop-filter: blur(2px);
}
.jubel.sichtbar { display: grid; animation: einblenden .2s ease; }
.jubel-box {
    background: #fff; border-radius: 26px; padding: 2.4rem 2rem; max-width: 440px;
    box-shadow: var(--schatten-tief); animation: pop .35s cubic-bezier(.2,1.4,.5,1);
}
.jubel-box h2 { font-size: 1.8rem; margin: .3rem 0; color: var(--gruen-dunkel); }
.jubel-emoji { font-size: 4.5rem; animation: hopf 1s ease infinite; }
@keyframes hopf { 0%,100% { transform: translateY(0) rotate(-4deg) } 50% { transform: translateY(-16px) rotate(4deg) } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
@keyframes einblenden { from { opacity: 0 } to { opacity: 1 } }

/* Konfetti */
.konfetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 1001; opacity: .9; will-change: transform; }

@media (max-width: 640px) {
    .site-header .container { justify-content: center; gap: .4rem; }
    .site-nav { justify-content: center; }
    h1 { font-size: 1.6rem; }
    .hero { padding: 1.8rem 1.3rem 2rem; }
    .hero h1 { font-size: 1.9rem; }
    .hero-deko { font-size: 5.5rem; opacity: .8; }
}
