/* Depot – Gestaltung „Werkbank“ (seit 1.1.0): Fachprogramm statt Vorlage. Liegt nach neu.css und überschreibt dessen Token und die Gestalt der
   Bausteine; die Seiten selbst bleiben unberührt. Grundsätze: flach (Haarlinie statt Schatten), kleine Rundung, ein Blau nur für Handlung und Fokus,
   Zustand durch Wort und Farbe der Schrift (nie Farbfläche), Zahlen tabellarisch, Tabellen am PC statt Kacheln. */

:root {
  --grund: #F3F4F6; --flaeche: #FFFFFF; --feld: #E9EBEF; --linie: #DADDE3; --strich: #BFC4CC;
  --text: #15181D; --text2: #454B55; --leise: #5F6671;
  --akzent: #1E5BC6; --auf-akzent: #FFFFFF; --blau: #1E5BC6;
  --rot: #B3261E; --rot-hell: #FBE4E1; --gruen: #1B7A4B; --gelb: #8A5A00; --gelb-hell: #FCEFD4;
  --d1: #1E5BC6; --d2: #6F95D8; --d3: #A9BFE6; --d4: #D3DDF1; --drest: #D5D8DE;
  --hoehe: none; --hoehe-hoch: 0 1px 2px rgba(20, 24, 29, .12);
  --glas: var(--flaeche);
  --r: 8px; --r-k: 6px; --r-f: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --grund: #14171B; --flaeche: #1C2025; --feld: #262B32; --linie: #2D333B; --strich: #444C57;
    --text: #EEF0F3; --text2: #C3C8D0; --leise: #98A0AB;
    --akzent: #6EA2F5; --auf-akzent: #0B1220; --blau: #6EA2F5;
    --rot: #F28B82; --rot-hell: #3A1D1B; --gruen: #5BC48A; --gelb: #EDB85A; --gelb-hell: #33280F;
    --d1: #6EA2F5; --d2: #4A78C0; --d3: #345587; --d4: #27374F; --drest: #343B44;
    --hoehe: none; --hoehe-hoch: 0 1px 2px rgba(0, 0, 0, .5);
  }
}
:root[data-thema="dunkel"] {
  --grund: #14171B; --flaeche: #1C2025; --feld: #262B32; --linie: #2D333B; --strich: #444C57;
  --text: #EEF0F3; --text2: #C3C8D0; --leise: #98A0AB;
  --akzent: #6EA2F5; --auf-akzent: #0B1220; --blau: #6EA2F5;
  --rot: #F28B82; --rot-hell: #3A1D1B; --gruen: #5BC48A; --gelb: #EDB85A; --gelb-hell: #33280F;
  --d1: #6EA2F5; --d2: #4A78C0; --d3: #345587; --d4: #27374F; --drest: #343B44;
  --hoehe: none; --hoehe-hoch: 0 1px 2px rgba(0, 0, 0, .5);
}

body { font-size: 15px; }
::selection { background: var(--akzent); color: var(--auf-akzent); }

/* ---------- Hülle ---------- */
.leiste { left: 0; right: 0; bottom: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; border-top: 1px solid var(--linie); background: var(--flaeche);
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.leiste a { min-height: 52px; border-radius: var(--r-k); font-size: 11.5px; }
.leiste a[aria-current="page"] { background: none; color: var(--akzent); font-weight: 600; }
:root { --leiste-h: 66px; }
@media (min-width: 900px) {
  .huelle { grid-template-columns: 232px minmax(0, 1fr); }
  .leiste { padding: 20px 12px; border-top: 0; border-right: 1px solid var(--linie); background: var(--flaeche); }
  .leiste .marke { padding: 2px 10px 22px; font-size: 16px; }
  .leiste .marke img { border-radius: 6px; }
  .leiste a { min-height: 44px; padding: 0 12px; font-size: 14.5px; font-weight: 500; color: var(--text2); }
  .leiste a:hover { background: var(--feld); }
  .leiste a[aria-current="page"] { background: var(--feld); color: var(--text); font-weight: 600; }
  .leiste a[aria-current="page"] svg { color: var(--akzent); }
  .inhalt { padding: 0 32px 48px; }
  .seite { max-width: 1120px; margin: 0; }
  .auswahlleiste { left: 264px; right: 32px; justify-content: flex-start; margin: 0; }
  /* Hauptaktion am PC oben rechts neben dem Titel statt schwebend unten */
  .seite { position: relative; }
  .aktion { position: absolute; z-index: 5; top: 22px; right: 0; left: auto; bottom: auto; max-width: none; margin: 0; justify-content: flex-end; }
  .aktion > * { flex: none; min-width: 132px; max-width: none; box-shadow: none; }
  .seite:has(.aktion) { padding-bottom: 0; }
  .spieler-mini { left: 264px; right: 32px; }
}

/* ---------- Kopf ---------- */
.kopf { padding: 22px 0 4px; }
.kopf h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.kopf p { margin-top: 3px; font-size: 14px; }

/* ---------- Gruppe und Zeile: Tafel mit Haarlinie, Überschrift in Textfarbe ---------- */
.gruppe { margin-top: 20px; }
.gruppe > h2 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: 0; }
.liste { border: 1px solid var(--linie); border-radius: var(--r); box-shadow: none; }
.zeile { min-height: 48px; padding: 8px 16px; font-size: 15px; }
.zeile .text b { font-weight: 500; }
.zeile .text small { font-size: 13px; }
.zeile .wert { font-size: 14px; }
a.zeile:hover, button.zeile:hover { background: var(--grund); }
.zeile .vorn { color: var(--leise); }

