/*
 * aicms · central
 *
 * Dasselbe Stylesheet wie die Redaktion, damit der Sprung von der Anmeldung
 * in die Redaktion nicht aussieht wie ein Wechsel in ein anderes Programm.
 * Die beiden Anwendungen binden sich nicht gegenseitig ein, deshalb eine
 * Kopie; am Ende stehen die Bausteine, die nur central hat.
 *
 * Bezeichner bleiben ASCII, Text bekommt Umlaute.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* Flächen */
  --grund: #fffdf9;          /* Papier */
  --papier: #ffffff;         /* Karte */
  --nebel: #f5f5f5;          /* Feld, Hover */
  --linie: #f0f0f0;          /* Trenner innerhalb einer Karte */
  --linie-2: #e5e5e5;

  /* Schrift */
  --tinte: #171717;
  --tinte-2: #525252;
  --leise: #737373;
  --hauch: #a3a3a3;          /* nur Platzhalter und Zierrat, nie für lesbaren Text */
  --stein: #8f7668;

  /* Marke */
  --orange: #ff6b1a;
  --orange-hauch: #ffedd5;
  --orange-text: #7c2d12;
  --glut: #451a03;
  --sonne: #fef3c7;

  /* Zustände */
  --gut: #166534;
  --gut-hauch: #f0fdf4;
  --gut-pille: #dcfce7;
  --schlecht: #b91c1c;
  --schlecht-hauch: #fef2f2;
  --warn: #78350f;
  --warn-hauch: #fffbeb;

  --ring: rgba(23, 23, 23, .12);
  --auf-tinte: #ffffff;

  --schatten: 0 3px 6px -3px rgba(0,0,0,.05), 0 2px 4px -2px rgba(0,0,0,.05), 0 1px 2px -1px rgba(0,0,0,.05), 0 1px 1px -1px rgba(0,0,0,.05), 0 1px 0 -1px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.03);
  --schatten-hoch: 0 12px 24px -12px rgba(0,0,0,.12), 0 4px 8px -4px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
  --schatten-knopf: 0 1px 1px -1px rgba(0,0,0,.08), 0 2px 2px -1px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.06), inset 0 1px 0 #fff, inset 0 1px 2px 1px #fff, inset 0 1px 2px 0 rgba(0,0,0,.06);
  --schatten-zeile: 0 1px 2px 0 rgba(0,0,0,.05);

  --r-feld: 8px;
  --r-karte: 12px;
  --r-voll: 9999px;

  --schrift: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --leiste-breite: 256px;
}

/* Warmes Dunkel. Die Vorlage kennt nur Hell; wer dunkel eingestellt hat,
   soll trotzdem nicht geblendet werden. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --grund: #171411;
    --papier: #201c18;
    --nebel: #2a2520;
    --linie: #2f2924;
    --linie-2: #3a332c;
    --tinte: #f5efe8;
    --tinte-2: #d4cbc1;
    --leise: #a89e93;
    --hauch: #7d746a;
    --stein: #b9a598;
    --orange-hauch: #3a2012;
    --orange-text: #ffb488;
    --sonne: #3a2f14;
    --glut: #fde68a;
    --gut: #86efac;
    --gut-hauch: #12241a;
    --gut-pille: #173222;
    --schlecht: #fca5a5;
    --schlecht-hauch: #2c1515;
    --warn: #fcd34d;
    --warn-hauch: #2b2410;
    --ring: rgba(245, 239, 232, .16);
    --auf-tinte: #171411;
    --schatten: 0 0 0 1px rgba(255,255,255,.04), 0 2px 6px -2px rgba(0,0,0,.4);
    --schatten-hoch: 0 0 0 1px rgba(255,255,255,.06), 0 12px 24px -12px rgba(0,0,0,.6);
    --schatten-knopf: 0 0 0 1px rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.4);
    --schatten-zeile: 0 0 0 1px rgba(255,255,255,.04);
  }
}

/* ————————————————————— Grundlagen ————————————————————— */

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

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

body {
  font-family: var(--schrift);
  font-feature-settings: "ss01" on, "cv11" on;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tinte);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--linie-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3 { font-weight: 600; color: var(--tinte); }
h1 { font-size: 29px; line-height: 1.2; letter-spacing: -0.52px; }
h2 { font-size: 18px; line-height: 1.4; letter-spacing: -0.2px; }
h3 { font-size: 15px; line-height: 1.4; }

code, .mono { font-family: var(--mono); font-size: 12.5px; }

img { max-width: 100%; }

.ikon { width: 16px; height: 16px; flex: 0 0 auto; }

.sprung {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--tinte); color: var(--auf-tinte);
  padding: 8px 16px; border-radius: var(--r-voll); text-decoration: none; font-weight: 500;
}
.sprung:focus { top: 12px; }

.nurlesbar {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; }

/* ————————————————————— Rahmen ————————————————————— */

.rahmen {
  display: grid;
  grid-template-columns: var(--leiste-breite) minmax(0, 1fr);
  min-height: 100vh;
}

