/* === Nachbau === -------------------------------------------------------------------------------------------------
   Nachgebaute Tool-Oberflächen (Microsoft-365- bzw. Google-artig, in arbeitswolke-Farben, keine echten Logos), die beim
   Hineinscrollen in Lesetempo abspielen. Steuerung: assets/nachbau.js. Anleitung: _recherche/nachbau-baukasten.md
   Bausteine:
     .nb.nb--admin            data-nb="admin"            Verwaltung: Konto anlegen, Punkte haken sich ab
     .nb.nb--chat             data-nb="chat"             Chat: Nachrichten, Tipp-Anzeige
     .nb.nb--mail             data-nb="mail"             Postfach: Mail kommt an, öffnet sich, Ampelzeilen (aufklappbar)
     .nb.nb--handy            data-nb="handy"            Handy: Anmelde-Abfrage, Push, Passwort-Manager, Warnung
     .nb.nb--liste            data-nb="liste"            Benutzer-/Geräte-/Domainliste mit Statuswechseln
     .nb.nb--umzug            data-nb="umzug"            Alt → Neu: Symbole wandern, Balken, Zähler „0 verloren“
     .nb.nb--wiederherstellen data-nb="wiederherstellen" Gelöschte Datei, Versionen, Wiederherstellen
     .nb.nb--bericht          data-nb="bericht"          Prüfbericht: Ampelpunkte, Gesamtwert füllt sich
     .nb.nb--kalender         data-nb="kalender"         Termin/Schulung erscheint, Teilnehmende sagen zu
   Google-Optik: data-nb-plattform="google" am .nb (weiße Leiste, runde Suche, Gmail-artige Zeilen).
   Schritte: [data-nb-schritt] (zeigen | tippen | haken | tippt | klick | wechsel | zaehlen | fuellen | flug | markieren).
   Grundzustand ohne JS (und bei ?bewegung=0 / prefers-reduced-motion) = Endzustand. Erst .nb--bereit (setzt das Skript)
   blendet die Schritte aus. Höhe: Bildschirm-Bausteine (Chat, Postfach, Handy) mindestens --nb-h, alle anderen nach
   Inhalt. Weil alle Schritte schon im DOM stehen (nur unsichtbar), ist die Höhe von Anfang an die des Endzustands
   → kein Layout-Shift. In einer Reihe (.nb-paar) werden die Rahmen per Subgrid gleich hoch. Animiert werden
   transform/opacity (Ring: stroke-dashoffset, Statusfarben: background/color). */