/* Aktionswort rechts in einer Zeile (statt Pfeil): „Installieren“, „Einrichten“ */
.zeile .tat { flex: none; min-width: 112px; padding: 7px 14px; border: 1px solid var(--strich); border-radius: var(--r-k); background: var(--flaeche); color: var(--text); font-size: 14px; font-weight: 500; text-align: center; }
.zeile .tat.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
a.zeile:hover .tat:not(.haupt) { background: var(--feld); }
.zeile .zustand { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--leise); }
.zeile .zustand.rot { background: var(--rot); }
.zeile .zustand.gelb { background: var(--gelb); }
.zeile .zustand.gruen { background: var(--gruen); }

/* ---------- Befund: eine Tafel, Zustand in der Schrift, keine Farbfläche ---------- */
.befund { border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); padding: 12px 16px; }
.befund.gelb { background: var(--flaeche); }
.befund b { font-size: 15px; }
.befund small { font-size: 13px; }
.sammel .befund { padding: 12px 16px; }

/* ---------- Kacheln: eine Tafel, Trennung durch 1 px Fuge; Handy zwei je Reihe, PC alle in einer Reihe ---------- */
.kacheln { gap: 1px; border: 1px solid var(--linie); border-radius: var(--r); background: var(--linie); overflow: hidden; margin-top: 16px; }
.kachel { justify-content: flex-start; gap: 4px; border-radius: 0; background: var(--flaeche); box-shadow: none; min-height: 82px; padding: 12px 16px; }
.kacheln > .kachel:last-child:nth-child(odd) { grid-column: 1 / -1; }
a.kachel:hover, button.kachel:hover { background: var(--grund); }
.kachel b { font-size: 18px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
@media (min-width: 900px) {
  .kacheln { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .kacheln > .kachel:last-child:nth-child(odd) { grid-column: auto; }
}

/* ---------- Zahl, Balken ---------- */
.zahl strong { font-size: 26px; letter-spacing: 0; }
.balken { height: 8px; border-radius: 2px; gap: 1px; }
.fortschritt-balken { border-radius: 2px; }

/* ---------- Knöpfe, Felder, Chips ---------- */
.knopf { min-height: 42px; padding: 0 18px; border-radius: var(--r-k); font-weight: 500; }
.knopf.haupt { background: var(--akzent); color: var(--auf-akzent); }
.knopf.gefahr { background: var(--rot); color: var(--flaeche); }
.feld { border-radius: var(--r-f); min-height: 44px; }
.chip { border: 1px solid var(--linie); box-shadow: none; border-radius: var(--r-k); font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); }
.aktion > *, .auswahlleiste > * { box-shadow: var(--hoehe-hoch); }
.aktion > *, .auswahlleiste > * { padding: 0 6px; }   /* lange Beschriftungen („Aufzeichnung ausschalten“) passen am Handy-Maß ohne Umbruch */
.aktion > .knopf:not(.haupt) { border-color: var(--strich); }
.knopf, .zeile, .kachel, .befund, .chip, .leiste a { transition: background-color .12s, border-color .12s; }
.kachel:active, .karte-datei:active, .befund:active, .knopf:active:not(:disabled), .chip:active { filter: none; background: var(--feld); }
.knopf.haupt:active:not(:disabled) { background: color-mix(in srgb, var(--akzent) 86%, #000); }

/* ---------- Blatt, Meldung: deckend, ohne Glas ---------- */
.blatt { background: var(--flaeche); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 12px 12px 0 0; }
@media (min-width: 900px) { .blatt { border-radius: 12px; border: 1px solid var(--linie); } }
.blatt .liste { background: var(--grund); }
.meldung { border-radius: var(--r-k); }

/* ---------- Dateien: ruhige Typfelder ---------- */
.kachelicon { border-radius: var(--r-k); }
.karte-datei { box-shadow: none; border: 1px solid var(--linie); border-radius: var(--r); }
.zeile.gewaehlt { background: color-mix(in srgb, var(--akzent) 10%, transparent); }

/* ---------- Tabelle der Apps (PC) und Zuletzt ---------- */
.tafel { border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); overflow: hidden; }
.tafel .kopfzeile, .tafel .trow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1fr) 20px; gap: 16px; align-items: center; padding: 0 16px; }
.tafel .kopfzeile { min-height: 40px; border-bottom: 1px solid var(--linie); color: var(--leise); font-size: 12.5px; font-weight: 500; }
.tafel .trow { min-height: 56px; border-top: 1px solid var(--linie); }
.tafel .kopfzeile + .trow { border-top: 0; }
a.trow:hover { background: var(--grund); }
.trow .name { font-size: 15.5px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.trow .name small { display: block; margin-top: 1px; color: var(--leise); font-size: 13px; font-weight: 400; }
.trow .zelle { color: var(--text2); font-size: 14px; }
.trow .zelle.ok { color: var(--gruen); }
.trow .zelle.warn { color: var(--gelb); }
.trow .zahl, .kopfzeile .zahl { text-align: right; display: block; font-size: inherit; font-weight: 400; }
.trow .pfeil { color: var(--leise); display: grid; justify-items: end; }
@media (max-width: 899px) {
  .tafel .kopfzeile { display: none; }
  .tafel .trow { grid-template-columns: minmax(0, 1fr) auto 20px; gap: 12px; padding: 10px 16px; }
  .trow .zelle.version, .trow .zelle.downloads, .trow .zelle.meldungen { display: none; }
  .trow .zelle.web { text-align: right; }
}
/* Frühere Versionen: eigene Spalten */
.tafel.versionen .kopfzeile, .tafel.versionen .trow { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 2fr) minmax(0, 2fr) 20px; }
.tafel.versionen .trow { width: 100%; border: 0; border-top: 1px solid var(--linie); background: transparent; text-align: left; font: inherit; color: inherit; }
.tafel.versionen .kopfzeile + .trow { border-top: 0; }
.tafel.versionen .trow:hover { background: var(--grund); }
.trow .zelle.dateien, .trow .zelle.notiz { overflow-wrap: anywhere; }
@media (max-width: 899px) {
  .tafel.versionen .trow { grid-template-columns: minmax(0, 1fr) auto 20px; }
  .tafel.versionen .trow .zelle.dateien, .tafel.versionen .trow .zelle.notiz { display: none; }
}
.zuletzt .eintrag { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 11px 16px; border-top: 1px solid var(--linie); font-size: 14px; }
.zuletzt .eintrag:first-child { border-top: 0; }
.zuletzt time { color: var(--leise); font-size: 13px; }
.zuletzt .eintrag span { overflow-wrap: anywhere; }