.leiste {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
  background: var(--grund);
  z-index: 50;
}

.leiste-kopf { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 16px; }

.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.marke-zeichen {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--orange); color: #fff;
  font-size: 15px; font-weight: 600; line-height: 1;
}
.marke-text { display: flex; flex-direction: column; min-width: 0; }
.marke-name { font-weight: 600; font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marke-zusatz { font-size: 12px; color: var(--leise); line-height: 1.25; }

.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-titel {
  font-size: 12px; font-weight: 500; letter-spacing: .25px; color: var(--leise);
  padding: 16px 12px 6px;
}
.nav-punkt {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  border-radius: var(--r-voll);
  font-size: 14px; font-weight: 500; color: var(--tinte);
  text-decoration: none;
  transition: background .12s;
}
.nav-punkt .ikon { color: var(--leise); }
.nav-punkt:hover { background: var(--nebel); }
.nav-punkt.an { background: var(--nebel); }
.nav-punkt.an .ikon { color: var(--tinte); }
.nav-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-zahl { font-size: 12px; color: var(--leise); font-variant-numeric: tabular-nums; }
.nav-punktmarke { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }

.leiste-fuss { padding: 16px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.konto { display: flex; align-items: center; gap: 10px; padding: 0 8px; min-width: 0; }
.konto-text { display: flex; flex-direction: column; min-width: 0; }
.konto-mail { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.konto-rolle { font-size: 12px; color: var(--leise); }
.leiste-werkzeug { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }

.avatar {
  flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: .2px;
  color: var(--glut); background: var(--sonne);
}
.avatar.klein { width: 24px; height: 24px; font-size: 10px; }
.avatar.a1 { background: #ffedd5; color: #7c2d12; }
.avatar.a2 { background: #e7e5e4; color: #292524; }
.avatar.a3 { background: #fce7f3; color: #831843; }
.avatar.a4 { background: #dcfce7; color: #14532d; }

.sprachwahl { display: inline-flex; gap: 2px; background: var(--nebel); border-radius: var(--r-voll); padding: 2px; }
.sprachwahl a {
  font-size: 12px; font-weight: 500; color: var(--leise); text-decoration: none;
  padding: 2px 9px; border-radius: var(--r-voll);
}
.sprachwahl a.an { background: var(--papier); color: var(--tinte); box-shadow: var(--schatten-zeile); }

.abmelden { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--leise); text-decoration: none; }
.abmelden:hover { color: var(--tinte); }

.leiste-zu, .leiste-auf, .oben-marke { display: none; }

.buehne { min-width: 0; display: flex; flex-direction: column; }

.oben {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px;
  padding: 12px 40px 0;
}
.oben-platz { flex: 1; }

/* Die eine Stelle, an der Orange etwas meldet: es wartet etwas auf dich. */
.hinweispille {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 12px;
  border-radius: var(--r-voll);
  background: var(--orange-hauch); color: var(--orange-text);
  font-size: 13px; font-weight: 500; text-decoration: none;
}
.hinweispille-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.hinweispille-tun {
  background: var(--papier); color: var(--tinte);
  padding: 3px 10px; border-radius: var(--r-voll); box-shadow: var(--schatten-zeile);
}
.hinweispille:hover .hinweispille-tun { background: var(--nebel); }

.band {
  margin: 12px 40px 0; padding: 10px 16px; border-radius: var(--r-karte);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--warn-hauch); color: var(--warn); font-size: 14px;
}

main { width: 100%; max-width: 1120px; padding: 24px 40px 64px; }
main.schmal { max-width: 640px; }

.fuss {
  margin-top: auto;
  padding: 24px 40px 32px;
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--leise);
}

/* Seiten ohne Anmeldung: nur die Marke und eine Karte. */
.einzeln { min-height: 100vh; display: grid; place-items: start center; padding: 10vh 16px 48px; }
.einzeln main { padding: 0; }
.einzeln-marke { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }

/* ————————————————————— Seitenkopf ————————————————————— */

.seitenkopf {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.seitenkopf-text { min-width: 0; max-width: 720px; }
.ueber {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--leise); margin-bottom: 6px;
}
.ueber a { color: var(--leise); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.ueber a:hover { color: var(--tinte); }
.unter { margin-top: 6px; color: var(--leise); font-size: 15px; }
.seitenkopf-tun { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.abschnitt { margin-top: 40px; }
.abschnitt > h2 { margin-bottom: 4px; }
.abschnitt > .unter { margin: 0 0 16px; font-size: 14px; }
.abschnitt-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.abschnitt-kopf h2 { margin: 0; }

/* ————————————————————— Karten ————————————————————— */

.karte {
  background: var(--papier);
  border-radius: var(--r-karte);
  box-shadow: var(--schatten);
  padding: 20px 24px;
}
.karte + .karte { margin-top: 16px; }
.karte > h2, .karte > h3 { margin-bottom: 4px; }
.karte > h2 + .unter, .karte > h3 + .unter { margin: 0 0 12px; font-size: 14px; }
.karte.flach { box-shadow: none; background: var(--nebel); }
.karte.leer { text-align: center; padding: 48px 24px; }
.karte.leer .ikon { width: 28px; height: 28px; color: var(--hauch); margin-bottom: 12px; }
.karte.leer p { color: var(--leise); margin: 4px auto 16px; max-width: 420px; }

.raster-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.raster-2 > .karte + .karte { margin-top: 0; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.kachel {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--papier); border-radius: var(--r-karte); box-shadow: var(--schatten);
  padding: 16px 18px;
  transition: box-shadow .15s, transform .15s;
}
.kachel:hover { box-shadow: var(--schatten-hoch); transform: translateY(-1px); }
.kachel-kopf { display: flex; align-items: center; gap: 10px; }
.kachel-symbol {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--nebel); color: var(--tinte);
}
.kachel h3 { font-size: 15px; }
.kachel h3 a { text-decoration: none; }
.kachel h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.kachel p { font-size: 13px; color: var(--leise); }
.kachel-zahlen { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.kachel-neu { position: relative; z-index: 1; align-self: flex-start; }

/* ————————————————————— Pillen ————————————————————— */

.pille {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px;
  border-radius: var(--r-voll);
  font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap;
  background: var(--nebel); color: var(--tinte-2);
}
.pille .ikon { width: 12px; height: 12px; }
.s-draft { background: var(--nebel); color: var(--tinte-2); }
.s-review { background: var(--sonne); color: var(--glut); }
.s-published { background: var(--gut-pille); color: var(--gut); }
.s-archived { background: transparent; color: var(--leise); box-shadow: inset 0 0 0 1px var(--linie-2); }
.pille.warm { background: var(--sonne); color: var(--glut); }
.pille.gut { background: var(--gut-pille); color: var(--gut); }
.pille.schlecht { background: var(--schlecht-hauch); color: var(--schlecht); }
.pille.orange { background: var(--orange-hauch); color: var(--orange-text); }

/* ————————————————————— Meldungen ————————————————————— */

.meldung {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; margin-bottom: 16px;
  border-radius: var(--r-karte);
  font-size: 14px;
}
.meldung .ikon { margin-top: 2px; }
.meldung a { font-weight: 500; }
.m-gut { background: var(--gut-hauch); color: var(--gut); }
.m-schlecht { background: var(--schlecht-hauch); color: var(--schlecht); }
.m-warn { background: var(--warn-hauch); color: var(--warn); }
.m-info { background: var(--nebel); color: var(--tinte-2); }

.hinweis { font-size: 13px; color: var(--leise); margin-top: 6px; }
.klein { font-size: 13px; }
.leise { color: var(--leise); }

/* ————————————————————— Zeilenlisten ————————————————————— */

.zeilen {
  background: var(--papier); border-radius: var(--r-karte); box-shadow: var(--schatten);
  list-style: none; overflow: hidden;
}
.zeile {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--linie);
  transition: background .12s;
}
.zeile:first-child { border-top: 0; }
.zeile:hover { background: color-mix(in srgb, var(--nebel) 60%, transparent); }
.zeile-symbol {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; background: var(--nebel); color: var(--tinte-2);
}
.zeile-bild { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--nebel); }
.zeile-haupt { flex: 1; min-width: 0; }
.zeile-titel { font-weight: 500; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile-titel a { text-decoration: none; }
a.zeile-titel, .zeile-titel a { color: var(--tinte); }
.zeile-titel.ueberdeckt a::after { content: ""; position: absolute; inset: 0; }
.zeile-meta { display: flex; gap: 6px 10px; flex-wrap: wrap; font-size: 12px; color: var(--leise); margin-top: 1px; }
.zeile-rechts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; position: relative; z-index: 1; }
.zeile-zeit { font-size: 12px; color: var(--leise); white-space: nowrap; min-width: 84px; text-align: right; }
.zeile-tun { display: flex; gap: 4px; }
.zeile-tun form { display: contents; }

/* ————————————————————— Werkzeugleiste, Filter, Suche ————————————————————— */

.werkzeugleiste { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.werkzeugleiste .suche { flex: 1; min-width: 220px; max-width: 360px; margin-left: auto; }

.filter { display: flex; gap: 4px; flex-wrap: wrap; }
.filter a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-voll);
  font-size: 13px; font-weight: 500; color: var(--tinte-2); text-decoration: none;
}
.filter a:hover { background: var(--nebel); }
.filter a.an { background: var(--tinte); color: var(--auf-tinte); }
.filter-zahl { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }

.suche { position: relative; }
.suche .ikon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--hauch); pointer-events: none; }
.suche input { padding-left: 36px; }

/* ————————————————————— Formulare ————————————————————— */

label, .feld-titel { display: block; font-size: 13px; font-weight: 500; color: var(--tinte); margin: 16px 0 6px; }
.karte > label:first-child, .karte > form > label:first-of-type, .feld:first-child > label { margin-top: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="url"],
input[type="tel"], input[type="date"], input[type="datetime-local"],
input[type="time"], select, textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--tinte);
  background: var(--nebel);
  border: 0;
  border-radius: var(--r-feld);
  box-shadow: inset 0 0 0 1px transparent;
  transition: background .12s, box-shadow .12s;
}
input:hover:not([disabled]):not(:focus), select:hover:not([disabled]):not(:focus), textarea:hover:not([disabled]):not(:focus) {
  background: var(--linie);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  background: var(--papier);
  box-shadow: inset 0 0 0 1.5px var(--tinte), 0 0 0 4px var(--ring);
}
input[disabled], select[disabled], textarea[disabled] { opacity: .55; cursor: not-allowed; }
::placeholder { color: var(--hauch); opacity: 1; }

textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
textarea.markdown { font-family: var(--mono); font-size: 13px; min-height: 260px; }

select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23737373' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px;
  accent-color: var(--tinte); cursor: pointer;
}

.ankreuz { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 400; margin: 8px 0; cursor: pointer; }
.ankreuz span { flex: 1; }

.feld { margin-bottom: 18px; }
.feld:last-child { margin-bottom: 0; }
.pflicht { color: var(--orange-text); font-weight: 600; }
.feld-boolean .ankreuz { margin: 0; }

.zeile-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }

/* Mehrfachauswahl als Chips: ankreuzen ohne Strg-Taste. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 5px 12px; border-radius: var(--r-voll);
  background: var(--nebel); color: var(--tinte-2);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .12s, color .12s;
}
.chip:hover { background: var(--linie-2); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--tinte); color: var(--auf-tinte); }
.chip:has(input:focus-visible) { outline: 2px solid var(--tinte); outline-offset: 2px; }
.chip .ikon { width: 12px; height: 12px; display: none; }
.chip:has(input:checked) .ikon { display: block; }

.auswahlliste {
  max-height: 220px; overflow-y: auto;
  background: var(--nebel); border-radius: var(--r-feld); padding: 4px 12px;
}
.auswahlliste .ankreuz { margin: 6px 0; font-size: 13px; }

/* Segmentwahl (Status) */
.segmente { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: var(--nebel); padding: 4px; border-radius: 10px; }
.segment {
  margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 8px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--tinte-2); cursor: pointer; text-align: center;
}
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment:has(input:checked) { background: var(--papier); color: var(--tinte); box-shadow: var(--schatten-knopf); }
.segment:has(input:focus-visible) { outline: 2px solid var(--tinte); outline-offset: 1px; }

