/*
 * Gestaltung des Leitendenkalenders.
 *
 * Blau ist die Primärfarbe: Sie markiert, was jetzt gilt und was man
 * antippt (Fokusringe, Links, Auswahl, Hauptknöpfe, der Datumsblock von
 * "heute"). Alles andere ist warmes Grau auf Papierton – ein Kalender soll
 * ruhig sein, sonst schaut man nicht hin. Das Rot der Pfadi kommt nur noch
 * für Löschen/Fehler vor und bleibt bewusst selten – wer es sieht, soll
 * innehalten. Weitere Buntfarben (Moos, Senf) sind reine Statusfarben und
 * dürfen bei Bedarf in passendem Ton ergänzt werden.
 *
 * Das wiederkehrende Element ist der Datumsblock links an jeder Terminzeile:
 * ein einzelner Tag ist eine Zahl, ein Lager eine Spanne mit durchgezogenem
 * Balken. Wie lange etwas dauert, sieht man, bevor man liest.
 *
 * Zeichensätze werden keine geladen. Die Systemschrift ist auf genau den
 * Geräten zu Hause, um die es hier geht, sie ist sofort da und kostet nichts.
 * Charakter kommt aus den Grössensprüngen und den Ziffern, nicht aus einem
 * Download.
 */

/* --- Marken ------------------------------------------------------------- */

:root {
  --papier: #faf7f5;
  --karte: #ffffff;
  --karte-still: #f4f0ed;
  --tinte: #201c1b;
  --tinte-leise: #6b615e;
  --tinte-still: #948a86;
  --linie: #e7e0dc;
  --linie-stark: #d6ccc7;

  --blau: #284676;
  --blau-tief: #1c3358;
  --blau-text: #1f3b6c;
  --blau-schleier: #eef1f8;
  --auf-blau: #ffffff;

  --rot: #952525;
  --rot-tief: #7a1e1e;
  --rot-text: #7a1e1e;
  --rot-schleier: #fbeaea;
  --auf-rot: #ffffff;

  --moos: #33633f;
  --moos-schleier: #eff5ef;
  --senf: #8a6512;
  --senf-schleier: #fdf4e4;

  /*
   * Samstag und Sonntag. Keine Statusfarbe, sondern eine Ortsangabe im
   * Kalender: ein warmer Sandton, der neben dem Papierton eben noch als
   * eigene Fläche zu erkennen ist. Bewusst leise – wer neun von zehn Terminen
   * dorthin legt, muss die Spalte finden, nicht angeschrien werden.
   */
  --wochenende-schleier: #f3ece1;
  --wochenende-text: #6d5c44;

  --schatten: 0 1px 2px rgb(32 28 27 / 6%), 0 6px 20px rgb(32 28 27 / 8%);
  --schatten-klein: 0 1px 2px rgb(32 28 27 / 8%);

  --rund: 14px;
  --rund-klein: 10px;
  --rund-voll: 999px;

  --kopf-hoehe: 3.5rem;
  --navi-hoehe: 3.75rem;
  --seiten-breite: 46rem;

  --schrift-anzeige: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #161312;
    --karte: #201c1b;
    --karte-still: #272221;
    --tinte: #f2edeb;
    --tinte-leise: #a99f9b;
    --tinte-still: #7d736f;
    --linie: #332c2a;
    --linie-stark: #443b39;

    --blau: #4a6fae;
    --blau-tief: #6688c4;
    --blau-text: #8fb1e8;
    --blau-schleier: #1a2436;

    --rot: #b23c3c;
    --rot-tief: #cc5c5c;
    --rot-text: #ff9a9a;
    --rot-schleier: #2e1a1a;

    --moos: #8fc79c;
    --moos-schleier: #1a241c;
    --senf: #dcb166;
    --senf-schleier: #251e12;

    --wochenende-schleier: #241f19;
    --wochenende-text: #bda98c;

    --schatten: 0 1px 2px rgb(0 0 0 / 40%), 0 6px 20px rgb(0 0 0 / 45%);
    --schatten-klein: 0 1px 2px rgb(0 0 0 / 45%);
  }
}

/* --- Grundlagen --------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

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

body {
  min-height: 100dvh;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--schrift-anzeige);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

a {
  color: var(--blau-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--blau-schleier);
  color: var(--tinte);
}

:focus-visible {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
  border-radius: 4px;
}

.sprungmarke {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 0.875rem;
  border-radius: var(--rund-klein);
  background: var(--blau);
  color: var(--auf-blau);
  transform: translateY(-200%);
}

.sprungmarke:focus {
  transform: none;
}

.noscript {
  padding: 1.5rem;
  text-align: center;
}

/* Text, der nur vorgelesen wird – etwa der volle Wochentag über einer Spalte,
   die aus Platzgründen «Sa» heisst. */
