/* Richtung: Korrekturabzug auf dem Leuchttisch. Ruhige Fläche, Farbe haben nur die Motive.
   Signatur: nummerierte Korrekturmarken. Gestaltungsdurchgang nach unslop von Damir Sokolovsky (@heydamir), CC BY 4.0. */
:root {
  --grund: #fafafa; --flaeche: #ffffff; --gehoben: #f4f4f5; --linie: rgba(23, 23, 23, 0.08); --linie-stark: rgba(23, 23, 23, 0.16);
  --text: #171717; --text-2: #525252; --leise: #737373;
  --primaer: #171717; --primaer-text: #ffffff;
  --korrektur: #c8f04a; --akzent: #c8f04a; --akzent-text: #151614; --ok: #16a34a; --warn: #b45309; --fehler: #dc2626;
  --mensch: #f4f4f5; --schatten: 0 1px 2px rgba(0, 0, 0, 0.05); --schatten-schwebend: 0 8px 24px rgba(0, 0, 0, 0.08);
  --punkte: rgba(23, 23, 23, 0.12);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --kurve: cubic-bezier(0.22, 1, 0.36, 1);
  --chat-breite: 400px;
}
@media (prefers-color-scheme: dark) {
  :root { --grund: #141415; --flaeche: #19191b; --gehoben: #232325; --linie: rgba(237, 237, 237, 0.08); --linie-stark: rgba(237, 237, 237, 0.16);
    --text: #ededed; --text-2: #a1a1a6; --leise: #85858b; --primaer: #ededed; --primaer-text: #141415;
    --korrektur: #c8f04a; --akzent: #c8f04a; --akzent-text: #151614; --ok: #4cc38a; --warn: #f5a524; --fehler: #e5484d; --mensch: #232325; --schatten: none;
    --schatten-schwebend: 0 8px 24px rgba(0, 0, 0, 0.4); --punkte: rgba(237, 237, 237, 0.1); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--grund); color: var(--text); overflow: hidden;
  font: 14px/20px -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; } /* Fokus bleibt dunkel, sonst auf Weiß kaum zu sehen */
select, input, textarea { background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: 8px; padding: 6px 8px; transition: border-color 150ms var(--kurve); }
select { appearance: none; -webkit-appearance: none; padding: 6px 36px 6px 12px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
textarea { resize: vertical; width: 100%; }

/* Kopf */
.kopf { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.marke-app { font-weight: 600; font-size: 15px; margin-right: 4px; }
#projektwahl { max-width: 360px; }
.platz { flex: 1; }
.umschaltung { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--gehoben); margin-left: 8px; }
.umschaltung button { border: 0; background: transparent; padding: 4px 12px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-size: 13px; }
.umschaltung button.an { background: var(--flaeche); color: var(--text); box-shadow: var(--schatten); }
.zustand { font-size: 12px; color: var(--leise); display: inline-flex; align-items: center; gap: 8px; }
.zustand::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--linie-stark); }
.zustand.an { color: var(--text); }
.zustand.an::before { background: var(--korrektur); }
.kosten { font: 12px/16px var(--mono); color: var(--leise); font-variant-numeric: tabular-nums; }

/* Knöpfe */
.knopf { height: 32px; border: 1px solid var(--primaer); background: var(--primaer); color: var(--primaer-text); border-radius: 8px; padding: 0 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  transition: background-color 150ms var(--kurve), transform 120ms var(--kurve); }
.knopf:active { transform: scale(0.98); }
.knopf.zweit { background: var(--flaeche); color: var(--text); border-color: var(--linie-stark); }
.knopf.zweit:hover { background: var(--gehoben); }
.knopf.warn { background: var(--fehler); border-color: var(--fehler); color: #fff; }
.knopf.klein { height: 28px; padding: 0 8px; font-size: 12px; }
.knopf:disabled { opacity: 0.5; cursor: default; }

/* Arbeitsfläche: Chat, Trenner, Canvas */
.arbeitsflaeche { display: flex; height: calc(100% - 52px); min-height: 0; padding: 12px 0 12px 12px;
  background-color: var(--grund); background-image: radial-gradient(var(--punkte) 1px, transparent 1px); background-size: 24px 24px; }
.chat { width: var(--chat-breite); min-width: 280px; display: flex; flex-direction: column; min-height: 0; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 16px; box-shadow: var(--schatten-schwebend); overflow: hidden; position: relative; z-index: 6; }
.trenner { width: 12px; z-index: 7; cursor: col-resize; position: relative; flex: none; }
.trenner::after { content: ""; position: absolute; left: 5px; top: 50%; height: 40px; margin-top: -20px; width: 2px; border-radius: 2px; background: var(--linie-stark); transition: background-color 150ms var(--kurve), height 150ms var(--kurve); }
.trenner:hover::after, .trenner.aktiv::after { height: 80px; margin-top: -40px; background: var(--korrektur); }

.verlauf { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.blase { padding: 8px 12px; border-radius: 12px; overflow-wrap: anywhere; color: var(--text); }
.blase p { margin: 0 0 8px; } .blase p:last-child { margin-bottom: 0; }
.blase ul, .blase ol { margin: 4px 0 8px; padding-left: 20px; }
.blase code { font: 12px/16px var(--mono); background: var(--gehoben); padding: 0 4px; border-radius: 4px; }
.blase table { border-collapse: collapse; font-size: 13px; margin: 4px 0 8px; }
.blase th, .blase td { border-bottom: 1px solid var(--linie); padding: 4px 8px 4px 0; text-align: left; vertical-align: top; }
.blase th { font-weight: 500; color: var(--text-2); }
.blase.mensch { background: var(--mensch); align-self: flex-end; max-width: 88%; white-space: pre-wrap; }
.blase .wer { font-size: 12px; color: var(--leise); display: block; margin-bottom: 4px; }
.zeile { font-size: 12px; line-height: 16px; color: var(--leise); }
.zeile.fehler { color: var(--fehler); }
.aktivitaet { font-size: 12px; color: var(--leise); }
.aktivitaet summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; }
.aktivitaet summary::-webkit-details-marker { display: none; }
.aktivitaet summary::before { content: "›"; display: inline-block; width: 8px; transition: transform 150ms var(--kurve); }
.aktivitaet[open] summary::before { transform: rotate(90deg); }
.aktivitaet .zeilen { margin: 4px 0 0 16px; display: flex; flex-direction: column; gap: 2px; font: 12px/16px var(--mono); }
.karte { border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); padding: 12px 16px; }
.karte h4 { margin: 0 0 8px; font-size: 14px; font-weight: 500; }
.karte ul, .karte ol { margin: 4px 0 8px; padding-left: 20px; color: var(--text-2); }
.karte .klein { margin-top: 4px; }
.karte.freigabe { border-color: var(--korrektur); }
.karte .reihe { margin-top: 8px; }
.karte input { width: 100%; margin-top: 8px; }
.statuszeile { font-size: 12px; color: var(--text-2); padding: 8px 16px; border-top: 1px solid var(--linie); }
.auswahlkarte { margin: 0 12px 8px; padding: 16px; border-radius: 12px; background: var(--gehoben); display: flex; flex-direction: column; gap: 12px; }
.auswahlkarte .a-kopf { display: flex; align-items: center; justify-content: space-between; }
.auswahlkarte .a-kopf b { font-weight: 500; }
.auswahlkarte label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); min-width: 0; }
.auswahlkarte select, .auswahlkarte input { width: 100%; min-width: 0; }
.schliessen-klein { border: 0; background: transparent; font-size: 16px; line-height: 1; color: var(--leise); cursor: pointer; width: 24px; height: 24px; border-radius: 6px; }
.schliessen-klein:hover { background: var(--flaeche); color: var(--text); }
.eingabe { padding: 0 12px 12px; }
.komponist { border: 1px solid var(--linie-stark); border-radius: 12px; background: var(--flaeche); padding: 8px; transition: border-color 150ms var(--kurve); }
.komponist:focus-within { border-color: var(--leise); }
.komponist textarea { border: 0; padding: 4px 4px 8px; resize: none; background: transparent; outline: none; }
.k-leiste { display: flex; align-items: center; gap: 4px; }
.pille { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--linie-stark);
  background: var(--flaeche); font-size: 12px; color: var(--text-2); cursor: pointer; }
