/* ===========================================================================
   Einstellungen › Telefon – Bausteine (einstellungen-telefon.js, Pakete A/B/C)

   Port der Vorlage telefonanlage/docs/einstellungen (tokens.css, einstellungen.css, dialoge.css) auf den Hub.
   1. TOKENS: dieselben Namen wie tokens.css, aber auf die Hub-Variablen aus stil.css umgelegt (--brand → --ziegel,
      Zweitfarbe → --gold, ok → --gut/--ok, Gefahr → --weh/--rot-dk, Papier/Grund/Linie/Tinte …). Rezept „flach“
      aus Abschnitt 9: Karten wie die Hub-Tafeln (Fläche, Linie, Schatten), kein Glas, kein Weichzeichner.
      Hell und dunkel folgen den Hub-Variablen von selbst; nur --muted (Nebentext) braucht einen eigenen dunklen Wert:
      --leinen #8C7F6E schafft auf Papier nur 3,9:1, #6B5F50 schafft 6,1:1 (dunkel --leise: 5,4:1).
      Fokusring --fokus: hell der volle Ziegel (--brand, 5,3:1 auf Papier; --brand-light schaffte nur ~2:1), dunkel --brand-light.
   2. BAUSTEINE: alles unter .es gekapselt – stil.css hat eigene Regeln für button, input, label (Versalien!), .karte.
      Die Klassen .card/.btn/.chip gibt es im Hub nicht global; .es davor hält sie trotzdem fern von allem anderen.
   3. DIALOGE: Frage-Dialog (.es-frage) hängt am body, deshalb tragen sie die
      Tokens selbst.
   Keine Farbwerte unterhalb von Teil 1.
   =========================================================================== */

