/* Nachfassen — ruhig, dicht, eine Frage pro Blick.
   Bewusst keine Ein-/Ausblend-Animationen: das Tool wird oft und kurz benutzt,
   jede Animation waere hier reine Wartezeit.

   Farbdisziplin: EINE Signalfarbe (rot = jetzt dran), Bernstein fuer "wichtig",
   Gruen nur fuer "gewonnen". Alles andere ist Grau. Fuenf bunte Chips
   nebeneinander sind kein Informationsgewinn, sondern Laerm. */

:root {
  --bg:        #0b0d11;
  --flaeche:   #14171d;
  --flaeche-2: #1a1e26;
  --flaeche-3: #222733;
  --rand:      #232833;
  --rand-hell: #343b4a;
  --text:      #e8eaee;
  --matt:      #99a1b1;
  --matt-2:    #6b7484;
  --akzent:    #ff3355;
  --akzent-ab: #e02445;
  --bernstein: #e8a838;
  --gruen:     #3ddb9b;
  --blau:      #6cb2f8;
  --r:         10px;
  --r-klein:   8px;
}

* { box-sizing: border-box; }
/* .board/.kalender setzen display selbst — ohne das hier gewinnt die Klasse
   gegen das hidden-Attribut und beide Ansichten stuenden uebereinander. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  font-variant-numeric: tabular-nums;
}

button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rand-hell); outline-offset: 1px; }

/* ---- Kopf ---------------------------------------------------------------- */
.kopf {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  padding-top: max(9px, env(safe-area-inset-top));
  background: rgba(11,13,17,.93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rand);
}
.kopf-links  { display: flex; align-items: baseline; gap: 9px; min-width: 0; flex: 1; }
.kopf-rechts { display: flex; align-items: center; gap: 7px; }
.marke {
  font-weight: 640; letter-spacing: -.22px; font-size: 15.5px;
  white-space: nowrap;
}
.marke::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--akzent); margin-right: 8px; vertical-align: middle;
}
.zaehler { color: var(--matt-2); font-size: 12.5px; white-space: nowrap; }

.suche {
  width: 200px;
  padding: 7px 11px; border-radius: var(--r-klein);
  background: var(--flaeche); border: 1px solid var(--rand);
  outline: none;
}
.suche:focus { border-color: var(--rand-hell); background: var(--flaeche-2); }
.suche::placeholder { color: var(--matt-2); }
/* Der Lupenknopf ersetzt am Handy das dauerhaft sichtbare Suchfeld —
   ein 90-px-Feld neben vier Bedienelementen ist zwar da, aber unbenutzbar. */
.such-knopf { display: none; }

