/* Swiss Hiking Trails: zuerst fürs Handy, hell und dunkel, keine fremden Schriften. */
:root {
  --gelb: #e9a100;            /* Wanderwegweiser, RGB 233/161/0 */
  --gelb-hell: #fff4d6;
  --rot: #d5202a;
  --auf-gelb: #1b1b1b;        /* dunkle Schrift auf Gelb */
  --grund: #fbfaf7;
  --flaeche: #ffffff;
  --schrift: #1d2023;
  --leise: #5a6168;
  --linie: #e2dfd8;
  --link: #8a4b00;
  --profil-fuell: rgba(233, 161, 0, .22);
  --schatten: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --gelb-hell: #3a2f10;
    --grund: #121416;
    --flaeche: #1c1f22;
    --schrift: #ecebe7;
    --leise: #a4abb2;
    --linie: #2f3438;
    --link: #f3bd45;
    --profil-fuell: rgba(233, 161, 0, .28);
    --schatten: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--schrift);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
a { color: var(--link); text-underline-offset: .15em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; }
.breite { max-width: 60rem; margin: 0 auto; padding: 0 16px; }
.sprung { position: absolute; left: -999px; top: 0; background: var(--gelb); color: var(--auf-gelb); padding: 8px 12px; }
.sprung:focus { left: 8px; top: 8px; z-index: 10; }

