/* OCIS Image - a dark workbench, the pictures are the colour (Roger, 23.10.2026: "wie ein eigenes
   ZenCreator"). Light by the system setting too. */
:root {
  --grund: #0f1115; --flaeche: #171a21; --flaeche2: #1f232c; --text: #e7e9ee; --leise: #949bab;
  --rand: #2a2f3a; --akzent: #8b7cf6; --akzent-hell: #2a2547; --gut: #44c08a; --warn: #e3a64a;
  --schlecht: #ec6a5e; --rund: 10px;
  color-scheme: dark light;
}
@media (prefers-color-scheme: light) {
  :root { --grund: #f4f5f8; --flaeche: #ffffff; --flaeche2: #f0f1f5; --text: #1b1f29; --leise: #687083;
          --rand: #dde0e7; --akzent: #6650e8; --akzent-hell: #ece8fd; --gut: #1f8a5b; --warn: #b7791f; --schlecht: #c0392b; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--akzent); text-decoration: none; }
h2 { font-size: 1rem; margin: 0 0 .7rem; }
.leise { color: var(--leise); }
.klein { font-size: .85em; }
[hidden] { display: none !important; }

/* head */
.kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1.2rem; padding: .7rem 1.2rem;
        background: color-mix(in srgb, var(--flaeche) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rand); flex-wrap: wrap; }
.marke { font-size: 1.15rem; letter-spacing: .04em; color: var(--leise); display: flex; align-items: center; gap: .55rem; }
.marke img { height: 32px; width: auto; }
/* just "IMAGE", in the plain spaced face the "OCIS" of the first title had (Roger, 23.10.2026) */
.titel { letter-spacing: .04em; color: var(--leise); }
.marke b { color: var(--text); }
.kopf nav { display: flex; gap: .3rem; flex: 1; }
.kopf nav a { padding: .35rem .8rem; border-radius: 999px; color: var(--leise); }
.kopf nav a.an { background: var(--akzent-hell); color: var(--text); font-weight: 600; }
.mcp-kopf { display: flex; align-items: center; gap: .55rem; }
.punkt { width: .65rem; height: .65rem; border-radius: 50%; background: var(--rand); display: inline-block; }
.punkt.an { background: var(--gut); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gut) 25%, transparent); }
.punkt.warte { background: var(--warn); animation: puls 1.2s infinite; }
@keyframes puls { 50% { opacity: .35; } }
.abmelden { color: var(--leise); font-size: .9rem; }

main { max-width: 1240px; margin: 0 auto; padding: 1.2rem 1rem 5rem; }   /* room for the fixed footer */

/* controls */
button { font: inherit; cursor: pointer; }
/* ONE button, shaped like "Erzeugen" (Roger, 23.10.2026), in three colours:
   rot = critical (delete, switch off), lila = starts something, grau = everything else */
.knopf { font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem 1.15rem;
         border: 0; border-radius: var(--rund); font-weight: 600; font-size: .92rem; line-height: 1.3; cursor: pointer;
         text-decoration: none; transition: filter .15s, background-color .15s; margin: 0; }
