:root {
  --grund:    #1b211d;
  --flaeche:  #242c26;
  --flaeche2: #2d362f;
  --linie:    #3b463d;
  --schrift:  #e7e9df;
  --leise:    #97a292;

  --s1: #b8402a;
  --s2: #d97a2b;
  --s3: #c9ab33;
  --s4: #8ba63c;
  --s5: #4f9b31;

  --rand: 1.5rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--schrift);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: 3rem;
}

h1, h2 { font-family: Alegreya, Georgia, serif; font-weight: 700; margin: 0; }

a { color: #c9b26a; }

.kopf {
  padding: 1.6rem var(--rand) 0.9rem;
  border-bottom: 1px solid var(--linie);
}
.kopf h1 { font-size: 1.9rem; letter-spacing: -0.01em; }
.kopf__ort { margin: 0.15rem 0 0; color: var(--leise); font-size: 0.9rem; }

.laden { padding: 3rem var(--rand); color: var(--leise); }

/* ------------------------------------------------------------- Urteil */

.urteil {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  padding: 1.4rem var(--rand);
}
.urteil__zahl {
  font-family: Alegreya, Georgia, serif;
  font-weight: 800;
  font-size: 4.6rem;
  line-height: 0.85;
  width: 5.2rem;
  min-width: 5.2rem;
  text-align: center;
  padding: 0.35rem 0 0.5rem;
  border-radius: 0.25rem 1.6rem 0.25rem 1.6rem;
  background: var(--flaeche);
  color: var(--s1);
  transition: color 0.25s ease, background 0.25s ease;
}
.urteil__text p { margin: 0; }
.urteil__tag { font-size: 0.82rem; color: var(--leise); }
.urteil__satz { font-family: Alegreya, serif; font-size: 1.45rem; line-height: 1.2; }
.urteil__zusatz { font-size: 0.9rem; color: var(--leise); margin-top: 0.3rem !important; }

/* --------------------------------------------------------------- Arten */

.arten {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0 var(--rand) 0.4rem;
  scrollbar-width: none;
}
.arten::-webkit-scrollbar { display: none; }
.arten button {
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.88rem;
  color: var(--leise);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 2rem;
  padding: 0.32rem 0.85rem;
  cursor: pointer;
}
.arten button[aria-pressed="true"] {
  background: var(--schrift);
  border-color: var(--schrift);
  color: var(--grund);
  font-weight: 600;
}

/* ---------------------------------------------------------------- Tage */

.titel { font-size: 1.1rem; padding: 0 var(--rand); margin-top: 1.6rem; }
.titel__zusatz { font-family: "IBM Plex Sans", sans-serif; font-size: 0.85rem; font-weight: 400; color: var(--leise); }
.hinweis { padding: 0 var(--rand); margin: 0.2rem 0 0.7rem; font-size: 0.82rem; color: var(--leise); }

.tage__leiste {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  padding: 0 var(--rand) 0.5rem;
  scrollbar-width: none;
}
.tage__leiste::-webkit-scrollbar { display: none; }
.tag {
  flex: 0 0 auto;
  width: 3rem;
  border: 1px solid var(--linie);
  border-radius: 0.4rem;
  background: var(--flaeche);
  color: var(--schrift);
  font: inherit;
  padding: 0.35rem 0 0;
  cursor: pointer;
  text-align: center;
}
.tag__name { font-size: 0.72rem; color: var(--leise); }
.tag__zahl { font-size: 0.82rem; }
.tag__balken { height: 5px; margin-top: 0.35rem; border-radius: 0 0 0.3rem 0.3rem; }
.tag[aria-selected="true"] { border-color: var(--schrift); background: var(--flaeche2); }
.tag--heute .tag__name { color: var(--schrift); font-weight: 600; }

/* --------------------------------------------------------------- Karte */

.karte { margin-top: 0.6rem; }
#map {
  height: 340px;
  background: var(--flaeche);
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
}
#map .leaflet-tile-pane { filter: saturate(0.45) brightness(0.62) contrast(1.05); }
#map .leaflet-container { background: var(--flaeche); }
.leaflet-control-attribution { background: rgba(27,33,29,0.85) !important; color: var(--leise) !important; }
.leaflet-control-attribution a { color: #c9b26a !important; }

.marke {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.45);
  font-family: Alegreya, serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #14180f;
}
.marke--aktiv { outline: 2px solid var(--schrift); outline-offset: 2px; }