/* Auswahl als Kachel (Anwendungsfall, Inhaltstypen) */
.typenraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.typ {
  display: flex; align-items: flex-start; gap: 12px; margin: 0;
  padding: 12px 14px;
  background: var(--papier); border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--linie-2);
  font-weight: 400; cursor: pointer;
  transition: box-shadow .12s, background .12s;
}
.typ:hover { box-shadow: inset 0 0 0 1px var(--leise); }
.typ:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--tinte); }
.typ-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.typ-text strong { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.typ-text .klein { color: var(--leise); }

/* ——— Dateiablage ——— */

.ablage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 24px 16px;
  border-radius: var(--r-karte);
  background: var(--nebel);
  box-shadow: inset 0 0 0 1.5px var(--linie-2);
  outline: 1.5px dashed var(--hauch); outline-offset: -8px;
  text-align: center; color: var(--leise); font-size: 14px;
  cursor: pointer;
  transition: background .12s, outline-color .12s;
}
.ablage .ikon { width: 22px; height: 22px; color: var(--tinte-2); }
.ablage strong { color: var(--tinte); font-weight: 500; }
.ablage input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ablage:hover, .ablage.ziehen { background: var(--linie); outline-color: var(--tinte); }
.ablage:has(input:focus-visible) { outline: 2px solid var(--tinte); }
.ablage-name { font-size: 13px; color: var(--tinte); font-weight: 500; word-break: break-all; }
.ablage.klein { padding: 14px; flex-direction: row; gap: 10px; }

/* ————————————————————— Knöpfe ————————————————————— */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px;
  border: 0; border-radius: var(--r-voll);
  background: var(--tinte); color: var(--auf-tinte);
  font-size: 14px; font-weight: 500; line-height: 1.4; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12);
  cursor: pointer;
  transition: background .12s, box-shadow .12s, transform .08s;
}
.knopf:hover { background: color-mix(in srgb, var(--tinte) 86%, var(--grund)); }
.knopf:active { transform: translateY(1px); }
.knopf[disabled], .knopf.aus { opacity: .45; pointer-events: none; }

.knopf.still {
  background: var(--papier); color: var(--tinte);
  box-shadow: var(--schatten-knopf);
}
.knopf.still:hover { background: var(--nebel); }
.knopf.leer { background: transparent; color: var(--tinte-2); box-shadow: none; }
.knopf.leer:hover { background: var(--nebel); color: var(--tinte); }
.knopf.gefahr { background: var(--papier); color: var(--schlecht); box-shadow: var(--schatten-knopf); }
.knopf.gefahr:hover { background: var(--schlecht-hauch); }
.knopf.klein { padding: 5px 12px; font-size: 13px; }
.knopf.breit { width: 100%; }
.knopf.gross { padding: 11px 22px; font-size: 15px; }

