/* Skitag-Planer (/plan/) und Abstimmung (/p/): ergänzt site.css, Farben und Maße von dort.
   Immer hell, mobil zuerst, Ziele mindestens 44 px hoch. EAWS-Farben nur für Lawinenstufen. */

.planer { padding-top: 3.5rem; padding-bottom: 4rem; max-width: 46rem; }
.planer h1 { font-size: clamp(1.875rem, 4vw, 2.5rem); margin-bottom: .75rem; }
.planer h2 { font-size: 1.3125rem; margin: 2.25rem 0 .75rem; }
.planer > p + p { margin-top: .75rem; }
.planer [hidden] { display: none !important; }

/* Formular */
.fragen { margin-top: 1.75rem; display: grid; gap: 1.5rem; }
.feld { display: grid; gap: .45rem; border: 0; min-width: 0; }
.feld > label, .feld > legend { font-weight: 650; color: var(--navy); padding: 0; }
.feld .small { margin-top: .1rem; }
select, input[type="text"] {
  font: inherit; color: var(--text); background: var(--surface);
  min-height: 3rem; width: 100%; padding: .55rem .8rem;
  border: 1px solid rgba(27, 58, 92, .35); border-radius: .6rem;
}
select:focus-visible, input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Auswahl als Reihe von Knöpfen (Radio) */
.wahl { display: flex; flex-wrap: wrap; gap: .5rem; }
.wahl label { position: relative; }
.wahl input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.wahl span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.875rem; min-width: 4.5rem;
  padding: .45rem 1rem; border: 1px solid rgba(27, 58, 92, .35); border-radius: 999px; background: var(--surface);
  font-weight: 550;
}
.wahl input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.wahl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Schalter Lawinenlage */
.schalter { display: flex; gap: .8rem; align-items: flex-start; }
.schalter input { width: 1.5rem; height: 1.5rem; margin-top: .15rem; flex: none; accent-color: var(--navy); }
.schalter label { font-weight: 650; color: var(--navy); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem;
  padding: .7rem 1.4rem; border: 0; border-radius: .6rem; background: var(--accent); color: #fff;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.knopf:hover { background: #9E330A; }
.knopf[disabled] { opacity: .6; cursor: default; }
.knopf-zweit { background: var(--surface); color: var(--navy); border: 1px solid rgba(27, 58, 92, .35); }
.knopf-zweit:hover { background: var(--bg2); }
.knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
@media (max-width: 30rem) { .knoepfe .knopf, .fragen > .knopf { width: 100%; } }

/* Hinweise */
.meldung { background: var(--surface); border-radius: 1rem; box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin-top: 1.5rem; }
.meldung > * + * { margin-top: .6rem; }
.status { margin-top: 1rem; }

/* Vorschläge */
.vorschlaege { list-style: none; display: grid; gap: 1rem; margin-top: 1rem; }
.vorschlag { background: var(--surface); border-radius: 1rem; box-shadow: var(--shadow); padding: 1.25rem 1.25rem 1.1rem; }
.vorschlag h3 { font-size: 1.1875rem; }
.werte { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; margin-top: .9rem; font-size: .9375rem; }
.werte dt { color: var(--muted); }
.werte dd { min-width: 0; }
.hinweis { margin-top: .8rem; padding: .6rem .8rem; border-left: 3px solid var(--navy); background: var(--bg2); border-radius: .3rem; font-size: .9375rem; }
.hinweis-stark { border-left-color: var(--emergency); font-weight: 600; }

/* Lawinenstufe: Punkt in EAWS-Farbe, Zahl im Punkt, Text daneben in Schriftfarbe */
.stufe { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.stufe .dot { width: 1.75rem; height: 1.75rem; font-size: .875rem; }
.ohne-bericht { color: var(--muted); }

.geschlossen { list-style: none; display: grid; gap: .5rem; margin-top: .75rem; }
.geschlossen li { background: var(--surface); border-radius: .75rem; padding: .75rem 1rem; box-shadow: var(--shadow); font-size: .9375rem; }
.geschlossen strong { color: var(--navy); }

/* Abstimmung */
.optionen { list-style: none; display: grid; gap: .75rem; margin-top: 1rem; }
.option { background: var(--surface); border-radius: 1rem; box-shadow: var(--shadow); }
.option label, .option-zeile { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; cursor: pointer; min-height: 3rem; }
.option input { width: 1.5rem; height: 1.5rem; margin-top: .2rem; flex: none; accent-color: var(--navy); }
.option .name { font-weight: 650; color: var(--navy); }
.option .kurz, .option .wer { display: block; font-size: .9375rem; color: var(--muted); }
.option .zahl { margin-left: auto; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.option-fest { box-shadow: var(--shadow), inset 0 0 0 2px var(--navy); }
.linkfeld { margin-top: .75rem; font-size: .9375rem; word-break: break-all; }
.ergebnis { background: var(--navy); color: var(--on-navy); border-radius: 1rem; padding: 1.5rem; margin-top: 1.5rem; }
.ergebnis h2 { color: #fff; margin-top: 0; }
.ergebnis :focus-visible { outline-color: #fff; }
.ergebnis .knopf-zweit { border-color: transparent; }
.app-hinweis { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.25rem; }
.app-hinweis img { height: 2.75rem; width: auto; }

.quellen { margin-top: 2.5rem; font-size: .875rem; color: var(--muted); }
.quellen p + p { margin-top: .5rem; }

@media (prefers-reduced-motion: no-preference) {
  .knopf, .wahl span { transition: background-color .15s ease, color .15s ease; }
}
.planer ul, .planer ol { padding-left: 0; }
.planer li { margin-bottom: 0; }
.routen { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .9rem; font-size: .9375rem; }
.routen a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Vorschlagskarte (Etappe 5l wie die Favoriten der App, Einzelheiten in app-optik.css), Werte unter „Details“ */
.vorschlag { padding: 1rem 1.1rem; }
.vorschlag .kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.vorschlag .routen { margin-top: .5rem; }
.vorschlag .hinweis { margin-top: .5rem; }
.details { margin-top: .25rem; }
.details summary { display: inline-flex; align-items: center; min-height: 2.75rem; cursor: pointer; color: var(--navy); font-weight: 600; font-size: .9375rem; }
.details .werte { margin-top: .25rem; }
/* Wertspalte breit genug: Werte brechen nicht mitten um; schmal stehen Bezeichnung und Wert untereinander */
.werte dd { overflow-wrap: anywhere; }
@media (max-width: 34rem) {
  .werte { grid-template-columns: 1fr; gap: 0; }
  .werte dt { margin-top: .5rem; font-size: .8125rem; }
  .werte dt:first-child { margin-top: 0; }
}
.link-knopf { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; cursor: pointer; }
.link-knopf[hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Startpunkt (Etappe 5c): Suchfeld als Combobox, „Suchen“, Treffer, eigener Standort, Städte als Chips */
.suchzeile { display: flex; gap: .5rem; align-items: flex-start; }
.ort-box { position: relative; flex: 1; min-width: 0; }
.suchzeile .knopf { flex: none; }
.ort-liste {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + .25rem); max-height: 18rem; overflow-y: auto;
  list-style: none; margin: 0; padding: .25rem; background: var(--surface); border-radius: .75rem; box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.ort-option { display: flex; flex-direction: column; justify-content: center; min-height: 2.75rem; padding: .45rem .75rem; border-radius: .5rem; cursor: pointer; }
.ort-option[aria-selected="true"] { background: var(--bg2); box-shadow: inset 0 0 0 2px var(--navy); }
.ort-name { font-weight: 600; color: var(--navy); }
.ort-zusatz { font-size: .875rem; color: var(--muted); }
.treffer { list-style: none; display: grid; gap: .35rem; }
.treffer-knopf {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 2.75rem; padding: .5rem .8rem;
  font: inherit; text-align: left; background: var(--surface); border: 1px solid rgba(27, 58, 92, .35); border-radius: .6rem; cursor: pointer;
}
.treffer-knopf:hover { background: var(--bg2); }
.treffer-knopf:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.start-knoepfe { display: grid; gap: .6rem; }
.start-knoepfe > .knopf { justify-self: start; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding: .15rem .1rem .35rem; scrollbar-width: thin; }
.chip {
  flex: none; min-height: 2.25rem; padding: .3rem .8rem; font: inherit; font-size: .9375rem; font-weight: 550; color: var(--navy);
  background: var(--surface); border: 1px solid rgba(27, 58, 92, .35); border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.start-status { font-weight: 600; color: var(--navy); }
.start-status:empty { display: none; }

/* Karte (MapLibre): hell, abgerundet, eigene Höhe; Nummern der Vorschläge als runde Knöpfe */
.karte-teil { display: grid; gap: .5rem; }
.karte { height: min(60vh, 26rem); border-radius: 1rem; overflow: hidden; background: var(--bg2); box-shadow: var(--shadow); }
.karte-legende { color: var(--muted); }
.karten-nr {
  min-width: 2rem; height: 2rem; padding: 0; border-radius: 999px; border: 2px solid #fff; background: var(--navy); color: #fff; white-space: nowrap;
  font: inherit; font-weight: 700; font-size: .9375rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.karten-nr:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.karte .maplibregl-ctrl-attrib { font-size: .75rem; }
.karte .maplibregl-ctrl-attrib a { color: var(--navy); }

/* Umkreis als Schieber */
.radius-zeile { display: flex; align-items: center; gap: 1rem; }
.radius-zeile input[type="range"] { flex: 1; min-width: 0; min-height: 2.75rem; accent-color: var(--navy); }
.radius-zeile output { min-width: 4.5rem; text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

/* Nummer des Vorschlags wie auf der Karte */
.vorschlag .nr {
  display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; flex: none;
  border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: .875rem; align-self: center;
}
.vorschlag h3:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Ebenen der Karte (Etappe 5d): Schalter wie die Städte-Chips, aber 44 px hoch; Legende der Pisten als Linienstücke.
   Pistenfarben wie in der App (ebenen.js STILE), bewusst nicht die EAWS-Farben. */
.ebenen { display: grid; gap: .35rem; }
.ebenen .chip { min-height: 2.75rem; padding: .4rem 1rem; }
.ebenen p:empty { display: none; }
.ebenen-legende { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.ebenen-legende li { display: inline-flex; align-items: center; gap: .4rem; }
.linie { display: inline-block; width: 1.5rem; height: 3px; border-radius: 2px; background: var(--linie, #73737A); }
.linie-novice { --linie: #228B45; }
.linie-easy { --linie: #1A5CD9; }
.linie-intermediate { --linie: #D61F26; }
.linie-difficult { --linie: #121212; }
.linie-route { background: repeating-linear-gradient(90deg, #B85C14 0 6px, transparent 6px 10px); }
.linie-lift { --linie: #333338; height: 2px; }
/* Hangneigungsklassen wie ebenen.js HANG_KLASSEN (server/karte/hang/klassen.json), Violett statt EAWS-Farben */
.flaeche { display: inline-block; width: 1rem; height: 1rem; border-radius: 3px; background: var(--flaeche); box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .5); }
.flaeche-1 { --flaeche: #C08EF0; }
.flaeche-2 { --flaeche: #9150DC; }
.flaeche-3 { --flaeche: #6418B4; }
.flaeche-4 { --flaeche: #4C005C; }