.knopf {
  padding: 7px 13px; border-radius: var(--r-klein); cursor: pointer;
  background: var(--flaeche-2); border: 1px solid var(--rand);
  white-space: nowrap;
}
.knopf:hover { background: var(--flaeche-3); border-color: var(--rand-hell); }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; }
.knopf.haupt:hover { background: var(--akzent-ab); border-color: var(--akzent-ab); }
.knopf.still { background: transparent; border-color: transparent; color: var(--matt); }
.knopf.still:hover { background: var(--flaeche-2); color: var(--text); }
.knopf.gefahr { color: #ff8298; }
.knopf.gefahr:hover { background: #2a1720; border-color: #5b2634; }
.knopf.breit { flex: 1; text-align: center; }
.knopf.klein { padding: 5px 10px; font-size: 13px; }

/* ---- Dran-Leiste --------------------------------------------------------- */
.dran {
  display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto;
  border-bottom: 1px solid var(--rand); scrollbar-width: none;
}
.dran::-webkit-scrollbar { display: none; }
.dran-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 99px; cursor: pointer; white-space: nowrap;
  background: transparent; border: 1px solid var(--rand); color: var(--matt);
  font-size: 13px;
}
.dran-chip:hover { border-color: var(--rand-hell); color: var(--text); }
.dran-chip[aria-pressed="true"] { background: var(--flaeche-2); border-color: var(--rand-hell); color: #fff; }
.dran-chip b { font-weight: 600; color: var(--matt-2); }
.dran-chip.rot b  { color: var(--akzent); }
.dran-chip.gelb b { color: var(--bernstein); }
.dran-chip[aria-pressed="true"] b { color: #fff; }
.chip-weg { color: var(--matt); font-size: 15px; line-height: 1; margin-left: 1px; }
.dran-chip[aria-pressed="true"]:hover .chip-weg { color: #fff; }

/* ---- Spalten-Tabs (nur Handy) -------------------------------------------- */
.spalten-tabs {
  display: none; gap: 4px; padding: 7px 12px; overflow-x: auto;
  border-bottom: 1px solid var(--rand); scrollbar-width: none;
}
.spalten-tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 5px 10px; border-radius: var(--r-klein); cursor: pointer; white-space: nowrap;
  background: transparent; border: 1px solid transparent; color: var(--matt-2); font-size: 13px;
}
.tab[aria-selected="true"] { background: var(--flaeche-2); border-color: var(--rand); color: var(--text); font-weight: 600; }
.tab .n { color: var(--matt-2); margin-left: 5px; }
.tab[aria-selected="true"] .n { color: var(--matt); }

/* ---- Board --------------------------------------------------------------- */
/* Die Spalten wachsen mit ihrem Inhalt und werden NICHT auf Bildschirmhoehe
   gestreckt: ein 900 px hoher leerer Kasten sieht schlimmer aus als eine kurze
   Spalte. Die Mindesthoehe haelt die Ablageflaeche beim Ziehen brauchbar. */
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(252px, 1fr);
  gap: 10px; padding: 14px 16px 24px; align-items: start;
  overflow-x: auto;
}
.spalte {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--r);
  display: flex; flex-direction: column; min-height: 200px;
}
.spalte.ziel { border-color: var(--akzent); background: #161a22; }
.spalte-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 13px 9px; border-bottom: 1px solid var(--rand);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--matt);
}
.spalte-kopf .n { color: var(--matt-2); font-weight: 600; letter-spacing: 0; font-size: 12.5px; }
.punkt { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.spalte-liste { padding: 8px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.leer { color: var(--matt-2); font-size: 13px; padding: 14px 4px; text-align: center; }

/* ---- Karte --------------------------------------------------------------- */
/* Der linke Rand ist auf JEDER Karte 2 px breit und nur bei "wichtig" gefaerbt.
   Wuerde erst die wichtige Karte den Rand bekommen, saesse ihr Text um ein Pixel
   versetzt — bei untereinander stehenden Karten sieht man das. */
.karte {
  background: var(--flaeche-2); border: 1px solid var(--rand); border-left-width: 2px;
  border-radius: 9px; padding: 10px 11px; cursor: pointer; position: relative;
}
.karte:hover { background: var(--flaeche-3); border-color: var(--rand-hell); }
.karte:hover.wichtig { border-left-color: var(--bernstein); }
.karte.zieht { opacity: .4; }
.karte.wichtig { border-left-color: var(--bernstein); }
.karte-name {
  font-weight: 640; font-size: 14.5px; letter-spacing: -.1px;
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.karte-betrieb {
  display: block; color: var(--matt); font-size: 12.5px; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.karte-anliegen {
  color: var(--matt-2); font-size: 12.5px; margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Fusszeile als leiser Text mit Trennpunkten statt als Chip-Reihe:
   fuenf umrandete Kapseln lesen sich wie fuenf gleich wichtige Dinge. */
/* nowrap: eine umbrechende Meta-Zeile macht die Karten unterschiedlich hoch
   und das Board unruhig. Drei kurze Angaben passen immer in eine Zeile. */
.karte-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
  margin-top: 7px; font-size: 12px; color: var(--matt-2);
  overflow: hidden; white-space: nowrap;
}
.karte-meta > span { flex: none; }
.karte-meta .trenner { color: #3a4150; }
.karte-meta .frist { color: var(--matt); }
.karte-meta .frist.rot  { color: var(--akzent); font-weight: 600; }
.karte-meta .frist.jetzt { color: var(--bernstein); font-weight: 600; }
.karte-meta .gewonnen { color: var(--gruen); }
.karte-weiter {
  position: absolute; right: 7px; bottom: 7px;
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--flaeche); border: 1px solid var(--rand); color: var(--matt);
  cursor: pointer; font-size: 16px; line-height: 1;
}
.karte-weiter:hover { color: #fff; border-color: var(--rand-hell); background: var(--flaeche-3); }

/* ---- Blätter (Dialoge) --------------------------------------------------- */
.hintergrund { position: fixed; inset: 0; background: rgba(5,7,10,.66); z-index: 40; }
.blatt {
  position: fixed; z-index: 50; right: 0; top: 0; bottom: 0; width: min(440px, 100vw);
  background: var(--bg); border-left: 1px solid var(--rand);
  overflow-y: auto; padding: 16px 18px calc(22px + env(safe-area-inset-bottom));
}
.blatt.gross { width: min(500px, 100vw); }
.blatt-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.blatt-kopf h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.25px; }
.blatt-fuss { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.feld { display: block; margin-bottom: 12px; }
.feld > span { display: block; font-size: 12.5px; color: var(--matt); margin-bottom: 5px; }
.feld > span em { color: var(--akzent); font-style: normal; }
.feld input, .feld select, .feld textarea {
  width: 100%; padding: 9px 11px; border-radius: var(--r-klein);
  background: var(--flaeche); border: 1px solid var(--rand); outline: none;
}
.feld input:focus, .feld select:focus, .feld textarea:focus { border-color: var(--rand-hell); background: var(--flaeche-2); }
.feld textarea { resize: vertical; min-height: 62px; }
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mehr { margin: -2px 0 12px; }
.mehr summary { cursor: pointer; color: var(--matt); font-size: 13px; padding: 4px 0; }
.mehr summary::marker { color: var(--matt-2); }
.schalter { display: flex; align-items: center; gap: 8px; color: var(--matt); font-size: 13.5px; cursor: pointer; }
.schalter input { accent-color: var(--bernstein); width: 17px; height: 17px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.chip {
  padding: 5px 11px; border-radius: 99px; cursor: pointer; font-size: 13px;
  background: transparent; border: 1px solid var(--rand); color: var(--matt);
}
.chip:hover { border-color: var(--rand-hell); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--flaeche-2); border-color: var(--rand-hell); color: #fff; }

/* ---- Detail -------------------------------------------------------------- */
.d-name { font-size: 20px; font-weight: 650; letter-spacing: -.4px; margin: 0; line-height: 1.2; }
.d-unter { color: var(--matt); font-size: 13.5px; margin-top: 3px; }
.d-block { border-top: 1px solid var(--rand); padding-top: 14px; margin-top: 16px; }
.d-block h3 {
  margin: 0 0 10px; font-size: 11.5px; font-weight: 650; color: var(--matt-2);
  text-transform: uppercase; letter-spacing: .07em;
}
.d-zeile { display: flex; gap: 12px; padding: 4px 0; font-size: 14px; }
.d-zeile dt { color: var(--matt-2); min-width: 84px; flex: none; font-size: 13px; }
.d-zeile dd { margin: 0; word-break: break-word; }
.d-zeile a { color: var(--blau); text-decoration: none; }
.d-zeile a:hover { text-decoration: underline; }

/* Direkt-Aktionen: beim Nachfassen ist Anrufen der erste Handgriff,
   der gehoert nach oben und nicht unter vier Bloecke Formular. */
.d-aktionen { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.d-aktion {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: var(--r-klein); cursor: pointer;
  background: var(--flaeche-2); border: 1px solid var(--rand);
  color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 550;
}
.d-aktion:hover { background: var(--flaeche-3); border-color: var(--rand-hell); }
.d-aktion.ruf { background: #16241c; border-color: #21422f; color: #79e7b5; }
.d-aktion.ruf:hover { background: #1a2c22; border-color: #2c5a40; }

.status-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.notiz {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--r-klein);
  padding: 9px 11px; margin-bottom: 7px; position: relative;
}
.notiz-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; padding-right: 20px; }
.notiz-zeit { color: var(--matt-2); font-size: 11.5px; margin-top: 5px; }
.notiz-weg {
  position: absolute; top: 6px; right: 6px; background: none; border: none;
  color: var(--matt-2); cursor: pointer; font-size: 15px; line-height: 1; padding: 3px 6px; border-radius: 6px;
}
.notiz-weg:hover { color: #ff8298; background: #221419; }
.notiz-neu { display: flex; gap: 7px; align-items: flex-start; }
.notiz-neu textarea {
  flex: 1; min-height: 44px; padding: 9px 11px; border-radius: var(--r-klein);
  background: var(--flaeche); border: 1px solid var(--rand); outline: none; resize: vertical;
}
.notiz-neu textarea:focus { border-color: var(--rand-hell); background: var(--flaeche-2); }

/* ---- Hinweis ------------------------------------------------------------- */
.hinweis {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--flaeche-3); border: 1px solid var(--rand-hell); border-radius: 9px;
  padding: 9px 16px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.55);
  max-width: 90vw;
  pointer-events: none;
}
.hinweis.fehler { border-color: #5b2634; color: #ff9fb0; }

/* ---- Ansichtswahl -------------------------------------------------------- */
.ansicht-wahl {
  display: flex; gap: 2px; padding: 2px;
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 9px;
}
.ansicht-wahl button {
  background: none; border: none; cursor: pointer; color: var(--matt-2);
  padding: 6px 12px; border-radius: 7px; font-size: 13.5px;
}
.ansicht-wahl button:hover { color: var(--text); }
.ansicht-wahl button.aktiv { background: var(--flaeche-3); color: var(--text); }

/* ---- Kalender ------------------------------------------------------------ */
.kalender { padding: 14px 16px 24px; max-width: 940px; margin: 0 auto; }

.kal-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.kal-monat { font-size: 16px; font-weight: 640; letter-spacing: -.2px; min-width: 150px; }
.kal-kopf .knopf.klein:last-child { margin-left: auto; }

.kal-raster {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
  background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: var(--r); padding: 8px;
}
.kal-wochentag {
  text-align: center; font-size: 11px; color: var(--matt-2);
  padding-bottom: 3px; letter-spacing: .06em; text-transform: uppercase;
}
.kal-tag {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 46px; padding: 6px 2px; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: var(--r-klein); color: var(--text);
}
.kal-tag:hover { border-color: var(--rand-hell); }
.kal-tag.fremd { color: var(--matt-2); opacity: .45; }
.kal-tag.heute .kal-zahl { color: var(--akzent); font-weight: 700; }
.kal-tag.gewaehlt { background: var(--flaeche-2); border-color: var(--rand-hell); }
.kal-zahl { font-size: 13.5px; }
.kal-punkte { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; min-height: 6px; }
.kal-punkt { width: 5px; height: 5px; border-radius: 50%; background: var(--matt-2); }
.kal-punkt.fest { background: var(--matt); }
.kal-punkt.rot { background: var(--akzent); }
.kal-mehr { font-size: 10px; color: var(--matt-2); line-height: 1; }

.kal-liste { margin-top: 18px; }
.kal-liste-titel {
  margin: 0 0 9px; font-size: 11.5px; color: var(--matt-2); font-weight: 650;
  text-transform: uppercase; letter-spacing: .07em;
}
.kal-liste-titel.rot { color: var(--akzent); }

.termin {
  display: flex; gap: 14px; cursor: pointer;
  background: var(--flaeche); border: 1px solid var(--rand); border-left-width: 2px;
  border-radius: var(--r); padding: 12px 14px; margin-bottom: 7px;
}
.termin:hover { border-color: var(--rand-hell); }
.termin:hover.wichtig, .termin.wichtig { border-left-color: var(--bernstein); }
/* Feste Breite, damit alle Namen bündig starten — egal ob links "14:00" oder
   "ganztägig" steht. */
.termin-zeit { display: flex; flex-direction: column; width: 74px; flex: none; }
.termin-zeit b { font-size: 15px; font-weight: 640; }
/* "ganztaegig" ist die schwaechere Information als eine echte Uhrzeit
   und wird deshalb auch schwaecher gesetzt. */
.termin-zeit b.ganz { font-size: 11.5px; font-weight: 500; color: var(--matt-2); letter-spacing: .02em; }
.termin-zeit span { font-size: 11.5px; color: var(--matt-2); }
.termin-inhalt { flex: 1; min-width: 0; }
.termin-kopf { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.termin-name { font-weight: 640; }
/* In der Terminzeile steht der Betrieb neben dem Namen und das Anliegen darf
   umbrechen — dort ist Platz, anders als auf der schmalen Board-Karte. */
.termin-kopf .karte-betrieb { display: inline; margin-top: 0; white-space: normal; }
.termin-inhalt .karte-anliegen { white-space: normal; margin-top: 4px; }
.termin-ort { font-size: 12.5px; color: var(--matt); margin-top: 3px; }
.termin-vor {
  font-size: 12.5px; color: var(--matt); margin-top: 6px;
  padding-left: 10px; border-left: 2px solid var(--rand-hell); white-space: pre-wrap;
}
.termin-vor b { color: var(--matt-2); font-weight: 600; }

/* ---- Eingaben im Detail --------------------------------------------------- */
.d-eingabe {
  width: 100%; padding: 9px 11px; border-radius: var(--r-klein);
  background: var(--flaeche); border: 1px solid var(--rand); outline: none;
}
.d-eingabe:focus { border-color: var(--rand-hell); background: var(--flaeche-2); }
.vorbereitung-feld { resize: vertical; min-height: 58px; white-space: pre-wrap; }
.hint { display: block; margin-top: 6px; font-size: 11.5px; color: var(--matt-2); }
.abo-feld {
  width: 100%; padding: 10px 11px; border-radius: var(--r-klein); font-size: 12.5px;
  background: var(--flaeche); border: 1px solid var(--rand); outline: none;
}

/* ---- CalDAV-Einrichtung --------------------------------------------------
   Drei Felder, die am iPhone abgetippt werden. Label links, Wert monospace —
   weil hier der Unterschied zwischen 0 und O zaehlt. */
.dav-schritte {
  margin: 0 0 14px; padding-left: 18px;
  color: var(--matt); font-size: 12.5px; line-height: 1.5;
}
.dav-schritte li { margin-bottom: 3px; }
.dav-schritte b { color: var(--text); font-weight: 600; }

.dav-feld { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dav-feld > span {
  flex: 0 0 68px; font-size: 12px; color: var(--matt-2);
}
.dav-feld > input {
  flex: 1 1 auto; min-width: 0;
  padding: 9px 10px; border-radius: var(--r-klein);
  background: var(--flaeche); border: 1px solid var(--rand); color: var(--text);
  font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
  outline: none;
}
.dav-feld > .chip { flex: 0 0 auto; }

.dav-alt { margin-top: 16px; border-top: 1px solid var(--rand); padding-top: 12px; }
.dav-alt > summary {
  cursor: pointer; font-size: 12.5px; color: var(--matt-2);
  list-style: none; user-select: none;
}
.dav-alt > summary::-webkit-details-marker { display: none; }
.dav-alt > summary::before { content: '\203A  '; }
.dav-alt[open] > summary::before { content: '\2304  '; }
.dav-alt > summary:hover { color: var(--matt); }

/* ---- Handy --------------------------------------------------------------- */
@media (max-width: 760px) {
  /* 68px Label + Kopieren-Knopf liessen auf 390px Breite kaum Platz fuer den
     Wert. Deshalb hier zweizeilig statt gequetscht. */
  .dav-feld { flex-wrap: wrap; }
  .dav-feld > span { flex: 1 0 100%; margin-bottom: 2px; }
  .dav-feld > input { flex: 1 1 60%; }

  .spalten-tabs { display: flex; }
  .board { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible; padding: 12px 12px 24px; min-height: 0; }
  .spalte { display: none; background: transparent; border: none; min-height: 0; }
  .spalte.aktiv { display: flex; }
  .spalte-kopf { display: none; }
  .spalte-liste { padding: 0; gap: 8px; }

  /* Gefilterte Durchgangsliste: hier braucht es die Spalten-Ueberschrift wieder,
     sonst weiss man bei einem Treffer nicht, in welchem Zustand er steckt. */
  .board.durchgehend { gap: 18px; }
  .board.durchgehend .spalte-kopf {
    display: flex; border: none; padding: 0 2px 7px;
  }
  .board.durchgehend .leer { display: none; }
  .karte { padding: 12px 13px; }
  .karte-name { font-size: 15px; }
  .blatt {
    left: 0; top: auto; width: 100vw; max-height: 92dvh;
    border-left: none; border-top: 1px solid var(--rand); border-radius: 15px 15px 0 0;
  }
  .kalender { padding: 12px 12px 24px; }
  .kal-raster { padding: 6px; gap: 2px; }
  .kal-tag { min-height: 44px; padding: 5px 0; }
  .kal-monat { min-width: 0; font-size: 15px; }
  .termin-zeit { width: 70px; }

  /* Der Kopf bleibt EINE Zeile. Die Suche versteckt sich hinter der Lupe und
     legt sich beim Antippen ueber den Kopf — sonst schiebt der Umbruch die
     Marke unter die Knoepfe und alles sieht schief aus. */
  .kopf { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); gap: 8px; }
  .marke { font-size: 15px; }
  .zaehler { display: none; }
  .suche { display: none; }
  .such-knopf {
    display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
    border-radius: var(--r-klein); background: var(--flaeche); border: 1px solid var(--rand);
    color: var(--matt); cursor: pointer;
  }
  .such-knopf svg { width: 16px; height: 16px; }
  .kopf.sucht .kopf-links { display: none; }
  .kopf.sucht .ansicht-wahl { display: none; }
  .kopf.sucht .kopf-rechts { flex: 1; }
  .kopf.sucht .suche { display: block; flex: 1; width: auto; }
  .kopf.sucht .such-knopf { display: none; }
  .ansicht-wahl button { padding: 7px 11px; font-size: 13px; }
  .kopf-rechts .knopf.haupt { padding: 8px 12px; }

  .dran { padding: 7px 12px; gap: 5px; }
  .dran-chip { padding: 4px 10px; font-size: 12.5px; }
}
@media (min-width: 761px) { .karte-weiter { display: none; } }
