/* ludo.earth — kindgerechte, helle Optik: runde Formen, warme Grundfarbe,
   Spielplatzfarben (Sonnengelb, Himmelblau, Grasgrün, Rutschenrot).
   Bewusst NICHT wie lido.earth: dort Sand/Meer und schmale Serifen, hier
   dicke runde Serifenlose und Karten mit Farbkante.
   Ein Design, hell — kein Dunkelmodus: Diese Seite wird tagsüber auf dem
   Weg zum Spielplatz benutzt, und ein zweites Farbwerk hätte hier keinen
   Nutzen, aber doppelte Pflege. */

@font-face {
  font-family: "Fredoka";
  src: url("/static/schrift/fredoka.woff2") format("woff2");
  font-weight: 300 700; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/static/schrift/nunito.woff2") format("woff2");
  font-weight: 200 1000; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/static/schrift/nunito-kursiv.woff2") format("woff2");
  font-weight: 200 1000; font-style: italic; font-display: swap;
}

:root {
  --gelb: #FFC93C;
  --gelb-hell: #FFF3D0;
  --blau: #3A86FF;
  --blau-hell: #DCEBFF;
  --gruen: #63C132;
  --gruen-hell: #E4F6D8;
  --rot: #FF6B6B;
  --rosa: #FF7AB6;
  --violett: #8338EC;
  --grund: #FFFBF2;
  --papier: #FFFFFF;
  --tinte: #2B2118;
  --tinte-leise: #6E6154;
  --rand: #EFE4D2;
  --schatten: 0 2px 0 rgba(43, 33, 24, .06), 0 8px 24px -12px rgba(43, 33, 24, .28);
  --rund: 18px;
  --rund-klein: 12px;
  --rund-voll: 999px;
  --breit: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--tinte);
  font-family: Nunito, "Segoe UI", system-ui, sans-serif;
  font-size: 17px; line-height: 1.55; font-weight: 500;
  /* Ein leiser Konfetti-Grund: drei Punkte in den Spielfarben, sehr blass.
     Er macht die grosse leere Fläche freundlich, ohne zu lärmen. */
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 201, 60, .16) 0 9px, transparent 9px),
    radial-gradient(circle at 84% 32%, rgba(58, 134, 255, .12) 0 7px, transparent 7px),
    radial-gradient(circle at 62% 78%, rgba(99, 193, 50, .12) 0 8px, transparent 8px);
  background-attachment: fixed;
}
h1, h2, h3, .wortmarke, .zahl b, .kachelzahl {
  font-family: Fredoka, Nunito, system-ui, sans-serif; font-weight: 600;
  letter-spacing: -.01em; line-height: 1.15;
}
h1 { font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.9rem); margin: 0 0 .35em; }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
a { color: #1F6FD0; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--violett); }
img, svg { max-width: 100%; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .92em;
  background: var(--gelb-hell); padding: .1em .35em; border-radius: 6px; }
small { font-size: .82em; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.springen { position: absolute; left: -9999px; }
.springen:focus { left: 8px; top: 8px; z-index: 99; background: var(--gelb); color: var(--tinte);
  padding: .6em 1em; border-radius: var(--rund-voll); }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; border-radius: 6px; }

/* ---------- Kopf ---------- */
.kopf {
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  padding: 14px clamp(14px, 4vw, 28px);
  background: rgba(255, 251, 242, .92); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--gelb);
  position: sticky; top: 0; z-index: 40;
}
.marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo { width: 38px; height: 38px; flex: none; }
.wortmarke { font-size: 1.5rem; }
.punkt { color: var(--rot); }
.leiste { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.leiste a {
  padding: .45em .85em; border-radius: var(--rund-voll); text-decoration: none;
  color: var(--tinte); font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.leiste a:hover { background: var(--gelb-hell); color: var(--tinte); }
.leiste a.on { background: var(--gelb); color: var(--tinte); }
.sprachwahl { display: flex; gap: 2px; }
.sprachwahl a {
  padding: .3em .55em; border-radius: 8px; font-size: .78rem; font-weight: 800;
  text-decoration: none; color: var(--tinte-leise);
}
.sprachwahl a.on { background: var(--tinte); color: #fff; }
.merkzahl { background: var(--rot); color: #fff; border-radius: var(--rund-voll);
  padding: 0 .45em; font-size: .78em; margin-left: .2em; }

/* ---------- Rahmen ---------- */
.inhalt { max-width: var(--breit); margin: 0 auto; padding: clamp(18px, 3vw, 34px) clamp(14px, 4vw, 28px) 60px; }
.seitenkopf { margin-bottom: 1.2em; }
.unter { color: var(--tinte-leise); margin: .2em 0 1em; font-size: 1.03rem; }
.leise { color: var(--tinte-leise); }
.klein { font-size: .88rem; }
.brot { font-size: .88rem; color: var(--tinte-leise); margin-bottom: .8em; }
.brot a { color: var(--tinte-leise); }
.text { max-width: 44rem; }
.text h2 { margin-top: 1.6em; }
.text ul { padding-left: 1.2em; }
.hinweis { background: var(--blau-hell); border-radius: var(--rund-klein);
  padding: .7em 1em; margin: 1em 0; font-size: .95rem; }
.leer { color: var(--tinte-leise); font-style: italic; }

/* ---------- Knöpfe, Chips ---------- */
.knopf {
  display: inline-flex; align-items: center; gap: .45em; padding: .62em 1.15em;
  border-radius: var(--rund-voll); border: 0; cursor: pointer;
  font: inherit; font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease;
}
.knopf:hover { transform: translateY(-2px); }
.knopf:active { transform: translateY(0); }
.knopf.primaer { background: var(--gelb); color: var(--tinte); box-shadow: 0 3px 0 #E0A400; }
.knopf.primaer:hover { background: #FFD35F; color: var(--tinte); }
.knopf.sekundaer { background: var(--papier); color: var(--tinte); box-shadow: 0 3px 0 var(--rand); }
.knopf.leise { background: transparent; color: var(--tinte-leise); box-shadow: inset 0 0 0 2px var(--rand); }
.knopf.leise:hover { color: var(--tinte); box-shadow: inset 0 0 0 2px var(--gelb); }
.knopf.klein { padding: .4em .8em; font-size: .9rem; }
.knopf.merken.an { background: var(--gelb); box-shadow: 0 3px 0 #E0A400; }
.knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.heldknoepfe { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.1em; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: .4em; padding: .4em .8em;
  background: var(--papier); border-radius: var(--rund-voll); text-decoration: none;
  color: var(--tinte); font-size: .92rem; font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--rand); cursor: pointer;
}
.chip:hover { box-shadow: inset 0 0 0 2px var(--gelb); color: var(--tinte); }
.chip small { color: var(--tinte-leise); font-weight: 600; }
.chip.leer { background: transparent; }
.chip.klein { padding: .22em .6em; font-size: .82rem; }
.chip.klein.an { background: var(--gruen-hell); box-shadow: inset 0 0 0 2px #B6E39A; }
.chip.klein.aus { opacity: .42; }
.chips.gross .chip { padding: .55em 1em; font-size: 1rem; }
.chip.wahl input { accent-color: var(--blau); margin: 0 .1em 0 0; }
.chip.wahl:has(input:checked) {
  background: var(--f, var(--blau)); color: #fff;
  box-shadow: inset 0 0 0 2px var(--f, var(--blau));
}
.chip.wahl:has(input:checked) small { color: rgba(255, 255, 255, .8); }

/* ---------- Startseite ---------- */
.start .inhalt { max-width: var(--breit); }
.held { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px; align-items: center; margin-bottom: 2.2em; }
.held h1 { margin-bottom: .3em; }
.heldsvg { width: 100%; height: auto; }
.suchform { position: relative; display: flex; gap: 8px; align-items: center; }
.suchform input[type=search] {
  flex: 1; min-width: 0; padding: .8em 1.1em; border-radius: var(--rund-voll);
  border: 3px solid var(--rand); background: var(--papier); font: inherit; font-weight: 600;
}
.suchform input[type=search]:focus { border-color: var(--gelb); outline: none; }
.suchform.gross input[type=search] { font-size: 1.08rem; }
.suchform .ikon { border: 0; background: transparent; font-size: 1.25rem; cursor: pointer;
  padding: .3em; border-radius: var(--rund-voll); }
.suchform .ikon:hover { background: var(--gelb-hell); }
.vorschlaege {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: var(--papier); border-radius: var(--rund); box-shadow: var(--schatten);
  overflow: hidden; max-height: 60vh; overflow-y: auto;
}
.vorschlaege a { display: block; padding: .6em .9em; text-decoration: none; color: var(--tinte);
  border-bottom: 1px solid var(--rand); font-size: .95rem; }
.vorschlaege a:last-child { border-bottom: 0; }
.vorschlaege a:hover, .vorschlaege a.aktiv { background: var(--gelb-hell); }
.vorschlaege .vort { font-weight: 800; }
.vorschlaege .vunter { color: var(--tinte-leise); font-size: .85em; }

.zahlen { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 2.4em; }
.zahl { flex: 1 1 140px; background: var(--papier); border-radius: var(--rund);
  padding: .9em 1.1em; box-shadow: var(--schatten); }
.zahl b { display: block; font-size: 1.7rem; }
.zahl span { color: var(--tinte-leise); font-size: .88rem; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kacheln.klein { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.kachel {
  position: relative; display: block; padding: 1em 1.1em 1.1em;
  background: var(--papier); border-radius: var(--rund); text-decoration: none; color: var(--tinte);
  box-shadow: var(--schatten); border-top: 6px solid var(--f, var(--gelb));
  overflow: hidden;
}
.kachel:hover { transform: translateY(-3px); color: var(--tinte); }
.kachel { transition: transform .14s ease; }
.kachel b { display: block; font-size: 1.02rem; }
.kachelzahl { display: block; font-size: 1.5rem; color: var(--f, var(--gelb)); }
.kachelunter { color: var(--tinte-leise); font-size: .86rem; }

.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.eintrag {
  display: flex; gap: 0; background: var(--papier); border-radius: var(--rund);
  overflow: hidden; text-decoration: none; color: var(--tinte); box-shadow: var(--schatten);
  transition: transform .14s ease;
}
.eintrag:hover { transform: translateY(-2px); color: var(--tinte); }
.eintragfarbe { width: 8px; flex: none; background: var(--f, var(--gruen)); }
.eintragtext { padding: .75em .95em; min-width: 0; }
.eintragtext b { display: block; font-weight: 800; }
.eintragort { display: block; color: var(--tinte-leise); font-size: .88rem; }
.eintragmerkmale { display: flex; gap: 5px; flex-wrap: wrap; margin-top: .4em; }
.mm { background: var(--gelb-hell); border-radius: var(--rund-voll); padding: .1em .55em; font-size: .78rem; font-weight: 700; }
.mm.km { background: var(--blau-hell); }
.familie { margin-top: 3em; padding-top: 1.2em; border-top: 2px dashed var(--rand); color: var(--tinte-leise); font-size: .94rem; }

/* ---------- Länder ---------- */
.laenderliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.landzeile { display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: .5em .8em; background: var(--papier); border-radius: var(--rund-klein);
  text-decoration: none; color: var(--tinte); box-shadow: inset 0 0 0 2px var(--rand); }
.landzeile:hover { box-shadow: inset 0 0 0 2px var(--gelb); color: var(--tinte); }
.landzeile small { color: var(--tinte-leise); }
.filterzeile { margin: 0 0 1.4em; }
.blaettern { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 1.6em; color: var(--tinte-leise); }

/* ---------- Detailseite ---------- */
.stellekopf { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; }
.stelleknoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.art { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 .4em; }
.artmarke { background: var(--f, var(--gruen)); color: #fff; border-radius: var(--rund-voll);
  padding: .2em .8em; font-size: .82rem; font-weight: 800; }
.lage { color: var(--tinte-leise); margin: 0; }
.einleitung { font-size: 1.06rem; max-width: 46rem; }
.stellegitter { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 1.4em; }
.block { background: var(--papier); border-radius: var(--rund); padding: 1em 1.2em 1.2em; box-shadow: var(--schatten); }
.block h2 { margin: 0 0 .7em; font-size: 1.15rem; }
.block h2 small { color: var(--tinte-leise); font-weight: 500; font-size: .72em; }
.karte-klein { grid-column: 1 / -1; height: 320px; border-radius: var(--rund); overflow: hidden;
  box-shadow: var(--schatten); background: var(--gruen-hell); }
.geraeteliste { list-style: none; padding: 0; margin: 0 0 .8em; columns: 2; column-gap: 18px; }
.geraeteliste li { break-inside: avoid; padding: .12em 0; }
.geraeteliste b { color: var(--violett); }
.tafel { margin: 0; }
.tafel > div { display: flex; justify-content: space-between; gap: 12px; padding: .4em 0;
  border-bottom: 1px dashed var(--rand); }
.tafel > div:last-child { border-bottom: 0; }
.tafel dt { color: var(--tinte-leise); font-weight: 600; }
.tafel dd { margin: 0; font-weight: 800; text-align: right; }
.tafel dd.ja { color: #2E8B2E; }
.tafel dd.nein { color: #C0392B; }
.tafel dd.unklar { color: var(--tinte-leise); font-weight: 600; }
.naheliste { list-style: none; padding: 0; margin: 0; }
.naheliste li { padding: .3em 0; display: flex; gap: .5em; align-items: baseline; flex-wrap: wrap; }
.sinnbild { font-size: 1.1em; }
.koordinaten { font-size: .92rem; }
.nachbarn { margin-top: 2em; }
.gruppen, .alter, .drin { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; margin: .6em 0 0; }
.beschreibung { font-size: .95rem; margin-top: .8em; }

/* ---------- Fragen ---------- */
.fragen details { background: var(--papier); border-radius: var(--rund); padding: .2em 1.1em;
  margin-bottom: 8px; box-shadow: var(--schatten); }
.fragen summary { cursor: pointer; font-weight: 800; padding: .7em 0;
  font-family: Fredoka, Nunito, sans-serif; }
.fragen summary::marker { color: var(--gelb); }
.fragen p { margin-top: 0; }

/* ---------- Karte (Vollbild) ---------- */
.kartenseite { overflow: hidden; }
.kartenmain { position: relative; }
/* WARUM #karte UND .vollkarte, nicht nur .vollkarte:
   MapLibre hängt dem Behälter seine eigene Klasse `.maplibregl-map` an, und
   maplibre-gl.css setzt darauf `position: relative; overflow: hidden`. Das ist
   dieselbe Spezifität wie `.vollkarte` — und das Fremdstylesheet wird NACH
   diesem geladen, gewinnt also. Folge (07.09.2026 live erlebt): Der Behälter
   verliert seine Verankerung an den Bildschirmrändern und fällt auf **Höhe 0**
   zusammen. Die Karte lief, zeichnete, antwortete auf Abfragen — und war
   unsichtbar. Deshalb die höhere Spezifität, und zusätzlich eine echte
   min-height als Rückfall, damit ein zukünftiger Fremdstil das nicht wieder
   aushebeln kann. */
#karte.vollkarte {
  position: fixed; inset: 0; top: 71px;
  min-height: calc(100vh - 71px);
  background: var(--gruen-hell);
}
.kartelaedt { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tinte-leise); }
.kartekopf {
  position: fixed; top: 84px; left: 12px; z-index: 30;
  width: min(400px, calc(100vw - 24px));
  background: rgba(255, 251, 242, .96); border-radius: var(--rund);
  box-shadow: var(--schatten); padding: 8px; backdrop-filter: blur(6px);
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.filterkasten { padding: 6px 4px 0; }
.filtergruppe h3 { margin: .8em 0 .35em; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--tinte-leise); }
.filterfuss { display: flex; gap: 10px; align-items: center; margin: 1em 0 .3em; font-size: .88rem; }
.filterzahl { background: var(--rot); color: #fff; border-radius: var(--rund-voll);
  padding: 0 .4em; font-size: .72rem; }
.kartetreffer { margin-top: 8px; display: grid; gap: 6px; }
.kartetreffer .eintrag { box-shadow: inset 0 0 0 2px var(--rand); }
.kartelegende {
  position: fixed; bottom: 12px; left: 12px; z-index: 30;
  background: rgba(255, 251, 242, .94); border-radius: var(--rund-voll);
  padding: .45em 1em; font-size: .82rem; box-shadow: var(--schatten);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  max-width: calc(100vw - 24px);
}
.legendepunkt { width: 11px; height: 11px; border-radius: 50%; background: var(--f);
  display: inline-block; box-shadow: 0 0 0 2px #fff; }
.blase { min-width: 190px; }
.blase h3 { margin: .1em 0; font-size: 1.05rem; }
.blasearten { display: flex; gap: 5px; flex-wrap: wrap; margin: 0; }
.blasemerkmale { display: flex; gap: 5px; flex-wrap: wrap; margin: .4em 0 .6em; }
.maplibregl-popup-content { border-radius: var(--rund); padding: .9em 1em; box-shadow: var(--schatten);
  font-family: Nunito, sans-serif; }
.maplibregl-ctrl-group { border-radius: var(--rund-klein) !important; }

/* ---------- Fuß ---------- */
.fuss { border-top: 3px solid var(--gelb); background: var(--papier); margin-top: 3em; }
.fussinnen { max-width: var(--breit); margin: 0 auto; padding: 24px clamp(14px, 4vw, 28px) 34px; }
.fussmarke { font-family: Fredoka, Nunito, sans-serif; font-size: 1.25rem; margin: 0 0 .2em; }
.fussslogan { font-family: Nunito, sans-serif; font-size: .9rem; color: var(--tinte-leise); font-weight: 600; }
.fussquelle { color: var(--tinte-leise); font-size: .82rem; margin: .3em 0 1em; }
.fussnav { display: flex; gap: 16px; flex-wrap: wrap; font-size: .92rem; font-weight: 700; }

@media (max-width: 820px) {
  .held { grid-template-columns: 1fr; }
  .heldbild { order: -1; max-width: 320px; margin: 0 auto; }
  .leiste { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .leiste::-webkit-scrollbar { display: none; }
  .geraeteliste { columns: 1; }
  #karte.vollkarte { top: 118px; min-height: calc(100vh - 118px); }
  .kartekopf { top: 128px; left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .knopf:hover, .kachel:hover, .eintrag:hover { transform: none; }
}