/* ------------------------------------------------------------------ 1. Tokens */
.es, .es-frage {
  --brand:        var(--ziegel);
  --brand-dark:   var(--rot-dk, var(--ziegel-tief));
  --brand-light:  color-mix(in srgb, var(--ziegel-hell) 55%, #fff);
  --fokus:        var(--brand);              /* Fokusring: hell der volle Ziegel (5,3:1), dunkel --brand-light */
  --brand-tint:   var(--sand);
  --brand-ink:    #FFF6E8;                     /* Schrift auf dem Hauptknopf (wie .knopf--haupt) */

  --accent:       var(--gold);
  --accent-dark:  var(--gold-dk);
  --accent-ink:   var(--gold-tief);            /* Schrift auf voller Zweitfarbe */
  --accent-tint:  var(--sand);   /* früher gelblich; Hinweise nutzen --hinw (Entwurf 122) */
  --accent-grad:  linear-gradient(135deg, color-mix(in srgb, var(--gold) 80%, #fff) 0%, var(--gold) 55%,
                                  color-mix(in srgb, var(--gold) 82%, #000) 100%);

  --cream:  var(--grund);
  --paper:  var(--flaeche);
  --ink:    var(--tinte);
  --ink-2:  color-mix(in srgb, var(--tinte) 84%, var(--flaeche));
  --muted:  #6B5F50;
  --bd:     var(--linie);
  --bd-2:   color-mix(in srgb, var(--linie) 70%, var(--leise));

  --success: var(--ok, var(--gut));  --success-bg: var(--ok-tint, color-mix(in srgb, var(--gut) 12%, var(--flaeche)));
  --warning: var(--acht);            --warning-bg: var(--hinw);
  --info:    var(--leise);           --info-bg:    var(--sand);
  --danger:  var(--rot-dk, var(--weh)); --danger-bg: color-mix(in srgb, var(--weh) 11%, var(--flaeche));

  --sans: var(--schrift);

  --g-ctl:  34px;
  --g-r:    12px;
  --g-r-sm: 8px;

  /* Hauptknopf: Verlauf wie .knopf--haupt, Kante unten statt Glas-Lichtkante */
  --g-red:        linear-gradient(180deg, var(--ziegel-hell), var(--ziegel-tief));
  --g-red-hover:  linear-gradient(180deg, color-mix(in srgb, var(--ziegel-hell) 88%, #fff), var(--ziegel));
  --g-red-press:  linear-gradient(180deg, var(--ziegel-tief), var(--ziegel-rand));
  --g-red-shadow: 0 2px 0 var(--ziegel-rand);
  --g-red-shadow-press: inset 0 2px 4px rgba(0, 0, 0, .25);

  /* Leiser Knopf, Plakette: Fläche mit Linie wie die Hub-Knöpfe */
  --g-glass:        var(--flaeche);
  --g-glass-hover:  color-mix(in srgb, var(--tinte) 5%, var(--flaeche));
  --g-glass-press:  color-mix(in srgb, var(--tinte) 10%, var(--flaeche));
  --g-glass-line:   var(--linie);
  --g-glass-shadow: 0 1px 1px rgba(42, 38, 36, .05);
  --g-glass-blur:   none;

  /* Karte: wie .tafel */
  --g-pane:        var(--flaeche);
  --g-pane-line:   var(--linie);
  --g-pane-blur:   none;
  --g-pane-shadow: var(--schatten);
  --g-pane-face:   linear-gradient(transparent, transparent);

  --g-hover:        color-mix(in srgb, var(--tinte) 5%, transparent);
  --g-press:        color-mix(in srgb, var(--tinte) 10%, transparent);
  --g-field:        var(--feld);
  --g-field-shadow: inset 0 1px 2px rgba(42, 38, 36, .08);

  --shadow-lg: 0 14px 36px -12px rgba(30, 15, 10, .45);
  --g-quiet-press-shadow: inset 0 1px 2px rgba(42, 38, 36, .15);
  --frage-schatten: 0 30px 80px -20px rgba(0, 0, 0, .5);
  --frage-grund: rgba(36, 29, 27, .42);
  --gefahr-hover: color-mix(in srgb, var(--weh) 88%, #fff);
  --gefahr-press: color-mix(in srgb, var(--weh) 85%, #000);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) .es, :root:not([data-thema="hell"]) .es-frage {
    --muted: var(--leise);
    --brand-light: color-mix(in srgb, var(--ziegel-hell) 70%, #fff);
    --fokus: var(--brand-light);
    --g-glass-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --g-field-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-lg: 0 14px 36px -12px rgba(0, 0, 0, .7);
  }
}

/* ------------------------------------------------------------------ 2. Bausteine */
/* Der Bereich selbst: die Hub-Leiste links bleibt, rechts genau ein Bereich (höchstens 820 px, Karten mit 16 px). */
.es { font-size: 14px; line-height: 1.4; color: var(--ink); max-width: 820px; display: grid; gap: 16px; align-content: start; }
.es * { box-sizing: border-box; }
.es ::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.es svg.ic { width: 16px; height: 16px; flex: none; }
.es .sub { display: block; font-size: 12.5px; color: var(--muted); }
.es .key { font-family: var(--mono); font-size: 12px; color: var(--brand-dark); overflow-wrap: anywhere; }
.es [data-kopier] { cursor: copy; }
.es [data-kopier]:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 4px; }
.es .es__sp { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.es a { color: var(--brand-dark); text-underline-offset: .18em; }
.es .tfe-wurzel { display: grid; gap: 16px; align-content: start; min-width: 0; }

/* Inhaltskopf: h1 ist eine Bezeichnung, keine Schlagzeile */
.es h1.es__h { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 1.05rem; font-weight: 800;
               letter-spacing: .09em; line-height: 1.3; text-transform: uppercase; color: var(--brand-dark); font-family: var(--sans); }
.es .es__h .ic { width: 18px; height: 18px; color: var(--brand); }
.es .es-intro { margin: -4px 0 0; color: var(--ink-2); max-width: 68ch; font-size: 14px; }
.es .es-laden { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); }

/* Übersicht: fehlende Dinge als goldene Karten, sonst „Alles eingerichtet“ */
.es .es-todo { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.es .es-todo__k { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 44px; padding: 12px 14px;
                  border-radius: var(--g-r); text-decoration: none; text-align: left; color: var(--ink); font: inherit; cursor: pointer;
                  background: color-mix(in srgb, var(--accent) 14%, var(--paper)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
                  transition: border-color .12s, background .12s, transform .1s; }
.es .es-todo__k:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, var(--paper)); }
.es .es-todo__k:active { transform: scale(.98); background: color-mix(in srgb, var(--accent) 26%, var(--paper)); }
.es .es-todo__k:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.es .es-todo__k--fehler { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-bg); }
.es .es-todo__k--fehler:hover { border-color: var(--danger); background: var(--danger-bg); }
.es .es-todo__n { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.es .es-todo__n .ic { width: 16px; height: 16px; color: var(--accent-dark); }
.es .es-todo__k--fehler .es-todo__n .ic { color: var(--danger); }
.es .es-todo__w { font-size: 13px; color: var(--ink-2); font-weight: 400; }
.es .es-leer { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); }
.es .es-leer .ic { color: var(--success); }

/* Karten */
.es .card { background: var(--g-pane-face), var(--g-pane); border: 1px solid var(--g-pane-line); border-radius: var(--g-r); margin: 0; padding: 0;
            box-shadow: var(--g-pane-shadow); min-width: 0; }
.es .card + .card { margin-top: 16px; }               /* Karten in Hüllen (z. B. div.ta) – ohne das kleben sie aneinander */
.es > .card + .card, .es .tfe-wurzel > .card + .card { margin-top: 0; }   /* direkt im Bereich sorgt das Raster (gap) */
.es .card__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--bd); }
.es .card__h h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; font-family: var(--sans); color: var(--ink); text-transform: none; }
.es .card__b { padding: 14px 16px; }
.es .card__b > :first-child { margin-top: 0; } .es .card__b > :last-child { margin-bottom: 0; }
.es .card__b > p { margin: 0 0 10px; max-width: 68ch; }

/* Knöpfe: Hauptknopf (einer je Ansicht), leise, Gefahr umrandet */
.es .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--g-ctl); min-height: 0; padding: 0 14px;
           border-radius: var(--k-r); border: 0; font: 600 13.5px/1 var(--sans); background: var(--k-rot) border-box; color: var(--brand-ink);
           box-shadow: var(--k-rot-sch); cursor: pointer; white-space: nowrap; text-decoration: none; filter: none;
           transition: background .12s, box-shadow .12s, color .12s, transform .1s; }
.es .btn:hover { background: var(--k-rot) border-box; filter: brightness(1.06); color: var(--brand-ink); border-color: transparent; }
.es .btn:active { background: var(--k-rot-p) border-box; box-shadow: var(--k-rot-sch-p); transform: scale(.98); }
.es .btn:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.es .btn--quiet { background: var(--k-weiss) border-box; color: var(--ink-2); border: 1px solid var(--k-weiss-rand); box-shadow: var(--k-weiss-sch); }
.es .btn--quiet:hover { background: var(--k-weiss-h) border-box; color: var(--ink); border-color: var(--bd-2); }
.es .btn--quiet:active { background: var(--k-weiss-p) border-box; box-shadow: var(--g-quiet-press-shadow); }
.es .btn--gefahr { background: var(--k-weiss) border-box; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); box-shadow: var(--k-weiss-sch); }
.es .btn--gefahr:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.es .btn--gefahr:active { background: color-mix(in srgb, var(--danger) 18%, var(--paper)); }
.es .btn--sm { height: 30px; padding: 0 11px; font-size: 13px; }
.es .btn .ic { width: 14px; height: 14px; }
.es .btn.is-busy, .es .btn:disabled { opacity: .55; pointer-events: none; transform: none; }
.es .btn .kreisel { width: 12px; height: 12px; border-width: 2px; }

