/* Update aus dem Hub (updatekarte.js, Entwurf 82: Karte U1, Band aus U3).
   Grün (--gut) heißt hier „Neues liegt bereit“ – dieselbe Farbe wie „eingerichtet“ in der Übersicht, nicht Ziegelrot:
   Ein Update ist eine gute Nachricht, keine Warnung. */
:root {
  --up-gut-text: var(--gut);
  --up-gut-grund: color-mix(in srgb, var(--gut) 8%, var(--flaeche));
  /* Unter dem Logo, das aus der Hub-Leiste ragt, frei lassen: Die Leiste ist --hub-hoehe (58 px) hoch, das Logo
     reicht bis etwa 71 px. Das Band beginnt deshalb erst gut darunter (Oberkante ≥ ~84 px), sonst klebte es links
     am Logo. */
  --up-band-oben: 26px;
}
/* --gut ist für Flächen gedacht (weiße Schrift darauf); als Schrift auf dunklem Grund wäre es zu schwach (< 4,5:1). */
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) { --up-gut-text: #8CC79A; --up-gut-grund: color-mix(in srgb, var(--gut) 18%, var(--flaeche)); }
}

/* ---- Karte (Einstellungen › System › Update) ---- */
.up-karte { display: grid; gap: 14px; font-size: 14px; max-width: 760px; }
.up-karte > .laden { padding: 24px 0; text-align: left; }
.up-karte .meldung { margin: 0; }
.up-karte .hilfe { margin: 0; }
.up-zeile { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.up-zeile b { font-size: 15px; }
.up-stand { font-family: var(--mono); font-size: 13px; color: var(--leise); }
.up-reihe { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
/* Touch-Ziel ≥ 40 px: der Knopf, auf den es ankommt, darf nicht so klein sein wie die übrigen knopf--klein. */
.up-karte .knopf--klein { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.up-karte .up-los { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.up-aktuell { color: var(--up-gut-text); font-weight: 700; display: inline-flex; align-items: center; gap: 7px; }
.up-aktuell::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.up-neu { display: grid; gap: 10px; border: 2px solid var(--gut); border-radius: 12px; padding: 12px 14px; background: var(--up-gut-grund); }
.up-neu .up-zeile b { color: var(--up-gut-text); }

/* Zwei Kästchen mit Pfeil (Entwurf 129 B): links läuft (Mulde), rechts kommt (grüner Rahmen). Das rechte ist ein Knopf
   und klappt darunter die Liste der Versionen auf. Zurück auf eine ältere: Anthrazit statt Grün – kein Fehler, aber
   auch keine gute Nachricht wie ein Update. */
.up-wahl { display: grid; gap: 12px; }
.up-paar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
/* Das rechte ist ein <button>: Die allgemeine Knopfregel zentriert und setzt Mindesthöhe und Schatten – hier nicht. */
.up-kasten { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  gap: 2px; min-width: 0; min-height: 0; margin: 0; padding: 12px 16px; border-radius: 12px; box-shadow: none;
  text-align: left; font: inherit; font-weight: 400; color: var(--tinte); }
.up-kasten--jetzt { background: var(--sand); border: 2px solid transparent; }
.up-kasten--ziel { background: var(--up-gut-grund); border: 2px solid var(--gut); }
button.up-kasten--ziel { cursor: pointer; }
button.up-kasten--ziel:hover { filter: brightness(.98); }
button.up-kasten--ziel:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.up-kasten--zurueck { border-color: var(--hinw-rand); background: var(--sand); }
.up-kasten__was { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--leise); }
.up-kasten--ziel:not(.up-kasten--zurueck) :is(.up-kasten__was, .up-kasten__nr) { color: var(--up-gut-text); }
.up-kasten__nr { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.up-kasten__wann { font-size: 13px; color: var(--leise); }
.up-kasten__auf { position: absolute; top: 12px; right: 14px; font-size: 12px; font-weight: 700; color: var(--up-gut-text); }
.up-kasten--zurueck .up-kasten__auf { color: var(--tinte); }
.up-pfeil { display: grid; place-items: center; color: var(--up-gut-text); }
.up-paar--zurueck .up-pfeil { color: var(--tinte); }
.up-pfeil svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) {
  .up-paar { grid-template-columns: minmax(0, 1fr); }
  .up-pfeil svg { transform: rotate(90deg); }
}

.up-liste { display: grid; border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; background: var(--flaeche); }
.up-liste__z { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  min-height: 44px; padding: 8px 14px; border: 0; border-top: 1px solid var(--linie); background: none;
  font: inherit; font-size: 13.5px; color: var(--tinte); text-align: left; }
.up-liste__z:first-child { border-top: 0; }
button.up-liste__z { cursor: pointer; }
button.up-liste__z:hover { background: var(--sand); }
button.up-liste__z:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.up-liste__z b { font-size: 15px; }
.up-liste__neu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--leise); }
.up-liste__z--gewaehlt { background: var(--up-gut-grund); }
.up-liste__z--gewaehlt b { color: var(--up-gut-text); }
.up-liste__z--laeuft { background: var(--sand); }
.up-liste__z--zu { color: var(--leise); cursor: not-allowed; }
.up-liste__z--zu .up-liste__neu { white-space: normal; }   /* der Grund muss ganz lesbar sein, auch schmal */
.up-liste__z--zu b { color: var(--leise); font-weight: 600; }

/* Mulde (Entwurf 119): vertieft in warmem Grau statt Creme */
.up-lauf { display: grid; gap: 10px; border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; background: var(--sand); box-shadow: var(--umsch-sch); }
.up-lauf .kreisel { border-top-color: var(--gut); }
.up-balken { height: 8px; border-radius: 999px; background: var(--linie); overflow: hidden; }
/* scaleX statt width: der Balken wächst ohne Neuberechnung des Layouts (flüssig, auch auf dem iPad). */
.up-balken i { display: block; height: 100%; width: 100%; background: var(--gut); border-radius: 999px; transform-origin: left center;
  transform: scaleX(0); transition: transform 1.2s linear; }
@media (prefers-reduced-motion: reduce) { .up-balken i { transition: none; } }
.up-log { font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--leise); white-space: pre-wrap; word-break: break-word;
  margin: 0; max-height: calc(30 * 1.55em); overflow: auto; }   /* 30 Zeilen (UP_LOG_ZEILEN) ohne Scrollen */