.pille:hover { background: var(--gehoben); color: var(--text); }
.symbolknopf { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--leise); cursor: pointer; }
.symbolknopf:hover { background: var(--gehoben); color: var(--text); }
.senden { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--primaer); color: var(--primaer-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform 120ms var(--kurve); }
.senden:active { transform: scale(0.96); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips:not(:empty) { margin-bottom: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 8px; border-radius: 6px; background: var(--gehoben); font-size: 12px; color: var(--text-2); max-width: 100%; }
.chip button { border: 0; background: transparent; color: var(--leise); cursor: pointer; width: 18px; height: 18px; border-radius: 4px; }
.chip button:hover { color: var(--text); }
.menue-wrap { position: relative; }
.menue { position: absolute; top: calc(100% + 4px); right: 0; min-width: 200px; padding: 4px; border-radius: 10px; background: var(--flaeche);
  border: 1px solid var(--linie-stark); box-shadow: var(--schatten-schwebend); z-index: 20; display: flex; flex-direction: column; }
.menue.oben { top: auto; bottom: calc(100% + 4px); left: 0; right: auto; }
.menue button { text-align: left; border: 0; background: transparent; height: 32px; padding: 0 8px; border-radius: 6px; cursor: pointer; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.menue button:hover { background: var(--gehoben); }
.m-titel { font-size: 12px; color: var(--leise); padding: 4px 8px; }
.m-leer { font-size: 12px; color: var(--leise); padding: 4px 8px 8px; }
.m-trenner { height: 1px; background: var(--linie); margin: 4px; }

/* Fortschritt */
.fortschritt { display: flex; flex-direction: column; gap: 8px; }
.f-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.f-titel { font-weight: 500; font-size: 13px; }
.f-teil { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.laufband { height: 3px; border-radius: 2px; background: var(--gehoben); overflow: hidden; position: relative; }
.laufband::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; border-radius: 2px; background: var(--korrektur); animation: lauf 1400ms var(--kurve) infinite; }
@keyframes lauf { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.schritte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 20px; }
.schritte li { display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
.schritte li.frueher { color: var(--leise); font-size: 12px; padding-left: 24px; }
.schritte .zeichen { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.schritte li.fertig .zeichen { background: no-repeat center/14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.schritte li.fehler { color: var(--fehler); }
.schritte li.fehler .zeichen::before { content: "!"; display: block; text-align: center; font-weight: 600; font-size: 12px; line-height: 16px; }
.zeichen.laeuft-zeichen, .schritte li.laeuft .zeichen { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--linie-stark); border-top-color: var(--korrektur);
  animation: dreh 800ms linear infinite; vertical-align: -2px; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .laufband::after, .zeichen.laeuft-zeichen, .schritte li.laeuft .zeichen { animation: none; } }

.hinweise { padding: 8px 16px 0; display: flex; flex-direction: column; gap: 4px; }
.hinweise:empty { display: none; }

/* Endloser Canvas */
.canvas { flex: 1; min-width: 0; position: relative; overflow: hidden; margin: -12px 0 -12px -12px; cursor: grab; touch-action: none;
  background-color: var(--grund); background-image: radial-gradient(var(--punkte) 1px, transparent 1px); background-size: 24px 24px; }
.canvas.schiebt { cursor: grabbing; }
.welt { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.leer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--leise); pointer-events: none; }
.akarte { position: absolute; width: 300px; cursor: pointer; user-select: none; }
.akarte .matte { background: var(--gehoben); border-radius: 12px; padding: 16px; transition: background-color 150ms var(--kurve); }
.akarte:hover .matte { background: #ececec; }
@media (prefers-color-scheme: dark) { .akarte:hover .matte { background: #2a2a2d; } }
.akarte img { width: 100%; display: block; border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06); pointer-events: none; }
.akarte.gewaehlt .matte { box-shadow: 0 0 0 2px var(--korrektur); }
.akarte.zieht { cursor: grabbing; z-index: 2; }
.akarte.zieht .matte { box-shadow: var(--schatten-schwebend); }
.akarte .aktionen { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity 150ms var(--kurve); }
.akarte:hover .aktionen, .akarte:focus-within .aktionen { opacity: 1; }
.rund { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(23, 23, 23, 0.72); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background-color 150ms var(--kurve); }
.rund:hover { background: rgba(23, 23, 23, 0.9); }
.rund.erledigt { background: var(--akzent); color: var(--akzent-text); }
.akarte .name { position: absolute; left: 0; top: calc(100% + 8px); display: flex; gap: 8px; align-items: center; padding: 2px 8px; border-radius: 6px;
  background: var(--flaeche); border: 1px solid var(--linie); font-size: 12px; line-height: 18px; color: var(--text); white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity 150ms var(--kurve); }
.akarte .name span { color: var(--leise); }
.akarte:hover .name { opacity: 1; }
.fehlerpunkt { position: absolute; top: 8px; left: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--fehler); box-shadow: 0 0 0 2px var(--flaeche); }
.meta { font-size: 12px; line-height: 16px; color: var(--leise); font-variant-numeric: tabular-nums; }
.punkt { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.punkt::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--leise); }
.punkt.ok::before { background: var(--ok); } .punkt.warnung::before { background: var(--warn); } .punkt.fehler::before { background: var(--fehler); }
.akarte.platzhalter { padding: 16px; cursor: default; display: flex; flex-direction: column; gap: 12px; min-height: 180px; background: var(--gehoben); border-radius: 12px; }
.ph-kopf { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 13px; }
.etikett { position: absolute; width: 300px; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 16px; color: var(--leise); pointer-events: none; white-space: nowrap; }
.etikett span:first-child { overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.zoom { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--flaeche);
  border: 1px solid var(--linie); box-shadow: var(--schatten-schwebend); z-index: 3; }
.zoom .wert { min-width: 56px; font: 12px/16px var(--mono); font-variant-numeric: tabular-nums; }

/* Ausklapper von rechts */
.schublade { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 420px; min-width: 340px; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 16px; box-shadow: var(--schatten-schwebend); z-index: 4; display: flex; flex-direction: column; cursor: default; overflow: visible; }
.s-inhalt { border-radius: 0 0 16px 16px; }
.griff { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 1; }
.griff:hover, .griff.aktiv { background: linear-gradient(to right, transparent 3px, var(--korrektur) 3px, var(--korrektur) 5px, transparent 5px); }
.s-kopf { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.einklappen { width: 32px; height: 32px; flex: none; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--leise); display: inline-flex; align-items: center; justify-content: center; }
.einklappen:hover { background: var(--gehoben); color: var(--text); }
.bildleiste { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.bildleiste .knopf { gap: 8px; text-decoration: none; }
.reiter { display: flex; gap: 16px; border-bottom: 1px solid var(--linie); margin: 20px 0 16px; }
.reiter button { border: 0; background: transparent; padding: 8px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer; color: var(--leise); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.reiter button.an { color: var(--text); border-bottom-color: var(--text); }
.zahl { font-size: 11px; line-height: 16px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--gehoben); color: var(--warn); }
.zahl:empty { display: none; }
.reiterinhalt h3 { font-size: 13px; font-weight: 500; margin: 20px 0 8px; }
.reiterinhalt h3:first-child { margin-top: 0; }
.auswahl { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-bottom: 8px; }
.auswahl label { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-2); min-height: 24px; }
.auswahl label.aus { color: var(--leise); opacity: 0.6; }
.info-liste { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 8px; font-size: 13px; }
.info-liste dt { color: var(--leise); }
.info-liste dd { margin: 0; }
.s-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.s-titel h2 { font-size: 15px; font-weight: 500; margin: 0; line-height: 20px; }
.schliessen { width: 32px; height: 32px; flex: none; border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 8px; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--text-2); }
.schliessen:hover { background: var(--gehoben); color: var(--text); }
.s-inhalt { overflow-y: auto; padding: 16px; flex: 1; }
.versionen { display: flex; gap: 4px; flex-wrap: wrap; }
.versionen button { font-size: 12px; line-height: 16px; border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 6px; padding: 2px 8px; cursor: pointer; color: var(--text-2); font-variant-numeric: tabular-nums; }
.versionen button.an { background: var(--primaer); color: var(--primaer-text); border-color: var(--primaer); }
.buehne { display: flex; flex-direction: column; gap: 16px; }
.rahmen { position: relative; border: 1px solid var(--linie); background: var(--gehoben); overflow: hidden; }
.rahmen iframe { border: 0; transform-origin: 0 0; position: absolute; left: 0; top: 0; pointer-events: none; }
.rahmen .klickflaeche { position: absolute; inset: 0; cursor: crosshair; }
.rahmen .stift { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--akzent); color: var(--akzent-text);
  font: 500 11px/20px var(--mono); text-align: center; box-shadow: 0 0 0 2px #fff, 0 1px 2px rgba(0, 0, 0, 0.2); pointer-events: none; }
.rahmen .stift.neu { opacity: 0.6; }
.rahmen-titel { font-size: 12px; line-height: 16px; color: var(--leise); margin-bottom: 8px; }
.popover { position: absolute; width: 240px; padding: 12px; border-radius: 12px; background: var(--flaeche); border: 1px solid var(--linie-stark);
  box-shadow: var(--schatten-schwebend); z-index: 6; display: flex; flex-direction: column; gap: 8px; cursor: default; }
.popover .reihe { justify-content: flex-end; }
.umschalter { font-size: 12px; color: var(--text-2); display: inline-flex; gap: 8px; align-items: center; margin-top: 12px; }
.hilfe { font-size: 12px; color: var(--leise); margin: 4px 0 0; }
.block { margin-top: 16px; }
.block h3 { font-size: 14px; font-weight: 500; margin: 0 0 4px; }
.block h4 { font-size: 13px; font-weight: 500; margin: 16px 0 4px; color: var(--text); }
.erklaerung { font-size: 12px; line-height: 16px; color: var(--leise); margin: 0 0 12px; }
.ebenen { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 4px; }
.ebenen label { display: flex; gap: 8px; align-items: center; font-size: 13px; height: 28px; }
.felder label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 16px; color: var(--leise); margin-bottom: 12px; }
.felder textarea { min-height: 36px; color: var(--text); font-size: 13px; }
#d-wunsch { margin-bottom: 8px; }
.gates { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.gates li { padding: 8px 0; border-bottom: 1px solid var(--linie); }
.gates li:last-child { border-bottom: 0; }
.gates li small { display: block; color: var(--leise); font-size: 12px; line-height: 16px; margin: 4px 0 0 12px; }
.historie { list-style: none; padding: 0; font-size: 12px; line-height: 16px; color: var(--leise); margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.historie b { font-weight: 500; color: var(--text-2); }
.reihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reihe.rechts { justify-content: flex-end; }
.reihe.abstand { margin-top: 12px; }
.klein { font-size: 12px; line-height: 16px; color: var(--leise); }

/* Bibliothek */
.bibliothek { position: absolute; inset: 0; overflow: hidden; display: flex; background: var(--grund); z-index: 2; cursor: default; }
.b-gruppen { width: 232px; flex: none; border-right: 1px solid var(--linie); padding: 16px 8px; overflow-y: auto; background: var(--flaeche); }
.b-gruppen .bereich { font-size: 12px; color: var(--leise); margin: 16px 8px 4px; }
.b-gruppen .bereich:first-child { margin-top: 0; }
.b-gruppen button { display: flex; width: 100%; justify-content: space-between; align-items: center; height: 32px; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer; color: var(--text-2); font-size: 13px; text-align: left; }
.b-gruppen button:hover { background: var(--gehoben); }
.b-gruppen button.an { background: var(--gehoben); color: var(--text); }
.b-gruppen button span { font-size: 12px; color: var(--leise); font-variant-numeric: tabular-nums; }
.b-inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.b-kopf { display: flex; align-items: center; gap: 12px; padding: 16px 24px; }
.b-kopf h2 { margin: 0; font-size: 18px; font-weight: 500; }
.b-kopf input[type=search] { width: 200px; }
.hochladen { cursor: pointer; }
.b-raster { flex: 1; overflow-y: auto; padding: 0 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; align-content: start; grid-auto-rows: max-content; }
.b-kachel { margin: 0; min-width: 0; border-radius: 10px; overflow: hidden; background: var(--flaeche); border: 1px solid var(--linie); cursor: pointer;
  transition: border-color 150ms var(--kurve); }
.b-kachel:hover { border-color: var(--linie-stark); }
.b-kachel .b-bild { background: var(--gehoben); display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; padding: 12px; }
.b-kachel img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.b-kachel .b-name { padding: 8px 12px; min-width: 0; font-size: 12px; line-height: 16px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.b-kachel .b-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-kachel .b-name span:last-child { color: var(--leise); white-space: nowrap; }
.b-leer { color: var(--leise); padding: 40px 0; }
.b-vorschau { position: absolute; top: 0; right: 0; bottom: 0; width: 380px; background: var(--flaeche); border-left: 1px solid var(--linie);
  box-shadow: var(--schatten-schwebend); padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.b-vorschau img { width: 100%; border-radius: 8px; background: var(--gehoben); }
.b-vorschau code { font: 12px/16px var(--mono); background: var(--gehoben); padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; }

/* Dialoge */
dialog { border: 1px solid var(--linie); border-radius: 16px; background: var(--flaeche); color: var(--text); padding: 0; width: min(520px, 92vw); }
dialog::backdrop { background: rgba(0, 0, 0, 0.3); }
.dform { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.dform h2 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.dform label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--leise); }
.lehre { border: 1px solid var(--linie); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }
.lehre small { display: block; color: var(--leise); margin: 4px 0 8px; }

@media (max-width: 900px) {
  .arbeitsflaeche { flex-direction: column; height: auto; }
  html, body { overflow: auto; }
  .chat { width: auto !important; height: 60vh; }
  .trenner { display: none; }
  .canvas { height: 80vh; }
  .schublade { width: 100% !important; }
  .kopf { flex-wrap: wrap; height: auto; padding: 8px 16px; }
}

/* Modus über dem Bild und Kommentare */
.modus { display: flex; justify-content: center; gap: 2px; padding: 2px; border-radius: 8px; background: var(--gehoben); width: fit-content; margin: 0 auto 12px; }
.modus button { border: 0; background: transparent; padding: 4px 12px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-size: 12px; }
.modus button.an { background: var(--primaer); color: var(--primaer-text); }
.klickflaeche.modus-ansehen, .klickflaeche.modus-bearbeiten { cursor: default; }
.klickflaeche.modus-kommentieren { cursor: crosshair; }
.schublade.nur-ansehen .reiter, .schublade.nur-ansehen .reiterinhalt, .schublade.nur-ansehen .bildleiste { display: none !important; }
.kommentare { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.kommentare li { font-size: 13px; }
.kommentare .k-kopf { display: flex; align-items: center; gap: 8px; }
.kommentare .k-kopf b { font-weight: 500; }
.kommentare p { margin: 4px 0 0; color: var(--text-2); }
.kommentare .leer-zeile { color: var(--leise); font-size: 12px; padding: 24px 0; text-align: center; }
.stift-klein { width: 18px; height: 18px; border-radius: 50%; background: var(--akzent); color: var(--akzent-text); font: 500 10px/18px var(--mono); text-align: center; flex: none; }
.klein-komponist textarea { font-size: 13px; }
.zahl.neutral { color: var(--text-2); }

/* Ausklapper: Bild links, Panel rechts */
.schublade { display: flex; flex-direction: row; overflow: hidden; }
.buehne-spalte { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--grund); border-radius: 16px 0 0 16px; }
.buehne-kopf { display: flex; align-items: center; gap: 12px; padding: 12px 16px 0; }
.buehne-kopf .s-titel { flex: 1; min-width: 0; flex-direction: row; align-items: center; gap: 12px; }
.buehne-kopf h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buehne-spalte .modus { margin: 12px auto 0; }
.buehne { flex: 1; min-height: 0; overflow: auto; padding: 24px; align-items: center; justify-content: center; }
.buehne.mehrere { justify-content: flex-start; }
.panel { width: 340px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--linie); background: var(--flaeche); min-height: 0; }
.panel .reiter { margin: 0; padding: 0 16px; gap: 16px; }
.panel .reiter button { padding: 14px 0 12px; }
.panel .reiterinhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; }
.panel .reiterinhalt[hidden] { display: none !important; }
.werkzeugliste { display: flex; flex-direction: column; gap: 2px; }
.werkzeugliste button { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--text); text-align: left; transition: background-color 150ms var(--kurve); }
.werkzeugliste button:hover { background: var(--gehoben); }
.werkzeugliste button > svg { color: var(--text-2); flex: none; }
.werkzeugliste button > span:not(.chev) { flex: 1; }
.chev { color: var(--leise); display: inline-flex; }
.unter { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: -16px; }
.unter[hidden] { display: none !important; }
.unter-kopf { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.unter-kopf b { font-weight: 500; font-size: 13px; }
.zurueck { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; }
.zurueck:hover { background: var(--gehoben); color: var(--text); }
.unter-inhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }
.unter-fuss { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--linie); }
.unter-fuss .klein { flex: 1; }
.wahlliste { display: flex; flex-direction: column; gap: 2px; }
.wahl { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.wahl:hover { background: var(--gehoben); }
.wahl.aus { opacity: 0.5; }
.wahl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primaer); margin: 0; }
.w-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.w-text small { font-size: 12px; color: var(--leise); font-variant-numeric: tabular-nums; }
.w-aktuell { font-size: 12px; color: var(--leise); }
.ratio-box { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ratio { display: block; max-width: 24px; max-height: 24px; width: 24px; border: 1.5px solid var(--text-2); border-radius: 3px; }
.kuerzel { width: 28px; height: 28px; flex: none; border-radius: 6px; background: var(--gehoben); display: inline-flex; align-items: center; justify-content: center;
  font: 500 11px/1 var(--mono); color: var(--text-2); }
.auge { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; }
.auge[aria-pressed=false] { color: var(--leise); }
#d-felder label { margin-bottom: 12px; }
#d-wunsch { min-height: 120px; }
.info-block { border-top: 1px solid var(--linie); padding: 12px 0; font-size: 13px; }
.info-block summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.info-zeile { display: flex; align-items: center; gap: 12px; }
.info-zeile span:first-child { color: var(--leise); width: 80px; }
.info-zeile span:nth-child(2) { flex: 1; }
.panel .kommentare { flex: 1; }
.panel-fuss { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--linie); flex-wrap: wrap; }
.breit-knopf { flex: 1; gap: 8px; text-decoration: none; }
.knopf.quadrat { width: 32px; padding: 0; }
.menue.rechtsbuendig { left: auto; right: 0; }
.fussstatus { width: 100%; }
.fussstatus:empty { display: none; }
.schublade.nur-ansehen .panel { display: none !important; }

