/* ==========================================================================
   Struktur und Bausteine
   Die Werte (Farben, Radien, Schatten, Schriftfamilien) stehen in
   public/assets/css/themes/<name>.css und werden nach dieser Datei geladen.
   Hier steht nur, wie die Dinge zueinander liegen.

   Zwei Ausnahmen mit Absicht. Die Auszeichnungsschrift wird mit
   var(--display-weight, 700) gesetzt. Schriften wie Anton oder Instrument
   Serif haben nur einen Schnitt; ohne diesen Regler rechnet der Browser einen
   fetten dazu, und der sieht verschmiert aus.

   Und die mittleren Groessen — Kacheln, Listennamen, Zwischentitel — nehmen
   var(--display-2, var(--display)). Eine Schrift, die bei 40 Punkt grossartig
   ist, kann bei 18 zur Mauer werden; eine Gestaltung darf dafuer eine zweite
   mitbringen, muss aber nicht.
   ========================================================================== */


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

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

body.page {
  margin: 0;
  padding-bottom: var(--tabbar-h);
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/*
 * Silbentrennung, aber nur wo sie hilft.
 *
 * Deutsch baut lange Woerter, und auf 375 Punkten reisst "Europaeischer" eine
 * halbe Zeile auf oder laeuft ueber den Rand. Bei Schlagzeilen und Fliesstext
 * ist die Trennung deshalb richtig; sie braucht das lang-Attribut, und das
 * steht am <html>.
 *
 * Nicht getrennt wird, was man ueberfliegt: Namen in Listen, Knopftexte,
 * Marken, Messwerte. Ein Schrittname mit Trennstrich mittendrin liest sich
 * beim Suchen wie ein anderer Name.
 */
.pagehead__title,
.tile__titel,
.prose,
.emptystate__text,
.hint,
.switch__hint,
.suchkopf__hint,
.login__lead,
.sequence__text {
  -webkit-hyphens: auto;
  hyphens: auto;
}

a { color: var(--accent); text-decoration: none; }

/*
 * Kein Farbwechsel beim Überfahren: ein fester Ton kann in keiner Gestaltung
 * gleichzeitig passen, und auf Tastgeräten bleibt :hover nach dem Antippen
 * oft hängen — der Link sähe dann dauerhaft falsch aus. Unterstreichen wirkt
 * überall und trägt die Aussage ohne Farbe.
 */
a:hover { text-decoration: underline; }

/* Sichtbarer Fokus überall — nie ohne Ersatz entfernen */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/*
 * Bedienteile erben die Schrift.
 *
 * Nur "button" stand hier. Ein <select> ohne Angabe nimmt die Schrift des
 * Systems — in jeder Gestaltung fiel damit genau ein Element aus dem Satz,
 * und zwar eines, das mitten in der Liste steht.
 */
button,
input,
select,
optgroup,
textarea { font: inherit; }

/*
 * Wortwörtliches: Zählzeiten, Notationsbeispiele, der Farbwert im Konto.
 *
 * Auch hier stand nichts, also kam die Schreibmaschine des Systems — in
 * jeder Gestaltung eine fremde Schrift mitten im Absatz. Die Gestaltung
 * entscheidet jetzt, welche Schrift; dass es wörtlich zu nehmen ist, trägt
 * die Fläche, nicht die Familie. So funktioniert es auch dort, wo gar keine
 * Schreibmaschine vorkommt.
 */
code,
kbd,
samp,
pre {
  font-family: var(--mono);
  font-size: 0.94em;
}
code,
kbd,
samp {
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

/*
 * Fremdgeh-Band. Auffaellig, aber nicht als Fehler: es ist ein Zustand,
 * den man selbst herbeigefuehrt hat, und der einzige Weg zurueck.
 */
.devband {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 9px var(--gutter);
  border-bottom: 2px solid var(--accent-fill, var(--accent));
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}
.devband__link {
  color: var(--accent);
  text-decoration: underline;
  white-space: nowrap;
}

/*
 * „Was sich geaendert hat". Eine Liste zum Ueberfliegen, kein Aufsatz: das
 * Datum schmal davor, die Zeile daneben. Wer sie wegklickt, bekommt sie bei
 * der naechsten Aenderung wieder — deshalb auch keine Schaltflaeche, die
 * nach Endgueltigkeit aussieht.
 */
.neues__liste {
  list-style: none;
  margin: 0;
  padding: 4px var(--gutter) 0;
}
.neues__zeile {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.45;
}
.neues__zeile:first-child { border-top: 0; }
.neues__wann {
  flex-shrink: 0;
  width: 4.2em;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.neues__was { color: var(--text-2); }
.neues__weg { padding: 8px var(--gutter) 12px; }

/* ==========================================================================
   Was sich aufklappen laesst, zeigt es

   Die Umschalter blenden den Standardpfeil aus — er sieht je Browser anders
   aus. Dann muss aber etwas an seine Stelle: vier taten das nicht, und man
   sah der Zeile nicht an, dass etwas dahinter liegt. Ein Winkel, der sich
   beim Aufklappen mitdreht, und zwar ueberall derselbe.

   Nicht dabei: das Menue (die drei Striche sind das Zeichen), der
   Anmeldekasten (traegt einen eigenen Pfeil im Markup) und die Musikbox
   (hat eine eigene Loesung).
   ========================================================================== */

.fach__toggle::before,
.plan__toggle::before,
.ablauf__toggle::before,
.donebox__toggle::before,
.anfang__toggle::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-right: 1.5px solid var(--muted-2);
  border-bottom: 1.5px solid var(--muted-2);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

[open] > .fach__toggle::before,
[open] > .plan__toggle::before,
[open] > .ablauf__toggle::before,
[open] > .donebox__toggle::before,
[open] > .anfang__toggle::before { transform: rotate(45deg); }

/* Der Winkel steht links; was rechts stehen soll, braucht den Platz dazwischen */
.plan__label { flex-grow: 1; }
.anfang__toggle { gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  .fach__toggle::before,
  .plan__toggle::before,
  .ablauf__toggle::before,
  .donebox__toggle::before,
  .anfang__toggle::before { transition: none; }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
  font-family: var(--mono);
  font-size: 12px;
}
/* Farbe erbt von .skip-link; wiederholt sähe sie aus wie Text auf dem
   Seitengrund und wäre dort unlesbar */
.skip-link:focus { top: 8px; }

/* ==========================================================================
   Kopfbereich
   ========================================================================== */

.statusbar {
  text-transform: var(--label-transform);
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
}
.statusbar__crumb { color: var(--accent); }
.statusbar__crumb--current { color: var(--muted); }
.statusbar__sep { color: var(--faint); }
.statusbar__spacer { flex-grow: 1; }
.statusbar__meta { color: var(--muted); }

.pagehead {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px var(--gutter) 14px;
  border-bottom: 1px solid var(--line);
}
.pagehead__body { flex-grow: 1; min-width: 0; }

/* Vier Knoepfe neben dem Titel lassen ihm auf dem Handy 75 Punkte — fuer
   "Europäischer Tango" braeuchte er 272 und bricht fuenfzeilig um. Gemessen.
   Sie bekommen deshalb eine eigene Reihe, sobald es eng wird. */
.pagehead { flex-wrap: wrap; }
.pagehead__actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 560px) {
  .pagehead__actions {
    flex: 1 0 100%;
    justify-content: flex-end;
    margin-top: 2px;
  }
}
.pagehead__title {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: var(--display-weight, 700);
  line-height: 1;
  letter-spacing: -0.025em;
}

/*
 * Umlautpunkte in einer zweiten Zeile.
 *
 * Die Gestaltungen setzen die Zeilen eng — Sport auf 0.88, Redaktion auf
 * 0.95. Bricht eine Schlagzeile um und trägt die zweite Zeile ein Ä, Ö
 * oder Ü, liegen dessen Punkte im Feld der Zeile darüber und verschwinden
 * darin. Der Glyph fehlt nicht, es ist die Enge.
 *
 * Statt die Zeilen auseinanderzuziehen — das wäre eine andere Gestaltung —
 * bekommt die Schrift einen Hof in der Grundfarbe. Gezeichnet wird erst
 * die Kontur, dann die Füllung: die Buchstaben bleiben in voller Stärke,
 * und die untere Zeile radiert sich dort frei, wo sie die obere berührt.
 *
 * Nur mit paint-order. Ohne das läge die Kontur zur Hälfte innen und
 * machte die Schrift dünner — schlimmer als das Problem.
 */
@supports (paint-order: stroke) {
  .pagehead__title,
  .sheet__title {
    paint-order: stroke fill;
    -webkit-text-stroke: var(--kopf-kontur, 0.03em) var(--kopf-grund, var(--ink));
  }
}
.pagehead__meta {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.backlink,
.iconbutton {
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  flex-shrink: 0;
  margin-bottom: -4px;
  color: var(--text);
}
.backlink { margin-left: -12px; }
.iconbutton {
  border: 1px solid var(--accent);
  background: none;
  color: var(--accent);
}

/* ==========================================================================
   Suchzeile
   ========================================================================== */

.searchline {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
.searchline__prompt {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
}
.searchline__input {
  flex-grow: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
}
.searchline__input::placeholder { color: var(--muted-2); }
.searchline__submit {
  text-transform: var(--button-transform);
  flex-shrink: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* Auf der Suchseite sitzt das Feld unten, in Daumenreichweite */
.searchline--bottom {
  box-shadow: var(--shadow-raised);
  position: fixed;
  right: 0; left: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  height: 62px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface-2);
}
.searchline--bottom .searchline__input {
  border-radius: var(--radius);
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 16px;
}
.searchline--bottom .searchline__submit { height: 46px; }

/* ==========================================================================
   Tabelle und Zeilen
   ========================================================================== */

.main { padding-bottom: 24px; }
.main--search { padding-bottom: 78px; }
.main--centered { padding: 40px var(--gutter) 24px; }

.tablehead {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.tablehead__cell {
  text-transform: var(--label-transform);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.12em);
  color: var(--muted-2);
}
.tablehead__cell--grow { flex-grow: 1; }
.tablehead__cell--no { width: 30px; }
.tablehead__cell--level { width: 34px; text-align: right; }
.tablehead__cell--pair { width: 54px; text-align: right; }
.tablehead__cell--status { width: 86px; text-align: right; }

.rowlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  border-left: 3px solid transparent;
  color: var(--text);
}
.row:hover { background: var(--surface-2); border-left-color: var(--accent); }
.row__no {
  width: 30px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.row__main { flex-grow: 1; min-width: 0; }
.row__name {
  display: block;
  font-family: var(--display-2, var(--display));
  font-size: 17px;
  font-weight: var(--display-weight, 700);
}
.row__sub {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.row__level {
  width: 34px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  text-align: right;
}
.row__status { width: 86px; flex-shrink: 0; text-align: right; }
.row__pair {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  width: 58px;
  flex-shrink: 0;
}

/*
 * Statusmarke je Person. Bewusst ein Buchstabe und nicht nur ein farbiger
 * Punkt: Farbe allein trägt keine Information (WCAG 1.4.1), und bei
 * Rot-Grün-Schwäche wären "sitzt" und "vergessen" nicht zu unterscheiden.
 */
.mark {
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  color: var(--faint);
}
.mark--sitzt { color: var(--ok); }
.mark--ueben { color: var(--warn); }
.mark--weg { color: var(--bad); }
.mark--none { color: var(--faint); border-style: dashed; }

/* Zusammenhalten: die Spalte ist 86px breit, und "3 offen" passt mit der
   Ziffer noch neben "0 von 3" — dann blieb die 3 oben hängen und nur das
   Wort rutschte in die zweite Zeile. Umbrechen soll zwischen den beiden
   Angaben, nie innerhalb einer. */
.tally { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.tally--empty { color: var(--faint); }
.tally__ok { color: var(--ok); }
.tally__warn { color: var(--warn); }
.tally__bad { color: var(--bad); }
.tally__sep { color: var(--faint); }

/* ==========================================================================
   Filter
   ========================================================================== */

.segmented {
  display: flex;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.segmented__item {
  text-transform: var(--button-transform);
  border-radius: var(--radius-sm);
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 1px solid var(--border);
  border-left: 0;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.segmented__item:first-child { border-left: 1px solid var(--border); }
.segmented__item--active {
  border-color: var(--accent);
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}

/* ==========================================================================
   Datensatz und Abschnitte
   ========================================================================== */

.record { margin: 0; }
.record__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 6px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
}
.record__key {
  text-transform: var(--label-transform);
  width: 96px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted-2);
}
.record__value {
  margin: 0;
  flex-grow: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
}
.record__value--status { display: flex; gap: 14px; flex-wrap: wrap; }
.record__empty { color: var(--faint); }

.statuspair { display: inline-flex; align-items: baseline; gap: 6px; }
.statuspair__who { color: var(--muted); font-size: 11px; }
.statuspair__state--sitzt { color: var(--ok); }
.statuspair__state--ueben { color: var(--warn); }
.statuspair__state--weg { color: var(--bad); }
.statuspair__state--none { color: var(--faint); }

.bars { display: inline-flex; gap: 3px; margin-left: 6px; }
.bars__bar {
  width: 8px; height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.bars__bar--on { background: var(--accent-fill, var(--accent)); }

.section { padding: 18px var(--gutter) 0; }
.section__label {
  text-transform: var(--label-transform);
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted-2);
}

.prose { margin: 0; color: var(--text-2); line-height: 1.6; }
/* Ohne Bilder trägt der Text die Seite — dann etwas größer */
.prose--lead { font-size: 17px; color: var(--text); }

.taglink { font-family: var(--mono); margin-right: 8px; }

/* Ablauf: die Schrittfolge als Text, wenn keine Fotos da sind */
.sequence { margin: 0; padding: 0; list-style: none; }
.sequence__item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.sequence__item:first-child { border-top: 0; padding-top: 0; }
.sequence__no {
  width: 20px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.sequence__text { color: var(--text-2); line-height: 1.5; }

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shots__item { position: relative; }
.shots__img {
  border-radius: var(--radius);
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--border);
}
.shots__no {
  position: absolute;
  top: 4px; left: 4px;
  padding: 2px 5px;
  /* Sitzt auf dem Bild, nicht auf dem Seitengrund — deshalb fest dunkel */
  background: rgb(0 0 0 / 0.66);
  font-family: var(--mono);
  font-size: 10px;
  color: #fff;
}

.videos { margin: 0; padding: 0; list-style: none; }
.videorow {
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}
.videos li:last-child .videorow { border-bottom: 1px solid var(--border); }
.videorow__play { color: var(--accent); flex-shrink: 0; }
.videorow__title { flex-grow: 1; min-width: 0; }
.videorow__action { color: var(--muted); }

/* Fehlende Medien: eine Haarlinien-Zeile, kein leerer grauer Kasten */
.missing {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 0 12px;
  border: 1px dashed var(--border);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.missing__plus { color: var(--muted-2); }
.missing__label { flex-grow: 1; }

/* ==========================================================================
   Bewertung 1–10 — die Treppe

   Vorher ein Schieberegler. Der verlangt ein genaues Ziehen; im Stehen am
   Kursabend trifft man daneben und korrigiert nach. Zehn Knoepfe sind ein
   Tipp. Die Balken steigen an, die Zahl steht darunter — Hoehe allein traegt
   keine Aussage.
   ========================================================================== */

.scale { margin: 0; }

.scale__label {
  text-transform: var(--label-transform);
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted-2);
}

.scale__steps {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
}

/*
 * Der Knopf ist hoeher als sein Balken: getippt wird auf die ganze Spalte,
 * nicht auf den Strich. Eine Stufe 1 waere sonst 16 Punkte hoch und kaum zu
 * treffen.
 */
.scale__step {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  height: 74px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.scale__step:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

.scale__bar {
  display: block;
  width: 100%;
  border: var(--border-width, 1px) solid var(--border);
  border-radius: var(--radius-sm);
}

/* Die Hoehen stehen hier und nicht als Stilangabe im Markup: die Treppe ist
   Gestaltung, und Gestaltung gehoert nicht in die Vorlage. */
.scale__step:nth-child(1) .scale__bar { height: 13px; }
.scale__step:nth-child(2) .scale__bar { height: 18px; }
.scale__step:nth-child(3) .scale__bar { height: 22px; }
.scale__step:nth-child(4) .scale__bar { height: 27px; }
.scale__step:nth-child(5) .scale__bar { height: 31px; }
.scale__step:nth-child(6) .scale__bar { height: 36px; }
.scale__step:nth-child(7) .scale__bar { height: 40px; }
.scale__step:nth-child(8) .scale__bar { height: 45px; }
.scale__step:nth-child(9) .scale__bar { height: 49px; }
.scale__step:nth-child(10) .scale__bar { height: 54px; }
.scale__step[aria-pressed='true'] .scale__bar {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
}

.scale__no {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  text-align: center;
  color: var(--muted);
}
.scale__step[aria-pressed='true'] .scale__no { color: var(--text); }

.scale__wort {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.scale__wort-zahl {
  font-family: var(--display);
  font-weight: var(--display-weight, 700);
  font-size: 26px;
  line-height: 1;
  color: var(--text);
}

.scale__clear {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.scale__clear:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

/*
 * In der Uebeliste steht die Treppe unter dem Namen und faellt flacher aus.
 * Die Beschriftung bleibt fuer Vorleseprogramme stehen — ohne sie haette die
 * Gruppe keinen Namen.
 */
.practice .scale { flex: 1 0 100%; margin-top: 8px; }
.practice .scale__label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.practice .scale__wort,
.practice .scale__clear { display: none; }
.practice .scale__step { height: 52px; gap: 4px; }
.practice .scale__step:nth-child(1) .scale__bar { height: 8px; }
.practice .scale__step:nth-child(2) .scale__bar { height: 11px; }
.practice .scale__step:nth-child(3) .scale__bar { height: 14px; }
.practice .scale__step:nth-child(4) .scale__bar { height: 17px; }
.practice .scale__step:nth-child(5) .scale__bar { height: 20px; }
.practice .scale__step:nth-child(6) .scale__bar { height: 23px; }
.practice .scale__step:nth-child(7) .scale__bar { height: 26px; }
.practice .scale__step:nth-child(8) .scale__bar { height: 29px; }
.practice .scale__step:nth-child(9) .scale__bar { height: 32px; }
.practice .scale__step:nth-child(10) .scale__bar { height: 35px; }

/* Was bei beiden sitzt: da, aber zugeklappt */
.donebox {
  margin: 22px var(--gutter) 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.donebox__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}
.donebox__toggle::-webkit-details-marker { display: none; }
.donebox__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.donebox__label { flex-grow: 1; font-size: 14px; color: var(--text); }
.donebox__count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.donebox .rowlist { margin-top: 0; }

/*
 * Fächer der Übe-Liste. Optisch das Band von .grouphead, technisch eine
 * Klappe: was offen ist, soll auffallen, und was stört, soll wegklappen.
 */
.fach { border-bottom: 1px solid var(--line); }
.fach__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 6px var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  list-style: none;
}
.fach__toggle::-webkit-details-marker { display: none; }
.fach__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }


.fach__label {
  flex-grow: 1;
  text-transform: var(--label-transform);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.12em);
  line-height: 1.4;
  color: var(--muted-2);
}
.fach__count {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.fach .rowlist { margin-top: 0; }
.fach .hint--indented { margin-top: 8px; }


/* Schrittzeile mit eigener Bewertung daneben */
.steprow { display: flex; align-items: center; gap: 8px; }
.steprow .row { flex-grow: 1; min-width: 0; }
.steprow__pick { display: flex; align-items: center; gap: 6px; flex-shrink: 0; padding-right: 12px; }
.steprow__select {
  min-width: 52px;
  min-height: var(--tap-min);
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  text-align: center;
}
.steprow__select:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

/* Reihenfolge als Auswahlfeld neben dem Filter */
.listbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 var(--gutter);
  margin-bottom: 10px;
}
/* Unter 520 Punkten steht die Reihenfolge in einer zweiten Zeile: vier
   Filterknoepfe und ein Auswahlfeld nebeneinander quetschen die Knopftexte
   auf 33 Punkte — gemessen. */
.listbar .segmented { flex: 1 1 100%; margin: 0; padding: 0; }
.orderpick { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.orderpick__select {
  max-width: 150px;
  min-height: var(--tap-min);
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}
.orderpick__select:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

@media (min-width: 520px) {
  .listbar .segmented { flex: 1 1 auto; }
}

/* Ruhende Schritte: der Hinweis auf der Seite selbst */
.restnote {
  margin: 20px var(--gutter) 0;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.tally--open { margin-left: 8px; color: var(--muted); }

/* Einstieg in die Verwaltung: vier seltene Handgriffe, je eine Zeile */
.adminlist { margin: 0; padding: 0; list-style: none; }
.adminlist__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
}
.adminlist__item:hover { background: var(--surface-2); }
.adminlist__body { flex-grow: 1; min-width: 0; }
.adminlist__title { display: block; font-size: 16px; }
.adminlist__text { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

/* Einmalige Nachfrage nach der Rolle — kein Riegel, nur ein Kasten, der
   verschwindet, sobald er beantwortet ist */
.askrole {
  margin: 0 var(--gutter) 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.askrole__title { margin: 0; font-size: 17px; line-height: 1.3; }
.askrole__text { margin: 6px 0 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.askrole .form { margin: 0; }

/* Selten gebrauchte Formularfelder: erreichbar, aber nicht im Weg */
.morefields {
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}
.morefields__toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  min-height: var(--tap-min);
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
}
.morefields__toggle::-webkit-details-marker { display: none; }
.morefields__toggle::before {
  content: "+";
  font-family: var(--mono);
  color: var(--muted);
}
.morefields[open] .morefields__toggle::before { content: "−"; }
.morefields__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.morefields__label { font-size: 15px; color: var(--text); }
.morefields__hint { font-size: 12px; color: var(--muted); }

/* ==========================================================================
   Hilfetexte — aufklappbar auf den Seiten, gesammelt unter /hilfe
   ========================================================================== */

.help {
  margin: 0 var(--gutter) 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.help__toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: center;
  min-height: var(--tap-min);
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}
.help__toggle::-webkit-details-marker { display: none; }
.help__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

.help__mark {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.help__label { font-size: 14px; color: var(--text); }
.help__hint  { font-size: 12px; line-height: 1.4; color: var(--muted); }

.helptext { padding: 2px 14px 14px; }
.help[open] .help__toggle { border-bottom: 1px solid var(--line-soft); }
.help[open] .helptext { padding-top: 12px; }

.helptext__p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.helptext__p:last-of-type { margin-bottom: 0; }
.helptext__list,
.helptext__steps { margin: 0 0 10px; padding-left: 20px; }
.helptext__list li,
.helptext__steps li { margin: 5px 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.helptext b { color: var(--text); font-weight: 600; }

/* Sammelseite */
.helpnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 var(--gutter) 6px;
}
.helpnav__item {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
}
.helpsection { padding: 20px var(--gutter); border-top: 1px solid var(--line); }
.helpsection__title { margin: 0; font-size: 20px; line-height: 1.25; }
.helpsection__where {
  margin: 6px 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.helpsection__label { text-transform: var(--label-transform); color: var(--faint); }
.helpsection .helptext { padding: 0; }

/* ==========================================================================
   Eintrittskarte auf der Startseite

   Form aus CSS, Text als Text: SVG-Text bricht nicht um, und die Gestaltungen
   bringen verschieden breite Schriften mit.
   ========================================================================== */

.ticket {
  --loch: 7px;
  --lochabstand: 16px;

  display: flex;
  align-items: stretch;
  max-width: 560px;
  margin: 6px auto 26px;
  border-radius: 3px;
  background: var(--accent-fill);
  color: var(--on-accent);

  /* Zwei Lochreihen, oben und unten; der Schnitt beider Masken stanzt sie aus */
  -webkit-mask:
    radial-gradient(circle var(--loch) at 50% 0, #0000 98%, #000 100%) 50% 0 / var(--lochabstand) 100% repeat-x,
    radial-gradient(circle var(--loch) at 50% 100%, #0000 98%, #000 100%) 50% 100% / var(--lochabstand) 100% repeat-x;
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle var(--loch) at 50% 0, #0000 98%, #000 100%) 50% 0 / var(--lochabstand) 100% repeat-x,
    radial-gradient(circle var(--loch) at 50% 100%, #0000 98%, #000 100%) 50% 100% / var(--lochabstand) 100% repeat-x;
  mask-composite: intersect;
}

.ticket__haupt {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  padding: 30px 26px;
}
/* Der aufgedruckte Rahmen — als Linie, damit er den Text nicht einengt */
.ticket__haupt::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1.5px solid currentColor;
  opacity: 0.4;
  pointer-events: none;
}

.ticket__kopf,
.ticket__fuss {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  line-height: 1.5;
  text-transform: uppercase;
  opacity: 0.72;
}
/* Die Fusszeile ist die laengste; etwas enger gesperrt passt sie auf der
   breiten Karte in eine Zeile und bricht schmal sauber um */
.ticket__fuss {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1.5px solid currentColor;
  letter-spacing: 0.14em;
}

.ticket__titel { margin: 14px 0 0; }
.ticket__vor,
.ticket__wort { display: block; overflow-wrap: break-word; }
.ticket__vor {
  font-family: var(--display);
  font-size: clamp(17px, 4.6vw, 28px);
  font-weight: 400;
  line-height: 1.15;
}
.ticket__wort {
  margin-top: 2px;
  font-family: var(--display);
  font-size: clamp(30px, 10vw, 54px);
  font-weight: var(--display-weight, 700);
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.ticket__abriss {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  width: 132px;
  padding: 30px 12px;
  text-align: center;
}
.ticket__abriss::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  border-left: 2px dashed currentColor;
  opacity: 0.5;
}
.ticket__nummer {
  margin: 0;
  font-family: var(--display);
  font-size: 38px;
  font-weight: var(--display-weight, 700);
  line-height: 1;
}
.ticket__takt {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

/* Schmal zaehlt der Text, nicht die Kulisse */
@media (max-width: 520px) {
  .ticket { --lochabstand: 14px; }
  .ticket__haupt { padding: 24px 20px; }
  .ticket__abriss { display: none; }
}

/* Doppelte Klasse: ".checkline input" steht weiter unten und faerbte den
   Haken sonst rot wie eine Warnung */
.checkline--stay { margin-top: 14px; }
.checkline.checkline--stay input { accent-color: var(--accent-fill); }

/* ==========================================================================
   Prüfliste — als einzige Seite auf Breite ausgelegt, weil man sie am
   Rechner am Stück durchgeht
   ========================================================================== */

.review {
  padding: 18px var(--gutter);
  border-top: 1px solid var(--line);
}
.review:first-of-type { border-top: 0; }
.review__head { margin-bottom: 12px; }
.review__title { margin: 0; font-size: 18px; line-height: 1.25; }
.review__meta {
  margin: 3px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--label-spacing, 0.06em);
  text-transform: var(--label-transform);
  color: var(--muted);
}
.review__body { display: grid; gap: 16px; }
.review__col { min-width: 0; }
.review__form { margin: 0; }
.review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

@media (min-width: 900px) {
  /* Doppelte Klasse: die Regel fuer body.page steht weiter unten und gewaenne
     sonst allein durch ihre Stellung in der Datei */
  body.page.page--wide { max-width: 1120px; }
  body.page--wide .tabbar,
  body.page--wide .searchline--bottom { max-width: 1120px; }

  /* Entwurf links, vorhandene Erklärung rechts — man vergleicht sie, statt
     zu scrollen */
  .review__body { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; }
  .review__col--aside { border-left: 1px solid var(--line-soft); padding-left: 22px; }
}

/* ==========================================================================
   Schrittdiagramm — gezeichnet aus der Notation, Farben aus dem Theme
   ========================================================================== */

.diagram { margin: 0; }
.diagram__svg {
  display: block;
  width: 100%;
  max-height: 62vh;
  height: auto;
  /* currentColor faerbt die Pfeilspitze im Marker */
  color: var(--muted);
}

/* Rollen unterscheiden sich in der Strichart, nicht in der Farbe */
.diagram__sole {
  fill: var(--surface);
  stroke: var(--text);
  stroke-width: 2;
  stroke-linejoin: round;
}
.diagram__foot--follower .diagram__sole {
  stroke: var(--muted);
  stroke-dasharray: 5 4;
}
.diagram__foot--free .diagram__sole { fill: none; stroke-opacity: 0.65; }
.diagram__foot--free .diagram__count { fill: var(--muted); }

.diagram__count {
  fill: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.diagram__side {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.diagram__label {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.diagram__note {
  fill: var(--text);
  font-family: var(--mono);
  font-size: 11px;
}
.diagram__arrows line { stroke: var(--muted); stroke-width: 2; }
.diagram__key .diagram__sole { fill: none; }

/* Der Wortlaut ist die Beschreibung fuer Screenreader; sichtbar waere er
   doppelt zur Erklaerung. Nicht display:none — das nimmt ihn auch dort weg. */
.diagram__caption {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hint__list { margin: 6px 0 0; padding-left: 18px; }
.hint__list li { margin: 2px 0; }
.form__textarea--mono { font-family: var(--mono); font-size: 16px; line-height: 1.5; }

/* Fassungsnummer: soll auffindbar sein, nicht auffallen. Steht ueber der
   Fussleiste, damit sie nicht mit dem Inhalt der Seite verwechselt wird. */
.version {
  margin: 28px 0 14px;
  padding: 0 var(--gutter);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  text-transform: var(--label-transform);
  color: var(--faint);
}

.hint {
  margin: 9px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}

/* Entwurf: bewusst als Fremdkörper gezeichnet, damit er nicht mit den
   eigenen Mitschriften verwechselt wird. Gestrichelt statt farbig — die
   Kennzeichnung darf nicht allein an der Farbe hängen. */
.draft {
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.draft__mark {
  display: flex;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.draft__tag { flex-shrink: 0; color: var(--warn); }
.draft__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* ==========================================================================
   Leere Zustände, Suche, Anmeldung
   ========================================================================== */

.emptystate {
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 28px var(--gutter) 0;
  padding: 26px 20px;
  border: 1px dashed var(--border);
  text-align: center;
}
.emptystate--quiet { border-style: solid; border-color: var(--line); }
.emptystate__tag {
  text-transform: var(--label-transform);
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--label-spacing, 0.16em);
  color: var(--faint);
}
.emptystate__title {
  margin: 0;
  font-family: var(--display-2, var(--display));
  font-size: 21px;
  font-weight: var(--display-weight, 700);
  line-height: 1.3;
}
.emptystate__text { margin: 0; color: var(--muted); }

/* Jede eigene display-Regel schlaegt das [hidden] des Browsers. Ohne diese
   Zeile bleiben Knoepfe stehen, die ein Skript ausgeblendet hat — genau das
   ist bei "Setzen" und "ok" passiert. */
[hidden] { display: none !important; }

/* Jedes Eingabefeld steht auf mindestens 16 Punkt. iOS zoomt beim Antippen
   alles darunter heran, und danach laesst sich die Seite seitlich schieben —
   genau das ist auf dem Anmeldebildschirm passiert. Der Weg dahin ist nicht,
   das Zoomen per maximum-scale zu verbieten: das nimmt Sehbehinderten das
   Vergroessern. */

.button {
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  text-transform: var(--button-transform);
  font-weight: var(--button-weight);
  padding: 0 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.button--primary {
  border-color: var(--accent);
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}

.grouphead {
  text-transform: var(--label-transform);
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 var(--gutter);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.12em);
  color: var(--muted-2);
}

.hit {
  display: block;
  padding: 11px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  border-left: 3px solid transparent;
  color: var(--text);
}
.hit:hover { border-left-color: var(--accent); background: var(--surface-2); }
.hit__name {
  display: block;
  font-family: var(--display-2, var(--display));
  font-size: 17px;
  font-weight: var(--display-weight, 700);
}
.hit__where {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
}

.login__title {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: var(--display-weight, 700);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.login__lead { margin: 10px 0 0; color: var(--muted); }

/* ==========================================================================
   Eintragen — der Abend in einem Handgriff

   Was angelegt wurde, steht oben; alles Bedienbare klebt unten. Wer im Stehen
   tippt, haelt das Geraet mit einer Hand, und der Daumen kommt nicht an den
   oberen Rand.

   Die Mindesthoehe ist grob gegriffen und soll nur verhindern, dass die
   Bedienleiste bei kurzer Liste in der Bildmitte haengt. Sie an die Hoehe von
   Kopf und Leiste zu binden waere genauer und beim naechsten Umbau falsch.
   ========================================================================== */

.capture,
.run {
  display: flex;
  flex-direction: column;
  min-height: 68vh;
  min-height: 68svh;
  padding-bottom: 0;
}

.capture__done { flex-grow: 1; padding: 6px var(--gutter) 22px; }
.capture__empty { margin: 0; color: var(--muted); line-height: 1.6; }

.capture__list { margin: 10px 0 0; padding: 0; list-style: none; }
.capture__item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}
.capture__no { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.capture__name { flex-grow: 1; min-width: 0; color: var(--text-2); }

/* Der zuletzt angelegte steht gross da — er ist die Bestaetigung */
.capture__item--neu { border-top-color: var(--line); }
.capture__item--neu .capture__name {
  font-family: var(--display-2, var(--display));
  font-weight: var(--display-weight, 700);
  font-size: 19px;
  color: var(--text);
}
.capture__item--neu .capture__no { color: var(--accent); }

.capture__deck,
.run__deck {
  position: sticky;
  bottom: 0;
  padding: 16px var(--gutter) 20px;
  border-top: var(--border-width, 1px) solid var(--line);
  background: var(--surface-2);
}

/* Die Tanzreihe laeuft ueber den Rand hinaus statt umzubrechen: bei zwoelf
   Taenzen waeren drei Zeilen Knoepfe mehr Kulisse als Hilfe. */
.chips {
  display: flex;
  gap: 6px;
  margin: 0 calc(var(--gutter) * -1) 14px;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 16px;
  border: var(--border-width, 1px) solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-size: 15px;
  white-space: nowrap;
}
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip--active {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
}

.capture__label {
  text-transform: var(--label-transform);
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted-2);
}

.capture__row { display: flex; align-items: stretch; gap: 10px; }
.capture__input {
  flex-grow: 1;
  min-width: 0;
  height: 58px;
  padding: 0 14px;
  border: var(--border-width, 1px) solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--display);
  font-weight: var(--display-weight, 700);
  font-size: 22px;
}
.capture__input::placeholder { font-family: var(--sans); font-size: 16px; color: var(--faint); }
.capture__input:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

.capture__add {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 0;
  /* Die runde Fassung gilt nur, wo eine Gestaltung ueberhaupt rundet */
  border-radius: var(--radius-pill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.capture__add:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; }

.capture__context { margin-top: 16px; }
.capture__summary {
  text-transform: var(--label-transform);
  display: flex;
  align-items: center;
  min-height: 34px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted-2);
  cursor: pointer;
}
.capture__summary:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.capture__context[data-set] .capture__summary { color: var(--accent); }
.capture__set { margin-top: 10px; }

/* ==========================================================================
   Üben als Durchlauf — ein Schritt je Bildschirm

   Die Liste unter /ueben ist zum Planen da. Beim Üben liegt das Geraet auf
   dem Tisch: dann zaehlt, dass genau einer dasteht, gross genug zum Lesen aus
   zwei Metern, und die Treppe in Daumenreichweite.
   ========================================================================== */

.run__body { flex-grow: 1; padding: 18px var(--gutter) 24px; }

.run__rail { display: flex; gap: 4px; margin: 0 0 14px; }
.run__tick { flex-grow: 1; height: 2px; background: var(--line); }
.run__tick--on { background: var(--accent-fill); }

.run__marks {
  display: flex;
  gap: 34px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.run__who {
  text-transform: var(--label-transform);
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted);
}
.run__level {
  margin: 7px 0 0;
  font-family: var(--display);
  font-weight: var(--display-weight, 700);
  font-size: 40px;
  line-height: 1;
}
.run__level--partner { color: var(--accent); }
.run__wort { margin: 5px 0 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.run__nav { display: flex; gap: 10px; margin-top: 18px; }
.run__nav .button { flex-grow: 1; }
.run__weiter { flex-grow: 2; }

/* ==========================================================================
   Womit ein Tanz anfaengt

   Zwei Kaesten nebeneinander, die eigene Rolle abgesetzt. Nebeneinander statt
   untereinander, weil die beiden Angaben ein Gegensatzpaar sind — man liest
   sie zusammen oder gar nicht.
   ========================================================================== */

.startfoot {
  display: flex;
  gap: 10px;
  padding: 14px var(--gutter) 0;
}
.startfoot__rolle {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 14px;
  border: var(--border-width, 1px) solid var(--line);
  border-radius: var(--radius);
}
/* Die eigene Rolle traegt einen Strich, nicht nur eine Farbe */
.startfoot__rolle--meine {
  border-color: var(--accent-fill);
  border-left-width: 3px;
}
.startfoot__wer {
  text-transform: var(--label-transform);
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted);
}
.startfoot__du { color: var(--accent); }
.startfoot__was {
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: var(--display-weight, 700);
  font-size: 17px;
  line-height: 1.2;
  color: var(--text);
}

/* Der Weg ohne Anmeldung ist eine eigene Entscheidung, kein Nebensatz */
.login__gast { margin-top: 4px; }

/* Die Anmeldefelder hinter einer Klappe — siehe templates/konto/anmelden.php */
.loginbox {
  margin-top: 16px;
  border: var(--border-width, 1px) solid var(--line);
  border-radius: var(--radius);
}
.loginbox__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--control-height);
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
}
.loginbox__toggle::-webkit-details-marker { display: none; }
.loginbox__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.loginbox__label { flex-grow: 1; font-size: 16px; color: var(--text); }
.loginbox__pfeil { flex-shrink: 0; font-family: var(--mono); font-size: 18px; color: var(--muted); }
.loginbox[open] .loginbox__pfeil { transform: rotate(90deg); }
.loginbox .form { padding: 0 16px 16px; }

/* ==========================================================================
   Suchkopf

   Frueher stand das Feld unten in Daumenreichweite und oben ein Kasten mit
   der Erklaerung — der sah mehr nach einem Suchfeld aus als das Suchfeld.
   Jetzt steht es dort, wo man es sucht: ganz oben, gerahmt, mit Lupe und
   sichtbarer Beschriftung. Und gross genug, dass es niemand uebersieht.
   ========================================================================== */

.suchkopf {
  margin: 0 var(--gutter);
  padding: 16px 0 18px;
}

.suchkopf__label {
  text-transform: var(--label-transform);
  display: block;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted-2);
}

.suchkopf__zeile {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 2px solid var(--accent-fill);
  border-radius: var(--radius);
  background: var(--surface);
}

.suchkopf__lupe {
  display: grid;
  place-items: center;
  width: 46px;
  flex-shrink: 0;
  color: var(--accent);
}

.suchkopf__feld {
  flex-grow: 1;
  min-width: 0;
  height: 58px;
  padding: 0 4px 0 0;
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--display-2, var(--display));
  font-weight: var(--display-weight, 700);
  font-size: 21px;
}
.suchkopf__feld::placeholder {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  color: var(--faint);
}
.suchkopf__feld:focus { outline: none; }
.suchkopf__zeile:focus-within { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

.suchkopf__knopf {
  text-transform: var(--button-transform);
  flex-shrink: 0;
  padding: 0 18px;
  border: 0;
  border-left: 2px solid var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: var(--button-weight);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.suchkopf__hint {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Schrittfolge je Rolle — zugeklappt wie das Fach der gesessenen Schritte */
.ablauf {
  margin-top: 10px;
  border: var(--border-width, 1px) solid var(--line);
  border-radius: var(--radius);
}
.ablauf + .ablauf { margin-top: 8px; }
.ablauf__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 8px 14px;
  cursor: pointer;
  list-style: none;
}
.ablauf__toggle::-webkit-details-marker { display: none; }
.ablauf__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.ablauf__label {
  text-transform: var(--label-transform);
  flex-grow: 1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--text-2);
}
.ablauf__count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ablauf .sequence--ablauf { padding: 0 14px 12px; }
.ablauf .draft__mark { margin: 0 14px 4px; }

/* Die Zaehlzeit ist keine laufende Nummer — sie darf breiter werden */
.sequence--ablauf .sequence__no {
  min-width: 2.4em;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Schieberegler

   Ein Knopf mit der Aufschrift "Einschalten" sagt nicht, wie es gerade steht —
   man liest ihn als Speichern. Der Regler zeigt den Zustand und ist zugleich
   der Griff. Gebaut aus einem echten Ankreuzfeld: die Tastatur bedient ihn
   damit von selbst, und ohne Skript schickt der Knopf daneben ab.
   ========================================================================== */

.switchline {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

/* Ein Knopf, kein Ankreuzfeld: ein Tipp ist ein Abschicken, und es braucht
   kein Skript dazwischen */
.switch {
  flex-grow: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.switch:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; }
.switch--mittig { justify-content: center; width: auto; margin: 0 auto; }

.switch__griff {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  margin-top: 2px;
  border: var(--border-width, 1px) solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  transition: background 0.12s linear, border-color 0.12s linear;
}
.switch__griff::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--muted);
  transition: transform 0.12s linear, background 0.12s linear;
}
.switch[aria-checked='true'] .switch__griff {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
}
.switch[aria-checked='true'] .switch__griff::after {
  transform: translateX(20px);
  background: var(--on-accent);
}

.switch__body { min-width: 0; }
.switch__label { display: block; font-size: 16px; color: var(--text); }
.switch__hint { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* ==========================================================================
   Navigation oben: Klappmenue
   ========================================================================== */

/*
 * Bleibt beim Scrollen oben stehen und traegt den Weg gleich mit: links der
 * Name, der zur Startseite fuehrt, daneben die Seite, auf der man ist. Die
 * Statuszeile darunter saegte dasselbe noch einmal — sie faellt in dieser
 * Fassung weg.
 */
.menubar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.menubar__weg {
  text-transform: var(--label-transform);
  flex-grow: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  white-space: nowrap;
  overflow: hidden;
}
.menubar__heim { flex-shrink: 0; color: var(--accent); }
.menubar__sep { flex-shrink: 0; color: var(--faint); }
.menubar__hier { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }

.page--menueoben .statusbar { display: none; }
.burger { position: relative; }
.burger__toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 4px;
  cursor: pointer;
  list-style: none;
}
.burger__toggle::-webkit-details-marker { display: none; }
.burger__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }

/* Drei Striche aus einem Element: Rahmen oben und unten, das Element selbst
   ist der mittlere */
.burger__strich,
.burger__strich::before,
.burger__strich::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.burger__strich { position: relative; }
.burger__strich::before { content: ""; position: absolute; top: -6px; }
.burger__strich::after  { content: ""; position: absolute; top: 6px; }

.burger__wort {
  text-transform: var(--label-transform);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--label-spacing, 0.1em);
}

.burger__liste {
  position: absolute;
  right: 0;
  z-index: 5;
  min-width: 190px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border: var(--border-width, 1px) solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card, none);
}
.burger__ziel {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: var(--tap-min);
  padding: 0 16px;
  color: var(--text);
  font-size: 17px;
}
.burger__ziel:hover { text-decoration: none; background: var(--surface-2); }
.burger__ziel--active { color: var(--accent); }

/* Ohne untere Leiste braucht der Rumpf dort keinen Platz */
.page--menueoben { padding-bottom: 24px; }

/* ==========================================================================
   Einfache Bedienung: Kacheln

   Zwei Spalten, grosse Flaechen, wenig Text. Gedacht fuer die Tanzstunde —
   Geraet halb in der Tasche, Licht gedimmt, wenig Geduld. Ein Ziel muss man
   treffen koennen, ohne genau hinzusehen.
   ========================================================================== */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px var(--gutter) 0;
}

/* Text oben, nicht unten: bei verschieden langen Beschriftungen sitzt sonst
   jede Kachel auf einer anderen Hoehe, und die Reihe wirkt unruhig. */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  min-height: 116px;
  padding: 16px;
  border: var(--border-width, 1px) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.tile:hover { text-decoration: none; border-color: var(--accent-fill); }
.tile:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

.tile__titel {
  font-family: var(--display-2, var(--display));
  font-weight: var(--display-weight, 700);
  font-size: 34px;
  line-height: 1.02;
  /* Platz fuer die Zahl oben rechts, damit sie nicht im Wort steht */
  padding-right: 30px;
}
.tile__text {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.tile__zahl {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 12px;
}

/* Bleibt eine Kachel allein in der letzten Reihe, nimmt sie die ganze Breite */
.tiles > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 92px; }

.einfachschalter { padding: 22px var(--gutter) 0; text-align: center; }
.flash__zeile { margin: 0; }

/* Ausblenden und Entfernen stehen nebeneinander; sie tun Verschiedenes */
.song__aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Dieselben Kacheln fuer Taenze und Schritte */
.tile--liste { min-height: 94px; gap: 4px; }
.tile--liste .tile__titel { font-size: 25px; }

/* Musik auf der Tanzseite: da, aber zugeklappt — dieselbe Machart wie das
   Fach der gesessenen Schritte */
.musikbox {
  margin: 14px var(--gutter) 0;
  border: var(--border-width, 1px) solid var(--line);
  /* Akzentkante: das Fach soll als etwas zu Oeffnendes auffallen und nicht
     als eine weitere stille Umrandung untergehen */
  border-left: 3px solid var(--accent-fill);
  border-radius: var(--radius);
  background: var(--surface);
}
.musikbox__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.musikbox__toggle::-webkit-details-marker { display: none; }
.musikbox__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.musikbox:hover { border-color: var(--accent-fill); }
.musikbox__label {
  flex-grow: 1;
  font-family: var(--display-2, var(--display));
  font-weight: var(--display-weight, 700);
  font-size: 19px;
  line-height: 1.1;
  color: var(--text);
}
/* Zaehler als Plakette wie auf den Kacheln — er sagt, dass etwas drin ist */
.musikbox__count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 12px;
}

/* Winkel aus Rahmenkanten: kein zusaetzliches Bild, keine Markup-Aenderung */
.musikbox__toggle::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  /* Verschieben vor dem Drehen, sonst wandert der Winkel beim Aufklappen:
     translate nach rotate liefe im gedrehten Koordinatensystem */
  transform: translateY(-2px) rotate(45deg);
  transition: transform 120ms ease;
}
.musikbox[open] .musikbox__toggle::after {
  transform: translateY(2px) rotate(-135deg);
}

@media (prefers-reduced-motion: reduce) {
  .musikbox__toggle::after { transition: none; }
}
.musikbox .musiklist { padding: 0 14px; }

/* Der Weg zum Selberlegen steht neben der Sortierwahl — dort, wo man gerade
   ueber die Reihenfolge nachdenkt, und nur wenn die eigene gewaehlt ist. */
.orderpick__legen {
  align-self: center;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
}

/* Das Kürzel für den ersten Schritt: „re ↔". Monospace, damit „li" und „re"
   gleich breit laufen und die Marke in einer Liste nicht zappelt. */
.anfangsmarke {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Der Pfeil wird gedreht, nicht je Richtung neu gezeichnet — ein Pfad für
   alle vier. Die Drehung steht am Element, weil sie aus den Daten kommt. */
.anfangsmarke__pfeil { flex-shrink: 0; }

.anfangszeile {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px var(--gutter) 0;
}
.anfangszeile__text { font-size: 15px; color: var(--text-2); }

/* ==========================================================================
   Anfang je Tanz

   Jeder Knopf ist ein eigenes Formular — anders koennte ein Antippen nicht
   fuer sich allein speichern. Die Formulare duerfen darum keine eigene
   Zeile bekommen, sonst stuende jeder Knopf untereinander.
   ========================================================================== */

.anfang {
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.anfang__kopf { margin-bottom: 10px; }
.anfang__name {
  margin: 0;
  font-family: var(--display-2, var(--display));
  font-weight: var(--display-weight, 700);
  font-size: 23px;
  line-height: 1.1;
}
.anfang__stand {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--text-2);
}
.anfang__gegen { color: var(--muted); }

.wahl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.wahl__form { display: contents; }
.wahl__knopf {
  text-transform: var(--button-transform);
  flex-grow: 1;
  min-width: 0;
  min-height: var(--tap-min);
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.wahl__knopf--an {
  border-color: var(--accent);
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}
.wahl__knopf:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

.anfang__eigen { margin-top: 8px; }
.anfang__toggle {
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--label-spacing, 0.1em);
  text-transform: var(--label-transform);
  color: var(--muted-2);
}
.anfang__toggle::-webkit-details-marker { display: none; }
.anfang__toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.anfang__zurueck { margin-top: 4px; }

/* ==========================================================================
   Reihenfolge ziehen

   Der Griff ist das einzige, was nicht scrollt: "touch-action: none" nur
   dort, sonst liesse sich die Liste nicht mehr mit dem Finger bewegen — und
   das braucht man, sobald sie laenger ist als der Bildschirm.
   ========================================================================== */

.sortlist {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.sortrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--gutter);
  min-height: 60px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--ink);
}

.sortrow__grip {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: var(--tap-min);
  height: var(--tap-min);
  margin-left: calc(var(--gutter) * -0.5);
  border: 0;
  background: none;
  color: var(--muted);
  cursor: grab;
}
/* Erst wenn das Skript laeuft, ist der Griff ueberhaupt einer */
[data-zieh] .sortrow__grip { touch-action: none; user-select: none; -webkit-user-select: none; }
.sortrow__grip:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }

.sortrow__no {
  flex-shrink: 0;
  min-width: 1.6em;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}
.sortrow__name {
  flex-grow: 1;
  min-width: 0;
  font-family: var(--display-2, var(--display));
  font-weight: var(--display-weight, 700);
  font-size: 19px;
}
.sortrow__pfeile { display: flex; gap: 4px; flex-shrink: 0; }
.sortrow__pfeile button[disabled] { opacity: 0.35; }

/* Die gezogene Zeile liegt oben und behaelt ihren Grund, damit sie sich von
   den Zeilen darunter abhebt */
.sortrow--zieht {
  position: relative;
  z-index: 2;
  border-color: var(--accent-fill);
  box-shadow: var(--shadow-card, none);
  cursor: grabbing;
}
.sortrow--zieht .sortrow__grip { color: var(--accent); cursor: grabbing; }

.sortstatus {
  min-height: 1.4em;
  margin: 14px var(--gutter) 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ==========================================================================
   Freigaben

   Das Band steht ueber jeder Seite, solange etwas wartet — anders als eine
   Meldung, die man einmal sieht und dann nie wieder. Weg ist es erst, wenn
   die Liste leer ist.
   ========================================================================== */

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--gutter);
  border-bottom: var(--border-width, 1px) solid var(--accent-fill);
  background: var(--accent-dim);
  color: var(--text);
}
.banner:hover { text-decoration: none; background: var(--surface-2); }
.banner__zahl {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 13px;
}
.banner__text { flex-grow: 1; min-width: 0; font-size: 14px; }
.banner__pfeil { flex-shrink: 0; font-family: var(--mono); color: var(--accent); }

.approval {
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
}
.approval__head { display: flex; align-items: baseline; gap: 10px; }
.approval__kind {
  text-transform: var(--label-transform);
  flex-shrink: 0;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: var(--label-spacing, 0.1em);
}
/* Die beiden Arten unterscheiden sich in Wort und Farbe, nicht nur in Farbe */
.approval__kind--neu { color: var(--accent); }
.approval__kind--weg { color: var(--bad); }
.approval__kind--text { color: var(--muted); }

/* Bisher und Vorschlag nebeneinander, damit man nicht raten muss */
.approval__text { margin-top: 10px; }
.approval__alt,
.approval__neu {
  margin: 0;
  padding: 9px 11px;
  border-left: 2px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.approval__alt--leer { font-style: italic; }
.approval__neu {
  margin-top: 6px;
  border-left-color: var(--accent-fill);
  color: var(--text);
}

.approval__name {
  flex-grow: 1;
  min-width: 0;
  font-family: var(--display-2, var(--display));
  font-weight: var(--display-weight, 700);
  font-size: 19px;
  color: var(--text);
}
.approval__meta {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.approval__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Der Partnerwunsch ist eine Aufgabe fuer die Verwaltung, kein Beiwerk */
.userrow__meta--wunsch { color: var(--accent); }

/*
 * Leseseiten kleben nicht.
 *
 * Beim Eintragen und im Durchlauf ist die Bedienleiste am unteren Rand
 * richtig: dort steht wenig Text und man greift blind hin. Wo man von oben
 * nach unten liest, verdeckt sie das Ende des Absatzes — dann folgt sie dem
 * Text.
 */
.run--lesen { min-height: 0; }
.run--lesen .run__deck { position: static; }

/* Der Ausstieg aus der Einführung — leise, aber erreichbar */
.run__skip { padding: 16px var(--gutter) 0; text-align: center; }

/* Der Einstieg in den Durchlauf, oben auf der Übe-Liste */
.runlink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px var(--gutter) 0;
  padding: 16px 18px;
  border: var(--border-width, 1px) solid var(--accent-fill);
  border-radius: var(--radius);
  color: var(--text);
}
.runlink:hover { text-decoration: none; background: var(--accent-dim); }
.runlink__text { min-width: 0; }
.runlink__title {
  display: block;
  font-family: var(--display-2, var(--display));
  font-weight: var(--display-weight, 700);
  font-size: 20px;
}
.runlink__meta {
  text-transform: var(--label-transform);
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted);
}
.runlink__pfeil { flex-shrink: 0; font-family: var(--mono); font-size: 18px; color: var(--accent); }

/* ==========================================================================
   Feststehende Fußleiste
   ========================================================================== */

.tabbar {
  box-shadow: var(--shadow-raised);
  position: fixed;
  right: 0; bottom: 0; left: 0;
  display: flex;
  height: var(--tabbar-h);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding-bottom: env(safe-area-inset-bottom);
}
/* Symbol ueber dem Wort. Das Wort bleibt: bei sechs Zielen sagt "Üben"
   gegenüber "Tänze" mehr als jedes Zeichen, und gelernt werden muss nichts. */
.tabbar__item {
  text-transform: var(--label-transform);
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--label-spacing, 0.06em);
}
/* Das Zeichen schrumpft nicht mit, wenn ein langes Wort die Spalte fuellt */
.tabbar__item .navikon { flex-shrink: 0; }
/* nowrap gehoert dazu: ohne es greift text-overflow nicht, und das Wort
   bestimmt weiter die Mindestbreite. Mit sieben Zielen reicht das auf
   einem 390er Bildschirm nicht mehr. */
.tabbar__item { overflow: hidden; }
.tabbar__wort { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar__item:last-child { border-right: 0; }
.tabbar__item--active { color: var(--accent); }

/* ==========================================================================
   Größere Anzeigen: mehr Luft, Inhalt zentriert
   ========================================================================== */

@media (min-width: 700px) {
  :root { --gutter: 28px; }

  body.page {
    max-width: 760px;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .pagehead__title { font-size: 38px; }
  .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tabbar { max-width: 760px; margin: 0 auto; }
  .searchline--bottom { max-width: 760px; margin: 0 auto; }
}

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

/* ==========================================================================
   Kursstufen und offene Zuordnungen
   ========================================================================== */

/* Fehlende Zuordnung ist ein Zustand, kein Fehler — sichtbar, aber ruhig */
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.notice--spaced { margin-top: 18px; border-top: 1px solid var(--line); }
.notice--warn { color: var(--bad); }

.courserow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.courserow__label {
  text-transform: var(--label-transform);
  width: 100%;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.12em);
  color: var(--muted-2);
}
.courserow__item {
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}
.courserow__item--more { border-style: dashed; color: var(--accent); }
.courserow__n { color: var(--muted); }

.row__open { color: var(--warn); }

.hint--indented { padding: 0 var(--gutter); margin-top: 18px; }

/* Zweiter Umschalter auf derselben Seite: leiser als der erste, damit die
   Seite nicht aus zwei gleich lauten Leisten besteht. */
.segmented--quiet { margin-bottom: 10px; }
.segmented--quiet .segmented__item { font-size: 11px; }

/* ==========================================================================
   Spickzettel am Bildschirm — gedruckt übernimmt print.css
   ========================================================================== */

.page--sheet { padding-bottom: 32px; }
.sheet { padding: 20px var(--gutter) 0; }
.sheet__head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet__title {
  margin: 0;
  font-family: var(--display);
  font-size: 32px;
  font-weight: var(--display-weight, 700);
  letter-spacing: -0.025em;
}
.sheet__meta {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.sheet__tools { display: flex; gap: 10px; margin: 16px 0 0; }
.sheet__step { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.sheet__step-title {
  margin: 0 0 6px;
  font-family: var(--display-2, var(--display));
  font-size: 19px;
  font-weight: var(--display-weight, 700);
}
.sheet__step-meta {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.sheet__text { margin: 0 0 8px; color: var(--text-2); line-height: 1.6; }
.sheet__text--empty { color: var(--faint); }
.sheet__sequence { margin: 0; padding-left: 20px; color: var(--text-2); }
.sheet__sequence li { margin-bottom: 4px; }
.sheet__empty { padding: 20px 0; color: var(--muted); }

/* ==========================================================================
   Formulare, Meldungen, Konto und Protokoll
   ========================================================================== */

.form { margin-top: 20px; }

.form__label {
  text-transform: var(--label-transform);
  display: block;
  margin: 14px 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.1em);
  color: var(--muted-2);
}
.form__label:first-child { margin-top: 0; }

.form__input {
  border-radius: var(--radius);
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
}
.form__input:focus-visible { border-color: var(--accent); }

.button--wide { width: 100%; margin-top: 20px; }
.button--small { min-height: 38px; padding: 0 12px; font-size: 11px; }
.button--danger { color: var(--bad); border-color: var(--border); }

/* Meldungen tragen ihre Aussage im Text, nicht in der Farbe */
.flash {
  border-radius: var(--radius);
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
}
.flash--ok { border-left-color: var(--ok); }
.flash--error { border-left-color: var(--bad); }

.rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.rule::before,
.rule::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: var(--line);
}

.hint--centered { text-align: center; margin-top: 18px; }

.keyrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.keyrow__main { flex-grow: 1; min-width: 0; }
.keyrow__name { display: block; font-family: var(--display-2, var(--display)); font-size: 15px; font-weight: var(--display-weight, 700); }
.keyrow__meta {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.logrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  border-left: 3px solid transparent;
}
.logrow--ok { border-left-color: var(--ok); }
.logrow--fail { border-left-color: var(--bad); }
.logrow__when {
  width: 78px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.logrow__main { flex-grow: 1; min-width: 0; }
.logrow__who { display: block; font-size: 14px; }
.logrow__meta {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
}
.logrow__state {
  text-transform: var(--label-transform);
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--label-spacing, 0.06em);
  color: var(--muted);
}

/* ==========================================================================
   Bearbeiten
   ========================================================================== */

.form--page { padding: 16px var(--gutter) 0; }

.form__required { color: var(--accent); }
.form__input--title { font-family: var(--display); font-size: 18px; font-weight: var(--display-weight, 700); }
.form__input--small { height: 42px; font-size: 16px; }

.form__textarea {
  height: auto;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  resize: vertical;
}

.form__file {
  width: 100%;
  padding: 10px 0;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
}
.form__file::file-selector-button {
  border-radius: var(--radius-sm);
  margin-right: 12px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.form__row { display: flex; gap: 10px; }
.form__col { flex-grow: 1; min-width: 0; }
.form__col--narrow { flex-grow: 0; width: 104px; }

.section__label--spaced {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.imagelist { margin: 0 0 12px; padding: 0; list-style: none; }
.imagelist__item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.imagelist__thumb {
  border-radius: var(--radius);
  width: 72px;
  height: 96px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--border);
}
.imagelist__body { flex-grow: 1; min-width: 0; }

.upload {
  border-radius: var(--radius);
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed var(--border);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 13px;
  color: var(--muted);
}
.checkline input { width: 18px; height: 18px; accent-color: var(--bad); }

/* Auswahl mit Erlaeuterung: die Begruendung gehoert neben die Option, nicht
   in eine Fussnote — sonst waehlt man nach Gefuehl. */
.fieldset { margin: 0 0 22px; padding: 0; border: 0; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent-fill); background: var(--surface-2); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.choice input { flex-shrink: 0; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent-fill); }
.choice__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.choice__label { font-size: 15px; color: var(--text); }
.choice__hint { font-size: 13px; line-height: 1.45; color: var(--muted); }

.hint--lead { margin: 0 0 4px; font-size: 12px; line-height: 1.55; }

.formbar {
  display: flex;
  gap: 10px;
  margin: 26px 0 0;
  padding-bottom: 8px;
}
.formbar--inline { padding: 20px var(--gutter) 0; }
.formbar .button { flex-grow: 1; }

.dangerzone {
  margin: 28px var(--gutter) 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Statusumschaltung: die eigene Bewertung, direkt am Schritt */
.statuspick { display: flex; }
.statuspick__item {
  text-transform: var(--button-transform);
  border-radius: var(--radius-sm);
  flex-grow: 1;
  min-height: 44px;
  border: 1px solid var(--border);
  border-left: 0;
  background: transparent;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.statuspick__item:first-child { border-left: 1px solid var(--border); }
.statuspick__item--active {
  border-color: var(--accent);
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}

.iconbutton--quiet { border-color: var(--border); color: var(--text-2); }

/* ==========================================================================
   Übe-Liste
   ========================================================================== */

.practice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  border-left: 3px solid transparent;
}
.practice:hover { background: var(--surface-2); border-left-color: var(--accent); }

/*
 * Eigene Zeile, immer.
 *
 * Ohne Ausgangsbreite richtet sich der Umbruch nach der Laenge der
 * Unterzeile: "jive · TH sitzt blind, NI nicht bewertet" passt bei 400 px
 * noch neben das Haekchen, "foxtrott · TH fast sicher, …" nicht mehr — und
 * dann stehen zwei Zeilen derselben Liste verschieden. Mit 100 Prozent
 * bricht jede gleich um, unabhaengig davon, was drinsteht.
 */
.practice__main {
  flex: 1 1 100%;
  min-width: 0;
  color: var(--text);
}
.practice__marks { display: flex; gap: 5px; flex-shrink: 0; }


/* ==========================================================================
   Videoflächen
   ========================================================================== */

.player {
  border-radius: var(--radius-lg);
  position: relative;
  margin-bottom: 8px;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px solid var(--border);
}

.player__start {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 0 16px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
}
.player__start:hover { background: var(--surface-2); }

.player__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}

.player__text { min-width: 0; }
.player__title {
  display: block;
  font-family: var(--display-2, var(--display));
  font-size: 16px;
  font-weight: var(--display-weight, 700);
}
.player__meta {
  text-transform: var(--label-transform);
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.player__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Auswahl der Gestaltung
   ========================================================================== */

.themepick { display: flex; flex-direction: column; gap: 8px; }

.themepick__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.themepick__item--active { border-color: var(--accent); }
.themepick__item input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }

.themepick__body { min-width: 0; }
.themepick__name { display: block; font-family: var(--display-2, var(--display)); font-size: 15px; font-weight: var(--display-weight, 700); }
.themepick__text { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Musik
   ========================================================================== */

.musiklist { margin: 0; padding: 0; list-style: none; }

/* Titel links, Links rechts, eine Zeile. Die Knoepfe sind hier flacher als
   sonst: sie stehen neben dem Titel und nicht fuer sich, und mit der vollen
   Tasthoehe waere die Zeile doppelt so hoch wie ihr Inhalt. */
.musiklist__item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.musiklist .musiklist__link {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}
.musiklist__main { flex-grow: 1; min-width: 0; }
.musiklist__title { display: block; font-family: var(--display-2, var(--display)); font-size: 16px; font-weight: var(--display-weight, 700); }
.musiklist__artist { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

.musiklist__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 11px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 11px;
}

.song { border-bottom: 1px solid var(--line-soft); padding: 4px var(--gutter); }
.song__box { padding: 6px 0; }
.song__head { display: flex; align-items: center; min-height: var(--tap-min); cursor: pointer; }
.song__main { min-width: 0; }
.song__title { display: block; font-family: var(--display-2, var(--display)); font-size: 16px; font-weight: var(--display-weight, 700); }
.song__meta { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.song__fit { color: var(--warn); }
.song__fit--ok { color: var(--ok); }

.song__links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.song__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 11px;
}

/* Muss hinter beide Grundfassungen: die stehen weiter unten in der Datei
   und gewaennen sonst. Eine Suche ist kein Treffer — der gestrichelte
   Rand sagt das, der Text sagt es ebenfalls. */
.musiklist__link--suche,
.song__link--suche {
  color: var(--muted);
  border-style: dashed;
}

/* ==========================================================================
   Farbauswahl
   ========================================================================== */

.accentpick { margin-top: 12px; }

.accentpick__set {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 0 12px 0 8px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.swatch--active { border-color: var(--accent); }
.swatch input { width: 16px; height: 16px; accent-color: var(--accent); }

.swatch__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  /* Randlinie, damit auch eine sehr helle Farbe eine Form behält */
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.18);
}
.swatch__name { font-size: 13px; }

.form__color {
  width: 100%;
  height: 48px;
  padding: 4px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.section__label--spaced { margin-top: 24px; }

/* ==========================================================================
   Benutzerverwaltung
   ========================================================================== */

.userrow { border-bottom: 1px solid var(--line-soft); padding: 4px var(--gutter); }

.userrow__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 8px 0;
  cursor: pointer;
}
.userrow__main { flex-grow: 1; min-width: 0; }
.userrow__name { display: block; font-family: var(--display-2, var(--display)); font-size: 16px; font-weight: var(--display-weight, 700); }
.userrow__meta {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.userrow__body { padding: 4px 0 14px; }
.userrow__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  vertical-align: middle;
}

/* Muss nach .badge stehen, sonst gewinnt die Grundfassung. Den Unterschied
   traegt ausserdem das Wort, nicht nur die Farbe. */
.badge--weg {
  /* Kein getoenter Grund: --bad-rgb gibt es nicht, und ein fester Wert waere
     in der einen Gestaltung richtig und in der anderen daneben. */
  background: none;
  border: 1px solid var(--bad);
  color: var(--bad);
}

.rejectform { display: flex; align-items: center; gap: 10px; }
.checkline--tight { min-height: auto; font-size: 12px; }

/* ==========================================================================
   Rolle im Paartanz
   ========================================================================== */

/* Kleines L oder F hinter den Initialen — Leader und Follower hängen nicht
   am Geschlecht, deshalb steht die Rolle da, wo die Person steht */
.rolemark {
  margin-left: 2px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  vertical-align: super;
}

.rolepick {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 0;
}
.rolepick--wide { margin-top: 12px; }

.rolepick__label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-right: 2px;
}

.rolepick__item {
  min-height: var(--tap-min);
  padding: 0 12px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 13px;
}
.rolepick__item--active {
  border-color: transparent;
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}



/* ==========================================================================
   Vorschläge: was liegt, und das Zusammenführen
   ========================================================================== */

/* Die Liste der eigenen offenen Vorschläge auf der Schrittseite */
.liegen {
  margin: 0 0 14px;
  padding: 12px var(--gutter);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
}
.liegen__kopf { margin: 0 0 8px; font-size: 14px; color: var(--text-2); }
.liegen__liste { margin: 0; padding: 0; list-style: none; }
.liegen__eintrag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}
.liegen__wer { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Die Vorlagen beim Zusammenführen: geltende Fassung und jeder Vorschlag */
.fassungen { margin: 0 0 var(--gutter); }

.fassung {
  margin: 0 0 12px;
  padding: 14px var(--gutter);
  background: var(--surface);
  border: var(--border-width) solid var(--line);
}
.fassung__kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}
.fassung__titel {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: var(--label-transform);
  letter-spacing: var(--label-spacing);
}
.fassung__wer { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fassung__label {
  margin: 8px 0 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--muted);
}

/* Vorformatiert, damit Zeilenumbrüche erhalten bleiben: bei der Folge und
   beim Diagramm trägt jede Zeile eine eigene Aussage. */
.fassung__text {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
}
.fassung__leer { margin: 0; font-size: 14px; color: var(--faint); font-style: italic; }
.fassung__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }

.zusammenform { margin-top: var(--gutter); }

@media (min-width: 720px) {
  /* Nebeneinander, sobald Platz ist: vergleichen heisst nebeneinanderlegen */
  .fassungen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
  .fassung { margin: 0; }
}


/* Die Stücke einer Vorlage: je Satz oder Zeile ein Knopf zum Anhängen */
.stuecke { margin: 0; padding: 0; list-style: none; counter-reset: stueck; }

.stueck {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line-soft);
}
.stueck:last-child { border-bottom: 0; }

.stueck__plus {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.stueck__plus:hover {
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
  border-color: var(--accent);
}

.stueck__text {
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fassung__hinweis { font-family: var(--mono); font-size: 12px; color: var(--faint); }

.feldkopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

/* Der Knopf, der bei einer Textmarkierung erscheint. Er liegt über der
   Seite und wird vom Skript gesetzt; ohne Skript ist er nie zu sehen. */
.markknopf {
  position: absolute;
  z-index: 60;
  padding: 6px 12px;
  border: var(--border-width) solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: var(--shadow-raised);
}
.markknopf[hidden] { display: none; }


/* Die Pfeile zum Umsortieren der Lieder, neben der Klappe */
.song__reihe { display: flex; align-items: flex-start; gap: 8px; }
.song__reihe > .song__box { flex: 1; min-width: 0; }

.song__ordnen {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: none;
  padding-top: 10px;
}

.song__pfeil {
  width: 30px;
  height: 26px;
  padding: 0;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.song__pfeil:hover {
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
  border-color: var(--accent);
}


/* ==========================================================================
   Übe-Seite: der Vorschlag und die Schwellen
   ========================================================================== */

/* Der Vorschlag steht in der Signalfarbe: er ist keine Liste, sondern eine
   Ansage. Wer sie nicht mag, nimmt die Liste darunter. */
.vorschlag {
  margin: 0 0 var(--gutter);
  padding: 16px var(--gutter);
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}

.vorschlag__label {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

.vorschlag__zeile { display: flex; align-items: baseline; gap: 9px; margin: 5px 0 0; }
.vorschlag__zahl { font-family: var(--display); font-size: 34px; line-height: 1; }
.vorschlag__was { font-size: 15px; font-weight: 600; line-height: 1.25; }
.vorschlag__warum { margin: 8px 0 0; font-family: var(--mono); font-size: 11px; line-height: 1.5; opacity: 0.8; }

.vorschlag__liste {
  margin: 12px 0 0;
  padding: 0 0 0 1.4em;
  font-size: 14px;
  line-height: 1.5;
}
.vorschlag__name { font-weight: 600; }
.vorschlag__wo { font-family: var(--mono); font-size: 11px; opacity: 0.75; margin-left: 6px; }

.vorschlag__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
/* Auf der Signalfläche kehren sich die Knöpfe um, sonst verschwänden sie */
/* Die Fläche ausdrücklich nennen statt transparent: optisch dasselbe, aber
   bin/kontrast.php misst sonst gegen den Seitengrund und meldet 1,01:1 für
   etwas, das in Wirklichkeit dunkel auf Zinnober steht. */
.vorschlag .button {
  border-color: var(--on-accent, var(--ink));
  color: var(--on-accent, var(--ink));
  background: var(--accent-fill, var(--accent));
}
.vorschlag .button--primary {
  background: var(--on-accent, var(--ink));
  color: var(--accent-fill, var(--accent));
}
.vorschlag .button--quiet { border-color: var(--accent-fill, var(--accent)); text-decoration: underline; }

/*
 * Der leere Kopf ist eine Aufgabe, kein Ergebnis.
 *
 * .vorschlag ist eine volle Signalflaeche — richtig fuer "Fuer heute: 5
 * Schritte", falsch fuer "noch keiner": dieselbe Lautstaerke fuer eine
 * Abwesenheit. Hier traegt nur der Knopf die Farbe, der Rest steht ruhig.
 */
.vorschlag--leer {
  background: var(--surface);
  color: var(--text);
  border: var(--border-width) solid var(--line);
}
.vorschlag--leer .vorschlag__label { color: var(--muted-2); opacity: 1; }
.vorschlag--leer .vorschlag__warum { color: var(--text-2); opacity: 1; }
.vorschlag--leer .vorschlag__wer {
  padding: 0;
  background: none;
  color: var(--muted);
  opacity: 1;
}
/* Die Knopf-Umkehr von oben gilt hier nicht — der Grund ist wieder normal */
.vorschlag--leer .button {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}
.vorschlag--leer .button--primary {
  border-color: var(--accent-fill, var(--accent));
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}
/* Der Balken stand auf der Signalflaeche Volt auf Volt und war unsichtbar */
.vorschlag--leer .luecke__balken { margin-top: 12px; }

/* Die Schwellen: eine Klappe, damit sie da sind, ohne im Weg zu stehen */
.plan { margin: 0 0 var(--gutter); border: var(--border-width) solid var(--line); background: var(--surface); }

.plan__toggle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px var(--gutter);
  cursor: pointer;
  list-style: none;
}
.plan__toggle::-webkit-details-marker { display: none; }

.plan__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--text-2);
}
.plan__kurz { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.plan__form { padding: 0 var(--gutter) 4px; }

.plan__zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}

.plan__was { flex: 1; min-width: 0; }
.plan__titel { display: block; font-size: 13px; font-weight: 600; }
.plan__text { display: block; font-size: 11px; line-height: 1.4; color: var(--muted); margin-top: 2px; }

.plan__werte { display: flex; gap: 3px; flex: none; }

.plan__wert {
  width: 30px;
  height: 30px;
  padding: 0;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}
.plan__wert:hover { border-color: var(--accent); }
.plan__wert[aria-pressed="true"] {
  background: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
  border-color: var(--accent-fill, var(--accent));
}

.plan__folge {
  margin: 0;
  padding: 10px var(--gutter) 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}


/* Der Engpass-Kasten: gestrichelter Rahmen, weil er eine Aufgabe ist und
   kein Zustand — er verschwindet, sobald genug bewertet ist. */
.luecke {
  margin: 0 0 var(--gutter);
  padding: 14px var(--gutter);
  border: 2px dashed var(--accent);
}
.luecke__titel { margin: 0 0 6px; font-family: var(--display); font-size: 19px; }
.luecke__text { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.luecke__balken { display: block; height: 10px; margin: 0 0 6px; background: var(--surface-2); }
.luecke__fuell { display: block; height: 100%; background: var(--accent-fill, var(--accent)); }
.luecke__zahl { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.luecke__knopf { margin: 12px 0 0; }


/* "zuletzt" neben dem Namen im Durchlauf: die Zahl darunter ist die alte,
   nicht die neue — ohne das Wort liest man sie als Ergebnis. */
.run__war {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-left: 5px;
}

.run__auch {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}


/* Nach Tanz eingrenzen: eine Reihe, die zur Seite laeuft. Wie die
   Kursstufen-Reihe auf der Tanzliste, nur mit eigener Zahl. */
/*
 * Die Tanzreihe scrollt fuer sich, nicht die Seite.
 *
 * Sie hatte negative Aussenabstaende, damit der Streifen bis an den
 * Bildschirmrand laeuft — der rechte machte die Seite aber 20 px breiter
 * als das Fenster, und dann liess sich die ganze Seite seitlich schieben.
 * Der Einzug kommt jetzt vom Innenabstand: der gehoert in den Scrollbereich
 * und wandert mit, das Bild ist dasselbe.
 */
.tanzwahl {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 var(--gutter);
  padding: 0 var(--gutter) 4px;
  scrollbar-width: thin;
}

.tanzwahl__item {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.tanzwahl__item:hover { border-color: var(--accent); color: var(--text); }
.tanzwahl__item--an {
  background: var(--accent-fill, var(--accent));
  border-color: var(--accent-fill, var(--accent));
  color: var(--on-accent, var(--ink));
}
.tanzwahl__n { font-family: var(--mono); font-size: 10px; opacity: 0.75; }

/* Das Ankreuzfeld in der Übe-Zeile. Es gehoert zu einem Formular weiter
   unten — deshalb das form-Attribut im Markup. */
.practice__waehlen {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 10px 0 0;
  cursor: pointer;
}
.practice__waehlen input { width: 20px; height: 20px; accent-color: var(--accent-fill, var(--accent)); }

.auswahl { margin: var(--gutter) 0 0; padding: 0 var(--gutter); }


/* Woher die Auswahl kommt — steht über den Knöpfen, damit klar ist, warum
   hier nicht der errechnete Vorschlag steht. */
.vorschlag__wer {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: rgb(0 0 0 / 0.12);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}

/* Die Knopfreihe enthaelt jetzt Formulare; sie sollen nebeneinander stehen */
.vorschlag__knoepfe form { margin: 0; }

/* ==========================================================================
   Punkt an einem Navigationsziel: da steht etwas Ungesehenes
   ========================================================================== */

/* Keine Zahl, nur ein Punkt — wie viele es sind, steht auf der Seite selbst.
   Er sitzt am Zeichen und nicht am Rand der Leiste, weil deren Hoehe von der
   Gestaltung kommt und zwischen 68 und 70 Pixeln schwankt. */
.tabbar__zeichen {
  position: relative;
  display: inline-flex;
}
.navpunkt {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.tabbar__zeichen .navpunkt {
  position: absolute;
  top: -1px;
  right: -3px;
  box-shadow: 0 0 0 2px var(--surface-2);
}
.burger__ziel .navpunkt {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}