/* Plaketten */
/* Plaketten sind die eine .marke aus stil.css (Entwurf 123 D3), hier nur der Abstand hinter einer Beschriftung. */
.es small.marke { margin-left: 4px; }

/* Felder: gefüllt, ohne Rahmen, Fokus als Ring. stil.css setzt label auf Versalien und input auf Rahmen – hier zurück. */
.es label { display: block; margin: 0; font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; color: inherit; }
.es .es-form { display: grid; gap: 12px; margin: 0; }
.es .es-form + .es-form { margin-top: 12px; }
.es .es-feld { display: flex; flex-direction: column; gap: 5px; margin: 0; min-width: 0; }
.es .es-feld > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.es .es-hinweis { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.es .in, .es input.in, .es select.in, .es textarea.in {
  display: block; width: 100%; min-height: var(--g-ctl); padding: 0 10px; border: 0; border-radius: 8px; background-color: var(--g-field);
  box-shadow: var(--g-field-shadow); font: inherit; font-size: 14px; color: var(--ink); outline: none; transition: box-shadow .15s, background-color .15s; }
.es textarea.in { padding: 8px 10px; min-height: 80px; line-height: 1.45; resize: vertical; }
.es textarea.in.tfe-code { font: 13px/1.45 var(--mono); }
.es select.in { appearance: none; -webkit-appearance: none; padding-right: 28px;
                background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
                background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.es select.in:disabled { opacity: .6; cursor: not-allowed; }
.es .in::placeholder { color: var(--muted); opacity: 1; }
.es .in:focus { box-shadow: var(--g-field-shadow), 0 0 0 2px var(--fokus); background-color: var(--paper); }
.es select.es-wahl { width: auto; min-width: 0; max-width: 100%; font-size: 13px; text-overflow: ellipsis; }
@media (min-width: 480px) { .es select.es-wahl { min-width: 170px; } }
.es .es-reihe { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.es .es-reihe .es-feld { flex: 1 1 220px; }
.es .es-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.es .card__b > .es-form + .es-form, .es .card__b > .es-dl + .es-form, .es .card__b > .es-dl + .es-knoepfe { margin-top: 12px; }

/* Schalter (Häkchen, speichert sofort) */
.es .es-schalter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; min-height: 30px; }
.es .es-schalter input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; border: 0; accent-color: var(--brand); cursor: pointer; flex: none; }
.es .es-schalter input:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.es .es-schalter:has(input:disabled) { opacity: .6; cursor: not-allowed; }

/* Begriffslisten, Code */
.es .es-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0 0 14px; }
.es .es-dl dt { color: var(--muted); font-size: 13px; }
.es .es-dl dd { margin: 0; overflow-wrap: anywhere; }
.es .es-code { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--g-field); box-shadow: var(--g-field-shadow);
               font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; color: var(--ink); }

