/* WildKrautWelt — Design nach Vorbild der gedruckten Karten:
   warmes Creme, tiefes Grün, Rot nur für Gift, organisch & wertig.
   Schriften (Corporate Design wildkrautwelt.de): Urbanist (Text), Bad Script (Überschriften) — lokal eingebunden. */
@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/urbanist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/urbanist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0;
}
@font-face {
  font-family: "Bad Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/badscript-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Bad Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/badscript-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0;
}

:root {
  /* Corporate Design wildkrautwelt.de (Vorgabe 04.07.2026) */
  --creme: #c4dfc0;          /* Hintergrund hell */
  --papier: #f4faf2;         /* Kacheln/Karten: grünliches Weiß */
  --gruen: #14724a;          /* Schrift + Buttons */
  --gruen-dunkel: #0a4129;   /* Überschriften */
  --gruen-hell: #3f9268;
  --gruen-zart: #a4d29e;     /* Hintergrund dunkel */
  --hover: #c5431e;          /* Button-Hover/-Druck */
  --rot: #a13a2e;
  --rot-zart: #f3e2de;
  --tinte: #14724a;          /* Fließtext laut CD in Schrift-Grün */
  --grau: #55755f;
  --schatten: 0 6px 24px rgba(60, 74, 55, .14);
  --radius: 18px;
  --serif: "Urbanist", -apple-system, "Segoe UI", Roboto, sans-serif;   /* Pflanzennamen/Zahlen: Urbanist */
  --sans: "Urbanist", -apple-system, "Segoe UI", Roboto, sans-serif;    /* Fließtext: Urbanist */
  --hand: "Bad Script", "Segoe Script", cursive;                        /* Überschriften: Bad Script */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--sans);
  color: var(--tinte);
  background: var(--creme);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
/* organische Hintergrund-Schwünge wie auf den Karten */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 60% at 110% -10%, rgba(20,114,74,.10), transparent 60%),
    radial-gradient(100% 50% at -20% 110%, rgba(20,114,74,.12), transparent 55%);
}

h1, h2, h3 { font-family: var(--hand); font-weight: 400; color: var(--gruen-dunkel); letter-spacing: .5px; }

.app-rahmen { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 0 16px 96px; }

/* ---------- Kopfzeile ---------- */
.kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 2px 10px;
}
.kopf .marke { display: flex; align-items: center; gap: 10px; }
.kopf .marke svg { width: 34px; height: 34px; }
.kopf .marke .name { font-family: var(--hand); font-size: 24px; color: var(--gruen); letter-spacing: .3px; }
.knopf-rund {
  width: 46px; height: 46px; border-radius: 50%;
  border: none; background: var(--papier); box-shadow: var(--schatten);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--gruen);
}
.knopf-rund:active { transform: scale(.94); }

/* ---------- Ansichten ---------- */
.ansicht { display: none; animation: einblenden .25s ease; }
.ansicht.aktiv { display: block; }
@keyframes einblenden { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ansicht, .karte-flip .seite, .toast { animation: none !important; transition: none !important; }
}

.untertitel { color: var(--grau); font-size: 15px; margin: 4px 0 18px; }

/* ---------- Anmelden ---------- */
.login-buehne { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo svg { width: 84px; height: 84px; }
.login-logo .name { font-family: var(--hand); font-size: 38px; color: var(--gruen); margin-top: 8px; }
.login-logo .motto { color: var(--grau); font-size: 15px; margin-top: 6px; }
.tabs { display: flex; background: rgba(20,114,74,.08); border-radius: 14px; padding: 5px; margin-bottom: 18px; }
.tabs button {
  flex: 1; border: none; background: transparent; padding: 12px; font-size: 16px;
  border-radius: 10px; color: var(--gruen); cursor: pointer; font-weight: 600;
  font-family: var(--sans);
}
.tabs button.aktiv { background: var(--papier); box-shadow: var(--schatten); }

.feld { margin-bottom: 14px; }
.feld label { display: block; font-size: 14px; font-weight: 600; color: var(--gruen); margin-bottom: 6px; }
.feld input, .feld textarea {
  width: 100%; font-size: 17px; padding: 15px 16px; border-radius: 14px;
  border: 1.5px solid rgba(20,114,74,.25); background: var(--papier); color: var(--tinte);
  font-family: var(--sans);
}
.feld input:focus, .feld textarea:focus { outline: 2px solid var(--gruen-hell); border-color: transparent; }

.knopf {
  display: block; width: 100%; border: none; cursor: pointer;
  background: var(--gruen); color: #fff; font-size: 18px; font-weight: 600;
  padding: 16px; border-radius: 16px; box-shadow: var(--schatten);
  font-family: var(--sans);
}
.knopf:active { transform: scale(.98); }
.knopf.zweit { background: var(--papier); color: var(--gruen); border: 1.5px solid rgba(20,114,74,.3); box-shadow: none; }
.knopf.klein { width: auto; font-size: 15px; padding: 11px 18px; border-radius: 12px; display: inline-block; }
.knopf:disabled { opacity: .5; }

.fehler { color: var(--rot); font-size: 15px; margin: 10px 2px; min-height: 20px; }

/* ---------- Kacheln / Karten-Gitter ---------- */
.kachel {
  background: var(--papier); border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 18px; margin-bottom: 16px;
}
.suchfeld { position: relative; margin-bottom: 16px; }
.suchfeld input {
  width: 100%; font-size: 16px; padding: 13px 16px 13px 44px; border-radius: 999px;
  border: 1.5px solid rgba(20,114,74,.2); background: var(--papier);
}
.suchfeld svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--grau); width: 19px; height: 19px; }