.up-fehler { display: grid; gap: 8px; }
.up-fehler .up-log { border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; background: var(--grund); color: var(--tinte); }
.up-zuletzt { font-size: 12.5px; }

/* ---- Band oben im Hub (nur Admins), direkt nach #hubleiste, scrollt mit ---- */
/* Seitlich wie der Inhalt des Hubs (.hub: clamp(14px, 2.4vw, 40px)) und rechts frei für den Streifen, wie #seite —
   sonst stünde das Band breiter als alles darunter und liefe unter die Schiene. */
.up-band { --up-band-seite: clamp(14px, 2.4vw, 40px);
  display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; box-sizing: border-box;
  margin: var(--up-band-oben) var(--up-band-seite) 0; padding: 10px 12px 10px 16px;
  border-radius: 12px; background: var(--gut); color: #fff; font-size: 14px; line-height: 1.4; }
.up-band__text { flex: 1 1 260px; min-width: 0; }
.up-band__knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
/* Entwurf 103 B: ein Band für Hub und Telefonanlage, dazwischen ein Punkt. Ohne Zeichen davor (Marcel 01.12.2026: das
   Bildschirm-Zeichen war unverständlich, und als inline-flex saß der Text daneben zu hoch). Die Teile laufen als
   normaler Text in der Zeile mit, so steht alles auf einer Schriftlinie. */
.up-band__teil { font-weight: 700; }
.up-band__trenn { padding: 0 6px; opacity: .6; }
.up-band__klein { display: block; margin-top: 2px; font-size: 12.5px; opacity: .92; }
.up-band button { min-height: 40px; padding: 0 14px; border-radius: var(--rund); font-weight: 800; font-size: 13.5px; }
.up-band__los { background: #fff; color: #2E5E3A; border: 0; }
.up-band__los:hover { background: #F1F7F2; border: 0; }
.up-band__spaeter { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }
.up-band__spaeter:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.up-band button:active { transform: translateY(1px); }
.up-band button:focus-visible { outline-color: #fff; }
html.mit-streifen .up-band { margin-right: calc(var(--up-band-seite) + var(--schiene, 84px)); }
html.mit-streifen.streifen-auf .up-band { margin-right: calc(var(--up-band-seite) + var(--schiene, 84px) + var(--streifenfeld, 360px)); }
@media (max-width: 900px) {
  html.mit-streifen .up-band, html.mit-streifen.streifen-auf .up-band { margin-right: var(--up-band-seite); }
}
@media (max-width: 600px) {
  .up-band__knoepfe { width: 100%; }
  .up-band__knoepfe button { flex: 1 1 auto; padding: 0 10px; white-space: nowrap; }
}