.knopf-symbol {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 0; color: var(--tinte-2); cursor: pointer;
}
.knopf-symbol:hover { background: var(--nebel); color: var(--tinte); }
.knopf-symbol.gefahr:hover { background: var(--schlecht-hauch); color: var(--schlecht); }

.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
form.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ————————————————————— Übersicht ————————————————————— */

.begruessung { margin-bottom: 28px; }
.begruessung h1 { font-size: 29px; }
.schnell { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.stand {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.stand-symbol {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--gut-pille); color: var(--gut);
}
.stand-symbol.offen { background: var(--orange-hauch); color: var(--orange-text); }
.stand-symbol .ikon { width: 20px; height: 20px; }
.stand-text { flex: 1; min-width: 200px; }
.stand-text strong { display: block; font-weight: 600; }
.stand-text span { font-size: 13px; color: var(--leise); }

.uebersicht { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }

/* ————————————————————— Editor ————————————————————— */

.editor-spalten { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.editor-rand { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.editor-rand .karte + .karte { margin-top: 0; }
.editor-rand .karte { padding: 18px; }
.editor-rand h3 { margin-bottom: 10px; font-size: 14px; }

.gruppe {
  border: 0; min-width: 0;
  background: var(--papier); border-radius: var(--r-karte); box-shadow: var(--schatten);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.gruppe > legend {
  float: left; width: 100%; padding: 0; margin-bottom: 14px;
  font-size: 15px; font-weight: 600; color: var(--tinte);
}
.gruppe > legend + * { clear: both; }

.wiederholfeld .zeilen-block { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.zeile-eintrag {
  position: relative;
  background: var(--grund); border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--linie-2);
  padding: 14px 48px 14px 14px;
}
.zeile-eintrag .feld { margin-bottom: 12px; }
.zeile-eintrag .zeile-eintrag { background: var(--papier); }
.zeile-weg { position: absolute; top: 8px; right: 8px; }

/* Medienwahl: gewählte Bilder oben, Auswahl darunter aufklappbar. */
.medienwahl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.medienwahl:empty { display: none; }
.medienwahl-eintrag {
  position: relative; width: 96px;
  border-radius: 10px; overflow: hidden;
  background: var(--nebel); box-shadow: var(--schatten-zeile);
}
.medienwahl-eintrag img, .medienwahl-eintrag .kein-bild { width: 96px; height: 72px; object-fit: cover; display: grid; place-items: center; }
.medienwahl-eintrag .klein { display: block; padding: 4px 6px; font-size: 11px; color: var(--tinte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.medienwahl-eintrag .weg {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: rgba(23,23,23,.7); color: #fff; cursor: pointer;
}
.medienwahl-eintrag .weg .ikon { width: 12px; height: 12px; }

.medienpicker { margin-top: 4px; }
.medienpicker > summary {
  display: inline-flex; align-items: center; gap: 8px;
  list-style: none; cursor: pointer;
  padding: 5px 12px; border-radius: var(--r-voll);
  font-size: 13px; font-weight: 500;
  background: var(--papier); box-shadow: var(--schatten-knopf);
}
.medienpicker > summary::-webkit-details-marker { display: none; }
.medienpicker > summary:hover { background: var(--nebel); }
.medienpicker-innen { margin-top: 10px; padding: 12px; background: var(--nebel); border-radius: var(--r-karte); }
.medienpicker-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 2px; }
.bildwahl {
  position: relative; margin: 0; cursor: pointer;
  border-radius: 8px; overflow: hidden; background: var(--papier);
  box-shadow: var(--schatten-zeile);
}
.bildwahl input { position: absolute; opacity: 0; pointer-events: none; }
.bildwahl img, .bildwahl .kein-bild { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; font-size: 11px; color: var(--leise); }
.bildwahl span.klein { display: block; padding: 3px 6px; font-size: 11px; font-weight: 400; color: var(--tinte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bildwahl:has(input:checked) { box-shadow: 0 0 0 2px var(--tinte); }
.bildwahl:has(input:focus-visible) { outline: 2px solid var(--tinte); outline-offset: 2px; }
.bildwahl .haken {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  display: none; place-items: center; background: var(--tinte); color: var(--auf-tinte);
}
.bildwahl .haken .ikon { width: 12px; height: 12px; }
.bildwahl:has(input:checked) .haken { display: grid; }
.bildwahl.keins { display: grid; place-items: center; min-height: 88px; font-size: 12px; color: var(--leise); text-align: center; padding: 8px; }
.medienpicker .ablage { margin-top: 10px; }
.neu-alt { margin-top: 8px; }

/* ——— Vor dem Veröffentlichen ——— */

.pruefliste { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pruefpunkt { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.pruefpunkt .ikon { margin-top: 2px; }
.pruefpunkt.p-error .ikon { color: var(--schlecht); }
.pruefpunkt.p-hint .ikon, .pruefpunkt.p-warning .ikon { color: #b45309; }
.pruefpunkt strong { display: block; font-weight: 500; color: var(--tinte); }
.pruefpunkt span { color: var(--leise); display: block; }
.pruefpunkt em { font-style: normal; font-size: 12px; color: var(--leise); }
.alles-gut { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--gut); }

.verlauf { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.verlauf li { display: flex; flex-direction: column; }
.verlauf .leise { font-size: 12px; }

.speicherhinweis { font-size: 12px; color: var(--leise); margin-top: 10px; }

/* ————————————————————— Veröffentlichen ————————————————————— */

.schritte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.schritt { display: flex; flex-direction: column; gap: 8px; }
.schritt-nr {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--nebel); font-size: 13px; font-weight: 600;
}
.schritt p { color: var(--leise); font-size: 14px; }
.schritt .knopfreihe { margin-top: auto; padding-top: 8px; }
.schritt label { margin-top: 4px; }

details.mehr { margin-top: 32px; }
details.mehr > summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--tinte-2);
}
details.mehr > summary::-webkit-details-marker { display: none; }
details.mehr > summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 18px; line-height: 1; }
details.mehr[open] > summary::before { transform: rotate(90deg); }
details.mehr > .mehr-innen { margin-top: 16px; }

.tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabelle th, .tabelle td { text-align: left; padding: 10px 16px; border-top: 1px solid var(--linie); vertical-align: top; }
.tabelle thead th { border-top: 0; font-size: 12px; font-weight: 500; color: var(--leise); }
.tabelle td.rechts, .tabelle th.rechts { text-align: right; }

/* ————————————————————— Medien ————————————————————— */

.medienraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.medienkachel {
  display: flex; flex-direction: column;
  background: var(--papier); border-radius: var(--r-karte); box-shadow: var(--schatten);
  overflow: hidden;
}
.medienkachel-bild { position: relative; aspect-ratio: 4 / 3; background: var(--nebel); }
.medienkachel-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.medienkachel-bild .pille { position: absolute; left: 8px; top: 8px; }
.kein-bild { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 600; font-size: 13px; letter-spacing: .5px; color: var(--leise); }
.medienkachel-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.medienkachel-titel { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.medienkachel-meta { font-size: 12px; color: var(--leise); }
.medienkachel details { margin-top: 6px; }
.medienkachel details > summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--tinte-2); list-style: none; }
.medienkachel details > summary::-webkit-details-marker { display: none; }
.medienkachel details > summary:hover { color: var(--tinte); }
.medienkachel details label { font-size: 12px; margin: 10px 0 4px; }
.medienkachel details input[type="text"] { padding: 7px 10px; font-size: 13px; }

.hochladen-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }

/* ————————————————————— Einstellungen ————————————————————— */

.reiter { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 24px; }
.reiter a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--r-voll);
  font-size: 14px; font-weight: 500; color: var(--tinte-2); text-decoration: none;
}
.reiter a:hover { background: var(--nebel); color: var(--tinte); }
.reiter a.an { background: var(--papier); color: var(--tinte); box-shadow: var(--schatten-knopf); }

/* ————————————————————— Eingang ————————————————————— */

.eingabearten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.eingabeart {
  display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: var(--nebel); font-size: 14px; font-weight: 500;
}
.eingabeart input { position: absolute; opacity: 0; pointer-events: none; }
.eingabeart:has(input:checked) { background: var(--papier); box-shadow: inset 0 0 0 1.5px var(--tinte); }
.eingabeart:has(input:focus-visible) { outline: 2px solid var(--tinte); outline-offset: 2px; }

.aufnahme { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.aufnahme-zeit { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--leise); }
.aufnahme-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--schlecht); animation: pulsieren 1.2s infinite; }
@keyframes pulsieren { 50% { opacity: .3; } }