.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0 var(--rand);
  font-size: 0.78rem;
  color: var(--leise);
}
.legende li { display: flex; align-items: center; gap: 0.35rem; }
.legende i { width: 0.7rem; height: 0.7rem; border-radius: 50%; display: inline-block; }

/* ------------------------------------------------------------- Reviere */

.liste { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.liste li { border-bottom: 1px solid var(--linie); }
.revier {
  display: grid;
  grid-template-columns: 2.1rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0.7rem var(--rand);
  cursor: pointer;
}
.revier:hover, .revier:focus-visible { background: var(--flaeche); }
.revier__stufe {
  font-family: Alegreya, serif;
  font-weight: 700;
  font-size: 1.5rem;
  text-align: center;
}
.revier__name { font-weight: 500; }
.revier__unten { font-size: 0.78rem; color: var(--leise); }
.revier__spur { display: block; }

/* -------------------------------------------------------------- Detail */

.detail { padding-bottom: 1rem; border-bottom: 1px solid var(--linie); }
.detail__wald { padding: 0 var(--rand); margin: 0.2rem 0 0.9rem; color: var(--leise); font-size: 0.88rem; }

.faktoren { padding: 0 var(--rand); display: grid; gap: 0.45rem; }
.faktor { display: grid; grid-template-columns: 8.5rem 1fr auto; align-items: center; gap: 0.6rem; font-size: 0.84rem; }
.faktor__name { color: var(--leise); }
.faktor__bahn { height: 6px; background: var(--flaeche2); border-radius: 3px; overflow: hidden; }
.faktor__wert { height: 100%; background: var(--s3); border-radius: 3px; }
.faktor__zahl { color: var(--leise); font-variant-numeric: tabular-nums; }

.fund { padding: 1.1rem var(--rand) 0; }
.fund__frage { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--leise); max-width: 46ch; }
.fund__knoepfe { display: flex; gap: 0.4rem; }
.fund__knoepfe button {
  font: inherit; font-size: 0.85rem;
  background: var(--flaeche); color: var(--schrift);
  border: 1px solid var(--linie); border-radius: 0.4rem;
  padding: 0.3rem 0.8rem; cursor: pointer;
}
.fund__knoepfe button:hover { border-color: var(--schrift); }
.fund__echo { font-size: 0.82rem; color: var(--s2); min-height: 1.2rem; margin: 0.5rem 0 0; }

/* ---------------------------------------------------------------- Fuss */

.fuss { padding: 1.6rem var(--rand) 0; color: var(--leise); font-size: 0.8rem; max-width: 60ch; }
.fuss p { margin: 0 0 0.5rem; }

:focus-visible { outline: 2px solid var(--s3); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (min-width: 900px) {
  :root { --rand: 2.5rem; }
  main {
    display: grid;
    grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
    grid-template-areas:
      "urteil karte"
      "arten  karte"
      "tage   karte"
      "reviere detail"
      "fuss   detail";
    align-items: start;
    max-width: 76rem;
    margin: 0 auto;
    column-gap: 1rem;
  }
  .urteil  { grid-area: urteil; }
  .arten   { grid-area: arten; }
  .tage    { grid-area: tage; }
  .karte   { grid-area: karte; position: sticky; top: 1rem; }
  .reviere { grid-area: reviere; }
  .detail  { grid-area: detail; }
  .fuss    { grid-area: fuss; }
  #map { height: 480px; border-radius: 0.5rem; border: 1px solid var(--linie); }
}

/* Kleinigkeiten */
.faktoren .hinweis { padding: 0; margin-top: 0.3rem; }

@media (min-width: 900px) {
  .arten, .tage__leiste { flex-wrap: wrap; overflow: visible; }
}