/* ---------- Register: die Bereiche innerhalb eines Reiters, nebeneinander (am Handy zum Wischen) ---------- */
.register { display: flex; gap: 2px; margin: 14px 0 6px; border-bottom: 1px solid var(--linie); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.register::-webkit-scrollbar { display: none; }
/* am Handy zeigt ein Verlauf am rechten Rand, dass es weitergeht (statt eines abgeschnittenen Worts) */
@media (max-width: 899px) { .register, .werkzeug.filter { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); } .register a:last-child, .werkzeug.filter .chip:last-child { margin-right: 28px; } }
.register a { flex: none; display: flex; align-items: center; min-height: 44px; padding: 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--leise); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.register a:hover { color: var(--text); }
.register a[aria-current="page"] { color: var(--text); border-bottom-color: var(--akzent); font-weight: 600; }

/* ---------- Start: zwei Spalten am PC ---------- */
.spalten { display: grid; gap: 0 20px; align-items: start; }
@media (min-width: 1000px) { .spalten { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }

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

/* Filterzeile (Fassungen der Versionen): eine Zeile, am Handy zum Wischen, nichts bricht um */
.werkzeug.filter { overflow-x: auto; scrollbar-width: none; }
.werkzeug.filter::-webkit-scrollbar { display: none; }
.werkzeug.filter .chip { flex: none; max-width: none; padding: 0 16px; white-space: nowrap; }

/* Knopfreihen: gleich breit, Beschriftung bleibt einzeilig (lange Wörter wie „Aufzeichnung ausschalten“ am Handy-Maß) */
.knopfreihe > .knopf { padding: 0 8px; }

/* Aktionsplatz am Handy: Knöpfe gleich breit, aber nie schmaler als ihre Beschriftung (zwei lange Beschriftungen rücken zusammen statt zu überstehen) */
@media (max-width: 899px) {
  .aktion { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); justify-content: center; }
  .aktion > * { max-width: none; min-width: 0; white-space: nowrap; }
  .aktion:has(> :only-child) { grid-auto-columns: minmax(max-content, 220px); }
}

/* Beim Wechsel innerhalb eines Bereichs bleiben Kopf und Register stehen: nur der Inhalt darunter blendet ein */
.seite.ein > div > .kopf, .seite.ein > div > .register { animation: none; }