.vorschlag-felder { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.vorschlag-felder dt { color: var(--leise); }
.vorschlag-felder dd { color: var(--tinte); word-break: break-word; }
.rohtext { white-space: pre-wrap; font-size: 13px; color: var(--tinte-2); background: var(--nebel); border-radius: var(--r-feld); padding: 12px 14px; max-height: 240px; overflow: auto; }

/* ————————————————————— Posteingang ————————————————————— */

.nachricht-felder { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.nachricht-felder dt { color: var(--leise); }
.nachricht-felder dd { white-space: pre-wrap; word-break: break-word; }

/* ————————————————————— Anmeldung ————————————————————— */

.anmelden-karte h1 { font-size: 22px; letter-spacing: -0.37px; margin-bottom: 6px; }

/* ————————————————————— Schmal ————————————————————— */

@media (max-width: 1100px) {
  .uebersicht { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .editor-spalten { grid-template-columns: 1fr; }
  .editor-rand { position: static; }
}

@media (max-width: 860px) {
  .rahmen { display: block; }

  .js .leiste {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: min(300px, 86vw);
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: var(--schatten-hoch);
    background: var(--grund);
  }
  .js .leiste-offen .leiste { transform: none; }
  .js .leiste-zu, .js .leiste-auf { display: inline-grid; }
  .leiste-schleier { position: fixed; inset: 0; background: rgba(23,23,23,.3); z-index: 40; }

  /* Ohne JavaScript: Leiste einfach oben, ganz normal im Fluss. */
  html:not(.js) .leiste { position: static; height: auto; }

  .oben { padding: 8px 16px; min-height: 52px; position: sticky; top: 0; z-index: 30; background: var(--grund); }
  .oben-marke { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hinweispille { padding-left: 10px; }
  .hinweispille-tun { display: none; }

  main { padding: 16px 16px 48px; }
  .band { margin: 8px 16px 0; }
  .fuss { padding: 16px; }

  .raster-2, .schritte, .hochladen-raster { grid-template-columns: 1fr; }
  .eingabearten { grid-template-columns: 1fr; }
  .vorschlag-felder, .nachricht-felder { grid-template-columns: 1fr; gap: 2px; }
  .vorschlag-felder dd, .nachricht-felder dd { margin-bottom: 8px; }

  h1 { font-size: 24px; }
  .seitenkopf { align-items: flex-start; }
  .werkzeugleiste .suche { max-width: none; margin-left: 0; }

  .zeile { flex-wrap: wrap; }
  .zeile-rechts { width: 100%; justify-content: flex-start; padding-left: 46px; }
  .zeile-zeit { min-width: 0; text-align: left; }
}

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

.tabellenkarte { padding: 0; overflow-x: auto; }
details.mehr.eng { margin-top: 14px; }
details.mehr.eng > .mehr-innen { margin-top: 4px; }
.knopfreihe.eng { margin-top: 10px; }
.abschnitt > h2 + .zeilen { margin-top: 10px; }
select.klein-auswahl { width: auto; padding: 5px 32px 5px 12px; font-size: 13px; border-radius: var(--r-voll); background-position: right 11px center; }
.eingabe [data-art] { margin-bottom: 4px; }
.filter-abstand { margin-bottom: 12px; }
.zeile.ungelesen .zeile-titel { font-weight: 600; }
.abschnitt-eng { margin-top: 16px; }
.mail-status { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.knopfreihe.mittig { justify-content: center; }

/* ————————————————————— Nur central —————————————————————
 * Die Seiten von central sind schlichter gebaut als die der Redaktion:
 * Überschrift, Karte, Tabelle. Diese Regeln holen sie in dieselbe Sprache,
 * ohne jede Seite neu zu schreiben. */

main > h1 { margin-bottom: 20px; }
main > h2, main > section > h2 { margin: 36px 0 12px; }
main > section { margin-top: 8px; }
main > p { margin-bottom: 12px; }

.karte > h2:first-child, .karte > h3:first-child { margin-top: 0; }
.karte > p + p { margin-top: 10px; }
.karte > .knopf, .karte > button.knopf, .karte form > button.knopf, form.karte > .knopf { margin-top: 18px; }
.knopf + .knopf, .knopf + .zurueck { margin-left: 8px; }
.zurueck { margin-left: 14px; font-size: 14px; color: var(--leise); }

.fuehrung { color: var(--leise); margin-bottom: 16px; }
.kennung { display: block; font-family: var(--mono); font-size: 12px; color: var(--leise); }
.umbruch { word-break: break-all; }
.zitat { margin-top: 8px; padding-left: 12px; border-left: 3px solid var(--linie-2); color: var(--tinte-2); font-size: 14px; }
.warnton { color: var(--warn); }

.erfolg, .fehler {
  padding: 12px 16px; border-radius: var(--r-karte); margin-bottom: 16px; font-size: 14px;
}
.erfolg { background: var(--gut-hauch); color: var(--gut); }
.fehler { background: var(--schlecht-hauch); color: var(--schlecht); }
.sorgen { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sorgen li { background: var(--warn-hauch); color: var(--warn); border-radius: var(--r-karte); padding: 10px 14px; font-size: 14px; }
.hinweisband { background: var(--orange-hauch); color: var(--orange-text); border-radius: var(--r-karte); padding: 10px 16px; margin-bottom: 16px; font-size: 14px; }
.karte.warnung { background: var(--warn-hauch); }

/* Tabellen als weiße Karte mit feinen Trennern. */
.liste {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--papier); border-radius: var(--r-karte); box-shadow: var(--schatten);
  overflow: hidden; font-size: 14px;
}
.liste th, .liste td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--linie); }
.liste thead th { border-top: 0; font-size: 12px; font-weight: 500; color: var(--leise); }
.liste tbody tr:first-child td { border-top: 0; }
.liste thead + tbody tr:first-child td { border-top: 1px solid var(--linie); }
.liste tbody tr:hover { background: color-mix(in srgb, var(--nebel) 60%, transparent); }
.liste tr.an { background: var(--sonne); }
.liste.klein { font-size: 13px; }
.liste.klein td { padding: 8px 14px; }
.liste td strong { font-weight: 500; }
.tun { white-space: nowrap; text-align: right; }
.tun a { font-size: 13px; font-weight: 500; margin-left: 12px; }
.tun select { width: auto; }

.marker {
  display: inline-block; padding: 2px 10px; border-radius: var(--r-voll);
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--nebel); color: var(--tinte-2);
}
.m-live, .m-active, .m-published { background: var(--gut-pille); color: var(--gut); }
.m-pending { background: var(--sonne); color: var(--glut); }
.m-suspended { background: var(--schlecht-hauch); color: var(--schlecht); }

.werkzeugleiste { gap: 8px; }
.suchzeile { display: flex; gap: 8px; margin-bottom: 20px; }
.suchzeile input { flex: 1; }

.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* Anwendungsfall beim Anlegen einer Instanz */
.fallwahl { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.fallwahl legend { font-size: 13px; font-weight: 500; padding: 0; margin-bottom: 8px; }
.fall {
  display: flex; align-items: flex-start; gap: 12px; margin: 0 0 8px;
  padding: 12px 14px; border-radius: 10px; cursor: pointer; font-weight: 400;
  background: var(--papier); box-shadow: inset 0 0 0 1px var(--linie-2);
}
.fall:hover { box-shadow: inset 0 0 0 1px var(--leise); }
.fall:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--tinte); }
.fall-text { display: flex; flex-direction: column; gap: 2px; }
.fall-text strong { font-weight: 600; font-size: 14px; }
.fall-zahl { font-size: 12px; color: var(--leise); }

/* Inhaltstypen und Branchen */
fieldset.karte { border: 0; min-width: 0; }
.branche legend, .feldkarte legend {
  float: left; width: 100%; padding: 0; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 15px; font-weight: 600;
}
.branche legend + *, .feldkarte legend + * { clear: both; }
.branche .kennung, .feldkarte .kennung { display: inline; }
.branche.neu, .feldkarte.neu { background: transparent; box-shadow: inset 0 0 0 1.5px var(--linie-2); }
.branche-fuss { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linie); }
.feldname { font-weight: 500; font-size: 13px; margin: 16px 0 6px; }
.feldtyp { font-family: var(--mono); font-size: 12px; color: var(--leise); background: var(--nebel); border-radius: 6px; padding: 1px 8px; }