/* Kopf */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-innen { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.marke { text-decoration: none; position: relative; display: inline-block; padding: 6px 0 6px 10px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28)); }
/* Kopf wie ein Wanderwegweiser: grauer Pfosten, gelbes Schild mit Spitze in Weiss-Rot-Weiss (Bergwanderweg) */
.marke::before { display: none; } /* Variante C: ohne Pfosten, nur das Schild */
.marke-schild {
  position: relative; display: inline-block; background: var(--gelb); color: #000;
  font-weight: 800; letter-spacing: .005em; line-height: 1.15; padding: 9px 40px 9px 16px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
  background-image: linear-gradient(rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 50%);
}
.marke-schild::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 22px;
  background: linear-gradient(#f4f4f0 0 37.5%, #c8161d 37.5% 62.5%, #f4f4f0 62.5%);
}
.marke:hover .marke-schild { filter: brightness(1.04); }
.kopf nav { display: flex; gap: 18px; }
.kopf nav a { color: var(--schrift); text-decoration: none; font-weight: 600; padding: 8px 0; }
.kopf nav a:hover { text-decoration: underline; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 22px 0 6px; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; line-height: 1.25; margin: 34px 0 10px; }
p { margin: 0 0 12px; }
.unterzeile { color: var(--leise); margin: 0 0 16px; }
.brotkrumen { font-size: .9rem; color: var(--leise); margin: 14px 0 0; }
.brotkrumen a { color: var(--leise); }
.vorschau { background: var(--rot); color: #fff; padding: 8px 12px; border-radius: 8px; font-weight: 600; margin: 14px 0 0; }

/* Bild und Video */
.medien { margin: 0 -16px; }
.medien img, .medien video, .yt-rahmen { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #222; border: 0; }
.medien figcaption, .legende { font-size: .85rem; color: var(--leise); padding: 6px 16px 0; }
.yt { position: relative; display: block; color: #fff; }
.yt-knopf {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 10px;
  background: rgba(16, 20, 27, .88); color: #fff; font-weight: 700; font-size: .95rem; padding: 10px 16px 10px 14px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.yt-knopf::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt-knopf, .yt:focus-visible .yt-knopf { background: #c8161d; }
@media (min-width: 62rem) { .yt-knopf { left: 20px; bottom: 20px; font-size: 1.05rem; padding: 12px 20px 12px 16px; } }
@media (min-width: 62rem) {
  .medien { margin: 0; }
  .medien img, .medien video, .yt-rahmen { border-radius: 12px; }
  .medien figcaption { padding-left: 0; }
}

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; box-shadow: var(--schatten); }
.kachel-breit { grid-column: 1 / -1; }
.kachel .name { display: block; font-size: .8rem; color: var(--leise); text-transform: uppercase; letter-spacing: .05em; }
.kachel .wert { display: block; font-size: 1.45rem; font-weight: 750; line-height: 1.25; }
.kachel .wert small { font-size: .8rem; font-weight: 500; color: var(--leise); }
.kachel .zusatz { display: block; font-size: .85rem; color: var(--leise); }
@media (min-width: 40rem) { .kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Markierungen der Wegart */
.wegart { display: flex; align-items: center; gap: 10px; margin: 4px 0; font-weight: 600; }
.zeichen { flex: none; display: inline-block; width: 30px; height: 20px; border: 1px solid rgba(0, 0, 0, .35); border-radius: 2px; }
.zeichen-wanderweg { background: var(--gelb); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border: 0; width: 24px; height: 24px; }
.zeichen-bergwanderweg { background: linear-gradient(#fff 0 33.3%, var(--rot) 33.3% 66.6%, #fff 66.6%); }

/* Rückweg als echtes Wegweiser-Schild: Pfeil zurück zum Start, Pfosten rechts, Spitze in der Markierung der Wegart */
.wegweiser { position: relative; max-width: 44rem; margin: 0 0 14px; padding: 22px 0 34px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .22)); }
.wegweiser::before {
  content: ""; position: absolute; right: 34px; top: 0; bottom: 0; width: 18px; border-radius: 9px 9px 2px 2px;
  background: linear-gradient(90deg, #7d838b 0 20%, #c9ced5 35%, #9aa0a8 60%, #6f757d 100%);
}
.schild {
  position: relative; background: var(--gelb); color: #000; padding: 14px 16px 14px 52px; margin: 0;
  clip-path: polygon(38px 0, 100% 0, 100% 100%, 38px 100%, 0 50%);
  background-image: linear-gradient(rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 50%);
}
.schild::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 38px; background: var(--gelb); }
.schild-berg::before { background: linear-gradient(#f4f4f0 0 37.5%, #c8161d 37.5% 62.5%, #f4f4f0 62.5%); }
.schild-alpin::before { background: linear-gradient(#f4f4f0 0 37.5%, #2271b3 37.5% 62.5%, #f4f4f0 62.5%); }
.schild h3 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 800; }
.schild .gross { font-size: 1.35rem; font-weight: 800; margin: 2px 0 6px; line-height: 1.25; }
.schild p { margin-bottom: 4px; }
.schild a { color: #000; }
.kasten { background: var(--flaeche); border: 1px solid var(--linie); border-left: 6px solid var(--gelb); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
.kasten h3 { margin: 0 0 4px; font-size: 1.05rem; }
.kasten p:last-child, .schild p:last-child { margin-bottom: 0; }

/* Höhenprofil */
.profil { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 12px 10px; }
.profil svg { display: block; width: 100%; height: 150px; }
.profil .flaeche { fill: var(--profil-fuell); }
.profil .kurve { fill: none; stroke: var(--gelb); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.profil-enden { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; margin-top: 8px; }
.profil-enden span:last-child { text-align: right; }
.profil-enden b { display: block; }

.liste { padding-left: 1.2em; margin: 0 0 12px; }
.liste li { margin-bottom: 4px; }
.knopf { display: inline-block; background: var(--gelb); color: var(--auf-gelb); font-weight: 700; text-decoration: none; padding: 11px 16px; border-radius: 10px; }
.knopf:hover { filter: brightness(1.05); }
.klein { font-size: .85rem; color: var(--leise); }
.quellen p { font-size: .82rem; color: var(--leise); overflow-wrap: anywhere; }
.platzhalter { border: 2px dashed var(--rot); border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.platzhalter strong { color: var(--rot); }

/* Startseite */
.einleitung { font-size: 1.05rem; max-width: 44rem; }
.filter { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.filter-zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-name { font-size: .8rem; color: var(--leise); text-transform: uppercase; letter-spacing: .05em; width: 100%; }
.filter button {
  font: inherit; font-size: .95rem; cursor: pointer; color: var(--schrift); background: var(--grund);
  border: 1px solid var(--linie); border-radius: 999px; padding: 7px 13px; min-height: 40px;
}
.filter button[aria-pressed="true"] { background: var(--gelb); color: var(--auf-gelb); border-color: var(--gelb); font-weight: 700; }
.filter label { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-height: 40px; cursor: pointer; }
.filter input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gelb); flex: none; }
.anzahl { color: var(--leise); font-size: .9rem; margin: 0 0 10px; }
.wegliste { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 40rem) { .wegliste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .wegliste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wegkarte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; overflow: hidden; box-shadow: var(--schatten); display: flex; flex-direction: column; }
.wegkarte[hidden] { display: none; }
.wegkarte img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #222; }
.wegkarte-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wegkarte h3 { margin: 0; font-size: 1.1rem; line-height: 1.25; }
.wegkarte h3 a { color: var(--schrift); text-decoration: none; }
.wegkarte h3 a:hover { text-decoration: underline; }
.wegkarte .region { color: var(--leise); font-size: .9rem; margin: 0; }
.wegkarte .zahlen { margin: 0; font-weight: 650; }
.wegkarte .zahlen small { font-weight: 500; color: var(--leise); font-size: .85rem; }
.marken { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .85rem; color: var(--leise); margin-top: auto; padding-top: 4px; }
.marken .zeichen { width: 21px; height: 14px; }
.marken .zeichen-wanderweg { width: 16px; height: 16px; }
.marke-oev { display: inline-flex; align-items: center; gap: 6px; }
.punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--leise); display: inline-block; }
.punkt-ja { background: #2c8a4b; }
.punkt-nein { background: var(--rot); }
.weitere { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; list-style: none; }

.fuss { margin-top: 48px; border-top: 1px solid var(--linie); background: var(--flaeche); padding: 20px 0 28px; font-size: .88rem; color: var(--leise); }
.fuss a { color: var(--leise); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Sprachwahl, Entwurf, YouTube-Link */
.sprachen { display: flex; gap: 2px; flex-wrap: wrap; width: 100%; justify-content: flex-end; font-size: .85rem; }
.sprachen a { color: var(--leise); text-decoration: none; padding: 6px 8px; border-radius: 6px; font-weight: 600; min-width: 36px; text-align: center; }
.sprachen a:hover { text-decoration: underline; }
.sprachen a[aria-current="true"] { background: var(--gelb); color: var(--auf-gelb); }
@media (min-width: 46rem) { .sprachen { width: auto; } }
.entwurf { border: 2px dashed var(--rot); border-radius: 8px; padding: 6px 10px; margin: 14px 0 0; font-size: .9rem; }
.entwurf strong { color: var(--rot); text-transform: uppercase; letter-spacing: .05em; margin-right: 6px; }
.yt-link { margin: 12px 0 0; }
.yt-link a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 10px; background: #c8161d; color: #fff; font-weight: 700; text-decoration: none; }
.yt-link a::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; }
.yt-link a:hover, .yt-link a:focus-visible { background: #a01218; }
.abstand { margin-top: 12px; }

/* Wichtiger Hinweis unter Anreise (z. B. Bahn geschlossen) */
.warnung { background: var(--gelb-hell); border: 2px solid var(--rot); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.warnung p { margin: 0; }

/* Suche und Filter der Startseite (filter.js). Handy: Suchfeld immer sichtbar, Filter einklappbar. */
.suche[hidden], .filter-felder[hidden] { display: none; }
.suche-zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.suche-feld { flex: 1 1 14rem; min-width: 0; }
.suche .suche-feld label, .suche .filter-feld label { display: block; min-height: 0; cursor: default; font-size: .8rem; color: var(--leise); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 4px; }
.suche input[type="search"], .suche select {
  font: inherit; font-size: 1rem; width: 100%; min-height: 44px; color: var(--schrift); background: var(--grund);
  border: 1px solid var(--linie); border-radius: 10px; padding: 8px 12px;
}
.suche select { padding-right: 8px; }
.suche input[type="search"]:focus-visible, .suche select:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; }
.suche .filter-knopf, .suche .zuruecksetzen, .leer-meldung button {
  font: inherit; font-size: .95rem; cursor: pointer; color: var(--schrift); background: var(--grund);
  border: 1px solid var(--linie); border-radius: 10px; padding: 8px 14px; min-height: 44px;
}
.suche .filter-knopf[aria-expanded="true"] { background: var(--gelb); color: var(--auf-gelb); border-color: var(--gelb); font-weight: 700; }
.filter-felder { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linie); }
.filter-felder .filter-zeile { margin-bottom: 12px; }
.filter-raster { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: end; }
@media (min-width: 40rem) { .filter-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .filter-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.filter-knopf { display: none; }
@media (max-width: 39.99rem) {
  .suche .filter-knopf { display: inline-block; }
  .suche:not(.offen) .filter-felder { display: none; }
  .suche:not(.offen):not(.aktiv) .zuruecksetzen { display: none; }
}
.leer-meldung { background: var(--flaeche); border: 1px solid var(--linie); border-left: 6px solid var(--rot); border-radius: 10px; padding: 12px 14px; }
.leer-meldung p { margin: 0 0 10px; font-weight: 600; }
.leer-meldung[hidden] { display: none; }
