:root {
  --bg: #15161a; --karte: #1e2027; --feld: #262932; --rand: #343845; --text: #e6e7eb; --leise: #9aa0ad;
  --akzent: #d4a24c; --akzent2: #3d7bd9; --gefahr: #d9534f; --ok: #4caf7a; --chip: #2d313c; --chip-an: #5b4a22;
  --kachel: 180px;
}
* { box-sizing: border-box; }
html { font-size: var(--schrift, 16px); }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 1rem/1.45 "Segoe UI", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: var(--text); background: var(--feld); border: 1px solid var(--rand); border-radius: 6px; }
button { padding: 5px 10px; cursor: pointer; }
button:hover { border-color: var(--akzent); }
button.haupt { background: var(--akzent); color: #1b1408; border-color: var(--akzent); font-weight: 600; }
button.gefahr { border-color: var(--gefahr); color: #f3b3b1; }
button.an { background: var(--akzent2); border-color: var(--akzent2); color: #fff; }
button:disabled { opacity: .45; cursor: default; }
input, select { padding: 4px 6px; }
textarea { width: 100%; padding: 6px 8px; resize: vertical; }
textarea:disabled, input:disabled, select:disabled { opacity: .45; }
label { color: var(--leise); }
code { background: var(--feld); padding: 0 4px; border-radius: 4px; }
h1, h2, h3 { margin: 4px 0 10px; } h2 { font-size: 1.429rem; }
a { color: var(--akzent); }
.luecke { flex: 1; }
.hinweis { color: var(--leise); font-size: 0.893rem; }
.zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.knopfreihe { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }

/* Grundaufbau: Navigationsleiste + Inhalt */
body { display: grid; grid-template-columns: 210px 1fr; }
#navi { background: #101115; border-right: 1px solid var(--rand); display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; height: 100vh; position: sticky; top: 0; }
#navi .marke { font-weight: 700; font-size: 1.429rem; color: var(--akzent); letter-spacing: .5px; padding: 2px 8px 12px; }
#navi a, #navi > button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 1px solid transparent; text-align: left; }
#navi a:hover, #navi > button:hover { background: var(--feld); }
#navi a.aktiv { background: var(--chip-an); border-color: var(--akzent); }
#navi > button.an { background: #3a2f5a; border-color: #7a64c9; }
.navi-projekt { display: flex; flex-direction: column; gap: 3px; font-size: 0.857rem; padding: 4px 6px 8px; }
.status { font-size: 0.857rem; padding: 6px 8px; border-radius: 8px; background: var(--feld); margin-top: 6px; }
.status.an { color: var(--ok); } .status.aus { color: var(--gefahr); }
#inhalt { padding: 14px 16px; min-width: 0; height: 100vh; overflow-y: auto; }
.seite { max-width: 2400px; }
.leiste { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.leiste h2 { margin: 0 8px 0 0; }
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  #navi { height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 8px 16px; }
  .navi-projekt { display: none; }
  #navi .luecke { display: none; }
  #inhalt { height: auto; padding: 10px 16px; }
  /* Handy (Q25): Navigation als aufklappbares Menü, oben fest */
  #navi { position: sticky; top: 0; z-index: 50; align-items: center; }
  #navi > *:not(.marke):not(.menue-knopf) { display: none; }
  body.menue-offen #navi > *:not(.marke):not(.menue-knopf) { display: flex; }
  body.menue-offen #navi > .gruppe { display: flex; flex-basis: 100%; }
  body.menue-offen #navi { position: fixed; inset: 0; height: 100vh; max-height: none; overflow-y: auto; align-content: flex-start; }
  #navi .marke { padding: 2px 8px; }
  #navi > .menue-knopf { display: inline-flex; margin-left: auto; gap: 6px; align-items: center; font-size: 1rem; }
}
@media (min-width: 901px) { #navi > .menue-knopf { display: none; } }

/* Startseite */
.kacheln-start { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 14px 0 20px; }
.startkarte { display: flex; flex-direction: column; gap: 4px; background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 14px; text-decoration: none; color: var(--text); }
.startkarte:hover { border-color: var(--akzent); }
.startkarte span { color: var(--leise); font-size: 0.893rem; }

/* Text to Image */
.t2i { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(380px, 1fr); gap: 14px; }
@media (max-width: 1150px) { .t2i { grid-template-columns: 1fr; } }
.feld { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 8px 10px 10px; margin-bottom: 10px; }
.feld.aus { opacity: .55; }
.feld.gesperrt { border-color: #7a6431; }
.feld h4 { margin: 0 0 6px; font-size: 0.929rem; text-transform: uppercase; letter-spacing: .6px; color: var(--akzent); display: flex; align-items: center; gap: 6px; }
.feld h4 .luecke { flex: 1; }
.feld h4 small { text-transform: none; letter-spacing: 0; color: var(--leise); font-weight: 400; }
.feld h4 button { padding: 1px 6px; font-size: 0.857rem; text-transform: none; letter-spacing: 0; }
.bausteinzeile { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.bausteinzeile select { flex: 1; min-width: 0; }
.geaendert { color: var(--akzent); font-size: 0.857rem; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.chip { background: var(--chip); border: 1px solid var(--rand); border-radius: 12px; padding: 2px 9px; font-size: 0.893rem; cursor: pointer; user-select: none; }
.chip.an { background: var(--chip-an); border-color: var(--akzent); color: #fff; }
.chipgruppe { font-size: 0.821rem; color: var(--leise); margin-top: 4px; }
details.mehr > summary { cursor: pointer; color: var(--leise); font-size: 0.893rem; margin: 2px 0; }
.figur { border: 1px dashed var(--rand); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.figur.inaktiv { opacity: .5; }
.unterfeld { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--rand); }
.nicht-benoetigt { color: var(--leise); font-size: 0.857rem; font-style: italic; }
.raster2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 10px; }
.raster2 label { display: flex; flex-direction: column; font-size: 0.857rem; }
.raster2 label .kopf { display: flex; align-items: center; gap: 4px; }
.optionsinfo { grid-column: 1 / -1; font-size: 0.857rem; color: var(--leise); background: var(--feld); border-radius: 6px; padding: 5px 8px; }
.knopfwahl { display: flex; flex-wrap: wrap; gap: 4px; }
.knopfwahl button { padding: 3px 8px; font-size: 0.893rem; }
.knopfwahl button small { opacity: .75; }
.lora { display: grid; grid-template-columns: 22px 1fr 70px auto; gap: 6px; align-items: center; margin-bottom: 4px; }
.experte-knoten { margin-bottom: 10px; }
.experte-knoten .knotenkopf { display: flex; align-items: center; gap: 6px; }
.experte-knoten b { font-size: 0.893rem; color: var(--akzent); }
.frage { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; padding: 0; font-size: 0.786rem; font-weight: 700; background: var(--chip); border: 1px solid var(--rand); color: var(--leise); cursor: help; flex: none; }
.frage:hover { color: #fff; border-color: var(--akzent2); }
#hilfe_blase { position: fixed; z-index: 60; max-width: 460px; max-height: 70vh; overflow-y: auto; background: #0d0e12; border: 1px solid var(--akzent2); border-radius: 10px; padding: 10px 12px; font-size: 0.929rem; box-shadow: 0 8px 30px #000a; white-space: pre-wrap; }
#hilfe_blase table { border-collapse: collapse; margin-top: 6px; white-space: normal; }
#hilfe_blase td { border-top: 1px solid var(--rand); padding: 4px 6px; vertical-align: top; font-size: 0.893rem; }
#hilfe_blase td:first-child { color: var(--akzent); white-space: nowrap; }
.eigenpx { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.eigenpx input { width: 90px; }
.warnung { color: #e7b36a; font-size: 0.857rem; }

button.haupt small { font-weight: 400; opacity: .7; margin-left: 6px; }
.ergebnis { margin-top: 10px; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.ergebnis.leer { color: var(--leise); border: 1px dashed var(--rand); border-radius: 8px; }
.ergebnis img { max-width: 100%; max-height: 70vh; border-radius: 8px; cursor: zoom-in; }
#prompt_vorschau { font-family: Consolas, monospace; font-size: 0.893rem; }
.auftrag { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--rand); font-size: 0.893rem; }
.balken { grid-column: 1 / -1; height: 5px; background: var(--feld); border-radius: 3px; overflow: hidden; }
.balken div { height: 100%; background: var(--akzent2); transition: width .3s; }
.auftrag.fehler { color: #f3b3b1; } .auftrag.fertig .st { color: var(--ok); }
.mini { display: flex; gap: 4px; grid-column: 1 / -1; flex-wrap: wrap; }
.mini img { height: 54px; border-radius: 4px; cursor: pointer; }

/* Galerie */
.filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; position: sticky; top: -14px; z-index: 2; }
.filter input#g_suche { flex: 1; min-width: 180px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--kachel), 1fr)); gap: 8px; }
.kachel { position: relative; background: var(--karte); border-radius: 8px; overflow: hidden; aspect-ratio: 2 / 3; cursor: pointer; border: 1px solid var(--rand); }
.kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kachel .stern { position: absolute; top: 4px; right: 6px; color: var(--akzent); text-shadow: 0 0 3px #000; font-size: 1.143rem; }
.kachel .vid { position: absolute; bottom: 4px; left: 6px; font-size: 0.786rem; background: #000a; padding: 1px 5px; border-radius: 4px; }
.kachel .at { position: absolute; top: 4px; left: 6px; font-size: 0.75rem; background: #5b4a22cc; padding: 1px 5px; border-radius: 4px; }
.kachel .pj { position: absolute; bottom: 4px; right: 6px; font-size: 0.75rem; background: #1d3a66cc; padding: 1px 5px; border-radius: 4px; }
#g_mehr { width: 100%; margin: 10px 0; }

/* Bausteine und Projekte */
.b-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; }
.b-karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.b-karte .art { font-size: 0.821rem; text-transform: uppercase; letter-spacing: .5px; color: var(--akzent); }
.b-karte input.name { font-weight: 600; }
.b-projekte { display: flex; flex-wrap: wrap; gap: 4px; }
.p-karte { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.p-karte.aktiv { border-color: var(--akzent); }
.p-karte.archiviert { opacity: .6; }
.p-karte .vorschau { display: flex; gap: 4px; grid-column: 1 / -1; overflow: hidden; }
.p-karte .vorschau img { height: 70px; border-radius: 4px; }

/* SFW und Ausblenden */
body.sfw #inhalt img, body.sfw #inhalt video, body.sfw dialog img, body.sfw dialog video { filter: blur(26px) saturate(.6); }
body.versteckt #inhalt img, body.versteckt #inhalt video, body.versteckt dialog img, body.versteckt dialog video { visibility: hidden; }
#versteckt_hinweis { display: none; }
body.versteckt #versteckt_hinweis { display: block; position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: #3a2f5a; border: 1px solid #7a64c9; padding: 6px 14px; border-radius: 8px; z-index: 70; }

/* Dialoge */
dialog { background: var(--karte); color: var(--text); border: 1px solid var(--rand); border-radius: 12px; padding: 14px 16px; max-width: min(1100px, 96vw); width: 100%; }
dialog::backdrop { background: #000b; }
dialog label { display: block; margin: 8px 0; }
dialog label input, dialog label select { width: 100%; margin-top: 3px; }
#ansicht { max-width: 98vw; width: 98vw; height: 94vh; padding: 0; }
.ansicht { display: grid; grid-template-columns: 1fr 380px; height: 100%; }
@media (max-width: 900px) { .ansicht { grid-template-columns: 1fr; } }
.medium { background: #000; display: flex; align-items: center; justify-content: center; overflow: auto; }
.medium img, .medium video { max-width: 100%; max-height: 94vh; }
.seite-info { padding: 12px; overflow-y: auto; border-left: 1px solid var(--rand); }
.info { font-size: 0.893rem; white-space: pre-wrap; word-break: break-word; }
.info dt { color: var(--akzent); margin-top: 6px; }
.info dd { margin: 0; }
.reiter { display: flex; gap: 4px; margin: 8px 0; flex-wrap: wrap; }
.reiter button.aktiv { background: var(--akzent2); border-color: var(--akzent2); }
#reg_json { font-family: Consolas, monospace; font-size: 0.893rem; }
.liste-ed { margin-bottom: 10px; }
#s_einstellungen label { display: block; margin: 8px 0; }
#s_einstellungen label input { width: 100%; margin-top: 3px; }
.korr { display: grid; grid-template-columns: 24px 1fr 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rand); font-size: 0.893rem; }
.korr .alt { color: var(--leise); } .korr b { grid-column: 2 / -1; color: var(--akzent); }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #000d; border: 1px solid var(--akzent); padding: 8px 14px; border-radius: 8px; z-index: 80; max-width: 90vw; }

/* Galerie: Werkzeuge beim Darueberfahren */
.kachel .werkzeuge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: #0007; opacity: 0; transition: opacity .15s; }
.kachel:hover .werkzeuge { opacity: 1; }
.kachel .werkzeuge button { font-size: 1.4rem; width: 52px; height: 52px; border-radius: 50%; background: #000b; border-color: #fff5; }
.kachel .werkzeuge button.gefahr:hover { background: #7a1f1c; }
/* Bildansicht: Pfeile erscheinen in der Naehe des Rands */
.medium { position: relative; }
.pfeilzone { position: absolute; top: 0; bottom: 0; width: 18%; display: flex; align-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 3; }
.pfeilzone.links { left: 0; justify-content: flex-start; padding-left: 14px; }
.pfeilzone.rechts { right: 0; justify-content: flex-end; padding-right: 14px; }
.pfeilzone:hover { opacity: 1; }
.pfeil { font-size: 3.4rem; line-height: 1; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #000a; border: 1px solid #fff4; color: #fff; padding-bottom: 6px; }
/* Systemcheck */
.pruef { display: grid; grid-template-columns: 22px 220px 1fr auto; gap: 6px 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--rand); }
.pruef .ok { color: var(--ok); } .pruef .nein { color: var(--gefahr); }

[hidden] { display: none !important; }

/* Stufe 2 / Schritt 1: Navigation, Akkordeon, Ergebnisbild */
#navi { overflow-y: auto; }
#navi a.marke { font-weight: 700; font-size: 1.45rem; color: var(--akzent); letter-spacing: .5px; padding: 2px 10px 6px; background: none; border: none; }
#navi a.marke:hover { background: none; color: #f0c06a; }
#navi a.marke.aktiv { background: none; border: none; text-decoration: underline; text-underline-offset: 6px; }
#navi .trenner { border: none; border-top: 1px solid var(--rand); margin: 4px 6px 6px; width: calc(100% - 12px); }
#navi .gruppe { font-size: .78rem; text-transform: uppercase; letter-spacing: .8px; color: var(--leise); padding: 10px 10px 2px; }
#navi a.kommt { opacity: .4; }
#navi a.kommt::after { content: "kommt"; margin-left: auto; font-size: .7rem; border: 1px solid var(--rand); border-radius: 8px; padding: 0 6px; }
#navi a.fest { cursor: default; }
.feld.zu { padding-bottom: 8px; }
.feld.zu h4 { margin: 0; }
.feld h4.akkordeon { cursor: pointer; user-select: none; }
.feld h4 .kurz { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.feld h4 .pfeil-klein { color: #fff; font-size: 1rem; margin-left: 4px; }
.feld.offen { border-color: #4a4f5e; }
.ergebnisbild { position: relative; display: inline-block; cursor: zoom-in; }
.ergebnisbild img { display: block; }
.ergebnisbild .werkzeuge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; background: #0006; opacity: 0; transition: opacity .15s; border-radius: 8px; }
.ergebnisbild:hover .werkzeuge { opacity: 1; }
.ergebnisbild .werkzeuge button { font-size: 1.5rem; width: 58px; height: 58px; border-radius: 50%; background: #000b; border-color: #fff5; }
.ergebnisbild .werkzeuge button.gefahr:hover { background: #7a1f1c; }
.ergebnisbild .zaehler { position: absolute; top: 6px; right: 8px; background: #000a; padding: 1px 8px; border-radius: 8px; font-size: .8rem; }
.ergebnis { margin-top: 0; }
/* Galerie-Leiste: alles auf einer Linie */
.filter label { display: inline-flex; align-items: center; gap: 6px; }
/* Bausteine: hoechstens 2 pro Reihe */
.b-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .b-raster { grid-template-columns: 1fr; } }
#navi { overflow-x: hidden; }

/* Stufe 2 / Schritt 2: Projekte */
.p-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.p-kachel { background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.p-kachel:hover { border-color: var(--akzent); }
.p-kachel.aktiv { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.p-kachel.archiviert { opacity: .55; }
.pk-bild { aspect-ratio: 4 / 3; background: #0c0d10; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pk-bild img { width: 100%; height: 100%; object-fit: cover; }
.pk-bild.plus { font-size: 3rem; color: var(--leise); }
.pk-text { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.pk-beschr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pj-kopf { display: grid; grid-template-columns: 260px 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 800px) { .pj-kopf { grid-template-columns: 1fr; } }
.pj-titel { aspect-ratio: 4 / 3; background: #0c0d10; border-radius: 10px; overflow: hidden; border: 1px solid var(--rand); }
.pj-titel img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.pj-info { display: flex; flex-direction: column; gap: 8px; }
.pj-name { font-size: 1.5rem; font-weight: 700; padding: 4px 8px; }
a.knopf { display: inline-block; padding: 5px 10px; border: 1px solid var(--rand); border-radius: 6px; background: var(--feld); color: var(--text); text-decoration: none; }
a.knopf:hover { border-color: var(--akzent); }
a.knopf.haupt { background: var(--akzent); color: #1b1408; border-color: var(--akzent); font-weight: 600; }
.raster-std { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
.raster-std label { display: flex; flex-direction: column; gap: 3px; font-size: .9rem; }
#navi_projekt { font-weight: 600; }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; position: sticky; top: 46px; z-index: 2; border-color: #7a64c9; }
.kachel .haken { display: none; position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: #000a; border: 2px solid #fff8; color: transparent; align-items: center; justify-content: center; font-weight: 700; z-index: 2; }
body.auswahlmodus .kachel .haken { display: flex; }
body.auswahlmodus .kachel .werkzeuge { display: none; }
.kachel.gewaehlt { outline: 3px solid var(--akzent2); outline-offset: -3px; }
.kachel.gewaehlt .haken { background: var(--akzent2); border-color: #fff; color: #fff; }

/* Stufe 2 / Schritt 3: Vorlagen */
.v-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .v-raster { grid-template-columns: 1fr; } }
.v-karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.v-bild { aspect-ratio: 16 / 10; background: #0c0d10; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.v-bild img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.v-text { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.v-text input.name { font-weight: 700; font-size: 1.1rem; }
.v-raster-klein { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.v-karte.klein .v-bild { aspect-ratio: 4 / 3; }
.v-karte.klein .v-text { flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; }

/* Stufe 2 / Schritt 4: Figur-Referenzen */
.ref-reihe { display: flex; flex-wrap: wrap; gap: 6px; }
.ref { position: relative; }
.ref img { height: 90px; border-radius: 6px; cursor: zoom-in; display: block; }
.ref button { position: absolute; top: 2px; right: 2px; padding: 0 5px; font-size: .75rem; background: #000b; }

/* Stufe 2 / Schritt 5: Verbesserer */
.karte.idee { padding: 8px 10px; }
.karte.idee input { flex: 1; min-width: 200px; }
.baustein-treffer { color: var(--akzent); font-weight: 600; }

/* Stufe 2 / Schritt 6: Prompt-Sammlung */
.pr-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; }
@media (max-width: 1000px) { .pr-layout { grid-template-columns: 1fr; } }
.pr-liste { display: flex; flex-direction: column; gap: 6px; }
.pr-eintrag { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: center; background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; padding: 6px; cursor: pointer; }
.pr-eintrag.aktiv { border-color: var(--akzent); }
.pr-eintrag img, .pr-leer { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; background: #0c0d10; display: flex; align-items: center; justify-content: center; }
.pr-felder { display: flex; flex-direction: column; gap: 6px; }
.pr-felder label { display: flex; flex-direction: column; gap: 3px; }
.pr-felder input.name { font-weight: 700; flex: 1; }
.sterne span { cursor: pointer; color: var(--akzent); font-size: 1.3rem; }
.pr-test { display: flex; flex-direction: column; gap: 4px; }

/* Stufe 2 / Schritt 7: Werkzeuge (Ablage, Vergleich) */
.ablage { border: 2px dashed var(--rand); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; margin-bottom: 8px; }
.ablage:hover, .ablage.drueber { border-color: var(--akzent); background: #2a2416; }
.vergleich { max-width: 100%; }
.vgl-bild { position: relative; display: inline-block; max-width: 100%; }
.vgl-bild img { display: block; max-width: 100%; max-height: 70vh; }
.vgl-oben { position: absolute; inset: 0; }
.vgl-oben img { width: 100%; height: 100%; object-fit: contain; }
.vgl-regler { flex: 1; }
.up-erg { margin-bottom: 14px; }

/* Stufe 2 / Schritt 8: Bildeditor */
.mal-flaeche { position: relative; display: inline-block; margin-top: 8px; touch-action: none; }
.mal-bild { display: block; max-width: 100%; max-height: 72vh; user-select: none; -webkit-user-drag: none; }
.mal-lein { position: absolute; inset: 0; cursor: crosshair; }
body.sfw .mal-flaeche img { filter: blur(26px) saturate(.6); }

.kachel.platzhalter { display: flex; align-items: center; justify-content: center; }

/* Stufe 2 / Schritt 12: Serie */
.se-schritt { display: grid; grid-template-columns: 80px 110px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--rand); }
.se-bild { width: 110px; }
.se-felder { display: flex; flex-direction: column; gap: 4px; }

/* Titelbilder: Hochformat-Bilder in Querformat-Kacheln von oben zuschneiden, damit Gesichter sichtbar bleiben */
.pk-bild img, .pj-titel img { object-position: 50% 18%; }

/* Bildansicht: Schliessen ganz oben rechts, Titel darf umbrechen ohne den Knopf zu verschieben */
#ansicht { position: relative; }
.ansicht-zu { position: absolute; top: 8px; right: 10px; z-index: 5; width: 38px; height: 38px; font-size: 1.2rem; border-radius: 50%; background: #000c; border-color: #fff5; }
.ansicht-zu:hover { background: #7a1f1c; }
.ansicht-titel { padding-right: 44px; word-break: break-all; margin-bottom: 4px; }

/* Vorlagen kompakt (Christian 27.10.): mehrere pro Reihe, niedriges Vorschaubild */
.v-raster { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important; gap: 10px; }
.v-karte .v-bild { aspect-ratio: auto; height: 150px; }
.v-karte .v-text { padding: 8px; gap: 4px; font-size: .9rem; }
.v-karte .v-text input.name { font-size: .95rem; padding: 3px 6px; }
.v-karte .v-text textarea { font-size: .85rem; min-height: 0; }
.v-karte .v-text input { font-size: .85rem; padding: 3px 6px; }
.v-karte .v-text .zeile { gap: 4px; }
.v-karte .v-text .zeile button { padding: 3px 7px; font-size: .82rem; }
.v-karte.klein .v-bild { height: 110px; }

.fv-eintrag { border-bottom: 1px solid var(--rand); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.fv-eintrag .alt { color: var(--leise); font-size: .85rem; }
.fv-eintrag input:not([type]) { flex: 1; }

/* Pruefung vor dem Generieren */
.wortzahl { font-size: .82rem; padding: 2px 8px; border-radius: 10px; background: var(--feld); }
.wortzahl.gruen { color: var(--ok); } .wortzahl.gelb { color: #e7b36a; } .wortzahl.rot { color: #f3b3b1; background: #3a1d1c; }
.gp-punkt { padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; background: var(--feld); }
.gp-punkt.rot { border-left: 3px solid var(--gefahr); } .gp-punkt.gelb { border-left: 3px solid #e7b36a; } .gp-punkt.ki { border-left: 3px solid var(--akzent2); }
/* Navigation ohne Icons: alle Texte bündig untereinander, Status-Kasten gleich eingerückt */
#navi a, #navi > button { gap: 0; padding: 7px 10px; white-space: nowrap; }
#navi a span { overflow: hidden; text-overflow: ellipsis; }
#navi a.kommt::after { content: none; }
#navi .status { margin: 6px 0 0; padding: 7px 10px; }
#navi > #comfy_starten { margin-top: 4px; }
/* Seitenkopf der Erzeugungsseiten: Ziel-Projekt + Formular leeren */
.seitenkopf { display: flex; gap: 10px; align-items: center; margin-left: auto; }
#ziel_projekt.fremd { border-color: var(--akzent); color: var(--akzent); }
/* Haken in Dialogen nicht auf volle Breite ziehen (Prüfdialog: Kurzfassungen) */
dialog label input[type=checkbox], dialog label input[type=radio] { width: auto; margin: 0 6px 0 0; vertical-align: middle; }
dialog label input[type=number] { margin-top: 0; }

/* Vergleichs-Dialog (Original | Neu), Sprachschalter, Extraktor, Wortgrenzen */
dialog.breit { width: min(1200px, 96vw); max-width: 1200px; }
.korr2 { padding: 10px 0; border-bottom: 1px solid var(--rand); }
.korr2 .kopf { display: flex; align-items: center; gap: 8px; margin: 0; }
.korr2 .kopf b { color: var(--akzent); }
.korr2 .zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.korr2 textarea { width: 100%; min-height: 90px; }
@media (max-width: 700px) { .korr2 .zwei { grid-template-columns: 1fr; } }
.sprachschalter { display: inline-flex; border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; }
.sprachschalter button { border: none; border-radius: 0; padding: 4px 10px; background: none; }
.sprachschalter button.an { background: var(--chip-an); color: var(--akzent); font-weight: 600; }
textarea.laedt { opacity: .55; }
.ex-karte.aus { opacity: .5; }
.ex-karte .treffer { color: var(--akzent); }
#ex_inhalt { display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow-y: auto; padding-right: 4px; }
.ex-pruef { padding: 8px 10px; border-radius: 8px; background: var(--feld); }
.ex-pruef.rot { border-left: 3px solid var(--gefahr); } .ex-pruef.gruen { border-left: 3px solid var(--ok); }
.hinweis.gelb { color: #e0b44a; } .hinweis.gruen { color: var(--ok); }
.wg-rahmen { overflow-x: auto; margin-bottom: 10px; }
table.wg { border-collapse: collapse; } table.wg th, table.wg td { padding: 4px; text-align: left; font-size: .85rem; white-space: nowrap; }
table.wg input { width: 64px; }

/* Projekt-Band (3a): Seitentitel groß, aktives Projekt deutlich, dunkler Grund mit Akzentstreifen */
.projekt-band { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 12px; border-radius: 12px;
  background: #17181d; border: 1px solid var(--rand); border-left: 6px solid var(--akzent); }
.pb-titel { margin: 0; font-size: 1.75rem; font-weight: 700; color: #fff; letter-spacing: .2px; }
.pb-projekt { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 4px 12px 4px 4px; border-radius: 10px; background: #23252c; }
.pb-projekt:hover { background: #2c2f38; }
.pb-bild { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; flex: none; background: #1a1a1a; display: grid; place-items: center; }
.pb-bild img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pb-bild span { font-size: 1.4rem; font-weight: 700; color: var(--akzent); }
.pb-name { display: flex; flex-direction: column; line-height: 1.15; }
.pb-name small { color: #a9adb8; font-size: .72rem; text-transform: uppercase; letter-spacing: .8px; }
.pb-name b { font-size: 1.3rem; color: #fff; }
.pb-wechsel { display: flex; align-items: center; gap: 8px; color: #c9ccd4; margin: 0; }
.projekt-band ~ .leiste h2 { display: none; }
@media (max-width: 700px) { .pb-titel { font-size: 1.3rem; flex-basis: 100%; } .pb-name b { font-size: 1.1rem; } }

/* Kamera (Ausschnitt → Format → Objektiv → Höhe → Blickrichtung) */
.kam-reihe { margin: 4px 0 8px; }
.chip.unpassend { opacity: .45; border-style: dashed; }
.kam-hinweis { background: #3a3215; border-left: 3px solid #e0b44a; padding: 6px 10px; border-radius: 6px; margin: 6px 0; font-size: .9rem; }
.kam-hinweis button { margin-left: 6px; }
.chip.an.unpassend { opacity: 1; border-color: #e0b44a; }

/* Bildeditor: Format ändern */
.fmt-flaeche { position: relative; display: inline-block; margin-top: 8px; background: repeating-linear-gradient(45deg, #2a2a30 0 10px, #222228 10px 20px); border-radius: 6px; max-width: 100%; }
.fmt-bild { display: block; max-width: min(100%, 900px); max-height: 60vh; }
.fmt-rahmen { position: absolute; box-sizing: border-box; border: 2px dashed #f3c766; pointer-events: auto; }
.fmt-rahmen.schnitt { cursor: grab; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); }
.fmt-rahmen.erweitern { pointer-events: none; }
.fmt-flaeche:has(.schnitt) { overflow: hidden; }
.fmt-vergleich { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.fmt-vergleich figure { margin: 0; flex: 1 1 260px; } .fmt-vergleich img { width: 100%; border-radius: 6px; } .fmt-vergleich figcaption { color: var(--leise); font-size: .8rem; }

/* Prüfen: Beheben / Ignorieren */
.gp-knoepfe { display: inline-flex; gap: 6px; flex: none; }
.gp-wahl { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--rand); }
.gp-wahl label { display: inline-flex; align-items: center; margin: 0; }
.gp-wahl input[type=radio] { width: auto; margin: 0 4px 0 0; }

/* Warteschlangen (3b) */
.projekt-band.eingereiht { border-left-color: #6fa8ff; }
.pb-wechsel.eingereiht select { border-color: #6fa8ff; color: #9cc3ff; font-weight: 600; }
.ws-karte { margin-bottom: 12px; }
.ws-name { font-size: 1.15rem; font-weight: 700; width: 220px; }
.ws-zustand { padding: 2px 10px; border-radius: 10px; font-size: .85rem; background: var(--feld); }
.ws-zustand.laeuft { background: #1f3d2a; color: #8fe0a8; } .ws-zustand.pause { background: #3d331f; color: #e0c38f; } .ws-zustand.wartet { background: #1f2c3d; color: #9cc3ff; }
.ws-jobs { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ws-job { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #1b1c21; border-left: 3px solid var(--rand); }
.ws-job.laeuft { border-left-color: #8fe0a8; } .ws-job.fertig { border-left-color: var(--ok); } .ws-job.fehler { border-left-color: var(--gefahr); }
.ws-titel { flex: 1 1 260px; } .ws-pos button { padding: 0 6px; }
.ws-status.fehler { color: var(--gefahr); font-weight: 600; } .ws-status.laeuft { color: #8fe0a8; }
.ws-bilder { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; margin-top: 4px; }
.ws-bilder img { height: 90px; border-radius: 6px; cursor: pointer; }
.ws-platz { display: inline-grid; place-items: center; width: 70px; height: 90px; border-radius: 6px; background: var(--feld); font-size: .8rem; color: var(--leise); }
.ws-pre { max-height: 300px; overflow: auto; background: #111; padding: 8px; border-radius: 6px; font-size: .75rem; white-space: pre-wrap; }

/* Abläufe (3c) */
.ws-job.folge { margin-left: 26px; border-left-style: dashed; }
.ws-job.auswahl, .ws-job.pruefen { border-left-color: #6fa8ff; }
.ws-status.auswahl, .ws-status.pruefen { color: #9cc3ff; font-weight: 600; }
.ws-aktion { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; padding: 8px; margin-top: 4px; border-radius: 8px; background: #1f2c3d; }
.ws-bilder img.gewaehlt { outline: 3px solid #6fa8ff; }
#ab_inhalt { display: flex; flex-direction: column; gap: 8px; }

/* Bildauswahl (Q61) */
#bw_inhalt { max-height: 66vh; overflow-y: auto; margin: 8px 0; }
.bw-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.bw-tag { grid-column: 1 / -1; color: var(--leise); font-size: .85rem; margin-top: 6px; border-bottom: 1px solid var(--rand); }
.bw-kachel { aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; cursor: pointer; border: 3px solid transparent; background: #111; }
.bw-kachel img { width: 100%; height: 100%; object-fit: cover; }
.bw-kachel.an { border-color: var(--akzent); }
.bw-raster .ablage { grid-column: 1 / -1; }
.nsfw-marke { color: #ff8a8a; font-weight: 700; font-size: .7rem; }
.listen-link { font-size: .85rem; margin-left: 8px; color: #9cc3ff; }
.liste-ed.blitz { outline: 2px solid var(--akzent); border-radius: 8px; }

/* KI-Chat */
.chat-layout { display: grid; grid-template-columns: 240px 1fr; gap: 12px; height: calc(100vh - 140px); }
.chat-liste { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.chat-eintrag { padding: 8px 10px; border-radius: 8px; background: var(--feld); cursor: pointer; display: flex; flex-direction: column; }
.chat-eintrag.an { outline: 2px solid var(--akzent); }
.chat-haupt { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-verlauf { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px; background: #121318; border-radius: 10px; }
.chat-msg { max-width: 92%; padding: 10px 12px; border-radius: 10px; }
.chat-msg.user { align-self: flex-end; background: #2b3346; } .chat-msg.assistant { align-self: flex-start; background: #1e2026; }
.chat-text { white-space: pre-wrap; line-height: 1.45; }
.chat-vorschlag { padding: 6px 8px; margin: 4px 0; border-radius: 8px; background: #262931; white-space: normal; }
.chat-vorschlag.doppelt { opacity: .6; }
.chat-knoepfe { display: inline-flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.chat-knoepfe button, button.klein { padding: 1px 8px; font-size: .8rem; }
.chat-aktionen { margin-top: 8px; }
.chat-bezug .chip { display: inline-flex; align-items: center; gap: 4px; }
.chip-x { padding: 0 4px; background: none; border: none; }
.chat-eingabe textarea { flex: 1; }
.chat-leer { padding: 20px; }
.le-inhalt { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; margin: 8px 0; }
.le-zeile { display: block; padding: 6px 8px; background: var(--feld); border-radius: 8px; margin: 0; }
.le-zeile input { width: auto; margin-right: 6px; }
@media (max-width: 800px) { .chat-layout { grid-template-columns: 1fr; height: auto; } .chat-verlauf { min-height: 50vh; } }

/* Haken nie auf volle Breite ziehen (Einstellungen, Dialoge) */
#s_einstellungen label:has(> input[type=checkbox]), dialog label:has(> input[type=checkbox]), label.haken { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0; }
#s_einstellungen label > input[type=checkbox], dialog label > input[type=checkbox], label.haken > input { width: auto; margin: 0; }
#s_einstellungen input.zahl { width: 70px; } #s_einstellungen input.zeit { width: 110px; } #s_einstellungen input.breit { flex: 1; width: auto; }
.si-teil { border: 1px solid var(--rand); border-radius: 10px; padding: 10px 12px; margin: 10px 0; background: #17181d; }
.si-teil label.haken { font-weight: 600; color: var(--text); }
.si-feld { margin: 8px 0; }
.si-tab { border-collapse: collapse; margin: 6px 0 12px; } .si-tab td, .si-tab th { padding: 3px 12px 3px 0; text-align: left; font-size: .9rem; }

/* Serie (überarbeitet) */
.se-intro p { margin: 0 0 8px; }
.se-ablauf { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 8px 0 10px; }
.se-stufe { flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: #1b1c21; border: 1px solid var(--rand); }
.se-stufe.ok { border-color: var(--ok); } .se-stufe small { color: var(--leise); }
.se-pfeil { align-self: center; color: var(--leise); font-size: 1.2rem; }
.se-erkl { margin: 2px 0 10px; }
.se-figur { margin-bottom: 6px; }
.se-modi { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.se-modus { padding: 10px 12px; border-radius: 10px; border: 2px solid var(--rand); background: #1b1c21; cursor: pointer; }
.se-modus.an { border-color: var(--akzent); } .se-modus p { margin: 6px 0 0; } .se-modus input { width: auto; margin: 0; }
.se-nr { display: flex; flex-direction: column; min-width: 78px; white-space: nowrap; }
.se-felder label { display: block; color: var(--leise); font-size: .85rem; margin-bottom: 6px; }
.se-felder label input { width: 100%; margin-top: 3px; }
.se-uebergang { margin: 2px 0 8px 80px; font-size: .8rem; }
.se-video-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.se-video-felder > div { display: flex; flex-direction: column; gap: 4px; }
.se-formel { margin: 8px 0; padding: 6px 8px; border-radius: 6px; background: #121318; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; color: #cfd3dc; }

/* Serie als Akkordeon */
.se-bereich { padding: 0; } .se-bereich.offen { padding-bottom: 12px; }
.se-bereich > *:not(.se-kopf) { margin-left: 14px; margin-right: 14px; }
.se-kopf { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; }
.se-kopf h3 { margin: 0; } .se-bereich:not(.offen) .se-kopf h3 { color: var(--akzent); font-size: 1rem; }
.se-kurz { color: var(--leise); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.se-auf { color: var(--leise); }
.se-stufe { cursor: pointer; } .se-stufe.aktiv { outline: 2px solid var(--akzent); }
.se-schritt.zu { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.se-schritt.zu:hover { background: #1b1c21; }
.se-mini { width: 36px; height: 52px; object-fit: cover; border-radius: 4px; flex: none; }
span.se-mini { display: grid; place-items: center; background: var(--feld); color: var(--leise); }
.se-schritt.zu .se-kurz { flex: 1; }

/* Fortschritt für KI-Aufgaben */
.ki-fortschritt { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #1f2c3d; }
.ki-balken { height: 6px; border-radius: 3px; background: #2b3346; overflow: hidden; margin-top: 6px; }
.ki-balken > div { height: 100%; width: 0; background: linear-gradient(90deg, #6fa8ff, var(--akzent)); transition: width .25s linear; }
.ki-dreher { width: 14px; height: 14px; border: 2px solid #6fa8ff; border-top-color: transparent; border-radius: 50%; animation: ki-dreh 0.9s linear infinite; flex: none; }
@keyframes ki-dreh { to { transform: rotate(360deg); } }
#wk_inhalt input[type=text], #wk_inhalt input[type=password] { width: 200px; } #wk_inhalt input[type=number] { width: 70px; }
.ws-platz small { display: block; font-size: .65rem; }
.um-liste { max-height: 300px; overflow-y: auto; font-size: .8rem; font-family: ui-monospace, Consolas, monospace; }
.ob-liste { max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.ob-zeile { padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.ob-zeile:hover { background: var(--flaeche2, rgba(127,127,127,.15)); }
.ob-zeile.zip { color: var(--akzent); }
.hilfe { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.hilfe-inhalt { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 120px); overflow-y: auto; }
.hilfe-inhalt a { padding: 4px 8px; border-radius: 6px; color: inherit; text-decoration: none; font-size: .9rem; }
.hilfe-inhalt a:hover, .hilfe-inhalt a.aktiv { background: rgba(127,127,127,.18); }
.hilfe-text { line-height: 1.55; max-width: 900px; }
.hilfe-text h2 { margin-top: 0; } .hilfe-text h3 { margin-top: 1.4em; border-bottom: 1px solid var(--rand); padding-bottom: 4px; }
.hilfe-text section.hk { scroll-margin-top: 10px; } .hilfe-text code { font-size: .88em; } .hilfe-text mark { background: var(--akzent); color: #000; border-radius: 3px; }
.hilfe-link { font-weight: bold; min-width: 2em; text-align: center; }
.status-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; align-items: start; }
.stt-lw { margin-bottom: 8px; } .ki-balken.warn > div { background: #c0392b; }
td.rot { color: #e74c3c; } td.gelb { color: #e0b030; }
@media (max-width: 760px) { .hilfe { grid-template-columns: 1fr; } .hilfe-inhalt { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; } .status-raster { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .hilfe { grid-template-columns: 1fr; } .hilfe-inhalt { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; } }
.fd-text { white-space: pre-line; margin: 6px 0 12px; line-height: 1.45; }
#frage_dialog #fq_feld { margin-bottom: 12px; }
#frage_dialog h3 { margin-top: 0; }
.steckbrief { display: flex; gap: 10px; align-items: flex-start; } .sb-rechts { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.profilbild { display: flex; flex-direction: column; gap: 4px; width: 96px; flex: none; }
.profilbild img, .profilbild .pb-leer { width: 96px; height: 128px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rand); background: #111; cursor: pointer; }
.profilbild img.blass { opacity: .55; } .profilbild .pb-leer { display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--leise); cursor: default; text-align: center; }
.pb-knoepfe { display: flex; gap: 4px; } .pb-knoepfe button { padding: 2px 6px; font-size: .82rem; } .pb-knoepfe button:first-child { flex: 1; }
.b-projekte .pj-plus { width: auto; padding: 2px 6px; font-size: .85rem; }
img.bild-fehlt { min-width: 60px; min-height: 60px; opacity: .25; background: repeating-linear-gradient(45deg, #222 0 8px, #2c2c2c 8px 16px); }
.ws-pausiert { outline: 2px solid var(--akzent); }
body.rechtsseite { display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; padding: 24px 12px; box-sizing: border-box; }
.rechts-karte { width: min(640px, 100%); line-height: 1.5; } .anmelde-karte { width: min(440px, 100%); margin-top: 6vh; }
.anmelde-form { display: flex; flex-direction: column; gap: 10px; } .anmelde-form label { display: flex; flex-direction: column; gap: 4px; }
.anmelde-form label.zeile { flex-direction: row; align-items: center; } .anmelde-form button.haupt { padding: 10px; font-size: 1rem; }
.anmelde-fuss { text-align: center; margin-top: 16px; }
.qr { background: #fff; padding: 8px; border-radius: 8px; width: 220px; max-width: 100%; margin: 6px auto; } .qr svg { width: 100%; height: auto; display: block; }
code.geheim { display: block; word-break: break-all; font-size: .95rem; padding: 6px; } pre.notfall { font-size: 1.05rem; line-height: 1.6; background: var(--feld); padding: 10px; border-radius: 8px; }
.navi-recht { font-size: .75rem; color: var(--leise); padding: 4px 10px; } .navi-recht a { color: inherit; }
@media print { body * { visibility: hidden; } pre.notfall, pre.notfall * { visibility: visible; } pre.notfall { position: absolute; top: 0; left: 0; } }
body.rechtsseite { display: block; height: auto; min-height: 100%; }
body.rechtsseite main.rechts-karte { margin: 6vh auto 24px; height: auto; overflow: visible; }
.bk-zeile { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: center; margin: 4px 0; } .bk-figur select { flex: 1; min-width: 140px; }
@media (max-width: 600px) { .bk-zeile { grid-template-columns: 1fr; } }
.b2t-vorschlag { border-top: 1px solid var(--rand); padding: 6px 0; } .b2t-vorschlag input:not([type=checkbox]) { flex: 1; }
.tf-zeile { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.auftrag-karte { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--akzent); border-radius: 8px; display: grid; gap: 6px; }
.auftrag-karte.erledigt { border-color: var(--rand); opacity: .8; }
.auftrag-feld { min-width: 90px; color: var(--gedimmt, #aaa); }
.regel-warn { color: #e0b03c; cursor: help; font-size: 1.1rem; padding: 0 4px; }
.regel-zeile { display: grid; grid-template-columns: 110px 1fr auto 40px; gap: 8px; align-items: center; margin-bottom: 6px; }
/* Navigation: größere, einklappbare Abschnitte (29.10.) */
#navi .gruppe { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; cursor: pointer;
  font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--akzent); padding: 12px 10px 4px; text-align: left; }
#navi .gruppe::after { content: "▾"; font-size: 1.15rem; line-height: 1; color: var(--leise); transition: transform .15s; }
#navi .gruppe.zu::after { transform: rotate(-90deg); }
#navi .gruppe:hover { color: #f0c06a; background: none; }
#navi .eingeklappt { display: none !important; }
/* Fußleiste */
#inhalt { padding-bottom: 46px; }
#fussleiste { position: fixed; left: 210px; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 4px 16px;
  background: #101115; border-top: 1px solid var(--rand); font-size: .857rem; }
#fussleiste .status { margin: 0; padding: 3px 8px; }
#fussleiste .luecke { flex: 1; }
#fussleiste a { color: var(--leise); text-decoration: none; }
#fussleiste a:hover, #fussleiste a.aktiv { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  #fussleiste { left: 0; gap: 10px; padding: 4px 10px; flex-wrap: wrap; }
  #inhalt { padding-bottom: 70px; }
}
.regel-zeile textarea { width: 100%; box-sizing: border-box; }
/* Einheitlicher Abstand zwischen Zeilen in Kästen und Dialogen (Christian 29.10.: Elemente zu eng, überlagern sich) */
.karte:not(.zeile) > * + *, dialog > * + *, dialog form > * + * { margin-top: 10px; }
.karte > h3:first-child, .karte > h2:first-child { margin-top: 0; }
.zeile { row-gap: 8px; }
.knopfwahl { row-gap: 6px; }
.karte:not(.zeile) > label:has(> textarea), dialog > label:has(> textarea) { display: block; }
label > textarea, label > select:only-child { display: block; margin-top: 4px; }
.zeile + .ablage, .zeile + .ref-reihe, .ablage + .ref-reihe:not(:empty) { margin-top: 10px; }
/* Bausteine: Werkzeugleiste, Bearbeiten-Dialog, Regelhinweis (29.10.) */
.b-leiste { gap: 6px; } .b-leiste .wortzahl { font-size: .82rem; color: var(--leise); }
button.regel-warn { background: none; border: none; padding: 0 4px; }
.b-dialog { max-width: min(900px, 96vw); }
.b-dialog h3 { margin: 0; } .b-dialog h4 { margin: 14px 0 4px; color: var(--akzent); font-size: .9rem; text-transform: uppercase; letter-spacing: .5px; }
.regel-box { border: 1px solid #e0b03c; border-radius: 8px; padding: 8px 12px; background: #e0b03c14; }
.regel-box ul { margin: 6px 0; padding-left: 20px; }
.kachel-weg { position: absolute; top: 6px; right: 6px; padding: 2px 6px; background: #000b; border-color: #fff3; opacity: 0; transition: opacity .15s; }
.kachel:hover .kachel-weg { opacity: 1; } .kachel-weg:hover { border-color: var(--gefahr); }
@media (hover: none) { .kachel-weg { opacity: .8; } }
.b-text { white-space: pre-wrap; background: var(--feld); border: 1px solid var(--rand); border-radius: 6px; padding: 6px 8px; min-height: 2.6em; color: var(--text); }
.b-text.alt { border-style: dashed; color: var(--leise); }
.auftrag-schritte { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.lauf-balken { border: 1px solid var(--rand); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; background: var(--feld); }
.lauf-balken .balken { margin-top: 6px; }
.kachel-weiter { position: absolute; top: 6px; left: 6px; padding: 2px 7px; background: #000b; border-color: #fff3; opacity: 0; transition: opacity .15s; }
.kachel:hover .kachel-weiter { opacity: 1; } @media (hover: none) { .kachel-weiter { opacity: .8; } }
.lauf-balken .balken { background: #0005; }
.kachel-szene { position: absolute; bottom: 6px; left: 6px; font-size: .75rem; padding: 1px 6px; border-radius: 8px; background: #000a; color: var(--akzent); border: 1px solid transparent; }
.kachel-szene:empty { display: none; } button.kachel-szene.ki { color: #fff; border-color: #fff4; cursor: pointer; } button.kachel-szene.ki:hover { border-color: var(--akzent); color: var(--akzent); }
.pr-test { min-width: 0; } .pr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-box { display: grid; gap: 4px; padding: 6px 0; }
.res-zeile { display: grid; grid-template-columns: 44px minmax(80px, 160px) 1fr; gap: 8px; align-items: center; }
.res-titel { font-size: .82rem; color: var(--leise); } .res-zeile .res-balken { grid-column: auto; margin: 0; height: 7px; background: #0005; } .res-zeile > .hinweis { min-width: 0; }
/* Archivliste (29.10.): Abstand zwischen den Archiven, Knöpfe mit Luft, erste 5 Bilder */
.archiv-block { padding: 10px 0; border-top: 1px solid var(--rand); display: grid; gap: 6px; }
.archiv-block:first-of-type { border-top: none; }
.archiv-block .zeile { gap: 8px; }
.archiv-pfad { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archiv-vorschau { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 0; }
.archiv-vorschau img { height: 72px; width: auto; border-radius: 6px; cursor: pointer; border: 1px solid var(--rand); }
/* Worker koppeln (Spec 110) */
.koppel-zeile { padding: 8px 0; border-top: 1px solid var(--rand); }
.koppel-code { font: 700 1.4rem/1 monospace; letter-spacing: .12em; color: var(--akzent, #e0a43a); }
/* Fotoshooting: Beschreibung des gewählten Themas (29.10.) */
.thema-info { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 10px 0 4px; padding: 8px 10px; border-left: 3px solid var(--akzent, #e0a43a); background: rgba(255,255,255,.03); border-radius: 6px; }
.thema-info span { flex: 1; min-width: 200px; }
/* Worker-Seite (29.10.): Neue Worker hervorheben, Abstände */
.koppel-box { border: 1px dashed var(--rand); border-radius: 10px; padding: 10px 14px; }
.koppel-box.wartet { border: 2px solid var(--akzent, #e0a43a); background: rgba(224,164,58,.08); box-shadow: 0 0 0 4px rgba(224,164,58,.12); animation: koppelPuls 2s ease-in-out 3; }
@keyframes koppelPuls { 50% { box-shadow: 0 0 0 9px rgba(224,164,58,.05); } }
.wk-ueberschrift { margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--rand); }
#wk_inhalt > * + * { margin-top: 14px; }
#wk_inhalt .si-teil { padding: 12px 14px; }
#wk_inhalt .si-teil .zeile + .zeile, #wk_inhalt .si-teil > * + * { margin-top: 8px; }
/* Einstellungen (Christian 29.10.: alles etwas besser aufbereitet, mehr Abstand) */
#s_einstellungen .reiterinhalt { padding: 18px 20px; }
#s_einstellungen .reiterinhalt > * + * { margin-top: 14px; }
#s_einstellungen .reiterinhalt h3 { margin: 4px 0 10px; }
#s_einstellungen .reiterinhalt h4 { margin: 18px 0 8px; }
#s_einstellungen .si-teil { padding: 14px 16px; margin: 16px 0; }
#s_einstellungen .si-teil > * + * { margin-top: 10px; }
#s_einstellungen .si-feld { margin: 12px 0; }
#s_einstellungen .zeile { gap: 10px 12px; }
#s_einstellungen .zeile + .zeile { margin-top: 10px; }
#s_einstellungen .hinweis { line-height: 1.5; }
#s_einstellungen input:not([type=checkbox]):not([type=radio]), #s_einstellungen select { padding: 6px 8px; }
/* Text zu Bild, Größe und Anzahl (29.10.): Anzahl und Seed auf einer Linie, Beschriftung links */
.anzahl-zeile { margin-top: 12px; gap: 10px 14px; align-items: center; }
.anzahl-zeile > label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.anzahl-zeile > label > * { margin: 0; }
/* Text zu Bild, Kopfzeile (Christian 29.10.: „nicht in einer schönen Zeile“): Beschriftung links neben der Auswahl, alles auf einer Linie */
#s_bild > .leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
#s_bild > .leiste .modellwahl { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
#s_bild > .leiste .modellwahl select { margin: 0; }
#s_bild > .leiste > button { margin: 0; }
#s_bild > .leiste #modell_info { flex: 1; min-width: 160px; }
/* Modell-Register als Formular (29.10.) */
.reg-formular { margin: 10px 0; display: grid; gap: 10px; }
.reg-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.reg-feld { display: grid; gap: 4px; }
.reg-feld > span { font-size: .85rem; color: var(--text2, #9aa0a6); }
.reg-feld input[readonly] { opacity: .7; }
/* Downloads auf Workern (29.10.) */
.download { margin: 6px 0 10px; }
.download progress { width: 100%; height: 8px; accent-color: var(--akzent, #d4a017); }
/* Video-Merger (atelier#17) */
.mg-liste { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mg-eintrag { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--rand, #333); border-radius: 8px; }
.mg-eintrag img { width: 96px; height: 54px; object-fit: cover; border-radius: 4px; cursor: pointer; background: #000; }
.mg-nr { min-width: 1.6em; text-align: center; color: var(--akzent); }
.mg-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mg-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.mg-erg { padding: 10px 0; border-top: 1px solid var(--rand, #333); }
.mg-erg:first-of-type { border-top: 0; }
.mg-video { width: 100%; max-height: 60vh; background: #000; border-radius: 6px; margin: 6px 0; }
.bw-kachel.video { position: relative; }
.bw-kachel.video::after { content: "▶"; position: absolute; left: 6px; bottom: 4px; font-size: 13px; color: #fff; text-shadow: 0 0 4px #000; }