.knopf:hover:not(:disabled) { filter: brightness(1.12); text-decoration: none; }
.knopf:disabled { opacity: .45; cursor: default; }
.knopf.lila { background: var(--akzent); color: #fff; }
.knopf.rot  { background: var(--schlecht); color: #fff; }
.knopf.grau { background: var(--flaeche2); color: var(--text); box-shadow: inset 0 0 0 1px var(--rand); }
.knopf.grau:hover:not(:disabled) { filter: none; background: var(--rand); }
textarea, input { font: inherit; width: 100%; padding: .6rem .7rem; border: 1px solid var(--rand); border-radius: var(--rund); background: var(--flaeche2); color: var(--text); }
textarea { resize: vertical; }
textarea:focus, input:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
.chips { display: flex; gap: .3rem; flex-wrap: wrap; }
/* chips and the seed field share one height, so their labels and edges line up (Roger, 23.10.2026) */
.chips button { height: 2.3rem; padding: 0 .8rem; display: inline-flex; align-items: center; border: 1px solid var(--rand);
                background: var(--flaeche2); color: var(--leise); border-radius: 999px; font-size: .9rem; }
/* the active chip only changes colour - bold made the row jump (Roger, 23.10.2026) */
.chips button.an { border-color: var(--akzent); color: #fff; background: var(--akzent); }
.beschriftung, label { display: block; font-size: .8rem; color: var(--leise); margin: 0 0 .35rem; }

.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rund); padding: 1.1rem 1.2rem; }
.spalten { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
@media (max-width: 820px) { .spalten { grid-template-columns: 1fr; } }
.formular .zeile { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 1rem; align-items: flex-start; }
.formular .seed { width: 9rem; }
.formular .seed input { height: 2.3rem; padding: 0 .75rem; }
.zeile.unten { justify-content: space-between; align-items: center; margin-top: 1.2rem; }
/* takes room only when it has something to say - otherwise the card ended in an empty band */
.meldung-zeile { margin: 0; font-size: .9rem; color: var(--schlecht); }
.meldung-zeile:not(:empty) { margin-top: .7rem; }

/* MCP panel */
.werte { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; }
.werte dt { color: var(--leise); font-size: .85rem; }
.werte dd { margin: 0; font-variant-numeric: tabular-nums; }

/* jobs */
.abschnitt { margin: 1.6rem 0 .7rem; }
/* one row, half-size cards, scrolling sideways within the form's width (Roger, 23.10.2026) */
.links { min-width: 0; }
.auftraege { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x proximity; }
.auftraege .auftrag { flex: 0 0 120px; scroll-snap-align: start; }
.auftraege .leer { padding: .5rem 0; }
.auftrag { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rund); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.auftrag .bild { aspect-ratio: 1; background: var(--flaeche2); display: grid; place-items: center; color: var(--leise); font-size: .9rem; cursor: default; }
.auftrag .bild img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.auftrag .text { padding: .35rem .45rem; font-size: .72rem; line-height: 1.35; }
.auftrag .text p { margin: 0 0 .2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.auftrag.fehler .bild { color: var(--schlecht); padding: .4rem; text-align: center; font-size: .72rem; }
.auftrag .bild { font-size: .75rem; }
.kreisel { width: 1.2rem; height: 1.2rem; border: 3px solid var(--rand); border-top-color: var(--akzent); border-radius: 50%; animation: dreh 1s linear infinite; margin: 0 auto .5rem; }
@keyframes dreh { to { transform: rotate(1turn); } }

/* gallery */
.werkzeuge { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0 0 1rem; }
.werkzeuge #auswahl-zahl { margin-right: auto; }
.galerie { columns: 4 240px; column-gap: .8rem; }
/* the right column (Roger, 23.10.2026) */
.rechts { align-self: stretch; }   /* as tall as the left column, down to the jobs row (Roger, 23.10.2026) */
.rechts h2 { margin-bottom: .8rem; }
/* Erzeugen: the newest job large */
.ergebnis { display: grid; place-items: center; min-height: 14rem; background: var(--flaeche2); border-radius: var(--rund); overflow: hidden; color: var(--leise); text-align: center; }
.ergebnis img { width: 100%; height: auto; display: block; cursor: zoom-in; }
.ergebnis .verborgen18 { width: 100%; }
.ergebnis-text { margin: .6rem 0 0; font-size: .85rem; color: var(--leise); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Bearbeiten: the templates, as small as the job thumbnails (Roger, 23.10.2026); the lila ring marks the first, the picture that gets changed */
.vorlagen { display: flex; flex-wrap: wrap; gap: .5rem; }
.vorlagen:empty::before { content: "Noch keine Vorlage - links hochladen oder aus der Galerie wählen."; color: var(--leise); font-size: .9rem; }
.vorlage { position: relative; width: 120px; aspect-ratio: 1; border-radius: var(--rund); overflow: hidden; background: var(--flaeche2); }
.vorlage:first-child { box-shadow: 0 0 0 2px var(--akzent); }
.vorlage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vorlage .muell { top: .3rem; right: .3rem; width: 1.6rem; height: 1.6rem; font-size: .72rem; }
label.abstand { margin-top: 1rem; }
.waehler { max-width: min(92vw, 900px); width: 100%; }
.waehler-bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; max-height: 60vh; overflow-y: auto; margin: 0 0 1rem; }
.waehler-bilder img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--rund); cursor: pointer; border: 3px solid transparent; display: block; }
.waehler-bilder img.gewaehlt { border-color: var(--akzent); }

/* the bin on every thumbnail - critical, so red on hover (the button rule); dark disc so it reads on any picture */
.muell { position: absolute; top: .4rem; right: .4rem; width: 1.9rem; height: 1.9rem; border: 0; border-radius: 50%;
         background: rgba(0, 0, 0, .5); color: #fff; font-size: .85rem; display: grid; place-items: center; z-index: 2;
         transition: background-color .15s; }
.muell:hover:not(:disabled) { background: var(--schlecht); }
.muell:disabled { opacity: .5; }
.auftraege .muell { width: 1.6rem; height: 1.6rem; font-size: .72rem; top: .3rem; right: .3rem; }
.kachel { break-inside: avoid; margin: 0 0 .8rem; position: relative; border-radius: var(--rund); overflow: hidden; border: 2px solid transparent; background: var(--flaeche); }
.kachel img { width: 100%; display: block; cursor: zoom-in; }
.kachel.gewaehlt { border-color: var(--akzent); }
.kachel .haken { position: absolute; top: .5rem; left: .5rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid #fff;
                 background: rgba(0,0,0,.35); cursor: pointer; display: grid; place-items: center; color: #fff; font-size: .9rem; }
.kachel.gewaehlt .haken { background: var(--akzent); border-color: var(--akzent); }
.leer { color: var(--leise); padding: 2rem 0; }

/* dialogs */
dialog { border: 1px solid var(--rand); color: var(--text); background: var(--flaeche); border-radius: var(--rund); padding: 1.2rem; max-width: 26rem; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog.ansicht { max-width: none; width: fit-content; padding: 0; overflow: hidden; display: none; }
dialog.ansicht[open] { display: flex; flex-wrap: nowrap; }
/* the picture's size is set by app.js (passeAnsicht): the dialog could only size itself from the 1200 px
   thumbnail and then left an empty band once max-height had scaled the picture down (Roger, 23.10.2026) */
dialog.ansicht img { display: block; flex: none; }
@media (max-width: 760px) { dialog.ansicht[open] { flex-wrap: wrap; } dialog.ansicht .ansicht-text { width: 100%; } }
dialog.ansicht { position: relative; }
dialog.ansicht:focus { outline: none; }
.ansicht-text { width: 24rem; padding: 1.2rem 1.2rem 1rem; display: flex; flex-direction: column; gap: .8rem; }
.ansicht-text p { margin: 0; white-space: pre-wrap; }
.ansicht-text #ansicht-prompt { padding-right: 1.8rem; max-height: 40vh; overflow-y: auto; }   /* room for the × */
/* a plain x: no disc, and no focus ring when the dialog opens (showModal focuses it) - only for the keyboard */
.zu { position: absolute; top: .55rem; right: .55rem; width: 2.1rem; height: 2.1rem; border: 0; border-radius: var(--rund);
      background: none; color: var(--leise); font-size: 1.15rem; line-height: 1; z-index: 1; display: grid; place-items: center; }
.zu:hover { color: var(--text); background: var(--flaeche2); }
.zu:focus { outline: none; }
.zu:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.gruppe { border-top: 1px solid var(--rand); padding-top: .7rem; }
.gruppe-titel { font-size: .75rem; color: var(--leise); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .45rem; }
.knoepfe { display: flex; gap: .4rem; flex-wrap: wrap; }
/* in the picture view: two equal columns per group, so the buttons line up (Roger, 23.10.2026) */
.ansicht-text .knoepfe { display: grid; grid-template-columns: 1fr 1fr; }
.ansicht-text .knoepfe .knopf { padding-left: .6rem; padding-right: .6rem; white-space: nowrap; }
.gruppe.verwalten { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.gruppe.verwalten .haken18 { padding-left: 0; }
/* 18+ (as in Persona): the switch in the navigation, the mark in the view, the stand-in tile */
.schalter18, .haken18 { display: inline-flex; align-items: center; gap: .35rem; margin: 0; color: var(--leise); font-size: .9rem; cursor: pointer; padding: .35rem .6rem; }
.schalter18 input, .haken18 input { width: auto; accent-color: var(--schlecht); }
.verborgen18, .auftrag .bild.verborgen18 { aspect-ratio: 1; display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--flaeche2) 0 10px, var(--flaeche) 10px 20px);
               color: var(--leise); font-weight: 700; letter-spacing: .05em; }
#kennwort18 form { display: flex; flex-direction: column; gap: .5rem; min-width: 16rem; }
#zauberstab.arbeitet i, #b-zauberstab.arbeitet i { display: inline-block; animation: dreh 1.2s linear infinite; }
.symbol { display: inline-flex; align-items: center; gap: .4rem; }
.symbol i { width: 1.15em; text-align: center; }

/* login */
body.login { display: grid; place-items: center; min-height: 100vh; }
.anmelden { width: min(22rem, 92vw); display: flex; flex-direction: column; gap: .9rem; }
.anmelden .marke { font-size: 1.5rem; justify-content: center; margin-bottom: .4rem; }
.logo-gross { height: 80px; width: auto; align-self: center; }
.anmelden .knopf { padding: .6rem; }
.fehler { color: var(--schlecht); margin: 0; }

/* the footer that stays put (Roger, 23.10.2026): My Institute left, MCP's values centred */
.fuss { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: 4rem 1fr 4rem;
        align-items: center; padding: .45rem 1.2rem; background: color-mix(in srgb, var(--flaeche) 94%, transparent);
        backdrop-filter: blur(8px); border-top: 1px solid var(--rand); }
.fuss .institut { height: 36px; width: auto; display: block; }
.fuss-werte { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1.4rem; color: var(--leise); font-size: .88rem;
              font-variant-numeric: tabular-nums; }
.fuss-werte span { white-space: nowrap; }
.fuss-werte i { margin-right: .2rem; }