/* Warnung mit Warum: Band .meldung--hinw / --fehler (Entwurf 123 D4), hier nur Abstand und Breite */
.es .es-warnung { margin: 0; font-size: 13px; max-width: 68ch; }
.es .es-warnung a { color: inherit; }

/* Tabellen: rollen in sich, nie die Seite */
.es .es-tabelle { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.es .tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.es .tab th { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--bd-2); font-size: 11.5px; font-weight: 700; text-transform: uppercase;
              letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.es .tab td { padding: 11px 12px; border-bottom: 1px solid var(--bd); vertical-align: top; font-variant-numeric: tabular-nums; }
.es .tab tbody tr:last-child td { border-bottom: 0; }
.es .tab tbody tr:hover td { background: var(--g-hover); }
.es .es-akt { text-align: right; white-space: nowrap; }
.es .es-akt > * + * { margin-left: 6px; }

/* Gefahrzone: zuletzt, mit Abstand und feiner Linie */
.es .es-form.es-gefahrzone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--bd); }

/* Aufklapper in einer Karte („Ändern“ …): eigener Pfeil statt Browser-Dreieck */
.es .es-mehr { margin-top: 12px; border-top: 1px solid var(--bd); }
.es .es-mehr > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; color: var(--ink); }
.es .es-mehr > summary::-webkit-details-marker { display: none; }
.es .es-mehr > summary::before { content: ""; width: 7px; height: 7px; flex: none; border: solid var(--muted); border-width: 0 2px 2px 0;
                                 transform: rotate(-45deg); transition: transform .15s; margin: 0 2px 0 1px; }
.es .es-mehr[open] > summary::before { transform: rotate(45deg); }
.es .es-mehr > summary:hover { color: var(--brand-dark); }
.es .es-mehr > summary:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 8px; }
.es .es-mehr > .tfe-mehr__b { padding: 0 0 4px 17px; display: grid; gap: 12px; }
.es .es-mehr > .tfe-mehr__b > .es-form.es-gefahrzone { margin-top: 6px; }

/* Aufklappbarer Teil einer Karte (tfeTeil): Titel und Kurzstand im Kopf, Inhalt bündig unter dem Text */
.es .ta-teil { border-top: 1px solid var(--bd); }
.es .ta-teil > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; min-height: 44px; padding: 10px 0; }
.es .ta-teil > summary::-webkit-details-marker { display: none; }
.es .ta-teil > summary::before { content: ""; width: 7px; height: 7px; flex: none; align-self: center; border: solid var(--muted);
                                 border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.es .ta-teil[open] > summary::before { transform: rotate(45deg); }
.es .ta-teil > summary:hover .ta-teil__t { color: var(--brand-dark); }
.es .ta-teil > summary:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 8px; }
.es .ta-teil__t { font-weight: 700; color: var(--ink); }
.es .ta-teil__k { font-size: 12.5px; color: var(--muted); }
.es .ta-teil__b { padding: 0 0 14px 17px; }
.es .ta-teil__b > .es-form + .es-form { margin-top: 10px; }
.es .ta-teil__b > .es-form.es-gefahrzone { margin-top: 18px; }