.gitter { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gitter-karte {
  background: var(--papier); border-radius: 16px; box-shadow: var(--schatten);
  overflow: hidden; cursor: pointer; border: none; padding: 0; text-align: left;
  position: relative; font-family: var(--sans);
}
.gitter-karte:active { transform: scale(.97); }
.gitter-karte img { width: 100%; aspect-ratio: 171/251; object-fit: cover; display: block; background: var(--creme); }
.gitter-karte .gk-name {
  font-family: var(--serif); font-size: 15px; color: var(--gruen);
  padding: 9px 10px 11px; line-height: 1.25;
}
.gitter-karte.gesperrt img { filter: grayscale(.55) opacity(.55); }
.badge-gift {
  position: absolute; top: 8px; left: 8px; background: var(--rot); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: .3px;
}
.badge-schloss {
  position: absolute; top: 8px; right: 8px; background: rgba(46,42,36,.72); color: #fff;
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.zwischen-titel { font-family: var(--hand); font-size: 22px; color: var(--gruen); margin: 22px 2px 12px; }

/* ---------- Karten-Overlay (Ansehen + Zoom) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(38, 42, 35, .93);
  display: none; flex-direction: column;
}
.overlay.offen { display: flex; }
.overlay-kopf { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; color: #fff; }
.overlay-kopf .titel { font-family: var(--serif); font-size: 19px; flex: 1; text-align: center; }
.overlay-kopf button { background: rgba(255,255,255,.14); color: #fff; border: none; width: 42px; height: 42px; border-radius: 50%; font-size: 18px; cursor: pointer; }

.zoom-buehne { flex: 1; overflow: hidden; position: relative; touch-action: none; }
.zoom-inhalt {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transform-origin: 0 0; will-change: transform;
}
.karte-flip { position: relative; width: min(78vw, 46vh); aspect-ratio: 171/251; perspective: 1400px; }
.karte-flip .seite {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 12px; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.45);
  transition: transform .55s cubic-bezier(.2,.7,.25,1); background: var(--creme);
}
.karte-flip img { width: 100%; height: 100%; object-fit: contain; display: block; }
.karte-flip .vorn { transform: rotateY(0deg); }
.karte-flip .hinten { transform: rotateY(180deg); }
.karte-flip.gedreht .vorn { transform: rotateY(-180deg); }
.karte-flip.gedreht .hinten { transform: rotateY(0deg); }

.blaetter-pfeil {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(255,255,255,.16); border: none; color: #fff; width: 44px; height: 60px;
  font-size: 22px; cursor: pointer; border-radius: 12px;
}
.blaetter-pfeil.links { left: 6px; }
.blaetter-pfeil.rechts { right: 6px; }

.overlay-fuss { padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.overlay-fuss .knopf { flex: 1; font-size: 16px; padding: 14px; }
.overlay-fuss .knopf.zweit { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }

.zoom-hinweis { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.65); font-size: 13px; pointer-events: none; }

/* ---------- Dialoge (Fund, Funde-Liste, Menü) ---------- */
.dialog-grund {
  position: fixed; inset: 0; z-index: 60; background: rgba(38,42,35,.5);
  display: none; align-items: flex-end; justify-content: center;
}
.dialog-grund.offen { display: flex; }
.dialog {
  background: var(--papier); width: 100%; max-width: 520px;
  border-radius: 22px 22px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 82vh; overflow-y: auto;
}
.dialog h3 { font-size: 21px; margin-bottom: 12px; }
.dialog .hinweis { color: var(--grau); font-size: 14px; margin-bottom: 14px; }

.fund-zeile {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
  border-bottom: 1px solid rgba(20,114,74,.12);
}
.fund-zeile img { width: 52px; border-radius: 8px; }
.fund-zeile .fz-mitte { flex: 1; }
.fund-zeile .fz-datum { font-size: 13px; color: var(--grau); }
.fund-zeile .fz-name { font-family: var(--serif); color: var(--gruen); font-size: 16px; }
.fund-zeile .fz-notiz { font-size: 14px; margin-top: 3px; white-space: pre-wrap; }
.fund-zeile .fz-ort { font-size: 12px; color: var(--gruen-hell); margin-top: 2px; }
.fund-zeile button { background: none; border: none; color: var(--grau); cursor: pointer; padding: 6px; }

/* ---------- Lernen / Duell ---------- */
.quiz-bild-rahmen { display: flex; justify-content: center; margin-bottom: 14px; }
.quiz-bild-rahmen img {
  width: min(62vw, 34vh); border-radius: 12px; box-shadow: var(--schatten); background: var(--creme);
}
.quiz-frage { text-align: center; font-family: var(--serif); font-size: 20px; color: var(--gruen); margin-bottom: 14px; }
.antworten { display: grid; gap: 10px; }
.antworten button {
  border: 1.5px solid rgba(20,114,74,.25); background: var(--papier); border-radius: 14px;
  font-size: 17px; padding: 15px 14px; cursor: pointer; text-align: center; color: var(--tinte);
  font-family: var(--sans);
}
.antworten button.richtig { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.antworten button.falsch { background: var(--rot); border-color: var(--rot); color: #fff; }
.antworten button:disabled { cursor: default; }
.quiz-stand { text-align: center; color: var(--grau); font-size: 14px; margin-bottom: 10px; }

.punkte-leiste {
  display: flex; justify-content: space-between; background: var(--papier);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--schatten); margin-bottom: 14px;
  font-weight: 600; color: var(--gruen);
}
.duell-code {
  font-family: var(--serif); font-size: 64px; letter-spacing: 14px; text-align: center;
  color: var(--gruen); margin: 18px 0; text-indent: 14px;
}
.gross-eingabe {
  width: 100%; text-align: center; font-size: 34px; letter-spacing: 10px; text-transform: uppercase;
  padding: 14px; border-radius: 14px; border: 1.5px solid rgba(20,114,74,.3); background: var(--papier);
  font-family: var(--serif);
}
.ergebnis-gross { text-align: center; padding: 30px 0; }
.ergebnis-gross .zahl { font-family: var(--serif); font-size: 56px; color: var(--gruen); }
.ergebnis-gross svg { width: 74px; height: 74px; color: var(--gruen); }

.statistik { display: flex; gap: 12px; margin-bottom: 16px; }
.statistik .stat {
  flex: 1; background: var(--papier); border-radius: 14px; padding: 14px; text-align: center;
  box-shadow: var(--schatten);
}
.statistik .stat .zahl { font-family: var(--serif); font-size: 30px; color: var(--gruen); }
.statistik .stat .text { font-size: 13px; color: var(--grau); margin-top: 2px; }

/* ---------- Funde ---------- */
#fundkarte { height: 44vh; border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 16px; background: var(--gruen-zart); z-index: 1; }
.karte-platzhalter { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--grau); font-size: 15px; padding: 20px; text-align: center; }

/* ---------- Shop ---------- */
.shop-set { overflow: hidden; padding: 0; }
.shop-set .ss-kopf { padding: 18px 18px 6px; }
.shop-set .ss-preis { font-family: var(--serif); font-size: 26px; color: var(--gruen); }
.vorschau-reihe { display: flex; gap: 10px; padding: 12px 18px; }
.vorschau-reihe img { width: 31%; border-radius: 10px; box-shadow: var(--schatten); }
.shop-set .ss-fuss { padding: 6px 18px 18px; }
.gekauft-band { background: var(--gruen-zart); color: var(--gruen); font-weight: 700; text-align: center; padding: 10px; }

/* ---------- Navigation unten ---------- */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: var(--papier); box-shadow: 0 -4px 20px rgba(60,74,55,.12);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-innen { max-width: 520px; margin: 0 auto; display: flex; }
.nav button {
  flex: 1; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 0 9px; color: var(--grau); font-size: 12px; font-weight: 600;
  font-family: var(--sans);
}
.nav button svg { width: 26px; height: 26px; }
.nav button.aktiv { color: var(--gruen); }
.nav button.aktiv::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gruen); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%);
  background: var(--tinte); color: #fff; padding: 13px 22px; border-radius: 999px;
  font-size: 15px; z-index: 90; box-shadow: 0 8px 30px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none; transition: opacity .25s; max-width: 88vw; text-align: center;
}
.toast.sichtbar { opacity: 1; }