input[type=checkbox] { padding: 0; width: 16px; height: 16px; margin: 0; border: 0; accent-color: var(--primaer); cursor: pointer; }

/* Darstellung der Motive auf dem Canvas */
.darstellung { position: absolute; right: 16px; bottom: 60px; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--flaeche);
  border: 1px solid var(--linie); box-shadow: var(--schatten-schwebend); z-index: 3; }
.darstellung button { border: 0; background: transparent; padding: 4px 10px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-size: 12px; }
.darstellung button.an { background: var(--gehoben); color: var(--text); }
.akarte .name b { font-weight: 500; }
.akarte .name .format { display: none; }

/* Pur: nur das Bild, eine Haarlinie gegen weiße Motive auf hellem Grund */
.welt.stil-pur .matte, .welt.stil-papier .matte, .welt.stil-kontakt .matte { background: none !important; padding: 0; border-radius: 0; }
.welt.stil-pur img { border-radius: 2px; box-shadow: 0 0 0 1px var(--linie); }
.welt.stil-pur .akarte.gewaehlt .matte, .welt.stil-papier .akarte.gewaehlt .matte, .welt.stil-kontakt .akarte.gewaehlt .matte { box-shadow: none; }
.welt.stil-pur .akarte.gewaehlt img, .welt.stil-kontakt .akarte.gewaehlt img { box-shadow: 0 0 0 2px var(--korrektur); }