.nb {
  --nb-h: 400px;
  --nb-rand: #dfe5e2;
  --nb-leiste: var(--gruen-dunkel, #08493c);
  position: relative; display: flex; flex-direction: column;
  min-height: var(--nb-min, var(--nb-h)); overflow: hidden;
  background: #fff; border: 1px solid var(--nb-rand); border-radius: 14px; box-shadow: var(--schatten);
  font-size: 14px; line-height: 1.45; color: var(--text); text-align: left;
}
.nb *, .nb *::before, .nb *::after { box-sizing: border-box; }
/* Höhe nach Inhalt (keine Mindesthöhe) */
.nb--admin, .nb--liste, .nb--umzug, .nb--wiederherstellen, .nb--bericht, .nb--kalender { --nb-min: 0px; }
/* Chat: Verlauf steht unten (wie im echten Chat), wächst mit; nur kleine Mindesthöhe, damit er neben kurzen Rahmen nicht künstlich hoch wird */
.nb--chat { --nb-min: 320px; }
.nb b, .nb strong { color: var(--tinte); }
.nb p { margin: 0; }

/* Titelleiste (App-Leiste) */
.nb__leiste { flex: none; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; background: var(--nb-leiste); color: #fff; }
.nb__waffel { width: 14px; height: 14px; flex: none; background:
  radial-gradient(circle, rgba(255,255,255,.85) 1.4px, transparent 1.6px) 0 0 / 5px 5px; }
.nb__app { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb__suche { flex: 1; min-width: 0; max-width: 190px; height: 24px; margin-left: auto; border-radius: 6px; background: rgba(255,255,255,.14); }
.nb__beispiel { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tinte);
  background: var(--gelb); border-radius: 999px; padding: 1px 8px; }
.nb__ava { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--gruen-hell); color: var(--gruen-dunkel); }
.nb__ava--wir { background: var(--gruen); color: #fff; }
.nb__ava--gelb { background: var(--gelb-hell); color: #6b5310; }
.nb__koerper { flex: 1; min-height: 0; display: flex; position: relative; }
.nb__schiene { flex: none; width: 46px; background: var(--flaeche); border-right: 1px solid var(--nb-rand); display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 14px; }
.nb__schiene i { width: 18px; height: 18px; border-radius: 5px; background: #cfd8d4; }
.nb__schiene i.ist-an { background: var(--gruen); box-shadow: 0 0 0 4px var(--gruen-hell); }
.nb__inhalt { flex: 1; min-width: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.nb__pfad { font-size: 12px; color: var(--grau); }
.nb__titel { font-size: 17px; font-weight: 700; color: var(--tinte); line-height: 1.25; }
.nb .ic { width: 18px; height: 18px; vertical-align: -4px; }

/* Nochmal-Knopf (setzt das Skript ein, erscheint nach dem Abspielen). Sitzt in der Kopfleiste vor „Beispiel“
   (Platz ist immer reserviert → nichts springt, nichts wird verdeckt); beim Handy oben rechts über dem Gerät. */
.nb__nochmal { position: absolute; right: 10px; top: 10px; z-index: 5; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--gruen);
  background: #fff; border: 1px solid var(--nb-rand); border-radius: 999px; padding: 2px 11px; cursor: pointer; white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s, visibility 0s .4s; box-shadow: 0 2px 8px rgba(20,40,35,.12); }
.nb__leiste > .nb__nochmal { position: static; flex: none; box-shadow: none; margin-left: auto; }
.nb__leiste > .nb__suche + .nb__nochmal { margin-left: 0; }
.nb__nochmal::before { content: "Nochmal"; }
.nb--fertig .nb__nochmal { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .4s; }
.nb__nochmal:hover { background: var(--gruen-hell); }
.nb__nochmal:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

/* Tipp-Kreis (Klick-Schritt) */
.nb-tap { position: absolute; z-index: 6; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  background: rgba(244,200,74,.55); box-shadow: 0 0 0 2px rgba(11,101,83,.5); animation: nbTap .9s ease-out forwards; }
@keyframes nbTap { 0% { transform: scale(.4); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

/* --- Schritte: Grundzustand = sichtbar. Nur mit .nb--bereit ausgeblendet. --- */
.nb [data-nb-schritt] { transition: opacity .5s ease, transform .5s ease; }
.nb--bereit [data-nb-schritt="zeigen"]:not(.nb-an),
.nb--bereit [data-nb-schritt="tippt"]:not(.nb-an),
.nb--bereit [data-nb-schritt="tippen"]:not(.nb-an):not(.nb-laeuft) { opacity: 0; transform: translateY(8px); }

/* ======================= Verwaltung (Admin) ======================= */
.nb-admin__form { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; border: 1px solid var(--nb-rand); border-radius: 10px; padding: 10px 12px; }
.nb-admin__form .nb__ava { grid-row: span 2; width: 38px; height: 38px; font-size: 13px; }
.nb-admin__feld { min-height: 22px; font-weight: 700; color: var(--tinte); font-size: 15px; white-space: nowrap; overflow: hidden; }
.nb-admin__feld.nb-laeuft::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--gruen); animation: nbCursor .8s steps(1) infinite; }
@keyframes nbCursor { 50% { opacity: 0; } }
.nb-admin__mail { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-admin__liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--nb-rand); border-radius: 10px; }
.nb-admin__liste li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--nb-rand); transition: background .5s; }
.nb-admin__liste li:first-child { border-top: 0; }
.nb-admin__liste small { font-size: 11.5px; font-weight: 700; color: var(--ok); white-space: nowrap; }
/* Status-Kreis: Endzustand = grüner Haken */
.nb-status { width: 20px; height: 20px; border-radius: 50%; position: relative; background: var(--ok); }
.nb-status::after { content: ""; position: absolute; left: 7px; top: 3.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.nb--bereit [data-nb-schritt="haken"]:not(.nb-an) .nb-status { background: #fff; border: 2px solid #cfd8d4; }
.nb--bereit [data-nb-schritt="haken"]:not(.nb-an) .nb-status::after { display: none; }
.nb--bereit [data-nb-schritt="haken"]:not(.nb-an) { color: var(--grau); }
.nb--bereit [data-nb-schritt="haken"]:not(.nb-an) b { color: var(--grau); font-weight: 600; }
.nb--bereit [data-nb-schritt="haken"]:not(.nb-an) small { opacity: 0; }
.nb [data-nb-schritt="haken"].nb-laeuft { background: var(--gruen-hell); }
.nb [data-nb-schritt="haken"].nb-laeuft .nb-status { border-color: var(--gruen); border-right-color: transparent; animation: nbDreh .7s linear infinite; }
.nb [data-nb-schritt="haken"].nb-an { animation: nbAufleuchten 1.2s ease; }
.nb [data-nb-schritt="haken"].nb-an .nb-status { animation: nbPlopp .4s ease; }
@keyframes nbDreh { to { transform: rotate(360deg); } }
@keyframes nbPlopp { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes nbAufleuchten { 0% { background: var(--gruen-hell); } 100% { background: transparent; } }
.nb-admin__fertig { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--gruen-hell); color: var(--gruen-dunkel); font-weight: 700; font-size: 13.5px; }

/* ======================= Chat ======================= */
.nb-chat__kopf { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--nb-rand); }
.nb-chat__kopf b { display: block; font-size: 14px; line-height: 1.2; }
.nb-chat__kopf span span { display: block; font-size: 11.5px; color: var(--ok); }
.nb-chat__verlauf { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 8px 14px 10px; background: var(--flaeche); }
.nb-chat__msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.nb-chat__msg .nb__ava { width: 24px; height: 24px; font-size: 10px; }
.nb-chat__blase { background: #fff; border: 1px solid var(--nb-rand); border-radius: 12px 12px 12px 4px; padding: 6px 11px; }
.nb-chat__blase small { display: block; font-size: 11px; line-height: 1.3; color: var(--grau); }
.nb-chat__msg--wir { align-self: flex-end; flex-direction: row-reverse; }
.nb-chat__msg--wir .nb-chat__blase { background: var(--gruen-hell); border-color: #c7e3d8; border-radius: 12px 12px 4px 12px; }
.nb-chat__ok { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.4; font-weight: 700; color: var(--gruen-dunkel); background: #fff; border: 1px solid #c7e3d8; border-radius: 999px; padding: 2px 12px; }
.nb-chat__tippt { position: absolute; left: 0; right: 0; bottom: 48px; height: 26px; padding: 0 14px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--grau); background: var(--flaeche); opacity: 0; transition: opacity .3s; }
.nb-chat__tippt i { width: 6px; height: 6px; border-radius: 50%; background: var(--gruen); animation: nbHuepf 1.1s infinite ease-in-out; }
.nb-chat__tippt i:nth-child(2) { animation-delay: .15s; } .nb-chat__tippt i:nth-child(3) { animation-delay: .3s; }
.nb--tippt .nb-chat__tippt { opacity: 1; }
@keyframes nbHuepf { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.nb-chat__eingabe { flex: none; margin: 0 12px 12px; height: 36px; border: 1px solid var(--nb-rand); border-radius: 8px; background: #fff; display: flex; align-items: center; padding: 0 12px; }
.nb-chat__eingabe i { width: 46%; height: 8px; border-radius: 4px; background: #e6ebe8; }

/* ======================= Postfach (Mail) ======================= */
.nb-mail__ordner { flex: none; display: flex; gap: 16px; padding: 10px 14px 0; border-bottom: 1px solid var(--nb-rand); font-size: 13px; font-weight: 600; color: var(--grau); }
.nb-mail__ordner span { padding-bottom: 8px; }
.nb-mail__ordner span:first-child { color: var(--tinte); box-shadow: inset 0 -2px 0 var(--gruen); }
.nb-mail__liste { list-style: none; margin: 0; padding: 0; }
.nb-mail__zeile { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--nb-rand); position: relative; }
.nb-mail__zeile .nb__ava { width: 30px; height: 30px; }
.nb-mail__zeile b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-mail__zeile > span { min-width: 0; }
.nb-mail__zeile span span { display: block; font-size: 12.5px; color: var(--grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-mail__zeile--neu { background: #f2f8f5; box-shadow: inset 3px 0 0 var(--gruen); }
.nb-mail__zeile--neu span span { color: var(--gruen-dunkel); font-weight: 700; }
.nb-mail__zeile time { font-size: 11.5px; color: var(--grau); align-self: start; }
.nb-mail__platzhalter { display: grid; gap: 6px; }
.nb-mail__platzhalter i { display: block; height: 8px; border-radius: 4px; background: #e6ebe8; width: 70%; }
.nb-mail__platzhalter i + i { width: 92%; background: #eff2f0; }
/* Lesebereich: liegt über der Liste (wie am Handy). Endzustand = offen. */
.nb-mail__lesen { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 14px; overflow: hidden;
  clip-path: inset(0 0 0 0); transition: clip-path .7s cubic-bezier(.2,.7,.2,1); }
.nb--bereit .nb-mail__lesen:not(.nb-an) { clip-path: inset(0 0 0 100%); }
.nb-mail__zurueck { font-size: 12px; color: var(--gruen); font-weight: 700; }
.nb-mail__betreff { font-size: 17px; font-weight: 700; color: var(--tinte); line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }  /* lange Betreffs: max. 2 Zeilen, dann „…“ */
.nb-mail__von { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--grau); }
.nb-mail__von .nb__ava { width: 26px; height: 26px; }
.nb-mail__von b { font-size: 13px; }
.nb-ampel { border: 1px solid var(--nb-rand); border-radius: 10px; background: #fff; }
.nb-ampel summary { list-style: none; display: grid; grid-template-columns: 12px 1fr 14px; gap: 10px; align-items: center; padding: 8px 12px; cursor: pointer; font-weight: 600; color: var(--tinte); font-size: 13.5px; }
.nb-ampel summary::-webkit-details-marker { display: none; }
.nb-ampel summary::after { content: ""; width: 8px; height: 8px; border: solid var(--grau); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .25s; }
.nb-ampel[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.nb-ampel summary:focus-visible { outline: 3px solid var(--gelb); outline-offset: 1px; border-radius: 10px; }
.nb-ampel__punkt { width: 12px; height: 12px; border-radius: 50%; }
.nb-ampel--gruen .nb-ampel__punkt { background: var(--ok); }
.nb-ampel--gelb .nb-ampel__punkt { background: var(--gelb); box-shadow: 0 0 0 1px #d9a92a inset; }
.nb-ampel--rot .nb-ampel__punkt { background: var(--rot); }
.nb-ampel--rot { border-color: #efc9c3; }
/* Neutrale Zeile ohne Ampel (Agenda, Themen): grauer Punkt; als <div class="nb-ampel nb-ampel--neutral"><p class="nb-ampel__zeile">…</p></div> auch ohne Aufklappen */
.nb-ampel--neutral .nb-ampel__punkt { background: #b5c0bb; width: 8px; height: 8px; justify-self: center; }
.nb-ampel__zeile { display: grid; grid-template-columns: 12px 1fr; gap: 10px; align-items: center; padding: 8px 12px !important; font-weight: 600; color: var(--tinte) !important; font-size: 13.5px !important; }
.nb-ampel p { margin: 0; padding: 0 12px 9px 34px; font-size: 13px; color: var(--text); }
.nb-mail__fuss { display: flex; gap: 8px; align-items: center; padding: 2px 12px; font-size: 12.5px; color: var(--grau); }
.nb-mail__fuss .ic { width: 16px; height: 16px; }

/* ======================= Gemeinsame Teile für neue Bausteine ======================= */
/* Rücksprung beim „Nochmal“ ohne Übergänge */
.nb--zurueck, .nb--zurueck *, .nb--zurueck *::before, .nb--zurueck *::after { transition: none !important; }
/* Statuspille: Farbe über data-ton (ok | gelb | rot | grau | aus), mit Schritt „wechsel“ umschaltbar */
.nb-pille { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 11.5px; font-weight: 700; line-height: 1.5; white-space: nowrap;
  border-radius: 999px; padding: 1px 9px 1px 8px; background: var(--flaeche); color: var(--grau); transition: background .45s, color .45s; }
.nb-pille::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b5c0bb; transition: background .45s; }
[data-ton="ok"].nb-pille { background: var(--gruen-hell); color: var(--gruen-dunkel); }
[data-ton="ok"].nb-pille::before { background: var(--ok); }
[data-ton="gelb"].nb-pille { background: var(--gelb-hell); color: #6b5310; }
[data-ton="gelb"].nb-pille::before { background: var(--gelb); box-shadow: 0 0 0 1px #d9a92a inset; }
[data-ton="rot"].nb-pille { background: var(--rot-hell, #fbe7e4); color: #9b3328; }
[data-ton="rot"].nb-pille::before { background: var(--rot); }
[data-ton="aus"].nb-pille { background: #e7ebe9; color: var(--tinte); }
[data-ton="aus"].nb-pille::before { background: var(--tinte); }
/* Ampelpunkt */
.nb-punkt { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #b5c0bb; transition: background .45s; }
[data-ton="ok"].nb-punkt { background: var(--ok); }
[data-ton="gelb"].nb-punkt { background: var(--gelb); box-shadow: 0 0 0 1px #d9a92a inset; }
[data-ton="rot"].nb-punkt { background: var(--rot); }
.nb [data-nb-schritt="wechsel"].nb-laeuft { animation: nbPlopp .45s ease; }
/* Balken (Schritt „fuellen“): Endwert --nb-wert 0…1 */
.nb-balken { display: block; height: 8px; border-radius: 4px; background: #e6ebe8; overflow: hidden; }
.nb-balken > i { display: block; height: 100%; border-radius: 4px; background: var(--gruen); transform-origin: left center;
  transform: scaleX(calc(var(--nb-wert, 1) * var(--nb-fuell, 1))); transition: transform var(--nb-lauf, .6s) linear; }
.nb--bereit [data-nb-schritt="fuellen"]:not(.nb-an) { --nb-fuell: 0; }
/* Flug-Symbol (Schritt „flug“, setzt das Skript ein) */
.nb-flug { position: absolute; left: 0; top: 0; z-index: 4; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 8px; pointer-events: none;
  background: #fff; border: 1px solid var(--nb-rand); box-shadow: 0 4px 12px rgba(20,40,35,.16); display: grid; place-items: center; }
.nb-flug .ic { width: 16px; height: 16px; }
/* Hinweiszeile unten (wie .nb-admin__fertig, auch für neue Bausteine) */
.nb-notiz { display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 10px; background: var(--gruen-hell); color: var(--gruen-dunkel); font-weight: 700; font-size: 13px; line-height: 1.35; }
.nb-notiz--gelb { background: var(--gelb-hell); color: #6b5310; }
/* Prüfmodus ?nachbau=halb: alles einfrieren */
.nb--halb, .nb--halb *, .nb--halb *::before, .nb--halb *::after { transition: none !important; }
.nb--halb .nb__nochmal { visibility: hidden; }
/* Prüfmodus ?nachbau=test: sofort Endzustand, keine Übergänge, keine Animationen */
.nb--test, .nb--test *, .nb--test *::before, .nb--test *::after { transition: none !important; animation: none !important; }

/* ======================= Handy ======================= */
.nb--handy { background: var(--flaeche); align-items: center; justify-content: flex-end; }
.nb--handy > .nb__beispiel { position: absolute; left: 12px; top: 12px; z-index: 5; }
.nb--handy .nb__nochmal { top: 10px; }
/* Handy ragt von unten in den Rahmen (oben Platz für „Beispiel“ und „Nochmal“). Wächst mit, wenn der Inhalt
   (z. B. zweizeiliger Titel) mehr Platz braucht, statt ihn abzuschneiden. */
.nb-handy { position: relative; flex: 1 0 auto; width: 250px; max-width: calc(100% - 24px); min-height: calc(var(--nb-h) - 42px); margin-top: 42px; border: 8px solid var(--tinte); border-bottom: 0; border-radius: 34px 34px 0 0;
  background: var(--gruen-hell); display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 14px; overflow: hidden; box-shadow: 0 10px 28px rgba(20,40,35,.16); }
.nb-handy::before { content: ""; position: absolute; left: 50%; top: 6px; width: 64px; height: 16px; margin-left: -32px; border-radius: 10px; background: var(--tinte); }
.nb-handy__status { display: flex; justify-content: space-between; align-items: center; height: 16px; padding: 0 6px; font-size: 11px; font-weight: 700; color: var(--tinte); }
.nb-handy__status i { width: 22px; height: 9px; border-radius: 3px; border: 1.5px solid var(--tinte); }
.nb-handy__uhr { margin: 6px 0 2px; text-align: center; font-size: 40px; font-weight: 300; line-height: 1; color: var(--tinte); letter-spacing: -.02em; }
.nb-handy__datum { margin-top: -6px; text-align: center; font-size: 12px; color: var(--grau); }
.nb-handy__karte { background: #fff; border-radius: 16px; padding: 11px 12px 12px; box-shadow: 0 4px 14px rgba(20,40,35,.12); display: grid; gap: 4px; }
.nb-handy__karte b { font-size: 14.5px; line-height: 1.3; }
.nb-handy__karte small { display: block; font-size: 11.5px; line-height: 1.35; color: var(--grau); overflow-wrap: anywhere; }
.nb-handy__app { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--grau); }
.nb-handy__app .ic { width: 16px; height: 16px; }
.nb-handy__karte--warn { box-shadow: inset 3px 0 0 var(--rot), 0 4px 14px rgba(20,40,35,.12); }
.nb-handy__knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.nb-handy__knopf { display: grid; place-items: center; height: 32px; border-radius: 999px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--nb-rand); color: var(--tinte); background: #fff; }
.nb-handy__knoepfe--eins { grid-template-columns: 1fr; }
.nb-handy__knopf--ja { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.nb-handy__knopf.nb-an { animation: nbDruck .5s ease; }
@keyframes nbDruck { 0% { transform: scale(1); } 40% { transform: scale(.92); } 100% { transform: scale(1); } }
.nb-handy__feld { display: grid; gap: 1px; padding: 5px 9px; border: 1px solid var(--nb-rand); border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--tinte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-handy__feld small { font-size: 10.5px; }
.nb-handy__feld span { min-height: 1.35em; }
.nb-handy__ok { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: #fff; font-weight: 700; font-size: 13.5px; line-height: 1.3; color: var(--gruen-dunkel); box-shadow: 0 4px 14px rgba(20,40,35,.1); }
.nb-handy__ok .nb-status { flex: none; }
.nb-handy__ok.nb-an .nb-status { animation: nbPlopp .45s ease; }
.nb-handy__ok--rot { color: #9b3328; }
.nb-handy__ok--rot .nb-status { background: var(--rot); }
.nb-handy__ok--rot .nb-status::after { left: 4px; top: 9px; width: 12px; height: 0; border-width: 0 0 2.2px 0; transform: none; }
.nb--bereit .nb-handy__karte[data-nb-schritt="zeigen"]:not(.nb-an) { transform: translateY(-24px); }

/* ======================= Liste (Benutzer, Geräte, Domains) ======================= */
.nb-liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--nb-rand); border-radius: 10px; }
.nb-liste__zeile { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--nb-rand); position: relative; }
.nb-liste__zeile:first-child { border-top: 0; }
.nb-liste__zeile .nb__ava { width: 28px; height: 28px; font-size: 10.5px; }
.nb-liste__zeile > .ic { justify-self: center; width: 20px; height: 20px; }
.nb-liste__zeile b { display: block; font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-liste__zeile small { display: block; font-size: 11.5px; line-height: 1.3; color: var(--grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-liste__zeile:has(> .nb-pille.nb-laeuft), .nb-liste__zeile.nb-laeuft { animation: nbAufleuchten 1.4s ease; }
/* Ziel eines Flugs (z. B. Nachfolge): Zusatzzeile vorher blass */
.nb--bereit .nb-liste__zeile[data-nb-schritt="flug"]:not(.nb-an) small { opacity: .3; }

/* ======================= Umzug (Alt → Neu) ======================= */
.nb-umzug { flex-direction: column; padding: 14px 16px; gap: 12px; }
.nb-umzug__buehne { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); align-items: stretch; }
.nb-umzug__pfeil { display: grid; place-items: center; }
.nb-umzug__pfeil::before { content: ""; width: 10px; height: 10px; border: solid var(--gruen); border-width: 0 2.5px 2.5px 0; transform: rotate(-45deg); }
.nb-umzug__fenster { min-width: 0; border: 1px solid var(--nb-rand); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; transition: opacity .6s, filter .6s; }
.nb-umzug__kopf { display: grid; gap: 0; padding: 6px 10px; border-bottom: 1px solid var(--nb-rand); background: var(--flaeche); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--grau); }
.nb-umzug__kopf b { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--tinte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-umzug__fenster--neu .nb-umzug__kopf { background: var(--gruen-hell); }
.nb-umzug__fenster ul { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; }
.nb-umzug__fenster li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 6px 7px; border-radius: 7px; font-size: 12.5px; color: var(--tinte); transition: opacity .5s, background .5s; }
.nb-umzug__fenster li .ic { width: 17px; height: 17px; }
.nb-umzug__fenster li > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-umzug__fenster li em { font-style: normal; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--grau); }
/* Endzustand: Alt blass, Neu voll. Während des Ablaufs: Alt normal, Neu-Zeilen blass bis zur Ankunft */
.nb-umzug__fenster--alt { opacity: .5; filter: grayscale(1); }
.nb--bereit:not(.nb--fertig) .nb-umzug__fenster--alt { opacity: 1; filter: none; }
.nb--bereit .nb-umzug__fenster--neu li[data-nb-schritt="flug"]:not(.nb-an):not(.nb-laeuft) { opacity: .35; }
.nb-umzug__fenster--neu li.nb-laeuft { background: var(--gruen-hell); }
.nb-umzug__fenster--neu li.nb-an { animation: nbAufleuchten 1.2s ease; }
.nb-umzug__stand { flex: none; display: grid; gap: 7px; padding: 9px 12px; border-radius: 10px; background: var(--flaeche); }
.nb-umzug__zahlen { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; font-size: 13px; color: var(--tinte); }
.nb-umzug__zahlen b { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; }
.nb-umzug__null { font-weight: 800; color: var(--ok); white-space: nowrap; }

/* ======================= Wiederherstellen ======================= */
.nb-wieder__datei { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--nb-rand); border-radius: 10px; }
.nb-wieder__datei .ic { width: 22px; height: 22px; }
.nb-wieder__datei b { display: block; font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .4s; }
.nb-wieder__datei small { display: block; font-size: 11.5px; color: var(--grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-wieder__datei:has([data-ton="rot"]) b { color: var(--grau); text-decoration: line-through; }
.nb-wieder__label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--grau); }
.nb-wieder__zeit { list-style: none; margin: 0; padding: 0 4px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: relative; }
.nb-wieder__zeit::before { content: ""; position: absolute; left: 10%; right: 10%; top: 14px; height: 2px; background: #dbe2df; }
.nb-wieder__zeit li { position: relative; display: grid; justify-items: center; align-content: start; gap: 5px; font-size: 11px; color: var(--grau); text-align: center; line-height: 1.25; }
.nb-wieder__zeit li > i { width: 14px; height: 14px; margin: 8px 0 3px; border-radius: 50%; background: #fff; border: 2px solid #b5c0bb; transition: all .35s; }
.nb-wieder__zeit li.nb-wieder__wahl > i { width: 20px; height: 20px; margin: 5px 0 0; background: var(--gruen); border-color: var(--gruen); box-shadow: 0 0 0 4px var(--gruen-hell); }
.nb-wieder__zeit li.nb-wieder__wahl { color: var(--tinte); font-weight: 700; }
.nb--bereit .nb-wieder__zeit li.nb-wieder__wahl[data-nb-schritt="klick"]:not(.nb-an) > i { width: 14px; height: 14px; margin: 8px 0 3px; background: #fff; border-color: #b5c0bb; box-shadow: none; }
.nb--bereit .nb-wieder__zeit li.nb-wieder__wahl[data-nb-schritt="klick"]:not(.nb-an) { color: var(--grau); font-weight: 400; }
.nb-wieder__aktion { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.nb-knopf { display: inline-grid; place-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--gruen); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.nb-knopf--rand { background: #fff; color: var(--gruen); border: 1px solid var(--gruen); }
.nb-knopf.nb-an { animation: nbDruck .5s ease; }

/* ======================= Prüfbericht ======================= */
.nb-bericht__kopf { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: center; }
.nb-ring { position: relative; width: 92px; height: 92px; }
.nb-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.nb-ring circle { fill: none; stroke-width: 10; }
.nb-ring__grund { stroke: #e6ebe8; }
.nb-ring__wert { stroke: var(--gruen); stroke-linecap: round; stroke-dasharray: 100 100;
  stroke-dashoffset: calc(100 - 100 * var(--nb-wert, 1) * var(--nb-fuell, 1)); transition: stroke-dashoffset var(--nb-lauf, .6s) ease-out; }
.nb-ring__zahl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.nb-ring__zahl b { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 22px; }
.nb-ring__zahl small { justify-self: center; max-width: 60px; font-size: 10px; line-height: 1.15; color: var(--grau); overflow-wrap: anywhere; hyphens: auto; }  /* Unterzeile bricht im Ring um statt überzulaufen */
.nb-bericht__kopf p b { display: block; font-size: 15px; line-height: 1.25; }
.nb-bericht__kopf p small { display: block; font-size: 12px; line-height: 1.35; color: var(--grau); }
.nb-bericht__liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--nb-rand); border-radius: 10px; }
.nb-bericht__liste li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--nb-rand); font-size: 13px; }
.nb-bericht__liste li:first-child { border-top: 0; }
.nb-bericht__liste li > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tinte); font-weight: 600; }
.nb-bericht__liste small { font-size: 11.5px; color: var(--grau); white-space: nowrap; }

/* ======================= Kalender ======================= */
.nb-kal__woche { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--nb-rand); border-radius: 10px; overflow: hidden; }
.nb-kal__tag { display: grid; justify-items: center; gap: 1px; padding: 5px 2px; font-size: 11px; color: var(--grau); border-left: 1px solid var(--nb-rand); background: var(--flaeche); }
.nb-kal__tag:first-child { border-left: 0; }
.nb-kal__tag b { font-size: 13.5px; color: var(--tinte); width: 24px; height: 24px; display: grid; place-items: center; }
.nb-kal__tag.ist-heute b { color: #fff; background: var(--gruen); border-radius: 50%; }
.nb-kal__flaeche { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: start; min-height: 70px; padding: 8px 0;
  background: repeating-linear-gradient(to bottom, #fff 0 23px, #eef2f0 23px 24px); }
.nb-kal__termin { grid-column: var(--nb-tag, 2) / span var(--nb-breite, 2); margin: 0 4px; padding: 6px 9px; border-radius: 8px; background: var(--gruen); color: #fff; box-shadow: 0 3px 10px rgba(11,101,83,.25); min-width: 0; }
.nb-kal__termin b { display: block; color: #fff; font-size: 12.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-kal__termin small { display: block; font-size: 11px; color: #dff0e9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ======================= Google-Optik (data-nb-plattform="google") ======================= */
.nb[data-nb-plattform="google"] { --nb-leiste: #fff; }
.nb[data-nb-plattform="google"] .nb__leiste { color: var(--tinte); border-bottom: 1px solid var(--nb-rand); }
.nb[data-nb-plattform="google"] .nb__waffel { background: radial-gradient(circle, rgba(31,44,46,.6) 1.4px, transparent 1.6px) 0 0 / 5px 5px; }
.nb[data-nb-plattform="google"] .nb__app { font-weight: 600; font-size: 14.5px; color: var(--grau); }
.nb[data-nb-plattform="google"] .nb__suche { height: 28px; max-width: 220px; border-radius: 999px; background: var(--flaeche); }
.nb[data-nb-plattform="google"] .nb__schiene { background: #fff; border-right: 0; gap: 10px; }
.nb[data-nb-plattform="google"] .nb__schiene i { width: 30px; height: 16px; border-radius: 999px; background: #e3e8e6; }
.nb[data-nb-plattform="google"] .nb__schiene i.ist-an { background: var(--gruen-hell); box-shadow: 0 0 0 2px #c7e3d8; }
.nb[data-nb-plattform="google"] .nb__titel { font-weight: 600; font-size: 18px; }
.nb[data-nb-plattform="google"] .nb-admin__liste,
.nb[data-nb-plattform="google"] .nb-liste,
.nb[data-nb-plattform="google"] .nb-admin__form { border-radius: 12px; }
/* Postfach Gmail-artig: Reiter als Pille, gelesene Zeilen grau hinterlegt, ungelesene weiß und fett */
.nb[data-nb-plattform="google"] .nb-mail__ordner { border-bottom: 0; gap: 8px; padding: 8px 12px 6px; }
.nb[data-nb-plattform="google"] .nb-mail__ordner span { padding: 3px 12px; border-radius: 999px; }
.nb[data-nb-plattform="google"] .nb-mail__ordner span:first-child { box-shadow: none; background: var(--gruen-hell); color: var(--gruen-dunkel); }
.nb[data-nb-plattform="google"] .nb-mail__zeile { background: var(--flaeche); border-bottom-color: #e8edea; padding: 9px 14px; }
.nb[data-nb-plattform="google"] .nb-mail__zeile--neu { background: #fff; box-shadow: none; }
.nb[data-nb-plattform="google"] .nb-mail__zeile--neu b { font-weight: 800; }
.nb[data-nb-plattform="google"] .nb-mail__betreff { font-weight: 500; font-size: 19px; }
/* Chat Google-artig: runde Blasen ohne Rand */
.nb[data-nb-plattform="google"] .nb-chat__verlauf { background: #fff; }
.nb[data-nb-plattform="google"] .nb-chat__blase { border: 0; background: var(--flaeche); border-radius: 18px; }
.nb[data-nb-plattform="google"] .nb-chat__msg--wir .nb-chat__blase { background: var(--gruen-hell); border-radius: 18px; }
.nb[data-nb-plattform="google"] .nb-chat__tippt { background: #fff; }
.nb[data-nb-plattform="google"] .nb-chat__eingabe { border-radius: 999px; background: var(--flaeche); border-color: transparent; }

/* ======================= Anordnung auf der Seite ======================= */
.nb-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 0 0 22px; }
/* Rahmen einer Reihe gleich hoch (so hoch wie der höchste Inhalt, keine Mindesthöhe), Bildunterschriften darunter bündig */
.nb-paar > .nb-szene { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
.nb-paar > .nb-szene > .nb { align-self: stretch; }
.nb-paar > .nb-szene > figcaption { align-self: start; }
/* Gemischte Reihe (Nachbau neben Tabelle o. Ä.): kein Subgrid, der Rahmen behält seine eigene Höhe */
.nb-paar:has(> :not(.nb-szene)) > .nb-szene { display: block; grid-row: auto; align-self: start; }
/* Drei Nachbauten nebeneinander (breite Bildschirme), mittelbreit zwei Spalten + einer darunter, mobil untereinander */
.nb-paar--drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1080px) {
  .nb-paar--drei { grid-template-columns: 1fr 1fr; }
  .nb-paar--drei > .nb-szene:nth-child(3) { grid-column: 1 / -1; max-width: 460px; width: 100%; justify-self: center; }
}
.nb-szene { margin: 0; min-width: 0; }
.nb-szene figcaption { margin-top: 10px; font-size: .95rem; color: var(--text); display: flex; gap: 8px; align-items: flex-start; }
.nb-szene figcaption .ic { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.nb-szene figcaption b { color: var(--tinte); }
@media (max-width: 860px) {
  .nb-paar { grid-template-columns: 1fr; gap: 26px; }
  .nb-paar > .nb-szene { display: block; grid-row: auto; }
  .nb-szene { max-width: 460px; width: 100%; margin: 0 auto; }
  .nb--mail { --nb-h: 350px; }
  .nb-paar--drei { grid-template-columns: 1fr; }
  .nb-paar--drei > .nb-szene:nth-child(3) { grid-column: auto; }
}
@media (max-width: 420px) {
  .nb { font-size: 13.5px; }
  .nb__suche { display: none; }
  .nb__schiene { display: none; }
  .nb__inhalt { padding: 12px; }
  .nb-chat__msg { max-width: 92%; }
  .nb-umzug { padding: 12px; }
  .nb-umzug__buehne { grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); }
  .nb-umzug__fenster li { grid-template-columns: 16px minmax(0, 1fr); padding: 5px; gap: 2px 6px; font-size: 12px; }
  .nb-umzug__fenster li em { grid-column: 2; }
  .nb-bericht__kopf { grid-template-columns: 80px minmax(0, 1fr); }
  .nb-ring { width: 80px; height: 80px; }
  .nb-ring__zahl small { max-width: 52px; }
  .nb__leiste > .nb__suche + .nb__nochmal { margin-left: auto; }
}

/* Kacheln (aw.css .ws-kacheln, 3 Spalten): bei genau 2 Kacheln 2 Spalten statt leerer dritter Spalte */
@media (min-width: 901px) {
  .ws-kacheln:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
}

/* Vergleich ?nachbau=0: alte Fassung (Vorlage) – nichts zu tun, das Skript tauscht die Blöcke */
@media (prefers-reduced-motion: reduce) {
  .nb *, .nb *::before, .nb *::after { animation: none !important; transition: none !important; }
}
@media print { .nb { height: auto; } .nb__nochmal { display: none; } }
/* === Ende Nachbau === */
/* Kürzel in Avataren sind Deko (kein Inhaltstext) → per CSS */
.nb__ava[data-i]::before { content: attr(data-i); }
.nb-mail__koerper { flex: 1; min-width: 0; position: relative; }

/* Etikett „Beispiel“ entfernt (Carlo 06.11.2026) – falls noch irgendwo im HTML: ausblenden */
.nb__beispiel { display: none !important; }

/* arbeitswolke als Person: Zinos Foto statt „aw“-Kreis (nachbau.js fotos()) */
.nb__ava--foto { background: var(--gruen-hell); overflow: hidden; padding: 0; }
.nb__ava--foto::before { content: none !important; }
.nb__ava--foto img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
.nb-chat__kopf .nb__ava--foto { width: 32px; height: 32px; }
.nb-chat__msg .nb__ava--foto { width: 28px; height: 28px; }