/* Zweiter Faktor */
.einrichtung { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.einrichtung-text { flex: 1; min-width: 240px; }
.qr { text-align: center; }
.qr img { display: block; width: 222px; height: 222px; background: #fff; border-radius: 10px; padding: 8px; box-shadow: var(--schatten); }
.qr .klein { max-width: 222px; margin-top: 8px; color: var(--leise); }
details summary { cursor: pointer; }
details code { display: block; margin-top: 6px; font-size: 12px; color: var(--tinte-2); }
.geheimnis {
  font-family: var(--mono); font-size: 17px; letter-spacing: .08em;
  background: var(--nebel); border-radius: var(--r-feld); padding: 12px 14px; margin: 8px 0 14px; word-break: break-all;
}
.codes { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.codes li { font-family: var(--mono); background: var(--nebel); border-radius: var(--r-feld); padding: 8px 10px; text-align: center; letter-spacing: .04em; }

/* Instanzen als Karten */
.instanzen { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.instanz { display: flex; flex-direction: column; gap: 12px; }
.instanz-kopf { display: flex; align-items: center; gap: 12px; }
.instanz-kopf .marke-zeichen { width: 36px; height: 36px; border-radius: 10px; font-size: 17px; }
.instanz-kopf h2 { font-size: 16px; margin: 0; }
.instanz-kopf .kennung { display: block; }
.instanz-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.instanz .knopfreihe { margin-top: auto; padding-top: 4px; }

@media (max-width: 860px) {
  .zweispaltig { grid-template-columns: 1fr; }
  .liste, .liste thead, .liste tbody, .liste tr, .liste td { display: block; width: 100%; }
  .liste thead { display: none; }
  .liste td { border-top: 0; padding: 4px 16px; }
  .liste tr { border-top: 1px solid var(--linie); padding: 10px 0; }
  .liste tr:first-child { border-top: 0; }
  .tun { text-align: left; }
  .tun a { margin: 0 12px 0 0; }
}
.inline-kennung { display: inline; }
details.klappe { padding: 0; }
details.klappe > summary {
  list-style: none; cursor: pointer; padding: 16px 24px; font-size: 15px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
details.klappe > summary::-webkit-details-marker { display: none; }
details.klappe > summary::after { content: "›"; font-size: 20px; color: var(--leise); transition: transform .15s; }
details.klappe[open] > summary::after { transform: rotate(90deg); }
.klappe-innen { padding: 0 24px 20px; }
.seitenliste { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.seitenliste li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--grund); box-shadow: inset 0 0 0 1px var(--linie-2); }
.seitenliste li a { font-weight: 500; font-size: 14px; flex: 1; min-width: 120px; }