/* Abzug: liegt wie ein Print auf dem Leuchttisch, beim Drüberfahren hebt es sich an */
.welt.stil-papier img { border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.10); transition: transform 180ms var(--kurve), box-shadow 180ms var(--kurve); }
.welt.stil-papier .akarte:hover img { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.14); }
.welt.stil-papier .akarte.gewaehlt img { box-shadow: 0 0 0 2px var(--korrektur), 0 8px 24px rgba(0, 0, 0, 0.10); }

/* Kontaktabzug: Name, Version und Format stehen immer darunter, ruhig in Mono */
.welt.stil-kontakt img { border-radius: 0; box-shadow: 0 0 0 1px var(--linie); }
.welt.stil-kontakt .akarte .name { position: static; opacity: 1; background: none; border: 0; padding: 8px 0 0; font: 11px/16px var(--mono); color: var(--leise); gap: 8px; }
.welt.stil-kontakt .akarte .name b { font-weight: 400; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.welt.stil-kontakt .akarte .name .format { display: inline; margin-left: auto; }

/* Schwebende Meldung oben rechts */
.meldungen { position: fixed; top: 68px; right: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.meldung { background: var(--akzent); color: var(--akzent-text); border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 500;
  box-shadow: var(--schatten-schwebend); animation: einblenden 220ms var(--kurve); max-width: 320px; }
.meldung.fehler { background: var(--fehler); color: #fff; }
.meldung.weg { opacity: 0; transform: translateY(-6px); transition: opacity 300ms var(--kurve), transform 300ms var(--kurve); }
@keyframes einblenden { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.textlink { border: 0; background: transparent; padding: 0; font-size: 12px; color: var(--leise); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--linie-stark); }
.textlink:hover { color: var(--text); }
.marke-neu { display: flex; flex-direction: column; gap: 8px; }
.marke-neu input { width: 100%; }
.dform .unter-titel { margin: 4px 0 0; }
.lehre p { margin: 0; }
.lehre small { margin: 4px 0 8px; }

/* Ausklapper, überarbeitet: Titel und Versionen mittig über dem Bild, Bild oben, Schließen rechts */
.buehne-kopf { flex-direction: column; align-items: center; gap: 8px; padding: 16px 24px 0; }
.buehne-kopf h2 { font-size: 15px; font-weight: 500; margin: 0; line-height: 20px; max-width: 100%; text-align: center; }
.buehne { align-items: center; justify-content: flex-start; padding: 16px 24px 24px; }
.panel-kopf { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; border-bottom: 1px solid var(--linie); }
.panel-kopf .reiter { border-bottom: 0; padding: 0; }
.panel-kopf .schliessen { border: 0; background: transparent; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.panel-kopf .schliessen:hover { background: var(--gehoben); color: var(--text); }
.unter { flex: 0 1 auto; }
.unter-inhalt { flex: 0 1 auto; padding: 16px 16px 0; }
.unter-fuss { border-top: 0; padding: 16px; }
.info-titel { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.g-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gates li.ignoriert { color: var(--leise); }
.klickflaeche { cursor: default; }
.klickflaeche.kommentieren { cursor: crosshair; }
.panel-fuss { flex-wrap: nowrap; }
.menue a { display: flex; align-items: center; height: 32px; padding: 0 8px; border-radius: 6px; font-size: 13px; color: var(--text); text-decoration: none; }
.menue a:hover { background: var(--gehoben); }
#d-menue { min-width: 120px; }

/* Bibliothek: schwebendes Panel, Gruppen rechts, etwas Canvas zum Chat */
.bibliothek { inset: 12px 12px 12px 24px; border-radius: 16px; background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten-schwebend); }
.b-gruppen { order: 2; border-right: 0; border-left: 1px solid var(--linie); background: transparent; border-radius: 0 16px 16px 0; }
.b-inhalt { order: 1; }
.b-kopf { gap: 8px; align-items: baseline; padding: 20px 24px 16px; }
.b-bild { position: relative; }
.b-kachel .aktionen { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity 150ms var(--kurve); }
.b-kachel:hover .aktionen { opacity: 1; }
.b-vorschau { right: 233px; border-radius: 0; }
.v-kopf { display: flex; align-items: center; gap: 8px; }
.v-kopf b { flex: 1; font-weight: 500; }
.v-kopf .schliessen { border: 0; background: transparent; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }

.karte details.notiz { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.karte details.notiz summary { cursor: pointer; font-size: 12px; color: var(--leise); }

/* .klein ist auch eine Textklasse; auf Knöpfen nur die Größe übernehmen, nicht die graue Farbe */
.knopf.klein { color: var(--primaer-text); line-height: 1; }
.knopf.zweit.klein { color: var(--text); }

/* Textfelder: einzeilige Felder mittig, ohne Leerraum unter der Zeile */
.felder textarea { min-height: 0; height: auto; padding: 7px 10px; line-height: 20px; resize: none; }

/* Templates und Format im Eingabefeld */
.pille.gesetzt { background: var(--gehoben); color: var(--text); border-color: var(--linie-stark); }
.pille #k-templates-text { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.klein-ratio { width: 12px; max-width: 12px; max-height: 12px; border-width: 1.5px; border-radius: 2px; }
.ratio.auto { border-style: dashed; aspect-ratio: 1 / 1; }
.templates-menue { width: 360px; max-height: 420px; overflow-y: auto; padding: 8px; }
.t-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.t-kachel { display: flex !important; flex-direction: column; gap: 4px; height: auto !important; padding: 4px !important; border-radius: 8px; text-align: left; white-space: normal !important; max-width: none !important; }
.t-kachel.an { box-shadow: 0 0 0 2px var(--korrektur); }
.t-bild { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: 6px; background: var(--gehoben); overflow: hidden; font-size: 12px; color: var(--leise); }
.t-bild img { width: 100%; height: 100%; object-fit: cover; }
.t-name { font-size: 11px; line-height: 14px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.format-menue { min-width: 180px; }
.f-zeile { display: flex !important; align-items: center; gap: 12px; height: 36px !important; }
.f-zeile .f-text { flex: 1; }
.f-zeile .haken { color: var(--text); }
.chat { overflow: visible; }
.k-leiste { position: relative; }
.menue-wrap.statisch { position: static; }
.templates-menue { left: -8px !important; right: auto; width: min(360px, calc(var(--chat-breite) - 8px)); }

/* Schmaler Chat: Beschriftungen weg, Symbole bleiben, Senden bleibt in der Karte */
.komponist { container-type: inline-size; }
.k-leiste { min-width: 0; }
.senden { flex: none; }
@container (max-width: 460px) { /* alle Beschriftungen brauchen rund 455 px */
  .pille .p-text, #k-format-text { display: none; }
  .pille { padding: 0 8px; }
  .anzahl { display: none !important; } /* Anzahl entfällt, wenn der Chat schmal ist */
}
.ratio { max-width: none; max-height: none; box-sizing: border-box; }
.ratio.auto { aspect-ratio: auto; }
.klein-ratio { max-width: none; max-height: none; }

/* Anzahl Varianten */
.anzahl { display: inline-flex; align-items: center; height: 28px; border: 1px solid var(--linie-stark); border-radius: 14px; background: var(--flaeche); flex: none; }
.anzahl.gesetzt { background: var(--gehoben); }
.anzahl button { border: 0; background: transparent; width: 24px; height: 26px; cursor: pointer; color: var(--text-2); font-size: 14px; line-height: 1; border-radius: 13px; }
.anzahl button:hover:not(:disabled) { color: var(--text); background: var(--gehoben); }
.anzahl button:disabled { color: var(--linie-stark); cursor: default; }
.anzahl span { font-size: 12px; color: var(--text-2); min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }

/* Statusgruppe oben rechts: eine Zeile, eine Höhe */
.statusgruppe { display: inline-flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); }
.statusgruppe .zustand, .statusgruppe .kosten, .statuslink { font-size: 12px; line-height: 16px; }
.statusgruppe .kosten { font-family: inherit; font-variant-numeric: tabular-nums; color: var(--text-2); }
.trennlinie { width: 1px; height: 16px; background: var(--linie-stark); }
.statuslink { border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.statuslink:hover { color: var(--text); }
.zaehler { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--akzent); color: var(--akzent-text); font-size: 11px; line-height: 16px; text-align: center; font-weight: 500; }
.zustand.an::before { background: var(--korrektur); }

/* Kontext-Chips: grün hinterlegt, mit kleinem Bild */
.chip { height: 28px; padding: 0 4px 0 4px; gap: 6px; border-radius: 8px; background: rgba(200, 240, 74, 0.28); color: var(--text); font-size: 12px; align-items: center; }
.chip img { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; flex: none; }
.chip .chip-text { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 2px; }
.chip button { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; color: var(--text-2); }
.chip button svg { width: 12px; height: 12px; }
.chip button:hover { background: rgba(23, 23, 23, 0.08); color: var(--text); }

/* Ausklapper: gleicher Abstand Titel, Versionen, Bild */
.buehne-kopf { padding: 28px 24px 0; gap: 12px; }
.buehne { padding-top: 12px; }
.chip:not(:has(img)) .chip-text { padding-left: 6px; }
.buehne-kopf { gap: 16px; padding-top: 32px; }
.buehne { padding-top: 16px; }

/* Templates links bündig am Knopf */
.templates-menue { left: 0 !important; width: 360px; }
.t-bild.frei { background: var(--gehoben); }
.statuslink.anhalten { color: var(--fehler); }
.statuslink.anhalten:hover { text-decoration: underline; }

/* Arbeitsschritte: nur die Zahl, Pfeil rechts daneben */
.aktivitaet summary::before { content: none; }
.aktivitaet summary::after { content: "›"; display: inline-block; transition: transform 150ms var(--kurve); }
.aktivitaet[open] summary::after { transform: rotate(90deg); }
.aktivitaet summary { gap: 6px; }

/* Karten, die etwas von dir wollen: blau */
:root { --blau-grund: #eef4ff; --blau-linie: #c7d7fe; }
@media (prefers-color-scheme: dark) { :root { --blau-grund: #18213a; --blau-linie: #2c3b66; } }
.karte.aktion { background: var(--blau-grund); border-color: var(--blau-linie); display: flex; flex-direction: column; gap: 8px; }
.karte.aktion h4 { margin: 0; }
.karte.aktion p { margin: 0; color: var(--text-2); font-size: 13px; }
.karte.aktion input { margin-top: 0; background: var(--flaeche); }
.karte.aktion .reihe { margin-top: 4px; }
.karte.erledigt { background: var(--flaeche); border-color: var(--linie); padding: 8px 12px; }
.karte.erledigt h4 { font-size: 13px; color: var(--text-2); }
.karte.erledigt p { display: none; }
.frage { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text); }
.vorschlaege { display: flex; flex-wrap: wrap; gap: 4px; }
.vorschlag { border: 1px solid var(--blau-linie); background: var(--flaeche); border-radius: 12px; padding: 2px 10px; font-size: 12px; cursor: pointer; color: var(--text-2); }
.vorschlag:hover { color: var(--text); }

/* Abgeliefert: grün getönt, kleine Vorschauen */
.karte.abgeliefert { background: rgba(200, 240, 74, 0.16); border-color: rgba(143, 181, 46, 0.35); }
.karte.abgeliefert h4 { margin-bottom: 8px; }
.abgabe-liste { display: flex; flex-direction: column; gap: 4px; }
.abgabe { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; color: var(--text); }
.abgabe:hover { background: rgba(255, 255, 255, 0.6); }
.abgabe img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px var(--linie); }

/* Agent arbeitet: neutral getönt */
.karte.fortschritt { background: var(--gehoben); border-color: var(--linie); }
.statuslink.anhalten { color: #9f1d1d; font-weight: 500; }
@media (prefers-color-scheme: dark) { .statuslink.anhalten { color: #f08a8a; } }

.d-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.d-x { border: 0; background: transparent; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex: none; }
.d-x:hover { background: var(--gehoben); color: var(--text); }
#dialog-lehren { max-height: 80vh; }
#dialog-lehren .dform { max-height: 80vh; }
#l-liste { overflow-y: auto; min-height: 0; flex: 1; }
.hinweisliste { margin: 0; padding-left: 16px; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }

/* Rückfrage: Auswahlknöpfe bleiben gedrückt, Hinweis darunter */
.vorschlaege { gap: 6px; }
.vorschlag { padding: 4px 12px; font-size: 13px; border-radius: 14px; transition: background-color 120ms var(--kurve), border-color 120ms var(--kurve); }
.vorschlag[aria-pressed="true"] { background: var(--primaer); color: var(--primaer-text); border-color: var(--primaer); }
.frage > span { font-weight: 500; }
.frage-hinweis { margin: 2px 0 0; font-size: 12px; line-height: 16px; color: var(--text-2); display: flex; gap: 6px; }
.frage-hinweis::before { content: "i"; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--blau-linie); font: 600 9px/12px var(--mono); text-align: center; color: var(--text-2); margin-top: 1px; }
.vorschlag[aria-pressed="true"], .vorschlag[aria-pressed="true"]:hover { background: var(--primaer); color: var(--primaer-text); border-color: var(--primaer); }
.vorschlag[aria-pressed="false"]:hover { background: var(--flaeche); color: var(--text); border-color: var(--leise); }

/* Bibliothek schließen: × oben rechts wie im Ausklapper */
.b-x { position: absolute; top: 12px; right: 12px; z-index: 3; border: 0; background: transparent; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.b-x:hover { background: var(--gehoben); color: var(--text); }
.b-gruppen { padding-top: 52px; }

/* Kopf: Name links, Umschalter mittig, Status rechts */
.kopf { position: relative; }
.umschaltung.mitte { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; }
.marke-app { font-size: 16px; letter-spacing: -0.01em; }

/* Projektauswahl über dem Chat */
.chat-kopf { padding: 8px 8px 0; border-bottom: 1px solid var(--linie); padding-bottom: 8px; }
.projekt-wrap { position: relative; }
.projektknopf { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.projektknopf:hover { background: var(--gehoben); }
.projektknopf .p-titel { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.projektknopf .p-marke { font-size: 12px; color: var(--leise); flex: 1; white-space: nowrap; }
.projektknopf svg { color: var(--leise); flex: none; }
.projektmenue { top: calc(100% + 4px); left: 0; right: auto; width: 100%; min-width: 260px; max-height: 60vh; overflow-y: auto; }
.projektmenue .p-neu { display: flex !important; align-items: center; gap: 8px; font-weight: 500; }
.projektmenue .p-eintrag { display: flex !important; align-items: center; gap: 8px; height: 40px !important; max-width: none !important; }
.projektmenue .p-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.projektmenue .p-klein { font-size: 12px; color: var(--leise); }
.projektmenue .p-eintrag.an { background: var(--gehoben); }

/* Chat einklappen, wie eine Seitenleiste */
.chat-kopf { display: flex; align-items: center; gap: 4px; }
.chat-kopf .projekt-wrap { flex: 1; min-width: 0; }
.chat-auf { display: none; position: absolute; top: 24px; left: 24px; z-index: 6; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--linie); background: var(--flaeche); box-shadow: var(--schatten-schwebend); color: var(--text-2); cursor: pointer; align-items: center; justify-content: center; }
.chat-auf:hover { color: var(--text); }
.arbeitsflaeche { position: relative; }
body.chat-zu .chat, body.chat-zu .trenner { display: none; }
body.chat-zu .chat-auf { display: inline-flex; }
body.chat-zu .arbeitsflaeche { padding-left: 0; }

/* Blättern unten im Detail, auf Höhe von Herz und Download */
.blaettern { display: inline-flex; gap: 4px; }
.panel-fuss .blaettern + .knopf { margin-left: 4px; }

/* Datei im Chat */
.dateichip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--linie-stark);
  background: var(--flaeche); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.dateichip svg { flex: none; color: var(--leise); }
.dateichip:hover { background: var(--gehoben); }

/* Textkarten im Canvas */
.textkarte .matte { height: 300px; box-sizing: border-box; overflow: hidden; }
.textkarte .blatt { height: 100%; overflow: hidden; background: var(--flaeche); border-radius: 4px; padding: 16px; font-size: 9px; line-height: 13px; color: var(--text-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06); pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); }
.textkarte .blatt p { margin: 0 0 6px; }
.textkarte .blatt table { border-collapse: collapse; width: 100%; margin: 0 0 6px; }
.textkarte .blatt td, .textkarte .blatt th { border-bottom: 1px solid var(--linie); padding: 2px 4px; text-align: left; vertical-align: top; }
.textkarte .blatt ul { margin: 0 0 6px; padding-left: 12px; }

/* Textblatt rechts */
.textblatt { width: min(560px, calc(100% - 24px)); }
.t-text { flex: 1; overflow-y: auto; padding: 16px 20px; font-size: 14px; line-height: 22px; }
.t-text p { margin: 0 0 12px; }
.t-text table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 13px; }
.t-text th { text-align: left; font-weight: 500; color: var(--leise); }
.t-text td, .t-text th { border-bottom: 1px solid var(--linie); padding: 8px 8px 8px 0; vertical-align: top; }
.t-text ul, .t-text ol { margin: 0 0 12px; padding-left: 20px; }
.t-text h2 { font-size: 17px; line-height: 24px; font-weight: 500; margin: 0 0 12px; }
.t-text h3 { font-size: 13px; font-weight: 500; margin: 24px 0 8px; }
.textkarte .blatt h2 { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text); margin: 0 0 8px; }
.textkarte .blatt h3 { font-size: 10px; font-weight: 500; color: var(--text); margin: 8px 0 4px; }
.blase h2, .blase h3 { font-size: 14px; font-weight: 500; margin: 8px 0 4px; }
.schublade.textblatt { flex-direction: column; width: min(560px, calc(100% - 24px)) !important; min-width: 0; }
.textblatt .s-kopf { align-items: center; }
.textblatt .panel-fuss { flex-wrap: nowrap; }

/* Blättern: schlichte Pfeile unter dem Bild */
.buehne-spalte .blaettern { display: flex; justify-content: center; gap: 8px; padding: 0 0 16px; }
.pfeil { width: 36px; height: 36px; border: 0; background: transparent; color: var(--leise); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pfeil:hover { color: var(--text); background: var(--gehoben); }

/* Post-Text im Ausklapper */
#m-posttext.hat { color: var(--text); }
.posttext:empty { display: none; }
.posttext { margin-top: 20px; }
.pt-text { font-size: 13px; line-height: 20px; }
.pt-text p { margin: 0 0 8px; color: var(--text-2); }
.pt-text h3 { font-size: 13px; font-weight: 500; margin: 16px 0 6px; }
.pt-text table { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.pt-text th { text-align: left; font-weight: 500; color: var(--leise); font-size: 12px; }
.pt-text td, .pt-text th { border-bottom: 1px solid var(--linie); padding: 6px 8px 6px 0; vertical-align: top; }
.pt-text ul { margin: 0 0 8px; padding-left: 18px; color: var(--text-2); }
.posttext .reihe { display: flex; gap: 16px; }
.kanal-wrap { position: relative; display: block; }
.kanalknopf { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.kanalknopf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanalknopf svg { flex: none; color: var(--leise); }
.kanalmenue { left: 0; right: 0; width: auto; }
.kanalmenue .kanal { display: flex !important; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; height: auto !important; padding: 8px 10px; border: 0; background: transparent;
  border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; color: var(--text); text-align: left; }
.kanalmenue .kanal small { font-size: 12px; color: var(--leise); }
.kanalmenue .kanal:hover { background: var(--gehoben); }
.kanalmenue .kanal[aria-pressed="true"] { background: var(--gehoben); }
#z-alles.quadrat { width: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
/* Das Untermenü scrollt; die Kanalliste klappt deshalb im Fluss auf statt darüber zu schweben */
.kanalmenue { position: static; margin-top: 4px; min-width: 0; }

/* Logo: ODD, das O schaut dem Zeiger nach */
a.marke-app { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
.odd-logo { height: 24px; width: auto; display: block; overflow: visible; }

/* ODD Learnings: breiter, Knöpfe rechts neben dem Text */
#dialog-lehren { width: min(820px, calc(100vw - 48px)); max-width: none; }
.lehre { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.lehre .l-text { flex: 1; min-width: 0; }
.lehre .l-text small { margin: 4px 0 0; }
.lehre .l-knoepfe { display: flex; gap: 8px; flex: none; }

/* Kanalwahl: Kästchen zum Ankreuzen, Zeilen bleiben weiß */
.kanalmenue { display: flex; flex-direction: column; gap: 2px; }
.kanalmenue .kanal { flex-direction: row !important; align-items: center !important; gap: 10px !important; }
.kanalmenue .kanal[aria-pressed="true"] { background: transparent; }
.kanalmenue .kanal:hover, .kanalmenue .kanal[aria-pressed="true"]:hover { background: var(--gehoben); }
.kanalmenue .k-text { display: flex; flex-direction: column; min-width: 0; }
.kaestchen { width: 16px; height: 16px; flex: none; border: 1.5px solid var(--linie-stark); border-radius: 4px; background: var(--flaeche);
  display: inline-flex; align-items: center; justify-content: center; transition: background-color 120ms var(--kurve), border-color 120ms var(--kurve); }
.kanal[aria-pressed="true"] .kaestchen { background: var(--text); border-color: var(--text); }
.kanal[aria-pressed="true"] .kaestchen::after { content: ""; width: 8px; height: 4px; border: solid var(--flaeche); border-width: 0 0 1.5px 1.5px; transform: translateY(-1px) rotate(-45deg); }

/* Post-Text: Werkzeugliste, Untermenü */
.w-trenner { height: 1px; background: var(--linie); margin: 6px 0; }
.posttext { margin: 0 0 16px; display: flex; flex-direction: column; gap: 2px; }
.pt-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.pt-zeile:hover { background: var(--gehoben); }
.pt-zeile svg { color: var(--leise); transition: transform 150ms var(--kurve); }
.pt-zeile[aria-expanded="true"] svg { transform: rotate(180deg); }
.posttext .pt-felder { padding: 4px 8px 12px; }
.pt-gross { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 8px 0 0; padding: 6px 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.pt-gross:hover { background: var(--gehoben); }
.pt-gross svg { color: var(--leise); }
.posttext ~ .kanal-wrap, .kanal-wrap { margin-top: 0; }

/* Felder eines Kanals */
.pt-felder { display: flex; flex-direction: column; gap: 12px; }
.pt-felder h4, .pt-karte h4 { font-size: 12px; font-weight: 500; color: var(--leise); margin: 4px 0 0; }
.pt-feld { display: flex; flex-direction: column; gap: 4px; }
.pt-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--leise); }
.pt-wert { font-size: 13px; line-height: 20px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.pt-zahl { font-variant-numeric: tabular-nums; }
.pt-zahl.drueber { color: var(--fehler); }

/* Ausklapper im Modus Post-Text: nur die große Ansicht */
#d-modus { margin: 0; }
#d-modus button { padding: 3px 12px; font-size: 12px; }
.pt-zu { display: none; position: absolute; top: 12px; right: 12px; }
.schublade.modus-text .pt-zu { display: inline-flex; align-items: center; justify-content: center; }
.schublade.modus-text .panel { display: none; }
.schublade.modus-text .buehne-spalte { border-radius: 16px; position: relative; }
.schublade.modus-text .blaettern { display: none; }
.pt-ansicht { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.pt-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 720px; width: 100%; margin: 0 auto; }
.pt-karte.bearbeitet { box-shadow: 0 0 0 2px var(--korrektur); }
.pt-kopf { display: flex; align-items: center; gap: 12px; }
.pt-kopf h3 { flex: 1; font-size: 14px; font-weight: 500; margin: 0; }
.pt-icon { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--leise); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pt-icon:hover { background: var(--gehoben); color: var(--text); }
.pt-karte textarea { width: 100%; resize: vertical; font: inherit; font-size: 13px; line-height: 20px; }
.pt-hinweis { margin: 0; font-size: 12px; color: var(--leise); }
.pt-offen { max-width: 720px; width: 100%; margin: 0 auto; padding: 4px 16px; font-size: 12px; color: var(--leise); }
.pt-offen h3 { font-size: 12px; font-weight: 500; margin: 0 0 4px; color: var(--text-2); }
.pt-offen ul { margin: 0; padding-left: 16px; }
.pt-fuss { display: flex; justify-content: flex-end; padding: 12px 24px 16px; border-top: 1px solid var(--linie); }
.pt-fuss .knopf { gap: 8px; text-decoration: none; }

/* Post-Text-Kachel im Canvas */
.ptkarte .matte { height: 320px; box-sizing: border-box; }
.pt-kachel { height: 100%; background: var(--flaeche); border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  display: flex; flex-direction: column; overflow: hidden; }
.pt-k-kopf { display: flex; align-items: center; gap: 4px; padding: 8px 8px 6px; border-bottom: 1px solid var(--linie); }
.pt-k-kopf > span { flex: 1; text-align: center; font-size: 13px; font-weight: 500; }
.pt-k-kopf small { font-weight: 400; color: var(--leise); font-size: 11px; }
.pt-pfeil { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--leise); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pt-pfeil:hover { background: var(--gehoben); color: var(--text); }
.pt-k-inhalt { flex: 1; min-height: 0; overflow: hidden; padding: 12px 14px; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }
.pt-k-inhalt .pt-felder { gap: 10px; }
.pt-k-inhalt .pt-wert { font-size: 12px; line-height: 18px; }
.pt-k-inhalt .pt-label { font-size: 11px; }
.pt-k-alle { border: 0; border-top: 1px solid var(--linie); background: transparent; padding: 8px; font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer; }
.pt-k-alle:hover { color: var(--text); background: var(--gehoben); }
.leinen { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; z-index: 0; }
.akarte .aktionen .rund.an { background: var(--text); color: var(--flaeche); }

/* Grün nur noch am Senden-Knopf, nicht am Zähler */
.statusgruppe .zaehler, #lehren-zahl { background: transparent !important; color: var(--text-2) !important; padding: 0 !important; min-width: 0 !important; }
#eingabe .senden { background: var(--akzent); color: var(--akzent-text); }
#eingabe .senden:hover { filter: brightness(0.95); }

.posttext { margin: 0 0 16px; }
.posttext:empty { display: none; }

/* Versionen unter dem Bild */
.buehne > .versionen { justify-content: center; margin-top: 4px; }
/* Kopf der Post-Text-Karte: Aktionen schließen rechts bündig mit den Zeichenzahlen ab */
.pt-kopf { gap: 4px; }
.pt-kopf h3 { margin-right: 8px; }
.pt-kopf .textlink { text-decoration: none; color: var(--text-2); font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.pt-kopf .textlink:hover { background: var(--gehoben); color: var(--text); }
.pt-kopf .pt-icon { margin-right: -9px; } /* Symbol selbst hat 3 px Luft im Rahmen */

/* Kreis am Bild, wenn die Leine von der Textkachel kommt */
.ptkarte .aktionen { top: -14px; left: -14px; right: auto; } /* oben links auf der Ecke, damit es den Pfeil zum Kanal nicht verdeckt */

/* Plattform-Zeichen in der großen Post-Text-Ansicht */
.pt-logo { width: 28px; height: 28px; flex: none; border-radius: 50%; background: #111; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; margin-right: 4px; }
/* Zeichenzahl direkt neben dem Feldnamen, gleiche Schrift und Größe */
.pt-label { justify-content: flex-start; gap: 6px; }
.pt-zahl { font: inherit; color: inherit; }
.pt-zahl.drueber { color: var(--fehler); }

/* Post-Text-Symbol auf der Bildkarte oben links */
.akarte .aktionen.links { left: 8px; right: auto; }
.akarte .aktionen.links:empty { display: none; }

/* Produktauswahl in der Promptbox */
.produkt-menue { left: 0 !important; right: auto; width: min(400px, calc(var(--chat-breite) - 8px)); max-height: 460px; overflow-y: auto; padding: 8px; }
.p-suche { width: 100%; height: 32px; margin: 4px 0 8px; font-size: 13px; }
.p-bereiche { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.p-bereich { border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text-2); border-radius: 14px; padding: 2px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.p-bereich:hover { color: var(--text); }
.p-bereich.an { background: var(--gehoben); color: var(--text); border-color: var(--gehoben); }
.p-bild { background: #fff; }
.p-bild img { object-fit: contain !important; }

/* ODD Learnings: Schrift beim Darüberfahren grün */
#lehrenknopf:hover, #lehrenknopf:hover .zaehler { color: var(--akzent) !important; }

/* Post-Texte in der Bibliothek */
.b-kachel .b-textbild { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--gehoben); aspect-ratio: 1 / 1; align-items: stretch; justify-content: flex-start; box-sizing: border-box; }
.bt-kopf { display: flex; align-items: center; gap: 10px; }
.bt-kopf img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex: none; }
.bt-logos { display: flex; gap: 4px; flex-wrap: wrap; }
.bt-logos .pt-logo { width: 22px; height: 22px; margin: 0; }
.bt-logos .pt-logo svg { width: 13px; height: 13px; }
.bt-text { margin: 0; font-size: 12px; line-height: 18px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* Bibliothek ohne Rahmen, plain wie der Canvas */
.b-kachel { border: 0 !important; box-shadow: none !important; background: transparent !important; }
.b-kachel .b-bild { border-radius: 10px; }
.b-kachel .b-name { padding: 8px 2px; }
.b-kachel:hover .b-bild { background: #ececec; }
.p-raster .p-leer { grid-column: 1 / -1; margin: 12px 4px; font-size: 13px; color: var(--leise); }
.p-bereiche[hidden] { display: none; }

/* Lange Namen (Produkt, Template) kürzen statt den Senden-Knopf aus der Box zu schieben */
.k-leiste > .menue-wrap { min-width: 0; flex: 0 1 auto; }
.k-leiste .pille { min-width: 0; max-width: 100%; }
.pille .p-text, #k-format-text { min-width: 0; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-leiste .pille > svg, .k-leiste .pille > .ratio { flex: none; }
.k-leiste .anzahl, .k-leiste .senden { flex: none; }
/* Nur gewählte Namen (Template, Produkt) werden gekürzt; Kontext und Format bleiben ganz */
#k-plus, .k-leiste > .menue-wrap:has(#k-format) { flex: none; }
#k-format-text { max-width: none; }

/* Templates: Strich vor denen, die weiter weg von der Marke sind */
.t-trenner { height: 1px; background: var(--linie-stark); margin: 12px 4px; }

/* Hinweis von Odd zu einem Motiv */
.hinweis-motiv { margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; background: var(--blau-grund, #eef4ff); color: var(--text); font-size: 13px; line-height: 19px; }

/* Erledigte Schritte: Haken in unserem Grün, als Punkt wie der Senden-Knopf */
.schritte li.fertig .zeichen { border-radius: 50%; background: var(--akzent) no-repeat center/10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151614' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
/* Ladekreis sitzt auf der ersten Zeile, auch bei zweizeiligen Titeln */
.ph-kopf { align-items: flex-start; line-height: 20px; }
.ph-kopf > .zeichen { flex: none; margin-top: 3px; }

/* Fortschritt: je Beteiligtem eine Zeile, darunter alle Schritte zum Aufklappen */
.wer-liste { gap: 10px; }
.wer-liste li { align-items: flex-start; }
.wer-liste .w-text { display: flex; flex-direction: column; min-width: 0; }
.wer-liste .w-wer { font-weight: 500; font-size: 13px; line-height: 18px; }
.wer-liste .w-was { font-size: 12px; line-height: 17px; color: var(--text-2); overflow-wrap: anywhere; }
.wer-liste li.fertig .w-was { color: var(--leise); }
.f-alle summary { font-size: 12px; color: var(--leise); cursor: pointer; list-style: none; }
.f-alle summary::-webkit-details-marker { display: none; }
.f-alle summary::after { content: " ›"; }
.f-alle[open] summary::after { content: " ˅"; }
.f-alle .schritte { margin-top: 8px; max-height: 240px; overflow-y: auto; }

.abgabe-leer { width: 32px; height: 32px; border-radius: 6px; background: var(--gehoben); flex: none; }

/* Gruppen im Canvas: je Auftrag ein Rahmen mit Überschrift, Neues in Grün */
.gruppe-rahmen { position: absolute; border-radius: 20px; border: 1px solid var(--linie); background: rgba(255, 255, 255, 0.35); pointer-events: none; z-index: 0; }
.gruppe-rahmen.hat-neu { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.gruppe-kopf { position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; cursor: pointer; z-index: 1; white-space: nowrap; }
.gruppe-kopf:hover { background: var(--gehoben); }
.gruppe-kopf .g-titel { font-size: 18px; font-weight: 500; color: var(--text); }
.gruppe-kopf .g-zahl { font-size: 13px; color: var(--leise); }
.gruppe-kopf .g-neu { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px; background: var(--akzent); color: var(--akzent-text); }
.akarte.neu::after { content: "Neu"; position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 500; line-height: 16px; padding: 1px 7px; border-radius: 9px;
  background: var(--akzent); color: var(--akzent-text); pointer-events: none; }
.akarte.neu:hover::after { opacity: 0; }
.akarte { z-index: 1; }

/* Meldungen mittig oben: halb über der Kopfzeile, halb im Canvas */
.meldungen { top: 52px; left: 50%; right: auto; transform: translate(-50%, -50%); align-items: center; }
.meldung { box-shadow: var(--schatten-schwebend); white-space: nowrap; }

/* Rahmen: grün nur bei Neuem, nah herangezoomt fast unsichtbar, Zielrahmen beim Ziehen */
.gruppe-rahmen { transition: opacity 200ms var(--kurve), border-color 150ms var(--kurve), box-shadow 150ms var(--kurve); }
.welt.nah .gruppe-rahmen:not(.hat-neu):not(.ziel) { opacity: 0.25; }
.gruppe-rahmen.ziel { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent); opacity: 1; background: rgba(200, 240, 74, 0.08); }
.gruppe-kopf .g-gesehen { font-size: 12px; color: var(--leise); padding: 2px 6px; border-radius: 6px; }
.gruppe-kopf .g-gesehen:hover { color: var(--text); background: var(--flaeche); }

/* Headlines als grüne Links auf Motive */
.asset-link { display: inline; padding: 0 4px; margin: 0 1px; border: 0; border-radius: 4px; background: var(--akzent); color: var(--akzent-text);
  font: inherit; font-weight: 500; cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; text-align: left; }
.asset-link:hover { filter: brightness(0.94); }
.akarte.blinkt .matte { box-shadow: 0 0 0 3px var(--akzent); transition: box-shadow 200ms var(--kurve); }

/* Systemmeldungen: technische Grenzen, nicht von ODD formuliert */
.systemkarte { background: var(--gehoben); border-color: var(--linie-stark); font-size: 13px; }
.systemkarte b { display: block; font-weight: 500; margin-bottom: 4px; }
.systemkarte p { margin: 0; color: var(--text-2); }

/* Status je Motiv */
.status-chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.status-chips:empty { display: none; }
.chip-status { font-size: 11px; line-height: 16px; padding: 1px 7px; border-radius: 9px; background: var(--gehoben); color: var(--text-2); white-space: nowrap; }
.chip-status.ok { background: rgba(22, 163, 74, 0.1); color: var(--ok); }
.chip-status.warn { background: rgba(180, 83, 9, 0.1); color: var(--warn); }
.chip-status.fehler { background: rgba(220, 38, 38, 0.1); color: var(--fehler); }
.chip-status.ab { background: var(--akzent); color: var(--akzent-text); }
.akarte .name .chip-status { font-size: 11px; }

/* Offene Hinweise am Projekt */
.hinweisliste { border-bottom: 1px solid var(--linie); padding: 6px 8px; }
.hl-kopf { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 4px 6px; border-radius: 6px; font: inherit; font-size: 13px;
  font-weight: 500; color: var(--text); cursor: pointer; }
.hl-kopf:hover { background: var(--gehoben); }
.hl-kopf svg { margin-left: auto; color: var(--leise); transition: transform 150ms var(--kurve); }
.hl-kopf[aria-expanded="true"] svg { transform: rotate(180deg); }
.hl-zahl { font-size: 11px; line-height: 16px; min-width: 16px; padding: 0 5px; border-radius: 8px; background: var(--gehoben); color: var(--text-2); text-align: center; }
.hl-liste { list-style: none; margin: 4px 0 2px; padding: 0 6px; display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.hl-liste li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 19px; color: var(--text-2); }
.hl-erledigt { flex: none; width: 16px; height: 16px; margin-top: 2px; border: 1.5px solid var(--linie-stark); border-radius: 4px; background: var(--flaeche); cursor: pointer; }
.hl-erledigt:hover { border-color: var(--text); }