.lade-punkt { text-align: center; color: var(--grau); padding: 30px 0; }

/* ===== Hilfe-Sprechblase (v1.1) ===== */
#hilfe-blase {
  position: fixed; z-index: 400; max-width: 270px;
  background: #33402f; color: #fdfaf3;
  border-radius: 10px; padding: 9px 13px;
  font-size: 14px; line-height: 1.45;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
#hilfe-blase.sichtbar { opacity: 1; }

/* ===== Fundkarte: Pins hervorheben (v1.1) ===== */
.pin-aktiv { filter: hue-rotate(273deg) saturate(1.35) drop-shadow(0 0 5px rgba(20,114,74,.8)); }
.pin-blass { opacity: .35; filter: grayscale(.7); }

.fz-ort {
  border: 0; background: none; padding: 2px 0 0;
  color: #14724a; font-size: 14px; text-align: left;
  text-decoration: underline; cursor: pointer; font-family: inherit;
}

/* ===== Einstellungen im Menü (v1.1) ===== */
.einstellung { margin: 18px 0; padding: 12px 14px; background: rgba(20,114,74,.08); border-radius: 12px; }
.schalter-zeile { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.schalter-zeile input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: #14724a; }
.schalter-zeile small { color: var(--grau); }

/* ===== Lern-Kategorien + kleines Fragebild (v1.2) ===== */
.lern-arten-titel { text-align: center; color: var(--grau); font-size: 15px; margin: 18px 0 8px; }
.lern-arten { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.lern-arten button {
  border: 2px solid rgba(20,114,74,.25); background: #fdfaf3; color: #14724a;
  border-radius: 14px; padding: 14px 10px; font-size: 16px; font-family: inherit; cursor: pointer;
}
.lern-arten button.aktiv { border-color: #14724a; background: #14724a; color: #fdfaf3; }
.quiz-bild-klein { display: flex; justify-content: center; margin: 6px 0 4px; }
.quiz-bild-klein img { height: 130px; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.18); }

/* ===== v1.3: Schrift-Feinschliff + robuste Hilfe ===== */
/* Pflanzennamen & Zahlen in Urbanist halbfett, damit sie tragen */
.gk-name, .overlay-kopf .titel, .fz-name, .quiz-frage,
.ergebnis-gross .zahl, .statistik .stat .zahl, .ss-preis { font-weight: 600; }
.duell-code, .gross-eingabe { font-weight: 700; }

/* Beim Gedrückthalten keine Textauswahl/Lupe/Kontextmenü des Systems */
[data-hilfe], [data-hilfe] * {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
#hilfe-blase { font-family: var(--sans); }

/* ===== v1.7: Mehrfachauswahl (Essbare Teile) ===== */
.lern-arten button.breit { grid-column: 1 / -1; }
.antworten button.gewaehlt {
  border-color: var(--gruen); border-width: 2.5px;
  background: var(--gruen-zart); font-weight: 700;
}

/* ===== v2.1: Corporate Design Feinschliff ===== */
/* Überschriften/Marke im dunklen CD-Grün */
.kopf .marke .name, .login-logo .name, .zwischen-titel { color: var(--gruen-dunkel); }

/* Buttons: Hover/Druck im CD-Orange-Rot */
.knopf:hover:not(:disabled), .knopf:active:not(:disabled) { background: var(--hover); }
.knopf.zweit:hover:not(:disabled), .knopf.zweit:active:not(:disabled) {
  background: var(--hover); color: #fff; border-color: var(--hover);
}
.lern-arten button:hover:not(.aktiv), .tabs button:hover:not(.aktiv) { color: var(--hover); border-color: var(--hover); }
.knopf-rund:hover, .knopf-rund:active { color: var(--hover); }

/* Hilfe-Blase im dunklen CD-Grün */
#hilfe-blase { background: #0a4129; color: #f4faf2; }

/* ===== v2.2: Antwortdauer-Auswahl im Menü ===== */
.dauer-wahl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.dauer-wahl button {
  border: 2px solid rgba(20,114,74,.3); background: var(--papier); color: var(--gruen);
  border-radius: 12px; padding: 10px 4px; font-size: 15px; font-family: inherit; cursor: pointer;
}
.dauer-wahl button.aktiv { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.dauer-wahl button:hover:not(.aktiv) { border-color: var(--hover); color: var(--hover); }

/* ===== v2.3: Original-Logo ===== */
.logo-gross { width: min(62vw, 250px); height: auto; display: block; margin: 0 auto; }
.logo-klein { height: 56px; width: auto; display: block; }