.nur-vorlesen {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

/* --- Gerüst ------------------------------------------------------------- */

.fortschritt {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blau), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: fortschritt 1.1s linear infinite;
}

@keyframes fortschritt {
  from {
    background-position: -40% 0;
  }
  to {
    background-position: 140% 0;
  }
}

.kopf {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--kopf-hoehe);
  border-bottom: 1px solid var(--linie);
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  padding-top: env(safe-area-inset-top);
}

.kopf__innen {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--kopf-hoehe);
  padding: 0 0.875rem;
}

.kopf__titel {
  font-family: var(--schrift-anzeige);
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.kopf__titel--neben {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kopf__innen > :last-child:not(.kopf__titel--neben) {
  margin-left: auto;
}

.wortmarke {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: inherit;
  text-decoration: none;
}

.wortmarke__balken {
  width: 4px;
  height: 2.125rem;
  border-radius: 2px;
  background: var(--blau);
}

.wortmarke__text {
  display: flex;
  flex-direction: column;
}

.wortmarke__zeile1 {
  font-family: var(--schrift-anzeige);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.wortmarke__zeile2 {
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tinte-still);
}

.wortmarke--gross .wortmarke__balken {
  width: 6px;
  height: 3.25rem;
}

.wortmarke--gross .wortmarke__zeile1 {
  font-size: 1.5rem;
}

.zurueckknopf {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: -0.375rem;
  padding: 0.5rem 0.5rem 0.5rem 0.375rem;
  border-radius: var(--rund-klein);
  color: var(--blau-text);
  font-size: 0.9375rem;
  text-decoration: none;
}

.rollenknopf {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0 0.625rem;
  border: 1px solid var(--linie-stark);
  border-radius: var(--rund-voll);
  background: transparent;
  color: var(--tinte-leise);
  font-size: 0.8125rem;
  cursor: pointer;
}

.rollenknopf:hover {
  border-color: var(--blau);
  color: var(--blau-text);
}

.inhalt {
  padding-bottom: calc(var(--navi-hoehe) + env(safe-area-inset-bottom) + 1.5rem);
}

.inhalt:focus {
  outline: none;
}

.navi {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  display: flex;
  border-top: 1px solid var(--linie);
  background: color-mix(in srgb, var(--papier) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  padding-bottom: env(safe-area-inset-bottom);
}

.navi__eintrag {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  min-height: var(--navi-hoehe);
  color: var(--tinte-still);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.navi__eintrag--aktiv {
  color: var(--blau-text);
  font-weight: 600;
}

/* --- Seitenraster ------------------------------------------------------- */

.seite {
  width: 100%;
  max-width: var(--seiten-breite);
  margin: 0 auto;
  padding: 1rem 0.875rem 0;
}

.seite--schmal {
  max-width: 40rem;
}

.seite--mitte {
  display: flex;
  min-height: calc(100dvh - var(--kopf-hoehe) - var(--navi-hoehe));
  align-items: center;
  justify-content: center;
  padding-bottom: 2rem;
}

/* --- Knöpfe ------------------------------------------------------------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  min-height: 2.875rem;
  padding: 0 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--rund-klein);
  background: transparent;
  font-family: var(--schrift-anzeige);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.knopf:disabled {
  opacity: 0.55;
  cursor: default;
}

.knopf--wichtig {
  background: var(--blau);
  color: var(--auf-blau);
}

.knopf--wichtig:hover:not(:disabled) {
  background: var(--blau-tief);
}

.knopf--still {
  border-color: var(--linie-stark);
  background: var(--karte);
  color: var(--tinte);
}

.knopf--still:hover:not(:disabled) {
  border-color: var(--tinte-still);
}

.knopf--flach {
  min-height: 2.25rem;
  padding: 0 0.625rem;
  color: var(--blau-text);
  font-size: 0.875rem;
}

.knopf--flach:hover:not(:disabled) {
  background: var(--blau-schleier);
}

.knopf--gefahr {
  background: var(--rot);
  color: var(--auf-rot);
}

.knopf--gefahr:hover:not(:disabled) {
  background: var(--rot-tief);
}

.knopf--gefahr-still {
  border-color: var(--linie-stark);
  color: var(--rot-text);
}

.knopf--gefahr-still:hover:not(:disabled) {
  border-color: var(--rot);
  background: var(--rot-schleier);
}

.symbol-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: var(--rund-voll);
  background: transparent;
  color: var(--tinte-leise);
  cursor: pointer;
}

.symbol-knopf:hover {
  background: var(--karte-still);
  color: var(--tinte);
}

.schwebeknopf {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--navi-hoehe) + env(safe-area-inset-bottom) + 1rem);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 3.25rem;
  padding: 0 1.125rem 0 0.875rem;
  border-radius: var(--rund-voll);
  background: var(--blau);
  color: var(--auf-blau);
  font-family: var(--schrift-anzeige);
  font-weight: 650;
  text-decoration: none;
  box-shadow: var(--schatten);
}

.schwebeknopf:hover {
  background: var(--blau-tief);
}

/* --- Umschalter --------------------------------------------------------- */

.umschalter {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border-radius: var(--rund-voll);
  background: var(--karte-still);
}

.umschalter__wahl {
  flex: 1;
  min-height: 2.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rund-voll);
  color: var(--tinte-leise);
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}

.umschalter__wahl--aktiv {
  background: var(--karte);
  color: var(--tinte);
  box-shadow: var(--schatten-klein);
}

/* --- Listen ------------------------------------------------------------- */

.liste {
  display: flex;
  flex-direction: column;
}

.liste--karte {
  overflow: hidden;
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  background: var(--karte);
}

.liste__fuss {
  display: flex;
  justify-content: center;
  padding: 1.25rem 0;
}

.monatsband {
  position: sticky;
  top: calc(var(--kopf-hoehe) + env(safe-area-inset-top));
  z-index: 10;
  margin: 1.25rem 0 0.5rem;
  padding: 0.375rem 0;
  background: var(--papier);
  color: var(--tinte-still);
  font-family: var(--schrift);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.liste--karte .monatsband {
  position: static;
  margin: 0;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--linie);
  background: var(--karte-still);
}

.liste > .monatsband:first-child {
  margin-top: 0;
}

/* --- Terminzeile und Datumsblock ---------------------------------------- */

.terminzeile {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.5rem;
  padding: 0.75rem 0.875rem 0.75rem 0.75rem;
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  background: var(--karte);
  color: inherit;
  text-decoration: none;
}

.terminzeile:hover {
  border-color: var(--linie-stark);
}

.terminzeile__text {
  flex: 1;
  min-width: 0;
}

.terminzeile__titel {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-family: var(--schrift-anzeige);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.terminzeile__zeit {
  margin-top: 0.0625rem;
  color: var(--tinte-leise);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.terminzeile__leute {
  margin-top: 0.125rem;
  color: var(--tinte-still);
  font-size: 0.8125rem;
}

.terminzeile__pfeil {
  flex: none;
  color: var(--tinte-still);
}

/*
 * Der Datumsblock. Ein einzelner Tag steht als Zahl zwischen Wochentag und
 * Monat; ein mehrtägiger Termin zeigt Anfangs- und Endtag mit einem roten
 * Balken dazwischen. Der Balken ist die eigentliche Aussage – er zeigt, dass
 * die Zeit dazwischen dazugehört.
 */
.datumsblock {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  min-height: 3.5rem;
  padding: 0.375rem 0;
  border-radius: var(--rund-klein);
  background: var(--karte-still);
  font-variant-numeric: tabular-nums;
}

.datumsblock__wochentag {
  color: var(--tinte-still);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.datumsblock__tag {
  font-family: var(--schrift-anzeige);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.datumsblock__monat {
  color: var(--tinte-still);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.datumsblock--spanne .datumsblock__tag {
  font-size: 1.1875rem;
}

.datumsblock__balken {
  width: 3px;
  height: 0.75rem;
  margin: 0.125rem 0;
  border-radius: 2px;
  background: var(--blau);
}

.datumsblock--heute {
  background: var(--blau);
  color: var(--auf-blau);
}

.datumsblock--heute .datumsblock__wochentag,
.datumsblock--heute .datumsblock__monat {
  color: color-mix(in srgb, var(--auf-blau) 78%, transparent);
}

.datumsblock--heute .datumsblock__balken {
  background: var(--auf-blau);
}

.marke {
  padding: 0.0625rem 0.4375rem;
  border-radius: var(--rund-voll);
  background: var(--blau-schleier);
  color: var(--blau-text);
  font-family: var(--schrift);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.marke--still {
  background: var(--karte-still);
  color: var(--tinte-still);
}

/* --- Einfache Zeile (Verwaltung) ---------------------------------------- */

.zeile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  border: none;
  border-top: 1px solid var(--linie);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.liste--karte > .zeile:first-child {
  border-top: none;
}

.zeile:hover {
  background: var(--karte-still);
}

.zeile--still .zeile__titel {
  color: var(--tinte-leise);
}

.zeile__text {
  flex: 1;
  min-width: 0;
}

.zeile__titel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 550;
}

.zeile__zusatz {
  display: block;
  margin-top: 0.0625rem;
  color: var(--tinte-still);
  font-size: 0.8125rem;
}

.zeile__pfeil {
  flex: none;
  color: var(--tinte-still);
}

.bereichskopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.bereichskopf__zahl {
  color: var(--tinte-leise);
  font-size: 0.875rem;
}

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

.detail {
  padding: 1.25rem;
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  background: var(--karte);
}

.detail__titel {
  font-size: 1.5rem;
  overflow-wrap: anywhere;
}

.detail__zeit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.375rem;
  color: var(--tinte-leise);
  font-variant-numeric: tabular-nums;
}

.detail__zusatz {
  padding: 0.0625rem 0.5rem;
  border-radius: var(--rund-voll);
  background: var(--karte-still);
  font-size: 0.8125rem;
}

.detail__block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--linie);
}

.detail__ueberschrift {
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-family: var(--schrift);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--tinte-still);
}

.beschreibung {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail__knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.detail__knoepfe > .knopf {
  flex: 1 1 10rem;
}

.detail__fussnote {
  margin-top: 1.25rem;
  color: var(--tinte-still);
  font-size: 0.75rem;
}

.namensliste {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.namensliste__eintrag {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.3125rem 0;
  border-bottom: 1px solid var(--linie);
}

.namensliste__eintrag:last-child {
  border-bottom: none;
}

.herkunft {
  flex: none;
  color: var(--tinte-still);
  font-size: 0.75rem;
}

.herkunft--warnung {
  color: var(--senf);
  font-weight: 600;
}

.leise {
  color: var(--tinte-still);
  font-size: 0.875rem;
}

/* --- Formular ----------------------------------------------------------- */

.formular {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1rem;
}

.feld {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.feld__beschriftung {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--tinte-leise);
}

.eingabe {
  width: 100%;
  min-height: 2.875rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--linie-stark);
  border-radius: var(--rund-klein);
  background: var(--karte);
  font-size: 1rem;
}

.eingabe:focus-visible {
  outline: 2px solid var(--blau);
  outline-offset: -1px;
  border-color: var(--blau);
}

.eingabe--mehrzeilig {
  min-height: 6rem;
  resize: vertical;
  line-height: 1.5;
}

.eingabe--zeit {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.feld__hinweis {
  color: var(--tinte-still);
  font-size: 0.8125rem;
}

.feld__fehler {
  min-height: 1.125rem;
  color: var(--rot-text);
  font-size: 0.8125rem;
  font-weight: 550;
}

.feld--fehlerhaft .eingabe {
  border-color: var(--rot);
}

.block {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  background: var(--karte);
}

.block__titel {
  padding: 0 0.375rem;
  font-family: var(--schrift);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--blau-text);
}

.block__untertitel {
  margin: 1.25rem 0 0.5rem;
  font-family: var(--schrift);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--tinte-still);
}

.block__hinweis {
  margin-bottom: 0.75rem;
  color: var(--tinte-still);
  font-size: 0.8125rem;
}

.zeitzeile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.zeitzeile__marke {
  flex: none;
  width: 2.25rem;
  color: var(--tinte-leise);
  font-size: 0.8125rem;
  font-weight: 650;
}

.zusammenfassung {
  margin-top: 0.875rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--rund-klein);
  background: var(--blau-schleier);
  color: var(--blau-text);
  font-size: 0.875rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.zusammenfassung--fehler {
  background: var(--karte-still);
  color: var(--tinte-leise);
}

/* --- Datums- und Zeitwähler --------------------------------------------- */

/*
 * Beide Wähler sehen gleich aus – ein Feld mit Symbol und Wert –, aber nur
 * einer von beiden ist wirklich ein Knopf. Beim Datum liegt auf dem Telefon
 * ein durchsichtiges `<input type="date">` darüber, damit der Wähler des
 * Betriebssystems aufgeht; sichtbar bleibt trotzdem unsere Beschriftung mit
 * Wochentag und Wochenendfarbe.
 */
.wahlfeld__huelle {
  position: relative;
  flex: 1 1 10rem;
  min-width: 0;
}

.wahlfeld__huelle--zeit {
  flex: 0 1 7.5rem;
}

.wahlfeld__huelle[hidden] {
  display: none;
}

.wahlfeld {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--linie-stark);
  border-radius: var(--rund-klein);
  background: var(--karte);
  color: var(--tinte);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.wahlfeld:hover {
  border-color: var(--tinte-still);
}

.wahlfeld[aria-expanded='true'] {
  border-color: var(--blau);
  box-shadow: inset 0 0 0 1px var(--blau);
}

.wahlfeld__symbol {
  flex: none;
  color: var(--tinte-still);
}

.wahlfeld__wert {
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Samstag und Sonntag – dieselbe leise Fläche wie im Monatsraster. */
.wahlfeld--wochenende {
  border-color: color-mix(in srgb, var(--wochenende-text) 35%, var(--linie-stark));
  background: var(--wochenende-schleier);
}

.wahlfeld--wochenende .wahlfeld__symbol {
  color: var(--wochenende-text);
}

.wahlfeld__system {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  appearance: none;
}

.wahlfeld__huelle:has(.wahlfeld__system:focus-visible) .wahlfeld {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
}

.blase {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  z-index: 40;
  min-width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--linie-stark);
  border-radius: var(--rund);
  background: var(--karte);
  box-shadow: var(--schatten);
}

.blase[hidden] {
  display: none;
}

.blase--kalender {
  width: min(19.5rem, calc(100vw - 2rem));
}

/* Breit genug, dass die vier Dauern in einer Zeile stehen – sie sollen als
   eine Reihe von Abkürzungen lesbar sein, nicht als Absatz. */
.blase--zeit {
  width: min(20rem, calc(100vw - 2rem));
  right: 0;
  left: auto;
}

.blase__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.blase__titel {
  flex: 1;
  font-family: var(--schrift-anzeige);
  font-size: 0.9375rem;
  font-weight: 650;
  text-align: center;
}

.blase__marke {
  display: block;
  margin: 0.75rem 0 0.375rem;
  color: var(--tinte-still);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.blase__eingabe .blase__marke {
  margin-top: 0;
}

.blase__fuss {
  display: flex;
  justify-content: center;
  margin-top: 0.375rem;
  padding-top: 0.375rem;
  border-top: 1px solid var(--linie);
}

/*
 * Das Monatsraster. Die Woche beginnt am Montag, damit Samstag und Sonntag als
 * Paar am rechten Rand stehen und sich zusammen einfärben lassen – dort liegen
 * neun von zehn Terminen, und wer die Spalte findet, hat das Datum gefunden.
 */
.kalender {
  width: 100%;
  border-collapse: separate;
  border-spacing: 1px;
  table-layout: fixed;
}

.kalender__spalte {
  padding: 0.375rem 0;
  color: var(--tinte-still);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kalender__spalte--wochenende {
  color: var(--wochenende-text);
}

.kalender__tag {
  height: 2.25rem;
  padding: 0;
  border-radius: var(--rund-klein);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
}

.kalender__tag--fremd {
  color: var(--tinte-still);
  opacity: 0.6;
}

.kalender__tag--wochenende {
  background: var(--wochenende-schleier);
  color: var(--wochenende-text);
}

.kalender__tag--heute {
  box-shadow: inset 0 0 0 1.5px var(--blau);
  font-weight: 700;
}

.kalender__tag:hover {
  background: var(--karte-still);
}

.kalender__tag--gewaehlt,
.kalender__tag--gewaehlt:hover {
  background: var(--blau);
  color: var(--auf-blau);
  font-weight: 650;
}

.kalender__tag:focus-visible {
  outline: 2px solid var(--blau);
  outline-offset: -2px;
}

/* `position: relative` ist hier nicht Zierde: der Zeitwähler rollt von Hand
   und rechnet dafür mit `offsetTop` innerhalb dieser Liste. */
.zeitliste {
  position: relative;
  max-height: 11rem;
  margin-top: 0.625rem;
  overflow-y: auto;
  border: 1px solid var(--linie);
  border-radius: var(--rund-klein);
  background: var(--karte-still);
}

.zeitliste:focus-visible {
  outline: 2px solid var(--blau);
  outline-offset: 1px;
}

.zeitliste__wahl {
  padding: 0.4375rem 0.75rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.zeitliste__wahl:hover {
  background: var(--karte);
}

.zeitliste__wahl--gewaehlt {
  color: var(--blau-text);
  font-weight: 700;
}

.zeitliste__wahl--aktiv {
  background: var(--blau-schleier);
  color: var(--blau-text);
}

/* Am Rechner deckt nichts zu – der Klick nach aussen genügt. */
.blase__deckel {
  display: none;
}

/*
 * Auf schmalen Bildschirmen wird aus der Blase ein Blatt am unteren Rand: dort
 * ist der Daumen, und eine Blase am Feld stünde je nach Zeile halb ausserhalb.
 * Darunter liegt dann ein Deckel, damit ein Tippen daneben das Blatt schliesst
 * und nicht zugleich den Knopf trifft, der zufällig darunter liegt.
 */
@media (max-width: 30rem) {
  .blase,
  .blase--kalender,
  .blase--zeit {
    position: fixed;
    inset: auto 0 0;
    width: auto;
    max-width: none;
    max-height: 80dvh;
    overflow-y: auto;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: var(--rund) var(--rund) 0 0;
  }

  .blase__deckel {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgb(32 28 27 / 30%);
  }

  .blase__deckel[hidden] {
    display: none;
  }
}

/*
 * Die Fussleiste klebt am unteren Rand. Seit das Erfassen eine eigene Seite mit
 * Navigation ist, muss sie über der Navigationsleiste stehen – sonst deckte
 * diese genau den Knopf zu, auf den man als Nächstes tippt. Ohne Navigation
 * (Bearbeiten-Ansicht) bleibt sie ganz unten.
 */
.formular__fuss {
  position: sticky;
  bottom: calc(var(--navi-hoehe) + env(safe-area-inset-bottom));
  z-index: 15;
  display: flex;
  gap: 0.625rem;
  margin: 0 -0.875rem;
  padding: 0.75rem 0.875rem;
  border-top: 1px solid var(--linie);
  background: color-mix(in srgb, var(--papier) 92%, transparent);
  backdrop-filter: blur(10px);
}

body:has(#navi[hidden]) .formular__fuss {
  bottom: 0;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

.formular__fuss > .knopf {
  flex: 1;
}

.formular__fuss > .knopf--wichtig {
  flex: 2;
}

/* --- Schalter und Kästchen ---------------------------------------------- */

.schalter {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.375rem 0;
  cursor: pointer;
}

.schalter__eingabe {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.schalter__spur {
  flex: none;
  position: relative;
  width: 2.875rem;
  height: 1.75rem;
  margin-top: 0.0625rem;
  border-radius: var(--rund-voll);
  background: var(--linie-stark);
  transition: background-color 0.15s ease;
}

.schalter__knauf {
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--schatten-klein);
  transition: transform 0.15s ease;
}

.schalter__eingabe:checked + .schalter__spur {
  background: var(--blau);
}

.schalter__eingabe:checked + .schalter__spur .schalter__knauf {
  transform: translateX(1.125rem);
}

.schalter__eingabe:focus-visible + .schalter__spur {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
}

.schalter__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.schalter__beschriftung {
  font-weight: 550;
}

.schalter__hinweis {
  color: var(--tinte-still);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.kaestchenliste,
.personenwahl {
  display: flex;
  flex-direction: column;
}

.personenwahl {
  margin-top: 0.875rem;
}

/* `display: flex` schlüge sonst das `hidden` des Aufklappers. */
.personenwahl[hidden] {
  display: none;
}

.kaestchen {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.25rem 0;
  cursor: pointer;
}

.kaestchen__eingabe {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.kaestchen__marke {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid var(--linie-stark);
  border-radius: 7px;
  color: transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.kaestchen__eingabe:checked + .kaestchen__marke {
  border-color: var(--blau);
  background: var(--blau);
  color: var(--auf-blau);
}

.kaestchen__eingabe:focus-visible + .kaestchen__marke {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
}

.kaestchen__text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.kaestchen__zusatz {
  color: var(--tinte-still);
  font-size: 0.75rem;
}

/* --- Chips -------------------------------------------------------------- */

.chipreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chipreihe--filter {
  margin-bottom: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  min-height: 2.5rem;
  padding: 0 0.875rem;
  border: 1px solid var(--linie-stark);
  border-radius: var(--rund-voll);
  background: var(--karte);
  color: var(--tinte);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
}

.chip:hover:not(:disabled) {
  border-color: var(--tinte-still);
}

.chip:disabled {
  opacity: 0.5;
  cursor: default;
}

.chip > svg {
  flex: none;
  color: var(--tinte-still);
}

.chip--klein {
  min-height: 2.25rem;
  padding: 0 0.625rem;
  font-size: 0.875rem;
}

.chipreihe--dauer {
  gap: 0.375rem;
}

/*
 * «Einzelpersonen» wählt nichts aus, sondern klappt die Liste auf. Die
 * gestrichelte Kante sagt das, bevor man es ausprobiert: was hier passiert,
 * verändert die Einteilung nicht.
 */
.chip--aufklapp {
  border-style: dashed;
  color: var(--tinte-leise);
}

.chip--aufklapp.chip--offen {
  border-style: solid;
  border-color: var(--blau);
  background: var(--blau-schleier);
  color: var(--blau-text);
}

.chip--aufklapp.chip--offen > svg {
  color: var(--blau-text);
}

.chip--gewaehlt {
  border-color: var(--blau);
  background: var(--blau);
  color: var(--auf-blau);
}

.chip--gewaehlt:hover {
  border-color: var(--blau-tief);
  background: var(--blau-tief);
}

.chip__zahl {
  padding: 0 0.375rem;
  border-radius: var(--rund-voll);
  background: var(--karte-still);
  color: var(--tinte-leise);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.chip--gewaehlt .chip__zahl {
  background: color-mix(in srgb, #000 22%, transparent);
  color: var(--auf-blau);
}

/* --- Vorschau der Einteilung -------------------------------------------- */

.vorschau {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--blau-schleier);
  border-radius: var(--rund-klein);
  background: var(--blau-schleier);
}

.vorschau__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
}

.vorschau__titel {
  font-family: var(--schrift);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--blau-text);
}

.vorschau__liste {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vorschau__eintrag {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--blau) 12%, transparent);
}

.vorschau__eintrag:last-child {
  border-bottom: none;
}

.vorschau__name {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 0.4375rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.vorschau__weg {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: var(--rund-voll);
  background: transparent;
  color: var(--tinte-leise);
  cursor: pointer;
}

.vorschau__weg:hover {
  background: var(--karte);
  color: var(--blau-text);
}

.aufklapp {
  margin-top: 0.75rem;
  border-top: 1px solid var(--linie);
}

.aufklapp__kopf {
  padding: 0.625rem 0;
  color: var(--blau-text);
  font-size: 0.875rem;
  font-weight: 550;
  cursor: pointer;
}

.aufklapp__inhalt {
  padding-bottom: 0.5rem;
}

/* --- Meldungen ---------------------------------------------------------- */

.meldungsfeld {
  display: flex;
  gap: 0.625rem;
  margin: 1rem 0;
  padding: 0.875rem 1rem;
  border-radius: var(--rund-klein);
  background: var(--karte-still);
  font-size: 0.875rem;
  line-height: 1.45;
}

.meldungsfeld > svg {
  flex: none;
  margin-top: 0.125rem;
}

.meldungsfeld__text {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  align-items: flex-start;
}

.meldungsfeld__titel {
  font-weight: 650;
}

.meldungsfeld--hinweis {
  background: var(--moos-schleier);
  color: var(--moos);
}

.meldungsfeld--warnung {
  background: var(--senf-schleier);
  color: var(--senf);
}

.meldungsfeld--fehler {
  background: var(--rot-schleier);
  color: var(--rot-text);
}

/*
 * Kurzmeldungen erscheinen oben, nicht unten. Unten liegen der Knopf zum
 * Erfassen, die Navigation und in einem Blatt die Fussleiste – eine Meldung,
 * die drei Zeilen lang wird, deckte genau die Knöpfe zu, auf die man als
 * Nächstes tippen will.
 */
.meldungen {
  position: fixed;
  inset: calc(var(--kopf-hoehe) + env(safe-area-inset-top) + 0.5rem) 0 auto;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  padding: 0 0.875rem;
}

/* Im Blatt gibt es keine Kopfzeile, über die sie rutschen müsste. */
dialog .meldungen {
  top: calc(env(safe-area-inset-top) + 0.75rem);
}

.kurzmeldung {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 30rem;
  padding: 0.6875rem 1rem;
  border-radius: var(--rund-klein);
  background: var(--tinte);
  color: var(--papier);
  font-size: 0.875rem;
  box-shadow: var(--schatten);
  pointer-events: auto;
  cursor: pointer;
  animation: meldung-kommt 0.18s ease-out;
}

.kurzmeldung--fehler {
  background: var(--rot);
  color: var(--auf-rot);
}

.kurzmeldung--geht {
  opacity: 0;
  transition: opacity 0.2s ease;
}

@keyframes meldung-kommt {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

.ladeanzeige {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 2rem 0;
  color: var(--tinte-still);
  font-size: 0.875rem;
}

.ladeanzeige__kreis {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--linie-stark);
  border-top-color: var(--blau);
  border-radius: 50%;
  animation: dreht 0.7s linear infinite;
}

@keyframes dreht {
  to {
    transform: rotate(360deg);
  }
}

.leerzustand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.leerzustand__titel {
  font-family: var(--schrift-anzeige);
  font-size: 1.125rem;
  font-weight: 650;
}

.leerzustand__text {
  max-width: 26rem;
  color: var(--tinte-still);
  font-size: 0.9375rem;
}

.leerzustand .knopf {
  margin-top: 0.5rem;
}

.hinweisseite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 26rem;
  text-align: center;
}

.hinweisseite p {
  color: var(--tinte-leise);
}

/* --- Dialoge ------------------------------------------------------------ */

.dialog,
.blatt {
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
}

.dialog::backdrop,
.blatt::backdrop {
  background: rgb(32 28 27 / 45%);
  backdrop-filter: blur(2px);
}

.dialog {
  width: min(26rem, calc(100vw - 2rem));
  margin: auto;
}

.dialog__inhalt {
  padding: 1.375rem;
  border-radius: var(--rund);
  background: var(--karte);
  box-shadow: var(--schatten);
  animation: dialog-kommt 0.16s ease-out;
}

@keyframes dialog-kommt {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

.dialog__titel {
  font-size: 1.125rem;
}

.dialog__text {
  margin-top: 0.625rem;
  color: var(--tinte-leise);
  font-size: 0.9375rem;
}

.dialog__knoepfe {
  display: flex;
  gap: 0.625rem;
  margin-top: 1.375rem;
}

.dialog__knoepfe > .knopf {
  flex: 1;
}

.blatt {
  width: 100%;
  max-width: 100%;
  max-height: 100dvh;
  margin: auto auto 0;
}

.blatt__rahmen {
  display: flex;
  flex-direction: column;
  max-height: 92dvh;
  border-radius: var(--rund) var(--rund) 0 0;
  background: var(--papier);
  box-shadow: var(--schatten);
  animation: blatt-kommt 0.2s ease-out;
}

@keyframes blatt-kommt {
  from {
    transform: translateY(1.5rem);
  }
}

.blatt__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 0.875rem 0.875rem 1.25rem;
  border-bottom: 1px solid var(--linie);
}

.blatt__titel {
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.blatt__koerper {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.blatt__fuss {
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linie);
  background: var(--karte);
}

.blatt__knoepfe {
  display: flex;
  gap: 0.625rem;
}

.blatt__knoepfe > .knopf,
.blatt__absender {
  flex: 1;
  display: flex;
}

.blatt__absender > .knopf {
  flex: 1;
}

.blatt__gefahr {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--linie);
}

.formular--blatt {
  gap: 1rem;
  padding-bottom: 0;
}

/* --- Feed-Adresse ------------------------------------------------------- */

.feed {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--linie);
  border-radius: var(--rund-klein);
  background: var(--karte);
}

.feed > .block__untertitel:first-child {
  margin-top: 0;
}

.feed__adresse {
  display: block;
  margin: 0.625rem 0;
  padding: 0.625rem 0.75rem;
  border-radius: var(--rund-klein);
  background: var(--karte-still);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
}

.feed__knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

/* --- Protokoll ---------------------------------------------------------- */

.protokoll {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.protokoll__eintrag {
  padding: 0.875rem 1rem;
  border: 1px solid var(--linie);
  border-radius: var(--rund-klein);
  background: var(--karte);
}

.protokoll__kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.protokoll__art {
  color: var(--blau-text);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.protokoll__zeit {
  color: var(--tinte-still);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.protokoll__summe {
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}

.protokoll__wer {
  color: var(--tinte-still);
  font-size: 0.8125rem;
}

.protokoll__daten {
  margin: 0 0 0.5rem;
  padding: 0.75rem;
  border-radius: var(--rund-klein);
  background: var(--karte-still);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-x: auto;
}

/* --- Anmeldung ---------------------------------------------------------- */

.anmeldung {
  width: 100%;
  max-width: 22rem;
}

.anmeldung__formular {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.anmeldung__formular .knopf {
  min-height: 3rem;
}

.anmeldung__fuss {
  margin-top: 1.75rem;
  color: var(--tinte-still);
  font-size: 0.875rem;
}

/* --- Anleitung ---------------------------------------------------------- */

.anleitung {
  padding-bottom: 2rem;
}

.anleitung__ueberschrift {
  font-size: 1.75rem;
}

.anleitung__vorspann {
  margin-top: 0.625rem;
  color: var(--tinte-leise);
}

.anleitung__block {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  background: var(--karte);
}

.anleitung__kopf {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.anleitung__nummer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--rund-voll);
  background: var(--blau);
  color: var(--auf-blau);
  font-family: var(--schrift-anzeige);
  font-size: 1.125rem;
  font-weight: 700;
}

.anleitung__titel {
  font-size: 1.125rem;
}

.anleitung__fuer {
  color: var(--tinte-still);
  font-size: 0.8125rem;
}

.schritte {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0;
  padding-left: 1.25rem;
}

.schritte li::marker {
  color: var(--blau-text);
  font-weight: 700;
}

.anleitung__text {
  margin-bottom: 1rem;
}

.anleitung__tipp {
  margin-top: 0.875rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--linie-stark);
  color: var(--tinte-leise);
  font-size: 0.875rem;
}

.anleitung__liste {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.anleitung__liste li::marker {
  color: var(--blau);
}

/* --- Grössere Bildschirme ----------------------------------------------- */

@media (min-width: 60rem) {
  :root {
    --navi-hoehe: 0rem;
  }

  .navi {
    inset: calc(var(--kopf-hoehe) + env(safe-area-inset-top)) auto 0 0;
    width: 13.5rem;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.75rem 0.625rem;
    border-top: none;
    border-right: 1px solid var(--linie);
    background: transparent;
    backdrop-filter: none;
  }

  .navi__eintrag {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.625rem;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    border-radius: var(--rund-klein);
    font-size: 0.9375rem;
  }

  .navi__eintrag:hover {
    background: var(--karte-still);
  }

  .navi__eintrag--aktiv {
    background: var(--blau-schleier);
  }

  .inhalt {
    padding: 0 0 3rem 13.5rem;
  }

  .seite {
    padding-top: 1.5rem;
  }

  .schwebeknopf {
    right: 2rem;
    bottom: 2rem;
  }

  .blatt {
    max-width: 34rem;
    margin: auto;
  }

  .blatt__rahmen {
    max-height: 85dvh;
    border-radius: var(--rund);
  }

  .formular__fuss {
    margin: 0;
    border-radius: 0 0 var(--rund) var(--rund);
  }
}

/* Ohne Navigationsleiste (Formularansichten) bleibt unten nur der Sicherheitsrand. */
body:has(#navi[hidden]) .inhalt {
  padding-bottom: env(safe-area-inset-bottom);
}

/* --- Bewegung sparsam --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