/* Klickfolge: nummerierte Kreise, ein Schritt je Zeile */
.es .es-schritte { counter-reset: es-s; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.es .es-schritte > li { counter-increment: es-s; position: relative; padding: 2px 0 2px 38px; line-height: 1.5; min-width: 0; }
.es .es-schritte > li::before { content: counter(es-s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--brand); color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.es .es-schritte code { font-size: 12.5px; }

/* ------------------------------------------------------------------ Einrichtung (Paket A) */
.es .tfe-schritte { gap: 0; }
.es .tfe-schritte > li { padding: 12px 0 14px 40px; border-top: 1px solid var(--bd); }
.es .tfe-schritte > li:first-child { border-top: 0; padding-top: 2px; }
.es .tfe-schritte > li::before { top: 12px; }
.es .tfe-schritte > li:first-child::before { top: 2px; }
.es .tfe-schritte > li.tfe-s--ok::before { background: var(--success); color: var(--paper); }
.es .tfe-schritte > li.tfe-s--offen::before { background: var(--accent); color: var(--accent-ink); }
.es .tfe-schritte > li.tfe-s--wartet::before { background: var(--g-glass-press); color: var(--muted); }
.es .tfe-schritte > li.tfe-s--fehler::before { background: var(--danger); color: var(--paper); }
.es .tfe-schritte > li:target, .es .tfe-schritte > li.tfe-s--blick { background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: var(--g-r-sm); }
.es .tfe-s__kopf { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.es .tfe-s__t { font-weight: 700; color: var(--ink); }
.es .tfe-s__x { margin: 4px 0 0; color: var(--ink-2); max-width: 68ch; overflow-wrap: anywhere; }
.es .tfe-s__weiter { margin: 6px 0 0; max-width: 68ch; color: var(--ink); }
.es .tfe-s__weiter b { font-weight: 700; }
.es .tfe-s__knoepfe { margin-top: 8px; }
.es .tfe-befehl { margin-top: 10px; display: grid; gap: 4px; min-width: 0; }
.es .tfe-befehl__k { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.es .tfe-befehl__t { font-weight: 600; font-size: 13px; color: var(--ink); }
.es .tfe-befehl__wo { font-size: 12px; color: var(--muted); }
.es .tfe-befehl__zeile { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.es .tfe-befehl__zeile .es-code { flex: 1; min-width: 0; margin: 0; }
.es .tfe-befehl__zeile .btn { flex: none; }
.es .tfe-ergebnis { margin: 10px 0 0; display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; max-width: 68ch; }
.es .tfe-ergebnis:empty { display: none; }

/* Verbindung › Telefonanlage: Stand, Knopf, Fortschritt mit Protokoll */
.es .tfe-upd { display: grid; gap: 12px; min-width: 0; }
.es .tfe-upd > * { margin: 0; }
.es .tfe-upd .es-dl { margin: 0; }
.es .tfe-upd__kurz { margin-left: 8px; font: 11.5px/1 var(--mono); color: var(--muted); }
.es .tfe-upd__knoepfe { align-items: center; flex-wrap: wrap; }
.es .tfe-upd__sperre { font-size: 12.5px; color: var(--ink-2); max-width: 46ch; }
.es .tfe-upd__ok { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: var(--g-r-sm); font-size: 13px;
                   line-height: 1.45; color: var(--ink); background: var(--success-bg);
                   border: 1px solid color-mix(in srgb, var(--success) 35%, transparent); max-width: 68ch; }
.es .tfe-upd__ok .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--success); }
.es .tfe-upd__lauf { display: flex; gap: 10px; align-items: flex-start; }
.es .tfe-upd__lauf > div { display: grid; gap: 2px; }
.es .tfe-upd__lauf > div > span { font-weight: 700; }
.es .tfe-upd__lauf .kreisel { margin-top: 2px; }
.es .tfe-upd__log { margin-top: 0; }
.es .tfe-upd__pre { max-height: 300px; overflow: auto; margin: 0 0 4px 17px; white-space: pre-wrap; word-break: break-word; }

/* Mikrofon und Lautsprecher: Auswahl und Probeton in einer Zeile */
.es .tfe-ton { display: flex; gap: 8px; align-items: center; min-width: 0; }
.es .tfe-ton select.in { flex: 1; min-width: 0; }

/* Handy */
@media (max-width: 640px) {
  .es .es-dl { grid-template-columns: minmax(0, 1fr); gap: 0; } .es .es-dl dd { margin-bottom: 8px; }
  .es .es-akt { display: flex; flex-direction: column; align-items: flex-end; white-space: normal; }
  .es .es-akt > * + * { margin-left: 0; margin-top: 6px; }
  .es .tfe-befehl__zeile { flex-direction: column; align-items: stretch; }
  .es .tfe-befehl__zeile .btn { align-self: flex-start; }
}
@media (max-width: 560px) {
  .es .ta-teil__b, .es .es-mehr > .tfe-mehr__b { padding-left: 0; }
  .es .tfe-schritte > li { padding-left: 36px; }
  .es .tfe-upd__pre { margin-left: 0; }
}
/* Finger: Ziele mindestens 44 px – das Aussehen bleibt ruhig, nur die Trefferfläche wächst */
@media (pointer: coarse) {
  .es .btn, .es .btn--sm { height: 44px; padding: 0 14px; }
  .es .es-schalter { min-height: 44px; }
  .es .es-schalter input { width: 22px; height: 22px; }
  .es .in, .es input.in, .es select.in, .es select.es-wahl { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .es .es-mehr > summary::before, .es .ta-teil > summary::before { transition: none; }
  .es .btn, .es .es-todo__k { transition: none; }
}

/* ------------------------------------------------------------------ 3. Dialoge */
/* Meldungen (tfeSay) laufen über hinweis() in kern.js, Aussehen in stil.css (.hinweis). */

/* Frage-Dialog (tfeFrage) statt confirm(): bei Gefahr ist „Abbrechen“ vorausgewählt */
dialog.es-frage { border: 0; border-radius: 16px; padding: 20px 20px 16px; width: min(440px, calc(100vw - 32px)); max-width: none; background: var(--paper);
                  color: var(--ink); box-shadow: var(--frage-schatten), 0 0 0 1px var(--bd); font: 14px/1.45 var(--sans); }
dialog.es-frage::backdrop { background: var(--frage-grund); }
dialog.es-frage.es-frage--gefahr { box-shadow: var(--frage-schatten), 0 0 0 1px var(--bd), inset 0 4px 0 var(--danger); }
.es-frage .es-frage__t { margin: 0 0 6px; font: 700 17px/1.3 var(--sans); letter-spacing: -.01em; }
.es-frage .es-frage__x { margin: 0 0 18px; white-space: pre-line; color: var(--ink-2); line-height: 1.5; }
.es-frage .es-frage__k { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.es-frage .es-frage__k button { min-height: 40px; padding: 0 16px; border-radius: var(--k-r); font: 600 14px/1 var(--sans); cursor: pointer;
                                transition: background .12s, transform .1s; }
.es-frage .es-frage__nein { background: var(--k-weiss) border-box; color: var(--ink); border: 1px solid var(--k-weiss-rand); }
.es-frage .es-frage__nein:hover { background: var(--k-weiss-h) border-box; border-color: var(--bd-2); }
.es-frage .es-frage__nein:active { background: var(--k-weiss-p) border-box; transform: scale(.98); }
.es-frage .es-frage__ja { background: var(--k-rot) border-box; color: var(--brand-ink); border: 0; box-shadow: var(--k-rot-sch); }
.es-frage .es-frage__ja:hover { background: var(--k-rot) border-box; filter: brightness(1.06); }
.es-frage .es-frage__ja:active { background: var(--k-rot-p) border-box; box-shadow: var(--k-rot-sch-p); transform: scale(.98); }
.es-frage.es-frage--gefahr .es-frage__ja { background: var(--weh); color: var(--brand-ink); box-shadow: none; }
.es-frage.es-frage--gefahr .es-frage__ja:hover { background: var(--gefahr-hover); }
.es-frage.es-frage--gefahr .es-frage__ja:active { background: var(--gefahr-press); }
.es-frage .es-frage__k button:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
@media (max-width: 600px) {
  dialog.es-frage { margin: auto 0 0; width: 100vw; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .es-frage .es-frage__k button { flex: 1; min-height: 44px; }
}
